Comparing version 2.0.7 to 2.1.0
@@ -0,1 +1,7 @@ | ||
# v2.1.0 (Jun 8, 2021) | ||
* feat: Added `mkdirpSync()`, `moveSync()`, and `writeFileSync()` helpers that create parent | ||
directories and apply parent directory ownership. | ||
* chore: Updated dependencies. | ||
# v2.0.7 (Apr 26, 2021) | ||
@@ -2,0 +8,0 @@ |
122
dist/fs.js
@@ -10,3 +10,6 @@ "use strict"; | ||
exports.locate = locate; | ||
exports.mkdirpSync = mkdirpSync; | ||
exports.moveSync = moveSync; | ||
exports.readdirScopedSync = readdirScopedSync; | ||
exports.writeFileSync = writeFileSync; | ||
@@ -25,2 +28,56 @@ var _fs = _interopRequireDefault(require("fs")); | ||
/** | ||
* Determines owner of existing parent directory, calls the operation's function, then applies the | ||
* owner to the destination and its newly created parent directories. | ||
* | ||
* @param {String} dest - The destination of the file or directory the operation is targetting. | ||
* @param {Object} opts - Various options. | ||
* @param {Boolean} [opts.applyOwner=true] - When `true`, determines the owner of the closest | ||
* existing parent directory and apply the owner to the file and any newly created directories. | ||
* @param {Number} [opts.gid] - The group id to apply to the file when assigning an owner. | ||
* @param {Number} [opts.uid] - The user id to apply to the file when assigning an owner. | ||
* @param {Function} fn - A function to call to perform the original filesystem operation. | ||
*/ | ||
function execute(dest, opts, fn) { | ||
if (opts.applyOwner === false || process.platform === 'win32' || !process.getuid || process.getuid() !== 0) { | ||
fn(opts); | ||
return; | ||
} | ||
dest = _path.default.resolve(dest); | ||
let origin = _path.default.parse(dest).root; | ||
if (!opts.uid) { | ||
for (origin = dest; true; origin = _path.default.dirname(origin)) { | ||
try { | ||
const st = _fs.default.lstatSync(origin); | ||
if (st.isDirectory()) { | ||
opts = Object.assign({}, opts, { | ||
gid: st.gid, | ||
uid: st.uid | ||
}); | ||
break; | ||
} | ||
} catch (err) {// continue | ||
} | ||
} | ||
} | ||
fn(opts); | ||
const chownSync = _fs.default.lchownSync || _fs.default.chownSync; | ||
let stat = _fs.default.lstatSync(dest); | ||
while (dest !== origin && stat.uid !== opts.uid) { | ||
try { | ||
chownSync(dest, opts.uid, opts.gid); | ||
dest = _path.default.dirname(dest); | ||
stat = _fs.default.lstatSync(dest); | ||
} catch (e) { | ||
break; | ||
} | ||
} | ||
} | ||
/** | ||
* Determines if a file or directory exists. | ||
@@ -31,2 +88,4 @@ * | ||
*/ | ||
function existsSync(file) { | ||
@@ -112,2 +171,42 @@ try { | ||
/** | ||
* Creates a directory and any parent directories if needed. | ||
* | ||
* @param {String} dest - The directory path to create. | ||
* @param {Object} [opts] - Various options plus options to pass into `fs.mkdirSync()`. | ||
* @param {Boolean} [opts.applyOwner=true] - When `true`, determines the owner of the closest | ||
* existing parent directory and apply the owner to the file and any newly created directories. | ||
* @param {Number} [opts.gid] - The group id to apply to the file when assigning an owner. | ||
* @param {Number} [opts.uid] - The user id to apply to the file when assigning an owner. | ||
*/ | ||
function mkdirpSync(dest, opts = {}) { | ||
execute(dest, opts, opts => { | ||
_fs.default.mkdirSync(dest, { ...opts, | ||
recursive: true | ||
}); | ||
}); | ||
} | ||
/** | ||
* Moves a file. | ||
* | ||
* @param {String} src - The file or directory to move. | ||
* @param {String} dest - The destination to move the file or directory to. | ||
* @param {Object} [opts] - Various options plus options to pass into `fs.mkdirSync()` and | ||
* `fs.renameSync()`. | ||
* @param {Boolean} [opts.applyOwner=true] - When `true`, determines the owner of the closest | ||
* existing parent directory and apply the owner to the file and any newly created directories. | ||
* @param {Number} [opts.gid] - The group id to apply to the file when assigning an owner. | ||
* @param {Number} [opts.uid] - The user id to apply to the file when assigning an owner. | ||
*/ | ||
function moveSync(src, dest, opts = {}) { | ||
execute(dest, opts, opts => { | ||
mkdirpSync(_path.default.dirname(dest), opts); | ||
_fs.default.renameSync(src, dest, opts); | ||
}); | ||
} | ||
/** | ||
* Read a directory including scoped packages as a single entry in the Array | ||
@@ -144,2 +243,23 @@ * and filtering out all files. | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY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1pc3Npb24gaXNzdWVcblx0fVxuXHRyZXR1cm4gbnVsbDtcbn1cblxuLyoqXG4gKiBSZWFkIGEgZGlyZWN0b3J5IGluY2x1ZGluZyBzY29wZWQgcGFja2FnZXMgYXMgYSBzaW5nbGUgZW50cnkgaW4gdGhlIEFycmF5XG4gKiBhbmQgZmlsdGVyaW5nIG91dCBhbGwgZmlsZXMuXG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IGRpciAtIERpcmVjdG9yeSB0byByZWFkLlxuICogQHJldHVybnMge0FycmF5fVxuICovXG5leHBvcnQgZnVuY3Rpb24gcmVhZGRpclNjb3BlZFN5bmMoZGlyKSB7XG5cdGNvbnN0IGNoaWxkcmVuID0gW107XG5cblx0Zm9yIChjb25zdCBuYW1lIG9mIGZzLnJlYWRkaXJTeW5jKGRpcikpIHtcblx0XHRjb25zdCBjaGlsZFBhdGggPSBwYXRoLmpvaW4oZGlyLCBuYW1lKTtcblx0XHRpZiAoIWlzRGlyKGNoaWxkUGF0aCkpIHtcblx0XHRcdGNvbnRpbnVlO1xuXHRcdH1cblx0XHRpZiAobmFtZS5jaGFyQXQoMCkgPT09ICdAJykge1xuXHRcdFx0Zm9yIChjb25zdCBzY29wZWRQYWNrYWdlIG9mIGZzLnJlYWRkaXJTeW5jKGNoaWxkUGF0aCkpIHtcblx0XHRcdFx0aWYgKGlzRGlyKHBhdGguam9pbihjaGlsZFBhdGgsIHNjb3BlZFBhY2thZ2UpKSkge1xuXHRcdFx0XHRcdGNoaWxkcmVuLnB1c2goYCR7bmFtZX0vJHtzY29wZWRQYWNrYWdlfWApO1xuXHRcdFx0XHR9XG5cdFx0XHR9XG5cdFx0fSBlbHNlIHtcblx0XHRcdGNoaWxkcmVuLnB1c2gobmFtZSk7XG5cdFx0fVxuXHR9XG5cblx0cmV0dXJuIGNoaWxkcmVuO1xufVxuIl0sImZpbGUiOiJmcy5qcyJ9 | ||
/** | ||
* Writes a file to disk. | ||
* | ||
* @param {String} dest - The name of the file to write. | ||
* @param {String} contents - The contents of the file to write. | ||
* @param {Object} [opts] - Various options plus options to pass into `fs.mkdirSync()` and | ||
* `fs.writeFileSync()`. | ||
* @param {Boolean} [opts.applyOwner=true] - When `true`, determines the owner of the closest | ||
* existing parent directory and apply the owner to the file and any newly created directories. | ||
* @param {Number} [opts.gid] - The group id to apply to the file when assigning an owner. | ||
* @param {Number} [opts.uid] - The user id to apply to the file when assigning an owner. | ||
*/ | ||
function writeFileSync(dest, contents, opts = {}) { | ||
execute(dest, opts, opts => { | ||
mkdirpSync(_path.default.dirname(dest), opts); | ||
_fs.default.writeFileSync(dest, contents, opts); | ||
}); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZzLmpzIl0sIm5hbWVzIjpbIkVycm9yIiwicHJlcGFyZVN0YWNrVHJhY2UiLCJyZXF1aXJlIiwiZXhlY3V0ZSIsImRlc3QiLCJvcHRzIiwiZm4iLCJhcHBseU93bmVyIiwicHJvY2VzcyIsInBsYXRmb3JtIiwiZ2V0dWlkIiwicGF0aCIsInJlc29sdmUiLCJvcmlnaW4iLCJwYXJzZSIsInJvb3QiLCJ1aWQiLCJkaXJuYW1lIiwic3QiLCJmcyIsImxzdGF0U3luYyIsImlzRGlyZWN0b3J5IiwiT2JqZWN0IiwiYXNzaWduIiwiZ2lkIiwiZXJyIiwiY2hvd25TeW5jIiwibGNob3duU3luYyIsInN0YXQiLCJlIiwiZXhpc3RzU3luYyIsImZpbGUiLCJzdGF0U3luYyIsImlzRGlyIiwiZGlyIiwiaXNGaWxlIiwibG9jYXRlIiwiZmlsZW5hbWUiLCJkZXB0aCIsIm5hbWUiLCJyZWFkZGlyU3luYyIsImpvaW4iLCJyZXN1bHQiLCJ1bmRlZmluZWQiLCJSZWdFeHAiLCJ0ZXN0IiwibWtkaXJwU3luYyIsIm1rZGlyU3luYyIsInJlY3Vyc2l2ZSIsIm1vdmVTeW5jIiwic3JjIiwicmVuYW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aGUgZmlsZSB0byB3cml0ZS5cbiAqIEBwYXJhbSB7T2JqZWN0fSBbb3B0c10gLSBWYXJpb3VzIG9wdGlvbnMgcGx1cyBvcHRpb25zIHRvIHBhc3MgaW50byBgZnMubWtkaXJTeW5jKClgIGFuZFxuICogYGZzLndyaXRlRmlsZVN5bmMoKWAuXG4gKiBAcGFyYW0ge0Jvb2xlYW59IFtvcHRzLmFwcGx5T3duZXI9dHJ1ZV0gLSBXaGVuIGB0cnVlYCwgZGV0ZXJtaW5lcyB0aGUgb3duZXIgb2YgdGhlIGNsb3Nlc3RcbiAqIGV4aXN0aW5nIHBhcmVudCBkaXJlY3RvcnkgYW5kIGFwcGx5IHRoZSBvd25lciB0byB0aGUgZmlsZSBhbmQgYW55IG5ld2x5IGNyZWF0ZWQgZGlyZWN0b3JpZXMuXG4gKiBAcGFyYW0ge051bWJlcn0gW29wdHMuZ2lkXSAtIFRoZSBncm91cCBpZCB0byBhcHBseSB0byB0aGUgZmlsZSB3aGVuIGFzc2lnbmluZyBhbiBvd25lci5cbiAqIEBwYXJhbSB7TnVtYmVyfSBbb3B0cy51aWRdIC0gVGhlIHVzZXIgaWQgdG8gYXBwbHkgdG8gdGhlIGZpbGUgd2hlbiBhc3NpZ25pbmcgYW4gb3duZXIuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiB3cml0ZUZpbGVTeW5jKGRlc3QsIGNvbnRlbnRzLCBvcHRzID0ge30pIHtcblx0ZXhlY3V0ZShkZXN0LCBvcHRzLCBvcHRzID0+IHtcblx0XHRta2RpcnBTeW5jKHBhdGguZGlybmFtZShkZXN0KSwgb3B0cyk7XG5cdFx0ZnMud3JpdGVGaWxlU3luYyhkZXN0LCBjb250ZW50cywgb3B0cyk7XG5cdH0pO1xufVxuIl0sImZpbGUiOiJmcy5qcyJ9 |
{ | ||
"name": "appcd-fs", | ||
"version": "2.0.7", | ||
"version": "2.1.0", | ||
"description": "Library of useful filesystem functions.", | ||
@@ -19,6 +19,7 @@ "main": "./dist/fs", | ||
"dependencies": { | ||
"source-map-support": "^0.5.19" | ||
"source-map-support": "^0.5.19", | ||
"tmp": "^0.2.1" | ||
}, | ||
"devDependencies": { | ||
"appcd-gulp": "^3.1.6" | ||
"appcd-gulp": "^3.2.0" | ||
}, | ||
@@ -30,4 +31,3 @@ "homepage": "https://github.com/appcelerator/appc-daemon", | ||
"node": ">=10.13.0" | ||
}, | ||
"gitHead": "15e8b31ac846c3532cd840b6463836a68747c18e" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28231
283
2
+ Addedtmp@^0.2.1
+ Addedtmp@0.2.3(transitive)