@storm-software/workspace-tools 1.42.0 → 1.42.2

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.
@@ -40390,9 +40390,9 @@ var require_chalk = __commonJS({
40390
40390
  }
40391
40391
  });
40392
40392
 
40393
- // node_modules/.pnpm/@babel+highlight@7.22.20/node_modules/@babel/highlight/lib/index.js
40393
+ // node_modules/.pnpm/@babel+highlight@7.23.4/node_modules/@babel/highlight/lib/index.js
40394
40394
  var require_lib4 = __commonJS({
40395
- "node_modules/.pnpm/@babel+highlight@7.22.20/node_modules/@babel/highlight/lib/index.js"(exports) {
40395
+ "node_modules/.pnpm/@babel+highlight@7.23.4/node_modules/@babel/highlight/lib/index.js"(exports) {
40396
40396
  "use strict";
40397
40397
  Object.defineProperty(exports, "__esModule", {
40398
40398
  value: true
@@ -40402,43 +40402,29 @@ var require_lib4 = __commonJS({
40402
40402
  var _jsTokens = require_js_tokens();
40403
40403
  var _helperValidatorIdentifier = require_lib3();
40404
40404
  var _chalk = _interopRequireWildcard(require_chalk(), true);
40405
- function _getRequireWildcardCache(nodeInterop) {
40406
- if (typeof WeakMap !== "function")
40405
+ function _getRequireWildcardCache(e) {
40406
+ if ("function" != typeof WeakMap)
40407
40407
  return null;
40408
- var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
40409
- var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
40410
- return (_getRequireWildcardCache = function(nodeInterop2) {
40411
- return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
40412
- })(nodeInterop);
40413
- }
40414
- function _interopRequireWildcard(obj, nodeInterop) {
40415
- if (!nodeInterop && obj && obj.__esModule) {
40416
- return obj;
40417
- }
40418
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
40419
- return { default: obj };
40420
- }
40421
- var cache = _getRequireWildcardCache(nodeInterop);
40422
- if (cache && cache.has(obj)) {
40423
- return cache.get(obj);
40424
- }
40425
- var newObj = {};
40426
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
40427
- for (var key in obj) {
40428
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
40429
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
40430
- if (desc && (desc.get || desc.set)) {
40431
- Object.defineProperty(newObj, key, desc);
40432
- } else {
40433
- newObj[key] = obj[key];
40434
- }
40435
- }
40436
- }
40437
- newObj.default = obj;
40438
- if (cache) {
40439
- cache.set(obj, newObj);
40440
- }
40441
- return newObj;
40408
+ var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
40409
+ return (_getRequireWildcardCache = function(e2) {
40410
+ return e2 ? t : r;
40411
+ })(e);
40412
+ }
40413
+ function _interopRequireWildcard(e, r) {
40414
+ if (!r && e && e.__esModule)
40415
+ return e;
40416
+ if (null === e || "object" != typeof e && "function" != typeof e)
40417
+ return { default: e };
40418
+ var t = _getRequireWildcardCache(r);
40419
+ if (t && t.has(e))
40420
+ return t.get(e);
40421
+ var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
40422
+ for (var u in e)
40423
+ if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
40424
+ var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
40425
+ i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
40426
+ }
40427
+ return n.default = e, t && t.set(e, n), n;
40442
40428
  }
40443
40429
  var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
40444
40430
  function getDefs(chalk2) {
@@ -40534,9 +40520,9 @@ var require_lib4 = __commonJS({
40534
40520
  }
40535
40521
  });
40536
40522
 
40537
- // node_modules/.pnpm/@babel+code-frame@7.22.13/node_modules/@babel/code-frame/lib/index.js
40523
+ // node_modules/.pnpm/@babel+code-frame@7.23.5/node_modules/@babel/code-frame/lib/index.js
40538
40524
  var require_lib5 = __commonJS({
40539
- "node_modules/.pnpm/@babel+code-frame@7.22.13/node_modules/@babel/code-frame/lib/index.js"(exports) {
40525
+ "node_modules/.pnpm/@babel+code-frame@7.23.5/node_modules/@babel/code-frame/lib/index.js"(exports) {
40540
40526
  "use strict";
40541
40527
  Object.defineProperty(exports, "__esModule", {
40542
40528
  value: true
@@ -40545,43 +40531,29 @@ var require_lib5 = __commonJS({
40545
40531
  exports.default = _default;
40546
40532
  var _highlight = require_lib4();
40547
40533
  var _chalk = _interopRequireWildcard(require_chalk(), true);
40548
- function _getRequireWildcardCache(nodeInterop) {
40549
- if (typeof WeakMap !== "function")
40534
+ function _getRequireWildcardCache(e) {
40535
+ if ("function" != typeof WeakMap)
40550
40536
  return null;
40551
- var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
40552
- var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
40553
- return (_getRequireWildcardCache = function(nodeInterop2) {
40554
- return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
40555
- })(nodeInterop);
40556
- }
40557
- function _interopRequireWildcard(obj, nodeInterop) {
40558
- if (!nodeInterop && obj && obj.__esModule) {
40559
- return obj;
40560
- }
40561
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
40562
- return { default: obj };
40563
- }
40564
- var cache = _getRequireWildcardCache(nodeInterop);
40565
- if (cache && cache.has(obj)) {
40566
- return cache.get(obj);
40567
- }
40568
- var newObj = {};
40569
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
40570
- for (var key in obj) {
40571
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
40572
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
40573
- if (desc && (desc.get || desc.set)) {
40574
- Object.defineProperty(newObj, key, desc);
40575
- } else {
40576
- newObj[key] = obj[key];
40577
- }
40578
- }
40579
- }
40580
- newObj.default = obj;
40581
- if (cache) {
40582
- cache.set(obj, newObj);
40583
- }
40584
- return newObj;
40537
+ var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
40538
+ return (_getRequireWildcardCache = function(e2) {
40539
+ return e2 ? t : r;
40540
+ })(e);
40541
+ }
40542
+ function _interopRequireWildcard(e, r) {
40543
+ if (!r && e && e.__esModule)
40544
+ return e;
40545
+ if (null === e || "object" != typeof e && "function" != typeof e)
40546
+ return { default: e };
40547
+ var t = _getRequireWildcardCache(r);
40548
+ if (t && t.has(e))
40549
+ return t.get(e);
40550
+ var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
40551
+ for (var u in e)
40552
+ if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
40553
+ var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
40554
+ i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
40555
+ }
40556
+ return n.default = e, t && t.set(e, n), n;
40585
40557
  }
40586
40558
  var chalkWithForcedColor = void 0;
40587
40559
  function getChalk(forceColor) {
@@ -44460,1727 +44432,242 @@ var require_ExplorerSync = __commonJS({
44460
44432
  mergeArrays: this.config.mergeImportArrays
44461
44433
  });
44462
44434
  }
44463
- #loadConfiguration(filepath, contents) {
44464
- if (contents.trim() === "") {
44465
- return;
44466
- }
44467
- const extension = path_1.default.extname(filepath);
44468
- const loader = this.config.loaders[extension || "noExt"] ?? this.config.loaders["default"];
44469
- if (!loader) {
44470
- throw new Error(`No loader specified for ${(0, ExplorerBase_js_1.getExtensionDescription)(extension)}`);
44471
- }
44472
- try {
44473
- const loadedContents = loader(filepath, contents);
44474
- if (path_1.default.basename(filepath, extension) !== "package") {
44475
- return loadedContents;
44476
- }
44477
- return (0, util_js_1.getPropertyByPath)(loadedContents, this.config.packageProp ?? this.config.moduleName) ?? null;
44478
- } catch (error) {
44479
- error.filepath = filepath;
44480
- throw error;
44481
- }
44482
- }
44483
- #fileExists(path2) {
44484
- try {
44485
- fs_1.default.statSync(path2);
44486
- return true;
44487
- } catch (e) {
44488
- return false;
44489
- }
44490
- }
44491
- *#getDirs(startDir) {
44492
- switch (this.config.searchStrategy) {
44493
- case "none": {
44494
- yield { path: startDir, isGlobalConfig: false };
44495
- return;
44496
- }
44497
- case "project": {
44498
- let currentDir = startDir;
44499
- while (true) {
44500
- yield { path: currentDir, isGlobalConfig: false };
44501
- for (const ext2 of ["json", "yaml"]) {
44502
- const packageFile = path_1.default.join(currentDir, `package.${ext2}`);
44503
- if (this.#fileExists(packageFile)) {
44504
- break;
44505
- }
44506
- }
44507
- const parentDir = path_1.default.dirname(currentDir);
44508
- if (parentDir === currentDir) {
44509
- break;
44510
- }
44511
- currentDir = parentDir;
44512
- }
44513
- return;
44514
- }
44515
- case "global": {
44516
- yield* this.getGlobalDirs(startDir);
44517
- }
44518
- }
44519
- }
44520
- /**
44521
- * @deprecated Use {@link ExplorerSync.prototype.load}.
44522
- */
44523
- /* istanbul ignore next */
44524
- loadSync(filepath) {
44525
- return this.load(filepath);
44526
- }
44527
- /**
44528
- * @deprecated Use {@link ExplorerSync.prototype.search}.
44529
- */
44530
- /* istanbul ignore next */
44531
- searchSync(from = "") {
44532
- return this.search(from);
44533
- }
44534
- };
44535
- exports.ExplorerSync = ExplorerSync;
44536
- }
44537
- });
44538
-
44539
- // node_modules/.pnpm/cosmiconfig@9.0.0_typescript@5.2.2/node_modules/cosmiconfig/dist/index.js
44540
- var require_dist = __commonJS({
44541
- "node_modules/.pnpm/cosmiconfig@9.0.0_typescript@5.2.2/node_modules/cosmiconfig/dist/index.js"(exports) {
44542
- "use strict";
44543
- Object.defineProperty(exports, "__esModule", { value: true });
44544
- exports.defaultLoadersSync = exports.defaultLoaders = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = exports.getDefaultSearchPlacesSync = exports.getDefaultSearchPlaces = exports.cosmiconfigSync = exports.cosmiconfig = void 0;
44545
- var defaults_1 = require_defaults();
44546
- Object.defineProperty(exports, "defaultLoaders", { enumerable: true, get: function() {
44547
- return defaults_1.defaultLoaders;
44548
- } });
44549
- Object.defineProperty(exports, "defaultLoadersSync", { enumerable: true, get: function() {
44550
- return defaults_1.defaultLoadersSync;
44551
- } });
44552
- Object.defineProperty(exports, "getDefaultSearchPlaces", { enumerable: true, get: function() {
44553
- return defaults_1.getDefaultSearchPlaces;
44554
- } });
44555
- Object.defineProperty(exports, "getDefaultSearchPlacesSync", { enumerable: true, get: function() {
44556
- return defaults_1.getDefaultSearchPlacesSync;
44557
- } });
44558
- Object.defineProperty(exports, "globalConfigSearchPlaces", { enumerable: true, get: function() {
44559
- return defaults_1.globalConfigSearchPlaces;
44560
- } });
44561
- Object.defineProperty(exports, "globalConfigSearchPlacesSync", { enumerable: true, get: function() {
44562
- return defaults_1.globalConfigSearchPlacesSync;
44563
- } });
44564
- var Explorer_js_1 = require_Explorer();
44565
- var ExplorerSync_js_1 = require_ExplorerSync();
44566
- var util_1 = require_util2();
44567
- var identity = function identity2(x) {
44568
- return x;
44569
- };
44570
- function getUserDefinedOptionsFromMetaConfig() {
44571
- const metaExplorer = new ExplorerSync_js_1.ExplorerSync({
44572
- moduleName: "cosmiconfig",
44573
- stopDir: process.cwd(),
44574
- searchPlaces: defaults_1.metaSearchPlaces,
44575
- ignoreEmptySearchPlaces: false,
44576
- applyPackagePropertyPathToConfiguration: true,
44577
- loaders: defaults_1.defaultLoaders,
44578
- transform: identity,
44579
- cache: true,
44580
- metaConfigFilePath: null,
44581
- mergeImportArrays: true,
44582
- mergeSearchPlaces: true,
44583
- searchStrategy: "none"
44584
- });
44585
- const metaConfig = metaExplorer.search();
44586
- if (!metaConfig) {
44587
- return null;
44588
- }
44589
- if (metaConfig.config?.loaders) {
44590
- throw new Error("Can not specify loaders in meta config file");
44591
- }
44592
- if (metaConfig.config?.searchStrategy) {
44593
- throw new Error("Can not specify searchStrategy in meta config file");
44594
- }
44595
- const overrideOptions = {
44596
- mergeSearchPlaces: true,
44597
- ...metaConfig.config ?? {}
44598
- };
44599
- return {
44600
- config: (0, util_1.removeUndefinedValuesFromObject)(overrideOptions),
44601
- filepath: metaConfig.filepath
44602
- };
44603
- }
44604
- function getResolvedSearchPlaces(moduleName, toolDefinedSearchPlaces, userConfiguredOptions) {
44605
- const userConfiguredSearchPlaces = userConfiguredOptions.searchPlaces?.map((path2) => path2.replace("{name}", moduleName));
44606
- if (userConfiguredOptions.mergeSearchPlaces) {
44607
- return [...userConfiguredSearchPlaces ?? [], ...toolDefinedSearchPlaces];
44608
- }
44609
- return userConfiguredSearchPlaces ?? /* istanbul ignore next */
44610
- toolDefinedSearchPlaces;
44611
- }
44612
- function mergeOptionsBase(moduleName, defaults2, options) {
44613
- const userDefinedConfig = getUserDefinedOptionsFromMetaConfig();
44614
- if (!userDefinedConfig) {
44615
- return {
44616
- ...defaults2,
44617
- ...(0, util_1.removeUndefinedValuesFromObject)(options),
44618
- loaders: {
44619
- ...defaults2.loaders,
44620
- ...options.loaders
44621
- }
44622
- };
44623
- }
44624
- const userConfiguredOptions = userDefinedConfig.config;
44625
- const toolDefinedSearchPlaces = options.searchPlaces ?? defaults2.searchPlaces;
44626
- return {
44627
- ...defaults2,
44628
- ...(0, util_1.removeUndefinedValuesFromObject)(options),
44629
- metaConfigFilePath: userDefinedConfig.filepath,
44630
- ...userConfiguredOptions,
44631
- searchPlaces: getResolvedSearchPlaces(moduleName, toolDefinedSearchPlaces, userConfiguredOptions),
44632
- loaders: {
44633
- ...defaults2.loaders,
44634
- ...options.loaders
44635
- }
44636
- };
44637
- }
44638
- function validateOptions(options) {
44639
- if (options.searchStrategy != null && options.searchStrategy !== "global" && options.stopDir) {
44640
- throw new Error('Can not supply `stopDir` option with `searchStrategy` other than "global"');
44641
- }
44642
- }
44643
- function mergeOptions(moduleName, options) {
44644
- validateOptions(options);
44645
- const defaults2 = {
44646
- moduleName,
44647
- searchPlaces: (0, defaults_1.getDefaultSearchPlaces)(moduleName),
44648
- ignoreEmptySearchPlaces: true,
44649
- cache: true,
44650
- transform: identity,
44651
- loaders: defaults_1.defaultLoaders,
44652
- metaConfigFilePath: null,
44653
- mergeImportArrays: true,
44654
- mergeSearchPlaces: true,
44655
- searchStrategy: options.stopDir ? "global" : "none"
44656
- };
44657
- return mergeOptionsBase(moduleName, defaults2, options);
44658
- }
44659
- function mergeOptionsSync(moduleName, options) {
44660
- validateOptions(options);
44661
- const defaults2 = {
44662
- moduleName,
44663
- searchPlaces: (0, defaults_1.getDefaultSearchPlacesSync)(moduleName),
44664
- ignoreEmptySearchPlaces: true,
44665
- cache: true,
44666
- transform: identity,
44667
- loaders: defaults_1.defaultLoadersSync,
44668
- metaConfigFilePath: null,
44669
- mergeImportArrays: true,
44670
- mergeSearchPlaces: true,
44671
- searchStrategy: options.stopDir ? "global" : "none"
44672
- };
44673
- return mergeOptionsBase(moduleName, defaults2, options);
44674
- }
44675
- function cosmiconfig2(moduleName, options = {}) {
44676
- const normalizedOptions = mergeOptions(moduleName, options);
44677
- const explorer = new Explorer_js_1.Explorer(normalizedOptions);
44678
- return {
44679
- search: explorer.search.bind(explorer),
44680
- load: explorer.load.bind(explorer),
44681
- clearLoadCache: explorer.clearLoadCache.bind(explorer),
44682
- clearSearchCache: explorer.clearSearchCache.bind(explorer),
44683
- clearCaches: explorer.clearCaches.bind(explorer)
44684
- };
44685
- }
44686
- exports.cosmiconfig = cosmiconfig2;
44687
- function cosmiconfigSync(moduleName, options = {}) {
44688
- const normalizedOptions = mergeOptionsSync(moduleName, options);
44689
- const explorerSync = new ExplorerSync_js_1.ExplorerSync(normalizedOptions);
44690
- return {
44691
- search: explorerSync.search.bind(explorerSync),
44692
- load: explorerSync.load.bind(explorerSync),
44693
- clearLoadCache: explorerSync.clearLoadCache.bind(explorerSync),
44694
- clearSearchCache: explorerSync.clearSearchCache.bind(explorerSync),
44695
- clearCaches: explorerSync.clearCaches.bind(explorerSync)
44696
- };
44697
- }
44698
- exports.cosmiconfigSync = cosmiconfigSync;
44699
- }
44700
- });
44701
-
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))
44435
+ #loadConfiguration(filepath, contents) {
44436
+ if (contents.trim() === "") {
45661
44437
  return;
45662
- } catch (err) {
45663
- err.message = err.message.replace("lstat", "ensureLink");
45664
- throw err;
44438
+ }
44439
+ const extension = path_1.default.extname(filepath);
44440
+ const loader = this.config.loaders[extension || "noExt"] ?? this.config.loaders["default"];
44441
+ if (!loader) {
44442
+ throw new Error(`No loader specified for ${(0, ExplorerBase_js_1.getExtensionDescription)(extension)}`);
44443
+ }
44444
+ try {
44445
+ const loadedContents = loader(filepath, contents);
44446
+ if (path_1.default.basename(filepath, extension) !== "package") {
44447
+ return loadedContents;
44448
+ }
44449
+ return (0, util_js_1.getPropertyByPath)(loadedContents, this.config.packageProp ?? this.config.moduleName) ?? null;
44450
+ } catch (error) {
44451
+ error.filepath = filepath;
44452
+ throw error;
44453
+ }
45665
44454
  }
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);
44455
+ #fileExists(path2) {
44456
+ try {
44457
+ fs_1.default.statSync(path2);
44458
+ return true;
44459
+ } catch (e) {
44460
+ return false;
44461
+ }
44462
+ }
44463
+ *#getDirs(startDir) {
44464
+ switch (this.config.searchStrategy) {
44465
+ case "none": {
44466
+ yield { path: startDir, isGlobalConfig: false };
44467
+ return;
45693
44468
  }
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);
44469
+ case "project": {
44470
+ let currentDir = startDir;
44471
+ while (true) {
44472
+ yield { path: currentDir, isGlobalConfig: false };
44473
+ for (const ext2 of ["json", "yaml"]) {
44474
+ const packageFile = path_1.default.join(currentDir, `package.${ext2}`);
44475
+ if (this.#fileExists(packageFile)) {
44476
+ break;
44477
+ }
45715
44478
  }
45716
- return callback(null, {
45717
- toCwd: srcpath,
45718
- toDst: path2.relative(dstdir, srcpath)
45719
- });
45720
- });
44479
+ const parentDir = path_1.default.dirname(currentDir);
44480
+ if (parentDir === currentDir) {
44481
+ break;
44482
+ }
44483
+ currentDir = parentDir;
44484
+ }
44485
+ return;
44486
+ }
44487
+ case "global": {
44488
+ yield* this.getGlobalDirs(startDir);
45721
44489
  }
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
44490
  }
