@storm-software/terraform-tools 0.66.275 → 0.66.282
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 +70 -0
- package/README.md +1 -1
- package/dist/{chunk-T7VMRGBY.js → chunk-4O6D2LBC.js} +128 -128
- package/dist/{chunk-3PPOJGPM.js → chunk-6ASLZIIM.js} +2 -2
- package/dist/{chunk-F3NMHTBD.mjs → chunk-BLVSBRSL.mjs} +3 -1
- package/dist/{chunk-34VTLVPL.mjs → chunk-DHJTU33T.mjs} +1 -1
- package/dist/{chunk-BTFCJA4P.mjs → chunk-DW5BLHAS.mjs} +1 -1
- package/dist/{chunk-7C6EBRQS.mjs → chunk-DXQIZNEJ.mjs} +2 -2
- package/dist/{chunk-FUIR6CV3.js → chunk-FGJFAOYF.js} +3 -1
- package/dist/{chunk-TL7BE6RW.js → chunk-HJOXIWSH.js} +2 -2
- package/dist/{chunk-W3GP53VK.mjs → chunk-JQTWB6VJ.mjs} +1 -1
- package/dist/{chunk-RN7QGFQC.mjs → chunk-KSOFBENQ.mjs} +1 -1
- package/dist/{chunk-LIBELAPY.js → chunk-MUZP5CYT.js} +2 -2
- package/dist/{chunk-6XRBUSRZ.js → chunk-OV42YLWT.js} +2 -2
- package/dist/{chunk-ZAQLCGRJ.mjs → chunk-RYOFSTHS.mjs} +1 -1
- package/dist/{chunk-7SJNXGGY.js → chunk-UFCT73TW.js} +2 -2
- package/dist/{chunk-SU4DPIOS.mjs → chunk-ZWCDQGFA.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 +8 -8
- package/dist/index.mjs +8 -8
- 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 +5 -5
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkFGJFAOYFjs = require('./chunk-FGJFAOYF.js');
|
|
24
24
|
|
|
25
25
|
// src/generators/init/init.ts
|
|
26
26
|
var _devkit = require('@nx/devkit');
|
|
@@ -170,7 +170,7 @@ async function cargoBuildExecutor(options, context) {
|
|
|
170
170
|
const command = buildCargoCommand("build", options, context);
|
|
171
171
|
return await cargoCommand(context.root, ...command);
|
|
172
172
|
}
|
|
173
|
-
var executor_default =
|
|
173
|
+
var executor_default = _chunkFGJFAOYFjs.withRunExecutor.call(void 0,
|
|
174
174
|
"Cargo - Build",
|
|
175
175
|
cargoBuildExecutor,
|
|
176
176
|
{
|
|
@@ -190,7 +190,7 @@ async function cargoCheckExecutor(options, context) {
|
|
|
190
190
|
const command = buildCargoCommand("check", options, context);
|
|
191
191
|
return await cargoCommand(context.root, ...command);
|
|
192
192
|
}
|
|
193
|
-
var executor_default2 =
|
|
193
|
+
var executor_default2 = _chunkFGJFAOYFjs.withRunExecutor.call(void 0,
|
|
194
194
|
"Cargo - Check",
|
|
195
195
|
cargoCheckExecutor,
|
|
196
196
|
{
|
|
@@ -209,7 +209,7 @@ async function cargoClippyExecutor(options, context) {
|
|
|
209
209
|
const command = buildCargoCommand("clippy", options, context);
|
|
210
210
|
return await cargoCommand(context.root, ...command);
|
|
211
211
|
}
|
|
212
|
-
var executor_default3 =
|
|
212
|
+
var executor_default3 = _chunkFGJFAOYFjs.withRunExecutor.call(void 0,
|
|
213
213
|
"Cargo - Clippy",
|
|
214
214
|
cargoClippyExecutor,
|
|
215
215
|
{
|
|
@@ -232,7 +232,7 @@ async function cargoDocExecutor(options, context) {
|
|
|
232
232
|
const command = buildCargoCommand("doc", options, context);
|
|
233
233
|
return await cargoCommand(context.root, ...command);
|
|
234
234
|
}
|
|
235
|
-
var executor_default4 =
|
|
235
|
+
var executor_default4 = _chunkFGJFAOYFjs.withRunExecutor.call(void 0,
|
|
236
236
|
"Cargo - Doc",
|
|
237
237
|
cargoDocExecutor,
|
|
238
238
|
{
|
|
@@ -258,7 +258,7 @@ async function cargoFormatExecutor(options, context) {
|
|
|
258
258
|
const command = buildCargoCommand("fmt", options, context);
|
|
259
259
|
return await cargoCommand(context.root, ...command);
|
|
260
260
|
}
|
|
261
|
-
var executor_default5 =
|
|
261
|
+
var executor_default5 = _chunkFGJFAOYFjs.withRunExecutor.call(void 0,
|
|
262
262
|
"Cargo - Format",
|
|
263
263
|
cargoFormatExecutor,
|
|
264
264
|
{
|
|
@@ -283,14 +283,14 @@ var LARGE_BUFFER = 1024 * 1e6;
|
|
|
283
283
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
284
284
|
var _jiti = require('jiti');
|
|
285
285
|
async function esbuildExecutorFn(options, context, config) {
|
|
286
|
-
|
|
286
|
+
_chunkFGJFAOYFjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
287
287
|
if (!_optionalChain([context, 'access', _20 => _20.projectsConfigurations, 'optionalAccess', _21 => _21.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _22 => _22.projectsConfigurations, 'access', _23 => _23.projects, 'access', _24 => _24[context.projectName], 'optionalAccess', _25 => _25.root])) {
|
|
288
288
|
throw new Error(
|
|
289
289
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
292
|
const jiti = _jiti.createJiti.call(void 0, _optionalChain([config, 'optionalAccess', _26 => _26.workspaceRoot]) || process.cwd(), {
|
|
293
|
-
fsCache: _optionalChain([config, 'optionalAccess', _27 => _27.skipCache]) ? false :
|
|
293
|
+
fsCache: _optionalChain([config, 'optionalAccess', _27 => _27.skipCache]) ? false : _chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
294
294
|
_optionalChain([config, 'optionalAccess', _28 => _28.workspaceRoot]) || process.cwd(),
|
|
295
295
|
_optionalChain([config, 'optionalAccess', _29 => _29.directories, 'optionalAccess', _30 => _30.cache]) || "node_modules/.cache/storm",
|
|
296
296
|
"jiti"
|
|
@@ -313,7 +313,7 @@ async function esbuildExecutorFn(options, context, config) {
|
|
|
313
313
|
success: true
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
|
-
var executor_default6 =
|
|
316
|
+
var executor_default6 = _chunkFGJFAOYFjs.withRunExecutor.call(void 0,
|
|
317
317
|
"Storm ESBuild build",
|
|
318
318
|
esbuildExecutorFn,
|
|
319
319
|
{
|
|
@@ -334,7 +334,7 @@ var executor_default6 = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
|
|
|
334
334
|
var _fileutils = require('nx/src/utils/fileutils');
|
|
335
335
|
async function napiExecutor(options, context, config) {
|
|
336
336
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
337
|
-
fsCache: config.skipCache ? false :
|
|
337
|
+
fsCache: config.skipCache ? false : _chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
338
338
|
config.workspaceRoot,
|
|
339
339
|
config.directories.cache || "node_modules/.cache/storm",
|
|
340
340
|
"jiti"
|
|
@@ -350,52 +350,52 @@ async function napiExecutor(options, context, config) {
|
|
|
350
350
|
);
|
|
351
351
|
}
|
|
352
352
|
const projectRoot = _optionalChain([context, 'access', _42 => _42.projectGraph, 'optionalAccess', _43 => _43.nodes, 'access', _44 => _44[_nullishCoalesce(context.projectName, () => ( ""))], 'optionalAccess', _45 => _45.data, 'access', _46 => _46.root]);
|
|
353
|
-
const packageJson =
|
|
353
|
+
const packageJson = _chunkFGJFAOYFjs.joinPaths.call(void 0, _nullishCoalesce(projectRoot, () => ( ".")), "package.json");
|
|
354
354
|
if (!_fileutils.fileExists.call(void 0, packageJson)) {
|
|
355
355
|
throw new Error(`Could not find package.json at ${packageJson}`);
|
|
356
356
|
}
|
|
357
357
|
const napi = new NapiCli();
|
|
358
358
|
const normalizedOptions = { ...options };
|
|
359
359
|
const metadata = cargoMetadata();
|
|
360
|
-
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _47 => _47.target_directory]) ||
|
|
360
|
+
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _47 => _47.target_directory]) || _chunkFGJFAOYFjs.joinPaths.call(void 0, config.workspaceRoot, "dist", "target");
|
|
361
361
|
normalizedOptions.outputDir = options.outputPath;
|
|
362
362
|
normalizedOptions.packageJsonPath ??= packageJson;
|
|
363
363
|
if (options.cwd) {
|
|
364
|
-
normalizedOptions.cwd =
|
|
364
|
+
normalizedOptions.cwd = _chunkFGJFAOYFjs.correctPaths.call(void 0, options.cwd);
|
|
365
365
|
} else {
|
|
366
|
-
const absoluteProjectRoot =
|
|
367
|
-
|
|
366
|
+
const absoluteProjectRoot = _chunkFGJFAOYFjs.correctPaths.call(void 0,
|
|
367
|
+
_chunkFGJFAOYFjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot || ".")
|
|
368
368
|
);
|
|
369
369
|
normalizedOptions.cwd = absoluteProjectRoot;
|
|
370
370
|
if (normalizedOptions.outputDir) {
|
|
371
|
-
normalizedOptions.outputDir =
|
|
371
|
+
normalizedOptions.outputDir = _chunkFGJFAOYFjs.relative.call(void 0,
|
|
372
372
|
normalizedOptions.cwd,
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
_chunkFGJFAOYFjs.correctPaths.call(void 0,
|
|
374
|
+
_chunkFGJFAOYFjs.isAbsolute.call(void 0, normalizedOptions.outputDir) ? normalizedOptions.outputDir : _chunkFGJFAOYFjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.outputDir)
|
|
375
375
|
)
|
|
376
376
|
);
|
|
377
377
|
}
|
|
378
378
|
if (normalizedOptions.packageJsonPath) {
|
|
379
|
-
normalizedOptions.packageJsonPath =
|
|
379
|
+
normalizedOptions.packageJsonPath = _chunkFGJFAOYFjs.relative.call(void 0,
|
|
380
380
|
normalizedOptions.cwd,
|
|
381
|
-
|
|
382
|
-
|
|
381
|
+
_chunkFGJFAOYFjs.correctPaths.call(void 0,
|
|
382
|
+
_chunkFGJFAOYFjs.isAbsolute.call(void 0, normalizedOptions.packageJsonPath) ? normalizedOptions.packageJsonPath : _chunkFGJFAOYFjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.packageJsonPath)
|
|
383
383
|
)
|
|
384
384
|
);
|
|
385
385
|
}
|
|
386
386
|
if (normalizedOptions.configPath) {
|
|
387
|
-
normalizedOptions.configPath =
|
|
387
|
+
normalizedOptions.configPath = _chunkFGJFAOYFjs.relative.call(void 0,
|
|
388
388
|
normalizedOptions.cwd,
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
_chunkFGJFAOYFjs.correctPaths.call(void 0,
|
|
390
|
+
_chunkFGJFAOYFjs.isAbsolute.call(void 0, normalizedOptions.configPath) ? normalizedOptions.configPath : _chunkFGJFAOYFjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.configPath)
|
|
391
391
|
)
|
|
392
392
|
);
|
|
393
393
|
}
|
|
394
394
|
if (normalizedOptions.manifestPath) {
|
|
395
|
-
normalizedOptions.manifestPath =
|
|
395
|
+
normalizedOptions.manifestPath = _chunkFGJFAOYFjs.relative.call(void 0,
|
|
396
396
|
normalizedOptions.cwd,
|
|
397
|
-
|
|
398
|
-
|
|
397
|
+
_chunkFGJFAOYFjs.correctPaths.call(void 0,
|
|
398
|
+
_chunkFGJFAOYFjs.isAbsolute.call(void 0, normalizedOptions.manifestPath) ? normalizedOptions.manifestPath : _chunkFGJFAOYFjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.manifestPath)
|
|
399
399
|
)
|
|
400
400
|
);
|
|
401
401
|
}
|
|
@@ -403,7 +403,7 @@ async function napiExecutor(options, context, config) {
|
|
|
403
403
|
if (process.env.VERCEL) {
|
|
404
404
|
return { success: true };
|
|
405
405
|
}
|
|
406
|
-
|
|
406
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0,
|
|
407
407
|
`Normalized Napi Options:
|
|
408
408
|
packageJsonPath: ${normalizedOptions.packageJsonPath}
|
|
409
409
|
outputDir: ${normalizedOptions.outputDir}
|
|
@@ -416,7 +416,7 @@ cwd: ${normalizedOptions.cwd}`,
|
|
|
416
416
|
const { task } = await napi.build(normalizedOptions);
|
|
417
417
|
return { success: true, terminalOutput: await task };
|
|
418
418
|
}
|
|
419
|
-
var executor_default7 =
|
|
419
|
+
var executor_default7 = _chunkFGJFAOYFjs.withRunExecutor.call(void 0,
|
|
420
420
|
"Napi - Build Bindings",
|
|
421
421
|
napiExecutor,
|
|
422
422
|
{
|
|
@@ -572,14 +572,14 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
572
572
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
|
-
|
|
575
|
+
_chunkFGJFAOYFjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
576
576
|
_sizelimit2.default.call(void 0, [_file2.default, _esbuild2.default, _esbuildwhy2.default], {
|
|
577
577
|
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _51 => _51.projectsConfigurations, 'access', _52 => _52.projects, 'access', _53 => _53[context.projectName], 'optionalAccess', _54 => _54.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0,
|
|
578
578
|
_nullishCoalesce(_optionalChain([context, 'access', _55 => _55.projectsConfigurations, 'access', _56 => _56.projects, 'access', _57 => _57[context.projectName], 'optionalAccess', _58 => _58.root]), () => ( "./")),
|
|
579
579
|
"src"
|
|
580
580
|
)))
|
|
581
581
|
}).then((result) => {
|
|
582
|
-
|
|
582
|
+
_chunkFGJFAOYFjs.writeInfo.call(void 0,
|
|
583
583
|
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
584
584
|
config
|
|
585
585
|
);
|
|
@@ -588,7 +588,7 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
588
588
|
success: true
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
|
-
var executor_default8 =
|
|
591
|
+
var executor_default8 = _chunkFGJFAOYFjs.withRunExecutor.call(void 0,
|
|
592
592
|
"Size-Limit Performance Test Executor",
|
|
593
593
|
sizeLimitExecutorFn,
|
|
594
594
|
{
|
|
@@ -656,9 +656,9 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
656
656
|
output: "src/"
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
|
-
|
|
659
|
+
_chunkFGJFAOYFjs.writeTrace.call(void 0,
|
|
660
660
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
661
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
661
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkFGJFAOYFjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
662
662
|
config
|
|
663
663
|
);
|
|
664
664
|
const assetHandler = new (0, _internal.CopyAssetsHandler)({
|
|
@@ -668,20 +668,20 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
668
668
|
assets: pendingAssets
|
|
669
669
|
});
|
|
670
670
|
await assetHandler.processAllAssetsOnce();
|
|
671
|
-
|
|
671
|
+
_chunkFGJFAOYFjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
672
672
|
if (includeSrc === true) {
|
|
673
|
-
|
|
674
|
-
`\u{1F4DD} Adding banner and writing source files: ${
|
|
673
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0,
|
|
674
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
675
675
|
outputPath,
|
|
676
676
|
"src"
|
|
677
677
|
)}`,
|
|
678
678
|
config
|
|
679
679
|
);
|
|
680
680
|
const files = await _glob.glob.call(void 0, [
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
681
|
+
_chunkFGJFAOYFjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
682
|
+
_chunkFGJFAOYFjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
683
|
+
_chunkFGJFAOYFjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
684
|
+
_chunkFGJFAOYFjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
685
685
|
]);
|
|
686
686
|
await Promise.allSettled(
|
|
687
687
|
files.map(
|
|
@@ -736,7 +736,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
736
736
|
)) {
|
|
737
737
|
const projectNode = project.node;
|
|
738
738
|
if (projectNode.data.root) {
|
|
739
|
-
const projectPackageJsonPath =
|
|
739
|
+
const projectPackageJsonPath = _chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
740
740
|
workspaceRoot2,
|
|
741
741
|
projectNode.data.root,
|
|
742
742
|
"package.json"
|
|
@@ -754,11 +754,11 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
if (localPackages.length > 0) {
|
|
757
|
-
|
|
757
|
+
_chunkFGJFAOYFjs.writeTrace.call(void 0,
|
|
758
758
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
759
759
|
);
|
|
760
760
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
761
|
-
|
|
761
|
+
_chunkFGJFAOYFjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
762
762
|
"utf8"
|
|
763
763
|
);
|
|
764
764
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -771,7 +771,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
771
771
|
}
|
|
772
772
|
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _67 => _67.projects, 'optionalAccess', _68 => _68[projectName2], 'access', _69 => _69.implicitDependencies, 'optionalAccess', _70 => _70.reduce, 'call', _71 => _71((ret, dep) => {
|
|
773
773
|
if (_optionalChain([projectConfigurations, 'access', _72 => _72.projects, 'optionalAccess', _73 => _73[dep]])) {
|
|
774
|
-
const depPackageJsonPath =
|
|
774
|
+
const depPackageJsonPath = _chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
775
775
|
workspaceRoot2,
|
|
776
776
|
projectConfigurations.projects[dep].root,
|
|
777
777
|
"package.json"
|
|
@@ -802,14 +802,14 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
802
802
|
return ret;
|
|
803
803
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
804
804
|
} else {
|
|
805
|
-
|
|
805
|
+
_chunkFGJFAOYFjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
806
806
|
}
|
|
807
807
|
return packageJson;
|
|
808
808
|
};
|
|
809
809
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
810
|
-
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
810
|
+
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkFGJFAOYFjs.findWorkspaceRoot.call(void 0, );
|
|
811
811
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
812
|
-
|
|
812
|
+
_chunkFGJFAOYFjs.joinPaths.call(void 0, workspaceRoot2, "package.json"),
|
|
813
813
|
"utf8"
|
|
814
814
|
);
|
|
815
815
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -820,7 +820,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
820
820
|
if (distSrc.startsWith("/")) {
|
|
821
821
|
distSrc = distSrc.substring(1);
|
|
822
822
|
}
|
|
823
|
-
packageJson.source ??= `${
|
|
823
|
+
packageJson.source ??= `${_chunkFGJFAOYFjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
824
824
|
}
|
|
825
825
|
packageJson.files ??= ["dist/**/*"];
|
|
826
826
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -845,7 +845,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
845
845
|
packageJson.contributors = [packageJson.author];
|
|
846
846
|
}
|
|
847
847
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
848
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
848
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkFGJFAOYFjs.joinPaths.call(void 0, "packages", projectName);
|
|
849
849
|
return packageJson;
|
|
850
850
|
};
|
|
851
851
|
var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
@@ -939,19 +939,19 @@ function toTSDownFormat(format4) {
|
|
|
939
939
|
// ../tsdown/src/build.ts
|
|
940
940
|
var resolveOptions = async (userOptions) => {
|
|
941
941
|
const options = getDefaultOptions(userOptions);
|
|
942
|
-
const workspaceRoot2 =
|
|
942
|
+
const workspaceRoot2 = _chunkFGJFAOYFjs.findWorkspaceRoot.call(void 0, options.projectRoot);
|
|
943
943
|
if (!workspaceRoot2) {
|
|
944
944
|
throw new Error("Cannot find Nx workspace root");
|
|
945
945
|
}
|
|
946
|
-
const workspaceConfig = await
|
|
946
|
+
const workspaceConfig = await _chunkFGJFAOYFjs.getWorkspaceConfig.call(void 0, options.debug === true, {
|
|
947
947
|
workspaceRoot: workspaceRoot2
|
|
948
948
|
});
|
|
949
|
-
|
|
950
|
-
const stopwatch =
|
|
949
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
950
|
+
const stopwatch = _chunkFGJFAOYFjs.getStopwatch.call(void 0, "Build options resolution");
|
|
951
951
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
952
952
|
exitOnError: true
|
|
953
953
|
});
|
|
954
|
-
const projectJsonPath =
|
|
954
|
+
const projectJsonPath = _chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
955
955
|
workspaceRoot2,
|
|
956
956
|
options.projectRoot,
|
|
957
957
|
"project.json"
|
|
@@ -968,7 +968,7 @@ var resolveOptions = async (userOptions) => {
|
|
|
968
968
|
"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."
|
|
969
969
|
);
|
|
970
970
|
}
|
|
971
|
-
const packageJsonPath =
|
|
971
|
+
const packageJsonPath = _chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
972
972
|
workspaceRoot2,
|
|
973
973
|
options.projectRoot,
|
|
974
974
|
"package.json"
|
|
@@ -977,13 +977,13 @@ var resolveOptions = async (userOptions) => {
|
|
|
977
977
|
throw new Error("Cannot find package.json configuration");
|
|
978
978
|
}
|
|
979
979
|
const debug = _nullishCoalesce(options.debug, () => ( (options.mode || workspaceConfig.mode) === "development"));
|
|
980
|
-
const sourceRoot = projectJson.sourceRoot ||
|
|
980
|
+
const sourceRoot = projectJson.sourceRoot || _chunkFGJFAOYFjs.joinPaths.call(void 0, options.projectRoot, "src");
|
|
981
981
|
const result = {
|
|
982
982
|
name: projectName,
|
|
983
983
|
mode: "production",
|
|
984
984
|
target: DEFAULT_TARGET,
|
|
985
985
|
generatePackageJson: true,
|
|
986
|
-
outDir:
|
|
986
|
+
outDir: _chunkFGJFAOYFjs.joinPaths.call(void 0, "dist", options.projectRoot),
|
|
987
987
|
minify: !debug,
|
|
988
988
|
plugins: [],
|
|
989
989
|
assets: [],
|
|
@@ -994,12 +994,12 @@ var resolveOptions = async (userOptions) => {
|
|
|
994
994
|
clean: false,
|
|
995
995
|
fixedExtension: true,
|
|
996
996
|
nodeProtocol: true,
|
|
997
|
-
tsconfig:
|
|
997
|
+
tsconfig: _chunkFGJFAOYFjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
998
998
|
debug,
|
|
999
999
|
sourceRoot,
|
|
1000
1000
|
cwd: workspaceConfig.workspaceRoot,
|
|
1001
1001
|
entry: {
|
|
1002
|
-
["index"]:
|
|
1002
|
+
["index"]: _chunkFGJFAOYFjs.joinPaths.call(void 0, sourceRoot, "index.ts")
|
|
1003
1003
|
},
|
|
1004
1004
|
workspace: true,
|
|
1005
1005
|
...options,
|
|
@@ -1018,15 +1018,15 @@ var resolveOptions = async (userOptions) => {
|
|
|
1018
1018
|
return result;
|
|
1019
1019
|
};
|
|
1020
1020
|
async function generatePackageJson(options) {
|
|
1021
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1022
|
-
|
|
1023
|
-
const stopwatch =
|
|
1024
|
-
const packageJsonPath =
|
|
1021
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkFGJFAOYFjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1022
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.workspaceConfig);
|
|
1023
|
+
const stopwatch = _chunkFGJFAOYFjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1024
|
+
const packageJsonPath = _chunkFGJFAOYFjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1025
1025
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1026
1026
|
throw new Error("Cannot find package.json configuration");
|
|
1027
1027
|
}
|
|
1028
1028
|
const packageJsonFile = await _promises2.default.readFile(
|
|
1029
|
-
|
|
1029
|
+
_chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
1030
1030
|
options.workspaceConfig.workspaceRoot,
|
|
1031
1031
|
options.projectRoot,
|
|
1032
1032
|
"package.json"
|
|
@@ -1088,14 +1088,14 @@ async function generatePackageJson(options) {
|
|
|
1088
1088
|
},
|
|
1089
1089
|
packageJson.exports
|
|
1090
1090
|
);
|
|
1091
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1091
|
+
await _devkit.writeJsonFile.call(void 0, _chunkFGJFAOYFjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
1092
1092
|
stopwatch();
|
|
1093
1093
|
}
|
|
1094
1094
|
return options;
|
|
1095
1095
|
}
|
|
1096
1096
|
async function executeTSDown(options) {
|
|
1097
|
-
|
|
1098
|
-
const stopwatch =
|
|
1097
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.workspaceConfig);
|
|
1098
|
+
const stopwatch = _chunkFGJFAOYFjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1099
1099
|
await _tsdown.build.call(void 0, {
|
|
1100
1100
|
...options,
|
|
1101
1101
|
entry: options.entry,
|
|
@@ -1105,11 +1105,11 @@ async function executeTSDown(options) {
|
|
|
1105
1105
|
return options;
|
|
1106
1106
|
}
|
|
1107
1107
|
async function copyBuildAssets(options) {
|
|
1108
|
-
|
|
1108
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0,
|
|
1109
1109
|
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
1110
1110
|
options.workspaceConfig
|
|
1111
1111
|
);
|
|
1112
|
-
const stopwatch =
|
|
1112
|
+
const stopwatch = _chunkFGJFAOYFjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1113
1113
|
await copyAssets(
|
|
1114
1114
|
options.workspaceConfig,
|
|
1115
1115
|
_nullishCoalesce(options.assets, () => ( [])),
|
|
@@ -1123,18 +1123,18 @@ async function copyBuildAssets(options) {
|
|
|
1123
1123
|
return options;
|
|
1124
1124
|
}
|
|
1125
1125
|
async function reportResults(options) {
|
|
1126
|
-
|
|
1126
|
+
_chunkFGJFAOYFjs.writeSuccess.call(void 0,
|
|
1127
1127
|
` \u{1F4E6} The ${options.name} build completed successfully`,
|
|
1128
1128
|
options.workspaceConfig
|
|
1129
1129
|
);
|
|
1130
1130
|
}
|
|
1131
1131
|
async function cleanOutputPath(options) {
|
|
1132
1132
|
if (options.clean !== false && options.workspaceConfig) {
|
|
1133
|
-
|
|
1133
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0,
|
|
1134
1134
|
` \u{1F9F9} Cleaning ${options.name} output path: ${options.workspaceConfig}`,
|
|
1135
1135
|
options.workspaceConfig
|
|
1136
1136
|
);
|
|
1137
|
-
const stopwatch =
|
|
1137
|
+
const stopwatch = _chunkFGJFAOYFjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1138
1138
|
await cleanDirectories(
|
|
1139
1139
|
options.name,
|
|
1140
1140
|
options.outDir,
|
|
@@ -1145,8 +1145,8 @@ async function cleanOutputPath(options) {
|
|
|
1145
1145
|
return options;
|
|
1146
1146
|
}
|
|
1147
1147
|
async function build(options) {
|
|
1148
|
-
|
|
1149
|
-
const stopwatch =
|
|
1148
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0, ` ${_chunkFGJFAOYFjs.brandIcon.call(void 0, )} Executing Storm TSDown pipeline`);
|
|
1149
|
+
const stopwatch = _chunkFGJFAOYFjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1150
1150
|
try {
|
|
1151
1151
|
const opts = Array.isArray(options) ? options : [options];
|
|
1152
1152
|
if (opts.length === 0) {
|
|
@@ -1166,13 +1166,13 @@ async function build(options) {
|
|
|
1166
1166
|
})
|
|
1167
1167
|
);
|
|
1168
1168
|
} else {
|
|
1169
|
-
|
|
1169
|
+
_chunkFGJFAOYFjs.writeWarning.call(void 0,
|
|
1170
1170
|
" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function."
|
|
1171
1171
|
);
|
|
1172
1172
|
}
|
|
1173
|
-
|
|
1173
|
+
_chunkFGJFAOYFjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1174
1174
|
} catch (error) {
|
|
1175
|
-
|
|
1175
|
+
_chunkFGJFAOYFjs.writeFatal.call(void 0,
|
|
1176
1176
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1177
1177
|
);
|
|
1178
1178
|
throw error;
|
|
@@ -1183,7 +1183,7 @@ async function build(options) {
|
|
|
1183
1183
|
|
|
1184
1184
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1185
1185
|
async function tsdownExecutorFn(options, context, config) {
|
|
1186
|
-
|
|
1186
|
+
_chunkFGJFAOYFjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown executor on the workspace", config);
|
|
1187
1187
|
if (!_optionalChain([context, 'access', _84 => _84.projectsConfigurations, 'optionalAccess', _85 => _85.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _86 => _86.projectsConfigurations, 'access', _87 => _87.projects, 'access', _88 => _88[context.projectName], 'optionalAccess', _89 => _89.root])) {
|
|
1188
1188
|
throw new Error(
|
|
1189
1189
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1204,7 +1204,7 @@ async function tsdownExecutorFn(options, context, config) {
|
|
|
1204
1204
|
success: true
|
|
1205
1205
|
};
|
|
1206
1206
|
}
|
|
1207
|
-
var executor_default9 =
|
|
1207
|
+
var executor_default9 = _chunkFGJFAOYFjs.withRunExecutor.call(void 0,
|
|
1208
1208
|
"Storm TSDown build",
|
|
1209
1209
|
tsdownExecutorFn,
|
|
1210
1210
|
{
|
|
@@ -1225,12 +1225,12 @@ var _fsextra = require('fs-extra');
|
|
|
1225
1225
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1226
1226
|
async function typiaExecutorFn(options, _, config) {
|
|
1227
1227
|
if (options.clean !== false) {
|
|
1228
|
-
|
|
1228
|
+
_chunkFGJFAOYFjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1229
1229
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1230
1230
|
}
|
|
1231
1231
|
await Promise.all(
|
|
1232
1232
|
options.entry.map((entry) => {
|
|
1233
|
-
|
|
1233
|
+
_chunkFGJFAOYFjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1234
1234
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1235
1235
|
input: entry,
|
|
1236
1236
|
output: options.outputPath,
|
|
@@ -1242,7 +1242,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
1242
1242
|
success: true
|
|
1243
1243
|
};
|
|
1244
1244
|
}
|
|
1245
|
-
var executor_default10 =
|
|
1245
|
+
var executor_default10 = _chunkFGJFAOYFjs.withRunExecutor.call(void 0,
|
|
1246
1246
|
"Typia runtime validation generator",
|
|
1247
1247
|
typiaExecutorFn,
|
|
1248
1248
|
{
|
|
@@ -1263,7 +1263,7 @@ var executor_default10 = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
|
|
|
1263
1263
|
|
|
1264
1264
|
|
|
1265
1265
|
async function unbuildExecutorFn(options, context, config) {
|
|
1266
|
-
|
|
1266
|
+
_chunkFGJFAOYFjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1267
1267
|
if (!_optionalChain([context, 'access', _98 => _98.projectsConfigurations, 'optionalAccess', _99 => _99.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1268
1268
|
throw new Error(
|
|
1269
1269
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
@@ -1280,7 +1280,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1280
1280
|
);
|
|
1281
1281
|
}
|
|
1282
1282
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1283
|
-
fsCache: config.skipCache ? false :
|
|
1283
|
+
fsCache: config.skipCache ? false : _chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
1284
1284
|
config.workspaceRoot,
|
|
1285
1285
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1286
1286
|
"jiti"
|
|
@@ -1302,7 +1302,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1302
1302
|
{
|
|
1303
1303
|
stubOptions: {
|
|
1304
1304
|
jiti: {
|
|
1305
|
-
fsCache: config.skipCache ? false :
|
|
1305
|
+
fsCache: config.skipCache ? false : _chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
1306
1306
|
config.workspaceRoot,
|
|
1307
1307
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1308
1308
|
"jiti"
|
|
@@ -1331,7 +1331,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1331
1331
|
success: true
|
|
1332
1332
|
};
|
|
1333
1333
|
}
|
|
1334
|
-
var executor_default11 =
|
|
1334
|
+
var executor_default11 = _chunkFGJFAOYFjs.withRunExecutor.call(void 0,
|
|
1335
1335
|
"TypeScript Unbuild build",
|
|
1336
1336
|
unbuildExecutorFn,
|
|
1337
1337
|
{
|
|
@@ -1362,48 +1362,48 @@ var executor_default11 = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
|
|
|
1362
1362
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
1363
1363
|
skipReadingConfig: false
|
|
1364
1364
|
}) => async (tree, _options) => {
|
|
1365
|
-
const stopwatch =
|
|
1365
|
+
const stopwatch = _chunkFGJFAOYFjs.getStopwatch.call(void 0, name);
|
|
1366
1366
|
let options = _options;
|
|
1367
1367
|
let config;
|
|
1368
1368
|
try {
|
|
1369
|
-
|
|
1370
|
-
`${
|
|
1369
|
+
_chunkFGJFAOYFjs.writeInfo.call(void 0,
|
|
1370
|
+
`${_chunkFGJFAOYFjs.brandIcon.call(void 0, config)} Running the ${name} generator...
|
|
1371
1371
|
|
|
1372
1372
|
`,
|
|
1373
1373
|
config
|
|
1374
1374
|
);
|
|
1375
|
-
const workspaceRoot2 =
|
|
1375
|
+
const workspaceRoot2 = _chunkFGJFAOYFjs.findWorkspaceRoot.call(void 0, );
|
|
1376
1376
|
if (!generatorOptions.skipReadingConfig) {
|
|
1377
|
-
|
|
1377
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0,
|
|
1378
1378
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1379
1379
|
- workspaceRoot: ${workspaceRoot2}`,
|
|
1380
1380
|
config
|
|
1381
1381
|
);
|
|
1382
|
-
config = await
|
|
1382
|
+
config = await _chunkFGJFAOYFjs.getConfig.call(void 0, workspaceRoot2);
|
|
1383
1383
|
}
|
|
1384
1384
|
if (_optionalChain([generatorOptions, 'optionalAccess', _100 => _100.hooks, 'optionalAccess', _101 => _101.applyDefaultOptions])) {
|
|
1385
|
-
|
|
1385
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1386
1386
|
options = await Promise.resolve(
|
|
1387
1387
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
1388
1388
|
);
|
|
1389
|
-
|
|
1389
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1390
1390
|
}
|
|
1391
|
-
|
|
1391
|
+
_chunkFGJFAOYFjs.writeTrace.call(void 0,
|
|
1392
1392
|
`Generator schema options \u2699\uFE0F
|
|
1393
1393
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
1394
1394
|
config
|
|
1395
1395
|
);
|
|
1396
|
-
const tokenized = await
|
|
1396
|
+
const tokenized = await _chunkFGJFAOYFjs.applyWorkspaceTokens.call(void 0,
|
|
1397
1397
|
options,
|
|
1398
1398
|
{ workspaceRoot: tree.root, config },
|
|
1399
|
-
|
|
1399
|
+
_chunkFGJFAOYFjs.applyWorkspaceBaseTokens
|
|
1400
1400
|
);
|
|
1401
1401
|
if (_optionalChain([generatorOptions, 'optionalAccess', _102 => _102.hooks, 'optionalAccess', _103 => _103.preProcess])) {
|
|
1402
|
-
|
|
1402
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
1403
1403
|
await Promise.resolve(
|
|
1404
1404
|
generatorOptions.hooks.preProcess(tokenized, config)
|
|
1405
1405
|
);
|
|
1406
|
-
|
|
1406
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
1407
1407
|
}
|
|
1408
1408
|
const result = await Promise.resolve(
|
|
1409
1409
|
generatorFn(tree, tokenized, config)
|
|
@@ -1418,21 +1418,21 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
1420
|
if (_optionalChain([generatorOptions, 'optionalAccess', _113 => _113.hooks, 'optionalAccess', _114 => _114.postProcess])) {
|
|
1421
|
-
|
|
1421
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
1422
1422
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1423
|
-
|
|
1423
|
+
_chunkFGJFAOYFjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
1424
1424
|
}
|
|
1425
1425
|
return () => {
|
|
1426
|
-
|
|
1426
|
+
_chunkFGJFAOYFjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
1427
1427
|
`, config);
|
|
1428
1428
|
};
|
|
1429
1429
|
} catch (error) {
|
|
1430
1430
|
return () => {
|
|
1431
|
-
|
|
1431
|
+
_chunkFGJFAOYFjs.writeFatal.call(void 0,
|
|
1432
1432
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
1433
1433
|
config
|
|
1434
1434
|
);
|
|
1435
|
-
|
|
1435
|
+
_chunkFGJFAOYFjs.writeError.call(void 0,
|
|
1436
1436
|
`An exception was thrown in the generator's process
|
|
1437
1437
|
- Details: ${error.message}
|
|
1438
1438
|
- Stacktrace: ${error.stack}`,
|
|
@@ -1487,16 +1487,16 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1487
1487
|
const projectConfig = {
|
|
1488
1488
|
root: normalized.directory,
|
|
1489
1489
|
projectType: "library",
|
|
1490
|
-
sourceRoot:
|
|
1490
|
+
sourceRoot: _chunkFGJFAOYFjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
1491
1491
|
targets: {
|
|
1492
1492
|
build: {
|
|
1493
1493
|
executor: options.buildExecutor,
|
|
1494
1494
|
outputs: ["{options.outputPath}"],
|
|
1495
1495
|
options: {
|
|
1496
|
-
entry: [
|
|
1496
|
+
entry: [_chunkFGJFAOYFjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
|
|
1497
1497
|
outputPath: getOutputPath(normalized),
|
|
1498
|
-
tsconfig:
|
|
1499
|
-
project:
|
|
1498
|
+
tsconfig: _chunkFGJFAOYFjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
1499
|
+
project: _chunkFGJFAOYFjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
1500
1500
|
defaultConfiguration: "production",
|
|
1501
1501
|
platform: "neutral",
|
|
1502
1502
|
assets: [
|
|
@@ -1553,7 +1553,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1553
1553
|
if (!normalized.importPath) {
|
|
1554
1554
|
normalized.importPath = normalized.name;
|
|
1555
1555
|
}
|
|
1556
|
-
const packageJsonPath =
|
|
1556
|
+
const packageJsonPath = _chunkFGJFAOYFjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
1557
1557
|
if (tree.exists(packageJsonPath)) {
|
|
1558
1558
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
1559
1559
|
if (!normalized.importPath) {
|
|
@@ -1610,14 +1610,14 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1610
1610
|
}));
|
|
1611
1611
|
}
|
|
1612
1612
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
1613
|
-
|
|
1613
|
+
_chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
1614
1614
|
normalized.projectRoot,
|
|
1615
1615
|
"./src",
|
|
1616
1616
|
`index.${normalized.js ? "js" : "ts"}`
|
|
1617
1617
|
)
|
|
1618
1618
|
]);
|
|
1619
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
1620
|
-
|
|
1619
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkFGJFAOYFjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
1620
|
+
_chunkFGJFAOYFjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
1621
1621
|
]);
|
|
1622
1622
|
if (tree.exists("package.json")) {
|
|
1623
1623
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -1628,7 +1628,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1628
1628
|
description = packageJson.description;
|
|
1629
1629
|
}
|
|
1630
1630
|
}
|
|
1631
|
-
const tsconfigPath =
|
|
1631
|
+
const tsconfigPath = _chunkFGJFAOYFjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
1632
1632
|
if (tree.exists(tsconfigPath)) {
|
|
1633
1633
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
1634
1634
|
json.composite ??= true;
|
|
@@ -1656,7 +1656,7 @@ function getOutputPath(options) {
|
|
|
1656
1656
|
} else {
|
|
1657
1657
|
parts.push(options.projectRoot);
|
|
1658
1658
|
}
|
|
1659
|
-
return
|
|
1659
|
+
return _chunkFGJFAOYFjs.joinPaths.call(void 0, ...parts);
|
|
1660
1660
|
}
|
|
1661
1661
|
function createProjectTsConfigJson(tree, options) {
|
|
1662
1662
|
const tsconfig = {
|
|
@@ -1664,7 +1664,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
1664
1664
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _129 => _129.tsconfigOptions]), () => ( {})),
|
|
1665
1665
|
compilerOptions: {
|
|
1666
1666
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
1667
|
-
outDir:
|
|
1667
|
+
outDir: _chunkFGJFAOYFjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
1668
1668
|
noEmit: true,
|
|
1669
1669
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _130 => _130.tsconfigOptions, 'optionalAccess', _131 => _131.compilerOptions]), () => ( {}))
|
|
1670
1670
|
},
|
|
@@ -1682,7 +1682,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
1682
1682
|
"src/**/*.test.ts"
|
|
1683
1683
|
]
|
|
1684
1684
|
};
|
|
1685
|
-
_devkit.writeJson.call(void 0, tree,
|
|
1685
|
+
_devkit.writeJson.call(void 0, tree, _chunkFGJFAOYFjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
1686
1686
|
}
|
|
1687
1687
|
async function normalizeOptions(tree, options, config) {
|
|
1688
1688
|
let importPath = options.importPath;
|
|
@@ -1747,7 +1747,7 @@ async function normalizeOptions(tree, options, config) {
|
|
|
1747
1747
|
|
|
1748
1748
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
1749
1749
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
1750
|
-
const filesDir =
|
|
1750
|
+
const filesDir = _chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
1751
1751
|
__dirname,
|
|
1752
1752
|
"src",
|
|
1753
1753
|
"generators",
|
|
@@ -1830,38 +1830,38 @@ var generator_default = withRunGenerator(
|
|
|
1830
1830
|
|
|
1831
1831
|
var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
|
|
1832
1832
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
1833
|
-
|
|
1833
|
+
_chunkFGJFAOYFjs.writeInfo.call(void 0,
|
|
1834
1834
|
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
1835
1835
|
config
|
|
1836
1836
|
);
|
|
1837
|
-
|
|
1837
|
+
_chunkFGJFAOYFjs.writeTrace.call(void 0,
|
|
1838
1838
|
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
1839
1839
|
config
|
|
1840
1840
|
);
|
|
1841
|
-
const jsonSchema = z.toJSONSchema(
|
|
1841
|
+
const jsonSchema = z.toJSONSchema(_chunkFGJFAOYFjs.workspaceConfigSchema, {
|
|
1842
1842
|
target: "draft-7",
|
|
1843
|
-
metadata:
|
|
1843
|
+
metadata: _chunkFGJFAOYFjs.schemaRegistry
|
|
1844
1844
|
});
|
|
1845
1845
|
jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
|
|
1846
1846
|
jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
|
|
1847
1847
|
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.";
|
|
1848
|
-
|
|
1848
|
+
_chunkFGJFAOYFjs.writeTrace.call(void 0, jsonSchema, config);
|
|
1849
1849
|
if (!options.outputFile) {
|
|
1850
1850
|
throw new Error(
|
|
1851
1851
|
"The `outputFile` option is required. Please specify the output file path."
|
|
1852
1852
|
);
|
|
1853
1853
|
}
|
|
1854
1854
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
1855
|
-
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _140 => _140.workspaceRoot]), () => (
|
|
1855
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _140 => _140.workspaceRoot]), () => ( _chunkFGJFAOYFjs.findWorkspaceRoot.call(void 0, ))),
|
|
1856
1856
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
1857
1857
|
);
|
|
1858
|
-
|
|
1858
|
+
_chunkFGJFAOYFjs.writeTrace.call(void 0,
|
|
1859
1859
|
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
1860
1860
|
config
|
|
1861
1861
|
);
|
|
1862
1862
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
1863
1863
|
await _devkit.formatFiles.call(void 0, tree);
|
|
1864
|
-
|
|
1864
|
+
_chunkFGJFAOYFjs.writeSuccess.call(void 0,
|
|
1865
1865
|
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
1866
1866
|
config
|
|
1867
1867
|
);
|
|
@@ -1917,7 +1917,7 @@ async function initGenerator(tree, schema) {
|
|
|
1917
1917
|
|
|
1918
1918
|
|
|
1919
1919
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
1920
|
-
const filesDir =
|
|
1920
|
+
const filesDir = _chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
1921
1921
|
__dirname,
|
|
1922
1922
|
"src",
|
|
1923
1923
|
"generators",
|
|
@@ -1976,7 +1976,7 @@ var generator_default3 = withRunGenerator(
|
|
|
1976
1976
|
|
|
1977
1977
|
|
|
1978
1978
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
1979
|
-
const filesDir =
|
|
1979
|
+
const filesDir = _chunkFGJFAOYFjs.joinPaths.call(void 0,
|
|
1980
1980
|
__dirname,
|
|
1981
1981
|
"src",
|
|
1982
1982
|
"generators",
|