@storm-software/workspace-tools 1.49.12 → 1.49.14

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.
@@ -27827,7 +27827,7 @@ var require_fill_range = __commonJS({
27827
27827
  let padded = zeros(startString) || zeros(endString) || zeros(stepString);
27828
27828
  let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
27829
27829
  let toNumber = padded === false && stringify(start, end, options) === false;
27830
- let format3 = options.transform || transform(toNumber);
27830
+ let format2 = options.transform || transform(toNumber);
27831
27831
  if (options.toRegex && step === 1) {
27832
27832
  return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
27833
27833
  }
@@ -27839,7 +27839,7 @@ var require_fill_range = __commonJS({
27839
27839
  if (options.toRegex === true && step > 1) {
27840
27840
  push(a);
27841
27841
  } else {
27842
- range.push(pad(format3(a, index), maxLen, toNumber));
27842
+ range.push(pad(format2(a, index), maxLen, toNumber));
27843
27843
  }
27844
27844
  a = descending ? a - step : a + step;
27845
27845
  index++;
@@ -27853,7 +27853,7 @@ var require_fill_range = __commonJS({
27853
27853
  if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
27854
27854
  return invalidRange(start, end, options);
27855
27855
  }
27856
- let format3 = options.transform || ((val) => String.fromCharCode(val));
27856
+ let format2 = options.transform || ((val) => String.fromCharCode(val));
27857
27857
  let a = `${start}`.charCodeAt(0);
27858
27858
  let b = `${end}`.charCodeAt(0);
27859
27859
  let descending = a > b;
@@ -27865,7 +27865,7 @@ var require_fill_range = __commonJS({
27865
27865
  let range = [];
27866
27866
  let index = 0;
27867
27867
  while (descending ? a >= b : a <= b) {
27868
- range.push(format3(a, index));
27868
+ range.push(format2(a, index));
27869
27869
  a = descending ? a - step : a + step;
27870
27870
  index++;
27871
27871
  }
@@ -29907,11 +29907,11 @@ var require_picomatch = __commonJS({
29907
29907
  return { isMatch: false, output: "" };
29908
29908
  }
29909
29909
  const opts = options || {};
29910
- const format3 = opts.format || (posix2 ? utils.toPosixSlashes : null);
29910
+ const format2 = opts.format || (posix2 ? utils.toPosixSlashes : null);
29911
29911
  let match2 = input === glob2;
29912
- let output = match2 && format3 ? format3(input) : input;
29912
+ let output = match2 && format2 ? format2(input) : input;
29913
29913
  if (match2 === false) {
29914
- output = format3 ? format3(input) : input;
29914
+ output = format2 ? format2(input) : input;
29915
29915
  match2 = output === glob2;
29916
29916
  }
29917
29917
  if (match2 === false || opts.capture === true) {
@@ -32511,157 +32511,6 @@ var require_normalize_options = __commonJS({
32511
32511
  }
32512
32512
  });
32513
32513
 
32514
- // node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js
32515
- var require_brace_expansion2 = __commonJS({
32516
- "node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js"(exports, module2) {
32517
- var balanced = require_balanced_match();
32518
- module2.exports = expandTop;
32519
- var escSlash = "\0SLASH" + Math.random() + "\0";
32520
- var escOpen = "\0OPEN" + Math.random() + "\0";
32521
- var escClose = "\0CLOSE" + Math.random() + "\0";
32522
- var escComma = "\0COMMA" + Math.random() + "\0";
32523
- var escPeriod = "\0PERIOD" + Math.random() + "\0";
32524
- function numeric(str) {
32525
- return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
32526
- }
32527
- function escapeBraces(str) {
32528
- return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
32529
- }
32530
- function unescapeBraces(str) {
32531
- return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
32532
- }
32533
- function parseCommaParts(str) {
32534
- if (!str)
32535
- return [""];
32536
- var parts = [];
32537
- var m = balanced("{", "}", str);
32538
- if (!m)
32539
- return str.split(",");
32540
- var pre = m.pre;
32541
- var body = m.body;
32542
- var post = m.post;
32543
- var p = pre.split(",");
32544
- p[p.length - 1] += "{" + body + "}";
32545
- var postParts = parseCommaParts(post);
32546
- if (post.length) {
32547
- p[p.length - 1] += postParts.shift();
32548
- p.push.apply(p, postParts);
32549
- }
32550
- parts.push.apply(parts, p);
32551
- return parts;
32552
- }
32553
- function expandTop(str) {
32554
- if (!str)
32555
- return [];
32556
- if (str.substr(0, 2) === "{}") {
32557
- str = "\\{\\}" + str.substr(2);
32558
- }
32559
- return expand2(escapeBraces(str), true).map(unescapeBraces);
32560
- }
32561
- function embrace(str) {
32562
- return "{" + str + "}";
32563
- }
32564
- function isPadded(el) {
32565
- return /^-?0\d/.test(el);
32566
- }
32567
- function lte(i, y) {
32568
- return i <= y;
32569
- }
32570
- function gte(i, y) {
32571
- return i >= y;
32572
- }
32573
- function expand2(str, isTop) {
32574
- var expansions = [];
32575
- var m = balanced("{", "}", str);
32576
- if (!m)
32577
- return [str];
32578
- var pre = m.pre;
32579
- var post = m.post.length ? expand2(m.post, false) : [""];
32580
- if (/\$$/.test(m.pre)) {
32581
- for (var k = 0; k < post.length; k++) {
32582
- var expansion = pre + "{" + m.body + "}" + post[k];
32583
- expansions.push(expansion);
32584
- }
32585
- } else {
32586
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
32587
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
32588
- var isSequence = isNumericSequence || isAlphaSequence;
32589
- var isOptions = m.body.indexOf(",") >= 0;
32590
- if (!isSequence && !isOptions) {
32591
- if (m.post.match(/,.*\}/)) {
32592
- str = m.pre + "{" + m.body + escClose + m.post;
32593
- return expand2(str);
32594
- }
32595
- return [str];
32596
- }
32597
- var n;
32598
- if (isSequence) {
32599
- n = m.body.split(/\.\./);
32600
- } else {
32601
- n = parseCommaParts(m.body);
32602
- if (n.length === 1) {
32603
- n = expand2(n[0], false).map(embrace);
32604
- if (n.length === 1) {
32605
- return post.map(function(p) {
32606
- return m.pre + n[0] + p;
32607
- });
32608
- }
32609
- }
32610
- }
32611
- var N;
32612
- if (isSequence) {
32613
- var x = numeric(n[0]);
32614
- var y = numeric(n[1]);
32615
- var width = Math.max(n[0].length, n[1].length);
32616
- var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
32617
- var test = lte;
32618
- var reverse = y < x;
32619
- if (reverse) {
32620
- incr *= -1;
32621
- test = gte;
32622
- }
32623
- var pad = n.some(isPadded);
32624
- N = [];
32625
- for (var i = x; test(i, y); i += incr) {
32626
- var c;
32627
- if (isAlphaSequence) {
32628
- c = String.fromCharCode(i);
32629
- if (c === "\\")
32630
- c = "";
32631
- } else {
32632
- c = String(i);
32633
- if (pad) {
32634
- var need = width - c.length;
32635
- if (need > 0) {
32636
- var z = new Array(need + 1).join("0");
32637
- if (i < 0)
32638
- c = "-" + z + c.slice(1);
32639
- else
32640
- c = z + c;
32641
- }
32642
- }
32643
- }
32644
- N.push(c);
32645
- }
32646
- } else {
32647
- N = [];
32648
- for (var j = 0; j < n.length; j++) {
32649
- N.push.apply(N, expand2(n[j], false));
32650
- }
32651
- }
32652
- for (var j = 0; j < N.length; j++) {
32653
- for (var k = 0; k < post.length; k++) {
32654
- var expansion = pre + N[j] + post[k];
32655
- if (!isTop || isSequence || expansion)
32656
- expansions.push(expansion);
32657
- }
32658
- }
32659
- }
32660
- return expansions;
32661
- }
32662
- }
32663
- });
32664
-
32665
32514
  // node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.38.3_@swc+core@1._obsfvncdmdnopsocrl4rw2efcm/node_modules/tsup/dist/chunk-EPAEWGCP.js
32666
32515
  var require_chunk_EPAEWGCP = __commonJS({
32667
32516
  "node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.38.3_@swc+core@1._obsfvncdmdnopsocrl4rw2efcm/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
@@ -34488,21 +34337,21 @@ var require_chunk_GQ77QZBO = __commonJS({
34488
34337
  }
34489
34338
  }
34490
34339
  function defaultOutExtension({
34491
- format: format3,
34340
+ format: format2,
34492
34341
  pkgType
34493
34342
  }) {
34494
34343
  let jsExtension = ".js";
34495
34344
  let dtsExtension = ".d.ts";
34496
34345
  const isModule = pkgType === "module";
34497
- if (isModule && format3 === "cjs") {
34346
+ if (isModule && format2 === "cjs") {
34498
34347
  jsExtension = ".cjs";
34499
34348
  dtsExtension = ".d.cts";
34500
34349
  }
34501
- if (!isModule && format3 === "esm") {
34350
+ if (!isModule && format2 === "esm") {
34502
34351
  jsExtension = ".mjs";
34503
34352
  dtsExtension = ".d.mts";
34504
34353
  }
34505
- if (format3 === "iife") {
34354
+ if (format2 === "iife") {
34506
34355
  jsExtension = ".global.js";
34507
34356
  }
34508
34357
  return {
@@ -35327,8 +35176,8 @@ var require_dist3 = __commonJS({
35327
35176
  return "cjs";
35328
35177
  }
35329
35178
  var usingDynamicImport = typeof jest === "undefined";
35330
- var dynamicImport = async (id, { format: format3 }) => {
35331
- const fn = format3 === "esm" ? (file) => import(file) : false ? createRequire(import_meta.url) : require;
35179
+ var dynamicImport = async (id, { format: format2 }) => {
35180
+ const fn = format2 === "esm" ? (file) => import(file) : false ? createRequire(import_meta.url) : require;
35332
35181
  return fn(id);
35333
35182
  };
35334
35183
  var getRandomId = () => {
@@ -35345,9 +35194,9 @@ var require_dist3 = __commonJS({
35345
35194
  return "ts";
35346
35195
  return ext2.slice(1);
35347
35196
  }
35348
- var defaultGetOutputFile = (filepath, format3) => filepath.replace(
35197
+ var defaultGetOutputFile = (filepath, format2) => filepath.replace(
35349
35198
  JS_EXT_RE,
35350
- `.bundled_${getRandomId()}.${format3 === "esm" ? "mjs" : "cjs"}`
35199
+ `.bundled_${getRandomId()}.${format2 === "esm" ? "mjs" : "cjs"}`
35351
35200
  );
35352
35201
  var tsconfigPathsToRegExp = (paths) => {
35353
35202
  return Object.keys(paths || {}).map((key) => {
@@ -35427,7 +35276,7 @@ var require_dist3 = __commonJS({
35427
35276
  }
35428
35277
  const preserveTemporaryFile = (_a = options.preserveTemporaryFile) != null ? _a : !!process.env.BUNDLE_REQUIRE_PRESERVE;
35429
35278
  const cwd = options.cwd || process.cwd();
35430
- const format3 = (_b = options.format) != null ? _b : guessFormat(options.filepath);
35279
+ const format2 = (_b = options.format) != null ? _b : guessFormat(options.filepath);
35431
35280
  const tsconfig = (0, import_load_tsconfig.loadTsConfig)(cwd, options.tsconfig);
35432
35281
  const resolvePaths = tsconfigPathsToRegExp(
35433
35282
  ((_c = tsconfig == null ? void 0 : tsconfig.data.compilerOptions) == null ? void 0 : _c.paths) || {}
@@ -35438,14 +35287,14 @@ var require_dist3 = __commonJS({
35438
35287
  }
35439
35288
  const { text } = result.outputFiles[0];
35440
35289
  const getOutputFile = options.getOutputFile || defaultGetOutputFile;
35441
- const outfile = getOutputFile(options.filepath, format3);
35290
+ const outfile = getOutputFile(options.filepath, format2);
35442
35291
  await import_fs2.default.promises.writeFile(outfile, text, "utf8");
35443
35292
  let mod;
35444
35293
  const req = options.require || dynamicImport;
35445
35294
  try {
35446
35295
  mod = await req(
35447
- format3 === "esm" ? (0, import_url3.pathToFileURL)(outfile).href : outfile,
35448
- { format: format3 }
35296
+ format2 === "esm" ? (0, import_url3.pathToFileURL)(outfile).href : outfile,
35297
+ { format: format2 }
35449
35298
  );
35450
35299
  } finally {
35451
35300
  if (!preserveTemporaryFile) {
@@ -35463,7 +35312,7 @@ var require_dist3 = __commonJS({
35463
35312
  entryPoints: [options.filepath],
35464
35313
  absWorkingDir: cwd,
35465
35314
  outfile: "out.js",
35466
- format: format3,
35315
+ format: format2,
35467
35316
  platform: "node",
35468
35317
  sourcemap: "inline",
35469
35318
  bundle: true,
@@ -35732,12 +35581,12 @@ var require_chunk_7G76EW2R = __commonJS({
35732
35581
  var padRight = (str, maxLength) => {
35733
35582
  return str + " ".repeat(maxLength - str.length);
35734
35583
  };
35735
- var reportSize = (logger, format3, files) => {
35584
+ var reportSize = (logger, format2, files) => {
35736
35585
  const filenames = Object.keys(files);
35737
35586
  const maxLength = getLengthOfLongestString(filenames) + 1;
35738
35587
  for (const name of filenames) {
35739
35588
  logger.success(
35740
- format3,
35589
+ format2,
35741
35590
  `${_chunkUIX4URMVjs.bold.call(void 0, padRight(name, maxLength))}${_chunkUIX4URMVjs.green.call(
35742
35591
  void 0,
35743
35592
  prettyBytes(files[name])
@@ -63053,11 +62902,11 @@ Original error: ${originalError.message}`,
63053
62902
  message: `setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook.`
63054
62903
  };
63055
62904
  }
63056
- function logInvalidFormatForTopLevelAwait(id, format3) {
62905
+ function logInvalidFormatForTopLevelAwait(id, format2) {
63057
62906
  return {
63058
62907
  code: INVALID_TLA_FORMAT,
63059
62908
  id,
63060
- message: `Module format "${format3}" does not support top-level await. Use the "es" or "system" output formats rather.`
62909
+ message: `Module format "${format2}" does not support top-level await. Use the "es" or "system" output formats rather.`
63061
62910
  };
63062
62911
  }
63063
62912
  function logMissingConfig() {
@@ -69331,11 +69180,11 @@ var require_rollup = __commonJS({
69331
69180
  return { isMatch: false, output: "" };
69332
69181
  }
69333
69182
  const opts = options || {};
69334
- const format3 = opts.format || (posix2 ? utils.toPosixSlashes : null);
69183
+ const format2 = opts.format || (posix2 ? utils.toPosixSlashes : null);
69335
69184
  let match2 = input === glob2;
69336
- let output = match2 && format3 ? format3(input) : input;
69185
+ let output = match2 && format2 ? format2(input) : input;
69337
69186
  if (match2 === false) {
69338
- output = format3 ? format3(input) : input;
69187
+ output = format2 ? format2(input) : input;
69339
69188
  match2 = output === glob2;
69340
69189
  }
69341
69190
  if (match2 === false || opts.capture === true) {
@@ -70898,11 +70747,11 @@ var require_rollup = __commonJS({
70898
70747
  addReturnExpression(expression) {
70899
70748
  this.parent instanceof _ChildScope && this.parent.addReturnExpression(expression);
70900
70749
  }
70901
- addUsedOutsideNames(usedNames, format3, exportNamesByVariable, accessedGlobalsByScope) {
70750
+ addUsedOutsideNames(usedNames, format2, exportNamesByVariable, accessedGlobalsByScope) {
70902
70751
  for (const variable of this.accessedOutsideVariables.values()) {
70903
70752
  if (variable.included) {
70904
70753
  usedNames.add(variable.getBaseVariableName());
70905
- if (format3 === "system" && exportNamesByVariable.has(variable)) {
70754
+ if (format2 === "system" && exportNamesByVariable.has(variable)) {
70906
70755
  usedNames.add("exports");
70907
70756
  }
70908
70757
  }
@@ -70917,9 +70766,9 @@ var require_rollup = __commonJS({
70917
70766
  contains(name) {
70918
70767
  return this.variables.has(name) || this.parent.contains(name);
70919
70768
  }
70920
- deconflict(format3, exportNamesByVariable, accessedGlobalsByScope) {
70769
+ deconflict(format2, exportNamesByVariable, accessedGlobalsByScope) {
70921
70770
  const usedNames = /* @__PURE__ */ new Set();
70922
- this.addUsedOutsideNames(usedNames, format3, exportNamesByVariable, accessedGlobalsByScope);
70771
+ this.addUsedOutsideNames(usedNames, format2, exportNamesByVariable, accessedGlobalsByScope);
70923
70772
  if (this.accessedDynamicImports) {
70924
70773
  for (const importExpression of this.accessedDynamicImports) {
70925
70774
  if (importExpression.inlineNamespace) {
@@ -70933,7 +70782,7 @@ var require_rollup = __commonJS({
70933
70782
  }
70934
70783
  }
70935
70784
  for (const scope of this.children) {
70936
- scope.deconflict(format3, exportNamesByVariable, accessedGlobalsByScope);
70785
+ scope.deconflict(format2, exportNamesByVariable, accessedGlobalsByScope);
70937
70786
  }
70938
70787
  }
70939
70788
  findLexicalBoundary() {
@@ -74030,10 +73879,10 @@ var require_rollup = __commonJS({
74030
73879
  super.parseNode(esTreeNode);
74031
73880
  }
74032
73881
  render(code, options) {
74033
- const { exportNamesByVariable, format: format3, snippets: { _, getPropertyAccess } } = options;
73882
+ const { exportNamesByVariable, format: format2, snippets: { _, getPropertyAccess } } = options;
74034
73883
  if (this.id) {
74035
73884
  const { variable, name } = this.id;
74036
- if (format3 === "system" && exportNamesByVariable.has(variable)) {
73885
+ if (format2 === "system" && exportNamesByVariable.has(variable)) {
74037
73886
  code.appendLeft(this.end, `${_}${getSystemExportStatement([variable], options)};`);
74038
73887
  }
74039
73888
  const renderedVariable = variable.getName(getPropertyAccess);
@@ -74380,19 +74229,19 @@ var require_rollup = __commonJS({
74380
74229
  applyDeoptimizations() {
74381
74230
  }
74382
74231
  renderNamedDeclaration(code, declarationStart, idInsertPosition, options) {
74383
- const { exportNamesByVariable, format: format3, snippets: { getPropertyAccess } } = options;
74232
+ const { exportNamesByVariable, format: format2, snippets: { getPropertyAccess } } = options;
74384
74233
  const name = this.variable.getName(getPropertyAccess);
74385
74234
  code.remove(this.start, declarationStart);
74386
74235
  if (idInsertPosition !== null) {
74387
74236
  code.appendLeft(idInsertPosition, ` ${name}`);
74388
74237
  }
74389
- if (format3 === "system" && this.declaration instanceof ClassDeclaration && exportNamesByVariable.has(this.variable)) {
74238
+ if (format2 === "system" && this.declaration instanceof ClassDeclaration && exportNamesByVariable.has(this.variable)) {
74390
74239
  code.appendLeft(this.end, ` ${getSystemExportStatement([this.variable], options)};`);
74391
74240
  }
74392
74241
  }
74393
- renderVariableDeclaration(code, declarationStart, { format: format3, exportNamesByVariable, snippets: { cnst, getPropertyAccess } }) {
74242
+ renderVariableDeclaration(code, declarationStart, { format: format2, exportNamesByVariable, snippets: { cnst, getPropertyAccess } }) {
74394
74243
  const hasTrailingSemicolon = code.original.charCodeAt(this.end - 1) === 59;
74395
- const systemExportNames = format3 === "system" && exportNamesByVariable.get(this.variable);
74244
+ const systemExportNames = format2 === "system" && exportNamesByVariable.get(this.variable);
74396
74245
  if (systemExportNames) {
74397
74246
  code.overwrite(this.start, declarationStart, `${cnst} ${this.variable.getName(getPropertyAccess)} = exports('${systemExportNames[0]}', `);
74398
74247
  code.appendRight(hasTrailingSemicolon ? this.end - 1 : this.end, ")" + (hasTrailingSemicolon ? "" : ";"));
@@ -75096,13 +74945,13 @@ var require_rollup = __commonJS({
75096
74945
  }
75097
74946
  }
75098
74947
  setExternalResolution(exportMode, resolution, options, snippets, pluginDriver, accessedGlobalsByScope, resolutionString, namespaceExportName, attributes) {
75099
- const { format: format3 } = options;
74948
+ const { format: format2 } = options;
75100
74949
  this.inlineNamespace = null;
75101
74950
  this.resolution = resolution;
75102
74951
  this.resolutionString = resolutionString;
75103
74952
  this.namespaceExportName = namespaceExportName;
75104
74953
  this.attributes = attributes;
75105
- const accessedGlobals = [...accessedImportGlobals[format3] || []];
74954
+ const accessedGlobals = [...accessedImportGlobals[format2] || []];
75106
74955
  let helper;
75107
74956
  ({ helper, mechanism: this.mechanism } = this.getDynamicImportMechanismAndHelper(resolution, exportMode, options, snippets, pluginDriver));
75108
74957
  if (helper) {
@@ -75117,11 +74966,11 @@ var require_rollup = __commonJS({
75117
74966
  }
75118
74967
  applyDeoptimizations() {
75119
74968
  }
75120
- getDynamicImportMechanismAndHelper(resolution, exportMode, { compact, dynamicImportInCjs, format: format3, generatedCode: { arrowFunctions }, interop }, { _, getDirectReturnFunction, getDirectReturnIifeLeft }, pluginDriver) {
74969
+ getDynamicImportMechanismAndHelper(resolution, exportMode, { compact, dynamicImportInCjs, format: format2, generatedCode: { arrowFunctions }, interop }, { _, getDirectReturnFunction, getDirectReturnIifeLeft }, pluginDriver) {
75121
74970
  const mechanism = pluginDriver.hookFirstSync("renderDynamicImport", [
75122
74971
  {
75123
74972
  customResolution: typeof this.resolution === "string" ? this.resolution : null,
75124
- format: format3,
74973
+ format: format2,
75125
74974
  moduleId: this.scope.context.module.id,
75126
74975
  targetModuleId: this.resolution && typeof this.resolution !== "string" ? this.resolution.id : null
75127
74976
  }
@@ -75130,7 +74979,7 @@ var require_rollup = __commonJS({
75130
74979
  return { helper: null, mechanism };
75131
74980
  }
75132
74981
  const hasDynamicTarget = !this.resolution || typeof this.resolution === "string";
75133
- switch (format3) {
74982
+ switch (format2) {
75134
74983
  case "cjs": {
75135
74984
  if (dynamicImportInCjs && (!resolution || typeof resolution === "string" || resolution instanceof ExternalModule)) {
75136
74985
  return { helper: null, mechanism: null };
@@ -75428,7 +75277,7 @@ var require_rollup = __commonJS({
75428
75277
  }
75429
75278
  }
75430
75279
  render(code, renderOptions) {
75431
- const { format: format3, pluginDriver, snippets } = renderOptions;
75280
+ const { format: format2, pluginDriver, snippets } = renderOptions;
75432
75281
  const { scope: { context: { module: module3 } }, meta: { name }, metaProperty, parent, preliminaryChunkId, referenceId, start, end } = this;
75433
75282
  const { id: moduleId } = module3;
75434
75283
  if (name !== IMPORT)
@@ -75438,18 +75287,18 @@ var require_rollup = __commonJS({
75438
75287
  const fileName = pluginDriver.getFileName(referenceId);
75439
75288
  const relativePath = parseAst_js.normalize(node_path.relative(node_path.dirname(chunkId), fileName));
75440
75289
  const replacement2 = pluginDriver.hookFirstSync("resolveFileUrl", [
75441
- { chunkId, fileName, format: format3, moduleId, referenceId, relativePath }
75442
- ]) || relativeUrlMechanisms[format3](relativePath);
75290
+ { chunkId, fileName, format: format2, moduleId, referenceId, relativePath }
75291
+ ]) || relativeUrlMechanisms[format2](relativePath);
75443
75292
  code.overwrite(parent.start, parent.end, replacement2, { contentOnly: true });
75444
75293
  return;
75445
75294
  }
75446
75295
  let replacement = pluginDriver.hookFirstSync("resolveImportMeta", [
75447
75296
  metaProperty,
75448
- { chunkId, format: format3, moduleId }
75297
+ { chunkId, format: format2, moduleId }
75449
75298
  ]);
75450
75299
  if (!replacement) {
75451
- replacement = importMetaMechanisms[format3]?.(metaProperty, { chunkId, snippets });
75452
- renderOptions.accessedDocumentCurrentScript ||= formatsMaybeAccessDocumentCurrentScript.includes(format3) && replacement !== "undefined";
75300
+ replacement = importMetaMechanisms[format2]?.(metaProperty, { chunkId, snippets });
75301
+ renderOptions.accessedDocumentCurrentScript ||= formatsMaybeAccessDocumentCurrentScript.includes(format2) && replacement !== "undefined";
75453
75302
  }
75454
75303
  if (typeof replacement === "string") {
75455
75304
  if (parent instanceof MemberExpression) {
@@ -75459,9 +75308,9 @@ var require_rollup = __commonJS({
75459
75308
  }
75460
75309
  }
75461
75310
  }
75462
- setResolution(format3, accessedGlobalsByScope, preliminaryChunkId) {
75311
+ setResolution(format2, accessedGlobalsByScope, preliminaryChunkId) {
75463
75312
  this.preliminaryChunkId = preliminaryChunkId;
75464
- const accessedGlobals = (this.metaProperty?.startsWith(FILE_PREFIX) ? accessedFileUrlGlobals : accessedMetaUrlGlobals)[format3];
75313
+ const accessedGlobals = (this.metaProperty?.startsWith(FILE_PREFIX) ? accessedFileUrlGlobals : accessedMetaUrlGlobals)[format2];
75465
75314
  if (accessedGlobals.length > 0) {
75466
75315
  this.scope.addAccessedGlobals(accessedGlobals, accessedGlobalsByScope);
75467
75316
  }
@@ -76224,9 +76073,9 @@ var require_rollup = __commonJS({
76224
76073
  }
76225
76074
  addNamespaceMemberAccess() {
76226
76075
  }
76227
- deconflict(format3, exportNamesByVariable, accessedGlobalsByScope) {
76076
+ deconflict(format2, exportNamesByVariable, accessedGlobalsByScope) {
76228
76077
  for (const scope of this.children)
76229
- scope.deconflict(format3, exportNamesByVariable, accessedGlobalsByScope);
76078
+ scope.deconflict(format2, exportNamesByVariable, accessedGlobalsByScope);
76230
76079
  }
76231
76080
  findLexicalBoundary() {
76232
76081
  return this;
@@ -76401,9 +76250,9 @@ var require_rollup = __commonJS({
76401
76250
  this.argument.setAssignedValue(UNKNOWN_EXPRESSION);
76402
76251
  }
76403
76252
  render(code, options) {
76404
- const { exportNamesByVariable, format: format3, snippets: { _ } } = options;
76253
+ const { exportNamesByVariable, format: format2, snippets: { _ } } = options;
76405
76254
  this.argument.render(code, options);
76406
- if (format3 === "system") {
76255
+ if (format2 === "system") {
76407
76256
  const variable = this.argument.variable;
76408
76257
  const exportNames = exportNamesByVariable.get(variable);
76409
76258
  if (exportNames) {
@@ -76780,7 +76629,7 @@ var require_rollup = __commonJS({
76780
76629
  }
76781
76630
  }
76782
76631
  renderBlock(options) {
76783
- const { exportNamesByVariable, format: format3, freeze, indent: t, symbols, snippets: { _, cnst, getObject, getPropertyAccess, n: n2, s } } = options;
76632
+ const { exportNamesByVariable, format: format2, freeze, indent: t, symbols, snippets: { _, cnst, getObject, getPropertyAccess, n: n2, s } } = options;
76784
76633
  const memberVariables = this.getMemberVariables();
76785
76634
  const members = Object.entries(memberVariables).filter(([_2, variable]) => variable.included).map(([name2, variable]) => {
76786
76635
  if (this.referencedEarly || variable.isReassigned || variable === this) {
@@ -76806,7 +76655,7 @@ var require_rollup = __commonJS({
76806
76655
  }
76807
76656
  const name = this.getName(getPropertyAccess);
76808
76657
  output = `${cnst} ${name}${_}=${_}${output};`;
76809
- if (format3 === "system" && exportNamesByVariable.has(this)) {
76658
+ if (format2 === "system" && exportNamesByVariable.has(this)) {
76810
76659
  output += `${n2}${getSystemExportStatement([this], options)};`;
76811
76660
  }
76812
76661
  return output;
@@ -78702,15 +78551,15 @@ ${outro}`;
78702
78551
  system: deconflictImportsEsmOrSystem,
78703
78552
  umd: deconflictImportsOther
78704
78553
  };
78705
- function deconflictChunk(modules, dependenciesToBeDeconflicted, imports, usedNames, format3, interop, preserveModules, externalLiveBindings, chunkByModule, externalChunkByModule, syntheticExports, exportNamesByVariable, accessedGlobalsByScope, includedNamespaces) {
78554
+ function deconflictChunk(modules, dependenciesToBeDeconflicted, imports, usedNames, format2, interop, preserveModules, externalLiveBindings, chunkByModule, externalChunkByModule, syntheticExports, exportNamesByVariable, accessedGlobalsByScope, includedNamespaces) {
78706
78555
  const reversedModules = [...modules].reverse();
78707
78556
  for (const module3 of reversedModules) {
78708
- module3.scope.addUsedOutsideNames(usedNames, format3, exportNamesByVariable, accessedGlobalsByScope);
78557
+ module3.scope.addUsedOutsideNames(usedNames, format2, exportNamesByVariable, accessedGlobalsByScope);
78709
78558
  }
78710
78559
  deconflictTopLevelVariables(usedNames, reversedModules, includedNamespaces);
78711
- DECONFLICT_IMPORTED_VARIABLES_BY_FORMAT[format3](usedNames, imports, dependenciesToBeDeconflicted, interop, preserveModules, externalLiveBindings, chunkByModule, externalChunkByModule, syntheticExports);
78560
+ DECONFLICT_IMPORTED_VARIABLES_BY_FORMAT[format2](usedNames, imports, dependenciesToBeDeconflicted, interop, preserveModules, externalLiveBindings, chunkByModule, externalChunkByModule, syntheticExports);
78712
78561
  for (const module3 of reversedModules) {
78713
- module3.scope.deconflict(format3, exportNamesByVariable, accessedGlobalsByScope);
78562
+ module3.scope.deconflict(format2, exportNamesByVariable, accessedGlobalsByScope);
78714
78563
  }
78715
78564
  }
78716
78565
  function deconflictImportsEsmOrSystem(usedNames, imports, dependenciesToBeDeconflicted, _interop, preserveModules, _externalLiveBindings, chunkByModule, externalChunkByModule, syntheticExports) {
@@ -78816,7 +78665,7 @@ ${outro}`;
78816
78665
  exportNamesByVariable.set(variable, [exportName]);
78817
78666
  }
78818
78667
  }
78819
- function getExportMode(chunk, { exports: exportMode, name, format: format3 }, facadeModuleId, log) {
78668
+ function getExportMode(chunk, { exports: exportMode, name, format: format2 }, facadeModuleId, log) {
78820
78669
  const exportKeys = chunk.getExportNames();
78821
78670
  if (exportMode === "default") {
78822
78671
  if (exportKeys.length !== 1 || exportKeys[0] !== "default") {
@@ -78831,7 +78680,7 @@ ${outro}`;
78831
78680
  } else if (exportKeys.length === 1 && exportKeys[0] === "default") {
78832
78681
  exportMode = "default";
78833
78682
  } else {
78834
- if (format3 !== "es" && format3 !== "system" && exportKeys.includes("default")) {
78683
+ if (format2 !== "es" && format2 !== "system" && exportKeys.includes("default")) {
78835
78684
  log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMixedExport(facadeModuleId, name));
78836
78685
  }
78837
78686
  exportMode = "named";
@@ -79151,13 +79000,13 @@ ${outro}`;
79151
79000
  }
79152
79001
  let fileName;
79153
79002
  let hashPlaceholder = null;
79154
- const { chunkFileNames, entryFileNames, file, format: format3, preserveModules } = this.outputOptions;
79003
+ const { chunkFileNames, entryFileNames, file, format: format2, preserveModules } = this.outputOptions;
79155
79004
  if (file) {
79156
79005
  fileName = node_path.basename(file);
79157
79006
  } else if (this.fileName === null) {
79158
79007
  const [pattern, patternName] = preserveModules || this.facadeModule?.isUserDefinedEntryPoint ? [entryFileNames, "output.entryFileNames"] : [chunkFileNames, "output.chunkFileNames"];
79159
79008
  fileName = renderNamePattern(typeof pattern === "function" ? pattern(this.getPreRenderedChunkInfo()) : pattern, patternName, {
79160
- format: () => format3,
79009
+ format: () => format2,
79161
79010
  hash: (size) => hashPlaceholder || (hashPlaceholder = this.getPlaceholder(patternName, size)),
79162
79011
  name: () => this.getChunkName()
79163
79012
  });
@@ -79178,12 +79027,12 @@ ${outro}`;
79178
79027
  }
79179
79028
  let sourcemapFileName = null;
79180
79029
  let hashPlaceholder = null;
79181
- const { sourcemapFileNames, format: format3 } = this.outputOptions;
79030
+ const { sourcemapFileNames, format: format2 } = this.outputOptions;
79182
79031
  if (sourcemapFileNames) {
79183
79032
  const [pattern, patternName] = [sourcemapFileNames, "output.sourcemapFileNames"];
79184
79033
  sourcemapFileName = renderNamePattern(typeof pattern === "function" ? pattern(this.getPreRenderedChunkInfo()) : pattern, patternName, {
79185
79034
  chunkhash: () => this.getPreliminaryFileName().hashPlaceholder || "",
79186
- format: () => format3,
79035
+ format: () => format2,
79187
79036
  hash: (size) => hashPlaceholder || (hashPlaceholder = this.getPlaceholder(patternName, size)),
79188
79037
  name: () => this.getChunkName()
79189
79038
  });
@@ -79227,7 +79076,7 @@ ${outro}`;
79227
79076
  }
79228
79077
  async render() {
79229
79078
  const { dependencies, exportMode, facadeModule, inputOptions: { onLog }, outputOptions, pluginDriver, snippets } = this;
79230
- const { format: format3, hoistTransitiveImports, preserveModules } = outputOptions;
79079
+ const { format: format2, hoistTransitiveImports, preserveModules } = outputOptions;
79231
79080
  if (hoistTransitiveImports && !preserveModules && facadeModule !== null) {
79232
79081
  for (const dep of dependencies) {
79233
79082
  if (dep instanceof _Chunk)
@@ -79238,7 +79087,7 @@ ${outro}`;
79238
79087
  const preliminarySourcemapFileName = this.getPreliminarySourcemapFileName();
79239
79088
  const { accessedGlobals, indent, magicString, renderedSource, usedModules, usesTopLevelAwait } = this.renderModules(preliminaryFileName.fileName);
79240
79089
  const renderedDependencies = [...this.getRenderedDependencies().values()];
79241
- const renderedExports = exportMode === "none" ? [] : this.getChunkExportDeclarations(format3);
79090
+ const renderedExports = exportMode === "none" ? [] : this.getChunkExportDeclarations(format2);
79242
79091
  let hasExports = renderedExports.length > 0;
79243
79092
  let hasDefaultExport = false;
79244
79093
  for (const renderedDependence of renderedDependencies) {
@@ -79248,7 +79097,7 @@ ${outro}`;
79248
79097
  if (!hasDefaultExport && reexports.some((reexport) => reexport.reexported === "default")) {
79249
79098
  hasDefaultExport = true;
79250
79099
  }
79251
- if (format3 === "es") {
79100
+ if (format2 === "es") {
79252
79101
  renderedDependence.reexports = reexports.filter(
79253
79102
  // eslint-disable-next-line unicorn/prefer-array-some
79254
79103
  ({ reexported }) => !renderedExports.find(({ exported }) => exported === reexported)
@@ -79265,7 +79114,7 @@ ${outro}`;
79265
79114
  }
79266
79115
  }
79267
79116
  const { intro, outro, banner, footer } = await createAddons(outputOptions, pluginDriver, this.getRenderedChunkInfo());
79268
- finalisers[format3](renderedSource, {
79117
+ finalisers[format2](renderedSource, {
79269
79118
  accessedGlobals,
79270
79119
  dependencies: renderedDependencies,
79271
79120
  exports: renderedExports,
@@ -79284,7 +79133,7 @@ ${outro}`;
79284
79133
  }, outputOptions);
79285
79134
  if (banner)
79286
79135
  magicString.prepend(banner);
79287
- if (format3 === "es" || format3 === "cjs") {
79136
+ if (format2 === "es" || format2 === "cjs") {
79288
79137
  const shebang = facadeModule !== null && facadeModule.info.isEntry && facadeModule.shebang;
79289
79138
  shebang && magicString.prepend(`#!${shebang}
79290
79139
  `);
@@ -79383,7 +79232,7 @@ ${outro}`;
79383
79232
  }
79384
79233
  return "chunk";
79385
79234
  }
79386
- getChunkExportDeclarations(format3) {
79235
+ getChunkExportDeclarations(format2) {
79387
79236
  const exports2 = [];
79388
79237
  for (const exportName of this.getExportNames()) {
79389
79238
  if (exportName[0] === "*")
@@ -79394,7 +79243,7 @@ ${outro}`;
79394
79243
  if (module3) {
79395
79244
  const chunk = this.chunkByModule.get(module3);
79396
79245
  if (chunk !== this) {
79397
- if (!chunk || format3 !== "es") {
79246
+ if (!chunk || format2 !== "es") {
79398
79247
  continue;
79399
79248
  }
79400
79249
  const chunkDep = this.renderedDependencies.get(chunk);
@@ -79422,7 +79271,7 @@ ${outro}`;
79422
79271
  }
79423
79272
  } else if (variable instanceof SyntheticNamedExportVariable) {
79424
79273
  expression = local;
79425
- if (format3 === "es") {
79274
+ if (format2 === "es") {
79426
79275
  local = variable.renderName;
79427
79276
  }
79428
79277
  }
@@ -79674,7 +79523,7 @@ ${outro}`;
79674
79523
  // This method changes properties on the AST before rendering and must not be async
79675
79524
  renderModules(fileName) {
79676
79525
  const { accessedGlobalsByScope, dependencies, exportNamesByVariable, includedNamespaces, inputOptions: { onLog }, isEmpty, orderedModules, outputOptions, pluginDriver, renderedModules, snippets } = this;
79677
- const { compact, format: format3, freeze, generatedCode: { symbols } } = outputOptions;
79526
+ const { compact, format: format2, freeze, generatedCode: { symbols } } = outputOptions;
79678
79527
  const { _, cnst, n: n2 } = snippets;
79679
79528
  this.setDynamicImportResolutions(fileName);
79680
79529
  this.setImportMetaResolutions(fileName);
@@ -79688,7 +79537,7 @@ ${outro}`;
79688
79537
  const renderOptions = {
79689
79538
  accessedDocumentCurrentScript: false,
79690
79539
  exportNamesByVariable,
79691
- format: format3,
79540
+ format: format2,
79692
79541
  freeze,
79693
79542
  indent,
79694
79543
  pluginDriver,
@@ -79702,7 +79551,7 @@ ${outro}`;
79702
79551
  let source;
79703
79552
  if (module3.isIncluded() || includedNamespaces.has(module3)) {
79704
79553
  const rendered = module3.render(renderOptions);
79705
- if (!renderOptions.accessedDocumentCurrentScript && formatsMaybeAccessDocumentCurrentScript.includes(format3)) {
79554
+ if (!renderOptions.accessedDocumentCurrentScript && formatsMaybeAccessDocumentCurrentScript.includes(format2)) {
79706
79555
  this.accessedGlobalsByScope.get(module3.scope)?.delete(DOCUMENT_CURRENT_SCRIPT);
79707
79556
  }
79708
79557
  renderOptions.accessedDocumentCurrentScript = false;
@@ -79771,11 +79620,11 @@ ${outro}`;
79771
79620
  }
79772
79621
  }
79773
79622
  setIdentifierRenderResolutions() {
79774
- const { format: format3, generatedCode: { symbols }, interop, preserveModules, externalLiveBindings } = this.outputOptions;
79623
+ const { format: format2, generatedCode: { symbols }, interop, preserveModules, externalLiveBindings } = this.outputOptions;
79775
79624
  const syntheticExports = /* @__PURE__ */ new Set();
79776
79625
  for (const exportName of this.getExportNames()) {
79777
79626
  const exportVariable = this.exportsByName.get(exportName);
79778
- if (format3 !== "es" && format3 !== "system" && exportVariable.isReassigned && !exportVariable.isId) {
79627
+ if (format2 !== "es" && format2 !== "system" && exportVariable.isReassigned && !exportVariable.isId) {
79779
79628
  exportVariable.setRenderNames("exports", exportName);
79780
79629
  } else if (exportVariable instanceof SyntheticNamedExportVariable) {
79781
79630
  syntheticExports.add(exportVariable);
@@ -79796,7 +79645,7 @@ ${outro}`;
79796
79645
  if (symbols) {
79797
79646
  usedNames.add("Symbol");
79798
79647
  }
79799
- switch (format3) {
79648
+ switch (format2) {
79800
79649
  case "system": {
79801
79650
  usedNames.add("module").add("exports");
79802
79651
  break;
@@ -79814,13 +79663,13 @@ ${outro}`;
79814
79663
  }
79815
79664
  }
79816
79665
  }
79817
- deconflictChunk(this.orderedModules, this.getDependenciesToBeDeconflicted(format3 !== "es" && format3 !== "system", format3 === "amd" || format3 === "umd" || format3 === "iife", interop), this.imports, usedNames, format3, interop, preserveModules, externalLiveBindings, this.chunkByModule, this.externalChunkByModule, syntheticExports, this.exportNamesByVariable, this.accessedGlobalsByScope, this.includedNamespaces);
79666
+ deconflictChunk(this.orderedModules, this.getDependenciesToBeDeconflicted(format2 !== "es" && format2 !== "system", format2 === "amd" || format2 === "umd" || format2 === "iife", interop), this.imports, usedNames, format2, interop, preserveModules, externalLiveBindings, this.chunkByModule, this.externalChunkByModule, syntheticExports, this.exportNamesByVariable, this.accessedGlobalsByScope, this.includedNamespaces);
79818
79667
  }
79819
79668
  setImportMetaResolutions(fileName) {
79820
- const { accessedGlobalsByScope, includedNamespaces, orderedModules, outputOptions: { format: format3 } } = this;
79669
+ const { accessedGlobalsByScope, includedNamespaces, orderedModules, outputOptions: { format: format2 } } = this;
79821
79670
  for (const module3 of orderedModules) {
79822
79671
  for (const importMeta of module3.importMetas) {
79823
- importMeta.setResolution(format3, accessedGlobalsByScope, fileName);
79672
+ importMeta.setResolution(format2, accessedGlobalsByScope, fileName);
79824
79673
  }
79825
79674
  if (includedNamespaces.has(module3)) {
79826
79675
  module3.namespace.prepare(accessedGlobalsByScope);
@@ -81887,7 +81736,7 @@ ${outro}`;
81887
81736
  async function normalizeOutputOptions(config, inputOptions, unsetInputOptions) {
81888
81737
  const unsetOptions = new Set(unsetInputOptions);
81889
81738
  const compact = config.compact || false;
81890
- const format3 = getFormat(config);
81739
+ const format2 = getFormat(config);
81891
81740
  const inlineDynamicImports = getInlineDynamicImports(config, inputOptions);
81892
81741
  const preserveModules = getPreserveModules(config, inlineDynamicImports, inputOptions);
81893
81742
  const file = getFile(config, preserveModules, inputOptions);
@@ -81911,7 +81760,7 @@ ${outro}`;
81911
81760
  externalLiveBindings: config.externalLiveBindings ?? true,
81912
81761
  file,
81913
81762
  footer: getAddon(config, "footer"),
81914
- format: format3,
81763
+ format: format2,
81915
81764
  freeze: config.freeze ?? true,
81916
81765
  generatedCode,
81917
81766
  globals: config.globals || {},
@@ -81921,7 +81770,7 @@ ${outro}`;
81921
81770
  interop: getInterop(config),
81922
81771
  intro: getAddon(config, "intro"),
81923
81772
  manualChunks: getManualChunks(config, inlineDynamicImports, preserveModules),
81924
- minifyInternalExports: getMinifyInternalExports(config, format3, compact),
81773
+ minifyInternalExports: getMinifyInternalExports(config, format2, compact),
81925
81774
  name: config.name,
81926
81775
  noConflict: config.noConflict || false,
81927
81776
  outro: getAddon(config, "outro"),
@@ -82128,7 +81977,7 @@ ${outro}`;
82128
81977
  }
82129
81978
  return configManualChunks || {};
82130
81979
  };
82131
- var getMinifyInternalExports = (config, format3, compact) => config.minifyInternalExports ?? (compact || format3 === "es" || format3 === "system");
81980
+ var getMinifyInternalExports = (config, format2, compact) => config.minifyInternalExports ?? (compact || format2 === "es" || format2 === "system");
82132
81981
  var getSourcemapFileNames = (config, unsetOptions) => {
82133
81982
  const configSourcemapFileNames = config.sourcemapFileNames;
82134
81983
  if (configSourcemapFileNames == null) {
@@ -83290,7 +83139,7 @@ var require_shared = __commonJS({
83290
83139
  let padded = zeros(startString) || zeros(endString) || zeros(stepString);
83291
83140
  let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
83292
83141
  let toNumber = padded === false && stringify$3(start, end, options) === false;
83293
- let format3 = options.transform || transform(toNumber);
83142
+ let format2 = options.transform || transform(toNumber);
83294
83143
  if (options.toRegex && step === 1) {
83295
83144
  return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
83296
83145
  }
@@ -83302,7 +83151,7 @@ var require_shared = __commonJS({
83302
83151
  if (options.toRegex === true && step > 1) {
83303
83152
  push(a);
83304
83153
  } else {
83305
- range.push(pad(format3(a, index), maxLen, toNumber));
83154
+ range.push(pad(format2(a, index), maxLen, toNumber));
83306
83155
  }
83307
83156
  a = descending ? a - step : a + step;
83308
83157
  index++;
@@ -83316,7 +83165,7 @@ var require_shared = __commonJS({
83316
83165
  if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
83317
83166
  return invalidRange(start, end, options);
83318
83167
  }
83319
- let format3 = options.transform || ((val) => String.fromCharCode(val));
83168
+ let format2 = options.transform || ((val) => String.fromCharCode(val));
83320
83169
  let a = `${start}`.charCodeAt(0);
83321
83170
  let b = `${end}`.charCodeAt(0);
83322
83171
  let descending = a > b;
@@ -83328,7 +83177,7 @@ var require_shared = __commonJS({
83328
83177
  let range = [];
83329
83178
  let index = 0;
83330
83179
  while (descending ? a >= b : a <= b) {
83331
- range.push(format3(a, index));
83180
+ range.push(format2(a, index));
83332
83181
  a = descending ? a - step : a + step;
83333
83182
  index++;
83334
83183
  }
@@ -84151,7 +84000,7 @@ var require_shared = __commonJS({
84151
84000
  var isBinaryPath$1 = (filePath) => extensions.has(path4.extname(filePath).slice(1).toLowerCase());
84152
84001
  var constants3 = {};
84153
84002
  (function(exports2) {
84154
- const { sep: sep2 } = require$$0$2;
84003
+ const { sep: sep3 } = require$$0$2;
84155
84004
  const { platform } = process;
84156
84005
  const os2 = require$$2$1;
84157
84006
  exports2.EV_ALL = "all";
@@ -84179,7 +84028,7 @@ var require_shared = __commonJS({
84179
84028
  exports2.KEY_ERR = "errHandlers";
84180
84029
  exports2.KEY_RAW = "rawEmitters";
84181
84030
  exports2.HANDLER_KEYS = [exports2.KEY_LISTENERS, exports2.KEY_ERR, exports2.KEY_RAW];
84182
- exports2.DOT_SLASH = `.${sep2}`;
84031
+ exports2.DOT_SLASH = `.${sep3}`;
84183
84032
  exports2.BACK_SLASH_RE = /\\/g;
84184
84033
  exports2.DOUBLE_SLASH_RE = /\/\//;
84185
84034
  exports2.SLASH_OR_BACK_SLASH_RE = /[/\\]/;
@@ -86937,7 +86786,7 @@ var require_is_binary_path = __commonJS({
86937
86786
  var require_constants5 = __commonJS({
86938
86787
  "node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/lib/constants.js"(exports) {
86939
86788
  "use strict";
86940
- var { sep: sep2 } = require("path");
86789
+ var { sep: sep3 } = require("path");
86941
86790
  var { platform } = process;
86942
86791
  var os2 = require("os");
86943
86792
  exports.EV_ALL = "all";
@@ -86965,7 +86814,7 @@ var require_constants5 = __commonJS({
86965
86814
  exports.KEY_ERR = "errHandlers";
86966
86815
  exports.KEY_RAW = "rawEmitters";
86967
86816
  exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW];
86968
- exports.DOT_SLASH = `.${sep2}`;
86817
+ exports.DOT_SLASH = `.${sep3}`;
86969
86818
  exports.BACK_SLASH_RE = /\\/g;
86970
86819
  exports.DOUBLE_SLASH_RE = /\/\//;
86971
86820
  exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/;
@@ -90328,10 +90177,10 @@ var require_dist6 = __commonJS({
90328
90177
  }
90329
90178
  };
90330
90179
  };
90331
- var getOutputExtensionMap = (options, format3, pkgType) => {
90180
+ var getOutputExtensionMap = (options, format2, pkgType) => {
90332
90181
  const outExtension2 = options.outExtension || _chunkGQ77QZBOjs.defaultOutExtension;
90333
- const defaultExtension = _chunkGQ77QZBOjs.defaultOutExtension.call(void 0, { format: format3, pkgType });
90334
- const extension = outExtension2({ options, format: format3, pkgType });
90182
+ const defaultExtension = _chunkGQ77QZBOjs.defaultOutExtension.call(void 0, { format: format2, pkgType });
90183
+ const extension = outExtension2({ options, format: format2, pkgType });
90335
90184
  return {
90336
90185
  ".js": extension.js || defaultExtension.js
90337
90186
  };
@@ -90350,9 +90199,9 @@ var require_dist6 = __commonJS({
90350
90199
  }
90351
90200
  return result;
90352
90201
  };
90353
- var packageJsonSearch = (outDir, silent, format3, logger3) => {
90202
+ var packageJsonSearch = (outDir, silent, format2, logger3) => {
90354
90203
  let pkgPath = outDir ? outDir : process.cwd();
90355
- !silent && logger3 && logger3.info(format3, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
90204
+ !silent && logger3 && logger3.info(format2, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
90356
90205
  if (pkgPath) {
90357
90206
  const splits = pkgPath.includes("\\") ? pkgPath.split("\\") : pkgPath.split("/");
90358
90207
  if (splits.length > 0) {
@@ -90365,12 +90214,12 @@ var require_dist6 = __commonJS({
90365
90214
  "package.json"
90366
90215
  );
90367
90216
  !silent && logger3 && logger3.info(
90368
- format3,
90217
+ format2,
90369
90218
  `\u26A1 Searching for package.json file in ${packageJsonPath} (index: ${i})`
90370
90219
  );
90371
90220
  if (_fs2.default.existsSync(packageJsonPath)) {
90372
90221
  !silent && logger3 && logger3.info(
90373
- format3,
90222
+ format2,
90374
90223
  `\u26A1 Found the package.json file in ${packageJsonPath} (index: ${i})`
90375
90224
  );
90376
90225
  pkgPath = packageJsonPath.replace("package.json", "");
@@ -90381,21 +90230,21 @@ var require_dist6 = __commonJS({
90381
90230
  }
90382
90231
  if (pkgPath === outDir) {
90383
90232
  !silent && logger3 && logger3.info(
90384
- format3,
90233
+ format2,
90385
90234
  `\u26A1 No package.json file found, using ${pkgPath} as the output directory`
90386
90235
  );
90387
90236
  }
90388
90237
  return pkgPath;
90389
90238
  };
90390
90239
  async function runEsbuild(options, {
90391
- format: format3,
90240
+ format: format2,
90392
90241
  css,
90393
90242
  logger: logger3,
90394
90243
  buildDependencies,
90395
90244
  pluginContainer
90396
90245
  }) {
90397
- const pkgPath = packageJsonSearch(options.outDir, options.silent, format3, logger3);
90398
- logger3.info(format3, `\u26A1 Running ESBuild: ${pkgPath}`);
90246
+ const pkgPath = packageJsonSearch(options.outDir, options.silent, format2, logger3);
90247
+ logger3.info(format2, `\u26A1 Running ESBuild: ${pkgPath}`);
90399
90248
  const pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
90400
90249
  const deps = await _chunk7G76EW2Rjs.getProductionDeps.call(void 0, pkgPath);
90401
90250
  const external = [
@@ -90404,41 +90253,41 @@ var require_dist6 = __commonJS({
90404
90253
  ...await generateExternal(options.external || [], options, logger3)
90405
90254
  ];
90406
90255
  const outDir = options.outDir;
90407
- const outExtension2 = getOutputExtensionMap(options, format3, pkg.type);
90256
+ const outExtension2 = getOutputExtensionMap(options, format2, pkg.type);
90408
90257
  const env = {
90409
90258
  ...options.env
90410
90259
  };
90411
90260
  if (options.replaceNodeEnv) {
90412
90261
  env.NODE_ENV = options.minify || options.minifyWhitespace ? "production" : "development";
90413
90262
  }
90414
- logger3.info(format3, "Build start");
90263
+ logger3.info(format2, "Build start");
90415
90264
  const startTime = Date.now();
90416
90265
  let result;
90417
- const splitting = format3 === "iife" ? false : typeof options.splitting === "boolean" ? options.splitting : format3 === "esm";
90266
+ const splitting = format2 === "iife" ? false : typeof options.splitting === "boolean" ? options.splitting : format2 === "esm";
90418
90267
  const platform = options.platform || "node";
90419
90268
  const loader = options.loader || {};
90420
90269
  const injectShims = options.shims;
90421
90270
  pluginContainer.setContext({
90422
- format: format3,
90271
+ format: format2,
90423
90272
  splitting,
90424
90273
  options,
90425
90274
  logger: logger3
90426
90275
  });
90427
90276
  await pluginContainer.buildStarted();
90428
90277
  const esbuildPlugins = [
90429
- format3 === "cjs" && nodeProtocolPlugin(),
90278
+ format2 === "cjs" && nodeProtocolPlugin(),
90430
90279
  {
90431
90280
  name: "modify-options",
90432
90281
  setup(build22) {
90433
90282
  pluginContainer.modifyEsbuildOptions(build22.initialOptions);
90434
90283
  if (options.esbuildOptions) {
90435
- options.esbuildOptions(build22.initialOptions, { format: format3 });
90284
+ options.esbuildOptions(build22.initialOptions, { format: format2 });
90436
90285
  }
90437
90286
  }
90438
90287
  },
90439
90288
  // esbuild's `external` option doesn't support RegExp
90440
90289
  // So here we use a custom plugin to implement it
90441
- format3 !== "iife" && externalPlugin({
90290
+ format2 !== "iife" && externalPlugin({
90442
90291
  external,
90443
90292
  noExternal: options.noExternal,
90444
90293
  skipNodeModulesBundle: options.skipNodeModulesBundle,
@@ -90456,12 +90305,12 @@ var require_dist6 = __commonJS({
90456
90305
  if (options.skipNativeModulesPlugin !== true) {
90457
90306
  esbuildPlugins.push(nativeNodeModulesPlugin());
90458
90307
  }
90459
- const banner = typeof options.banner === "function" ? options.banner({ format: format3 }) : options.banner;
90460
- const footer = typeof options.footer === "function" ? options.footer({ format: format3 }) : options.footer;
90308
+ const banner = typeof options.banner === "function" ? options.banner({ format: format2 }) : options.banner;
90309
+ const footer = typeof options.footer === "function" ? options.footer({ format: format2 }) : options.footer;
90461
90310
  try {
90462
90311
  result = await _esbuild.build.call(void 0, {
90463
90312
  entryPoints: options.entry,
90464
- format: format3 === "cjs" && splitting || options.treeshake ? "esm" : format3,
90313
+ format: format2 === "cjs" && splitting || options.treeshake ? "esm" : format2,
90465
90314
  bundle: typeof options.bundle === "undefined" ? true : options.bundle,
90466
90315
  platform,
90467
90316
  globalName: options.globalName,
@@ -90500,8 +90349,8 @@ var require_dist6 = __commonJS({
90500
90349
  mainFields: platform === "node" ? ["module", "main"] : ["browser", "module", "main"],
90501
90350
  plugins: esbuildPlugins.filter(_chunkGQ77QZBOjs.truthy),
90502
90351
  define: {
90503
- TSUP_FORMAT: JSON.stringify(format3),
90504
- ...format3 === "cjs" && injectShims ? {
90352
+ TSUP_FORMAT: JSON.stringify(format2),
90353
+ ...format2 === "cjs" && injectShims ? {
90505
90354
  "import.meta.url": "importMetaUrl"
90506
90355
  } : {},
90507
90356
  ...options.define,
@@ -90515,11 +90364,11 @@ var require_dist6 = __commonJS({
90515
90364
  }, {})
90516
90365
  },
90517
90366
  inject: [
90518
- format3 === "cjs" && injectShims ? _path2.default.join(__dirname, "../../../assets/cjs_shims.js") : "",
90519
- format3 === "esm" && injectShims && platform === "node" ? _path2.default.join(__dirname, "../../../assets/esm_shims.js") : "",
90367
+ format2 === "cjs" && injectShims ? _path2.default.join(__dirname, "../../../assets/cjs_shims.js") : "",
90368
+ format2 === "esm" && injectShims && platform === "node" ? _path2.default.join(__dirname, "../../../assets/esm_shims.js") : "",
90520
90369
  ...options.inject || []
90521
90370
  ].filter(Boolean),
90522
- outdir: options.legacyOutput && format3 !== "cjs" ? _path2.default.join(outDir, format3) : outDir,
90371
+ outdir: options.legacyOutput && format2 !== "cjs" ? _path2.default.join(outDir, format2) : outDir,
90523
90372
  outExtension: options.legacyOutput ? void 0 : outExtension2,
90524
90373
  write: false,
90525
90374
  splitting,
@@ -90535,7 +90384,7 @@ var require_dist6 = __commonJS({
90535
90384
  });
90536
90385
  await new Promise((r) => setTimeout(r, 100));
90537
90386
  } catch (error) {
90538
- logger3.error(format3, "Build failed");
90387
+ logger3.error(format2, "Build failed");
90539
90388
  throw error;
90540
90389
  }
90541
90390
  if (result && result.warnings && !_chunk7G76EW2Rjs.getSilent.call(void 0)) {
@@ -90560,14 +90409,14 @@ var require_dist6 = __commonJS({
90560
90409
  metafile: result.metafile
90561
90410
  });
90562
90411
  const timeInMs = Date.now() - startTime;
90563
- logger3.success(format3, `\u26A1\uFE0F Build success in ${Math.floor(timeInMs)}ms`);
90412
+ logger3.success(format2, `\u26A1\uFE0F Build success in ${Math.floor(timeInMs)}ms`);
90564
90413
  }
90565
90414
  if (result.metafile) {
90566
90415
  for (const file of Object.keys(result.metafile.inputs)) {
90567
90416
  buildDependencies.add(file);
90568
90417
  }
90569
90418
  if (options.metafile) {
90570
- const outPath = _path2.default.resolve(outDir, `metafile-${format3}.json`);
90419
+ const outPath = _path2.default.resolve(outDir, `metafile-${format2}.json`);
90571
90420
  await _fs2.default.promises.mkdir(_path2.default.dirname(outPath), { recursive: true });
90572
90421
  await _fs2.default.promises.writeFile(
90573
90422
  outPath,
@@ -90900,7 +90749,7 @@ var require_dist6 = __commonJS({
90900
90749
  };
90901
90750
  var terserPlugin = ({
90902
90751
  minifyOptions,
90903
- format: format3,
90752
+ format: format2,
90904
90753
  terserOptions = {},
90905
90754
  globalName,
90906
90755
  logger: logger3
@@ -90918,9 +90767,9 @@ var require_dist6 = __commonJS({
90918
90767
  }
90919
90768
  const { minify } = terser;
90920
90769
  const defaultOptions = {};
90921
- if (format3 === "esm") {
90770
+ if (format2 === "esm") {
90922
90771
  defaultOptions.module = true;
90923
- } else if (!(format3 === "iife" && globalName !== void 0)) {
90772
+ } else if (!(format2 === "iife" && globalName !== void 0)) {
90924
90773
  defaultOptions.toplevel = true;
90925
90774
  }
90926
90775
  try {
@@ -91236,14 +91085,14 @@ var require_dist6 = __commonJS({
91236
91085
  );
91237
91086
  }
91238
91087
  }
91239
- async function rollupDtsFiles(options, exports2, format3) {
91088
+ async function rollupDtsFiles(options, exports2, format2) {
91240
91089
  let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
91241
91090
  let outDir = options.outDir || "dist";
91242
91091
  let pkgPath = packageJsonSearch(outDir, options.silent, "dts", logger2);
91243
91092
  !options.silent && logger2.info("dts", `\u26A1 Preparing to run Rollup (DTS generate): ${pkgPath}`);
91244
91093
  !options.silent && logger2.info("dts", `\u26A1 Exports list to use in generation: ${exports2.map((e) => JSON.stringify(e)).join("\n")}`);
91245
91094
  let pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
91246
- let dtsExtension = _chunkGQ77QZBOjs.defaultOutExtension.call(void 0, { format: format3, pkgType: pkg.type }).dts;
91095
+ let dtsExtension = _chunkGQ77QZBOjs.defaultOutExtension.call(void 0, { format: format2, pkgType: pkg.type }).dts;
91247
91096
  let dtsInputFilePath = _path2.default.join(
91248
91097
  declarationDir,
91249
91098
  "_tsup-dts-aggregation" + dtsExtension
@@ -91271,8 +91120,8 @@ var require_dist6 = __commonJS({
91271
91120
  if (!exports2) {
91272
91121
  throw new Error("Unexpected internal error: dts exports is not define");
91273
91122
  }
91274
- for (const format3 of options.format) {
91275
- await rollupDtsFiles(options, exports2, format3);
91123
+ for (const format2 of options.format) {
91124
+ await rollupDtsFiles(options, exports2, format2);
91276
91125
  }
91277
91126
  logger2.success("dts", `\u26A1\uFE0F Build success in ${getDuration()}`);
91278
91127
  } catch (error) {
@@ -91486,7 +91335,7 @@ var require_dist6 = __commonJS({
91486
91335
  }
91487
91336
  const css = /* @__PURE__ */ new Map();
91488
91337
  await Promise.all([
91489
- ...options.format.map(async (format3, index) => {
91338
+ ...options.format.map(async (format2, index) => {
91490
91339
  const pluginContainer = new PluginContainer([
91491
91340
  shebang(),
91492
91341
  ...options.plugins || [],
@@ -91501,7 +91350,7 @@ var require_dist6 = __commonJS({
91501
91350
  sizeReporter(),
91502
91351
  terserPlugin({
91503
91352
  minifyOptions: options.minify,
91504
- format: format3,
91353
+ format: format2,
91505
91354
  terserOptions: options.terserOptions,
91506
91355
  globalName: options.globalName,
91507
91356
  logger: logger3
@@ -91509,7 +91358,7 @@ var require_dist6 = __commonJS({
91509
91358
  ]);
91510
91359
  await runEsbuild(options, {
91511
91360
  pluginContainer,
91512
- format: format3,
91361
+ format: format2,
91513
91362
  css: index === 0 || options.injectStyle ? css : void 0,
91514
91363
  logger: logger3,
91515
91364
  buildDependencies
@@ -97820,8 +97669,8 @@ var require_prompt = __commonJS({
97820
97669
  return this.skipped;
97821
97670
  }
97822
97671
  async initialize() {
97823
- let { format: format3, options, result } = this;
97824
- this.format = () => format3.call(this, this.value);
97672
+ let { format: format2, options, result } = this;
97673
+ this.format = () => format2.call(this, this.value);
97825
97674
  this.result = () => result.call(this, this.value);
97826
97675
  if (typeof options.initial === "function") {
97827
97676
  this.initial = await options.initial.call(this, this);
@@ -98735,8 +98584,8 @@ var require_select = __commonJS({
98735
98584
  separator() {
98736
98585
  if (this.options.separator)
98737
98586
  return super.separator();
98738
- let sep2 = this.styles.muted(this.symbols.ellipsis);
98739
- return this.state.submitted ? super.separator() : sep2;
98587
+ let sep3 = this.styles.muted(this.symbols.ellipsis);
98588
+ return this.state.submitted ? super.separator() : sep3;
98740
98589
  }
98741
98590
  pointer(choice, i) {
98742
98591
  return !this.multiple || this.options.pointer ? super.pointer(choice, i) : "";
@@ -99100,8 +98949,8 @@ var require_form = __commonJS({
99100
98949
  return choice.input ? "\u29BF" : "\u2299";
99101
98950
  }
99102
98951
  async choiceSeparator(choice, i) {
99103
- let sep2 = await this.resolve(choice.separator, this.state, choice, i) || ":";
99104
- return sep2 ? " " + this.styles.disabled(sep2) : "";
98952
+ let sep3 = await this.resolve(choice.separator, this.state, choice, i) || ":";
98953
+ return sep3 ? " " + this.styles.disabled(sep3) : "";
99105
98954
  }
99106
98955
  async renderChoice(choice, i) {
99107
98956
  await this.onChoice(choice, i);
@@ -99111,7 +98960,7 @@ var require_form = __commonJS({
99111
98960
  let help = hint;
99112
98961
  let focused = this.index === i;
99113
98962
  let validate = choice.validate || (() => true);
99114
- let sep2 = await this.choiceSeparator(choice, i);
98963
+ let sep3 = await this.choiceSeparator(choice, i);
99115
98964
  let msg = choice.message;
99116
98965
  if (this.align === "right")
99117
98966
  msg = msg.padStart(this.longest + 1, " ");
@@ -99125,7 +98974,7 @@ var require_form = __commonJS({
99125
98974
  let style = styles[color];
99126
98975
  let indicator = style(await this.indicator(choice, i)) + (choice.pad || "");
99127
98976
  let indent = this.indent(choice);
99128
- let line = () => [indent, indicator, msg + sep2, input, help].filter(Boolean).join(" ");
98977
+ let line = () => [indent, indicator, msg + sep3, input, help].filter(Boolean).join(" ");
99129
98978
  if (state.submitted) {
99130
98979
  msg = colors.unstyle(msg);
99131
98980
  input = submitted(input);
@@ -99281,10 +99130,10 @@ var require_boolean = __commonJS({
99281
99130
  async render() {
99282
99131
  let { input, size } = this.state;
99283
99132
  let prefix = await this.prefix();
99284
- let sep2 = await this.separator();
99133
+ let sep3 = await this.separator();
99285
99134
  let msg = await this.message();
99286
99135
  let hint = this.styles.muted(this.default);
99287
- let promptLine = [prefix, msg, hint, sep2].filter(Boolean).join(" ");
99136
+ let promptLine = [prefix, msg, hint, sep3].filter(Boolean).join(" ");
99288
99137
  this.state.prompt = promptLine;
99289
99138
  let header = await this.header();
99290
99139
  let value = this.value = this.cast(input);
@@ -100209,7 +100058,7 @@ var require_interpolate = __commonJS({
100209
100058
  let defaults2 = { ...options.values, ...options.initial };
100210
100059
  let { tabstops, items, keys } = await tokenize(options, defaults2);
100211
100060
  let result = createFn("result", prompt, options);
100212
- let format3 = createFn("format", prompt, options);
100061
+ let format2 = createFn("format", prompt, options);
100213
100062
  let isValid2 = createFn("validate", prompt, options, true);
100214
100063
  let isVal = prompt.isValue.bind(prompt);
100215
100064
  return async (state = {}, submitted = false) => {
@@ -100254,7 +100103,7 @@ var require_interpolate = __commonJS({
100254
100103
  }
100255
100104
  item.placeholder = false;
100256
100105
  let before = value;
100257
- value = await format3(value, state, item, index);
100106
+ value = await format2(value, state, item, index);
100258
100107
  if (val !== value) {
100259
100108
  state.values[key] = val;
100260
100109
  value = prompt.styles.typing(val);
@@ -101087,13 +100936,13 @@ var require_project_name_and_root_utils = __commonJS({
101087
100936
  }
101088
100937
  validateName(options.name, options.projectNameAndRootFormat);
101089
100938
  const formats = getProjectNameAndRootFormats(tree, options);
101090
- const format3 = options.projectNameAndRootFormat ?? await determineFormat(formats);
101091
- if (format3 === "derived" && options.callingGenerator) {
100939
+ const format2 = options.projectNameAndRootFormat ?? await determineFormat(formats);
100940
+ if (format2 === "derived" && options.callingGenerator) {
101092
100941
  logDeprecationMessage(options.callingGenerator, formats);
101093
100942
  }
101094
100943
  return {
101095
- ...formats[format3],
101096
- projectNameAndRootFormat: format3
100944
+ ...formats[format2],
100945
+ projectNameAndRootFormat: format2
101097
100946
  };
101098
100947
  }
101099
100948
  exports.determineProjectNameAndRootOptions = determineProjectNameAndRootOptions;
@@ -101144,7 +100993,7 @@ var require_project_name_and_root_utils = __commonJS({
101144
100993
  }
101145
100994
  ],
101146
100995
  initial: "as-provided"
101147
- }).then(({ format: format3 }) => format3 === asProvidedSelectedValue ? "as-provided" : "derived");
100996
+ }).then(({ format: format2 }) => format2 === asProvidedSelectedValue ? "as-provided" : "derived");
101148
100997
  return result;
101149
100998
  }
101150
100999
  function getProjectNameAndRootFormats(tree, options) {
@@ -103056,6 +102905,157 @@ var require_src2 = __commonJS({
103056
102905
  }
103057
102906
  });
103058
102907
 
102908
+ // node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js
102909
+ var require_brace_expansion2 = __commonJS({
102910
+ "node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js"(exports, module2) {
102911
+ var balanced = require_balanced_match();
102912
+ module2.exports = expandTop;
102913
+ var escSlash = "\0SLASH" + Math.random() + "\0";
102914
+ var escOpen = "\0OPEN" + Math.random() + "\0";
102915
+ var escClose = "\0CLOSE" + Math.random() + "\0";
102916
+ var escComma = "\0COMMA" + Math.random() + "\0";
102917
+ var escPeriod = "\0PERIOD" + Math.random() + "\0";
102918
+ function numeric(str) {
102919
+ return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
102920
+ }
102921
+ function escapeBraces(str) {
102922
+ return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
102923
+ }
102924
+ function unescapeBraces(str) {
102925
+ return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
102926
+ }
102927
+ function parseCommaParts(str) {
102928
+ if (!str)
102929
+ return [""];
102930
+ var parts = [];
102931
+ var m = balanced("{", "}", str);
102932
+ if (!m)
102933
+ return str.split(",");
102934
+ var pre = m.pre;
102935
+ var body = m.body;
102936
+ var post = m.post;
102937
+ var p = pre.split(",");
102938
+ p[p.length - 1] += "{" + body + "}";
102939
+ var postParts = parseCommaParts(post);
102940
+ if (post.length) {
102941
+ p[p.length - 1] += postParts.shift();
102942
+ p.push.apply(p, postParts);
102943
+ }
102944
+ parts.push.apply(parts, p);
102945
+ return parts;
102946
+ }
102947
+ function expandTop(str) {
102948
+ if (!str)
102949
+ return [];
102950
+ if (str.substr(0, 2) === "{}") {
102951
+ str = "\\{\\}" + str.substr(2);
102952
+ }
102953
+ return expand2(escapeBraces(str), true).map(unescapeBraces);
102954
+ }
102955
+ function embrace(str) {
102956
+ return "{" + str + "}";
102957
+ }
102958
+ function isPadded(el) {
102959
+ return /^-?0\d/.test(el);
102960
+ }
102961
+ function lte(i, y) {
102962
+ return i <= y;
102963
+ }
102964
+ function gte(i, y) {
102965
+ return i >= y;
102966
+ }
102967
+ function expand2(str, isTop) {
102968
+ var expansions = [];
102969
+ var m = balanced("{", "}", str);
102970
+ if (!m)
102971
+ return [str];
102972
+ var pre = m.pre;
102973
+ var post = m.post.length ? expand2(m.post, false) : [""];
102974
+ if (/\$$/.test(m.pre)) {
102975
+ for (var k = 0; k < post.length; k++) {
102976
+ var expansion = pre + "{" + m.body + "}" + post[k];
102977
+ expansions.push(expansion);
102978
+ }
102979
+ } else {
102980
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
102981
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
102982
+ var isSequence = isNumericSequence || isAlphaSequence;
102983
+ var isOptions = m.body.indexOf(",") >= 0;
102984
+ if (!isSequence && !isOptions) {
102985
+ if (m.post.match(/,.*\}/)) {
102986
+ str = m.pre + "{" + m.body + escClose + m.post;
102987
+ return expand2(str);
102988
+ }
102989
+ return [str];
102990
+ }
102991
+ var n;
102992
+ if (isSequence) {
102993
+ n = m.body.split(/\.\./);
102994
+ } else {
102995
+ n = parseCommaParts(m.body);
102996
+ if (n.length === 1) {
102997
+ n = expand2(n[0], false).map(embrace);
102998
+ if (n.length === 1) {
102999
+ return post.map(function(p) {
103000
+ return m.pre + n[0] + p;
103001
+ });
103002
+ }
103003
+ }
103004
+ }
103005
+ var N;
103006
+ if (isSequence) {
103007
+ var x = numeric(n[0]);
103008
+ var y = numeric(n[1]);
103009
+ var width = Math.max(n[0].length, n[1].length);
103010
+ var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
103011
+ var test = lte;
103012
+ var reverse = y < x;
103013
+ if (reverse) {
103014
+ incr *= -1;
103015
+ test = gte;
103016
+ }
103017
+ var pad = n.some(isPadded);
103018
+ N = [];
103019
+ for (var i = x; test(i, y); i += incr) {
103020
+ var c;
103021
+ if (isAlphaSequence) {
103022
+ c = String.fromCharCode(i);
103023
+ if (c === "\\")
103024
+ c = "";
103025
+ } else {
103026
+ c = String(i);
103027
+ if (pad) {
103028
+ var need = width - c.length;
103029
+ if (need > 0) {
103030
+ var z = new Array(need + 1).join("0");
103031
+ if (i < 0)
103032
+ c = "-" + z + c.slice(1);
103033
+ else
103034
+ c = z + c;
103035
+ }
103036
+ }
103037
+ }
103038
+ N.push(c);
103039
+ }
103040
+ } else {
103041
+ N = [];
103042
+ for (var j = 0; j < n.length; j++) {
103043
+ N.push.apply(N, expand2(n[j], false));
103044
+ }
103045
+ }
103046
+ for (var j = 0; j < N.length; j++) {
103047
+ for (var k = 0; k < post.length; k++) {
103048
+ var expansion = pre + N[j] + post[k];
103049
+ if (!isTop || isSequence || expansion)
103050
+ expansions.push(expansion);
103051
+ }
103052
+ }
103053
+ }
103054
+ return expansions;
103055
+ }
103056
+ }
103057
+ });
103058
+
103059
103059
  // packages/workspace-tools/src/executors/tsup-neutral/executor.ts
103060
103060
  var executor_exports = {};
103061
103061
  __export(executor_exports, {
@@ -109046,8 +109046,6 @@ ${commentStart} ----------------------------------------------------------------
109046
109046
  };
109047
109047
 
109048
109048
  // packages/workspace-tools/src/utils/run-tsup-build.ts
109049
- var import_node_fs5 = require("node:fs");
109050
- var import_promises3 = require("node:fs/promises");
109051
109049
  var import_node_path5 = require("node:path");
109052
109050
  var import_esbuild_decorators = __toESM(require_src());
109053
109051
  var import_devkit2 = __toESM(require_devkit());
@@ -109095,6 +109093,290 @@ var environmentPlugin = (data) => ({
109095
109093
  }
109096
109094
  });
109097
109095
 
109096
+ // packages/workspace-tools/src/utils/run-tsup-build.ts
109097
+ var import_tsup = __toESM(require_dist6());
109098
+ var ts = __toESM(require("typescript"));
109099
+
109100
+ // packages/workspace-tools/src/base/get-tsup-config.ts
109101
+ var import_devkit = __toESM(require_devkit());
109102
+ function defaultConfig({
109103
+ entry,
109104
+ outDir,
109105
+ projectRoot,
109106
+ workspaceRoot,
109107
+ tsconfig = "tsconfig.json",
109108
+ splitting,
109109
+ treeshake,
109110
+ format: format2 = ["cjs", "esm"],
109111
+ debug = false,
109112
+ shims = true,
109113
+ external,
109114
+ banner = {},
109115
+ platform = "neutral",
109116
+ verbose = false,
109117
+ apiReport = true,
109118
+ docModel = true,
109119
+ tsdocMetadata = true,
109120
+ metafile = true,
109121
+ skipNativeModulesPlugin = false,
109122
+ define: define2,
109123
+ env,
109124
+ plugins,
109125
+ generatePackageJson,
109126
+ dtsTsConfig,
109127
+ minify = false,
109128
+ getTransform
109129
+ }) {
109130
+ return {
109131
+ name: "default",
109132
+ entry,
109133
+ format: format2,
109134
+ target: platform !== "node" ? ["chrome91", "firefox90", "edge91", "safari15", "ios15", "opera77", "esnext"] : ["esnext", "node20"],
109135
+ tsconfig,
109136
+ splitting,
109137
+ generatePackageJson,
109138
+ treeshake: treeshake ? {
109139
+ preset: "recommended"
109140
+ } : false,
109141
+ projectRoot,
109142
+ workspaceRoot,
109143
+ outDir: (0, import_devkit.joinPathFragments)(outDir, "dist"),
109144
+ silent: !verbose,
109145
+ metafile,
109146
+ shims,
109147
+ external,
109148
+ platform,
109149
+ banner,
109150
+ define: define2,
109151
+ env,
109152
+ dts: false,
109153
+ experimentalDts: {
109154
+ entry,
109155
+ compilerOptions: {
109156
+ ...dtsTsConfig,
109157
+ options: {
109158
+ ...dtsTsConfig.options,
109159
+ outDir: (0, import_devkit.joinPathFragments)(outDir, "dist")
109160
+ }
109161
+ }
109162
+ },
109163
+ minify,
109164
+ apiReport,
109165
+ docModel,
109166
+ tsdocMetadata,
109167
+ sourcemap: debug,
109168
+ clean: false,
109169
+ skipNativeModulesPlugin,
109170
+ tsconfigDecoratorMetadata: true,
109171
+ plugins,
109172
+ getTransform,
109173
+ outExtension
109174
+ };
109175
+ }
109176
+ function getConfig(workspaceRoot, projectRoot, getConfigFn, { outputPath, tsConfig, platform, ...rest }) {
109177
+ return getConfigFn({
109178
+ ...rest,
109179
+ additionalEntryPoints: [],
109180
+ outDir: outputPath,
109181
+ tsconfig: tsConfig,
109182
+ workspaceRoot,
109183
+ projectRoot,
109184
+ platform
109185
+ });
109186
+ }
109187
+ var outExtension = ({ format: format2 }) => {
109188
+ let jsExtension = ".js";
109189
+ let dtsExtension = ".d.ts";
109190
+ if (format2 === "cjs") {
109191
+ jsExtension = ".cjs";
109192
+ dtsExtension = ".d.cts";
109193
+ }
109194
+ if (format2 === "esm") {
109195
+ jsExtension = ".js";
109196
+ dtsExtension = ".d.ts";
109197
+ }
109198
+ if (format2 === "iife") {
109199
+ jsExtension = ".global.js";
109200
+ }
109201
+ return {
109202
+ js: jsExtension,
109203
+ dts: dtsExtension
109204
+ };
109205
+ };
109206
+
109207
+ // packages/workspace-tools/src/utils/run-tsup-build.ts
109208
+ var applyDefaultOptions = (options) => {
109209
+ options.entry ??= "{sourceRoot}/index.ts";
109210
+ options.outputPath ??= "dist/{projectRoot}";
109211
+ options.tsConfig ??= "tsconfig.json";
109212
+ options.generatePackageJson ??= true;
109213
+ options.splitting ??= true;
109214
+ options.treeshake ??= true;
109215
+ options.platform ??= "neutral";
109216
+ options.format ??= ["cjs", "esm"];
109217
+ options.verbose ??= false;
109218
+ options.external ??= [];
109219
+ options.additionalEntryPoints ??= [];
109220
+ options.assets ??= [];
109221
+ options.plugins ??= [];
109222
+ options.includeSrc ??= false;
109223
+ options.minify ??= false;
109224
+ options.clean ??= true;
109225
+ options.bundle ??= true;
109226
+ options.debug ??= false;
109227
+ options.watch ??= false;
109228
+ options.apiReport ??= true;
109229
+ options.docModel ??= true;
109230
+ options.tsdocMetadata ??= true;
109231
+ options.emitOnAll ??= false;
109232
+ options.metafile ??= true;
109233
+ options.skipNativeModulesPlugin ??= false;
109234
+ options.define ??= {};
109235
+ options.env ??= {};
109236
+ options.getConfig ??= { dist: defaultConfig };
109237
+ return options;
109238
+ };
109239
+ var runTsupBuild = async (context, config, options) => {
109240
+ const stormEnv = Object.keys(options.env).filter((key) => key.startsWith("STORM_")).reduce((ret, key) => {
109241
+ ret[key] = options.env[key];
109242
+ return ret;
109243
+ }, {});
109244
+ options.plugins.push(
109245
+ (0, import_esbuild_decorators.esbuildDecorators)({
109246
+ tsconfig: options.tsConfig,
109247
+ cwd: config.workspaceRoot
109248
+ })
109249
+ );
109250
+ options.plugins.push(environmentPlugin(stormEnv));
109251
+ const getConfigOptions = {
109252
+ ...options,
109253
+ define: {
109254
+ __STORM_CONFIG: JSON.stringify(stormEnv)
109255
+ },
109256
+ env: {
109257
+ __STORM_CONFIG: JSON.stringify(stormEnv),
109258
+ ...stormEnv
109259
+ },
109260
+ dtsTsConfig: getNormalizedTsConfig(
109261
+ config.workspaceRoot,
109262
+ options.outputPath,
109263
+ createTypeScriptCompilationOptions(
109264
+ (0, import_normalize_options.normalizeOptions)(
109265
+ {
109266
+ ...options,
109267
+ watch: false,
109268
+ main: context.entry,
109269
+ transformers: []
109270
+ },
109271
+ config.workspaceRoot,
109272
+ context.sourceRoot,
109273
+ config.workspaceRoot
109274
+ ),
109275
+ context.projectName
109276
+ )
109277
+ ),
109278
+ banner: options.banner ? {
109279
+ js: `${options.banner}
109280
+
109281
+ `,
109282
+ css: `/*
109283
+ ${options.banner}
109284
+
109285
+
109286
+
109287
+ */`
109288
+ } : void 0,
109289
+ outputPath: options.outputPath,
109290
+ entry: context.entry
109291
+ };
109292
+ if (options.getConfig) {
109293
+ writeInfo(config, "\u26A1 Running the Build process");
109294
+ const getConfigFns = _isFunction(options.getConfig) ? [options.getConfig] : Object.keys(options.getConfig).map((key) => options.getConfig[key]);
109295
+ const tsupConfig = (0, import_tsup.defineConfig)(
109296
+ getConfigFns.map(
109297
+ (getConfigFn) => getConfig(config.workspaceRoot, context.projectRoot, getConfigFn, getConfigOptions)
109298
+ )
109299
+ );
109300
+ if (_isFunction(tsupConfig)) {
109301
+ await build(await Promise.resolve(tsupConfig({})), config);
109302
+ } else {
109303
+ await build(tsupConfig, config);
109304
+ }
109305
+ } else if (getLogLevel(config?.logLevel) >= LogLevel.WARN) {
109306
+ writeWarning(
109307
+ config,
109308
+ "The Build process did not run because no `getConfig` parameter was provided"
109309
+ );
109310
+ }
109311
+ };
109312
+ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
109313
+ const config = ts.readConfigFile(options.tsConfig, ts.sys.readFile).config;
109314
+ const tsConfig = ts.parseJsonConfigFileContent(
109315
+ {
109316
+ ...config,
109317
+ compilerOptions: {
109318
+ ...config.compilerOptions,
109319
+ outDir: outputPath,
109320
+ rootDir: workspaceRoot,
109321
+ baseUrl: workspaceRoot,
109322
+ allowJs: true,
109323
+ noEmit: false,
109324
+ esModuleInterop: true,
109325
+ downlevelIteration: true,
109326
+ forceConsistentCasingInFileNames: true,
109327
+ emitDeclarationOnly: true,
109328
+ declaration: true,
109329
+ declarationMap: true,
109330
+ declarationDir: (0, import_devkit2.joinPathFragments)(workspaceRoot, "tmp", ".tsup", "declaration")
109331
+ }
109332
+ },
109333
+ ts.sys,
109334
+ (0, import_node_path5.dirname)(options.tsConfig)
109335
+ );
109336
+ tsConfig.options.pathsBasePath = workspaceRoot;
109337
+ if (tsConfig.options.incremental && !tsConfig.options.tsBuildInfoFile) {
109338
+ tsConfig.options.tsBuildInfoFile = (0, import_devkit2.joinPathFragments)(outputPath, "tsconfig.tsbuildinfo");
109339
+ }
109340
+ return tsConfig;
109341
+ }
109342
+ var build = async (options, config) => {
109343
+ if (Array.isArray(options)) {
109344
+ await Promise.all(options.map((buildOptions) => build(buildOptions, config)));
109345
+ } else {
109346
+ if (getLogLevel(config?.logLevel) >= LogLevel.TRACE && !options.silent) {
109347
+ console.log("\u2699\uFE0F Tsup build config: \n", options, "\n");
109348
+ }
109349
+ await (0, import_tsup.build)(options);
109350
+ await new Promise((r) => setTimeout(r, 100));
109351
+ }
109352
+ };
109353
+ var _isFunction = (value) => {
109354
+ try {
109355
+ return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
109356
+ } catch (e) {
109357
+ return false;
109358
+ }
109359
+ };
109360
+ var createTypeScriptCompilationOptions = (normalizedOptions, projectName) => {
109361
+ return {
109362
+ outputPath: normalizedOptions.outputPath,
109363
+ projectName,
109364
+ projectRoot: normalizedOptions.projectRoot,
109365
+ rootDir: normalizedOptions.rootDir,
109366
+ tsConfig: normalizedOptions.tsConfig,
109367
+ watch: normalizedOptions.watch,
109368
+ deleteOutputPath: normalizedOptions.clean,
109369
+ getCustomTransformers: (0, import_get_custom_transformers_factory.getCustomTrasformersFactory)(normalizedOptions.transformers)
109370
+ };
109371
+ };
109372
+
109373
+ // packages/workspace-tools/src/executors/tsup/executor.ts
109374
+ var import_node_fs5 = require("node:fs");
109375
+ var import_promises3 = require("node:fs/promises");
109376
+ var import_devkit3 = __toESM(require_devkit());
109377
+ var import_js = __toESM(require_src2());
109378
+ var import_fs_extra = __toESM(require_lib5());
109379
+
109098
109380
  // node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/mjs/index.js
109099
109381
  var import_brace_expansion = __toESM(require_brace_expansion2(), 1);
109100
109382
 
@@ -113637,7 +113919,7 @@ var PathScurryBase = class {
113637
113919
  *
113638
113920
  * @internal
113639
113921
  */
113640
- constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS } = {}) {
113922
+ constructor(cwd = process.cwd(), pathImpl, sep3, { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS } = {}) {
113641
113923
  this.#fs = fsFromOption(fs);
113642
113924
  if (cwd instanceof URL || cwd.startsWith("file://")) {
113643
113925
  cwd = (0, import_url.fileURLToPath)(cwd);
@@ -113648,7 +113930,7 @@ var PathScurryBase = class {
113648
113930
  this.#resolveCache = new ResolveCache();
113649
113931
  this.#resolvePosixCache = new ResolveCache();
113650
113932
  this.#children = new ChildrenCache(childrenCacheSize);
113651
- const split = cwdPath.substring(this.rootPath.length).split(sep2);
113933
+ const split = cwdPath.substring(this.rootPath.length).split(sep3);
113652
113934
  if (split.length === 1 && !split[0]) {
113653
113935
  split.pop();
113654
113936
  }
@@ -115269,334 +115551,20 @@ var glob = Object.assign(glob_, {
115269
115551
  });
115270
115552
  glob.glob = glob;
115271
115553
 
115272
- // packages/workspace-tools/src/utils/run-tsup-build.ts
115273
- var import_prettier = require("prettier");
115274
- var import_tsup = __toESM(require_dist6());
115275
- var ts = __toESM(require("typescript"));
115276
-
115277
- // packages/workspace-tools/src/base/get-tsup-config.ts
115278
- var import_devkit = __toESM(require_devkit());
115279
- function defaultConfig({
115280
- entry,
115281
- outDir,
115282
- projectRoot,
115283
- workspaceRoot,
115284
- tsconfig = "tsconfig.json",
115285
- splitting,
115286
- treeshake,
115287
- format: format3 = ["cjs", "esm"],
115288
- debug = false,
115289
- shims = true,
115290
- external,
115291
- banner = {},
115292
- platform = "neutral",
115293
- verbose = false,
115294
- apiReport = true,
115295
- docModel = true,
115296
- tsdocMetadata = true,
115297
- metafile = true,
115298
- skipNativeModulesPlugin = false,
115299
- define: define2,
115300
- env,
115301
- plugins,
115302
- generatePackageJson,
115303
- dtsTsConfig,
115304
- minify = false,
115305
- getTransform
115306
- }) {
115307
- return {
115308
- name: "default",
115309
- entry,
115310
- format: format3,
115311
- target: platform !== "node" ? ["chrome91", "firefox90", "edge91", "safari15", "ios15", "opera77", "esnext"] : ["esnext", "node20"],
115312
- tsconfig,
115313
- splitting,
115314
- generatePackageJson,
115315
- treeshake: treeshake ? {
115316
- preset: "recommended"
115317
- } : false,
115318
- projectRoot,
115319
- workspaceRoot,
115320
- outDir: (0, import_devkit.joinPathFragments)(outDir, "dist"),
115321
- silent: !verbose,
115322
- metafile,
115323
- shims,
115324
- external,
115325
- platform,
115326
- banner,
115327
- define: define2,
115328
- env,
115329
- dts: false,
115330
- experimentalDts: {
115331
- entry,
115332
- compilerOptions: {
115333
- ...dtsTsConfig,
115334
- options: {
115335
- ...dtsTsConfig.options,
115336
- outDir: (0, import_devkit.joinPathFragments)(outDir, "dist")
115337
- }
115338
- }
115339
- },
115340
- minify,
115341
- apiReport,
115342
- docModel,
115343
- tsdocMetadata,
115344
- sourcemap: debug,
115345
- clean: false,
115346
- skipNativeModulesPlugin,
115347
- tsconfigDecoratorMetadata: true,
115348
- plugins,
115349
- getTransform,
115350
- outExtension
115351
- };
115352
- }
115353
- function getConfig(workspaceRoot, projectRoot, getConfigFn, { outputPath, tsConfig, platform, ...rest }) {
115354
- return getConfigFn({
115355
- ...rest,
115356
- additionalEntryPoints: [],
115357
- outDir: outputPath,
115358
- tsconfig: tsConfig,
115359
- workspaceRoot,
115360
- projectRoot,
115361
- platform
115362
- });
115363
- }
115364
- var outExtension = ({ format: format3 }) => {
115365
- let jsExtension = ".js";
115366
- let dtsExtension = ".d.ts";
115367
- if (format3 === "cjs") {
115368
- jsExtension = ".cjs";
115369
- dtsExtension = ".d.cts";
115370
- }
115371
- if (format3 === "esm") {
115372
- jsExtension = ".js";
115373
- dtsExtension = ".d.ts";
115374
- }
115375
- if (format3 === "iife") {
115376
- jsExtension = ".global.js";
115377
- }
115378
- return {
115379
- js: jsExtension,
115380
- dts: dtsExtension
115381
- };
115382
- };
115383
-
115384
- // packages/workspace-tools/src/utils/run-tsup-build.ts
115385
- var applyDefaultOptions = (options) => {
115386
- options.entry ??= "{sourceRoot}/index.ts";
115387
- options.outputPath ??= "dist/{projectRoot}";
115388
- options.tsConfig ??= "tsconfig.json";
115389
- options.generatePackageJson ??= true;
115390
- options.splitting ??= true;
115391
- options.treeshake ??= true;
115392
- options.platform ??= "neutral";
115393
- options.format ??= ["cjs", "esm"];
115394
- options.verbose ??= false;
115395
- options.external ??= [];
115396
- options.additionalEntryPoints ??= [];
115397
- options.assets ??= [];
115398
- options.plugins ??= [];
115399
- options.includeSrc ??= false;
115400
- options.minify ??= false;
115401
- options.clean ??= true;
115402
- options.bundle ??= true;
115403
- options.debug ??= false;
115404
- options.watch ??= false;
115405
- options.apiReport ??= true;
115406
- options.docModel ??= true;
115407
- options.tsdocMetadata ??= true;
115408
- options.emitOnAll ??= false;
115409
- options.metafile ??= true;
115410
- options.skipNativeModulesPlugin ??= false;
115411
- options.define ??= {};
115412
- options.env ??= {};
115413
- options.getConfig ??= { dist: defaultConfig };
115414
- return options;
115415
- };
115416
- var runTsupBuild = async (context, config, options) => {
115417
- if (options.includeSrc === true) {
115418
- const files = globSync([
115419
- (0, import_devkit2.joinPathFragments)(config.workspaceRoot, options.outputPath, "src/**/*.ts"),
115420
- (0, import_devkit2.joinPathFragments)(config.workspaceRoot, options.outputPath, "src/**/*.tsx"),
115421
- (0, import_devkit2.joinPathFragments)(config.workspaceRoot, options.outputPath, "src/**/*.js"),
115422
- (0, import_devkit2.joinPathFragments)(config.workspaceRoot, options.outputPath, "src/**/*.jsx")
115423
- ]);
115424
- await Promise.allSettled(
115425
- files.map(
115426
- async (file) => (0, import_promises3.writeFile)(
115427
- file,
115428
- await (0, import_prettier.format)(
115429
- `${options.banner ? options.banner.startsWith("//") ? options.banner : `// ${options.banner}` : ""}
115430
-
115431
- ${(0, import_node_fs5.readFileSync)(file, "utf-8")}`,
115432
- {
115433
- ...{
115434
- plugins: ["prettier-plugin-packagejson"],
115435
- trailingComma: "none",
115436
- tabWidth: 2,
115437
- semi: true,
115438
- singleQuote: false,
115439
- quoteProps: "preserve",
115440
- insertPragma: false,
115441
- bracketSameLine: true,
115442
- printWidth: 80,
115443
- bracketSpacing: true,
115444
- arrowParens: "avoid",
115445
- endOfLine: "lf"
115446
- },
115447
- parser: "typescript"
115448
- }
115449
- ),
115450
- "utf-8"
115451
- )
115452
- )
115453
- );
115454
- }
115455
- const stormEnv = Object.keys(options.env).filter((key) => key.startsWith("STORM_")).reduce((ret, key) => {
115456
- ret[key] = options.env[key];
115457
- return ret;
115458
- }, {});
115459
- options.plugins.push(
115460
- (0, import_esbuild_decorators.esbuildDecorators)({
115461
- tsconfig: options.tsConfig,
115462
- cwd: config.workspaceRoot
115463
- })
115464
- );
115465
- options.plugins.push(environmentPlugin(stormEnv));
115466
- const getConfigOptions = {
115467
- ...options,
115468
- define: {
115469
- __STORM_CONFIG: JSON.stringify(stormEnv)
115470
- },
115471
- env: {
115472
- __STORM_CONFIG: JSON.stringify(stormEnv),
115473
- ...stormEnv
115474
- },
115475
- dtsTsConfig: getNormalizedTsConfig(
115476
- config.workspaceRoot,
115477
- options.outputPath,
115478
- createTypeScriptCompilationOptions(
115479
- (0, import_normalize_options.normalizeOptions)(
115480
- {
115481
- ...options,
115482
- watch: false,
115483
- main: options.entry,
115484
- transformers: []
115485
- },
115486
- config.workspaceRoot,
115487
- context.sourceRoot,
115488
- config.workspaceRoot
115489
- ),
115490
- context.projectName
115491
- )
115492
- ),
115493
- banner: options.banner ? {
115494
- js: `${options.banner}
115495
-
115496
- `,
115497
- css: `/*
115498
- ${options.banner}
115499
-
115500
-
115501
-
115502
- */`
115503
- } : void 0,
115504
- outputPath: options.outputPath,
115505
- entry: context.entry
115506
- };
115507
- if (options.getConfig) {
115508
- writeInfo(config, "\u26A1 Running the Build process");
115509
- const getConfigFns = _isFunction(options.getConfig) ? [options.getConfig] : Object.keys(options.getConfig).map((key) => options.getConfig[key]);
115510
- const tsupConfig = (0, import_tsup.defineConfig)(
115511
- getConfigFns.map(
115512
- (getConfigFn) => getConfig(config.workspaceRoot, context.projectRoot, getConfigFn, getConfigOptions)
115513
- )
115514
- );
115515
- if (_isFunction(tsupConfig)) {
115516
- await build(await Promise.resolve(tsupConfig({})), config);
115517
- } else {
115518
- await build(tsupConfig, config);
115519
- }
115520
- } else if (getLogLevel(config?.logLevel) >= LogLevel.WARN) {
115521
- writeWarning(
115522
- config,
115523
- "The Build process did not run because no `getConfig` parameter was provided"
115524
- );
115525
- }
115526
- };
115527
- function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
115528
- const config = ts.readConfigFile(options.tsConfig, ts.sys.readFile).config;
115529
- const tsConfig = ts.parseJsonConfigFileContent(
115530
- {
115531
- ...config,
115532
- compilerOptions: {
115533
- ...config.compilerOptions,
115534
- outDir: outputPath,
115535
- rootDir: workspaceRoot,
115536
- baseUrl: workspaceRoot,
115537
- allowJs: true,
115538
- noEmit: false,
115539
- esModuleInterop: true,
115540
- downlevelIteration: true,
115541
- forceConsistentCasingInFileNames: true,
115542
- emitDeclarationOnly: true,
115543
- declaration: true,
115544
- declarationMap: true,
115545
- declarationDir: (0, import_devkit2.joinPathFragments)(workspaceRoot, "tmp", ".tsup", "declaration")
115546
- }
115547
- },
115548
- ts.sys,
115549
- (0, import_node_path5.dirname)(options.tsConfig)
115550
- );
115551
- tsConfig.options.pathsBasePath = workspaceRoot;
115552
- if (tsConfig.options.incremental && !tsConfig.options.tsBuildInfoFile) {
115553
- tsConfig.options.tsBuildInfoFile = (0, import_devkit2.joinPathFragments)(outputPath, "tsconfig.tsbuildinfo");
115554
- }
115555
- return tsConfig;
115556
- }
115557
- var build = async (options, config) => {
115558
- if (Array.isArray(options)) {
115559
- await Promise.all(options.map((buildOptions) => build(buildOptions, config)));
115560
- } else {
115561
- if (getLogLevel(config?.logLevel) >= LogLevel.TRACE && !options.silent) {
115562
- console.log("\u2699\uFE0F Tsup build config: \n", options, "\n");
115563
- }
115564
- await (0, import_tsup.build)(options);
115565
- await new Promise((r) => setTimeout(r, 100));
115566
- }
115567
- };
115568
- var _isFunction = (value) => {
115569
- try {
115570
- return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
115571
- } catch (e) {
115572
- return false;
115573
- }
115574
- };
115575
- var createTypeScriptCompilationOptions = (normalizedOptions, projectName) => {
115576
- return {
115577
- outputPath: normalizedOptions.outputPath,
115578
- projectName,
115579
- projectRoot: normalizedOptions.projectRoot,
115580
- rootDir: normalizedOptions.rootDir,
115581
- tsConfig: normalizedOptions.tsConfig,
115582
- watch: normalizedOptions.watch,
115583
- deleteOutputPath: normalizedOptions.clean,
115584
- getCustomTransformers: (0, import_get_custom_transformers_factory.getCustomTrasformersFactory)(normalizedOptions.transformers)
115585
- };
115586
- };
115587
-
115588
115554
  // packages/workspace-tools/src/executors/tsup/executor.ts
115589
- var import_node_fs6 = require("node:fs");
115590
- var import_devkit3 = __toESM(require_devkit());
115591
- var import_js = __toESM(require_src2());
115592
- var import_fs_extra = __toESM(require_lib5());
115593
115555
  var import_fileutils = require("nx/src/utils/fileutils");
115594
- var import_prettier2 = require("prettier");
115556
+ var import_prettier = require("prettier");
115595
115557
 
115596
115558
  // packages/workspace-tools/src/utils/file-path-utils.ts
115559
+ var import_node_path6 = require("node:path");
115597
115560
  var removeExtension = (filePath) => {
115598
115561
  return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
115599
115562
  };
115563
+ function findFileName(filePath) {
115564
+ return filePath?.split(
115565
+ filePath?.includes(import_node_path6.sep) ? import_node_path6.sep : filePath?.includes("/") ? "/" : "\\"
115566
+ )?.pop() ?? "";
115567
+ }
115600
115568
 
115601
115569
  // packages/workspace-tools/src/utils/get-project-configurations.ts
115602
115570
  var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
@@ -115757,41 +115725,40 @@ ${externalDependencies.map((dep) => {
115757
115725
  arrowParens: "avoid",
115758
115726
  endOfLine: "lf"
115759
115727
  };
115760
- const entryPoints = [];
115728
+ let entryPoints = [];
115761
115729
  if (options.entry) {
115762
115730
  entryPoints.push(options.entry);
115763
115731
  }
115764
115732
  if (options.emitOnAll === true) {
115765
- entryPoints.push((0, import_devkit3.joinPathFragments)(sourceRoot, "**/*.{ts,tsx}"));
115733
+ entryPoints = globSync((0, import_devkit3.joinPathFragments)(sourceRoot, "**/*.{ts,tsx}"), {
115734
+ withFileTypes: true
115735
+ }).reduce((ret, filePath) => {
115736
+ let formattedPath = workspaceRoot.replaceAll("\\", "/");
115737
+ if (formattedPath.toUpperCase().startsWith("C:")) {
115738
+ formattedPath = formattedPath.substring(2);
115739
+ }
115740
+ let propertyKey = (0, import_devkit3.joinPathFragments)(filePath.path, removeExtension(filePath.name)).replaceAll("\\", "/").replaceAll(formattedPath, "").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
115741
+ if (propertyKey) {
115742
+ while (propertyKey.startsWith("/")) {
115743
+ propertyKey = propertyKey.substring(1);
115744
+ }
115745
+ writeDebug(
115746
+ config,
115747
+ `Trying to add entry point ${propertyKey} at "${(0, import_devkit3.joinPathFragments)(
115748
+ filePath.path,
115749
+ filePath.name
115750
+ )}"`
115751
+ );
115752
+ if (!ret.includes(propertyKey)) {
115753
+ ret.push((0, import_devkit3.joinPathFragments)(filePath.path, filePath.name));
115754
+ }
115755
+ }
115756
+ return ret;
115757
+ }, entryPoints);
115766
115758
  }
115767
115759
  if (options.additionalEntryPoints) {
115768
115760
  entryPoints.push(...options.additionalEntryPoints);
115769
115761
  }
115770
- const entry = globSync(entryPoints, {
115771
- withFileTypes: true
115772
- }).reduce((ret, filePath) => {
115773
- let formattedPath = workspaceRoot.replaceAll("\\", "/");
115774
- if (formattedPath.toUpperCase().startsWith("C:")) {
115775
- formattedPath = formattedPath.substring(2);
115776
- }
115777
- let propertyKey = (0, import_devkit3.joinPathFragments)(filePath.path, removeExtension(filePath.name)).replaceAll("\\", "/").replaceAll(formattedPath, "").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
115778
- if (propertyKey) {
115779
- while (propertyKey.startsWith("/")) {
115780
- propertyKey = propertyKey.substring(1);
115781
- }
115782
- writeDebug(
115783
- config,
115784
- `Trying to add entry point ${propertyKey} at "${(0, import_devkit3.joinPathFragments)(
115785
- filePath.path,
115786
- filePath.name
115787
- )}"`
115788
- );
115789
- if (!(propertyKey in ret)) {
115790
- ret[propertyKey] = (0, import_devkit3.joinPathFragments)(filePath.path, filePath.name);
115791
- }
115792
- }
115793
- return ret;
115794
- }, {});
115795
115762
  if (options.generatePackageJson !== false) {
115796
115763
  const projectGraph = (0, import_devkit3.readCachedProjectGraph)();
115797
115764
  packageJson.dependencies = void 0;
@@ -115831,40 +115798,30 @@ ${externalDependencies.map((dep) => {
115831
115798
  },
115832
115799
  "./package.json": "./package.json"
115833
115800
  };
115834
- for (const additionalEntryPoint of options.additionalEntryPoints) {
115835
- packageJson.exports[`./${removeExtension(additionalEntryPoint).replace(sourceRoot, "")}`] = {
115801
+ for (const entryPoint of entryPoints) {
115802
+ let formattedEntryPoint = removeExtension(entryPoint).replace(sourceRoot, "");
115803
+ if (formattedEntryPoint.startsWith(".")) {
115804
+ formattedEntryPoint = formattedEntryPoint.substring(1);
115805
+ }
115806
+ if (formattedEntryPoint.startsWith("/")) {
115807
+ formattedEntryPoint = formattedEntryPoint.substring(1);
115808
+ }
115809
+ packageJson.exports[`./${formattedEntryPoint}`] = {
115836
115810
  import: {
115837
- types: `./${(0, import_devkit3.joinPathFragments)(
115838
- distPaths[0],
115839
- removeExtension(additionalEntryPoint).replace(sourceRoot, "")
115840
- )}.d.ts`,
115841
- default: `./${(0, import_devkit3.joinPathFragments)(
115842
- distPaths[0],
115843
- removeExtension(additionalEntryPoint).replace(sourceRoot, "")
115844
- )}.js`
115811
+ types: `./${(0, import_devkit3.joinPathFragments)(distPaths[0], formattedEntryPoint)}.d.ts`,
115812
+ default: `./${(0, import_devkit3.joinPathFragments)(distPaths[0], formattedEntryPoint)}.js`
115845
115813
  },
115846
115814
  require: {
115847
- types: `./${(0, import_devkit3.joinPathFragments)(
115848
- distPaths[0],
115849
- removeExtension(additionalEntryPoint).replace(sourceRoot, "")
115850
- )}.d.cts`,
115851
- default: `./${(0, import_devkit3.joinPathFragments)(
115852
- distPaths[0],
115853
- removeExtension(additionalEntryPoint).replace(sourceRoot, "")
115854
- )}.cjs`
115815
+ types: `./${(0, import_devkit3.joinPathFragments)(distPaths[0], formattedEntryPoint)}.d.cts`,
115816
+ default: `./${(0, import_devkit3.joinPathFragments)(distPaths[0], formattedEntryPoint)}.cjs`
115855
115817
  },
115856
115818
  default: {
115857
- types: `./${(0, import_devkit3.joinPathFragments)(
115858
- distPaths[0],
115859
- removeExtension(additionalEntryPoint).replace(sourceRoot, "")
115860
- )}.d.ts`,
115861
- default: `./${(0, import_devkit3.joinPathFragments)(
115862
- distPaths[0],
115863
- removeExtension(additionalEntryPoint).replace(sourceRoot, "")
115864
- )}.js`
115819
+ types: `./${(0, import_devkit3.joinPathFragments)(distPaths[0], formattedEntryPoint)}.d.ts`,
115820
+ default: `./${(0, import_devkit3.joinPathFragments)(distPaths[0], formattedEntryPoint)}.js`
115865
115821
  }
115866
115822
  };
115867
115823
  }
115824
+ packageJson.sideEffects ??= false;
115868
115825
  packageJson.funding ??= workspacePackageJson.funding;
115869
115826
  packageJson.types ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.d.ts`;
115870
115827
  packageJson.typings ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.d.ts`;
@@ -115883,7 +115840,6 @@ ${externalDependencies.map((dep) => {
115883
115840
  }
115884
115841
  packageJson.source ??= `${(0, import_devkit3.joinPathFragments)(distSrc, "index.ts").replaceAll("\\", "/")}`;
115885
115842
  }
115886
- packageJson.sideEffects ??= false;
115887
115843
  packageJson.files ??= ["dist/**/*"];
115888
115844
  if (options.includeSrc === true && !packageJson.files.includes("src")) {
115889
115845
  packageJson.files.push("src/**/*");
@@ -115902,9 +115858,9 @@ ${externalDependencies.map((dep) => {
115902
115858
  packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_devkit3.joinPathFragments)("packages", context.projectName);
115903
115859
  const packageJsonPath = (0, import_devkit3.joinPathFragments)(context.root, options.outputPath, "package.json");
115904
115860
  writeDebug(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
115905
- (0, import_node_fs6.writeFileSync)(
115861
+ (0, import_node_fs5.writeFileSync)(
115906
115862
  packageJsonPath,
115907
- await (0, import_prettier2.format)(JSON.stringify(packageJson), {
115863
+ await (0, import_prettier.format)(JSON.stringify(packageJson), {
115908
115864
  ...prettierOptions,
115909
115865
  parser: "json"
115910
115866
  })
@@ -115912,15 +115868,54 @@ ${externalDependencies.map((dep) => {
115912
115868
  } else {
115913
115869
  writeWarning(config, "Skipping writing to package.json file");
115914
115870
  }
115915
- await runTsupBuild(
115916
- {
115917
- entry,
115918
- projectRoot,
115919
- projectName: context.projectName,
115920
- sourceRoot
115921
- },
115922
- config,
115923
- options
115871
+ if (options.includeSrc === true) {
115872
+ const files = globSync([
115873
+ (0, import_devkit3.joinPathFragments)(config.workspaceRoot, options.outputPath, "src/**/*.ts"),
115874
+ (0, import_devkit3.joinPathFragments)(config.workspaceRoot, options.outputPath, "src/**/*.tsx"),
115875
+ (0, import_devkit3.joinPathFragments)(config.workspaceRoot, options.outputPath, "src/**/*.js"),
115876
+ (0, import_devkit3.joinPathFragments)(config.workspaceRoot, options.outputPath, "src/**/*.jsx")
115877
+ ]);
115878
+ await Promise.allSettled(
115879
+ files.map(
115880
+ async (file) => (0, import_promises3.writeFile)(
115881
+ file,
115882
+ await (0, import_prettier.format)(
115883
+ `${options.banner ? options.banner.startsWith("//") ? options.banner : `// ${options.banner}` : ""}
115884
+
115885
+ ${(0, import_node_fs5.readFileSync)(file, "utf-8")}`,
115886
+ {
115887
+ ...prettierOptions,
115888
+ parser: "typescript"
115889
+ }
115890
+ ),
115891
+ "utf-8"
115892
+ )
115893
+ )
115894
+ );
115895
+ }
115896
+ Promise.all(
115897
+ entryPoints.map(
115898
+ (entryPoint) => runTsupBuild(
115899
+ {
115900
+ entry: entryPoint,
115901
+ projectRoot,
115902
+ projectName: context.projectName,
115903
+ sourceRoot
115904
+ },
115905
+ config,
115906
+ {
115907
+ ...options,
115908
+ outputPath: (0, import_devkit3.joinPathFragments)(
115909
+ options.outputPath,
115910
+ "dist",
115911
+ removeExtension(entryPoint.replace(sourceRoot, "")).replace(
115912
+ findFileName(entryPoint),
115913
+ ""
115914
+ )
115915
+ )
115916
+ }
115917
+ )
115918
+ )
115924
115919
  );
115925
115920
  writeSuccess(config, "\u26A1 The Build process has completed successfully");
115926
115921
  return {