@storm-software/workspace-tools 1.23.0 → 1.24.0

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.
@@ -15845,9 +15845,9 @@ var require_run_tasks_in_serial = __commonJS({
15845
15845
  }
15846
15846
  });
15847
15847
 
15848
- // node_modules/.pnpm/ignore@5.2.4/node_modules/ignore/index.js
15848
+ // node_modules/.pnpm/ignore@5.3.0/node_modules/ignore/index.js
15849
15849
  var require_ignore = __commonJS({
15850
- "node_modules/.pnpm/ignore@5.2.4/node_modules/ignore/index.js"(exports, module2) {
15850
+ "node_modules/.pnpm/ignore@5.3.0/node_modules/ignore/index.js"(exports, module2) {
15851
15851
  function makeArray(subject) {
15852
15852
  return Array.isArray(subject) ? subject : [subject];
15853
15853
  }
@@ -16267,14 +16267,14 @@ var require_parse_target_string = __commonJS({
16267
16267
  Object.defineProperty(exports, "__esModule", { value: true });
16268
16268
  exports.targetToTargetString = exports.parseTargetString = void 0;
16269
16269
  var nx_1 = require_nx();
16270
- var { readCachedProjectGraph, splitTarget, splitByColons } = (0, nx_1.requireNx)();
16270
+ var { readCachedProjectGraph: readCachedProjectGraph2, splitTarget, splitByColons } = (0, nx_1.requireNx)();
16271
16271
  splitTarget = splitTarget ?? require("nx/src/utils/split-target").splitTarget;
16272
16272
  splitByColons = splitByColons ?? ((s) => s.split(":"));
16273
16273
  function parseTargetString(targetString, projectGraphOrCtx) {
16274
16274
  let projectGraph = projectGraphOrCtx && "projectGraph" in projectGraphOrCtx ? projectGraphOrCtx.projectGraph : projectGraphOrCtx;
16275
16275
  if (!projectGraph) {
16276
16276
  try {
16277
- projectGraph = readCachedProjectGraph();
16277
+ projectGraph = readCachedProjectGraph2();
16278
16278
  } catch (e) {
16279
16279
  projectGraph = { nodes: {} };
16280
16280
  }
@@ -26736,6 +26736,337 @@ var require_print_diagnostics = __commonJS({
26736
26736
  }
26737
26737
  });
26738
26738
 
26739
+ // node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js
26740
+ var require_util3 = __commonJS({
26741
+ "node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js"(exports, module2) {
26742
+ "use strict";
26743
+ var stringReplaceAll = (string, substring, replacer) => {
26744
+ let index = string.indexOf(substring);
26745
+ if (index === -1) {
26746
+ return string;
26747
+ }
26748
+ const substringLength = substring.length;
26749
+ let endIndex = 0;
26750
+ let returnValue = "";
26751
+ do {
26752
+ returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
26753
+ endIndex = index + substringLength;
26754
+ index = string.indexOf(substring, endIndex);
26755
+ } while (index !== -1);
26756
+ returnValue += string.substr(endIndex);
26757
+ return returnValue;
26758
+ };
26759
+ var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
26760
+ let endIndex = 0;
26761
+ let returnValue = "";
26762
+ do {
26763
+ const gotCR = string[index - 1] === "\r";
26764
+ returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
26765
+ endIndex = index + 1;
26766
+ index = string.indexOf("\n", endIndex);
26767
+ } while (index !== -1);
26768
+ returnValue += string.substr(endIndex);
26769
+ return returnValue;
26770
+ };
26771
+ module2.exports = {
26772
+ stringReplaceAll,
26773
+ stringEncaseCRLFWithFirstIndex
26774
+ };
26775
+ }
26776
+ });
26777
+
26778
+ // node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js
26779
+ var require_templates3 = __commonJS({
26780
+ "node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js"(exports, module2) {
26781
+ "use strict";
26782
+ var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
26783
+ var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
26784
+ var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
26785
+ var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
26786
+ var ESCAPES = /* @__PURE__ */ new Map([
26787
+ ["n", "\n"],
26788
+ ["r", "\r"],
26789
+ ["t", " "],
26790
+ ["b", "\b"],
26791
+ ["f", "\f"],
26792
+ ["v", "\v"],
26793
+ ["0", "\0"],
26794
+ ["\\", "\\"],
26795
+ ["e", "\x1B"],
26796
+ ["a", "\x07"]
26797
+ ]);
26798
+ function unescape3(c) {
26799
+ const u = c[0] === "u";
26800
+ const bracket = c[1] === "{";
26801
+ if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) {
26802
+ return String.fromCharCode(parseInt(c.slice(1), 16));
26803
+ }
26804
+ if (u && bracket) {
26805
+ return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
26806
+ }
26807
+ return ESCAPES.get(c) || c;
26808
+ }
26809
+ function parseArguments(name, arguments_) {
26810
+ const results = [];
26811
+ const chunks = arguments_.trim().split(/\s*,\s*/g);
26812
+ let matches;
26813
+ for (const chunk of chunks) {
26814
+ const number = Number(chunk);
26815
+ if (!Number.isNaN(number)) {
26816
+ results.push(number);
26817
+ } else if (matches = chunk.match(STRING_REGEX)) {
26818
+ results.push(matches[2].replace(ESCAPE_REGEX, (m, escape2, character) => escape2 ? unescape3(escape2) : character));
26819
+ } else {
26820
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
26821
+ }
26822
+ }
26823
+ return results;
26824
+ }
26825
+ function parseStyle(style) {
26826
+ STYLE_REGEX.lastIndex = 0;
26827
+ const results = [];
26828
+ let matches;
26829
+ while ((matches = STYLE_REGEX.exec(style)) !== null) {
26830
+ const name = matches[1];
26831
+ if (matches[2]) {
26832
+ const args = parseArguments(name, matches[2]);
26833
+ results.push([name].concat(args));
26834
+ } else {
26835
+ results.push([name]);
26836
+ }
26837
+ }
26838
+ return results;
26839
+ }
26840
+ function buildStyle(chalk2, styles) {
26841
+ const enabled = {};
26842
+ for (const layer of styles) {
26843
+ for (const style of layer.styles) {
26844
+ enabled[style[0]] = layer.inverse ? null : style.slice(1);
26845
+ }
26846
+ }
26847
+ let current = chalk2;
26848
+ for (const [styleName, styles2] of Object.entries(enabled)) {
26849
+ if (!Array.isArray(styles2)) {
26850
+ continue;
26851
+ }
26852
+ if (!(styleName in current)) {
26853
+ throw new Error(`Unknown Chalk style: ${styleName}`);
26854
+ }
26855
+ current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName];
26856
+ }
26857
+ return current;
26858
+ }
26859
+ module2.exports = (chalk2, temporary) => {
26860
+ const styles = [];
26861
+ const chunks = [];
26862
+ let chunk = [];
26863
+ temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
26864
+ if (escapeCharacter) {
26865
+ chunk.push(unescape3(escapeCharacter));
26866
+ } else if (style) {
26867
+ const string = chunk.join("");
26868
+ chunk = [];
26869
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
26870
+ styles.push({ inverse, styles: parseStyle(style) });
26871
+ } else if (close) {
26872
+ if (styles.length === 0) {
26873
+ throw new Error("Found extraneous } in Chalk template literal");
26874
+ }
26875
+ chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
26876
+ chunk = [];
26877
+ styles.pop();
26878
+ } else {
26879
+ chunk.push(character);
26880
+ }
26881
+ });
26882
+ chunks.push(chunk.join(""));
26883
+ if (styles.length > 0) {
26884
+ const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
26885
+ throw new Error(errMessage);
26886
+ }
26887
+ return chunks.join("");
26888
+ };
26889
+ }
26890
+ });
26891
+
26892
+ // node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js
26893
+ var require_source2 = __commonJS({
26894
+ "node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"(exports, module2) {
26895
+ "use strict";
26896
+ var ansiStyles = require_ansi_styles2();
26897
+ var { stdout: stdoutColor, stderr: stderrColor } = require_supports_color2();
26898
+ var {
26899
+ stringReplaceAll,
26900
+ stringEncaseCRLFWithFirstIndex
26901
+ } = require_util3();
26902
+ var { isArray } = Array;
26903
+ var levelMapping = [
26904
+ "ansi",
26905
+ "ansi",
26906
+ "ansi256",
26907
+ "ansi16m"
26908
+ ];
26909
+ var styles = /* @__PURE__ */ Object.create(null);
26910
+ var applyOptions = (object, options = {}) => {
26911
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
26912
+ throw new Error("The `level` option should be an integer from 0 to 3");
26913
+ }
26914
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
26915
+ object.level = options.level === void 0 ? colorLevel : options.level;
26916
+ };
26917
+ var ChalkClass = class {
26918
+ constructor(options) {
26919
+ return chalkFactory(options);
26920
+ }
26921
+ };
26922
+ var chalkFactory = (options) => {
26923
+ const chalk3 = {};
26924
+ applyOptions(chalk3, options);
26925
+ chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
26926
+ Object.setPrototypeOf(chalk3, Chalk.prototype);
26927
+ Object.setPrototypeOf(chalk3.template, chalk3);
26928
+ chalk3.template.constructor = () => {
26929
+ throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
26930
+ };
26931
+ chalk3.template.Instance = ChalkClass;
26932
+ return chalk3.template;
26933
+ };
26934
+ function Chalk(options) {
26935
+ return chalkFactory(options);
26936
+ }
26937
+ for (const [styleName, style] of Object.entries(ansiStyles)) {
26938
+ styles[styleName] = {
26939
+ get() {
26940
+ const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
26941
+ Object.defineProperty(this, styleName, { value: builder });
26942
+ return builder;
26943
+ }
26944
+ };
26945
+ }
26946
+ styles.visible = {
26947
+ get() {
26948
+ const builder = createBuilder(this, this._styler, true);
26949
+ Object.defineProperty(this, "visible", { value: builder });
26950
+ return builder;
26951
+ }
26952
+ };
26953
+ var usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
26954
+ for (const model of usedModels) {
26955
+ styles[model] = {
26956
+ get() {
26957
+ const { level } = this;
26958
+ return function(...arguments_) {
26959
+ const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
26960
+ return createBuilder(this, styler, this._isEmpty);
26961
+ };
26962
+ }
26963
+ };
26964
+ }
26965
+ for (const model of usedModels) {
26966
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
26967
+ styles[bgModel] = {
26968
+ get() {
26969
+ const { level } = this;
26970
+ return function(...arguments_) {
26971
+ const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
26972
+ return createBuilder(this, styler, this._isEmpty);
26973
+ };
26974
+ }
26975
+ };
26976
+ }
26977
+ var proto = Object.defineProperties(() => {
26978
+ }, {
26979
+ ...styles,
26980
+ level: {
26981
+ enumerable: true,
26982
+ get() {
26983
+ return this._generator.level;
26984
+ },
26985
+ set(level) {
26986
+ this._generator.level = level;
26987
+ }
26988
+ }
26989
+ });
26990
+ var createStyler = (open, close, parent) => {
26991
+ let openAll;
26992
+ let closeAll;
26993
+ if (parent === void 0) {
26994
+ openAll = open;
26995
+ closeAll = close;
26996
+ } else {
26997
+ openAll = parent.openAll + open;
26998
+ closeAll = close + parent.closeAll;
26999
+ }
27000
+ return {
27001
+ open,
27002
+ close,
27003
+ openAll,
27004
+ closeAll,
27005
+ parent
27006
+ };
27007
+ };
27008
+ var createBuilder = (self2, _styler, _isEmpty) => {
27009
+ const builder = (...arguments_) => {
27010
+ if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
27011
+ return applyStyle(builder, chalkTag(builder, ...arguments_));
27012
+ }
27013
+ return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
27014
+ };
27015
+ Object.setPrototypeOf(builder, proto);
27016
+ builder._generator = self2;
27017
+ builder._styler = _styler;
27018
+ builder._isEmpty = _isEmpty;
27019
+ return builder;
27020
+ };
27021
+ var applyStyle = (self2, string) => {
27022
+ if (self2.level <= 0 || !string) {
27023
+ return self2._isEmpty ? "" : string;
27024
+ }
27025
+ let styler = self2._styler;
27026
+ if (styler === void 0) {
27027
+ return string;
27028
+ }
27029
+ const { openAll, closeAll } = styler;
27030
+ if (string.indexOf("\x1B") !== -1) {
27031
+ while (styler !== void 0) {
27032
+ string = stringReplaceAll(string, styler.close, styler.open);
27033
+ styler = styler.parent;
27034
+ }
27035
+ }
27036
+ const lfIndex = string.indexOf("\n");
27037
+ if (lfIndex !== -1) {
27038
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
27039
+ }
27040
+ return openAll + string + closeAll;
27041
+ };
27042
+ var template;
27043
+ var chalkTag = (chalk3, ...strings) => {
27044
+ const [firstString] = strings;
27045
+ if (!isArray(firstString) || !isArray(firstString.raw)) {
27046
+ return strings.join(" ");
27047
+ }
27048
+ const arguments_ = strings.slice(1);
27049
+ const parts = [firstString.raw[0]];
27050
+ for (let i = 1; i < firstString.length; i++) {
27051
+ parts.push(
27052
+ String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
27053
+ String(firstString.raw[i])
27054
+ );
27055
+ }
27056
+ if (template === void 0) {
27057
+ template = require_templates3();
27058
+ }
27059
+ return template(chalk3, parts.join(""));
27060
+ };
27061
+ Object.defineProperties(Chalk.prototype, styles);
27062
+ var chalk2 = Chalk();
27063
+ chalk2.supportsColor = stdoutColor;
27064
+ chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
27065
+ chalk2.stderr.supportsColor = stderrColor;
27066
+ module2.exports = chalk2;
27067
+ }
27068
+ });
27069
+
26739
27070
  // node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/utils/code-frames/identifiers.js
