@storm-software/workspace-tools 1.296.66 → 1.296.69

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 (183) hide show
  1. package/README.md +1 -1
  2. package/dist/{chunk-JSF2U5XJ.mjs → chunk-5HFH7JXU.mjs} +1 -1
  3. package/dist/chunk-6JPLZS7V.js +63 -0
  4. package/dist/{chunk-33X22YHZ.js → chunk-6SGLYIAR.js} +38 -62
  5. package/dist/{chunk-7GR34ULJ.mjs → chunk-DWFH4BRZ.mjs} +1 -1
  6. package/dist/{chunk-HHIEI52S.mjs → chunk-F2YQJNBF.mjs} +1 -1
  7. package/dist/{chunk-ZLMX7HR5.mjs → chunk-LWUEYMYK.mjs} +1 -1
  8. package/dist/chunk-NVQEK4YA.mjs +63 -0
  9. package/dist/{chunk-PVNPMJZX.mjs → chunk-QJ7X75J7.mjs} +18 -42
  10. package/dist/chunk-QTRRVFW3.js +646 -0
  11. package/dist/{chunk-26UFEUQD.mjs → chunk-TCAUYQGJ.mjs} +1 -1
  12. package/dist/chunk-WCG3YZT5.mjs +646 -0
  13. package/dist/{executor-C5219i5t.d.ts → executor-Bvhe30H9.d.mts} +1 -1
  14. package/dist/{executor-DadFjUp3.d.mts → executor-Bvhe30H9.d.ts} +1 -1
  15. package/dist/{executor-CIWrRfZk.d.ts → executor-ByqK10v5.d.mts} +1 -1
  16. package/dist/{executor-CG97uTCS.d.mts → executor-ByqK10v5.d.ts} +1 -1
  17. package/dist/{executor-k7EKIXAK.d.ts → executor-CfRFawOI.d.mts} +1 -1
  18. package/dist/{executor-CMTGEhxz.d.mts → executor-CfRFawOI.d.ts} +1 -1
  19. package/dist/{executor-DwZoSq9d.d.mts → executor-DGBYJ2e9.d.mts} +2 -2
  20. package/dist/{executor-ClfwHhlC.d.ts → executor-DGBYJ2e9.d.ts} +2 -2
  21. package/dist/{executor-Dy3y0dK8.d.ts → executor-DnAgSSQo.d.mts} +1 -1
  22. package/dist/{executor-BvyV-AUf.d.mts → executor-DnAgSSQo.d.ts} +1 -1
  23. package/dist/{executor-J46dd9vs.d.ts → executor-gZ6drqad.d.mts} +1 -1
  24. package/dist/{executor-BIJn8SVe.d.mts → executor-gZ6drqad.d.ts} +1 -1
  25. package/dist/executors.d.mts +8 -9
  26. package/dist/executors.d.ts +8 -9
  27. package/dist/executors.js +6 -7
  28. package/dist/executors.mjs +9 -10
  29. package/dist/{generator-pH8SQ4XZ.d.ts → generator-B84zOfal.d.ts} +1 -1
  30. package/dist/{generator-DKHHWoGN.d.mts → generator-B8e9I6Mc.d.mts} +1 -1
  31. package/dist/{generator-COkrr-Oe.d.ts → generator-BC0IbdKh.d.ts} +2 -2
  32. package/dist/{generator-B5dG5dVY.d.ts → generator-BIDPDi0P.d.ts} +2 -2
  33. package/dist/{generator-Dmk05ap8.d.mts → generator-BS0iminO.d.mts} +2 -2
  34. package/dist/{generator-CXLEWJAF.d.ts → generator-Bg8GF2dN.d.mts} +2 -2
  35. package/dist/{generator-RLXG3OeQ.d.ts → generator-CPtINS_d.d.mts} +2 -2
  36. package/dist/{generator-C3dM_v6y.d.mts → generator-D7IL5mT3.d.ts} +2 -2
  37. package/dist/{generator-BKQGstaG.d.mts → generator-DZxxv_h5.d.mts} +2 -2
  38. package/dist/{generator-OpEc9gcp.d.mts → generator-Dq3a21FT.d.ts} +2 -2
  39. package/dist/generators.d.mts +9 -10
  40. package/dist/generators.d.ts +9 -10
  41. package/dist/generators.mjs +5 -5
  42. package/dist/index.d.mts +17 -16
  43. package/dist/index.d.ts +17 -16
  44. package/dist/index.js +6 -7
  45. package/dist/index.mjs +13 -14
  46. package/dist/src/base/base-executor.d.mts +3 -5
  47. package/dist/src/base/base-executor.d.ts +3 -5
  48. package/dist/src/base/base-executor.mjs +1 -1
  49. package/dist/src/base/base-executor.untyped.mjs +1 -1
  50. package/dist/src/base/base-generator.d.mts +3 -5
  51. package/dist/src/base/base-generator.d.ts +3 -5
  52. package/dist/src/base/base-generator.mjs +1 -1
  53. package/dist/src/base/base-generator.untyped.mjs +1 -1
  54. package/dist/src/base/cargo-base-executor.untyped.mjs +1 -1
  55. package/dist/src/base/index.d.mts +3 -5
  56. package/dist/src/base/index.d.ts +3 -5
  57. package/dist/src/base/index.mjs +1 -1
  58. package/dist/src/base/typescript-build-executor.untyped.mjs +1 -1
  59. package/dist/src/base/typescript-library-generator.untyped.mjs +1 -1
  60. package/dist/src/executors/cargo-build/executor.mjs +1 -1
  61. package/dist/src/executors/cargo-build/untyped.mjs +1 -1
  62. package/dist/src/executors/cargo-check/executor.mjs +1 -1
  63. package/dist/src/executors/cargo-check/untyped.mjs +1 -1
  64. package/dist/src/executors/cargo-clippy/executor.mjs +1 -1
  65. package/dist/src/executors/cargo-clippy/untyped.mjs +1 -1
  66. package/dist/src/executors/cargo-doc/executor.mjs +1 -1
  67. package/dist/src/executors/cargo-doc/untyped.mjs +1 -1
  68. package/dist/src/executors/cargo-format/executor.mjs +1 -1
  69. package/dist/src/executors/cargo-format/untyped.mjs +1 -1
  70. package/dist/src/executors/cargo-publish/executor.mjs +1 -1
  71. package/dist/src/executors/cargo-publish/untyped.mjs +1 -1
  72. package/dist/src/executors/clean-package/executor.d.mts +1 -3
  73. package/dist/src/executors/clean-package/executor.d.ts +1 -3
  74. package/dist/src/executors/clean-package/executor.mjs +1 -1
  75. package/dist/src/executors/clean-package/untyped.mjs +1 -1
  76. package/dist/src/executors/esbuild/executor.d.mts +2 -4
  77. package/dist/src/executors/esbuild/executor.d.ts +2 -4
  78. package/dist/src/executors/esbuild/executor.js +2 -3
  79. package/dist/src/executors/esbuild/executor.mjs +2 -3
  80. package/dist/src/executors/esbuild/untyped.mjs +1 -1
  81. package/dist/src/executors/napi/executor.d.mts +2 -4
  82. package/dist/src/executors/napi/executor.d.ts +2 -4
  83. package/dist/src/executors/napi/executor.mjs +1 -1
  84. package/dist/src/executors/napi/untyped.mjs +1 -1
  85. package/dist/src/executors/npm-publish/executor.js +2 -2
  86. package/dist/src/executors/npm-publish/executor.mjs +2 -2
  87. package/dist/src/executors/npm-publish/untyped.mjs +1 -1
  88. package/dist/src/executors/size-limit/executor.d.mts +2 -4
  89. package/dist/src/executors/size-limit/executor.d.ts +2 -4
  90. package/dist/src/executors/size-limit/executor.mjs +1 -1
  91. package/dist/src/executors/size-limit/untyped.mjs +1 -1
  92. package/dist/src/executors/tsdown/executor.d.mts +2 -4
  93. package/dist/src/executors/tsdown/executor.d.ts +2 -4
  94. package/dist/src/executors/tsdown/executor.js +2 -3
  95. package/dist/src/executors/tsdown/executor.mjs +2 -3
  96. package/dist/src/executors/tsdown/untyped.mjs +1 -1
  97. package/dist/src/executors/typia/executor.d.mts +2 -4
  98. package/dist/src/executors/typia/executor.d.ts +2 -4
  99. package/dist/src/executors/typia/executor.mjs +1 -1
  100. package/dist/src/executors/typia/untyped.mjs +1 -1
  101. package/dist/src/executors/unbuild/executor.d.mts +2 -4
  102. package/dist/src/executors/unbuild/executor.d.ts +2 -4
  103. package/dist/src/executors/unbuild/executor.mjs +1 -1
  104. package/dist/src/executors/unbuild/untyped.mjs +1 -1
  105. package/dist/src/generators/browser-library/generator.d.mts +4 -6
  106. package/dist/src/generators/browser-library/generator.d.ts +4 -6
  107. package/dist/src/generators/browser-library/generator.mjs +2 -2
  108. package/dist/src/generators/browser-library/untyped.mjs +1 -1
  109. package/dist/src/generators/config-schema/generator.d.mts +4 -5
  110. package/dist/src/generators/config-schema/generator.d.ts +4 -5
  111. package/dist/src/generators/config-schema/generator.mjs +1 -1
  112. package/dist/src/generators/config-schema/untyped.mjs +1 -1
  113. package/dist/src/generators/init/init.mjs +1 -1
  114. package/dist/src/generators/init/untyped.mjs +1 -1
  115. package/dist/src/generators/neutral-library/generator.d.mts +4 -6
  116. package/dist/src/generators/neutral-library/generator.d.ts +4 -6
  117. package/dist/src/generators/neutral-library/generator.mjs +2 -2
  118. package/dist/src/generators/neutral-library/untyped.mjs +1 -1
  119. package/dist/src/generators/node-library/generator.d.mts +4 -6
  120. package/dist/src/generators/node-library/generator.d.ts +4 -6
  121. package/dist/src/generators/node-library/generator.mjs +2 -2
  122. package/dist/src/generators/node-library/untyped.mjs +1 -1
  123. package/dist/src/generators/preset/generator.d.mts +4 -6
  124. package/dist/src/generators/preset/generator.d.ts +4 -6
  125. package/dist/src/generators/preset/generator.mjs +2 -2
  126. package/dist/src/generators/preset/untyped.mjs +1 -1
  127. package/dist/src/plugins/rust/cargo-toml.mjs +1 -1
  128. package/dist/src/plugins/rust/index.mjs +1 -1
  129. package/dist/src/plugins/typescript/index.d.mts +3 -5
  130. package/dist/src/plugins/typescript/index.d.ts +3 -5
  131. package/dist/src/plugins/typescript/index.mjs +1 -1
  132. package/dist/src/plugins/typescript/tsdown.d.mts +3 -5
  133. package/dist/src/plugins/typescript/tsdown.d.ts +3 -5
  134. package/dist/src/plugins/typescript/tsdown.mjs +1 -1
  135. package/dist/src/plugins/typescript/tsup.d.mts +3 -5
  136. package/dist/src/plugins/typescript/tsup.d.ts +3 -5
  137. package/dist/src/plugins/typescript/tsup.mjs +1 -1
  138. package/dist/src/plugins/typescript/untyped-schema.mjs +1 -1
  139. package/dist/src/release/index.d.mts +2 -3
  140. package/dist/src/release/index.d.ts +2 -3
  141. package/dist/src/release/index.mjs +1 -1
  142. package/dist/src/release/js-version-actions.d.mts +1 -3
  143. package/dist/src/release/js-version-actions.d.ts +1 -3
  144. package/dist/src/release/js-version-actions.mjs +1 -1
  145. package/dist/src/release/rust-version-actions.d.mts +1 -3
  146. package/dist/src/release/rust-version-actions.d.ts +1 -3
  147. package/dist/src/release/rust-version-actions.mjs +1 -1
  148. package/dist/src/types.d.mts +77 -6
  149. package/dist/src/types.d.ts +77 -6
  150. package/dist/src/types.mjs +1 -1
  151. package/dist/src/utils/apply-workspace-tokens.mjs +1 -1
  152. package/dist/src/utils/cargo.mjs +1 -1
  153. package/dist/src/utils/create-cli-options.mjs +1 -1
  154. package/dist/src/utils/get-project-configurations.mjs +1 -1
  155. package/dist/src/utils/github.d.mts +1 -3
  156. package/dist/src/utils/github.d.ts +1 -3
  157. package/dist/src/utils/github.mjs +1 -1
  158. package/dist/src/utils/index.d.mts +4 -5
  159. package/dist/src/utils/index.d.ts +4 -5
  160. package/dist/src/utils/index.mjs +1 -1
  161. package/dist/src/utils/lock-file.mjs +1 -1
  162. package/dist/src/utils/nx-json.mjs +1 -1
  163. package/dist/src/utils/package-helpers.mjs +1 -1
  164. package/dist/src/utils/plugin-helpers.mjs +1 -1
  165. package/dist/src/utils/project-tags.d.mts +3 -57
  166. package/dist/src/utils/project-tags.d.ts +3 -57
  167. package/dist/src/utils/project-tags.mjs +1 -1
  168. package/dist/src/utils/registry-helpers.mjs +1 -1
  169. package/dist/src/utils/typia-transform.mjs +1 -1
  170. package/dist/src/utils/versions.mjs +1 -1
  171. package/package.json +11 -11
  172. package/dist/chunk-BCJOE7LL.mjs +0 -469
  173. package/dist/chunk-CX7LLOXP.js +0 -363
  174. package/dist/chunk-F4NO6JZL.mjs +0 -319
  175. package/dist/chunk-MI4DOBNH.js +0 -319
  176. package/dist/chunk-TFGZLFCS.mjs +0 -363
  177. package/dist/chunk-UCM45E6T.js +0 -469
  178. package/dist/types-CHANfFBa.d.ts +0 -77
  179. package/dist/types-D2zxYEAh.d.mts +0 -41
  180. package/dist/types-D2zxYEAh.d.ts +0 -41
  181. package/dist/types-DI57BUsw.d.mts +0 -243
  182. package/dist/types-DI57BUsw.d.ts +0 -243
  183. package/dist/types-E53OUdCr.d.mts +0 -77
