@storm-software/workspace-tools 1.266.9 → 1.267.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-Z2D5X5KJ.mjs → chunk-2C37GBZ2.mjs} +2 -2
  4. package/dist/{chunk-5AVEZVE5.mjs → chunk-2TEC7IFE.mjs} +4 -4
  5. package/dist/{chunk-WBNGMFYP.js → chunk-4Y6B6JDH.js} +11 -11
  6. package/dist/{chunk-K7B7YVQF.mjs → chunk-5I7ULQZF.mjs} +1 -1
  7. package/dist/{chunk-JL5QGFBX.js → chunk-6CGAYKQL.js} +20 -20
  8. package/dist/{chunk-BJ6UNKNM.js → chunk-6JJB5AYA.js} +9 -9
  9. package/dist/{chunk-TKGD3SNO.mjs → chunk-7FHFHZRB.mjs} +1 -1
  10. package/dist/{chunk-Z255YQZR.js → chunk-7NNHBZC5.js} +2 -2
  11. package/dist/{chunk-HYRQEEMO.js → chunk-7PRHEOCT.js} +2 -2
  12. package/dist/{chunk-UBMOQCNN.js → chunk-B3DVFXXD.js} +2 -2
  13. package/dist/{chunk-5G2XZTUU.mjs → chunk-BFGWJ7BS.mjs} +4 -4
  14. package/dist/{chunk-YWAH4DHJ.mjs → chunk-BJMT4ECA.mjs} +3 -3
  15. package/dist/chunk-BUPROWVS.js +653 -0
  16. package/dist/{chunk-4UPFP6EX.mjs → chunk-CM2FQCBL.mjs} +3 -3
  17. package/dist/{chunk-VUIT3ZAI.mjs → chunk-CNCYVRZ4.mjs} +1 -1
  18. package/dist/{chunk-NCTH2PTP.mjs → chunk-EHFWY65U.mjs} +3 -3
  19. package/dist/{chunk-XGSZL5N7.mjs → chunk-FM2TFXVW.mjs} +4 -4
  20. package/dist/{chunk-7LP6KWJ4.mjs → chunk-FPAOVOZX.mjs} +3 -3
  21. package/dist/{chunk-MP2P2MGP.js → chunk-G4QFSE5B.js} +8 -5
  22. package/dist/{chunk-2RRVYK6E.mjs → chunk-GNFQ5PGW.mjs} +1 -1
  23. package/dist/{chunk-E2GASAYN.js → chunk-HOXPAVCL.js} +2 -2
  24. package/dist/{chunk-TBE7H5P7.js → chunk-ICPUM2HS.js} +5 -5
  25. package/dist/{chunk-36QIKTAL.mjs → chunk-IXHY3ZPO.mjs} +3 -3
  26. package/dist/{chunk-TCZC6XD6.mjs → chunk-IZHZKPHV.mjs} +12 -9
  27. package/dist/{chunk-SORZ4BJW.mjs → chunk-KP5JD22G.mjs} +4 -4
  28. package/dist/{chunk-A2Z3X5GK.mjs → chunk-LS27TGDZ.mjs} +2 -2
  29. package/dist/chunk-LUR7U35A.mjs +653 -0
  30. package/dist/{chunk-QDLQJ3QS.mjs → chunk-MFSIJSBW.mjs} +3 -3
  31. package/dist/{chunk-L6BH2OLB.mjs → chunk-MIVNJALE.mjs} +1 -1
  32. package/dist/{chunk-XRZPNGM5.mjs → chunk-N4QRXJLZ.mjs} +2 -2
  33. package/dist/{chunk-VGSUCQ2S.mjs → chunk-N7GSKHH2.mjs} +1 -1
  34. package/dist/{chunk-4CLX5NBT.js → chunk-NSCWEC2S.js} +2 -2
  35. package/dist/{chunk-YWHLDLKE.js → chunk-OKW5O5P4.js} +5 -5
  36. package/dist/{chunk-YT3ECNTF.js → chunk-OQPX75CG.js} +2 -2
  37. package/dist/{chunk-5NTNN2XK.mjs → chunk-OW6VGYDT.mjs} +1 -1
  38. package/dist/{chunk-TPWVZZWY.js → chunk-P4OVFIT6.js} +2 -2
  39. package/dist/{chunk-YMFIVYHZ.mjs → chunk-PGEZGCU2.mjs} +2 -2
  40. package/dist/{chunk-GEIXDGFR.mjs → chunk-PZL7IZ7I.mjs} +2 -2
  41. package/dist/{chunk-4FJCOFII.mjs → chunk-Q7WXH4GA.mjs} +3 -3
  42. package/dist/{chunk-LY5IGOQR.mjs → chunk-QXE7GTBY.mjs} +3 -3
  43. package/dist/{chunk-KWARMR7G.mjs → chunk-RMLZO26I.mjs} +4 -4
  44. package/dist/{chunk-USRO6ZCF.mjs → chunk-RPMGDH44.mjs} +2 -2
  45. package/dist/{chunk-G4S2HWXN.js → chunk-RUKOOSWL.js} +2 -2
  46. package/dist/{chunk-474QFQKX.mjs → chunk-SYTBJXTM.mjs} +1 -1
  47. package/dist/{chunk-NYP6AVTV.js → chunk-TET4GF3D.js} +2 -2
  48. package/dist/{chunk-IOUCRBHV.mjs → chunk-TPK3STUY.mjs} +4 -4
  49. package/dist/{chunk-WHITLY6G.mjs → chunk-TRD4W5ZK.mjs} +4 -4
  50. package/dist/{chunk-TMCMTZPP.mjs → chunk-UY3Q5IDT.mjs} +1 -1
  51. package/dist/{chunk-KDQGKQHN.mjs → chunk-V42FQ4FR.mjs} +3 -3
  52. package/dist/{chunk-FJ3HUDJN.mjs → chunk-WAXAZ5PV.mjs} +3 -3
  53. package/dist/{chunk-VFXWLOY7.mjs → chunk-WDFR6LVR.mjs} +2 -2
  54. package/dist/{chunk-D2OJX4DZ.mjs → chunk-XCBLUQPM.mjs} +3 -3
  55. package/dist/{chunk-QIF3QXOA.mjs → chunk-XYRHMXLC.mjs} +3 -3
  56. package/dist/{chunk-Z4WOCHYB.mjs → chunk-YHPRTWSY.mjs} +2 -2
  57. package/dist/{chunk-PKL7UOGQ.js → chunk-YW4UN25U.js} +4 -4
  58. package/dist/{chunk-NCV26VAW.js → chunk-Z4NKRWWJ.js} +15 -15
  59. package/dist/{chunk-3DMOUTDH.mjs → chunk-Z6GV7C5U.mjs} +1 -1
  60. package/dist/{chunk-TIOK7TNA.mjs → chunk-ZJ3QSWTQ.mjs} +4 -4
  61. package/dist/executors.js +14 -14
  62. package/dist/executors.mjs +28 -28
  63. package/dist/generators.js +10 -10
  64. package/dist/generators.mjs +21 -21
  65. package/dist/index.js +22 -22
  66. package/dist/index.mjs +51 -51
  67. package/dist/src/base/base-executor.js +3 -3
  68. package/dist/src/base/base-executor.mjs +6 -6
  69. package/dist/src/base/base-executor.untyped.mjs +1 -1
  70. package/dist/src/base/base-generator.js +3 -3
  71. package/dist/src/base/base-generator.mjs +6 -6
  72. package/dist/src/base/base-generator.untyped.mjs +1 -1
  73. package/dist/src/base/cargo-base-executor.untyped.mjs +1 -1
  74. package/dist/src/base/index.js +4 -4
  75. package/dist/src/base/index.mjs +10 -10
  76. package/dist/src/base/typescript-build-executor.untyped.mjs +2 -2
  77. package/dist/src/base/typescript-library-generator.untyped.mjs +1 -1
  78. package/dist/src/executors/cargo-build/executor.js +4 -4
  79. package/dist/src/executors/cargo-build/executor.mjs +8 -8
  80. package/dist/src/executors/cargo-build/untyped.mjs +1 -1
  81. package/dist/src/executors/cargo-check/executor.js +4 -4
  82. package/dist/src/executors/cargo-check/executor.mjs +8 -8
  83. package/dist/src/executors/cargo-check/untyped.mjs +1 -1
  84. package/dist/src/executors/cargo-clippy/executor.js +4 -4
  85. package/dist/src/executors/cargo-clippy/executor.mjs +8 -8
  86. package/dist/src/executors/cargo-clippy/untyped.mjs +1 -1
  87. package/dist/src/executors/cargo-doc/executor.js +4 -4
  88. package/dist/src/executors/cargo-doc/executor.mjs +8 -8
  89. package/dist/src/executors/cargo-doc/untyped.mjs +1 -1
  90. package/dist/src/executors/cargo-format/executor.js +4 -4
  91. package/dist/src/executors/cargo-format/executor.mjs +8 -8
  92. package/dist/src/executors/cargo-format/untyped.mjs +1 -1
  93. package/dist/src/executors/cargo-publish/executor.mjs +3 -3
  94. package/dist/src/executors/cargo-publish/untyped.mjs +1 -1
  95. package/dist/src/executors/clean-package/executor.js +5 -5
  96. package/dist/src/executors/clean-package/executor.mjs +6 -6
  97. package/dist/src/executors/clean-package/untyped.mjs +1 -1
  98. package/dist/src/executors/esbuild/executor.js +4 -4
  99. package/dist/src/executors/esbuild/executor.mjs +7 -7
  100. package/dist/src/executors/esbuild/untyped.mjs +2 -2
  101. package/dist/src/executors/npm-publish/executor.mjs +4 -4
  102. package/dist/src/executors/npm-publish/untyped.mjs +1 -1
  103. package/dist/src/executors/size-limit/executor.js +4 -4
  104. package/dist/src/executors/size-limit/executor.mjs +7 -7
  105. package/dist/src/executors/size-limit/untyped.mjs +1 -1
  106. package/dist/src/executors/typia/executor.js +4 -4
  107. package/dist/src/executors/typia/executor.mjs +7 -7
  108. package/dist/src/executors/typia/untyped.mjs +1 -1
  109. package/dist/src/executors/unbuild/executor.js +4 -4
  110. package/dist/src/executors/unbuild/executor.mjs +7 -7
  111. package/dist/src/executors/unbuild/untyped.mjs +2 -2
  112. package/dist/src/generators/browser-library/generator.js +4 -4
  113. package/dist/src/generators/browser-library/generator.mjs +9 -9
  114. package/dist/src/generators/browser-library/untyped.mjs +1 -1
  115. package/dist/src/generators/config-schema/generator.js +4 -4
  116. package/dist/src/generators/config-schema/generator.mjs +7 -7
  117. package/dist/src/generators/config-schema/untyped.mjs +1 -1
  118. package/dist/src/generators/init/init.mjs +2 -2
  119. package/dist/src/generators/init/untyped.mjs +1 -1
  120. package/dist/src/generators/neutral-library/generator.js +4 -4
  121. package/dist/src/generators/neutral-library/generator.mjs +9 -9
  122. package/dist/src/generators/neutral-library/untyped.mjs +1 -1
  123. package/dist/src/generators/node-library/generator.js +4 -4
  124. package/dist/src/generators/node-library/generator.mjs +9 -9
  125. package/dist/src/generators/node-library/untyped.mjs +1 -1
  126. package/dist/src/generators/preset/generator.js +4 -4
  127. package/dist/src/generators/preset/generator.mjs +7 -7
  128. package/dist/src/generators/preset/untyped.mjs +1 -1
  129. package/dist/src/generators/release-version/generator.js +3 -3
  130. package/dist/src/generators/release-version/generator.mjs +6 -6
  131. package/dist/src/generators/release-version/untyped.mjs +1 -1
  132. package/dist/src/plugins/rust/cargo-toml.mjs +4 -4
  133. package/dist/src/plugins/rust/index.mjs +4 -4
  134. package/dist/src/plugins/typescript/index.mjs +4 -4
  135. package/dist/src/plugins/typescript/project-config.mjs +4 -4
  136. package/dist/src/plugins/typescript/tsup.mjs +2 -2
  137. package/dist/src/plugins/typescript/untyped-schema.mjs +2 -2
  138. package/dist/src/types.mjs +1 -1
  139. package/dist/src/utils/apply-workspace-tokens.mjs +4 -4
  140. package/dist/src/utils/cargo.mjs +2 -2
  141. package/dist/src/utils/create-cli-options.mjs +2 -2
  142. package/dist/src/utils/get-project-configurations.mjs +4 -4
  143. package/dist/src/utils/index.mjs +14 -14
  144. package/dist/src/utils/lock-file.mjs +2 -2
  145. package/dist/src/utils/package-helpers.mjs +4 -4
  146. package/dist/src/utils/plugin-helpers.mjs +3 -3
  147. package/dist/src/utils/pnpm-deps-update.mjs +3 -3
  148. package/dist/src/utils/project-tags.mjs +2 -2
  149. package/dist/src/utils/toml.mjs +2 -2
  150. package/dist/src/utils/typia-transform.mjs +2 -2
  151. package/dist/src/utils/versions.mjs +1 -1
  152. package/package.json +2 -2
  153. package/dist/chunk-JDFMHRPQ.mjs +0 -1533
  154. package/dist/chunk-OWBD5WVM.js +0 -1532
