@storm-software/terraform-tools 0.62.12 → 0.62.14
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-WFAKWGXA.js → chunk-37MGUMWD.js} +12 -0
- package/dist/{chunk-CKIMQIWP.mjs → chunk-7NK773UQ.mjs} +12 -0
- package/dist/{chunk-VDAWVSN6.js → chunk-E4HJXG4G.js} +178 -118
- package/dist/{chunk-TXJ44D5O.mjs → chunk-FSWZT3BT.mjs} +1 -1
- package/dist/{chunk-C5VKA26O.mjs → chunk-IGPTNPTU.mjs} +1 -1
- package/dist/{chunk-A6YND2BU.js → chunk-IU6VUV4H.js} +2 -2
- package/dist/{chunk-VFJBGAJA.js → chunk-JE5CFXYT.js} +2 -2
- package/dist/{chunk-R2LPQYBA.mjs → chunk-L3PVSBJE.mjs} +1 -1
- package/dist/{chunk-OBJXBSXN.js → chunk-NE6UXXXJ.js} +2 -2
- package/dist/{chunk-VDGQVQKE.js → chunk-NU2U34L5.js} +2 -2
- package/dist/{chunk-TFRWPS5M.mjs → chunk-O5LMGQZ4.mjs} +73 -13
- package/dist/{chunk-OVEZ53VK.mjs → chunk-OHLLDMOL.mjs} +1 -1
- package/dist/{chunk-AAJDFJYK.js → chunk-OVAEG5B6.js} +2 -2
- package/dist/{chunk-Z235AGW2.mjs → chunk-SDFTWIXT.mjs} +1 -1
- package/dist/executors.js +6 -6
- package/dist/executors.mjs +6 -6
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +2 -2
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/src/base/index.js +3 -3
- package/dist/src/base/index.mjs +2 -2
- package/dist/src/base/terraform-executor.js +3 -3
- package/dist/src/base/terraform-executor.mjs +2 -2
- package/dist/src/executors/apply/executor.js +4 -4
- package/dist/src/executors/apply/executor.mjs +3 -3
- package/dist/src/executors/destroy/executor.js +4 -4
- package/dist/src/executors/destroy/executor.mjs +3 -3
- package/dist/src/executors/output/executor.js +4 -4
- package/dist/src/executors/output/executor.mjs +3 -3
- package/dist/src/executors/plan/executor.js +4 -4
- package/dist/src/executors/plan/executor.mjs +3 -3
- package/dist/src/generators/init/init.js +3 -3
- package/dist/src/generators/init/init.mjs +2 -2
- package/package.json +2 -2
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunk37MGUMWDjs = require('./chunk-37MGUMWD.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 = _chunk37MGUMWDjs.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 = _chunk37MGUMWDjs.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 = _chunk37MGUMWDjs.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 = _chunk37MGUMWDjs.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 = _chunk37MGUMWDjs.withRunExecutor.call(void 0,
|
|
236
236
|
"Cargo - Format",
|
|
237
237
|
cargoFormatExecutor,
|
|
238
238
|
{
|
|
@@ -307,9 +307,9 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
307
307
|
output: "src/"
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
|
-
|
|
310
|
+
_chunk37MGUMWDjs.writeTrace.call(void 0,
|
|
311
311
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
312
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
312
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunk37MGUMWDjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
313
313
|
config
|
|
314
314
|
);
|
|
315
315
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
@@ -319,20 +319,20 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
319
319
|
assets: pendingAssets
|
|
320
320
|
});
|
|
321
321
|
await assetHandler.processAllAssetsOnce();
|
|
322
|
-
|
|
322
|
+
_chunk37MGUMWDjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
323
323
|
if (includeSrc === true) {
|
|
324
|
-
|
|
325
|
-
`\u{1F4DD} Adding banner and writing source files: ${
|
|
324
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0,
|
|
325
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
326
326
|
outputPath,
|
|
327
327
|
"src"
|
|
328
328
|
)}`,
|
|
329
329
|
config
|
|
330
330
|
);
|
|
331
331
|
const files = await _glob.glob.call(void 0, [
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
332
|
+
_chunk37MGUMWDjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
333
|
+
_chunk37MGUMWDjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
334
|
+
_chunk37MGUMWDjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
335
|
+
_chunk37MGUMWDjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
336
336
|
]);
|
|
337
337
|
await Promise.allSettled(
|
|
338
338
|
files.map(
|
|
@@ -387,7 +387,7 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
387
387
|
)) {
|
|
388
388
|
const projectNode = project.node;
|
|
389
389
|
if (projectNode.data.root) {
|
|
390
|
-
const projectPackageJsonPath =
|
|
390
|
+
const projectPackageJsonPath = _chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
391
391
|
workspaceRoot3,
|
|
392
392
|
projectNode.data.root,
|
|
393
393
|
"package.json"
|
|
@@ -405,11 +405,11 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
if (localPackages.length > 0) {
|
|
408
|
-
|
|
408
|
+
_chunk37MGUMWDjs.writeTrace.call(void 0,
|
|
409
409
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
410
410
|
);
|
|
411
411
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
412
|
-
|
|
412
|
+
_chunk37MGUMWDjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
413
413
|
"utf8"
|
|
414
414
|
);
|
|
415
415
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -422,7 +422,7 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
422
422
|
}
|
|
423
423
|
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) => {
|
|
424
424
|
if (_optionalChain([projectConfigurations, 'access', _18 => _18.projects, 'optionalAccess', _19 => _19[dep]])) {
|
|
425
|
-
const depPackageJsonPath =
|
|
425
|
+
const depPackageJsonPath = _chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
426
426
|
workspaceRoot3,
|
|
427
427
|
projectConfigurations.projects[dep].root,
|
|
428
428
|
"package.json"
|
|
@@ -453,14 +453,14 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
453
453
|
return ret;
|
|
454
454
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
455
455
|
} else {
|
|
456
|
-
|
|
456
|
+
_chunk37MGUMWDjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
457
457
|
}
|
|
458
458
|
return packageJson;
|
|
459
459
|
};
|
|
460
460
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
461
|
-
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
461
|
+
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunk37MGUMWDjs.findWorkspaceRoot.call(void 0, );
|
|
462
462
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
463
|
-
|
|
463
|
+
_chunk37MGUMWDjs.joinPaths.call(void 0, workspaceRoot3, "package.json"),
|
|
464
464
|
"utf8"
|
|
465
465
|
);
|
|
466
466
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -471,7 +471,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
471
471
|
if (distSrc.startsWith("/")) {
|
|
472
472
|
distSrc = distSrc.substring(1);
|
|
473
473
|
}
|
|
474
|
-
packageJson.source ??= `${
|
|
474
|
+
packageJson.source ??= `${_chunk37MGUMWDjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
475
475
|
}
|
|
476
476
|
packageJson.files ??= ["dist/**/*"];
|
|
477
477
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -496,7 +496,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
496
496
|
packageJson.contributors = [packageJson.author];
|
|
497
497
|
}
|
|
498
498
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
499
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
499
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk37MGUMWDjs.joinPaths.call(void 0, "packages", projectName);
|
|
500
500
|
return packageJson;
|
|
501
501
|
};
|
|
502
502
|
|
|
@@ -530,11 +530,11 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
|
530
530
|
// ../esbuild/src/assets.ts
|
|
531
531
|
async function copyBuildAssets(context) {
|
|
532
532
|
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])) {
|
|
533
|
-
|
|
533
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0,
|
|
534
534
|
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
|
|
535
535
|
context.workspaceConfig
|
|
536
536
|
);
|
|
537
|
-
const stopwatch =
|
|
537
|
+
const stopwatch = _chunk37MGUMWDjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
538
538
|
await copyAssets(
|
|
539
539
|
context.workspaceConfig,
|
|
540
540
|
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
@@ -615,15 +615,15 @@ async function resolveContext(userOptions) {
|
|
|
615
615
|
if (!workspaceRoot3) {
|
|
616
616
|
throw new Error("Cannot find Nx workspace root");
|
|
617
617
|
}
|
|
618
|
-
const workspaceConfig = await
|
|
618
|
+
const workspaceConfig = await _chunk37MGUMWDjs.getWorkspaceConfig.call(void 0, true, {
|
|
619
619
|
workspaceRoot: workspaceRoot3.dir
|
|
620
620
|
});
|
|
621
|
-
|
|
622
|
-
const stopwatch =
|
|
621
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
622
|
+
const stopwatch = _chunk37MGUMWDjs.getStopwatch.call(void 0, "Build options resolution");
|
|
623
623
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
624
624
|
exitOnError: true
|
|
625
625
|
});
|
|
626
|
-
const projectJsonPath =
|
|
626
|
+
const projectJsonPath = _chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
627
627
|
workspaceRoot3.dir,
|
|
628
628
|
projectRoot,
|
|
629
629
|
"project.json"
|
|
@@ -642,7 +642,7 @@ async function resolveContext(userOptions) {
|
|
|
642
642
|
}
|
|
643
643
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
644
644
|
options.name ??= projectName;
|
|
645
|
-
const packageJsonPath =
|
|
645
|
+
const packageJsonPath = _chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
646
646
|
workspaceRoot3.dir,
|
|
647
647
|
options.projectRoot,
|
|
648
648
|
"package.json"
|
|
@@ -654,7 +654,7 @@ async function resolveContext(userOptions) {
|
|
|
654
654
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
655
655
|
const resolvedOptions = {
|
|
656
656
|
...options,
|
|
657
|
-
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig :
|
|
657
|
+
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : _chunk37MGUMWDjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "tsconfig.json"),
|
|
658
658
|
metafile: userOptions.mode === "development",
|
|
659
659
|
clean: false,
|
|
660
660
|
env,
|
|
@@ -679,8 +679,8 @@ async function resolveContext(userOptions) {
|
|
|
679
679
|
projectConfigurations,
|
|
680
680
|
projectName,
|
|
681
681
|
projectGraph,
|
|
682
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
683
|
-
outputPath: resolvedOptions.outputPath ||
|
|
682
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunk37MGUMWDjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
683
|
+
outputPath: resolvedOptions.outputPath || _chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
684
684
|
workspaceConfig.workspaceRoot,
|
|
685
685
|
"dist",
|
|
686
686
|
resolvedOptions.projectRoot
|
|
@@ -689,10 +689,10 @@ async function resolveContext(userOptions) {
|
|
|
689
689
|
};
|
|
690
690
|
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
691
691
|
if (context.options.verbose) {
|
|
692
|
-
|
|
692
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0,
|
|
693
693
|
` \u2699\uFE0F Build options resolved:
|
|
694
694
|
|
|
695
|
-
${
|
|
695
|
+
${_chunk37MGUMWDjs.formatLogMessage.call(void 0, context.options)}`,
|
|
696
696
|
workspaceConfig
|
|
697
697
|
);
|
|
698
698
|
}
|
|
@@ -704,10 +704,10 @@ ${_chunkWFAKWGXAjs.formatLogMessage.call(void 0, context.options)}`,
|
|
|
704
704
|
|
|
705
705
|
|
|
706
706
|
async function generatePackageJson(context) {
|
|
707
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
708
|
-
|
|
709
|
-
const stopwatch =
|
|
710
|
-
const packageJsonPath =
|
|
707
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunk37MGUMWDjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
708
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
709
|
+
const stopwatch = _chunk37MGUMWDjs.getStopwatch.call(void 0, "Write package.json file");
|
|
710
|
+
const packageJsonPath = _chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
711
711
|
context.options.projectRoot,
|
|
712
712
|
"project.json"
|
|
713
713
|
);
|
|
@@ -715,7 +715,7 @@ async function generatePackageJson(context) {
|
|
|
715
715
|
throw new Error("Cannot find package.json configuration");
|
|
716
716
|
}
|
|
717
717
|
const packageJsonFile = await _promises2.default.readFile(
|
|
718
|
-
|
|
718
|
+
_chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
719
719
|
context.workspaceConfig.workspaceRoot,
|
|
720
720
|
context.options.projectRoot,
|
|
721
721
|
"package.json"
|
|
@@ -821,7 +821,7 @@ async function generatePackageJson(context) {
|
|
|
821
821
|
}
|
|
822
822
|
}
|
|
823
823
|
await _devkit.writeJsonFile.call(void 0,
|
|
824
|
-
|
|
824
|
+
_chunk37MGUMWDjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
825
825
|
packageJson
|
|
826
826
|
);
|
|
827
827
|
stopwatch();
|
|
@@ -832,14 +832,14 @@ async function generatePackageJson(context) {
|
|
|
832
832
|
// ../esbuild/src/tsup.ts
|
|
833
833
|
var _tsup = require('tsup');
|
|
834
834
|
async function executeTsup(context) {
|
|
835
|
-
|
|
835
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0,
|
|
836
836
|
` \u{1F680} Running ${context.options.name} build`,
|
|
837
837
|
context.workspaceConfig
|
|
838
838
|
);
|
|
839
|
-
const stopwatch =
|
|
839
|
+
const stopwatch = _chunk37MGUMWDjs.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
840
840
|
await _tsup.build.call(void 0, {
|
|
841
841
|
...context.options,
|
|
842
|
-
outDir: context.options.distDir ?
|
|
842
|
+
outDir: context.options.distDir ? _chunk37MGUMWDjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
843
843
|
workspaceConfig: context.workspaceConfig
|
|
844
844
|
});
|
|
845
845
|
stopwatch();
|
|
@@ -850,17 +850,17 @@ async function executeTsup(context) {
|
|
|
850
850
|
async function reportResults(context) {
|
|
851
851
|
if (_optionalChain([context, 'access', _36 => _36.result, 'optionalAccess', _37 => _37.errors, 'access', _38 => _38.length]) === 0) {
|
|
852
852
|
if (context.result.warnings.length > 0) {
|
|
853
|
-
|
|
853
|
+
_chunk37MGUMWDjs.writeWarning.call(void 0,
|
|
854
854
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
855
855
|
context.workspaceConfig
|
|
856
856
|
);
|
|
857
857
|
}
|
|
858
|
-
|
|
858
|
+
_chunk37MGUMWDjs.writeSuccess.call(void 0,
|
|
859
859
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
860
860
|
context.workspaceConfig
|
|
861
861
|
);
|
|
862
862
|
} 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) {
|
|
863
|
-
|
|
863
|
+
_chunk37MGUMWDjs.writeError.call(void 0,
|
|
864
864
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
865
865
|
context.workspaceConfig
|
|
866
866
|
);
|
|
@@ -871,19 +871,19 @@ async function reportResults(context) {
|
|
|
871
871
|
}
|
|
872
872
|
async function cleanOutputPath(context) {
|
|
873
873
|
if (context.clean !== false && context.outputPath) {
|
|
874
|
-
|
|
874
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0,
|
|
875
875
|
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
876
876
|
context.workspaceConfig
|
|
877
877
|
);
|
|
878
|
-
const stopwatch =
|
|
878
|
+
const stopwatch = _chunk37MGUMWDjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
879
879
|
await cleanDirectories(context.outputPath);
|
|
880
880
|
stopwatch();
|
|
881
881
|
}
|
|
882
882
|
return context;
|
|
883
883
|
}
|
|
884
884
|
async function build(options) {
|
|
885
|
-
|
|
886
|
-
const stopwatch =
|
|
885
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
886
|
+
const stopwatch = _chunk37MGUMWDjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
887
887
|
try {
|
|
888
888
|
const opts = Array.isArray(options) ? options : [options];
|
|
889
889
|
if (opts.length === 0) {
|
|
@@ -898,9 +898,9 @@ async function build(options) {
|
|
|
898
898
|
executeTsup(context)
|
|
899
899
|
]);
|
|
900
900
|
await reportResults(context);
|
|
901
|
-
|
|
901
|
+
_chunk37MGUMWDjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
902
902
|
} catch (error) {
|
|
903
|
-
|
|
903
|
+
_chunk37MGUMWDjs.writeFatal.call(void 0,
|
|
904
904
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
905
905
|
);
|
|
906
906
|
throw error;
|
|
@@ -911,7 +911,7 @@ async function build(options) {
|
|
|
911
911
|
|
|
912
912
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
913
913
|
async function esbuildExecutorFn(options, context, config) {
|
|
914
|
-
|
|
914
|
+
_chunk37MGUMWDjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
915
915
|
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])) {
|
|
916
916
|
throw new Error(
|
|
917
917
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -919,7 +919,10 @@ async function esbuildExecutorFn(options, context, config) {
|
|
|
919
919
|
}
|
|
920
920
|
await build({
|
|
921
921
|
...options,
|
|
922
|
-
projectRoot:
|
|
922
|
+
projectRoot: (
|
|
923
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
924
|
+
_optionalChain([context, 'access', _50 => _50.projectsConfigurations, 'access', _51 => _51.projects, 'optionalAccess', _52 => _52[context.projectName], 'access', _53 => _53.root])
|
|
925
|
+
),
|
|
923
926
|
name: context.projectName,
|
|
924
927
|
sourceRoot: _optionalChain([context, 'access', _54 => _54.projectsConfigurations, 'access', _55 => _55.projects, 'optionalAccess', _56 => _56[context.projectName], 'optionalAccess', _57 => _57.sourceRoot]),
|
|
925
928
|
format: options.format,
|
|
@@ -929,13 +932,13 @@ async function esbuildExecutorFn(options, context, config) {
|
|
|
929
932
|
success: true
|
|
930
933
|
};
|
|
931
934
|
}
|
|
932
|
-
var executor_default6 =
|
|
935
|
+
var executor_default6 = _chunk37MGUMWDjs.withRunExecutor.call(void 0,
|
|
933
936
|
"Storm ESBuild build",
|
|
934
937
|
esbuildExecutorFn,
|
|
935
938
|
{
|
|
936
939
|
skipReadingConfig: false,
|
|
937
940
|
hooks: {
|
|
938
|
-
applyDefaultOptions: async (options
|
|
941
|
+
applyDefaultOptions: async (options) => {
|
|
939
942
|
options.entry ??= ["src/index.ts"];
|
|
940
943
|
options.outputPath ??= "dist/{projectRoot}";
|
|
941
944
|
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
@@ -1046,14 +1049,14 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
1046
1049
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
1047
1050
|
);
|
|
1048
1051
|
}
|
|
1049
|
-
|
|
1052
|
+
_chunk37MGUMWDjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
1050
1053
|
_sizelimit2.default.call(void 0, [_file2.default, _esbuild2.default, _esbuildwhy2.default], {
|
|
1051
1054
|
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,
|
|
1052
1055
|
_nullishCoalesce(_optionalChain([context, 'access', _65 => _65.projectsConfigurations, 'access', _66 => _66.projects, 'access', _67 => _67[context.projectName], 'optionalAccess', _68 => _68.root]), () => ( "./")),
|
|
1053
1056
|
"src"
|
|
1054
1057
|
)))
|
|
1055
1058
|
}).then((result) => {
|
|
1056
|
-
|
|
1059
|
+
_chunk37MGUMWDjs.writeInfo.call(void 0,
|
|
1057
1060
|
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
1058
1061
|
config
|
|
1059
1062
|
);
|
|
@@ -1062,7 +1065,7 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
1062
1065
|
success: true
|
|
1063
1066
|
};
|
|
1064
1067
|
}
|
|
1065
|
-
var executor_default7 =
|
|
1068
|
+
var executor_default7 = _chunk37MGUMWDjs.withRunExecutor.call(void 0,
|
|
1066
1069
|
"Size-Limit Performance Test Executor",
|
|
1067
1070
|
sizeLimitExecutorFn,
|
|
1068
1071
|
{
|
|
@@ -1080,12 +1083,12 @@ var _fsextra = require('fs-extra');
|
|
|
1080
1083
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1081
1084
|
async function typiaExecutorFn(options, _, config) {
|
|
1082
1085
|
if (options.clean !== false) {
|
|
1083
|
-
|
|
1086
|
+
_chunk37MGUMWDjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1084
1087
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1085
1088
|
}
|
|
1086
1089
|
await Promise.all(
|
|
1087
1090
|
options.entry.map((entry) => {
|
|
1088
|
-
|
|
1091
|
+
_chunk37MGUMWDjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1089
1092
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1090
1093
|
input: entry,
|
|
1091
1094
|
output: options.outputPath,
|
|
@@ -1097,7 +1100,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
1097
1100
|
success: true
|
|
1098
1101
|
};
|
|
1099
1102
|
}
|
|
1100
|
-
var executor_default8 =
|
|
1103
|
+
var executor_default8 = _chunk37MGUMWDjs.withRunExecutor.call(void 0,
|
|
1101
1104
|
"Typia runtime validation generator",
|
|
1102
1105
|
typiaExecutorFn,
|
|
1103
1106
|
{
|
|
@@ -1118,7 +1121,7 @@ var executor_default8 = _chunkWFAKWGXAjs.withRunExecutor.call(void 0,
|
|
|
1118
1121
|
|
|
1119
1122
|
var _jiti = require('jiti');
|
|
1120
1123
|
async function unbuildExecutorFn(options, context, config) {
|
|
1121
|
-
|
|
1124
|
+
_chunk37MGUMWDjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1122
1125
|
if (!_optionalChain([context, 'access', _69 => _69.projectsConfigurations, 'optionalAccess', _70 => _70.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1123
1126
|
throw new Error(
|
|
1124
1127
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
@@ -1135,7 +1138,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1135
1138
|
);
|
|
1136
1139
|
}
|
|
1137
1140
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1138
|
-
fsCache: config.skipCache ? false :
|
|
1141
|
+
fsCache: config.skipCache ? false : _chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
1139
1142
|
config.workspaceRoot,
|
|
1140
1143
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1141
1144
|
"jiti"
|
|
@@ -1157,7 +1160,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1157
1160
|
{
|
|
1158
1161
|
stubOptions: {
|
|
1159
1162
|
jiti: {
|
|
1160
|
-
fsCache: config.skipCache ? false :
|
|
1163
|
+
fsCache: config.skipCache ? false : _chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
1161
1164
|
config.workspaceRoot,
|
|
1162
1165
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1163
1166
|
"jiti"
|
|
@@ -1186,7 +1189,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1186
1189
|
success: true
|
|
1187
1190
|
};
|
|
1188
1191
|
}
|
|
1189
|
-
var executor_default9 =
|
|
1192
|
+
var executor_default9 = _chunk37MGUMWDjs.withRunExecutor.call(void 0,
|
|
1190
1193
|
"TypeScript Unbuild build",
|
|
1191
1194
|
unbuildExecutorFn,
|
|
1192
1195
|
{
|
|
@@ -1217,45 +1220,45 @@ var executor_default9 = _chunkWFAKWGXAjs.withRunExecutor.call(void 0,
|
|
|
1217
1220
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
1218
1221
|
skipReadingConfig: false
|
|
1219
1222
|
}) => async (tree, _options) => {
|
|
1220
|
-
const stopwatch =
|
|
1223
|
+
const stopwatch = _chunk37MGUMWDjs.getStopwatch.call(void 0, name);
|
|
1221
1224
|
let options = _options;
|
|
1222
1225
|
let config;
|
|
1223
1226
|
try {
|
|
1224
|
-
|
|
1227
|
+
_chunk37MGUMWDjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
1225
1228
|
|
|
1226
1229
|
`, config);
|
|
1227
|
-
const workspaceRoot3 =
|
|
1230
|
+
const workspaceRoot3 = _chunk37MGUMWDjs.findWorkspaceRoot.call(void 0, );
|
|
1228
1231
|
if (!generatorOptions.skipReadingConfig) {
|
|
1229
|
-
|
|
1232
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0,
|
|
1230
1233
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1231
1234
|
- workspaceRoot: ${workspaceRoot3}`,
|
|
1232
1235
|
config
|
|
1233
1236
|
);
|
|
1234
|
-
config = await
|
|
1237
|
+
config = await _chunk37MGUMWDjs.getConfig.call(void 0, workspaceRoot3);
|
|
1235
1238
|
}
|
|
1236
1239
|
if (_optionalChain([generatorOptions, 'optionalAccess', _71 => _71.hooks, 'optionalAccess', _72 => _72.applyDefaultOptions])) {
|
|
1237
|
-
|
|
1240
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1238
1241
|
options = await Promise.resolve(
|
|
1239
1242
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
1240
1243
|
);
|
|
1241
|
-
|
|
1244
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1242
1245
|
}
|
|
1243
|
-
|
|
1246
|
+
_chunk37MGUMWDjs.writeTrace.call(void 0,
|
|
1244
1247
|
`Generator schema options \u2699\uFE0F
|
|
1245
1248
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
1246
1249
|
config
|
|
1247
1250
|
);
|
|
1248
|
-
const tokenized = await
|
|
1251
|
+
const tokenized = await _chunk37MGUMWDjs.applyWorkspaceTokens.call(void 0,
|
|
1249
1252
|
options,
|
|
1250
1253
|
{ workspaceRoot: tree.root, config },
|
|
1251
|
-
|
|
1254
|
+
_chunk37MGUMWDjs.applyWorkspaceBaseTokens
|
|
1252
1255
|
);
|
|
1253
1256
|
if (_optionalChain([generatorOptions, 'optionalAccess', _73 => _73.hooks, 'optionalAccess', _74 => _74.preProcess])) {
|
|
1254
|
-
|
|
1257
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
1255
1258
|
await Promise.resolve(
|
|
1256
1259
|
generatorOptions.hooks.preProcess(tokenized, config)
|
|
1257
1260
|
);
|
|
1258
|
-
|
|
1261
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
1259
1262
|
}
|
|
1260
1263
|
const result = await Promise.resolve(
|
|
1261
1264
|
generatorFn(tree, tokenized, config)
|
|
@@ -1270,21 +1273,21 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1270
1273
|
}
|
|
1271
1274
|
}
|
|
1272
1275
|
if (_optionalChain([generatorOptions, 'optionalAccess', _84 => _84.hooks, 'optionalAccess', _85 => _85.postProcess])) {
|
|
1273
|
-
|
|
1276
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
1274
1277
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1275
|
-
|
|
1278
|
+
_chunk37MGUMWDjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
1276
1279
|
}
|
|
1277
1280
|
return () => {
|
|
1278
|
-
|
|
1281
|
+
_chunk37MGUMWDjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
1279
1282
|
`, config);
|
|
1280
1283
|
};
|
|
1281
1284
|
} catch (error) {
|
|
1282
1285
|
return () => {
|
|
1283
|
-
|
|
1286
|
+
_chunk37MGUMWDjs.writeFatal.call(void 0,
|
|
1284
1287
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
1285
1288
|
config
|
|
1286
1289
|
);
|
|
1287
|
-
|
|
1290
|
+
_chunk37MGUMWDjs.writeError.call(void 0,
|
|
1288
1291
|
`An exception was thrown in the generator's process
|
|
1289
1292
|
- Details: ${error.message}
|
|
1290
1293
|
- Stacktrace: ${error.stack}`,
|
|
@@ -1350,16 +1353,16 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1350
1353
|
const projectConfig = {
|
|
1351
1354
|
root: normalized.directory,
|
|
1352
1355
|
projectType: "library",
|
|
1353
|
-
sourceRoot:
|
|
1356
|
+
sourceRoot: _chunk37MGUMWDjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
1354
1357
|
targets: {
|
|
1355
1358
|
build: {
|
|
1356
1359
|
executor: options.buildExecutor,
|
|
1357
1360
|
outputs: ["{options.outputPath}"],
|
|
1358
1361
|
options: {
|
|
1359
|
-
entry: [
|
|
1362
|
+
entry: [_chunk37MGUMWDjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
|
|
1360
1363
|
outputPath: getOutputPath(normalized),
|
|
1361
|
-
tsconfig:
|
|
1362
|
-
project:
|
|
1364
|
+
tsconfig: _chunk37MGUMWDjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
1365
|
+
project: _chunk37MGUMWDjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
1363
1366
|
defaultConfiguration: "production",
|
|
1364
1367
|
platform: "neutral",
|
|
1365
1368
|
assets: [
|
|
@@ -1416,7 +1419,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1416
1419
|
if (!normalized.importPath) {
|
|
1417
1420
|
normalized.importPath = normalized.name;
|
|
1418
1421
|
}
|
|
1419
|
-
const packageJsonPath =
|
|
1422
|
+
const packageJsonPath = _chunk37MGUMWDjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
1420
1423
|
if (tree.exists(packageJsonPath)) {
|
|
1421
1424
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
1422
1425
|
if (!normalized.importPath) {
|
|
@@ -1473,14 +1476,14 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1473
1476
|
}));
|
|
1474
1477
|
}
|
|
1475
1478
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
1476
|
-
|
|
1479
|
+
_chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
1477
1480
|
normalized.projectRoot,
|
|
1478
1481
|
"./src",
|
|
1479
1482
|
`index.${normalized.js ? "js" : "ts"}`
|
|
1480
1483
|
)
|
|
1481
1484
|
]);
|
|
1482
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
1483
|
-
|
|
1485
|
+
_js.addTsConfigPath.call(void 0, tree, _chunk37MGUMWDjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
1486
|
+
_chunk37MGUMWDjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
1484
1487
|
]);
|
|
1485
1488
|
if (tree.exists("package.json")) {
|
|
1486
1489
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -1491,7 +1494,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1491
1494
|
description = packageJson.description;
|
|
1492
1495
|
}
|
|
1493
1496
|
}
|
|
1494
|
-
const tsconfigPath =
|
|
1497
|
+
const tsconfigPath = _chunk37MGUMWDjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
1495
1498
|
if (tree.exists(tsconfigPath)) {
|
|
1496
1499
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
1497
1500
|
json.composite ??= true;
|
|
@@ -1519,7 +1522,7 @@ function getOutputPath(options) {
|
|
|
1519
1522
|
} else {
|
|
1520
1523
|
parts.push(options.projectRoot);
|
|
1521
1524
|
}
|
|
1522
|
-
return
|
|
1525
|
+
return _chunk37MGUMWDjs.joinPaths.call(void 0, ...parts);
|
|
1523
1526
|
}
|
|
1524
1527
|
function createProjectTsConfigJson(tree, options) {
|
|
1525
1528
|
const tsconfig = {
|
|
@@ -1527,7 +1530,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
1527
1530
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _100 => _100.tsconfigOptions]), () => ( {})),
|
|
1528
1531
|
compilerOptions: {
|
|
1529
1532
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
1530
|
-
outDir:
|
|
1533
|
+
outDir: _chunk37MGUMWDjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
1531
1534
|
noEmit: true,
|
|
1532
1535
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _101 => _101.tsconfigOptions, 'optionalAccess', _102 => _102.compilerOptions]), () => ( {}))
|
|
1533
1536
|
},
|
|
@@ -1545,7 +1548,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
1545
1548
|
"src/**/*.test.ts"
|
|
1546
1549
|
]
|
|
1547
1550
|
};
|
|
1548
|
-
_devkit.writeJson.call(void 0, tree,
|
|
1551
|
+
_devkit.writeJson.call(void 0, tree, _chunk37MGUMWDjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
1549
1552
|
}
|
|
1550
1553
|
async function normalizeOptions(tree, options, config) {
|
|
1551
1554
|
let importPath = options.importPath;
|
|
@@ -1610,7 +1613,7 @@ async function normalizeOptions(tree, options, config) {
|
|
|
1610
1613
|
|
|
1611
1614
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
1612
1615
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
1613
|
-
const filesDir =
|
|
1616
|
+
const filesDir = _chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
1614
1617
|
__dirname,
|
|
1615
1618
|
"src",
|
|
1616
1619
|
"generators",
|
|
@@ -1693,38 +1696,38 @@ var generator_default = withRunGenerator(
|
|
|
1693
1696
|
|
|
1694
1697
|
var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
|
|
1695
1698
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
1696
|
-
|
|
1699
|
+
_chunk37MGUMWDjs.writeInfo.call(void 0,
|
|
1697
1700
|
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
1698
1701
|
config
|
|
1699
1702
|
);
|
|
1700
|
-
|
|
1703
|
+
_chunk37MGUMWDjs.writeTrace.call(void 0,
|
|
1701
1704
|
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
1702
1705
|
config
|
|
1703
1706
|
);
|
|
1704
|
-
const jsonSchema = z.toJSONSchema(
|
|
1707
|
+
const jsonSchema = z.toJSONSchema(_chunk37MGUMWDjs.workspaceConfigSchema, {
|
|
1705
1708
|
target: "draft-7",
|
|
1706
|
-
metadata:
|
|
1709
|
+
metadata: _chunk37MGUMWDjs.schemaRegistry
|
|
1707
1710
|
});
|
|
1708
1711
|
jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
|
|
1709
1712
|
jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
|
|
1710
1713
|
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.";
|
|
1711
|
-
|
|
1714
|
+
_chunk37MGUMWDjs.writeTrace.call(void 0, jsonSchema, config);
|
|
1712
1715
|
if (!options.outputFile) {
|
|
1713
1716
|
throw new Error(
|
|
1714
1717
|
"The `outputFile` option is required. Please specify the output file path."
|
|
1715
1718
|
);
|
|
1716
1719
|
}
|
|
1717
1720
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
1718
|
-
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _111 => _111.workspaceRoot]), () => (
|
|
1721
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _111 => _111.workspaceRoot]), () => ( _chunk37MGUMWDjs.findWorkspaceRoot.call(void 0, ))),
|
|
1719
1722
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
1720
1723
|
);
|
|
1721
|
-
|
|
1724
|
+
_chunk37MGUMWDjs.writeTrace.call(void 0,
|
|
1722
1725
|
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
1723
1726
|
config
|
|
1724
1727
|
);
|
|
1725
1728
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
1726
1729
|
await _devkit.formatFiles.call(void 0, tree);
|
|
1727
|
-
|
|
1730
|
+
_chunk37MGUMWDjs.writeSuccess.call(void 0,
|
|
1728
1731
|
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
1729
1732
|
config
|
|
1730
1733
|
);
|
|
@@ -1780,7 +1783,7 @@ async function initGenerator(tree, schema) {
|
|
|
1780
1783
|
|
|
1781
1784
|
|
|
1782
1785
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
1783
|
-
const filesDir =
|
|
1786
|
+
const filesDir = _chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
1784
1787
|
__dirname,
|
|
1785
1788
|
"src",
|
|
1786
1789
|
"generators",
|
|
@@ -1839,7 +1842,7 @@ var generator_default3 = withRunGenerator(
|
|
|
1839
1842
|
|
|
1840
1843
|
|
|
1841
1844
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
1842
|
-
const filesDir =
|
|
1845
|
+
const filesDir = _chunk37MGUMWDjs.joinPaths.call(void 0,
|
|
1843
1846
|
__dirname,
|
|
1844
1847
|
"src",
|
|
1845
1848
|
"generators",
|
|
@@ -2272,7 +2275,7 @@ var COMMIT_TYPES = {
|
|
|
2272
2275
|
}
|
|
2273
2276
|
}
|
|
2274
2277
|
};
|
|
2275
|
-
var
|
|
2278
|
+
var DEFAULT_MINIMAL_COMMIT_QUESTIONS = {
|
|
2276
2279
|
type: {
|
|
2277
2280
|
type: "select",
|
|
2278
2281
|
title: "Commit Type",
|
|
@@ -2287,15 +2290,6 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
2287
2290
|
maxLength: 20,
|
|
2288
2291
|
minLength: 3
|
|
2289
2292
|
},
|
|
2290
|
-
scope: {
|
|
2291
|
-
type: "select",
|
|
2292
|
-
title: "Commit Scope",
|
|
2293
|
-
description: "Select the monorepo project that is primarily impacted by this change",
|
|
2294
|
-
enum: {},
|
|
2295
|
-
defaultValue: "monorepo",
|
|
2296
|
-
maxLength: 50,
|
|
2297
|
-
minLength: 1
|
|
2298
|
-
},
|
|
2299
2293
|
subject: {
|
|
2300
2294
|
type: "input",
|
|
2301
2295
|
title: "Commit Subject",
|
|
@@ -2338,6 +2332,72 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
2338
2332
|
minLength: 3
|
|
2339
2333
|
}
|
|
2340
2334
|
};
|
|
2335
|
+
var DEFAULT_MONOREPO_COMMIT_QUESTIONS = {
|
|
2336
|
+
type: DEFAULT_MINIMAL_COMMIT_QUESTIONS.type,
|
|
2337
|
+
scope: {
|
|
2338
|
+
type: "select",
|
|
2339
|
+
title: "Commit Scope",
|
|
2340
|
+
description: "Select the project that's the most impacted by this change",
|
|
2341
|
+
enum: {},
|
|
2342
|
+
defaultValue: "monorepo",
|
|
2343
|
+
maxLength: 50,
|
|
2344
|
+
minLength: 1
|
|
2345
|
+
},
|
|
2346
|
+
subject: DEFAULT_MINIMAL_COMMIT_QUESTIONS.subject,
|
|
2347
|
+
body: DEFAULT_MINIMAL_COMMIT_QUESTIONS.body,
|
|
2348
|
+
isBreaking: DEFAULT_MINIMAL_COMMIT_QUESTIONS.isBreaking,
|
|
2349
|
+
breakingBody: DEFAULT_MINIMAL_COMMIT_QUESTIONS.breakingBody,
|
|
2350
|
+
isIssueAffected: DEFAULT_MINIMAL_COMMIT_QUESTIONS.isIssueAffected,
|
|
2351
|
+
issuesBody: DEFAULT_MINIMAL_COMMIT_QUESTIONS.issuesBody
|
|
2352
|
+
};
|
|
2353
|
+
var DEFAULT_MINIMAL_COMMIT_RULES = {
|
|
2354
|
+
"body-leading-blank": [1 /* Warning */, "always"],
|
|
2355
|
+
"body-max-length": [2 /* Error */, "always", 600],
|
|
2356
|
+
"footer-leading-blank": [1 /* Warning */, "always"],
|
|
2357
|
+
"footer-max-line-length": [2 /* Error */, "always", 150],
|
|
2358
|
+
"header-max-length": [2 /* Error */, "always", 150],
|
|
2359
|
+
"header-trim": [2 /* Error */, "always"],
|
|
2360
|
+
"subject-case": [2 /* Error */, "always", ["sentence-case"]],
|
|
2361
|
+
"subject-empty": [2 /* Error */, "never"],
|
|
2362
|
+
"subject-full-stop": [2 /* Error */, "never", "."],
|
|
2363
|
+
"subject-max-length": [2 /* Error */, "always", 150],
|
|
2364
|
+
"subject-min-length": [2 /* Error */, "always", 3],
|
|
2365
|
+
"type-case": [2 /* Error */, "always", "kebab-case"],
|
|
2366
|
+
"type-empty": [2 /* Error */, "never"],
|
|
2367
|
+
"type-enum": [
|
|
2368
|
+
2 /* Error */,
|
|
2369
|
+
"always",
|
|
2370
|
+
Object.keys(COMMIT_TYPES)
|
|
2371
|
+
],
|
|
2372
|
+
"type-max-length": [2 /* Error */, "always", 20],
|
|
2373
|
+
"type-min-length": [2 /* Error */, "always", 3],
|
|
2374
|
+
"scope-case": 0 /* Disabled */,
|
|
2375
|
+
"scope-empty": 0 /* Disabled */
|
|
2376
|
+
};
|
|
2377
|
+
var DEFAULT_MONOREPO_COMMIT_RULES = {
|
|
2378
|
+
"body-leading-blank": [1 /* Warning */, "always"],
|
|
2379
|
+
"body-max-length": [2 /* Error */, "always", 600],
|
|
2380
|
+
"footer-leading-blank": [1 /* Warning */, "always"],
|
|
2381
|
+
"footer-max-line-length": [2 /* Error */, "always", 150],
|
|
2382
|
+
"header-max-length": [2 /* Error */, "always", 150],
|
|
2383
|
+
"header-trim": [2 /* Error */, "always"],
|
|
2384
|
+
"subject-case": [2 /* Error */, "always", ["sentence-case"]],
|
|
2385
|
+
"subject-empty": [2 /* Error */, "never"],
|
|
2386
|
+
"subject-full-stop": [2 /* Error */, "never", "."],
|
|
2387
|
+
"subject-max-length": [2 /* Error */, "always", 150],
|
|
2388
|
+
"subject-min-length": [2 /* Error */, "always", 3],
|
|
2389
|
+
"type-case": [2 /* Error */, "always", "kebab-case"],
|
|
2390
|
+
"type-empty": [2 /* Error */, "never"],
|
|
2391
|
+
"type-enum": [
|
|
2392
|
+
2 /* Error */,
|
|
2393
|
+
"always",
|
|
2394
|
+
Object.keys(COMMIT_TYPES)
|
|
2395
|
+
],
|
|
2396
|
+
"type-max-length": [2 /* Error */, "always", 20],
|
|
2397
|
+
"type-min-length": [2 /* Error */, "always", 3],
|
|
2398
|
+
"scope-case": [2 /* Error */, "always", ["kebab-case"]],
|
|
2399
|
+
"scope-empty": [2 /* Error */, "never"]
|
|
2400
|
+
};
|
|
2341
2401
|
|
|
2342
2402
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
2343
2403
|
|