@@ -1,469 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
-
4
-
5
-
6
-
7
-
8
- var _chunkMI4DOBNHjs = require('./chunk-MI4DOBNH.js');
9
-
10
-
11
- var _chunk3QCVXOSBjs = require('./chunk-3QCVXOSB.js');
12
-
13
-
14
- var _chunkLQ4UTUAFjs = require('./chunk-LQ4UTUAF.js');
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
- var _chunkCLKU7UMGjs = require('./chunk-CLKU7UMG.js');
26
-
27
-
28
- var _chunkCQDBLKPFjs = require('./chunk-CQDBLKPF.js');
29
-
30
- // ../esbuild/src/assets.ts
31
- async function copyBuildAssets(context) {
32
- if (!_optionalChain([context, 'access', _ => _.result, 'optionalAccess', _2 => _2.errors, 'access', _3 => _3.length]) && _optionalChain([context, 'access', _4 => _4.options, 'access', _5 => _5.assets, 'optionalAccess', _6 => _6.length])) {
33
- _chunkCLKU7UMGjs.writeDebug.call(void 0,
34
- ` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
35
- context.workspaceConfig
36
- );
37
- const stopwatch = _chunkCLKU7UMGjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
38
- await _chunkMI4DOBNHjs.copyAssets.call(void 0,
39
- context.workspaceConfig,
40
- _nullishCoalesce(context.options.assets, () => ( [])),
41
- context.outputPath,
42
- context.options.projectRoot,
43
- context.sourceRoot,
44
- true,
45
- false
46
- );
47
- stopwatch();
48
- }
49
- return context;
50
- }
51
-
52
- // ../esbuild/src/clean.ts
53
- var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
54
- async function cleanDirectories(directory) {
55
- await _promises.rm.call(void 0, directory, { recursive: true, force: true });
56
- }
57
-
58
- // ../esbuild/src/context.ts
59
-
60
-
61
-
62
- var _devkit = require('@nx/devkit');
63
- var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
64
- var _fs = require('fs');
65
-
66
- var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
67
-
68
- // ../esbuild/src/config.ts
69
- var DEFAULT_BUILD_OPTIONS = {
70
- platform: "node",
71
- target: "node22",
72
- format: "esm",
73
- mode: "production",
74
- generatePackageJson: true,
75
- includeSrc: false,
76
- keepNames: true,
77
- metafile: false,
78
- treeshake: true,
79
- splitting: true,
80
- shims: false,
81
- watch: false,
82
- bundle: true,
83
- distDir: "dist",
84
- loader: {
85
- ".aac": "file",
86
- ".css": "file",
87
- ".eot": "file",
88
- ".flac": "file",
89
- ".gif": "file",
90
- ".jpeg": "file",
91
- ".jpg": "file",
92
- ".mp3": "file",
93
- ".mp4": "file",
94
- ".ogg": "file",
95
- ".otf": "file",
96
- ".png": "file",
97
- ".svg": "file",
98
- ".ttf": "file",
99
- ".wav": "file",
100
- ".webm": "file",
101
- ".webp": "file",
102
- ".woff": "file",
103
- ".woff2": "file"
104
- },
105
- banner: {
106
- js: _chunkMI4DOBNHjs.DEFAULT_JS_BANNER,
107
- css: _chunkMI4DOBNHjs.DEFAULT_CSS_BANNER
108
- }
109
- };
110
-
111
- // ../esbuild/src/context.ts
112
- async function resolveContext(userOptions) {
113
- const projectRoot = userOptions.projectRoot;
114
- const workspaceRoot = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
115
- if (!workspaceRoot) {
116
- throw new Error("Cannot find Nx workspace root");
117
- }
118
- const workspaceConfig = await _chunkLQ4UTUAFjs.getWorkspaceConfig.call(void 0, true, {
119
- workspaceRoot: workspaceRoot.dir
120
- });
121
- _chunkCLKU7UMGjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
122
- const stopwatch = _chunkCLKU7UMGjs.getStopwatch.call(void 0, "Build options resolution");
123
- const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
124
- exitOnError: true
125
- });
126
- const projectJsonPath = _chunkCQDBLKPFjs.joinPaths.call(void 0,
127
- workspaceRoot.dir,
128
- projectRoot,
129
- "project.json"
130
- );
131
- if (!_fs.existsSync.call(void 0, projectJsonPath)) {
132
- throw new Error("Cannot find project.json configuration");
133
- }
134
- const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
135
- const projectJson = JSON.parse(projectJsonFile);
136
- const projectName = projectJson.name || userOptions.name;
137
- const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
138
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _7 => _7.projects, 'optionalAccess', _8 => _8[projectName]])) {
139
- throw new Error(
140
- "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."
141
- );
142
- }
143
- const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
144
- options.name ??= projectName;
145
- const packageJsonPath = _chunkCQDBLKPFjs.joinPaths.call(void 0,
146
- workspaceRoot.dir,
147
- options.projectRoot,
148
- "package.json"
149
- );
150
- if (!_fs.existsSync.call(void 0, packageJsonPath)) {
151
- throw new Error("Cannot find package.json configuration");
152
- }
153
- const env = _chunkMI4DOBNHjs.getEnv.call(void 0, "esbuild", options);
154
- const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
155
- const resolvedOptions = {
156
- ...options,
157
- tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : _chunkCQDBLKPFjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "tsconfig.json"),
158
- metafile: userOptions.mode === "development",
159
- clean: false,
160
- env,
161
- define: {
162
- STORM_FORMAT: JSON.stringify(options.format),
163
- ...Object.keys(define).filter((key) => define[key] !== void 0).reduce((res, key) => {
164
- const value = JSON.stringify(define[key]);
165
- const safeKey = key.replaceAll("(", "").replaceAll(")", "");
166
- return {
167
- ...res,
168
- [`process.env.${safeKey}`]: value,
169
- [`import.meta.env.${safeKey}`]: value
170
- };
171
- }, {})
172
- }
173
- };
174
- stopwatch();
175
- const context = {
176
- options: resolvedOptions,
177
- clean: userOptions.clean !== false,
178
- workspaceConfig,
179
- projectConfigurations,
180
- projectName,
181
- projectGraph,
182
- sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkCQDBLKPFjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
183
- outputPath: resolvedOptions.outputPath || _chunkCQDBLKPFjs.joinPaths.call(void 0,
184
- workspaceConfig.workspaceRoot,
185
- "dist",
186
- resolvedOptions.projectRoot
187
- ),
188
- minify: resolvedOptions.minify || resolvedOptions.mode === "production"
189
- };
190
- context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
191
- if (context.options.verbose) {
192
- _chunkCLKU7UMGjs.writeDebug.call(void 0,
193
- ` \u2699\uFE0F Build options resolved:
194
-
195
- ${_chunkCLKU7UMGjs.formatLogMessage.call(void 0, context.options)}`,
196
- workspaceConfig
197
- );
198
- }
199
- return context;
200
- }
201
-
202
- // ../esbuild/src/package-json.ts
203
-
204
-
205
-
206
- async function generatePackageJson(context) {
207
- if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkCQDBLKPFjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
208
- _chunkCLKU7UMGjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
209
- const stopwatch = _chunkCLKU7UMGjs.getStopwatch.call(void 0, "Write package.json file");
210
- const packageJsonPath = _chunkCQDBLKPFjs.joinPaths.call(void 0,
211
- context.options.projectRoot,
212
- "project.json"
213
- );
214
- if (!_fs.existsSync.call(void 0, packageJsonPath)) {
215
- throw new Error("Cannot find package.json configuration");
216
- }
217
- const packageJsonFile = await _promises2.default.readFile(
218
- _chunkCQDBLKPFjs.joinPaths.call(void 0,
219
- context.workspaceConfig.workspaceRoot,
220
- context.options.projectRoot,
221
- "package.json"
222
- ),
223
- "utf8"
224
- );
225
- let packageJson = JSON.parse(packageJsonFile);
226
- if (!packageJson) {
227
- throw new Error("Cannot find package.json configuration file");
228
- }
229
- packageJson = await _chunkMI4DOBNHjs.addPackageDependencies.call(void 0,
230
- context.workspaceConfig.workspaceRoot,
231
- context.options.projectRoot,
232
- context.projectName,
233
- packageJson
234
- );
235
- packageJson = await _chunkMI4DOBNHjs.addWorkspacePackageJsonFields.call(void 0,
236
- context.workspaceConfig,
237
- context.options.projectRoot,
238
- context.sourceRoot,
239
- context.projectName,
240
- false,
241
- packageJson
242
- );
243
- if (context.options.entry) {
244
- packageJson.exports ??= {};
245
- packageJson.exports["./package.json"] ??= "./package.json";
246
- const entryPoints = Array.isArray(context.options.entry) ? context.options.entry : Object.keys(context.options.entry);
247
- if (entryPoints.length > 0) {
248
- const defaultEntry = entryPoints.includes("index") ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/${entryPoints[0]}`;
249
- const isEsm = Array.isArray(context.options.format) ? context.options.format.includes("esm") : context.options.format === "esm";
250
- const isCjs = Array.isArray(context.options.format) ? context.options.format.includes("cjs") : context.options.format === "cjs";
251
- const isDts = context.options.dts || context.options.experimentalDts;
252
- packageJson.exports["."] ??= `${defaultEntry}.${isEsm ? "mjs" : isCjs ? "cjs" : "js"}`;
253
- for (const entryPoint of entryPoints) {
254
- packageJson.exports[`./${entryPoint}`] ??= {};
255
- if (isEsm) {
256
- if (isDts) {
257
- packageJson.exports[`./${entryPoint}`].import = {
258
- types: `./dist/${entryPoint}.d.mts`,
259
- default: `./dist/${entryPoint}.mjs`
260
- };
261
- } else {
262
- packageJson.exports[`./${entryPoint}`].import = `./dist/${entryPoint}.mjs`;
263
- }
264
- if (isDts) {
265
- packageJson.exports[`./${entryPoint}`].default = {
266
- types: `./dist/${entryPoint}.d.mts`,
267
- default: `./dist/${entryPoint}.mjs`
268
- };
269
- } else {
270
- packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.mjs`;
271
- }
272
- }
273
- if (isCjs) {
274
- if (isDts) {
275
- packageJson.exports[`./${entryPoint}`].require = {
276
- types: `./dist/${entryPoint}.d.cts`,
277
- default: `./dist/${entryPoint}.cjs`
278
- };
279
- } else {
280
- packageJson.exports[`./${entryPoint}`].require = `./dist/${entryPoint}.cjs`;
281
- }
282
- if (!isEsm) {
283
- if (isDts) {
284
- packageJson.exports[`./${entryPoint}`].default = {
285
- types: `./dist/${entryPoint}.d.cts`,
286
- default: `./dist/${entryPoint}.cjs`
287
- };
288
- } else {
289
- packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.cjs`;
290
- }
291
- }
292
- }
293
- if (!isEsm && !isCjs) {
294
- if (isDts) {
295
- packageJson.exports[`./${entryPoint}`].default = {
296
- types: `./dist/${entryPoint}.d.ts`,
297
- default: `./dist/${entryPoint}.js`
298
- };
299
- } else {
300
- packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.js`;
301
- }
302
- }
303
- }
304
- if (isEsm) {
305
- packageJson.module = `${defaultEntry}.mjs`;
306
- } else {
307
- packageJson.main = `${defaultEntry}.cjs`;
308
- }
309
- if (isDts) {
310
- packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
311
- }
312
- packageJson.exports = Object.keys(packageJson.exports).reduce(
313
- (ret, key) => {
314
- if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
315
- ret[key.replace("/index", "")] = packageJson.exports[key];
316
- }
317
- return ret;
318
- },
319
- packageJson.exports
320
- );
321
- }
322
- }
323
- await _devkit.writeJsonFile.call(void 0,
324
- _chunkCQDBLKPFjs.joinPaths.call(void 0, context.outputPath, "package.json"),
325
- packageJson
326
- );
327
- stopwatch();
328
- }
329
- return context;
330
- }
331
-
332
- // ../tsup/src/index.ts
333
- var _tsup = require('tsup');
334
- async function build(options) {
335
- if (!options.silent) {
336
- _chunkCLKU7UMGjs.writeDebug.call(void 0,
337
- ` \u{1F680} Running ${options.name || "tsup"} build`,
338
- options.workspaceConfig
339
- );
340
- }
341
- const stopwatch = _chunkCLKU7UMGjs.getStopwatch.call(void 0, `${options.name || "tsup"} build`);
342
- await _tsup.build.call(void 0, options);
343
- if (!options.silent) {
344
- stopwatch();
345
- }
346
- }
347
-
348
- // ../esbuild/src/tsup.ts
349
- async function executeTsup(context) {
350
- _chunkCLKU7UMGjs.writeDebug.call(void 0,
351
- ` \u{1F680} Running ${context.options.name} build`,
352
- context.workspaceConfig
353
- );
354
- const stopwatch = _chunkCLKU7UMGjs.getStopwatch.call(void 0, `${context.options.name} build`);
355
- await build({
356
- ...context.options,
357
- outDir: context.options.distDir ? _chunkCQDBLKPFjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
358
- workspaceConfig: context.workspaceConfig
359
- });
360
- stopwatch();
361
- return context;
362
- }
363
-
364
- // ../esbuild/src/build.ts
365
- async function reportResults(context) {
366
- if (_optionalChain([context, 'access', _9 => _9.result, 'optionalAccess', _10 => _10.errors, 'access', _11 => _11.length]) === 0) {
367
- if (context.result.warnings.length > 0) {
368
- _chunkCLKU7UMGjs.writeWarning.call(void 0,
369
- ` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
370
- context.workspaceConfig
371
- );
372
- }
373
- _chunkCLKU7UMGjs.writeSuccess.call(void 0,
374
- ` \u{1F4E6} The ${context.options.name} build completed successfully`,
375
- context.workspaceConfig
376
- );
377
- } else if (_optionalChain([context, 'access', _12 => _12.result, 'optionalAccess', _13 => _13.errors]) && _optionalChain([context, 'access', _14 => _14.result, 'optionalAccess', _15 => _15.errors, 'access', _16 => _16.length]) > 0) {
378
- _chunkCLKU7UMGjs.writeError.call(void 0,
379
- ` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
380
- context.workspaceConfig
381
- );
382
- throw new Error(
383
- `The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
384
- );
385
- }
386
- }
387
- async function cleanOutputPath(context) {
388
- if (context.clean !== false && context.outputPath) {
389
- _chunkCLKU7UMGjs.writeDebug.call(void 0,
390
- ` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
391
- context.workspaceConfig
392
- );
393
- const stopwatch = _chunkCLKU7UMGjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
394
- await cleanDirectories(context.outputPath);
395
- stopwatch();
396
- }
397
- return context;
398
- }
399
- async function build2(options) {
400
- _chunkCLKU7UMGjs.writeDebug.call(void 0, ` ${_chunkCLKU7UMGjs.brandIcon.call(void 0, )} Executing Storm ESBuild pipeline`);
401
- const stopwatch = _chunkCLKU7UMGjs.getStopwatch.call(void 0, "ESBuild pipeline");
402
- try {
403
- const opts = Array.isArray(options) ? options : [options];
404
- if (opts.length === 0) {
405
- throw new Error("No build options were provided");
406
- }
407
- const context = await resolveContext(options);
408
- await cleanOutputPath(context);
409
- await Promise.all([
410
- // dependencyCheck(context.options),
411
- generatePackageJson(context),
412
- copyBuildAssets(context),
413
- executeTsup(context)
414
- ]);
415
- await reportResults(context);
416
- _chunkCLKU7UMGjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
417
- } catch (error) {
418
- _chunkCLKU7UMGjs.writeFatal.call(void 0,
419
- "Fatal errors that the build process could not recover from have occured. The build process has been terminated."
420
- );
421
- throw error;
422
- } finally {
423
- stopwatch();
424
- }
425
- }
426
-
427
- // src/executors/esbuild/executor.ts
428
- async function esbuildExecutorFn(options, context, config) {
429
- _chunkCLKU7UMGjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
430
- if (!_optionalChain([context, 'access', _17 => _17.projectsConfigurations, 'optionalAccess', _18 => _18.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _19 => _19.projectsConfigurations, 'access', _20 => _20.projects, 'access', _21 => _21[context.projectName], 'optionalAccess', _22 => _22.root])) {
431
- throw new Error(
432
- "The Build process failed because the context is not valid. Please run this command from a workspace."
433
- );
434
- }
435
- await build2({
436
- ...options,
437
- projectRoot: (
438
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
439
- _optionalChain([context, 'access', _23 => _23.projectsConfigurations, 'access', _24 => _24.projects, 'optionalAccess', _25 => _25[context.projectName], 'access', _26 => _26.root])
440
- ),
441
- name: context.projectName,
442
- sourceRoot: _optionalChain([context, 'access', _27 => _27.projectsConfigurations, 'access', _28 => _28.projects, 'optionalAccess', _29 => _29[context.projectName], 'optionalAccess', _30 => _30.sourceRoot]),
443
- format: options.format,
444
- platform: options.platform
445
- });
446
- return {
447
- success: true
448
- };
449
- }
450
- var executor_default = _chunk3QCVXOSBjs.withRunExecutor.call(void 0,
451
- "Storm ESBuild build",
452
- esbuildExecutorFn,
453
- {
454
- skipReadingConfig: false,
455
- hooks: {
456
- applyDefaultOptions: async (options) => {
457
- options.entry ??= ["src/index.ts"];
458
- options.outputPath ??= "dist/{projectRoot}";
459
- options.tsconfig ??= "{projectRoot}/tsconfig.json";
460
- return options;
461
- }
462
- }
463
- }
464
- );
465
-
466
-
467
-
468
-
469
- exports.esbuildExecutorFn = esbuildExecutorFn; exports.executor_default = executor_default;
@@ -1,77 +0,0 @@
1
- import { S as StormWorkspaceConfig } from './types-DI57BUsw.js';
2
- import { Options } from 'tsup';
3
- import './types-D2zxYEAh.js';
4
-
5
- // Generated by @storm-software/untyped
6
- // Do not edit this file directly
7
-
8
- interface BaseExecutorSchema {
9
- /**
10
- * Output Path
11
- *
12
- * The output path for the build
13
- *
14
- *
15
- * @format path
16
- */
17
- outputPath?: string,
18
- }
19
-
20
- // Generated by @storm-software/untyped
21
- // Do not edit this file directly
22
-
23
- interface BaseGeneratorSchema {
24
- /**
25
- * Directory
26
- *
27
- * The directory to create the library in
28
- *
29
- */
30
- directory?: string,
31
- }
32
-
33
- declare enum TypescriptProjectLinkingType {
34
- ALIAS = "alias",
35
- REFERENCE = "reference"
36
- }
37
- interface BaseTypescriptPluginOptions {
38
- /**
39
- * The project linking type to use for TypeScript projects.
40
- *
41
- * @see https://nx.dev/docs/concepts/typescript-project-linking
42
- * @see https://nx.dev/docs/technologies/typescript/guides/switch-to-workspaces-project-references
43
- *
44
- * @defaultValue "reference"
45
- */
46
- projectLinks?: TypescriptProjectLinkingType;
47
- }
48
- interface TsupContext {
49
- projectRoot: string;
50
- sourceRoot: string;
51
- projectName: string;
52
- main: string;
53
- }
54
- type BuildOptions = Options;
55
- type Entry = string | string[] | Record<string, string>;
56
- interface WorkspaceToolHooks<TSchema = any> {
57
- applyDefaultOptions?: (options: Partial<TSchema>, config?: StormWorkspaceConfig) => Promise<TSchema> | TSchema;
58
- preProcess?: (options: TSchema, config?: StormWorkspaceConfig) => Promise<void> | void;
59
- postProcess?: (config?: StormWorkspaceConfig) => Promise<void> | void;
60
- }
61
- interface BaseWorkspaceToolOptions<TSchema = any> {
62
- skipReadingConfig?: boolean;
63
- hooks?: WorkspaceToolHooks<TSchema>;
64
- }
65
- type BaseExecutorOptions<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = BaseWorkspaceToolOptions<TExecutorSchema>;
66
- interface BaseExecutorResult {
67
- error?: Error;
68
- success?: boolean;
69
- }
70
- type BaseGeneratorOptions<TGeneratorSchema extends BaseGeneratorSchema = BaseGeneratorSchema> = BaseWorkspaceToolOptions<TGeneratorSchema>;
71
- interface BaseGeneratorResult extends Record<string, any> {
72
- error?: Error;
73
- success?: boolean;
74
- data?: any;
75
- }
76
-
77
- export { type BaseExecutorOptions as B, type Entry as E, type TsupContext as T, type WorkspaceToolHooks as W, type BaseExecutorResult as a, type BaseGeneratorOptions as b, type BaseGeneratorResult as c, type BaseTypescriptPluginOptions as d, type BaseWorkspaceToolOptions as e, type BuildOptions as f, TypescriptProjectLinkingType as g, type BaseExecutorSchema as h, type BaseGeneratorSchema as i };
@@ -1,41 +0,0 @@
1
- type ProjectTagVariant = "language" | "type" | "dist-style" | "provider" | "platform" | "registry" | "plugin";
2
- declare const ProjectTagVariant: {
3
- LANGUAGE: ProjectTagVariant;
4
- TYPE: ProjectTagVariant;
5
- DIST_STYLE: ProjectTagVariant;
6
- PROVIDER: ProjectTagVariant;
7
- PLATFORM: ProjectTagVariant;
8
- REGISTRY: ProjectTagVariant;
9
- PLUGIN: ProjectTagVariant;
10
- };
11
- type ProjectTagLanguageValue = "typescript" | "rust";
12
- declare const ProjectTagLanguageValue: {
13
- TYPESCRIPT: ProjectTagLanguageValue;
14
- RUST: ProjectTagLanguageValue;
15
- };
16
- type ProjectTagTypeValue = "library" | "application";
17
- declare const ProjectTagTypeValue: {
18
- LIBRARY: ProjectTagTypeValue;
19
- APPLICATION: ProjectTagTypeValue;
20
- };
21
- type ProjectTagDistStyleValue = "normal" | "clean";
22
- declare const ProjectTagDistStyleValue: {
23
- NORMAL: ProjectTagDistStyleValue;
24
- CLEAN: ProjectTagDistStyleValue;
25
- };
26
- type ProjectTagPlatformValue = "node" | "browser" | "neutral" | "worker";
27
- declare const ProjectTagPlatformValue: {
28
- NODE: ProjectTagPlatformValue;
29
- BROWSER: ProjectTagPlatformValue;
30
- NEUTRAL: ProjectTagPlatformValue;
31
- WORKER: ProjectTagPlatformValue;
32
- };
33
- type ProjectTagRegistryValue = "cargo" | "npm" | "container" | "cyclone";
34
- declare const ProjectTagRegistryValue: {
35
- CARGO: ProjectTagRegistryValue;
36
- NPM: ProjectTagRegistryValue;
37
- CONTAINER: ProjectTagRegistryValue;
38
- CYCLONE: ProjectTagRegistryValue;
39
- };
40
-
41
- export { ProjectTagDistStyleValue as P, ProjectTagLanguageValue as a, ProjectTagPlatformValue as b, ProjectTagRegistryValue as c, ProjectTagTypeValue as d, ProjectTagVariant as e };
@@ -1,41 +0,0 @@
1
- type ProjectTagVariant = "language" | "type" | "dist-style" | "provider" | "platform" | "registry" | "plugin";
2
- declare const ProjectTagVariant: {
3
- LANGUAGE: ProjectTagVariant;
4
- TYPE: ProjectTagVariant;
5
- DIST_STYLE: ProjectTagVariant;
6
- PROVIDER: ProjectTagVariant;
7
- PLATFORM: ProjectTagVariant;
8
- REGISTRY: ProjectTagVariant;
9
- PLUGIN: ProjectTagVariant;
10
- };
11
- type ProjectTagLanguageValue = "typescript" | "rust";
12
- declare const ProjectTagLanguageValue: {
13
- TYPESCRIPT: ProjectTagLanguageValue;
14
- RUST: ProjectTagLanguageValue;
15
- };
16
- type ProjectTagTypeValue = "library" | "application";
17
- declare const ProjectTagTypeValue: {
18
- LIBRARY: ProjectTagTypeValue;
19
- APPLICATION: ProjectTagTypeValue;
20
- };
21
- type ProjectTagDistStyleValue = "normal" | "clean";
22
- declare const ProjectTagDistStyleValue: {
23
- NORMAL: ProjectTagDistStyleValue;
24
- CLEAN: ProjectTagDistStyleValue;
25
- };
26
- type ProjectTagPlatformValue = "node" | "browser" | "neutral" | "worker";
27
- declare const ProjectTagPlatformValue: {
28
- NODE: ProjectTagPlatformValue;
29
- BROWSER: ProjectTagPlatformValue;
30
- NEUTRAL: ProjectTagPlatformValue;
31
- WORKER: ProjectTagPlatformValue;
32
- };
33
- type ProjectTagRegistryValue = "cargo" | "npm" | "container" | "cyclone";
34
- declare const ProjectTagRegistryValue: {
35
- CARGO: ProjectTagRegistryValue;
36
- NPM: ProjectTagRegistryValue;
37
- CONTAINER: ProjectTagRegistryValue;
38
- CYCLONE: ProjectTagRegistryValue;
39
- };
40
-
41
- export { ProjectTagDistStyleValue as P, ProjectTagLanguageValue as a, ProjectTagPlatformValue as b, ProjectTagRegistryValue as c, ProjectTagTypeValue as d, ProjectTagVariant as e };