@storm-software/terraform-tools 0.65.11 → 0.65.13
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 +14 -0
- package/README.md +1 -1
- package/dist/{chunk-V2GQRCVV.mjs → chunk-3EVFQSSJ.mjs} +4 -4
- package/dist/{chunk-W3L35PW3.mjs → chunk-7FW6TNQR.mjs} +1 -1
- package/dist/{chunk-BQVOGJTI.mjs → chunk-E4ETCWP5.mjs} +2 -2
- package/dist/{chunk-LYJ5XWTZ.mjs → chunk-EQLCXKOK.mjs} +1 -1
- package/dist/{chunk-F3ZBWEMP.js → chunk-FY2OJVNK.js} +136 -136
- package/dist/{chunk-5LHBVG2L.mjs → chunk-GJ5KMYYU.mjs} +1 -1
- package/dist/{chunk-2MUZHVIB.mjs → chunk-IVQEPQFZ.mjs} +1 -1
- package/dist/{chunk-XVLTDPFA.js → chunk-LOVMG432.js} +2 -2
- package/dist/{chunk-WS4BEVU3.js → chunk-NT6AHANU.js} +2 -2
- package/dist/{chunk-BE5TKL2F.js → chunk-PVFVZPEM.js} +4 -4
- package/dist/{chunk-5URQ2UDK.js → chunk-QBESBX3X.js} +2 -2
- package/dist/{chunk-AL3DBVWS.js → chunk-TFXQTMWW.js} +2 -2
- package/dist/{chunk-Q4W5GZD3.js → chunk-TKJZM7NN.js} +2 -2
- package/dist/{chunk-QJB75I6E.mjs → chunk-WBIP7MV3.mjs} +1 -1
- package/dist/{chunk-IUIEBW6G.mjs → chunk-WNXMATN6.mjs} +1 -1
- package/dist/executors.js +6 -6
- package/dist/executors.mjs +7 -7
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +3 -3
- package/dist/index.js +10 -10
- package/dist/index.mjs +10 -10
- package/dist/src/base/base-terraform-executor.untyped.mjs +1 -1
- package/dist/src/base/index.js +3 -3
- package/dist/src/base/index.mjs +3 -3
- package/dist/src/base/terraform-executor.js +3 -3
- package/dist/src/base/terraform-executor.mjs +3 -3
- package/dist/src/executors/apply/executor.js +4 -4
- package/dist/src/executors/apply/executor.mjs +4 -4
- package/dist/src/executors/destroy/executor.js +4 -4
- package/dist/src/executors/destroy/executor.mjs +4 -4
- package/dist/src/executors/output/executor.js +4 -4
- package/dist/src/executors/output/executor.mjs +4 -4
- package/dist/src/executors/plan/executor.js +4 -4
- package/dist/src/executors/plan/executor.mjs +4 -4
- package/dist/src/generators/init/init.js +3 -3
- package/dist/src/generators/init/init.mjs +3 -3
- package/dist/tsup.config.mjs +1 -1
- package/package.json +2 -2
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkPVFVZPEMjs = require('./chunk-PVFVZPEM.js');
|
|
21
21
|
|
|
22
22
|
// src/generators/init/init.ts
|
|
23
23
|
var _devkit = require('@nx/devkit');
|
|
@@ -144,7 +144,7 @@ async function cargoBuildExecutor(options, context) {
|
|
|
144
144
|
const command = buildCargoCommand("build", options, context);
|
|
145
145
|
return await cargoCommand(...command);
|
|
146
146
|
}
|
|
147
|
-
var executor_default =
|
|
147
|
+
var executor_default = _chunkPVFVZPEMjs.withRunExecutor.call(void 0,
|
|
148
148
|
"Cargo - Build",
|
|
149
149
|
cargoBuildExecutor,
|
|
150
150
|
{
|
|
@@ -164,7 +164,7 @@ async function cargoCheckExecutor(options, context) {
|
|
|
164
164
|
const command = buildCargoCommand("check", options, context);
|
|
165
165
|
return await cargoCommand(...command);
|
|
166
166
|
}
|
|
167
|
-
var executor_default2 =
|
|
167
|
+
var executor_default2 = _chunkPVFVZPEMjs.withRunExecutor.call(void 0,
|
|
168
168
|
"Cargo - Check",
|
|
169
169
|
cargoCheckExecutor,
|
|
170
170
|
{
|
|
@@ -183,7 +183,7 @@ async function cargoClippyExecutor(options, context) {
|
|
|
183
183
|
const command = buildCargoCommand("clippy", options, context);
|
|
184
184
|
return await cargoCommand(...command);
|
|
185
185
|
}
|
|
186
|
-
var executor_default3 =
|
|
186
|
+
var executor_default3 = _chunkPVFVZPEMjs.withRunExecutor.call(void 0,
|
|
187
187
|
"Cargo - Clippy",
|
|
188
188
|
cargoClippyExecutor,
|
|
189
189
|
{
|
|
@@ -206,7 +206,7 @@ async function cargoDocExecutor(options, context) {
|
|
|
206
206
|
const command = buildCargoCommand("doc", options, context);
|
|
207
207
|
return await cargoCommand(...command);
|
|
208
208
|
}
|
|
209
|
-
var executor_default4 =
|
|
209
|
+
var executor_default4 = _chunkPVFVZPEMjs.withRunExecutor.call(void 0,
|
|
210
210
|
"Cargo - Doc",
|
|
211
211
|
cargoDocExecutor,
|
|
212
212
|
{
|
|
@@ -232,7 +232,7 @@ async function cargoFormatExecutor(options, context) {
|
|
|
232
232
|
const command = buildCargoCommand("fmt", options, context);
|
|
233
233
|
return await cargoCommand(...command);
|
|
234
234
|
}
|
|
235
|
-
var executor_default5 =
|
|
235
|
+
var executor_default5 = _chunkPVFVZPEMjs.withRunExecutor.call(void 0,
|
|
236
236
|
"Cargo - Format",
|
|
237
237
|
cargoFormatExecutor,
|
|
238
238
|
{
|
|
@@ -308,9 +308,9 @@ var copyAssets = async (config5, assets, outputPath, projectRoot, sourceRoot, ge
|
|
|
308
308
|
output: "src/"
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
|
-
|
|
311
|
+
_chunkPVFVZPEMjs.writeTrace.call(void 0,
|
|
312
312
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
313
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
313
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkPVFVZPEMjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
314
314
|
config5
|
|
315
315
|
);
|
|
316
316
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
@@ -320,20 +320,20 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
320
320
|
assets: pendingAssets
|
|
321
321
|
});
|
|
322
322
|
await assetHandler.processAllAssetsOnce();
|
|
323
|
-
|
|
323
|
+
_chunkPVFVZPEMjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config5);
|
|
324
324
|
if (includeSrc === true) {
|
|
325
|
-
|
|
326
|
-
`\u{1F4DD} Adding banner and writing source files: ${
|
|
325
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0,
|
|
326
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
327
327
|
outputPath,
|
|
328
328
|
"src"
|
|
329
329
|
)}`,
|
|
330
330
|
config5
|
|
331
331
|
);
|
|
332
332
|
const files = await _glob.glob.call(void 0, [
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
333
|
+
_chunkPVFVZPEMjs.joinPaths.call(void 0, config5.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
334
|
+
_chunkPVFVZPEMjs.joinPaths.call(void 0, config5.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
335
|
+
_chunkPVFVZPEMjs.joinPaths.call(void 0, config5.workspaceRoot, outputPath, "src/**/*.js"),
|
|
336
|
+
_chunkPVFVZPEMjs.joinPaths.call(void 0, config5.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
337
337
|
]);
|
|
338
338
|
await Promise.allSettled(
|
|
339
339
|
files.map(
|
|
@@ -388,7 +388,7 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
388
388
|
)) {
|
|
389
389
|
const projectNode = project.node;
|
|
390
390
|
if (projectNode.data.root) {
|
|
391
|
-
const projectPackageJsonPath =
|
|
391
|
+
const projectPackageJsonPath = _chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
392
392
|
workspaceRoot3,
|
|
393
393
|
projectNode.data.root,
|
|
394
394
|
"package.json"
|
|
@@ -406,11 +406,11 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
if (localPackages.length > 0) {
|
|
409
|
-
|
|
409
|
+
_chunkPVFVZPEMjs.writeTrace.call(void 0,
|
|
410
410
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
411
411
|
);
|
|
412
412
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
413
|
-
|
|
413
|
+
_chunkPVFVZPEMjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
414
414
|
"utf8"
|
|
415
415
|
);
|
|
416
416
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -423,7 +423,7 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
423
423
|
}
|
|
424
424
|
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _13 => _13.projects, 'optionalAccess', _14 => _14[projectName2], 'access', _15 => _15.implicitDependencies, 'optionalAccess', _16 => _16.reduce, 'call', _17 => _17((ret, dep) => {
|
|
425
425
|
if (_optionalChain([projectConfigurations, 'access', _18 => _18.projects, 'optionalAccess', _19 => _19[dep]])) {
|
|
426
|
-
const depPackageJsonPath =
|
|
426
|
+
const depPackageJsonPath = _chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
427
427
|
workspaceRoot3,
|
|
428
428
|
projectConfigurations.projects[dep].root,
|
|
429
429
|
"package.json"
|
|
@@ -454,14 +454,14 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
454
454
|
return ret;
|
|
455
455
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
456
456
|
} else {
|
|
457
|
-
|
|
457
|
+
_chunkPVFVZPEMjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
458
458
|
}
|
|
459
459
|
return packageJson;
|
|
460
460
|
};
|
|
461
461
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
462
|
-
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
462
|
+
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkPVFVZPEMjs.findWorkspaceRoot.call(void 0, );
|
|
463
463
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
464
|
-
|
|
464
|
+
_chunkPVFVZPEMjs.joinPaths.call(void 0, workspaceRoot3, "package.json"),
|
|
465
465
|
"utf8"
|
|
466
466
|
);
|
|
467
467
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -472,7 +472,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
472
472
|
if (distSrc.startsWith("/")) {
|
|
473
473
|
distSrc = distSrc.substring(1);
|
|
474
474
|
}
|
|
475
|
-
packageJson.source ??= `${
|
|
475
|
+
packageJson.source ??= `${_chunkPVFVZPEMjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
476
476
|
}
|
|
477
477
|
packageJson.files ??= ["dist/**/*"];
|
|
478
478
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -497,7 +497,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
497
497
|
packageJson.contributors = [packageJson.author];
|
|
498
498
|
}
|
|
499
499
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
500
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
500
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkPVFVZPEMjs.joinPaths.call(void 0, "packages", projectName);
|
|
501
501
|
return packageJson;
|
|
502
502
|
};
|
|
503
503
|
var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
@@ -551,11 +551,11 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
|
551
551
|
// ../esbuild/src/assets.ts
|
|
552
552
|
async function copyBuildAssets(context) {
|
|
553
553
|
if (!_optionalChain([context, 'access', _28 => _28.result, 'optionalAccess', _29 => _29.errors, 'access', _30 => _30.length]) && _optionalChain([context, 'access', _31 => _31.options, 'access', _32 => _32.assets, 'optionalAccess', _33 => _33.length])) {
|
|
554
|
-
|
|
554
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0,
|
|
555
555
|
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
|
|
556
556
|
context.workspaceConfig
|
|
557
557
|
);
|
|
558
|
-
const stopwatch =
|
|
558
|
+
const stopwatch = _chunkPVFVZPEMjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
559
559
|
await copyAssets(
|
|
560
560
|
context.workspaceConfig,
|
|
561
561
|
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
@@ -636,15 +636,15 @@ async function resolveContext(userOptions) {
|
|
|
636
636
|
if (!workspaceRoot3) {
|
|
637
637
|
throw new Error("Cannot find Nx workspace root");
|
|
638
638
|
}
|
|
639
|
-
const workspaceConfig = await
|
|
639
|
+
const workspaceConfig = await _chunkPVFVZPEMjs.getWorkspaceConfig.call(void 0, true, {
|
|
640
640
|
workspaceRoot: workspaceRoot3.dir
|
|
641
641
|
});
|
|
642
|
-
|
|
643
|
-
const stopwatch =
|
|
642
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
643
|
+
const stopwatch = _chunkPVFVZPEMjs.getStopwatch.call(void 0, "Build options resolution");
|
|
644
644
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
645
645
|
exitOnError: true
|
|
646
646
|
});
|
|
647
|
-
const projectJsonPath =
|
|
647
|
+
const projectJsonPath = _chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
648
648
|
workspaceRoot3.dir,
|
|
649
649
|
projectRoot,
|
|
650
650
|
"project.json"
|
|
@@ -663,7 +663,7 @@ async function resolveContext(userOptions) {
|
|
|
663
663
|
}
|
|
664
664
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
665
665
|
options.name ??= projectName;
|
|
666
|
-
const packageJsonPath =
|
|
666
|
+
const packageJsonPath = _chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
667
667
|
workspaceRoot3.dir,
|
|
668
668
|
options.projectRoot,
|
|
669
669
|
"package.json"
|
|
@@ -675,7 +675,7 @@ async function resolveContext(userOptions) {
|
|
|
675
675
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
676
676
|
const resolvedOptions = {
|
|
677
677
|
...options,
|
|
678
|
-
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig :
|
|
678
|
+
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : _chunkPVFVZPEMjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "tsconfig.json"),
|
|
679
679
|
metafile: userOptions.mode === "development",
|
|
680
680
|
clean: false,
|
|
681
681
|
env,
|
|
@@ -700,8 +700,8 @@ async function resolveContext(userOptions) {
|
|
|
700
700
|
projectConfigurations,
|
|
701
701
|
projectName,
|
|
702
702
|
projectGraph,
|
|
703
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
704
|
-
outputPath: resolvedOptions.outputPath ||
|
|
703
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkPVFVZPEMjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
704
|
+
outputPath: resolvedOptions.outputPath || _chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
705
705
|
workspaceConfig.workspaceRoot,
|
|
706
706
|
"dist",
|
|
707
707
|
resolvedOptions.projectRoot
|
|
@@ -710,10 +710,10 @@ async function resolveContext(userOptions) {
|
|
|
710
710
|
};
|
|
711
711
|
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
712
712
|
if (context.options.verbose) {
|
|
713
|
-
|
|
713
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0,
|
|
714
714
|
` \u2699\uFE0F Build options resolved:
|
|
715
715
|
|
|
716
|
-
${
|
|
716
|
+
${_chunkPVFVZPEMjs.formatLogMessage.call(void 0, context.options)}`,
|
|
717
717
|
workspaceConfig
|
|
718
718
|
);
|
|
719
719
|
}
|
|
@@ -725,10 +725,10 @@ ${_chunkBE5TKL2Fjs.formatLogMessage.call(void 0, context.options)}`,
|
|
|
725
725
|
|
|
726
726
|
|
|
727
727
|
async function generatePackageJson(context) {
|
|
728
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
729
|
-
|
|
730
|
-
const stopwatch =
|
|
731
|
-
const packageJsonPath =
|
|
728
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkPVFVZPEMjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
729
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
730
|
+
const stopwatch = _chunkPVFVZPEMjs.getStopwatch.call(void 0, "Write package.json file");
|
|
731
|
+
const packageJsonPath = _chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
732
732
|
context.options.projectRoot,
|
|
733
733
|
"project.json"
|
|
734
734
|
);
|
|
@@ -736,7 +736,7 @@ async function generatePackageJson(context) {
|
|
|
736
736
|
throw new Error("Cannot find package.json configuration");
|
|
737
737
|
}
|
|
738
738
|
const packageJsonFile = await _promises2.default.readFile(
|
|
739
|
-
|
|
739
|
+
_chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
740
740
|
context.workspaceConfig.workspaceRoot,
|
|
741
741
|
context.options.projectRoot,
|
|
742
742
|
"package.json"
|
|
@@ -842,7 +842,7 @@ async function generatePackageJson(context) {
|
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
844
|
await _devkit.writeJsonFile.call(void 0,
|
|
845
|
-
|
|
845
|
+
_chunkPVFVZPEMjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
846
846
|
packageJson
|
|
847
847
|
);
|
|
848
848
|
stopwatch();
|
|
@@ -853,14 +853,14 @@ async function generatePackageJson(context) {
|
|
|
853
853
|
// ../esbuild/src/tsup.ts
|
|
854
854
|
var _tsup = require('tsup');
|
|
855
855
|
async function executeTsup(context) {
|
|
856
|
-
|
|
856
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0,
|
|
857
857
|
` \u{1F680} Running ${context.options.name} build`,
|
|
858
858
|
context.workspaceConfig
|
|
859
859
|
);
|
|
860
|
-
const stopwatch =
|
|
860
|
+
const stopwatch = _chunkPVFVZPEMjs.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
861
861
|
await _tsup.build.call(void 0, {
|
|
862
862
|
...context.options,
|
|
863
|
-
outDir: context.options.distDir ?
|
|
863
|
+
outDir: context.options.distDir ? _chunkPVFVZPEMjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
864
864
|
workspaceConfig: context.workspaceConfig
|
|
865
865
|
});
|
|
866
866
|
stopwatch();
|
|
@@ -871,17 +871,17 @@ async function executeTsup(context) {
|
|
|
871
871
|
async function reportResults(context) {
|
|
872
872
|
if (_optionalChain([context, 'access', _36 => _36.result, 'optionalAccess', _37 => _37.errors, 'access', _38 => _38.length]) === 0) {
|
|
873
873
|
if (context.result.warnings.length > 0) {
|
|
874
|
-
|
|
874
|
+
_chunkPVFVZPEMjs.writeWarning.call(void 0,
|
|
875
875
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
876
876
|
context.workspaceConfig
|
|
877
877
|
);
|
|
878
878
|
}
|
|
879
|
-
|
|
879
|
+
_chunkPVFVZPEMjs.writeSuccess.call(void 0,
|
|
880
880
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
881
881
|
context.workspaceConfig
|
|
882
882
|
);
|
|
883
883
|
} else if (_optionalChain([context, 'access', _39 => _39.result, 'optionalAccess', _40 => _40.errors]) && _optionalChain([context, 'access', _41 => _41.result, 'optionalAccess', _42 => _42.errors, 'access', _43 => _43.length]) > 0) {
|
|
884
|
-
|
|
884
|
+
_chunkPVFVZPEMjs.writeError.call(void 0,
|
|
885
885
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
886
886
|
context.workspaceConfig
|
|
887
887
|
);
|
|
@@ -892,19 +892,19 @@ async function reportResults(context) {
|
|
|
892
892
|
}
|
|
893
893
|
async function cleanOutputPath(context) {
|
|
894
894
|
if (context.clean !== false && context.outputPath) {
|
|
895
|
-
|
|
895
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0,
|
|
896
896
|
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
897
897
|
context.workspaceConfig
|
|
898
898
|
);
|
|
899
|
-
const stopwatch =
|
|
899
|
+
const stopwatch = _chunkPVFVZPEMjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
900
900
|
await cleanDirectories(context.outputPath);
|
|
901
901
|
stopwatch();
|
|
902
902
|
}
|
|
903
903
|
return context;
|
|
904
904
|
}
|
|
905
905
|
async function build(options) {
|
|
906
|
-
|
|
907
|
-
const stopwatch =
|
|
906
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
907
|
+
const stopwatch = _chunkPVFVZPEMjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
908
908
|
try {
|
|
909
909
|
const opts = Array.isArray(options) ? options : [options];
|
|
910
910
|
if (opts.length === 0) {
|
|
@@ -919,9 +919,9 @@ async function build(options) {
|
|
|
919
919
|
executeTsup(context)
|
|
920
920
|
]);
|
|
921
921
|
await reportResults(context);
|
|
922
|
-
|
|
922
|
+
_chunkPVFVZPEMjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
923
923
|
} catch (error) {
|
|
924
|
-
|
|
924
|
+
_chunkPVFVZPEMjs.writeFatal.call(void 0,
|
|
925
925
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
926
926
|
);
|
|
927
927
|
throw error;
|
|
@@ -932,7 +932,7 @@ async function build(options) {
|
|
|
932
932
|
|
|
933
933
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
934
934
|
async function esbuildExecutorFn(options, context, config5) {
|
|
935
|
-
|
|
935
|
+
_chunkPVFVZPEMjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config5);
|
|
936
936
|
if (!_optionalChain([context, 'access', _44 => _44.projectsConfigurations, 'optionalAccess', _45 => _45.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _46 => _46.projectsConfigurations, 'access', _47 => _47.projects, 'access', _48 => _48[context.projectName], 'optionalAccess', _49 => _49.root])) {
|
|
937
937
|
throw new Error(
|
|
938
938
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -953,7 +953,7 @@ async function esbuildExecutorFn(options, context, config5) {
|
|
|
953
953
|
success: true
|
|
954
954
|
};
|
|
955
955
|
}
|
|
956
|
-
var executor_default6 =
|
|
956
|
+
var executor_default6 = _chunkPVFVZPEMjs.withRunExecutor.call(void 0,
|
|
957
957
|
"Storm ESBuild build",
|
|
958
958
|
esbuildExecutorFn,
|
|
959
959
|
{
|
|
@@ -1083,14 +1083,14 @@ async function sizeLimitExecutorFn(options, context, config5) {
|
|
|
1083
1083
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
1084
1084
|
);
|
|
1085
1085
|
}
|
|
1086
|
-
|
|
1086
|
+
_chunkPVFVZPEMjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config5);
|
|
1087
1087
|
_sizelimit2.default.call(void 0, [_file2.default, _esbuild2.default, _esbuildwhy2.default], {
|
|
1088
1088
|
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _61 => _61.projectsConfigurations, 'access', _62 => _62.projects, 'access', _63 => _63[context.projectName], 'optionalAccess', _64 => _64.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0,
|
|
1089
1089
|
_nullishCoalesce(_optionalChain([context, 'access', _65 => _65.projectsConfigurations, 'access', _66 => _66.projects, 'access', _67 => _67[context.projectName], 'optionalAccess', _68 => _68.root]), () => ( "./")),
|
|
1090
1090
|
"src"
|
|
1091
1091
|
)))
|
|
1092
1092
|
}).then((result) => {
|
|
1093
|
-
|
|
1093
|
+
_chunkPVFVZPEMjs.writeInfo.call(void 0,
|
|
1094
1094
|
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
1095
1095
|
config5
|
|
1096
1096
|
);
|
|
@@ -1099,7 +1099,7 @@ async function sizeLimitExecutorFn(options, context, config5) {
|
|
|
1099
1099
|
success: true
|
|
1100
1100
|
};
|
|
1101
1101
|
}
|
|
1102
|
-
var executor_default7 =
|
|
1102
|
+
var executor_default7 = _chunkPVFVZPEMjs.withRunExecutor.call(void 0,
|
|
1103
1103
|
"Size-Limit Performance Test Executor",
|
|
1104
1104
|
sizeLimitExecutorFn,
|
|
1105
1105
|
{
|
|
@@ -1160,19 +1160,19 @@ function toTSDownFormat(format4) {
|
|
|
1160
1160
|
// ../tsdown/src/build.ts
|
|
1161
1161
|
var resolveOptions = async (userOptions) => {
|
|
1162
1162
|
const options = getDefaultOptions(userOptions);
|
|
1163
|
-
const workspaceRoot3 =
|
|
1163
|
+
const workspaceRoot3 = _chunkPVFVZPEMjs.findWorkspaceRoot.call(void 0, options.projectRoot);
|
|
1164
1164
|
if (!workspaceRoot3) {
|
|
1165
1165
|
throw new Error("Cannot find Nx workspace root");
|
|
1166
1166
|
}
|
|
1167
|
-
const workspaceConfig = await
|
|
1167
|
+
const workspaceConfig = await _chunkPVFVZPEMjs.getWorkspaceConfig.call(void 0, options.debug === true, {
|
|
1168
1168
|
workspaceRoot: workspaceRoot3
|
|
1169
1169
|
});
|
|
1170
|
-
|
|
1171
|
-
const stopwatch =
|
|
1170
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
1171
|
+
const stopwatch = _chunkPVFVZPEMjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1172
1172
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1173
1173
|
exitOnError: true
|
|
1174
1174
|
});
|
|
1175
|
-
const projectJsonPath =
|
|
1175
|
+
const projectJsonPath = _chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
1176
1176
|
workspaceRoot3,
|
|
1177
1177
|
options.projectRoot,
|
|
1178
1178
|
"project.json"
|
|
@@ -1189,7 +1189,7 @@ var resolveOptions = async (userOptions) => {
|
|
|
1189
1189
|
"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."
|
|
1190
1190
|
);
|
|
1191
1191
|
}
|
|
1192
|
-
const packageJsonPath =
|
|
1192
|
+
const packageJsonPath = _chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
1193
1193
|
workspaceRoot3,
|
|
1194
1194
|
options.projectRoot,
|
|
1195
1195
|
"package.json"
|
|
@@ -1198,13 +1198,13 @@ var resolveOptions = async (userOptions) => {
|
|
|
1198
1198
|
throw new Error("Cannot find package.json configuration");
|
|
1199
1199
|
}
|
|
1200
1200
|
const debug = _nullishCoalesce(options.debug, () => ( (options.mode || workspaceConfig.mode) === "development"));
|
|
1201
|
-
const sourceRoot = projectJson.sourceRoot ||
|
|
1201
|
+
const sourceRoot = projectJson.sourceRoot || _chunkPVFVZPEMjs.joinPaths.call(void 0, options.projectRoot, "src");
|
|
1202
1202
|
const result = {
|
|
1203
1203
|
name: projectName,
|
|
1204
1204
|
mode: "production",
|
|
1205
1205
|
target: DEFAULT_TARGET,
|
|
1206
1206
|
generatePackageJson: true,
|
|
1207
|
-
outDir:
|
|
1207
|
+
outDir: _chunkPVFVZPEMjs.joinPaths.call(void 0, "dist", options.projectRoot),
|
|
1208
1208
|
minify: !debug,
|
|
1209
1209
|
plugins: [],
|
|
1210
1210
|
assets: [],
|
|
@@ -1216,12 +1216,12 @@ var resolveOptions = async (userOptions) => {
|
|
|
1216
1216
|
clean: false,
|
|
1217
1217
|
fixedExtension: true,
|
|
1218
1218
|
nodeProtocol: true,
|
|
1219
|
-
tsconfig:
|
|
1219
|
+
tsconfig: _chunkPVFVZPEMjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
1220
1220
|
debug,
|
|
1221
1221
|
sourceRoot,
|
|
1222
1222
|
cwd: workspaceConfig.workspaceRoot,
|
|
1223
1223
|
entry: {
|
|
1224
|
-
["index"]:
|
|
1224
|
+
["index"]: _chunkPVFVZPEMjs.joinPaths.call(void 0, sourceRoot, "index.ts")
|
|
1225
1225
|
},
|
|
1226
1226
|
workspace: true,
|
|
1227
1227
|
...options,
|
|
@@ -1240,15 +1240,15 @@ var resolveOptions = async (userOptions) => {
|
|
|
1240
1240
|
return result;
|
|
1241
1241
|
};
|
|
1242
1242
|
async function generatePackageJson2(options) {
|
|
1243
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1244
|
-
|
|
1245
|
-
const stopwatch =
|
|
1246
|
-
const packageJsonPath =
|
|
1243
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkPVFVZPEMjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1244
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.workspaceConfig);
|
|
1245
|
+
const stopwatch = _chunkPVFVZPEMjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1246
|
+
const packageJsonPath = _chunkPVFVZPEMjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1247
1247
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1248
1248
|
throw new Error("Cannot find package.json configuration");
|
|
1249
1249
|
}
|
|
1250
1250
|
const packageJsonFile = await _promises2.default.readFile(
|
|
1251
|
-
|
|
1251
|
+
_chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
1252
1252
|
options.workspaceConfig.workspaceRoot,
|
|
1253
1253
|
options.projectRoot,
|
|
1254
1254
|
"package.json"
|
|
@@ -1310,14 +1310,14 @@ async function generatePackageJson2(options) {
|
|
|
1310
1310
|
},
|
|
1311
1311
|
packageJson.exports
|
|
1312
1312
|
);
|
|
1313
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1313
|
+
await _devkit.writeJsonFile.call(void 0, _chunkPVFVZPEMjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
1314
1314
|
stopwatch();
|
|
1315
1315
|
}
|
|
1316
1316
|
return options;
|
|
1317
1317
|
}
|
|
1318
1318
|
async function executeTSDown(options) {
|
|
1319
|
-
|
|
1320
|
-
const stopwatch =
|
|
1319
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.workspaceConfig);
|
|
1320
|
+
const stopwatch = _chunkPVFVZPEMjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1321
1321
|
await _tsdown.build.call(void 0, {
|
|
1322
1322
|
...options,
|
|
1323
1323
|
entry: options.entry,
|
|
@@ -1327,11 +1327,11 @@ async function executeTSDown(options) {
|
|
|
1327
1327
|
return options;
|
|
1328
1328
|
}
|
|
1329
1329
|
async function copyBuildAssets2(options) {
|
|
1330
|
-
|
|
1330
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0,
|
|
1331
1331
|
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
1332
1332
|
options.workspaceConfig
|
|
1333
1333
|
);
|
|
1334
|
-
const stopwatch =
|
|
1334
|
+
const stopwatch = _chunkPVFVZPEMjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1335
1335
|
await copyAssets(
|
|
1336
1336
|
options.workspaceConfig,
|
|
1337
1337
|
_nullishCoalesce(options.assets, () => ( [])),
|
|
@@ -1345,18 +1345,18 @@ async function copyBuildAssets2(options) {
|
|
|
1345
1345
|
return options;
|
|
1346
1346
|
}
|
|
1347
1347
|
async function reportResults2(options) {
|
|
1348
|
-
|
|
1348
|
+
_chunkPVFVZPEMjs.writeSuccess.call(void 0,
|
|
1349
1349
|
` \u{1F4E6} The ${options.name} build completed successfully`,
|
|
1350
1350
|
options.workspaceConfig
|
|
1351
1351
|
);
|
|
1352
1352
|
}
|
|
1353
1353
|
async function cleanOutputPath2(options) {
|
|
1354
1354
|
if (options.clean !== false && options.workspaceConfig) {
|
|
1355
|
-
|
|
1355
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0,
|
|
1356
1356
|
` \u{1F9F9} Cleaning ${options.name} output path: ${options.workspaceConfig}`,
|
|
1357
1357
|
options.workspaceConfig
|
|
1358
1358
|
);
|
|
1359
|
-
const stopwatch =
|
|
1359
|
+
const stopwatch = _chunkPVFVZPEMjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1360
1360
|
await cleanDirectories2(
|
|
1361
1361
|
options.name,
|
|
1362
1362
|
options.outDir,
|
|
@@ -1367,8 +1367,8 @@ async function cleanOutputPath2(options) {
|
|
|
1367
1367
|
return options;
|
|
1368
1368
|
}
|
|
1369
1369
|
async function build2(options) {
|
|
1370
|
-
|
|
1371
|
-
const stopwatch =
|
|
1370
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1371
|
+
const stopwatch = _chunkPVFVZPEMjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1372
1372
|
try {
|
|
1373
1373
|
const opts = Array.isArray(options) ? options : [options];
|
|
1374
1374
|
if (opts.length === 0) {
|
|
@@ -1388,13 +1388,13 @@ async function build2(options) {
|
|
|
1388
1388
|
})
|
|
1389
1389
|
);
|
|
1390
1390
|
} else {
|
|
1391
|
-
|
|
1391
|
+
_chunkPVFVZPEMjs.writeWarning.call(void 0,
|
|
1392
1392
|
" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function."
|
|
1393
1393
|
);
|
|
1394
1394
|
}
|
|
1395
|
-
|
|
1395
|
+
_chunkPVFVZPEMjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1396
1396
|
} catch (error) {
|
|
1397
|
-
|
|
1397
|
+
_chunkPVFVZPEMjs.writeFatal.call(void 0,
|
|
1398
1398
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1399
1399
|
);
|
|
1400
1400
|
throw error;
|
|
@@ -1405,7 +1405,7 @@ async function build2(options) {
|
|
|
1405
1405
|
|
|
1406
1406
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1407
1407
|
async function tsdownExecutorFn(options, context, config5) {
|
|
1408
|
-
|
|
1408
|
+
_chunkPVFVZPEMjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown executor on the workspace", config5);
|
|
1409
1409
|
if (!_optionalChain([context, 'access', _71 => _71.projectsConfigurations, 'optionalAccess', _72 => _72.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _73 => _73.projectsConfigurations, 'access', _74 => _74.projects, 'access', _75 => _75[context.projectName], 'optionalAccess', _76 => _76.root])) {
|
|
1410
1410
|
throw new Error(
|
|
1411
1411
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1426,7 +1426,7 @@ async function tsdownExecutorFn(options, context, config5) {
|
|
|
1426
1426
|
success: true
|
|
1427
1427
|
};
|
|
1428
1428
|
}
|
|
1429
|
-
var executor_default8 =
|
|
1429
|
+
var executor_default8 = _chunkPVFVZPEMjs.withRunExecutor.call(void 0,
|
|
1430
1430
|
"Storm TSDown build",
|
|
1431
1431
|
tsdownExecutorFn,
|
|
1432
1432
|
{
|
|
@@ -1447,12 +1447,12 @@ var _fsextra = require('fs-extra');
|
|
|
1447
1447
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1448
1448
|
async function typiaExecutorFn(options, _, config5) {
|
|
1449
1449
|
if (options.clean !== false) {
|
|
1450
|
-
|
|
1450
|
+
_chunkPVFVZPEMjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config5);
|
|
1451
1451
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1452
1452
|
}
|
|
1453
1453
|
await Promise.all(
|
|
1454
1454
|
options.entry.map((entry) => {
|
|
1455
|
-
|
|
1455
|
+
_chunkPVFVZPEMjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config5);
|
|
1456
1456
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1457
1457
|
input: entry,
|
|
1458
1458
|
output: options.outputPath,
|
|
@@ -1464,7 +1464,7 @@ async function typiaExecutorFn(options, _, config5) {
|
|
|
1464
1464
|
success: true
|
|
1465
1465
|
};
|
|
1466
1466
|
}
|
|
1467
|
-
var executor_default9 =
|
|
1467
|
+
var executor_default9 = _chunkPVFVZPEMjs.withRunExecutor.call(void 0,
|
|
1468
1468
|
"Typia runtime validation generator",
|
|
1469
1469
|
typiaExecutorFn,
|
|
1470
1470
|
{
|
|
@@ -1485,7 +1485,7 @@ var executor_default9 = _chunkBE5TKL2Fjs.withRunExecutor.call(void 0,
|
|
|
1485
1485
|
|
|
1486
1486
|
var _jiti = require('jiti');
|
|
1487
1487
|
async function unbuildExecutorFn(options, context, config5) {
|
|
1488
|
-
|
|
1488
|
+
_chunkPVFVZPEMjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config5);
|
|
1489
1489
|
if (!_optionalChain([context, 'access', _85 => _85.projectsConfigurations, 'optionalAccess', _86 => _86.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1490
1490
|
throw new Error(
|
|
1491
1491
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
@@ -1502,7 +1502,7 @@ async function unbuildExecutorFn(options, context, config5) {
|
|
|
1502
1502
|
);
|
|
1503
1503
|
}
|
|
1504
1504
|
const jiti = _jiti.createJiti.call(void 0, config5.workspaceRoot, {
|
|
1505
|
-
fsCache: config5.skipCache ? false :
|
|
1505
|
+
fsCache: config5.skipCache ? false : _chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
1506
1506
|
config5.workspaceRoot,
|
|
1507
1507
|
config5.directories.cache || "node_modules/.cache/storm",
|
|
1508
1508
|
"jiti"
|
|
@@ -1524,7 +1524,7 @@ async function unbuildExecutorFn(options, context, config5) {
|
|
|
1524
1524
|
{
|
|
1525
1525
|
stubOptions: {
|
|
1526
1526
|
jiti: {
|
|
1527
|
-
fsCache: config5.skipCache ? false :
|
|
1527
|
+
fsCache: config5.skipCache ? false : _chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
1528
1528
|
config5.workspaceRoot,
|
|
1529
1529
|
config5.directories.cache || "node_modules/.cache/storm",
|
|
1530
1530
|
"jiti"
|
|
@@ -1553,7 +1553,7 @@ async function unbuildExecutorFn(options, context, config5) {
|
|
|
1553
1553
|
success: true
|
|
1554
1554
|
};
|
|
1555
1555
|
}
|
|
1556
|
-
var executor_default10 =
|
|
1556
|
+
var executor_default10 = _chunkPVFVZPEMjs.withRunExecutor.call(void 0,
|
|
1557
1557
|
"TypeScript Unbuild build",
|
|
1558
1558
|
unbuildExecutorFn,
|
|
1559
1559
|
{
|
|
@@ -1584,45 +1584,45 @@ var executor_default10 = _chunkBE5TKL2Fjs.withRunExecutor.call(void 0,
|
|
|
1584
1584
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
1585
1585
|
skipReadingConfig: false
|
|
1586
1586
|
}) => async (tree, _options) => {
|
|
1587
|
-
const stopwatch =
|
|
1587
|
+
const stopwatch = _chunkPVFVZPEMjs.getStopwatch.call(void 0, name);
|
|
1588
1588
|
let options = _options;
|
|
1589
1589
|
let config5;
|
|
1590
1590
|
try {
|
|
1591
|
-
|
|
1591
|
+
_chunkPVFVZPEMjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
1592
1592
|
|
|
1593
1593
|
`, config5);
|
|
1594
|
-
const workspaceRoot3 =
|
|
1594
|
+
const workspaceRoot3 = _chunkPVFVZPEMjs.findWorkspaceRoot.call(void 0, );
|
|
1595
1595
|
if (!generatorOptions.skipReadingConfig) {
|
|
1596
|
-
|
|
1596
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0,
|
|
1597
1597
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1598
1598
|
- workspaceRoot: ${workspaceRoot3}`,
|
|
1599
1599
|
config5
|
|
1600
1600
|
);
|
|
1601
|
-
config5 = await
|
|
1601
|
+
config5 = await _chunkPVFVZPEMjs.getConfig.call(void 0, workspaceRoot3);
|
|
1602
1602
|
}
|
|
1603
1603
|
if (_optionalChain([generatorOptions, 'optionalAccess', _87 => _87.hooks, 'optionalAccess', _88 => _88.applyDefaultOptions])) {
|
|
1604
|
-
|
|
1604
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config5);
|
|
1605
1605
|
options = await Promise.resolve(
|
|
1606
1606
|
generatorOptions.hooks.applyDefaultOptions(options, config5)
|
|
1607
1607
|
);
|
|
1608
|
-
|
|
1608
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config5);
|
|
1609
1609
|
}
|
|
1610
|
-
|
|
1610
|
+
_chunkPVFVZPEMjs.writeTrace.call(void 0,
|
|
1611
1611
|
`Generator schema options \u2699\uFE0F
|
|
1612
1612
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
1613
1613
|
config5
|
|
1614
1614
|
);
|
|
1615
|
-
const tokenized = await
|
|
1615
|
+
const tokenized = await _chunkPVFVZPEMjs.applyWorkspaceTokens.call(void 0,
|
|
1616
1616
|
options,
|
|
1617
1617
|
{ workspaceRoot: tree.root, config: config5 },
|
|
1618
|
-
|
|
1618
|
+
_chunkPVFVZPEMjs.applyWorkspaceBaseTokens
|
|
1619
1619
|
);
|
|
1620
1620
|
if (_optionalChain([generatorOptions, 'optionalAccess', _89 => _89.hooks, 'optionalAccess', _90 => _90.preProcess])) {
|
|
1621
|
-
|
|
1621
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0, "Running the preProcess hook...", config5);
|
|
1622
1622
|
await Promise.resolve(
|
|
1623
1623
|
generatorOptions.hooks.preProcess(tokenized, config5)
|
|
1624
1624
|
);
|
|
1625
|
-
|
|
1625
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0, "Completed the preProcess hook", config5);
|
|
1626
1626
|
}
|
|
1627
1627
|
const result = await Promise.resolve(
|
|
1628
1628
|
generatorFn(tree, tokenized, config5)
|
|
@@ -1637,21 +1637,21 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1637
1637
|
}
|
|
1638
1638
|
}
|
|
1639
1639
|
if (_optionalChain([generatorOptions, 'optionalAccess', _100 => _100.hooks, 'optionalAccess', _101 => _101.postProcess])) {
|
|
1640
|
-
|
|
1640
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0, "Running the postProcess hook...", config5);
|
|
1641
1641
|
await Promise.resolve(generatorOptions.hooks.postProcess(config5));
|
|
1642
|
-
|
|
1642
|
+
_chunkPVFVZPEMjs.writeDebug.call(void 0, "Completed the postProcess hook", config5);
|
|
1643
1643
|
}
|
|
1644
1644
|
return () => {
|
|
1645
|
-
|
|
1645
|
+
_chunkPVFVZPEMjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
1646
1646
|
`, config5);
|
|
1647
1647
|
};
|
|
1648
1648
|
} catch (error) {
|
|
1649
1649
|
return () => {
|
|
1650
|
-
|
|
1650
|
+
_chunkPVFVZPEMjs.writeFatal.call(void 0,
|
|
1651
1651
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
1652
1652
|
config5
|
|
1653
1653
|
);
|
|
1654
|
-
|
|
1654
|
+
_chunkPVFVZPEMjs.writeError.call(void 0,
|
|
1655
1655
|
`An exception was thrown in the generator's process
|
|
1656
1656
|
- Details: ${error.message}
|
|
1657
1657
|
- Stacktrace: ${error.stack}`,
|
|
@@ -1717,16 +1717,16 @@ async function typeScriptLibraryGeneratorFn(tree, options, config5) {
|
|
|
1717
1717
|
const projectConfig = {
|
|
1718
1718
|
root: normalized.directory,
|
|
1719
1719
|
projectType: "library",
|
|
1720
|
-
sourceRoot:
|
|
1720
|
+
sourceRoot: _chunkPVFVZPEMjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
1721
1721
|
targets: {
|
|
1722
1722
|
build: {
|
|
1723
1723
|
executor: options.buildExecutor,
|
|
1724
1724
|
outputs: ["{options.outputPath}"],
|
|
1725
1725
|
options: {
|
|
1726
|
-
entry: [
|
|
1726
|
+
entry: [_chunkPVFVZPEMjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
|
|
1727
1727
|
outputPath: getOutputPath(normalized),
|
|
1728
|
-
tsconfig:
|
|
1729
|
-
project:
|
|
1728
|
+
tsconfig: _chunkPVFVZPEMjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
1729
|
+
project: _chunkPVFVZPEMjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
1730
1730
|
defaultConfiguration: "production",
|
|
1731
1731
|
platform: "neutral",
|
|
1732
1732
|
assets: [
|
|
@@ -1783,7 +1783,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config5) {
|
|
|
1783
1783
|
if (!normalized.importPath) {
|
|
1784
1784
|
normalized.importPath = normalized.name;
|
|
1785
1785
|
}
|
|
1786
|
-
const packageJsonPath =
|
|
1786
|
+
const packageJsonPath = _chunkPVFVZPEMjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
1787
1787
|
if (tree.exists(packageJsonPath)) {
|
|
1788
1788
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
1789
1789
|
if (!normalized.importPath) {
|
|
@@ -1840,14 +1840,14 @@ async function typeScriptLibraryGeneratorFn(tree, options, config5) {
|
|
|
1840
1840
|
}));
|
|
1841
1841
|
}
|
|
1842
1842
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
1843
|
-
|
|
1843
|
+
_chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
1844
1844
|
normalized.projectRoot,
|
|
1845
1845
|
"./src",
|
|
1846
1846
|
`index.${normalized.js ? "js" : "ts"}`
|
|
1847
1847
|
)
|
|
1848
1848
|
]);
|
|
1849
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
1850
|
-
|
|
1849
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkPVFVZPEMjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
1850
|
+
_chunkPVFVZPEMjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
1851
1851
|
]);
|
|
1852
1852
|
if (tree.exists("package.json")) {
|
|
1853
1853
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -1858,7 +1858,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config5) {
|
|
|
1858
1858
|
description = packageJson.description;
|
|
1859
1859
|
}
|
|
1860
1860
|
}
|
|
1861
|
-
const tsconfigPath =
|
|
1861
|
+
const tsconfigPath = _chunkPVFVZPEMjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
1862
1862
|
if (tree.exists(tsconfigPath)) {
|
|
1863
1863
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
1864
1864
|
json.composite ??= true;
|
|
@@ -1886,7 +1886,7 @@ function getOutputPath(options) {
|
|
|
1886
1886
|
} else {
|
|
1887
1887
|
parts.push(options.projectRoot);
|
|
1888
1888
|
}
|
|
1889
|
-
return
|
|
1889
|
+
return _chunkPVFVZPEMjs.joinPaths.call(void 0, ...parts);
|
|
1890
1890
|
}
|
|
1891
1891
|
function createProjectTsConfigJson(tree, options) {
|
|
1892
1892
|
const tsconfig = {
|
|
@@ -1894,7 +1894,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
1894
1894
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _116 => _116.tsconfigOptions]), () => ( {})),
|
|
1895
1895
|
compilerOptions: {
|
|
1896
1896
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
1897
|
-
outDir:
|
|
1897
|
+
outDir: _chunkPVFVZPEMjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
1898
1898
|
noEmit: true,
|
|
1899
1899
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _117 => _117.tsconfigOptions, 'optionalAccess', _118 => _118.compilerOptions]), () => ( {}))
|
|
1900
1900
|
},
|
|
@@ -1912,7 +1912,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
1912
1912
|
"src/**/*.test.ts"
|
|
1913
1913
|
]
|
|
1914
1914
|
};
|
|
1915
|
-
_devkit.writeJson.call(void 0, tree,
|
|
1915
|
+
_devkit.writeJson.call(void 0, tree, _chunkPVFVZPEMjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
1916
1916
|
}
|
|
1917
1917
|
async function normalizeOptions(tree, options, config5) {
|
|
1918
1918
|
let importPath = options.importPath;
|
|
@@ -1977,7 +1977,7 @@ async function normalizeOptions(tree, options, config5) {
|
|
|
1977
1977
|
|
|
1978
1978
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
1979
1979
|
async function browserLibraryGeneratorFn(tree, schema, config5) {
|
|
1980
|
-
const filesDir =
|
|
1980
|
+
const filesDir = _chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
1981
1981
|
__dirname,
|
|
1982
1982
|
"src",
|
|
1983
1983
|
"generators",
|
|
@@ -2060,38 +2060,38 @@ var generator_default = withRunGenerator(
|
|
|
2060
2060
|
|
|
2061
2061
|
var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
|
|
2062
2062
|
async function configSchemaGeneratorFn(tree, options, config5) {
|
|
2063
|
-
|
|
2063
|
+
_chunkPVFVZPEMjs.writeInfo.call(void 0,
|
|
2064
2064
|
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
2065
2065
|
config5
|
|
2066
2066
|
);
|
|
2067
|
-
|
|
2067
|
+
_chunkPVFVZPEMjs.writeTrace.call(void 0,
|
|
2068
2068
|
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
2069
2069
|
config5
|
|
2070
2070
|
);
|
|
2071
|
-
const jsonSchema = z.toJSONSchema(
|
|
2071
|
+
const jsonSchema = z.toJSONSchema(_chunkPVFVZPEMjs.workspaceConfigSchema, {
|
|
2072
2072
|
target: "draft-7",
|
|
2073
|
-
metadata:
|
|
2073
|
+
metadata: _chunkPVFVZPEMjs.schemaRegistry
|
|
2074
2074
|
});
|
|
2075
2075
|
jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
|
|
2076
2076
|
jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
|
|
2077
2077
|
jsonSchema.description ??= "This JSON Schema defines the structure of the Storm Workspace configuration file (`storm-workspace.json`). It is used to validate the configuration file and ensure that it adheres to the expected format.";
|
|
2078
|
-
|
|
2078
|
+
_chunkPVFVZPEMjs.writeTrace.call(void 0, jsonSchema, config5);
|
|
2079
2079
|
if (!options.outputFile) {
|
|
2080
2080
|
throw new Error(
|
|
2081
2081
|
"The `outputFile` option is required. Please specify the output file path."
|
|
2082
2082
|
);
|
|
2083
2083
|
}
|
|
2084
2084
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
2085
|
-
_nullishCoalesce(_optionalChain([config5, 'optionalAccess', _127 => _127.workspaceRoot]), () => (
|
|
2085
|
+
_nullishCoalesce(_optionalChain([config5, 'optionalAccess', _127 => _127.workspaceRoot]), () => ( _chunkPVFVZPEMjs.findWorkspaceRoot.call(void 0, ))),
|
|
2086
2086
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
2087
2087
|
);
|
|
2088
|
-
|
|
2088
|
+
_chunkPVFVZPEMjs.writeTrace.call(void 0,
|
|
2089
2089
|
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
2090
2090
|
config5
|
|
2091
2091
|
);
|
|
2092
2092
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
2093
2093
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2094
|
-
|
|
2094
|
+
_chunkPVFVZPEMjs.writeSuccess.call(void 0,
|
|
2095
2095
|
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
2096
2096
|
config5
|
|
2097
2097
|
);
|
|
@@ -2147,7 +2147,7 @@ async function initGenerator(tree, schema) {
|
|
|
2147
2147
|
|
|
2148
2148
|
|
|
2149
2149
|
async function neutralLibraryGeneratorFn(tree, schema, config5) {
|
|
2150
|
-
const filesDir =
|
|
2150
|
+
const filesDir = _chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
2151
2151
|
__dirname,
|
|
2152
2152
|
"src",
|
|
2153
2153
|
"generators",
|
|
@@ -2206,7 +2206,7 @@ var generator_default3 = withRunGenerator(
|
|
|
2206
2206
|
|
|
2207
2207
|
|
|
2208
2208
|
async function nodeLibraryGeneratorFn(tree, schema, config5) {
|
|
2209
|
-
const filesDir =
|
|
2209
|
+
const filesDir = _chunkPVFVZPEMjs.joinPaths.call(void 0,
|
|
2210
2210
|
__dirname,
|
|
2211
2211
|
"src",
|
|
2212
2212
|
"generators",
|