aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/chownr
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/chownr')
-rw-r--r--node_modules/chownr/LICENSE.md63
-rw-r--r--node_modules/chownr/README.md3
-rw-r--r--node_modules/chownr/dist/commonjs/index.d.ts3
-rw-r--r--node_modules/chownr/dist/commonjs/index.js93
-rw-r--r--node_modules/chownr/dist/commonjs/package.json3
-rw-r--r--node_modules/chownr/dist/esm/index.d.ts3
-rw-r--r--node_modules/chownr/dist/esm/index.js85
-rw-r--r--node_modules/chownr/dist/esm/package.json3
-rw-r--r--node_modules/chownr/package.json69
9 files changed, 0 insertions, 325 deletions
diff --git a/node_modules/chownr/LICENSE.md b/node_modules/chownr/LICENSE.md
deleted file mode 100644
index 881248b..0000000
--- a/node_modules/chownr/LICENSE.md
+++ /dev/null
@@ -1,63 +0,0 @@
-All packages under `src/` are licensed according to the terms in
-their respective `LICENSE` or `LICENSE.md` files.
-
-The remainder of this project is licensed under the Blue Oak
-Model License, as follows:
-
------
-
-# Blue Oak Model License
-
-Version 1.0.0
-
-## Purpose
-
-This license gives everyone as much permission to work with
-this software as possible, while protecting contributors
-from liability.
-
-## Acceptance
-
-In order to receive this license, you must agree to its
-rules. The rules of this license are both obligations
-under that agreement and conditions to your license.
-You must not do anything with this software that triggers
-a rule that you cannot or will not follow.
-
-## Copyright
-
-Each contributor licenses you to do everything with this
-software that would otherwise infringe that contributor's
-copyright in it.
-
-## Notices
-
-You must ensure that everyone who gets a copy of
-any part of this software from you, with or without
-changes, also gets the text of this license or a link to
-<https://blueoakcouncil.org/license/1.0.0>.
-
-## Excuse
-
-If anyone notifies you in writing that you have not
-complied with [Notices](#notices), you can keep your
-license by taking all practical steps to comply within 30
-days after the notice. If you do not do so, your license
-ends immediately.
-
-## Patent
-
-Each contributor licenses you to do everything with this
-software that would otherwise infringe any patent claims
-they can license or become able to license.
-
-## Reliability
-
-No contributor can revoke this license.
-
-## No Liability
-
-***As far as the law allows, this software comes as is,
-without any warranty or condition, and no contributor
-will be liable to anyone for any damages related to this
-software or this license, under any kind of legal claim.***
diff --git a/node_modules/chownr/README.md b/node_modules/chownr/README.md
deleted file mode 100644
index 70e9a54..0000000
--- a/node_modules/chownr/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Like `chown -R`.
-
-Takes the same arguments as `fs.chown()`
diff --git a/node_modules/chownr/dist/commonjs/index.d.ts b/node_modules/chownr/dist/commonjs/index.d.ts
deleted file mode 100644
index 5ab081f..0000000
--- a/node_modules/chownr/dist/commonjs/index.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export declare const chownr: (p: string, uid: number, gid: number, cb: (er?: unknown) => any) => void;
-export declare const chownrSync: (p: string, uid: number, gid: number) => void;
-//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/chownr/dist/commonjs/index.js b/node_modules/chownr/dist/commonjs/index.js
deleted file mode 100644
index 6a7b68d..0000000
--- a/node_modules/chownr/dist/commonjs/index.js
+++ /dev/null
@@ -1,93 +0,0 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.chownrSync = exports.chownr = void 0;
-const node_fs_1 = __importDefault(require("node:fs"));
-const node_path_1 = __importDefault(require("node:path"));
-const lchownSync = (path, uid, gid) => {
- try {
- return node_fs_1.default.lchownSync(path, uid, gid);
- }
- catch (er) {
- if (er?.code !== 'ENOENT')
- throw er;
- }
-};
-const chown = (cpath, uid, gid, cb) => {
- node_fs_1.default.lchown(cpath, uid, gid, er => {
- // Skip ENOENT error
- cb(er && er?.code !== 'ENOENT' ? er : null);
- });
-};
-const chownrKid = (p, child, uid, gid, cb) => {
- if (child.isDirectory()) {
- (0, exports.chownr)(node_path_1.default.resolve(p, child.name), uid, gid, (er) => {
- if (er)
- return cb(er);
- const cpath = node_path_1.default.resolve(p, child.name);
- chown(cpath, uid, gid, cb);
- });
- }
- else {
- const cpath = node_path_1.default.resolve(p, child.name);
- chown(cpath, uid, gid, cb);
- }
-};
-const chownr = (p, uid, gid, cb) => {
- node_fs_1.default.readdir(p, { withFileTypes: true }, (er, children) => {
- // any error other than ENOTDIR or ENOTSUP means it's not readable,
- // or doesn't exist. give up.
- if (er) {
- if (er.code === 'ENOENT')
- return cb();
- else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
- return cb(er);
- }
- if (er || !children.length)
- return chown(p, uid, gid, cb);
- let len = children.length;
- let errState = null;
- const then = (er) => {
- /* c8 ignore start */
- if (errState)
- return;
- /* c8 ignore stop */
- if (er)
- return cb((errState = er));
- if (--len === 0)
- return chown(p, uid, gid, cb);
- };
- for (const child of children) {
- chownrKid(p, child, uid, gid, then);
- }
- });
-};
-exports.chownr = chownr;
-const chownrKidSync = (p, child, uid, gid) => {
- if (child.isDirectory())
- (0, exports.chownrSync)(node_path_1.default.resolve(p, child.name), uid, gid);
- lchownSync(node_path_1.default.resolve(p, child.name), uid, gid);
-};
-const chownrSync = (p, uid, gid) => {
- let children;
- try {
- children = node_fs_1.default.readdirSync(p, { withFileTypes: true });
- }
- catch (er) {
- const e = er;
- if (e?.code === 'ENOENT')
- return;
- else if (e?.code === 'ENOTDIR' || e?.code === 'ENOTSUP')
- return lchownSync(p, uid, gid);
- else
- throw e;
- }
- for (const child of children) {
- chownrKidSync(p, child, uid, gid);
- }
- return lchownSync(p, uid, gid);
-};
-exports.chownrSync = chownrSync;
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/chownr/dist/commonjs/package.json b/node_modules/chownr/dist/commonjs/package.json
deleted file mode 100644
index 5bbefff..0000000
--- a/node_modules/chownr/dist/commonjs/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "type": "commonjs"
-}
diff --git a/node_modules/chownr/dist/esm/index.d.ts b/node_modules/chownr/dist/esm/index.d.ts
deleted file mode 100644
index 5ab081f..0000000
--- a/node_modules/chownr/dist/esm/index.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export declare const chownr: (p: string, uid: number, gid: number, cb: (er?: unknown) => any) => void;
-export declare const chownrSync: (p: string, uid: number, gid: number) => void;
-//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/chownr/dist/esm/index.js b/node_modules/chownr/dist/esm/index.js
deleted file mode 100644
index 5c28152..0000000
--- a/node_modules/chownr/dist/esm/index.js
+++ /dev/null
@@ -1,85 +0,0 @@
-import fs from 'node:fs';
-import path from 'node:path';
-const lchownSync = (path, uid, gid) => {
- try {
- return fs.lchownSync(path, uid, gid);
- }
- catch (er) {
- if (er?.code !== 'ENOENT')
- throw er;
- }
-};
-const chown = (cpath, uid, gid, cb) => {
- fs.lchown(cpath, uid, gid, er => {
- // Skip ENOENT error
- cb(er && er?.code !== 'ENOENT' ? er : null);
- });
-};
-const chownrKid = (p, child, uid, gid, cb) => {
- if (child.isDirectory()) {
- chownr(path.resolve(p, child.name), uid, gid, (er) => {
- if (er)
- return cb(er);
- const cpath = path.resolve(p, child.name);
- chown(cpath, uid, gid, cb);
- });
- }
- else {
- const cpath = path.resolve(p, child.name);
- chown(cpath, uid, gid, cb);
- }
-};
-export const chownr = (p, uid, gid, cb) => {
- fs.readdir(p, { withFileTypes: true }, (er, children) => {
- // any error other than ENOTDIR or ENOTSUP means it's not readable,
- // or doesn't exist. give up.
- if (er) {
- if (er.code === 'ENOENT')
- return cb();
- else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
- return cb(er);
- }
- if (er || !children.length)
- return chown(p, uid, gid, cb);
- let len = children.length;
- let errState = null;
- const then = (er) => {
- /* c8 ignore start */
- if (errState)
- return;
- /* c8 ignore stop */
- if (er)
- return cb((errState = er));
- if (--len === 0)
- return chown(p, uid, gid, cb);
- };
- for (const child of children) {
- chownrKid(p, child, uid, gid, then);
- }
- });
-};
-const chownrKidSync = (p, child, uid, gid) => {
- if (child.isDirectory())
- chownrSync(path.resolve(p, child.name), uid, gid);
- lchownSync(path.resolve(p, child.name), uid, gid);
-};
-export const chownrSync = (p, uid, gid) => {
- let children;
- try {
- children = fs.readdirSync(p, { withFileTypes: true });
- }
- catch (er) {
- const e = er;
- if (e?.code === 'ENOENT')
- return;
- else if (e?.code === 'ENOTDIR' || e?.code === 'ENOTSUP')
- return lchownSync(p, uid, gid);
- else
- throw e;
- }
- for (const child of children) {
- chownrKidSync(p, child, uid, gid);
- }
- return lchownSync(p, uid, gid);
-};
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/chownr/dist/esm/package.json b/node_modules/chownr/dist/esm/package.json
deleted file mode 100644
index 3dbc1ca..0000000
--- a/node_modules/chownr/dist/esm/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "type": "module"
-}
diff --git a/node_modules/chownr/package.json b/node_modules/chownr/package.json
deleted file mode 100644
index 09aa6b2..0000000
--- a/node_modules/chownr/package.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
- "name": "chownr",
- "description": "like `chown -R`",
- "version": "3.0.0",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/chownr.git"
- },
- "files": [
- "dist"
- ],
- "devDependencies": {
- "@types/node": "^20.12.5",
- "mkdirp": "^3.0.1",
- "prettier": "^3.2.5",
- "rimraf": "^5.0.5",
- "tap": "^18.7.2",
- "tshy": "^1.13.1",
- "typedoc": "^0.25.12"
- },
- "scripts": {
- "prepare": "tshy",
- "pretest": "npm run prepare",
- "test": "tap",
- "preversion": "npm test",
- "postversion": "npm publish",
- "prepublishOnly": "git push origin --follow-tags",
- "format": "prettier --write . --loglevel warn",
- "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
- },
- "license": "BlueOak-1.0.0",
- "engines": {
- "node": ">=18"
- },
- "tshy": {
- "exports": {
- "./package.json": "./package.json",
- ".": "./src/index.ts"
- }
- },
- "exports": {
- "./package.json": "./package.json",
- ".": {
- "import": {
- "types": "./dist/esm/index.d.ts",
- "default": "./dist/esm/index.js"
- },
- "require": {
- "types": "./dist/commonjs/index.d.ts",
- "default": "./dist/commonjs/index.js"
- }
- }
- },
- "main": "./dist/commonjs/index.js",
- "types": "./dist/commonjs/index.d.ts",
- "type": "module",
- "prettier": {
- "semi": false,
- "printWidth": 75,
- "tabWidth": 2,
- "useTabs": false,
- "singleQuote": true,
- "jsxSingleQuote": false,
- "bracketSameLine": true,
- "arrowParens": "avoid",
- "endOfLine": "lf"
- }
-}