@storm-software/workspace-tools 1.16.17 → 1.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -450,7 +450,7 @@ function __classPrivateFieldIn(state, receiver) {
450
450
  throw new TypeError("Cannot use 'in' operator on non-object");
451
451
  return typeof state === "function" ? receiver === state : state.has(receiver);
452
452
  }
453
- function __addDisposableResource(env2, value, async) {
453
+ function __addDisposableResource(env, value, async) {
454
454
  if (value !== null && value !== void 0) {
455
455
  if (typeof value !== "object" && typeof value !== "function")
456
456
  throw new TypeError("Object expected.");
@@ -467,20 +467,20 @@ function __addDisposableResource(env2, value, async) {
467
467
  }
468
468
  if (typeof dispose !== "function")
469
469
  throw new TypeError("Object not disposable.");
470
- env2.stack.push({ value, dispose, async });
470
+ env.stack.push({ value, dispose, async });
471
471
  } else if (async) {
472
- env2.stack.push({ async: true });
472
+ env.stack.push({ async: true });
473
473
  }
474
474
  return value;
475
475
  }
476
- function __disposeResources(env2) {
476
+ function __disposeResources(env) {
477
477
  function fail(e) {
478
- env2.error = env2.hasError ? new _SuppressedError(e, env2.error, "An error was suppressed during disposal.") : e;
479
- env2.hasError = true;
478
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
479
+ env.hasError = true;
480
480
  }
481
481
  function next() {
482
- while (env2.stack.length) {
483
- var rec = env2.stack.pop();
482
+ while (env.stack.length) {
483
+ var rec = env.stack.pop();
484
484
  try {
485
485
  var result = rec.dispose && rec.dispose.call(rec.value);
486
486
  if (rec.async)
@@ -492,8 +492,8 @@ function __disposeResources(env2) {
492
492
  fail(e);
493
493
  }
494
494
  }
495
- if (env2.hasError)
496
- throw env2.error;
495
+ if (env.hasError)
496
+ throw env.error;
497
497
  }
498
498
  return next();
499
499
  }
@@ -578,6 +578,238 @@ var init_tslib_es6 = __esm({
578
578
  }
579
579
  });
580
580
 
581
+ // node_modules/.pnpm/@anatine+esbuild-decorators@0.2.19_esbuild@0.14.54/node_modules/@anatine/esbuild-decorators/src/lib/strip-it.js
582
+ var require_strip_it = __commonJS({
583
+ "node_modules/.pnpm/@anatine+esbuild-decorators@0.2.19_esbuild@0.14.54/node_modules/@anatine/esbuild-decorators/src/lib/strip-it.js"(exports) {
584
+ "use strict";
585
+ Object.defineProperty(exports, "__esModule", { value: true });
586
+ exports.strip = void 0;
587
+ var TextNode = class {
588
+ constructor(node) {
589
+ this.type = node.type;
590
+ this.value = node.value;
591
+ this.match = node.match;
592
+ this.newline = node.newline || "";
593
+ }
594
+ get protected() {
595
+ return Boolean(this.match) && this.match[1] === "!";
596
+ }
597
+ };
598
+ var TextBlock = class extends TextNode {
599
+ constructor(node) {
600
+ super(node);
601
+ this.nodes = node.nodes || [];
602
+ }
603
+ push(node) {
604
+ this.nodes.push(node);
605
+ }
606
+ get protected() {
607
+ return this.nodes.length > 0 && this.nodes[0].protected === true;
608
+ }
609
+ };
610
+ var constants = {
611
+ ESCAPED_CHAR_REGEX: /^\\./,
612
+ QUOTED_STRING_REGEX: /^(['"`])((?:\\.|[^\1])+?)(\1)/,
613
+ NEWLINE_REGEX: /^\r*\n/,
614
+ BLOCK_OPEN_REGEX: /^\/\*\*?(!?)/,
615
+ BLOCK_CLOSE_REGEX: /^\*\/(\n?)/,
616
+ LINE_REGEX: /^\/\/(!?).*/
617
+ };
618
+ var parse = (input) => {
619
+ const cst = new TextBlock({ type: "root", nodes: [] });
620
+ const stack = [cst];
621
+ const { ESCAPED_CHAR_REGEX, QUOTED_STRING_REGEX, NEWLINE_REGEX, BLOCK_CLOSE_REGEX, BLOCK_OPEN_REGEX, LINE_REGEX } = constants;
622
+ let block = cst;
623
+ let remaining = input;
624
+ let token;
625
+ let prev;
626
+ const consume = (value = remaining[0] || "") => {
627
+ remaining = remaining.slice(value.length);
628
+ return value;
629
+ };
630
+ const scan = (regex, type = "text") => {
631
+ const match2 = regex.exec(remaining);
632
+ if (match2) {
633
+ consume(match2[0]);
634
+ return { type, value: match2[0], match: match2 };
635
+ }
636
+ };
637
+ const push = (node) => {
638
+ if (prev && prev.type === "text" && node.type === "text") {
639
+ prev.value += node.value;
640
+ return;
641
+ }
642
+ block.push(node);
643
+ if (node.nodes) {
644
+ stack.push(node);
645
+ block = node;
646
+ }
647
+ prev = node;
648
+ };
649
+ const pop = () => {
650
+ if (block.type === "root") {
651
+ throw new SyntaxError("Unclosed block comment");
652
+ }
653
+ stack.pop();
654
+ block = stack[stack.length - 1];
655
+ };
656
+ while (remaining !== "") {
657
+ if (token = scan(ESCAPED_CHAR_REGEX, "text")) {
658
+ push(new TextNode(token));
659
+ continue;
660
+ }
661
+ if (block.type !== "block" && (!prev || !/\w$/.test(prev.value))) {
662
+ if (token = scan(QUOTED_STRING_REGEX, "line")) {
663
+ push(new TextNode(token));
664
+ continue;
665
+ }
666
+ }
667
+ if (token = scan(NEWLINE_REGEX, "newline")) {
668
+ push(new TextNode(token));
669
+ continue;
670
+ }
671
+ if (token = scan(BLOCK_OPEN_REGEX, "open")) {
672
+ push(new TextBlock({ type: "block" }));
673
+ push(new TextNode(token));
674
+ continue;
675
+ }
676
+ if (block.type === "block") {
677
+ if (token = scan(BLOCK_CLOSE_REGEX, "close")) {
678
+ token.newline = token.match[1] || "";
679
+ push(new TextNode(token));
680
+ pop();
681
+ continue;
682
+ }
683
+ }
684
+ if (block.type !== "block") {
685
+ if (token = scan(LINE_REGEX, "line")) {
686
+ push(new TextNode(token));
687
+ continue;
688
+ }
689
+ }
690
+ push(new TextNode({ type: "text", value: consume(remaining[0]) }));
691
+ }
692
+ return cst;
693
+ };
694
+ var compile = (cst) => {
695
+ const walk = (node) => {
696
+ let output = "";
697
+ for (const child of node.nodes) {
698
+ switch (child.type) {
699
+ case "block":
700
+ break;
701
+ case "line":
702
+ break;
703
+ case "open":
704
+ case "close":
705
+ case "text":
706
+ case "newline":
707
+ default: {
708
+ output += child.value || "";
709
+ break;
710
+ }
711
+ }
712
+ }
713
+ return output;
714
+ };
715
+ return walk(cst);
716
+ };
717
+ var strip = (input) => compile(parse(input));
718
+ exports.strip = strip;
719
+ }
720
+ });
721
+
722
+ // node_modules/.pnpm/@anatine+esbuild-decorators@0.2.19_esbuild@0.14.54/node_modules/@anatine/esbuild-decorators/src/lib/esbuild-decorators.js
723
+ var require_esbuild_decorators = __commonJS({
724
+ "node_modules/.pnpm/@anatine+esbuild-decorators@0.2.19_esbuild@0.14.54/node_modules/@anatine/esbuild-decorators/src/lib/esbuild-decorators.js"(exports) {
725
+ "use strict";
726
+ Object.defineProperty(exports, "__esModule", { value: true });
727
+ exports.esbuildDecorators = void 0;
728
+ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
729
+ var fs_1 = require("fs");
730
+ var path_1 = require("path");
731
+ var typescript_1 = require("typescript");
732
+ var util_1 = require("util");
733
+ var strip_it_1 = require_strip_it();
734
+ var { readFile } = fs_1.promises;
735
+ var theFinder = new RegExp(/((?<![(\s]\s*['"])@\w[.[\]\w\d]*\s*(?![;])[((?=\s)])/);
736
+ var findDecorators = (fileContent) => theFinder.test((0, strip_it_1.strip)(fileContent));
737
+ var esbuildDecorators2 = (options = {}) => ({
738
+ name: "tsc",
739
+ setup(build2) {
740
+ var _a, _b, _c;
741
+ const cwd = options.cwd || process.cwd();
742
+ const tsconfigPath = options.tsconfig || ((_a = build2.initialOptions) === null || _a === void 0 ? void 0 : _a.tsconfig) || (0, path_1.join)(cwd, "./tsconfig.json");
743
+ const forceTsc = (_b = options.force) !== null && _b !== void 0 ? _b : false;
744
+ const tsx = (_c = options.tsx) !== null && _c !== void 0 ? _c : true;
745
+ let parsedTsConfig = null;
746
+ build2.onLoad({ filter: tsx ? /\.tsx?$/ : /\.ts$/ }, (args) => tslib_1.__awaiter(this, void 0, void 0, function* () {
747
+ if (!parsedTsConfig) {
748
+ parsedTsConfig = parseTsConfig(tsconfigPath, cwd);
749
+ if (parsedTsConfig.options.sourcemap) {
750
+ parsedTsConfig.options.sourcemap = false;
751
+ parsedTsConfig.options.inlineSources = true;
752
+ parsedTsConfig.options.inlineSourceMap = true;
753
+ }
754
+ }
755
+ if (!forceTsc && (!parsedTsConfig || !parsedTsConfig.options || !parsedTsConfig.options.emitDecoratorMetadata)) {
756
+ return;
757
+ }
758
+ const ts2 = yield readFile(args.path, "utf8").catch((err) => printDiagnostics({ file: args.path, err }));
759
+ const hasDecorator = findDecorators(ts2);
760
+ if (!ts2 || !hasDecorator) {
761
+ return;
762
+ }
763
+ const program = (0, typescript_1.transpileModule)(ts2, {
764
+ compilerOptions: parsedTsConfig.options
765
+ });
766
+ return { contents: program.outputText };
767
+ }));
768
+ }
769
+ });
770
+ exports.esbuildDecorators = esbuildDecorators2;
771
+ function parseTsConfig(tsconfig, cwd = process.cwd()) {
772
+ const fileName = (0, typescript_1.findConfigFile)(cwd, typescript_1.sys.fileExists, tsconfig);
773
+ if (tsconfig !== void 0 && !fileName)
774
+ throw new Error(`failed to open '${fileName}'`);
775
+ let loadedConfig = {};
776
+ let baseDir = cwd;
777
+ if (fileName) {
778
+ const text = typescript_1.sys.readFile(fileName);
779
+ if (text === void 0)
780
+ throw new Error(`failed to read '${fileName}'`);
781
+ const result = (0, typescript_1.parseConfigFileTextToJson)(fileName, text);
782
+ if (result.error !== void 0) {
783
+ printDiagnostics(result.error);
784
+ throw new Error(`failed to parse '${fileName}'`);
785
+ }
786
+ loadedConfig = result.config;
787
+ baseDir = (0, path_1.dirname)(fileName);
788
+ }
789
+ const parsedTsConfig = (0, typescript_1.parseJsonConfigFileContent)(loadedConfig, typescript_1.sys, baseDir);
790
+ if (parsedTsConfig.errors[0])
791
+ printDiagnostics(parsedTsConfig.errors);
792
+ return parsedTsConfig;
793
+ }
794
+ function printDiagnostics(...args) {
795
+ console.log((0, util_1.inspect)(args, false, 10, true));
796
+ }
797
+ }
798
+ });
799
+
800
+ // node_modules/.pnpm/@anatine+esbuild-decorators@0.2.19_esbuild@0.14.54/node_modules/@anatine/esbuild-decorators/src/index.js
801
+ var require_src = __commonJS({
802
+ "node_modules/.pnpm/@anatine+esbuild-decorators@0.2.19_esbuild@0.14.54/node_modules/@anatine/esbuild-decorators/src/index.js"(exports) {
803
+ "use strict";
804
+ Object.defineProperty(exports, "__esModule", { value: true });
805
+ exports.esbuildDecorators = void 0;
806
+ var esbuild_decorators_1 = require_esbuild_decorators();
807
+ Object.defineProperty(exports, "esbuildDecorators", { enumerable: true, get: function() {
808
+ return esbuild_decorators_1.esbuildDecorators;
809
+ } });
810
+ }
811
+ });
812
+
581
813
  // node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/nx.js
582
814
  var require_nx = __commonJS({
583
815
  "node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/nx.js"(exports) {
@@ -4107,7 +4339,7 @@ var require_subset = __commonJS({
4107
4339
  var require_semver2 = __commonJS({
4108
4340
  "node_modules/.pnpm/semver@7.5.3/node_modules/semver/index.js"(exports, module2) {
4109
4341
  var internalRe = require_re();
4110
- var constants2 = require_constants();
4342
+ var constants = require_constants();
4111
4343
  var SemVer = require_semver();
4112
4344
  var identifiers = require_identifiers();
4113
4345
  var parse = require_parse();
@@ -4189,8 +4421,8 @@ var require_semver2 = __commonJS({
4189
4421
  re: internalRe.re,
4190
4422
  src: internalRe.src,
4191
4423
  tokens: internalRe.t,
4192
- SEMVER_SPEC_VERSION: constants2.SEMVER_SPEC_VERSION,
4193
- RELEASE_TYPES: constants2.RELEASE_TYPES,
4424
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
4425
+ RELEASE_TYPES: constants.RELEASE_TYPES,
4194
4426
  compareIdentifiers: identifiers.compareIdentifiers,
4195
4427
  rcompareIdentifiers: identifiers.rcompareIdentifiers
4196
4428
  };
@@ -18232,9 +18464,9 @@ var require_devkit = __commonJS({
18232
18464
  }
18233
18465
  });
18234
18466
 
18235
- // node_modules/.pnpm/@nx+esbuild@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.8.10_esbuild@0.19_vbyowgz6rmzdfdmc4dxwplxleu/node_modules/@nx/esbuild/src/executors/esbuild/lib/get-extra-dependencies.js
18467
+ // node_modules/.pnpm/@nx+esbuild@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.8.10_esbuild@0.14_jlzadk2xcsikuhpeek3jtu6zra/node_modules/@nx/esbuild/src/executors/esbuild/lib/get-extra-dependencies.js
18236
18468
  var require_get_extra_dependencies = __commonJS({
18237
- "node_modules/.pnpm/@nx+esbuild@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.8.10_esbuild@0.19_vbyowgz6rmzdfdmc4dxwplxleu/node_modules/@nx/esbuild/src/executors/esbuild/lib/get-extra-dependencies.js"(exports) {
18469
+ "node_modules/.pnpm/@nx+esbuild@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.8.10_esbuild@0.14_jlzadk2xcsikuhpeek3jtu6zra/node_modules/@nx/esbuild/src/executors/esbuild/lib/get-extra-dependencies.js"(exports) {
18238
18470
  "use strict";
18239
18471
  Object.defineProperty(exports, "__esModule", { value: true });
18240
18472
  exports.getExtraDependencies = void 0;
@@ -19605,20 +19837,20 @@ var require_supports_color = __commonJS({
19605
19837
  var os = require("os");
19606
19838
  var tty = require("tty");
19607
19839
  var hasFlag = require_has_flag();
19608
- var { env: env2 } = process;
19840
+ var { env } = process;
19609
19841
  var forceColor;
19610
19842
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
19611
19843
  forceColor = 0;
19612
19844
  } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
19613
19845
  forceColor = 1;
19614
19846
  }
19615
- if ("FORCE_COLOR" in env2) {
19616
- if (env2.FORCE_COLOR === "true") {
19847
+ if ("FORCE_COLOR" in env) {
19848
+ if (env.FORCE_COLOR === "true") {
19617
19849
  forceColor = 1;
19618
- } else if (env2.FORCE_COLOR === "false") {
19850
+ } else if (env.FORCE_COLOR === "false") {
19619
19851
  forceColor = 0;
19620
19852
  } else {
19621
- forceColor = env2.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env2.FORCE_COLOR, 10), 3);
19853
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
19622
19854
  }
19623
19855
  }
19624
19856
  function translateLevel(level) {
@@ -19646,7 +19878,7 @@ var require_supports_color = __commonJS({
19646
19878
  return 0;
19647
19879
  }
19648
19880
  const min = forceColor || 0;
19649
- if (env2.TERM === "dumb") {
19881
+ if (env.TERM === "dumb") {
19650
19882
  return min;
19651
19883
  }
19652
19884
  if (process.platform === "win32") {
@@ -19656,34 +19888,34 @@ var require_supports_color = __commonJS({
19656
19888
  }
19657
19889
  return 1;
19658
19890
  }
19659
- if ("CI" in env2) {
19660
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
19891
+ if ("CI" in env) {
19892
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
19661
19893
  return 1;
19662
19894
  }
19663
19895
  return min;
19664
19896
  }
19665
- if ("TEAMCITY_VERSION" in env2) {
19666
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
19897
+ if ("TEAMCITY_VERSION" in env) {
19898
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
19667
19899
  }
19668
- if (env2.COLORTERM === "truecolor") {
19900
+ if (env.COLORTERM === "truecolor") {
19669
19901
  return 3;
19670
19902
  }
19671
- if ("TERM_PROGRAM" in env2) {
19672
- const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
19673
- switch (env2.TERM_PROGRAM) {
19903
+ if ("TERM_PROGRAM" in env) {
19904
+ const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
19905
+ switch (env.TERM_PROGRAM) {
19674
19906
  case "iTerm.app":
19675
19907
  return version >= 3 ? 3 : 2;
19676
19908
  case "Apple_Terminal":
19677
19909
  return 2;
19678
19910
  }
19679
19911
  }
19680
- if (/-256(color)?$/i.test(env2.TERM)) {
19912
+ if (/-256(color)?$/i.test(env.TERM)) {
19681
19913
  return 2;
19682
19914
  }
19683
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
19915
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
19684
19916
  return 1;
19685
19917
  }
19686
- if ("COLORTERM" in env2) {
19918
+ if ("COLORTERM" in env) {
19687
19919
  return 1;
19688
19920
  }
19689
19921
  return min;
@@ -21255,7 +21487,7 @@ var require_universalify = __commonJS({
21255
21487
  // node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
21256
21488
  var require_polyfills = __commonJS({
21257
21489
  "node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module2) {
21258
- var constants2 = require("constants");
21490
+ var constants = require("constants");
21259
21491
  var origCwd = process.cwd;
21260
21492
  var cwd = null;
21261
21493
  var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
@@ -21280,7 +21512,7 @@ var require_polyfills = __commonJS({
21280
21512
  var chdir;
21281
21513
  module2.exports = patch;
21282
21514
  function patch(fs) {
21283
- if (constants2.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
21515
+ if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
21284
21516
  patchLchmod(fs);
21285
21517
  }
21286
21518
  if (!fs.lutimes) {
@@ -21387,7 +21619,7 @@ var require_polyfills = __commonJS({
21387
21619
  fs2.lchmod = function(path2, mode, callback) {
21388
21620
  fs2.open(
21389
21621
  path2,
21390
- constants2.O_WRONLY | constants2.O_SYMLINK,
21622
+ constants.O_WRONLY | constants.O_SYMLINK,
21391
21623
  mode,
21392
21624
  function(err, fd) {
21393
21625
  if (err) {
@@ -21405,7 +21637,7 @@ var require_polyfills = __commonJS({
21405
21637
  );
21406
21638
  };
21407
21639
  fs2.lchmodSync = function(path2, mode) {
21408
- var fd = fs2.openSync(path2, constants2.O_WRONLY | constants2.O_SYMLINK, mode);
21640
+ var fd = fs2.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode);
21409
21641
  var threw = true;
21410
21642
  var ret;
21411
21643
  try {
@@ -21425,9 +21657,9 @@ var require_polyfills = __commonJS({
21425
21657
  };
21426
21658
  }
21427
21659
  function patchLutimes(fs2) {
21428
- if (constants2.hasOwnProperty("O_SYMLINK") && fs2.futimes) {
21660
+ if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) {
21429
21661
  fs2.lutimes = function(path2, at, mt, cb) {
21430
- fs2.open(path2, constants2.O_SYMLINK, function(er, fd) {
21662
+ fs2.open(path2, constants.O_SYMLINK, function(er, fd) {
21431
21663
  if (er) {
21432
21664
  if (cb)
21433
21665
  cb(er);
@@ -21442,7 +21674,7 @@ var require_polyfills = __commonJS({
21442
21674
  });
21443
21675
  };
21444
21676
  fs2.lutimesSync = function(path2, at, mt) {
21445
- var fd = fs2.openSync(path2, constants2.O_SYMLINK);
21677
+ var fd = fs2.openSync(path2, constants.O_SYMLINK);
21446
21678
  var ret;
21447
21679
  var threw = true;
21448
21680
  try {
@@ -23288,7 +23520,7 @@ var require_jsonfile = __commonJS({
23288
23520
  return obj;
23289
23521
  }
23290
23522
  var readFile = universalify.fromPromise(_readFile);
23291
- function readFileSync3(file, options = {}) {
23523
+ function readFileSync2(file, options = {}) {
23292
23524
  if (typeof options === "string") {
23293
23525
  options = { encoding: options };
23294
23526
  }
@@ -23313,16 +23545,16 @@ var require_jsonfile = __commonJS({
23313
23545
  await universalify.fromCallback(fs.writeFile)(file, str, options);
23314
23546
  }
23315
23547
  var writeFile2 = universalify.fromPromise(_writeFile);
23316
- function writeFileSync3(file, obj, options = {}) {
23548
+ function writeFileSync2(file, obj, options = {}) {
23317
23549
  const fs = options.fs || _fs;
23318
23550
  const str = stringify(obj, options);
23319
23551
  return fs.writeFileSync(file, str, options);
23320
23552
  }
23321
23553
  var jsonfile = {
23322
23554
  readFile,
23323
- readFileSync: readFileSync3,
23555
+ readFileSync: readFileSync2,
23324
23556
  writeFile: writeFile2,
23325
- writeFileSync: writeFileSync3
23557
+ writeFileSync: writeFileSync2
23326
23558
  };
23327
23559
  module2.exports = jsonfile;
23328
23560
  }
@@ -26739,7 +26971,7 @@ var require_scan2 = __commonJS({
26739
26971
  var require_parse3 = __commonJS({
26740
26972
  "node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js"(exports, module2) {
26741
26973
  "use strict";
26742
- var constants2 = require_constants3();
26974
+ var constants = require_constants3();
26743
26975
  var utils = require_utils5();
26744
26976
  var {
26745
26977
  MAX_LENGTH,
@@ -26747,7 +26979,7 @@ var require_parse3 = __commonJS({
26747
26979
  REGEX_NON_SPECIAL_CHARS,
26748
26980
  REGEX_SPECIAL_CHARS_BACKREF,
26749
26981
  REPLACEMENTS
26750
- } = constants2;
26982
+ } = constants;
26751
26983
  var expandRange = (args, options) => {
26752
26984
  if (typeof options.expandRange === "function") {
26753
26985
  return options.expandRange(...args, options);
@@ -26779,8 +27011,8 @@ var require_parse3 = __commonJS({
26779
27011
  const tokens = [bos];
26780
27012
  const capture = opts.capture ? "" : "?:";
26781
27013
  const win322 = utils.isWindows(options);
26782
- const PLATFORM_CHARS = constants2.globChars(win322);
26783
- const EXTGLOB_CHARS = constants2.extglobChars(PLATFORM_CHARS);
27014
+ const PLATFORM_CHARS = constants.globChars(win322);
27015
+ const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
26784
27016
  const {
26785
27017
  DOT_LITERAL,
26786
27018
  PLUS_LITERAL,
@@ -27462,7 +27694,7 @@ var require_parse3 = __commonJS({
27462
27694
  NO_DOTS_SLASH,
27463
27695
  STAR,
27464
27696
  START_ANCHOR
27465
- } = constants2.globChars(win322);
27697
+ } = constants.globChars(win322);
27466
27698
  const nodot = opts.dot ? NO_DOTS : NO_DOT;
27467
27699
  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
27468
27700
  const capture = opts.capture ? "" : "?:";
@@ -27524,7 +27756,7 @@ var require_picomatch = __commonJS({
27524
27756
  var scan = require_scan2();
27525
27757
  var parse = require_parse3();
27526
27758
  var utils = require_utils5();
27527
- var constants2 = require_constants3();
27759
+ var constants = require_constants3();
27528
27760
  var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
27529
27761
  var picomatch = (glob2, options, returnState = false) => {
27530
27762
  if (Array.isArray(glob2)) {
@@ -27655,7 +27887,7 @@ var require_picomatch = __commonJS({
27655
27887
  return /$^/;
27656
27888
  }
27657
27889
  };
27658
- picomatch.constants = constants2;
27890
+ picomatch.constants = constants;
27659
27891
  module2.exports = picomatch;
27660
27892
  }
27661
27893
  });
@@ -37234,7 +37466,7 @@ var require_library = __commonJS({
37234
37466
  });
37235
37467
 
37236
37468
  // node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.8.10_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/index.js
37237
- var require_src = __commonJS({
37469
+ var require_src2 = __commonJS({
37238
37470
  "node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.8.10_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/index.js"(exports) {
37239
37471
  "use strict";
37240
37472
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -40687,7 +40919,7 @@ var require_chunk_GQ77QZBO = __commonJS({
40687
40919
  }
40688
40920
  _fs2.default.mkdirSync(dirPath, { recursive: true });
40689
40921
  const gitIgnorePath = _path2.default.join(options.workspaceRoot, "tmp", ".tsup", ".gitignore");
40690
- writeFileSync3(gitIgnorePath, "**/*\n");
40922
+ writeFileSync2(gitIgnorePath, "**/*\n");
40691
40923
  return dirPath;
40692
40924
  }
40693
40925
  var toObjectEntry = (entry) => {
@@ -40736,7 +40968,7 @@ var require_chunk_GQ77QZBO = __commonJS({
40736
40968
  function trimDtsExtension(fileName) {
40737
40969
  return fileName.replace(/\.d\.(ts|mts|cts)x?$/, "");
40738
40970
  }
40739
- function writeFileSync3(filePath, content) {
40971
+ function writeFileSync2(filePath, content) {
40740
40972
  _fs2.default.mkdirSync(_path2.default.dirname(filePath), { recursive: true });
40741
40973
  _fs2.default.writeFileSync(filePath, content);
40742
40974
  }
@@ -40757,7 +40989,7 @@ var require_chunk_GQ77QZBO = __commonJS({
40757
40989
  exports.toObjectEntry = toObjectEntry;
40758
40990
  exports.toAbsolutePath = toAbsolutePath;
40759
40991
  exports.trimDtsExtension = trimDtsExtension;
40760
- exports.writeFileSync = writeFileSync3;
40992
+ exports.writeFileSync = writeFileSync2;
40761
40993
  }
40762
40994
  });
40763
40995
 
@@ -40832,13 +41064,13 @@ var require_chunk_UIX4URMV = __commonJS({
40832
41064
  });
40833
41065
  var _tty = require("tty");
40834
41066
  var tty = _interopRequireWildcard(_tty);
40835
- var env2 = process.env || {};
41067
+ var env = process.env || {};
40836
41068
  var argv = process.argv || [];
40837
- var isDisabled = "NO_COLOR" in env2 || argv.includes("--no-color");
40838
- var isForced = "FORCE_COLOR" in env2 || argv.includes("--color");
41069
+ var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
41070
+ var isForced = "FORCE_COLOR" in env || argv.includes("--color");
40839
41071
  var isWindows = process.platform === "win32";
40840
- var isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env2.TERM && env2.TERM !== "dumb";
40841
- var isCI = "CI" in env2 && ("GITHUB_ACTIONS" in env2 || "GITLAB_CI" in env2 || "CIRCLECI" in env2);
41072
+ var isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && env.TERM !== "dumb";
41073
+ var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
40842
41074
  var isColorSupported = !isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI);
40843
41075
  var replaceClose = (index, string, close, replace, head = string.substring(0, index) + replace, tail = string.substring(index + close.length), next = tail.indexOf(close)) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
40844
41076
  var clearBleed = (index, string, open, close, replace) => index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
@@ -40999,7 +41231,7 @@ var require_lib3 = __commonJS({
40999
41231
  function _interopRequireDefault(obj) {
41000
41232
  return obj && obj.__esModule ? obj : { default: obj };
41001
41233
  }
41002
- var readFileSync3 = (fp) => {
41234
+ var readFileSync2 = (fp) => {
41003
41235
  return _fs.default.readFileSync(fp, "utf8");
41004
41236
  };
41005
41237
  var pathExists = (fp) => new Promise((resolve) => {
@@ -41123,7 +41355,7 @@ var require_lib3 = __commonJS({
41123
41355
  if (this.packageJsonCache.has(filepath2)) {
41124
41356
  return this.packageJsonCache.get(filepath2)[options.packageKey];
41125
41357
  }
41126
- const data2 = this.options.parseJSON(readFileSync3(filepath2));
41358
+ const data2 = this.options.parseJSON(readFileSync2(filepath2));
41127
41359
  return data2;
41128
41360
  }
41129
41361
  };
@@ -41157,7 +41389,7 @@ var require_lib3 = __commonJS({
41157
41389
  if (this.packageJsonCache.has(filepath2)) {
41158
41390
  return this.packageJsonCache.get(filepath2)[options.packageKey];
41159
41391
  }
41160
- const data2 = this.options.parseJSON(readFileSync3(filepath2));
41392
+ const data2 = this.options.parseJSON(readFileSync2(filepath2));
41161
41393
  return data2;
41162
41394
  }
41163
41395
  };
@@ -42175,7 +42407,7 @@ var require_resolveCommand = __commonJS({
42175
42407
  var which = require_which();
42176
42408
  var getPathKey = require_path_key();
42177
42409
  function resolveCommandAttempt(parsed, withoutPathExt) {
42178
- const env2 = parsed.options.env || process.env;
42410
+ const env = parsed.options.env || process.env;
42179
42411
  const cwd = process.cwd();
42180
42412
  const hasCustomCwd = parsed.options.cwd != null;
42181
42413
  const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
@@ -42188,7 +42420,7 @@ var require_resolveCommand = __commonJS({
42188
42420
  let resolved;
42189
42421
  try {
42190
42422
  resolved = which.sync(parsed.command, {
42191
- path: env2[getPathKey({ env: env2 })],
42423
+ path: env[getPathKey({ env })],
42192
42424
  pathExt: withoutPathExt ? path2.delimiter : void 0
42193
42425
  });
42194
42426
  } catch (e) {
@@ -42473,11 +42705,11 @@ var require_npm_run_path = __commonJS({
42473
42705
  env: process.env,
42474
42706
  ...options
42475
42707
  };
42476
- const env2 = { ...options.env };
42477
- const path3 = pathKey({ env: env2 });
42478
- options.path = env2[path3];
42479
- env2[path3] = module2.exports(options);
42480
- return env2;
42708
+ const env = { ...options.env };
42709
+ const path3 = pathKey({ env });
42710
+ options.path = env[path3];
42711
+ env[path3] = module2.exports(options);
42712
+ return env;
42481
42713
  };
42482
42714
  }
42483
42715
  });
@@ -43672,11 +43904,11 @@ var require_execa = __commonJS({
43672
43904
  var { joinCommand, parseCommand, getEscapedCommand } = require_command();
43673
43905
  var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
43674
43906
  var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
43675
- const env2 = extendEnv ? { ...process.env, ...envOption } : envOption;
43907
+ const env = extendEnv ? { ...process.env, ...envOption } : envOption;
43676
43908
  if (preferLocal) {
43677
- return npmRunPath.env({ env: env2, cwd: localDir, execPath });
43909
+ return npmRunPath.env({ env, cwd: localDir, execPath });
43678
43910
  }
43679
- return env2;
43911
+ return env;
43680
43912
  };
43681
43913
  var handleArguments = (file, args, options = {}) => {
43682
43914
  const parsed = crossSpawn._parse(file, args, options);
@@ -67292,7 +67524,7 @@ var require_util4 = __commonJS({
67292
67524
  var normalize2 = createSafeHandler((url) => {
67293
67525
  });
67294
67526
  exports.normalize = normalize2;
67295
- function join5(aRoot, aPath) {
67527
+ function join3(aRoot, aPath) {
67296
67528
  const pathType = getURLType(aPath);
67297
67529
  const rootType = getURLType(aRoot);
67298
67530
  aRoot = ensureDirectory(aRoot);
@@ -67318,7 +67550,7 @@ var require_util4 = __commonJS({
67318
67550
  const newPath = withBase(aPath, withBase(aRoot, base));
67319
67551
  return computeRelativeURL(base, newPath);
67320
67552
  }
67321
- exports.join = join5;
67553
+ exports.join = join3;
67322
67554
  function relative(rootURL, targetURL) {
67323
67555
  const result = relativeIfPossible(rootURL, targetURL);
67324
67556
  return typeof result === "string" ? result : normalize2(targetURL);
@@ -67348,9 +67580,9 @@ var require_util4 = __commonJS({
67348
67580
  }
67349
67581
  let url = normalize2(sourceURL || "");
67350
67582
  if (sourceRoot)
67351
- url = join5(sourceRoot, url);
67583
+ url = join3(sourceRoot, url);
67352
67584
  if (sourceMapURL)
67353
- url = join5(trimFilename(sourceMapURL), url);
67585
+ url = join3(trimFilename(sourceMapURL), url);
67354
67586
  return url;
67355
67587
  }
67356
67588
  exports.computeSourceURL = computeSourceURL;
@@ -69115,8 +69347,8 @@ var require_source_map = __commonJS({
69115
69347
  // node_modules/.pnpm/rollup@4.5.0/node_modules/rollup/dist/native.js
69116
69348
  var require_native = __commonJS({
69117
69349
  "node_modules/.pnpm/rollup@4.5.0/node_modules/rollup/dist/native.js"(exports, module2) {
69118
- var { existsSync: existsSync3 } = require("node:fs");
69119
- var { join: join5 } = require("node:path");
69350
+ var { existsSync } = require("node:fs");
69351
+ var { join: join3 } = require("node:path");
69120
69352
  var { platform, arch, report } = require("node:process");
69121
69353
  var isMusl = () => !report.getReport().header.glibcVersionRuntime;
69122
69354
  var bindingsByPlatformAndArch = {
@@ -69166,7 +69398,7 @@ If this is important to you, please consider supporting Rollup to make a native
69166
69398
  return imported.base;
69167
69399
  }
69168
69400
  var localName = `./rollup.${packageBase}.node`;
69169
- var { parse, parseAsync, xxhashBase64Url } = existsSync3(join5(__dirname, localName)) ? require(localName) : require(`@rollup/rollup-${packageBase}`);
69401
+ var { parse, parseAsync, xxhashBase64Url } = existsSync(join3(__dirname, localName)) ? require(localName) : require(`@rollup/rollup-${packageBase}`);
69170
69402
  module2.exports.parse = parse;
69171
69403
  module2.exports.parseAsync = parseAsync;
69172
69404
  module2.exports.xxhashBase64Url = xxhashBase64Url;
@@ -72743,16 +72975,16 @@ var require_rollup = __commonJS({
72743
72975
  return outputOptions;
72744
72976
  }
72745
72977
  var {
72746
- env: env2 = {},
72978
+ env = {},
72747
72979
  argv = [],
72748
72980
  platform = ""
72749
72981
  } = typeof process === "undefined" ? {} : process;
72750
- var isDisabled = "NO_COLOR" in env2 || argv.includes("--no-color");
72751
- var isForced = "FORCE_COLOR" in env2 || argv.includes("--color");
72982
+ var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
72983
+ var isForced = "FORCE_COLOR" in env || argv.includes("--color");
72752
72984
  var isWindows = platform === "win32";
72753
- var isDumbTerminal = env2.TERM === "dumb";
72754
- var isCompatibleTerminal = tty__namespace && tty__namespace.isatty && tty__namespace.isatty(1) && env2.TERM && !isDumbTerminal;
72755
- var isCI = "CI" in env2 && ("GITHUB_ACTIONS" in env2 || "GITLAB_CI" in env2 || "CIRCLECI" in env2);
72985
+ var isDumbTerminal = env.TERM === "dumb";
72986
+ var isCompatibleTerminal = tty__namespace && tty__namespace.isatty && tty__namespace.isatty(1) && env.TERM && !isDumbTerminal;
72987
+ var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
72756
72988
  var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
72757
72989
  var replaceClose = (index, string, close, replace, head = string.substring(0, index) + replace, tail = string.substring(index + close.length), next = tail.indexOf(close)) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
72758
72990
  var clearBleed = (index, string, open, close, replace) => index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
@@ -76043,7 +76275,7 @@ var require_rollup = __commonJS({
76043
76275
  var scan = scan_1;
76044
76276
  var parse = parse_1;
76045
76277
  var utils = utils$3;
76046
- var constants2 = constants$2;
76278
+ var constants = constants$2;
76047
76279
  var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
76048
76280
  var picomatch$1 = (glob2, options, returnState = false) => {
76049
76281
  if (Array.isArray(glob2)) {
@@ -76174,7 +76406,7 @@ var require_rollup = __commonJS({
76174
76406
  return /$^/;
76175
76407
  }
76176
76408
  };
76177
- picomatch$1.constants = constants2;
76409
+ picomatch$1.constants = constants;
76178
76410
  var picomatch_1 = picomatch$1;
76179
76411
  var picomatch = picomatch_1;
76180
76412
  var pm = /* @__PURE__ */ getDefaultExportFromCjs(picomatch);
@@ -90925,7 +91157,7 @@ var require_shared = __commonJS({
90925
91157
  var binaryExtensions = binaryExtensions$1;
90926
91158
  var extensions = new Set(binaryExtensions);
90927
91159
  var isBinaryPath$1 = (filePath) => extensions.has(path2.extname(filePath).slice(1).toLowerCase());
90928
- var constants2 = {};
91160
+ var constants = {};
90929
91161
  (function(exports2) {
90930
91162
  const { sep: sep2 } = require$$0$2;
90931
91163
  const { platform } = process;
@@ -90983,7 +91215,7 @@ var require_shared = __commonJS({
90983
91215
  exports2.isMacos = platform === "darwin";
90984
91216
  exports2.isLinux = platform === "linux";
90985
91217
  exports2.isIBMi = os.type() === "OS400";
90986
- })(constants2);
91218
+ })(constants);
90987
91219
  var fs$2 = require$$0$1;
90988
91220
  var sysPath$2 = require$$0$2;
90989
91221
  var { promisify: promisify$2 } = require$$2;
@@ -91005,7 +91237,7 @@ var require_shared = __commonJS({
91005
91237
  STR_END: STR_END$2,
91006
91238
  BRACE_START: BRACE_START$1,
91007
91239
  STAR
91008
- } = constants2;
91240
+ } = constants;
91009
91241
  var THROTTLE_MODE_WATCH = "watch";
91010
91242
  var open = promisify$2(fs$2.open);
91011
91243
  var stat$2 = promisify$2(fs$2.stat);
@@ -91527,7 +91759,7 @@ var require_shared = __commonJS({
91527
91759
  FUNCTION_TYPE: FUNCTION_TYPE$1,
91528
91760
  EMPTY_FN: EMPTY_FN$1,
91529
91761
  IDENTITY_FN
91530
- } = constants2;
91762
+ } = constants;
91531
91763
  var Depth = (value) => isNaN(value) ? {} : { depth: value };
91532
91764
  var stat$1 = promisify$1(fs$1.stat);
91533
91765
  var lstat2 = promisify$1(fs$1.lstat);
@@ -91897,7 +92129,7 @@ var require_shared = __commonJS({
91897
92129
  fseventsHandler.exports = FsEventsHandler$1;
91898
92130
  fseventsHandler.exports.canUse = canUse;
91899
92131
  var fseventsHandlerExports = fseventsHandler.exports;
91900
- var { EventEmitter: EventEmitter3 } = require$$0$3;
92132
+ var { EventEmitter: EventEmitter2 } = require$$0$3;
91901
92133
  var fs = require$$0$1;
91902
92134
  var sysPath = require$$0$2;
91903
92135
  var { promisify } = require$$2;
@@ -91942,7 +92174,7 @@ var require_shared = __commonJS({
91942
92174
  isWindows,
91943
92175
  isMacos,
91944
92176
  isIBMi
91945
- } = constants2;
92177
+ } = constants;
91946
92178
  var stat = promisify(fs.stat);
91947
92179
  var readdir2 = promisify(fs.readdir);
91948
92180
  var arrify = (value = []) => Array.isArray(value) ? value : [value];
@@ -92118,7 +92350,7 @@ var require_shared = __commonJS({
92118
92350
  return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
92119
92351
  }
92120
92352
  };
92121
- var FSWatcher = class extends EventEmitter3 {
92353
+ var FSWatcher = class extends EventEmitter2 {
92122
92354
  // Not indenting methods for history sake; for now.
92123
92355
  constructor(_opts) {
92124
92356
  super();
@@ -94704,7 +94936,7 @@ var require_fsevents_handler = __commonJS({
94704
94936
  var require_chokidar = __commonJS({
94705
94937
  "node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/index.js"(exports) {
94706
94938
  "use strict";
94707
- var { EventEmitter: EventEmitter3 } = require("events");
94939
+ var { EventEmitter: EventEmitter2 } = require("events");
94708
94940
  var fs = require("fs");
94709
94941
  var sysPath = require("path");
94710
94942
  var { promisify } = require("util");
@@ -94925,7 +95157,7 @@ var require_chokidar = __commonJS({
94925
95157
  return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
94926
95158
  }
94927
95159
  };
94928
- var FSWatcher = class extends EventEmitter3 {
95160
+ var FSWatcher = class extends EventEmitter2 {
94929
95161
  // Not indenting methods for history sake; for now.
94930
95162
  constructor(_opts) {
94931
95163
  super();
@@ -97143,11 +97375,11 @@ var require_dist5 = __commonJS({
97143
97375
  ];
97144
97376
  const outDir = options.outDir;
97145
97377
  const outExtension2 = getOutputExtensionMap(options, format2, pkg.type);
97146
- const env2 = {
97378
+ const env = {
97147
97379
  ...options.env
97148
97380
  };
97149
97381
  if (options.replaceNodeEnv) {
97150
- env2.NODE_ENV = options.minify || options.minifyWhitespace ? "production" : "development";
97382
+ env.NODE_ENV = options.minify || options.minifyWhitespace ? "production" : "development";
97151
97383
  }
97152
97384
  logger3.info(format2, "Build start");
97153
97385
  const startTime = Date.now();
@@ -97241,8 +97473,8 @@ var require_dist5 = __commonJS({
97241
97473
  "import.meta.url": "importMetaUrl"
97242
97474
  } : {},
97243
97475
  ...options.define,
97244
- ...Object.keys(env2).reduce((res, key) => {
97245
- const value = JSON.stringify(env2[key]);
97476
+ ...Object.keys(env).reduce((res, key) => {
97477
+ const value = JSON.stringify(env[key]);
97246
97478
  return {
97247
97479
  ...res,
97248
97480
  [`process.env.${key}`]: value,
@@ -98354,9 +98586,10 @@ __export(executor_exports, {
98354
98586
  tsupExecutor: () => tsupExecutor
98355
98587
  });
98356
98588
  module.exports = __toCommonJS(executor_exports);
98589
+ var import_esbuild_decorators = __toESM(require_src());
98357
98590
  var import_devkit = __toESM(require_devkit());
98358
98591
  var import_get_extra_dependencies = __toESM(require_get_extra_dependencies());
98359
- var import_js = __toESM(require_src());
98592
+ var import_js = __toESM(require_src2());
98360
98593
  var import_normalize_options = __toESM(require_normalize_options());
98361
98594
  var import_tsc = __toESM(require_tsc_impl());
98362
98595
  var import_decky = __toESM(require_decky());
@@ -104539,7 +104772,6 @@ var glob = Object.assign(glob_, {
104539
104772
  glob.glob = glob;
104540
104773
 
104541
104774
  // packages/workspace-tools/src/executors/tsup/executor.ts
104542
- var import_node_events = require("node:events");
104543
104775
  var import_project_graph = require("nx/src/project-graph/project-graph");
104544
104776
  var import_fileutils = require("nx/src/utils/fileutils");
104545
104777
  var import_path3 = require("path");
@@ -104600,129 +104832,6 @@ var removeExtension = (filePath) => {
104600
104832
  // packages/workspace-tools/src/executors/tsup/get-config.ts
104601
104833
  var import_path2 = require("path");
104602
104834
  var import_tsup = __toESM(require_dist5());
104603
-
104604
- // packages/workspace-tools/src/utils/find-cache-dir.ts
104605
- var import_node_fs = require("node:fs");
104606
- var import_node_path = require("node:path");
104607
- var import_node_process = require("node:process");
104608
- var isWritable2 = (path2) => {
104609
- try {
104610
- (0, import_node_fs.accessSync)(path2, import_node_fs.constants.W_OK);
104611
- return true;
104612
- } catch {
104613
- return false;
104614
- }
104615
- };
104616
- function useDirectory(directory, { create = true }) {
104617
- if (create) {
104618
- (0, import_node_fs.mkdirSync)(directory, { recursive: true });
104619
- }
104620
- return directory;
104621
- }
104622
- function getNodeModuleDirectory(workspaceRoot) {
104623
- const nodeModules = (0, import_node_path.join)(workspaceRoot, "node_modules");
104624
- if ((0, import_node_fs.existsSync)(nodeModules) && !isWritable2(nodeModules)) {
104625
- throw new Error("Cannot write to node_modules directory");
104626
- }
104627
- return nodeModules;
104628
- }
104629
- function findCacheDirectory({
104630
- name,
104631
- cacheName,
104632
- workspaceRoot,
104633
- create
104634
- } = {
104635
- name: "storm",
104636
- workspaceRoot: getWorkspaceRoot(),
104637
- create: true
104638
- }) {
104639
- if (import_node_process.env.CACHE_DIR && !["true", "false", "1", "0"].includes(import_node_process.env.CACHE_DIR)) {
104640
- return useDirectory((0, import_node_path.join)(import_node_process.env.CACHE_DIR, name, cacheName), { create });
104641
- }
104642
- if (import_node_process.env.STORM_CACHE_DIR && !["true", "false", "1", "0"].includes(import_node_process.env.STORM_CACHE_DIR)) {
104643
- return useDirectory((0, import_node_path.join)(import_node_process.env.STORM_CACHE_DIR, name, cacheName), {
104644
- create
104645
- });
104646
- }
104647
- const nodeModules = getNodeModuleDirectory(workspaceRoot);
104648
- if (!nodeModules) {
104649
- throw new Error("Cannot find node_modules directory");
104650
- }
104651
- return useDirectory(
104652
- (0, import_node_path.join)(workspaceRoot, "node_modules", ".cache", name, cacheName),
104653
- { create }
104654
- );
104655
- }
104656
-
104657
- // packages/workspace-tools/src/utils/workspace-storage.ts
104658
- var import_node_fs2 = require("node:fs");
104659
- var import_node_path2 = require("node:path");
104660
- var WorkspaceStorage = class {
104661
- constructor({
104662
- cacheName,
104663
- workspaceRoot
104664
- }) {
104665
- this.cacheDir = findCacheDirectory({
104666
- name: "storm",
104667
- cacheName,
104668
- workspaceRoot,
104669
- create: true
104670
- });
104671
- }
104672
- /**
104673
- * Get item from cache
104674
- *
104675
- * @param key - The key to get
104676
- * @returns The value of the key
104677
- */
104678
- getItem(key) {
104679
- const cacheFile = (0, import_node_path2.join)(this.cacheDir, key);
104680
- if ((0, import_node_fs2.existsSync)(cacheFile)) {
104681
- return (0, import_node_fs2.readFileSync)(cacheFile, "utf-8");
104682
- }
104683
- return void 0;
104684
- }
104685
- /**
104686
- * Set item to cache
104687
- *
104688
- * @param key - The key to set
104689
- * @param value - The value to set
104690
- */
104691
- setItem(key, value) {
104692
- (0, import_node_fs2.writeFileSync)((0, import_node_path2.join)(this.cacheDir, key), value, { encoding: "utf-8" });
104693
- }
104694
- /**
104695
- * Remove item from cache
104696
- *
104697
- * @param key - The key to remove
104698
- */
104699
- removeItem(key) {
104700
- (0, import_node_fs2.rmSync)((0, import_node_path2.join)(this.cacheDir, key), { force: true, recursive: true });
104701
- }
104702
- /**
104703
- * Clear the cache
104704
- */
104705
- clear() {
104706
- (0, import_node_fs2.readdirSync)(this.cacheDir).forEach((cacheFile) => {
104707
- (0, import_node_fs2.rmSync)(cacheFile, { force: true, recursive: true });
104708
- });
104709
- }
104710
- /**
104711
- * Get the key at the index
104712
- *
104713
- * @param index - The index to get
104714
- * @returns The key at the index
104715
- */
104716
- key(index) {
104717
- const files = (0, import_node_fs2.readdirSync)(this.cacheDir);
104718
- if (index < files.length && index >= 0) {
104719
- return files[index];
104720
- }
104721
- return void 0;
104722
- }
104723
- };
104724
-
104725
- // packages/workspace-tools/src/executors/tsup/get-config.ts
104726
104835
  function modernConfig({
104727
104836
  entry,
104728
104837
  outDir,
@@ -104738,8 +104847,7 @@ function modernConfig({
104738
104847
  docModel = true,
104739
104848
  tsdocMetadata = true,
104740
104849
  define: define2,
104741
- env: env2,
104742
- tsCdnStorage,
104850
+ env,
104743
104851
  plugins,
104744
104852
  dtsTsConfig
104745
104853
  }) {
@@ -104769,7 +104877,7 @@ function modernConfig({
104769
104877
  platform,
104770
104878
  banner,
104771
104879
  define: define2,
104772
- env: env2,
104880
+ env,
104773
104881
  dts: false,
104774
104882
  experimentalDts: {
104775
104883
  entry,
@@ -104786,7 +104894,6 @@ function modernConfig({
104786
104894
  tsdocMetadata,
104787
104895
  sourcemap: debug,
104788
104896
  clean: false,
104789
- tsCdnStorage,
104790
104897
  plugins,
104791
104898
  outExtension
104792
104899
  };
@@ -104803,8 +104910,7 @@ function legacyConfig({
104803
104910
  platform = "neutral",
104804
104911
  verbose = false,
104805
104912
  define: define2,
104806
- env: env2,
104807
- tsCdnStorage,
104913
+ env,
104808
104914
  plugins,
104809
104915
  dtsTsConfig
104810
104916
  }) {
@@ -104826,7 +104932,7 @@ function legacyConfig({
104826
104932
  platform,
104827
104933
  banner,
104828
104934
  define: define2,
104829
- env: env2,
104935
+ env,
104830
104936
  dts: false,
104831
104937
  experimentalDts: {
104832
104938
  entry,
@@ -104843,7 +104949,6 @@ function legacyConfig({
104843
104949
  tsdocMetadata: false,
104844
104950
  sourcemap: debug,
104845
104951
  clean: false,
104846
- tsCdnStorage,
104847
104952
  plugins,
104848
104953
  outExtension
104849
104954
  };
@@ -104862,8 +104967,7 @@ function workerConfig({
104862
104967
  docModel = true,
104863
104968
  tsdocMetadata = true,
104864
104969
  define: define2,
104865
- env: env2,
104866
- tsCdnStorage,
104970
+ env,
104867
104971
  plugins,
104868
104972
  dtsTsConfig
104869
104973
  }) {
@@ -104879,13 +104983,13 @@ function workerConfig({
104879
104983
  outDir: (0, import_path2.join)(outDir, "dist"),
104880
104984
  silent: !verbose,
104881
104985
  metafile: true,
104882
- shims: true,
104986
+ shims: false,
104883
104987
  minify: true,
104884
104988
  external,
104885
104989
  platform: "browser",
104886
104990
  banner,
104887
104991
  define: define2,
104888
- env: env2,
104992
+ env,
104889
104993
  dts: false,
104890
104994
  experimentalDts: {
104891
104995
  entry,
@@ -104902,7 +105006,6 @@ function workerConfig({
104902
105006
  tsdocMetadata,
104903
105007
  sourcemap: debug,
104904
105008
  clean: false,
104905
- tsCdnStorage,
104906
105009
  plugins,
104907
105010
  outExtension
104908
105011
  };
@@ -104920,7 +105023,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
104920
105023
  docModel,
104921
105024
  tsdocMetadata,
104922
105025
  define: define2,
104923
- env: env2,
105026
+ env,
104924
105027
  verbose,
104925
105028
  dtsTsConfig,
104926
105029
  plugins,
@@ -104961,11 +105064,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
104961
105064
  docModel,
104962
105065
  tsdocMetadata,
104963
105066
  define: define2,
104964
- env: env2,
104965
- tsCdnStorage: new WorkspaceStorage({
104966
- cacheName: "ts-libs",
104967
- workspaceRoot
104968
- }),
105067
+ env,
104969
105068
  options,
104970
105069
  plugins,
104971
105070
  dtsTsConfig
@@ -105071,7 +105170,21 @@ ${Object.keys(options).map(
105071
105170
  if (!result.success) {
105072
105171
  throw new Error("The Build process failed trying to copy assets");
105073
105172
  }
105173
+ const workspacePackageJson = (0, import_devkit.readJsonFile)(
105174
+ (0, import_path3.join)(workspaceRoot, "package.json")
105175
+ );
105074
105176
  options.external = options.external || [];
105177
+ if (workspacePackageJson?.dependencies) {
105178
+ options.external = Object.keys(workspacePackageJson?.dependencies).reduce(
105179
+ (ret, key) => {
105180
+ if (!options.external.includes(key)) {
105181
+ ret.push(key);
105182
+ }
105183
+ return ret;
105184
+ },
105185
+ options.external
105186
+ );
105187
+ }
105075
105188
  const externalDependencies = options.external.reduce((acc, name) => {
105076
105189
  const externalNode = context.projectGraph.externalNodes[`npm:${name}`];
105077
105190
  if (externalNode) {
@@ -105080,6 +105193,15 @@ ${Object.keys(options).map(
105080
105193
  outputs: [],
105081
105194
  node: externalNode
105082
105195
  });
105196
+ } else {
105197
+ const workspaceNode = context.projectGraph.nodes[name];
105198
+ if (workspaceNode) {
105199
+ acc.push({
105200
+ name,
105201
+ outputs: [],
105202
+ node: workspaceNode
105203
+ });
105204
+ }
105083
105205
  }
105084
105206
  return acc;
105085
105207
  }, []);
@@ -105087,7 +105209,7 @@ ${Object.keys(options).map(
105087
105209
  ${externalDependencies.map((dep) => {
105088
105210
  return `name: ${dep.name}, node: ${dep.node}, outputs: ${dep.outputs}`;
105089
105211
  }).join("\n")}`);
105090
- if (!options.bundle) {
105212
+ if (options.bundle === false) {
105091
105213
  for (const thirdPartyDependency of (0, import_get_extra_dependencies.getExtraDependencies)(
105092
105214
  context.projectName,
105093
105215
  context.projectGraph
@@ -105102,21 +105224,16 @@ ${externalDependencies.map((dep) => {
105102
105224
  const projectGraph = await (0, import_project_graph.buildProjectGraphWithoutDaemon)();
105103
105225
  const pathToPackageJson = (0, import_path3.join)(context.root, projectRoot, "package.json");
105104
105226
  const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
105105
- const workspacePackageJson = (0, import_devkit.readJsonFile)(
105106
- (0, import_path3.join)(workspaceRoot, "package.json")
105107
- );
105227
+ delete packageJson.dependencies;
105108
105228
  externalDependencies.forEach((entry) => {
105109
105229
  const packageConfig = entry.node.data;
105110
- if (packageConfig?.packageName && !!(projectGraph.externalNodes[entry.node.name]?.type === "npm")) {
105230
+ if (packageConfig?.packageName && (!!(projectGraph.externalNodes[entry.node.name]?.type === "npm") || !!projectGraph.nodes[entry.node.name])) {
105111
105231
  const { packageName, version } = packageConfig;
105112
- if (packageJson.dependencies?.[packageName] || packageJson.devDependencies?.[packageName] || packageJson.peerDependencies?.[packageName]) {
105113
- return;
105114
- }
105115
- if (workspacePackageJson.dependencies?.[packageName]) {
105232
+ if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName]) {
105116
105233
  return;
105117
105234
  }
105118
105235
  packageJson.dependencies ??= {};
105119
- packageJson.dependencies[packageName] = version;
105236
+ packageJson.dependencies[packageName] = !!projectGraph.nodes[entry.node.name] ? "latest" : version;
105120
105237
  }
105121
105238
  });
105122
105239
  packageJson.type = "module";
@@ -105155,7 +105272,7 @@ ${externalDependencies.map((dep) => {
105155
105272
  if (distSrc.startsWith("/")) {
105156
105273
  distSrc = distSrc.substring(1);
105157
105274
  }
105158
- packageJson.source ??= `./${(0, import_path3.join)(distSrc, "index.ts").replaceAll(
105275
+ packageJson.source ??= `${(0, import_path3.join)(distSrc, "index.ts").replaceAll(
105159
105276
  "\\",
105160
105277
  "/"
105161
105278
  )}`;
@@ -105207,7 +105324,7 @@ ${externalDependencies.map((dep) => {
105207
105324
  files.map(
105208
105325
  (file) => (0, import_promises2.writeFile)(
105209
105326
  file,
105210
- `// ${options.banner}
105327
+ `${options.banner.startsWith("//") ? options.banner : `// ${options.banner}`}
105211
105328
 
105212
105329
  ${(0, import_fs2.readFileSync)(file, "utf-8")}`,
105213
105330
  "utf-8"
@@ -105216,11 +105333,12 @@ ${(0, import_fs2.readFileSync)(file, "utf-8")}`,
105216
105333
  );
105217
105334
  }
105218
105335
  options.plugins.push(await (0, import_decky.load)());
105219
- const eventEmitter = new import_node_events.EventEmitter({ captureRejections: true });
105220
- eventEmitter.on("message", (event) => {
105221
- console.log(`\u{1F4E2} Tsup build message:
105222
- `, event);
105223
- });
105336
+ options.plugins.push(
105337
+ (0, import_esbuild_decorators.esbuildDecorators)({
105338
+ tsconfig: options.tsConfig,
105339
+ cwd: workspaceRoot
105340
+ })
105341
+ );
105224
105342
  const config = getConfig(context.root, projectRoot, sourceRoot, {
105225
105343
  ...options,
105226
105344
  dtsTsConfig: getNormalizedTsConfig(
@@ -105241,11 +105359,14 @@ ${(0, import_fs2.readFileSync)(file, "utf-8")}`,
105241
105359
  context
105242
105360
  )
105243
105361
  ),
105244
- banner: options.banner ? { js: `// ${options.banner}
105362
+ banner: options.banner ? {
105363
+ js: `${options.banner.startsWith("//") ? options.banner : `// ${options.banner}`}
105245
105364
 
105246
- `, css: `/* ${options.banner} */
105365
+ `,
105366
+ css: `/* ${options.banner.startsWith("//") ? options.banner.replace("//", "") : options.banner} */
105247
105367
 
105248
- ` } : void 0,
105368
+ `
105369
+ } : void 0,
105249
105370
  outputPath
105250
105371
  });
105251
105372
  if (typeof config === "function") {