aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/chownr/dist/commonjs
diff options
context:
space:
mode:
authorpack <pack@packgekko.xyz>2026-08-09 10:54:08 +0000
committerpack <pack@packgekko.xyz>2026-08-09 10:54:08 +0000
commitd3adc16a08d95d6e331de55d7d3bf05a66a874a8 (patch)
treea2dabd199501e67c547c2ce79e1374ca3aa55443 /node_modules/chownr/dist/commonjs
parent55a4f1fc869e41aca748c63d3018f0448b1606e0 (diff)
downloadcrud-d3adc16a08d95d6e331de55d7d3bf05a66a874a8.tar.gz
stop tracking node_modules/
Diffstat (limited to 'node_modules/chownr/dist/commonjs')
-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
3 files changed, 0 insertions, 99 deletions
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"
-}