@storm-software/cloudflare-tools 0.55.86 → 0.55.88
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.
- package/CHANGELOG.md +21 -0
- package/README.md +1 -2
- package/dist/{chunk-PWYTCJYX.js → chunk-4WULYLQ3.js} +881 -650
- package/dist/{chunk-VTHBMY4B.js → chunk-6XDOBG77.js} +39 -28
- package/dist/{chunk-2XOEHMET.js → chunk-7JQIASJ7.js} +93 -58
- package/dist/{chunk-FQ33YTDR.mjs → chunk-ABAI6EPS.mjs} +806 -575
- package/dist/{chunk-BNJGOSXD.mjs → chunk-FABNT5TZ.mjs} +15 -13
- package/dist/{chunk-XCERLTLT.mjs → chunk-GPAI4NHQ.mjs} +141 -87
- package/dist/{chunk-IVLCYFXD.js → chunk-HBASMEU5.js} +168 -114
- package/dist/{chunk-6B5PUF7X.js → chunk-HIUZ6UL7.js} +97 -47
- package/dist/{chunk-R7AIVBS7.js → chunk-I4P7DVDN.js} +19 -24
- package/dist/{chunk-QOSOXTAS.mjs → chunk-ISGKIYF5.mjs} +92 -42
- package/dist/{chunk-GDWUA3BY.mjs → chunk-L4WFYC7K.mjs} +39 -28
- package/dist/{chunk-J5SB6L2L.js → chunk-MCKGQKYU.js} +2 -5
- package/dist/{chunk-UVPHL2U4.mjs → chunk-MV24QW26.mjs} +195 -127
- package/dist/{chunk-W7HOEYL6.mjs → chunk-NEMOTOHF.mjs} +93 -56
- package/dist/{chunk-V7LBWOVV.js → chunk-PZ5CI56F.js} +196 -128
- package/dist/{chunk-Z56LURRT.mjs → chunk-QPABB45G.mjs} +19 -24
- package/dist/{chunk-G2K6R4CT.mjs → chunk-QQ22YQSB.mjs} +3 -6
- package/dist/{chunk-QGRENI3O.js → chunk-RIUVF72K.js} +17 -15
- package/dist/{chunk-JFSRBSF6.mjs → chunk-SKMJXTAG.mjs} +27 -21
- package/dist/{chunk-XZ5IJXEB.js → chunk-ZBQZJEOG.js} +26 -20
- package/dist/executors.js +8 -8
- package/dist/executors.mjs +8 -8
- package/dist/generators.js +6 -6
- package/dist/generators.mjs +5 -5
- package/dist/index.js +41 -49
- package/dist/index.mjs +40 -48
- package/dist/src/executors/cloudflare-publish/executor.js +7 -7
- package/dist/src/executors/cloudflare-publish/executor.mjs +6 -6
- package/dist/src/executors/r2-upload-publish/executor.js +7 -7
- package/dist/src/executors/r2-upload-publish/executor.mjs +6 -6
- package/dist/src/executors/serve/executor.js +49 -50
- package/dist/src/executors/serve/executor.mjs +48 -49
- package/dist/src/generators/init/generator.js +3 -3
- package/dist/src/generators/init/generator.mjs +2 -2
- package/dist/src/generators/worker/generator.js +6 -6
- package/dist/src/generators/worker/generator.mjs +5 -5
- package/dist/src/utils/index.js +4 -4
- package/dist/src/utils/index.mjs +3 -3
- package/dist/src/utils/r2-bucket-helpers.js +4 -4
- package/dist/src/utils/r2-bucket-helpers.mjs +3 -3
- package/dist/tsup.config.js +3 -8
- package/dist/tsup.config.mjs +3 -8
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
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
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk6XDOBG77js = require('./chunk-6XDOBG77.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkHBASMEU5js = require('./chunk-HBASMEU5.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -19,14 +19,13 @@ var _chunkIVLCYFXDjs = require('./chunk-IVLCYFXD.js');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkPZ5CI56Fjs = require('./chunk-PZ5CI56F.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
|
|
25
|
+
var _chunkMCKGQKYUjs = require('./chunk-MCKGQKYU.js');
|
|
27
26
|
|
|
28
27
|
// ../config-tools/src/utilities/apply-workspace-tokens.ts
|
|
29
|
-
var applyWorkspaceBaseTokens =
|
|
28
|
+
var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
30
29
|
let result = option;
|
|
31
30
|
if (!result) {
|
|
32
31
|
return result;
|
|
@@ -36,7 +35,10 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void
|
|
|
36
35
|
if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
|
|
37
36
|
for (const optionKey of optionKeys) {
|
|
38
37
|
if (result.includes(`{${optionKey}}`)) {
|
|
39
|
-
result = result.replaceAll(
|
|
38
|
+
result = result.replaceAll(
|
|
39
|
+
`{${optionKey}}`,
|
|
40
|
+
_optionalChain([tokenParams, 'optionalAccess', _2 => _2[optionKey]]) || ""
|
|
41
|
+
);
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
}
|
|
@@ -46,85 +48,118 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void
|
|
|
46
48
|
if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
|
|
47
49
|
for (const configKey of configKeys) {
|
|
48
50
|
if (result.includes(`{${configKey}}`)) {
|
|
49
|
-
result = result.replaceAll(
|
|
51
|
+
result = result.replaceAll(
|
|
52
|
+
`{${configKey}}`,
|
|
53
|
+
tokenParams.config[configKey] || ""
|
|
54
|
+
);
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
57
|
}
|
|
53
58
|
}
|
|
54
59
|
if (result.includes("{workspaceRoot}")) {
|
|
55
|
-
result = result.replaceAll(
|
|
60
|
+
result = result.replaceAll(
|
|
61
|
+
"{workspaceRoot}",
|
|
62
|
+
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => ( _chunkPZ5CI56Fjs.findWorkspaceRoot.call(void 0, )))
|
|
63
|
+
);
|
|
56
64
|
}
|
|
57
65
|
return result;
|
|
58
|
-
}
|
|
59
|
-
var applyWorkspaceProjectTokens =
|
|
66
|
+
};
|
|
67
|
+
var applyWorkspaceProjectTokens = (option, tokenParams) => {
|
|
60
68
|
return applyWorkspaceBaseTokens(option, tokenParams);
|
|
61
|
-
}
|
|
62
|
-
var applyWorkspaceTokens =
|
|
69
|
+
};
|
|
70
|
+
var applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
|
|
63
71
|
if (!options) {
|
|
64
72
|
return {};
|
|
65
73
|
}
|
|
66
74
|
const result = {};
|
|
67
75
|
for (const option of Object.keys(options)) {
|
|
68
76
|
if (typeof options[option] === "string") {
|
|
69
|
-
result[option] = await Promise.resolve(
|
|
77
|
+
result[option] = await Promise.resolve(
|
|
78
|
+
tokenizerFn(options[option], tokenParams)
|
|
79
|
+
);
|
|
70
80
|
} else if (Array.isArray(options[option])) {
|
|
71
|
-
result[option] = await Promise.all(
|
|
81
|
+
result[option] = await Promise.all(
|
|
82
|
+
options[option].map(
|
|
83
|
+
async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item
|
|
84
|
+
)
|
|
85
|
+
);
|
|
72
86
|
} else if (typeof options[option] === "object") {
|
|
73
|
-
result[option] = await applyWorkspaceTokens(
|
|
87
|
+
result[option] = await applyWorkspaceTokens(
|
|
88
|
+
options[option],
|
|
89
|
+
tokenParams,
|
|
90
|
+
tokenizerFn
|
|
91
|
+
);
|
|
74
92
|
} else {
|
|
75
93
|
result[option] = options[option];
|
|
76
94
|
}
|
|
77
95
|
}
|
|
78
96
|
return result;
|
|
79
|
-
}
|
|
97
|
+
};
|
|
80
98
|
|
|
81
99
|
// ../workspace-tools/src/base/base-executor.ts
|
|
82
100
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
83
|
-
var withRunExecutor =
|
|
84
|
-
const stopwatch =
|
|
101
|
+
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
102
|
+
const stopwatch = _chunkPZ5CI56Fjs.getStopwatch.call(void 0, name);
|
|
85
103
|
let options = _options;
|
|
86
104
|
let config = {};
|
|
87
105
|
try {
|
|
88
106
|
if (!_optionalChain([context, 'access', _5 => _5.projectsConfigurations, 'optionalAccess', _6 => _6.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
89
|
-
throw new Error(
|
|
107
|
+
throw new Error(
|
|
108
|
+
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
109
|
+
);
|
|
90
110
|
}
|
|
91
|
-
const workspaceRoot3 =
|
|
111
|
+
const workspaceRoot3 = _chunkPZ5CI56Fjs.findWorkspaceRoot.call(void 0, );
|
|
92
112
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot3;
|
|
93
113
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot3;
|
|
94
114
|
const projectName = context.projectName;
|
|
95
115
|
config.workspaceRoot = workspaceRoot3;
|
|
96
|
-
|
|
116
|
+
_chunkPZ5CI56Fjs.writeInfo.call(void 0, `\u26A1 Running the ${name} executor for ${projectName} `, config);
|
|
97
117
|
if (!executorOptions.skipReadingConfig) {
|
|
98
|
-
|
|
118
|
+
_chunkPZ5CI56Fjs.writeTrace.call(void 0,
|
|
119
|
+
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
99
120
|
- workspaceRoot: ${workspaceRoot3}
|
|
100
121
|
- projectRoot: ${projectRoot}
|
|
101
122
|
- sourceRoot: ${sourceRoot}
|
|
102
123
|
- projectName: ${projectName}
|
|
103
|
-
`,
|
|
104
|
-
|
|
124
|
+
`,
|
|
125
|
+
config
|
|
126
|
+
);
|
|
127
|
+
config = await _chunkHBASMEU5js.getConfig.call(void 0, workspaceRoot3);
|
|
105
128
|
}
|
|
106
129
|
if (_optionalChain([executorOptions, 'optionalAccess', _7 => _7.hooks, 'optionalAccess', _8 => _8.applyDefaultOptions])) {
|
|
107
|
-
|
|
108
|
-
options = await Promise.resolve(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
sourceRoot,
|
|
118
|
-
projectName,
|
|
130
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
131
|
+
options = await Promise.resolve(
|
|
132
|
+
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
133
|
+
);
|
|
134
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
135
|
+
}
|
|
136
|
+
_chunkPZ5CI56Fjs.writeTrace.call(void 0,
|
|
137
|
+
`Executor schema options \u2699\uFE0F
|
|
138
|
+
${_chunkPZ5CI56Fjs.formatLogMessage.call(void 0, options)}
|
|
139
|
+
`,
|
|
119
140
|
config
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
141
|
+
);
|
|
142
|
+
const tokenized = await applyWorkspaceTokens(
|
|
143
|
+
options,
|
|
144
|
+
_defu.defu.call(void 0,
|
|
145
|
+
{ workspaceRoot: workspaceRoot3, projectRoot, sourceRoot, projectName, config },
|
|
146
|
+
config,
|
|
147
|
+
context.projectsConfigurations.projects[context.projectName]
|
|
148
|
+
),
|
|
149
|
+
applyWorkspaceProjectTokens
|
|
150
|
+
);
|
|
151
|
+
_chunkPZ5CI56Fjs.writeTrace.call(void 0,
|
|
152
|
+
`Executor schema tokenized options \u2699\uFE0F
|
|
153
|
+
${_chunkPZ5CI56Fjs.formatLogMessage.call(void 0, tokenized)}
|
|
154
|
+
`,
|
|
155
|
+
config
|
|
156
|
+
);
|
|
124
157
|
if (_optionalChain([executorOptions, 'optionalAccess', _9 => _9.hooks, 'optionalAccess', _10 => _10.preProcess])) {
|
|
125
|
-
|
|
126
|
-
await Promise.resolve(
|
|
127
|
-
|
|
158
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
159
|
+
await Promise.resolve(
|
|
160
|
+
executorOptions.hooks.preProcess(tokenized, config)
|
|
161
|
+
);
|
|
162
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
128
163
|
}
|
|
129
164
|
const ret = executorFn(tokenized, context, config);
|
|
130
165
|
if (_isFunction(_optionalChain([ret, 'optionalAccess', _11 => _11.next]))) {
|
|
@@ -133,49 +168,63 @@ ${_chunkV7LBWOVVjs.formatLogMessage.call(void 0, tokenized)}
|
|
|
133
168
|
void iter;
|
|
134
169
|
}
|
|
135
170
|
}
|
|
136
|
-
const result = await Promise.resolve(
|
|
171
|
+
const result = await Promise.resolve(
|
|
172
|
+
ret
|
|
173
|
+
);
|
|
137
174
|
if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _12 => _12.error, 'optionalAccess', _13 => _13.message]) && typeof _optionalChain([result, 'optionalAccess', _14 => _14.error, 'optionalAccess', _15 => _15.message]) === "string" && _optionalChain([result, 'optionalAccess', _16 => _16.error, 'optionalAccess', _17 => _17.name]) && typeof _optionalChain([result, 'optionalAccess', _18 => _18.error, 'optionalAccess', _19 => _19.name]) === "string")) {
|
|
138
|
-
|
|
139
|
-
${
|
|
175
|
+
_chunkPZ5CI56Fjs.writeTrace.call(void 0,
|
|
176
|
+
`Failure determined by the ${name} executor
|
|
177
|
+
${_chunkPZ5CI56Fjs.formatLogMessage.call(void 0, result)}`,
|
|
178
|
+
config
|
|
179
|
+
);
|
|
140
180
|
console.error(result);
|
|
141
181
|
throw new Error(`The ${name} executor failed to run`, {
|
|
142
182
|
cause: _optionalChain([result, 'optionalAccess', _20 => _20.error])
|
|
143
183
|
});
|
|
144
184
|
}
|
|
145
185
|
if (_optionalChain([executorOptions, 'optionalAccess', _21 => _21.hooks, 'optionalAccess', _22 => _22.postProcess])) {
|
|
146
|
-
|
|
186
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
147
187
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
148
|
-
|
|
188
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
149
189
|
}
|
|
150
|
-
|
|
190
|
+
_chunkPZ5CI56Fjs.writeSuccess.call(void 0, `Completed running the ${name} task executor!
|
|
151
191
|
`, config);
|
|
152
192
|
return {
|
|
153
193
|
success: true
|
|
154
194
|
};
|
|
155
195
|
} catch (error) {
|
|
156
|
-
|
|
157
|
-
|
|
196
|
+
_chunkPZ5CI56Fjs.writeFatal.call(void 0,
|
|
197
|
+
"A fatal error occurred while running the executor - the process was forced to terminate",
|
|
198
|
+
config
|
|
199
|
+
);
|
|
200
|
+
_chunkPZ5CI56Fjs.writeError.call(void 0,
|
|
201
|
+
`An exception was thrown in the executor's process
|
|
158
202
|
- Details: ${error.message}
|
|
159
|
-
- Stacktrace: ${error.stack}`,
|
|
203
|
+
- Stacktrace: ${error.stack}`,
|
|
204
|
+
config
|
|
205
|
+
);
|
|
160
206
|
return {
|
|
161
207
|
success: false
|
|
162
208
|
};
|
|
163
209
|
} finally {
|
|
164
210
|
stopwatch();
|
|
165
211
|
}
|
|
166
|
-
}
|
|
167
|
-
var _isFunction =
|
|
212
|
+
};
|
|
213
|
+
var _isFunction = (value) => {
|
|
168
214
|
try {
|
|
169
215
|
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _23 => _23.constructor]) && _optionalChain([value, 'optionalAccess', _24 => _24.call]) && _optionalChain([value, 'optionalAccess', _25 => _25.apply]));
|
|
170
216
|
} catch (e) {
|
|
171
217
|
return false;
|
|
172
218
|
}
|
|
173
|
-
}
|
|
219
|
+
};
|
|
174
220
|
|
|
175
221
|
// ../workspace-tools/src/utils/cargo.ts
|
|
176
222
|
var _devkit = require('@nx/devkit');
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
177
226
|
var _child_process = require('child_process');
|
|
178
|
-
var _path = require('path'); var
|
|
227
|
+
var _path = require('path'); var path3 = _interopRequireWildcard(_path);
|
|
179
228
|
var INVALID_CARGO_ARGS = [
|
|
180
229
|
"allFeatures",
|
|
181
230
|
"allTargets",
|
|
@@ -184,7 +233,7 @@ var INVALID_CARGO_ARGS = [
|
|
|
184
233
|
"package",
|
|
185
234
|
"tsConfig"
|
|
186
235
|
];
|
|
187
|
-
var buildCargoCommand =
|
|
236
|
+
var buildCargoCommand = (baseCommand, options, context) => {
|
|
188
237
|
const args = [];
|
|
189
238
|
if (options.toolchain && options.toolchain !== "stable") {
|
|
190
239
|
args.push(`+${options.toolchain}`);
|
|
@@ -222,13 +271,12 @@ var buildCargoCommand = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (ba
|
|
|
222
271
|
args.push("--target-dir", options.outputPath);
|
|
223
272
|
}
|
|
224
273
|
return args;
|
|
225
|
-
}
|
|
274
|
+
};
|
|
226
275
|
async function cargoCommand(...args) {
|
|
227
276
|
console.log(`> cargo ${args.join(" ")}`);
|
|
228
277
|
args.push("--color", "always");
|
|
229
278
|
return await Promise.resolve(runProcess("cargo", ...args));
|
|
230
279
|
}
|
|
231
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, cargoCommand, "cargoCommand");
|
|
232
280
|
function cargoCommandSync(args = "", options) {
|
|
233
281
|
const normalizedOptions = {
|
|
234
282
|
stdio: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _26 => _26.stdio]), () => ( "inherit")),
|
|
@@ -255,7 +303,6 @@ function cargoCommandSync(args = "", options) {
|
|
|
255
303
|
};
|
|
256
304
|
}
|
|
257
305
|
}
|
|
258
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, cargoCommandSync, "cargoCommandSync");
|
|
259
306
|
function cargoMetadata() {
|
|
260
307
|
const output3 = cargoCommandSync("metadata --format-version=1", {
|
|
261
308
|
stdio: "pipe"
|
|
@@ -266,15 +313,12 @@ function cargoMetadata() {
|
|
|
266
313
|
}
|
|
267
314
|
return JSON.parse(output3.output);
|
|
268
315
|
}
|
|
269
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, cargoMetadata, "cargoMetadata");
|
|
270
316
|
function runProcess(processCmd, ...args) {
|
|
271
317
|
const metadata = cargoMetadata();
|
|
272
318
|
const targetDir = _nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _28 => _28.target_directory]), () => ( _devkit.joinPathFragments.call(void 0, _devkit.workspaceRoot, "dist", "cargo")));
|
|
273
319
|
return new Promise((resolve) => {
|
|
274
320
|
if (process.env.VERCEL) {
|
|
275
|
-
return resolve({
|
|
276
|
-
success: true
|
|
277
|
-
});
|
|
321
|
+
return resolve({ success: true });
|
|
278
322
|
}
|
|
279
323
|
_child_process.execSync.call(void 0, `${processCmd} ${args.join(" ")}`, {
|
|
280
324
|
cwd: process.cwd(),
|
|
@@ -285,113 +329,119 @@ function runProcess(processCmd, ...args) {
|
|
|
285
329
|
CARGO_BUILD_TARGET_DIR: targetDir
|
|
286
330
|
},
|
|
287
331
|
windowsHide: true,
|
|
288
|
-
stdio: [
|
|
289
|
-
"inherit",
|
|
290
|
-
"inherit",
|
|
291
|
-
"inherit"
|
|
292
|
-
]
|
|
293
|
-
});
|
|
294
|
-
resolve({
|
|
295
|
-
success: true
|
|
332
|
+
stdio: ["inherit", "inherit", "inherit"]
|
|
296
333
|
});
|
|
334
|
+
resolve({ success: true });
|
|
297
335
|
});
|
|
298
336
|
}
|
|
299
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, runProcess, "runProcess");
|
|
300
337
|
|
|
301
338
|
// ../workspace-tools/src/executors/cargo-build/executor.ts
|
|
302
339
|
async function cargoBuildExecutor(options, context) {
|
|
303
340
|
const command = buildCargoCommand("build", options, context);
|
|
304
341
|
return await cargoCommand(...command);
|
|
305
342
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
options
|
|
313
|
-
|
|
314
|
-
|
|
343
|
+
var executor_default = withRunExecutor(
|
|
344
|
+
"Cargo Build",
|
|
345
|
+
cargoBuildExecutor,
|
|
346
|
+
{
|
|
347
|
+
skipReadingConfig: false,
|
|
348
|
+
hooks: {
|
|
349
|
+
applyDefaultOptions: (options) => {
|
|
350
|
+
options.outputPath ??= "dist/target/{projectRoot}";
|
|
351
|
+
options.toolchain ??= "stable";
|
|
352
|
+
return options;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
315
355
|
}
|
|
316
|
-
|
|
356
|
+
);
|
|
317
357
|
|
|
318
358
|
// ../workspace-tools/src/executors/cargo-check/executor.ts
|
|
319
359
|
async function cargoCheckExecutor(options, context) {
|
|
320
360
|
const command = buildCargoCommand("check", options, context);
|
|
321
361
|
return await cargoCommand(...command);
|
|
322
362
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
363
|
+
var executor_default2 = withRunExecutor(
|
|
364
|
+
"Cargo Check",
|
|
365
|
+
cargoCheckExecutor,
|
|
366
|
+
{
|
|
367
|
+
skipReadingConfig: false,
|
|
368
|
+
hooks: {
|
|
369
|
+
applyDefaultOptions: (options) => {
|
|
370
|
+
options.toolchain ??= "stable";
|
|
371
|
+
return options;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
331
374
|
}
|
|
332
|
-
|
|
375
|
+
);
|
|
333
376
|
|
|
334
377
|
// ../workspace-tools/src/executors/cargo-clippy/executor.ts
|
|
335
378
|
async function cargoClippyExecutor(options, context) {
|
|
336
379
|
const command = buildCargoCommand("clippy", options, context);
|
|
337
380
|
return await cargoCommand(...command);
|
|
338
381
|
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
options
|
|
346
|
-
|
|
347
|
-
|
|
382
|
+
var executor_default3 = withRunExecutor(
|
|
383
|
+
"Cargo Clippy",
|
|
384
|
+
cargoClippyExecutor,
|
|
385
|
+
{
|
|
386
|
+
skipReadingConfig: false,
|
|
387
|
+
hooks: {
|
|
388
|
+
applyDefaultOptions: (options) => {
|
|
389
|
+
options.toolchain ??= "stable";
|
|
390
|
+
options.fix ??= false;
|
|
391
|
+
return options;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
348
394
|
}
|
|
349
|
-
|
|
395
|
+
);
|
|
350
396
|
|
|
351
397
|
// ../workspace-tools/src/executors/cargo-doc/executor.ts
|
|
352
398
|
async function cargoDocExecutor(options, context) {
|
|
353
|
-
const opts = {
|
|
354
|
-
...options
|
|
355
|
-
};
|
|
399
|
+
const opts = { ...options };
|
|
356
400
|
opts["no-deps"] = opts.noDeps;
|
|
357
401
|
delete opts.noDeps;
|
|
358
402
|
const command = buildCargoCommand("doc", options, context);
|
|
359
403
|
return await cargoCommand(...command);
|
|
360
404
|
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
options
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
405
|
+
var executor_default4 = withRunExecutor(
|
|
406
|
+
"Cargo Doc",
|
|
407
|
+
cargoDocExecutor,
|
|
408
|
+
{
|
|
409
|
+
skipReadingConfig: false,
|
|
410
|
+
hooks: {
|
|
411
|
+
applyDefaultOptions: (options) => {
|
|
412
|
+
options.outputPath ??= "dist/docs/{projectRoot}";
|
|
413
|
+
options.toolchain ??= "stable";
|
|
414
|
+
options.release ??= options.profile ? false : true;
|
|
415
|
+
options.allFeatures ??= true;
|
|
416
|
+
options.lib ??= true;
|
|
417
|
+
options.bins ??= true;
|
|
418
|
+
options.examples ??= true;
|
|
419
|
+
options.noDeps ??= false;
|
|
420
|
+
return options;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
376
423
|
}
|
|
377
|
-
|
|
424
|
+
);
|
|
378
425
|
|
|
379
426
|
// ../workspace-tools/src/executors/cargo-format/executor.ts
|
|
380
427
|
async function cargoFormatExecutor(options, context) {
|
|
381
428
|
const command = buildCargoCommand("fmt", options, context);
|
|
382
429
|
return await cargoCommand(...command);
|
|
383
430
|
}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
options
|
|
391
|
-
|
|
392
|
-
|
|
431
|
+
var executor_default5 = withRunExecutor(
|
|
432
|
+
"Cargo Format",
|
|
433
|
+
cargoFormatExecutor,
|
|
434
|
+
{
|
|
435
|
+
skipReadingConfig: false,
|
|
436
|
+
hooks: {
|
|
437
|
+
applyDefaultOptions: (options) => {
|
|
438
|
+
options.outputPath ??= "dist/target/{projectRoot}";
|
|
439
|
+
options.toolchain ??= "stable";
|
|
440
|
+
return options;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
393
443
|
}
|
|
394
|
-
|
|
444
|
+
);
|
|
395
445
|
|
|
396
446
|
// ../workspace-tools/src/executors/cargo-publish/executor.ts
|
|
397
447
|
|
|
@@ -431,7 +481,7 @@ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_reso
|
|
|
431
481
|
var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
|
|
432
482
|
var _glob = require('glob');
|
|
433
483
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
434
|
-
var copyAssets =
|
|
484
|
+
var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
|
|
435
485
|
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
436
486
|
pendingAssets.push({
|
|
437
487
|
input: projectRoot,
|
|
@@ -457,8 +507,11 @@ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (con
|
|
|
457
507
|
output: "src/"
|
|
458
508
|
});
|
|
459
509
|
}
|
|
460
|
-
|
|
461
|
-
|
|
510
|
+
_chunkPZ5CI56Fjs.writeTrace.call(void 0,
|
|
511
|
+
`\u{1F4DD} Copying the following assets to the output directory:
|
|
512
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkPZ5CI56Fjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
513
|
+
config
|
|
514
|
+
);
|
|
462
515
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
463
516
|
projectDir: projectRoot,
|
|
464
517
|
rootDir: config.workspaceRoot,
|
|
@@ -467,28 +520,45 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
467
520
|
});
|
|
468
521
|
await assetHandler.processAllAssetsOnce();
|
|
469
522
|
if (includeSrc === true) {
|
|
470
|
-
|
|
523
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0,
|
|
524
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
525
|
+
outputPath,
|
|
526
|
+
"src"
|
|
527
|
+
)}`,
|
|
528
|
+
config
|
|
529
|
+
);
|
|
471
530
|
const files = await _glob.glob.call(void 0, [
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
531
|
+
_chunkPZ5CI56Fjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
532
|
+
_chunkPZ5CI56Fjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
533
|
+
_chunkPZ5CI56Fjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
534
|
+
_chunkPZ5CI56Fjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
476
535
|
]);
|
|
477
|
-
await Promise.allSettled(
|
|
536
|
+
await Promise.allSettled(
|
|
537
|
+
files.map(
|
|
538
|
+
async (file) => _promises.writeFile.call(void 0,
|
|
539
|
+
file,
|
|
540
|
+
`${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
478
541
|
|
|
479
542
|
${await _promises.readFile.call(void 0, file, "utf8")}
|
|
480
543
|
|
|
481
|
-
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
|
|
544
|
+
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
|
|
545
|
+
)
|
|
546
|
+
)
|
|
547
|
+
);
|
|
482
548
|
}
|
|
483
|
-
}
|
|
549
|
+
};
|
|
484
550
|
|
|
485
551
|
// ../build-tools/src/utilities/generate-package-json.ts
|
|
486
552
|
var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
|
|
487
553
|
|
|
488
554
|
|
|
489
555
|
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
490
560
|
var _projectgraph = require('nx/src/project-graph/project-graph');
|
|
491
|
-
var addPackageDependencies =
|
|
561
|
+
var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, packageJson) => {
|
|
492
562
|
let projectGraph;
|
|
493
563
|
try {
|
|
494
564
|
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
@@ -497,16 +567,35 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
497
567
|
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
498
568
|
}
|
|
499
569
|
if (!projectGraph) {
|
|
500
|
-
throw new Error(
|
|
570
|
+
throw new Error(
|
|
571
|
+
"The Build process failed because the project graph is not available. Please run the build command again."
|
|
572
|
+
);
|
|
501
573
|
}
|
|
502
|
-
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0,
|
|
574
|
+
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0,
|
|
575
|
+
void 0,
|
|
576
|
+
projectGraph,
|
|
577
|
+
workspaceRoot3,
|
|
578
|
+
projectName,
|
|
579
|
+
process.env.NX_TASK_TARGET_TARGET || "build",
|
|
580
|
+
process.env.NX_TASK_TARGET_CONFIGURATION || "production",
|
|
581
|
+
true
|
|
582
|
+
);
|
|
503
583
|
const localPackages = [];
|
|
504
|
-
for (const project of projectDependencies.dependencies.filter(
|
|
584
|
+
for (const project of projectDependencies.dependencies.filter(
|
|
585
|
+
(dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _29 => _29.node, 'access', _30 => _30.data, 'optionalAccess', _31 => _31.root]) !== projectRoot && _optionalChain([dep, 'access', _32 => _32.node, 'access', _33 => _33.data, 'optionalAccess', _34 => _34.root]) !== workspaceRoot3
|
|
586
|
+
)) {
|
|
505
587
|
const projectNode = project.node;
|
|
506
588
|
if (projectNode.data.root) {
|
|
507
|
-
const projectPackageJsonPath =
|
|
589
|
+
const projectPackageJsonPath = _chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
590
|
+
workspaceRoot3,
|
|
591
|
+
projectNode.data.root,
|
|
592
|
+
"package.json"
|
|
593
|
+
);
|
|
508
594
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
509
|
-
const projectPackageJsonContent = await _promises.readFile.call(void 0,
|
|
595
|
+
const projectPackageJsonContent = await _promises.readFile.call(void 0,
|
|
596
|
+
projectPackageJsonPath,
|
|
597
|
+
"utf8"
|
|
598
|
+
);
|
|
510
599
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
511
600
|
if (projectPackageJson.private !== true) {
|
|
512
601
|
localPackages.push(projectPackageJson);
|
|
@@ -515,19 +604,33 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
515
604
|
}
|
|
516
605
|
}
|
|
517
606
|
if (localPackages.length > 0) {
|
|
518
|
-
|
|
519
|
-
|
|
607
|
+
_chunkPZ5CI56Fjs.writeTrace.call(void 0,
|
|
608
|
+
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
609
|
+
);
|
|
610
|
+
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
611
|
+
_chunkPZ5CI56Fjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
612
|
+
"utf8"
|
|
613
|
+
);
|
|
520
614
|
const projectJson = JSON.parse(projectJsonFile);
|
|
521
615
|
const projectName2 = projectJson.name;
|
|
522
616
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
523
617
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _35 => _35.projects, 'optionalAccess', _36 => _36[projectName2]])) {
|
|
524
|
-
throw new Error(
|
|
618
|
+
throw new Error(
|
|
619
|
+
"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."
|
|
620
|
+
);
|
|
525
621
|
}
|
|
526
622
|
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _37 => _37.projects, 'optionalAccess', _38 => _38[projectName2], 'access', _39 => _39.implicitDependencies, 'optionalAccess', _40 => _40.reduce, 'call', _41 => _41((ret, dep) => {
|
|
527
623
|
if (_optionalChain([projectConfigurations, 'access', _42 => _42.projects, 'optionalAccess', _43 => _43[dep]])) {
|
|
528
|
-
const depPackageJsonPath =
|
|
624
|
+
const depPackageJsonPath = _chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
625
|
+
workspaceRoot3,
|
|
626
|
+
projectConfigurations.projects[dep].root,
|
|
627
|
+
"package.json"
|
|
628
|
+
);
|
|
529
629
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
530
|
-
const depPackageJsonContent = _fs.readFileSync.call(void 0,
|
|
630
|
+
const depPackageJsonContent = _fs.readFileSync.call(void 0,
|
|
631
|
+
depPackageJsonPath,
|
|
632
|
+
"utf8"
|
|
633
|
+
);
|
|
531
634
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
532
635
|
if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
|
|
533
636
|
ret.push(depPackageJson.name);
|
|
@@ -549,13 +652,16 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
549
652
|
return ret;
|
|
550
653
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
551
654
|
} else {
|
|
552
|
-
|
|
655
|
+
_chunkPZ5CI56Fjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
553
656
|
}
|
|
554
657
|
return packageJson;
|
|
555
|
-
}
|
|
556
|
-
var addWorkspacePackageJsonFields =
|
|
557
|
-
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
558
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
658
|
+
};
|
|
659
|
+
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
660
|
+
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkPZ5CI56Fjs.findWorkspaceRoot.call(void 0, );
|
|
661
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
662
|
+
_chunkPZ5CI56Fjs.joinPaths.call(void 0, workspaceRoot3, "package.json"),
|
|
663
|
+
"utf8"
|
|
664
|
+
);
|
|
559
665
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
560
666
|
packageJson.type ??= "module";
|
|
561
667
|
packageJson.sideEffects ??= false;
|
|
@@ -564,11 +670,9 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call
|
|
|
564
670
|
if (distSrc.startsWith("/")) {
|
|
565
671
|
distSrc = distSrc.substring(1);
|
|
566
672
|
}
|
|
567
|
-
packageJson.source ??= `${
|
|
673
|
+
packageJson.source ??= `${_chunkPZ5CI56Fjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
568
674
|
}
|
|
569
|
-
packageJson.files ??= [
|
|
570
|
-
"dist/**/*"
|
|
571
|
-
];
|
|
675
|
+
packageJson.files ??= ["dist/**/*"];
|
|
572
676
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
573
677
|
packageJson.files.push("src/**/*");
|
|
574
678
|
}
|
|
@@ -584,26 +688,22 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call
|
|
|
584
688
|
packageJson.author ??= workspacePackageJson.author;
|
|
585
689
|
packageJson.maintainers ??= workspacePackageJson.maintainers;
|
|
586
690
|
if (!packageJson.maintainers && packageJson.author) {
|
|
587
|
-
packageJson.maintainers = [
|
|
588
|
-
packageJson.author
|
|
589
|
-
];
|
|
691
|
+
packageJson.maintainers = [packageJson.author];
|
|
590
692
|
}
|
|
591
693
|
packageJson.contributors ??= workspacePackageJson.contributors;
|
|
592
694
|
if (!packageJson.contributors && packageJson.author) {
|
|
593
|
-
packageJson.contributors = [
|
|
594
|
-
packageJson.author
|
|
595
|
-
];
|
|
695
|
+
packageJson.contributors = [packageJson.author];
|
|
596
696
|
}
|
|
597
697
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
598
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
698
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkPZ5CI56Fjs.joinPaths.call(void 0, "packages", projectName);
|
|
599
699
|
return packageJson;
|
|
600
|
-
}
|
|
700
|
+
};
|
|
601
701
|
|
|
602
702
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
603
703
|
|
|
604
704
|
|
|
605
705
|
// ../build-tools/src/utilities/get-env.ts
|
|
606
|
-
var getEnv =
|
|
706
|
+
var getEnv = (builder, options) => {
|
|
607
707
|
return {
|
|
608
708
|
STORM_BUILD: builder,
|
|
609
709
|
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
@@ -614,42 +714,54 @@ var getEnv = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (builder, opti
|
|
|
614
714
|
STORM_TARGET: JSON.stringify(options.target),
|
|
615
715
|
...options.env
|
|
616
716
|
};
|
|
617
|
-
}
|
|
717
|
+
};
|
|
618
718
|
|
|
619
719
|
// ../build-tools/src/utilities/read-nx-config.ts
|
|
620
720
|
|
|
621
721
|
|
|
622
722
|
|
|
623
723
|
// ../build-tools/src/utilities/task-graph.ts
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
|
|
624
727
|
var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
625
728
|
|
|
626
729
|
// ../esbuild/src/assets.ts
|
|
627
730
|
async function copyBuildAssets(context) {
|
|
628
731
|
if (_optionalChain([context, 'access', _52 => _52.result, 'optionalAccess', _53 => _53.errors, 'access', _54 => _54.length]) === 0) {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
732
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0,
|
|
733
|
+
` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`,
|
|
734
|
+
context.workspaceConfig
|
|
735
|
+
);
|
|
736
|
+
const stopwatch = _chunkPZ5CI56Fjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
737
|
+
await copyAssets(
|
|
738
|
+
context.workspaceConfig,
|
|
739
|
+
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
740
|
+
context.outputPath,
|
|
741
|
+
context.options.projectRoot,
|
|
742
|
+
context.sourceRoot,
|
|
743
|
+
true,
|
|
744
|
+
false
|
|
745
|
+
);
|
|
632
746
|
stopwatch();
|
|
633
747
|
}
|
|
634
748
|
return context;
|
|
635
749
|
}
|
|
636
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
637
750
|
|
|
638
751
|
// ../esbuild/src/clean.ts
|
|
639
752
|
|
|
640
753
|
async function cleanDirectories(directory) {
|
|
641
|
-
await _promises.rm.call(void 0, directory, {
|
|
642
|
-
recursive: true,
|
|
643
|
-
force: true
|
|
644
|
-
});
|
|
754
|
+
await _promises.rm.call(void 0, directory, { recursive: true, force: true });
|
|
645
755
|
}
|
|
646
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
647
756
|
|
|
648
757
|
// ../esbuild/src/context.ts
|
|
649
758
|
|
|
650
759
|
|
|
651
760
|
|
|
652
761
|
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
|
|
653
765
|
var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
654
766
|
|
|
655
767
|
// ../esbuild/src/config.ts
|
|
@@ -697,50 +809,6 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
697
809
|
}
|
|
698
810
|
};
|
|
699
811
|
|
|
700
|
-
// ../esbuild/src/plugins/resolve-paths.ts
|
|
701
|
-
|
|
702
|
-
function resolvePathsConfig(options, cwd, projectRoot) {
|
|
703
|
-
if (_optionalChain([options, 'optionalAccess', _55 => _55.compilerOptions, 'optionalAccess', _56 => _56.paths])) {
|
|
704
|
-
const paths = Object.entries(options.compilerOptions.paths);
|
|
705
|
-
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
706
|
-
return [
|
|
707
|
-
key,
|
|
708
|
-
paths2.map((v) => path4.default.resolve(cwd, v))
|
|
709
|
-
];
|
|
710
|
-
});
|
|
711
|
-
return Object.fromEntries(resolvedPaths);
|
|
712
|
-
}
|
|
713
|
-
if (options.extends) {
|
|
714
|
-
const extendsPath = path4.default.resolve(projectRoot ? _chunkV7LBWOVVjs.joinPaths.call(void 0, cwd, projectRoot, options.extends) : _chunkV7LBWOVVjs.joinPaths.call(void 0, cwd, options.extends));
|
|
715
|
-
const extendsDir = path4.default.dirname(extendsPath);
|
|
716
|
-
const extendsConfig = _chunkJ5SB6L2Ljs.__require.call(void 0, extendsPath);
|
|
717
|
-
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
718
|
-
}
|
|
719
|
-
return [];
|
|
720
|
-
}
|
|
721
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
722
|
-
var resolvePathsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (context) => ({
|
|
723
|
-
name: "storm:resolve-paths",
|
|
724
|
-
setup(build3) {
|
|
725
|
-
const parentTsConfig = build3.initialOptions.tsconfig ? _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkV7LBWOVVjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, build3.initialOptions.tsconfig.replace(context.workspaceConfig.workspaceRoot, ""))) : _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkV7LBWOVVjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, "tsconfig.json"));
|
|
726
|
-
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, context.workspaceConfig.workspaceRoot, context.options.projectRoot);
|
|
727
|
-
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
728
|
-
build3.onResolve({
|
|
729
|
-
filter: packagesRegex
|
|
730
|
-
}, (args) => {
|
|
731
|
-
if (_optionalChain([build3, 'access', _57 => _57.initialOptions, 'access', _58 => _58.external, 'optionalAccess', _59 => _59.includes, 'call', _60 => _60(args.path)])) {
|
|
732
|
-
return {
|
|
733
|
-
path: args.path,
|
|
734
|
-
external: true
|
|
735
|
-
};
|
|
736
|
-
}
|
|
737
|
-
return {
|
|
738
|
-
path: `${resolvedTsPaths[args.path][0]}/index.ts`
|
|
739
|
-
};
|
|
740
|
-
});
|
|
741
|
-
}
|
|
742
|
-
}), "resolvePathsPlugin");
|
|
743
|
-
|
|
744
812
|
// ../esbuild/src/context.ts
|
|
745
813
|
async function resolveContext(userOptions) {
|
|
746
814
|
const projectRoot = userOptions.projectRoot;
|
|
@@ -748,15 +816,19 @@ async function resolveContext(userOptions) {
|
|
|
748
816
|
if (!workspaceRoot3) {
|
|
749
817
|
throw new Error("Cannot find Nx workspace root");
|
|
750
818
|
}
|
|
751
|
-
const workspaceConfig = await
|
|
819
|
+
const workspaceConfig = await _chunkHBASMEU5js.getWorkspaceConfig.call(void 0, true, {
|
|
752
820
|
workspaceRoot: workspaceRoot3.dir
|
|
753
821
|
});
|
|
754
|
-
|
|
755
|
-
const stopwatch =
|
|
822
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
823
|
+
const stopwatch = _chunkPZ5CI56Fjs.getStopwatch.call(void 0, "Build options resolution");
|
|
756
824
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
757
825
|
exitOnError: true
|
|
758
826
|
});
|
|
759
|
-
const projectJsonPath =
|
|
827
|
+
const projectJsonPath = _chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
828
|
+
workspaceRoot3.dir,
|
|
829
|
+
projectRoot,
|
|
830
|
+
"project.json"
|
|
831
|
+
);
|
|
760
832
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
761
833
|
throw new Error("Cannot find project.json configuration");
|
|
762
834
|
}
|
|
@@ -764,19 +836,25 @@ async function resolveContext(userOptions) {
|
|
|
764
836
|
const projectJson = JSON.parse(projectJsonFile);
|
|
765
837
|
const projectName = projectJson.name || userOptions.name;
|
|
766
838
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
767
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
768
|
-
throw new Error(
|
|
839
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _55 => _55.projects, 'optionalAccess', _56 => _56[projectName]])) {
|
|
840
|
+
throw new Error(
|
|
841
|
+
"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."
|
|
842
|
+
);
|
|
769
843
|
}
|
|
770
844
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
771
845
|
options.name ??= projectName;
|
|
772
|
-
const packageJsonPath =
|
|
846
|
+
const packageJsonPath = _chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
847
|
+
workspaceRoot3.dir,
|
|
848
|
+
options.projectRoot,
|
|
849
|
+
"package.json"
|
|
850
|
+
);
|
|
773
851
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
774
852
|
throw new Error("Cannot find package.json configuration");
|
|
775
853
|
}
|
|
776
854
|
const env = getEnv("esbuild", options);
|
|
777
855
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
778
856
|
const resolvedOptions = {
|
|
779
|
-
tsconfig:
|
|
857
|
+
tsconfig: _chunkPZ5CI56Fjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "tsconfig.json"),
|
|
780
858
|
...options,
|
|
781
859
|
metafile: userOptions.mode === "development",
|
|
782
860
|
clean: false,
|
|
@@ -802,37 +880,59 @@ async function resolveContext(userOptions) {
|
|
|
802
880
|
projectConfigurations,
|
|
803
881
|
projectName,
|
|
804
882
|
projectGraph,
|
|
805
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
806
|
-
outputPath: resolvedOptions.outputPath ||
|
|
883
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkPZ5CI56Fjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
884
|
+
outputPath: resolvedOptions.outputPath || _chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
885
|
+
workspaceConfig.workspaceRoot,
|
|
886
|
+
"dist",
|
|
887
|
+
resolvedOptions.projectRoot
|
|
888
|
+
),
|
|
807
889
|
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
808
890
|
};
|
|
809
|
-
context.options.esbuildPlugins = [
|
|
810
|
-
resolvePathsPlugin(context),
|
|
811
|
-
..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))
|
|
812
|
-
];
|
|
891
|
+
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
813
892
|
return context;
|
|
814
893
|
}
|
|
815
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, resolveContext, "resolveContext");
|
|
816
894
|
|
|
817
895
|
// ../esbuild/src/package-json.ts
|
|
818
896
|
|
|
819
897
|
|
|
820
898
|
|
|
821
899
|
async function generatePackageJson(context) {
|
|
822
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
823
|
-
|
|
824
|
-
const stopwatch =
|
|
825
|
-
const packageJsonPath =
|
|
900
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkPZ5CI56Fjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
901
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
902
|
+
const stopwatch = _chunkPZ5CI56Fjs.getStopwatch.call(void 0, "Write package.json file");
|
|
903
|
+
const packageJsonPath = _chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
904
|
+
context.options.projectRoot,
|
|
905
|
+
"project.json"
|
|
906
|
+
);
|
|
826
907
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
827
908
|
throw new Error("Cannot find package.json configuration");
|
|
828
909
|
}
|
|
829
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
910
|
+
const packageJsonFile = await _promises2.default.readFile(
|
|
911
|
+
_chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
912
|
+
context.workspaceConfig.workspaceRoot,
|
|
913
|
+
context.options.projectRoot,
|
|
914
|
+
"package.json"
|
|
915
|
+
),
|
|
916
|
+
"utf8"
|
|
917
|
+
);
|
|
830
918
|
let packageJson = JSON.parse(packageJsonFile);
|
|
831
919
|
if (!packageJson) {
|
|
832
920
|
throw new Error("Cannot find package.json configuration file");
|
|
833
921
|
}
|
|
834
|
-
packageJson = await addPackageDependencies(
|
|
835
|
-
|
|
922
|
+
packageJson = await addPackageDependencies(
|
|
923
|
+
context.workspaceConfig.workspaceRoot,
|
|
924
|
+
context.options.projectRoot,
|
|
925
|
+
context.projectName,
|
|
926
|
+
packageJson
|
|
927
|
+
);
|
|
928
|
+
packageJson = await addWorkspacePackageJsonFields(
|
|
929
|
+
context.workspaceConfig,
|
|
930
|
+
context.options.projectRoot,
|
|
931
|
+
context.sourceRoot,
|
|
932
|
+
context.projectName,
|
|
933
|
+
false,
|
|
934
|
+
packageJson
|
|
935
|
+
);
|
|
836
936
|
if (context.options.entry) {
|
|
837
937
|
packageJson.exports ??= {};
|
|
838
938
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
@@ -902,20 +1002,25 @@ async function generatePackageJson(context) {
|
|
|
902
1002
|
if (isDts) {
|
|
903
1003
|
packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
|
|
904
1004
|
}
|
|
905
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
906
|
-
|
|
907
|
-
ret[key.replace("/index", "")]
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
1005
|
+
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
1006
|
+
(ret, key) => {
|
|
1007
|
+
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
1008
|
+
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
1009
|
+
}
|
|
1010
|
+
return ret;
|
|
1011
|
+
},
|
|
1012
|
+
packageJson.exports
|
|
1013
|
+
);
|
|
911
1014
|
}
|
|
912
1015
|
}
|
|
913
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1016
|
+
await _devkit.writeJsonFile.call(void 0,
|
|
1017
|
+
_chunkPZ5CI56Fjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
1018
|
+
packageJson
|
|
1019
|
+
);
|
|
914
1020
|
stopwatch();
|
|
915
1021
|
}
|
|
916
1022
|
return context;
|
|
917
1023
|
}
|
|
918
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
919
1024
|
|
|
920
1025
|
// ../esbuild/src/plugins/deps-check.ts
|
|
921
1026
|
|
|
@@ -944,16 +1049,12 @@ var unusedIgnore = [
|
|
|
944
1049
|
// these are indirectly used by build
|
|
945
1050
|
"buffer"
|
|
946
1051
|
];
|
|
947
|
-
var missingIgnore = [
|
|
948
|
-
|
|
949
|
-
"@prisma/client",
|
|
950
|
-
"ts-toolbelt"
|
|
951
|
-
];
|
|
952
|
-
var depsCheckPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (bundle) => ({
|
|
1052
|
+
var missingIgnore = [".prisma", "@prisma/client", "ts-toolbelt"];
|
|
1053
|
+
var depsCheckPlugin = (bundle) => ({
|
|
953
1054
|
name: "storm:deps-check",
|
|
954
1055
|
setup(build3) {
|
|
955
|
-
const pkgJsonPath =
|
|
956
|
-
const pkgContents =
|
|
1056
|
+
const pkgJsonPath = path3.default.join(process.cwd(), "package.json");
|
|
1057
|
+
const pkgContents = _chunkMCKGQKYUjs.__require.call(void 0, pkgJsonPath);
|
|
957
1058
|
const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
|
|
958
1059
|
const devDependencies = Object.keys(_nullishCoalesce(pkgContents["devDependencies"], () => ( {})));
|
|
959
1060
|
const peerDependencies = Object.keys(_nullishCoalesce(pkgContents["peerDependencies"], () => ( {})));
|
|
@@ -963,9 +1064,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (bund
|
|
|
963
1064
|
];
|
|
964
1065
|
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
965
1066
|
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
966
|
-
build3.onResolve({
|
|
967
|
-
filter: onlyPackages
|
|
968
|
-
}, (args) => {
|
|
1067
|
+
build3.onResolve({ filter: onlyPackages }, (args) => {
|
|
969
1068
|
if (args.importer.includes(process.cwd())) {
|
|
970
1069
|
if (args.path[0] === "@") {
|
|
971
1070
|
const [org, pkg] = args.path.split("/");
|
|
@@ -975,19 +1074,13 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (bund
|
|
|
975
1074
|
collectedDependencies.add(pkg);
|
|
976
1075
|
}
|
|
977
1076
|
}
|
|
978
|
-
return {
|
|
979
|
-
external: true
|
|
980
|
-
};
|
|
1077
|
+
return { external: true };
|
|
981
1078
|
});
|
|
982
1079
|
build3.onEnd(() => {
|
|
983
|
-
const unusedDependencies = [
|
|
984
|
-
...dependencies
|
|
985
|
-
].filter((dep) => {
|
|
1080
|
+
const unusedDependencies = [...dependencies].filter((dep) => {
|
|
986
1081
|
return !collectedDependencies.has(dep) || _module.builtinModules.includes(dep);
|
|
987
1082
|
});
|
|
988
|
-
const missingDependencies = [
|
|
989
|
-
...collectedDependencies
|
|
990
|
-
].filter((dep) => {
|
|
1083
|
+
const missingDependencies = [...collectedDependencies].filter((dep) => {
|
|
991
1084
|
return !dependencies.includes(dep) && !_module.builtinModules.includes(dep);
|
|
992
1085
|
});
|
|
993
1086
|
const filteredUnusedDeps = unusedDependencies.filter((dep) => {
|
|
@@ -996,8 +1089,12 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (bund
|
|
|
996
1089
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
997
1090
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
998
1091
|
});
|
|
999
|
-
|
|
1000
|
-
|
|
1092
|
+
_chunkPZ5CI56Fjs.writeWarning.call(void 0,
|
|
1093
|
+
`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
|
|
1094
|
+
);
|
|
1095
|
+
_chunkPZ5CI56Fjs.writeError.call(void 0,
|
|
1096
|
+
`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
|
|
1097
|
+
);
|
|
1001
1098
|
if (filteredMissingDeps.length > 0) {
|
|
1002
1099
|
throw new Error(`Missing dependencies detected - please install them:
|
|
1003
1100
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1005,36 +1102,48 @@ ${JSON.stringify(filteredMissingDeps)}
|
|
|
1005
1102
|
}
|
|
1006
1103
|
});
|
|
1007
1104
|
}
|
|
1008
|
-
})
|
|
1105
|
+
});
|
|
1009
1106
|
|
|
1010
1107
|
// ../esbuild/src/tsup.ts
|
|
1011
1108
|
var _tsup = require('tsup');
|
|
1012
1109
|
async function executeTsup(context) {
|
|
1013
|
-
|
|
1014
|
-
|
|
1110
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0,
|
|
1111
|
+
` \u{1F680} Running ${context.options.name} build`,
|
|
1112
|
+
context.workspaceConfig
|
|
1113
|
+
);
|
|
1114
|
+
const stopwatch = _chunkPZ5CI56Fjs.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
1015
1115
|
await _tsup.build.call(void 0, {
|
|
1016
1116
|
...context.options,
|
|
1017
|
-
outDir: context.options.distDir ?
|
|
1117
|
+
outDir: context.options.distDir ? _chunkPZ5CI56Fjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
1018
1118
|
workspaceConfig: context.workspaceConfig
|
|
1019
1119
|
});
|
|
1020
1120
|
stopwatch();
|
|
1021
1121
|
return context;
|
|
1022
1122
|
}
|
|
1023
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, executeTsup, "executeTsup");
|
|
1024
1123
|
|
|
1025
1124
|
// ../esbuild/src/build.ts
|
|
1026
1125
|
async function reportResults(context) {
|
|
1027
|
-
if (_optionalChain([context, 'access',
|
|
1126
|
+
if (_optionalChain([context, 'access', _57 => _57.result, 'optionalAccess', _58 => _58.errors, 'access', _59 => _59.length]) === 0) {
|
|
1028
1127
|
if (context.result.warnings.length > 0) {
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1128
|
+
_chunkPZ5CI56Fjs.writeWarning.call(void 0,
|
|
1129
|
+
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
1130
|
+
context.workspaceConfig
|
|
1131
|
+
);
|
|
1132
|
+
}
|
|
1133
|
+
_chunkPZ5CI56Fjs.writeSuccess.call(void 0,
|
|
1134
|
+
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
1135
|
+
context.workspaceConfig
|
|
1136
|
+
);
|
|
1137
|
+
} else if (_optionalChain([context, 'access', _60 => _60.result, 'optionalAccess', _61 => _61.errors]) && _optionalChain([context, 'access', _62 => _62.result, 'optionalAccess', _63 => _63.errors, 'access', _64 => _64.length]) > 0) {
|
|
1138
|
+
_chunkPZ5CI56Fjs.writeError.call(void 0,
|
|
1139
|
+
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
1140
|
+
context.workspaceConfig
|
|
1141
|
+
);
|
|
1142
|
+
throw new Error(
|
|
1143
|
+
`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
|
|
1144
|
+
);
|
|
1035
1145
|
}
|
|
1036
1146
|
}
|
|
1037
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, reportResults, "reportResults");
|
|
1038
1147
|
async function dependencyCheck(options) {
|
|
1039
1148
|
if (process.env.DEV === "true") {
|
|
1040
1149
|
return void 0;
|
|
@@ -1045,43 +1154,39 @@ async function dependencyCheck(options) {
|
|
|
1045
1154
|
const buildPromise = esbuild.build({
|
|
1046
1155
|
entryPoints: _globby.globbySync.call(void 0, "**/*.{j,t}s", {
|
|
1047
1156
|
// We don't check dependencies in ecosystem tests because tests are isolated from the build.
|
|
1048
|
-
ignore: [
|
|
1049
|
-
"./src/__tests__/**/*",
|
|
1050
|
-
"./tests/e2e/**/*",
|
|
1051
|
-
"./dist/**/*"
|
|
1052
|
-
],
|
|
1157
|
+
ignore: ["./src/__tests__/**/*", "./tests/e2e/**/*", "./dist/**/*"],
|
|
1053
1158
|
gitignore: true
|
|
1054
1159
|
}),
|
|
1055
1160
|
logLevel: "silent",
|
|
1161
|
+
// there will be errors
|
|
1056
1162
|
bundle: true,
|
|
1163
|
+
// we bundle to get everything
|
|
1057
1164
|
write: false,
|
|
1165
|
+
// no need to write for analysis
|
|
1058
1166
|
outdir: "out",
|
|
1059
|
-
plugins: [
|
|
1060
|
-
depsCheckPlugin(options.bundle)
|
|
1061
|
-
]
|
|
1167
|
+
plugins: [depsCheckPlugin(options.bundle)]
|
|
1062
1168
|
});
|
|
1063
1169
|
await buildPromise.catch(() => {
|
|
1064
1170
|
});
|
|
1065
1171
|
return void 0;
|
|
1066
1172
|
}
|
|
1067
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
1068
1173
|
async function cleanOutputPath(context) {
|
|
1069
1174
|
if (context.clean !== false && context.outputPath) {
|
|
1070
|
-
|
|
1071
|
-
|
|
1175
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0,
|
|
1176
|
+
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
1177
|
+
context.workspaceConfig
|
|
1178
|
+
);
|
|
1179
|
+
const stopwatch = _chunkPZ5CI56Fjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
1072
1180
|
await cleanDirectories(context.outputPath);
|
|
1073
1181
|
stopwatch();
|
|
1074
1182
|
}
|
|
1075
1183
|
return context;
|
|
1076
1184
|
}
|
|
1077
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1078
1185
|
async function build2(options) {
|
|
1079
|
-
|
|
1080
|
-
const stopwatch =
|
|
1186
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1187
|
+
const stopwatch = _chunkPZ5CI56Fjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1081
1188
|
try {
|
|
1082
|
-
const opts = Array.isArray(options) ? options : [
|
|
1083
|
-
options
|
|
1084
|
-
];
|
|
1189
|
+
const opts = Array.isArray(options) ? options : [options];
|
|
1085
1190
|
if (opts.length === 0) {
|
|
1086
1191
|
throw new Error("No build options were provided");
|
|
1087
1192
|
}
|
|
@@ -1094,27 +1199,30 @@ async function build2(options) {
|
|
|
1094
1199
|
executeTsup(context)
|
|
1095
1200
|
]);
|
|
1096
1201
|
await reportResults(context);
|
|
1097
|
-
|
|
1202
|
+
_chunkPZ5CI56Fjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1098
1203
|
} catch (error) {
|
|
1099
|
-
|
|
1204
|
+
_chunkPZ5CI56Fjs.writeFatal.call(void 0,
|
|
1205
|
+
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1206
|
+
);
|
|
1100
1207
|
throw error;
|
|
1101
1208
|
} finally {
|
|
1102
1209
|
stopwatch();
|
|
1103
1210
|
}
|
|
1104
1211
|
}
|
|
1105
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, build2, "build");
|
|
1106
1212
|
|
|
1107
1213
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1108
1214
|
async function esbuildExecutorFn(options, context, config) {
|
|
1109
|
-
|
|
1110
|
-
if (!_optionalChain([context, 'access',
|
|
1111
|
-
throw new Error(
|
|
1215
|
+
_chunkPZ5CI56Fjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1216
|
+
if (!_optionalChain([context, 'access', _65 => _65.projectsConfigurations, 'optionalAccess', _66 => _66.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _67 => _67.projectsConfigurations, 'access', _68 => _68.projects, 'access', _69 => _69[context.projectName], 'optionalAccess', _70 => _70.root])) {
|
|
1217
|
+
throw new Error(
|
|
1218
|
+
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
1219
|
+
);
|
|
1112
1220
|
}
|
|
1113
1221
|
await build2({
|
|
1114
1222
|
...options,
|
|
1115
|
-
projectRoot: _optionalChain([context, 'access',
|
|
1223
|
+
projectRoot: _optionalChain([context, 'access', _71 => _71.projectsConfigurations, 'access', _72 => _72.projects, 'optionalAccess', _73 => _73[context.projectName], 'access', _74 => _74.root]),
|
|
1116
1224
|
name: context.projectName,
|
|
1117
|
-
sourceRoot: _optionalChain([context, 'access',
|
|
1225
|
+
sourceRoot: _optionalChain([context, 'access', _75 => _75.projectsConfigurations, 'access', _76 => _76.projects, 'optionalAccess', _77 => _77[context.projectName], 'optionalAccess', _78 => _78.sourceRoot]),
|
|
1118
1226
|
format: options.format,
|
|
1119
1227
|
platform: options.format
|
|
1120
1228
|
});
|
|
@@ -1122,20 +1230,21 @@ async function esbuildExecutorFn(options, context, config) {
|
|
|
1122
1230
|
success: true
|
|
1123
1231
|
};
|
|
1124
1232
|
}
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1233
|
+
var executor_default6 = withRunExecutor(
|
|
1234
|
+
"Storm ESBuild build",
|
|
1235
|
+
esbuildExecutorFn,
|
|
1236
|
+
{
|
|
1237
|
+
skipReadingConfig: false,
|
|
1238
|
+
hooks: {
|
|
1239
|
+
applyDefaultOptions: async (options, config) => {
|
|
1240
|
+
options.entry ??= ["src/index.ts"];
|
|
1241
|
+
options.outputPath ??= "dist/{projectRoot}";
|
|
1242
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
1243
|
+
return options;
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1137
1246
|
}
|
|
1138
|
-
|
|
1247
|
+
);
|
|
1139
1248
|
|
|
1140
1249
|
// ../workspace-tools/src/executors/npm-publish/executor.ts
|
|
1141
1250
|
|
|
@@ -1157,208 +1266,278 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
|
|
|
1157
1266
|
var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
|
|
1158
1267
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
1159
1268
|
async function sizeLimitExecutorFn(options, context, config) {
|
|
1160
|
-
if (!_optionalChain([context, 'optionalAccess',
|
|
1161
|
-
throw new Error(
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1269
|
+
if (!_optionalChain([context, 'optionalAccess', _79 => _79.projectName]) || !_optionalChain([context, 'access', _80 => _80.projectsConfigurations, 'optionalAccess', _81 => _81.projects]) || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1270
|
+
throw new Error(
|
|
1271
|
+
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
1272
|
+
);
|
|
1273
|
+
}
|
|
1274
|
+
_chunkPZ5CI56Fjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
1275
|
+
_sizelimit2.default.call(void 0, [_file2.default, _esbuild3.default, _esbuildwhy2.default], {
|
|
1276
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _82 => _82.projectsConfigurations, 'access', _83 => _83.projects, 'access', _84 => _84[context.projectName], 'optionalAccess', _85 => _85.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0,
|
|
1277
|
+
_nullishCoalesce(_optionalChain([context, 'access', _86 => _86.projectsConfigurations, 'access', _87 => _87.projects, 'access', _88 => _88[context.projectName], 'optionalAccess', _89 => _89.root]), () => ( "./")),
|
|
1278
|
+
"src"
|
|
1279
|
+
)))
|
|
1170
1280
|
}).then((result) => {
|
|
1171
|
-
|
|
1281
|
+
_chunkPZ5CI56Fjs.writeInfo.call(void 0,
|
|
1282
|
+
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
1283
|
+
config
|
|
1284
|
+
);
|
|
1172
1285
|
});
|
|
1173
1286
|
return {
|
|
1174
1287
|
success: true
|
|
1175
1288
|
};
|
|
1176
1289
|
}
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1290
|
+
var executor_default7 = withRunExecutor(
|
|
1291
|
+
"Size-Limit Performance Test Executor",
|
|
1292
|
+
sizeLimitExecutorFn,
|
|
1293
|
+
{
|
|
1294
|
+
skipReadingConfig: false,
|
|
1295
|
+
hooks: {
|
|
1296
|
+
applyDefaultOptions: (options) => {
|
|
1297
|
+
return options;
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1184
1300
|
}
|
|
1185
|
-
|
|
1301
|
+
);
|
|
1186
1302
|
|
|
1187
1303
|
// ../workspace-tools/src/executors/typia/executor.ts
|
|
1188
1304
|
var _fsextra = require('fs-extra');
|
|
1189
1305
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1190
1306
|
async function typiaExecutorFn(options, _, config) {
|
|
1191
1307
|
if (options.clean !== false) {
|
|
1192
|
-
|
|
1308
|
+
_chunkPZ5CI56Fjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1193
1309
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1194
1310
|
}
|
|
1195
|
-
await Promise.all(
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1311
|
+
await Promise.all(
|
|
1312
|
+
options.entry.map((entry) => {
|
|
1313
|
+
_chunkPZ5CI56Fjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1314
|
+
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1315
|
+
input: entry,
|
|
1316
|
+
output: options.outputPath,
|
|
1317
|
+
project: options.tsconfig
|
|
1318
|
+
});
|
|
1319
|
+
})
|
|
1320
|
+
);
|
|
1203
1321
|
return {
|
|
1204
1322
|
success: true
|
|
1205
1323
|
};
|
|
1206
1324
|
}
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1325
|
+
var executor_default8 = withRunExecutor(
|
|
1326
|
+
"Typia runtime validation generator",
|
|
1327
|
+
typiaExecutorFn,
|
|
1328
|
+
{
|
|
1329
|
+
skipReadingConfig: false,
|
|
1330
|
+
hooks: {
|
|
1331
|
+
applyDefaultOptions: (options) => {
|
|
1332
|
+
options.entry ??= ["{sourceRoot}/index.ts"];
|
|
1333
|
+
options.outputPath ??= "{sourceRoot}/__generated__/typia";
|
|
1334
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
1335
|
+
options.clean ??= true;
|
|
1336
|
+
return options;
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1220
1339
|
}
|
|
1221
|
-
|
|
1340
|
+
);
|
|
1222
1341
|
|
|
1223
1342
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
1224
1343
|
|
|
1225
1344
|
var _jiti = require('jiti');
|
|
1226
1345
|
async function unbuildExecutorFn(options, context, config) {
|
|
1227
|
-
|
|
1228
|
-
if (!_optionalChain([context, 'access',
|
|
1229
|
-
throw new Error(
|
|
1346
|
+
_chunkPZ5CI56Fjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1347
|
+
if (!_optionalChain([context, 'access', _90 => _90.projectsConfigurations, 'optionalAccess', _91 => _91.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1348
|
+
throw new Error(
|
|
1349
|
+
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
1350
|
+
);
|
|
1230
1351
|
}
|
|
1231
1352
|
if (!context.projectsConfigurations.projects[context.projectName].root) {
|
|
1232
|
-
throw new Error(
|
|
1353
|
+
throw new Error(
|
|
1354
|
+
"The Build process failed because the project root is not valid. Please run this command from a workspace root directory."
|
|
1355
|
+
);
|
|
1233
1356
|
}
|
|
1234
1357
|
if (!context.projectsConfigurations.projects[context.projectName].sourceRoot) {
|
|
1235
|
-
throw new Error(
|
|
1358
|
+
throw new Error(
|
|
1359
|
+
"The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory."
|
|
1360
|
+
);
|
|
1236
1361
|
}
|
|
1237
1362
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1238
|
-
fsCache: config.skipCache ? false :
|
|
1363
|
+
fsCache: config.skipCache ? false : _chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
1364
|
+
config.workspaceRoot,
|
|
1365
|
+
config.directories.cache || "node_modules/.cache/storm",
|
|
1366
|
+
"jiti"
|
|
1367
|
+
),
|
|
1239
1368
|
interopDefault: true
|
|
1240
1369
|
});
|
|
1241
|
-
const stormUnbuild = await jiti.import(
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
}
|
|
1253
|
-
},
|
|
1254
|
-
rollup: {
|
|
1255
|
-
emitCJS: true,
|
|
1256
|
-
watch: false,
|
|
1257
|
-
dts: {
|
|
1258
|
-
respectExternal: true
|
|
1370
|
+
const stormUnbuild = await jiti.import(
|
|
1371
|
+
jiti.esmResolve("@storm-software/unbuild/build")
|
|
1372
|
+
);
|
|
1373
|
+
await stormUnbuild.build(
|
|
1374
|
+
_defu.defu.call(void 0,
|
|
1375
|
+
{
|
|
1376
|
+
...options,
|
|
1377
|
+
projectRoot: context.projectsConfigurations.projects[context.projectName].root,
|
|
1378
|
+
projectName: context.projectName,
|
|
1379
|
+
sourceRoot: context.projectsConfigurations.projects[context.projectName].sourceRoot,
|
|
1380
|
+
platform: options.platform
|
|
1259
1381
|
},
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1382
|
+
{
|
|
1383
|
+
stubOptions: {
|
|
1384
|
+
jiti: {
|
|
1385
|
+
fsCache: config.skipCache ? false : _chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
1386
|
+
config.workspaceRoot,
|
|
1387
|
+
config.directories.cache || "node_modules/.cache/storm",
|
|
1388
|
+
"jiti"
|
|
1389
|
+
)
|
|
1390
|
+
}
|
|
1391
|
+
},
|
|
1392
|
+
rollup: {
|
|
1393
|
+
emitCJS: true,
|
|
1394
|
+
watch: false,
|
|
1395
|
+
dts: {
|
|
1396
|
+
respectExternal: true
|
|
1397
|
+
},
|
|
1398
|
+
esbuild: {
|
|
1399
|
+
target: options.target,
|
|
1400
|
+
format: "esm",
|
|
1401
|
+
platform: options.platform,
|
|
1402
|
+
minify: _nullishCoalesce(options.minify, () => ( !options.debug)),
|
|
1403
|
+
sourcemap: _nullishCoalesce(options.sourcemap, () => ( options.debug)),
|
|
1404
|
+
treeShaking: options.treeShaking
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1267
1407
|
}
|
|
1268
|
-
|
|
1269
|
-
|
|
1408
|
+
)
|
|
1409
|
+
);
|
|
1270
1410
|
return {
|
|
1271
1411
|
success: true
|
|
1272
1412
|
};
|
|
1273
1413
|
}
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
options
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
"
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1414
|
+
var executor_default9 = withRunExecutor(
|
|
1415
|
+
"TypeScript Unbuild build",
|
|
1416
|
+
unbuildExecutorFn,
|
|
1417
|
+
{
|
|
1418
|
+
skipReadingConfig: false,
|
|
1419
|
+
hooks: {
|
|
1420
|
+
applyDefaultOptions: async (options, config) => {
|
|
1421
|
+
options.debug ??= false;
|
|
1422
|
+
options.treeShaking ??= true;
|
|
1423
|
+
options.buildOnly ??= false;
|
|
1424
|
+
options.platform ??= "neutral";
|
|
1425
|
+
options.entry ??= ["{sourceRoot}"];
|
|
1426
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
1427
|
+
return options;
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1289
1430
|
}
|
|
1290
|
-
|
|
1431
|
+
);
|
|
1291
1432
|
|
|
1292
1433
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
1293
1434
|
|
|
1294
1435
|
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
|
|
1295
1441
|
// ../workspace-tools/src/base/base-generator.ts
|
|
1296
|
-
var withRunGenerator =
|
|
1442
|
+
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
1297
1443
|
skipReadingConfig: false
|
|
1298
1444
|
}) => async (tree, _options) => {
|
|
1299
|
-
const stopwatch =
|
|
1445
|
+
const stopwatch = _chunkPZ5CI56Fjs.getStopwatch.call(void 0, name);
|
|
1300
1446
|
let options = _options;
|
|
1301
1447
|
let config;
|
|
1302
1448
|
try {
|
|
1303
|
-
|
|
1449
|
+
_chunkPZ5CI56Fjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
1304
1450
|
|
|
1305
1451
|
`, config);
|
|
1306
|
-
const workspaceRoot3 =
|
|
1452
|
+
const workspaceRoot3 = _chunkPZ5CI56Fjs.findWorkspaceRoot.call(void 0, );
|
|
1307
1453
|
if (!generatorOptions.skipReadingConfig) {
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1454
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0,
|
|
1455
|
+
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1456
|
+
- workspaceRoot: ${workspaceRoot3}`,
|
|
1457
|
+
config
|
|
1458
|
+
);
|
|
1459
|
+
config = await _chunkHBASMEU5js.getConfig.call(void 0, workspaceRoot3);
|
|
1460
|
+
}
|
|
1461
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _92 => _92.hooks, 'optionalAccess', _93 => _93.applyDefaultOptions])) {
|
|
1462
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1463
|
+
options = await Promise.resolve(
|
|
1464
|
+
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
1465
|
+
);
|
|
1466
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1467
|
+
}
|
|
1468
|
+
_chunkPZ5CI56Fjs.writeTrace.call(void 0,
|
|
1469
|
+
`Generator schema options \u2699\uFE0F
|
|
1470
|
+
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
1321
1471
|
config
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1472
|
+
);
|
|
1473
|
+
const tokenized = await applyWorkspaceTokens(
|
|
1474
|
+
options,
|
|
1475
|
+
{ workspaceRoot: tree.root, config },
|
|
1476
|
+
applyWorkspaceBaseTokens
|
|
1477
|
+
);
|
|
1478
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _94 => _94.hooks, 'optionalAccess', _95 => _95.preProcess])) {
|
|
1479
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
1480
|
+
await Promise.resolve(
|
|
1481
|
+
generatorOptions.hooks.preProcess(tokenized, config)
|
|
1482
|
+
);
|
|
1483
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
1484
|
+
}
|
|
1485
|
+
const result = await Promise.resolve(
|
|
1486
|
+
generatorFn(tree, tokenized, config)
|
|
1487
|
+
);
|
|
1329
1488
|
if (result) {
|
|
1330
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
1489
|
+
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _96 => _96.error, 'optionalAccess', _97 => _97.message]) && typeof _optionalChain([result, 'optionalAccess', _98 => _98.error, 'optionalAccess', _99 => _99.message]) === "string" && _optionalChain([result, 'optionalAccess', _100 => _100.error, 'optionalAccess', _101 => _101.name]) && typeof _optionalChain([result, 'optionalAccess', _102 => _102.error, 'optionalAccess', _103 => _103.name]) === "string") {
|
|
1331
1490
|
throw new Error(`The ${name} generator failed to run`, {
|
|
1332
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
1491
|
+
cause: _optionalChain([result, 'optionalAccess', _104 => _104.error])
|
|
1333
1492
|
});
|
|
1334
1493
|
} else if (result.success && result.data) {
|
|
1335
1494
|
return result;
|
|
1336
1495
|
}
|
|
1337
1496
|
}
|
|
1338
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
1339
|
-
|
|
1497
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _105 => _105.hooks, 'optionalAccess', _106 => _106.postProcess])) {
|
|
1498
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
1340
1499
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1341
|
-
|
|
1500
|
+
_chunkPZ5CI56Fjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
1342
1501
|
}
|
|
1343
1502
|
return () => {
|
|
1344
|
-
|
|
1503
|
+
_chunkPZ5CI56Fjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
1345
1504
|
`, config);
|
|
1346
1505
|
};
|
|
1347
1506
|
} catch (error) {
|
|
1348
1507
|
return () => {
|
|
1349
|
-
|
|
1350
|
-
|
|
1508
|
+
_chunkPZ5CI56Fjs.writeFatal.call(void 0,
|
|
1509
|
+
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
1510
|
+
config
|
|
1511
|
+
);
|
|
1512
|
+
_chunkPZ5CI56Fjs.writeError.call(void 0,
|
|
1513
|
+
`An exception was thrown in the generator's process
|
|
1351
1514
|
- Details: ${error.message}
|
|
1352
|
-
- Stacktrace: ${error.stack}`,
|
|
1515
|
+
- Stacktrace: ${error.stack}`,
|
|
1516
|
+
config
|
|
1517
|
+
);
|
|
1353
1518
|
};
|
|
1354
1519
|
} finally {
|
|
1355
1520
|
stopwatch();
|
|
1356
1521
|
}
|
|
1357
|
-
}
|
|
1522
|
+
};
|
|
1358
1523
|
|
|
1359
1524
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
1360
1525
|
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+
|
|
1534
|
+
|
|
1535
|
+
|
|
1361
1536
|
var _projectnameandrootutils = require('@nx/devkit/src/generators/project-name-and-root-utils');
|
|
1537
|
+
|
|
1538
|
+
|
|
1539
|
+
|
|
1540
|
+
|
|
1362
1541
|
var _js = require('@nx/js');
|
|
1363
1542
|
var _init = require('@nx/js/src/generators/init/init'); var _init2 = _interopRequireDefault(_init);
|
|
1364
1543
|
var _generator = require('@nx/js/src/generators/setup-verdaccio/generator'); var _generator2 = _interopRequireDefault(_generator);
|
|
@@ -1371,42 +1550,41 @@ var pnpmVersion = "8.10.2";
|
|
|
1371
1550
|
|
|
1372
1551
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
1373
1552
|
async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
1374
|
-
const normalized = await normalizeOptions(tree, {
|
|
1375
|
-
...options
|
|
1376
|
-
});
|
|
1553
|
+
const normalized = await normalizeOptions(tree, { ...options });
|
|
1377
1554
|
const tasks = [];
|
|
1378
|
-
tasks.push(
|
|
1379
|
-
|
|
1380
|
-
tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
|
|
1381
|
-
}));
|
|
1382
|
-
tasks.push(_devkit.addDependenciesToPackageJson.call(void 0, tree, {}, {
|
|
1383
|
-
"@storm-software/workspace-tools": "latest",
|
|
1384
|
-
"@storm-software/testing-tools": "latest",
|
|
1385
|
-
..._nullishCoalesce(options.devDependencies, () => ( {}))
|
|
1386
|
-
}));
|
|
1387
|
-
if (normalized.publishable) {
|
|
1388
|
-
tasks.push(await _generator2.default.call(void 0, tree, {
|
|
1555
|
+
tasks.push(
|
|
1556
|
+
await _init2.default.call(void 0, tree, {
|
|
1389
1557
|
...normalized,
|
|
1390
|
-
|
|
1391
|
-
})
|
|
1558
|
+
tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
|
|
1559
|
+
})
|
|
1560
|
+
);
|
|
1561
|
+
tasks.push(
|
|
1562
|
+
_devkit.addDependenciesToPackageJson.call(void 0,
|
|
1563
|
+
tree,
|
|
1564
|
+
{},
|
|
1565
|
+
{
|
|
1566
|
+
"@storm-software/workspace-tools": "latest",
|
|
1567
|
+
"@storm-software/testing-tools": "latest",
|
|
1568
|
+
..._nullishCoalesce(options.devDependencies, () => ( {}))
|
|
1569
|
+
}
|
|
1570
|
+
)
|
|
1571
|
+
);
|
|
1572
|
+
if (normalized.publishable) {
|
|
1573
|
+
tasks.push(await _generator2.default.call(void 0, tree, { ...normalized, skipFormat: true }));
|
|
1392
1574
|
}
|
|
1393
1575
|
const projectConfig = {
|
|
1394
1576
|
root: normalized.directory,
|
|
1395
1577
|
projectType: "library",
|
|
1396
|
-
sourceRoot:
|
|
1578
|
+
sourceRoot: _chunkPZ5CI56Fjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
1397
1579
|
targets: {
|
|
1398
1580
|
build: {
|
|
1399
1581
|
executor: options.buildExecutor,
|
|
1400
|
-
outputs: [
|
|
1401
|
-
"{options.outputPath}"
|
|
1402
|
-
],
|
|
1582
|
+
outputs: ["{options.outputPath}"],
|
|
1403
1583
|
options: {
|
|
1404
|
-
entry: [
|
|
1405
|
-
_chunkV7LBWOVVjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")
|
|
1406
|
-
],
|
|
1584
|
+
entry: [_chunkPZ5CI56Fjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
|
|
1407
1585
|
outputPath: getOutputPath(normalized),
|
|
1408
|
-
tsconfig:
|
|
1409
|
-
project:
|
|
1586
|
+
tsconfig: _chunkPZ5CI56Fjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
1587
|
+
project: _chunkPZ5CI56Fjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
1410
1588
|
defaultConfiguration: "production",
|
|
1411
1589
|
platform: "neutral",
|
|
1412
1590
|
assets: [
|
|
@@ -1438,29 +1616,32 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1438
1616
|
if (options.platform) {
|
|
1439
1617
|
projectConfig.targets.build.options.platform = options.platform === "worker" ? "node" : options.platform;
|
|
1440
1618
|
}
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1619
|
+
_chunk6XDOBG77js.addProjectTag.call(void 0,
|
|
1620
|
+
projectConfig,
|
|
1621
|
+
_chunk6XDOBG77js.ProjectTagConstants.Platform.TAG_ID,
|
|
1622
|
+
options.platform === "node" ? _chunk6XDOBG77js.ProjectTagConstants.Platform.NODE : options.platform === "worker" ? _chunk6XDOBG77js.ProjectTagConstants.Platform.WORKER : options.platform === "browser" ? _chunk6XDOBG77js.ProjectTagConstants.Platform.BROWSER : _chunk6XDOBG77js.ProjectTagConstants.Platform.NEUTRAL,
|
|
1623
|
+
{ overwrite: false }
|
|
1624
|
+
);
|
|
1444
1625
|
createProjectTsConfigJson(tree, normalized);
|
|
1445
1626
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
1446
1627
|
let repository = {
|
|
1447
1628
|
type: "github",
|
|
1448
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
1629
|
+
url: _optionalChain([config, 'optionalAccess', _107 => _107.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _108 => _108.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _109 => _109.namespace]) || _optionalChain([config, 'optionalAccess', _110 => _110.name]) || "repository"}.git`
|
|
1449
1630
|
};
|
|
1450
1631
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
1451
1632
|
if (tree.exists("package.json")) {
|
|
1452
1633
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
1453
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
1634
|
+
if (_optionalChain([packageJson, 'optionalAccess', _111 => _111.repository])) {
|
|
1454
1635
|
repository = packageJson.repository;
|
|
1455
1636
|
}
|
|
1456
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
1637
|
+
if (_optionalChain([packageJson, 'optionalAccess', _112 => _112.description])) {
|
|
1457
1638
|
description = packageJson.description;
|
|
1458
1639
|
}
|
|
1459
1640
|
}
|
|
1460
1641
|
if (!normalized.importPath) {
|
|
1461
1642
|
normalized.importPath = normalized.name;
|
|
1462
1643
|
}
|
|
1463
|
-
const packageJsonPath =
|
|
1644
|
+
const packageJsonPath = _chunkPZ5CI56Fjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
1464
1645
|
if (tree.exists(packageJsonPath)) {
|
|
1465
1646
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
1466
1647
|
if (!normalized.importPath) {
|
|
@@ -1508,30 +1689,34 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1508
1689
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
1509
1690
|
...json,
|
|
1510
1691
|
pnpm: {
|
|
1511
|
-
..._optionalChain([json, 'optionalAccess',
|
|
1692
|
+
..._optionalChain([json, 'optionalAccess', _113 => _113.pnpm]),
|
|
1512
1693
|
overrides: {
|
|
1513
|
-
..._optionalChain([json, 'optionalAccess',
|
|
1694
|
+
..._optionalChain([json, 'optionalAccess', _114 => _114.pnpm, 'optionalAccess', _115 => _115.overrides]),
|
|
1514
1695
|
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
1515
1696
|
}
|
|
1516
1697
|
}
|
|
1517
1698
|
}));
|
|
1518
1699
|
}
|
|
1519
1700
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
1520
|
-
|
|
1701
|
+
_chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
1702
|
+
normalized.projectRoot,
|
|
1703
|
+
"./src",
|
|
1704
|
+
`index.${normalized.js ? "js" : "ts"}`
|
|
1705
|
+
)
|
|
1521
1706
|
]);
|
|
1522
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
1523
|
-
|
|
1707
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkPZ5CI56Fjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
1708
|
+
_chunkPZ5CI56Fjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
1524
1709
|
]);
|
|
1525
1710
|
if (tree.exists("package.json")) {
|
|
1526
1711
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
1527
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
1712
|
+
if (_optionalChain([packageJson, 'optionalAccess', _116 => _116.repository])) {
|
|
1528
1713
|
repository = packageJson.repository;
|
|
1529
1714
|
}
|
|
1530
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
1715
|
+
if (_optionalChain([packageJson, 'optionalAccess', _117 => _117.description])) {
|
|
1531
1716
|
description = packageJson.description;
|
|
1532
1717
|
}
|
|
1533
1718
|
}
|
|
1534
|
-
const tsconfigPath =
|
|
1719
|
+
const tsconfigPath = _chunkPZ5CI56Fjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
1535
1720
|
if (tree.exists(tsconfigPath)) {
|
|
1536
1721
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
1537
1722
|
json.composite ??= true;
|
|
@@ -1545,70 +1730,58 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1545
1730
|
outDir: `${_devkit.offsetFromRoot.call(void 0, normalized.projectRoot)}dist/out-tsc`
|
|
1546
1731
|
},
|
|
1547
1732
|
files: [],
|
|
1548
|
-
include: [
|
|
1549
|
-
|
|
1550
|
-
"src/**/*.js"
|
|
1551
|
-
],
|
|
1552
|
-
exclude: [
|
|
1553
|
-
"jest.config.ts",
|
|
1554
|
-
"src/**/*.spec.ts",
|
|
1555
|
-
"src/**/*.test.ts"
|
|
1556
|
-
]
|
|
1733
|
+
include: ["src/**/*.ts", "src/**/*.js"],
|
|
1734
|
+
exclude: ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
|
|
1557
1735
|
});
|
|
1558
1736
|
}
|
|
1559
1737
|
await _devkit.formatFiles.call(void 0, tree);
|
|
1560
1738
|
return null;
|
|
1561
1739
|
}
|
|
1562
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, typeScriptLibraryGeneratorFn, "typeScriptLibraryGeneratorFn");
|
|
1563
1740
|
function getOutputPath(options) {
|
|
1564
|
-
const parts = [
|
|
1565
|
-
"dist"
|
|
1566
|
-
];
|
|
1741
|
+
const parts = ["dist"];
|
|
1567
1742
|
if (options.projectRoot === ".") {
|
|
1568
1743
|
parts.push(options.name);
|
|
1569
1744
|
} else {
|
|
1570
1745
|
parts.push(options.projectRoot);
|
|
1571
1746
|
}
|
|
1572
|
-
return
|
|
1747
|
+
return _chunkPZ5CI56Fjs.joinPaths.call(void 0, ...parts);
|
|
1573
1748
|
}
|
|
1574
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
1575
1749
|
function createProjectTsConfigJson(tree, options) {
|
|
1576
1750
|
const tsconfig = {
|
|
1577
1751
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
1578
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
1752
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _118 => _118.tsconfigOptions]), () => ( {})),
|
|
1579
1753
|
compilerOptions: {
|
|
1580
1754
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
1581
|
-
outDir:
|
|
1755
|
+
outDir: _chunkPZ5CI56Fjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
1582
1756
|
noEmit: true,
|
|
1583
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
1757
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _119 => _119.tsconfigOptions, 'optionalAccess', _120 => _120.compilerOptions]), () => ( {}))
|
|
1584
1758
|
},
|
|
1585
|
-
files: [
|
|
1586
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _127 => _127.tsconfigOptions, 'optionalAccess', _128 => _128.files]), () => ( []))
|
|
1587
|
-
],
|
|
1759
|
+
files: [..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _121 => _121.tsconfigOptions, 'optionalAccess', _122 => _122.files]), () => ( []))],
|
|
1588
1760
|
include: [
|
|
1589
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
1761
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _123 => _123.tsconfigOptions, 'optionalAccess', _124 => _124.include]), () => ( [])),
|
|
1590
1762
|
"src/**/*.ts",
|
|
1591
1763
|
"src/**/*.js",
|
|
1592
1764
|
"bin/**/*"
|
|
1593
1765
|
],
|
|
1594
1766
|
exclude: [
|
|
1595
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
1767
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _125 => _125.tsconfigOptions, 'optionalAccess', _126 => _126.exclude]), () => ( [])),
|
|
1596
1768
|
"jest.config.ts",
|
|
1597
1769
|
"src/**/*.spec.ts",
|
|
1598
1770
|
"src/**/*.test.ts"
|
|
1599
1771
|
]
|
|
1600
1772
|
};
|
|
1601
|
-
_devkit.writeJson.call(void 0, tree,
|
|
1773
|
+
_devkit.writeJson.call(void 0, tree, _chunkPZ5CI56Fjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
1602
1774
|
}
|
|
1603
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
1604
1775
|
async function normalizeOptions(tree, options, config) {
|
|
1605
1776
|
let importPath = options.importPath;
|
|
1606
|
-
if (!importPath && _optionalChain([config, 'optionalAccess',
|
|
1607
|
-
importPath = `@${_optionalChain([config, 'optionalAccess',
|
|
1777
|
+
if (!importPath && _optionalChain([config, 'optionalAccess', _127 => _127.namespace])) {
|
|
1778
|
+
importPath = `@${_optionalChain([config, 'optionalAccess', _128 => _128.namespace])}/${options.name}`;
|
|
1608
1779
|
}
|
|
1609
1780
|
if (options.publishable) {
|
|
1610
1781
|
if (!importPath) {
|
|
1611
|
-
throw new Error(
|
|
1782
|
+
throw new Error(
|
|
1783
|
+
`For publishable libs you have to provide a proper "--importPath" which needs to be a valid npm package name (e.g. my-awesome-lib or @myorg/my-lib)`
|
|
1784
|
+
);
|
|
1612
1785
|
}
|
|
1613
1786
|
}
|
|
1614
1787
|
let bundler = "tsc";
|
|
@@ -1617,7 +1790,12 @@ async function normalizeOptions(tree, options, config) {
|
|
|
1617
1790
|
}
|
|
1618
1791
|
const { Linter } = _devkit.ensurePackage.call(void 0, "@nx/eslint", nxVersion);
|
|
1619
1792
|
const rootProject = false;
|
|
1620
|
-
const {
|
|
1793
|
+
const {
|
|
1794
|
+
projectName,
|
|
1795
|
+
names: projectNames,
|
|
1796
|
+
projectRoot,
|
|
1797
|
+
importPath: normalizedImportPath
|
|
1798
|
+
} = await _projectnameandrootutils.determineProjectNameAndRootOptions.call(void 0, tree, {
|
|
1621
1799
|
name: options.name,
|
|
1622
1800
|
projectType: "library",
|
|
1623
1801
|
directory: options.directory,
|
|
@@ -1654,11 +1832,16 @@ async function normalizeOptions(tree, options, config) {
|
|
|
1654
1832
|
shouldUseSwcJest: false
|
|
1655
1833
|
};
|
|
1656
1834
|
}
|
|
1657
|
-
_chunkJ5SB6L2Ljs.__name.call(void 0, normalizeOptions, "normalizeOptions");
|
|
1658
1835
|
|
|
1659
1836
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
1660
1837
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
1661
|
-
const filesDir =
|
|
1838
|
+
const filesDir = _chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
1839
|
+
__dirname,
|
|
1840
|
+
"src",
|
|
1841
|
+
"generators",
|
|
1842
|
+
"browser-library",
|
|
1843
|
+
"files"
|
|
1844
|
+
);
|
|
1662
1845
|
const tsLibraryGeneratorOptions = {
|
|
1663
1846
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
1664
1847
|
platform: "browser",
|
|
@@ -1684,7 +1867,9 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
|
1684
1867
|
directory: schema.directory
|
|
1685
1868
|
};
|
|
1686
1869
|
const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
|
|
1687
|
-
const { className, name, propertyName } = _devkit.names.call(void 0,
|
|
1870
|
+
const { className, name, propertyName } = _devkit.names.call(void 0,
|
|
1871
|
+
options.projectNames.projectFileName
|
|
1872
|
+
);
|
|
1688
1873
|
_devkit.generateFiles.call(void 0, tree, filesDir, options.projectRoot, {
|
|
1689
1874
|
...schema,
|
|
1690
1875
|
dot: ".",
|
|
@@ -1715,55 +1900,88 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
|
1715
1900
|
await _devkit.formatFiles.call(void 0, tree);
|
|
1716
1901
|
return null;
|
|
1717
1902
|
}
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
options
|
|
1724
|
-
|
|
1725
|
-
|
|
1903
|
+
var generator_default = withRunGenerator(
|
|
1904
|
+
"TypeScript Library Creator (Browser Platform)",
|
|
1905
|
+
browserLibraryGeneratorFn,
|
|
1906
|
+
{
|
|
1907
|
+
hooks: {
|
|
1908
|
+
applyDefaultOptions: (options) => {
|
|
1909
|
+
options.description ??= "A library used by Storm Software to support browser applications";
|
|
1910
|
+
options.platform ??= "browser";
|
|
1911
|
+
return options;
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1726
1914
|
}
|
|
1727
|
-
|
|
1915
|
+
);
|
|
1728
1916
|
|
|
1729
1917
|
// ../workspace-tools/src/generators/config-schema/generator.ts
|
|
1730
1918
|
|
|
1731
1919
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
1732
1920
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1921
|
+
_chunkPZ5CI56Fjs.writeInfo.call(void 0,
|
|
1922
|
+
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
1923
|
+
config
|
|
1924
|
+
);
|
|
1925
|
+
_chunkPZ5CI56Fjs.writeTrace.call(void 0,
|
|
1926
|
+
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
1927
|
+
config
|
|
1928
|
+
);
|
|
1929
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkPZ5CI56Fjs.stormWorkspaceConfigSchema, {
|
|
1736
1930
|
name: "StormWorkspaceConfiguration"
|
|
1737
1931
|
});
|
|
1738
|
-
|
|
1739
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1932
|
+
_chunkPZ5CI56Fjs.writeTrace.call(void 0, jsonSchema, config);
|
|
1933
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
1934
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _129 => _129.workspaceRoot]), () => ( _chunkPZ5CI56Fjs.findWorkspaceRoot.call(void 0, ))),
|
|
1935
|
+
_optionalChain([options, 'access', _130 => _130.outputFile, 'optionalAccess', _131 => _131.startsWith, 'call', _132 => _132("./")]) ? "" : "./"
|
|
1936
|
+
);
|
|
1937
|
+
_chunkPZ5CI56Fjs.writeTrace.call(void 0,
|
|
1938
|
+
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
1939
|
+
config
|
|
1940
|
+
);
|
|
1941
|
+
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
1744
1942
|
await _devkit.formatFiles.call(void 0, tree);
|
|
1745
|
-
|
|
1943
|
+
_chunkPZ5CI56Fjs.writeSuccess.call(void 0,
|
|
1944
|
+
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
1945
|
+
config
|
|
1946
|
+
);
|
|
1746
1947
|
return {
|
|
1747
1948
|
success: true
|
|
1748
1949
|
};
|
|
1749
1950
|
}
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1951
|
+
var generator_default2 = withRunGenerator(
|
|
1952
|
+
"Configuration Schema Creator",
|
|
1953
|
+
configSchemaGeneratorFn,
|
|
1954
|
+
{
|
|
1955
|
+
hooks: {
|
|
1956
|
+
applyDefaultOptions: (options) => {
|
|
1957
|
+
options.outputFile ??= "{workspaceRoot}/storm-workspace.schema.json";
|
|
1958
|
+
return options;
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1757
1961
|
}
|
|
1758
|
-
|
|
1962
|
+
);
|
|
1759
1963
|
|
|
1760
1964
|
// ../workspace-tools/src/generators/init/init.ts
|
|
1761
1965
|
|
|
1762
1966
|
|
|
1967
|
+
|
|
1968
|
+
|
|
1969
|
+
|
|
1763
1970
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
1764
1971
|
|
|
1972
|
+
|
|
1973
|
+
|
|
1974
|
+
|
|
1975
|
+
|
|
1976
|
+
|
|
1765
1977
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
1766
|
-
const filesDir =
|
|
1978
|
+
const filesDir = _chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
1979
|
+
__dirname,
|
|
1980
|
+
"src",
|
|
1981
|
+
"generators",
|
|
1982
|
+
"neutral-library",
|
|
1983
|
+
"files"
|
|
1984
|
+
);
|
|
1767
1985
|
const tsLibraryGeneratorOptions = {
|
|
1768
1986
|
...schema,
|
|
1769
1987
|
platform: "neutral",
|
|
@@ -1771,7 +1989,9 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
|
1771
1989
|
buildExecutor: "@storm-software/workspace-tools:unbuild"
|
|
1772
1990
|
};
|
|
1773
1991
|
const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
|
|
1774
|
-
const { className, name, propertyName } = _devkit.names.call(void 0,
|
|
1992
|
+
const { className, name, propertyName } = _devkit.names.call(void 0,
|
|
1993
|
+
options.projectNames.projectFileName
|
|
1994
|
+
);
|
|
1775
1995
|
_devkit.generateFiles.call(void 0, tree, filesDir, options.projectRoot, {
|
|
1776
1996
|
...schema,
|
|
1777
1997
|
dot: ".",
|
|
@@ -1792,21 +2012,35 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
|
1792
2012
|
await _devkit.formatFiles.call(void 0, tree);
|
|
1793
2013
|
return null;
|
|
1794
2014
|
}
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
options
|
|
1801
|
-
|
|
1802
|
-
|
|
2015
|
+
var generator_default3 = withRunGenerator(
|
|
2016
|
+
"TypeScript Library Creator (Neutral Platform)",
|
|
2017
|
+
neutralLibraryGeneratorFn,
|
|
2018
|
+
{
|
|
2019
|
+
hooks: {
|
|
2020
|
+
applyDefaultOptions: (options) => {
|
|
2021
|
+
options.description ??= "A library used by Storm Software to support either browser or NodeJs applications";
|
|
2022
|
+
options.platform = "neutral";
|
|
2023
|
+
return options;
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
1803
2026
|
}
|
|
1804
|
-
|
|
2027
|
+
);
|
|
1805
2028
|
|
|
1806
2029
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
1807
2030
|
|
|
2031
|
+
|
|
2032
|
+
|
|
2033
|
+
|
|
2034
|
+
|
|
2035
|
+
|
|
1808
2036
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
1809
|
-
const filesDir =
|
|
2037
|
+
const filesDir = _chunkPZ5CI56Fjs.joinPaths.call(void 0,
|
|
2038
|
+
__dirname,
|
|
2039
|
+
"src",
|
|
2040
|
+
"generators",
|
|
2041
|
+
"node-library",
|
|
2042
|
+
"files"
|
|
2043
|
+
);
|
|
1810
2044
|
const tsLibraryGeneratorOptions = {
|
|
1811
2045
|
platform: "node",
|
|
1812
2046
|
devDependencies: {
|
|
@@ -1839,20 +2073,30 @@ async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
|
1839
2073
|
await _devkit.formatFiles.call(void 0, tree);
|
|
1840
2074
|
return null;
|
|
1841
2075
|
}
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
options
|
|
1848
|
-
|
|
1849
|
-
|
|
2076
|
+
var generator_default4 = withRunGenerator(
|
|
2077
|
+
"TypeScript Library Creator (NodeJs Platform)",
|
|
2078
|
+
nodeLibraryGeneratorFn,
|
|
2079
|
+
{
|
|
2080
|
+
hooks: {
|
|
2081
|
+
applyDefaultOptions: (options) => {
|
|
2082
|
+
options.description ??= "A library used by Storm Software to support NodeJs applications";
|
|
2083
|
+
options.platform ??= "node";
|
|
2084
|
+
return options;
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
1850
2087
|
}
|
|
1851
|
-
|
|
2088
|
+
);
|
|
1852
2089
|
|
|
1853
2090
|
// ../workspace-tools/src/generators/preset/generator.ts
|
|
1854
2091
|
|
|
1855
2092
|
|
|
2093
|
+
|
|
2094
|
+
|
|
2095
|
+
|
|
2096
|
+
|
|
2097
|
+
|
|
2098
|
+
|
|
2099
|
+
|
|
1856
2100
|
async function presetGeneratorFn(tree, options) {
|
|
1857
2101
|
const projectRoot = ".";
|
|
1858
2102
|
options.description ??= `\u26A1The ${options.namespace ? options.namespace : options.name} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`;
|
|
@@ -2000,7 +2244,7 @@ async function presetGeneratorFn(tree, options) {
|
|
|
2000
2244
|
};
|
|
2001
2245
|
return json;
|
|
2002
2246
|
});
|
|
2003
|
-
_devkit.generateFiles.call(void 0, tree,
|
|
2247
|
+
_devkit.generateFiles.call(void 0, tree, path3.join(__dirname, "files"), projectRoot, {
|
|
2004
2248
|
...options,
|
|
2005
2249
|
pnpmVersion,
|
|
2006
2250
|
nodeVersion
|
|
@@ -2066,14 +2310,30 @@ async function presetGeneratorFn(tree, options) {
|
|
|
2066
2310
|
"nx-cloud": "latest"
|
|
2067
2311
|
};
|
|
2068
2312
|
}
|
|
2069
|
-
await Promise.resolve(
|
|
2313
|
+
await Promise.resolve(
|
|
2314
|
+
_devkit.addDependenciesToPackageJson.call(void 0,
|
|
2315
|
+
tree,
|
|
2316
|
+
dependencies,
|
|
2317
|
+
{},
|
|
2318
|
+
_devkit.joinPathFragments.call(void 0, projectRoot, "package.json")
|
|
2319
|
+
)
|
|
2320
|
+
);
|
|
2070
2321
|
return null;
|
|
2071
2322
|
}
|
|
2072
|
-
|
|
2073
|
-
|
|
2323
|
+
var generator_default5 = withRunGenerator(
|
|
2324
|
+
"Storm Workspace Preset Generator",
|
|
2325
|
+
presetGeneratorFn
|
|
2326
|
+
);
|
|
2074
2327
|
|
|
2075
2328
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
2076
2329
|
|
|
2330
|
+
|
|
2331
|
+
|
|
2332
|
+
|
|
2333
|
+
|
|
2334
|
+
|
|
2335
|
+
|
|
2336
|
+
|
|
2077
2337
|
var _resolvelocalpackagedependencies = require('@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies');
|
|
2078
2338
|
var _updatelockfile = require('@nx/js/src/release/utils/update-lock-file');
|
|
2079
2339
|
|
|
@@ -2212,7 +2472,9 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
2212
2472
|
type: "select",
|
|
2213
2473
|
title: "Commit Type",
|
|
2214
2474
|
description: "Select the commit type that best describes your changes",
|
|
2215
|
-
enum: Object.keys(DEFAULT_COMMIT_TYPES).filter(
|
|
2475
|
+
enum: Object.keys(DEFAULT_COMMIT_TYPES).filter(
|
|
2476
|
+
(type) => DEFAULT_COMMIT_TYPES[type].hidden !== true
|
|
2477
|
+
).reduce((ret, type) => {
|
|
2216
2478
|
ret[type] = DEFAULT_COMMIT_TYPES[type];
|
|
2217
2479
|
return ret;
|
|
2218
2480
|
}, {}),
|
|
@@ -2252,7 +2514,7 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
2252
2514
|
type: "input",
|
|
2253
2515
|
title: "Breaking Changes (Details)",
|
|
2254
2516
|
description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
|
|
2255
|
-
when:
|
|
2517
|
+
when: (answers) => answers.isBreaking === true,
|
|
2256
2518
|
maxLength: 600,
|
|
2257
2519
|
minLength: 3
|
|
2258
2520
|
},
|
|
@@ -2266,25 +2528,28 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
2266
2528
|
type: "input",
|
|
2267
2529
|
title: "Open Issue Affected (Details)",
|
|
2268
2530
|
description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
|
|
2269
|
-
when:
|
|
2531
|
+
when: (answers) => answers.isIssueAffected === true,
|
|
2270
2532
|
maxLength: 600,
|
|
2271
2533
|
minLength: 3
|
|
2272
2534
|
}
|
|
2273
2535
|
};
|
|
2274
|
-
var RuleConfigSeverity;
|
|
2275
|
-
(function(RuleConfigSeverity2) {
|
|
2276
|
-
RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
|
|
2277
|
-
RuleConfigSeverity2[RuleConfigSeverity2["Warning"] = 1] = "Warning";
|
|
2278
|
-
RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
|
|
2279
|
-
})(RuleConfigSeverity || (RuleConfigSeverity = {}));
|
|
2280
2536
|
|
|
2281
2537
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
2282
2538
|
|
|
2283
2539
|
|
|
2284
2540
|
var _config = require('nx/src/command-line/release/config/config');
|
|
2541
|
+
|
|
2542
|
+
|
|
2543
|
+
|
|
2285
2544
|
var _git = require('nx/src/command-line/release/utils/git');
|
|
2545
|
+
|
|
2546
|
+
|
|
2547
|
+
|
|
2286
2548
|
var _resolvesemverspecifier = require('nx/src/command-line/release/utils/resolve-semver-specifier');
|
|
2287
2549
|
var _semver = require('nx/src/command-line/release/utils/semver');
|
|
2550
|
+
|
|
2551
|
+
|
|
2552
|
+
|
|
2288
2553
|
var _versionlegacy = require('nx/src/command-line/release/version-legacy');
|
|
2289
2554
|
var _utils = require('nx/src/tasks-runner/utils');
|
|
2290
2555
|
var _semver3 = require('semver');
|
|
@@ -2347,11 +2612,7 @@ var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void
|
|
|
2347
2612
|
$schema: {
|
|
2348
2613
|
title: "Toolchain",
|
|
2349
2614
|
description: "The type of toolchain to use for the build",
|
|
2350
|
-
enum: [
|
|
2351
|
-
"stable",
|
|
2352
|
-
"beta",
|
|
2353
|
-
"nightly"
|
|
2354
|
-
],
|
|
2615
|
+
enum: ["stable", "beta", "nightly"],
|
|
2355
2616
|
default: "stable"
|
|
2356
2617
|
},
|
|
2357
2618
|
$default: "stable"
|
|
@@ -2389,17 +2650,7 @@ var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void
|
|
|
2389
2650
|
title: "Features",
|
|
2390
2651
|
type: "string",
|
|
2391
2652
|
description: "The features to build",
|
|
2392
|
-
oneOf: [
|
|
2393
|
-
{
|
|
2394
|
-
type: "string"
|
|
2395
|
-
},
|
|
2396
|
-
{
|
|
2397
|
-
type: "array",
|
|
2398
|
-
items: {
|
|
2399
|
-
type: "string"
|
|
2400
|
-
}
|
|
2401
|
-
}
|
|
2402
|
-
]
|
|
2653
|
+
oneOf: [{ type: "string" }, { type: "array", items: { type: "string" } }]
|
|
2403
2654
|
}
|
|
2404
2655
|
},
|
|
2405
2656
|
allFeatures: {
|
|
@@ -2419,10 +2670,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
2419
2670
|
id: "TypeScriptBuildExecutorSchema",
|
|
2420
2671
|
title: "TypeScript Build Executor",
|
|
2421
2672
|
description: "A type definition for the base TypeScript build executor schema",
|
|
2422
|
-
required: [
|
|
2423
|
-
"entry",
|
|
2424
|
-
"tsconfig"
|
|
2425
|
-
]
|
|
2673
|
+
required: ["entry", "tsconfig"]
|
|
2426
2674
|
},
|
|
2427
2675
|
entry: {
|
|
2428
2676
|
$schema: {
|
|
@@ -2430,13 +2678,9 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
2430
2678
|
format: "path",
|
|
2431
2679
|
type: "array",
|
|
2432
2680
|
description: "The entry file or files to build",
|
|
2433
|
-
items: {
|
|
2434
|
-
type: "string"
|
|
2435
|
-
}
|
|
2681
|
+
items: { type: "string" }
|
|
2436
2682
|
},
|
|
2437
|
-
$default: [
|
|
2438
|
-
"{sourceRoot}/index.ts"
|
|
2439
|
-
]
|
|
2683
|
+
$default: ["{sourceRoot}/index.ts"]
|
|
2440
2684
|
},
|
|
2441
2685
|
tsconfig: {
|
|
2442
2686
|
$schema: {
|
|
@@ -2516,7 +2760,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
2516
2760
|
]
|
|
2517
2761
|
},
|
|
2518
2762
|
$default: "esnext",
|
|
2519
|
-
$resolve:
|
|
2763
|
+
$resolve: (val = "esnext") => val.toLowerCase()
|
|
2520
2764
|
},
|
|
2521
2765
|
format: {
|
|
2522
2766
|
$schema: {
|
|
@@ -2525,28 +2769,17 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
2525
2769
|
description: "The format to build",
|
|
2526
2770
|
items: {
|
|
2527
2771
|
type: "string",
|
|
2528
|
-
enum: [
|
|
2529
|
-
"cjs",
|
|
2530
|
-
"esm",
|
|
2531
|
-
"iife"
|
|
2532
|
-
]
|
|
2772
|
+
enum: ["cjs", "esm", "iife"]
|
|
2533
2773
|
}
|
|
2534
2774
|
},
|
|
2535
|
-
$resolve:
|
|
2536
|
-
"cjs",
|
|
2537
|
-
"esm"
|
|
2538
|
-
]) => [].concat(val), "$resolve")
|
|
2775
|
+
$resolve: (val = ["cjs", "esm"]) => [].concat(val)
|
|
2539
2776
|
},
|
|
2540
2777
|
platform: {
|
|
2541
2778
|
$schema: {
|
|
2542
2779
|
title: "Platform",
|
|
2543
2780
|
type: "string",
|
|
2544
2781
|
description: "The platform to build",
|
|
2545
|
-
enum: [
|
|
2546
|
-
"neutral",
|
|
2547
|
-
"node",
|
|
2548
|
-
"browser"
|
|
2549
|
-
]
|
|
2782
|
+
enum: ["neutral", "node", "browser"]
|
|
2550
2783
|
},
|
|
2551
2784
|
$default: "neutral"
|
|
2552
2785
|
},
|
|
@@ -2556,7 +2789,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
2556
2789
|
type: "array",
|
|
2557
2790
|
description: "The external dependencies"
|
|
2558
2791
|
},
|
|
2559
|
-
$resolve:
|
|
2792
|
+
$resolve: (val = []) => [].concat(val)
|
|
2560
2793
|
},
|
|
2561
2794
|
define: {
|
|
2562
2795
|
$schema: {
|
|
@@ -2565,7 +2798,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
2565
2798
|
tsType: "Record<string, string>",
|
|
2566
2799
|
description: "The define values"
|
|
2567
2800
|
},
|
|
2568
|
-
$resolve:
|
|
2801
|
+
$resolve: (val = {}) => val,
|
|
2569
2802
|
$default: {}
|
|
2570
2803
|
},
|
|
2571
2804
|
env: {
|
|
@@ -2575,7 +2808,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
2575
2808
|
tsType: "Record<string, string>",
|
|
2576
2809
|
description: "The environment variable values"
|
|
2577
2810
|
},
|
|
2578
|
-
$resolve:
|
|
2811
|
+
$resolve: (val = {}) => val,
|
|
2579
2812
|
$default: {}
|
|
2580
2813
|
}
|
|
2581
2814
|
});
|
|
@@ -2588,10 +2821,7 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
2588
2821
|
id: "TypeScriptLibraryGeneratorSchema",
|
|
2589
2822
|
title: "TypeScript Library Generator",
|
|
2590
2823
|
description: "A type definition for the base TypeScript Library Generator schema",
|
|
2591
|
-
required: [
|
|
2592
|
-
"directory",
|
|
2593
|
-
"name"
|
|
2594
|
-
]
|
|
2824
|
+
required: ["directory", "name"]
|
|
2595
2825
|
},
|
|
2596
2826
|
name: {
|
|
2597
2827
|
$schema: {
|
|
@@ -2620,12 +2850,7 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
2620
2850
|
title: "Platform",
|
|
2621
2851
|
type: "string",
|
|
2622
2852
|
description: "The platform to target with the library",
|
|
2623
|
-
enum: [
|
|
2624
|
-
"neutral",
|
|
2625
|
-
"node",
|
|
2626
|
-
"worker",
|
|
2627
|
-
"browser"
|
|
2628
|
-
]
|
|
2853
|
+
enum: ["neutral", "node", "worker", "browser"]
|
|
2629
2854
|
},
|
|
2630
2855
|
$default: "neutral"
|
|
2631
2856
|
},
|
|
@@ -2647,11 +2872,7 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
2647
2872
|
$schema: {
|
|
2648
2873
|
title: "Unit Test Runner",
|
|
2649
2874
|
type: "string",
|
|
2650
|
-
enum: [
|
|
2651
|
-
"jest",
|
|
2652
|
-
"vitest",
|
|
2653
|
-
"none"
|
|
2654
|
-
],
|
|
2875
|
+
enum: ["jest", "vitest", "none"],
|
|
2655
2876
|
description: "The unit test runner to use"
|
|
2656
2877
|
}
|
|
2657
2878
|
},
|
|
@@ -2659,10 +2880,7 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
2659
2880
|
$schema: {
|
|
2660
2881
|
title: "Test Environment",
|
|
2661
2882
|
type: "string",
|
|
2662
|
-
enum: [
|
|
2663
|
-
"jsdom",
|
|
2664
|
-
"node"
|
|
2665
|
-
],
|
|
2883
|
+
enum: ["jsdom", "node"],
|
|
2666
2884
|
description: "The test environment to use"
|
|
2667
2885
|
}
|
|
2668
2886
|
},
|
|
@@ -2707,8 +2925,21 @@ var _retrieveworkspacefiles = require('nx/src/project-graph/utils/retrieve-works
|
|
|
2707
2925
|
|
|
2708
2926
|
|
|
2709
2927
|
|
|
2928
|
+
|
|
2929
|
+
|
|
2930
|
+
|
|
2931
|
+
|
|
2932
|
+
|
|
2933
|
+
|
|
2934
|
+
|
|
2710
2935
|
var _npmparser = require('nx/src/plugins/js/lock-file/npm-parser');
|
|
2936
|
+
|
|
2937
|
+
|
|
2938
|
+
|
|
2711
2939
|
var _pnpmparser = require('nx/src/plugins/js/lock-file/pnpm-parser');
|
|
2940
|
+
|
|
2941
|
+
|
|
2942
|
+
|
|
2712
2943
|
var _yarnparser = require('nx/src/plugins/js/lock-file/yarn-parser');
|
|
2713
2944
|
var YARN_LOCK_FILE = "yarn.lock";
|
|
2714
2945
|
var NPM_LOCK_FILE = "package-lock.json";
|