@storm-software/terraform-tools 0.54.57 → 0.54.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/dist/{chunk-DJCYC7JQ.js → chunk-5OAGP7YB.js} +2 -2
- package/dist/{chunk-DJRMAJFK.mjs → chunk-AHNRXACX.mjs} +1 -1
- package/dist/{chunk-QLX5ZXZW.js → chunk-B4CWEDF7.js} +2 -2
- package/dist/{chunk-VO3C3BEJ.mjs → chunk-C5HXVP36.mjs} +1 -1
- package/dist/{chunk-N54F7ABF.js → chunk-HF6B3RTE.js} +2 -2
- package/dist/{chunk-RRGIDHEO.mjs → chunk-HKYACVYC.mjs} +1 -1
- package/dist/{chunk-WEQEQWKX.js → chunk-KE4J6XA5.js} +127 -127
- package/dist/{chunk-AWKDJF6S.js → chunk-ORY6UCS4.js} +3 -3
- package/dist/{chunk-XOYPHEA3.mjs → chunk-PAAPG65H.mjs} +1 -1
- package/dist/{chunk-OFLYCEQV.js → chunk-QCJEAT7Z.js} +2 -1
- package/dist/{chunk-SHSQW7WA.js → chunk-TTE37GGL.js} +2 -2
- package/dist/{chunk-PZJTLGLV.mjs → chunk-UC3CKBDF.mjs} +1 -1
- package/dist/{chunk-WICTIB3T.mjs → chunk-YJUNOUAM.mjs} +1 -1
- package/dist/{chunk-7AZ64L3E.mjs → chunk-ZXR7DVE5.mjs} +2 -1
- package/dist/executors.js +6 -6
- package/dist/executors.mjs +6 -6
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +2 -2
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/src/base/index.js +3 -3
- package/dist/src/base/index.mjs +2 -2
- package/dist/src/base/terraform-executor.js +3 -3
- package/dist/src/base/terraform-executor.mjs +2 -2
- package/dist/src/executors/apply/executor.js +4 -4
- package/dist/src/executors/apply/executor.mjs +3 -3
- package/dist/src/executors/destroy/executor.js +4 -4
- package/dist/src/executors/destroy/executor.mjs +3 -3
- package/dist/src/executors/output/executor.js +4 -4
- package/dist/src/executors/output/executor.mjs +3 -3
- package/dist/src/executors/plan/executor.js +4 -4
- package/dist/src/executors/plan/executor.mjs +3 -3
- package/dist/src/generators/init/init.js +3 -3
- package/dist/src/generators/init/init.mjs +2 -2
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkQCJEAT7Zjs = require('./chunk-QCJEAT7Z.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 = _chunkQCJEAT7Zjs.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 = _chunkQCJEAT7Zjs.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 = _chunkQCJEAT7Zjs.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 = _chunkQCJEAT7Zjs.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 = _chunkQCJEAT7Zjs.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
|
+
_chunkQCJEAT7Zjs.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} -> ${_chunkQCJEAT7Zjs.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
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkQCJEAT7Zjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
332
332
|
const files = await _glob.glob.call(void 0, [
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
333
|
+
_chunkQCJEAT7Zjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
334
|
+
_chunkQCJEAT7Zjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
335
|
+
_chunkQCJEAT7Zjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
336
|
+
_chunkQCJEAT7Zjs.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 = _chunkQCJEAT7Zjs.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
|
+
_chunkQCJEAT7Zjs.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, _chunkQCJEAT7Zjs.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 = _chunkQCJEAT7Zjs.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);
|
|
@@ -401,13 +401,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
401
401
|
return ret;
|
|
402
402
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
403
403
|
} else {
|
|
404
|
-
|
|
404
|
+
_chunkQCJEAT7Zjs.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 : _chunkQCJEAT7Zjs.findWorkspaceRoot.call(void 0, );
|
|
410
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkQCJEAT7Zjs.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 ??= `${_chunkQCJEAT7Zjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
420
420
|
}
|
|
421
421
|
packageJson.files ??= [
|
|
422
422
|
"dist/**/*"
|
|
@@ -447,7 +447,7 @@ 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 : _chunkQCJEAT7Zjs.joinPaths.call(void 0, "packages", projectName);
|
|
451
451
|
return packageJson;
|
|
452
452
|
}, "addWorkspacePackageJsonFields");
|
|
453
453
|
|
|
@@ -752,7 +752,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
|
|
|
752
752
|
setup(build4) {
|
|
753
753
|
build4.onEnd((result) => {
|
|
754
754
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
755
|
-
|
|
755
|
+
_chunkQCJEAT7Zjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
756
756
|
${result.errors.map((error) => error.text).join("\n")}
|
|
757
757
|
|
|
758
758
|
`, resolvedOptions.config);
|
|
@@ -787,7 +787,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
|
787
787
|
var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
788
788
|
name: "storm:resolve-paths",
|
|
789
789
|
setup(build4) {
|
|
790
|
-
const parentTsConfig = build4.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0,
|
|
790
|
+
const parentTsConfig = build4.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0, _chunkQCJEAT7Zjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build4.initialOptions.tsconfig)) : _chunk3GQAWCBQjs.__require.call(void 0, _chunkQCJEAT7Zjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
791
791
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
792
792
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
793
793
|
build4.onResolve({
|
|
@@ -811,7 +811,7 @@ var _apiextractor = require('@microsoft/api-extractor');
|
|
|
811
811
|
|
|
812
812
|
|
|
813
813
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
814
|
-
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0,
|
|
814
|
+
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0, _chunkQCJEAT7Zjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
815
815
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
816
816
|
p,
|
|
817
817
|
getTypeDependencyPackageName(p)
|
|
@@ -847,13 +847,13 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
847
847
|
},
|
|
848
848
|
dtsRollup: {
|
|
849
849
|
enabled: true,
|
|
850
|
-
untrimmedFilePath:
|
|
850
|
+
untrimmedFilePath: _chunkQCJEAT7Zjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
851
851
|
},
|
|
852
852
|
tsdocMetadata: {
|
|
853
853
|
enabled: false
|
|
854
854
|
}
|
|
855
855
|
},
|
|
856
|
-
packageJsonFullPath:
|
|
856
|
+
packageJsonFullPath: _chunkQCJEAT7Zjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
857
857
|
configObjectFullPath: void 0
|
|
858
858
|
});
|
|
859
859
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -861,7 +861,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
861
861
|
localBuild: true
|
|
862
862
|
});
|
|
863
863
|
if (extractorResult.succeeded === false) {
|
|
864
|
-
|
|
864
|
+
_chunkQCJEAT7Zjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
865
865
|
throw new Error("API Extractor completed with errors");
|
|
866
866
|
}
|
|
867
867
|
}
|
|
@@ -874,18 +874,18 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
|
|
|
874
874
|
}
|
|
875
875
|
build4.onStart(async () => {
|
|
876
876
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
877
|
-
await
|
|
877
|
+
await _chunkQCJEAT7Zjs.run.call(void 0, resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
878
878
|
}
|
|
879
879
|
if (resolvedOptions.bundle && resolvedOptions.entryPoints && resolvedOptions.entryPoints.length > 0 && _optionalChain([resolvedOptions, 'access', _44 => _44.entryPoints, 'access', _45 => _45[0], 'optionalAccess', _46 => _46.in]) && resolvedOptions.entryPoints[0].in.endsWith(".ts")) {
|
|
880
880
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
881
881
|
const typeOutDir = resolvedOptions.outdir;
|
|
882
882
|
const entryPoint = resolvedOptions.entryPoints[0].in.replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
883
|
-
const bundlePath =
|
|
883
|
+
const bundlePath = _chunkQCJEAT7Zjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
884
884
|
let dtsPath;
|
|
885
|
-
if (_fs.existsSync.call(void 0,
|
|
886
|
-
dtsPath =
|
|
887
|
-
} else if (_fs.existsSync.call(void 0,
|
|
888
|
-
dtsPath =
|
|
885
|
+
if (_fs.existsSync.call(void 0, _chunkQCJEAT7Zjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
886
|
+
dtsPath = _chunkQCJEAT7Zjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
887
|
+
} else if (_fs.existsSync.call(void 0, _chunkQCJEAT7Zjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
888
|
+
dtsPath = _chunkQCJEAT7Zjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
889
889
|
}
|
|
890
890
|
const ext = resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
891
891
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -1049,8 +1049,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
1049
1049
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
1050
1050
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
1051
1051
|
});
|
|
1052
|
-
|
|
1053
|
-
|
|
1052
|
+
_chunkQCJEAT7Zjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
1053
|
+
_chunkQCJEAT7Zjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
1054
1054
|
if (filteredMissingDeps.length > 0) {
|
|
1055
1055
|
throw new Error(`Missing dependencies detected - please install them:
|
|
1056
1056
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1073,7 +1073,7 @@ var shebangRenderer = {
|
|
|
1073
1073
|
// ../esbuild/src/utilities/get-entry-points.ts
|
|
1074
1074
|
|
|
1075
1075
|
var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
1076
|
-
const workspaceRoot3 = config.workspaceRoot ||
|
|
1076
|
+
const workspaceRoot3 = config.workspaceRoot || _chunkQCJEAT7Zjs.findWorkspaceRoot.call(void 0, );
|
|
1077
1077
|
const entryPoints = [];
|
|
1078
1078
|
if (entry) {
|
|
1079
1079
|
if (typeof entry === "string") {
|
|
@@ -1104,8 +1104,8 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1104
1104
|
}
|
|
1105
1105
|
if (emitOnAll) {
|
|
1106
1106
|
entryPoints.push({
|
|
1107
|
-
in:
|
|
1108
|
-
out:
|
|
1107
|
+
in: _chunkQCJEAT7Zjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"),
|
|
1108
|
+
out: _chunkQCJEAT7Zjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}")
|
|
1109
1109
|
});
|
|
1110
1110
|
}
|
|
1111
1111
|
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
@@ -1118,9 +1118,9 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1118
1118
|
]
|
|
1119
1119
|
});
|
|
1120
1120
|
paths.push(...files.reduce((ret, filePath) => {
|
|
1121
|
-
const result =
|
|
1121
|
+
const result = _chunkQCJEAT7Zjs.correctPaths.call(void 0, _chunkQCJEAT7Zjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkQCJEAT7Zjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkQCJEAT7Zjs.correctPaths.call(void 0, projectRoot), ""));
|
|
1122
1122
|
if (result) {
|
|
1123
|
-
|
|
1123
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkQCJEAT7Zjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
1124
1124
|
if (!paths.some((p) => p.in === result)) {
|
|
1125
1125
|
paths.push({
|
|
1126
1126
|
in: result,
|
|
@@ -1131,7 +1131,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1131
1131
|
return ret;
|
|
1132
1132
|
}, []));
|
|
1133
1133
|
} else {
|
|
1134
|
-
|
|
1134
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, `Adding ESBuild entry point
|
|
1135
1135
|
- Input: ${entryPoint.in}
|
|
1136
1136
|
- Output: ${entryPoint.out}`, config);
|
|
1137
1137
|
if (!paths.some((p) => p.out === entryPoint.out)) {
|
|
@@ -1224,13 +1224,13 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1224
1224
|
if (!workspaceRoot3) {
|
|
1225
1225
|
throw new Error("Cannot find Nx workspace root");
|
|
1226
1226
|
}
|
|
1227
|
-
const config = await
|
|
1228
|
-
|
|
1229
|
-
const stopwatch =
|
|
1227
|
+
const config = await _chunkQCJEAT7Zjs.getConfig.call(void 0, workspaceRoot3.dir);
|
|
1228
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1229
|
+
const stopwatch = _chunkQCJEAT7Zjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1230
1230
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1231
1231
|
exitOnError: true
|
|
1232
1232
|
});
|
|
1233
|
-
const projectJsonPath =
|
|
1233
|
+
const projectJsonPath = _chunkQCJEAT7Zjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1234
1234
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
1235
1235
|
throw new Error("Cannot find project.json configuration");
|
|
1236
1236
|
}
|
|
@@ -1244,7 +1244,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1244
1244
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
1245
1245
|
options.name ??= `${projectName}-${options.format}`;
|
|
1246
1246
|
options.target ??= DEFAULT_TARGET;
|
|
1247
|
-
const packageJsonPath =
|
|
1247
|
+
const packageJsonPath = _chunkQCJEAT7Zjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1248
1248
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1249
1249
|
throw new Error("Cannot find package.json configuration");
|
|
1250
1250
|
}
|
|
@@ -1261,19 +1261,19 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1261
1261
|
"main"
|
|
1262
1262
|
],
|
|
1263
1263
|
...userOptions,
|
|
1264
|
-
tsconfig:
|
|
1264
|
+
tsconfig: _chunkQCJEAT7Zjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1265
1265
|
format: options.format || "cjs",
|
|
1266
1266
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, _nullishCoalesce(userOptions.entry, () => ( "./src/index.ts")), false),
|
|
1267
|
-
outdir: userOptions.outputPath ||
|
|
1267
|
+
outdir: userOptions.outputPath || _chunkQCJEAT7Zjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1268
1268
|
distDir: userOptions.distDir || "dist",
|
|
1269
1269
|
plugins: [],
|
|
1270
1270
|
name: userOptions.name || projectName,
|
|
1271
1271
|
projectConfigurations,
|
|
1272
1272
|
projectName,
|
|
1273
1273
|
projectGraph,
|
|
1274
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1274
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkQCJEAT7Zjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1275
1275
|
minify: userOptions.minify || !userOptions.debug,
|
|
1276
|
-
verbose: userOptions.verbose ||
|
|
1276
|
+
verbose: userOptions.verbose || _chunkQCJEAT7Zjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1277
1277
|
includeSrc: userOptions.includeSrc === true,
|
|
1278
1278
|
metafile: userOptions.metafile !== false,
|
|
1279
1279
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1308,8 +1308,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1308
1308
|
}, {})
|
|
1309
1309
|
},
|
|
1310
1310
|
inject: [
|
|
1311
|
-
options.format === "cjs" && options.injectShims ?
|
|
1312
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ?
|
|
1311
|
+
options.format === "cjs" && options.injectShims ? _chunkQCJEAT7Zjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : void 0,
|
|
1312
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkQCJEAT7Zjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : void 0
|
|
1313
1313
|
].filter(Boolean)
|
|
1314
1314
|
};
|
|
1315
1315
|
result.plugins = _nullishCoalesce(userOptions.plugins, () => ( getDefaultBuildPlugins(userOptions, result)));
|
|
@@ -1327,14 +1327,14 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1327
1327
|
return result;
|
|
1328
1328
|
}, "resolveOptions");
|
|
1329
1329
|
async function generatePackageJson(context2) {
|
|
1330
|
-
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1331
|
-
|
|
1332
|
-
const stopwatch =
|
|
1333
|
-
const packageJsonPath =
|
|
1330
|
+
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkQCJEAT7Zjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
1331
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
1332
|
+
const stopwatch = _chunkQCJEAT7Zjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1333
|
+
const packageJsonPath = _chunkQCJEAT7Zjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
1334
1334
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1335
1335
|
throw new Error("Cannot find package.json configuration");
|
|
1336
1336
|
}
|
|
1337
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
1337
|
+
const packageJsonFile = await _promises2.default.readFile(_chunkQCJEAT7Zjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
|
|
1338
1338
|
let packageJson = JSON.parse(packageJsonFile);
|
|
1339
1339
|
if (!packageJson) {
|
|
1340
1340
|
throw new Error("Cannot find package.json configuration file");
|
|
@@ -1362,7 +1362,7 @@ async function generatePackageJson(context2) {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
return ret;
|
|
1364
1364
|
}, packageJson.exports);
|
|
1365
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1365
|
+
await _devkit.writeJsonFile.call(void 0, _chunkQCJEAT7Zjs.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
|
|
1366
1366
|
stopwatch();
|
|
1367
1367
|
}
|
|
1368
1368
|
return context2;
|
|
@@ -1388,8 +1388,8 @@ async function generateContext(getOptions) {
|
|
|
1388
1388
|
}
|
|
1389
1389
|
_chunk3GQAWCBQjs.__name.call(void 0, generateContext, "generateContext");
|
|
1390
1390
|
async function executeEsBuild(context2) {
|
|
1391
|
-
|
|
1392
|
-
const stopwatch =
|
|
1391
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
1392
|
+
const stopwatch = _chunkQCJEAT7Zjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
1393
1393
|
if (process.env.STORM_WATCH) {
|
|
1394
1394
|
const ctx = await esbuild2.context(context2.options);
|
|
1395
1395
|
watch(ctx, context2.options);
|
|
@@ -1397,7 +1397,7 @@ async function executeEsBuild(context2) {
|
|
|
1397
1397
|
const options = {
|
|
1398
1398
|
...context2.options
|
|
1399
1399
|
};
|
|
1400
|
-
options.outdir =
|
|
1400
|
+
options.outdir = _chunkQCJEAT7Zjs.joinPaths.call(void 0, context2.options.outdir, context2.options.distDir);
|
|
1401
1401
|
if (!options.inject || !Array.isArray(options.inject) || options.inject.length === 0 || // eslint-disable-next-line no-constant-binary-expression, @typescript-eslint/no-explicit-any
|
|
1402
1402
|
options.inject === {}) {
|
|
1403
1403
|
delete options.inject;
|
|
@@ -1422,8 +1422,8 @@ async function executeEsBuild(context2) {
|
|
|
1422
1422
|
delete options.config;
|
|
1423
1423
|
delete options.injectShims;
|
|
1424
1424
|
delete options.external;
|
|
1425
|
-
|
|
1426
|
-
${
|
|
1425
|
+
_chunkQCJEAT7Zjs.writeTrace.call(void 0, `Run esbuild (${context2.options.name}) with the following options:
|
|
1426
|
+
${_chunkQCJEAT7Zjs.formatLogMessage.call(void 0, {
|
|
1427
1427
|
...options,
|
|
1428
1428
|
define: "<Hidden>"
|
|
1429
1429
|
})}`, context2.options.config);
|
|
@@ -1439,8 +1439,8 @@ ${_chunkOFLYCEQVjs.formatLogMessage.call(void 0, {
|
|
|
1439
1439
|
_chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
1440
1440
|
async function copyBuildAssets(context2) {
|
|
1441
1441
|
if (_optionalChain([context2, 'access', _55 => _55.result, 'optionalAccess', _56 => _56.errors, 'access', _57 => _57.length]) === 0) {
|
|
1442
|
-
|
|
1443
|
-
const stopwatch =
|
|
1442
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
1443
|
+
const stopwatch = _chunkQCJEAT7Zjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1444
1444
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
1445
1445
|
stopwatch();
|
|
1446
1446
|
}
|
|
@@ -1450,9 +1450,9 @@ _chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
1450
1450
|
async function reportResults(context2) {
|
|
1451
1451
|
if (_optionalChain([context2, 'access', _58 => _58.result, 'optionalAccess', _59 => _59.errors, 'access', _60 => _60.length]) === 0) {
|
|
1452
1452
|
if (context2.result.warnings.length > 0) {
|
|
1453
|
-
|
|
1453
|
+
_chunkQCJEAT7Zjs.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);
|
|
1454
1454
|
}
|
|
1455
|
-
|
|
1455
|
+
_chunkQCJEAT7Zjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
1456
1456
|
}
|
|
1457
1457
|
}
|
|
1458
1458
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -1488,8 +1488,8 @@ async function dependencyCheck(options) {
|
|
|
1488
1488
|
_chunk3GQAWCBQjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
1489
1489
|
async function cleanOutputPath(context2) {
|
|
1490
1490
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
1491
|
-
|
|
1492
|
-
const stopwatch =
|
|
1491
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
1492
|
+
const stopwatch = _chunkQCJEAT7Zjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
|
|
1493
1493
|
await cleanDirectories(context2.options.name, context2.options.outdir, context2.options.config);
|
|
1494
1494
|
stopwatch();
|
|
1495
1495
|
}
|
|
@@ -1497,8 +1497,8 @@ async function cleanOutputPath(context2) {
|
|
|
1497
1497
|
}
|
|
1498
1498
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1499
1499
|
async function build3(options) {
|
|
1500
|
-
|
|
1501
|
-
const stopwatch =
|
|
1500
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1501
|
+
const stopwatch = _chunkQCJEAT7Zjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1502
1502
|
try {
|
|
1503
1503
|
const opts = Array.isArray(options) ? options : [
|
|
1504
1504
|
options
|
|
@@ -1508,9 +1508,9 @@ async function build3(options) {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
void transduce.async(opts, dependencyCheck);
|
|
1510
1510
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
1511
|
-
|
|
1511
|
+
_chunkQCJEAT7Zjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1512
1512
|
} catch (error) {
|
|
1513
|
-
|
|
1513
|
+
_chunkQCJEAT7Zjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
1514
1514
|
throw error;
|
|
1515
1515
|
} finally {
|
|
1516
1516
|
stopwatch();
|
|
@@ -1538,9 +1538,9 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1538
1538
|
return context2.rebuild();
|
|
1539
1539
|
});
|
|
1540
1540
|
if (rebuildResult instanceof Error) {
|
|
1541
|
-
|
|
1541
|
+
_chunkQCJEAT7Zjs.writeError.call(void 0, rebuildResult.message);
|
|
1542
1542
|
}
|
|
1543
|
-
|
|
1543
|
+
_chunkQCJEAT7Zjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
1544
1544
|
}, 10);
|
|
1545
1545
|
changeWatcher.on("change", fastRebuild);
|
|
1546
1546
|
return void 0;
|
|
@@ -1548,7 +1548,7 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1548
1548
|
|
|
1549
1549
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1550
1550
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1551
|
-
|
|
1551
|
+
_chunkQCJEAT7Zjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1552
1552
|
if (!_optionalChain([context2, 'access', _61 => _61.projectsConfigurations, 'optionalAccess', _62 => _62.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _63 => _63.projectsConfigurations, 'access', _64 => _64.projects, 'access', _65 => _65[context2.projectName], 'optionalAccess', _66 => _66.root])) {
|
|
1553
1553
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1554
1554
|
}
|
|
@@ -1565,7 +1565,7 @@ async function esbuildExecutorFn(options, context2, config) {
|
|
|
1565
1565
|
};
|
|
1566
1566
|
}
|
|
1567
1567
|
_chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
|
|
1568
|
-
var executor_default6 =
|
|
1568
|
+
var executor_default6 = _chunkQCJEAT7Zjs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
|
|
1569
1569
|
skipReadingConfig: false,
|
|
1570
1570
|
hooks: {
|
|
1571
1571
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1602,7 +1602,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1602
1602
|
if (!_optionalChain([context2, 'optionalAccess', _75 => _75.projectName]) || !_optionalChain([context2, 'access', _76 => _76.projectsConfigurations, 'optionalAccess', _77 => _77.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1603
1603
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
1604
1604
|
}
|
|
1605
|
-
|
|
1605
|
+
_chunkQCJEAT7Zjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
1606
1606
|
_sizelimit2.default.call(void 0, [
|
|
1607
1607
|
_file2.default,
|
|
1608
1608
|
_esbuild3.default,
|
|
@@ -1610,14 +1610,14 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1610
1610
|
], {
|
|
1611
1611
|
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _78 => _78.projectsConfigurations, 'access', _79 => _79.projects, 'access', _80 => _80[context2.projectName], 'optionalAccess', _81 => _81.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _82 => _82.projectsConfigurations, 'access', _83 => _83.projects, 'access', _84 => _84[context2.projectName], 'optionalAccess', _85 => _85.root]), () => ( "./")), "src")))
|
|
1612
1612
|
}).then((result) => {
|
|
1613
|
-
|
|
1613
|
+
_chunkQCJEAT7Zjs.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
1614
1614
|
});
|
|
1615
1615
|
return {
|
|
1616
1616
|
success: true
|
|
1617
1617
|
};
|
|
1618
1618
|
}
|
|
1619
1619
|
_chunk3GQAWCBQjs.__name.call(void 0, sizeLimitExecutorFn, "sizeLimitExecutorFn");
|
|
1620
|
-
var executor_default7 =
|
|
1620
|
+
var executor_default7 = _chunkQCJEAT7Zjs.withRunExecutor.call(void 0, "Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
|
|
1621
1621
|
skipReadingConfig: false,
|
|
1622
1622
|
hooks: {
|
|
1623
1623
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1631,11 +1631,11 @@ var _fsextra = require('fs-extra');
|
|
|
1631
1631
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1632
1632
|
async function typiaExecutorFn(options, _, config) {
|
|
1633
1633
|
if (options.clean !== false) {
|
|
1634
|
-
|
|
1634
|
+
_chunkQCJEAT7Zjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1635
1635
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1636
1636
|
}
|
|
1637
1637
|
await Promise.all(options.entry.map((entry) => {
|
|
1638
|
-
|
|
1638
|
+
_chunkQCJEAT7Zjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1639
1639
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1640
1640
|
input: entry,
|
|
1641
1641
|
output: options.outputPath,
|
|
@@ -1647,7 +1647,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
1647
1647
|
};
|
|
1648
1648
|
}
|
|
1649
1649
|
_chunk3GQAWCBQjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
|
|
1650
|
-
var executor_default8 =
|
|
1650
|
+
var executor_default8 = _chunkQCJEAT7Zjs.withRunExecutor.call(void 0, "Typia runtime validation generator", typiaExecutorFn, {
|
|
1651
1651
|
skipReadingConfig: false,
|
|
1652
1652
|
hooks: {
|
|
1653
1653
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1666,7 +1666,7 @@ var executor_default8 = _chunkOFLYCEQVjs.withRunExecutor.call(void 0, "Typia run
|
|
|
1666
1666
|
|
|
1667
1667
|
var _jiti = require('jiti');
|
|
1668
1668
|
async function unbuildExecutorFn(options, context2, config) {
|
|
1669
|
-
|
|
1669
|
+
_chunkQCJEAT7Zjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1670
1670
|
if (!_optionalChain([context2, 'access', _86 => _86.projectsConfigurations, 'optionalAccess', _87 => _87.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1671
1671
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
1672
1672
|
}
|
|
@@ -1677,7 +1677,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1677
1677
|
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.");
|
|
1678
1678
|
}
|
|
1679
1679
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1680
|
-
fsCache: config.skipCache ? false :
|
|
1680
|
+
fsCache: config.skipCache ? false : _chunkQCJEAT7Zjs.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
1681
1681
|
interopDefault: true
|
|
1682
1682
|
});
|
|
1683
1683
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
@@ -1690,7 +1690,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1690
1690
|
}, {
|
|
1691
1691
|
stubOptions: {
|
|
1692
1692
|
jiti: {
|
|
1693
|
-
fsCache: config.skipCache ? false :
|
|
1693
|
+
fsCache: config.skipCache ? false : _chunkQCJEAT7Zjs.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
|
|
1694
1694
|
}
|
|
1695
1695
|
},
|
|
1696
1696
|
rollup: {
|
|
@@ -1714,7 +1714,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1714
1714
|
};
|
|
1715
1715
|
}
|
|
1716
1716
|
_chunk3GQAWCBQjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
|
|
1717
|
-
var executor_default9 =
|
|
1717
|
+
var executor_default9 = _chunkQCJEAT7Zjs.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
|
|
1718
1718
|
skipReadingConfig: false,
|
|
1719
1719
|
hooks: {
|
|
1720
1720
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1738,34 +1738,34 @@ var executor_default9 = _chunkOFLYCEQVjs.withRunExecutor.call(void 0, "TypeScrip
|
|
|
1738
1738
|
var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
1739
1739
|
skipReadingConfig: false
|
|
1740
1740
|
}) => async (tree, _options) => {
|
|
1741
|
-
const stopwatch =
|
|
1741
|
+
const stopwatch = _chunkQCJEAT7Zjs.getStopwatch.call(void 0, name);
|
|
1742
1742
|
let options = _options;
|
|
1743
1743
|
let config;
|
|
1744
1744
|
try {
|
|
1745
|
-
|
|
1745
|
+
_chunkQCJEAT7Zjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
1746
1746
|
|
|
1747
1747
|
`, config);
|
|
1748
|
-
const workspaceRoot3 =
|
|
1748
|
+
const workspaceRoot3 = _chunkQCJEAT7Zjs.findWorkspaceRoot.call(void 0, );
|
|
1749
1749
|
if (!generatorOptions.skipReadingConfig) {
|
|
1750
|
-
|
|
1750
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
1751
1751
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
1752
|
-
config = await
|
|
1752
|
+
config = await _chunkQCJEAT7Zjs.getConfig.call(void 0, workspaceRoot3);
|
|
1753
1753
|
}
|
|
1754
1754
|
if (_optionalChain([generatorOptions, 'optionalAccess', _88 => _88.hooks, 'optionalAccess', _89 => _89.applyDefaultOptions])) {
|
|
1755
|
-
|
|
1755
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1756
1756
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
1757
|
-
|
|
1757
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1758
1758
|
}
|
|
1759
|
-
|
|
1759
|
+
_chunkQCJEAT7Zjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
|
|
1760
1760
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
|
|
1761
|
-
const tokenized = await
|
|
1761
|
+
const tokenized = await _chunkQCJEAT7Zjs.applyWorkspaceTokens.call(void 0, options, {
|
|
1762
1762
|
workspaceRoot: tree.root,
|
|
1763
1763
|
config
|
|
1764
|
-
},
|
|
1764
|
+
}, _chunkQCJEAT7Zjs.applyWorkspaceBaseTokens);
|
|
1765
1765
|
if (_optionalChain([generatorOptions, 'optionalAccess', _90 => _90.hooks, 'optionalAccess', _91 => _91.preProcess])) {
|
|
1766
|
-
|
|
1766
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
1767
1767
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
1768
|
-
|
|
1768
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
1769
1769
|
}
|
|
1770
1770
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
1771
1771
|
if (result) {
|
|
@@ -1778,18 +1778,18 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1778
1778
|
}
|
|
1779
1779
|
}
|
|
1780
1780
|
if (_optionalChain([generatorOptions, 'optionalAccess', _101 => _101.hooks, 'optionalAccess', _102 => _102.postProcess])) {
|
|
1781
|
-
|
|
1781
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
1782
1782
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1783
|
-
|
|
1783
|
+
_chunkQCJEAT7Zjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
1784
1784
|
}
|
|
1785
1785
|
return () => {
|
|
1786
|
-
|
|
1786
|
+
_chunkQCJEAT7Zjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
1787
1787
|
`, config);
|
|
1788
1788
|
};
|
|
1789
1789
|
} catch (error) {
|
|
1790
1790
|
return () => {
|
|
1791
|
-
|
|
1792
|
-
|
|
1791
|
+
_chunkQCJEAT7Zjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
1792
|
+
_chunkQCJEAT7Zjs.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
1793
1793
|
- Details: ${error.message}
|
|
1794
1794
|
- Stacktrace: ${error.stack}`, config);
|
|
1795
1795
|
};
|
|
@@ -1891,7 +1891,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1891
1891
|
const projectConfig = {
|
|
1892
1892
|
root: normalized.directory,
|
|
1893
1893
|
projectType: "library",
|
|
1894
|
-
sourceRoot:
|
|
1894
|
+
sourceRoot: _chunkQCJEAT7Zjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
1895
1895
|
targets: {
|
|
1896
1896
|
build: {
|
|
1897
1897
|
executor: options.buildExecutor,
|
|
@@ -1900,11 +1900,11 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1900
1900
|
],
|
|
1901
1901
|
options: {
|
|
1902
1902
|
entry: [
|
|
1903
|
-
|
|
1903
|
+
_chunkQCJEAT7Zjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")
|
|
1904
1904
|
],
|
|
1905
1905
|
outputPath: getOutputPath(normalized),
|
|
1906
|
-
tsconfig:
|
|
1907
|
-
project:
|
|
1906
|
+
tsconfig: _chunkQCJEAT7Zjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
1907
|
+
project: _chunkQCJEAT7Zjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
1908
1908
|
defaultConfiguration: "production",
|
|
1909
1909
|
platform: "neutral",
|
|
1910
1910
|
assets: [
|
|
@@ -1958,7 +1958,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1958
1958
|
if (!normalized.importPath) {
|
|
1959
1959
|
normalized.importPath = normalized.name;
|
|
1960
1960
|
}
|
|
1961
|
-
const packageJsonPath =
|
|
1961
|
+
const packageJsonPath = _chunkQCJEAT7Zjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
1962
1962
|
if (tree.exists(packageJsonPath)) {
|
|
1963
1963
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
1964
1964
|
if (!normalized.importPath) {
|
|
@@ -2015,10 +2015,10 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2015
2015
|
}));
|
|
2016
2016
|
}
|
|
2017
2017
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
2018
|
-
|
|
2018
|
+
_chunkQCJEAT7Zjs.joinPaths.call(void 0, normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
|
|
2019
2019
|
]);
|
|
2020
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2021
|
-
|
|
2020
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkQCJEAT7Zjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
2021
|
+
_chunkQCJEAT7Zjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
2022
2022
|
]);
|
|
2023
2023
|
if (tree.exists("package.json")) {
|
|
2024
2024
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2029,7 +2029,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2029
2029
|
description = packageJson.description;
|
|
2030
2030
|
}
|
|
2031
2031
|
}
|
|
2032
|
-
const tsconfigPath =
|
|
2032
|
+
const tsconfigPath = _chunkQCJEAT7Zjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
2033
2033
|
if (tree.exists(tsconfigPath)) {
|
|
2034
2034
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2035
2035
|
json.composite ??= true;
|
|
@@ -2067,7 +2067,7 @@ function getOutputPath(options) {
|
|
|
2067
2067
|
} else {
|
|
2068
2068
|
parts.push(options.projectRoot);
|
|
2069
2069
|
}
|
|
2070
|
-
return
|
|
2070
|
+
return _chunkQCJEAT7Zjs.joinPaths.call(void 0, ...parts);
|
|
2071
2071
|
}
|
|
2072
2072
|
_chunk3GQAWCBQjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
2073
2073
|
function createProjectTsConfigJson(tree, options) {
|
|
@@ -2076,7 +2076,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2076
2076
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _114 => _114.tsconfigOptions]), () => ( {})),
|
|
2077
2077
|
compilerOptions: {
|
|
2078
2078
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2079
|
-
outDir:
|
|
2079
|
+
outDir: _chunkQCJEAT7Zjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2080
2080
|
noEmit: true,
|
|
2081
2081
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _115 => _115.tsconfigOptions, 'optionalAccess', _116 => _116.compilerOptions]), () => ( {}))
|
|
2082
2082
|
},
|
|
@@ -2096,7 +2096,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2096
2096
|
"src/**/*.test.ts"
|
|
2097
2097
|
]
|
|
2098
2098
|
};
|
|
2099
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2099
|
+
_devkit.writeJson.call(void 0, tree, _chunkQCJEAT7Zjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2100
2100
|
}
|
|
2101
2101
|
_chunk3GQAWCBQjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2102
2102
|
async function normalizeOptions(tree, options, config) {
|
|
@@ -2156,7 +2156,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, normalizeOptions, "normalizeOptions");
|
|
|
2156
2156
|
|
|
2157
2157
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2158
2158
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
2159
|
-
const filesDir =
|
|
2159
|
+
const filesDir = _chunkQCJEAT7Zjs.joinPaths.call(void 0, __dirname, "src", "generators", "browser-library", "files");
|
|
2160
2160
|
const tsLibraryGeneratorOptions = {
|
|
2161
2161
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
2162
2162
|
platform: "browser",
|
|
@@ -2228,19 +2228,19 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
2228
2228
|
|
|
2229
2229
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
2230
2230
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0,
|
|
2231
|
+
_chunkQCJEAT7Zjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
|
|
2232
|
+
_chunkQCJEAT7Zjs.writeTrace.call(void 0, `Determining the Storm Workspace Configuration JSON Schema...`, config);
|
|
2233
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkQCJEAT7Zjs.stormWorkspaceConfigSchema, {
|
|
2234
2234
|
name: "StormWorkspaceConfiguration"
|
|
2235
2235
|
});
|
|
2236
|
-
|
|
2237
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _125 => _125.workspaceRoot]), () => (
|
|
2238
|
-
|
|
2236
|
+
_chunkQCJEAT7Zjs.writeTrace.call(void 0, jsonSchema, config);
|
|
2237
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _125 => _125.workspaceRoot]), () => ( _chunkQCJEAT7Zjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _126 => _126.outputFile, 'optionalAccess', _127 => _127.startsWith, 'call', _128 => _128("./")]) ? "" : "./");
|
|
2238
|
+
_chunkQCJEAT7Zjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
2239
2239
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
2240
2240
|
spaces: 2
|
|
2241
2241
|
});
|
|
2242
2242
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2243
|
-
|
|
2243
|
+
_chunkQCJEAT7Zjs.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
|
|
2244
2244
|
return {
|
|
2245
2245
|
success: true
|
|
2246
2246
|
};
|
|
@@ -2279,7 +2279,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, initGenerator, "initGenerator");
|
|
|
2279
2279
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
2280
2280
|
|
|
2281
2281
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
2282
|
-
const filesDir =
|
|
2282
|
+
const filesDir = _chunkQCJEAT7Zjs.joinPaths.call(void 0, __dirname, "src", "generators", "neutral-library", "files");
|
|
2283
2283
|
const tsLibraryGeneratorOptions = {
|
|
2284
2284
|
...schema,
|
|
2285
2285
|
platform: "neutral",
|
|
@@ -2322,7 +2322,7 @@ var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral P
|
|
|
2322
2322
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
2323
2323
|
|
|
2324
2324
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
2325
|
-
const filesDir =
|
|
2325
|
+
const filesDir = _chunkQCJEAT7Zjs.joinPaths.call(void 0, __dirname, "src", "generators", "node-library", "files");
|
|
2326
2326
|
const tsLibraryGeneratorOptions = {
|
|
2327
2327
|
platform: "node",
|
|
2328
2328
|
devDependencies: {
|