@storm-software/workspace-tools 1.41.1 → 1.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/config/nx.json +10 -15
- package/index.js +122 -1617
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +51 -77
- package/src/executors/design-tokens/executor.js +51 -77
- package/src/executors/tsup/executor.js +82452 -83944
- package/src/executors/tsup-browser/executor.js +119 -1612
- package/src/executors/tsup-neutral/executor.js +118 -1612
- package/src/executors/tsup-node/executor.js +120 -1613
- package/src/generators/browser-library/generator.js +51 -77
- package/src/generators/config-schema/generator.js +51 -77
- package/src/generators/neutral-library/generator.js +51 -77
- package/src/generators/node-library/generator.js +51 -77
- package/src/generators/preset/files/biome.json +4 -0
- package/src/generators/preset/files/lefthook.json +6 -0
- package/src/generators/preset/generator.js +51 -77
- package/src/generators/preset/files/.husky/post-checkout +0 -5
- package/src/generators/preset/files/.husky/post-commit +0 -4
- package/src/generators/preset/files/.husky/post-merge +0 -5
- package/src/generators/preset/files/.husky/pre-commit +0 -4
- package/src/generators/preset/files/.husky/pre-push +0 -4
- package/src/generators/preset/files/eslint.config.js +0 -59
|
@@ -2196,9 +2196,9 @@ var require_chalk = __commonJS({
|
|
|
2196
2196
|
}
|
|
2197
2197
|
});
|
|
2198
2198
|
|
|
2199
|
-
// node_modules/.pnpm/@babel+highlight@7.
|
|
2199
|
+
// node_modules/.pnpm/@babel+highlight@7.23.4/node_modules/@babel/highlight/lib/index.js
|
|
2200
2200
|
var require_lib2 = __commonJS({
|
|
2201
|
-
"node_modules/.pnpm/@babel+highlight@7.
|
|
2201
|
+
"node_modules/.pnpm/@babel+highlight@7.23.4/node_modules/@babel/highlight/lib/index.js"(exports) {
|
|
2202
2202
|
"use strict";
|
|
2203
2203
|
Object.defineProperty(exports, "__esModule", {
|
|
2204
2204
|
value: true
|
|
@@ -2208,43 +2208,29 @@ var require_lib2 = __commonJS({
|
|
|
2208
2208
|
var _jsTokens = require_js_tokens();
|
|
2209
2209
|
var _helperValidatorIdentifier = require_lib();
|
|
2210
2210
|
var _chalk = _interopRequireWildcard(require_chalk(), true);
|
|
2211
|
-
function _getRequireWildcardCache(
|
|
2212
|
-
if (typeof WeakMap
|
|
2211
|
+
function _getRequireWildcardCache(e) {
|
|
2212
|
+
if ("function" != typeof WeakMap)
|
|
2213
2213
|
return null;
|
|
2214
|
-
var
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
var
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2235
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
2236
|
-
if (desc && (desc.get || desc.set)) {
|
|
2237
|
-
Object.defineProperty(newObj, key, desc);
|
|
2238
|
-
} else {
|
|
2239
|
-
newObj[key] = obj[key];
|
|
2240
|
-
}
|
|
2241
|
-
}
|
|
2242
|
-
}
|
|
2243
|
-
newObj.default = obj;
|
|
2244
|
-
if (cache) {
|
|
2245
|
-
cache.set(obj, newObj);
|
|
2246
|
-
}
|
|
2247
|
-
return newObj;
|
|
2214
|
+
var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
|
|
2215
|
+
return (_getRequireWildcardCache = function(e2) {
|
|
2216
|
+
return e2 ? t : r;
|
|
2217
|
+
})(e);
|
|
2218
|
+
}
|
|
2219
|
+
function _interopRequireWildcard(e, r) {
|
|
2220
|
+
if (!r && e && e.__esModule)
|
|
2221
|
+
return e;
|
|
2222
|
+
if (null === e || "object" != typeof e && "function" != typeof e)
|
|
2223
|
+
return { default: e };
|
|
2224
|
+
var t = _getRequireWildcardCache(r);
|
|
2225
|
+
if (t && t.has(e))
|
|
2226
|
+
return t.get(e);
|
|
2227
|
+
var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
2228
|
+
for (var u in e)
|
|
2229
|
+
if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
|
|
2230
|
+
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
2231
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
2232
|
+
}
|
|
2233
|
+
return n.default = e, t && t.set(e, n), n;
|
|
2248
2234
|
}
|
|
2249
2235
|
var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
|
|
2250
2236
|
function getDefs(chalk2) {
|
|
@@ -2340,9 +2326,9 @@ var require_lib2 = __commonJS({
|
|
|
2340
2326
|
}
|
|
2341
2327
|
});
|
|
2342
2328
|
|
|
2343
|
-
// node_modules/.pnpm/@babel+code-frame@7.
|
|
2329
|
+
// node_modules/.pnpm/@babel+code-frame@7.23.5/node_modules/@babel/code-frame/lib/index.js
|
|
2344
2330
|
var require_lib3 = __commonJS({
|
|
2345
|
-
"node_modules/.pnpm/@babel+code-frame@7.
|
|
2331
|
+
"node_modules/.pnpm/@babel+code-frame@7.23.5/node_modules/@babel/code-frame/lib/index.js"(exports) {
|
|
2346
2332
|
"use strict";
|
|
2347
2333
|
Object.defineProperty(exports, "__esModule", {
|
|
2348
2334
|
value: true
|
|
@@ -2351,43 +2337,29 @@ var require_lib3 = __commonJS({
|
|
|
2351
2337
|
exports.default = _default;
|
|
2352
2338
|
var _highlight = require_lib2();
|
|
2353
2339
|
var _chalk = _interopRequireWildcard(require_chalk(), true);
|
|
2354
|
-
function _getRequireWildcardCache(
|
|
2355
|
-
if (typeof WeakMap
|
|
2340
|
+
function _getRequireWildcardCache(e) {
|
|
2341
|
+
if ("function" != typeof WeakMap)
|
|
2356
2342
|
return null;
|
|
2357
|
-
var
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
var
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2378
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
2379
|
-
if (desc && (desc.get || desc.set)) {
|
|
2380
|
-
Object.defineProperty(newObj, key, desc);
|
|
2381
|
-
} else {
|
|
2382
|
-
newObj[key] = obj[key];
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
}
|
|
2386
|
-
newObj.default = obj;
|
|
2387
|
-
if (cache) {
|
|
2388
|
-
cache.set(obj, newObj);
|
|
2389
|
-
}
|
|
2390
|
-
return newObj;
|
|
2343
|
+
var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
|
|
2344
|
+
return (_getRequireWildcardCache = function(e2) {
|
|
2345
|
+
return e2 ? t : r;
|
|
2346
|
+
})(e);
|
|
2347
|
+
}
|
|
2348
|
+
function _interopRequireWildcard(e, r) {
|
|
2349
|
+
if (!r && e && e.__esModule)
|
|
2350
|
+
return e;
|
|
2351
|
+
if (null === e || "object" != typeof e && "function" != typeof e)
|
|
2352
|
+
return { default: e };
|
|
2353
|
+
var t = _getRequireWildcardCache(r);
|
|
2354
|
+
if (t && t.has(e))
|
|
2355
|
+
return t.get(e);
|
|
2356
|
+
var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
2357
|
+
for (var u in e)
|
|
2358
|
+
if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
|
|
2359
|
+
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
2360
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
2361
|
+
}
|
|
2362
|
+
return n.default = e, t && t.set(e, n), n;
|
|
2391
2363
|
}
|
|
2392
2364
|
var chalkWithForcedColor = void 0;
|
|
2393
2365
|
function getChalk(forceColor) {
|
|
@@ -44699,1491 +44671,6 @@ var require_tsc_impl = __commonJS({
|
|
|
44699
44671
|
}
|
|
44700
44672
|
});
|
|
44701
44673
|
|
|
44702
|
-
// node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js
|
|
44703
|
-
var require_universalify2 = __commonJS({
|
|
44704
|
-
"node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
|
|
44705
|
-
"use strict";
|
|
44706
|
-
exports.fromCallback = function(fn) {
|
|
44707
|
-
return Object.defineProperty(function(...args) {
|
|
44708
|
-
if (typeof args[args.length - 1] === "function")
|
|
44709
|
-
fn.apply(this, args);
|
|
44710
|
-
else {
|
|
44711
|
-
return new Promise((resolve, reject) => {
|
|
44712
|
-
fn.call(
|
|
44713
|
-
this,
|
|
44714
|
-
...args,
|
|
44715
|
-
(err, res) => err != null ? reject(err) : resolve(res)
|
|
44716
|
-
);
|
|
44717
|
-
});
|
|
44718
|
-
}
|
|
44719
|
-
}, "name", { value: fn.name });
|
|
44720
|
-
};
|
|
44721
|
-
exports.fromPromise = function(fn) {
|
|
44722
|
-
return Object.defineProperty(function(...args) {
|
|
44723
|
-
const cb = args[args.length - 1];
|
|
44724
|
-
if (typeof cb !== "function")
|
|
44725
|
-
return fn.apply(this, args);
|
|
44726
|
-
else
|
|
44727
|
-
fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb);
|
|
44728
|
-
}, "name", { value: fn.name });
|
|
44729
|
-
};
|
|
44730
|
-
}
|
|
44731
|
-
});
|
|
44732
|
-
|
|
44733
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js
|
|
44734
|
-
var require_fs7 = __commonJS({
|
|
44735
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js"(exports) {
|
|
44736
|
-
"use strict";
|
|
44737
|
-
var u = require_universalify2().fromCallback;
|
|
44738
|
-
var fs = require_graceful_fs();
|
|
44739
|
-
var api = [
|
|
44740
|
-
"access",
|
|
44741
|
-
"appendFile",
|
|
44742
|
-
"chmod",
|
|
44743
|
-
"chown",
|
|
44744
|
-
"close",
|
|
44745
|
-
"copyFile",
|
|
44746
|
-
"fchmod",
|
|
44747
|
-
"fchown",
|
|
44748
|
-
"fdatasync",
|
|
44749
|
-
"fstat",
|
|
44750
|
-
"fsync",
|
|
44751
|
-
"ftruncate",
|
|
44752
|
-
"futimes",
|
|
44753
|
-
"lchmod",
|
|
44754
|
-
"lchown",
|
|
44755
|
-
"link",
|
|
44756
|
-
"lstat",
|
|
44757
|
-
"mkdir",
|
|
44758
|
-
"mkdtemp",
|
|
44759
|
-
"open",
|
|
44760
|
-
"opendir",
|
|
44761
|
-
"readdir",
|
|
44762
|
-
"readFile",
|
|
44763
|
-
"readlink",
|
|
44764
|
-
"realpath",
|
|
44765
|
-
"rename",
|
|
44766
|
-
"rm",
|
|
44767
|
-
"rmdir",
|
|
44768
|
-
"stat",
|
|
44769
|
-
"symlink",
|
|
44770
|
-
"truncate",
|
|
44771
|
-
"unlink",
|
|
44772
|
-
"utimes",
|
|
44773
|
-
"writeFile"
|
|
44774
|
-
].filter((key) => {
|
|
44775
|
-
return typeof fs[key] === "function";
|
|
44776
|
-
});
|
|
44777
|
-
Object.assign(exports, fs);
|
|
44778
|
-
api.forEach((method) => {
|
|
44779
|
-
exports[method] = u(fs[method]);
|
|
44780
|
-
});
|
|
44781
|
-
exports.exists = function(filename, callback) {
|
|
44782
|
-
if (typeof callback === "function") {
|
|
44783
|
-
return fs.exists(filename, callback);
|
|
44784
|
-
}
|
|
44785
|
-
return new Promise((resolve) => {
|
|
44786
|
-
return fs.exists(filename, resolve);
|
|
44787
|
-
});
|
|
44788
|
-
};
|
|
44789
|
-
exports.read = function(fd, buffer, offset, length, position, callback) {
|
|
44790
|
-
if (typeof callback === "function") {
|
|
44791
|
-
return fs.read(fd, buffer, offset, length, position, callback);
|
|
44792
|
-
}
|
|
44793
|
-
return new Promise((resolve, reject) => {
|
|
44794
|
-
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
44795
|
-
if (err)
|
|
44796
|
-
return reject(err);
|
|
44797
|
-
resolve({ bytesRead, buffer: buffer2 });
|
|
44798
|
-
});
|
|
44799
|
-
});
|
|
44800
|
-
};
|
|
44801
|
-
exports.write = function(fd, buffer, ...args) {
|
|
44802
|
-
if (typeof args[args.length - 1] === "function") {
|
|
44803
|
-
return fs.write(fd, buffer, ...args);
|
|
44804
|
-
}
|
|
44805
|
-
return new Promise((resolve, reject) => {
|
|
44806
|
-
fs.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
44807
|
-
if (err)
|
|
44808
|
-
return reject(err);
|
|
44809
|
-
resolve({ bytesWritten, buffer: buffer2 });
|
|
44810
|
-
});
|
|
44811
|
-
});
|
|
44812
|
-
};
|
|
44813
|
-
exports.readv = function(fd, buffers, ...args) {
|
|
44814
|
-
if (typeof args[args.length - 1] === "function") {
|
|
44815
|
-
return fs.readv(fd, buffers, ...args);
|
|
44816
|
-
}
|
|
44817
|
-
return new Promise((resolve, reject) => {
|
|
44818
|
-
fs.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
|
|
44819
|
-
if (err)
|
|
44820
|
-
return reject(err);
|
|
44821
|
-
resolve({ bytesRead, buffers: buffers2 });
|
|
44822
|
-
});
|
|
44823
|
-
});
|
|
44824
|
-
};
|
|
44825
|
-
exports.writev = function(fd, buffers, ...args) {
|
|
44826
|
-
if (typeof args[args.length - 1] === "function") {
|
|
44827
|
-
return fs.writev(fd, buffers, ...args);
|
|
44828
|
-
}
|
|
44829
|
-
return new Promise((resolve, reject) => {
|
|
44830
|
-
fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
44831
|
-
if (err)
|
|
44832
|
-
return reject(err);
|
|
44833
|
-
resolve({ bytesWritten, buffers: buffers2 });
|
|
44834
|
-
});
|
|
44835
|
-
});
|
|
44836
|
-
};
|
|
44837
|
-
if (typeof fs.realpath.native === "function") {
|
|
44838
|
-
exports.realpath.native = u(fs.realpath.native);
|
|
44839
|
-
} else {
|
|
44840
|
-
process.emitWarning(
|
|
44841
|
-
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
44842
|
-
"Warning",
|
|
44843
|
-
"fs-extra-WARN0003"
|
|
44844
|
-
);
|
|
44845
|
-
}
|
|
44846
|
-
}
|
|
44847
|
-
});
|
|
44848
|
-
|
|
44849
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js
|
|
44850
|
-
var require_utils9 = __commonJS({
|
|
44851
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module2) {
|
|
44852
|
-
"use strict";
|
|
44853
|
-
var path2 = require("path");
|
|
44854
|
-
module2.exports.checkPath = function checkPath(pth) {
|
|
44855
|
-
if (process.platform === "win32") {
|
|
44856
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path2.parse(pth).root, ""));
|
|
44857
|
-
if (pathHasInvalidWinCharacters) {
|
|
44858
|
-
const error = new Error(`Path contains invalid characters: ${pth}`);
|
|
44859
|
-
error.code = "EINVAL";
|
|
44860
|
-
throw error;
|
|
44861
|
-
}
|
|
44862
|
-
}
|
|
44863
|
-
};
|
|
44864
|
-
}
|
|
44865
|
-
});
|
|
44866
|
-
|
|
44867
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js
|
|
44868
|
-
var require_make_dir2 = __commonJS({
|
|
44869
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module2) {
|
|
44870
|
-
"use strict";
|
|
44871
|
-
var fs = require_fs7();
|
|
44872
|
-
var { checkPath } = require_utils9();
|
|
44873
|
-
var getMode = (options) => {
|
|
44874
|
-
const defaults2 = { mode: 511 };
|
|
44875
|
-
if (typeof options === "number")
|
|
44876
|
-
return options;
|
|
44877
|
-
return { ...defaults2, ...options }.mode;
|
|
44878
|
-
};
|
|
44879
|
-
module2.exports.makeDir = async (dir, options) => {
|
|
44880
|
-
checkPath(dir);
|
|
44881
|
-
return fs.mkdir(dir, {
|
|
44882
|
-
mode: getMode(options),
|
|
44883
|
-
recursive: true
|
|
44884
|
-
});
|
|
44885
|
-
};
|
|
44886
|
-
module2.exports.makeDirSync = (dir, options) => {
|
|
44887
|
-
checkPath(dir);
|
|
44888
|
-
return fs.mkdirSync(dir, {
|
|
44889
|
-
mode: getMode(options),
|
|
44890
|
-
recursive: true
|
|
44891
|
-
});
|
|
44892
|
-
};
|
|
44893
|
-
}
|
|
44894
|
-
});
|
|
44895
|
-
|
|
44896
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js
|
|
44897
|
-
var require_mkdirs2 = __commonJS({
|
|
44898
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module2) {
|
|
44899
|
-
"use strict";
|
|
44900
|
-
var u = require_universalify2().fromPromise;
|
|
44901
|
-
var { makeDir: _makeDir, makeDirSync } = require_make_dir2();
|
|
44902
|
-
var makeDir = u(_makeDir);
|
|
44903
|
-
module2.exports = {
|
|
44904
|
-
mkdirs: makeDir,
|
|
44905
|
-
mkdirsSync: makeDirSync,
|
|
44906
|
-
// alias
|
|
44907
|
-
mkdirp: makeDir,
|
|
44908
|
-
mkdirpSync: makeDirSync,
|
|
44909
|
-
ensureDir: makeDir,
|
|
44910
|
-
ensureDirSync: makeDirSync
|
|
44911
|
-
};
|
|
44912
|
-
}
|
|
44913
|
-
});
|
|
44914
|
-
|
|
44915
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js
|
|
44916
|
-
var require_path_exists2 = __commonJS({
|
|
44917
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) {
|
|
44918
|
-
"use strict";
|
|
44919
|
-
var u = require_universalify2().fromPromise;
|
|
44920
|
-
var fs = require_fs7();
|
|
44921
|
-
function pathExists(path2) {
|
|
44922
|
-
return fs.access(path2).then(() => true).catch(() => false);
|
|
44923
|
-
}
|
|
44924
|
-
module2.exports = {
|
|
44925
|
-
pathExists: u(pathExists),
|
|
44926
|
-
pathExistsSync: fs.existsSync
|
|
44927
|
-
};
|
|
44928
|
-
}
|
|
44929
|
-
});
|
|
44930
|
-
|
|
44931
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js
|
|
44932
|
-
var require_utimes2 = __commonJS({
|
|
44933
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) {
|
|
44934
|
-
"use strict";
|
|
44935
|
-
var fs = require_graceful_fs();
|
|
44936
|
-
function utimesMillis(path2, atime, mtime, callback) {
|
|
44937
|
-
fs.open(path2, "r+", (err, fd) => {
|
|
44938
|
-
if (err)
|
|
44939
|
-
return callback(err);
|
|
44940
|
-
fs.futimes(fd, atime, mtime, (futimesErr) => {
|
|
44941
|
-
fs.close(fd, (closeErr) => {
|
|
44942
|
-
if (callback)
|
|
44943
|
-
callback(futimesErr || closeErr);
|
|
44944
|
-
});
|
|
44945
|
-
});
|
|
44946
|
-
});
|
|
44947
|
-
}
|
|
44948
|
-
function utimesMillisSync(path2, atime, mtime) {
|
|
44949
|
-
const fd = fs.openSync(path2, "r+");
|
|
44950
|
-
fs.futimesSync(fd, atime, mtime);
|
|
44951
|
-
return fs.closeSync(fd);
|
|
44952
|
-
}
|
|
44953
|
-
module2.exports = {
|
|
44954
|
-
utimesMillis,
|
|
44955
|
-
utimesMillisSync
|
|
44956
|
-
};
|
|
44957
|
-
}
|
|
44958
|
-
});
|
|
44959
|
-
|
|
44960
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js
|
|
44961
|
-
var require_stat2 = __commonJS({
|
|
44962
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js"(exports, module2) {
|
|
44963
|
-
"use strict";
|
|
44964
|
-
var fs = require_fs7();
|
|
44965
|
-
var path2 = require("path");
|
|
44966
|
-
var util2 = require("util");
|
|
44967
|
-
function getStats(src, dest, opts) {
|
|
44968
|
-
const statFunc = opts.dereference ? (file) => fs.stat(file, { bigint: true }) : (file) => fs.lstat(file, { bigint: true });
|
|
44969
|
-
return Promise.all([
|
|
44970
|
-
statFunc(src),
|
|
44971
|
-
statFunc(dest).catch((err) => {
|
|
44972
|
-
if (err.code === "ENOENT")
|
|
44973
|
-
return null;
|
|
44974
|
-
throw err;
|
|
44975
|
-
})
|
|
44976
|
-
]).then(([srcStat, destStat]) => ({ srcStat, destStat }));
|
|
44977
|
-
}
|
|
44978
|
-
function getStatsSync(src, dest, opts) {
|
|
44979
|
-
let destStat;
|
|
44980
|
-
const statFunc = opts.dereference ? (file) => fs.statSync(file, { bigint: true }) : (file) => fs.lstatSync(file, { bigint: true });
|
|
44981
|
-
const srcStat = statFunc(src);
|
|
44982
|
-
try {
|
|
44983
|
-
destStat = statFunc(dest);
|
|
44984
|
-
} catch (err) {
|
|
44985
|
-
if (err.code === "ENOENT")
|
|
44986
|
-
return { srcStat, destStat: null };
|
|
44987
|
-
throw err;
|
|
44988
|
-
}
|
|
44989
|
-
return { srcStat, destStat };
|
|
44990
|
-
}
|
|
44991
|
-
function checkPaths(src, dest, funcName, opts, cb) {
|
|
44992
|
-
util2.callbackify(getStats)(src, dest, opts, (err, stats) => {
|
|
44993
|
-
if (err)
|
|
44994
|
-
return cb(err);
|
|
44995
|
-
const { srcStat, destStat } = stats;
|
|
44996
|
-
if (destStat) {
|
|
44997
|
-
if (areIdentical(srcStat, destStat)) {
|
|
44998
|
-
const srcBaseName = path2.basename(src);
|
|
44999
|
-
const destBaseName = path2.basename(dest);
|
|
45000
|
-
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
45001
|
-
return cb(null, { srcStat, destStat, isChangingCase: true });
|
|
45002
|
-
}
|
|
45003
|
-
return cb(new Error("Source and destination must not be the same."));
|
|
45004
|
-
}
|
|
45005
|
-
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
45006
|
-
return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`));
|
|
45007
|
-
}
|
|
45008
|
-
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
45009
|
-
return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`));
|
|
45010
|
-
}
|
|
45011
|
-
}
|
|
45012
|
-
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
|
45013
|
-
return cb(new Error(errMsg(src, dest, funcName)));
|
|
45014
|
-
}
|
|
45015
|
-
return cb(null, { srcStat, destStat });
|
|
45016
|
-
});
|
|
45017
|
-
}
|
|
45018
|
-
function checkPathsSync(src, dest, funcName, opts) {
|
|
45019
|
-
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
45020
|
-
if (destStat) {
|
|
45021
|
-
if (areIdentical(srcStat, destStat)) {
|
|
45022
|
-
const srcBaseName = path2.basename(src);
|
|
45023
|
-
const destBaseName = path2.basename(dest);
|
|
45024
|
-
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
45025
|
-
return { srcStat, destStat, isChangingCase: true };
|
|
45026
|
-
}
|
|
45027
|
-
throw new Error("Source and destination must not be the same.");
|
|
45028
|
-
}
|
|
45029
|
-
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
45030
|
-
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
|
|
45031
|
-
}
|
|
45032
|
-
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
45033
|
-
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
|
|
45034
|
-
}
|
|
45035
|
-
}
|
|
45036
|
-
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
|
45037
|
-
throw new Error(errMsg(src, dest, funcName));
|
|
45038
|
-
}
|
|
45039
|
-
return { srcStat, destStat };
|
|
45040
|
-
}
|
|
45041
|
-
function checkParentPaths(src, srcStat, dest, funcName, cb) {
|
|
45042
|
-
const srcParent = path2.resolve(path2.dirname(src));
|
|
45043
|
-
const destParent = path2.resolve(path2.dirname(dest));
|
|
45044
|
-
if (destParent === srcParent || destParent === path2.parse(destParent).root)
|
|
45045
|
-
return cb();
|
|
45046
|
-
fs.stat(destParent, { bigint: true }, (err, destStat) => {
|
|
45047
|
-
if (err) {
|
|
45048
|
-
if (err.code === "ENOENT")
|
|
45049
|
-
return cb();
|
|
45050
|
-
return cb(err);
|
|
45051
|
-
}
|
|
45052
|
-
if (areIdentical(srcStat, destStat)) {
|
|
45053
|
-
return cb(new Error(errMsg(src, dest, funcName)));
|
|
45054
|
-
}
|
|
45055
|
-
return checkParentPaths(src, srcStat, destParent, funcName, cb);
|
|
45056
|
-
});
|
|
45057
|
-
}
|
|
45058
|
-
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
45059
|
-
const srcParent = path2.resolve(path2.dirname(src));
|
|
45060
|
-
const destParent = path2.resolve(path2.dirname(dest));
|
|
45061
|
-
if (destParent === srcParent || destParent === path2.parse(destParent).root)
|
|
45062
|
-
return;
|
|
45063
|
-
let destStat;
|
|
45064
|
-
try {
|
|
45065
|
-
destStat = fs.statSync(destParent, { bigint: true });
|
|
45066
|
-
} catch (err) {
|
|
45067
|
-
if (err.code === "ENOENT")
|
|
45068
|
-
return;
|
|
45069
|
-
throw err;
|
|
45070
|
-
}
|
|
45071
|
-
if (areIdentical(srcStat, destStat)) {
|
|
45072
|
-
throw new Error(errMsg(src, dest, funcName));
|
|
45073
|
-
}
|
|
45074
|
-
return checkParentPathsSync(src, srcStat, destParent, funcName);
|
|
45075
|
-
}
|
|
45076
|
-
function areIdentical(srcStat, destStat) {
|
|
45077
|
-
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
45078
|
-
}
|
|
45079
|
-
function isSrcSubdir(src, dest) {
|
|
45080
|
-
const srcArr = path2.resolve(src).split(path2.sep).filter((i) => i);
|
|
45081
|
-
const destArr = path2.resolve(dest).split(path2.sep).filter((i) => i);
|
|
45082
|
-
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true);
|
|
45083
|
-
}
|
|
45084
|
-
function errMsg(src, dest, funcName) {
|
|
45085
|
-
return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
|
|
45086
|
-
}
|
|
45087
|
-
module2.exports = {
|
|
45088
|
-
checkPaths,
|
|
45089
|
-
checkPathsSync,
|
|
45090
|
-
checkParentPaths,
|
|
45091
|
-
checkParentPathsSync,
|
|
45092
|
-
isSrcSubdir,
|
|
45093
|
-
areIdentical
|
|
45094
|
-
};
|
|
45095
|
-
}
|
|
45096
|
-
});
|
|
45097
|
-
|
|
45098
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js
|
|
45099
|
-
var require_copy3 = __commonJS({
|
|
45100
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) {
|
|
45101
|
-
"use strict";
|
|
45102
|
-
var fs = require_graceful_fs();
|
|
45103
|
-
var path2 = require("path");
|
|
45104
|
-
var mkdirs = require_mkdirs2().mkdirs;
|
|
45105
|
-
var pathExists = require_path_exists2().pathExists;
|
|
45106
|
-
var utimesMillis = require_utimes2().utimesMillis;
|
|
45107
|
-
var stat = require_stat2();
|
|
45108
|
-
function copy(src, dest, opts, cb) {
|
|
45109
|
-
if (typeof opts === "function" && !cb) {
|
|
45110
|
-
cb = opts;
|
|
45111
|
-
opts = {};
|
|
45112
|
-
} else if (typeof opts === "function") {
|
|
45113
|
-
opts = { filter: opts };
|
|
45114
|
-
}
|
|
45115
|
-
cb = cb || function() {
|
|
45116
|
-
};
|
|
45117
|
-
opts = opts || {};
|
|
45118
|
-
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
|
45119
|
-
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
|
45120
|
-
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
45121
|
-
process.emitWarning(
|
|
45122
|
-
"Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
|
|
45123
|
-
"Warning",
|
|
45124
|
-
"fs-extra-WARN0001"
|
|
45125
|
-
);
|
|
45126
|
-
}
|
|
45127
|
-
stat.checkPaths(src, dest, "copy", opts, (err, stats) => {
|
|
45128
|
-
if (err)
|
|
45129
|
-
return cb(err);
|
|
45130
|
-
const { srcStat, destStat } = stats;
|
|
45131
|
-
stat.checkParentPaths(src, srcStat, dest, "copy", (err2) => {
|
|
45132
|
-
if (err2)
|
|
45133
|
-
return cb(err2);
|
|
45134
|
-
runFilter(src, dest, opts, (err3, include) => {
|
|
45135
|
-
if (err3)
|
|
45136
|
-
return cb(err3);
|
|
45137
|
-
if (!include)
|
|
45138
|
-
return cb();
|
|
45139
|
-
checkParentDir(destStat, src, dest, opts, cb);
|
|
45140
|
-
});
|
|
45141
|
-
});
|
|
45142
|
-
});
|
|
45143
|
-
}
|
|
45144
|
-
function checkParentDir(destStat, src, dest, opts, cb) {
|
|
45145
|
-
const destParent = path2.dirname(dest);
|
|
45146
|
-
pathExists(destParent, (err, dirExists) => {
|
|
45147
|
-
if (err)
|
|
45148
|
-
return cb(err);
|
|
45149
|
-
if (dirExists)
|
|
45150
|
-
return getStats(destStat, src, dest, opts, cb);
|
|
45151
|
-
mkdirs(destParent, (err2) => {
|
|
45152
|
-
if (err2)
|
|
45153
|
-
return cb(err2);
|
|
45154
|
-
return getStats(destStat, src, dest, opts, cb);
|
|
45155
|
-
});
|
|
45156
|
-
});
|
|
45157
|
-
}
|
|
45158
|
-
function runFilter(src, dest, opts, cb) {
|
|
45159
|
-
if (!opts.filter)
|
|
45160
|
-
return cb(null, true);
|
|
45161
|
-
Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error));
|
|
45162
|
-
}
|
|
45163
|
-
function getStats(destStat, src, dest, opts, cb) {
|
|
45164
|
-
const stat2 = opts.dereference ? fs.stat : fs.lstat;
|
|
45165
|
-
stat2(src, (err, srcStat) => {
|
|
45166
|
-
if (err)
|
|
45167
|
-
return cb(err);
|
|
45168
|
-
if (srcStat.isDirectory())
|
|
45169
|
-
return onDir(srcStat, destStat, src, dest, opts, cb);
|
|
45170
|
-
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
|
|
45171
|
-
return onFile(srcStat, destStat, src, dest, opts, cb);
|
|
45172
|
-
else if (srcStat.isSymbolicLink())
|
|
45173
|
-
return onLink(destStat, src, dest, opts, cb);
|
|
45174
|
-
else if (srcStat.isSocket())
|
|
45175
|
-
return cb(new Error(`Cannot copy a socket file: ${src}`));
|
|
45176
|
-
else if (srcStat.isFIFO())
|
|
45177
|
-
return cb(new Error(`Cannot copy a FIFO pipe: ${src}`));
|
|
45178
|
-
return cb(new Error(`Unknown file: ${src}`));
|
|
45179
|
-
});
|
|
45180
|
-
}
|
|
45181
|
-
function onFile(srcStat, destStat, src, dest, opts, cb) {
|
|
45182
|
-
if (!destStat)
|
|
45183
|
-
return copyFile(srcStat, src, dest, opts, cb);
|
|
45184
|
-
return mayCopyFile(srcStat, src, dest, opts, cb);
|
|
45185
|
-
}
|
|
45186
|
-
function mayCopyFile(srcStat, src, dest, opts, cb) {
|
|
45187
|
-
if (opts.overwrite) {
|
|
45188
|
-
fs.unlink(dest, (err) => {
|
|
45189
|
-
if (err)
|
|
45190
|
-
return cb(err);
|
|
45191
|
-
return copyFile(srcStat, src, dest, opts, cb);
|
|
45192
|
-
});
|
|
45193
|
-
} else if (opts.errorOnExist) {
|
|
45194
|
-
return cb(new Error(`'${dest}' already exists`));
|
|
45195
|
-
} else
|
|
45196
|
-
return cb();
|
|
45197
|
-
}
|
|
45198
|
-
function copyFile(srcStat, src, dest, opts, cb) {
|
|
45199
|
-
fs.copyFile(src, dest, (err) => {
|
|
45200
|
-
if (err)
|
|
45201
|
-
return cb(err);
|
|
45202
|
-
if (opts.preserveTimestamps)
|
|
45203
|
-
return handleTimestampsAndMode(srcStat.mode, src, dest, cb);
|
|
45204
|
-
return setDestMode(dest, srcStat.mode, cb);
|
|
45205
|
-
});
|
|
45206
|
-
}
|
|
45207
|
-
function handleTimestampsAndMode(srcMode, src, dest, cb) {
|
|
45208
|
-
if (fileIsNotWritable(srcMode)) {
|
|
45209
|
-
return makeFileWritable(dest, srcMode, (err) => {
|
|
45210
|
-
if (err)
|
|
45211
|
-
return cb(err);
|
|
45212
|
-
return setDestTimestampsAndMode(srcMode, src, dest, cb);
|
|
45213
|
-
});
|
|
45214
|
-
}
|
|
45215
|
-
return setDestTimestampsAndMode(srcMode, src, dest, cb);
|
|
45216
|
-
}
|
|
45217
|
-
function fileIsNotWritable(srcMode) {
|
|
45218
|
-
return (srcMode & 128) === 0;
|
|
45219
|
-
}
|
|
45220
|
-
function makeFileWritable(dest, srcMode, cb) {
|
|
45221
|
-
return setDestMode(dest, srcMode | 128, cb);
|
|
45222
|
-
}
|
|
45223
|
-
function setDestTimestampsAndMode(srcMode, src, dest, cb) {
|
|
45224
|
-
setDestTimestamps(src, dest, (err) => {
|
|
45225
|
-
if (err)
|
|
45226
|
-
return cb(err);
|
|
45227
|
-
return setDestMode(dest, srcMode, cb);
|
|
45228
|
-
});
|
|
45229
|
-
}
|
|
45230
|
-
function setDestMode(dest, srcMode, cb) {
|
|
45231
|
-
return fs.chmod(dest, srcMode, cb);
|
|
45232
|
-
}
|
|
45233
|
-
function setDestTimestamps(src, dest, cb) {
|
|
45234
|
-
fs.stat(src, (err, updatedSrcStat) => {
|
|
45235
|
-
if (err)
|
|
45236
|
-
return cb(err);
|
|
45237
|
-
return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb);
|
|
45238
|
-
});
|
|
45239
|
-
}
|
|
45240
|
-
function onDir(srcStat, destStat, src, dest, opts, cb) {
|
|
45241
|
-
if (!destStat)
|
|
45242
|
-
return mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
|
|
45243
|
-
return copyDir(src, dest, opts, cb);
|
|
45244
|
-
}
|
|
45245
|
-
function mkDirAndCopy(srcMode, src, dest, opts, cb) {
|
|
45246
|
-
fs.mkdir(dest, (err) => {
|
|
45247
|
-
if (err)
|
|
45248
|
-
return cb(err);
|
|
45249
|
-
copyDir(src, dest, opts, (err2) => {
|
|
45250
|
-
if (err2)
|
|
45251
|
-
return cb(err2);
|
|
45252
|
-
return setDestMode(dest, srcMode, cb);
|
|
45253
|
-
});
|
|
45254
|
-
});
|
|
45255
|
-
}
|
|
45256
|
-
function copyDir(src, dest, opts, cb) {
|
|
45257
|
-
fs.readdir(src, (err, items) => {
|
|
45258
|
-
if (err)
|
|
45259
|
-
return cb(err);
|
|
45260
|
-
return copyDirItems(items, src, dest, opts, cb);
|
|
45261
|
-
});
|
|
45262
|
-
}
|
|
45263
|
-
function copyDirItems(items, src, dest, opts, cb) {
|
|
45264
|
-
const item = items.pop();
|
|
45265
|
-
if (!item)
|
|
45266
|
-
return cb();
|
|
45267
|
-
return copyDirItem(items, item, src, dest, opts, cb);
|
|
45268
|
-
}
|
|
45269
|
-
function copyDirItem(items, item, src, dest, opts, cb) {
|
|
45270
|
-
const srcItem = path2.join(src, item);
|
|
45271
|
-
const destItem = path2.join(dest, item);
|
|
45272
|
-
runFilter(srcItem, destItem, opts, (err, include) => {
|
|
45273
|
-
if (err)
|
|
45274
|
-
return cb(err);
|
|
45275
|
-
if (!include)
|
|
45276
|
-
return copyDirItems(items, src, dest, opts, cb);
|
|
45277
|
-
stat.checkPaths(srcItem, destItem, "copy", opts, (err2, stats) => {
|
|
45278
|
-
if (err2)
|
|
45279
|
-
return cb(err2);
|
|
45280
|
-
const { destStat } = stats;
|
|
45281
|
-
getStats(destStat, srcItem, destItem, opts, (err3) => {
|
|
45282
|
-
if (err3)
|
|
45283
|
-
return cb(err3);
|
|
45284
|
-
return copyDirItems(items, src, dest, opts, cb);
|
|
45285
|
-
});
|
|
45286
|
-
});
|
|
45287
|
-
});
|
|
45288
|
-
}
|
|
45289
|
-
function onLink(destStat, src, dest, opts, cb) {
|
|
45290
|
-
fs.readlink(src, (err, resolvedSrc) => {
|
|
45291
|
-
if (err)
|
|
45292
|
-
return cb(err);
|
|
45293
|
-
if (opts.dereference) {
|
|
45294
|
-
resolvedSrc = path2.resolve(process.cwd(), resolvedSrc);
|
|
45295
|
-
}
|
|
45296
|
-
if (!destStat) {
|
|
45297
|
-
return fs.symlink(resolvedSrc, dest, cb);
|
|
45298
|
-
} else {
|
|
45299
|
-
fs.readlink(dest, (err2, resolvedDest) => {
|
|
45300
|
-
if (err2) {
|
|
45301
|
-
if (err2.code === "EINVAL" || err2.code === "UNKNOWN")
|
|
45302
|
-
return fs.symlink(resolvedSrc, dest, cb);
|
|
45303
|
-
return cb(err2);
|
|
45304
|
-
}
|
|
45305
|
-
if (opts.dereference) {
|
|
45306
|
-
resolvedDest = path2.resolve(process.cwd(), resolvedDest);
|
|
45307
|
-
}
|
|
45308
|
-
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
45309
|
-
return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
|
|
45310
|
-
}
|
|
45311
|
-
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
45312
|
-
return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
|
|
45313
|
-
}
|
|
45314
|
-
return copyLink(resolvedSrc, dest, cb);
|
|
45315
|
-
});
|
|
45316
|
-
}
|
|
45317
|
-
});
|
|
45318
|
-
}
|
|
45319
|
-
function copyLink(resolvedSrc, dest, cb) {
|
|
45320
|
-
fs.unlink(dest, (err) => {
|
|
45321
|
-
if (err)
|
|
45322
|
-
return cb(err);
|
|
45323
|
-
return fs.symlink(resolvedSrc, dest, cb);
|
|
45324
|
-
});
|
|
45325
|
-
}
|
|
45326
|
-
module2.exports = copy;
|
|
45327
|
-
}
|
|
45328
|
-
});
|
|
45329
|
-
|
|
45330
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js
|
|
45331
|
-
var require_copy_sync2 = __commonJS({
|
|
45332
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module2) {
|
|
45333
|
-
"use strict";
|
|
45334
|
-
var fs = require_graceful_fs();
|
|
45335
|
-
var path2 = require("path");
|
|
45336
|
-
var mkdirsSync = require_mkdirs2().mkdirsSync;
|
|
45337
|
-
var utimesMillisSync = require_utimes2().utimesMillisSync;
|
|
45338
|
-
var stat = require_stat2();
|
|
45339
|
-
function copySync(src, dest, opts) {
|
|
45340
|
-
if (typeof opts === "function") {
|
|
45341
|
-
opts = { filter: opts };
|
|
45342
|
-
}
|
|
45343
|
-
opts = opts || {};
|
|
45344
|
-
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
|
45345
|
-
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
|
45346
|
-
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
45347
|
-
process.emitWarning(
|
|
45348
|
-
"Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
|
|
45349
|
-
"Warning",
|
|
45350
|
-
"fs-extra-WARN0002"
|
|
45351
|
-
);
|
|
45352
|
-
}
|
|
45353
|
-
const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
45354
|
-
stat.checkParentPathsSync(src, srcStat, dest, "copy");
|
|
45355
|
-
if (opts.filter && !opts.filter(src, dest))
|
|
45356
|
-
return;
|
|
45357
|
-
const destParent = path2.dirname(dest);
|
|
45358
|
-
if (!fs.existsSync(destParent))
|
|
45359
|
-
mkdirsSync(destParent);
|
|
45360
|
-
return getStats(destStat, src, dest, opts);
|
|
45361
|
-
}
|
|
45362
|
-
function getStats(destStat, src, dest, opts) {
|
|
45363
|
-
const statSync = opts.dereference ? fs.statSync : fs.lstatSync;
|
|
45364
|
-
const srcStat = statSync(src);
|
|
45365
|
-
if (srcStat.isDirectory())
|
|
45366
|
-
return onDir(srcStat, destStat, src, dest, opts);
|
|
45367
|
-
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
|
|
45368
|
-
return onFile(srcStat, destStat, src, dest, opts);
|
|
45369
|
-
else if (srcStat.isSymbolicLink())
|
|
45370
|
-
return onLink(destStat, src, dest, opts);
|
|
45371
|
-
else if (srcStat.isSocket())
|
|
45372
|
-
throw new Error(`Cannot copy a socket file: ${src}`);
|
|
45373
|
-
else if (srcStat.isFIFO())
|
|
45374
|
-
throw new Error(`Cannot copy a FIFO pipe: ${src}`);
|
|
45375
|
-
throw new Error(`Unknown file: ${src}`);
|
|
45376
|
-
}
|
|
45377
|
-
function onFile(srcStat, destStat, src, dest, opts) {
|
|
45378
|
-
if (!destStat)
|
|
45379
|
-
return copyFile(srcStat, src, dest, opts);
|
|
45380
|
-
return mayCopyFile(srcStat, src, dest, opts);
|
|
45381
|
-
}
|
|
45382
|
-
function mayCopyFile(srcStat, src, dest, opts) {
|
|
45383
|
-
if (opts.overwrite) {
|
|
45384
|
-
fs.unlinkSync(dest);
|
|
45385
|
-
return copyFile(srcStat, src, dest, opts);
|
|
45386
|
-
} else if (opts.errorOnExist) {
|
|
45387
|
-
throw new Error(`'${dest}' already exists`);
|
|
45388
|
-
}
|
|
45389
|
-
}
|
|
45390
|
-
function copyFile(srcStat, src, dest, opts) {
|
|
45391
|
-
fs.copyFileSync(src, dest);
|
|
45392
|
-
if (opts.preserveTimestamps)
|
|
45393
|
-
handleTimestamps(srcStat.mode, src, dest);
|
|
45394
|
-
return setDestMode(dest, srcStat.mode);
|
|
45395
|
-
}
|
|
45396
|
-
function handleTimestamps(srcMode, src, dest) {
|
|
45397
|
-
if (fileIsNotWritable(srcMode))
|
|
45398
|
-
makeFileWritable(dest, srcMode);
|
|
45399
|
-
return setDestTimestamps(src, dest);
|
|
45400
|
-
}
|
|
45401
|
-
function fileIsNotWritable(srcMode) {
|
|
45402
|
-
return (srcMode & 128) === 0;
|
|
45403
|
-
}
|
|
45404
|
-
function makeFileWritable(dest, srcMode) {
|
|
45405
|
-
return setDestMode(dest, srcMode | 128);
|
|
45406
|
-
}
|
|
45407
|
-
function setDestMode(dest, srcMode) {
|
|
45408
|
-
return fs.chmodSync(dest, srcMode);
|
|
45409
|
-
}
|
|
45410
|
-
function setDestTimestamps(src, dest) {
|
|
45411
|
-
const updatedSrcStat = fs.statSync(src);
|
|
45412
|
-
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
45413
|
-
}
|
|
45414
|
-
function onDir(srcStat, destStat, src, dest, opts) {
|
|
45415
|
-
if (!destStat)
|
|
45416
|
-
return mkDirAndCopy(srcStat.mode, src, dest, opts);
|
|
45417
|
-
return copyDir(src, dest, opts);
|
|
45418
|
-
}
|
|
45419
|
-
function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
45420
|
-
fs.mkdirSync(dest);
|
|
45421
|
-
copyDir(src, dest, opts);
|
|
45422
|
-
return setDestMode(dest, srcMode);
|
|
45423
|
-
}
|
|
45424
|
-
function copyDir(src, dest, opts) {
|
|
45425
|
-
fs.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
45426
|
-
}
|
|
45427
|
-
function copyDirItem(item, src, dest, opts) {
|
|
45428
|
-
const srcItem = path2.join(src, item);
|
|
45429
|
-
const destItem = path2.join(dest, item);
|
|
45430
|
-
if (opts.filter && !opts.filter(srcItem, destItem))
|
|
45431
|
-
return;
|
|
45432
|
-
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
|
|
45433
|
-
return getStats(destStat, srcItem, destItem, opts);
|
|
45434
|
-
}
|
|
45435
|
-
function onLink(destStat, src, dest, opts) {
|
|
45436
|
-
let resolvedSrc = fs.readlinkSync(src);
|
|
45437
|
-
if (opts.dereference) {
|
|
45438
|
-
resolvedSrc = path2.resolve(process.cwd(), resolvedSrc);
|
|
45439
|
-
}
|
|
45440
|
-
if (!destStat) {
|
|
45441
|
-
return fs.symlinkSync(resolvedSrc, dest);
|
|
45442
|
-
} else {
|
|
45443
|
-
let resolvedDest;
|
|
45444
|
-
try {
|
|
45445
|
-
resolvedDest = fs.readlinkSync(dest);
|
|
45446
|
-
} catch (err) {
|
|
45447
|
-
if (err.code === "EINVAL" || err.code === "UNKNOWN")
|
|
45448
|
-
return fs.symlinkSync(resolvedSrc, dest);
|
|
45449
|
-
throw err;
|
|
45450
|
-
}
|
|
45451
|
-
if (opts.dereference) {
|
|
45452
|
-
resolvedDest = path2.resolve(process.cwd(), resolvedDest);
|
|
45453
|
-
}
|
|
45454
|
-
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
45455
|
-
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
45456
|
-
}
|
|
45457
|
-
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
45458
|
-
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
45459
|
-
}
|
|
45460
|
-
return copyLink(resolvedSrc, dest);
|
|
45461
|
-
}
|
|
45462
|
-
}
|
|
45463
|
-
function copyLink(resolvedSrc, dest) {
|
|
45464
|
-
fs.unlinkSync(dest);
|
|
45465
|
-
return fs.symlinkSync(resolvedSrc, dest);
|
|
45466
|
-
}
|
|
45467
|
-
module2.exports = copySync;
|
|
45468
|
-
}
|
|
45469
|
-
});
|
|
45470
|
-
|
|
45471
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js
|
|
45472
|
-
var require_copy4 = __commonJS({
|
|
45473
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js"(exports, module2) {
|
|
45474
|
-
"use strict";
|
|
45475
|
-
var u = require_universalify2().fromCallback;
|
|
45476
|
-
module2.exports = {
|
|
45477
|
-
copy: u(require_copy3()),
|
|
45478
|
-
copySync: require_copy_sync2()
|
|
45479
|
-
};
|
|
45480
|
-
}
|
|
45481
|
-
});
|
|
45482
|
-
|
|
45483
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js
|
|
45484
|
-
var require_remove2 = __commonJS({
|
|
45485
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js"(exports, module2) {
|
|
45486
|
-
"use strict";
|
|
45487
|
-
var fs = require_graceful_fs();
|
|
45488
|
-
var u = require_universalify2().fromCallback;
|
|
45489
|
-
function remove(path2, callback) {
|
|
45490
|
-
fs.rm(path2, { recursive: true, force: true }, callback);
|
|
45491
|
-
}
|
|
45492
|
-
function removeSync2(path2) {
|
|
45493
|
-
fs.rmSync(path2, { recursive: true, force: true });
|
|
45494
|
-
}
|
|
45495
|
-
module2.exports = {
|
|
45496
|
-
remove: u(remove),
|
|
45497
|
-
removeSync: removeSync2
|
|
45498
|
-
};
|
|
45499
|
-
}
|
|
45500
|
-
});
|
|
45501
|
-
|
|
45502
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js
|
|
45503
|
-
var require_empty3 = __commonJS({
|
|
45504
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js"(exports, module2) {
|
|
45505
|
-
"use strict";
|
|
45506
|
-
var u = require_universalify2().fromPromise;
|
|
45507
|
-
var fs = require_fs7();
|
|
45508
|
-
var path2 = require("path");
|
|
45509
|
-
var mkdir = require_mkdirs2();
|
|
45510
|
-
var remove = require_remove2();
|
|
45511
|
-
var emptyDir = u(async function emptyDir2(dir) {
|
|
45512
|
-
let items;
|
|
45513
|
-
try {
|
|
45514
|
-
items = await fs.readdir(dir);
|
|
45515
|
-
} catch {
|
|
45516
|
-
return mkdir.mkdirs(dir);
|
|
45517
|
-
}
|
|
45518
|
-
return Promise.all(items.map((item) => remove.remove(path2.join(dir, item))));
|
|
45519
|
-
});
|
|
45520
|
-
function emptyDirSync(dir) {
|
|
45521
|
-
let items;
|
|
45522
|
-
try {
|
|
45523
|
-
items = fs.readdirSync(dir);
|
|
45524
|
-
} catch {
|
|
45525
|
-
return mkdir.mkdirsSync(dir);
|
|
45526
|
-
}
|
|
45527
|
-
items.forEach((item) => {
|
|
45528
|
-
item = path2.join(dir, item);
|
|
45529
|
-
remove.removeSync(item);
|
|
45530
|
-
});
|
|
45531
|
-
}
|
|
45532
|
-
module2.exports = {
|
|
45533
|
-
emptyDirSync,
|
|
45534
|
-
emptydirSync: emptyDirSync,
|
|
45535
|
-
emptyDir,
|
|
45536
|
-
emptydir: emptyDir
|
|
45537
|
-
};
|
|
45538
|
-
}
|
|
45539
|
-
});
|
|
45540
|
-
|
|
45541
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js
|
|
45542
|
-
var require_file2 = __commonJS({
|
|
45543
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) {
|
|
45544
|
-
"use strict";
|
|
45545
|
-
var u = require_universalify2().fromCallback;
|
|
45546
|
-
var path2 = require("path");
|
|
45547
|
-
var fs = require_graceful_fs();
|
|
45548
|
-
var mkdir = require_mkdirs2();
|
|
45549
|
-
function createFile(file, callback) {
|
|
45550
|
-
function makeFile() {
|
|
45551
|
-
fs.writeFile(file, "", (err) => {
|
|
45552
|
-
if (err)
|
|
45553
|
-
return callback(err);
|
|
45554
|
-
callback();
|
|
45555
|
-
});
|
|
45556
|
-
}
|
|
45557
|
-
fs.stat(file, (err, stats) => {
|
|
45558
|
-
if (!err && stats.isFile())
|
|
45559
|
-
return callback();
|
|
45560
|
-
const dir = path2.dirname(file);
|
|
45561
|
-
fs.stat(dir, (err2, stats2) => {
|
|
45562
|
-
if (err2) {
|
|
45563
|
-
if (err2.code === "ENOENT") {
|
|
45564
|
-
return mkdir.mkdirs(dir, (err3) => {
|
|
45565
|
-
if (err3)
|
|
45566
|
-
return callback(err3);
|
|
45567
|
-
makeFile();
|
|
45568
|
-
});
|
|
45569
|
-
}
|
|
45570
|
-
return callback(err2);
|
|
45571
|
-
}
|
|
45572
|
-
if (stats2.isDirectory())
|
|
45573
|
-
makeFile();
|
|
45574
|
-
else {
|
|
45575
|
-
fs.readdir(dir, (err3) => {
|
|
45576
|
-
if (err3)
|
|
45577
|
-
return callback(err3);
|
|
45578
|
-
});
|
|
45579
|
-
}
|
|
45580
|
-
});
|
|
45581
|
-
});
|
|
45582
|
-
}
|
|
45583
|
-
function createFileSync(file) {
|
|
45584
|
-
let stats;
|
|
45585
|
-
try {
|
|
45586
|
-
stats = fs.statSync(file);
|
|
45587
|
-
} catch {
|
|
45588
|
-
}
|
|
45589
|
-
if (stats && stats.isFile())
|
|
45590
|
-
return;
|
|
45591
|
-
const dir = path2.dirname(file);
|
|
45592
|
-
try {
|
|
45593
|
-
if (!fs.statSync(dir).isDirectory()) {
|
|
45594
|
-
fs.readdirSync(dir);
|
|
45595
|
-
}
|
|
45596
|
-
} catch (err) {
|
|
45597
|
-
if (err && err.code === "ENOENT")
|
|
45598
|
-
mkdir.mkdirsSync(dir);
|
|
45599
|
-
else
|
|
45600
|
-
throw err;
|
|
45601
|
-
}
|
|
45602
|
-
fs.writeFileSync(file, "");
|
|
45603
|
-
}
|
|
45604
|
-
module2.exports = {
|
|
45605
|
-
createFile: u(createFile),
|
|
45606
|
-
createFileSync
|
|
45607
|
-
};
|
|
45608
|
-
}
|
|
45609
|
-
});
|
|
45610
|
-
|
|
45611
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js
|
|
45612
|
-
var require_link2 = __commonJS({
|
|
45613
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) {
|
|
45614
|
-
"use strict";
|
|
45615
|
-
var u = require_universalify2().fromCallback;
|
|
45616
|
-
var path2 = require("path");
|
|
45617
|
-
var fs = require_graceful_fs();
|
|
45618
|
-
var mkdir = require_mkdirs2();
|
|
45619
|
-
var pathExists = require_path_exists2().pathExists;
|
|
45620
|
-
var { areIdentical } = require_stat2();
|
|
45621
|
-
function createLink(srcpath, dstpath, callback) {
|
|
45622
|
-
function makeLink(srcpath2, dstpath2) {
|
|
45623
|
-
fs.link(srcpath2, dstpath2, (err) => {
|
|
45624
|
-
if (err)
|
|
45625
|
-
return callback(err);
|
|
45626
|
-
callback(null);
|
|
45627
|
-
});
|
|
45628
|
-
}
|
|
45629
|
-
fs.lstat(dstpath, (_, dstStat) => {
|
|
45630
|
-
fs.lstat(srcpath, (err, srcStat) => {
|
|
45631
|
-
if (err) {
|
|
45632
|
-
err.message = err.message.replace("lstat", "ensureLink");
|
|
45633
|
-
return callback(err);
|
|
45634
|
-
}
|
|
45635
|
-
if (dstStat && areIdentical(srcStat, dstStat))
|
|
45636
|
-
return callback(null);
|
|
45637
|
-
const dir = path2.dirname(dstpath);
|
|
45638
|
-
pathExists(dir, (err2, dirExists) => {
|
|
45639
|
-
if (err2)
|
|
45640
|
-
return callback(err2);
|
|
45641
|
-
if (dirExists)
|
|
45642
|
-
return makeLink(srcpath, dstpath);
|
|
45643
|
-
mkdir.mkdirs(dir, (err3) => {
|
|
45644
|
-
if (err3)
|
|
45645
|
-
return callback(err3);
|
|
45646
|
-
makeLink(srcpath, dstpath);
|
|
45647
|
-
});
|
|
45648
|
-
});
|
|
45649
|
-
});
|
|
45650
|
-
});
|
|
45651
|
-
}
|
|
45652
|
-
function createLinkSync(srcpath, dstpath) {
|
|
45653
|
-
let dstStat;
|
|
45654
|
-
try {
|
|
45655
|
-
dstStat = fs.lstatSync(dstpath);
|
|
45656
|
-
} catch {
|
|
45657
|
-
}
|
|
45658
|
-
try {
|
|
45659
|
-
const srcStat = fs.lstatSync(srcpath);
|
|
45660
|
-
if (dstStat && areIdentical(srcStat, dstStat))
|
|
45661
|
-
return;
|
|
45662
|
-
} catch (err) {
|
|
45663
|
-
err.message = err.message.replace("lstat", "ensureLink");
|
|
45664
|
-
throw err;
|
|
45665
|
-
}
|
|
45666
|
-
const dir = path2.dirname(dstpath);
|
|
45667
|
-
const dirExists = fs.existsSync(dir);
|
|
45668
|
-
if (dirExists)
|
|
45669
|
-
return fs.linkSync(srcpath, dstpath);
|
|
45670
|
-
mkdir.mkdirsSync(dir);
|
|
45671
|
-
return fs.linkSync(srcpath, dstpath);
|
|
45672
|
-
}
|
|
45673
|
-
module2.exports = {
|
|
45674
|
-
createLink: u(createLink),
|
|
45675
|
-
createLinkSync
|
|
45676
|
-
};
|
|
45677
|
-
}
|
|
45678
|
-
});
|
|
45679
|
-
|
|
45680
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js
|
|
45681
|
-
var require_symlink_paths2 = __commonJS({
|
|
45682
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) {
|
|
45683
|
-
"use strict";
|
|
45684
|
-
var path2 = require("path");
|
|
45685
|
-
var fs = require_graceful_fs();
|
|
45686
|
-
var pathExists = require_path_exists2().pathExists;
|
|
45687
|
-
function symlinkPaths(srcpath, dstpath, callback) {
|
|
45688
|
-
if (path2.isAbsolute(srcpath)) {
|
|
45689
|
-
return fs.lstat(srcpath, (err) => {
|
|
45690
|
-
if (err) {
|
|
45691
|
-
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
45692
|
-
return callback(err);
|
|
45693
|
-
}
|
|
45694
|
-
return callback(null, {
|
|
45695
|
-
toCwd: srcpath,
|
|
45696
|
-
toDst: srcpath
|
|
45697
|
-
});
|
|
45698
|
-
});
|
|
45699
|
-
} else {
|
|
45700
|
-
const dstdir = path2.dirname(dstpath);
|
|
45701
|
-
const relativeToDst = path2.join(dstdir, srcpath);
|
|
45702
|
-
return pathExists(relativeToDst, (err, exists) => {
|
|
45703
|
-
if (err)
|
|
45704
|
-
return callback(err);
|
|
45705
|
-
if (exists) {
|
|
45706
|
-
return callback(null, {
|
|
45707
|
-
toCwd: relativeToDst,
|
|
45708
|
-
toDst: srcpath
|
|
45709
|
-
});
|
|
45710
|
-
} else {
|
|
45711
|
-
return fs.lstat(srcpath, (err2) => {
|
|
45712
|
-
if (err2) {
|
|
45713
|
-
err2.message = err2.message.replace("lstat", "ensureSymlink");
|
|
45714
|
-
return callback(err2);
|
|
45715
|
-
}
|
|
45716
|
-
return callback(null, {
|
|
45717
|
-
toCwd: srcpath,
|
|
45718
|
-
toDst: path2.relative(dstdir, srcpath)
|
|
45719
|
-
});
|
|
45720
|
-
});
|
|
45721
|
-
}
|
|
45722
|
-
});
|
|
45723
|
-
}
|
|
45724
|
-
}
|
|
45725
|
-
function symlinkPathsSync(srcpath, dstpath) {
|
|
45726
|
-
let exists;
|
|
45727
|
-
if (path2.isAbsolute(srcpath)) {
|
|
45728
|
-
exists = fs.existsSync(srcpath);
|
|
45729
|
-
if (!exists)
|
|
45730
|
-
throw new Error("absolute srcpath does not exist");
|
|
45731
|
-
return {
|
|
45732
|
-
toCwd: srcpath,
|
|
45733
|
-
toDst: srcpath
|
|
45734
|
-
};
|
|
45735
|
-
} else {
|
|
45736
|
-
const dstdir = path2.dirname(dstpath);
|
|
45737
|
-
const relativeToDst = path2.join(dstdir, srcpath);
|
|
45738
|
-
exists = fs.existsSync(relativeToDst);
|
|
45739
|
-
if (exists) {
|
|
45740
|
-
return {
|
|
45741
|
-
toCwd: relativeToDst,
|
|
45742
|
-
toDst: srcpath
|
|
45743
|
-
};
|
|
45744
|
-
} else {
|
|
45745
|
-
exists = fs.existsSync(srcpath);
|
|
45746
|
-
if (!exists)
|
|
45747
|
-
throw new Error("relative srcpath does not exist");
|
|
45748
|
-
return {
|
|
45749
|
-
toCwd: srcpath,
|
|
45750
|
-
toDst: path2.relative(dstdir, srcpath)
|
|
45751
|
-
};
|
|
45752
|
-
}
|
|
45753
|
-
}
|
|
45754
|
-
}
|
|
45755
|
-
module2.exports = {
|
|
45756
|
-
symlinkPaths,
|
|
45757
|
-
symlinkPathsSync
|
|
45758
|
-
};
|
|
45759
|
-
}
|
|
45760
|
-
});
|
|
45761
|
-
|
|
45762
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js
|
|
45763
|
-
var require_symlink_type2 = __commonJS({
|
|
45764
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) {
|
|
45765
|
-
"use strict";
|
|
45766
|
-
var fs = require_graceful_fs();
|
|
45767
|
-
function symlinkType(srcpath, type, callback) {
|
|
45768
|
-
callback = typeof type === "function" ? type : callback;
|
|
45769
|
-
type = typeof type === "function" ? false : type;
|
|
45770
|
-
if (type)
|
|
45771
|
-
return callback(null, type);
|
|
45772
|
-
fs.lstat(srcpath, (err, stats) => {
|
|
45773
|
-
if (err)
|
|
45774
|
-
return callback(null, "file");
|
|
45775
|
-
type = stats && stats.isDirectory() ? "dir" : "file";
|
|
45776
|
-
callback(null, type);
|
|
45777
|
-
});
|
|
45778
|
-
}
|
|
45779
|
-
function symlinkTypeSync(srcpath, type) {
|
|
45780
|
-
let stats;
|
|
45781
|
-
if (type)
|
|
45782
|
-
return type;
|
|
45783
|
-
try {
|
|
45784
|
-
stats = fs.lstatSync(srcpath);
|
|
45785
|
-
} catch {
|
|
45786
|
-
return "file";
|
|
45787
|
-
}
|
|
45788
|
-
return stats && stats.isDirectory() ? "dir" : "file";
|
|
45789
|
-
}
|
|
45790
|
-
module2.exports = {
|
|
45791
|
-
symlinkType,
|
|
45792
|
-
symlinkTypeSync
|
|
45793
|
-
};
|
|
45794
|
-
}
|
|
45795
|
-
});
|
|
45796
|
-
|
|
45797
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js
|
|
45798
|
-
var require_symlink2 = __commonJS({
|
|
45799
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) {
|
|
45800
|
-
"use strict";
|
|
45801
|
-
var u = require_universalify2().fromCallback;
|
|
45802
|
-
var path2 = require("path");
|
|
45803
|
-
var fs = require_fs7();
|
|
45804
|
-
var _mkdirs = require_mkdirs2();
|
|
45805
|
-
var mkdirs = _mkdirs.mkdirs;
|
|
45806
|
-
var mkdirsSync = _mkdirs.mkdirsSync;
|
|
45807
|
-
var _symlinkPaths = require_symlink_paths2();
|
|
45808
|
-
var symlinkPaths = _symlinkPaths.symlinkPaths;
|
|
45809
|
-
var symlinkPathsSync = _symlinkPaths.symlinkPathsSync;
|
|
45810
|
-
var _symlinkType = require_symlink_type2();
|
|
45811
|
-
var symlinkType = _symlinkType.symlinkType;
|
|
45812
|
-
var symlinkTypeSync = _symlinkType.symlinkTypeSync;
|
|
45813
|
-
var pathExists = require_path_exists2().pathExists;
|
|
45814
|
-
var { areIdentical } = require_stat2();
|
|
45815
|
-
function createSymlink(srcpath, dstpath, type, callback) {
|
|
45816
|
-
callback = typeof type === "function" ? type : callback;
|
|
45817
|
-
type = typeof type === "function" ? false : type;
|
|
45818
|
-
fs.lstat(dstpath, (err, stats) => {
|
|
45819
|
-
if (!err && stats.isSymbolicLink()) {
|
|
45820
|
-
Promise.all([
|
|
45821
|
-
fs.stat(srcpath),
|
|
45822
|
-
fs.stat(dstpath)
|
|
45823
|
-
]).then(([srcStat, dstStat]) => {
|
|
45824
|
-
if (areIdentical(srcStat, dstStat))
|
|
45825
|
-
return callback(null);
|
|
45826
|
-
_createSymlink(srcpath, dstpath, type, callback);
|
|
45827
|
-
});
|
|
45828
|
-
} else
|
|
45829
|
-
_createSymlink(srcpath, dstpath, type, callback);
|
|
45830
|
-
});
|
|
45831
|
-
}
|
|
45832
|
-
function _createSymlink(srcpath, dstpath, type, callback) {
|
|
45833
|
-
symlinkPaths(srcpath, dstpath, (err, relative) => {
|
|
45834
|
-
if (err)
|
|
45835
|
-
return callback(err);
|
|
45836
|
-
srcpath = relative.toDst;
|
|
45837
|
-
symlinkType(relative.toCwd, type, (err2, type2) => {
|
|
45838
|
-
if (err2)
|
|
45839
|
-
return callback(err2);
|
|
45840
|
-
const dir = path2.dirname(dstpath);
|
|
45841
|
-
pathExists(dir, (err3, dirExists) => {
|
|
45842
|
-
if (err3)
|
|
45843
|
-
return callback(err3);
|
|
45844
|
-
if (dirExists)
|
|
45845
|
-
return fs.symlink(srcpath, dstpath, type2, callback);
|
|
45846
|
-
mkdirs(dir, (err4) => {
|
|
45847
|
-
if (err4)
|
|
45848
|
-
return callback(err4);
|
|
45849
|
-
fs.symlink(srcpath, dstpath, type2, callback);
|
|
45850
|
-
});
|
|
45851
|
-
});
|
|
45852
|
-
});
|
|
45853
|
-
});
|
|
45854
|
-
}
|
|
45855
|
-
function createSymlinkSync(srcpath, dstpath, type) {
|
|
45856
|
-
let stats;
|
|
45857
|
-
try {
|
|
45858
|
-
stats = fs.lstatSync(dstpath);
|
|
45859
|
-
} catch {
|
|
45860
|
-
}
|
|
45861
|
-
if (stats && stats.isSymbolicLink()) {
|
|
45862
|
-
const srcStat = fs.statSync(srcpath);
|
|
45863
|
-
const dstStat = fs.statSync(dstpath);
|
|
45864
|
-
if (areIdentical(srcStat, dstStat))
|
|
45865
|
-
return;
|
|
45866
|
-
}
|
|
45867
|
-
const relative = symlinkPathsSync(srcpath, dstpath);
|
|
45868
|
-
srcpath = relative.toDst;
|
|
45869
|
-
type = symlinkTypeSync(relative.toCwd, type);
|
|
45870
|
-
const dir = path2.dirname(dstpath);
|
|
45871
|
-
const exists = fs.existsSync(dir);
|
|
45872
|
-
if (exists)
|
|
45873
|
-
return fs.symlinkSync(srcpath, dstpath, type);
|
|
45874
|
-
mkdirsSync(dir);
|
|
45875
|
-
return fs.symlinkSync(srcpath, dstpath, type);
|
|
45876
|
-
}
|
|
45877
|
-
module2.exports = {
|
|
45878
|
-
createSymlink: u(createSymlink),
|
|
45879
|
-
createSymlinkSync
|
|
45880
|
-
};
|
|
45881
|
-
}
|
|
45882
|
-
});
|
|
45883
|
-
|
|
45884
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js
|
|
45885
|
-
var require_ensure2 = __commonJS({
|
|
45886
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) {
|
|
45887
|
-
"use strict";
|
|
45888
|
-
var { createFile, createFileSync } = require_file2();
|
|
45889
|
-
var { createLink, createLinkSync } = require_link2();
|
|
45890
|
-
var { createSymlink, createSymlinkSync } = require_symlink2();
|
|
45891
|
-
module2.exports = {
|
|
45892
|
-
// file
|
|
45893
|
-
createFile,
|
|
45894
|
-
createFileSync,
|
|
45895
|
-
ensureFile: createFile,
|
|
45896
|
-
ensureFileSync: createFileSync,
|
|
45897
|
-
// link
|
|
45898
|
-
createLink,
|
|
45899
|
-
createLinkSync,
|
|
45900
|
-
ensureLink: createLink,
|
|
45901
|
-
ensureLinkSync: createLinkSync,
|
|
45902
|
-
// symlink
|
|
45903
|
-
createSymlink,
|
|
45904
|
-
createSymlinkSync,
|
|
45905
|
-
ensureSymlink: createSymlink,
|
|
45906
|
-
ensureSymlinkSync: createSymlinkSync
|
|
45907
|
-
};
|
|
45908
|
-
}
|
|
45909
|
-
});
|
|
45910
|
-
|
|
45911
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js
|
|
45912
|
-
var require_jsonfile3 = __commonJS({
|
|
45913
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module2) {
|
|
45914
|
-
"use strict";
|
|
45915
|
-
var jsonFile = require_jsonfile();
|
|
45916
|
-
module2.exports = {
|
|
45917
|
-
// jsonfile exports
|
|
45918
|
-
readJson: jsonFile.readFile,
|
|
45919
|
-
readJsonSync: jsonFile.readFileSync,
|
|
45920
|
-
writeJson: jsonFile.writeFile,
|
|
45921
|
-
writeJsonSync: jsonFile.writeFileSync
|
|
45922
|
-
};
|
|
45923
|
-
}
|
|
45924
|
-
});
|
|
45925
|
-
|
|
45926
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js
|
|
45927
|
-
var require_output_file2 = __commonJS({
|
|
45928
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js"(exports, module2) {
|
|
45929
|
-
"use strict";
|
|
45930
|
-
var u = require_universalify2().fromCallback;
|
|
45931
|
-
var fs = require_graceful_fs();
|
|
45932
|
-
var path2 = require("path");
|
|
45933
|
-
var mkdir = require_mkdirs2();
|
|
45934
|
-
var pathExists = require_path_exists2().pathExists;
|
|
45935
|
-
function outputFile(file, data, encoding, callback) {
|
|
45936
|
-
if (typeof encoding === "function") {
|
|
45937
|
-
callback = encoding;
|
|
45938
|
-
encoding = "utf8";
|
|
45939
|
-
}
|
|
45940
|
-
const dir = path2.dirname(file);
|
|
45941
|
-
pathExists(dir, (err, itDoes) => {
|
|
45942
|
-
if (err)
|
|
45943
|
-
return callback(err);
|
|
45944
|
-
if (itDoes)
|
|
45945
|
-
return fs.writeFile(file, data, encoding, callback);
|
|
45946
|
-
mkdir.mkdirs(dir, (err2) => {
|
|
45947
|
-
if (err2)
|
|
45948
|
-
return callback(err2);
|
|
45949
|
-
fs.writeFile(file, data, encoding, callback);
|
|
45950
|
-
});
|
|
45951
|
-
});
|
|
45952
|
-
}
|
|
45953
|
-
function outputFileSync(file, ...args) {
|
|
45954
|
-
const dir = path2.dirname(file);
|
|
45955
|
-
if (fs.existsSync(dir)) {
|
|
45956
|
-
return fs.writeFileSync(file, ...args);
|
|
45957
|
-
}
|
|
45958
|
-
mkdir.mkdirsSync(dir);
|
|
45959
|
-
fs.writeFileSync(file, ...args);
|
|
45960
|
-
}
|
|
45961
|
-
module2.exports = {
|
|
45962
|
-
outputFile: u(outputFile),
|
|
45963
|
-
outputFileSync
|
|
45964
|
-
};
|
|
45965
|
-
}
|
|
45966
|
-
});
|
|
45967
|
-
|
|
45968
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js
|
|
45969
|
-
var require_output_json2 = __commonJS({
|
|
45970
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) {
|
|
45971
|
-
"use strict";
|
|
45972
|
-
var { stringify } = require_utils3();
|
|
45973
|
-
var { outputFile } = require_output_file2();
|
|
45974
|
-
async function outputJson(file, data, options = {}) {
|
|
45975
|
-
const str = stringify(data, options);
|
|
45976
|
-
await outputFile(file, str, options);
|
|
45977
|
-
}
|
|
45978
|
-
module2.exports = outputJson;
|
|
45979
|
-
}
|
|
45980
|
-
});
|
|
45981
|
-
|
|
45982
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js
|
|
45983
|
-
var require_output_json_sync2 = __commonJS({
|
|
45984
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) {
|
|
45985
|
-
"use strict";
|
|
45986
|
-
var { stringify } = require_utils3();
|
|
45987
|
-
var { outputFileSync } = require_output_file2();
|
|
45988
|
-
function outputJsonSync(file, data, options) {
|
|
45989
|
-
const str = stringify(data, options);
|
|
45990
|
-
outputFileSync(file, str, options);
|
|
45991
|
-
}
|
|
45992
|
-
module2.exports = outputJsonSync;
|
|
45993
|
-
}
|
|
45994
|
-
});
|
|
45995
|
-
|
|
45996
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js
|
|
45997
|
-
var require_json3 = __commonJS({
|
|
45998
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js"(exports, module2) {
|
|
45999
|
-
"use strict";
|
|
46000
|
-
var u = require_universalify2().fromPromise;
|
|
46001
|
-
var jsonFile = require_jsonfile3();
|
|
46002
|
-
jsonFile.outputJson = u(require_output_json2());
|
|
46003
|
-
jsonFile.outputJsonSync = require_output_json_sync2();
|
|
46004
|
-
jsonFile.outputJSON = jsonFile.outputJson;
|
|
46005
|
-
jsonFile.outputJSONSync = jsonFile.outputJsonSync;
|
|
46006
|
-
jsonFile.writeJSON = jsonFile.writeJson;
|
|
46007
|
-
jsonFile.writeJSONSync = jsonFile.writeJsonSync;
|
|
46008
|
-
jsonFile.readJSON = jsonFile.readJson;
|
|
46009
|
-
jsonFile.readJSONSync = jsonFile.readJsonSync;
|
|
46010
|
-
module2.exports = jsonFile;
|
|
46011
|
-
}
|
|
46012
|
-
});
|
|
46013
|
-
|
|
46014
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js
|
|
46015
|
-
var require_move3 = __commonJS({
|
|
46016
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js"(exports, module2) {
|
|
46017
|
-
"use strict";
|
|
46018
|
-
var fs = require_graceful_fs();
|
|
46019
|
-
var path2 = require("path");
|
|
46020
|
-
var copy = require_copy4().copy;
|
|
46021
|
-
var remove = require_remove2().remove;
|
|
46022
|
-
var mkdirp = require_mkdirs2().mkdirp;
|
|
46023
|
-
var pathExists = require_path_exists2().pathExists;
|
|
46024
|
-
var stat = require_stat2();
|
|
46025
|
-
function move(src, dest, opts, cb) {
|
|
46026
|
-
if (typeof opts === "function") {
|
|
46027
|
-
cb = opts;
|
|
46028
|
-
opts = {};
|
|
46029
|
-
}
|
|
46030
|
-
opts = opts || {};
|
|
46031
|
-
const overwrite = opts.overwrite || opts.clobber || false;
|
|
46032
|
-
stat.checkPaths(src, dest, "move", opts, (err, stats) => {
|
|
46033
|
-
if (err)
|
|
46034
|
-
return cb(err);
|
|
46035
|
-
const { srcStat, isChangingCase = false } = stats;
|
|
46036
|
-
stat.checkParentPaths(src, srcStat, dest, "move", (err2) => {
|
|
46037
|
-
if (err2)
|
|
46038
|
-
return cb(err2);
|
|
46039
|
-
if (isParentRoot(dest))
|
|
46040
|
-
return doRename(src, dest, overwrite, isChangingCase, cb);
|
|
46041
|
-
mkdirp(path2.dirname(dest), (err3) => {
|
|
46042
|
-
if (err3)
|
|
46043
|
-
return cb(err3);
|
|
46044
|
-
return doRename(src, dest, overwrite, isChangingCase, cb);
|
|
46045
|
-
});
|
|
46046
|
-
});
|
|
46047
|
-
});
|
|
46048
|
-
}
|
|
46049
|
-
function isParentRoot(dest) {
|
|
46050
|
-
const parent = path2.dirname(dest);
|
|
46051
|
-
const parsedPath = path2.parse(parent);
|
|
46052
|
-
return parsedPath.root === parent;
|
|
46053
|
-
}
|
|
46054
|
-
function doRename(src, dest, overwrite, isChangingCase, cb) {
|
|
46055
|
-
if (isChangingCase)
|
|
46056
|
-
return rename(src, dest, overwrite, cb);
|
|
46057
|
-
if (overwrite) {
|
|
46058
|
-
return remove(dest, (err) => {
|
|
46059
|
-
if (err)
|
|
46060
|
-
return cb(err);
|
|
46061
|
-
return rename(src, dest, overwrite, cb);
|
|
46062
|
-
});
|
|
46063
|
-
}
|
|
46064
|
-
pathExists(dest, (err, destExists) => {
|
|
46065
|
-
if (err)
|
|
46066
|
-
return cb(err);
|
|
46067
|
-
if (destExists)
|
|
46068
|
-
return cb(new Error("dest already exists."));
|
|
46069
|
-
return rename(src, dest, overwrite, cb);
|
|
46070
|
-
});
|
|
46071
|
-
}
|
|
46072
|
-
function rename(src, dest, overwrite, cb) {
|
|
46073
|
-
fs.rename(src, dest, (err) => {
|
|
46074
|
-
if (!err)
|
|
46075
|
-
return cb();
|
|
46076
|
-
if (err.code !== "EXDEV")
|
|
46077
|
-
return cb(err);
|
|
46078
|
-
return moveAcrossDevice(src, dest, overwrite, cb);
|
|
46079
|
-
});
|
|
46080
|
-
}
|
|
46081
|
-
function moveAcrossDevice(src, dest, overwrite, cb) {
|
|
46082
|
-
const opts = {
|
|
46083
|
-
overwrite,
|
|
46084
|
-
errorOnExist: true,
|
|
46085
|
-
preserveTimestamps: true
|
|
46086
|
-
};
|
|
46087
|
-
copy(src, dest, opts, (err) => {
|
|
46088
|
-
if (err)
|
|
46089
|
-
return cb(err);
|
|
46090
|
-
return remove(src, cb);
|
|
46091
|
-
});
|
|
46092
|
-
}
|
|
46093
|
-
module2.exports = move;
|
|
46094
|
-
}
|
|
46095
|
-
});
|
|
46096
|
-
|
|
46097
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js
|
|
46098
|
-
var require_move_sync2 = __commonJS({
|
|
46099
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js"(exports, module2) {
|
|
46100
|
-
"use strict";
|
|
46101
|
-
var fs = require_graceful_fs();
|
|
46102
|
-
var path2 = require("path");
|
|
46103
|
-
var copySync = require_copy4().copySync;
|
|
46104
|
-
var removeSync2 = require_remove2().removeSync;
|
|
46105
|
-
var mkdirpSync = require_mkdirs2().mkdirpSync;
|
|
46106
|
-
var stat = require_stat2();
|
|
46107
|
-
function moveSync(src, dest, opts) {
|
|
46108
|
-
opts = opts || {};
|
|
46109
|
-
const overwrite = opts.overwrite || opts.clobber || false;
|
|
46110
|
-
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
|
46111
|
-
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
46112
|
-
if (!isParentRoot(dest))
|
|
46113
|
-
mkdirpSync(path2.dirname(dest));
|
|
46114
|
-
return doRename(src, dest, overwrite, isChangingCase);
|
|
46115
|
-
}
|
|
46116
|
-
function isParentRoot(dest) {
|
|
46117
|
-
const parent = path2.dirname(dest);
|
|
46118
|
-
const parsedPath = path2.parse(parent);
|
|
46119
|
-
return parsedPath.root === parent;
|
|
46120
|
-
}
|
|
46121
|
-
function doRename(src, dest, overwrite, isChangingCase) {
|
|
46122
|
-
if (isChangingCase)
|
|
46123
|
-
return rename(src, dest, overwrite);
|
|
46124
|
-
if (overwrite) {
|
|
46125
|
-
removeSync2(dest);
|
|
46126
|
-
return rename(src, dest, overwrite);
|
|
46127
|
-
}
|
|
46128
|
-
if (fs.existsSync(dest))
|
|
46129
|
-
throw new Error("dest already exists.");
|
|
46130
|
-
return rename(src, dest, overwrite);
|
|
46131
|
-
}
|
|
46132
|
-
function rename(src, dest, overwrite) {
|
|
46133
|
-
try {
|
|
46134
|
-
fs.renameSync(src, dest);
|
|
46135
|
-
} catch (err) {
|
|
46136
|
-
if (err.code !== "EXDEV")
|
|
46137
|
-
throw err;
|
|
46138
|
-
return moveAcrossDevice(src, dest, overwrite);
|
|
46139
|
-
}
|
|
46140
|
-
}
|
|
46141
|
-
function moveAcrossDevice(src, dest, overwrite) {
|
|
46142
|
-
const opts = {
|
|
46143
|
-
overwrite,
|
|
46144
|
-
errorOnExist: true,
|
|
46145
|
-
preserveTimestamps: true
|
|
46146
|
-
};
|
|
46147
|
-
copySync(src, dest, opts);
|
|
46148
|
-
return removeSync2(src);
|
|
46149
|
-
}
|
|
46150
|
-
module2.exports = moveSync;
|
|
46151
|
-
}
|
|
46152
|
-
});
|
|
46153
|
-
|
|
46154
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js
|
|
46155
|
-
var require_move4 = __commonJS({
|
|
46156
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js"(exports, module2) {
|
|
46157
|
-
"use strict";
|
|
46158
|
-
var u = require_universalify2().fromCallback;
|
|
46159
|
-
module2.exports = {
|
|
46160
|
-
move: u(require_move3()),
|
|
46161
|
-
moveSync: require_move_sync2()
|
|
46162
|
-
};
|
|
46163
|
-
}
|
|
46164
|
-
});
|
|
46165
|
-
|
|
46166
|
-
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js
|
|
46167
|
-
var require_lib6 = __commonJS({
|
|
46168
|
-
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js"(exports, module2) {
|
|
46169
|
-
"use strict";
|
|
46170
|
-
module2.exports = {
|
|
46171
|
-
// Export promiseified graceful-fs:
|
|
46172
|
-
...require_fs7(),
|
|
46173
|
-
// Export extra methods:
|
|
46174
|
-
...require_copy4(),
|
|
46175
|
-
...require_empty3(),
|
|
46176
|
-
...require_ensure2(),
|
|
46177
|
-
...require_json3(),
|
|
46178
|
-
...require_mkdirs2(),
|
|
46179
|
-
...require_move4(),
|
|
46180
|
-
...require_output_file2(),
|
|
46181
|
-
...require_path_exists2(),
|
|
46182
|
-
...require_remove2()
|
|
46183
|
-
};
|
|
46184
|
-
}
|
|
46185
|
-
});
|
|
46186
|
-
|
|
46187
44674
|
// node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js
|
|
46188
44675
|
var require_brace_expansion2 = __commonJS({
|
|
46189
44676
|
"node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js"(exports, module2) {
|
|
@@ -46396,7 +44883,7 @@ var require_errno2 = __commonJS({
|
|
|
46396
44883
|
});
|
|
46397
44884
|
|
|
46398
44885
|
// node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/utils/fs.js
|
|
46399
|
-
var
|
|
44886
|
+
var require_fs7 = __commonJS({
|
|
46400
44887
|
"node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/utils/fs.js"(exports) {
|
|
46401
44888
|
"use strict";
|
|
46402
44889
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -46662,7 +45149,7 @@ var require_string3 = __commonJS({
|
|
|
46662
45149
|
});
|
|
46663
45150
|
|
|
46664
45151
|
// node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/utils/index.js
|
|
46665
|
-
var
|
|
45152
|
+
var require_utils9 = __commonJS({
|
|
46666
45153
|
"node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
46667
45154
|
"use strict";
|
|
46668
45155
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -46671,7 +45158,7 @@ var require_utils10 = __commonJS({
|
|
|
46671
45158
|
exports.array = array;
|
|
46672
45159
|
var errno = require_errno2();
|
|
46673
45160
|
exports.errno = errno;
|
|
46674
|
-
var fs =
|
|
45161
|
+
var fs = require_fs7();
|
|
46675
45162
|
exports.fs = fs;
|
|
46676
45163
|
var path2 = require_path2();
|
|
46677
45164
|
exports.path = path2;
|
|
@@ -46690,7 +45177,7 @@ var require_tasks2 = __commonJS({
|
|
|
46690
45177
|
"use strict";
|
|
46691
45178
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46692
45179
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
|
|
46693
|
-
var utils =
|
|
45180
|
+
var utils = require_utils9();
|
|
46694
45181
|
function generate(input, settings) {
|
|
46695
45182
|
const patterns = processPatterns(input, settings);
|
|
46696
45183
|
const ignore = processPatterns(settings.ignore, settings);
|
|
@@ -46787,7 +45274,7 @@ var require_reader3 = __commonJS({
|
|
|
46787
45274
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46788
45275
|
var path2 = require("path");
|
|
46789
45276
|
var fsStat = require_out();
|
|
46790
|
-
var utils =
|
|
45277
|
+
var utils = require_utils9();
|
|
46791
45278
|
var Reader = class {
|
|
46792
45279
|
constructor(_settings) {
|
|
46793
45280
|
this._settings = _settings;
|
|
@@ -46920,7 +45407,7 @@ var require_matcher2 = __commonJS({
|
|
|
46920
45407
|
"node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
46921
45408
|
"use strict";
|
|
46922
45409
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46923
|
-
var utils =
|
|
45410
|
+
var utils = require_utils9();
|
|
46924
45411
|
var Matcher = class {
|
|
46925
45412
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
46926
45413
|
this._patterns = _patterns;
|
|
@@ -47008,7 +45495,7 @@ var require_deep2 = __commonJS({
|
|
|
47008
45495
|
"node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
47009
45496
|
"use strict";
|
|
47010
45497
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47011
|
-
var utils =
|
|
45498
|
+
var utils = require_utils9();
|
|
47012
45499
|
var partial_1 = require_partial2();
|
|
47013
45500
|
var DeepFilter = class {
|
|
47014
45501
|
constructor(_settings, _micromatchOptions) {
|
|
@@ -47073,7 +45560,7 @@ var require_entry3 = __commonJS({
|
|
|
47073
45560
|
"node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
47074
45561
|
"use strict";
|
|
47075
45562
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47076
|
-
var utils =
|
|
45563
|
+
var utils = require_utils9();
|
|
47077
45564
|
var EntryFilter = class {
|
|
47078
45565
|
constructor(_settings, _micromatchOptions) {
|
|
47079
45566
|
this._settings = _settings;
|
|
@@ -47139,7 +45626,7 @@ var require_error2 = __commonJS({
|
|
|
47139
45626
|
"node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
47140
45627
|
"use strict";
|
|
47141
45628
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47142
|
-
var utils =
|
|
45629
|
+
var utils = require_utils9();
|
|
47143
45630
|
var ErrorFilter = class {
|
|
47144
45631
|
constructor(_settings) {
|
|
47145
45632
|
this._settings = _settings;
|
|
@@ -47160,7 +45647,7 @@ var require_entry4 = __commonJS({
|
|
|
47160
45647
|
"node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
47161
45648
|
"use strict";
|
|
47162
45649
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47163
|
-
var utils =
|
|
45650
|
+
var utils = require_utils9();
|
|
47164
45651
|
var EntryTransformer = class {
|
|
47165
45652
|
constructor(_settings) {
|
|
47166
45653
|
this._settings = _settings;
|
|
@@ -47450,7 +45937,7 @@ var require_out5 = __commonJS({
|
|
|
47450
45937
|
var stream_1 = require_stream7();
|
|
47451
45938
|
var sync_1 = require_sync9();
|
|
47452
45939
|
var settings_1 = require_settings5();
|
|
47453
|
-
var utils =
|
|
45940
|
+
var utils = require_utils9();
|
|
47454
45941
|
async function FastGlob(source, options) {
|
|
47455
45942
|
assertPatternsInput(source);
|
|
47456
45943
|
const works = getWorks(source, async_1.default, options);
|
|
@@ -48490,7 +46977,7 @@ var require_chunk_UIX4URMV = __commonJS({
|
|
|
48490
46977
|
});
|
|
48491
46978
|
|
|
48492
46979
|
// node_modules/.pnpm/joycon@3.1.1/node_modules/joycon/lib/index.js
|
|
48493
|
-
var
|
|
46980
|
+
var require_lib6 = __commonJS({
|
|
48494
46981
|
"node_modules/.pnpm/joycon@3.1.1/node_modules/joycon/lib/index.js"(exports, module2) {
|
|
48495
46982
|
"use strict";
|
|
48496
46983
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -49233,7 +47720,7 @@ var require_chunk_7G76EW2R = __commonJS({
|
|
|
49233
47720
|
var _chunkGQ77QZBOjs = require_chunk_GQ77QZBO();
|
|
49234
47721
|
var _fs = require("fs");
|
|
49235
47722
|
var _fs2 = _interopRequireDefault(_fs);
|
|
49236
|
-
var _joycon =
|
|
47723
|
+
var _joycon = require_lib6();
|
|
49237
47724
|
var _joycon2 = _interopRequireDefault(_joycon);
|
|
49238
47725
|
var _path = require("path");
|
|
49239
47726
|
var _path2 = _interopRequireDefault(_path);
|
|
@@ -106332,7 +104819,7 @@ var require_positions = __commonJS({
|
|
|
106332
104819
|
});
|
|
106333
104820
|
|
|
106334
104821
|
// node_modules/.pnpm/ret@0.2.2/node_modules/ret/lib/index.js
|
|
106335
|
-
var
|
|
104822
|
+
var require_lib7 = __commonJS({
|
|
106336
104823
|
"node_modules/.pnpm/ret@0.2.2/node_modules/ret/lib/index.js"(exports, module2) {
|
|
106337
104824
|
var util2 = require_util6();
|
|
106338
104825
|
var types2 = require_types6();
|
|
@@ -106523,7 +105010,7 @@ var require_lib8 = __commonJS({
|
|
|
106523
105010
|
});
|
|
106524
105011
|
|
|
106525
105012
|
// node_modules/.pnpm/drange@1.1.1/node_modules/drange/lib/index.js
|
|
106526
|
-
var
|
|
105013
|
+
var require_lib8 = __commonJS({
|
|
106527
105014
|
"node_modules/.pnpm/drange@1.1.1/node_modules/drange/lib/index.js"(exports, module2) {
|
|
106528
105015
|
"use strict";
|
|
106529
105016
|
var SubRange = class _SubRange {
|
|
@@ -106688,8 +105175,8 @@ var require_lib9 = __commonJS({
|
|
|
106688
105175
|
// node_modules/.pnpm/randexp@0.5.3/node_modules/randexp/lib/randexp.js
|
|
106689
105176
|
var require_randexp = __commonJS({
|
|
106690
105177
|
"node_modules/.pnpm/randexp@0.5.3/node_modules/randexp/lib/randexp.js"(exports, module2) {
|
|
106691
|
-
var ret =
|
|
106692
|
-
var DRange =
|
|
105178
|
+
var ret = require_lib7();
|
|
105179
|
+
var DRange = require_lib8();
|
|
106693
105180
|
var types2 = ret.types;
|
|
106694
105181
|
module2.exports = class RandExp {
|
|
106695
105182
|
/**
|
|
@@ -127844,7 +126331,9 @@ var getConfigFile = async (filePath) => {
|
|
|
127844
126331
|
return void 0;
|
|
127845
126332
|
}
|
|
127846
126333
|
const config = cosmiconfigResult.config ?? {};
|
|
127847
|
-
|
|
126334
|
+
if (cosmiconfigResult.filepath) {
|
|
126335
|
+
config.configFile = cosmiconfigResult.filepath;
|
|
126336
|
+
}
|
|
127848
126337
|
config.runtimeVersion = "0.0.1";
|
|
127849
126338
|
_static_cache = config;
|
|
127850
126339
|
return config;
|
|
@@ -132045,6 +130534,8 @@ ${commentStart} ----------------------------------------------------------------
|
|
|
132045
130534
|
};
|
|
132046
130535
|
|
|
132047
130536
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
130537
|
+
var import_fs4 = require("fs");
|
|
130538
|
+
var import_path4 = require("path");
|
|
132048
130539
|
var import_esbuild_decorators = __toESM(require_src());
|
|
132049
130540
|
var import_devkit2 = __toESM(require_devkit());
|
|
132050
130541
|
var import_js = __toESM(require_src2());
|
|
@@ -132093,8 +130584,7 @@ var environmentPlugin = (data) => ({
|
|
|
132093
130584
|
});
|
|
132094
130585
|
|
|
132095
130586
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
132096
|
-
var
|
|
132097
|
-
var import_fs_extra = __toESM(require_lib6());
|
|
130587
|
+
var import_fs_extra = __toESM(require_lib4());
|
|
132098
130588
|
var import_promises2 = require("fs/promises");
|
|
132099
130589
|
|
|
132100
130590
|
// node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/mjs/index.js
|
|
@@ -138273,7 +136763,6 @@ glob.glob = glob;
|
|
|
138273
136763
|
|
|
138274
136764
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
138275
136765
|
var import_fileutils = require("nx/src/utils/fileutils");
|
|
138276
|
-
var import_path4 = require("path");
|
|
138277
136766
|
var import_prettier = require("prettier");
|
|
138278
136767
|
var import_tsup = __toESM(require_dist6());
|
|
138279
136768
|
var ts = __toESM(require("typescript"));
|
|
@@ -138410,10 +136899,10 @@ var import_transform = __toESM(require_transform());
|
|
|
138410
136899
|
var getTypiaTransform = (program, diagnostics) => (0, import_transform.default)(program, {}, { addDiagnostic: (input) => diagnostics.push(input) });
|
|
138411
136900
|
|
|
138412
136901
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
138413
|
-
async function tsupExecutorFn(options, context) {
|
|
136902
|
+
async function tsupExecutorFn(options, context, config) {
|
|
138414
136903
|
try {
|
|
138415
136904
|
console.log("\u{1F4E6} Running Storm build executor on the workspace");
|
|
138416
|
-
|
|
136905
|
+
getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.log(
|
|
138417
136906
|
`\u2699\uFE0F Executor options:
|
|
138418
136907
|
${Object.keys(options).map(
|
|
138419
136908
|
(key) => `${key}: ${!options[key] || _isPrimitive(options[key]) ? options[key] : JSON.stringify(options[key])}`
|
|
@@ -138429,7 +136918,9 @@ ${Object.keys(options).map(
|
|
|
138429
136918
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
138430
136919
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
|
|
138431
136920
|
if (options.clean !== false) {
|
|
138432
|
-
|
|
136921
|
+
if (getLogLevel(config?.logLevel) >= LogLevel.DEBUG) {
|
|
136922
|
+
console.log(`\u{1F9F9} Cleaning output path: ${options.outputPath}`);
|
|
136923
|
+
}
|
|
138433
136924
|
(0, import_fs_extra.removeSync)(options.outputPath);
|
|
138434
136925
|
}
|
|
138435
136926
|
const assets = Array.from(options.assets);
|
|
@@ -138498,11 +136989,15 @@ ${Object.keys(options).map(
|
|
|
138498
136989
|
const implicitDependencies = context.projectsConfigurations.projects[context.projectName].implicitDependencies;
|
|
138499
136990
|
const internalDependencies = [];
|
|
138500
136991
|
const projectConfigs = await Promise.resolve(getProjectConfigurations());
|
|
138501
|
-
|
|
138502
|
-
|
|
136992
|
+
if (getLogLevel(config?.logLevel) >= LogLevel.TRACE) {
|
|
136993
|
+
console.log("Project Configs:");
|
|
136994
|
+
console.log(projectConfigs);
|
|
136995
|
+
}
|
|
138503
136996
|
if (implicitDependencies && implicitDependencies.length > 0) {
|
|
138504
136997
|
options.external = implicitDependencies.reduce((ret, key) => {
|
|
138505
|
-
|
|
136998
|
+
if (getLogLevel(config?.logLevel) >= LogLevel.DEBUG) {
|
|
136999
|
+
console.log(`\u26A1 Adding implicit dependency: ${key}`);
|
|
137000
|
+
}
|
|
138506
137001
|
const projectConfig = projectConfigs[key];
|
|
138507
137002
|
if (projectConfig?.targets?.build) {
|
|
138508
137003
|
const projectPackageJson = (0, import_devkit2.readJsonFile)(projectConfig.targets?.build.options.project);
|
|
@@ -138528,10 +137023,12 @@ ${Object.keys(options).map(
|
|
|
138528
137023
|
}
|
|
138529
137024
|
}
|
|
138530
137025
|
}
|
|
138531
|
-
|
|
137026
|
+
if (getLogLevel(config?.logLevel) >= LogLevel.TRACE) {
|
|
137027
|
+
console.log(`Building with the following dependencies marked as external:
|
|
138532
137028
|
${externalDependencies.map((dep) => {
|
|
138533
|
-
|
|
138534
|
-
|
|
137029
|
+
return `name: ${dep.name}, node: ${dep.node}, outputs: ${dep.outputs}`;
|
|
137030
|
+
}).join("\n")}`);
|
|
137031
|
+
}
|
|
138535
137032
|
const prettierOptions = {
|
|
138536
137033
|
plugins: ["prettier-plugin-packagejson"],
|
|
138537
137034
|
trailingComma: "none",
|
|
@@ -138568,12 +137065,14 @@ ${externalDependencies.map((dep) => {
|
|
|
138568
137065
|
while (propertyKey.startsWith("/")) {
|
|
138569
137066
|
propertyKey = propertyKey.substring(1);
|
|
138570
137067
|
}
|
|
138571
|
-
|
|
138572
|
-
|
|
138573
|
-
|
|
138574
|
-
|
|
138575
|
-
|
|
138576
|
-
|
|
137068
|
+
if (getLogLevel(config?.logLevel) >= LogLevel.DEBUG) {
|
|
137069
|
+
console.debug(
|
|
137070
|
+
`Trying to add entry point ${propertyKey} at "${(0, import_devkit2.joinPathFragments)(
|
|
137071
|
+
filePath.path,
|
|
137072
|
+
filePath.name
|
|
137073
|
+
)}"`
|
|
137074
|
+
);
|
|
137075
|
+
}
|
|
138577
137076
|
if (!(propertyKey in ret)) {
|
|
138578
137077
|
ret[propertyKey] = (0, import_devkit2.joinPathFragments)(filePath.path, filePath.name);
|
|
138579
137078
|
}
|
|
@@ -138689,7 +137188,9 @@ ${externalDependencies.map((dep) => {
|
|
|
138689
137188
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
138690
137189
|
packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_path4.join)("packages", context.projectName);
|
|
138691
137190
|
const packageJsonPath = (0, import_path4.join)(context.root, options.outputPath, "package.json");
|
|
138692
|
-
|
|
137191
|
+
if (getLogLevel(config?.logLevel) >= LogLevel.DEBUG) {
|
|
137192
|
+
console.debug(`\u26A1 Writing package.json file to: ${packageJsonPath}`);
|
|
137193
|
+
}
|
|
138693
137194
|
(0, import_fs4.writeFileSync)(
|
|
138694
137195
|
packageJsonPath,
|
|
138695
137196
|
await (0, import_prettier.format)(JSON.stringify(packageJson), {
|
|
@@ -138776,21 +137277,26 @@ ${options.banner}
|
|
|
138776
137277
|
getTransform: options.skipTypia ? void 0 : getTypiaTransform
|
|
138777
137278
|
};
|
|
138778
137279
|
if (options.getConfig) {
|
|
137280
|
+
if (getLogLevel(config?.logLevel) >= LogLevel.INFO) {
|
|
137281
|
+
console.log("\u26A1 Running the Build process");
|
|
137282
|
+
}
|
|
138779
137283
|
const getConfigFns = _isFunction(options.getConfig) ? [options.getConfig] : Object.keys(options.getConfig).map((key) => options.getConfig[key]);
|
|
138780
|
-
const
|
|
137284
|
+
const tsupConfig = (0, import_tsup.defineConfig)(
|
|
138781
137285
|
getConfigFns.map(
|
|
138782
137286
|
(getConfigFn) => getConfig(context.root, projectRoot, getConfigFn, getConfigOptions)
|
|
138783
137287
|
)
|
|
138784
137288
|
);
|
|
138785
|
-
if (_isFunction(
|
|
138786
|
-
await build(await Promise.resolve(
|
|
137289
|
+
if (_isFunction(tsupConfig)) {
|
|
137290
|
+
await build(await Promise.resolve(tsupConfig({})), config);
|
|
138787
137291
|
} else {
|
|
138788
|
-
await build(config);
|
|
137292
|
+
await build(tsupConfig, config);
|
|
138789
137293
|
}
|
|
138790
|
-
} else {
|
|
138791
|
-
console.
|
|
137294
|
+
} else if (getLogLevel(config?.logLevel) >= LogLevel.WARN) {
|
|
137295
|
+
console.warn("The Build process did not run because no `getConfig` parameter was provided");
|
|
137296
|
+
}
|
|
137297
|
+
if (getLogLevel(config?.logLevel) >= LogLevel.INFO) {
|
|
137298
|
+
console.log("\u26A1 The Build process has completed successfully");
|
|
138792
137299
|
}
|
|
138793
|
-
console.log("\u26A1 The Build process has completed successfully");
|
|
138794
137300
|
return {
|
|
138795
137301
|
success: true
|
|
138796
137302
|
};
|
|
@@ -138831,12 +137337,14 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
|
|
|
138831
137337
|
}
|
|
138832
137338
|
return tsConfig;
|
|
138833
137339
|
}
|
|
138834
|
-
var build = async (options) => {
|
|
137340
|
+
var build = async (options, config) => {
|
|
138835
137341
|
try {
|
|
138836
|
-
Array.isArray(options) ? options.length > 0 ? options[0].silent : false : options.silent && console.log("\u2699\uFE0F Tsup build config: \n", options, "\n");
|
|
138837
137342
|
if (Array.isArray(options)) {
|
|
138838
|
-
await Promise.all(options.map((buildOptions) => (
|
|
137343
|
+
await Promise.all(options.map((buildOptions) => build(buildOptions, config)));
|
|
138839
137344
|
} else {
|
|
137345
|
+
if (getLogLevel(config?.logLevel) >= LogLevel.TRACE && !options.silent) {
|
|
137346
|
+
console.log("\u2699\uFE0F Tsup build config: \n", options, "\n");
|
|
137347
|
+
}
|
|
138840
137348
|
await (0, import_tsup.build)(options);
|
|
138841
137349
|
}
|
|
138842
137350
|
} catch (e) {
|
|
@@ -139068,9 +137576,7 @@ var tsupBrowserBuildExecutorFn = (options, context, config) => {
|
|
|
139068
137576
|
},
|
|
139069
137577
|
platform: "browser",
|
|
139070
137578
|
banner: getFileBanner(
|
|
139071
|
-
context.projectName ? context.projectName.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map(
|
|
139072
|
-
(s) => s ? s.toUpperCase()[0] + s.toLowerCase().slice(1) : ""
|
|
139073
|
-
).join(" ") : "TypeScript (Browser Platforms)"
|
|
137579
|
+
context.projectName ? context.projectName.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map((s) => s ? s.toUpperCase()[0] + s.toLowerCase().slice(1) : "").join(" ") : "TypeScript (Browser Platforms)"
|
|
139074
137580
|
),
|
|
139075
137581
|
define: {
|
|
139076
137582
|
...options.define
|
|
@@ -139079,7 +137585,8 @@ var tsupBrowserBuildExecutorFn = (options, context, config) => {
|
|
|
139079
137585
|
...process.env
|
|
139080
137586
|
}
|
|
139081
137587
|
},
|
|
139082
|
-
context
|
|
137588
|
+
context,
|
|
137589
|
+
config
|
|
139083
137590
|
);
|
|
139084
137591
|
};
|
|
139085
137592
|
var applyDefaultOptions2 = (options) => {
|