@storm-software/terraform-tools 0.54.26 → 0.54.28
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 +17 -0
- package/README.md +1 -1
- package/dist/{chunk-G5PYGJD3.mjs → chunk-3WK6TOEQ.mjs} +1 -1
- package/dist/{chunk-JTWWCHOY.js → chunk-CGSFJIIU.js} +2 -2
- package/dist/{chunk-5YGWQRMQ.js → chunk-G7Z6MEYZ.js} +2 -2
- package/dist/{chunk-3ZAFBUDR.js → chunk-HLHB472M.js} +2 -2
- package/dist/{chunk-KWC4B2IB.js → chunk-ISD3KOJH.js} +25 -25
- package/dist/{chunk-HCUDHOA5.mjs → chunk-IYCLXMY5.mjs} +1 -1
- package/dist/{chunk-L7KGL5QM.js → chunk-KU7XQWZI.js} +181 -182
- package/dist/{chunk-D6GXLL2Y.mjs → chunk-M5ME7ATW.mjs} +25 -25
- package/dist/{chunk-OI65N3CE.mjs → chunk-R3BFLMXQ.mjs} +1 -1
- package/dist/{chunk-753IKN36.js → chunk-U4KXII2A.js} +3 -3
- package/dist/{chunk-RPCBCF6T.mjs → chunk-V74I37PF.mjs} +31 -32
- package/dist/{chunk-ME4WDJGK.js → chunk-WFNWZFRJ.js} +2 -2
- package/dist/{chunk-MRL343WW.mjs → chunk-WWB3SZR5.mjs} +1 -1
- package/dist/{chunk-RDVYV2VH.mjs → chunk-X5SGDD4A.mjs} +1 -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
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkISD3KOJHjs = require('./chunk-ISD3KOJH.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 = _chunkISD3KOJHjs.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 = _chunkISD3KOJHjs.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 = _chunkISD3KOJHjs.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 = _chunkISD3KOJHjs.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 = _chunkISD3KOJHjs.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
|
+
_chunkISD3KOJHjs.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} -> ${_chunkISD3KOJHjs.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
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkISD3KOJHjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
331
331
|
const files = await _glob.glob.call(void 0, [
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
332
|
+
_chunkISD3KOJHjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
333
|
+
_chunkISD3KOJHjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
334
|
+
_chunkISD3KOJHjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
335
|
+
_chunkISD3KOJHjs.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
|
|
|
@@ -355,7 +355,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
355
355
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
|
|
356
356
|
const projectNode = project.node;
|
|
357
357
|
if (projectNode.data.root) {
|
|
358
|
-
const projectPackageJsonPath =
|
|
358
|
+
const projectPackageJsonPath = _chunkISD3KOJHjs.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
|
|
359
359
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
360
360
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
361
361
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -366,8 +366,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
if (localPackages.length > 0) {
|
|
369
|
-
|
|
370
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
369
|
+
_chunkISD3KOJHjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
370
|
+
const projectJsonFile = await _promises.readFile.call(void 0, _chunkISD3KOJHjs.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
371
371
|
const projectJson = JSON.parse(projectJsonFile);
|
|
372
372
|
const projectName2 = projectJson.name;
|
|
373
373
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
@@ -376,7 +376,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
376
376
|
}
|
|
377
377
|
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _7 => _7.projects, 'optionalAccess', _8 => _8[projectName2], 'access', _9 => _9.implicitDependencies, 'optionalAccess', _10 => _10.reduce, 'call', _11 => _11((ret, dep) => {
|
|
378
378
|
if (_optionalChain([projectConfigurations, 'access', _12 => _12.projects, 'optionalAccess', _13 => _13[dep]])) {
|
|
379
|
-
const depPackageJsonPath =
|
|
379
|
+
const depPackageJsonPath = _chunkISD3KOJHjs.joinPaths.call(void 0, workspaceRoot3, projectConfigurations.projects[dep].root, "package.json");
|
|
380
380
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
381
381
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
382
382
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
@@ -400,13 +400,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
400
400
|
return ret;
|
|
401
401
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
402
402
|
} else {
|
|
403
|
-
|
|
403
|
+
_chunkISD3KOJHjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
404
404
|
}
|
|
405
405
|
return packageJson;
|
|
406
406
|
}, "addPackageDependencies");
|
|
407
407
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
408
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
409
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
408
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkISD3KOJHjs.findWorkspaceRoot.call(void 0, );
|
|
409
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkISD3KOJHjs.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
410
410
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
411
411
|
packageJson.type ??= "module";
|
|
412
412
|
packageJson.sideEffects ??= false;
|
|
@@ -415,7 +415,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
415
415
|
if (distSrc.startsWith("/")) {
|
|
416
416
|
distSrc = distSrc.substring(1);
|
|
417
417
|
}
|
|
418
|
-
packageJson.source ??= `${
|
|
418
|
+
packageJson.source ??= `${_chunkISD3KOJHjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
419
419
|
}
|
|
420
420
|
packageJson.files ??= [
|
|
421
421
|
"dist/**/*"
|
|
@@ -446,7 +446,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
446
446
|
];
|
|
447
447
|
}
|
|
448
448
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
449
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
449
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkISD3KOJHjs.joinPaths.call(void 0, "packages", projectName);
|
|
450
450
|
return packageJson;
|
|
451
451
|
}, "addWorkspacePackageJsonFields");
|
|
452
452
|
var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
@@ -455,17 +455,17 @@ var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
455
455
|
entry = entry.replace(sourceRoot, "");
|
|
456
456
|
}
|
|
457
457
|
return {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
458
|
+
import: {
|
|
459
|
+
types: `./dist/${entry}.d.${type === "module" ? "ts" : "mts"}`,
|
|
460
|
+
default: `./dist/${entry}.${type === "module" ? "js" : "mjs"}`
|
|
461
461
|
},
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
462
|
+
require: {
|
|
463
|
+
types: `./dist/${entry}.d.${type === "commonjs" ? "ts" : "cts"}`,
|
|
464
|
+
default: `./dist/${entry}.${type === "commonjs" ? "js" : "cjs"}`
|
|
465
465
|
},
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
466
|
+
default: {
|
|
467
|
+
types: `./dist/${entry}.d.ts`,
|
|
468
|
+
default: `./dist/${entry}.js`
|
|
469
469
|
}
|
|
470
470
|
};
|
|
471
471
|
}, "addPackageJsonExport");
|
|
@@ -473,7 +473,7 @@ var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
473
473
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
474
474
|
|
|
475
475
|
var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
476
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
476
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkISD3KOJHjs.findWorkspaceRoot.call(void 0, );
|
|
477
477
|
const entryPoints = [];
|
|
478
478
|
if (entry) {
|
|
479
479
|
if (Array.isArray(entry)) {
|
|
@@ -485,7 +485,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
if (emitOnAll) {
|
|
488
|
-
entryPoints.push(
|
|
488
|
+
entryPoints.push(_chunkISD3KOJHjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
489
489
|
}
|
|
490
490
|
const results = [];
|
|
491
491
|
for (const entryPoint in entryPoints) {
|
|
@@ -494,9 +494,9 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
494
494
|
withFileTypes: true
|
|
495
495
|
});
|
|
496
496
|
results.push(...files.reduce((ret, filePath) => {
|
|
497
|
-
const result =
|
|
497
|
+
const result = _chunkISD3KOJHjs.correctPaths.call(void 0, _chunkISD3KOJHjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkISD3KOJHjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkISD3KOJHjs.correctPaths.call(void 0, projectRoot), ""));
|
|
498
498
|
if (result) {
|
|
499
|
-
|
|
499
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkISD3KOJHjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
500
500
|
if (!results.includes(result)) {
|
|
501
501
|
results.push(result);
|
|
502
502
|
}
|
|
@@ -830,7 +830,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
|
|
|
830
830
|
setup(build5) {
|
|
831
831
|
build5.onEnd((result) => {
|
|
832
832
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
833
|
-
|
|
833
|
+
_chunkISD3KOJHjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
834
834
|
${result.errors.map((error) => error.text).join("\n")}
|
|
835
835
|
|
|
836
836
|
`, resolvedOptions.config);
|
|
@@ -865,7 +865,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
|
865
865
|
var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
866
866
|
name: "storm:resolve-paths",
|
|
867
867
|
setup(build5) {
|
|
868
|
-
const parentTsConfig = build5.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0,
|
|
868
|
+
const parentTsConfig = build5.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0, _chunkISD3KOJHjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build5.initialOptions.tsconfig)) : _chunk3GQAWCBQjs.__require.call(void 0, _chunkISD3KOJHjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
869
869
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
870
870
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
871
871
|
build5.onResolve({
|
|
@@ -889,7 +889,7 @@ var _apiextractor = require('@microsoft/api-extractor');
|
|
|
889
889
|
|
|
890
890
|
|
|
891
891
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
892
|
-
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0,
|
|
892
|
+
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0, _chunkISD3KOJHjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
893
893
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
894
894
|
p,
|
|
895
895
|
getTypeDependencyPackageName(p)
|
|
@@ -919,19 +919,18 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
919
919
|
overrideTsconfig: {
|
|
920
920
|
compilerOptions: {
|
|
921
921
|
paths: {}
|
|
922
|
-
// bug with api extract + paths
|
|
923
922
|
}
|
|
924
923
|
}
|
|
925
924
|
},
|
|
926
925
|
dtsRollup: {
|
|
927
926
|
enabled: true,
|
|
928
|
-
untrimmedFilePath:
|
|
927
|
+
untrimmedFilePath: _chunkISD3KOJHjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
929
928
|
},
|
|
930
929
|
tsdocMetadata: {
|
|
931
930
|
enabled: false
|
|
932
931
|
}
|
|
933
932
|
},
|
|
934
|
-
packageJsonFullPath:
|
|
933
|
+
packageJsonFullPath: _chunkISD3KOJHjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
935
934
|
configObjectFullPath: void 0
|
|
936
935
|
});
|
|
937
936
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -939,7 +938,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
939
938
|
localBuild: true
|
|
940
939
|
});
|
|
941
940
|
if (extractorResult.succeeded === false) {
|
|
942
|
-
|
|
941
|
+
_chunkISD3KOJHjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
943
942
|
throw new Error("API Extractor completed with errors");
|
|
944
943
|
}
|
|
945
944
|
}
|
|
@@ -952,18 +951,18 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
|
|
|
952
951
|
}
|
|
953
952
|
build5.onStart(async () => {
|
|
954
953
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
955
|
-
await
|
|
954
|
+
await _chunkISD3KOJHjs.run.call(void 0, resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
956
955
|
}
|
|
957
956
|
if (resolvedOptions.bundle && resolvedOptions.entryPoints && resolvedOptions.entryPoints.length > 0 && resolvedOptions.entryPoints[0] && resolvedOptions.entryPoints[0].endsWith(".ts")) {
|
|
958
957
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
959
958
|
const typeOutDir = resolvedOptions.outdir;
|
|
960
959
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
961
|
-
const bundlePath =
|
|
960
|
+
const bundlePath = _chunkISD3KOJHjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
962
961
|
let dtsPath;
|
|
963
|
-
if (_fs.existsSync.call(void 0,
|
|
964
|
-
dtsPath =
|
|
965
|
-
} else if (_fs.existsSync.call(void 0,
|
|
966
|
-
dtsPath =
|
|
962
|
+
if (_fs.existsSync.call(void 0, _chunkISD3KOJHjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
963
|
+
dtsPath = _chunkISD3KOJHjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
964
|
+
} else if (_fs.existsSync.call(void 0, _chunkISD3KOJHjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
965
|
+
dtsPath = _chunkISD3KOJHjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
967
966
|
}
|
|
968
967
|
const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
969
968
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -1118,8 +1117,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
1118
1117
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
1119
1118
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
1120
1119
|
});
|
|
1121
|
-
|
|
1122
|
-
|
|
1120
|
+
_chunkISD3KOJHjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
1121
|
+
_chunkISD3KOJHjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
1123
1122
|
if (filteredMissingDeps.length > 0) {
|
|
1124
1123
|
throw new Error(`Missing dependencies detected - please install them:
|
|
1125
1124
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1213,13 +1212,13 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1213
1212
|
if (!workspaceRoot3) {
|
|
1214
1213
|
throw new Error("Cannot find Nx workspace root");
|
|
1215
1214
|
}
|
|
1216
|
-
const config = await
|
|
1217
|
-
|
|
1218
|
-
const stopwatch =
|
|
1215
|
+
const config = await _chunkISD3KOJHjs.getConfig.call(void 0, workspaceRoot3.dir);
|
|
1216
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1217
|
+
const stopwatch = _chunkISD3KOJHjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1219
1218
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1220
1219
|
exitOnError: true
|
|
1221
1220
|
});
|
|
1222
|
-
const projectJsonPath =
|
|
1221
|
+
const projectJsonPath = _chunkISD3KOJHjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1223
1222
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
1224
1223
|
throw new Error("Cannot find project.json configuration");
|
|
1225
1224
|
}
|
|
@@ -1233,7 +1232,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1233
1232
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
1234
1233
|
options.name ??= `${projectName}-${options.format}`;
|
|
1235
1234
|
options.target ??= DEFAULT_TARGET;
|
|
1236
|
-
const packageJsonPath =
|
|
1235
|
+
const packageJsonPath = _chunkISD3KOJHjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1237
1236
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1238
1237
|
throw new Error("Cannot find package.json configuration");
|
|
1239
1238
|
}
|
|
@@ -1258,20 +1257,20 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1258
1257
|
".node"
|
|
1259
1258
|
],
|
|
1260
1259
|
...userOptions,
|
|
1261
|
-
tsconfig:
|
|
1260
|
+
tsconfig: _chunkISD3KOJHjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1262
1261
|
format: options.format || "cjs",
|
|
1263
1262
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1264
1263
|
"./src/index.ts"
|
|
1265
1264
|
], userOptions.emitOnAll),
|
|
1266
|
-
outdir: userOptions.outputPath ||
|
|
1265
|
+
outdir: userOptions.outputPath || _chunkISD3KOJHjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1267
1266
|
plugins: [],
|
|
1268
1267
|
name: userOptions.name || projectName,
|
|
1269
1268
|
projectConfigurations,
|
|
1270
1269
|
projectName,
|
|
1271
1270
|
projectGraph,
|
|
1272
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1271
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkISD3KOJHjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1273
1272
|
minify: userOptions.minify || !userOptions.debug,
|
|
1274
|
-
verbose: userOptions.verbose ||
|
|
1273
|
+
verbose: userOptions.verbose || _chunkISD3KOJHjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1275
1274
|
includeSrc: userOptions.includeSrc === true,
|
|
1276
1275
|
metafile: userOptions.metafile !== false,
|
|
1277
1276
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1307,8 +1306,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1307
1306
|
}, {})
|
|
1308
1307
|
},
|
|
1309
1308
|
inject: [
|
|
1310
|
-
options.format === "cjs" && options.injectShims ?
|
|
1311
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ?
|
|
1309
|
+
options.format === "cjs" && options.injectShims ? _chunkISD3KOJHjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
|
|
1310
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkISD3KOJHjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : "",
|
|
1312
1311
|
..._nullishCoalesce(options.inject, () => ( []))
|
|
1313
1312
|
].filter(Boolean)
|
|
1314
1313
|
};
|
|
@@ -1317,14 +1316,14 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1317
1316
|
return result;
|
|
1318
1317
|
}, "resolveOptions");
|
|
1319
1318
|
async function generatePackageJson(context2) {
|
|
1320
|
-
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1321
|
-
|
|
1322
|
-
const stopwatch =
|
|
1323
|
-
const packageJsonPath =
|
|
1319
|
+
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkISD3KOJHjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
1320
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
1321
|
+
const stopwatch = _chunkISD3KOJHjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1322
|
+
const packageJsonPath = _chunkISD3KOJHjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
1324
1323
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1325
1324
|
throw new Error("Cannot find package.json configuration");
|
|
1326
1325
|
}
|
|
1327
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
1326
|
+
const packageJsonFile = await _promises2.default.readFile(_chunkISD3KOJHjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
|
|
1328
1327
|
let packageJson = JSON.parse(packageJsonFile);
|
|
1329
1328
|
if (!packageJson) {
|
|
1330
1329
|
throw new Error("Cannot find package.json configuration file");
|
|
@@ -1363,7 +1362,7 @@ async function generatePackageJson(context2) {
|
|
|
1363
1362
|
}
|
|
1364
1363
|
return ret;
|
|
1365
1364
|
}, packageJson.exports);
|
|
1366
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1365
|
+
await _devkit.writeJsonFile.call(void 0, _chunkISD3KOJHjs.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
|
|
1367
1366
|
stopwatch();
|
|
1368
1367
|
}
|
|
1369
1368
|
return context2;
|
|
@@ -1389,8 +1388,8 @@ async function generateContext(getOptions) {
|
|
|
1389
1388
|
}
|
|
1390
1389
|
_chunk3GQAWCBQjs.__name.call(void 0, generateContext, "generateContext");
|
|
1391
1390
|
async function executeEsBuild(context2) {
|
|
1392
|
-
|
|
1393
|
-
const stopwatch =
|
|
1391
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
1392
|
+
const stopwatch = _chunkISD3KOJHjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
1394
1393
|
if (process.env.WATCH === "true") {
|
|
1395
1394
|
const ctx = await esbuild2.context(context2.options);
|
|
1396
1395
|
watch(ctx, context2.options);
|
|
@@ -1406,8 +1405,8 @@ async function executeEsBuild(context2) {
|
|
|
1406
1405
|
_chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
1407
1406
|
async function copyBuildAssets(context2) {
|
|
1408
1407
|
if (_optionalChain([context2, 'access', _42 => _42.result, 'optionalAccess', _43 => _43.errors, 'access', _44 => _44.length]) === 0) {
|
|
1409
|
-
|
|
1410
|
-
const stopwatch =
|
|
1408
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
1409
|
+
const stopwatch = _chunkISD3KOJHjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1411
1410
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
1412
1411
|
stopwatch();
|
|
1413
1412
|
}
|
|
@@ -1417,9 +1416,9 @@ _chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
1417
1416
|
async function reportResults(context2) {
|
|
1418
1417
|
if (_optionalChain([context2, 'access', _45 => _45.result, 'optionalAccess', _46 => _46.errors, 'access', _47 => _47.length]) === 0) {
|
|
1419
1418
|
if (context2.result.warnings.length > 0) {
|
|
1420
|
-
|
|
1419
|
+
_chunkISD3KOJHjs.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);
|
|
1421
1420
|
}
|
|
1422
|
-
|
|
1421
|
+
_chunkISD3KOJHjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
1423
1422
|
}
|
|
1424
1423
|
}
|
|
1425
1424
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -1455,8 +1454,8 @@ async function dependencyCheck(options) {
|
|
|
1455
1454
|
_chunk3GQAWCBQjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
1456
1455
|
async function cleanOutputPath(context2) {
|
|
1457
1456
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
1458
|
-
|
|
1459
|
-
const stopwatch =
|
|
1457
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
1458
|
+
const stopwatch = _chunkISD3KOJHjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
|
|
1460
1459
|
await cleanDirectories(context2.options.name, context2.options.outdir, context2.options.config);
|
|
1461
1460
|
stopwatch();
|
|
1462
1461
|
}
|
|
@@ -1464,8 +1463,8 @@ async function cleanOutputPath(context2) {
|
|
|
1464
1463
|
}
|
|
1465
1464
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1466
1465
|
async function build3(options) {
|
|
1467
|
-
|
|
1468
|
-
const stopwatch =
|
|
1466
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1467
|
+
const stopwatch = _chunkISD3KOJHjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1469
1468
|
try {
|
|
1470
1469
|
const opts = Array.isArray(options) ? options : [
|
|
1471
1470
|
options
|
|
@@ -1475,9 +1474,9 @@ async function build3(options) {
|
|
|
1475
1474
|
}
|
|
1476
1475
|
void transduce.async(opts, dependencyCheck);
|
|
1477
1476
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
1478
|
-
|
|
1477
|
+
_chunkISD3KOJHjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1479
1478
|
} catch (error) {
|
|
1480
|
-
|
|
1479
|
+
_chunkISD3KOJHjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1481
1480
|
throw error;
|
|
1482
1481
|
} finally {
|
|
1483
1482
|
stopwatch();
|
|
@@ -1505,9 +1504,9 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1505
1504
|
return context2.rebuild();
|
|
1506
1505
|
});
|
|
1507
1506
|
if (rebuildResult instanceof Error) {
|
|
1508
|
-
|
|
1507
|
+
_chunkISD3KOJHjs.writeError.call(void 0, rebuildResult.message);
|
|
1509
1508
|
}
|
|
1510
|
-
|
|
1509
|
+
_chunkISD3KOJHjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
1511
1510
|
}, 10);
|
|
1512
1511
|
changeWatcher.on("change", fastRebuild);
|
|
1513
1512
|
return void 0;
|
|
@@ -1515,7 +1514,7 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1515
1514
|
|
|
1516
1515
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1517
1516
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1518
|
-
|
|
1517
|
+
_chunkISD3KOJHjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1519
1518
|
if (!_optionalChain([context2, 'access', _48 => _48.projectsConfigurations, 'optionalAccess', _49 => _49.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _50 => _50.projectsConfigurations, 'access', _51 => _51.projects, 'access', _52 => _52[context2.projectName], 'optionalAccess', _53 => _53.root])) {
|
|
1520
1519
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1521
1520
|
}
|
|
@@ -1532,7 +1531,7 @@ async function esbuildExecutorFn(options, context2, config) {
|
|
|
1532
1531
|
};
|
|
1533
1532
|
}
|
|
1534
1533
|
_chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
|
|
1535
|
-
var executor_default6 =
|
|
1534
|
+
var executor_default6 = _chunkISD3KOJHjs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
|
|
1536
1535
|
skipReadingConfig: false,
|
|
1537
1536
|
hooks: {
|
|
1538
1537
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1569,7 +1568,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1569
1568
|
if (!_optionalChain([context2, 'optionalAccess', _62 => _62.projectName]) || !_optionalChain([context2, 'access', _63 => _63.projectsConfigurations, 'optionalAccess', _64 => _64.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1570
1569
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
1571
1570
|
}
|
|
1572
|
-
|
|
1571
|
+
_chunkISD3KOJHjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
1573
1572
|
_sizelimit2.default.call(void 0, [
|
|
1574
1573
|
_file2.default,
|
|
1575
1574
|
_esbuild3.default,
|
|
@@ -1577,14 +1576,14 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1577
1576
|
], {
|
|
1578
1577
|
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _65 => _65.projectsConfigurations, 'access', _66 => _66.projects, 'access', _67 => _67[context2.projectName], 'optionalAccess', _68 => _68.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _69 => _69.projectsConfigurations, 'access', _70 => _70.projects, 'access', _71 => _71[context2.projectName], 'optionalAccess', _72 => _72.root]), () => ( "./")), "src")))
|
|
1579
1578
|
}).then((result) => {
|
|
1580
|
-
|
|
1579
|
+
_chunkISD3KOJHjs.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
1581
1580
|
});
|
|
1582
1581
|
return {
|
|
1583
1582
|
success: true
|
|
1584
1583
|
};
|
|
1585
1584
|
}
|
|
1586
1585
|
_chunk3GQAWCBQjs.__name.call(void 0, sizeLimitExecutorFn, "sizeLimitExecutorFn");
|
|
1587
|
-
var executor_default7 =
|
|
1586
|
+
var executor_default7 = _chunkISD3KOJHjs.withRunExecutor.call(void 0, "Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
|
|
1588
1587
|
skipReadingConfig: false,
|
|
1589
1588
|
hooks: {
|
|
1590
1589
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1640,13 +1639,13 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1640
1639
|
if (!workspaceRoot3) {
|
|
1641
1640
|
throw new Error("Cannot find Nx workspace root");
|
|
1642
1641
|
}
|
|
1643
|
-
const config = await
|
|
1644
|
-
|
|
1645
|
-
const stopwatch =
|
|
1642
|
+
const config = await _chunkISD3KOJHjs.getConfig.call(void 0, workspaceRoot3.dir);
|
|
1643
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1644
|
+
const stopwatch = _chunkISD3KOJHjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1646
1645
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1647
1646
|
exitOnError: true
|
|
1648
1647
|
});
|
|
1649
|
-
const projectJsonPath =
|
|
1648
|
+
const projectJsonPath = _chunkISD3KOJHjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1650
1649
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
1651
1650
|
throw new Error("Cannot find project.json configuration");
|
|
1652
1651
|
}
|
|
@@ -1660,7 +1659,7 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1660
1659
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
|
|
1661
1660
|
options.name ??= `${projectName}-${options.format}`;
|
|
1662
1661
|
options.target ??= DEFAULT_TARGET;
|
|
1663
|
-
const packageJsonPath =
|
|
1662
|
+
const packageJsonPath = _chunkISD3KOJHjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1664
1663
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1665
1664
|
throw new Error("Cannot find package.json configuration");
|
|
1666
1665
|
}
|
|
@@ -1669,20 +1668,20 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1669
1668
|
...options,
|
|
1670
1669
|
config,
|
|
1671
1670
|
...userOptions,
|
|
1672
|
-
tsconfig:
|
|
1671
|
+
tsconfig: _chunkISD3KOJHjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1673
1672
|
format: options.format || "cjs",
|
|
1674
1673
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1675
1674
|
"./src/index.ts"
|
|
1676
1675
|
], userOptions.emitOnAll),
|
|
1677
|
-
outdir: userOptions.outputPath ||
|
|
1676
|
+
outdir: userOptions.outputPath || _chunkISD3KOJHjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1678
1677
|
plugins: [],
|
|
1679
1678
|
name: userOptions.name || projectName,
|
|
1680
1679
|
projectConfigurations,
|
|
1681
1680
|
projectName,
|
|
1682
1681
|
projectGraph,
|
|
1683
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1682
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkISD3KOJHjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1684
1683
|
minify: userOptions.minify || !userOptions.debug,
|
|
1685
|
-
verbose: userOptions.verbose ||
|
|
1684
|
+
verbose: userOptions.verbose || _chunkISD3KOJHjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1686
1685
|
includeSrc: userOptions.includeSrc === true,
|
|
1687
1686
|
metafile: userOptions.metafile !== false,
|
|
1688
1687
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1716,14 +1715,14 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1716
1715
|
return result;
|
|
1717
1716
|
}, "resolveOptions");
|
|
1718
1717
|
async function generatePackageJson2(options) {
|
|
1719
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1720
|
-
|
|
1721
|
-
const stopwatch =
|
|
1722
|
-
const packageJsonPath =
|
|
1718
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkISD3KOJHjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1719
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1720
|
+
const stopwatch = _chunkISD3KOJHjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1721
|
+
const packageJsonPath = _chunkISD3KOJHjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1723
1722
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1724
1723
|
throw new Error("Cannot find package.json configuration");
|
|
1725
1724
|
}
|
|
1726
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
1725
|
+
const packageJsonFile = await _promises2.default.readFile(_chunkISD3KOJHjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
1727
1726
|
if (!packageJsonFile) {
|
|
1728
1727
|
throw new Error("Cannot find package.json configuration file");
|
|
1729
1728
|
}
|
|
@@ -1762,15 +1761,15 @@ async function generatePackageJson2(options) {
|
|
|
1762
1761
|
}
|
|
1763
1762
|
return ret;
|
|
1764
1763
|
}, packageJson.exports);
|
|
1765
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1764
|
+
await _devkit.writeJsonFile.call(void 0, _chunkISD3KOJHjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
1766
1765
|
stopwatch();
|
|
1767
1766
|
}
|
|
1768
1767
|
return options;
|
|
1769
1768
|
}
|
|
1770
1769
|
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson2, "generatePackageJson");
|
|
1771
1770
|
async function executeTSDown(options) {
|
|
1772
|
-
|
|
1773
|
-
const stopwatch =
|
|
1771
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
1772
|
+
const stopwatch = _chunkISD3KOJHjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1774
1773
|
await _tsdown.build.call(void 0, {
|
|
1775
1774
|
...options,
|
|
1776
1775
|
entry: options.entryPoints,
|
|
@@ -1782,21 +1781,21 @@ async function executeTSDown(options) {
|
|
|
1782
1781
|
}
|
|
1783
1782
|
_chunk3GQAWCBQjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
1784
1783
|
async function copyBuildAssets2(options) {
|
|
1785
|
-
|
|
1786
|
-
const stopwatch =
|
|
1784
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
1785
|
+
const stopwatch = _chunkISD3KOJHjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1787
1786
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.sourceRoot, true, false);
|
|
1788
1787
|
stopwatch();
|
|
1789
1788
|
return options;
|
|
1790
1789
|
}
|
|
1791
1790
|
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets2, "copyBuildAssets");
|
|
1792
1791
|
async function reportResults2(options) {
|
|
1793
|
-
|
|
1792
|
+
_chunkISD3KOJHjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
1794
1793
|
}
|
|
1795
1794
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults2, "reportResults");
|
|
1796
1795
|
async function cleanOutputPath2(options) {
|
|
1797
1796
|
if (options.clean !== false && options.outdir) {
|
|
1798
|
-
|
|
1799
|
-
const stopwatch =
|
|
1797
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
|
|
1798
|
+
const stopwatch = _chunkISD3KOJHjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1800
1799
|
await cleanDirectories2(options.name, options.outdir, options.config);
|
|
1801
1800
|
stopwatch();
|
|
1802
1801
|
}
|
|
@@ -1804,8 +1803,8 @@ async function cleanOutputPath2(options) {
|
|
|
1804
1803
|
}
|
|
1805
1804
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath2, "cleanOutputPath");
|
|
1806
1805
|
async function build4(options) {
|
|
1807
|
-
|
|
1808
|
-
const stopwatch =
|
|
1806
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1807
|
+
const stopwatch = _chunkISD3KOJHjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1809
1808
|
try {
|
|
1810
1809
|
const opts = Array.isArray(options) ? options : [
|
|
1811
1810
|
options
|
|
@@ -1823,11 +1822,11 @@ async function build4(options) {
|
|
|
1823
1822
|
await reportResults2(opt);
|
|
1824
1823
|
}));
|
|
1825
1824
|
} else {
|
|
1826
|
-
|
|
1825
|
+
_chunkISD3KOJHjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
1827
1826
|
}
|
|
1828
|
-
|
|
1827
|
+
_chunkISD3KOJHjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1829
1828
|
} catch (error) {
|
|
1830
|
-
|
|
1829
|
+
_chunkISD3KOJHjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1831
1830
|
throw error;
|
|
1832
1831
|
} finally {
|
|
1833
1832
|
stopwatch();
|
|
@@ -1837,7 +1836,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, build4, "build");
|
|
|
1837
1836
|
|
|
1838
1837
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1839
1838
|
async function tsdownExecutorFn(options, context2, config) {
|
|
1840
|
-
|
|
1839
|
+
_chunkISD3KOJHjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
|
|
1841
1840
|
if (!_optionalChain([context2, 'access', _75 => _75.projectsConfigurations, 'optionalAccess', _76 => _76.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _77 => _77.projectsConfigurations, 'access', _78 => _78.projects, 'access', _79 => _79[context2.projectName], 'optionalAccess', _80 => _80.root])) {
|
|
1842
1841
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1843
1842
|
}
|
|
@@ -1854,7 +1853,7 @@ async function tsdownExecutorFn(options, context2, config) {
|
|
|
1854
1853
|
};
|
|
1855
1854
|
}
|
|
1856
1855
|
_chunk3GQAWCBQjs.__name.call(void 0, tsdownExecutorFn, "tsdownExecutorFn");
|
|
1857
|
-
var executor_default8 =
|
|
1856
|
+
var executor_default8 = _chunkISD3KOJHjs.withRunExecutor.call(void 0, "Storm TSDown build executor", tsdownExecutorFn, {
|
|
1858
1857
|
skipReadingConfig: false,
|
|
1859
1858
|
hooks: {
|
|
1860
1859
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1873,11 +1872,11 @@ var _fsextra = require('fs-extra');
|
|
|
1873
1872
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1874
1873
|
async function typiaExecutorFn(options, _, config) {
|
|
1875
1874
|
if (options.clean !== false) {
|
|
1876
|
-
|
|
1875
|
+
_chunkISD3KOJHjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1877
1876
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1878
1877
|
}
|
|
1879
1878
|
await Promise.all(options.entry.map((entry) => {
|
|
1880
|
-
|
|
1879
|
+
_chunkISD3KOJHjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1881
1880
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1882
1881
|
input: entry,
|
|
1883
1882
|
output: options.outputPath,
|
|
@@ -1889,7 +1888,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
1889
1888
|
};
|
|
1890
1889
|
}
|
|
1891
1890
|
_chunk3GQAWCBQjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
|
|
1892
|
-
var executor_default9 =
|
|
1891
|
+
var executor_default9 = _chunkISD3KOJHjs.withRunExecutor.call(void 0, "Typia runtime validation generator", typiaExecutorFn, {
|
|
1893
1892
|
skipReadingConfig: false,
|
|
1894
1893
|
hooks: {
|
|
1895
1894
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1908,7 +1907,7 @@ var executor_default9 = _chunkKWC4B2IBjs.withRunExecutor.call(void 0, "Typia run
|
|
|
1908
1907
|
|
|
1909
1908
|
var _jiti = require('jiti');
|
|
1910
1909
|
async function unbuildExecutorFn(options, context2, config) {
|
|
1911
|
-
|
|
1910
|
+
_chunkISD3KOJHjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1912
1911
|
if (!_optionalChain([context2, 'access', _89 => _89.projectsConfigurations, 'optionalAccess', _90 => _90.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1913
1912
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
1914
1913
|
}
|
|
@@ -1919,7 +1918,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1919
1918
|
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.");
|
|
1920
1919
|
}
|
|
1921
1920
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1922
|
-
fsCache: config.skipCache ? false :
|
|
1921
|
+
fsCache: config.skipCache ? false : _chunkISD3KOJHjs.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
1923
1922
|
interopDefault: true
|
|
1924
1923
|
});
|
|
1925
1924
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
@@ -1932,7 +1931,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1932
1931
|
}, {
|
|
1933
1932
|
stubOptions: {
|
|
1934
1933
|
jiti: {
|
|
1935
|
-
fsCache: config.skipCache ? false :
|
|
1934
|
+
fsCache: config.skipCache ? false : _chunkISD3KOJHjs.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
|
|
1936
1935
|
}
|
|
1937
1936
|
},
|
|
1938
1937
|
rollup: {
|
|
@@ -1956,7 +1955,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1956
1955
|
};
|
|
1957
1956
|
}
|
|
1958
1957
|
_chunk3GQAWCBQjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
|
|
1959
|
-
var executor_default10 =
|
|
1958
|
+
var executor_default10 = _chunkISD3KOJHjs.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
|
|
1960
1959
|
skipReadingConfig: false,
|
|
1961
1960
|
hooks: {
|
|
1962
1961
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1979,34 +1978,34 @@ var executor_default10 = _chunkKWC4B2IBjs.withRunExecutor.call(void 0, "TypeScri
|
|
|
1979
1978
|
var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
1980
1979
|
skipReadingConfig: false
|
|
1981
1980
|
}) => async (tree, _options) => {
|
|
1982
|
-
const stopwatch =
|
|
1981
|
+
const stopwatch = _chunkISD3KOJHjs.getStopwatch.call(void 0, name);
|
|
1983
1982
|
let options = _options;
|
|
1984
1983
|
let config;
|
|
1985
1984
|
try {
|
|
1986
|
-
|
|
1985
|
+
_chunkISD3KOJHjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
1987
1986
|
|
|
1988
1987
|
`, config);
|
|
1989
|
-
const workspaceRoot3 =
|
|
1988
|
+
const workspaceRoot3 = _chunkISD3KOJHjs.findWorkspaceRoot.call(void 0, );
|
|
1990
1989
|
if (!generatorOptions.skipReadingConfig) {
|
|
1991
|
-
|
|
1990
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
1992
1991
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
1993
|
-
config = await
|
|
1992
|
+
config = await _chunkISD3KOJHjs.getConfig.call(void 0, workspaceRoot3);
|
|
1994
1993
|
}
|
|
1995
1994
|
if (_optionalChain([generatorOptions, 'optionalAccess', _91 => _91.hooks, 'optionalAccess', _92 => _92.applyDefaultOptions])) {
|
|
1996
|
-
|
|
1995
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1997
1996
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
1998
|
-
|
|
1997
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1999
1998
|
}
|
|
2000
|
-
|
|
1999
|
+
_chunkISD3KOJHjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
|
|
2001
2000
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
|
|
2002
|
-
const tokenized = await
|
|
2001
|
+
const tokenized = await _chunkISD3KOJHjs.applyWorkspaceTokens.call(void 0, options, {
|
|
2003
2002
|
workspaceRoot: tree.root,
|
|
2004
2003
|
config
|
|
2005
|
-
},
|
|
2004
|
+
}, _chunkISD3KOJHjs.applyWorkspaceBaseTokens);
|
|
2006
2005
|
if (_optionalChain([generatorOptions, 'optionalAccess', _93 => _93.hooks, 'optionalAccess', _94 => _94.preProcess])) {
|
|
2007
|
-
|
|
2006
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
2008
2007
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
2009
|
-
|
|
2008
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
2010
2009
|
}
|
|
2011
2010
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
2012
2011
|
if (result) {
|
|
@@ -2019,18 +2018,18 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
2019
2018
|
}
|
|
2020
2019
|
}
|
|
2021
2020
|
if (_optionalChain([generatorOptions, 'optionalAccess', _104 => _104.hooks, 'optionalAccess', _105 => _105.postProcess])) {
|
|
2022
|
-
|
|
2021
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
2023
2022
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
2024
|
-
|
|
2023
|
+
_chunkISD3KOJHjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
2025
2024
|
}
|
|
2026
2025
|
return () => {
|
|
2027
|
-
|
|
2026
|
+
_chunkISD3KOJHjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
2028
2027
|
`, config);
|
|
2029
2028
|
};
|
|
2030
2029
|
} catch (error) {
|
|
2031
2030
|
return () => {
|
|
2032
|
-
|
|
2033
|
-
|
|
2031
|
+
_chunkISD3KOJHjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
2032
|
+
_chunkISD3KOJHjs.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
2034
2033
|
- Details: ${error.message}
|
|
2035
2034
|
- Stacktrace: ${error.stack}`, config);
|
|
2036
2035
|
};
|
|
@@ -2132,7 +2131,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2132
2131
|
const projectConfig = {
|
|
2133
2132
|
root: normalized.directory,
|
|
2134
2133
|
projectType: "library",
|
|
2135
|
-
sourceRoot:
|
|
2134
|
+
sourceRoot: _chunkISD3KOJHjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
2136
2135
|
targets: {
|
|
2137
2136
|
build: {
|
|
2138
2137
|
executor: options.buildExecutor,
|
|
@@ -2141,11 +2140,11 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2141
2140
|
],
|
|
2142
2141
|
options: {
|
|
2143
2142
|
entry: [
|
|
2144
|
-
|
|
2143
|
+
_chunkISD3KOJHjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")
|
|
2145
2144
|
],
|
|
2146
2145
|
outputPath: getOutputPath(normalized),
|
|
2147
|
-
tsconfig:
|
|
2148
|
-
project:
|
|
2146
|
+
tsconfig: _chunkISD3KOJHjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
2147
|
+
project: _chunkISD3KOJHjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
2149
2148
|
defaultConfiguration: "production",
|
|
2150
2149
|
platform: "neutral",
|
|
2151
2150
|
assets: [
|
|
@@ -2199,7 +2198,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2199
2198
|
if (!normalized.importPath) {
|
|
2200
2199
|
normalized.importPath = normalized.name;
|
|
2201
2200
|
}
|
|
2202
|
-
const packageJsonPath =
|
|
2201
|
+
const packageJsonPath = _chunkISD3KOJHjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
2203
2202
|
if (tree.exists(packageJsonPath)) {
|
|
2204
2203
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2205
2204
|
if (!normalized.importPath) {
|
|
@@ -2256,10 +2255,10 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2256
2255
|
}));
|
|
2257
2256
|
}
|
|
2258
2257
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
2259
|
-
|
|
2258
|
+
_chunkISD3KOJHjs.joinPaths.call(void 0, normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
|
|
2260
2259
|
]);
|
|
2261
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2262
|
-
|
|
2260
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkISD3KOJHjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
2261
|
+
_chunkISD3KOJHjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
2263
2262
|
]);
|
|
2264
2263
|
if (tree.exists("package.json")) {
|
|
2265
2264
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2270,7 +2269,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2270
2269
|
description = packageJson.description;
|
|
2271
2270
|
}
|
|
2272
2271
|
}
|
|
2273
|
-
const tsconfigPath =
|
|
2272
|
+
const tsconfigPath = _chunkISD3KOJHjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
2274
2273
|
if (tree.exists(tsconfigPath)) {
|
|
2275
2274
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2276
2275
|
json.composite ??= true;
|
|
@@ -2308,7 +2307,7 @@ function getOutputPath(options) {
|
|
|
2308
2307
|
} else {
|
|
2309
2308
|
parts.push(options.projectRoot);
|
|
2310
2309
|
}
|
|
2311
|
-
return
|
|
2310
|
+
return _chunkISD3KOJHjs.joinPaths.call(void 0, ...parts);
|
|
2312
2311
|
}
|
|
2313
2312
|
_chunk3GQAWCBQjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
2314
2313
|
function createProjectTsConfigJson(tree, options) {
|
|
@@ -2317,7 +2316,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2317
2316
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _117 => _117.tsconfigOptions]), () => ( {})),
|
|
2318
2317
|
compilerOptions: {
|
|
2319
2318
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2320
|
-
outDir:
|
|
2319
|
+
outDir: _chunkISD3KOJHjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2321
2320
|
noEmit: true,
|
|
2322
2321
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _118 => _118.tsconfigOptions, 'optionalAccess', _119 => _119.compilerOptions]), () => ( {}))
|
|
2323
2322
|
},
|
|
@@ -2337,7 +2336,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2337
2336
|
"src/**/*.test.ts"
|
|
2338
2337
|
]
|
|
2339
2338
|
};
|
|
2340
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2339
|
+
_devkit.writeJson.call(void 0, tree, _chunkISD3KOJHjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2341
2340
|
}
|
|
2342
2341
|
_chunk3GQAWCBQjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2343
2342
|
async function normalizeOptions(tree, options, config) {
|
|
@@ -2397,7 +2396,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, normalizeOptions, "normalizeOptions");
|
|
|
2397
2396
|
|
|
2398
2397
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2399
2398
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
2400
|
-
const filesDir =
|
|
2399
|
+
const filesDir = _chunkISD3KOJHjs.joinPaths.call(void 0, __dirname, "src", "generators", "browser-library", "files");
|
|
2401
2400
|
const tsLibraryGeneratorOptions = {
|
|
2402
2401
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
2403
2402
|
platform: "browser",
|
|
@@ -2469,19 +2468,19 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
2469
2468
|
|
|
2470
2469
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
2471
2470
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0,
|
|
2471
|
+
_chunkISD3KOJHjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
|
|
2472
|
+
_chunkISD3KOJHjs.writeTrace.call(void 0, `Determining the Storm Workspace Configuration JSON Schema...`, config);
|
|
2473
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkISD3KOJHjs.StormConfigSchema, {
|
|
2475
2474
|
name: "StormWorkspaceConfiguration"
|
|
2476
2475
|
});
|
|
2477
|
-
|
|
2478
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _128 => _128.workspaceRoot]), () => (
|
|
2479
|
-
|
|
2476
|
+
_chunkISD3KOJHjs.writeTrace.call(void 0, jsonSchema, config);
|
|
2477
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _128 => _128.workspaceRoot]), () => ( _chunkISD3KOJHjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _129 => _129.outputFile, 'optionalAccess', _130 => _130.startsWith, 'call', _131 => _131("./")]) ? "" : "./");
|
|
2478
|
+
_chunkISD3KOJHjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
2480
2479
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
2481
2480
|
spaces: 2
|
|
2482
2481
|
});
|
|
2483
2482
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2484
|
-
|
|
2483
|
+
_chunkISD3KOJHjs.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
|
|
2485
2484
|
return {
|
|
2486
2485
|
success: true
|
|
2487
2486
|
};
|
|
@@ -2520,7 +2519,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, initGenerator, "initGenerator");
|
|
|
2520
2519
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
2521
2520
|
|
|
2522
2521
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
2523
|
-
const filesDir =
|
|
2522
|
+
const filesDir = _chunkISD3KOJHjs.joinPaths.call(void 0, __dirname, "src", "generators", "neutral-library", "files");
|
|
2524
2523
|
const tsLibraryGeneratorOptions = {
|
|
2525
2524
|
...schema,
|
|
2526
2525
|
platform: "neutral",
|
|
@@ -2563,7 +2562,7 @@ var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral P
|
|
|
2563
2562
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
2564
2563
|
|
|
2565
2564
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
2566
|
-
const filesDir =
|
|
2565
|
+
const filesDir = _chunkISD3KOJHjs.joinPaths.call(void 0, __dirname, "src", "generators", "node-library", "files");
|
|
2567
2566
|
const tsLibraryGeneratorOptions = {
|
|
2568
2567
|
platform: "node",
|
|
2569
2568
|
devDependencies: {
|
|
@@ -2661,14 +2660,14 @@ async function presetGeneratorFn(tree, options) {
|
|
|
2661
2660
|
};
|
|
2662
2661
|
json.maintainers ??= [
|
|
2663
2662
|
{
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2663
|
+
name: "Storm Software",
|
|
2664
|
+
email: "contact@stormsoftware.com",
|
|
2665
|
+
url: "https://stormsoftware.com"
|
|
2667
2666
|
},
|
|
2668
2667
|
{
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2668
|
+
name: "Pat Sullivan",
|
|
2669
|
+
email: "admin@stormsoftware.com",
|
|
2670
|
+
url: "https://patsullivan.org"
|
|
2672
2671
|
}
|
|
2673
2672
|
];
|
|
2674
2673
|
json.funding ??= {
|
|
@@ -2684,12 +2683,12 @@ async function presetGeneratorFn(tree, options) {
|
|
|
2684
2683
|
};
|
|
2685
2684
|
json.packageManager ??= "pnpm@9.15.2";
|
|
2686
2685
|
json.engines ??= {
|
|
2687
|
-
|
|
2688
|
-
|
|
2686
|
+
node: ">=20.11.0",
|
|
2687
|
+
pnpm: ">=9.15.2"
|
|
2689
2688
|
};
|
|
2690
2689
|
json.prettier = "@storm-software/prettier/config.json";
|
|
2691
2690
|
json.nx ??= {
|
|
2692
|
-
|
|
2691
|
+
includedScripts: [
|
|
2693
2692
|
"lint-sherif",
|
|
2694
2693
|
"lint-knip",
|
|
2695
2694
|
"lint-ls",
|
|
@@ -2783,22 +2782,22 @@ async function presetGeneratorFn(tree, options) {
|
|
|
2783
2782
|
"@storm-software/prettier": "latest",
|
|
2784
2783
|
"@taplo/cli": "0.7.0",
|
|
2785
2784
|
"@types/node": "^20.14.10",
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2785
|
+
copyfiles: "2.4.1",
|
|
2786
|
+
eslint: "9.5.0",
|
|
2787
|
+
jest: "29.7.0",
|
|
2789
2788
|
"jest-environment-node": "29.7.0",
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2789
|
+
knip: "5.25.2",
|
|
2790
|
+
lefthook: "1.6.18",
|
|
2791
|
+
nx: "^20.2.2",
|
|
2792
|
+
prettier: "3.3.2",
|
|
2794
2793
|
"prettier-plugin-prisma": "5.0.0",
|
|
2795
|
-
|
|
2796
|
-
|
|
2794
|
+
rimraf: "5.0.7",
|
|
2795
|
+
sherif: "0.10.0",
|
|
2797
2796
|
"ts-jest": "29.1.5",
|
|
2798
2797
|
"ts-node": "10.9.2",
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2798
|
+
tslib: "2.6.3",
|
|
2799
|
+
typescript: "5.5.3",
|
|
2800
|
+
verdaccio: "5.31.1"
|
|
2802
2801
|
};
|
|
2803
2802
|
if (options.includeApps) {
|
|
2804
2803
|
dependencies = {
|