26740
27071
  var require_identifiers2 = __commonJS({
26741
27072
  "node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/utils/code-frames/identifiers.js"(exports) {
@@ -26797,7 +27128,7 @@ var require_highlight = __commonJS({
26797
27128
  Object.defineProperty(exports, "__esModule", { value: true });
26798
27129
  exports.highlight = void 0;
26799
27130
  var jsTokens = require_js_tokens();
26800
- var chalk2 = require_source();
27131
+ var chalk2 = require_source2();
26801
27132
  var identifiers_1 = require_identifiers2();
26802
27133
  function getDefs(chalk3) {
26803
27134
  return {
@@ -26963,7 +27294,7 @@ var require_run_type_check = __commonJS({
26963
27294
  "use strict";
26964
27295
  Object.defineProperty(exports, "__esModule", { value: true });
26965
27296
  exports.getFormattedDiagnostic = exports.runTypeCheck = exports.runTypeCheckWatch = void 0;
26966
- var chalk2 = require_source();
27297
+ var chalk2 = require_source2();
26967
27298
  var path2 = require("path");
26968
27299
  var code_frames_1 = require("nx/src/utils/code-frames");
26969
27300
  var highlight_1 = require_highlight();
@@ -27896,9 +28227,9 @@ var require_watch_for_single_file_changes = __commonJS({
27896
28227
  }
27897
28228
  });
27898
28229
 
27899
- // node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js
28230
+ // node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
27900
28231
  var require_universalify = __commonJS({
27901
- "node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
28232
+ "node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports) {
27902
28233
  "use strict";
27903
28234
  exports.fromCallback = function(fn) {
27904
28235
  return Object.defineProperty(function(...args) {
@@ -27906,11 +28237,8 @@ var require_universalify = __commonJS({
27906
28237
  fn.apply(this, args);
27907
28238
  else {
27908
28239
  return new Promise((resolve, reject) => {
27909
- fn.call(
27910
- this,
27911
- ...args,
27912
- (err, res) => err != null ? reject(err) : resolve(res)
27913
- );
28240
+ args.push((err, res) => err != null ? reject(err) : resolve(res));
28241
+ fn.apply(this, args);
27914
28242
  });
27915
28243
  }
27916
28244
  }, "name", { value: fn.name });
@@ -27920,8 +28248,10 @@ var require_universalify = __commonJS({
27920
28248
  const cb = args[args.length - 1];
27921
28249
  if (typeof cb !== "function")
27922
28250
  return fn.apply(this, args);
27923
- else
27924
- fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb);
28251
+ else {
28252
+ args.pop();
28253
+ fn.apply(this, args).then((r) => cb(null, r), cb);
28254
+ }
27925
28255
  }, "name", { value: fn.name });
27926
28256
  };
27927
28257
  }
@@ -28735,9 +29065,9 @@ var require_graceful_fs = __commonJS({
28735
29065
  }
28736
29066
  });
28737
29067
 
28738
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js
29068
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js
28739
29069
  var require_fs2 = __commonJS({
28740
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js"(exports) {
29070
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
28741
29071
  "use strict";
28742
29072
  var u = require_universalify().fromCallback;
28743
29073
  var fs = require_graceful_fs();
@@ -28851,9 +29181,9 @@ var require_fs2 = __commonJS({
28851
29181
  }
28852
29182
  });
28853
29183
 
28854
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js
29184
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js
28855
29185
  var require_utils2 = __commonJS({
28856
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module2) {
29186
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module2) {
28857
29187
  "use strict";
28858
29188
  var path2 = require("path");
28859
29189
  module2.exports.checkPath = function checkPath(pth) {
@@ -28869,9 +29199,9 @@ var require_utils2 = __commonJS({
28869
29199
  }
28870
29200
  });
28871
29201
 
28872
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js
29202
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js
28873
29203
  var require_make_dir = __commonJS({
28874
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module2) {
29204
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module2) {
28875
29205
  "use strict";
28876
29206
  var fs = require_fs2();
28877
29207
  var { checkPath } = require_utils2();
@@ -28898,9 +29228,9 @@ var require_make_dir = __commonJS({
28898
29228
  }
28899
29229
  });
28900
29230
 
28901
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js
29231
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js
28902
29232
  var require_mkdirs = __commonJS({
28903
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module2) {
29233
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module2) {
28904
29234
  "use strict";
28905
29235
  var u = require_universalify().fromPromise;
28906
29236
  var { makeDir: _makeDir, makeDirSync } = require_make_dir();
@@ -28917,9 +29247,9 @@ var require_mkdirs = __commonJS({
28917
29247
  }
28918
29248
  });
28919
29249
 
28920
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js
29250
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js
28921
29251
  var require_path_exists = __commonJS({
28922
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) {
29252
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) {
28923
29253
  "use strict";
28924
29254
  var u = require_universalify().fromPromise;
28925
29255
  var fs = require_fs2();
@@ -28933,22 +29263,27 @@ var require_path_exists = __commonJS({
28933
29263
  }
28934
29264
  });
28935
29265
 
28936
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js
29266
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js
28937
29267
  var require_utimes = __commonJS({
28938
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) {
29268
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) {
28939
29269
  "use strict";
28940
- var fs = require_graceful_fs();
28941
- function utimesMillis(path2, atime, mtime, callback) {
28942
- fs.open(path2, "r+", (err, fd) => {
28943
- if (err)
28944
- return callback(err);
28945
- fs.futimes(fd, atime, mtime, (futimesErr) => {
28946
- fs.close(fd, (closeErr) => {
28947
- if (callback)
28948
- callback(futimesErr || closeErr);
28949
- });
28950
- });
28951
- });
29270
+ var fs = require_fs2();
29271
+ var u = require_universalify().fromPromise;
29272
+ async function utimesMillis(path2, atime, mtime) {
29273
+ const fd = await fs.open(path2, "r+");
29274
+ let closeErr = null;
29275
+ try {
29276
+ await fs.futimes(fd, atime, mtime);
29277
+ } finally {
29278
+ try {
29279
+ await fs.close(fd);
29280
+ } catch (e) {
29281
+ closeErr = e;
29282
+ }
29283
+ }
29284
+ if (closeErr) {
29285
+ throw closeErr;
29286
+ }
28952
29287
  }
28953
29288
  function utimesMillisSync(path2, atime, mtime) {
28954
29289
  const fd = fs.openSync(path2, "r+");
@@ -28956,19 +29291,19 @@ var require_utimes = __commonJS({
28956
29291
  return fs.closeSync(fd);
28957
29292
  }
28958
29293
  module2.exports = {
28959
- utimesMillis,
29294
+ utimesMillis: u(utimesMillis),
28960
29295
  utimesMillisSync
28961
29296
  };
28962
29297
  }
28963
29298
  });
28964
29299
 
28965
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js
29300
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js
28966
29301
  var require_stat = __commonJS({
28967
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js"(exports, module2) {
29302
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js"(exports, module2) {
28968
29303
  "use strict";
28969
29304
  var fs = require_fs2();
28970
29305
  var path2 = require("path");
28971
- var util2 = require("util");
29306
+ var u = require_universalify().fromPromise;
28972
29307
  function getStats(src, dest, opts) {
28973
29308
  const statFunc = opts.dereference ? (file) => fs.stat(file, { bigint: true }) : (file) => fs.lstat(file, { bigint: true });
28974
29309
  return Promise.all([
@@ -28993,32 +29328,28 @@ var require_stat = __commonJS({
28993
29328
  }
28994
29329
  return { srcStat, destStat };
28995
29330
  }
28996
- function checkPaths(src, dest, funcName, opts, cb) {
28997
- util2.callbackify(getStats)(src, dest, opts, (err, stats) => {
28998
- if (err)
28999
- return cb(err);
29000
- const { srcStat, destStat } = stats;
29001
- if (destStat) {
29002
- if (areIdentical(srcStat, destStat)) {
29003
- const srcBaseName = path2.basename(src);
29004
- const destBaseName = path2.basename(dest);
29005
- if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
29006
- return cb(null, { srcStat, destStat, isChangingCase: true });
29007
- }
29008
- return cb(new Error("Source and destination must not be the same."));
29009
- }
29010
- if (srcStat.isDirectory() && !destStat.isDirectory()) {
29011
- return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`));
29012
- }
29013
- if (!srcStat.isDirectory() && destStat.isDirectory()) {
29014
- return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`));
29331
+ async function checkPaths(src, dest, funcName, opts) {
29332
+ const { srcStat, destStat } = await getStats(src, dest, opts);
29333
+ if (destStat) {
29334
+ if (areIdentical(srcStat, destStat)) {
29335
+ const srcBaseName = path2.basename(src);
29336
+ const destBaseName = path2.basename(dest);
29337
+ if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
29338
+ return { srcStat, destStat, isChangingCase: true };
29015
29339
  }
29340
+ throw new Error("Source and destination must not be the same.");
29016
29341
  }
29017
- if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
29018
- return cb(new Error(errMsg(src, dest, funcName)));
29342
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
29343
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
29019
29344
  }
29020
- return cb(null, { srcStat, destStat });
29021
- });
29345
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
29346
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
29347
+ }
29348
+ }
29349
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
29350
+ throw new Error(errMsg(src, dest, funcName));
29351
+ }
29352
+ return { srcStat, destStat };
29022
29353
  }
29023
29354
  function checkPathsSync(src, dest, funcName, opts) {
29024
29355
  const { srcStat, destStat } = getStatsSync(src, dest, opts);
@@ -29043,22 +29374,23 @@ var require_stat = __commonJS({
29043
29374
  }
29044
29375
  return { srcStat, destStat };
29045
29376
  }
29046
- function checkParentPaths(src, srcStat, dest, funcName, cb) {
29377
+ async function checkParentPaths(src, srcStat, dest, funcName) {
29047
29378
  const srcParent = path2.resolve(path2.dirname(src));
29048
29379
  const destParent = path2.resolve(path2.dirname(dest));
29049
29380
  if (destParent === srcParent || destParent === path2.parse(destParent).root)
29050
- return cb();
29051
- fs.stat(destParent, { bigint: true }, (err, destStat) => {
29052
- if (err) {
29053
- if (err.code === "ENOENT")
29054
- return cb();
29055
- return cb(err);
29056
- }
29057
- if (areIdentical(srcStat, destStat)) {
29058
- return cb(new Error(errMsg(src, dest, funcName)));
29059
- }
29060
- return checkParentPaths(src, srcStat, destParent, funcName, cb);
29061
- });
29381
+ return;
29382
+ let destStat;
29383
+ try {
29384
+ destStat = await fs.stat(destParent, { bigint: true });
29385
+ } catch (err) {
29386
+ if (err.code === "ENOENT")
29387
+ return;
29388
+ throw err;
29389
+ }
29390
+ if (areIdentical(srcStat, destStat)) {
29391
+ throw new Error(errMsg(src, dest, funcName));
29392
+ }
29393
+ return checkParentPaths(src, srcStat, destParent, funcName);
29062
29394
  }
29063
29395
  function checkParentPathsSync(src, srcStat, dest, funcName) {
29064
29396
  const srcParent = path2.resolve(path2.dirname(src));
@@ -29084,42 +29416,39 @@ var require_stat = __commonJS({
29084
29416
  function isSrcSubdir(src, dest) {
29085
29417
  const srcArr = path2.resolve(src).split(path2.sep).filter((i) => i);
29086
29418
  const destArr = path2.resolve(dest).split(path2.sep).filter((i) => i);
29087
- return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true);
29419
+ return srcArr.every((cur, i) => destArr[i] === cur);
29088
29420
  }
29089
29421
  function errMsg(src, dest, funcName) {
29090
29422
  return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
29091
29423
  }
29092
29424
  module2.exports = {
29093
- checkPaths,
29425
+ // checkPaths
29426
+ checkPaths: u(checkPaths),
29094
29427
  checkPathsSync,
29095
- checkParentPaths,
29428
+ // checkParent
29429
+ checkParentPaths: u(checkParentPaths),
29096
29430
  checkParentPathsSync,
29431
+ // Misc
29097
29432
  isSrcSubdir,
29098
29433
  areIdentical
29099
29434
  };
29100
29435
  }
29101
29436
  });
29102
29437
 
29103
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js
29438
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js
29104
29439
  var require_copy = __commonJS({
29105
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) {
29440
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) {
29106
29441
  "use strict";
29107
- var fs = require_graceful_fs();
29442
+ var fs = require_fs2();
29108
29443
  var path2 = require("path");
29109
- var mkdirs = require_mkdirs().mkdirs;
29110
- var pathExists = require_path_exists().pathExists;
29111
- var utimesMillis = require_utimes().utimesMillis;
29444
+ var { mkdirs } = require_mkdirs();
29445
+ var { pathExists } = require_path_exists();
29446
+ var { utimesMillis } = require_utimes();
29112
29447
  var stat = require_stat();
29113
- function copy(src, dest, opts, cb) {
29114
- if (typeof opts === "function" && !cb) {
29115
- cb = opts;
29116
- opts = {};
29117
- } else if (typeof opts === "function") {
29448
+ async function copy(src, dest, opts = {}) {
29449
+ if (typeof opts === "function") {
29118
29450
  opts = { filter: opts };
29119
29451
  }
29120
- cb = cb || function() {
29121
- };
29122
- opts = opts || {};
29123
29452
  opts.clobber = "clobber" in opts ? !!opts.clobber : true;
29124
29453
  opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
29125
29454
  if (opts.preserveTimestamps && process.arch === "ia32") {
@@ -29129,212 +29458,119 @@ var require_copy = __commonJS({
29129
29458
  "fs-extra-WARN0001"
29130
29459
  );
29131
29460
  }
29132
- stat.checkPaths(src, dest, "copy", opts, (err, stats) => {
29133
- if (err)
29134
- return cb(err);
29135
- const { srcStat, destStat } = stats;
29136
- stat.checkParentPaths(src, srcStat, dest, "copy", (err2) => {
29137
- if (err2)
29138
- return cb(err2);
29139
- runFilter(src, dest, opts, (err3, include) => {
29140
- if (err3)
29141
- return cb(err3);
29142
- if (!include)
29143
- return cb();
29144
- checkParentDir(destStat, src, dest, opts, cb);
29145
- });
29146
- });
29147
- });
29148
- }
29149
- function checkParentDir(destStat, src, dest, opts, cb) {
29461
+ const { srcStat, destStat } = await stat.checkPaths(src, dest, "copy", opts);
29462
+ await stat.checkParentPaths(src, srcStat, dest, "copy");
29463
+ const include = await runFilter(src, dest, opts);
29464
+ if (!include)
29465
+ return;
29150
29466
  const destParent = path2.dirname(dest);
29151
- pathExists(destParent, (err, dirExists) => {
29152
- if (err)
29153
- return cb(err);
29154
- if (dirExists)
29155
- return getStats(destStat, src, dest, opts, cb);
29156
- mkdirs(destParent, (err2) => {
29157
- if (err2)
29158
- return cb(err2);
29159
- return getStats(destStat, src, dest, opts, cb);
29160
- });
29161
- });
29467
+ const dirExists = await pathExists(destParent);
29468
+ if (!dirExists) {
29469
+ await mkdirs(destParent);
29470
+ }
29471
+ await getStatsAndPerformCopy(destStat, src, dest, opts);
29162
29472
  }
29163
- function runFilter(src, dest, opts, cb) {
29473
+ async function runFilter(src, dest, opts) {
29164
29474
  if (!opts.filter)
29165
- return cb(null, true);
29166
- Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error));
29475
+ return true;
29476
+ return opts.filter(src, dest);
29167
29477
  }
29168
- function getStats(destStat, src, dest, opts, cb) {
29169
- const stat2 = opts.dereference ? fs.stat : fs.lstat;
29170
- stat2(src, (err, srcStat) => {
29171
- if (err)
29172
- return cb(err);
29173
- if (srcStat.isDirectory())
29174
- return onDir(srcStat, destStat, src, dest, opts, cb);
29175
- else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
29176
- return onFile(srcStat, destStat, src, dest, opts, cb);
29177
- else if (srcStat.isSymbolicLink())
29178
- return onLink(destStat, src, dest, opts, cb);
29179
- else if (srcStat.isSocket())
29180
- return cb(new Error(`Cannot copy a socket file: ${src}`));
29181
- else if (srcStat.isFIFO())
29182
- return cb(new Error(`Cannot copy a FIFO pipe: ${src}`));
29183
- return cb(new Error(`Unknown file: ${src}`));
29184
- });
29478
+ async function getStatsAndPerformCopy(destStat, src, dest, opts) {
29479
+ const statFn = opts.dereference ? fs.stat : fs.lstat;
29480
+ const srcStat = await statFn(src);
29481
+ if (srcStat.isDirectory())
29482
+ return onDir(srcStat, destStat, src, dest, opts);
29483
+ if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
29484
+ return onFile(srcStat, destStat, src, dest, opts);
29485
+ if (srcStat.isSymbolicLink())
29486
+ return onLink(destStat, src, dest, opts);
29487
+ if (srcStat.isSocket())
29488
+ throw new Error(`Cannot copy a socket file: ${src}`);
29489
+ if (srcStat.isFIFO())
29490
+ throw new Error(`Cannot copy a FIFO pipe: ${src}`);
29491
+ throw new Error(`Unknown file: ${src}`);
29185
29492
  }
29186
- function onFile(srcStat, destStat, src, dest, opts, cb) {
29493
+ async function onFile(srcStat, destStat, src, dest, opts) {
29187
29494
  if (!destStat)
29188
- return copyFile(srcStat, src, dest, opts, cb);
29189
- return mayCopyFile(srcStat, src, dest, opts, cb);
29190
- }
29191
- function mayCopyFile(srcStat, src, dest, opts, cb) {
29495
+ return copyFile(srcStat, src, dest, opts);
29192
29496
  if (opts.overwrite) {
29193
- fs.unlink(dest, (err) => {
29194
- if (err)
29195
- return cb(err);
29196
- return copyFile(srcStat, src, dest, opts, cb);
29197
- });
29198
- } else if (opts.errorOnExist) {
29199
- return cb(new Error(`'${dest}' already exists`));
29200
- } else
29201
- return cb();
29202
- }
29203
- function copyFile(srcStat, src, dest, opts, cb) {
29204
- fs.copyFile(src, dest, (err) => {
29205
- if (err)
29206
- return cb(err);
29207
- if (opts.preserveTimestamps)
29208
- return handleTimestampsAndMode(srcStat.mode, src, dest, cb);
29209
- return setDestMode(dest, srcStat.mode, cb);
29210
- });
29497
+ await fs.unlink(dest);
29498
+ return copyFile(srcStat, src, dest, opts);
29499
+ }
29500
+ if (opts.errorOnExist) {
29501
+ throw new Error(`'${dest}' already exists`);
29502
+ }
29211
29503
  }
29212
- function handleTimestampsAndMode(srcMode, src, dest, cb) {
29213
- if (fileIsNotWritable(srcMode)) {
29214
- return makeFileWritable(dest, srcMode, (err) => {
29215
- if (err)
29216
- return cb(err);
29217
- return setDestTimestampsAndMode(srcMode, src, dest, cb);
29218
- });
29504
+ async function copyFile(srcStat, src, dest, opts) {
29505
+ await fs.copyFile(src, dest);
29506
+ if (opts.preserveTimestamps) {
29507
+ if (fileIsNotWritable(srcStat.mode)) {
29508
+ await makeFileWritable(dest, srcStat.mode);
29509
+ }
29510
+ const updatedSrcStat = await fs.stat(src);
29511
+ await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
29219
29512
  }
29220
- return setDestTimestampsAndMode(srcMode, src, dest, cb);
29513
+ return fs.chmod(dest, srcStat.mode);
29221
29514
  }
29222
29515
  function fileIsNotWritable(srcMode) {
29223
29516
  return (srcMode & 128) === 0;
29224
29517
  }
29225
- function makeFileWritable(dest, srcMode, cb) {
29226
- return setDestMode(dest, srcMode | 128, cb);
29227
- }
29228
- function setDestTimestampsAndMode(srcMode, src, dest, cb) {
29229
- setDestTimestamps(src, dest, (err) => {
29230
- if (err)
29231
- return cb(err);
29232
- return setDestMode(dest, srcMode, cb);
29233
- });
29234
- }
29235
- function setDestMode(dest, srcMode, cb) {
29236
- return fs.chmod(dest, srcMode, cb);
29237
- }
29238
- function setDestTimestamps(src, dest, cb) {
29239
- fs.stat(src, (err, updatedSrcStat) => {
29240
- if (err)
29241
- return cb(err);
29242
- return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb);
29243
- });
29244
- }
29245
- function onDir(srcStat, destStat, src, dest, opts, cb) {
29246
- if (!destStat)
29247
- return mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
29248
- return copyDir(src, dest, opts, cb);
29249
- }
29250
- function mkDirAndCopy(srcMode, src, dest, opts, cb) {
29251
- fs.mkdir(dest, (err) => {
29252
- if (err)
29253
- return cb(err);
29254
- copyDir(src, dest, opts, (err2) => {
29255
- if (err2)
29256
- return cb(err2);
29257
- return setDestMode(dest, srcMode, cb);
29258
- });
29259
- });
29260
- }
29261
- function copyDir(src, dest, opts, cb) {
29262
- fs.readdir(src, (err, items) => {
29263
- if (err)
29264
- return cb(err);
29265
- return copyDirItems(items, src, dest, opts, cb);
29266
- });
29267
- }
29268
- function copyDirItems(items, src, dest, opts, cb) {
29269
- const item = items.pop();
29270
- if (!item)
29271
- return cb();
29272
- return copyDirItem(items, item, src, dest, opts, cb);
29518
+ function makeFileWritable(dest, srcMode) {
29519
+ return fs.chmod(dest, srcMode | 128);
29273
29520
  }
29274
- function copyDirItem(items, item, src, dest, opts, cb) {
29275
- const srcItem = path2.join(src, item);
29276
- const destItem = path2.join(dest, item);
29277
- runFilter(srcItem, destItem, opts, (err, include) => {
29278
- if (err)
29279
- return cb(err);
29521
+ async function onDir(srcStat, destStat, src, dest, opts) {
29522
+ if (!destStat) {
29523
+ await fs.mkdir(dest);
29524
+ }
29525
+ const items = await fs.readdir(src);
29526
+ await Promise.all(items.map(async (item) => {
29527
+ const srcItem = path2.join(src, item);
29528
+ const destItem = path2.join(dest, item);
29529
+ const include = await runFilter(srcItem, destItem, opts);
29280
29530
  if (!include)
29281
- return copyDirItems(items, src, dest, opts, cb);
29282
- stat.checkPaths(srcItem, destItem, "copy", opts, (err2, stats) => {
29283
- if (err2)
29284
- return cb(err2);
29285
- const { destStat } = stats;
29286
- getStats(destStat, srcItem, destItem, opts, (err3) => {
29287
- if (err3)
29288
- return cb(err3);
29289
- return copyDirItems(items, src, dest, opts, cb);
29290
- });
29291
- });
29292
- });
29293
- }
29294
- function onLink(destStat, src, dest, opts, cb) {
29295
- fs.readlink(src, (err, resolvedSrc) => {
29296
- if (err)
29297
- return cb(err);
29298
- if (opts.dereference) {
29299
- resolvedSrc = path2.resolve(process.cwd(), resolvedSrc);
29300
- }
29301
- if (!destStat) {
29302
- return fs.symlink(resolvedSrc, dest, cb);
29303
- } else {
29304
- fs.readlink(dest, (err2, resolvedDest) => {
29305
- if (err2) {
29306
- if (err2.code === "EINVAL" || err2.code === "UNKNOWN")
29307
- return fs.symlink(resolvedSrc, dest, cb);
29308
- return cb(err2);
29309
- }
29310
- if (opts.dereference) {
29311
- resolvedDest = path2.resolve(process.cwd(), resolvedDest);
29312
- }
29313
- if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
29314
- return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
29315
- }
29316
- if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
29317
- return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
29318
- }
29319
- return copyLink(resolvedSrc, dest, cb);
29320
- });
29321
- }
29322
- });
29531
+ return;
29532
+ const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
29533
+ return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
29534
+ }));
29535
+ if (!destStat) {
29536
+ await fs.chmod(dest, srcStat.mode);
29537
+ }
29323
29538
  }
29324
- function copyLink(resolvedSrc, dest, cb) {
29325
- fs.unlink(dest, (err) => {
29326
- if (err)
29327
- return cb(err);
29328
- return fs.symlink(resolvedSrc, dest, cb);
29329
- });
29539
+ async function onLink(destStat, src, dest, opts) {
29540
+ let resolvedSrc = await fs.readlink(src);
29541
+ if (opts.dereference) {
29542
+ resolvedSrc = path2.resolve(process.cwd(), resolvedSrc);
29543
+ }
29544
+ if (!destStat) {
29545
+ return fs.symlink(resolvedSrc, dest);
29546
+ }
29547
+ let resolvedDest = null;
29548
+ try {
29549
+ resolvedDest = await fs.readlink(dest);
29550
+ } catch (e) {
29551
+ if (e.code === "EINVAL" || e.code === "UNKNOWN")
29552
+ return fs.symlink(resolvedSrc, dest);
29553
+ throw e;
29554
+ }
29555
+ if (opts.dereference) {
29556
+ resolvedDest = path2.resolve(process.cwd(), resolvedDest);
29557
+ }
29558
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
29559
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
29560
+ }
29561
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
29562
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
29563
+ }
29564
+ await fs.unlink(dest);
29565
+ return fs.symlink(resolvedSrc, dest);
29330
29566
  }
29331
29567
  module2.exports = copy;
29332
29568
  }
29333
29569
  });
29334
29570
 
29335
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js
29571
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js
29336
29572
  var require_copy_sync = __commonJS({
29337
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module2) {
29573
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module2) {
29338
29574
  "use strict";
29339
29575
  var fs = require_graceful_fs();
29340
29576
  var path2 = require("path");
@@ -29473,11 +29709,11 @@ var require_copy_sync = __commonJS({
29473
29709
  }
29474
29710
  });
29475
29711
 
29476
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js
29712
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js
29477
29713
  var require_copy2 = __commonJS({
29478
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js"(exports, module2) {
29714
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js"(exports, module2) {
29479
29715
  "use strict";
29480
- var u = require_universalify().fromCallback;
29716
+ var u = require_universalify().fromPromise;
29481
29717
  module2.exports = {
29482
29718
  copy: u(require_copy()),
29483
29719
  copySync: require_copy_sync()
@@ -29485,9 +29721,9 @@ var require_copy2 = __commonJS({
29485
29721
  }
29486
29722
  });
29487
29723
 
29488
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js
29724
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js
29489
29725
  var require_remove = __commonJS({
29490
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js"(exports, module2) {
29726
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js"(exports, module2) {
29491
29727
  "use strict";
29492
29728
  var fs = require_graceful_fs();
29493
29729
  var u = require_universalify().fromCallback;
@@ -29504,9 +29740,9 @@ var require_remove = __commonJS({
29504
29740
  }
29505
29741
  });
29506
29742
 
29507
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js
29743
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js
29508
29744
  var require_empty2 = __commonJS({
29509
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js"(exports, module2) {
29745
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js"(exports, module2) {
29510
29746
  "use strict";
29511
29747
  var u = require_universalify().fromPromise;
29512
29748
  var fs = require_fs2();
@@ -29543,47 +29779,40 @@ var require_empty2 = __commonJS({
29543
29779
  }
29544
29780
  });
29545
29781
 
29546
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js
29782
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js
29547
29783
  var require_file = __commonJS({
29548
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) {
29784
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) {
29549
29785
  "use strict";
29550
- var u = require_universalify().fromCallback;
29786
+ var u = require_universalify().fromPromise;
29551
29787
  var path2 = require("path");
29552
- var fs = require_graceful_fs();
29788
+ var fs = require_fs2();
29553
29789
  var mkdir = require_mkdirs();
29554
- function createFile(file, callback) {
29555
- function makeFile() {
29556
- fs.writeFile(file, "", (err) => {
29557
- if (err)
29558
- return callback(err);
29559
- callback();
29560
- });
29790
+ async function createFile(file) {
29791
+ let stats;
29792
+ try {
29793
+ stats = await fs.stat(file);
29794
+ } catch {
29795
+ }
29796
+ if (stats && stats.isFile())
29797
+ return;
29798
+ const dir = path2.dirname(file);
29799
+ let dirStats = null;
29800
+ try {
29801
+ dirStats = await fs.stat(dir);
29802
+ } catch (err) {
29803
+ if (err.code === "ENOENT") {
29804
+ await mkdir.mkdirs(dir);
29805
+ await fs.writeFile(file, "");
29806
+ return;
29807
+ } else {
29808
+ throw err;
29809
+ }
29810
+ }
29811
+ if (dirStats.isDirectory()) {
29812
+ await fs.writeFile(file, "");
29813
+ } else {
29814
+ await fs.readdir(dir);
29561
29815
  }
29562
- fs.stat(file, (err, stats) => {
29563
- if (!err && stats.isFile())
29564
- return callback();
29565
- const dir = path2.dirname(file);
29566
- fs.stat(dir, (err2, stats2) => {
29567
- if (err2) {
29568
- if (err2.code === "ENOENT") {
29569
- return mkdir.mkdirs(dir, (err3) => {
29570
- if (err3)
29571
- return callback(err3);
29572
- makeFile();
29573
- });
29574
- }
29575
- return callback(err2);
29576
- }
29577
- if (stats2.isDirectory())
29578
- makeFile();
29579
- else {
29580
- fs.readdir(dir, (err3) => {
29581
- if (err3)
29582
- return callback(err3);
29583
- });
29584
- }
29585
- });
29586
- });
29587
29816
  }
29588
29817
  function createFileSync(file) {
29589
29818
  let stats;
@@ -29613,46 +29842,37 @@ var require_file = __commonJS({
29613
29842
  }
29614
29843
  });
29615
29844
 
29616
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js
29845
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js
29617
29846
  var require_link = __commonJS({
29618
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) {
29847
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) {
29619
29848
  "use strict";
29620
- var u = require_universalify().fromCallback;
29849
+ var u = require_universalify().fromPromise;
29621
29850
  var path2 = require("path");
29622
- var fs = require_graceful_fs();
29851
+ var fs = require_fs2();
29623
29852
  var mkdir = require_mkdirs();
29624
- var pathExists = require_path_exists().pathExists;
29853
+ var { pathExists } = require_path_exists();
29625
29854
  var { areIdentical } = require_stat();
29626
- function createLink(srcpath, dstpath, callback) {
29627
- function makeLink(srcpath2, dstpath2) {
29628
- fs.link(srcpath2, dstpath2, (err) => {
29629
- if (err)
29630
- return callback(err);
29631
- callback(null);
29632
- });
29855
+ async function createLink(srcpath, dstpath) {
29856
+ let dstStat;
29857
+ try {
29858
+ dstStat = await fs.lstat(dstpath);
29859
+ } catch {
29633
29860
  }
29634
- fs.lstat(dstpath, (_, dstStat) => {
29635
- fs.lstat(srcpath, (err, srcStat) => {
29636
- if (err) {
29637
- err.message = err.message.replace("lstat", "ensureLink");
29638
- return callback(err);
29639
- }
29640
- if (dstStat && areIdentical(srcStat, dstStat))
29641
- return callback(null);
29642
- const dir = path2.dirname(dstpath);
29643
- pathExists(dir, (err2, dirExists) => {
29644
- if (err2)
29645
- return callback(err2);
29646
- if (dirExists)
29647
- return makeLink(srcpath, dstpath);
29648
- mkdir.mkdirs(dir, (err3) => {
29649
- if (err3)
29650
- return callback(err3);
29651
- makeLink(srcpath, dstpath);
29652
- });
29653
- });
29654
- });
29655
- });
29861
+ let srcStat;
29862
+ try {
29863
+ srcStat = await fs.lstat(srcpath);
29864
+ } catch (err) {
29865
+ err.message = err.message.replace("lstat", "ensureLink");
29866
+ throw err;
29867
+ }
29868
+ if (dstStat && areIdentical(srcStat, dstStat))
29869
+ return;
29870
+ const dir = path2.dirname(dstpath);
29871
+ const dirExists = await pathExists(dir);
29872
+ if (!dirExists) {
29873
+ await mkdir.mkdirs(dir);
29874
+ }
29875
+ await fs.link(srcpath, dstpath);
29656
29876
  }
29657
29877
  function createLinkSync(srcpath, dstpath) {
29658
29878
  let dstStat;
@@ -29682,109 +29902,102 @@ var require_link = __commonJS({
29682
29902
  }
29683
29903
  });
29684
29904
 
29685
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js
29905
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js
29686
29906
  var require_symlink_paths = __commonJS({
29687
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) {
29907
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) {
29688
29908
  "use strict";
29689
29909
  var path2 = require("path");
29690
- var fs = require_graceful_fs();
29691
- var pathExists = require_path_exists().pathExists;
29692
- function symlinkPaths(srcpath, dstpath, callback) {
29910
+ var fs = require_fs2();
29911
+ var { pathExists } = require_path_exists();
29912
+ var u = require_universalify().fromPromise;
29913
+ async function symlinkPaths(srcpath, dstpath) {
29693
29914
  if (path2.isAbsolute(srcpath)) {
29694
- return fs.lstat(srcpath, (err) => {
29695
- if (err) {
29696
- err.message = err.message.replace("lstat", "ensureSymlink");
29697
- return callback(err);
29698
- }
29699
- return callback(null, {
29700
- toCwd: srcpath,
29701
- toDst: srcpath
29702
- });
29703
- });
29704
- } else {
29705
- const dstdir = path2.dirname(dstpath);
29706
- const relativeToDst = path2.join(dstdir, srcpath);
29707
- return pathExists(relativeToDst, (err, exists) => {
29708
- if (err)
29709
- return callback(err);
29710
- if (exists) {
29711
- return callback(null, {
29712
- toCwd: relativeToDst,
29713
- toDst: srcpath
29714
- });
29715
- } else {
29716
- return fs.lstat(srcpath, (err2) => {
29717
- if (err2) {
29718
- err2.message = err2.message.replace("lstat", "ensureSymlink");
29719
- return callback(err2);
29720
- }
29721
- return callback(null, {
29722
- toCwd: srcpath,
29723
- toDst: path2.relative(dstdir, srcpath)
29724
- });
29725
- });
29726
- }
29727
- });
29915
+ try {
29916
+ await fs.lstat(srcpath);
29917
+ } catch (err) {
29918
+ err.message = err.message.replace("lstat", "ensureSymlink");
29919
+ throw err;
29920
+ }
29921
+ return {
29922
+ toCwd: srcpath,
29923
+ toDst: srcpath
29924
+ };
29925
+ }
29926
+ const dstdir = path2.dirname(dstpath);
29927
+ const relativeToDst = path2.join(dstdir, srcpath);
29928
+ const exists = await pathExists(relativeToDst);
29929
+ if (exists) {
29930
+ return {
29931
+ toCwd: relativeToDst,
29932
+ toDst: srcpath
29933
+ };
29728
29934
  }
29935
+ try {
29936
+ await fs.lstat(srcpath);
29937
+ } catch (err) {
29938
+ err.message = err.message.replace("lstat", "ensureSymlink");
29939
+ throw err;
29940
+ }
29941
+ return {
29942
+ toCwd: srcpath,
29943
+ toDst: path2.relative(dstdir, srcpath)
29944
+ };
29729
29945
  }
29730
29946
  function symlinkPathsSync(srcpath, dstpath) {
29731
- let exists;
29732
29947
  if (path2.isAbsolute(srcpath)) {
29733
- exists = fs.existsSync(srcpath);
29734
- if (!exists)
29948
+ const exists2 = fs.existsSync(srcpath);
29949
+ if (!exists2)
29735
29950
  throw new Error("absolute srcpath does not exist");
29736
29951
  return {
29737
29952
  toCwd: srcpath,
29738
29953
  toDst: srcpath
29739
29954
  };
29740
- } else {
29741
- const dstdir = path2.dirname(dstpath);
29742
- const relativeToDst = path2.join(dstdir, srcpath);
29743
- exists = fs.existsSync(relativeToDst);
29744
- if (exists) {
29745
- return {
29746
- toCwd: relativeToDst,
29747
- toDst: srcpath
29748
- };
29749
- } else {
29750
- exists = fs.existsSync(srcpath);
29751
- if (!exists)
29752
- throw new Error("relative srcpath does not exist");
29753
- return {
29754
- toCwd: srcpath,
29755
- toDst: path2.relative(dstdir, srcpath)
29756
- };
29757
- }
29758
29955
  }
29956
+ const dstdir = path2.dirname(dstpath);
29957
+ const relativeToDst = path2.join(dstdir, srcpath);
29958
+ const exists = fs.existsSync(relativeToDst);
29959
+ if (exists) {
29960
+ return {
29961
+ toCwd: relativeToDst,
29962
+ toDst: srcpath
29963
+ };
29964
+ }
29965
+ const srcExists = fs.existsSync(srcpath);
29966
+ if (!srcExists)
29967
+ throw new Error("relative srcpath does not exist");
29968
+ return {
29969
+ toCwd: srcpath,
29970
+ toDst: path2.relative(dstdir, srcpath)
29971
+ };
29759
29972
  }
29760
29973
  module2.exports = {
29761
- symlinkPaths,
29974
+ symlinkPaths: u(symlinkPaths),
29762
29975
  symlinkPathsSync
29763
29976
  };
29764
29977
  }
29765
29978
  });
29766
29979
 
29767
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js
29980
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js
29768
29981
  var require_symlink_type = __commonJS({
29769
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) {
29982
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) {
29770
29983
  "use strict";
29771
- var fs = require_graceful_fs();
29772
- function symlinkType(srcpath, type, callback) {
29773
- callback = typeof type === "function" ? type : callback;
29774
- type = typeof type === "function" ? false : type;
29984
+ var fs = require_fs2();
29985
+ var u = require_universalify().fromPromise;
29986
+ async function symlinkType(srcpath, type) {
29775
29987
  if (type)
29776
- return callback(null, type);
29777
- fs.lstat(srcpath, (err, stats) => {
29778
- if (err)
29779
- return callback(null, "file");
29780
- type = stats && stats.isDirectory() ? "dir" : "file";
29781
- callback(null, type);
29782
- });
29988
+ return type;
29989
+ let stats;
29990
+ try {
29991
+ stats = await fs.lstat(srcpath);
29992
+ } catch {
29993
+ return "file";
29994
+ }
29995
+ return stats && stats.isDirectory() ? "dir" : "file";
29783
29996
  }
29784
29997
  function symlinkTypeSync(srcpath, type) {
29785
- let stats;
29786
29998
  if (type)
29787
29999
  return type;
30000
+ let stats;
29788
30001
  try {
29789
30002
  stats = fs.lstatSync(srcpath);
29790
30003
  } catch {
@@ -29793,69 +30006,46 @@ var require_symlink_type = __commonJS({
29793
30006
  return stats && stats.isDirectory() ? "dir" : "file";
29794
30007
  }
29795
30008
  module2.exports = {
29796
- symlinkType,
30009
+ symlinkType: u(symlinkType),
29797
30010
  symlinkTypeSync
29798
30011
  };
29799
30012
  }
29800
30013
  });
29801
30014
 
29802
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js
30015
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js
29803
30016
  var require_symlink = __commonJS({
29804
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) {
30017
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) {
29805
30018
  "use strict";
29806
- var u = require_universalify().fromCallback;
30019
+ var u = require_universalify().fromPromise;
29807
30020
  var path2 = require("path");
29808
30021
  var fs = require_fs2();
29809
- var _mkdirs = require_mkdirs();
29810
- var mkdirs = _mkdirs.mkdirs;
29811
- var mkdirsSync = _mkdirs.mkdirsSync;
29812
- var _symlinkPaths = require_symlink_paths();
29813
- var symlinkPaths = _symlinkPaths.symlinkPaths;
29814
- var symlinkPathsSync = _symlinkPaths.symlinkPathsSync;
29815
- var _symlinkType = require_symlink_type();
29816
- var symlinkType = _symlinkType.symlinkType;
29817
- var symlinkTypeSync = _symlinkType.symlinkTypeSync;
29818
- var pathExists = require_path_exists().pathExists;
30022
+ var { mkdirs, mkdirsSync } = require_mkdirs();
30023
+ var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
30024
+ var { symlinkType, symlinkTypeSync } = require_symlink_type();
30025
+ var { pathExists } = require_path_exists();
29819
30026
  var { areIdentical } = require_stat();
29820
- function createSymlink(srcpath, dstpath, type, callback) {
29821
- callback = typeof type === "function" ? type : callback;
29822
- type = typeof type === "function" ? false : type;
29823
- fs.lstat(dstpath, (err, stats) => {
29824
- if (!err && stats.isSymbolicLink()) {
29825
- Promise.all([
29826
- fs.stat(srcpath),
29827
- fs.stat(dstpath)
29828
- ]).then(([srcStat, dstStat]) => {
29829
- if (areIdentical(srcStat, dstStat))
29830
- return callback(null);
29831
- _createSymlink(srcpath, dstpath, type, callback);
29832
- });
29833
- } else
29834
- _createSymlink(srcpath, dstpath, type, callback);
29835
- });
29836
- }
29837
- function _createSymlink(srcpath, dstpath, type, callback) {
29838
- symlinkPaths(srcpath, dstpath, (err, relative) => {
29839
- if (err)
29840
- return callback(err);
29841
- srcpath = relative.toDst;
29842
- symlinkType(relative.toCwd, type, (err2, type2) => {
29843
- if (err2)
29844
- return callback(err2);
29845
- const dir = path2.dirname(dstpath);
29846
- pathExists(dir, (err3, dirExists) => {
29847
- if (err3)
29848
- return callback(err3);
29849
- if (dirExists)
29850
- return fs.symlink(srcpath, dstpath, type2, callback);
29851
- mkdirs(dir, (err4) => {
29852
- if (err4)
29853
- return callback(err4);
29854
- fs.symlink(srcpath, dstpath, type2, callback);
29855
- });
29856
- });
29857
- });
29858
- });
30027
+ async function createSymlink(srcpath, dstpath, type) {
30028
+ let stats;
30029
+ try {
30030
+ stats = await fs.lstat(dstpath);
30031
+ } catch {
30032
+ }
30033
+ if (stats && stats.isSymbolicLink()) {
30034
+ const [srcStat, dstStat] = await Promise.all([
30035
+ fs.stat(srcpath),
30036
+ fs.stat(dstpath)
30037
+ ]);
30038
+ if (areIdentical(srcStat, dstStat))
30039
+ return;
30040
+ }
30041
+ const relative = await symlinkPaths(srcpath, dstpath);
30042
+ srcpath = relative.toDst;
30043
+ const toType = await symlinkType(relative.toCwd, type);
30044
+ const dir = path2.dirname(dstpath);
30045
+ if (!await pathExists(dir)) {
30046
+ await mkdirs(dir);
30047
+ }
30048
+ return fs.symlink(srcpath, dstpath, toType);
29859
30049
  }
29860
30050
  function createSymlinkSync(srcpath, dstpath, type) {
29861
30051
  let stats;
@@ -29886,9 +30076,9 @@ var require_symlink = __commonJS({
29886
30076
  }
29887
30077
  });
29888
30078
 
29889
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js
30079
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js
29890
30080
  var require_ensure = __commonJS({
29891
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) {
30081
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) {
29892
30082
  "use strict";
29893
30083
  var { createFile, createFileSync } = require_file();
29894
30084
  var { createLink, createLinkSync } = require_link();
@@ -29913,6 +30103,37 @@ var require_ensure = __commonJS({
29913
30103
  }
29914
30104
  });
29915
30105
 
30106
+ // node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js
30107
+ var require_universalify2 = __commonJS({
30108
+ "node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
30109
+ "use strict";
30110
+ exports.fromCallback = function(fn) {
30111
+ return Object.defineProperty(function(...args) {
30112
+ if (typeof args[args.length - 1] === "function")
30113
+ fn.apply(this, args);
30114
+ else {
30115
+ return new Promise((resolve, reject) => {
30116
+ fn.call(
30117
+ this,
30118
+ ...args,
30119
+ (err, res) => err != null ? reject(err) : resolve(res)
30120
+ );
30121
+ });
30122
+ }
30123
+ }, "name", { value: fn.name });
30124
+ };
30125
+ exports.fromPromise = function(fn) {
30126
+ return Object.defineProperty(function(...args) {
30127
+ const cb = args[args.length - 1];
30128
+ if (typeof cb !== "function")
30129
+ return fn.apply(this, args);
30130
+ else
30131
+ fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb);
30132
+ }, "name", { value: fn.name });
30133
+ };
30134
+ }
30135
+ });
30136
+
29916
30137
  // node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js
29917
30138
  var require_utils3 = __commonJS({
29918
30139
  "node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module2) {
@@ -29939,7 +30160,7 @@ var require_jsonfile = __commonJS({
29939
30160
  } catch (_) {
29940
30161
  _fs = require("fs");
29941
30162
  }
29942
- var universalify = require_universalify();
30163
+ var universalify = require_universalify2();
29943
30164
  var { stringify, stripBom } = require_utils3();
29944
30165
  async function _readFile(file, options = {}) {
29945
30166
  if (typeof options === "string") {
@@ -30003,9 +30224,9 @@ var require_jsonfile = __commonJS({
30003
30224
  }
30004
30225
  });
30005
30226
 
30006
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js
30227
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js
30007
30228
  var require_jsonfile2 = __commonJS({
30008
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module2) {
30229
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module2) {
30009
30230
  "use strict";
30010
30231
  var jsonFile = require_jsonfile();
30011
30232
  module2.exports = {
@@ -30018,39 +30239,27 @@ var require_jsonfile2 = __commonJS({
30018
30239
  }
30019
30240
  });
30020
30241
 
30021
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js
30242
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js
30022
30243
  var require_output_file = __commonJS({
30023
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js"(exports, module2) {
30244
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module2) {
30024
30245
  "use strict";
30025
- var u = require_universalify().fromCallback;
30026
- var fs = require_graceful_fs();
30246
+ var u = require_universalify().fromPromise;
30247
+ var fs = require_fs2();
30027
30248
  var path2 = require("path");
30028
30249
  var mkdir = require_mkdirs();
30029
30250
  var pathExists = require_path_exists().pathExists;
30030
- function outputFile(file, data, encoding, callback) {
30031
- if (typeof encoding === "function") {
30032
- callback = encoding;
30033
- encoding = "utf8";
30034
- }
30251
+ async function outputFile(file, data, encoding = "utf-8") {
30035
30252
  const dir = path2.dirname(file);
30036
- pathExists(dir, (err, itDoes) => {
30037
- if (err)
30038
- return callback(err);
30039
- if (itDoes)
30040
- return fs.writeFile(file, data, encoding, callback);
30041
- mkdir.mkdirs(dir, (err2) => {
30042
- if (err2)
30043
- return callback(err2);
30044
- fs.writeFile(file, data, encoding, callback);
30045
- });
30046
- });
30253
+ if (!await pathExists(dir)) {
30254
+ await mkdir.mkdirs(dir);
30255
+ }
30256
+ return fs.writeFile(file, data, encoding);
30047
30257
  }
30048
30258
  function outputFileSync(file, ...args) {
30049
30259
  const dir = path2.dirname(file);
30050
- if (fs.existsSync(dir)) {
30051
- return fs.writeFileSync(file, ...args);
30260
+ if (!fs.existsSync(dir)) {
30261
+ mkdir.mkdirsSync(dir);
30052
30262
  }
30053
- mkdir.mkdirsSync(dir);
30054
30263
  fs.writeFileSync(file, ...args);
30055
30264
  }
30056
30265
  module2.exports = {
@@ -30060,9 +30269,9 @@ var require_output_file = __commonJS({
30060
30269
  }
30061
30270
  });
30062
30271
 
30063
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js
30272
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js
30064
30273
  var require_output_json = __commonJS({
30065
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) {
30274
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) {
30066
30275
  "use strict";
30067
30276
  var { stringify } = require_utils3();
30068
30277
  var { outputFile } = require_output_file();
@@ -30074,9 +30283,9 @@ var require_output_json = __commonJS({
30074
30283
  }
30075
30284
  });
30076
30285
 
30077
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js
30286
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js
30078
30287
  var require_output_json_sync = __commonJS({
30079
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) {
30288
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) {
30080
30289
  "use strict";
30081
30290
  var { stringify } = require_utils3();
30082
30291
  var { outputFileSync } = require_output_file();
@@ -30088,9 +30297,9 @@ var require_output_json_sync = __commonJS({
30088
30297
  }
30089
30298
  });
30090
30299
 
30091
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js
30300
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js
30092
30301
  var require_json2 = __commonJS({
30093
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js"(exports, module2) {
30302
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js"(exports, module2) {
30094
30303
  "use strict";
30095
30304
  var u = require_universalify().fromPromise;
30096
30305
  var jsonFile = require_jsonfile2();
@@ -30106,92 +30315,61 @@ var require_json2 = __commonJS({
30106
30315
  }
30107
30316
  });
30108
30317
 
30109
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js
30318
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js
30110
30319
  var require_move = __commonJS({
30111
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js"(exports, module2) {
30320
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js"(exports, module2) {
30112
30321
  "use strict";
30113
- var fs = require_graceful_fs();
30322
+ var fs = require_fs2();
30114
30323
  var path2 = require("path");
30115
- var copy = require_copy2().copy;
30116
- var remove = require_remove().remove;
30117
- var mkdirp = require_mkdirs().mkdirp;
30118
- var pathExists = require_path_exists().pathExists;
30324
+ var { copy } = require_copy2();
30325
+ var { remove } = require_remove();
30326
+ var { mkdirp } = require_mkdirs();
30327
+ var { pathExists } = require_path_exists();
30119
30328
  var stat = require_stat();
30120
- function move(src, dest, opts, cb) {
30121
- if (typeof opts === "function") {
30122
- cb = opts;
30123
- opts = {};
30124
- }
30125
- opts = opts || {};
30329
+ async function move(src, dest, opts = {}) {
30126
30330
  const overwrite = opts.overwrite || opts.clobber || false;
30127
- stat.checkPaths(src, dest, "move", opts, (err, stats) => {
30128
- if (err)
30129
- return cb(err);
30130
- const { srcStat, isChangingCase = false } = stats;
30131
- stat.checkParentPaths(src, srcStat, dest, "move", (err2) => {
30132
- if (err2)
30133
- return cb(err2);
30134
- if (isParentRoot(dest))
30135
- return doRename(src, dest, overwrite, isChangingCase, cb);
30136
- mkdirp(path2.dirname(dest), (err3) => {
30137
- if (err3)
30138
- return cb(err3);
30139
- return doRename(src, dest, overwrite, isChangingCase, cb);
30140
- });
30141
- });
30142
- });
30143
- }
30144
- function isParentRoot(dest) {
30145
- const parent = path2.dirname(dest);
30146
- const parsedPath = path2.parse(parent);
30147
- return parsedPath.root === parent;
30148
- }
30149
- function doRename(src, dest, overwrite, isChangingCase, cb) {
30150
- if (isChangingCase)
30151
- return rename(src, dest, overwrite, cb);
30152
- if (overwrite) {
30153
- return remove(dest, (err) => {
30154
- if (err)
30155
- return cb(err);
30156
- return rename(src, dest, overwrite, cb);
30157
- });
30331
+ const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
30332
+ await stat.checkParentPaths(src, srcStat, dest, "move");
30333
+ const destParent = path2.dirname(dest);
30334
+ const parsedParentPath = path2.parse(destParent);
30335
+ if (parsedParentPath.root !== destParent) {
30336
+ await mkdirp(destParent);
30158
30337
  }
30159
- pathExists(dest, (err, destExists) => {
30160
- if (err)
30161
- return cb(err);
30162
- if (destExists)
30163
- return cb(new Error("dest already exists."));
30164
- return rename(src, dest, overwrite, cb);
30165
- });
30338
+ return doRename(src, dest, overwrite, isChangingCase);
30166
30339
  }
30167
- function rename(src, dest, overwrite, cb) {
30168
- fs.rename(src, dest, (err) => {
30169
- if (!err)
30170
- return cb();
30171
- if (err.code !== "EXDEV")
30172
- return cb(err);
30173
- return moveAcrossDevice(src, dest, overwrite, cb);
30174
- });
30340
+ async function doRename(src, dest, overwrite, isChangingCase) {
30341
+ if (!isChangingCase) {
30342
+ if (overwrite) {
30343
+ await remove(dest);
30344
+ } else if (await pathExists(dest)) {
30345
+ throw new Error("dest already exists.");
30346
+ }
30347
+ }
30348
+ try {
30349
+ await fs.rename(src, dest);
30350
+ } catch (err) {
30351
+ if (err.code !== "EXDEV") {
30352
+ throw err;
30353
+ }
30354
+ await moveAcrossDevice(src, dest, overwrite);
30355
+ }
30175
30356
  }
30176
- function moveAcrossDevice(src, dest, overwrite, cb) {
30357
+ async function moveAcrossDevice(src, dest, overwrite) {
30177
30358
  const opts = {
30178
30359
  overwrite,
30179
30360
  errorOnExist: true,
30180
30361
  preserveTimestamps: true
30181
30362
  };
30182
- copy(src, dest, opts, (err) => {
30183
- if (err)
30184
- return cb(err);
30185
- return remove(src, cb);
30186
- });
30363
+ await copy(src, dest, opts);
30364
+ return remove(src);
30187
30365
  }
30188
30366
  module2.exports = move;
30189
30367
  }
30190
30368
  });
30191
30369
 
30192
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js
30370
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js
30193
30371
  var require_move_sync = __commonJS({
30194
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js"(exports, module2) {
30372
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module2) {
30195
30373
  "use strict";
30196
30374
  var fs = require_graceful_fs();
30197
30375
  var path2 = require("path");
@@ -30246,11 +30424,11 @@ var require_move_sync = __commonJS({
30246
30424
  }
30247
30425
  });
30248
30426
 
30249
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js
30427
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js
30250
30428
  var require_move2 = __commonJS({
30251
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js"(exports, module2) {
30429
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js"(exports, module2) {
30252
30430
  "use strict";
30253
- var u = require_universalify().fromCallback;
30431
+ var u = require_universalify().fromPromise;
30254
30432
  module2.exports = {
30255
30433
  move: u(require_move()),
30256
30434
  moveSync: require_move_sync()
@@ -30258,9 +30436,9 @@ var require_move2 = __commonJS({
30258
30436
  }
30259
30437
  });
30260
30438
 
30261
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js
30439
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js
30262
30440
  var require_lib4 = __commonJS({
30263
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js"(exports, module2) {
30441
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js"(exports, module2) {
30264
30442
  "use strict";
30265
30443
  module2.exports = {
30266
30444
  // Export promiseified graceful-fs:
@@ -46543,6 +46721,1460 @@ export function ${stub2}(...args){return args;}
46543
46721
  }
46544
46722
  });
46545
46723
 
46724
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js
46725
+ var require_fs8 = __commonJS({
46726
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js"(exports) {
46727
+ "use strict";
46728
+ var u = require_universalify2().fromCallback;
46729
+ var fs = require_graceful_fs();
46730
+ var api = [
46731
+ "access",
46732
+ "appendFile",
46733
+ "chmod",
46734
+ "chown",
46735
+ "close",
46736
+ "copyFile",
46737
+ "fchmod",
46738
+ "fchown",
46739
+ "fdatasync",
46740
+ "fstat",
46741
+ "fsync",
46742
+ "ftruncate",
46743
+ "futimes",
46744
+ "lchmod",
46745
+ "lchown",
46746
+ "link",
46747
+ "lstat",
46748
+ "mkdir",
46749
+ "mkdtemp",
46750
+ "open",
46751
+ "opendir",
46752
+ "readdir",
46753
+ "readFile",
46754
+ "readlink",
46755
+ "realpath",
46756
+ "rename",
46757
+ "rm",
46758
+ "rmdir",
46759
+ "stat",
46760
+ "symlink",
46761
+ "truncate",
46762
+ "unlink",
46763
+ "utimes",
46764
+ "writeFile"
46765
+ ].filter((key) => {
46766
+ return typeof fs[key] === "function";
46767
+ });
46768
+ Object.assign(exports, fs);
46769
+ api.forEach((method) => {
46770
+ exports[method] = u(fs[method]);
46771
+ });
46772
+ exports.exists = function(filename, callback) {
46773
+ if (typeof callback === "function") {
46774
+ return fs.exists(filename, callback);
46775
+ }
46776
+ return new Promise((resolve) => {
46777
+ return fs.exists(filename, resolve);
46778
+ });
46779
+ };
46780
+ exports.read = function(fd, buffer, offset, length, position, callback) {
46781
+ if (typeof callback === "function") {
46782
+ return fs.read(fd, buffer, offset, length, position, callback);
46783
+ }
46784
+ return new Promise((resolve, reject) => {
46785
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
46786
+ if (err)
46787
+ return reject(err);
46788
+ resolve({ bytesRead, buffer: buffer2 });
46789
+ });
46790
+ });
46791
+ };
46792
+ exports.write = function(fd, buffer, ...args) {
46793
+ if (typeof args[args.length - 1] === "function") {
46794
+ return fs.write(fd, buffer, ...args);
46795
+ }
46796
+ return new Promise((resolve, reject) => {
46797
+ fs.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
46798
+ if (err)
46799
+ return reject(err);
46800
+ resolve({ bytesWritten, buffer: buffer2 });
46801
+ });
46802
+ });
46803
+ };
46804
+ exports.readv = function(fd, buffers, ...args) {
46805
+ if (typeof args[args.length - 1] === "function") {
46806
+ return fs.readv(fd, buffers, ...args);
46807
+ }
46808
+ return new Promise((resolve, reject) => {
46809
+ fs.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
46810
+ if (err)
46811
+ return reject(err);
46812
+ resolve({ bytesRead, buffers: buffers2 });
46813
+ });
46814
+ });
46815
+ };
46816
+ exports.writev = function(fd, buffers, ...args) {
46817
+ if (typeof args[args.length - 1] === "function") {
46818
+ return fs.writev(fd, buffers, ...args);
46819
+ }
46820
+ return new Promise((resolve, reject) => {
46821
+ fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
46822
+ if (err)
46823
+ return reject(err);
46824
+ resolve({ bytesWritten, buffers: buffers2 });
46825
+ });
46826
+ });
46827
+ };
46828
+ if (typeof fs.realpath.native === "function") {
46829
+ exports.realpath.native = u(fs.realpath.native);
46830
+ } else {
46831
+ process.emitWarning(
46832
+ "fs.realpath.native is not a function. Is fs being monkey-patched?",
46833
+ "Warning",
46834
+ "fs-extra-WARN0003"
46835
+ );
46836
+ }
46837
+ }
46838
+ });
46839
+
46840
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js
46841
+ var require_utils10 = __commonJS({
46842
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module2) {
46843
+ "use strict";
46844
+ var path2 = require("path");
46845
+ module2.exports.checkPath = function checkPath(pth) {
46846
+ if (process.platform === "win32") {
46847
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path2.parse(pth).root, ""));
46848
+ if (pathHasInvalidWinCharacters) {
46849
+ const error = new Error(`Path contains invalid characters: ${pth}`);
46850
+ error.code = "EINVAL";
46851
+ throw error;
46852
+ }
46853
+ }
46854
+ };
46855
+ }
46856
+ });
46857
+
46858
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js
46859
+ var require_make_dir2 = __commonJS({
46860
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module2) {
46861
+ "use strict";
46862
+ var fs = require_fs8();
46863
+ var { checkPath } = require_utils10();
46864
+ var getMode = (options) => {
46865
+ const defaults2 = { mode: 511 };
46866
+ if (typeof options === "number")
46867
+ return options;
46868
+ return { ...defaults2, ...options }.mode;
46869
+ };
46870
+ module2.exports.makeDir = async (dir, options) => {
46871
+ checkPath(dir);
46872
+ return fs.mkdir(dir, {
46873
+ mode: getMode(options),
46874
+ recursive: true
46875
+ });
46876
+ };
46877
+ module2.exports.makeDirSync = (dir, options) => {
46878
+ checkPath(dir);
46879
+ return fs.mkdirSync(dir, {
46880
+ mode: getMode(options),
46881
+ recursive: true
46882
+ });
46883
+ };
46884
+ }
46885
+ });
46886
+
46887
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js
46888
+ var require_mkdirs2 = __commonJS({
46889
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module2) {
46890
+ "use strict";
46891
+ var u = require_universalify2().fromPromise;
46892
+ var { makeDir: _makeDir, makeDirSync } = require_make_dir2();
46893
+ var makeDir = u(_makeDir);
46894
+ module2.exports = {
46895
+ mkdirs: makeDir,
46896
+ mkdirsSync: makeDirSync,
46897
+ // alias
46898
+ mkdirp: makeDir,
46899
+ mkdirpSync: makeDirSync,
46900
+ ensureDir: makeDir,
46901
+ ensureDirSync: makeDirSync
46902
+ };
46903
+ }
46904
+ });
46905
+
46906
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js
46907
+ var require_path_exists2 = __commonJS({
46908
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) {
46909
+ "use strict";
46910
+ var u = require_universalify2().fromPromise;
46911
+ var fs = require_fs8();
46912
+ function pathExists(path2) {
46913
+ return fs.access(path2).then(() => true).catch(() => false);
46914
+ }
46915
+ module2.exports = {
46916
+ pathExists: u(pathExists),
46917
+ pathExistsSync: fs.existsSync
46918
+ };
46919
+ }
46920
+ });
46921
+
46922
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js
46923
+ var require_utimes2 = __commonJS({
46924
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) {
46925
+ "use strict";
46926
+ var fs = require_graceful_fs();
46927
+ function utimesMillis(path2, atime, mtime, callback) {
46928
+ fs.open(path2, "r+", (err, fd) => {
46929
+ if (err)
46930
+ return callback(err);
46931
+ fs.futimes(fd, atime, mtime, (futimesErr) => {
46932
+ fs.close(fd, (closeErr) => {
46933
+ if (callback)
46934
+ callback(futimesErr || closeErr);
46935
+ });
46936
+ });
46937
+ });
46938
+ }
46939
+ function utimesMillisSync(path2, atime, mtime) {
46940
+ const fd = fs.openSync(path2, "r+");
46941
+ fs.futimesSync(fd, atime, mtime);
46942
+ return fs.closeSync(fd);
46943
+ }
46944
+ module2.exports = {
46945
+ utimesMillis,
46946
+ utimesMillisSync
46947
+ };
46948
+ }
46949
+ });
46950
+
46951
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js
46952
+ var require_stat2 = __commonJS({
46953
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js"(exports, module2) {
46954
+ "use strict";
46955
+ var fs = require_fs8();
46956
+ var path2 = require("path");
46957
+ var util2 = require("util");
46958
+ function getStats(src, dest, opts) {
46959
+ const statFunc = opts.dereference ? (file) => fs.stat(file, { bigint: true }) : (file) => fs.lstat(file, { bigint: true });
46960
+ return Promise.all([
46961
+ statFunc(src),
46962
+ statFunc(dest).catch((err) => {
46963
+ if (err.code === "ENOENT")
46964
+ return null;
46965
+ throw err;
46966
+ })
46967
+ ]).then(([srcStat, destStat]) => ({ srcStat, destStat }));
46968
+ }
46969
+ function getStatsSync(src, dest, opts) {
46970
+ let destStat;
46971
+ const statFunc = opts.dereference ? (file) => fs.statSync(file, { bigint: true }) : (file) => fs.lstatSync(file, { bigint: true });
46972
+ const srcStat = statFunc(src);
46973
+ try {
46974
+ destStat = statFunc(dest);
46975
+ } catch (err) {
46976
+ if (err.code === "ENOENT")
46977
+ return { srcStat, destStat: null };
46978
+ throw err;
46979
+ }
46980
+ return { srcStat, destStat };
46981
+ }
46982
+ function checkPaths(src, dest, funcName, opts, cb) {
46983
+ util2.callbackify(getStats)(src, dest, opts, (err, stats) => {
46984
+ if (err)
46985
+ return cb(err);
46986
+ const { srcStat, destStat } = stats;
46987
+ if (destStat) {
46988
+ if (areIdentical(srcStat, destStat)) {
46989
+ const srcBaseName = path2.basename(src);
46990
+ const destBaseName = path2.basename(dest);
46991
+ if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
46992
+ return cb(null, { srcStat, destStat, isChangingCase: true });
46993
+ }
46994
+ return cb(new Error("Source and destination must not be the same."));
46995
+ }
46996
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
46997
+ return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`));
46998
+ }
46999
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
47000
+ return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`));
47001
+ }
47002
+ }
47003
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
47004
+ return cb(new Error(errMsg(src, dest, funcName)));
47005
+ }
47006
+ return cb(null, { srcStat, destStat });
47007
+ });
47008
+ }
47009
+ function checkPathsSync(src, dest, funcName, opts) {
47010
+ const { srcStat, destStat } = getStatsSync(src, dest, opts);
47011
+ if (destStat) {
47012
+ if (areIdentical(srcStat, destStat)) {
47013
+ const srcBaseName = path2.basename(src);
47014
+ const destBaseName = path2.basename(dest);
47015
+ if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
47016
+ return { srcStat, destStat, isChangingCase: true };
47017
+ }
47018
+ throw new Error("Source and destination must not be the same.");
47019
+ }
47020
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
47021
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
47022
+ }
47023
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
47024
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
47025
+ }
47026
+ }
47027
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
47028
+ throw new Error(errMsg(src, dest, funcName));
47029
+ }
47030
+ return { srcStat, destStat };
47031
+ }
47032
+ function checkParentPaths(src, srcStat, dest, funcName, cb) {
47033
+ const srcParent = path2.resolve(path2.dirname(src));
47034
+ const destParent = path2.resolve(path2.dirname(dest));
47035
+ if (destParent === srcParent || destParent === path2.parse(destParent).root)
47036
+ return cb();
47037
+ fs.stat(destParent, { bigint: true }, (err, destStat) => {
47038
+ if (err) {
47039
+ if (err.code === "ENOENT")
47040
+ return cb();
47041
+ return cb(err);
47042
+ }
47043
+ if (areIdentical(srcStat, destStat)) {
47044
+ return cb(new Error(errMsg(src, dest, funcName)));
47045
+ }
47046
+ return checkParentPaths(src, srcStat, destParent, funcName, cb);
47047
+ });
47048
+ }
47049
+ function checkParentPathsSync(src, srcStat, dest, funcName) {
47050
+ const srcParent = path2.resolve(path2.dirname(src));
47051
+ const destParent = path2.resolve(path2.dirname(dest));
47052
+ if (destParent === srcParent || destParent === path2.parse(destParent).root)
47053
+ return;
47054
+ let destStat;
47055
+ try {
47056
+ destStat = fs.statSync(destParent, { bigint: true });
47057
+ } catch (err) {
47058
+ if (err.code === "ENOENT")
47059
+ return;
47060
+ throw err;
47061
+ }
47062
+ if (areIdentical(srcStat, destStat)) {
47063
+ throw new Error(errMsg(src, dest, funcName));
47064
+ }
47065
+ return checkParentPathsSync(src, srcStat, destParent, funcName);
47066
+ }
47067
+ function areIdentical(srcStat, destStat) {
47068
+ return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
47069
+ }
47070
+ function isSrcSubdir(src, dest) {
47071
+ const srcArr = path2.resolve(src).split(path2.sep).filter((i) => i);
47072
+ const destArr = path2.resolve(dest).split(path2.sep).filter((i) => i);
47073
+ return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true);
47074
+ }
47075
+ function errMsg(src, dest, funcName) {
47076
+ return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
47077
+ }
47078
+ module2.exports = {
47079
+ checkPaths,
47080
+ checkPathsSync,
47081
+ checkParentPaths,
47082
+ checkParentPathsSync,
47083
+ isSrcSubdir,
47084
+ areIdentical
47085
+ };
47086
+ }
47087
+ });
47088
+
47089
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js
47090
+ var require_copy3 = __commonJS({
47091
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) {
47092
+ "use strict";
47093
+ var fs = require_graceful_fs();
47094
+ var path2 = require("path");
47095
+ var mkdirs = require_mkdirs2().mkdirs;
47096
+ var pathExists = require_path_exists2().pathExists;
47097
+ var utimesMillis = require_utimes2().utimesMillis;
47098
+ var stat = require_stat2();
47099
+ function copy(src, dest, opts, cb) {
47100
+ if (typeof opts === "function" && !cb) {
47101
+ cb = opts;
47102
+ opts = {};
47103
+ } else if (typeof opts === "function") {
47104
+ opts = { filter: opts };
47105
+ }
47106
+ cb = cb || function() {
47107
+ };
47108
+ opts = opts || {};
47109
+ opts.clobber = "clobber" in opts ? !!opts.clobber : true;
47110
+ opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
47111
+ if (opts.preserveTimestamps && process.arch === "ia32") {
47112
+ process.emitWarning(
47113
+ "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
47114
+ "Warning",
47115
+ "fs-extra-WARN0001"
47116
+ );
47117
+ }
47118
+ stat.checkPaths(src, dest, "copy", opts, (err, stats) => {
47119
+ if (err)
47120
+ return cb(err);
47121
+ const { srcStat, destStat } = stats;
47122
+ stat.checkParentPaths(src, srcStat, dest, "copy", (err2) => {
47123
+ if (err2)
47124
+ return cb(err2);
47125
+ runFilter(src, dest, opts, (err3, include) => {
47126
+ if (err3)
47127
+ return cb(err3);
47128
+ if (!include)
47129
+ return cb();
47130
+ checkParentDir(destStat, src, dest, opts, cb);
47131
+ });
47132
+ });
47133
+ });
47134
+ }
47135
+ function checkParentDir(destStat, src, dest, opts, cb) {
47136
+ const destParent = path2.dirname(dest);
47137
+ pathExists(destParent, (err, dirExists) => {
47138
+ if (err)
47139
+ return cb(err);
47140
+ if (dirExists)
47141
+ return getStats(destStat, src, dest, opts, cb);
47142
+ mkdirs(destParent, (err2) => {
47143
+ if (err2)
47144
+ return cb(err2);
47145
+ return getStats(destStat, src, dest, opts, cb);
47146
+ });
47147
+ });
47148
+ }
47149
+ function runFilter(src, dest, opts, cb) {
47150
+ if (!opts.filter)
47151
+ return cb(null, true);
47152
+ Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error));
47153
+ }
47154
+ function getStats(destStat, src, dest, opts, cb) {
47155
+ const stat2 = opts.dereference ? fs.stat : fs.lstat;
47156
+ stat2(src, (err, srcStat) => {
47157
+ if (err)
47158
+ return cb(err);
47159
+ if (srcStat.isDirectory())
47160
+ return onDir(srcStat, destStat, src, dest, opts, cb);
47161
+ else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
47162
+ return onFile(srcStat, destStat, src, dest, opts, cb);
47163
+ else if (srcStat.isSymbolicLink())
47164
+ return onLink(destStat, src, dest, opts, cb);
47165
+ else if (srcStat.isSocket())
47166
+ return cb(new Error(`Cannot copy a socket file: ${src}`));
47167
+ else if (srcStat.isFIFO())
47168
+ return cb(new Error(`Cannot copy a FIFO pipe: ${src}`));
47169
+ return cb(new Error(`Unknown file: ${src}`));
47170
+ });
47171
+ }
47172
+ function onFile(srcStat, destStat, src, dest, opts, cb) {
47173
+ if (!destStat)
47174
+ return copyFile(srcStat, src, dest, opts, cb);
47175
+ return mayCopyFile(srcStat, src, dest, opts, cb);
47176
+ }
47177
+ function mayCopyFile(srcStat, src, dest, opts, cb) {
47178
+ if (opts.overwrite) {
47179
+ fs.unlink(dest, (err) => {
47180
+ if (err)
47181
+ return cb(err);
47182
+ return copyFile(srcStat, src, dest, opts, cb);
47183
+ });
47184
+ } else if (opts.errorOnExist) {
47185
+ return cb(new Error(`'${dest}' already exists`));
47186
+ } else
47187
+ return cb();
47188
+ }
47189
+ function copyFile(srcStat, src, dest, opts, cb) {
47190
+ fs.copyFile(src, dest, (err) => {
47191
+ if (err)
47192
+ return cb(err);
47193
+ if (opts.preserveTimestamps)
47194
+ return handleTimestampsAndMode(srcStat.mode, src, dest, cb);
47195
+ return setDestMode(dest, srcStat.mode, cb);
47196
+ });
47197
+ }
47198
+ function handleTimestampsAndMode(srcMode, src, dest, cb) {
47199
+ if (fileIsNotWritable(srcMode)) {
47200
+ return makeFileWritable(dest, srcMode, (err) => {
47201
+ if (err)
47202
+ return cb(err);
47203
+ return setDestTimestampsAndMode(srcMode, src, dest, cb);
47204
+ });
47205
+ }
47206
+ return setDestTimestampsAndMode(srcMode, src, dest, cb);
47207
+ }
47208
+ function fileIsNotWritable(srcMode) {
47209
+ return (srcMode & 128) === 0;
47210
+ }
47211
+ function makeFileWritable(dest, srcMode, cb) {
47212
+ return setDestMode(dest, srcMode | 128, cb);
47213
+ }
47214
+ function setDestTimestampsAndMode(srcMode, src, dest, cb) {
47215
+ setDestTimestamps(src, dest, (err) => {
47216
+ if (err)
47217
+ return cb(err);
47218
+ return setDestMode(dest, srcMode, cb);
47219
+ });
47220
+ }
47221
+ function setDestMode(dest, srcMode, cb) {
47222
+ return fs.chmod(dest, srcMode, cb);
47223
+ }
47224
+ function setDestTimestamps(src, dest, cb) {
47225
+ fs.stat(src, (err, updatedSrcStat) => {
47226
+ if (err)
47227
+ return cb(err);
47228
+ return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb);
47229
+ });
47230
+ }
47231
+ function onDir(srcStat, destStat, src, dest, opts, cb) {
47232
+ if (!destStat)
47233
+ return mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
47234
+ return copyDir(src, dest, opts, cb);
47235
+ }
47236
+ function mkDirAndCopy(srcMode, src, dest, opts, cb) {
47237
+ fs.mkdir(dest, (err) => {
47238
+ if (err)
47239
+ return cb(err);
47240
+ copyDir(src, dest, opts, (err2) => {
47241
+ if (err2)
47242
+ return cb(err2);
47243
+ return setDestMode(dest, srcMode, cb);
47244
+ });
47245
+ });
47246
+ }
47247
+ function copyDir(src, dest, opts, cb) {
47248
+ fs.readdir(src, (err, items) => {
47249
+ if (err)
47250
+ return cb(err);
47251
+ return copyDirItems(items, src, dest, opts, cb);
47252
+ });
47253
+ }
47254
+ function copyDirItems(items, src, dest, opts, cb) {
47255
+ const item = items.pop();
47256
+ if (!item)
47257
+ return cb();
47258
+ return copyDirItem(items, item, src, dest, opts, cb);
47259
+ }
47260
+ function copyDirItem(items, item, src, dest, opts, cb) {
47261
+ const srcItem = path2.join(src, item);
47262
+ const destItem = path2.join(dest, item);
47263
+ runFilter(srcItem, destItem, opts, (err, include) => {
47264
+ if (err)
47265
+ return cb(err);
47266
+ if (!include)
47267
+ return copyDirItems(items, src, dest, opts, cb);
47268
+ stat.checkPaths(srcItem, destItem, "copy", opts, (err2, stats) => {
47269
+ if (err2)
47270
+ return cb(err2);
47271
+ const { destStat } = stats;
47272
+ getStats(destStat, srcItem, destItem, opts, (err3) => {
47273
+ if (err3)
47274
+ return cb(err3);
47275
+ return copyDirItems(items, src, dest, opts, cb);
47276
+ });
47277
+ });
47278
+ });
47279
+ }
47280
+ function onLink(destStat, src, dest, opts, cb) {
47281
+ fs.readlink(src, (err, resolvedSrc) => {
47282
+ if (err)
47283
+ return cb(err);
47284
+ if (opts.dereference) {
47285
+ resolvedSrc = path2.resolve(process.cwd(), resolvedSrc);
47286
+ }
47287
+ if (!destStat) {
47288
+ return fs.symlink(resolvedSrc, dest, cb);
47289
+ } else {
47290
+ fs.readlink(dest, (err2, resolvedDest) => {
47291
+ if (err2) {
47292
+ if (err2.code === "EINVAL" || err2.code === "UNKNOWN")
47293
+ return fs.symlink(resolvedSrc, dest, cb);
47294
+ return cb(err2);
47295
+ }
47296
+ if (opts.dereference) {
47297
+ resolvedDest = path2.resolve(process.cwd(), resolvedDest);
47298
+ }
47299
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
47300
+ return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
47301
+ }
47302
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
47303
+ return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
47304
+ }
47305
+ return copyLink(resolvedSrc, dest, cb);
47306
+ });
47307
+ }
47308
+ });
47309
+ }
47310
+ function copyLink(resolvedSrc, dest, cb) {
47311
+ fs.unlink(dest, (err) => {
47312
+ if (err)
47313
+ return cb(err);
47314
+ return fs.symlink(resolvedSrc, dest, cb);
47315
+ });
47316
+ }
47317
+ module2.exports = copy;
47318
+ }
47319
+ });
47320
+
47321
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js
47322
+ var require_copy_sync2 = __commonJS({
47323
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module2) {
47324
+ "use strict";
47325
+ var fs = require_graceful_fs();
47326
+ var path2 = require("path");
47327
+ var mkdirsSync = require_mkdirs2().mkdirsSync;
47328
+ var utimesMillisSync = require_utimes2().utimesMillisSync;
47329
+ var stat = require_stat2();
47330
+ function copySync(src, dest, opts) {
47331
+ if (typeof opts === "function") {
47332
+ opts = { filter: opts };
47333
+ }
47334
+ opts = opts || {};
47335
+ opts.clobber = "clobber" in opts ? !!opts.clobber : true;
47336
+ opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
47337
+ if (opts.preserveTimestamps && process.arch === "ia32") {
47338
+ process.emitWarning(
47339
+ "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
47340
+ "Warning",
47341
+ "fs-extra-WARN0002"
47342
+ );
47343
+ }
47344
+ const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
47345
+ stat.checkParentPathsSync(src, srcStat, dest, "copy");
47346
+ if (opts.filter && !opts.filter(src, dest))
47347
+ return;
47348
+ const destParent = path2.dirname(dest);
47349
+ if (!fs.existsSync(destParent))
47350
+ mkdirsSync(destParent);
47351
+ return getStats(destStat, src, dest, opts);
47352
+ }
47353
+ function getStats(destStat, src, dest, opts) {
47354
+ const statSync = opts.dereference ? fs.statSync : fs.lstatSync;
47355
+ const srcStat = statSync(src);
47356
+ if (srcStat.isDirectory())
47357
+ return onDir(srcStat, destStat, src, dest, opts);
47358
+ else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
47359
+ return onFile(srcStat, destStat, src, dest, opts);
47360
+ else if (srcStat.isSymbolicLink())
47361
+ return onLink(destStat, src, dest, opts);
47362
+ else if (srcStat.isSocket())
47363
+ throw new Error(`Cannot copy a socket file: ${src}`);
47364
+ else if (srcStat.isFIFO())
47365
+ throw new Error(`Cannot copy a FIFO pipe: ${src}`);
47366
+ throw new Error(`Unknown file: ${src}`);
47367
+ }
47368
+ function onFile(srcStat, destStat, src, dest, opts) {
47369
+ if (!destStat)
47370
+ return copyFile(srcStat, src, dest, opts);
47371
+ return mayCopyFile(srcStat, src, dest, opts);
47372
+ }
47373
+ function mayCopyFile(srcStat, src, dest, opts) {
47374
+ if (opts.overwrite) {
47375
+ fs.unlinkSync(dest);
47376
+ return copyFile(srcStat, src, dest, opts);
47377
+ } else if (opts.errorOnExist) {
47378
+ throw new Error(`'${dest}' already exists`);
47379
+ }
47380
+ }
47381
+ function copyFile(srcStat, src, dest, opts) {
47382
+ fs.copyFileSync(src, dest);
47383
+ if (opts.preserveTimestamps)
47384
+ handleTimestamps(srcStat.mode, src, dest);
47385
+ return setDestMode(dest, srcStat.mode);
47386
+ }
47387
+ function handleTimestamps(srcMode, src, dest) {
47388
+ if (fileIsNotWritable(srcMode))
47389
+ makeFileWritable(dest, srcMode);
47390
+ return setDestTimestamps(src, dest);
47391
+ }
47392
+ function fileIsNotWritable(srcMode) {
47393
+ return (srcMode & 128) === 0;
47394
+ }
47395
+ function makeFileWritable(dest, srcMode) {
47396
+ return setDestMode(dest, srcMode | 128);
47397
+ }
47398
+ function setDestMode(dest, srcMode) {
47399
+ return fs.chmodSync(dest, srcMode);
47400
+ }
47401
+ function setDestTimestamps(src, dest) {
47402
+ const updatedSrcStat = fs.statSync(src);
47403
+ return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
47404
+ }
47405
+ function onDir(srcStat, destStat, src, dest, opts) {
47406
+ if (!destStat)
47407
+ return mkDirAndCopy(srcStat.mode, src, dest, opts);
47408
+ return copyDir(src, dest, opts);
47409
+ }
47410
+ function mkDirAndCopy(srcMode, src, dest, opts) {
47411
+ fs.mkdirSync(dest);
47412
+ copyDir(src, dest, opts);
47413
+ return setDestMode(dest, srcMode);
47414
+ }
47415
+ function copyDir(src, dest, opts) {
47416
+ fs.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
47417
+ }
47418
+ function copyDirItem(item, src, dest, opts) {
47419
+ const srcItem = path2.join(src, item);
47420
+ const destItem = path2.join(dest, item);
47421
+ if (opts.filter && !opts.filter(srcItem, destItem))
47422
+ return;
47423
+ const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
47424
+ return getStats(destStat, srcItem, destItem, opts);
47425
+ }
47426
+ function onLink(destStat, src, dest, opts) {
47427
+ let resolvedSrc = fs.readlinkSync(src);
47428
+ if (opts.dereference) {
47429
+ resolvedSrc = path2.resolve(process.cwd(), resolvedSrc);
47430
+ }
47431
+ if (!destStat) {
47432
+ return fs.symlinkSync(resolvedSrc, dest);
47433
+ } else {
47434
+ let resolvedDest;
47435
+ try {
47436
+ resolvedDest = fs.readlinkSync(dest);
47437
+ } catch (err) {
47438
+ if (err.code === "EINVAL" || err.code === "UNKNOWN")
47439
+ return fs.symlinkSync(resolvedSrc, dest);
47440
+ throw err;
47441
+ }
47442
+ if (opts.dereference) {
47443
+ resolvedDest = path2.resolve(process.cwd(), resolvedDest);
47444
+ }
47445
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
47446
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
47447
+ }
47448
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
47449
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
47450
+ }
47451
+ return copyLink(resolvedSrc, dest);
47452
+ }
47453
+ }
47454
+ function copyLink(resolvedSrc, dest) {
47455
+ fs.unlinkSync(dest);
47456
+ return fs.symlinkSync(resolvedSrc, dest);
47457
+ }
47458
+ module2.exports = copySync;
47459
+ }
47460
+ });
47461
+
47462
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js
47463
+ var require_copy4 = __commonJS({
47464
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js"(exports, module2) {
47465
+ "use strict";
47466
+ var u = require_universalify2().fromCallback;
47467
+ module2.exports = {
47468
+ copy: u(require_copy3()),
47469
+ copySync: require_copy_sync2()
47470
+ };
47471
+ }
47472
+ });
47473
+
47474
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js
47475
+ var require_remove2 = __commonJS({
47476
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js"(exports, module2) {
47477
+ "use strict";
47478
+ var fs = require_graceful_fs();
47479
+ var u = require_universalify2().fromCallback;
47480
+ function remove(path2, callback) {
47481
+ fs.rm(path2, { recursive: true, force: true }, callback);
47482
+ }
47483
+ function removeSync2(path2) {
47484
+ fs.rmSync(path2, { recursive: true, force: true });
47485
+ }
47486
+ module2.exports = {
47487
+ remove: u(remove),
47488
+ removeSync: removeSync2
47489
+ };
47490
+ }
47491
+ });
47492
+
47493
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js
47494
+ var require_empty3 = __commonJS({
47495
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js"(exports, module2) {
47496
+ "use strict";
47497
+ var u = require_universalify2().fromPromise;
47498
+ var fs = require_fs8();
47499
+ var path2 = require("path");
47500
+ var mkdir = require_mkdirs2();
47501
+ var remove = require_remove2();
47502
+ var emptyDir = u(async function emptyDir2(dir) {
47503
+ let items;
47504
+ try {
47505
+ items = await fs.readdir(dir);
47506
+ } catch {
47507
+ return mkdir.mkdirs(dir);
47508
+ }
47509
+ return Promise.all(items.map((item) => remove.remove(path2.join(dir, item))));
47510
+ });
47511
+ function emptyDirSync(dir) {
47512
+ let items;
47513
+ try {
47514
+ items = fs.readdirSync(dir);
47515
+ } catch {
47516
+ return mkdir.mkdirsSync(dir);
47517
+ }
47518
+ items.forEach((item) => {
47519
+ item = path2.join(dir, item);
47520
+ remove.removeSync(item);
47521
+ });
47522
+ }
47523
+ module2.exports = {
47524
+ emptyDirSync,
47525
+ emptydirSync: emptyDirSync,
47526
+ emptyDir,
47527
+ emptydir: emptyDir
47528
+ };
47529
+ }
47530
+ });
47531
+
47532
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js
47533
+ var require_file2 = __commonJS({
47534
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) {
47535
+ "use strict";
47536
+ var u = require_universalify2().fromCallback;
47537
+ var path2 = require("path");
47538
+ var fs = require_graceful_fs();
47539
+ var mkdir = require_mkdirs2();
47540
+ function createFile(file, callback) {
47541
+ function makeFile() {
47542
+ fs.writeFile(file, "", (err) => {
47543
+ if (err)
47544
+ return callback(err);
47545
+ callback();
47546
+ });
47547
+ }
47548
+ fs.stat(file, (err, stats) => {
47549
+ if (!err && stats.isFile())
47550
+ return callback();
47551
+ const dir = path2.dirname(file);
47552
+ fs.stat(dir, (err2, stats2) => {
47553
+ if (err2) {
47554
+ if (err2.code === "ENOENT") {
47555
+ return mkdir.mkdirs(dir, (err3) => {
47556
+ if (err3)
47557
+ return callback(err3);
47558
+ makeFile();
47559
+ });
47560
+ }
47561
+ return callback(err2);
47562
+ }
47563
+ if (stats2.isDirectory())
47564
+ makeFile();
47565
+ else {
47566
+ fs.readdir(dir, (err3) => {
47567
+ if (err3)
47568
+ return callback(err3);
47569
+ });
47570
+ }
47571
+ });
47572
+ });
47573
+ }
47574
+ function createFileSync(file) {
47575
+ let stats;
47576
+ try {
47577
+ stats = fs.statSync(file);
47578
+ } catch {
47579
+ }
47580
+ if (stats && stats.isFile())
47581
+ return;
47582
+ const dir = path2.dirname(file);
47583
+ try {
47584
+ if (!fs.statSync(dir).isDirectory()) {
47585
+ fs.readdirSync(dir);
47586
+ }
47587
+ } catch (err) {
47588
+ if (err && err.code === "ENOENT")
47589
+ mkdir.mkdirsSync(dir);
47590
+ else
47591
+ throw err;
47592
+ }
47593
+ fs.writeFileSync(file, "");
47594
+ }
47595
+ module2.exports = {
47596
+ createFile: u(createFile),
47597
+ createFileSync
47598
+ };
47599
+ }
47600
+ });
47601
+
47602
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js
47603
+ var require_link2 = __commonJS({
47604
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) {
47605
+ "use strict";
47606
+ var u = require_universalify2().fromCallback;
47607
+ var path2 = require("path");
47608
+ var fs = require_graceful_fs();
47609
+ var mkdir = require_mkdirs2();
47610
+ var pathExists = require_path_exists2().pathExists;
47611
+ var { areIdentical } = require_stat2();
47612
+ function createLink(srcpath, dstpath, callback) {
47613
+ function makeLink(srcpath2, dstpath2) {
47614
+ fs.link(srcpath2, dstpath2, (err) => {
47615
+ if (err)
47616
+ return callback(err);
47617
+ callback(null);
47618
+ });
47619
+ }
47620
+ fs.lstat(dstpath, (_, dstStat) => {
47621
+ fs.lstat(srcpath, (err, srcStat) => {
47622
+ if (err) {
47623
+ err.message = err.message.replace("lstat", "ensureLink");
47624
+ return callback(err);
47625
+ }
47626
+ if (dstStat && areIdentical(srcStat, dstStat))
47627
+ return callback(null);
47628
+ const dir = path2.dirname(dstpath);
47629
+ pathExists(dir, (err2, dirExists) => {
47630
+ if (err2)
47631
+ return callback(err2);
47632
+ if (dirExists)
47633
+ return makeLink(srcpath, dstpath);
47634
+ mkdir.mkdirs(dir, (err3) => {
47635
+ if (err3)
47636
+ return callback(err3);
47637
+ makeLink(srcpath, dstpath);
47638
+ });
47639
+ });
47640
+ });
47641
+ });
47642
+ }
47643
+ function createLinkSync(srcpath, dstpath) {
47644
+ let dstStat;
47645
+ try {
47646
+ dstStat = fs.lstatSync(dstpath);
47647
+ } catch {
47648
+ }
47649
+ try {
47650
+ const srcStat = fs.lstatSync(srcpath);
47651
+ if (dstStat && areIdentical(srcStat, dstStat))
47652
+ return;
47653
+ } catch (err) {
47654
+ err.message = err.message.replace("lstat", "ensureLink");
47655
+ throw err;
47656
+ }
47657
+ const dir = path2.dirname(dstpath);
47658
+ const dirExists = fs.existsSync(dir);
47659
+ if (dirExists)
47660
+ return fs.linkSync(srcpath, dstpath);
47661
+ mkdir.mkdirsSync(dir);
47662
+ return fs.linkSync(srcpath, dstpath);
47663
+ }
47664
+ module2.exports = {
47665
+ createLink: u(createLink),
47666
+ createLinkSync
47667
+ };
47668
+ }
47669
+ });
47670
+
47671
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js
47672
+ var require_symlink_paths2 = __commonJS({
47673
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) {
47674
+ "use strict";
47675
+ var path2 = require("path");
47676
+ var fs = require_graceful_fs();
47677
+ var pathExists = require_path_exists2().pathExists;
47678
+ function symlinkPaths(srcpath, dstpath, callback) {
47679
+ if (path2.isAbsolute(srcpath)) {
47680
+ return fs.lstat(srcpath, (err) => {
47681
+ if (err) {
47682
+ err.message = err.message.replace("lstat", "ensureSymlink");
47683
+ return callback(err);
47684
+ }
47685
+ return callback(null, {
47686
+ toCwd: srcpath,
47687
+ toDst: srcpath
47688
+ });
47689
+ });
47690
+ } else {
47691
+ const dstdir = path2.dirname(dstpath);
47692
+ const relativeToDst = path2.join(dstdir, srcpath);
47693
+ return pathExists(relativeToDst, (err, exists) => {
47694
+ if (err)
47695
+ return callback(err);
47696
+ if (exists) {
47697
+ return callback(null, {
47698
+ toCwd: relativeToDst,
47699
+ toDst: srcpath
47700
+ });
47701
+ } else {
47702
+ return fs.lstat(srcpath, (err2) => {
47703
+ if (err2) {
47704
+ err2.message = err2.message.replace("lstat", "ensureSymlink");
47705
+ return callback(err2);
47706
+ }
47707
+ return callback(null, {
47708
+ toCwd: srcpath,
47709
+ toDst: path2.relative(dstdir, srcpath)
47710
+ });
47711
+ });
47712
+ }
47713
+ });
47714
+ }
47715
+ }
47716
+ function symlinkPathsSync(srcpath, dstpath) {
47717
+ let exists;
47718
+ if (path2.isAbsolute(srcpath)) {
47719
+ exists = fs.existsSync(srcpath);
47720
+ if (!exists)
47721
+ throw new Error("absolute srcpath does not exist");
47722
+ return {
47723
+ toCwd: srcpath,
47724
+ toDst: srcpath
47725
+ };
47726
+ } else {
47727
+ const dstdir = path2.dirname(dstpath);
47728
+ const relativeToDst = path2.join(dstdir, srcpath);
47729
+ exists = fs.existsSync(relativeToDst);
47730
+ if (exists) {
47731
+ return {
47732
+ toCwd: relativeToDst,
47733
+ toDst: srcpath
47734
+ };
47735
+ } else {
47736
+ exists = fs.existsSync(srcpath);
47737
+ if (!exists)
47738
+ throw new Error("relative srcpath does not exist");
47739
+ return {
47740
+ toCwd: srcpath,
47741
+ toDst: path2.relative(dstdir, srcpath)
47742
+ };
47743
+ }
47744
+ }
47745
+ }
47746
+ module2.exports = {
47747
+ symlinkPaths,
47748
+ symlinkPathsSync
47749
+ };
47750
+ }
47751
+ });
47752
+
47753
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js
47754
+ var require_symlink_type2 = __commonJS({
47755
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) {
47756
+ "use strict";
47757
+ var fs = require_graceful_fs();
47758
+ function symlinkType(srcpath, type, callback) {
47759
+ callback = typeof type === "function" ? type : callback;
47760
+ type = typeof type === "function" ? false : type;
47761
+ if (type)
47762
+ return callback(null, type);
47763
+ fs.lstat(srcpath, (err, stats) => {
47764
+ if (err)
47765
+ return callback(null, "file");
47766
+ type = stats && stats.isDirectory() ? "dir" : "file";
47767
+ callback(null, type);
47768
+ });
47769
+ }
47770
+ function symlinkTypeSync(srcpath, type) {
47771
+ let stats;
47772
+ if (type)
47773
+ return type;
47774
+ try {
47775
+ stats = fs.lstatSync(srcpath);
47776
+ } catch {
47777
+ return "file";
47778
+ }
47779
+ return stats && stats.isDirectory() ? "dir" : "file";
47780
+ }
47781
+ module2.exports = {
47782
+ symlinkType,
47783
+ symlinkTypeSync
47784
+ };
47785
+ }
47786
+ });
47787
+
47788
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js
47789
+ var require_symlink2 = __commonJS({
47790
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) {
47791
+ "use strict";
47792
+ var u = require_universalify2().fromCallback;
47793
+ var path2 = require("path");
47794
+ var fs = require_fs8();
47795
+ var _mkdirs = require_mkdirs2();
47796
+ var mkdirs = _mkdirs.mkdirs;
47797
+ var mkdirsSync = _mkdirs.mkdirsSync;
47798
+ var _symlinkPaths = require_symlink_paths2();
47799
+ var symlinkPaths = _symlinkPaths.symlinkPaths;
47800
+ var symlinkPathsSync = _symlinkPaths.symlinkPathsSync;
47801
+ var _symlinkType = require_symlink_type2();
47802
+ var symlinkType = _symlinkType.symlinkType;
47803
+ var symlinkTypeSync = _symlinkType.symlinkTypeSync;
47804
+ var pathExists = require_path_exists2().pathExists;
47805
+ var { areIdentical } = require_stat2();
47806
+ function createSymlink(srcpath, dstpath, type, callback) {
47807
+ callback = typeof type === "function" ? type : callback;
47808
+ type = typeof type === "function" ? false : type;
47809
+ fs.lstat(dstpath, (err, stats) => {
47810
+ if (!err && stats.isSymbolicLink()) {
47811
+ Promise.all([
47812
+ fs.stat(srcpath),
47813
+ fs.stat(dstpath)
47814
+ ]).then(([srcStat, dstStat]) => {
47815
+ if (areIdentical(srcStat, dstStat))
47816
+ return callback(null);
47817
+ _createSymlink(srcpath, dstpath, type, callback);
47818
+ });
47819
+ } else
47820
+ _createSymlink(srcpath, dstpath, type, callback);
47821
+ });
47822
+ }
47823
+ function _createSymlink(srcpath, dstpath, type, callback) {
47824
+ symlinkPaths(srcpath, dstpath, (err, relative) => {
47825
+ if (err)
47826
+ return callback(err);
47827
+ srcpath = relative.toDst;
47828
+ symlinkType(relative.toCwd, type, (err2, type2) => {
47829
+ if (err2)
47830
+ return callback(err2);
47831
+ const dir = path2.dirname(dstpath);
47832
+ pathExists(dir, (err3, dirExists) => {
47833
+ if (err3)
47834
+ return callback(err3);
47835
+ if (dirExists)
47836
+ return fs.symlink(srcpath, dstpath, type2, callback);
47837
+ mkdirs(dir, (err4) => {
47838
+ if (err4)
47839
+ return callback(err4);
47840
+ fs.symlink(srcpath, dstpath, type2, callback);
47841
+ });
47842
+ });
47843
+ });
47844
+ });
47845
+ }
47846
+ function createSymlinkSync(srcpath, dstpath, type) {
47847
+ let stats;
47848
+ try {
47849
+ stats = fs.lstatSync(dstpath);
47850
+ } catch {
47851
+ }
47852
+ if (stats && stats.isSymbolicLink()) {
47853
+ const srcStat = fs.statSync(srcpath);
47854
+ const dstStat = fs.statSync(dstpath);
47855
+ if (areIdentical(srcStat, dstStat))
47856
+ return;
47857
+ }
47858
+ const relative = symlinkPathsSync(srcpath, dstpath);
47859
+ srcpath = relative.toDst;
47860
+ type = symlinkTypeSync(relative.toCwd, type);
47861
+ const dir = path2.dirname(dstpath);
47862
+ const exists = fs.existsSync(dir);
47863
+ if (exists)
47864
+ return fs.symlinkSync(srcpath, dstpath, type);
47865
+ mkdirsSync(dir);
47866
+ return fs.symlinkSync(srcpath, dstpath, type);
47867
+ }
47868
+ module2.exports = {
47869
+ createSymlink: u(createSymlink),
47870
+ createSymlinkSync
47871
+ };
47872
+ }
47873
+ });
47874
+
47875
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js
47876
+ var require_ensure2 = __commonJS({
47877
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) {
47878
+ "use strict";
47879
+ var { createFile, createFileSync } = require_file2();
47880
+ var { createLink, createLinkSync } = require_link2();
47881
+ var { createSymlink, createSymlinkSync } = require_symlink2();
47882
+ module2.exports = {
47883
+ // file
47884
+ createFile,
47885
+ createFileSync,
47886
+ ensureFile: createFile,
47887
+ ensureFileSync: createFileSync,
47888
+ // link
47889
+ createLink,
47890
+ createLinkSync,
47891
+ ensureLink: createLink,
47892
+ ensureLinkSync: createLinkSync,
47893
+ // symlink
47894
+ createSymlink,
47895
+ createSymlinkSync,
47896
+ ensureSymlink: createSymlink,
47897
+ ensureSymlinkSync: createSymlinkSync
47898
+ };
47899
+ }
47900
+ });
47901
+
47902
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js
47903
+ var require_jsonfile3 = __commonJS({
47904
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module2) {
47905
+ "use strict";
47906
+ var jsonFile = require_jsonfile();
47907
+ module2.exports = {
47908
+ // jsonfile exports
47909
+ readJson: jsonFile.readFile,
47910
+ readJsonSync: jsonFile.readFileSync,
47911
+ writeJson: jsonFile.writeFile,
47912
+ writeJsonSync: jsonFile.writeFileSync
47913
+ };
47914
+ }
47915
+ });
47916
+
47917
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js
47918
+ var require_output_file2 = __commonJS({
47919
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js"(exports, module2) {
47920
+ "use strict";
47921
+ var u = require_universalify2().fromCallback;
47922
+ var fs = require_graceful_fs();
47923
+ var path2 = require("path");
47924
+ var mkdir = require_mkdirs2();
47925
+ var pathExists = require_path_exists2().pathExists;
47926
+ function outputFile(file, data, encoding, callback) {
47927
+ if (typeof encoding === "function") {
47928
+ callback = encoding;
47929
+ encoding = "utf8";
47930
+ }
47931
+ const dir = path2.dirname(file);
47932
+ pathExists(dir, (err, itDoes) => {
47933
+ if (err)
47934
+ return callback(err);
47935
+ if (itDoes)
47936
+ return fs.writeFile(file, data, encoding, callback);
47937
+ mkdir.mkdirs(dir, (err2) => {
47938
+ if (err2)
47939
+ return callback(err2);
47940
+ fs.writeFile(file, data, encoding, callback);
47941
+ });
47942
+ });
47943
+ }
47944
+ function outputFileSync(file, ...args) {
47945
+ const dir = path2.dirname(file);
47946
+ if (fs.existsSync(dir)) {
47947
+ return fs.writeFileSync(file, ...args);
47948
+ }
47949
+ mkdir.mkdirsSync(dir);
47950
+ fs.writeFileSync(file, ...args);
47951
+ }
47952
+ module2.exports = {
47953
+ outputFile: u(outputFile),
47954
+ outputFileSync
47955
+ };
47956
+ }
47957
+ });
47958
+
47959
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js
47960
+ var require_output_json2 = __commonJS({
47961
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) {
47962
+ "use strict";
47963
+ var { stringify } = require_utils3();
47964
+ var { outputFile } = require_output_file2();
47965
+ async function outputJson(file, data, options = {}) {
47966
+ const str = stringify(data, options);
47967
+ await outputFile(file, str, options);
47968
+ }
47969
+ module2.exports = outputJson;
47970
+ }
47971
+ });
47972
+
47973
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js
47974
+ var require_output_json_sync2 = __commonJS({
47975
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) {
47976
+ "use strict";
47977
+ var { stringify } = require_utils3();
47978
+ var { outputFileSync } = require_output_file2();
47979
+ function outputJsonSync(file, data, options) {
47980
+ const str = stringify(data, options);
47981
+ outputFileSync(file, str, options);
47982
+ }
47983
+ module2.exports = outputJsonSync;
47984
+ }
47985
+ });
47986
+
47987
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js
47988
+ var require_json3 = __commonJS({
47989
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js"(exports, module2) {
47990
+ "use strict";
47991
+ var u = require_universalify2().fromPromise;
47992
+ var jsonFile = require_jsonfile3();
47993
+ jsonFile.outputJson = u(require_output_json2());
47994
+ jsonFile.outputJsonSync = require_output_json_sync2();
47995
+ jsonFile.outputJSON = jsonFile.outputJson;
47996
+ jsonFile.outputJSONSync = jsonFile.outputJsonSync;
47997
+ jsonFile.writeJSON = jsonFile.writeJson;
47998
+ jsonFile.writeJSONSync = jsonFile.writeJsonSync;
47999
+ jsonFile.readJSON = jsonFile.readJson;
48000
+ jsonFile.readJSONSync = jsonFile.readJsonSync;
48001
+ module2.exports = jsonFile;
48002
+ }
48003
+ });
48004
+
48005
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js
48006
+ var require_move3 = __commonJS({
48007
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js"(exports, module2) {
48008
+ "use strict";
48009
+ var fs = require_graceful_fs();
48010
+ var path2 = require("path");
48011
+ var copy = require_copy4().copy;
48012
+ var remove = require_remove2().remove;
48013
+ var mkdirp = require_mkdirs2().mkdirp;
48014
+ var pathExists = require_path_exists2().pathExists;
48015
+ var stat = require_stat2();
48016
+ function move(src, dest, opts, cb) {
48017
+ if (typeof opts === "function") {
48018
+ cb = opts;
48019
+ opts = {};
48020
+ }
48021
+ opts = opts || {};
48022
+ const overwrite = opts.overwrite || opts.clobber || false;
48023
+ stat.checkPaths(src, dest, "move", opts, (err, stats) => {
48024
+ if (err)
48025
+ return cb(err);
48026
+ const { srcStat, isChangingCase = false } = stats;
48027
+ stat.checkParentPaths(src, srcStat, dest, "move", (err2) => {
48028
+ if (err2)
48029
+ return cb(err2);
48030
+ if (isParentRoot(dest))
48031
+ return doRename(src, dest, overwrite, isChangingCase, cb);
48032
+ mkdirp(path2.dirname(dest), (err3) => {
48033
+ if (err3)
48034
+ return cb(err3);
48035
+ return doRename(src, dest, overwrite, isChangingCase, cb);
48036
+ });
48037
+ });
48038
+ });
48039
+ }
48040
+ function isParentRoot(dest) {
48041
+ const parent = path2.dirname(dest);
48042
+ const parsedPath = path2.parse(parent);
48043
+ return parsedPath.root === parent;
48044
+ }
48045
+ function doRename(src, dest, overwrite, isChangingCase, cb) {
48046
+ if (isChangingCase)
48047
+ return rename(src, dest, overwrite, cb);
48048
+ if (overwrite) {
48049
+ return remove(dest, (err) => {
48050
+ if (err)
48051
+ return cb(err);
48052
+ return rename(src, dest, overwrite, cb);
48053
+ });
48054
+ }
48055
+ pathExists(dest, (err, destExists) => {
48056
+ if (err)
48057
+ return cb(err);
48058
+ if (destExists)
48059
+ return cb(new Error("dest already exists."));
48060
+ return rename(src, dest, overwrite, cb);
48061
+ });
48062
+ }
48063
+ function rename(src, dest, overwrite, cb) {
48064
+ fs.rename(src, dest, (err) => {
48065
+ if (!err)
48066
+ return cb();
48067
+ if (err.code !== "EXDEV")
48068
+ return cb(err);
48069
+ return moveAcrossDevice(src, dest, overwrite, cb);
48070
+ });
48071
+ }
48072
+ function moveAcrossDevice(src, dest, overwrite, cb) {
48073
+ const opts = {
48074
+ overwrite,
48075
+ errorOnExist: true,
48076
+ preserveTimestamps: true
48077
+ };
48078
+ copy(src, dest, opts, (err) => {
48079
+ if (err)
48080
+ return cb(err);
48081
+ return remove(src, cb);
48082
+ });
48083
+ }
48084
+ module2.exports = move;
48085
+ }
48086
+ });
48087
+
48088
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js
48089
+ var require_move_sync2 = __commonJS({
48090
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js"(exports, module2) {
48091
+ "use strict";
48092
+ var fs = require_graceful_fs();
48093
+ var path2 = require("path");
48094
+ var copySync = require_copy4().copySync;
48095
+ var removeSync2 = require_remove2().removeSync;
48096
+ var mkdirpSync = require_mkdirs2().mkdirpSync;
48097
+ var stat = require_stat2();
48098
+ function moveSync(src, dest, opts) {
48099
+ opts = opts || {};
48100
+ const overwrite = opts.overwrite || opts.clobber || false;
48101
+ const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
48102
+ stat.checkParentPathsSync(src, srcStat, dest, "move");
48103
+ if (!isParentRoot(dest))
48104
+ mkdirpSync(path2.dirname(dest));
48105
+ return doRename(src, dest, overwrite, isChangingCase);
48106
+ }
48107
+ function isParentRoot(dest) {
48108
+ const parent = path2.dirname(dest);
48109
+ const parsedPath = path2.parse(parent);
48110
+ return parsedPath.root === parent;
48111
+ }
48112
+ function doRename(src, dest, overwrite, isChangingCase) {
48113
+ if (isChangingCase)
48114
+ return rename(src, dest, overwrite);
48115
+ if (overwrite) {
48116
+ removeSync2(dest);
48117
+ return rename(src, dest, overwrite);
48118
+ }
48119
+ if (fs.existsSync(dest))
48120
+ throw new Error("dest already exists.");
48121
+ return rename(src, dest, overwrite);
48122
+ }
48123
+ function rename(src, dest, overwrite) {
48124
+ try {
48125
+ fs.renameSync(src, dest);
48126
+ } catch (err) {
48127
+ if (err.code !== "EXDEV")
48128
+ throw err;
48129
+ return moveAcrossDevice(src, dest, overwrite);
48130
+ }
48131
+ }
48132
+ function moveAcrossDevice(src, dest, overwrite) {
48133
+ const opts = {
48134
+ overwrite,
48135
+ errorOnExist: true,
48136
+ preserveTimestamps: true
48137
+ };
48138
+ copySync(src, dest, opts);
48139
+ return removeSync2(src);
48140
+ }
48141
+ module2.exports = moveSync;
48142
+ }
48143
+ });
48144
+
48145
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js
48146
+ var require_move4 = __commonJS({
48147
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js"(exports, module2) {
48148
+ "use strict";
48149
+ var u = require_universalify2().fromCallback;
48150
+ module2.exports = {
48151
+ move: u(require_move3()),
48152
+ moveSync: require_move_sync2()
48153
+ };
48154
+ }
48155
+ });
48156
+
48157
+ // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js
48158
+ var require_lib6 = __commonJS({
48159
+ "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js"(exports, module2) {
48160
+ "use strict";
48161
+ module2.exports = {
48162
+ // Export promiseified graceful-fs:
48163
+ ...require_fs8(),
48164
+ // Export extra methods:
48165
+ ...require_copy4(),
48166
+ ...require_empty3(),
48167
+ ...require_ensure2(),
48168
+ ...require_json3(),
48169
+ ...require_mkdirs2(),
48170
+ ...require_move4(),
48171
+ ...require_output_file2(),
48172
+ ...require_path_exists2(),
48173
+ ...require_remove2()
48174
+ };
48175
+ }
48176
+ });
48177
+
46546
48178
  // node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js
46547
48179
  var require_brace_expansion2 = __commonJS({
46548
48180
  "node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js"(exports, module2) {
@@ -47662,7 +49294,7 @@ var require_chunk_UIX4URMV = __commonJS({
47662
49294
  });
47663
49295
 
47664
49296
  // node_modules/.pnpm/joycon@3.1.1/node_modules/joycon/lib/index.js
47665
- var require_lib6 = __commonJS({
49297
+ var require_lib7 = __commonJS({
47666
49298
  "node_modules/.pnpm/joycon@3.1.1/node_modules/joycon/lib/index.js"(exports, module2) {
47667
49299
  "use strict";
47668
49300
  Object.defineProperty(exports, "__esModule", {
@@ -48405,7 +50037,7 @@ var require_chunk_7G76EW2R = __commonJS({
48405
50037
  var _chunkGQ77QZBOjs = require_chunk_GQ77QZBO();
48406
50038
  var _fs = require("fs");
48407
50039
  var _fs2 = _interopRequireDefault(_fs);
48408
- var _joycon = require_lib6();
50040
+ var _joycon = require_lib7();
48409
50041
  var _joycon2 = _interopRequireDefault(_joycon);
48410
50042
  var _path = require("path");
48411
50043
  var _path2 = _interopRequireDefault(_path);
@@ -51668,7 +53300,7 @@ var require_base = __commonJS({
51668
53300
  });
51669
53301
 
51670
53302
  // node_modules/.pnpm/sucrase@3.34.0/node_modules/sucrase/dist/parser/traverser/util.js
51671
- var require_util3 = __commonJS({
53303
+ var require_util4 = __commonJS({
51672
53304
  "node_modules/.pnpm/sucrase@3.34.0/node_modules/sucrase/dist/parser/traverser/util.js"(exports) {
51673
53305
  "use strict";
51674
53306
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -61234,7 +62866,7 @@ var require_tokenizer = __commonJS({
61234
62866
  return obj && obj.__esModule ? obj : { default: obj };
61235
62867
  }
61236
62868
  var _base = require_base();
61237
- var _util = require_util3();
62869
+ var _util = require_util4();
61238
62870
  var _charcodes = require_charcodes();
61239
62871
  var _identifier = require_identifier2();
61240
62872
  var _whitespace = require_whitespace();
@@ -64734,7 +66366,7 @@ var require_NameManager = __commonJS({
64734
66366
  });
64735
66367
 
64736
66368
  // node_modules/.pnpm/ts-interface-checker@0.1.13/node_modules/ts-interface-checker/dist/util.js
64737
- var require_util4 = __commonJS({
66369
+ var require_util5 = __commonJS({
64738
66370
  "node_modules/.pnpm/ts-interface-checker@0.1.13/node_modules/ts-interface-checker/dist/util.js"(exports) {
64739
66371
  "use strict";
64740
66372
  var __extends2 = exports && exports.__extends || function() {
@@ -64901,7 +66533,7 @@ var require_types4 = __commonJS({
64901
66533
  }();
64902
66534
  Object.defineProperty(exports, "__esModule", { value: true });
64903
66535
  exports.basicTypes = exports.BasicType = exports.TParamList = exports.TParam = exports.param = exports.TFunc = exports.func = exports.TProp = exports.TOptional = exports.opt = exports.TIface = exports.iface = exports.TEnumLiteral = exports.enumlit = exports.TEnumType = exports.enumtype = exports.TIntersection = exports.intersection = exports.TUnion = exports.union = exports.TTuple = exports.tuple = exports.TArray = exports.array = exports.TLiteral = exports.lit = exports.TName = exports.name = exports.TType = void 0;
64904
- var util_1 = require_util4();
66536
+ var util_1 = require_util5();
64905
66537
  var TType = (
64906
66538
  /** @class */
64907
66539
  function() {
@@ -65532,7 +67164,7 @@ var require_dist4 = __commonJS({
65532
67164
  Object.defineProperty(exports, "__esModule", { value: true });
65533
67165
  exports.Checker = exports.createCheckers = void 0;
65534
67166
  var types_1 = require_types4();
65535
- var util_1 = require_util4();
67167
+ var util_1 = require_util5();
65536
67168
  var types_2 = require_types4();
65537
67169
  Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
65538
67170
  return types_2.TArray;
@@ -65618,7 +67250,7 @@ var require_dist4 = __commonJS({
65618
67250
  Object.defineProperty(exports, "BasicType", { enumerable: true, get: function() {
65619
67251
  return types_2.BasicType;
65620
67252
  } });
65621
- var util_2 = require_util4();
67253
+ var util_2 = require_util5();
65622
67254
  Object.defineProperty(exports, "VError", { enumerable: true, get: function() {
65623
67255
  return util_2.VError;
65624
67256
  } });
@@ -65837,7 +67469,7 @@ var require_lval = __commonJS({
65837
67469
  var _types = require_types3();
65838
67470
  var _base = require_base();
65839
67471
  var _expression = require_expression();
65840
- var _util = require_util3();
67472
+ var _util = require_util4();
65841
67473
  function parseSpread() {
65842
67474
  _index.next.call(void 0);
65843
67475
  _expression.parseMaybeAssign.call(void 0, false);
@@ -65984,7 +67616,7 @@ var require_typescript2 = __commonJS({
65984
67616
  var _expression = require_expression();
65985
67617
  var _lval = require_lval();
65986
67618
  var _statement = require_statement();
65987
- var _util = require_util3();
67619
+ var _util = require_util4();
65988
67620
  var _jsx = require_jsx();
65989
67621
  function tsIsIdentifier() {
65990
67622
  return _index.match.call(void 0, _types.TokenType.name);
@@ -67295,7 +68927,7 @@ var require_jsx = __commonJS({
67295
68927
  var _types = require_types3();
67296
68928
  var _base = require_base();
67297
68929
  var _expression = require_expression();
67298
- var _util = require_util3();
68930
+ var _util = require_util4();
67299
68931
  var _charcodes = require_charcodes();
67300
68932
  var _identifier = require_identifier2();
67301
68933
  var _typescript = require_typescript2();
@@ -67608,7 +69240,7 @@ var require_expression = __commonJS({
67608
69240
  var _base = require_base();
67609
69241
  var _lval = require_lval();
67610
69242
  var _statement = require_statement();
67611
- var _util = require_util3();
69243
+ var _util = require_util4();
67612
69244
  var StopState = class {
67613
69245
  constructor(stop) {
67614
69246
  this.stop = stop;
@@ -68342,7 +69974,7 @@ var require_flow = __commonJS({
68342
69974
  var _base = require_base();
68343
69975
  var _expression = require_expression();
68344
69976
  var _statement = require_statement();
68345
- var _util = require_util3();
69977
+ var _util = require_util4();
68346
69978
  function isMaybeDefaultImport(lookahead) {
68347
69979
  return (lookahead.type === _types.TokenType.name || !!(lookahead.type & _types.TokenType.IS_KEYWORD)) && lookahead.contextualKeyword !== _keywords.ContextualKeyword._from;
68348
69980
  }
@@ -69233,7 +70865,7 @@ var require_statement = __commonJS({
69233
70865
  var _base = require_base();
69234
70866
  var _expression = require_expression();
69235
70867
  var _lval = require_lval();
69236
- var _util = require_util3();
70868
+ var _util = require_util4();
69237
70869
  function parseTopLevel() {
69238
70870
  parseBlockBody(_types.TokenType.eof);
69239
70871
  _base.state.scopes.push(new (0, _state.Scope)(0, _base.state.tokens.length, true));
@@ -73730,7 +75362,7 @@ var require_url = __commonJS({
73730
75362
  });
73731
75363
 
73732
75364
  // node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/util.js
73733
- var require_util5 = __commonJS({
75365
+ var require_util6 = __commonJS({
73734
75366
  "node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/util.js"(exports) {
73735
75367
  var URL2 = require_url();
73736
75368
  function getArg(aArgs, aName, aDefaultValue) {
@@ -74052,7 +75684,7 @@ var require_array_set = __commonJS({
74052
75684
  // node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/mapping-list.js
74053
75685
  var require_mapping_list = __commonJS({
74054
75686
  "node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/mapping-list.js"(exports) {
74055
- var util2 = require_util5();
75687
+ var util2 = require_util6();
74056
75688
  function generatedPositionAfter(mappingA, mappingB) {
74057
75689
  const lineA = mappingA.generatedLine;
74058
75690
  const lineB = mappingB.generatedLine;
@@ -74114,7 +75746,7 @@ var require_mapping_list = __commonJS({
74114
75746
  var require_source_map_generator = __commonJS({
74115
75747
  "node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/source-map-generator.js"(exports) {
74116
75748
  var base64VLQ = require_base64_vlq();
74117
- var util2 = require_util5();
75749
+ var util2 = require_util6();
74118
75750
  var ArraySet = require_array_set().ArraySet;
74119
75751
  var MappingList = require_mapping_list().MappingList;
74120
75752
  var SourceMapGenerator = class _SourceMapGenerator {
@@ -74623,7 +76255,7 @@ var require_wasm = __commonJS({
74623
76255
  // node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/source-map-consumer.js
74624
76256
  var require_source_map_consumer = __commonJS({
74625
76257
  "node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/source-map-consumer.js"(exports) {
74626
- var util2 = require_util5();
76258
+ var util2 = require_util6();
74627
76259
  var binarySearch = require_binary_search();
74628
76260
  var ArraySet = require_array_set().ArraySet;
74629
76261
  var base64VLQ = require_base64_vlq();
@@ -75385,7 +77017,7 @@ var require_source_map_consumer = __commonJS({
75385
77017
  var require_source_node = __commonJS({
75386
77018
  "node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/source-node.js"(exports) {
75387
77019
  var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
75388
- var util2 = require_util5();
77020
+ var util2 = require_util6();
75389
77021
  var REGEX_NEWLINE = /(\r?\n)/;
75390
77022
  var NEWLINE_CODE = 10;
75391
77023
  var isSourceNode = "$$$isSourceNode$$$";
@@ -109189,7 +110821,7 @@ var environmentPlugin = (data) => ({
109189
110821
 
109190
110822
  // packages/workspace-tools/src/executors/tsup/executor.ts
109191
110823
  var import_fs3 = require("fs");
109192
- var import_fs_extra = __toESM(require_lib4());
110824
+ var import_fs_extra = __toESM(require_lib6());
109193
110825
  var import_promises2 = require("fs/promises");
109194
110826
 
109195
110827
  // node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/mjs/index.js
@@ -115367,7 +116999,6 @@ var glob = Object.assign(glob_, {
115367
116999
  glob.glob = glob;
115368
117000
 
115369
117001
  // packages/workspace-tools/src/executors/tsup/executor.ts
115370
- var import_project_graph = require("nx/src/project-graph/project-graph");
115371
117002
  var import_fileutils = require("nx/src/utils/fileutils");
115372
117003
  var import_path4 = require("path");
115373
117004
  var import_prettier = require("prettier");
@@ -115444,13 +117075,13 @@ function modernConfig({
115444
117075
  }
115445
117076
  }
115446
117077
  },
115447
- minify: debug ? false : "terser",
117078
+ /*minify: debug ? false : "terser",
115448
117079
  terserOptions: {
115449
117080
  compress: true,
115450
117081
  ecma: 2020,
115451
117082
  keep_classnames: true,
115452
117083
  keep_fnames: true
115453
- },
117084
+ },*/
115454
117085
  apiReport,
115455
117086
  docModel,
115456
117087
  tsdocMetadata,
@@ -115512,13 +117143,13 @@ function legacyConfig({
115512
117143
  }
115513
117144
  }
115514
117145
  },
115515
- minify: debug ? false : "terser",
117146
+ /*minify: debug ? false : "terser",
115516
117147
  terserOptions: {
115517
117148
  compress: true,
115518
117149
  ecma: 2020,
115519
117150
  keep_classnames: true,
115520
117151
  keep_fnames: true
115521
- },
117152
+ },*/
115522
117153
  apiReport: false,
115523
117154
  docModel: false,
115524
117155
  tsdocMetadata: false,
@@ -115583,13 +117214,13 @@ function workerConfig({
115583
117214
  }
115584
117215
  }
115585
117216
  },
115586
- minify: debug ? false : "terser",
117217
+ /*minify: debug ? false : "terser",
115587
117218
  terserOptions: {
115588
117219
  compress: true,
115589
117220
  ecma: 2020,
115590
117221
  keep_classnames: true,
115591
117222
  keep_fnames: true
115592
- },
117223
+ },*/
115593
117224
  apiReport,
115594
117225
  docModel,
115595
117226
  tsdocMetadata,
@@ -115609,7 +117240,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
115609
117240
  }) {
115610
117241
  const entry = globSync(
115611
117242
  [
115612
- rest.entry ? rest.entry : (0, import_path3.join)(sourceRoot, "index.ts"),
117243
+ rest.entry ? rest.entry : (0, import_path3.join)(sourceRoot, "**/*.{ts,tsx}"),
115613
117244
  ...additionalEntryPoints ?? []
115614
117245
  ],
115615
117246
  {
@@ -115761,7 +117392,7 @@ ${externalDependencies.map((dep) => {
115761
117392
  }
115762
117393
  }
115763
117394
  }
115764
- const projectGraph = await (0, import_project_graph.buildProjectGraphWithoutDaemon)();
117395
+ const projectGraph = (0, import_devkit.readCachedProjectGraph)();
115765
117396
  const pathToPackageJson = (0, import_path4.join)(context.root, projectRoot, "package.json");
115766
117397
  const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
115767
117398
  delete packageJson.dependencies;