@storm-software/terraform-tools 0.54.14 → 0.54.16
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-LAW3Y4KJ.mjs → chunk-DX73VV5X.mjs} +3 -4
- package/dist/{chunk-ARUOVAUX.js → chunk-EFR6PXP4.js} +120 -17
- package/dist/{chunk-SEGDFDDI.js → chunk-F4YYSDFN.js} +149 -150
- package/dist/{chunk-5SJJD7T2.js → chunk-FITZEF2D.js} +3 -3
- package/dist/{chunk-RMJZBNHR.mjs → chunk-LFSPDVQC.mjs} +1 -1
- package/dist/{chunk-JSGMKYAJ.mjs → chunk-MQHDDYEZ.mjs} +1 -1
- package/dist/{chunk-L2PJ2IP6.mjs → chunk-NKCDHL2T.mjs} +1 -1
- package/dist/{chunk-IILCY4K6.js → chunk-PTGYSMPV.js} +2 -2
- package/dist/{chunk-XW6C32ZW.mjs → chunk-RWC4LQNP.mjs} +1 -1
- package/dist/{chunk-HVVQCDLX.js → chunk-V2MDU72P.js} +2 -2
- package/dist/{chunk-YF7XYL2D.js → chunk-VLD5ZA2O.js} +2 -2
- package/dist/{chunk-FESDU63B.mjs → chunk-VZ6XA5RO.mjs} +1 -1
- package/dist/{chunk-MZ27JZT5.mjs → chunk-W4HT4RSX.mjs} +125 -22
- package/dist/{chunk-JGEEK7WZ.js → chunk-Y42OHWIS.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 +1 -1
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkEFR6PXP4js = require('./chunk-EFR6PXP4.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -158,7 +158,7 @@ async function cargoBuildExecutor(options, context2) {
|
|
|
158
158
|
return await cargoCommand(...command);
|
|
159
159
|
}
|
|
160
160
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoBuildExecutor, "cargoBuildExecutor");
|
|
161
|
-
var executor_default =
|
|
161
|
+
var executor_default = _chunkEFR6PXP4js.withRunExecutor.call(void 0, "Cargo Build", cargoBuildExecutor, {
|
|
162
162
|
skipReadingConfig: false,
|
|
163
163
|
hooks: {
|
|
164
164
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -175,7 +175,7 @@ async function cargoCheckExecutor(options, context2) {
|
|
|
175
175
|
return await cargoCommand(...command);
|
|
176
176
|
}
|
|
177
177
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoCheckExecutor, "cargoCheckExecutor");
|
|
178
|
-
var executor_default2 =
|
|
178
|
+
var executor_default2 = _chunkEFR6PXP4js.withRunExecutor.call(void 0, "Cargo Check", cargoCheckExecutor, {
|
|
179
179
|
skipReadingConfig: false,
|
|
180
180
|
hooks: {
|
|
181
181
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -191,7 +191,7 @@ async function cargoClippyExecutor(options, context2) {
|
|
|
191
191
|
return await cargoCommand(...command);
|
|
192
192
|
}
|
|
193
193
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoClippyExecutor, "cargoClippyExecutor");
|
|
194
|
-
var executor_default3 =
|
|
194
|
+
var executor_default3 = _chunkEFR6PXP4js.withRunExecutor.call(void 0, "Cargo Clippy", cargoClippyExecutor, {
|
|
195
195
|
skipReadingConfig: false,
|
|
196
196
|
hooks: {
|
|
197
197
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -213,7 +213,7 @@ async function cargoDocExecutor(options, context2) {
|
|
|
213
213
|
return await cargoCommand(...command);
|
|
214
214
|
}
|
|
215
215
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoDocExecutor, "cargoDocExecutor");
|
|
216
|
-
var executor_default4 =
|
|
216
|
+
var executor_default4 = _chunkEFR6PXP4js.withRunExecutor.call(void 0, "Cargo Doc", cargoDocExecutor, {
|
|
217
217
|
skipReadingConfig: false,
|
|
218
218
|
hooks: {
|
|
219
219
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -236,7 +236,7 @@ async function cargoFormatExecutor(options, context2) {
|
|
|
236
236
|
return await cargoCommand(...command);
|
|
237
237
|
}
|
|
238
238
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoFormatExecutor, "cargoFormatExecutor");
|
|
239
|
-
var executor_default5 =
|
|
239
|
+
var executor_default5 = _chunkEFR6PXP4js.withRunExecutor.call(void 0, "Cargo Format", cargoFormatExecutor, {
|
|
240
240
|
skipReadingConfig: false,
|
|
241
241
|
hooks: {
|
|
242
242
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -317,8 +317,8 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
317
317
|
output: "src/"
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
|
-
|
|
321
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
320
|
+
_chunkEFR6PXP4js.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
321
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkEFR6PXP4js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
322
322
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
323
323
|
projectDir: projectRoot,
|
|
324
324
|
rootDir: config.workspaceRoot,
|
|
@@ -327,12 +327,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
327
327
|
});
|
|
328
328
|
await assetHandler.processAllAssetsOnce();
|
|
329
329
|
if (includeSrc === true) {
|
|
330
|
-
|
|
330
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkEFR6PXP4js.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
331
331
|
const files = await _glob.glob.call(void 0, [
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
332
|
+
_chunkEFR6PXP4js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
333
|
+
_chunkEFR6PXP4js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
334
|
+
_chunkEFR6PXP4js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
335
|
+
_chunkEFR6PXP4js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
336
336
|
]);
|
|
337
337
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
338
338
|
|
|
@@ -354,7 +354,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
354
354
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
|
|
355
355
|
const projectNode = project.node;
|
|
356
356
|
if (projectNode.data.root) {
|
|
357
|
-
const projectPackageJsonPath =
|
|
357
|
+
const projectPackageJsonPath = _chunkEFR6PXP4js.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
|
|
358
358
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
359
359
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
360
360
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -365,7 +365,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
if (localPackages.length > 0) {
|
|
368
|
-
|
|
368
|
+
_chunkEFR6PXP4js.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
369
369
|
packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
|
|
370
370
|
if (!ret[localPackage.name]) {
|
|
371
371
|
ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
|
|
@@ -387,13 +387,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
387
387
|
return ret;
|
|
388
388
|
}, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
|
|
389
389
|
} else {
|
|
390
|
-
|
|
390
|
+
_chunkEFR6PXP4js.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
391
391
|
}
|
|
392
392
|
return packageJson;
|
|
393
393
|
}, "addPackageDependencies");
|
|
394
394
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
395
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
396
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
395
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkEFR6PXP4js.findWorkspaceRoot.call(void 0, );
|
|
396
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkEFR6PXP4js.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
397
397
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
398
398
|
packageJson.type ??= "module";
|
|
399
399
|
packageJson.sideEffects ??= false;
|
|
@@ -402,7 +402,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
402
402
|
if (distSrc.startsWith("/")) {
|
|
403
403
|
distSrc = distSrc.substring(1);
|
|
404
404
|
}
|
|
405
|
-
packageJson.source ??= `${
|
|
405
|
+
packageJson.source ??= `${_chunkEFR6PXP4js.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
406
406
|
}
|
|
407
407
|
packageJson.files ??= [
|
|
408
408
|
"dist/**/*"
|
|
@@ -433,7 +433,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
433
433
|
];
|
|
434
434
|
}
|
|
435
435
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
436
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
436
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkEFR6PXP4js.joinPaths.call(void 0, "packages", projectName);
|
|
437
437
|
return packageJson;
|
|
438
438
|
}, "addWorkspacePackageJsonFields");
|
|
439
439
|
var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
@@ -460,7 +460,7 @@ var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
460
460
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
461
461
|
|
|
462
462
|
var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
463
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
463
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkEFR6PXP4js.findWorkspaceRoot.call(void 0, );
|
|
464
464
|
const entryPoints = [];
|
|
465
465
|
if (entry) {
|
|
466
466
|
if (Array.isArray(entry)) {
|
|
@@ -472,7 +472,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
if (emitOnAll) {
|
|
475
|
-
entryPoints.push(
|
|
475
|
+
entryPoints.push(_chunkEFR6PXP4js.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
476
476
|
}
|
|
477
477
|
const results = [];
|
|
478
478
|
for (const entryPoint in entryPoints) {
|
|
@@ -481,9 +481,9 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
481
481
|
withFileTypes: true
|
|
482
482
|
});
|
|
483
483
|
results.push(...files.reduce((ret, filePath) => {
|
|
484
|
-
const result =
|
|
484
|
+
const result = _chunkEFR6PXP4js.correctPaths.call(void 0, _chunkEFR6PXP4js.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkEFR6PXP4js.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkEFR6PXP4js.correctPaths.call(void 0, projectRoot), ""));
|
|
485
485
|
if (result) {
|
|
486
|
-
|
|
486
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkEFR6PXP4js.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
487
487
|
if (!results.includes(result)) {
|
|
488
488
|
results.push(result);
|
|
489
489
|
}
|
|
@@ -817,7 +817,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
|
|
|
817
817
|
setup(build5) {
|
|
818
818
|
build5.onEnd((result) => {
|
|
819
819
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
820
|
-
|
|
820
|
+
_chunkEFR6PXP4js.writeError.call(void 0, `The following errors occurred during the build:
|
|
821
821
|
${result.errors.map((error) => error.text).join("\n")}
|
|
822
822
|
|
|
823
823
|
`, resolvedOptions.config);
|
|
@@ -852,7 +852,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
|
852
852
|
var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
853
853
|
name: "storm:resolve-paths",
|
|
854
854
|
setup(build5) {
|
|
855
|
-
const parentTsConfig = build5.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0,
|
|
855
|
+
const parentTsConfig = build5.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0, _chunkEFR6PXP4js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build5.initialOptions.tsconfig)) : _chunk3GQAWCBQjs.__require.call(void 0, _chunkEFR6PXP4js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
856
856
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
857
857
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
858
858
|
build5.onResolve({
|
|
@@ -876,7 +876,7 @@ var _apiextractor = require('@microsoft/api-extractor');
|
|
|
876
876
|
|
|
877
877
|
|
|
878
878
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
879
|
-
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0,
|
|
879
|
+
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0, _chunkEFR6PXP4js.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
880
880
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
881
881
|
p,
|
|
882
882
|
getTypeDependencyPackageName(p)
|
|
@@ -912,13 +912,13 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
912
912
|
},
|
|
913
913
|
dtsRollup: {
|
|
914
914
|
enabled: true,
|
|
915
|
-
untrimmedFilePath:
|
|
915
|
+
untrimmedFilePath: _chunkEFR6PXP4js.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
916
916
|
},
|
|
917
917
|
tsdocMetadata: {
|
|
918
918
|
enabled: false
|
|
919
919
|
}
|
|
920
920
|
},
|
|
921
|
-
packageJsonFullPath:
|
|
921
|
+
packageJsonFullPath: _chunkEFR6PXP4js.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
922
922
|
configObjectFullPath: void 0
|
|
923
923
|
});
|
|
924
924
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -926,7 +926,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
926
926
|
localBuild: true
|
|
927
927
|
});
|
|
928
928
|
if (extractorResult.succeeded === false) {
|
|
929
|
-
|
|
929
|
+
_chunkEFR6PXP4js.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
930
930
|
throw new Error("API Extractor completed with errors");
|
|
931
931
|
}
|
|
932
932
|
}
|
|
@@ -939,18 +939,18 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
|
|
|
939
939
|
}
|
|
940
940
|
build5.onStart(async () => {
|
|
941
941
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
942
|
-
await
|
|
942
|
+
await _chunkEFR6PXP4js.run.call(void 0, resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
943
943
|
}
|
|
944
944
|
if (resolvedOptions.bundle && resolvedOptions.entryPoints && resolvedOptions.entryPoints.length > 0 && resolvedOptions.entryPoints[0] && resolvedOptions.entryPoints[0].endsWith(".ts")) {
|
|
945
945
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
946
946
|
const typeOutDir = resolvedOptions.outdir;
|
|
947
947
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
948
|
-
const bundlePath =
|
|
948
|
+
const bundlePath = _chunkEFR6PXP4js.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
949
949
|
let dtsPath;
|
|
950
|
-
if (_fs.existsSync.call(void 0,
|
|
951
|
-
dtsPath =
|
|
952
|
-
} else if (_fs.existsSync.call(void 0,
|
|
953
|
-
dtsPath =
|
|
950
|
+
if (_fs.existsSync.call(void 0, _chunkEFR6PXP4js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
951
|
+
dtsPath = _chunkEFR6PXP4js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
952
|
+
} else if (_fs.existsSync.call(void 0, _chunkEFR6PXP4js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
953
|
+
dtsPath = _chunkEFR6PXP4js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
954
954
|
}
|
|
955
955
|
const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
956
956
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -1105,8 +1105,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
1105
1105
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
1106
1106
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
1107
1107
|
});
|
|
1108
|
-
|
|
1109
|
-
|
|
1108
|
+
_chunkEFR6PXP4js.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
1109
|
+
_chunkEFR6PXP4js.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
1110
1110
|
if (filteredMissingDeps.length > 0) {
|
|
1111
1111
|
throw new Error(`Missing dependencies detected - please install them:
|
|
1112
1112
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1200,13 +1200,13 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1200
1200
|
if (!workspaceRoot3) {
|
|
1201
1201
|
throw new Error("Cannot find Nx workspace root");
|
|
1202
1202
|
}
|
|
1203
|
-
const config = await
|
|
1204
|
-
|
|
1205
|
-
const stopwatch =
|
|
1203
|
+
const config = await _chunkEFR6PXP4js.getConfig.call(void 0, workspaceRoot3.dir);
|
|
1204
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1205
|
+
const stopwatch = _chunkEFR6PXP4js.getStopwatch.call(void 0, "Build options resolution");
|
|
1206
1206
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1207
1207
|
exitOnError: true
|
|
1208
1208
|
});
|
|
1209
|
-
const projectJsonPath =
|
|
1209
|
+
const projectJsonPath = _chunkEFR6PXP4js.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1210
1210
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
1211
1211
|
throw new Error("Cannot find project.json configuration");
|
|
1212
1212
|
}
|
|
@@ -1220,7 +1220,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1220
1220
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
1221
1221
|
options.name ??= `${projectName}-${options.format}`;
|
|
1222
1222
|
options.target ??= DEFAULT_TARGET;
|
|
1223
|
-
const packageJsonPath =
|
|
1223
|
+
const packageJsonPath = _chunkEFR6PXP4js.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1224
1224
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1225
1225
|
throw new Error("Cannot find package.json configuration");
|
|
1226
1226
|
}
|
|
@@ -1245,20 +1245,20 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1245
1245
|
".node"
|
|
1246
1246
|
],
|
|
1247
1247
|
...userOptions,
|
|
1248
|
-
tsconfig:
|
|
1248
|
+
tsconfig: _chunkEFR6PXP4js.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1249
1249
|
format: options.format || "cjs",
|
|
1250
1250
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1251
1251
|
"./src/index.ts"
|
|
1252
1252
|
], userOptions.emitOnAll),
|
|
1253
|
-
outdir: userOptions.outputPath ||
|
|
1253
|
+
outdir: userOptions.outputPath || _chunkEFR6PXP4js.joinPaths.call(void 0, "dist", projectRoot),
|
|
1254
1254
|
plugins: [],
|
|
1255
1255
|
name: userOptions.name || projectName,
|
|
1256
1256
|
projectConfigurations,
|
|
1257
1257
|
projectName,
|
|
1258
1258
|
projectGraph,
|
|
1259
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1259
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkEFR6PXP4js.joinPaths.call(void 0, projectRoot, "src"),
|
|
1260
1260
|
minify: userOptions.minify || !userOptions.debug,
|
|
1261
|
-
verbose: userOptions.verbose ||
|
|
1261
|
+
verbose: userOptions.verbose || _chunkEFR6PXP4js.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1262
1262
|
includeSrc: userOptions.includeSrc === true,
|
|
1263
1263
|
metafile: userOptions.metafile !== false,
|
|
1264
1264
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1294,8 +1294,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1294
1294
|
}, {})
|
|
1295
1295
|
},
|
|
1296
1296
|
inject: [
|
|
1297
|
-
options.format === "cjs" && options.injectShims ?
|
|
1298
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ?
|
|
1297
|
+
options.format === "cjs" && options.injectShims ? _chunkEFR6PXP4js.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
|
|
1298
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkEFR6PXP4js.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : "",
|
|
1299
1299
|
..._nullishCoalesce(options.inject, () => ( []))
|
|
1300
1300
|
].filter(Boolean)
|
|
1301
1301
|
};
|
|
@@ -1304,14 +1304,14 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1304
1304
|
return result;
|
|
1305
1305
|
}, "resolveOptions");
|
|
1306
1306
|
async function generatePackageJson(context2) {
|
|
1307
|
-
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1308
|
-
|
|
1309
|
-
const stopwatch =
|
|
1310
|
-
const packageJsonPath =
|
|
1307
|
+
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkEFR6PXP4js.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
1308
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
1309
|
+
const stopwatch = _chunkEFR6PXP4js.getStopwatch.call(void 0, "Write package.json file");
|
|
1310
|
+
const packageJsonPath = _chunkEFR6PXP4js.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
1311
1311
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1312
1312
|
throw new Error("Cannot find package.json configuration");
|
|
1313
1313
|
}
|
|
1314
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
1314
|
+
const packageJsonFile = await _promises2.default.readFile(_chunkEFR6PXP4js.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
|
|
1315
1315
|
let packageJson = JSON.parse(packageJsonFile);
|
|
1316
1316
|
if (!packageJson) {
|
|
1317
1317
|
throw new Error("Cannot find package.json configuration file");
|
|
@@ -1350,7 +1350,7 @@ async function generatePackageJson(context2) {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
return ret;
|
|
1352
1352
|
}, packageJson.exports);
|
|
1353
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1353
|
+
await _devkit.writeJsonFile.call(void 0, _chunkEFR6PXP4js.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
|
|
1354
1354
|
stopwatch();
|
|
1355
1355
|
}
|
|
1356
1356
|
return context2;
|
|
@@ -1376,8 +1376,8 @@ async function generateContext(getOptions) {
|
|
|
1376
1376
|
}
|
|
1377
1377
|
_chunk3GQAWCBQjs.__name.call(void 0, generateContext, "generateContext");
|
|
1378
1378
|
async function executeEsBuild(context2) {
|
|
1379
|
-
|
|
1380
|
-
const stopwatch =
|
|
1379
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
1380
|
+
const stopwatch = _chunkEFR6PXP4js.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
1381
1381
|
if (process.env.WATCH === "true") {
|
|
1382
1382
|
const ctx = await esbuild2.context(context2.options);
|
|
1383
1383
|
watch(ctx, context2.options);
|
|
@@ -1393,8 +1393,8 @@ async function executeEsBuild(context2) {
|
|
|
1393
1393
|
_chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
1394
1394
|
async function copyBuildAssets(context2) {
|
|
1395
1395
|
if (_optionalChain([context2, 'access', _29 => _29.result, 'optionalAccess', _30 => _30.errors, 'access', _31 => _31.length]) === 0) {
|
|
1396
|
-
|
|
1397
|
-
const stopwatch =
|
|
1396
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
1397
|
+
const stopwatch = _chunkEFR6PXP4js.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1398
1398
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
1399
1399
|
stopwatch();
|
|
1400
1400
|
}
|
|
@@ -1404,9 +1404,9 @@ _chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
1404
1404
|
async function reportResults(context2) {
|
|
1405
1405
|
if (_optionalChain([context2, 'access', _32 => _32.result, 'optionalAccess', _33 => _33.errors, 'access', _34 => _34.length]) === 0) {
|
|
1406
1406
|
if (context2.result.warnings.length > 0) {
|
|
1407
|
-
|
|
1407
|
+
_chunkEFR6PXP4js.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);
|
|
1408
1408
|
}
|
|
1409
|
-
|
|
1409
|
+
_chunkEFR6PXP4js.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
1410
1410
|
}
|
|
1411
1411
|
}
|
|
1412
1412
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -1442,8 +1442,8 @@ async function dependencyCheck(options) {
|
|
|
1442
1442
|
_chunk3GQAWCBQjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
1443
1443
|
async function cleanOutputPath(context2) {
|
|
1444
1444
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
1445
|
-
|
|
1446
|
-
const stopwatch =
|
|
1445
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
1446
|
+
const stopwatch = _chunkEFR6PXP4js.getStopwatch.call(void 0, `${context2.options.name} output clean`);
|
|
1447
1447
|
await cleanDirectories(context2.options.name, context2.options.outdir, context2.options.config);
|
|
1448
1448
|
stopwatch();
|
|
1449
1449
|
}
|
|
@@ -1451,8 +1451,8 @@ async function cleanOutputPath(context2) {
|
|
|
1451
1451
|
}
|
|
1452
1452
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1453
1453
|
async function build3(options) {
|
|
1454
|
-
|
|
1455
|
-
const stopwatch =
|
|
1454
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1455
|
+
const stopwatch = _chunkEFR6PXP4js.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1456
1456
|
try {
|
|
1457
1457
|
const opts = Array.isArray(options) ? options : [
|
|
1458
1458
|
options
|
|
@@ -1462,9 +1462,9 @@ async function build3(options) {
|
|
|
1462
1462
|
}
|
|
1463
1463
|
void transduce.async(opts, dependencyCheck);
|
|
1464
1464
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
1465
|
-
|
|
1465
|
+
_chunkEFR6PXP4js.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1466
1466
|
} catch (error) {
|
|
1467
|
-
|
|
1467
|
+
_chunkEFR6PXP4js.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1468
1468
|
throw error;
|
|
1469
1469
|
} finally {
|
|
1470
1470
|
stopwatch();
|
|
@@ -1492,9 +1492,9 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1492
1492
|
return context2.rebuild();
|
|
1493
1493
|
});
|
|
1494
1494
|
if (rebuildResult instanceof Error) {
|
|
1495
|
-
|
|
1495
|
+
_chunkEFR6PXP4js.writeError.call(void 0, rebuildResult.message);
|
|
1496
1496
|
}
|
|
1497
|
-
|
|
1497
|
+
_chunkEFR6PXP4js.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
1498
1498
|
}, 10);
|
|
1499
1499
|
changeWatcher.on("change", fastRebuild);
|
|
1500
1500
|
return void 0;
|
|
@@ -1502,7 +1502,7 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1502
1502
|
|
|
1503
1503
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1504
1504
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1505
|
-
|
|
1505
|
+
_chunkEFR6PXP4js.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1506
1506
|
if (!_optionalChain([context2, 'access', _35 => _35.projectsConfigurations, 'optionalAccess', _36 => _36.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _37 => _37.projectsConfigurations, 'access', _38 => _38.projects, 'access', _39 => _39[context2.projectName], 'optionalAccess', _40 => _40.root])) {
|
|
1507
1507
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1508
1508
|
}
|
|
@@ -1519,7 +1519,7 @@ async function esbuildExecutorFn(options, context2, config) {
|
|
|
1519
1519
|
};
|
|
1520
1520
|
}
|
|
1521
1521
|
_chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
|
|
1522
|
-
var executor_default6 =
|
|
1522
|
+
var executor_default6 = _chunkEFR6PXP4js.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
|
|
1523
1523
|
skipReadingConfig: false,
|
|
1524
1524
|
hooks: {
|
|
1525
1525
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1556,7 +1556,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1556
1556
|
if (!_optionalChain([context2, 'optionalAccess', _49 => _49.projectName]) || !_optionalChain([context2, 'access', _50 => _50.projectsConfigurations, 'optionalAccess', _51 => _51.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1557
1557
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
1558
1558
|
}
|
|
1559
|
-
|
|
1559
|
+
_chunkEFR6PXP4js.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
1560
1560
|
_sizelimit2.default.call(void 0, [
|
|
1561
1561
|
_file2.default,
|
|
1562
1562
|
_esbuild3.default,
|
|
@@ -1564,14 +1564,14 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1564
1564
|
], {
|
|
1565
1565
|
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _52 => _52.projectsConfigurations, 'access', _53 => _53.projects, 'access', _54 => _54[context2.projectName], 'optionalAccess', _55 => _55.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _56 => _56.projectsConfigurations, 'access', _57 => _57.projects, 'access', _58 => _58[context2.projectName], 'optionalAccess', _59 => _59.root]), () => ( "./")), "src")))
|
|
1566
1566
|
}).then((result) => {
|
|
1567
|
-
|
|
1567
|
+
_chunkEFR6PXP4js.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
1568
1568
|
});
|
|
1569
1569
|
return {
|
|
1570
1570
|
success: true
|
|
1571
1571
|
};
|
|
1572
1572
|
}
|
|
1573
1573
|
_chunk3GQAWCBQjs.__name.call(void 0, sizeLimitExecutorFn, "sizeLimitExecutorFn");
|
|
1574
|
-
var executor_default7 =
|
|
1574
|
+
var executor_default7 = _chunkEFR6PXP4js.withRunExecutor.call(void 0, "Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
|
|
1575
1575
|
skipReadingConfig: false,
|
|
1576
1576
|
hooks: {
|
|
1577
1577
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1627,13 +1627,13 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1627
1627
|
if (!workspaceRoot3) {
|
|
1628
1628
|
throw new Error("Cannot find Nx workspace root");
|
|
1629
1629
|
}
|
|
1630
|
-
const config = await
|
|
1631
|
-
|
|
1632
|
-
const stopwatch =
|
|
1630
|
+
const config = await _chunkEFR6PXP4js.getConfig.call(void 0, workspaceRoot3.dir);
|
|
1631
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1632
|
+
const stopwatch = _chunkEFR6PXP4js.getStopwatch.call(void 0, "Build options resolution");
|
|
1633
1633
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1634
1634
|
exitOnError: true
|
|
1635
1635
|
});
|
|
1636
|
-
const projectJsonPath =
|
|
1636
|
+
const projectJsonPath = _chunkEFR6PXP4js.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1637
1637
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
1638
1638
|
throw new Error("Cannot find project.json configuration");
|
|
1639
1639
|
}
|
|
@@ -1647,7 +1647,7 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1647
1647
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
|
|
1648
1648
|
options.name ??= `${projectName}-${options.format}`;
|
|
1649
1649
|
options.target ??= DEFAULT_TARGET;
|
|
1650
|
-
const packageJsonPath =
|
|
1650
|
+
const packageJsonPath = _chunkEFR6PXP4js.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1651
1651
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1652
1652
|
throw new Error("Cannot find package.json configuration");
|
|
1653
1653
|
}
|
|
@@ -1656,20 +1656,20 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1656
1656
|
...options,
|
|
1657
1657
|
config,
|
|
1658
1658
|
...userOptions,
|
|
1659
|
-
tsconfig:
|
|
1659
|
+
tsconfig: _chunkEFR6PXP4js.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1660
1660
|
format: options.format || "cjs",
|
|
1661
1661
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1662
1662
|
"./src/index.ts"
|
|
1663
1663
|
], userOptions.emitOnAll),
|
|
1664
|
-
outdir: userOptions.outputPath ||
|
|
1664
|
+
outdir: userOptions.outputPath || _chunkEFR6PXP4js.joinPaths.call(void 0, "dist", projectRoot),
|
|
1665
1665
|
plugins: [],
|
|
1666
1666
|
name: userOptions.name || projectName,
|
|
1667
1667
|
projectConfigurations,
|
|
1668
1668
|
projectName,
|
|
1669
1669
|
projectGraph,
|
|
1670
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1670
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkEFR6PXP4js.joinPaths.call(void 0, projectRoot, "src"),
|
|
1671
1671
|
minify: userOptions.minify || !userOptions.debug,
|
|
1672
|
-
verbose: userOptions.verbose ||
|
|
1672
|
+
verbose: userOptions.verbose || _chunkEFR6PXP4js.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1673
1673
|
includeSrc: userOptions.includeSrc === true,
|
|
1674
1674
|
metafile: userOptions.metafile !== false,
|
|
1675
1675
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1703,14 +1703,14 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1703
1703
|
return result;
|
|
1704
1704
|
}, "resolveOptions");
|
|
1705
1705
|
async function generatePackageJson2(options) {
|
|
1706
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1707
|
-
|
|
1708
|
-
const stopwatch =
|
|
1709
|
-
const packageJsonPath =
|
|
1706
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkEFR6PXP4js.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1707
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1708
|
+
const stopwatch = _chunkEFR6PXP4js.getStopwatch.call(void 0, "Write package.json file");
|
|
1709
|
+
const packageJsonPath = _chunkEFR6PXP4js.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1710
1710
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1711
1711
|
throw new Error("Cannot find package.json configuration");
|
|
1712
1712
|
}
|
|
1713
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
1713
|
+
const packageJsonFile = await _promises2.default.readFile(_chunkEFR6PXP4js.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
1714
1714
|
if (!packageJsonFile) {
|
|
1715
1715
|
throw new Error("Cannot find package.json configuration file");
|
|
1716
1716
|
}
|
|
@@ -1749,15 +1749,15 @@ async function generatePackageJson2(options) {
|
|
|
1749
1749
|
}
|
|
1750
1750
|
return ret;
|
|
1751
1751
|
}, packageJson.exports);
|
|
1752
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1752
|
+
await _devkit.writeJsonFile.call(void 0, _chunkEFR6PXP4js.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
1753
1753
|
stopwatch();
|
|
1754
1754
|
}
|
|
1755
1755
|
return options;
|
|
1756
1756
|
}
|
|
1757
1757
|
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson2, "generatePackageJson");
|
|
1758
1758
|
async function executeTSDown(options) {
|
|
1759
|
-
|
|
1760
|
-
const stopwatch =
|
|
1759
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
1760
|
+
const stopwatch = _chunkEFR6PXP4js.getStopwatch.call(void 0, `${options.name} build`);
|
|
1761
1761
|
await _tsdown.build.call(void 0, {
|
|
1762
1762
|
...options,
|
|
1763
1763
|
entry: options.entryPoints,
|
|
@@ -1769,21 +1769,21 @@ async function executeTSDown(options) {
|
|
|
1769
1769
|
}
|
|
1770
1770
|
_chunk3GQAWCBQjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
1771
1771
|
async function copyBuildAssets2(options) {
|
|
1772
|
-
|
|
1773
|
-
const stopwatch =
|
|
1772
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
1773
|
+
const stopwatch = _chunkEFR6PXP4js.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1774
1774
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.sourceRoot, true, false);
|
|
1775
1775
|
stopwatch();
|
|
1776
1776
|
return options;
|
|
1777
1777
|
}
|
|
1778
1778
|
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets2, "copyBuildAssets");
|
|
1779
1779
|
async function reportResults2(options) {
|
|
1780
|
-
|
|
1780
|
+
_chunkEFR6PXP4js.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
1781
1781
|
}
|
|
1782
1782
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults2, "reportResults");
|
|
1783
1783
|
async function cleanOutputPath2(options) {
|
|
1784
1784
|
if (options.clean !== false && options.outdir) {
|
|
1785
|
-
|
|
1786
|
-
const stopwatch =
|
|
1785
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
|
|
1786
|
+
const stopwatch = _chunkEFR6PXP4js.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1787
1787
|
await cleanDirectories2(options.name, options.outdir, options.config);
|
|
1788
1788
|
stopwatch();
|
|
1789
1789
|
}
|
|
@@ -1791,8 +1791,8 @@ async function cleanOutputPath2(options) {
|
|
|
1791
1791
|
}
|
|
1792
1792
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath2, "cleanOutputPath");
|
|
1793
1793
|
async function build4(options) {
|
|
1794
|
-
|
|
1795
|
-
const stopwatch =
|
|
1794
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1795
|
+
const stopwatch = _chunkEFR6PXP4js.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1796
1796
|
try {
|
|
1797
1797
|
const opts = Array.isArray(options) ? options : [
|
|
1798
1798
|
options
|
|
@@ -1810,11 +1810,11 @@ async function build4(options) {
|
|
|
1810
1810
|
await reportResults2(opt);
|
|
1811
1811
|
}));
|
|
1812
1812
|
} else {
|
|
1813
|
-
|
|
1813
|
+
_chunkEFR6PXP4js.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
1814
1814
|
}
|
|
1815
|
-
|
|
1815
|
+
_chunkEFR6PXP4js.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1816
1816
|
} catch (error) {
|
|
1817
|
-
|
|
1817
|
+
_chunkEFR6PXP4js.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1818
1818
|
throw error;
|
|
1819
1819
|
} finally {
|
|
1820
1820
|
stopwatch();
|
|
@@ -1824,7 +1824,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, build4, "build");
|
|
|
1824
1824
|
|
|
1825
1825
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1826
1826
|
async function tsdownExecutorFn(options, context2, config) {
|
|
1827
|
-
|
|
1827
|
+
_chunkEFR6PXP4js.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
|
|
1828
1828
|
if (!_optionalChain([context2, 'access', _62 => _62.projectsConfigurations, 'optionalAccess', _63 => _63.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _64 => _64.projectsConfigurations, 'access', _65 => _65.projects, 'access', _66 => _66[context2.projectName], 'optionalAccess', _67 => _67.root])) {
|
|
1829
1829
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1830
1830
|
}
|
|
@@ -1841,7 +1841,7 @@ async function tsdownExecutorFn(options, context2, config) {
|
|
|
1841
1841
|
};
|
|
1842
1842
|
}
|
|
1843
1843
|
_chunk3GQAWCBQjs.__name.call(void 0, tsdownExecutorFn, "tsdownExecutorFn");
|
|
1844
|
-
var executor_default8 =
|
|
1844
|
+
var executor_default8 = _chunkEFR6PXP4js.withRunExecutor.call(void 0, "Storm TSDown build executor", tsdownExecutorFn, {
|
|
1845
1845
|
skipReadingConfig: false,
|
|
1846
1846
|
hooks: {
|
|
1847
1847
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1860,11 +1860,11 @@ var _fsextra = require('fs-extra');
|
|
|
1860
1860
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1861
1861
|
async function typiaExecutorFn(options, _, config) {
|
|
1862
1862
|
if (options.clean !== false) {
|
|
1863
|
-
|
|
1863
|
+
_chunkEFR6PXP4js.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1864
1864
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1865
1865
|
}
|
|
1866
1866
|
await Promise.all(options.entry.map((entry) => {
|
|
1867
|
-
|
|
1867
|
+
_chunkEFR6PXP4js.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1868
1868
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1869
1869
|
input: entry,
|
|
1870
1870
|
output: options.outputPath,
|
|
@@ -1876,7 +1876,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
1876
1876
|
};
|
|
1877
1877
|
}
|
|
1878
1878
|
_chunk3GQAWCBQjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
|
|
1879
|
-
var executor_default9 =
|
|
1879
|
+
var executor_default9 = _chunkEFR6PXP4js.withRunExecutor.call(void 0, "Typia runtime validation generator", typiaExecutorFn, {
|
|
1880
1880
|
skipReadingConfig: false,
|
|
1881
1881
|
hooks: {
|
|
1882
1882
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1895,7 +1895,7 @@ var executor_default9 = _chunkARUOVAUXjs.withRunExecutor.call(void 0, "Typia run
|
|
|
1895
1895
|
|
|
1896
1896
|
var _jiti = require('jiti');
|
|
1897
1897
|
async function unbuildExecutorFn(options, context2, config) {
|
|
1898
|
-
|
|
1898
|
+
_chunkEFR6PXP4js.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1899
1899
|
if (!_optionalChain([context2, 'access', _76 => _76.projectsConfigurations, 'optionalAccess', _77 => _77.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1900
1900
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
1901
1901
|
}
|
|
@@ -1906,7 +1906,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1906
1906
|
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.");
|
|
1907
1907
|
}
|
|
1908
1908
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1909
|
-
fsCache: config.skipCache ? false :
|
|
1909
|
+
fsCache: config.skipCache ? false : _chunkEFR6PXP4js.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
1910
1910
|
interopDefault: true
|
|
1911
1911
|
});
|
|
1912
1912
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
@@ -1919,7 +1919,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1919
1919
|
}, {
|
|
1920
1920
|
stubOptions: {
|
|
1921
1921
|
jiti: {
|
|
1922
|
-
|
|
1922
|
+
fsCache: config.skipCache ? false : _chunkEFR6PXP4js.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
|
|
1923
1923
|
}
|
|
1924
1924
|
},
|
|
1925
1925
|
rollup: {
|
|
@@ -1943,7 +1943,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1943
1943
|
};
|
|
1944
1944
|
}
|
|
1945
1945
|
_chunk3GQAWCBQjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
|
|
1946
|
-
var executor_default10 =
|
|
1946
|
+
var executor_default10 = _chunkEFR6PXP4js.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
|
|
1947
1947
|
skipReadingConfig: false,
|
|
1948
1948
|
hooks: {
|
|
1949
1949
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1953,7 +1953,6 @@ var executor_default10 = _chunkARUOVAUXjs.withRunExecutor.call(void 0, "TypeScri
|
|
|
1953
1953
|
options.entry ??= [
|
|
1954
1954
|
"{sourceRoot}"
|
|
1955
1955
|
];
|
|
1956
|
-
options.outputPath ??= "dist/{projectRoot}";
|
|
1957
1956
|
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
1958
1957
|
return options;
|
|
1959
1958
|
}, "applyDefaultOptions")
|
|
@@ -1967,34 +1966,34 @@ var executor_default10 = _chunkARUOVAUXjs.withRunExecutor.call(void 0, "TypeScri
|
|
|
1967
1966
|
var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
1968
1967
|
skipReadingConfig: false
|
|
1969
1968
|
}) => async (tree, _options) => {
|
|
1970
|
-
const stopwatch =
|
|
1969
|
+
const stopwatch = _chunkEFR6PXP4js.getStopwatch.call(void 0, name);
|
|
1971
1970
|
let options = _options;
|
|
1972
1971
|
let config;
|
|
1973
1972
|
try {
|
|
1974
|
-
|
|
1973
|
+
_chunkEFR6PXP4js.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
1975
1974
|
|
|
1976
1975
|
`, config);
|
|
1977
|
-
const workspaceRoot3 =
|
|
1976
|
+
const workspaceRoot3 = _chunkEFR6PXP4js.findWorkspaceRoot.call(void 0, );
|
|
1978
1977
|
if (!generatorOptions.skipReadingConfig) {
|
|
1979
|
-
|
|
1978
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
1980
1979
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
1981
|
-
config = await
|
|
1980
|
+
config = await _chunkEFR6PXP4js.getConfig.call(void 0, workspaceRoot3);
|
|
1982
1981
|
}
|
|
1983
1982
|
if (_optionalChain([generatorOptions, 'optionalAccess', _78 => _78.hooks, 'optionalAccess', _79 => _79.applyDefaultOptions])) {
|
|
1984
|
-
|
|
1983
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1985
1984
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
1986
|
-
|
|
1985
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1987
1986
|
}
|
|
1988
|
-
|
|
1987
|
+
_chunkEFR6PXP4js.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
|
|
1989
1988
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
|
|
1990
|
-
const tokenized = await
|
|
1989
|
+
const tokenized = await _chunkEFR6PXP4js.applyWorkspaceTokens.call(void 0, options, {
|
|
1991
1990
|
workspaceRoot: tree.root,
|
|
1992
1991
|
config
|
|
1993
|
-
},
|
|
1992
|
+
}, _chunkEFR6PXP4js.applyWorkspaceBaseTokens);
|
|
1994
1993
|
if (_optionalChain([generatorOptions, 'optionalAccess', _80 => _80.hooks, 'optionalAccess', _81 => _81.preProcess])) {
|
|
1995
|
-
|
|
1994
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
1996
1995
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
1997
|
-
|
|
1996
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
1998
1997
|
}
|
|
1999
1998
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
2000
1999
|
if (result) {
|
|
@@ -2007,18 +2006,18 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
2007
2006
|
}
|
|
2008
2007
|
}
|
|
2009
2008
|
if (_optionalChain([generatorOptions, 'optionalAccess', _91 => _91.hooks, 'optionalAccess', _92 => _92.postProcess])) {
|
|
2010
|
-
|
|
2009
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
2011
2010
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
2012
|
-
|
|
2011
|
+
_chunkEFR6PXP4js.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
2013
2012
|
}
|
|
2014
2013
|
return () => {
|
|
2015
|
-
|
|
2014
|
+
_chunkEFR6PXP4js.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
2016
2015
|
`, config);
|
|
2017
2016
|
};
|
|
2018
2017
|
} catch (error) {
|
|
2019
2018
|
return () => {
|
|
2020
|
-
|
|
2021
|
-
|
|
2019
|
+
_chunkEFR6PXP4js.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
2020
|
+
_chunkEFR6PXP4js.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
2022
2021
|
- Details: ${error.message}
|
|
2023
2022
|
- Stacktrace: ${error.stack}`, config);
|
|
2024
2023
|
};
|
|
@@ -2120,7 +2119,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2120
2119
|
const projectConfig = {
|
|
2121
2120
|
root: normalized.directory,
|
|
2122
2121
|
projectType: "library",
|
|
2123
|
-
sourceRoot:
|
|
2122
|
+
sourceRoot: _chunkEFR6PXP4js.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
2124
2123
|
targets: {
|
|
2125
2124
|
build: {
|
|
2126
2125
|
executor: options.buildExecutor,
|
|
@@ -2129,11 +2128,11 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2129
2128
|
],
|
|
2130
2129
|
options: {
|
|
2131
2130
|
entry: [
|
|
2132
|
-
|
|
2131
|
+
_chunkEFR6PXP4js.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")
|
|
2133
2132
|
],
|
|
2134
2133
|
outputPath: getOutputPath(normalized),
|
|
2135
|
-
tsconfig:
|
|
2136
|
-
project:
|
|
2134
|
+
tsconfig: _chunkEFR6PXP4js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
2135
|
+
project: _chunkEFR6PXP4js.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
2137
2136
|
defaultConfiguration: "production",
|
|
2138
2137
|
platform: "neutral",
|
|
2139
2138
|
assets: [
|
|
@@ -2187,7 +2186,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2187
2186
|
if (!normalized.importPath) {
|
|
2188
2187
|
normalized.importPath = normalized.name;
|
|
2189
2188
|
}
|
|
2190
|
-
const packageJsonPath =
|
|
2189
|
+
const packageJsonPath = _chunkEFR6PXP4js.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
2191
2190
|
if (tree.exists(packageJsonPath)) {
|
|
2192
2191
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2193
2192
|
if (!normalized.importPath) {
|
|
@@ -2244,10 +2243,10 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2244
2243
|
}));
|
|
2245
2244
|
}
|
|
2246
2245
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
2247
|
-
|
|
2246
|
+
_chunkEFR6PXP4js.joinPaths.call(void 0, normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
|
|
2248
2247
|
]);
|
|
2249
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2250
|
-
|
|
2248
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkEFR6PXP4js.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
2249
|
+
_chunkEFR6PXP4js.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
2251
2250
|
]);
|
|
2252
2251
|
if (tree.exists("package.json")) {
|
|
2253
2252
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2258,7 +2257,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2258
2257
|
description = packageJson.description;
|
|
2259
2258
|
}
|
|
2260
2259
|
}
|
|
2261
|
-
const tsconfigPath =
|
|
2260
|
+
const tsconfigPath = _chunkEFR6PXP4js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
2262
2261
|
if (tree.exists(tsconfigPath)) {
|
|
2263
2262
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2264
2263
|
json.composite ??= true;
|
|
@@ -2296,7 +2295,7 @@ function getOutputPath(options) {
|
|
|
2296
2295
|
} else {
|
|
2297
2296
|
parts.push(options.projectRoot);
|
|
2298
2297
|
}
|
|
2299
|
-
return
|
|
2298
|
+
return _chunkEFR6PXP4js.joinPaths.call(void 0, ...parts);
|
|
2300
2299
|
}
|
|
2301
2300
|
_chunk3GQAWCBQjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
2302
2301
|
function createProjectTsConfigJson(tree, options) {
|
|
@@ -2305,7 +2304,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2305
2304
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _104 => _104.tsconfigOptions]), () => ( {})),
|
|
2306
2305
|
compilerOptions: {
|
|
2307
2306
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2308
|
-
outDir:
|
|
2307
|
+
outDir: _chunkEFR6PXP4js.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2309
2308
|
noEmit: true,
|
|
2310
2309
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _105 => _105.tsconfigOptions, 'optionalAccess', _106 => _106.compilerOptions]), () => ( {}))
|
|
2311
2310
|
},
|
|
@@ -2325,7 +2324,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2325
2324
|
"src/**/*.test.ts"
|
|
2326
2325
|
]
|
|
2327
2326
|
};
|
|
2328
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2327
|
+
_devkit.writeJson.call(void 0, tree, _chunkEFR6PXP4js.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2329
2328
|
}
|
|
2330
2329
|
_chunk3GQAWCBQjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2331
2330
|
async function normalizeOptions(tree, options, config) {
|
|
@@ -2384,7 +2383,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, normalizeOptions, "normalizeOptions");
|
|
|
2384
2383
|
|
|
2385
2384
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2386
2385
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
2387
|
-
const filesDir =
|
|
2386
|
+
const filesDir = _chunkEFR6PXP4js.joinPaths.call(void 0, __dirname, "src", "generators", "browser-library", "files");
|
|
2388
2387
|
const tsLibraryGeneratorOptions = {
|
|
2389
2388
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
2390
2389
|
platform: "browser",
|
|
@@ -2456,19 +2455,19 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
2456
2455
|
|
|
2457
2456
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
2458
2457
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0,
|
|
2458
|
+
_chunkEFR6PXP4js.writeInfo.call(void 0, "\u{1F4E6} Running Storm Configuration JSON Schema generator", config);
|
|
2459
|
+
_chunkEFR6PXP4js.writeTrace.call(void 0, `Determining the Storm Configuration JSON Schema...`, config);
|
|
2460
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkEFR6PXP4js.StormConfigSchema, {
|
|
2462
2461
|
name: "StormWorkspaceConfiguration"
|
|
2463
2462
|
});
|
|
2464
|
-
|
|
2465
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _115 => _115.workspaceRoot]), () => (
|
|
2466
|
-
|
|
2463
|
+
_chunkEFR6PXP4js.writeTrace.call(void 0, jsonSchema, config);
|
|
2464
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _115 => _115.workspaceRoot]), () => ( _chunkEFR6PXP4js.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _116 => _116.outputFile, 'optionalAccess', _117 => _117.startsWith, 'call', _118 => _118("./")]) ? "" : "./");
|
|
2465
|
+
_chunkEFR6PXP4js.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
2467
2466
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
2468
2467
|
spaces: 2
|
|
2469
2468
|
});
|
|
2470
2469
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2471
|
-
|
|
2470
|
+
_chunkEFR6PXP4js.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
|
|
2472
2471
|
return {
|
|
2473
2472
|
success: true
|
|
2474
2473
|
};
|
|
@@ -2507,7 +2506,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, initGenerator, "initGenerator");
|
|
|
2507
2506
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
2508
2507
|
|
|
2509
2508
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
2510
|
-
const filesDir =
|
|
2509
|
+
const filesDir = _chunkEFR6PXP4js.joinPaths.call(void 0, __dirname, "src", "generators", "neutral-library", "files");
|
|
2511
2510
|
const tsLibraryGeneratorOptions = {
|
|
2512
2511
|
...schema,
|
|
2513
2512
|
platform: "neutral",
|
|
@@ -2550,7 +2549,7 @@ var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral P
|
|
|
2550
2549
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
2551
2550
|
|
|
2552
2551
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
2553
|
-
const filesDir =
|
|
2552
|
+
const filesDir = _chunkEFR6PXP4js.joinPaths.call(void 0, __dirname, "src", "generators", "node-library", "files");
|
|
2554
2553
|
const tsLibraryGeneratorOptions = {
|
|
2555
2554
|
platform: "node",
|
|
2556
2555
|
devDependencies: {
|