@storm-software/terraform-tools 0.66.303 → 0.66.304
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/{chunk-OV42YLWT.js → chunk-62MLQNKK.js} +2 -2
- package/dist/{chunk-UFCT73TW.js → chunk-A7NB2FKC.js} +2 -2
- package/dist/{chunk-RYOFSTHS.mjs → chunk-CFYAE5XE.mjs} +1 -1
- package/dist/{chunk-JDYS2AZC.mjs → chunk-D7QB756M.mjs} +1 -1
- package/dist/{chunk-HRGRPSA6.js → chunk-DDDUMG3N.js} +128 -128
- package/dist/{chunk-6ASLZIIM.js → chunk-EOIX2GIO.js} +2 -2
- package/dist/{chunk-KSOFBENQ.mjs → chunk-EY53VYBQ.mjs} +1 -1
- package/dist/{chunk-FGJFAOYF.js → chunk-HEZEMNOS.js} +18 -20
- package/dist/{chunk-BLVSBRSL.mjs → chunk-IVTAZUPW.mjs} +18 -20
- package/dist/{chunk-JQTWB6VJ.mjs → chunk-J64S2VVC.mjs} +1 -1
- package/dist/{chunk-DW5BLHAS.mjs → chunk-QB7FFKED.mjs} +1 -1
- package/dist/{chunk-ZWCDQGFA.mjs → chunk-QZJFESJB.mjs} +1 -1
- package/dist/{chunk-HJOXIWSH.js → chunk-XRGU4NOW.js} +2 -2
- package/dist/{chunk-MUZP5CYT.js → chunk-YKPQANLR.js} +2 -2
- 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 +5 -5
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkHEZEMNOSjs = require('./chunk-HEZEMNOS.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 = _chunkHEZEMNOSjs.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 = _chunkHEZEMNOSjs.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 = _chunkHEZEMNOSjs.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 = _chunkHEZEMNOSjs.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 = _chunkHEZEMNOSjs.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
|
+
_chunkHEZEMNOSjs.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 : _chunkHEZEMNOSjs.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 = _chunkHEZEMNOSjs.withRunExecutor.call(void 0,
|
|
317
317
|
"Storm ESBuild build",
|
|
318
318
|
esbuildExecutorFn,
|
|
319
319
|
{
|
|
@@ -334,7 +334,7 @@ var executor_default6 = _chunkFGJFAOYFjs.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 : _chunkHEZEMNOSjs.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 = _chunkHEZEMNOSjs.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]) || _chunkHEZEMNOSjs.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 = _chunkHEZEMNOSjs.correctPaths.call(void 0, options.cwd);
|
|
365
365
|
} else {
|
|
366
|
-
const absoluteProjectRoot =
|
|
367
|
-
|
|
366
|
+
const absoluteProjectRoot = _chunkHEZEMNOSjs.correctPaths.call(void 0,
|
|
367
|
+
_chunkHEZEMNOSjs.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 = _chunkHEZEMNOSjs.relative.call(void 0,
|
|
372
372
|
normalizedOptions.cwd,
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
_chunkHEZEMNOSjs.correctPaths.call(void 0,
|
|
374
|
+
_chunkHEZEMNOSjs.isAbsolute.call(void 0, normalizedOptions.outputDir) ? normalizedOptions.outputDir : _chunkHEZEMNOSjs.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 = _chunkHEZEMNOSjs.relative.call(void 0,
|
|
380
380
|
normalizedOptions.cwd,
|
|
381
|
-
|
|
382
|
-
|
|
381
|
+
_chunkHEZEMNOSjs.correctPaths.call(void 0,
|
|
382
|
+
_chunkHEZEMNOSjs.isAbsolute.call(void 0, normalizedOptions.packageJsonPath) ? normalizedOptions.packageJsonPath : _chunkHEZEMNOSjs.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 = _chunkHEZEMNOSjs.relative.call(void 0,
|
|
388
388
|
normalizedOptions.cwd,
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
_chunkHEZEMNOSjs.correctPaths.call(void 0,
|
|
390
|
+
_chunkHEZEMNOSjs.isAbsolute.call(void 0, normalizedOptions.configPath) ? normalizedOptions.configPath : _chunkHEZEMNOSjs.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 = _chunkHEZEMNOSjs.relative.call(void 0,
|
|
396
396
|
normalizedOptions.cwd,
|
|
397
|
-
|
|
398
|
-
|
|
397
|
+
_chunkHEZEMNOSjs.correctPaths.call(void 0,
|
|
398
|
+
_chunkHEZEMNOSjs.isAbsolute.call(void 0, normalizedOptions.manifestPath) ? normalizedOptions.manifestPath : _chunkHEZEMNOSjs.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
|
+
_chunkHEZEMNOSjs.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 = _chunkHEZEMNOSjs.withRunExecutor.call(void 0,
|
|
420
420
|
"Napi - Build Bindings",
|
|
421
421
|
napiExecutor,
|
|
422
422
|
{
|
|
@@ -553,14 +553,14 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
553
553
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
554
554
|
);
|
|
555
555
|
}
|
|
556
|
-
|
|
556
|
+
_chunkHEZEMNOSjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
557
557
|
_sizelimit2.default.call(void 0, [_file2.default, _esbuild2.default, _esbuildwhy2.default], {
|
|
558
558
|
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,
|
|
559
559
|
_nullishCoalesce(_optionalChain([context, 'access', _55 => _55.projectsConfigurations, 'access', _56 => _56.projects, 'access', _57 => _57[context.projectName], 'optionalAccess', _58 => _58.root]), () => ( "./")),
|
|
560
560
|
"src"
|
|
561
561
|
)))
|
|
562
562
|
}).then((result) => {
|
|
563
|
-
|
|
563
|
+
_chunkHEZEMNOSjs.writeInfo.call(void 0,
|
|
564
564
|
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
565
565
|
config
|
|
566
566
|
);
|
|
@@ -569,7 +569,7 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
569
569
|
success: true
|
|
570
570
|
};
|
|
571
571
|
}
|
|
572
|
-
var executor_default8 =
|
|
572
|
+
var executor_default8 = _chunkHEZEMNOSjs.withRunExecutor.call(void 0,
|
|
573
573
|
"Size-Limit Performance Test Executor",
|
|
574
574
|
sizeLimitExecutorFn,
|
|
575
575
|
{
|
|
@@ -637,9 +637,9 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
637
637
|
output: "src/"
|
|
638
638
|
});
|
|
639
639
|
}
|
|
640
|
-
|
|
640
|
+
_chunkHEZEMNOSjs.writeTrace.call(void 0,
|
|
641
641
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
642
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
642
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkHEZEMNOSjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
643
643
|
config
|
|
644
644
|
);
|
|
645
645
|
const assetHandler = new (0, _internal.CopyAssetsHandler)({
|
|
@@ -649,20 +649,20 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
649
649
|
assets: pendingAssets
|
|
650
650
|
});
|
|
651
651
|
await assetHandler.processAllAssetsOnce();
|
|
652
|
-
|
|
652
|
+
_chunkHEZEMNOSjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
653
653
|
if (includeSrc === true) {
|
|
654
|
-
|
|
655
|
-
`\u{1F4DD} Adding banner and writing source files: ${
|
|
654
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0,
|
|
655
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunkHEZEMNOSjs.joinPaths.call(void 0,
|
|
656
656
|
outputPath,
|
|
657
657
|
"src"
|
|
658
658
|
)}`,
|
|
659
659
|
config
|
|
660
660
|
);
|
|
661
661
|
const files = await _glob.glob.call(void 0, [
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
662
|
+
_chunkHEZEMNOSjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
663
|
+
_chunkHEZEMNOSjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
664
|
+
_chunkHEZEMNOSjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
665
|
+
_chunkHEZEMNOSjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
666
666
|
]);
|
|
667
667
|
await Promise.allSettled(
|
|
668
668
|
files.map(
|
|
@@ -717,7 +717,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
717
717
|
)) {
|
|
718
718
|
const projectNode = project.node;
|
|
719
719
|
if (projectNode.data.root) {
|
|
720
|
-
const projectPackageJsonPath =
|
|
720
|
+
const projectPackageJsonPath = _chunkHEZEMNOSjs.joinPaths.call(void 0,
|
|
721
721
|
workspaceRoot2,
|
|
722
722
|
projectNode.data.root,
|
|
723
723
|
"package.json"
|
|
@@ -735,11 +735,11 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
737
|
if (localPackages.length > 0) {
|
|
738
|
-
|
|
738
|
+
_chunkHEZEMNOSjs.writeTrace.call(void 0,
|
|
739
739
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
740
740
|
);
|
|
741
741
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
742
|
-
|
|
742
|
+
_chunkHEZEMNOSjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
743
743
|
"utf8"
|
|
744
744
|
);
|
|
745
745
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -752,7 +752,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
752
752
|
}
|
|
753
753
|
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) => {
|
|
754
754
|
if (_optionalChain([projectConfigurations, 'access', _72 => _72.projects, 'optionalAccess', _73 => _73[dep]])) {
|
|
755
|
-
const depPackageJsonPath =
|
|
755
|
+
const depPackageJsonPath = _chunkHEZEMNOSjs.joinPaths.call(void 0,
|
|
756
756
|
workspaceRoot2,
|
|
757
757
|
projectConfigurations.projects[dep].root,
|
|
758
758
|
"package.json"
|
|
@@ -783,14 +783,14 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
783
783
|
return ret;
|
|
784
784
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
785
785
|
} else {
|
|
786
|
-
|
|
786
|
+
_chunkHEZEMNOSjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
787
787
|
}
|
|
788
788
|
return packageJson;
|
|
789
789
|
};
|
|
790
790
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
791
|
-
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
791
|
+
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkHEZEMNOSjs.findWorkspaceRoot.call(void 0, );
|
|
792
792
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
793
|
-
|
|
793
|
+
_chunkHEZEMNOSjs.joinPaths.call(void 0, workspaceRoot2, "package.json"),
|
|
794
794
|
"utf8"
|
|
795
795
|
);
|
|
796
796
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -801,7 +801,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
801
801
|
if (distSrc.startsWith("/")) {
|
|
802
802
|
distSrc = distSrc.substring(1);
|
|
803
803
|
}
|
|
804
|
-
packageJson.source ??= `${
|
|
804
|
+
packageJson.source ??= `${_chunkHEZEMNOSjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
805
805
|
}
|
|
806
806
|
packageJson.files ??= ["dist/**/*"];
|
|
807
807
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -826,7 +826,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
826
826
|
packageJson.contributors = [packageJson.author];
|
|
827
827
|
}
|
|
828
828
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
829
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
829
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkHEZEMNOSjs.joinPaths.call(void 0, "packages", projectName);
|
|
830
830
|
return packageJson;
|
|
831
831
|
};
|
|
832
832
|
var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
@@ -917,19 +917,19 @@ function toTSDownFormat(format3) {
|
|
|
917
917
|
// ../tsdown/src/build.ts
|
|
918
918
|
var resolveOptions = async (userOptions) => {
|
|
919
919
|
const options = getDefaultOptions(userOptions);
|
|
920
|
-
const workspaceRoot2 =
|
|
920
|
+
const workspaceRoot2 = _chunkHEZEMNOSjs.findWorkspaceRoot.call(void 0, options.projectRoot);
|
|
921
921
|
if (!workspaceRoot2) {
|
|
922
922
|
throw new Error("Cannot find Nx workspace root");
|
|
923
923
|
}
|
|
924
|
-
const workspaceConfig = await
|
|
924
|
+
const workspaceConfig = await _chunkHEZEMNOSjs.getWorkspaceConfig.call(void 0, options.debug === true, {
|
|
925
925
|
workspaceRoot: workspaceRoot2
|
|
926
926
|
});
|
|
927
|
-
|
|
928
|
-
const stopwatch =
|
|
927
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
928
|
+
const stopwatch = _chunkHEZEMNOSjs.getStopwatch.call(void 0, "Build options resolution");
|
|
929
929
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
930
930
|
exitOnError: true
|
|
931
931
|
});
|
|
932
|
-
const projectJsonPath =
|
|
932
|
+
const projectJsonPath = _chunkHEZEMNOSjs.joinPaths.call(void 0,
|
|
933
933
|
workspaceRoot2,
|
|
934
934
|
options.projectRoot,
|
|
935
935
|
"project.json"
|
|
@@ -946,7 +946,7 @@ var resolveOptions = async (userOptions) => {
|
|
|
946
946
|
"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."
|
|
947
947
|
);
|
|
948
948
|
}
|
|
949
|
-
const packageJsonPath =
|
|
949
|
+
const packageJsonPath = _chunkHEZEMNOSjs.joinPaths.call(void 0,
|
|
950
950
|
workspaceRoot2,
|
|
951
951
|
options.projectRoot,
|
|
952
952
|
"package.json"
|
|
@@ -955,13 +955,13 @@ var resolveOptions = async (userOptions) => {
|
|
|
955
955
|
throw new Error("Cannot find package.json configuration");
|
|
956
956
|
}
|
|
957
957
|
const debug = _nullishCoalesce(options.debug, () => ( (options.mode || workspaceConfig.mode) === "development"));
|
|
958
|
-
const sourceRoot = projectJson.sourceRoot ||
|
|
958
|
+
const sourceRoot = projectJson.sourceRoot || _chunkHEZEMNOSjs.joinPaths.call(void 0, options.projectRoot, "src");
|
|
959
959
|
const result = {
|
|
960
960
|
name: projectName,
|
|
961
961
|
mode: "production",
|
|
962
962
|
target: DEFAULT_TARGET,
|
|
963
963
|
generatePackageJson: true,
|
|
964
|
-
outDir:
|
|
964
|
+
outDir: _chunkHEZEMNOSjs.joinPaths.call(void 0, "dist", options.projectRoot),
|
|
965
965
|
minify: !debug,
|
|
966
966
|
plugins: [],
|
|
967
967
|
assets: [],
|
|
@@ -972,12 +972,12 @@ var resolveOptions = async (userOptions) => {
|
|
|
972
972
|
clean: false,
|
|
973
973
|
fixedExtension: true,
|
|
974
974
|
nodeProtocol: true,
|
|
975
|
-
tsconfig:
|
|
975
|
+
tsconfig: _chunkHEZEMNOSjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
976
976
|
debug,
|
|
977
977
|
sourceRoot,
|
|
978
978
|
cwd: workspaceConfig.workspaceRoot,
|
|
979
979
|
entry: {
|
|
980
|
-
["index"]:
|
|
980
|
+
["index"]: _chunkHEZEMNOSjs.joinPaths.call(void 0, sourceRoot, "index.ts")
|
|
981
981
|
},
|
|
982
982
|
workspace: true,
|
|
983
983
|
...options,
|
|
@@ -996,15 +996,15 @@ var resolveOptions = async (userOptions) => {
|
|
|
996
996
|
return result;
|
|
997
997
|
};
|
|
998
998
|
async function generatePackageJson(options) {
|
|
999
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1000
|
-
|
|
1001
|
-
const stopwatch =
|
|
1002
|
-
const packageJsonPath =
|
|
999
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkHEZEMNOSjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1000
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.workspaceConfig);
|
|
1001
|
+
const stopwatch = _chunkHEZEMNOSjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1002
|
+
const packageJsonPath = _chunkHEZEMNOSjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1003
1003
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1004
1004
|
throw new Error("Cannot find package.json configuration");
|
|
1005
1005
|
}
|
|
1006
1006
|
const packageJsonFile = await _promises2.default.readFile(
|
|
1007
|
-
|
|
1007
|
+
_chunkHEZEMNOSjs.joinPaths.call(void 0,
|
|
1008
1008
|
options.workspaceConfig.workspaceRoot,
|
|
1009
1009
|
options.projectRoot,
|
|
1010
1010
|
"package.json"
|
|
@@ -1066,14 +1066,14 @@ async function generatePackageJson(options) {
|
|
|
1066
1066
|
},
|
|
1067
1067
|
packageJson.exports
|
|
1068
1068
|
);
|
|
1069
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1069
|
+
await _devkit.writeJsonFile.call(void 0, _chunkHEZEMNOSjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
1070
1070
|
stopwatch();
|
|
1071
1071
|
}
|
|
1072
1072
|
return options;
|
|
1073
1073
|
}
|
|
1074
1074
|
async function executeTSDown(options) {
|
|
1075
|
-
|
|
1076
|
-
const stopwatch =
|
|
1075
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.workspaceConfig);
|
|
1076
|
+
const stopwatch = _chunkHEZEMNOSjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1077
1077
|
await _tsdown.build.call(void 0, {
|
|
1078
1078
|
...options,
|
|
1079
1079
|
entry: options.entry,
|
|
@@ -1083,11 +1083,11 @@ async function executeTSDown(options) {
|
|
|
1083
1083
|
return options;
|
|
1084
1084
|
}
|
|
1085
1085
|
async function copyBuildAssets(options) {
|
|
1086
|
-
|
|
1086
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0,
|
|
1087
1087
|
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
1088
1088
|
options.workspaceConfig
|
|
1089
1089
|
);
|
|
1090
|
-
const stopwatch =
|
|
1090
|
+
const stopwatch = _chunkHEZEMNOSjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1091
1091
|
await copyAssets(
|
|
1092
1092
|
options.workspaceConfig,
|
|
1093
1093
|
_nullishCoalesce(options.assets, () => ( [])),
|
|
@@ -1101,18 +1101,18 @@ async function copyBuildAssets(options) {
|
|
|
1101
1101
|
return options;
|
|
1102
1102
|
}
|
|
1103
1103
|
async function reportResults(options) {
|
|
1104
|
-
|
|
1104
|
+
_chunkHEZEMNOSjs.writeSuccess.call(void 0,
|
|
1105
1105
|
` \u{1F4E6} The ${options.name} build completed successfully`,
|
|
1106
1106
|
options.workspaceConfig
|
|
1107
1107
|
);
|
|
1108
1108
|
}
|
|
1109
1109
|
async function cleanOutputPath(options) {
|
|
1110
1110
|
if (options.clean !== false && options.workspaceConfig) {
|
|
1111
|
-
|
|
1111
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0,
|
|
1112
1112
|
` \u{1F9F9} Cleaning ${options.name} output path: ${options.workspaceConfig}`,
|
|
1113
1113
|
options.workspaceConfig
|
|
1114
1114
|
);
|
|
1115
|
-
const stopwatch =
|
|
1115
|
+
const stopwatch = _chunkHEZEMNOSjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1116
1116
|
await cleanDirectories(
|
|
1117
1117
|
options.name,
|
|
1118
1118
|
options.outDir,
|
|
@@ -1123,8 +1123,8 @@ async function cleanOutputPath(options) {
|
|
|
1123
1123
|
return options;
|
|
1124
1124
|
}
|
|
1125
1125
|
async function build(options) {
|
|
1126
|
-
|
|
1127
|
-
const stopwatch =
|
|
1126
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0, ` ${_chunkHEZEMNOSjs.brandIcon.call(void 0, )} Executing Storm TSDown pipeline`);
|
|
1127
|
+
const stopwatch = _chunkHEZEMNOSjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1128
1128
|
try {
|
|
1129
1129
|
const opts = Array.isArray(options) ? options : [options];
|
|
1130
1130
|
if (opts.length === 0) {
|
|
@@ -1144,13 +1144,13 @@ async function build(options) {
|
|
|
1144
1144
|
})
|
|
1145
1145
|
);
|
|
1146
1146
|
} else {
|
|
1147
|
-
|
|
1147
|
+
_chunkHEZEMNOSjs.writeWarning.call(void 0,
|
|
1148
1148
|
" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function."
|
|
1149
1149
|
);
|
|
1150
1150
|
}
|
|
1151
|
-
|
|
1151
|
+
_chunkHEZEMNOSjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1152
1152
|
} catch (error) {
|
|
1153
|
-
|
|
1153
|
+
_chunkHEZEMNOSjs.writeFatal.call(void 0,
|
|
1154
1154
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1155
1155
|
);
|
|
1156
1156
|
throw error;
|
|
@@ -1161,7 +1161,7 @@ async function build(options) {
|
|
|
1161
1161
|
|
|
1162
1162
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1163
1163
|
async function tsdownExecutorFn(options, context, config) {
|
|
1164
|
-
|
|
1164
|
+
_chunkHEZEMNOSjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown executor on the workspace", config);
|
|
1165
1165
|
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])) {
|
|
1166
1166
|
throw new Error(
|
|
1167
1167
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1182,7 +1182,7 @@ async function tsdownExecutorFn(options, context, config) {
|
|
|
1182
1182
|
success: true
|
|
1183
1183
|
};
|
|
1184
1184
|
}
|
|
1185
|
-
var executor_default9 =
|
|
1185
|
+
var executor_default9 = _chunkHEZEMNOSjs.withRunExecutor.call(void 0,
|
|
1186
1186
|
"Storm TSDown build",
|
|
1187
1187
|
tsdownExecutorFn,
|
|
1188
1188
|
{
|
|
@@ -1203,12 +1203,12 @@ var _fsextra = require('fs-extra');
|
|
|
1203
1203
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1204
1204
|
async function typiaExecutorFn(options, _, config) {
|
|
1205
1205
|
if (options.clean !== false) {
|
|
1206
|
-
|
|
1206
|
+
_chunkHEZEMNOSjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1207
1207
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1208
1208
|
}
|
|
1209
1209
|
await Promise.all(
|
|
1210
1210
|
options.entry.map((entry) => {
|
|
1211
|
-
|
|
1211
|
+
_chunkHEZEMNOSjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1212
1212
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1213
1213
|
input: entry,
|
|
1214
1214
|
output: options.outputPath,
|
|
@@ -1220,7 +1220,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
1220
1220
|
success: true
|
|
1221
1221
|
};
|
|
1222
1222
|
}
|
|
1223
|
-
var executor_default10 =
|
|
1223
|
+
var executor_default10 = _chunkHEZEMNOSjs.withRunExecutor.call(void 0,
|
|
1224
1224
|
"Typia runtime validation generator",
|
|
1225
1225
|
typiaExecutorFn,
|
|
1226
1226
|
{
|
|
@@ -1241,7 +1241,7 @@ var executor_default10 = _chunkFGJFAOYFjs.withRunExecutor.call(void 0,
|
|
|
1241
1241
|
|
|
1242
1242
|
|
|
1243
1243
|
async function unbuildExecutorFn(options, context, config) {
|
|
1244
|
-
|
|
1244
|
+
_chunkHEZEMNOSjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1245
1245
|
if (!_optionalChain([context, 'access', _98 => _98.projectsConfigurations, 'optionalAccess', _99 => _99.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1246
1246
|
throw new Error(
|
|
1247
1247
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
@@ -1258,7 +1258,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1258
1258
|
);
|
|
1259
1259
|
}
|
|
1260
1260
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1261
|
-
fsCache: config.skipCache ? false :
|
|
1261
|
+
fsCache: config.skipCache ? false : _chunkHEZEMNOSjs.joinPaths.call(void 0,
|
|
1262
1262
|
config.workspaceRoot,
|
|
1263
1263
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1264
1264
|
"jiti"
|
|
@@ -1280,7 +1280,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1280
1280
|
{
|
|
1281
1281
|
stubOptions: {
|
|
1282
1282
|
jiti: {
|
|
1283
|
-
fsCache: config.skipCache ? false :
|
|
1283
|
+
fsCache: config.skipCache ? false : _chunkHEZEMNOSjs.joinPaths.call(void 0,
|
|
1284
1284
|
config.workspaceRoot,
|
|
1285
1285
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1286
1286
|
"jiti"
|
|
@@ -1309,7 +1309,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1309
1309
|
success: true
|
|
1310
1310
|
};
|
|
1311
1311
|
}
|
|
1312
|
-
var executor_default11 =
|
|
1312
|
+
var executor_default11 = _chunkHEZEMNOSjs.withRunExecutor.call(void 0,
|
|
1313
1313
|
"TypeScript Unbuild build",
|
|
1314
1314
|
unbuildExecutorFn,
|
|
1315
1315
|
{
|
|
@@ -1340,48 +1340,48 @@ var executor_default11 = _chunkFGJFAOYFjs.withRunExecutor.call(void 0,
|
|
|
1340
1340
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
1341
1341
|
skipReadingConfig: false
|
|
1342
1342
|
}) => async (tree, _options) => {
|
|
1343
|
-
const stopwatch =
|
|
1343
|
+
const stopwatch = _chunkHEZEMNOSjs.getStopwatch.call(void 0, name);
|
|
1344
1344
|
let options = _options;
|
|
1345
1345
|
let config;
|
|
1346
1346
|
try {
|
|
1347
|
-
|
|
1348
|
-
`${
|
|
1347
|
+
_chunkHEZEMNOSjs.writeInfo.call(void 0,
|
|
1348
|
+
`${_chunkHEZEMNOSjs.brandIcon.call(void 0, config)} Running the ${name} generator...
|
|
1349
1349
|
|
|
1350
1350
|
`,
|
|
1351
1351
|
config
|
|
1352
1352
|
);
|
|
1353
|
-
const workspaceRoot2 =
|
|
1353
|
+
const workspaceRoot2 = _chunkHEZEMNOSjs.findWorkspaceRoot.call(void 0, );
|
|
1354
1354
|
if (!generatorOptions.skipReadingConfig) {
|
|
1355
|
-
|
|
1355
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0,
|
|
1356
1356
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1357
1357
|
- workspaceRoot: ${workspaceRoot2}`,
|
|
1358
1358
|
config
|
|
1359
1359
|
);
|
|
1360
|
-
config = await
|
|
1360
|
+
config = await _chunkHEZEMNOSjs.getConfig.call(void 0, workspaceRoot2);
|
|
1361
1361
|
}
|
|
1362
1362
|
if (_optionalChain([generatorOptions, 'optionalAccess', _100 => _100.hooks, 'optionalAccess', _101 => _101.applyDefaultOptions])) {
|
|
1363
|
-
|
|
1363
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1364
1364
|
options = await Promise.resolve(
|
|
1365
1365
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
1366
1366
|
);
|
|
1367
|
-
|
|
1367
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1368
1368
|
}
|
|
1369
|
-
|
|
1369
|
+
_chunkHEZEMNOSjs.writeTrace.call(void 0,
|
|
1370
1370
|
`Generator schema options \u2699\uFE0F
|
|
1371
1371
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
1372
1372
|
config
|
|
1373
1373
|
);
|
|
1374
|
-
const tokenized = await
|
|
1374
|
+
const tokenized = await _chunkHEZEMNOSjs.applyWorkspaceTokens.call(void 0,
|
|
1375
1375
|
options,
|
|
1376
1376
|
{ workspaceRoot: tree.root, config },
|
|
1377
|
-
|
|
1377
|
+
_chunkHEZEMNOSjs.applyWorkspaceBaseTokens
|
|
1378
1378
|
);
|
|
1379
1379
|
if (_optionalChain([generatorOptions, 'optionalAccess', _102 => _102.hooks, 'optionalAccess', _103 => _103.preProcess])) {
|
|
1380
|
-
|
|
1380
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
1381
1381
|
await Promise.resolve(
|
|
1382
1382
|
generatorOptions.hooks.preProcess(tokenized, config)
|
|
1383
1383
|
);
|
|
1384
|
-
|
|
1384
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
1385
1385
|
}
|
|
1386
1386
|
const result = await Promise.resolve(
|
|
1387
1387
|
generatorFn(tree, tokenized, config)
|
|
@@ -1396,21 +1396,21 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
1398
|
if (_optionalChain([generatorOptions, 'optionalAccess', _113 => _113.hooks, 'optionalAccess', _114 => _114.postProcess])) {
|
|
1399
|
-
|
|
1399
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
1400
1400
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1401
|
-
|
|
1401
|
+
_chunkHEZEMNOSjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
1402
1402
|
}
|
|
1403
1403
|
return () => {
|
|
1404
|
-
|
|
1404
|
+
_chunkHEZEMNOSjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
1405
1405
|
`, config);
|
|
1406
1406
|
};
|
|
1407
1407
|
} catch (error) {
|
|
1408
1408
|
return () => {
|
|
1409
|
-
|
|
1409
|
+
_chunkHEZEMNOSjs.writeFatal.call(void 0,
|
|
1410
1410
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
1411
1411
|
config
|
|
1412
1412
|
);
|
|
1413
|
-
|
|
1413
|
+
_chunkHEZEMNOSjs.writeError.call(void 0,
|
|
1414
1414
|
`An exception was thrown in the generator's process
|
|
1415
1415
|
- Details: ${error.message}
|
|
1416
1416
|
- Stacktrace: ${error.stack}`,
|
|
@@ -1474,16 +1474,16 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1474
1474
|
const projectConfig = {
|
|
1475
1475
|
root: normalized.directory,
|
|
1476
1476
|
projectType: "library",
|
|
1477
|
-
sourceRoot:
|
|
1477
|
+
sourceRoot: _chunkHEZEMNOSjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
1478
1478
|
targets: {
|
|
1479
1479
|
build: {
|
|
1480
1480
|
executor: options.buildExecutor,
|
|
1481
1481
|
outputs: ["{options.outputPath}"],
|
|
1482
1482
|
options: {
|
|
1483
|
-
entry: [
|
|
1483
|
+
entry: [_chunkHEZEMNOSjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
|
|
1484
1484
|
outputPath: getOutputPath(normalized),
|
|
1485
|
-
tsconfig:
|
|
1486
|
-
project:
|
|
1485
|
+
tsconfig: _chunkHEZEMNOSjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
1486
|
+
project: _chunkHEZEMNOSjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
1487
1487
|
defaultConfiguration: "production",
|
|
1488
1488
|
platform: "neutral",
|
|
1489
1489
|
assets: [
|
|
@@ -1540,7 +1540,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1540
1540
|
if (!normalized.importPath) {
|
|
1541
1541
|
normalized.importPath = normalized.name;
|
|
1542
1542
|
}
|
|
1543
|
-
const packageJsonPath =
|
|
1543
|
+
const packageJsonPath = _chunkHEZEMNOSjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
1544
1544
|
if (tree.exists(packageJsonPath)) {
|
|
1545
1545
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
1546
1546
|
if (!normalized.importPath) {
|
|
@@ -1626,14 +1626,14 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1626
1626
|
});
|
|
1627
1627
|
}
|
|
1628
1628
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
1629
|
-
|
|
1629
|
+
_chunkHEZEMNOSjs.joinPaths.call(void 0,
|
|
1630
1630
|
normalized.projectRoot,
|
|
1631
1631
|
"./src",
|
|
1632
1632
|
`index.${normalized.js ? "js" : "ts"}`
|
|
1633
1633
|
)
|
|
1634
1634
|
]);
|
|
1635
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
1636
|
-
|
|
1635
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkHEZEMNOSjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
1636
|
+
_chunkHEZEMNOSjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
1637
1637
|
]);
|
|
1638
1638
|
if (tree.exists("package.json")) {
|
|
1639
1639
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -1644,7 +1644,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1644
1644
|
description = packageJson.description;
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
|
-
const tsconfigPath =
|
|
1647
|
+
const tsconfigPath = _chunkHEZEMNOSjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
1648
1648
|
if (tree.exists(tsconfigPath)) {
|
|
1649
1649
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
1650
1650
|
json.composite ??= true;
|
|
@@ -1672,7 +1672,7 @@ function getOutputPath(options) {
|
|
|
1672
1672
|
} else {
|
|
1673
1673
|
parts.push(options.projectRoot);
|
|
1674
1674
|
}
|
|
1675
|
-
return
|
|
1675
|
+
return _chunkHEZEMNOSjs.joinPaths.call(void 0, ...parts);
|
|
1676
1676
|
}
|
|
1677
1677
|
function createProjectTsConfigJson(tree, options) {
|
|
1678
1678
|
const tsconfig = {
|
|
@@ -1680,7 +1680,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
1680
1680
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _135 => _135.tsconfigOptions]), () => ( {})),
|
|
1681
1681
|
compilerOptions: {
|
|
1682
1682
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
1683
|
-
outDir:
|
|
1683
|
+
outDir: _chunkHEZEMNOSjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
1684
1684
|
noEmit: true,
|
|
1685
1685
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _136 => _136.tsconfigOptions, 'optionalAccess', _137 => _137.compilerOptions]), () => ( {}))
|
|
1686
1686
|
},
|
|
@@ -1698,7 +1698,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
1698
1698
|
"src/**/*.test.ts"
|
|
1699
1699
|
]
|
|
1700
1700
|
};
|
|
1701
|
-
_devkit.writeJson.call(void 0, tree,
|
|
1701
|
+
_devkit.writeJson.call(void 0, tree, _chunkHEZEMNOSjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
1702
1702
|
}
|
|
1703
1703
|
async function normalizeOptions(tree, options, config) {
|
|
1704
1704
|
let importPath = options.importPath;
|
|
@@ -1763,7 +1763,7 @@ async function normalizeOptions(tree, options, config) {
|
|
|
1763
1763
|
|
|
1764
1764
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
1765
1765
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
1766
|
-
const filesDir =
|
|
1766
|
+
const filesDir = _chunkHEZEMNOSjs.joinPaths.call(void 0,
|
|
1767
1767
|
__dirname,
|
|
1768
1768
|
"src",
|
|
1769
1769
|
"generators",
|
|
@@ -1846,38 +1846,38 @@ var generator_default = withRunGenerator(
|
|
|
1846
1846
|
|
|
1847
1847
|
var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
|
|
1848
1848
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
1849
|
-
|
|
1849
|
+
_chunkHEZEMNOSjs.writeInfo.call(void 0,
|
|
1850
1850
|
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
1851
1851
|
config
|
|
1852
1852
|
);
|
|
1853
|
-
|
|
1853
|
+
_chunkHEZEMNOSjs.writeTrace.call(void 0,
|
|
1854
1854
|
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
1855
1855
|
config
|
|
1856
1856
|
);
|
|
1857
|
-
const jsonSchema = z.toJSONSchema(
|
|
1857
|
+
const jsonSchema = z.toJSONSchema(_chunkHEZEMNOSjs.workspaceConfigSchema, {
|
|
1858
1858
|
target: "draft-7",
|
|
1859
|
-
metadata:
|
|
1859
|
+
metadata: _chunkHEZEMNOSjs.schemaRegistry
|
|
1860
1860
|
});
|
|
1861
1861
|
jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
|
|
1862
1862
|
jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
|
|
1863
1863
|
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.";
|
|
1864
|
-
|
|
1864
|
+
_chunkHEZEMNOSjs.writeTrace.call(void 0, jsonSchema, config);
|
|
1865
1865
|
if (!options.outputFile) {
|
|
1866
1866
|
throw new Error(
|
|
1867
1867
|
"The `outputFile` option is required. Please specify the output file path."
|
|
1868
1868
|
);
|
|
1869
1869
|
}
|
|
1870
1870
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
1871
|
-
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _146 => _146.workspaceRoot]), () => (
|
|
1871
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _146 => _146.workspaceRoot]), () => ( _chunkHEZEMNOSjs.findWorkspaceRoot.call(void 0, ))),
|
|
1872
1872
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
1873
1873
|
);
|
|
1874
|
-
|
|
1874
|
+
_chunkHEZEMNOSjs.writeTrace.call(void 0,
|
|
1875
1875
|
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
1876
1876
|
config
|
|
1877
1877
|
);
|
|
1878
1878
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
1879
1879
|
await _devkit.formatFiles.call(void 0, tree);
|
|
1880
|
-
|
|
1880
|
+
_chunkHEZEMNOSjs.writeSuccess.call(void 0,
|
|
1881
1881
|
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
1882
1882
|
config
|
|
1883
1883
|
);
|
|
@@ -1933,7 +1933,7 @@ async function initGenerator(tree, schema) {
|
|
|
1933
1933
|
|
|
1934
1934
|
|
|
1935
1935
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
1936
|
-
const filesDir =
|
|
1936
|
+
const filesDir = _chunkHEZEMNOSjs.joinPaths.call(void 0,
|
|
1937
1937
|
__dirname,
|
|
1938
1938
|
"src",
|
|
1939
1939
|
"generators",
|
|
@@ -1992,7 +1992,7 @@ var generator_default3 = withRunGenerator(
|
|
|
1992
1992
|
|
|
1993
1993
|
|
|
1994
1994
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
1995
|
-
const filesDir =
|
|
1995
|
+
const filesDir = _chunkHEZEMNOSjs.joinPaths.call(void 0,
|
|
1996
1996
|
__dirname,
|
|
1997
1997
|
"src",
|
|
1998
1998
|
"generators",
|