@@ -0,0 +1,653 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+ var _chunk6CGAYKQLjs = require('./chunk-6CGAYKQL.js');
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+ var _chunkG4QFSE5Bjs = require('./chunk-G4QFSE5B.js');
15
+
16
+
17
+ var _chunk4JOIS7WWjs = require('./chunk-4JOIS7WW.js');
18
+
19
+
20
+ var _chunkJTAXCQX6js = require('./chunk-JTAXCQX6.js');
21
+
22
+
23
+
24
+ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
25
+
26
+ // ../esbuild/src/build.ts
27
+ var _devkit = require('@nx/devkit');
28
+
29
+ // ../build-tools/src/config.ts
30
+ var DEFAULT_COMPILED_BANNER = `/*****************************************
31
+ *
32
+ * \u26A1 Built by Storm Software
33
+ *
34
+ *****************************************/
35
+ `;
36
+ var DEFAULT_ENVIRONMENT = "production";
37
+ var DEFAULT_TARGET = "esnext";
38
+ var DEFAULT_ORGANIZATION = "storm-software";
39
+
40
+ // ../build-tools/src/plugins/swc.ts
41
+ var _core = require('@swc/core');
42
+
43
+ // ../build-tools/src/plugins/ts-resolve.ts
44
+ var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
45
+ var _module = require('module');
46
+ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
47
+ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_resolve2);
48
+
49
+ // ../build-tools/src/plugins/type-definitions.ts
50
+
51
+
52
+
53
+ // ../build-tools/src/utilities/copy-assets.ts
54
+ var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
55
+ var _glob = require('glob');
56
+ var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
57
+ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
58
+ const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
59
+ pendingAssets.push({
60
+ input: projectRoot,
61
+ glob: "*.md",
62
+ output: "."
63
+ });
64
+ pendingAssets.push({
65
+ input: ".",
66
+ glob: "LICENSE",
67
+ output: "."
68
+ });
69
+ if (generatePackageJson2 === false) {
70
+ pendingAssets.push({
71
+ input: projectRoot,
72
+ glob: "package.json",
73
+ output: "."
74
+ });
75
+ }
76
+ if (includeSrc === true) {
77
+ pendingAssets.push({
78
+ input: sourceRoot,
79
+ glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
80
+ output: "src/"
81
+ });
82
+ }
83
+ _chunkG4QFSE5Bjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
84
+ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkJTAXCQX6js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
85
+ const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
86
+ projectDir: projectRoot,
87
+ rootDir: config.workspaceRoot,
88
+ outputDir: outputPath,
89
+ assets: pendingAssets
90
+ });
91
+ await assetHandler.processAllAssetsOnce();
92
+ if (includeSrc === true) {
93
+ _chunkG4QFSE5Bjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkJTAXCQX6js.joinPaths.call(void 0, outputPath, "src")}`, config);
94
+ const files = await _glob.glob.call(void 0, [
95
+ _chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
96
+ _chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
97
+ _chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
98
+ _chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
99
+ ]);
100
+ await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
101
+
102
+ ${await _promises.readFile.call(void 0, file, "utf8")}
103
+
104
+ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
105
+ }
106
+ }, "copyAssets");
107
+
108
+ // ../build-tools/src/utilities/generate-package-json.ts
109
+ var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
110
+
111
+
112
+
113
+ var _projectgraph = require('nx/src/project-graph/project-graph');
114
+ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot, projectRoot, projectName, packageJson) => {
115
+ const projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
116
+ const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
117
+ const localPackages = [];
118
+ for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _ => _.node, 'access', _2 => _2.data, 'optionalAccess', _3 => _3.root]) !== projectRoot && _optionalChain([dep, 'access', _4 => _4.node, 'access', _5 => _5.data, 'optionalAccess', _6 => _6.root]) !== workspaceRoot)) {
119
+ const projectNode = project.node;
120
+ if (projectNode.data.root) {
121
+ const projectPackageJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
122
+ if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
123
+ const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
124
+ const projectPackageJson = JSON.parse(projectPackageJsonContent);
125
+ if (projectPackageJson.private !== true) {
126
+ localPackages.push(projectPackageJson);
127
+ }
128
+ }
129
+ }
130
+ }
131
+ if (localPackages.length > 0) {
132
+ _chunkG4QFSE5Bjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
133
+ const projectJsonFile = await _promises.readFile.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
134
+ const projectJson = JSON.parse(projectJsonFile);
135
+ const projectName2 = projectJson.name;
136
+ const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
137
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _7 => _7.projects, 'optionalAccess', _8 => _8[projectName2]])) {
138
+ throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
139
+ }
140
+ const implicitDependencies = _optionalChain([projectConfigurations, 'access', _9 => _9.projects, 'optionalAccess', _10 => _10[projectName2], 'access', _11 => _11.implicitDependencies, 'optionalAccess', _12 => _12.reduce, 'call', _13 => _13((ret, dep) => {
141
+ if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
142
+ const depPackageJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
143
+ if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
144
+ const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
145
+ const depPackageJson = JSON.parse(depPackageJsonContent);
146
+ if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
147
+ ret.push(depPackageJson.name);
148
+ }
149
+ }
150
+ }
151
+ return ret;
152
+ }, [])]);
153
+ packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
154
+ if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _16 => _16.includes, 'call', _17 => _17(localPackage.name)]) && _optionalChain([packageJson, 'access', _18 => _18.devDependencies, 'optionalAccess', _19 => _19[localPackage.name]]) === void 0) {
155
+ ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
156
+ }
157
+ return ret;
158
+ }, _nullishCoalesce(packageJson.dependencies, () => ( {})));
159
+ packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
160
+ if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _20 => _20.includes, 'call', _21 => _21(localPackage.name)]) && _optionalChain([packageJson, 'access', _22 => _22.dependencies, 'optionalAccess', _23 => _23[localPackage.name]]) === void 0) {
161
+ ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
162
+ }
163
+ return ret;
164
+ }, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
165
+ } else {
166
+ _chunkG4QFSE5Bjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
167
+ }
168
+ return packageJson;
169
+ }, "addPackageDependencies");
170
+ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
171
+ const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunk4JOIS7WWjs.findWorkspaceRoot.call(void 0, );
172
+ const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
173
+ const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
174
+ packageJson.type ??= "module";
175
+ packageJson.sideEffects ??= false;
176
+ if (includeSrc === true) {
177
+ let distSrc = sourceRoot.replace(projectRoot, "");
178
+ if (distSrc.startsWith("/")) {
179
+ distSrc = distSrc.substring(1);
180
+ }
181
+ packageJson.source ??= `${_chunkJTAXCQX6js.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
182
+ }
183
+ packageJson.files ??= [
184
+ "dist/**/*"
185
+ ];
186
+ if (includeSrc === true && !packageJson.files.includes("src")) {
187
+ packageJson.files.push("src/**/*");
188
+ }
189
+ packageJson.publishConfig ??= {
190
+ access: "public"
191
+ };
192
+ packageJson.description ??= workspacePackageJson.description;
193
+ packageJson.homepage ??= workspacePackageJson.homepage;
194
+ packageJson.bugs ??= workspacePackageJson.bugs;
195
+ packageJson.license ??= workspacePackageJson.license;
196
+ packageJson.keywords ??= workspacePackageJson.keywords;
197
+ packageJson.funding ??= workspacePackageJson.funding;
198
+ packageJson.author ??= workspacePackageJson.author;
199
+ packageJson.maintainers ??= workspacePackageJson.maintainers;
200
+ if (!packageJson.maintainers && packageJson.author) {
201
+ packageJson.maintainers = [
202
+ packageJson.author
203
+ ];
204
+ }
205
+ packageJson.contributors ??= workspacePackageJson.contributors;
206
+ if (!packageJson.contributors && packageJson.author) {
207
+ packageJson.contributors = [
208
+ packageJson.author
209
+ ];
210
+ }
211
+ packageJson.repository ??= workspacePackageJson.repository;
212
+ packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkJTAXCQX6js.joinPaths.call(void 0, "packages", projectName);
213
+ return packageJson;
214
+ }, "addWorkspacePackageJsonFields");
215
+
216
+ // ../build-tools/src/utilities/get-entry-points.ts
217
+
218
+
219
+ // ../build-tools/src/utilities/get-env.ts
220
+ var getEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (builder, options) => {
221
+ return {
222
+ STORM_BUILD: builder,
223
+ STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
224
+ STORM_NAME: options.name,
225
+ STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
226
+ STORM_PLATFORM: options.platform,
227
+ STORM_FORMAT: JSON.stringify(options.format),
228
+ STORM_TARGET: JSON.stringify(options.target),
229
+ ...options.env
230
+ };
231
+ }, "getEnv");
232
+
233
+ // ../build-tools/src/utilities/read-nx-config.ts
234
+
235
+
236
+
237
+ // ../build-tools/src/utilities/task-graph.ts
238
+ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
239
+
240
+ // ../esbuild/src/build.ts
241
+ var _chokidar = require('chokidar');
242
+ var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
243
+ var _estoolkit = require('es-toolkit');
244
+ var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
245
+ var _globby = require('globby');
246
+
247
+
248
+ var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
249
+ var _tsup = require('tsup');
250
+
251
+ // ../esbuild/src/clean.ts
252
+
253
+ async function cleanDirectories(directory) {
254
+ await _promises.rm.call(void 0, directory, {
255
+ recursive: true,
256
+ force: true
257
+ });
258
+ }
259
+ _chunk3GQAWCBQjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
260
+
261
+ // ../esbuild/src/config.ts
262
+ var DEFAULT_BUILD_OPTIONS = {
263
+ assets: [],
264
+ platform: "node",
265
+ target: [
266
+ "esnext"
267
+ ],
268
+ format: "esm",
269
+ tsconfig: "tsconfig.json",
270
+ mode: "production",
271
+ generatePackageJson: true,
272
+ includeSrc: false,
273
+ keepNames: true,
274
+ metafile: false,
275
+ treeshake: true,
276
+ shims: false,
277
+ watch: false,
278
+ bundle: true,
279
+ loader: {
280
+ ".aac": "file",
281
+ ".css": "file",
282
+ ".eot": "file",
283
+ ".flac": "file",
284
+ ".gif": "file",
285
+ ".jpeg": "file",
286
+ ".jpg": "file",
287
+ ".mp3": "file",
288
+ ".mp4": "file",
289
+ ".ogg": "file",
290
+ ".otf": "file",
291
+ ".png": "file",
292
+ ".svg": "file",
293
+ ".ttf": "file",
294
+ ".wav": "file",
295
+ ".webm": "file",
296
+ ".webp": "file",
297
+ ".woff": "file",
298
+ ".woff2": "file"
299
+ },
300
+ banner: {
301
+ js: DEFAULT_COMPILED_BANNER,
302
+ css: DEFAULT_COMPILED_BANNER
303
+ }
304
+ };
305
+
306
+ // ../esbuild/src/plugins/deps-check.ts
307
+
308
+
309
+ var unusedIgnore = [
310
+ // these are our dev dependencies
311
+ /@types\/.*?/,
312
+ /@typescript-eslint.*?/,
313
+ /eslint.*?/,
314
+ "esbuild",
315
+ "husky",
316
+ "is-ci",
317
+ "lint-staged",
318
+ "prettier",
319
+ "typescript",
320
+ "ts-node",
321
+ "ts-jest",
322
+ "@swc/core",
323
+ "@swc/jest",
324
+ "jest",
325
+ // these are missing 3rd party deps
326
+ "spdx-exceptions",
327
+ "spdx-license-ids",
328
+ // type-only, so it is not detected
329
+ "ts-toolbelt",
330
+ // these are indirectly used by build
331
+ "buffer"
332
+ ];
333
+ var missingIgnore = [
334
+ ".prisma",
335
+ "@prisma/client",
336
+ "ts-toolbelt"
337
+ ];
338
+ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bundle) => ({
339
+ name: "storm:deps-check",
340
+ setup(build3) {
341
+ const pkgJsonPath = _path2.default.join(process.cwd(), "package.json");
342
+ const pkgContents = _chunk3GQAWCBQjs.__require.call(void 0, pkgJsonPath);
343
+ const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
344
+ const devDependencies = Object.keys(_nullishCoalesce(pkgContents["devDependencies"], () => ( {})));
345
+ const peerDependencies = Object.keys(_nullishCoalesce(pkgContents["peerDependencies"], () => ( {})));
346
+ const dependencies = [
347
+ ...regDependencies,
348
+ ...bundle ? devDependencies : []
349
+ ];
350
+ const collectedDependencies = /* @__PURE__ */ new Set();
351
+ const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
352
+ build3.onResolve({
353
+ filter: onlyPackages
354
+ }, (args) => {
355
+ if (args.importer.includes(process.cwd())) {
356
+ if (args.path[0] === "@") {
357
+ const [org, pkg] = args.path.split("/");
358
+ collectedDependencies.add(`${org}/${pkg}`);
359
+ } else {
360
+ const [pkg] = args.path.split("/");
361
+ collectedDependencies.add(pkg);
362
+ }
363
+ }
364
+ return {
365
+ external: true
366
+ };
367
+ });
368
+ build3.onEnd(() => {
369
+ const unusedDependencies = [
370
+ ...dependencies
371
+ ].filter((dep) => {
372
+ return !collectedDependencies.has(dep) || _module.builtinModules.includes(dep);
373
+ });
374
+ const missingDependencies = [
375
+ ...collectedDependencies
376
+ ].filter((dep) => {
377
+ return !dependencies.includes(dep) && !_module.builtinModules.includes(dep);
378
+ });
379
+ const filteredUnusedDeps = unusedDependencies.filter((dep) => {
380
+ return !unusedIgnore.some((pattern) => dep.match(pattern));
381
+ });
382
+ const filteredMissingDeps = missingDependencies.filter((dep) => {
383
+ return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
384
+ });
385
+ _chunkG4QFSE5Bjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
386
+ _chunkG4QFSE5Bjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
387
+ if (filteredMissingDeps.length > 0) {
388
+ throw new Error(`Missing dependencies detected - please install them:
389
+ ${JSON.stringify(filteredMissingDeps)}
390
+ `);
391
+ }
392
+ });
393
+ }
394
+ }), "depsCheckPlugin");
395
+
396
+ // ../esbuild/src/build.ts
397
+ async function resolveContext(userOptions) {
398
+ const projectRoot = userOptions.projectRoot;
399
+ const workspaceRoot = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
400
+ if (!workspaceRoot) {
401
+ throw new Error("Cannot find Nx workspace root");
402
+ }
403
+ const workspaceConfig = await _chunkG4QFSE5Bjs.getWorkspaceConfig.call(void 0, true, {
404
+ workspaceRoot: workspaceRoot.dir
405
+ });
406
+ _chunkG4QFSE5Bjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
407
+ const stopwatch = _chunkG4QFSE5Bjs.getStopwatch.call(void 0, "Build options resolution");
408
+ const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
409
+ exitOnError: true
410
+ });
411
+ const projectJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
412
+ if (!_fs.existsSync.call(void 0, projectJsonPath)) {
413
+ throw new Error("Cannot find project.json configuration");
414
+ }
415
+ const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
416
+ const projectJson = JSON.parse(projectJsonFile);
417
+ const projectName = projectJson.name || userOptions.name;
418
+ const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
419
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _24 => _24.projects, 'optionalAccess', _25 => _25[projectName]])) {
420
+ throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
421
+ }
422
+ const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
423
+ options.name ??= `${projectName}-${options.format}`;
424
+ options.target ??= DEFAULT_TARGET;
425
+ const packageJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
426
+ if (!_fs.existsSync.call(void 0, packageJsonPath)) {
427
+ throw new Error("Cannot find package.json configuration");
428
+ }
429
+ const env = getEnv("esbuild", options);
430
+ const resolvedOptions = {
431
+ ...options,
432
+ tsconfig: _chunkJTAXCQX6js.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
433
+ distDir: "dist",
434
+ name: projectName,
435
+ metafile: userOptions.mode === "development",
436
+ ...userOptions,
437
+ clean: false,
438
+ target: userOptions.target || options.target,
439
+ splitting: options.format === "iife" ? false : options.treeshake === void 0 ? options.splitting : true,
440
+ env,
441
+ define: {
442
+ STORM_FORMAT: JSON.stringify(options.format),
443
+ ...options.define,
444
+ ...Object.keys(env || {}).reduce((res, key) => {
445
+ const value = JSON.stringify(env[key]);
446
+ const safeKey = key.replaceAll("(", "").replaceAll(")", "");
447
+ return {
448
+ ...res,
449
+ [`process.env.${safeKey}`]: value,
450
+ [`import.meta.env.${safeKey}`]: value
451
+ };
452
+ }, {})
453
+ }
454
+ };
455
+ stopwatch();
456
+ return {
457
+ options: resolvedOptions,
458
+ clean: userOptions.clean !== false,
459
+ workspaceConfig,
460
+ projectConfigurations,
461
+ projectName,
462
+ projectGraph,
463
+ sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkJTAXCQX6js.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
464
+ outputPath: resolvedOptions.outputPath || _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceConfig.workspaceRoot, "dist", resolvedOptions.projectRoot),
465
+ minify: resolvedOptions.minify || resolvedOptions.mode === "production"
466
+ };
467
+ }
468
+ _chunk3GQAWCBQjs.__name.call(void 0, resolveContext, "resolveContext");
469
+ async function generatePackageJson(context) {
470
+ if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
471
+ _chunkG4QFSE5Bjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
472
+ const stopwatch = _chunkG4QFSE5Bjs.getStopwatch.call(void 0, "Write package.json file");
473
+ const packageJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, context.options.projectRoot, "project.json");
474
+ if (!_fs.existsSync.call(void 0, packageJsonPath)) {
475
+ throw new Error("Cannot find package.json configuration");
476
+ }
477
+ const packageJsonFile = await _promises2.default.readFile(_chunkJTAXCQX6js.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, context.options.projectRoot, "package.json"), "utf8");
478
+ let packageJson = JSON.parse(packageJsonFile);
479
+ if (!packageJson) {
480
+ throw new Error("Cannot find package.json configuration file");
481
+ }
482
+ packageJson = await addPackageDependencies(context.workspaceConfig.workspaceRoot, context.options.projectRoot, context.projectName, packageJson);
483
+ packageJson = await addWorkspacePackageJsonFields(context.workspaceConfig, context.options.projectRoot, context.sourceRoot, context.projectName, false, packageJson);
484
+ if (context.options.entry) {
485
+ packageJson.exports ??= {};
486
+ packageJson.exports["./package.json"] ??= "./package.json";
487
+ packageJson.exports["."] ??= `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js`;
488
+ const entryPoints = Array.isArray(context.options.entry) ? context.options.entry : Object.keys(context.options.entry);
489
+ for (const entryPoint of entryPoints) {
490
+ if (context.options.entry[entryPoint]) {
491
+ const entry = context.options.entry[entryPoint].replaceAll("\\", "/").replaceAll(/^(\.\/)*/g, "").replace(/\.([cm])?[jt]s(x)?$/g, "");
492
+ packageJson.exports[`./${entry}`] ??= `.${context.options.distDir ? `/${context.options.distDir}` : ""}/${entry}.js`;
493
+ }
494
+ }
495
+ if (context.options.format === "esm") {
496
+ packageJson.module = packageJson.type === "module" ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.mjs`;
497
+ } else {
498
+ packageJson.main = packageJson.type === "commonjs" ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.cjs`;
499
+ }
500
+ packageJson.types = `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.d.ts`;
501
+ packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
502
+ if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
503
+ ret[key.replace("/index", "")] = packageJson.exports[key];
504
+ }
505
+ return ret;
506
+ }, packageJson.exports);
507
+ }
508
+ await _devkit.writeJsonFile.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, context.outputPath, "package.json"), packageJson);
509
+ stopwatch();
510
+ }
511
+ return context;
512
+ }
513
+ _chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
514
+ async function executeTsup(context) {
515
+ _chunkG4QFSE5Bjs.writeDebug.call(void 0, ` \u{1F680} Running ${context.options.name} build`, context.workspaceConfig);
516
+ const stopwatch = _chunkG4QFSE5Bjs.getStopwatch.call(void 0, `${context.options.name} build`);
517
+ await _tsup.build.call(void 0, {
518
+ ...context.options,
519
+ outDir: context.outputPath,
520
+ workspaceConfig: context.workspaceConfig
521
+ });
522
+ stopwatch();
523
+ return context;
524
+ }
525
+ _chunk3GQAWCBQjs.__name.call(void 0, executeTsup, "executeTsup");
526
+ async function copyBuildAssets(context) {
527
+ if (_optionalChain([context, 'access', _26 => _26.result, 'optionalAccess', _27 => _27.errors, 'access', _28 => _28.length]) === 0) {
528
+ _chunkG4QFSE5Bjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
529
+ const stopwatch = _chunkG4QFSE5Bjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
530
+ await copyAssets(context.workspaceConfig, _nullishCoalesce(context.options.assets, () => ( [])), context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
531
+ stopwatch();
532
+ }
533
+ return context;
534
+ }
535
+ _chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
536
+ async function reportResults(context) {
537
+ if (_optionalChain([context, 'access', _29 => _29.result, 'optionalAccess', _30 => _30.errors, 'access', _31 => _31.length]) === 0) {
538
+ if (context.result.warnings.length > 0) {
539
+ _chunkG4QFSE5Bjs.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`, context.workspaceConfig);
540
+ }
541
+ _chunkG4QFSE5Bjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context.options.name} build completed successfully`, context.workspaceConfig);
542
+ } else if (_optionalChain([context, 'access', _32 => _32.result, 'optionalAccess', _33 => _33.errors]) && _optionalChain([context, 'access', _34 => _34.result, 'optionalAccess', _35 => _35.errors, 'access', _36 => _36.length]) > 0) {
543
+ _chunkG4QFSE5Bjs.writeError.call(void 0, ` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`, context.workspaceConfig);
544
+ throw new Error(`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`);
545
+ }
546
+ }
547
+ _chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
548
+ async function dependencyCheck(options) {
549
+ if (process.env.DEV === "true") {
550
+ return void 0;
551
+ }
552
+ if (process.env.CI && !process.env.BUILDKITE) {
553
+ return void 0;
554
+ }
555
+ const buildPromise = esbuild.build({
556
+ entryPoints: _globby.globbySync.call(void 0, "**/*.{j,t}s", {
557
+ // We don't check dependencies in ecosystem tests because tests are isolated from the build.
558
+ ignore: [
559
+ "./src/__tests__/**/*",
560
+ "./tests/e2e/**/*",
561
+ "./dist/**/*"
562
+ ],
563
+ gitignore: true
564
+ }),
565
+ logLevel: "silent",
566
+ bundle: true,
567
+ write: false,
568
+ outdir: "out",
569
+ plugins: [
570
+ depsCheckPlugin(options.bundle)
571
+ ]
572
+ });
573
+ await buildPromise.catch(() => {
574
+ });
575
+ return void 0;
576
+ }
577
+ _chunk3GQAWCBQjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
578
+ async function cleanOutputPath(context) {
579
+ if (context.clean !== false && context.outputPath) {
580
+ _chunkG4QFSE5Bjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`, context.workspaceConfig);
581
+ const stopwatch = _chunkG4QFSE5Bjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
582
+ await cleanDirectories(context.outputPath);
583
+ stopwatch();
584
+ }
585
+ return context;
586
+ }
587
+ _chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
588
+ async function build2(options) {
589
+ _chunkG4QFSE5Bjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
590
+ const stopwatch = _chunkG4QFSE5Bjs.getStopwatch.call(void 0, "ESBuild pipeline");
591
+ try {
592
+ const opts = Array.isArray(options) ? options : [
593
+ options
594
+ ];
595
+ if (opts.length === 0) {
596
+ throw new Error("No build options were provided");
597
+ }
598
+ const context = await resolveContext(options);
599
+ await cleanOutputPath(context);
600
+ await Promise.all([
601
+ dependencyCheck(context.options),
602
+ generatePackageJson(context),
603
+ copyBuildAssets(context),
604
+ executeTsup(context)
605
+ ]);
606
+ await reportResults(context);
607
+ _chunkG4QFSE5Bjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
608
+ } catch (error) {
609
+ _chunkG4QFSE5Bjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
610
+ throw error;
611
+ } finally {
612
+ stopwatch();
613
+ }
614
+ }
615
+ _chunk3GQAWCBQjs.__name.call(void 0, build2, "build");
616
+
617
+ // src/executors/esbuild/executor.ts
618
+ async function esbuildExecutorFn(options, context, config) {
619
+ _chunkG4QFSE5Bjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
620
+ if (!_optionalChain([context, 'access', _37 => _37.projectsConfigurations, 'optionalAccess', _38 => _38.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _39 => _39.projectsConfigurations, 'access', _40 => _40.projects, 'access', _41 => _41[context.projectName], 'optionalAccess', _42 => _42.root])) {
621
+ throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
622
+ }
623
+ await build2({
624
+ ...options,
625
+ projectRoot: _optionalChain([context, 'access', _43 => _43.projectsConfigurations, 'access', _44 => _44.projects, 'optionalAccess', _45 => _45[context.projectName], 'access', _46 => _46.root]),
626
+ name: context.projectName,
627
+ sourceRoot: _optionalChain([context, 'access', _47 => _47.projectsConfigurations, 'access', _48 => _48.projects, 'optionalAccess', _49 => _49[context.projectName], 'optionalAccess', _50 => _50.sourceRoot]),
628
+ format: options.format,
629
+ platform: options.format
630
+ });
631
+ return {
632
+ success: true
633
+ };
634
+ }
635
+ _chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
636
+ var executor_default = _chunk6CGAYKQLjs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
637
+ skipReadingConfig: false,
638
+ hooks: {
639
+ applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
640
+ options.entry ??= [
641
+ "src/index.ts"
642
+ ];
643
+ options.outputPath ??= "dist/{projectRoot}";
644
+ options.tsconfig ??= "{projectRoot}/tsconfig.json";
645
+ return options;
646
+ }, "applyDefaultOptions")
647
+ }
648
+ });
649
+
650
+
651
+
652
+
653
+ exports.esbuildExecutorFn = esbuildExecutorFn; exports.executor_default = executor_default;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  withRunExecutor
3
- } from "./chunk-5AVEZVE5.mjs";
3
+ } from "./chunk-2TEC7IFE.mjs";
4
4
  import {
5
5
  writeInfo
6
- } from "./chunk-TCZC6XD6.mjs";
6
+ } from "./chunk-IZHZKPHV.mjs";
7
7
  import {
8
8
  __name
9
- } from "./chunk-VGSUCQ2S.mjs";
9
+ } from "./chunk-N7GSKHH2.mjs";
10
10
 
11
11
  // src/executors/typia/executor.ts
12
12
  import { removeSync } from "fs-extra";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __name
3
- } from "./chunk-VGSUCQ2S.mjs";
3
+ } from "./chunk-N7GSKHH2.mjs";
4
4
 
5
5
  // src/utils/project-tags.ts
6
6
  var ProjectTagConstants = {