45753
44491
  }
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";
44492
+ /**
44493
+ * @deprecated Use {@link ExplorerSync.prototype.load}.
44494
+ */
44495
+ /* istanbul ignore next */
44496
+ loadSync(filepath) {
44497
+ return this.load(filepath);
44498
+ }
44499
+ /**
44500
+ * @deprecated Use {@link ExplorerSync.prototype.search}.
44501
+ */
44502
+ /* istanbul ignore next */
44503
+ searchSync(from = "") {
44504
+ return this.search(from);
45787
44505
  }
45788
- return stats && stats.isDirectory() ? "dir" : "file";
45789
- }
45790
- module2.exports = {
45791
- symlinkType,
45792
- symlinkTypeSync
45793
44506
  };
44507
+ exports.ExplorerSync = ExplorerSync;
45794
44508
  }
45795
44509
  });
45796
44510
 
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) {
44511
+ // node_modules/.pnpm/cosmiconfig@9.0.0_typescript@5.2.2/node_modules/cosmiconfig/dist/index.js
44512
+ var require_dist = __commonJS({
44513
+ "node_modules/.pnpm/cosmiconfig@9.0.0_typescript@5.2.2/node_modules/cosmiconfig/dist/index.js"(exports) {
45800
44514
  "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
- });
44515
+ Object.defineProperty(exports, "__esModule", { value: true });
44516
+ exports.defaultLoadersSync = exports.defaultLoaders = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = exports.getDefaultSearchPlacesSync = exports.getDefaultSearchPlaces = exports.cosmiconfigSync = exports.cosmiconfig = void 0;
44517
+ var defaults_1 = require_defaults();
44518
+ Object.defineProperty(exports, "defaultLoaders", { enumerable: true, get: function() {
44519
+ return defaults_1.defaultLoaders;
44520
+ } });
44521
+ Object.defineProperty(exports, "defaultLoadersSync", { enumerable: true, get: function() {
44522
+ return defaults_1.defaultLoadersSync;
44523
+ } });
44524
+ Object.defineProperty(exports, "getDefaultSearchPlaces", { enumerable: true, get: function() {
44525
+ return defaults_1.getDefaultSearchPlaces;
44526
+ } });
44527
+ Object.defineProperty(exports, "getDefaultSearchPlacesSync", { enumerable: true, get: function() {
44528
+ return defaults_1.getDefaultSearchPlacesSync;
44529
+ } });
44530
+ Object.defineProperty(exports, "globalConfigSearchPlaces", { enumerable: true, get: function() {
44531
+ return defaults_1.globalConfigSearchPlaces;
44532
+ } });
44533
+ Object.defineProperty(exports, "globalConfigSearchPlacesSync", { enumerable: true, get: function() {
44534
+ return defaults_1.globalConfigSearchPlacesSync;
44535
+ } });
44536
+ var Explorer_js_1 = require_Explorer();
44537
+ var ExplorerSync_js_1 = require_ExplorerSync();
44538
+ var util_1 = require_util2();
44539
+ var identity = function identity2(x) {
44540
+ return x;
44541
+ };
44542
+ function getUserDefinedOptionsFromMetaConfig() {
44543
+ const metaExplorer = new ExplorerSync_js_1.ExplorerSync({
44544
+ moduleName: "cosmiconfig",
44545
+ stopDir: process.cwd(),
44546
+ searchPlaces: defaults_1.metaSearchPlaces,
44547
+ ignoreEmptySearchPlaces: false,
44548
+ applyPackagePropertyPathToConfiguration: true,
44549
+ loaders: defaults_1.defaultLoaders,
44550
+ transform: identity,
44551
+ cache: true,
44552
+ metaConfigFilePath: null,
44553
+ mergeImportArrays: true,
44554
+ mergeSearchPlaces: true,
44555
+ searchStrategy: "none"
45853
44556
  });
45854
- }
45855
- function createSymlinkSync(srcpath, dstpath, type) {
45856
- let stats;
45857
- try {
45858
- stats = fs.lstatSync(dstpath);
45859
- } catch {
44557
+ const metaConfig = metaExplorer.search();
44558
+ if (!metaConfig) {
44559
+ return null;
45860
44560
  }
45861
- if (stats && stats.isSymbolicLink()) {
45862
- const srcStat = fs.statSync(srcpath);
45863
- const dstStat = fs.statSync(dstpath);
45864
- if (areIdentical(srcStat, dstStat))
45865
- return;
44561
+ if (metaConfig.config?.loaders) {
44562
+ throw new Error("Can not specify loaders in meta config file");
45866
44563
  }
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";
44564
+ if (metaConfig.config?.searchStrategy) {
44565
+ throw new Error("Can not specify searchStrategy in meta config file");
45939
44566
  }
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
- });
44567
+ const overrideOptions = {
44568
+ mergeSearchPlaces: true,
44569
+ ...metaConfig.config ?? {}
44570
+ };
44571
+ return {
44572
+ config: (0, util_1.removeUndefinedValuesFromObject)(overrideOptions),
44573
+ filepath: metaConfig.filepath
44574
+ };
45952
44575
  }
45953
- function outputFileSync(file, ...args) {
45954
- const dir = path2.dirname(file);
45955
- if (fs.existsSync(dir)) {
45956
- return fs.writeFileSync(file, ...args);
44576
+ function getResolvedSearchPlaces(moduleName, toolDefinedSearchPlaces, userConfiguredOptions) {
44577
+ const userConfiguredSearchPlaces = userConfiguredOptions.searchPlaces?.map((path2) => path2.replace("{name}", moduleName));
44578
+ if (userConfiguredOptions.mergeSearchPlaces) {
44579
+ return [...userConfiguredSearchPlaces ?? [], ...toolDefinedSearchPlaces];
45957
44580
  }
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);
44581
+ return userConfiguredSearchPlaces ?? /* istanbul ignore next */
44582
+ toolDefinedSearchPlaces;
45991
44583
  }
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 = {};
44584
+ function mergeOptionsBase(moduleName, defaults2, options) {
44585
+ const userDefinedConfig = getUserDefinedOptionsFromMetaConfig();
44586
+ if (!userDefinedConfig) {
44587
+ return {
44588
+ ...defaults2,
44589
+ ...(0, util_1.removeUndefinedValuesFromObject)(options),
44590
+ loaders: {
44591
+ ...defaults2.loaders,
44592
+ ...options.loaders
44593
+ }
44594
+ };
46029
44595
  }
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;
44596
+ const userConfiguredOptions = userDefinedConfig.config;
44597
+ const toolDefinedSearchPlaces = options.searchPlaces ?? defaults2.searchPlaces;
44598
+ return {
44599
+ ...defaults2,
44600
+ ...(0, util_1.removeUndefinedValuesFromObject)(options),
44601
+ metaConfigFilePath: userDefinedConfig.filepath,
44602
+ ...userConfiguredOptions,
44603
+ searchPlaces: getResolvedSearchPlaces(moduleName, toolDefinedSearchPlaces, userConfiguredOptions),
44604
+ loaders: {
44605
+ ...defaults2.loaders,
44606
+ ...options.loaders
44607
+ }
44608
+ };
46053
44609
  }
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
- });
44610
+ function validateOptions(options) {
44611
+ if (options.searchStrategy != null && options.searchStrategy !== "global" && options.stopDir) {
44612
+ throw new Error('Can not supply `stopDir` option with `searchStrategy` other than "global"');
46063
44613
  }
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
44614
  }
46081
- function moveAcrossDevice(src, dest, overwrite, cb) {
46082
- const opts = {
46083
- overwrite,
46084
- errorOnExist: true,
46085
- preserveTimestamps: true
44615
+ function mergeOptions(moduleName, options) {
44616
+ validateOptions(options);
44617
+ const defaults2 = {
44618
+ moduleName,
44619
+ searchPlaces: (0, defaults_1.getDefaultSearchPlaces)(moduleName),
44620
+ ignoreEmptySearchPlaces: true,
44621
+ cache: true,
44622
+ transform: identity,
44623
+ loaders: defaults_1.defaultLoaders,
44624
+ metaConfigFilePath: null,
44625
+ mergeImportArrays: true,
44626
+ mergeSearchPlaces: true,
44627
+ searchStrategy: options.stopDir ? "global" : "none"
46086
44628
  };
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;
44629
+ return mergeOptionsBase(moduleName, defaults2, options);
46120
44630
  }
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);
44631
+ function mergeOptionsSync(moduleName, options) {
44632
+ validateOptions(options);
44633
+ const defaults2 = {
44634
+ moduleName,
44635
+ searchPlaces: (0, defaults_1.getDefaultSearchPlacesSync)(moduleName),
44636
+ ignoreEmptySearchPlaces: true,
44637
+ cache: true,
44638
+ transform: identity,
44639
+ loaders: defaults_1.defaultLoadersSync,
44640
+ metaConfigFilePath: null,
44641
+ mergeImportArrays: true,
44642
+ mergeSearchPlaces: true,
44643
+ searchStrategy: options.stopDir ? "global" : "none"
44644
+ };
44645
+ return mergeOptionsBase(moduleName, defaults2, options);
46131
44646
  }
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
- }
44647
+ function cosmiconfig2(moduleName, options = {}) {
44648
+ const normalizedOptions = mergeOptions(moduleName, options);
44649
+ const explorer = new Explorer_js_1.Explorer(normalizedOptions);
44650
+ return {
44651
+ search: explorer.search.bind(explorer),
44652
+ load: explorer.load.bind(explorer),
44653
+ clearLoadCache: explorer.clearLoadCache.bind(explorer),
44654
+ clearSearchCache: explorer.clearSearchCache.bind(explorer),
44655
+ clearCaches: explorer.clearCaches.bind(explorer)
44656
+ };
46140
44657
  }
46141
- function moveAcrossDevice(src, dest, overwrite) {
46142
- const opts = {
46143
- overwrite,
46144
- errorOnExist: true,
46145
- preserveTimestamps: true
44658
+ exports.cosmiconfig = cosmiconfig2;
44659
+ function cosmiconfigSync(moduleName, options = {}) {
44660
+ const normalizedOptions = mergeOptionsSync(moduleName, options);
44661
+ const explorerSync = new ExplorerSync_js_1.ExplorerSync(normalizedOptions);
44662
+ return {
44663
+ search: explorerSync.search.bind(explorerSync),
44664
+ load: explorerSync.load.bind(explorerSync),
44665
+ clearLoadCache: explorerSync.clearLoadCache.bind(explorerSync),
44666
+ clearSearchCache: explorerSync.clearSearchCache.bind(explorerSync),
44667
+ clearCaches: explorerSync.clearCaches.bind(explorerSync)
46146
44668
  };
46147
- copySync(src, dest, opts);
46148
- return removeSync2(src);
46149
44669
  }
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
- };
44670
+ exports.cosmiconfigSync = cosmiconfigSync;
46184
44671
  }
46185
44672
  });
46186
44673
 
@@ -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 require_fs8 = __commonJS({
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 require_utils10 = __commonJS({
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 = require_fs8();
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 = require_utils10();
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 = require_utils10();
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 = require_utils10();
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 = require_utils10();
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 = require_utils10();
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 = require_utils10();
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 = require_utils10();
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 = require_utils10();
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 require_lib7 = __commonJS({
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 = require_lib7();
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 require_lib8 = __commonJS({
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 require_lib9 = __commonJS({
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 = require_lib8();
106692
- var DRange = require_lib9();
105178
+ var ret = require_lib7();
105179
+ var DRange = require_lib8();
106693
105180
  var types2 = ret.types;
106694
105181
  module2.exports = class RandExp {
106695
105182
  /**
@@ -131882,7 +130369,7 @@ var environmentPlugin = (data) => ({
131882
130369
  });
131883
130370
 
131884
130371
  // packages/workspace-tools/src/executors/tsup/executor.ts
131885
- var import_fs_extra = __toESM(require_lib6());
130372
+ var import_fs_extra = __toESM(require_lib());
131886
130373
  var import_promises2 = require("fs/promises");
131887
130374
 
131888
130375
  // node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/mjs/index.js