@storm-software/cloudflare-tools 0.54.2 → 0.54.4
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 +12 -0
- package/README.md +1 -1
- package/dist/{chunk-KVL4WOIH.mjs → chunk-23YXGFBU.mjs} +1 -1
- package/dist/{chunk-ZPVFJJMY.js → chunk-4FP3SZAK.js} +12 -12
- package/dist/{chunk-H63GI4CR.js → chunk-BM5BCBD5.js} +3 -3
- package/dist/{chunk-6OLSW63F.mjs → chunk-CYTUL65E.mjs} +1 -1
- package/dist/{chunk-THKJZT32.js → chunk-DFG3KJWS.js} +119 -70
- package/dist/{chunk-6H63LE3D.mjs → chunk-DQHMNZ47.mjs} +88 -39
- package/dist/{chunk-W6YNIJQD.js → chunk-ILLCSSWN.js} +20 -17
- package/dist/{chunk-3D3WO4IH.mjs → chunk-IXEWBCGZ.mjs} +17 -14
- package/dist/{chunk-U6QKP7CG.js → chunk-LXXVBXFM.js} +16 -16
- package/dist/{chunk-WL2BHAOY.js → chunk-PR2M4S7F.js} +1 -1
- package/dist/{chunk-H43VNU3H.js → chunk-TDFLX6AI.js} +211 -248
- package/dist/{chunk-UJORUWGK.mjs → chunk-WG5F7OJK.mjs} +5 -5
- package/dist/{chunk-BGWUN6JU.mjs → chunk-XIDK2YZE.mjs} +5 -5
- package/dist/{chunk-CU5DCV52.mjs → chunk-YBA7ROY5.mjs} +35 -72
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +5 -5
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/src/executors/cloudflare-publish/executor.js +3 -3
- package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
- package/dist/src/executors/r2-upload-publish/executor.js +5 -5
- package/dist/src/executors/r2-upload-publish/executor.mjs +4 -4
- package/dist/src/executors/serve/executor.d.mts +3 -3
- package/dist/src/executors/serve/executor.d.ts +3 -3
- package/dist/src/executors/serve/executor.js +4 -4
- package/dist/src/executors/serve/executor.mjs +3 -3
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/dist/src/generators/worker/generator.js +5 -5
- package/dist/src/generators/worker/generator.mjs +4 -4
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.mjs +2 -2
- package/dist/src/utils/r2-bucket-helpers.js +3 -3
- package/dist/src/utils/r2-bucket-helpers.mjs +2 -2
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkVTHBMY4Bjs = require('./chunk-VTHBMY4B.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkDFG3KJWSjs = require('./chunk-DFG3KJWS.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -20,7 +20,7 @@ var _chunkTHKJZT32js = require('./chunk-THKJZT32.js');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkILLCSSWNjs = require('./chunk-ILLCSSWN.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -53,7 +53,7 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
if (result.includes("{workspaceRoot}")) {
|
|
56
|
-
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => (
|
|
56
|
+
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => ( _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, ))));
|
|
57
57
|
}
|
|
58
58
|
return result;
|
|
59
59
|
}, "applyWorkspaceBaseTokens");
|
|
@@ -101,37 +101,37 @@ var run = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (config, command,
|
|
|
101
101
|
// ../workspace-tools/src/base/base-executor.ts
|
|
102
102
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
103
103
|
var withRunExecutor = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (name, executorFn, executorOptions = {}) => async (_options, context2) => {
|
|
104
|
-
const stopwatch =
|
|
104
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, name);
|
|
105
105
|
let options = _options;
|
|
106
106
|
let config = {};
|
|
107
107
|
try {
|
|
108
108
|
if (!_optionalChain([context2, 'access', _5 => _5.projectsConfigurations, 'optionalAccess', _6 => _6.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
109
109
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
110
110
|
}
|
|
111
|
-
const workspaceRoot3 =
|
|
111
|
+
const workspaceRoot3 = _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, );
|
|
112
112
|
const projectRoot = context2.projectsConfigurations.projects[context2.projectName].root || workspaceRoot3;
|
|
113
113
|
const sourceRoot = context2.projectsConfigurations.projects[context2.projectName].sourceRoot || projectRoot || workspaceRoot3;
|
|
114
114
|
const projectName = context2.projectName;
|
|
115
115
|
config.workspaceRoot = workspaceRoot3;
|
|
116
|
-
|
|
116
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, `
|
|
117
117
|
\u26A1 Running the ${name} executor for ${projectName}
|
|
118
118
|
`, config);
|
|
119
119
|
if (!executorOptions.skipReadingConfig) {
|
|
120
|
-
|
|
120
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
121
121
|
- workspaceRoot: ${workspaceRoot3}
|
|
122
122
|
- projectRoot: ${projectRoot}
|
|
123
123
|
- sourceRoot: ${sourceRoot}
|
|
124
124
|
- projectName: ${projectName}
|
|
125
125
|
`, config);
|
|
126
|
-
config = await
|
|
126
|
+
config = await _chunkDFG3KJWSjs.getConfig.call(void 0, workspaceRoot3);
|
|
127
127
|
}
|
|
128
128
|
if (_optionalChain([executorOptions, 'optionalAccess', _7 => _7.hooks, 'optionalAccess', _8 => _8.applyDefaultOptions])) {
|
|
129
|
-
|
|
129
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
130
130
|
options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
|
|
131
|
-
|
|
131
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
132
132
|
}
|
|
133
|
-
|
|
134
|
-
${
|
|
133
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `Executor schema options \u2699\uFE0F
|
|
134
|
+
${_chunkILLCSSWNjs.formatLogMessage.call(void 0, options)}
|
|
135
135
|
`, config);
|
|
136
136
|
const tokenized = await applyWorkspaceTokens(options, _defu.defu.call(void 0, {
|
|
137
137
|
workspaceRoot: workspaceRoot3,
|
|
@@ -140,13 +140,13 @@ ${_chunkW6YNIJQDjs.formatLogMessage.call(void 0, options)}
|
|
|
140
140
|
projectName,
|
|
141
141
|
config
|
|
142
142
|
}, config, context2.projectsConfigurations.projects[context2.projectName]), applyWorkspaceProjectTokens);
|
|
143
|
-
|
|
144
|
-
${
|
|
143
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `Executor schema tokenized options \u2699\uFE0F
|
|
144
|
+
${_chunkILLCSSWNjs.formatLogMessage.call(void 0, tokenized)}
|
|
145
145
|
`, config);
|
|
146
146
|
if (_optionalChain([executorOptions, 'optionalAccess', _9 => _9.hooks, 'optionalAccess', _10 => _10.preProcess])) {
|
|
147
|
-
|
|
147
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
148
148
|
await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
|
|
149
|
-
|
|
149
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
150
150
|
}
|
|
151
151
|
const ret = executorFn(tokenized, context2, config);
|
|
152
152
|
if (_isFunction(_optionalChain([ret, 'optionalAccess', _11 => _11.next]))) {
|
|
@@ -156,26 +156,26 @@ ${_chunkW6YNIJQDjs.formatLogMessage.call(void 0, tokenized)}
|
|
|
156
156
|
}
|
|
157
157
|
const result = await Promise.resolve(ret);
|
|
158
158
|
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")) {
|
|
159
|
-
|
|
160
|
-
${
|
|
159
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `Failure determined by the ${name} executor
|
|
160
|
+
${_chunkILLCSSWNjs.formatLogMessage.call(void 0, result)}`, config);
|
|
161
161
|
console.error(result);
|
|
162
162
|
throw new Error(`The ${name} executor failed to run`, {
|
|
163
163
|
cause: _optionalChain([result, 'optionalAccess', _20 => _20.error])
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
if (_optionalChain([executorOptions, 'optionalAccess', _21 => _21.hooks, 'optionalAccess', _22 => _22.postProcess])) {
|
|
167
|
-
|
|
167
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
168
168
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
169
|
-
|
|
169
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, `Completed running the ${name} task executor!
|
|
172
172
|
`, config);
|
|
173
173
|
return {
|
|
174
174
|
success: true
|
|
175
175
|
};
|
|
176
176
|
} catch (error) {
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
_chunkILLCSSWNjs.writeFatal.call(void 0, "A fatal error occurred while running the executor - the process was forced to terminate", config);
|
|
178
|
+
_chunkILLCSSWNjs.writeError.call(void 0, `An exception was thrown in the executor's process
|
|
179
179
|
- Details: ${error.message}
|
|
180
180
|
- Stacktrace: ${error.stack}`, config);
|
|
181
181
|
return {
|
|
@@ -449,30 +449,10 @@ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_reso
|
|
|
449
449
|
|
|
450
450
|
|
|
451
451
|
// ../build-tools/src/utilities/copy-assets.ts
|
|
452
|
-
|
|
453
|
-
var _js = require('@nx/js');
|
|
452
|
+
var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
|
|
454
453
|
var _glob = require('glob');
|
|
455
454
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
456
|
-
|
|
457
|
-
// ../build-tools/src/utilities/read-nx-config.ts
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
var readNxConfig = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (workspaceRoot3) => {
|
|
461
|
-
let rootDir = workspaceRoot3;
|
|
462
|
-
if (!rootDir) {
|
|
463
|
-
const config = await _chunkTHKJZT32js.loadStormConfig.call(void 0, );
|
|
464
|
-
rootDir = config.workspaceRoot;
|
|
465
|
-
}
|
|
466
|
-
const nxJsonPath = _chunkW6YNIJQDjs.joinPaths.call(void 0, rootDir, "nx.json");
|
|
467
|
-
if (!_fs.existsSync.call(void 0, nxJsonPath)) {
|
|
468
|
-
throw new Error("Cannot find project.json configuration");
|
|
469
|
-
}
|
|
470
|
-
const configContent = await _promises.readFile.call(void 0, nxJsonPath, "utf8");
|
|
471
|
-
return JSON.parse(configContent);
|
|
472
|
-
}, "readNxConfig");
|
|
473
|
-
|
|
474
|
-
// ../build-tools/src/utilities/copy-assets.ts
|
|
475
|
-
var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
|
|
455
|
+
var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
|
|
476
456
|
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
477
457
|
pendingAssets.push({
|
|
478
458
|
input: projectRoot,
|
|
@@ -480,7 +460,7 @@ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (con
|
|
|
480
460
|
output: "."
|
|
481
461
|
});
|
|
482
462
|
pendingAssets.push({
|
|
483
|
-
input:
|
|
463
|
+
input: ".",
|
|
484
464
|
glob: "LICENSE",
|
|
485
465
|
output: "."
|
|
486
466
|
});
|
|
@@ -498,43 +478,22 @@ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (con
|
|
|
498
478
|
output: "src/"
|
|
499
479
|
});
|
|
500
480
|
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
const
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
if (!buildTarget) {
|
|
509
|
-
throw new Error(`The Build process failed because the project does not have a valid build target in the project.json file. Check if the file exists in the root of the project at ${_chunkW6YNIJQDjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
|
|
510
|
-
}
|
|
511
|
-
_chunkW6YNIJQDjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
512
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkW6YNIJQDjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
513
|
-
const result = await _js.copyAssets.call(void 0, {
|
|
514
|
-
assets: pendingAssets,
|
|
515
|
-
watch: false,
|
|
516
|
-
outputPath
|
|
517
|
-
}, {
|
|
518
|
-
root: config.workspaceRoot,
|
|
519
|
-
targetName: "build",
|
|
520
|
-
target: buildTarget,
|
|
521
|
-
projectName,
|
|
522
|
-
projectGraph,
|
|
523
|
-
projectsConfigurations,
|
|
524
|
-
nxJsonConfiguration: nxJson,
|
|
525
|
-
cwd: config.workspaceRoot,
|
|
526
|
-
isVerbose: _chunkW6YNIJQDjs.isVerbose.call(void 0, config.logLevel)
|
|
481
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
482
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkILLCSSWNjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
483
|
+
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
484
|
+
projectDir: projectRoot,
|
|
485
|
+
rootDir: config.workspaceRoot,
|
|
486
|
+
outputDir: outputPath,
|
|
487
|
+
assets: pendingAssets
|
|
527
488
|
});
|
|
528
|
-
|
|
529
|
-
throw new Error("The Build process failed trying to copy assets");
|
|
530
|
-
}
|
|
489
|
+
await assetHandler.processAllAssetsOnce();
|
|
531
490
|
if (includeSrc === true) {
|
|
532
|
-
|
|
491
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkILLCSSWNjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
533
492
|
const files = await _glob.glob.call(void 0, [
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
493
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
494
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
495
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
496
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
538
497
|
]);
|
|
539
498
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
540
499
|
|
|
@@ -556,7 +515,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
556
515
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
|
|
557
516
|
const projectNode = project.node;
|
|
558
517
|
if (projectNode.data.root) {
|
|
559
|
-
const projectPackageJsonPath =
|
|
518
|
+
const projectPackageJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
|
|
560
519
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
561
520
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
562
521
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -567,7 +526,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
567
526
|
}
|
|
568
527
|
}
|
|
569
528
|
if (localPackages.length > 0) {
|
|
570
|
-
|
|
529
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
571
530
|
packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
|
|
572
531
|
if (!ret[localPackage.name]) {
|
|
573
532
|
ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
|
|
@@ -589,13 +548,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
589
548
|
return ret;
|
|
590
549
|
}, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
|
|
591
550
|
} else {
|
|
592
|
-
|
|
551
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
593
552
|
}
|
|
594
553
|
return packageJson;
|
|
595
554
|
}, "addPackageDependencies");
|
|
596
555
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
597
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
598
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
556
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, );
|
|
557
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
599
558
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
600
559
|
packageJson.type ??= "module";
|
|
601
560
|
packageJson.sideEffects ??= false;
|
|
@@ -604,7 +563,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call
|
|
|
604
563
|
if (distSrc.startsWith("/")) {
|
|
605
564
|
distSrc = distSrc.substring(1);
|
|
606
565
|
}
|
|
607
|
-
packageJson.source ??= `${
|
|
566
|
+
packageJson.source ??= `${_chunkILLCSSWNjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
608
567
|
}
|
|
609
568
|
packageJson.files ??= [
|
|
610
569
|
"dist/**/*"
|
|
@@ -635,7 +594,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call
|
|
|
635
594
|
];
|
|
636
595
|
}
|
|
637
596
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
638
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
597
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkILLCSSWNjs.joinPaths.call(void 0, "packages", projectName);
|
|
639
598
|
return packageJson;
|
|
640
599
|
}, "addWorkspacePackageJsonFields");
|
|
641
600
|
var addPackageJsonExport = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
@@ -662,7 +621,7 @@ var addPackageJsonExport = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0,
|
|
|
662
621
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
663
622
|
|
|
664
623
|
var getEntryPoints = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
665
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
624
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, );
|
|
666
625
|
const entryPoints = [];
|
|
667
626
|
if (entry) {
|
|
668
627
|
if (Array.isArray(entry)) {
|
|
@@ -674,7 +633,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
674
633
|
}
|
|
675
634
|
}
|
|
676
635
|
if (emitOnAll) {
|
|
677
|
-
entryPoints.push(
|
|
636
|
+
entryPoints.push(_chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
678
637
|
}
|
|
679
638
|
const results = [];
|
|
680
639
|
for (const entryPoint in entryPoints) {
|
|
@@ -683,9 +642,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
683
642
|
withFileTypes: true
|
|
684
643
|
});
|
|
685
644
|
results.push(...files.reduce((ret, filePath) => {
|
|
686
|
-
const result =
|
|
645
|
+
const result = _chunkILLCSSWNjs.correctPaths.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkILLCSSWNjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkILLCSSWNjs.correctPaths.call(void 0, projectRoot), ""));
|
|
687
646
|
if (result) {
|
|
688
|
-
|
|
647
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkILLCSSWNjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
689
648
|
if (!results.includes(result)) {
|
|
690
649
|
results.push(result);
|
|
691
650
|
}
|
|
@@ -735,6 +694,10 @@ function getOutExtension(format2, pkgType) {
|
|
|
735
694
|
}
|
|
736
695
|
_chunkJ5SB6L2Ljs.__name.call(void 0, getOutExtension, "getOutExtension");
|
|
737
696
|
|
|
697
|
+
// ../build-tools/src/utilities/read-nx-config.ts
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
|
|
738
701
|
// ../build-tools/src/utilities/task-graph.ts
|
|
739
702
|
var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
740
703
|
|
|
@@ -813,15 +776,15 @@ var RendererEngine = class {
|
|
|
813
776
|
if (!relativePath.startsWith("\\\\?\\")) {
|
|
814
777
|
relativePath = relativePath.replace(/\\/g, "/");
|
|
815
778
|
}
|
|
816
|
-
const meta = _optionalChain([metafile, 'optionalAccess',
|
|
779
|
+
const meta = _optionalChain([metafile, 'optionalAccess', _29 => _29.outputs, 'access', _30 => _30[relativePath]]);
|
|
817
780
|
return {
|
|
818
781
|
type: "chunk",
|
|
819
782
|
path: file.path,
|
|
820
783
|
code: file.text,
|
|
821
|
-
map: _optionalChain([outputFiles, 'access',
|
|
822
|
-
entryPoint: _optionalChain([meta, 'optionalAccess',
|
|
823
|
-
exports: _optionalChain([meta, 'optionalAccess',
|
|
824
|
-
imports: _optionalChain([meta, 'optionalAccess',
|
|
784
|
+
map: _optionalChain([outputFiles, 'access', _31 => _31.find, 'call', _32 => _32((f) => f.path === `${file.path}.map`), 'optionalAccess', _33 => _33.text]),
|
|
785
|
+
entryPoint: _optionalChain([meta, 'optionalAccess', _34 => _34.entryPoint]),
|
|
786
|
+
exports: _optionalChain([meta, 'optionalAccess', _35 => _35.exports]),
|
|
787
|
+
imports: _optionalChain([meta, 'optionalAccess', _36 => _36.imports])
|
|
825
788
|
};
|
|
826
789
|
} else {
|
|
827
790
|
return {
|
|
@@ -891,8 +854,8 @@ var RendererEngine = class {
|
|
|
891
854
|
// ../esbuild/src/clean.ts
|
|
892
855
|
|
|
893
856
|
async function clean(name = "ESBuild", directory, config) {
|
|
894
|
-
|
|
895
|
-
const stopwatch =
|
|
857
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
858
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
896
859
|
await _node.hfs.deleteAll(directory);
|
|
897
860
|
stopwatch();
|
|
898
861
|
}
|
|
@@ -904,7 +867,7 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void
|
|
|
904
867
|
name: "storm:esm-split-code-to-cjs",
|
|
905
868
|
setup(build5) {
|
|
906
869
|
build5.onEnd(async (result) => {
|
|
907
|
-
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access',
|
|
870
|
+
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _37 => _37.metafile, 'optionalAccess', _38 => _38.outputs]), () => ( {})));
|
|
908
871
|
const jsFiles = outFiles.filter((f) => f.endsWith("js"));
|
|
909
872
|
await esbuild.build({
|
|
910
873
|
outdir: resolvedOptions.outdir,
|
|
@@ -1013,7 +976,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (option
|
|
|
1013
976
|
setup(build5) {
|
|
1014
977
|
build5.onEnd((result) => {
|
|
1015
978
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
1016
|
-
|
|
979
|
+
_chunkILLCSSWNjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
1017
980
|
${result.errors.map((error) => error.text).join("\n")}
|
|
1018
981
|
|
|
1019
982
|
`, resolvedOptions.config);
|
|
@@ -1026,7 +989,7 @@ ${result.errors.map((error) => error.text).join("\n")}
|
|
|
1026
989
|
// ../esbuild/src/plugins/resolve-paths.ts
|
|
1027
990
|
|
|
1028
991
|
function resolvePathsConfig(options, cwd) {
|
|
1029
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
992
|
+
if (_optionalChain([options, 'optionalAccess', _39 => _39.compilerOptions, 'optionalAccess', _40 => _40.paths])) {
|
|
1030
993
|
const paths = Object.entries(options.compilerOptions.paths);
|
|
1031
994
|
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
1032
995
|
return [
|
|
@@ -1048,13 +1011,13 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
|
1048
1011
|
var resolvePathsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
1049
1012
|
name: "storm:resolve-paths",
|
|
1050
1013
|
setup(build5) {
|
|
1051
|
-
const parentTsConfig = build5.initialOptions.tsconfig ? _chunkJ5SB6L2Ljs.__require.call(void 0,
|
|
1014
|
+
const parentTsConfig = build5.initialOptions.tsconfig ? _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build5.initialOptions.tsconfig)) : _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
1052
1015
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
1053
1016
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
1054
1017
|
build5.onResolve({
|
|
1055
1018
|
filter: packagesRegex
|
|
1056
1019
|
}, (args) => {
|
|
1057
|
-
if (_optionalChain([build5, 'access',
|
|
1020
|
+
if (_optionalChain([build5, 'access', _41 => _41.initialOptions, 'access', _42 => _42.external, 'optionalAccess', _43 => _43.includes, 'call', _44 => _44(args.path)])) {
|
|
1058
1021
|
return {
|
|
1059
1022
|
path: args.path,
|
|
1060
1023
|
external: true
|
|
@@ -1071,7 +1034,7 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (o
|
|
|
1071
1034
|
|
|
1072
1035
|
var _apiextractor = require('@microsoft/api-extractor');
|
|
1073
1036
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
1074
|
-
const { dependencies, peerDependencies, devDependencies } = _chunkJ5SB6L2Ljs.__require.call(void 0,
|
|
1037
|
+
const { dependencies, peerDependencies, devDependencies } = _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
1075
1038
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
1076
1039
|
p,
|
|
1077
1040
|
getTypeDependencyPackageName(p)
|
|
@@ -1107,13 +1070,13 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
1107
1070
|
},
|
|
1108
1071
|
dtsRollup: {
|
|
1109
1072
|
enabled: true,
|
|
1110
|
-
untrimmedFilePath:
|
|
1073
|
+
untrimmedFilePath: _chunkILLCSSWNjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
1111
1074
|
},
|
|
1112
1075
|
tsdocMetadata: {
|
|
1113
1076
|
enabled: false
|
|
1114
1077
|
}
|
|
1115
1078
|
},
|
|
1116
|
-
packageJsonFullPath:
|
|
1079
|
+
packageJsonFullPath: _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
1117
1080
|
configObjectFullPath: void 0
|
|
1118
1081
|
});
|
|
1119
1082
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -1121,7 +1084,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
1121
1084
|
localBuild: true
|
|
1122
1085
|
});
|
|
1123
1086
|
if (extractorResult.succeeded === false) {
|
|
1124
|
-
|
|
1087
|
+
_chunkILLCSSWNjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
1125
1088
|
throw new Error("API Extractor completed with errors");
|
|
1126
1089
|
}
|
|
1127
1090
|
}
|
|
@@ -1140,12 +1103,12 @@ var tscPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, r
|
|
|
1140
1103
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
1141
1104
|
const typeOutDir = resolvedOptions.outdir;
|
|
1142
1105
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
1143
|
-
const bundlePath =
|
|
1106
|
+
const bundlePath = _chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
1144
1107
|
let dtsPath;
|
|
1145
|
-
if (await _node.hfs.isFile(
|
|
1146
|
-
dtsPath =
|
|
1147
|
-
} else if (await _node.hfs.isFile(
|
|
1148
|
-
dtsPath =
|
|
1108
|
+
if (await _node.hfs.isFile(_chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
1109
|
+
dtsPath = _chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
1110
|
+
} else if (await _node.hfs.isFile(_chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
1111
|
+
dtsPath = _chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
1149
1112
|
}
|
|
1150
1113
|
const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
1151
1114
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -1162,7 +1125,7 @@ var tscPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, r
|
|
|
1162
1125
|
function getTypeDependencyPackageName(npmPackage) {
|
|
1163
1126
|
if (npmPackage.startsWith("@")) {
|
|
1164
1127
|
const [scope, name] = npmPackage.split("/");
|
|
1165
|
-
return `@types/${_optionalChain([scope, 'optionalAccess',
|
|
1128
|
+
return `@types/${_optionalChain([scope, 'optionalAccess', _45 => _45.slice, 'call', _46 => _46(1)])}__${name}`;
|
|
1166
1129
|
}
|
|
1167
1130
|
return `@types/${npmPackage}`;
|
|
1168
1131
|
}
|
|
@@ -1300,8 +1263,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (bund
|
|
|
1300
1263
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
1301
1264
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
1302
1265
|
});
|
|
1303
|
-
|
|
1304
|
-
|
|
1266
|
+
_chunkILLCSSWNjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
1267
|
+
_chunkILLCSSWNjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
1305
1268
|
if (filteredMissingDeps.length > 0) {
|
|
1306
1269
|
throw new Error(`Missing dependencies detected - please install them:
|
|
1307
1270
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1369,7 +1332,7 @@ function pipeSync(fn, ...fns) {
|
|
|
1369
1332
|
return (...args) => {
|
|
1370
1333
|
let result = fn(...args);
|
|
1371
1334
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
1372
|
-
result = _optionalChain([fns, 'access',
|
|
1335
|
+
result = _optionalChain([fns, 'access', _47 => _47[i], 'optionalCall', _48 => _48(result)]);
|
|
1373
1336
|
}
|
|
1374
1337
|
return result;
|
|
1375
1338
|
};
|
|
@@ -1379,7 +1342,7 @@ function pipeAsync(fn, ...fns) {
|
|
|
1379
1342
|
return async (...args) => {
|
|
1380
1343
|
let result = await fn(...args);
|
|
1381
1344
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
1382
|
-
result = await _optionalChain([fns, 'access',
|
|
1345
|
+
result = await _optionalChain([fns, 'access', _49 => _49[i], 'optionalCall', _50 => _50(result)]);
|
|
1383
1346
|
}
|
|
1384
1347
|
return result;
|
|
1385
1348
|
};
|
|
@@ -1395,26 +1358,26 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1395
1358
|
if (!workspaceRoot3) {
|
|
1396
1359
|
throw new Error("Cannot find Nx workspace root");
|
|
1397
1360
|
}
|
|
1398
|
-
const config = await
|
|
1399
|
-
|
|
1400
|
-
const stopwatch =
|
|
1361
|
+
const config = await _chunkDFG3KJWSjs.getConfig.call(void 0, workspaceRoot3.dir);
|
|
1362
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1363
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1401
1364
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1402
1365
|
exitOnError: true
|
|
1403
1366
|
});
|
|
1404
|
-
const projectJsonPath =
|
|
1367
|
+
const projectJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1405
1368
|
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
1406
1369
|
throw new Error("Cannot find project.json configuration");
|
|
1407
1370
|
}
|
|
1408
1371
|
const projectJson = await _node.hfs.json(projectJsonPath);
|
|
1409
1372
|
const projectName = projectJson.name;
|
|
1410
1373
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
1411
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
1374
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _51 => _51.projects, 'optionalAccess', _52 => _52[projectName]])) {
|
|
1412
1375
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
1413
1376
|
}
|
|
1414
1377
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
1415
1378
|
options.name ??= `${projectName}-${options.format}`;
|
|
1416
1379
|
options.target ??= DEFAULT_TARGET;
|
|
1417
|
-
const packageJsonPath =
|
|
1380
|
+
const packageJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1418
1381
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1419
1382
|
throw new Error("Cannot find package.json configuration");
|
|
1420
1383
|
}
|
|
@@ -1438,20 +1401,20 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1438
1401
|
".node"
|
|
1439
1402
|
],
|
|
1440
1403
|
...userOptions,
|
|
1441
|
-
tsconfig:
|
|
1404
|
+
tsconfig: _chunkILLCSSWNjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1442
1405
|
format: options.format || "cjs",
|
|
1443
1406
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1444
1407
|
"./src/index.ts"
|
|
1445
1408
|
], userOptions.emitOnAll),
|
|
1446
|
-
outdir: userOptions.outputPath ||
|
|
1409
|
+
outdir: userOptions.outputPath || _chunkILLCSSWNjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1447
1410
|
plugins: [],
|
|
1448
1411
|
name: userOptions.name || projectName,
|
|
1449
1412
|
projectConfigurations,
|
|
1450
1413
|
projectName,
|
|
1451
1414
|
projectGraph,
|
|
1452
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1415
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkILLCSSWNjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1453
1416
|
minify: userOptions.minify || !userOptions.debug,
|
|
1454
|
-
verbose: userOptions.verbose ||
|
|
1417
|
+
verbose: userOptions.verbose || _chunkILLCSSWNjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1455
1418
|
includeSrc: userOptions.includeSrc === true,
|
|
1456
1419
|
metafile: userOptions.metafile !== false,
|
|
1457
1420
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1487,8 +1450,8 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1487
1450
|
}, {})
|
|
1488
1451
|
},
|
|
1489
1452
|
inject: [
|
|
1490
|
-
options.format === "cjs" && options.injectShims ?
|
|
1491
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ?
|
|
1453
|
+
options.format === "cjs" && options.injectShims ? _chunkILLCSSWNjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
|
|
1454
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkILLCSSWNjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : "",
|
|
1492
1455
|
..._nullishCoalesce(options.inject, () => ( []))
|
|
1493
1456
|
].filter(Boolean)
|
|
1494
1457
|
};
|
|
@@ -1497,14 +1460,14 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1497
1460
|
return result;
|
|
1498
1461
|
}, "resolveOptions");
|
|
1499
1462
|
async function generatePackageJson(context2) {
|
|
1500
|
-
if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(
|
|
1501
|
-
|
|
1502
|
-
const stopwatch =
|
|
1503
|
-
const packageJsonPath =
|
|
1463
|
+
if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(_chunkILLCSSWNjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
1464
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
1465
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1466
|
+
const packageJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
1504
1467
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1505
1468
|
throw new Error("Cannot find package.json configuration");
|
|
1506
1469
|
}
|
|
1507
|
-
let packageJson = await _node.hfs.json(
|
|
1470
|
+
let packageJson = await _node.hfs.json(_chunkILLCSSWNjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"));
|
|
1508
1471
|
if (!packageJson) {
|
|
1509
1472
|
throw new Error("Cannot find package.json configuration file");
|
|
1510
1473
|
}
|
|
@@ -1542,7 +1505,7 @@ async function generatePackageJson(context2) {
|
|
|
1542
1505
|
}
|
|
1543
1506
|
return ret;
|
|
1544
1507
|
}, packageJson.exports);
|
|
1545
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1508
|
+
await _devkit.writeJsonFile.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
|
|
1546
1509
|
stopwatch();
|
|
1547
1510
|
}
|
|
1548
1511
|
return context2;
|
|
@@ -1568,8 +1531,8 @@ async function generateContext(getOptions) {
|
|
|
1568
1531
|
}
|
|
1569
1532
|
_chunkJ5SB6L2Ljs.__name.call(void 0, generateContext, "generateContext");
|
|
1570
1533
|
async function executeEsBuild(context2) {
|
|
1571
|
-
|
|
1572
|
-
const stopwatch =
|
|
1534
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
1535
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
1573
1536
|
if (process.env.WATCH === "true") {
|
|
1574
1537
|
const ctx = await esbuild2.context(context2.options);
|
|
1575
1538
|
watch(ctx, context2.options);
|
|
@@ -1584,21 +1547,21 @@ async function executeEsBuild(context2) {
|
|
|
1584
1547
|
}
|
|
1585
1548
|
_chunkJ5SB6L2Ljs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
1586
1549
|
async function copyBuildAssets(context2) {
|
|
1587
|
-
if (_optionalChain([context2, 'access',
|
|
1588
|
-
|
|
1589
|
-
const stopwatch =
|
|
1590
|
-
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.
|
|
1550
|
+
if (_optionalChain([context2, 'access', _53 => _53.result, 'optionalAccess', _54 => _54.errors, 'access', _55 => _55.length]) === 0) {
|
|
1551
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
1552
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1553
|
+
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
1591
1554
|
stopwatch();
|
|
1592
1555
|
}
|
|
1593
1556
|
return context2;
|
|
1594
1557
|
}
|
|
1595
1558
|
_chunkJ5SB6L2Ljs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
1596
1559
|
async function reportResults(context2) {
|
|
1597
|
-
if (_optionalChain([context2, 'access',
|
|
1560
|
+
if (_optionalChain([context2, 'access', _56 => _56.result, 'optionalAccess', _57 => _57.errors, 'access', _58 => _58.length]) === 0) {
|
|
1598
1561
|
if (context2.result.warnings.length > 0) {
|
|
1599
|
-
|
|
1562
|
+
_chunkILLCSSWNjs.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
|
|
1600
1563
|
}
|
|
1601
|
-
|
|
1564
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
1602
1565
|
}
|
|
1603
1566
|
}
|
|
1604
1567
|
_chunkJ5SB6L2Ljs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -1640,8 +1603,8 @@ async function cleanOutputPath(context2) {
|
|
|
1640
1603
|
}
|
|
1641
1604
|
_chunkJ5SB6L2Ljs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1642
1605
|
async function build3(options) {
|
|
1643
|
-
|
|
1644
|
-
const stopwatch =
|
|
1606
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1607
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1645
1608
|
try {
|
|
1646
1609
|
const opts = Array.isArray(options) ? options : [
|
|
1647
1610
|
options
|
|
@@ -1651,9 +1614,9 @@ async function build3(options) {
|
|
|
1651
1614
|
}
|
|
1652
1615
|
void transduce.async(opts, dependencyCheck);
|
|
1653
1616
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
1654
|
-
|
|
1617
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1655
1618
|
} catch (error) {
|
|
1656
|
-
|
|
1619
|
+
_chunkILLCSSWNjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1657
1620
|
throw error;
|
|
1658
1621
|
} finally {
|
|
1659
1622
|
stopwatch();
|
|
@@ -1681,9 +1644,9 @@ var watch = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (context2, opti
|
|
|
1681
1644
|
return context2.rebuild();
|
|
1682
1645
|
});
|
|
1683
1646
|
if (rebuildResult instanceof Error) {
|
|
1684
|
-
|
|
1647
|
+
_chunkILLCSSWNjs.writeError.call(void 0, rebuildResult.message);
|
|
1685
1648
|
}
|
|
1686
|
-
|
|
1649
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
1687
1650
|
}, 10);
|
|
1688
1651
|
changeWatcher.on("change", fastRebuild);
|
|
1689
1652
|
return void 0;
|
|
@@ -1691,15 +1654,15 @@ var watch = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (context2, opti
|
|
|
1691
1654
|
|
|
1692
1655
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1693
1656
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1694
|
-
|
|
1695
|
-
if (!_optionalChain([context2, 'access',
|
|
1657
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1658
|
+
if (!_optionalChain([context2, 'access', _59 => _59.projectsConfigurations, 'optionalAccess', _60 => _60.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _61 => _61.projectsConfigurations, 'access', _62 => _62.projects, 'access', _63 => _63[context2.projectName], 'optionalAccess', _64 => _64.root])) {
|
|
1696
1659
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1697
1660
|
}
|
|
1698
1661
|
await build3({
|
|
1699
1662
|
...options,
|
|
1700
|
-
projectRoot: _optionalChain([context2, 'access',
|
|
1663
|
+
projectRoot: _optionalChain([context2, 'access', _65 => _65.projectsConfigurations, 'access', _66 => _66.projects, 'optionalAccess', _67 => _67[context2.projectName], 'access', _68 => _68.root]),
|
|
1701
1664
|
projectName: context2.projectName,
|
|
1702
|
-
sourceRoot: _optionalChain([context2, 'access',
|
|
1665
|
+
sourceRoot: _optionalChain([context2, 'access', _69 => _69.projectsConfigurations, 'access', _70 => _70.projects, 'optionalAccess', _71 => _71[context2.projectName], 'optionalAccess', _72 => _72.sourceRoot]),
|
|
1703
1666
|
format: options.format,
|
|
1704
1667
|
platform: options.format
|
|
1705
1668
|
});
|
|
@@ -1742,18 +1705,18 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
|
|
|
1742
1705
|
var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
|
|
1743
1706
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
1744
1707
|
async function sizeLimitExecutorFn(options, context2, config) {
|
|
1745
|
-
if (!_optionalChain([context2, 'optionalAccess',
|
|
1708
|
+
if (!_optionalChain([context2, 'optionalAccess', _73 => _73.projectName]) || !_optionalChain([context2, 'access', _74 => _74.projectsConfigurations, 'optionalAccess', _75 => _75.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1746
1709
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
1747
1710
|
}
|
|
1748
|
-
|
|
1711
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
1749
1712
|
_sizelimit2.default.call(void 0, [
|
|
1750
1713
|
_file2.default,
|
|
1751
1714
|
_esbuild3.default,
|
|
1752
1715
|
_esbuildwhy2.default
|
|
1753
1716
|
], {
|
|
1754
|
-
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access',
|
|
1717
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _76 => _76.projectsConfigurations, 'access', _77 => _77.projects, 'access', _78 => _78[context2.projectName], 'optionalAccess', _79 => _79.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _80 => _80.projectsConfigurations, 'access', _81 => _81.projects, 'access', _82 => _82[context2.projectName], 'optionalAccess', _83 => _83.root]), () => ( "./")), "src")))
|
|
1755
1718
|
}).then((result) => {
|
|
1756
|
-
|
|
1719
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
1757
1720
|
});
|
|
1758
1721
|
return {
|
|
1759
1722
|
success: true
|
|
@@ -1779,8 +1742,8 @@ var _tsdown = require('tsdown');
|
|
|
1779
1742
|
// ../tsdown/src/clean.ts
|
|
1780
1743
|
|
|
1781
1744
|
async function clean2(name = "ESBuild", directory, config) {
|
|
1782
|
-
|
|
1783
|
-
const stopwatch =
|
|
1745
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
1746
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
1784
1747
|
await _node.hfs.deleteAll(directory);
|
|
1785
1748
|
stopwatch();
|
|
1786
1749
|
}
|
|
@@ -1815,26 +1778,26 @@ var resolveOptions2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1815
1778
|
if (!workspaceRoot3) {
|
|
1816
1779
|
throw new Error("Cannot find Nx workspace root");
|
|
1817
1780
|
}
|
|
1818
|
-
const config = await
|
|
1819
|
-
|
|
1820
|
-
const stopwatch =
|
|
1781
|
+
const config = await _chunkDFG3KJWSjs.getConfig.call(void 0, workspaceRoot3.dir);
|
|
1782
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1783
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1821
1784
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1822
1785
|
exitOnError: true
|
|
1823
1786
|
});
|
|
1824
|
-
const projectJsonPath =
|
|
1787
|
+
const projectJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1825
1788
|
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
1826
1789
|
throw new Error("Cannot find project.json configuration");
|
|
1827
1790
|
}
|
|
1828
1791
|
const projectJson = await _node.hfs.json(projectJsonPath);
|
|
1829
1792
|
const projectName = projectJson.name;
|
|
1830
1793
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
1831
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
1794
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _84 => _84.projects, 'optionalAccess', _85 => _85[projectName]])) {
|
|
1832
1795
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
1833
1796
|
}
|
|
1834
1797
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
|
|
1835
1798
|
options.name ??= `${projectName}-${options.format}`;
|
|
1836
1799
|
options.target ??= DEFAULT_TARGET;
|
|
1837
|
-
const packageJsonPath =
|
|
1800
|
+
const packageJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1838
1801
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1839
1802
|
throw new Error("Cannot find package.json configuration");
|
|
1840
1803
|
}
|
|
@@ -1843,20 +1806,20 @@ var resolveOptions2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1843
1806
|
...options,
|
|
1844
1807
|
config,
|
|
1845
1808
|
...userOptions,
|
|
1846
|
-
tsconfig:
|
|
1809
|
+
tsconfig: _chunkILLCSSWNjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1847
1810
|
format: options.format || "cjs",
|
|
1848
1811
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1849
1812
|
"./src/index.ts"
|
|
1850
1813
|
], userOptions.emitOnAll),
|
|
1851
|
-
outdir: userOptions.outputPath ||
|
|
1814
|
+
outdir: userOptions.outputPath || _chunkILLCSSWNjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1852
1815
|
plugins: [],
|
|
1853
1816
|
name: userOptions.name || projectName,
|
|
1854
1817
|
projectConfigurations,
|
|
1855
1818
|
projectName,
|
|
1856
1819
|
projectGraph,
|
|
1857
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1820
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkILLCSSWNjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1858
1821
|
minify: userOptions.minify || !userOptions.debug,
|
|
1859
|
-
verbose: userOptions.verbose ||
|
|
1822
|
+
verbose: userOptions.verbose || _chunkILLCSSWNjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1860
1823
|
includeSrc: userOptions.includeSrc === true,
|
|
1861
1824
|
metafile: userOptions.metafile !== false,
|
|
1862
1825
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1890,14 +1853,14 @@ var resolveOptions2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1890
1853
|
return result;
|
|
1891
1854
|
}, "resolveOptions");
|
|
1892
1855
|
async function generatePackageJson2(options) {
|
|
1893
|
-
if (options.generatePackageJson !== false && await _node.hfs.isFile(
|
|
1894
|
-
|
|
1895
|
-
const stopwatch =
|
|
1896
|
-
const packageJsonPath =
|
|
1856
|
+
if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1857
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1858
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1859
|
+
const packageJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1897
1860
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1898
1861
|
throw new Error("Cannot find package.json configuration");
|
|
1899
1862
|
}
|
|
1900
|
-
let packageJson = await _node.hfs.json(
|
|
1863
|
+
let packageJson = await _node.hfs.json(_chunkILLCSSWNjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
|
|
1901
1864
|
if (!packageJson) {
|
|
1902
1865
|
throw new Error("Cannot find package.json configuration file");
|
|
1903
1866
|
}
|
|
@@ -1935,15 +1898,15 @@ async function generatePackageJson2(options) {
|
|
|
1935
1898
|
}
|
|
1936
1899
|
return ret;
|
|
1937
1900
|
}, packageJson.exports);
|
|
1938
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1901
|
+
await _devkit.writeJsonFile.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
1939
1902
|
stopwatch();
|
|
1940
1903
|
}
|
|
1941
1904
|
return options;
|
|
1942
1905
|
}
|
|
1943
1906
|
_chunkJ5SB6L2Ljs.__name.call(void 0, generatePackageJson2, "generatePackageJson");
|
|
1944
1907
|
async function executeTSDown(options) {
|
|
1945
|
-
|
|
1946
|
-
const stopwatch =
|
|
1908
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
1909
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1947
1910
|
await _tsdown.build.call(void 0, {
|
|
1948
1911
|
...options,
|
|
1949
1912
|
entry: options.entryPoints,
|
|
@@ -1955,15 +1918,15 @@ async function executeTSDown(options) {
|
|
|
1955
1918
|
}
|
|
1956
1919
|
_chunkJ5SB6L2Ljs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
1957
1920
|
async function copyBuildAssets2(options) {
|
|
1958
|
-
|
|
1959
|
-
const stopwatch =
|
|
1960
|
-
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.
|
|
1921
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
1922
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1923
|
+
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.sourceRoot, true, false);
|
|
1961
1924
|
stopwatch();
|
|
1962
1925
|
return options;
|
|
1963
1926
|
}
|
|
1964
1927
|
_chunkJ5SB6L2Ljs.__name.call(void 0, copyBuildAssets2, "copyBuildAssets");
|
|
1965
1928
|
async function reportResults2(options) {
|
|
1966
|
-
|
|
1929
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
1967
1930
|
}
|
|
1968
1931
|
_chunkJ5SB6L2Ljs.__name.call(void 0, reportResults2, "reportResults");
|
|
1969
1932
|
async function cleanOutputPath2(options) {
|
|
@@ -1974,8 +1937,8 @@ async function cleanOutputPath2(options) {
|
|
|
1974
1937
|
}
|
|
1975
1938
|
_chunkJ5SB6L2Ljs.__name.call(void 0, cleanOutputPath2, "cleanOutputPath");
|
|
1976
1939
|
async function build4(options) {
|
|
1977
|
-
|
|
1978
|
-
const stopwatch =
|
|
1940
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1941
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1979
1942
|
try {
|
|
1980
1943
|
const opts = Array.isArray(options) ? options : [
|
|
1981
1944
|
options
|
|
@@ -1993,11 +1956,11 @@ async function build4(options) {
|
|
|
1993
1956
|
await reportResults2(opt);
|
|
1994
1957
|
}));
|
|
1995
1958
|
} else {
|
|
1996
|
-
|
|
1959
|
+
_chunkILLCSSWNjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
1997
1960
|
}
|
|
1998
|
-
|
|
1961
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1999
1962
|
} catch (error) {
|
|
2000
|
-
|
|
1963
|
+
_chunkILLCSSWNjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
2001
1964
|
throw error;
|
|
2002
1965
|
} finally {
|
|
2003
1966
|
stopwatch();
|
|
@@ -2007,15 +1970,15 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, build4, "build");
|
|
|
2007
1970
|
|
|
2008
1971
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
2009
1972
|
async function tsdownExecutorFn(options, context2, config) {
|
|
2010
|
-
|
|
2011
|
-
if (!_optionalChain([context2, 'access',
|
|
1973
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
|
|
1974
|
+
if (!_optionalChain([context2, 'access', _86 => _86.projectsConfigurations, 'optionalAccess', _87 => _87.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _88 => _88.projectsConfigurations, 'access', _89 => _89.projects, 'access', _90 => _90[context2.projectName], 'optionalAccess', _91 => _91.root])) {
|
|
2012
1975
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
2013
1976
|
}
|
|
2014
1977
|
await build4({
|
|
2015
1978
|
...options,
|
|
2016
|
-
projectRoot: _optionalChain([context2, 'access',
|
|
1979
|
+
projectRoot: _optionalChain([context2, 'access', _92 => _92.projectsConfigurations, 'access', _93 => _93.projects, 'optionalAccess', _94 => _94[context2.projectName], 'access', _95 => _95.root]),
|
|
2017
1980
|
projectName: context2.projectName,
|
|
2018
|
-
sourceRoot: _optionalChain([context2, 'access',
|
|
1981
|
+
sourceRoot: _optionalChain([context2, 'access', _96 => _96.projectsConfigurations, 'access', _97 => _97.projects, 'optionalAccess', _98 => _98[context2.projectName], 'optionalAccess', _99 => _99.sourceRoot]),
|
|
2019
1982
|
format: options.format,
|
|
2020
1983
|
platform: options.platform
|
|
2021
1984
|
});
|
|
@@ -2043,11 +2006,11 @@ var _fsextra = require('fs-extra');
|
|
|
2043
2006
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
2044
2007
|
async function typiaExecutorFn(options, _, config) {
|
|
2045
2008
|
if (options.clean !== false) {
|
|
2046
|
-
|
|
2009
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
2047
2010
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
2048
2011
|
}
|
|
2049
2012
|
await Promise.all(options.entry.map((entry) => {
|
|
2050
|
-
|
|
2013
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
2051
2014
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
2052
2015
|
input: entry,
|
|
2053
2016
|
output: options.outputPath,
|
|
@@ -2078,8 +2041,8 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
|
|
|
2078
2041
|
|
|
2079
2042
|
var _jiti = require('jiti');
|
|
2080
2043
|
async function unbuildExecutorFn(options, context2, config) {
|
|
2081
|
-
|
|
2082
|
-
if (!_optionalChain([context2, 'access',
|
|
2044
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
2045
|
+
if (!_optionalChain([context2, 'access', _100 => _100.projectsConfigurations, 'optionalAccess', _101 => _101.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
2083
2046
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
2084
2047
|
}
|
|
2085
2048
|
if (!context2.projectsConfigurations.projects[context2.projectName].root) {
|
|
@@ -2089,7 +2052,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
2089
2052
|
throw new Error("The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory.");
|
|
2090
2053
|
}
|
|
2091
2054
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
2092
|
-
fsCache: config.skipCache ? false :
|
|
2055
|
+
fsCache: config.skipCache ? false : _chunkILLCSSWNjs.joinPaths.call(void 0, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
2093
2056
|
interopDefault: true
|
|
2094
2057
|
});
|
|
2095
2058
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
@@ -2150,58 +2113,58 @@ var executor_default10 = withRunExecutor("TypeScript Unbuild build", unbuildExec
|
|
|
2150
2113
|
var withRunGenerator = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
2151
2114
|
skipReadingConfig: false
|
|
2152
2115
|
}) => async (tree, _options) => {
|
|
2153
|
-
const stopwatch =
|
|
2116
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, name);
|
|
2154
2117
|
let options = _options;
|
|
2155
2118
|
let config;
|
|
2156
2119
|
try {
|
|
2157
|
-
|
|
2120
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
2158
2121
|
|
|
2159
2122
|
`, config);
|
|
2160
|
-
const workspaceRoot3 =
|
|
2123
|
+
const workspaceRoot3 = _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, );
|
|
2161
2124
|
if (!generatorOptions.skipReadingConfig) {
|
|
2162
|
-
|
|
2125
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
2163
2126
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
2164
|
-
config = await
|
|
2127
|
+
config = await _chunkDFG3KJWSjs.getConfig.call(void 0, workspaceRoot3);
|
|
2165
2128
|
}
|
|
2166
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2167
|
-
|
|
2129
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _102 => _102.hooks, 'optionalAccess', _103 => _103.applyDefaultOptions])) {
|
|
2130
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
2168
2131
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
2169
|
-
|
|
2132
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
2170
2133
|
}
|
|
2171
|
-
|
|
2134
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
|
|
2172
2135
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
|
|
2173
2136
|
const tokenized = await applyWorkspaceTokens(options, {
|
|
2174
2137
|
workspaceRoot: tree.root,
|
|
2175
2138
|
config
|
|
2176
2139
|
}, applyWorkspaceBaseTokens);
|
|
2177
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2178
|
-
|
|
2140
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _104 => _104.hooks, 'optionalAccess', _105 => _105.preProcess])) {
|
|
2141
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
2179
2142
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
2180
|
-
|
|
2143
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
2181
2144
|
}
|
|
2182
2145
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
2183
2146
|
if (result) {
|
|
2184
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
2147
|
+
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _106 => _106.error, 'optionalAccess', _107 => _107.message]) && typeof _optionalChain([result, 'optionalAccess', _108 => _108.error, 'optionalAccess', _109 => _109.message]) === "string" && _optionalChain([result, 'optionalAccess', _110 => _110.error, 'optionalAccess', _111 => _111.name]) && typeof _optionalChain([result, 'optionalAccess', _112 => _112.error, 'optionalAccess', _113 => _113.name]) === "string") {
|
|
2185
2148
|
throw new Error(`The ${name} generator failed to run`, {
|
|
2186
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
2149
|
+
cause: _optionalChain([result, 'optionalAccess', _114 => _114.error])
|
|
2187
2150
|
});
|
|
2188
2151
|
} else if (result.success && result.data) {
|
|
2189
2152
|
return result;
|
|
2190
2153
|
}
|
|
2191
2154
|
}
|
|
2192
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2193
|
-
|
|
2155
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _115 => _115.hooks, 'optionalAccess', _116 => _116.postProcess])) {
|
|
2156
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
2194
2157
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
2195
|
-
|
|
2158
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
2196
2159
|
}
|
|
2197
2160
|
return () => {
|
|
2198
|
-
|
|
2161
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
2199
2162
|
`, config);
|
|
2200
2163
|
};
|
|
2201
2164
|
} catch (error) {
|
|
2202
2165
|
return () => {
|
|
2203
|
-
|
|
2204
|
-
|
|
2166
|
+
_chunkILLCSSWNjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
2167
|
+
_chunkILLCSSWNjs.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
2205
2168
|
- Details: ${error.message}
|
|
2206
2169
|
- Stacktrace: ${error.stack}`, config);
|
|
2207
2170
|
};
|
|
@@ -2213,7 +2176,7 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
2213
2176
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
2214
2177
|
|
|
2215
2178
|
var _projectnameandrootutils = require('@nx/devkit/src/generators/project-name-and-root-utils');
|
|
2216
|
-
|
|
2179
|
+
var _js = require('@nx/js');
|
|
2217
2180
|
var _init = require('@nx/js/src/generators/init/init'); var _init2 = _interopRequireDefault(_init);
|
|
2218
2181
|
var _generator = require('@nx/js/src/generators/setup-verdaccio/generator'); var _generator2 = _interopRequireDefault(_generator);
|
|
2219
2182
|
|
|
@@ -2247,7 +2210,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2247
2210
|
const projectConfig = {
|
|
2248
2211
|
root: options.directory,
|
|
2249
2212
|
projectType: "library",
|
|
2250
|
-
sourceRoot:
|
|
2213
|
+
sourceRoot: _chunkILLCSSWNjs.joinPaths.call(void 0, _nullishCoalesce(options.directory, () => ( "")), "src"),
|
|
2251
2214
|
targets: {
|
|
2252
2215
|
build: {
|
|
2253
2216
|
executor: schema.buildExecutor,
|
|
@@ -2256,11 +2219,11 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2256
2219
|
],
|
|
2257
2220
|
options: {
|
|
2258
2221
|
entry: [
|
|
2259
|
-
|
|
2222
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "src", "index.ts")
|
|
2260
2223
|
],
|
|
2261
2224
|
outputPath: getOutputPath(options),
|
|
2262
|
-
tsconfig:
|
|
2263
|
-
project:
|
|
2225
|
+
tsconfig: _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
2226
|
+
project: _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
2264
2227
|
defaultConfiguration: "production",
|
|
2265
2228
|
platform: "neutral",
|
|
2266
2229
|
assets: [
|
|
@@ -2299,22 +2262,22 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2299
2262
|
_devkit.addProjectConfiguration.call(void 0, tree, options.name, projectConfig);
|
|
2300
2263
|
let repository = {
|
|
2301
2264
|
type: "github",
|
|
2302
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
2265
|
+
url: _optionalChain([config, 'optionalAccess', _117 => _117.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _118 => _118.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _119 => _119.namespace]) || _optionalChain([config, 'optionalAccess', _120 => _120.name]) || "repository"}.git`
|
|
2303
2266
|
};
|
|
2304
2267
|
let description = schema.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
2305
2268
|
if (tree.exists("package.json")) {
|
|
2306
2269
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
2307
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2270
|
+
if (_optionalChain([packageJson, 'optionalAccess', _121 => _121.repository])) {
|
|
2308
2271
|
repository = packageJson.repository;
|
|
2309
2272
|
}
|
|
2310
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2273
|
+
if (_optionalChain([packageJson, 'optionalAccess', _122 => _122.description])) {
|
|
2311
2274
|
description = packageJson.description;
|
|
2312
2275
|
}
|
|
2313
2276
|
}
|
|
2314
2277
|
if (!options.importPath) {
|
|
2315
2278
|
options.importPath = options.name;
|
|
2316
2279
|
}
|
|
2317
|
-
const packageJsonPath =
|
|
2280
|
+
const packageJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "package.json");
|
|
2318
2281
|
if (tree.exists(packageJsonPath)) {
|
|
2319
2282
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2320
2283
|
if (!options.importPath) {
|
|
@@ -2362,30 +2325,30 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2362
2325
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
2363
2326
|
...json,
|
|
2364
2327
|
pnpm: {
|
|
2365
|
-
..._optionalChain([json, 'optionalAccess',
|
|
2328
|
+
..._optionalChain([json, 'optionalAccess', _123 => _123.pnpm]),
|
|
2366
2329
|
overrides: {
|
|
2367
|
-
..._optionalChain([json, 'optionalAccess',
|
|
2330
|
+
..._optionalChain([json, 'optionalAccess', _124 => _124.pnpm, 'optionalAccess', _125 => _125.overrides]),
|
|
2368
2331
|
[_nullishCoalesce(options.importPath, () => ( ""))]: "workspace:*"
|
|
2369
2332
|
}
|
|
2370
2333
|
}
|
|
2371
2334
|
}));
|
|
2372
2335
|
}
|
|
2373
2336
|
_js.addTsConfigPath.call(void 0, tree, options.importPath, [
|
|
2374
|
-
|
|
2337
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "./src", `index.${options.js ? "js" : "ts"}`)
|
|
2375
2338
|
]);
|
|
2376
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2377
|
-
|
|
2339
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkILLCSSWNjs.joinPaths.call(void 0, options.importPath, "/*"), [
|
|
2340
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "./src", "/*")
|
|
2378
2341
|
]);
|
|
2379
2342
|
if (tree.exists("package.json")) {
|
|
2380
2343
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
2381
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2344
|
+
if (_optionalChain([packageJson, 'optionalAccess', _126 => _126.repository])) {
|
|
2382
2345
|
repository = packageJson.repository;
|
|
2383
2346
|
}
|
|
2384
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2347
|
+
if (_optionalChain([packageJson, 'optionalAccess', _127 => _127.description])) {
|
|
2385
2348
|
description = packageJson.description;
|
|
2386
2349
|
}
|
|
2387
2350
|
}
|
|
2388
|
-
const tsconfigPath =
|
|
2351
|
+
const tsconfigPath = _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json");
|
|
2389
2352
|
if (tree.exists(tsconfigPath)) {
|
|
2390
2353
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2391
2354
|
json.composite ??= true;
|
|
@@ -2423,36 +2386,36 @@ function getOutputPath(options) {
|
|
|
2423
2386
|
} else {
|
|
2424
2387
|
parts.push(options.projectRoot);
|
|
2425
2388
|
}
|
|
2426
|
-
return
|
|
2389
|
+
return _chunkILLCSSWNjs.joinPaths.call(void 0, ...parts);
|
|
2427
2390
|
}
|
|
2428
2391
|
_chunkJ5SB6L2Ljs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
2429
2392
|
function createProjectTsConfigJson(tree, options) {
|
|
2430
2393
|
const tsconfig = {
|
|
2431
2394
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
2432
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2395
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _128 => _128.tsconfigOptions]), () => ( {})),
|
|
2433
2396
|
compilerOptions: {
|
|
2434
2397
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2435
|
-
outDir:
|
|
2398
|
+
outDir: _chunkILLCSSWNjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2436
2399
|
noEmit: true,
|
|
2437
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2400
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _129 => _129.tsconfigOptions, 'optionalAccess', _130 => _130.compilerOptions]), () => ( {}))
|
|
2438
2401
|
},
|
|
2439
2402
|
files: [
|
|
2440
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2403
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _131 => _131.tsconfigOptions, 'optionalAccess', _132 => _132.files]), () => ( []))
|
|
2441
2404
|
],
|
|
2442
2405
|
include: [
|
|
2443
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2406
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _133 => _133.tsconfigOptions, 'optionalAccess', _134 => _134.include]), () => ( [])),
|
|
2444
2407
|
"src/**/*.ts",
|
|
2445
2408
|
"src/**/*.js",
|
|
2446
2409
|
"bin/**/*"
|
|
2447
2410
|
],
|
|
2448
2411
|
exclude: [
|
|
2449
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2412
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _135 => _135.tsconfigOptions, 'optionalAccess', _136 => _136.exclude]), () => ( [])),
|
|
2450
2413
|
"jest.config.ts",
|
|
2451
2414
|
"src/**/*.spec.ts",
|
|
2452
2415
|
"src/**/*.test.ts"
|
|
2453
2416
|
]
|
|
2454
2417
|
};
|
|
2455
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2418
|
+
_devkit.writeJson.call(void 0, tree, _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2456
2419
|
}
|
|
2457
2420
|
_chunkJ5SB6L2Ljs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2458
2421
|
async function normalizeOptions(tree, options) {
|
|
@@ -2578,19 +2541,19 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
2578
2541
|
|
|
2579
2542
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
2580
2543
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0,
|
|
2544
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Configuration JSON Schema generator", config);
|
|
2545
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `Determining the Storm Configuration JSON Schema...`, config);
|
|
2546
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkILLCSSWNjs.StormConfigSchema, {
|
|
2584
2547
|
name: "StormWorkspaceConfiguration"
|
|
2585
2548
|
});
|
|
2586
|
-
|
|
2587
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
2588
|
-
|
|
2549
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, jsonSchema, config);
|
|
2550
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _137 => _137.workspaceRoot]), () => ( _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _138 => _138.outputFile, 'optionalAccess', _139 => _139.startsWith, 'call', _140 => _140("./")]) ? "" : "./");
|
|
2551
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
2589
2552
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
2590
2553
|
spaces: 2
|
|
2591
2554
|
});
|
|
2592
2555
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2593
|
-
|
|
2556
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
|
|
2594
2557
|
return {
|
|
2595
2558
|
success: true
|
|
2596
2559
|
};
|