@storm-software/terraform-tools 0.54.42 → 0.54.44
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 +15 -0
- package/README.md +1 -1
- package/dist/{chunk-T3CUIOQI.mjs → chunk-2KL7TQCA.mjs} +21 -8
- package/dist/{chunk-NJ3UD3AW.mjs → chunk-2YQ45BL6.mjs} +9 -9
- package/dist/{chunk-6JNJXZFJ.js → chunk-7DKBJQFC.js} +2 -2
- package/dist/{chunk-B73EOUKJ.mjs → chunk-DQSC56MV.mjs} +1 -1
- package/dist/{chunk-FIYCZYZ5.mjs → chunk-END6WC65.mjs} +1 -1
- package/dist/{chunk-7EE3ZWHR.js → chunk-HLKD7LH2.js} +9 -9
- package/dist/{chunk-NYWVLPFT.js → chunk-HNQXOQIK.js} +2 -2
- package/dist/{chunk-TB4YXZBF.mjs → chunk-I7YJV2HQ.mjs} +1 -1
- package/dist/{chunk-IJO2IHPY.js → chunk-IASMSKFD.js} +2 -2
- package/dist/{chunk-CU3WSB7P.mjs → chunk-JXBAKJPX.mjs} +1 -1
- package/dist/{chunk-T6WPHTRX.mjs → chunk-KXU4RONH.mjs} +1 -1
- package/dist/{chunk-MLGQ6TX6.js → chunk-SD5RUDOC.js} +2 -2
- package/dist/{chunk-KWRMGGZS.js → chunk-TC6M3XSY.js} +182 -169
- package/dist/{chunk-7QES4OFY.js → chunk-TMSXVOPT.js} +3 -3
- 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 +10 -10
- package/dist/index.mjs +9 -9
- package/dist/src/base/index.js +3 -3
- package/dist/src/base/index.mjs +2 -2
- package/dist/src/base/terraform-executor.d.mts +21 -5
- package/dist/src/base/terraform-executor.d.ts +21 -5
- 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 +1 -1
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkHLKD7LH2js = require('./chunk-HLKD7LH2.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -159,7 +159,7 @@ async function cargoBuildExecutor(options, context2) {
|
|
|
159
159
|
return await cargoCommand(...command);
|
|
160
160
|
}
|
|
161
161
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoBuildExecutor, "cargoBuildExecutor");
|
|
162
|
-
var executor_default =
|
|
162
|
+
var executor_default = _chunkHLKD7LH2js.withRunExecutor.call(void 0, "Cargo Build", cargoBuildExecutor, {
|
|
163
163
|
skipReadingConfig: false,
|
|
164
164
|
hooks: {
|
|
165
165
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -176,7 +176,7 @@ async function cargoCheckExecutor(options, context2) {
|
|
|
176
176
|
return await cargoCommand(...command);
|
|
177
177
|
}
|
|
178
178
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoCheckExecutor, "cargoCheckExecutor");
|
|
179
|
-
var executor_default2 =
|
|
179
|
+
var executor_default2 = _chunkHLKD7LH2js.withRunExecutor.call(void 0, "Cargo Check", cargoCheckExecutor, {
|
|
180
180
|
skipReadingConfig: false,
|
|
181
181
|
hooks: {
|
|
182
182
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -192,7 +192,7 @@ async function cargoClippyExecutor(options, context2) {
|
|
|
192
192
|
return await cargoCommand(...command);
|
|
193
193
|
}
|
|
194
194
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoClippyExecutor, "cargoClippyExecutor");
|
|
195
|
-
var executor_default3 =
|
|
195
|
+
var executor_default3 = _chunkHLKD7LH2js.withRunExecutor.call(void 0, "Cargo Clippy", cargoClippyExecutor, {
|
|
196
196
|
skipReadingConfig: false,
|
|
197
197
|
hooks: {
|
|
198
198
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -214,7 +214,7 @@ async function cargoDocExecutor(options, context2) {
|
|
|
214
214
|
return await cargoCommand(...command);
|
|
215
215
|
}
|
|
216
216
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoDocExecutor, "cargoDocExecutor");
|
|
217
|
-
var executor_default4 =
|
|
217
|
+
var executor_default4 = _chunkHLKD7LH2js.withRunExecutor.call(void 0, "Cargo Doc", cargoDocExecutor, {
|
|
218
218
|
skipReadingConfig: false,
|
|
219
219
|
hooks: {
|
|
220
220
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -237,7 +237,7 @@ async function cargoFormatExecutor(options, context2) {
|
|
|
237
237
|
return await cargoCommand(...command);
|
|
238
238
|
}
|
|
239
239
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoFormatExecutor, "cargoFormatExecutor");
|
|
240
|
-
var executor_default5 =
|
|
240
|
+
var executor_default5 = _chunkHLKD7LH2js.withRunExecutor.call(void 0, "Cargo Format", cargoFormatExecutor, {
|
|
241
241
|
skipReadingConfig: false,
|
|
242
242
|
hooks: {
|
|
243
243
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -318,8 +318,8 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
318
318
|
output: "src/"
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
|
|
322
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
321
|
+
_chunkHLKD7LH2js.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
322
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkHLKD7LH2js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
323
323
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
324
324
|
projectDir: projectRoot,
|
|
325
325
|
rootDir: config.workspaceRoot,
|
|
@@ -328,12 +328,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
328
328
|
});
|
|
329
329
|
await assetHandler.processAllAssetsOnce();
|
|
330
330
|
if (includeSrc === true) {
|
|
331
|
-
|
|
331
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkHLKD7LH2js.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
332
332
|
const files = await _glob.glob.call(void 0, [
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
333
|
+
_chunkHLKD7LH2js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
334
|
+
_chunkHLKD7LH2js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
335
|
+
_chunkHLKD7LH2js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
336
|
+
_chunkHLKD7LH2js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
337
337
|
]);
|
|
338
338
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
339
339
|
|
|
@@ -356,7 +356,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
356
356
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _5 => _5.node, 'access', _6 => _6.data, 'optionalAccess', _7 => _7.root]) !== projectRoot && _optionalChain([dep, 'access', _8 => _8.node, 'access', _9 => _9.data, 'optionalAccess', _10 => _10.root]) !== workspaceRoot3)) {
|
|
357
357
|
const projectNode = project.node;
|
|
358
358
|
if (projectNode.data.root) {
|
|
359
|
-
const projectPackageJsonPath =
|
|
359
|
+
const projectPackageJsonPath = _chunkHLKD7LH2js.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
|
|
360
360
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
361
361
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
362
362
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -367,8 +367,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
if (localPackages.length > 0) {
|
|
370
|
-
|
|
371
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
370
|
+
_chunkHLKD7LH2js.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
371
|
+
const projectJsonFile = await _promises.readFile.call(void 0, _chunkHLKD7LH2js.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
372
372
|
const projectJson = JSON.parse(projectJsonFile);
|
|
373
373
|
const projectName2 = projectJson.name;
|
|
374
374
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
@@ -377,7 +377,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
377
377
|
}
|
|
378
378
|
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) => {
|
|
379
379
|
if (_optionalChain([projectConfigurations, 'access', _18 => _18.projects, 'optionalAccess', _19 => _19[dep]])) {
|
|
380
|
-
const depPackageJsonPath =
|
|
380
|
+
const depPackageJsonPath = _chunkHLKD7LH2js.joinPaths.call(void 0, workspaceRoot3, projectConfigurations.projects[dep].root, "package.json");
|
|
381
381
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
382
382
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
383
383
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
@@ -389,25 +389,25 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
389
389
|
return ret;
|
|
390
390
|
}, [])]);
|
|
391
391
|
packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
|
|
392
|
-
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _20 => _20.includes, 'call', _21 => _21(localPackage.name)])) {
|
|
393
|
-
ret[localPackage.name] =
|
|
392
|
+
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _20 => _20.includes, 'call', _21 => _21(localPackage.name)]) && _optionalChain([packageJson, 'access', _22 => _22.devDependencies, 'optionalAccess', _23 => _23[localPackage.name]]) === void 0) {
|
|
393
|
+
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
394
394
|
}
|
|
395
395
|
return ret;
|
|
396
396
|
}, _nullishCoalesce(packageJson.dependencies, () => ( {})));
|
|
397
397
|
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
398
|
-
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess',
|
|
398
|
+
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _24 => _24.includes, 'call', _25 => _25(localPackage.name)]) && _optionalChain([packageJson, 'access', _26 => _26.dependencies, 'optionalAccess', _27 => _27[localPackage.name]]) === void 0) {
|
|
399
399
|
ret[localPackage.name] = localPackage.version || "0.0.1";
|
|
400
400
|
}
|
|
401
401
|
return ret;
|
|
402
402
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
403
403
|
} else {
|
|
404
|
-
|
|
404
|
+
_chunkHLKD7LH2js.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
405
405
|
}
|
|
406
406
|
return packageJson;
|
|
407
407
|
}, "addPackageDependencies");
|
|
408
408
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
409
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
410
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
409
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkHLKD7LH2js.findWorkspaceRoot.call(void 0, );
|
|
410
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkHLKD7LH2js.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
411
411
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
412
412
|
packageJson.type ??= "module";
|
|
413
413
|
packageJson.sideEffects ??= false;
|
|
@@ -416,7 +416,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
416
416
|
if (distSrc.startsWith("/")) {
|
|
417
417
|
distSrc = distSrc.substring(1);
|
|
418
418
|
}
|
|
419
|
-
packageJson.source ??= `${
|
|
419
|
+
packageJson.source ??= `${_chunkHLKD7LH2js.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
420
420
|
}
|
|
421
421
|
packageJson.files ??= [
|
|
422
422
|
"dist/**/*"
|
|
@@ -447,14 +447,14 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
447
447
|
];
|
|
448
448
|
}
|
|
449
449
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
450
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
450
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkHLKD7LH2js.joinPaths.call(void 0, "packages", projectName);
|
|
451
451
|
return packageJson;
|
|
452
452
|
}, "addWorkspacePackageJsonFields");
|
|
453
453
|
|
|
454
454
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
455
455
|
|
|
456
456
|
var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
457
|
-
const workspaceRoot3 = config.workspaceRoot ||
|
|
457
|
+
const workspaceRoot3 = config.workspaceRoot || _chunkHLKD7LH2js.findWorkspaceRoot.call(void 0, );
|
|
458
458
|
const entryPoints = [];
|
|
459
459
|
if (entry) {
|
|
460
460
|
if (typeof entry === "string") {
|
|
@@ -466,7 +466,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
if (emitOnAll) {
|
|
469
|
-
entryPoints.push(
|
|
469
|
+
entryPoints.push(_chunkHLKD7LH2js.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
470
470
|
}
|
|
471
471
|
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
472
472
|
const paths = [];
|
|
@@ -478,9 +478,9 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
478
478
|
]
|
|
479
479
|
});
|
|
480
480
|
paths.push(...files.reduce((ret, filePath) => {
|
|
481
|
-
const result =
|
|
481
|
+
const result = _chunkHLKD7LH2js.correctPaths.call(void 0, _chunkHLKD7LH2js.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkHLKD7LH2js.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkHLKD7LH2js.correctPaths.call(void 0, projectRoot), ""));
|
|
482
482
|
if (result) {
|
|
483
|
-
|
|
483
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkHLKD7LH2js.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
484
484
|
if (!paths.includes(result)) {
|
|
485
485
|
paths.push(result);
|
|
486
486
|
}
|
|
@@ -488,7 +488,11 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
488
488
|
return ret;
|
|
489
489
|
}, []));
|
|
490
490
|
} else {
|
|
491
|
-
|
|
491
|
+
const result = _chunkHLKD7LH2js.correctPaths.call(void 0, entryPoint.replaceAll(_chunkHLKD7LH2js.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkHLKD7LH2js.correctPaths.call(void 0, projectRoot), ""));
|
|
492
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, `Trying to add entry point ${result}"`, config);
|
|
493
|
+
if (!paths.includes(result)) {
|
|
494
|
+
paths.push(result);
|
|
495
|
+
}
|
|
492
496
|
}
|
|
493
497
|
return paths;
|
|
494
498
|
}));
|
|
@@ -600,15 +604,15 @@ var RendererEngine = class {
|
|
|
600
604
|
if (!relativePath.startsWith("\\\\?\\")) {
|
|
601
605
|
relativePath = relativePath.replace(/\\/g, "/");
|
|
602
606
|
}
|
|
603
|
-
const meta = _optionalChain([metafile, 'optionalAccess',
|
|
607
|
+
const meta = _optionalChain([metafile, 'optionalAccess', _28 => _28.outputs, 'access', _29 => _29[relativePath]]);
|
|
604
608
|
return {
|
|
605
609
|
type: "chunk",
|
|
606
610
|
path: file.path,
|
|
607
611
|
code: file.text,
|
|
608
|
-
map: _optionalChain([outputFiles, 'access',
|
|
609
|
-
entryPoint: _optionalChain([meta, 'optionalAccess',
|
|
610
|
-
exports: _optionalChain([meta, 'optionalAccess',
|
|
611
|
-
imports: _optionalChain([meta, 'optionalAccess',
|
|
612
|
+
map: _optionalChain([outputFiles, 'access', _30 => _30.find, 'call', _31 => _31((f) => f.path === `${file.path}.map`), 'optionalAccess', _32 => _32.text]),
|
|
613
|
+
entryPoint: _optionalChain([meta, 'optionalAccess', _33 => _33.entryPoint]),
|
|
614
|
+
exports: _optionalChain([meta, 'optionalAccess', _34 => _34.exports]),
|
|
615
|
+
imports: _optionalChain([meta, 'optionalAccess', _35 => _35.imports])
|
|
612
616
|
};
|
|
613
617
|
} else {
|
|
614
618
|
return {
|
|
@@ -691,7 +695,7 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
|
|
|
691
695
|
name: "storm:esm-split-code-to-cjs",
|
|
692
696
|
setup(build4) {
|
|
693
697
|
build4.onEnd(async (result) => {
|
|
694
|
-
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access',
|
|
698
|
+
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _36 => _36.metafile, 'optionalAccess', _37 => _37.outputs]), () => ( {})));
|
|
695
699
|
const jsFiles = outFiles.filter((f) => f.endsWith("js"));
|
|
696
700
|
await esbuild.build({
|
|
697
701
|
outdir: resolvedOptions.outdir,
|
|
@@ -800,7 +804,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
|
|
|
800
804
|
setup(build4) {
|
|
801
805
|
build4.onEnd((result) => {
|
|
802
806
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
803
|
-
|
|
807
|
+
_chunkHLKD7LH2js.writeError.call(void 0, `The following errors occurred during the build:
|
|
804
808
|
${result.errors.map((error) => error.text).join("\n")}
|
|
805
809
|
|
|
806
810
|
`, resolvedOptions.config);
|
|
@@ -813,7 +817,7 @@ ${result.errors.map((error) => error.text).join("\n")}
|
|
|
813
817
|
// ../esbuild/src/plugins/resolve-paths.ts
|
|
814
818
|
|
|
815
819
|
function resolvePathsConfig(options, cwd) {
|
|
816
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
820
|
+
if (_optionalChain([options, 'optionalAccess', _38 => _38.compilerOptions, 'optionalAccess', _39 => _39.paths])) {
|
|
817
821
|
const paths = Object.entries(options.compilerOptions.paths);
|
|
818
822
|
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
819
823
|
return [
|
|
@@ -835,13 +839,13 @@ _chunk3GQAWCBQjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
|
835
839
|
var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
836
840
|
name: "storm:resolve-paths",
|
|
837
841
|
setup(build4) {
|
|
838
|
-
const parentTsConfig = build4.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0,
|
|
842
|
+
const parentTsConfig = build4.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0, _chunkHLKD7LH2js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build4.initialOptions.tsconfig)) : _chunk3GQAWCBQjs.__require.call(void 0, _chunkHLKD7LH2js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
839
843
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
840
844
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
841
845
|
build4.onResolve({
|
|
842
846
|
filter: packagesRegex
|
|
843
847
|
}, (args) => {
|
|
844
|
-
if (_optionalChain([build4, 'access',
|
|
848
|
+
if (_optionalChain([build4, 'access', _40 => _40.initialOptions, 'access', _41 => _41.external, 'optionalAccess', _42 => _42.includes, 'call', _43 => _43(args.path)])) {
|
|
845
849
|
return {
|
|
846
850
|
path: args.path,
|
|
847
851
|
external: true
|
|
@@ -859,7 +863,7 @@ var _apiextractor = require('@microsoft/api-extractor');
|
|
|
859
863
|
|
|
860
864
|
|
|
861
865
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
862
|
-
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0,
|
|
866
|
+
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0, _chunkHLKD7LH2js.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
863
867
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
864
868
|
p,
|
|
865
869
|
getTypeDependencyPackageName(p)
|
|
@@ -895,13 +899,13 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
895
899
|
},
|
|
896
900
|
dtsRollup: {
|
|
897
901
|
enabled: true,
|
|
898
|
-
untrimmedFilePath:
|
|
902
|
+
untrimmedFilePath: _chunkHLKD7LH2js.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
899
903
|
},
|
|
900
904
|
tsdocMetadata: {
|
|
901
905
|
enabled: false
|
|
902
906
|
}
|
|
903
907
|
},
|
|
904
|
-
packageJsonFullPath:
|
|
908
|
+
packageJsonFullPath: _chunkHLKD7LH2js.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
905
909
|
configObjectFullPath: void 0
|
|
906
910
|
});
|
|
907
911
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -909,7 +913,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
909
913
|
localBuild: true
|
|
910
914
|
});
|
|
911
915
|
if (extractorResult.succeeded === false) {
|
|
912
|
-
|
|
916
|
+
_chunkHLKD7LH2js.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
913
917
|
throw new Error("API Extractor completed with errors");
|
|
914
918
|
}
|
|
915
919
|
}
|
|
@@ -922,18 +926,18 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
|
|
|
922
926
|
}
|
|
923
927
|
build4.onStart(async () => {
|
|
924
928
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
925
|
-
await
|
|
929
|
+
await _chunkHLKD7LH2js.run.call(void 0, resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
926
930
|
}
|
|
927
931
|
if (resolvedOptions.bundle && resolvedOptions.entryPoints && resolvedOptions.entryPoints.length > 0 && resolvedOptions.entryPoints[0] && resolvedOptions.entryPoints[0].endsWith(".ts")) {
|
|
928
932
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
929
933
|
const typeOutDir = resolvedOptions.outdir;
|
|
930
934
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
931
|
-
const bundlePath =
|
|
935
|
+
const bundlePath = _chunkHLKD7LH2js.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
932
936
|
let dtsPath;
|
|
933
|
-
if (_fs.existsSync.call(void 0,
|
|
934
|
-
dtsPath =
|
|
935
|
-
} else if (_fs.existsSync.call(void 0,
|
|
936
|
-
dtsPath =
|
|
937
|
+
if (_fs.existsSync.call(void 0, _chunkHLKD7LH2js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
938
|
+
dtsPath = _chunkHLKD7LH2js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
939
|
+
} else if (_fs.existsSync.call(void 0, _chunkHLKD7LH2js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
940
|
+
dtsPath = _chunkHLKD7LH2js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
937
941
|
}
|
|
938
942
|
const ext = resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
939
943
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -950,7 +954,7 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
|
|
|
950
954
|
function getTypeDependencyPackageName(npmPackage) {
|
|
951
955
|
if (npmPackage.startsWith("@")) {
|
|
952
956
|
const [scope, name] = npmPackage.split("/");
|
|
953
|
-
return `@types/${_optionalChain([scope, 'optionalAccess',
|
|
957
|
+
return `@types/${_optionalChain([scope, 'optionalAccess', _44 => _44.slice, 'call', _45 => _45(1)])}__${name}`;
|
|
954
958
|
}
|
|
955
959
|
return `@types/${npmPackage}`;
|
|
956
960
|
}
|
|
@@ -1097,8 +1101,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
1097
1101
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
1098
1102
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
1099
1103
|
});
|
|
1100
|
-
|
|
1101
|
-
|
|
1104
|
+
_chunkHLKD7LH2js.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
1105
|
+
_chunkHLKD7LH2js.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
1102
1106
|
if (filteredMissingDeps.length > 0) {
|
|
1103
1107
|
throw new Error(`Missing dependencies detected - please install them:
|
|
1104
1108
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1166,7 +1170,7 @@ function pipeSync(fn, ...fns) {
|
|
|
1166
1170
|
return (...args) => {
|
|
1167
1171
|
let result = fn(...args);
|
|
1168
1172
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
1169
|
-
result = _optionalChain([fns, 'access',
|
|
1173
|
+
result = _optionalChain([fns, 'access', _46 => _46[i], 'optionalCall', _47 => _47(result)]);
|
|
1170
1174
|
}
|
|
1171
1175
|
return result;
|
|
1172
1176
|
};
|
|
@@ -1176,7 +1180,7 @@ function pipeAsync(fn, ...fns) {
|
|
|
1176
1180
|
return async (...args) => {
|
|
1177
1181
|
let result = await fn(...args);
|
|
1178
1182
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
1179
|
-
result = await _optionalChain([fns, 'access',
|
|
1183
|
+
result = await _optionalChain([fns, 'access', _48 => _48[i], 'optionalCall', _49 => _49(result)]);
|
|
1180
1184
|
}
|
|
1181
1185
|
return result;
|
|
1182
1186
|
};
|
|
@@ -1192,13 +1196,13 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1192
1196
|
if (!workspaceRoot3) {
|
|
1193
1197
|
throw new Error("Cannot find Nx workspace root");
|
|
1194
1198
|
}
|
|
1195
|
-
const config = await
|
|
1196
|
-
|
|
1197
|
-
const stopwatch =
|
|
1199
|
+
const config = await _chunkHLKD7LH2js.getConfig.call(void 0, workspaceRoot3.dir);
|
|
1200
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1201
|
+
const stopwatch = _chunkHLKD7LH2js.getStopwatch.call(void 0, "Build options resolution");
|
|
1198
1202
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1199
1203
|
exitOnError: true
|
|
1200
1204
|
});
|
|
1201
|
-
const projectJsonPath =
|
|
1205
|
+
const projectJsonPath = _chunkHLKD7LH2js.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1202
1206
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
1203
1207
|
throw new Error("Cannot find project.json configuration");
|
|
1204
1208
|
}
|
|
@@ -1206,13 +1210,13 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1206
1210
|
const projectJson = JSON.parse(projectJsonFile);
|
|
1207
1211
|
const projectName = projectJson.name;
|
|
1208
1212
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
1209
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
1213
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _50 => _50.projects, 'optionalAccess', _51 => _51[projectName]])) {
|
|
1210
1214
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
1211
1215
|
}
|
|
1212
1216
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
1213
1217
|
options.name ??= `${projectName}-${options.format}`;
|
|
1214
1218
|
options.target ??= DEFAULT_TARGET;
|
|
1215
|
-
const packageJsonPath =
|
|
1219
|
+
const packageJsonPath = _chunkHLKD7LH2js.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1216
1220
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1217
1221
|
throw new Error("Cannot find package.json configuration");
|
|
1218
1222
|
}
|
|
@@ -1229,19 +1233,19 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1229
1233
|
"main"
|
|
1230
1234
|
],
|
|
1231
1235
|
...userOptions,
|
|
1232
|
-
tsconfig:
|
|
1236
|
+
tsconfig: _chunkHLKD7LH2js.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1233
1237
|
format: options.format || "cjs",
|
|
1234
1238
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, _nullishCoalesce(userOptions.entry, () => ( "./src/index.ts")), userOptions.emitOnAll === true),
|
|
1235
|
-
outdir: userOptions.outputPath ||
|
|
1239
|
+
outdir: userOptions.outputPath || _chunkHLKD7LH2js.joinPaths.call(void 0, "dist", projectRoot),
|
|
1236
1240
|
distDir: userOptions.distDir || "dist",
|
|
1237
1241
|
plugins: [],
|
|
1238
1242
|
name: userOptions.name || projectName,
|
|
1239
1243
|
projectConfigurations,
|
|
1240
1244
|
projectName,
|
|
1241
1245
|
projectGraph,
|
|
1242
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1246
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkHLKD7LH2js.joinPaths.call(void 0, projectRoot, "src"),
|
|
1243
1247
|
minify: userOptions.minify || !userOptions.debug,
|
|
1244
|
-
verbose: userOptions.verbose ||
|
|
1248
|
+
verbose: userOptions.verbose || _chunkHLKD7LH2js.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1245
1249
|
includeSrc: userOptions.includeSrc === true,
|
|
1246
1250
|
metafile: userOptions.metafile !== false,
|
|
1247
1251
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1277,13 +1281,18 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1277
1281
|
}, {})
|
|
1278
1282
|
},
|
|
1279
1283
|
inject: [
|
|
1280
|
-
options.format === "cjs" && options.injectShims ?
|
|
1281
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ?
|
|
1284
|
+
options.format === "cjs" && options.injectShims ? _chunkHLKD7LH2js.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : void 0,
|
|
1285
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkHLKD7LH2js.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : void 0
|
|
1282
1286
|
].filter(Boolean)
|
|
1283
1287
|
};
|
|
1284
1288
|
result.plugins = _nullishCoalesce(userOptions.plugins, () => ( getDefaultBuildPlugins(userOptions, result)));
|
|
1285
1289
|
if (options.inject && Array.isArray(options.inject) && options.inject.length > 0) {
|
|
1286
|
-
result.inject =
|
|
1290
|
+
result.inject = options.inject.reduce((ret, inj) => {
|
|
1291
|
+
if (inj && typeof inj === "string" && ret.includes(inj)) {
|
|
1292
|
+
ret.push(inj);
|
|
1293
|
+
}
|
|
1294
|
+
return ret;
|
|
1295
|
+
}, result.inject);
|
|
1287
1296
|
}
|
|
1288
1297
|
delete result.entry;
|
|
1289
1298
|
delete result.outputPath;
|
|
@@ -1291,14 +1300,14 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1291
1300
|
return result;
|
|
1292
1301
|
}, "resolveOptions");
|
|
1293
1302
|
async function generatePackageJson(context2) {
|
|
1294
|
-
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1295
|
-
|
|
1296
|
-
const stopwatch =
|
|
1297
|
-
const packageJsonPath =
|
|
1303
|
+
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkHLKD7LH2js.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
1304
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
1305
|
+
const stopwatch = _chunkHLKD7LH2js.getStopwatch.call(void 0, "Write package.json file");
|
|
1306
|
+
const packageJsonPath = _chunkHLKD7LH2js.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
1298
1307
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1299
1308
|
throw new Error("Cannot find package.json configuration");
|
|
1300
1309
|
}
|
|
1301
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
1310
|
+
const packageJsonFile = await _promises2.default.readFile(_chunkHLKD7LH2js.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
|
|
1302
1311
|
let packageJson = JSON.parse(packageJsonFile);
|
|
1303
1312
|
if (!packageJson) {
|
|
1304
1313
|
throw new Error("Cannot find package.json configuration file");
|
|
@@ -1340,7 +1349,7 @@ async function generatePackageJson(context2) {
|
|
|
1340
1349
|
}
|
|
1341
1350
|
return ret;
|
|
1342
1351
|
}, packageJson.exports);
|
|
1343
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1352
|
+
await _devkit.writeJsonFile.call(void 0, _chunkHLKD7LH2js.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
|
|
1344
1353
|
stopwatch();
|
|
1345
1354
|
}
|
|
1346
1355
|
return context2;
|
|
@@ -1366,8 +1375,8 @@ async function generateContext(getOptions) {
|
|
|
1366
1375
|
}
|
|
1367
1376
|
_chunk3GQAWCBQjs.__name.call(void 0, generateContext, "generateContext");
|
|
1368
1377
|
async function executeEsBuild(context2) {
|
|
1369
|
-
|
|
1370
|
-
const stopwatch =
|
|
1378
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
1379
|
+
const stopwatch = _chunkHLKD7LH2js.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
1371
1380
|
if (process.env.STORM_WATCH) {
|
|
1372
1381
|
const ctx = await esbuild2.context(context2.options);
|
|
1373
1382
|
watch(ctx, context2.options);
|
|
@@ -1375,7 +1384,11 @@ async function executeEsBuild(context2) {
|
|
|
1375
1384
|
const options = {
|
|
1376
1385
|
...context2.options
|
|
1377
1386
|
};
|
|
1378
|
-
options.outdir =
|
|
1387
|
+
options.outdir = _chunkHLKD7LH2js.joinPaths.call(void 0, context2.options.outdir, context2.options.distDir);
|
|
1388
|
+
if (!options.inject || !Array.isArray(options.inject) || options.inject.length === 0 || // eslint-disable-next-line no-constant-binary-expression, @typescript-eslint/no-explicit-any
|
|
1389
|
+
options.inject === {}) {
|
|
1390
|
+
delete options.inject;
|
|
1391
|
+
}
|
|
1379
1392
|
delete options.env;
|
|
1380
1393
|
delete options.name;
|
|
1381
1394
|
delete options.assets;
|
|
@@ -1397,8 +1410,8 @@ async function executeEsBuild(context2) {
|
|
|
1397
1410
|
delete options.config;
|
|
1398
1411
|
delete options.injectShims;
|
|
1399
1412
|
delete options.external;
|
|
1400
|
-
|
|
1401
|
-
${
|
|
1413
|
+
_chunkHLKD7LH2js.writeTrace.call(void 0, `Run esbuild (${context2.options.name}) with the following options:
|
|
1414
|
+
${_chunkHLKD7LH2js.formatLogMessage.call(void 0, options)}`, context2.options.config);
|
|
1402
1415
|
const result = await esbuild2.build(options);
|
|
1403
1416
|
await esbuild2.stop();
|
|
1404
1417
|
if (result.metafile) {
|
|
@@ -1410,9 +1423,9 @@ ${_chunk7EE3ZWHRjs.formatLogMessage.call(void 0, options)}`, context2.options.co
|
|
|
1410
1423
|
}
|
|
1411
1424
|
_chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
1412
1425
|
async function copyBuildAssets(context2) {
|
|
1413
|
-
if (_optionalChain([context2, 'access',
|
|
1414
|
-
|
|
1415
|
-
const stopwatch =
|
|
1426
|
+
if (_optionalChain([context2, 'access', _52 => _52.result, 'optionalAccess', _53 => _53.errors, 'access', _54 => _54.length]) === 0) {
|
|
1427
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
1428
|
+
const stopwatch = _chunkHLKD7LH2js.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1416
1429
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
1417
1430
|
stopwatch();
|
|
1418
1431
|
}
|
|
@@ -1420,11 +1433,11 @@ async function copyBuildAssets(context2) {
|
|
|
1420
1433
|
}
|
|
1421
1434
|
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
1422
1435
|
async function reportResults(context2) {
|
|
1423
|
-
if (_optionalChain([context2, 'access',
|
|
1436
|
+
if (_optionalChain([context2, 'access', _55 => _55.result, 'optionalAccess', _56 => _56.errors, 'access', _57 => _57.length]) === 0) {
|
|
1424
1437
|
if (context2.result.warnings.length > 0) {
|
|
1425
|
-
|
|
1438
|
+
_chunkHLKD7LH2js.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
|
|
1426
1439
|
}
|
|
1427
|
-
|
|
1440
|
+
_chunkHLKD7LH2js.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
1428
1441
|
}
|
|
1429
1442
|
}
|
|
1430
1443
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -1460,8 +1473,8 @@ async function dependencyCheck(options) {
|
|
|
1460
1473
|
_chunk3GQAWCBQjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
1461
1474
|
async function cleanOutputPath(context2) {
|
|
1462
1475
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
1463
|
-
|
|
1464
|
-
const stopwatch =
|
|
1476
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
1477
|
+
const stopwatch = _chunkHLKD7LH2js.getStopwatch.call(void 0, `${context2.options.name} output clean`);
|
|
1465
1478
|
await cleanDirectories(context2.options.name, context2.options.outdir, context2.options.config);
|
|
1466
1479
|
stopwatch();
|
|
1467
1480
|
}
|
|
@@ -1469,8 +1482,8 @@ async function cleanOutputPath(context2) {
|
|
|
1469
1482
|
}
|
|
1470
1483
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1471
1484
|
async function build3(options) {
|
|
1472
|
-
|
|
1473
|
-
const stopwatch =
|
|
1485
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1486
|
+
const stopwatch = _chunkHLKD7LH2js.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1474
1487
|
try {
|
|
1475
1488
|
const opts = Array.isArray(options) ? options : [
|
|
1476
1489
|
options
|
|
@@ -1480,9 +1493,9 @@ async function build3(options) {
|
|
|
1480
1493
|
}
|
|
1481
1494
|
void transduce.async(opts, dependencyCheck);
|
|
1482
1495
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
1483
|
-
|
|
1496
|
+
_chunkHLKD7LH2js.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1484
1497
|
} catch (error) {
|
|
1485
|
-
|
|
1498
|
+
_chunkHLKD7LH2js.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
1486
1499
|
throw error;
|
|
1487
1500
|
} finally {
|
|
1488
1501
|
stopwatch();
|
|
@@ -1510,9 +1523,9 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1510
1523
|
return context2.rebuild();
|
|
1511
1524
|
});
|
|
1512
1525
|
if (rebuildResult instanceof Error) {
|
|
1513
|
-
|
|
1526
|
+
_chunkHLKD7LH2js.writeError.call(void 0, rebuildResult.message);
|
|
1514
1527
|
}
|
|
1515
|
-
|
|
1528
|
+
_chunkHLKD7LH2js.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
1516
1529
|
}, 10);
|
|
1517
1530
|
changeWatcher.on("change", fastRebuild);
|
|
1518
1531
|
return void 0;
|
|
@@ -1520,15 +1533,15 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1520
1533
|
|
|
1521
1534
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1522
1535
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1523
|
-
|
|
1524
|
-
if (!_optionalChain([context2, 'access',
|
|
1536
|
+
_chunkHLKD7LH2js.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1537
|
+
if (!_optionalChain([context2, 'access', _58 => _58.projectsConfigurations, 'optionalAccess', _59 => _59.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _60 => _60.projectsConfigurations, 'access', _61 => _61.projects, 'access', _62 => _62[context2.projectName], 'optionalAccess', _63 => _63.root])) {
|
|
1525
1538
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1526
1539
|
}
|
|
1527
1540
|
await build3({
|
|
1528
1541
|
...options,
|
|
1529
|
-
projectRoot: _optionalChain([context2, 'access',
|
|
1542
|
+
projectRoot: _optionalChain([context2, 'access', _64 => _64.projectsConfigurations, 'access', _65 => _65.projects, 'optionalAccess', _66 => _66[context2.projectName], 'access', _67 => _67.root]),
|
|
1530
1543
|
projectName: context2.projectName,
|
|
1531
|
-
sourceRoot: _optionalChain([context2, 'access',
|
|
1544
|
+
sourceRoot: _optionalChain([context2, 'access', _68 => _68.projectsConfigurations, 'access', _69 => _69.projects, 'optionalAccess', _70 => _70[context2.projectName], 'optionalAccess', _71 => _71.sourceRoot]),
|
|
1532
1545
|
format: options.format,
|
|
1533
1546
|
platform: options.format
|
|
1534
1547
|
});
|
|
@@ -1537,7 +1550,7 @@ async function esbuildExecutorFn(options, context2, config) {
|
|
|
1537
1550
|
};
|
|
1538
1551
|
}
|
|
1539
1552
|
_chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
|
|
1540
|
-
var executor_default6 =
|
|
1553
|
+
var executor_default6 = _chunkHLKD7LH2js.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
|
|
1541
1554
|
skipReadingConfig: false,
|
|
1542
1555
|
hooks: {
|
|
1543
1556
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1571,25 +1584,25 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
|
|
|
1571
1584
|
var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
|
|
1572
1585
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
1573
1586
|
async function sizeLimitExecutorFn(options, context2, config) {
|
|
1574
|
-
if (!_optionalChain([context2, 'optionalAccess',
|
|
1587
|
+
if (!_optionalChain([context2, 'optionalAccess', _72 => _72.projectName]) || !_optionalChain([context2, 'access', _73 => _73.projectsConfigurations, 'optionalAccess', _74 => _74.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1575
1588
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
1576
1589
|
}
|
|
1577
|
-
|
|
1590
|
+
_chunkHLKD7LH2js.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
1578
1591
|
_sizelimit2.default.call(void 0, [
|
|
1579
1592
|
_file2.default,
|
|
1580
1593
|
_esbuild3.default,
|
|
1581
1594
|
_esbuildwhy2.default
|
|
1582
1595
|
], {
|
|
1583
|
-
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access',
|
|
1596
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _75 => _75.projectsConfigurations, 'access', _76 => _76.projects, 'access', _77 => _77[context2.projectName], 'optionalAccess', _78 => _78.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _79 => _79.projectsConfigurations, 'access', _80 => _80.projects, 'access', _81 => _81[context2.projectName], 'optionalAccess', _82 => _82.root]), () => ( "./")), "src")))
|
|
1584
1597
|
}).then((result) => {
|
|
1585
|
-
|
|
1598
|
+
_chunkHLKD7LH2js.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
1586
1599
|
});
|
|
1587
1600
|
return {
|
|
1588
1601
|
success: true
|
|
1589
1602
|
};
|
|
1590
1603
|
}
|
|
1591
1604
|
_chunk3GQAWCBQjs.__name.call(void 0, sizeLimitExecutorFn, "sizeLimitExecutorFn");
|
|
1592
|
-
var executor_default7 =
|
|
1605
|
+
var executor_default7 = _chunkHLKD7LH2js.withRunExecutor.call(void 0, "Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
|
|
1593
1606
|
skipReadingConfig: false,
|
|
1594
1607
|
hooks: {
|
|
1595
1608
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1603,11 +1616,11 @@ var _fsextra = require('fs-extra');
|
|
|
1603
1616
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1604
1617
|
async function typiaExecutorFn(options, _, config) {
|
|
1605
1618
|
if (options.clean !== false) {
|
|
1606
|
-
|
|
1619
|
+
_chunkHLKD7LH2js.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1607
1620
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1608
1621
|
}
|
|
1609
1622
|
await Promise.all(options.entry.map((entry) => {
|
|
1610
|
-
|
|
1623
|
+
_chunkHLKD7LH2js.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1611
1624
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1612
1625
|
input: entry,
|
|
1613
1626
|
output: options.outputPath,
|
|
@@ -1619,7 +1632,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
1619
1632
|
};
|
|
1620
1633
|
}
|
|
1621
1634
|
_chunk3GQAWCBQjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
|
|
1622
|
-
var executor_default8 =
|
|
1635
|
+
var executor_default8 = _chunkHLKD7LH2js.withRunExecutor.call(void 0, "Typia runtime validation generator", typiaExecutorFn, {
|
|
1623
1636
|
skipReadingConfig: false,
|
|
1624
1637
|
hooks: {
|
|
1625
1638
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1638,8 +1651,8 @@ var executor_default8 = _chunk7EE3ZWHRjs.withRunExecutor.call(void 0, "Typia run
|
|
|
1638
1651
|
|
|
1639
1652
|
var _jiti = require('jiti');
|
|
1640
1653
|
async function unbuildExecutorFn(options, context2, config) {
|
|
1641
|
-
|
|
1642
|
-
if (!_optionalChain([context2, 'access',
|
|
1654
|
+
_chunkHLKD7LH2js.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1655
|
+
if (!_optionalChain([context2, 'access', _83 => _83.projectsConfigurations, 'optionalAccess', _84 => _84.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1643
1656
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
1644
1657
|
}
|
|
1645
1658
|
if (!context2.projectsConfigurations.projects[context2.projectName].root) {
|
|
@@ -1649,7 +1662,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1649
1662
|
throw new Error("The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory.");
|
|
1650
1663
|
}
|
|
1651
1664
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1652
|
-
fsCache: config.skipCache ? false :
|
|
1665
|
+
fsCache: config.skipCache ? false : _chunkHLKD7LH2js.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
1653
1666
|
interopDefault: true
|
|
1654
1667
|
});
|
|
1655
1668
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
@@ -1662,7 +1675,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1662
1675
|
}, {
|
|
1663
1676
|
stubOptions: {
|
|
1664
1677
|
jiti: {
|
|
1665
|
-
fsCache: config.skipCache ? false :
|
|
1678
|
+
fsCache: config.skipCache ? false : _chunkHLKD7LH2js.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
|
|
1666
1679
|
}
|
|
1667
1680
|
},
|
|
1668
1681
|
rollup: {
|
|
@@ -1686,7 +1699,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1686
1699
|
};
|
|
1687
1700
|
}
|
|
1688
1701
|
_chunk3GQAWCBQjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
|
|
1689
|
-
var executor_default9 =
|
|
1702
|
+
var executor_default9 = _chunkHLKD7LH2js.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
|
|
1690
1703
|
skipReadingConfig: false,
|
|
1691
1704
|
hooks: {
|
|
1692
1705
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1709,58 +1722,58 @@ var executor_default9 = _chunk7EE3ZWHRjs.withRunExecutor.call(void 0, "TypeScrip
|
|
|
1709
1722
|
var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
1710
1723
|
skipReadingConfig: false
|
|
1711
1724
|
}) => async (tree, _options) => {
|
|
1712
|
-
const stopwatch =
|
|
1725
|
+
const stopwatch = _chunkHLKD7LH2js.getStopwatch.call(void 0, name);
|
|
1713
1726
|
let options = _options;
|
|
1714
1727
|
let config;
|
|
1715
1728
|
try {
|
|
1716
|
-
|
|
1729
|
+
_chunkHLKD7LH2js.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
1717
1730
|
|
|
1718
1731
|
`, config);
|
|
1719
|
-
const workspaceRoot3 =
|
|
1732
|
+
const workspaceRoot3 = _chunkHLKD7LH2js.findWorkspaceRoot.call(void 0, );
|
|
1720
1733
|
if (!generatorOptions.skipReadingConfig) {
|
|
1721
|
-
|
|
1734
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
1722
1735
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
1723
|
-
config = await
|
|
1736
|
+
config = await _chunkHLKD7LH2js.getConfig.call(void 0, workspaceRoot3);
|
|
1724
1737
|
}
|
|
1725
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
1726
|
-
|
|
1738
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _85 => _85.hooks, 'optionalAccess', _86 => _86.applyDefaultOptions])) {
|
|
1739
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1727
1740
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
1728
|
-
|
|
1741
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1729
1742
|
}
|
|
1730
|
-
|
|
1743
|
+
_chunkHLKD7LH2js.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
|
|
1731
1744
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
|
|
1732
|
-
const tokenized = await
|
|
1745
|
+
const tokenized = await _chunkHLKD7LH2js.applyWorkspaceTokens.call(void 0, options, {
|
|
1733
1746
|
workspaceRoot: tree.root,
|
|
1734
1747
|
config
|
|
1735
|
-
},
|
|
1736
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
1737
|
-
|
|
1748
|
+
}, _chunkHLKD7LH2js.applyWorkspaceBaseTokens);
|
|
1749
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _87 => _87.hooks, 'optionalAccess', _88 => _88.preProcess])) {
|
|
1750
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
1738
1751
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
1739
|
-
|
|
1752
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
1740
1753
|
}
|
|
1741
1754
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
1742
1755
|
if (result) {
|
|
1743
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
1756
|
+
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _89 => _89.error, 'optionalAccess', _90 => _90.message]) && typeof _optionalChain([result, 'optionalAccess', _91 => _91.error, 'optionalAccess', _92 => _92.message]) === "string" && _optionalChain([result, 'optionalAccess', _93 => _93.error, 'optionalAccess', _94 => _94.name]) && typeof _optionalChain([result, 'optionalAccess', _95 => _95.error, 'optionalAccess', _96 => _96.name]) === "string") {
|
|
1744
1757
|
throw new Error(`The ${name} generator failed to run`, {
|
|
1745
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
1758
|
+
cause: _optionalChain([result, 'optionalAccess', _97 => _97.error])
|
|
1746
1759
|
});
|
|
1747
1760
|
} else if (result.success && result.data) {
|
|
1748
1761
|
return result;
|
|
1749
1762
|
}
|
|
1750
1763
|
}
|
|
1751
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
1752
|
-
|
|
1764
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _98 => _98.hooks, 'optionalAccess', _99 => _99.postProcess])) {
|
|
1765
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
1753
1766
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1754
|
-
|
|
1767
|
+
_chunkHLKD7LH2js.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
1755
1768
|
}
|
|
1756
1769
|
return () => {
|
|
1757
|
-
|
|
1770
|
+
_chunkHLKD7LH2js.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
1758
1771
|
`, config);
|
|
1759
1772
|
};
|
|
1760
1773
|
} catch (error) {
|
|
1761
1774
|
return () => {
|
|
1762
|
-
|
|
1763
|
-
|
|
1775
|
+
_chunkHLKD7LH2js.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
1776
|
+
_chunkHLKD7LH2js.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
1764
1777
|
- Details: ${error.message}
|
|
1765
1778
|
- Stacktrace: ${error.stack}`, config);
|
|
1766
1779
|
};
|
|
@@ -1862,7 +1875,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1862
1875
|
const projectConfig = {
|
|
1863
1876
|
root: normalized.directory,
|
|
1864
1877
|
projectType: "library",
|
|
1865
|
-
sourceRoot:
|
|
1878
|
+
sourceRoot: _chunkHLKD7LH2js.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
1866
1879
|
targets: {
|
|
1867
1880
|
build: {
|
|
1868
1881
|
executor: options.buildExecutor,
|
|
@@ -1871,11 +1884,11 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1871
1884
|
],
|
|
1872
1885
|
options: {
|
|
1873
1886
|
entry: [
|
|
1874
|
-
|
|
1887
|
+
_chunkHLKD7LH2js.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")
|
|
1875
1888
|
],
|
|
1876
1889
|
outputPath: getOutputPath(normalized),
|
|
1877
|
-
tsconfig:
|
|
1878
|
-
project:
|
|
1890
|
+
tsconfig: _chunkHLKD7LH2js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
1891
|
+
project: _chunkHLKD7LH2js.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
1879
1892
|
defaultConfiguration: "production",
|
|
1880
1893
|
platform: "neutral",
|
|
1881
1894
|
assets: [
|
|
@@ -1914,22 +1927,22 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1914
1927
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
1915
1928
|
let repository = {
|
|
1916
1929
|
type: "github",
|
|
1917
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
1930
|
+
url: _optionalChain([config, 'optionalAccess', _100 => _100.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _101 => _101.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _102 => _102.namespace]) || _optionalChain([config, 'optionalAccess', _103 => _103.name]) || "repository"}.git`
|
|
1918
1931
|
};
|
|
1919
1932
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
1920
1933
|
if (tree.exists("package.json")) {
|
|
1921
1934
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
1922
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
1935
|
+
if (_optionalChain([packageJson, 'optionalAccess', _104 => _104.repository])) {
|
|
1923
1936
|
repository = packageJson.repository;
|
|
1924
1937
|
}
|
|
1925
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
1938
|
+
if (_optionalChain([packageJson, 'optionalAccess', _105 => _105.description])) {
|
|
1926
1939
|
description = packageJson.description;
|
|
1927
1940
|
}
|
|
1928
1941
|
}
|
|
1929
1942
|
if (!normalized.importPath) {
|
|
1930
1943
|
normalized.importPath = normalized.name;
|
|
1931
1944
|
}
|
|
1932
|
-
const packageJsonPath =
|
|
1945
|
+
const packageJsonPath = _chunkHLKD7LH2js.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
1933
1946
|
if (tree.exists(packageJsonPath)) {
|
|
1934
1947
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
1935
1948
|
if (!normalized.importPath) {
|
|
@@ -1977,30 +1990,30 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1977
1990
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
1978
1991
|
...json,
|
|
1979
1992
|
pnpm: {
|
|
1980
|
-
..._optionalChain([json, 'optionalAccess',
|
|
1993
|
+
..._optionalChain([json, 'optionalAccess', _106 => _106.pnpm]),
|
|
1981
1994
|
overrides: {
|
|
1982
|
-
..._optionalChain([json, 'optionalAccess',
|
|
1995
|
+
..._optionalChain([json, 'optionalAccess', _107 => _107.pnpm, 'optionalAccess', _108 => _108.overrides]),
|
|
1983
1996
|
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
1984
1997
|
}
|
|
1985
1998
|
}
|
|
1986
1999
|
}));
|
|
1987
2000
|
}
|
|
1988
2001
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
1989
|
-
|
|
2002
|
+
_chunkHLKD7LH2js.joinPaths.call(void 0, normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
|
|
1990
2003
|
]);
|
|
1991
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
1992
|
-
|
|
2004
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkHLKD7LH2js.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
2005
|
+
_chunkHLKD7LH2js.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
1993
2006
|
]);
|
|
1994
2007
|
if (tree.exists("package.json")) {
|
|
1995
2008
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
1996
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2009
|
+
if (_optionalChain([packageJson, 'optionalAccess', _109 => _109.repository])) {
|
|
1997
2010
|
repository = packageJson.repository;
|
|
1998
2011
|
}
|
|
1999
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2012
|
+
if (_optionalChain([packageJson, 'optionalAccess', _110 => _110.description])) {
|
|
2000
2013
|
description = packageJson.description;
|
|
2001
2014
|
}
|
|
2002
2015
|
}
|
|
2003
|
-
const tsconfigPath =
|
|
2016
|
+
const tsconfigPath = _chunkHLKD7LH2js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
2004
2017
|
if (tree.exists(tsconfigPath)) {
|
|
2005
2018
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2006
2019
|
json.composite ??= true;
|
|
@@ -2038,42 +2051,42 @@ function getOutputPath(options) {
|
|
|
2038
2051
|
} else {
|
|
2039
2052
|
parts.push(options.projectRoot);
|
|
2040
2053
|
}
|
|
2041
|
-
return
|
|
2054
|
+
return _chunkHLKD7LH2js.joinPaths.call(void 0, ...parts);
|
|
2042
2055
|
}
|
|
2043
2056
|
_chunk3GQAWCBQjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
2044
2057
|
function createProjectTsConfigJson(tree, options) {
|
|
2045
2058
|
const tsconfig = {
|
|
2046
2059
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
2047
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2060
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _111 => _111.tsconfigOptions]), () => ( {})),
|
|
2048
2061
|
compilerOptions: {
|
|
2049
2062
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2050
|
-
outDir:
|
|
2063
|
+
outDir: _chunkHLKD7LH2js.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2051
2064
|
noEmit: true,
|
|
2052
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2065
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _112 => _112.tsconfigOptions, 'optionalAccess', _113 => _113.compilerOptions]), () => ( {}))
|
|
2053
2066
|
},
|
|
2054
2067
|
files: [
|
|
2055
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2068
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _114 => _114.tsconfigOptions, 'optionalAccess', _115 => _115.files]), () => ( []))
|
|
2056
2069
|
],
|
|
2057
2070
|
include: [
|
|
2058
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2071
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _116 => _116.tsconfigOptions, 'optionalAccess', _117 => _117.include]), () => ( [])),
|
|
2059
2072
|
"src/**/*.ts",
|
|
2060
2073
|
"src/**/*.js",
|
|
2061
2074
|
"bin/**/*"
|
|
2062
2075
|
],
|
|
2063
2076
|
exclude: [
|
|
2064
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2077
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _118 => _118.tsconfigOptions, 'optionalAccess', _119 => _119.exclude]), () => ( [])),
|
|
2065
2078
|
"jest.config.ts",
|
|
2066
2079
|
"src/**/*.spec.ts",
|
|
2067
2080
|
"src/**/*.test.ts"
|
|
2068
2081
|
]
|
|
2069
2082
|
};
|
|
2070
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2083
|
+
_devkit.writeJson.call(void 0, tree, _chunkHLKD7LH2js.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2071
2084
|
}
|
|
2072
2085
|
_chunk3GQAWCBQjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2073
2086
|
async function normalizeOptions(tree, options, config) {
|
|
2074
2087
|
let importPath = options.importPath;
|
|
2075
|
-
if (!importPath && _optionalChain([config, 'optionalAccess',
|
|
2076
|
-
importPath = `@${_optionalChain([config, 'optionalAccess',
|
|
2088
|
+
if (!importPath && _optionalChain([config, 'optionalAccess', _120 => _120.namespace])) {
|
|
2089
|
+
importPath = `@${_optionalChain([config, 'optionalAccess', _121 => _121.namespace])}/${options.name}`;
|
|
2077
2090
|
}
|
|
2078
2091
|
if (options.publishable) {
|
|
2079
2092
|
if (!importPath) {
|
|
@@ -2127,7 +2140,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, normalizeOptions, "normalizeOptions");
|
|
|
2127
2140
|
|
|
2128
2141
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2129
2142
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
2130
|
-
const filesDir =
|
|
2143
|
+
const filesDir = _chunkHLKD7LH2js.joinPaths.call(void 0, __dirname, "src", "generators", "browser-library", "files");
|
|
2131
2144
|
const tsLibraryGeneratorOptions = {
|
|
2132
2145
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
2133
2146
|
platform: "browser",
|
|
@@ -2199,19 +2212,19 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
2199
2212
|
|
|
2200
2213
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
2201
2214
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0,
|
|
2215
|
+
_chunkHLKD7LH2js.writeInfo.call(void 0, "\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
|
|
2216
|
+
_chunkHLKD7LH2js.writeTrace.call(void 0, `Determining the Storm Workspace Configuration JSON Schema...`, config);
|
|
2217
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkHLKD7LH2js.stormWorkspaceConfigSchema, {
|
|
2205
2218
|
name: "StormWorkspaceConfiguration"
|
|
2206
2219
|
});
|
|
2207
|
-
|
|
2208
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
2209
|
-
|
|
2220
|
+
_chunkHLKD7LH2js.writeTrace.call(void 0, jsonSchema, config);
|
|
2221
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _122 => _122.workspaceRoot]), () => ( _chunkHLKD7LH2js.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _123 => _123.outputFile, 'optionalAccess', _124 => _124.startsWith, 'call', _125 => _125("./")]) ? "" : "./");
|
|
2222
|
+
_chunkHLKD7LH2js.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
2210
2223
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
2211
2224
|
spaces: 2
|
|
2212
2225
|
});
|
|
2213
2226
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2214
|
-
|
|
2227
|
+
_chunkHLKD7LH2js.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
|
|
2215
2228
|
return {
|
|
2216
2229
|
success: true
|
|
2217
2230
|
};
|
|
@@ -2250,7 +2263,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, initGenerator, "initGenerator");
|
|
|
2250
2263
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
2251
2264
|
|
|
2252
2265
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
2253
|
-
const filesDir =
|
|
2266
|
+
const filesDir = _chunkHLKD7LH2js.joinPaths.call(void 0, __dirname, "src", "generators", "neutral-library", "files");
|
|
2254
2267
|
const tsLibraryGeneratorOptions = {
|
|
2255
2268
|
...schema,
|
|
2256
2269
|
platform: "neutral",
|
|
@@ -2293,7 +2306,7 @@ var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral P
|
|
|
2293
2306
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
2294
2307
|
|
|
2295
2308
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
2296
|
-
const filesDir =
|
|
2309
|
+
const filesDir = _chunkHLKD7LH2js.joinPaths.call(void 0, __dirname, "src", "generators", "node-library", "files");
|
|
2297
2310
|
const tsLibraryGeneratorOptions = {
|
|
2298
2311
|
platform: "node",
|
|
2299
2312
|
devDependencies: {
|