@storm-software/terraform-tools 0.53.0 → 0.53.1
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 +11 -0
- package/README.md +1 -1
- package/dist/{chunk-NMB6NAZ4.mjs → chunk-42WVFPO6.mjs} +17 -17
- package/dist/{chunk-CJ2BQVRU.js → chunk-6D4LV6X2.js} +3 -3
- package/dist/{chunk-XEE74WQC.mjs → chunk-D6CRGFE3.mjs} +1 -1
- package/dist/{chunk-G32UYXGQ.mjs → chunk-EMIZUK4F.mjs} +1 -1
- package/dist/{chunk-FULLEJHI.js → chunk-FLEOXRFA.js} +2 -2
- package/dist/{chunk-B6ANLUY3.js → chunk-GEMICIUF.js} +2 -2
- package/dist/{chunk-D2YGB72L.mjs → chunk-IMGISWCA.mjs} +1 -1
- package/dist/{chunk-EFLSH2FU.js → chunk-JEBWKJI3.js} +2 -2
- package/dist/{chunk-3O6YOFSC.mjs → chunk-KBT4UFBN.mjs} +1 -1
- package/dist/{chunk-YT7RFZEY.js → chunk-MJMNVCOX.js} +2 -2
- package/dist/{chunk-BW5TMV3C.js → chunk-TQAFH5OJ.js} +33 -33
- package/dist/{chunk-3HOUHXFA.js → chunk-WGRRG2DY.js} +177 -177
- package/dist/{chunk-QTJWW3IT.mjs → chunk-ZOKR7XCK.mjs} +14 -14
- package/dist/{chunk-E6E5A5MU.mjs → chunk-ZTLSR2U3.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 +2 -2
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkTQAFH5OJjs = require('./chunk-TQAFH5OJ.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 = _chunkTQAFH5OJjs.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 = _chunkTQAFH5OJjs.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 = _chunkTQAFH5OJjs.withRunExecutor.call(void 0, "Cargo Clippy", cargoClippyExecutor, {
|
|
195
195
|
skipReadingConfig: false,
|
|
196
196
|
hooks: {
|
|
197
197
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -212,7 +212,7 @@ async function cargoDocExecutor(options, context2) {
|
|
|
212
212
|
return await cargoCommand(...command);
|
|
213
213
|
}
|
|
214
214
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoDocExecutor, "cargoDocExecutor");
|
|
215
|
-
var executor_default4 =
|
|
215
|
+
var executor_default4 = _chunkTQAFH5OJjs.withRunExecutor.call(void 0, "Cargo Doc", cargoDocExecutor, {
|
|
216
216
|
skipReadingConfig: false,
|
|
217
217
|
hooks: {
|
|
218
218
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -235,7 +235,7 @@ async function cargoFormatExecutor(options, context2) {
|
|
|
235
235
|
return await cargoCommand(...command);
|
|
236
236
|
}
|
|
237
237
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoFormatExecutor, "cargoFormatExecutor");
|
|
238
|
-
var executor_default5 =
|
|
238
|
+
var executor_default5 = _chunkTQAFH5OJjs.withRunExecutor.call(void 0, "Cargo Format", cargoFormatExecutor, {
|
|
239
239
|
skipReadingConfig: false,
|
|
240
240
|
hooks: {
|
|
241
241
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -299,10 +299,10 @@ var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(
|
|
|
299
299
|
var readNxConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot3) => {
|
|
300
300
|
let rootDir = workspaceRoot3;
|
|
301
301
|
if (!rootDir) {
|
|
302
|
-
const config = await
|
|
302
|
+
const config = await _chunkTQAFH5OJjs.loadStormConfig.call(void 0, );
|
|
303
303
|
rootDir = config.workspaceRoot;
|
|
304
304
|
}
|
|
305
|
-
const nxJsonPath =
|
|
305
|
+
const nxJsonPath = _chunkTQAFH5OJjs.joinPaths.call(void 0, rootDir, "nx.json");
|
|
306
306
|
if (!_fs.existsSync.call(void 0, nxJsonPath)) {
|
|
307
307
|
throw new Error("Cannot find project.json configuration");
|
|
308
308
|
}
|
|
@@ -345,7 +345,7 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
345
345
|
}
|
|
346
346
|
const buildTarget = _optionalChain([projectsConfigurations, 'access', _7 => _7.projects, 'access', _8 => _8[projectName], 'access', _9 => _9.targets, 'optionalAccess', _10 => _10.build]);
|
|
347
347
|
if (!buildTarget) {
|
|
348
|
-
throw new Error(`The Build process failed because the project does not have a valid build target in the project.json file. Check if the file exists in the root of the project at ${
|
|
348
|
+
throw new Error(`The Build process failed because the project does not have a valid build target in the project.json file. Check if the file exists in the root of the project at ${_chunkTQAFH5OJjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
|
|
349
349
|
}
|
|
350
350
|
const result = await _js.copyAssets.call(void 0, {
|
|
351
351
|
assets,
|
|
@@ -360,18 +360,18 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
360
360
|
projectsConfigurations,
|
|
361
361
|
nxJsonConfiguration: nxJson,
|
|
362
362
|
cwd: config.workspaceRoot,
|
|
363
|
-
isVerbose:
|
|
363
|
+
isVerbose: _chunkTQAFH5OJjs.isVerbose.call(void 0, config.logLevel)
|
|
364
364
|
});
|
|
365
365
|
if (!result.success) {
|
|
366
366
|
throw new Error("The Build process failed trying to copy assets");
|
|
367
367
|
}
|
|
368
368
|
if (includeSrc === true) {
|
|
369
|
-
|
|
369
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkTQAFH5OJjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
370
370
|
const files = await _glob.glob.call(void 0, [
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
371
|
+
_chunkTQAFH5OJjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
372
|
+
_chunkTQAFH5OJjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
373
|
+
_chunkTQAFH5OJjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
374
|
+
_chunkTQAFH5OJjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
375
375
|
]);
|
|
376
376
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
377
377
|
|
|
@@ -393,7 +393,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
393
393
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
|
|
394
394
|
const projectNode = project.node;
|
|
395
395
|
if (projectNode.data.root) {
|
|
396
|
-
const projectPackageJsonPath =
|
|
396
|
+
const projectPackageJsonPath = _chunkTQAFH5OJjs.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
|
|
397
397
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
398
398
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
399
399
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -404,7 +404,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
if (localPackages.length > 0) {
|
|
407
|
-
|
|
407
|
+
_chunkTQAFH5OJjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
408
408
|
packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
|
|
409
409
|
if (!ret[localPackage.name]) {
|
|
410
410
|
ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
|
|
@@ -426,13 +426,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
426
426
|
return ret;
|
|
427
427
|
}, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
|
|
428
428
|
} else {
|
|
429
|
-
|
|
429
|
+
_chunkTQAFH5OJjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
430
430
|
}
|
|
431
431
|
return packageJson;
|
|
432
432
|
}, "addPackageDependencies");
|
|
433
433
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
434
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
435
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
434
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkTQAFH5OJjs.findWorkspaceRoot.call(void 0, );
|
|
435
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkTQAFH5OJjs.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
436
436
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
437
437
|
packageJson.type ??= "module";
|
|
438
438
|
packageJson.sideEffects ??= false;
|
|
@@ -441,7 +441,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
441
441
|
if (distSrc.startsWith("/")) {
|
|
442
442
|
distSrc = distSrc.substring(1);
|
|
443
443
|
}
|
|
444
|
-
packageJson.source ??= `${
|
|
444
|
+
packageJson.source ??= `${_chunkTQAFH5OJjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
445
445
|
}
|
|
446
446
|
packageJson.files ??= [
|
|
447
447
|
"dist/**/*"
|
|
@@ -472,7 +472,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
472
472
|
];
|
|
473
473
|
}
|
|
474
474
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
475
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
475
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkTQAFH5OJjs.joinPaths.call(void 0, "packages", projectName);
|
|
476
476
|
return packageJson;
|
|
477
477
|
}, "addWorkspacePackageJsonFields");
|
|
478
478
|
var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
@@ -499,7 +499,7 @@ var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
499
499
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
500
500
|
|
|
501
501
|
var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
502
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
502
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkTQAFH5OJjs.findWorkspaceRoot.call(void 0, );
|
|
503
503
|
const entryPoints = [];
|
|
504
504
|
if (entry) {
|
|
505
505
|
if (Array.isArray(entry)) {
|
|
@@ -511,7 +511,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
513
|
if (emitOnAll) {
|
|
514
|
-
entryPoints.push(
|
|
514
|
+
entryPoints.push(_chunkTQAFH5OJjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
515
515
|
}
|
|
516
516
|
const results = [];
|
|
517
517
|
for (const entryPoint in entryPoints) {
|
|
@@ -520,9 +520,9 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
520
520
|
withFileTypes: true
|
|
521
521
|
});
|
|
522
522
|
results.push(...files.reduce((ret, filePath) => {
|
|
523
|
-
const result =
|
|
523
|
+
const result = _chunkTQAFH5OJjs.correctPaths.call(void 0, _chunkTQAFH5OJjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkTQAFH5OJjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkTQAFH5OJjs.correctPaths.call(void 0, projectRoot), ""));
|
|
524
524
|
if (result) {
|
|
525
|
-
|
|
525
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkTQAFH5OJjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
526
526
|
if (!results.includes(result)) {
|
|
527
527
|
results.push(result);
|
|
528
528
|
}
|
|
@@ -728,8 +728,8 @@ var RendererEngine = class {
|
|
|
728
728
|
// ../esbuild/src/clean.ts
|
|
729
729
|
|
|
730
730
|
async function clean(name = "ESBuild", directory, config) {
|
|
731
|
-
|
|
732
|
-
const stopwatch =
|
|
731
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
732
|
+
const stopwatch = _chunkTQAFH5OJjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
733
733
|
await _node.hfs.deleteAll(directory);
|
|
734
734
|
stopwatch();
|
|
735
735
|
}
|
|
@@ -850,7 +850,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
|
|
|
850
850
|
setup(build5) {
|
|
851
851
|
build5.onEnd((result) => {
|
|
852
852
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
853
|
-
|
|
853
|
+
_chunkTQAFH5OJjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
854
854
|
${result.errors.map((error) => error.text).join("\n")}
|
|
855
855
|
|
|
856
856
|
`, resolvedOptions.config);
|
|
@@ -885,7 +885,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
|
885
885
|
var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
886
886
|
name: "storm:resolve-paths",
|
|
887
887
|
setup(build5) {
|
|
888
|
-
const parentTsConfig = build5.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0,
|
|
888
|
+
const parentTsConfig = build5.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0, _chunkTQAFH5OJjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build5.initialOptions.tsconfig)) : _chunk3GQAWCBQjs.__require.call(void 0, _chunkTQAFH5OJjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
889
889
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
890
890
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
891
891
|
build5.onResolve({
|
|
@@ -908,7 +908,7 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (o
|
|
|
908
908
|
|
|
909
909
|
var _apiextractor = require('@microsoft/api-extractor');
|
|
910
910
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
911
|
-
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0,
|
|
911
|
+
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0, _chunkTQAFH5OJjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
912
912
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
913
913
|
p,
|
|
914
914
|
getTypeDependencyPackageName(p)
|
|
@@ -944,13 +944,13 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
944
944
|
},
|
|
945
945
|
dtsRollup: {
|
|
946
946
|
enabled: true,
|
|
947
|
-
untrimmedFilePath:
|
|
947
|
+
untrimmedFilePath: _chunkTQAFH5OJjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
948
948
|
},
|
|
949
949
|
tsdocMetadata: {
|
|
950
950
|
enabled: false
|
|
951
951
|
}
|
|
952
952
|
},
|
|
953
|
-
packageJsonFullPath:
|
|
953
|
+
packageJsonFullPath: _chunkTQAFH5OJjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
954
954
|
configObjectFullPath: void 0
|
|
955
955
|
});
|
|
956
956
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -958,7 +958,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
958
958
|
localBuild: true
|
|
959
959
|
});
|
|
960
960
|
if (extractorResult.succeeded === false) {
|
|
961
|
-
|
|
961
|
+
_chunkTQAFH5OJjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
962
962
|
throw new Error("API Extractor completed with errors");
|
|
963
963
|
}
|
|
964
964
|
}
|
|
@@ -971,18 +971,18 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
|
|
|
971
971
|
}
|
|
972
972
|
build5.onStart(async () => {
|
|
973
973
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
974
|
-
await
|
|
974
|
+
await _chunkTQAFH5OJjs.run.call(void 0, resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
975
975
|
}
|
|
976
976
|
if (resolvedOptions.bundle && resolvedOptions.entryPoints && resolvedOptions.entryPoints.length > 0 && resolvedOptions.entryPoints[0] && resolvedOptions.entryPoints[0].endsWith(".ts")) {
|
|
977
977
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
978
978
|
const typeOutDir = resolvedOptions.outdir;
|
|
979
979
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
980
|
-
const bundlePath =
|
|
980
|
+
const bundlePath = _chunkTQAFH5OJjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
981
981
|
let dtsPath;
|
|
982
|
-
if (await _node.hfs.isFile(
|
|
983
|
-
dtsPath =
|
|
984
|
-
} else if (await _node.hfs.isFile(
|
|
985
|
-
dtsPath =
|
|
982
|
+
if (await _node.hfs.isFile(_chunkTQAFH5OJjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
983
|
+
dtsPath = _chunkTQAFH5OJjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
984
|
+
} else if (await _node.hfs.isFile(_chunkTQAFH5OJjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
985
|
+
dtsPath = _chunkTQAFH5OJjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
986
986
|
}
|
|
987
987
|
const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
988
988
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -1137,8 +1137,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
1137
1137
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
1138
1138
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
1139
1139
|
});
|
|
1140
|
-
|
|
1141
|
-
|
|
1140
|
+
_chunkTQAFH5OJjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
1141
|
+
_chunkTQAFH5OJjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
1142
1142
|
if (filteredMissingDeps.length > 0) {
|
|
1143
1143
|
throw new Error(`Missing dependencies detected - please install them:
|
|
1144
1144
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1232,13 +1232,13 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1232
1232
|
if (!workspaceRoot3) {
|
|
1233
1233
|
throw new Error("Cannot find Nx workspace root");
|
|
1234
1234
|
}
|
|
1235
|
-
const config = await
|
|
1236
|
-
|
|
1237
|
-
const stopwatch =
|
|
1235
|
+
const config = await _chunkTQAFH5OJjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
|
|
1236
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1237
|
+
const stopwatch = _chunkTQAFH5OJjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1238
1238
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1239
1239
|
exitOnError: true
|
|
1240
1240
|
});
|
|
1241
|
-
const projectJsonPath =
|
|
1241
|
+
const projectJsonPath = _chunkTQAFH5OJjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1242
1242
|
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
1243
1243
|
throw new Error("Cannot find project.json configuration");
|
|
1244
1244
|
}
|
|
@@ -1251,7 +1251,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1251
1251
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
1252
1252
|
options.name ??= `${projectName}-${options.format}`;
|
|
1253
1253
|
options.target ??= DEFAULT_TARGET;
|
|
1254
|
-
const packageJsonPath =
|
|
1254
|
+
const packageJsonPath = _chunkTQAFH5OJjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1255
1255
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1256
1256
|
throw new Error("Cannot find package.json configuration");
|
|
1257
1257
|
}
|
|
@@ -1275,20 +1275,20 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1275
1275
|
".node"
|
|
1276
1276
|
],
|
|
1277
1277
|
...userOptions,
|
|
1278
|
-
tsconfig:
|
|
1278
|
+
tsconfig: _chunkTQAFH5OJjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1279
1279
|
format: options.format || "cjs",
|
|
1280
1280
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1281
1281
|
"./src/index.ts"
|
|
1282
1282
|
], userOptions.emitOnAll),
|
|
1283
|
-
outdir: userOptions.outputPath ||
|
|
1283
|
+
outdir: userOptions.outputPath || _chunkTQAFH5OJjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1284
1284
|
plugins: [],
|
|
1285
1285
|
name: userOptions.name || projectName,
|
|
1286
1286
|
projectConfigurations,
|
|
1287
1287
|
projectName,
|
|
1288
1288
|
projectGraph,
|
|
1289
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1289
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkTQAFH5OJjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1290
1290
|
minify: userOptions.minify || !userOptions.debug,
|
|
1291
|
-
verbose: userOptions.verbose ||
|
|
1291
|
+
verbose: userOptions.verbose || _chunkTQAFH5OJjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1292
1292
|
includeSrc: userOptions.includeSrc === true,
|
|
1293
1293
|
metafile: userOptions.metafile !== false,
|
|
1294
1294
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1324,8 +1324,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1324
1324
|
}, {})
|
|
1325
1325
|
},
|
|
1326
1326
|
inject: [
|
|
1327
|
-
options.format === "cjs" && options.injectShims ?
|
|
1328
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ?
|
|
1327
|
+
options.format === "cjs" && options.injectShims ? _chunkTQAFH5OJjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
|
|
1328
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkTQAFH5OJjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : "",
|
|
1329
1329
|
..._nullishCoalesce(options.inject, () => ( []))
|
|
1330
1330
|
].filter(Boolean)
|
|
1331
1331
|
};
|
|
@@ -1334,14 +1334,14 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1334
1334
|
return result;
|
|
1335
1335
|
}, "resolveOptions");
|
|
1336
1336
|
async function generatePackageJson(context2) {
|
|
1337
|
-
if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(
|
|
1338
|
-
|
|
1339
|
-
const stopwatch =
|
|
1340
|
-
const packageJsonPath =
|
|
1337
|
+
if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(_chunkTQAFH5OJjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
1338
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
1339
|
+
const stopwatch = _chunkTQAFH5OJjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1340
|
+
const packageJsonPath = _chunkTQAFH5OJjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
1341
1341
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1342
1342
|
throw new Error("Cannot find package.json configuration");
|
|
1343
1343
|
}
|
|
1344
|
-
let packageJson = await _node.hfs.json(
|
|
1344
|
+
let packageJson = await _node.hfs.json(_chunkTQAFH5OJjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"));
|
|
1345
1345
|
if (!packageJson) {
|
|
1346
1346
|
throw new Error("Cannot find package.json configuration file");
|
|
1347
1347
|
}
|
|
@@ -1379,7 +1379,7 @@ async function generatePackageJson(context2) {
|
|
|
1379
1379
|
}
|
|
1380
1380
|
return ret;
|
|
1381
1381
|
}, packageJson.exports);
|
|
1382
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1382
|
+
await _devkit.writeJsonFile.call(void 0, _chunkTQAFH5OJjs.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
|
|
1383
1383
|
stopwatch();
|
|
1384
1384
|
}
|
|
1385
1385
|
return context2;
|
|
@@ -1405,8 +1405,8 @@ async function generateContext(getOptions) {
|
|
|
1405
1405
|
}
|
|
1406
1406
|
_chunk3GQAWCBQjs.__name.call(void 0, generateContext, "generateContext");
|
|
1407
1407
|
async function executeEsBuild(context2) {
|
|
1408
|
-
|
|
1409
|
-
const stopwatch =
|
|
1408
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
1409
|
+
const stopwatch = _chunkTQAFH5OJjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
1410
1410
|
if (process.env.WATCH === "true") {
|
|
1411
1411
|
const ctx = await esbuild2.context(context2.options);
|
|
1412
1412
|
watch(ctx, context2.options);
|
|
@@ -1422,8 +1422,8 @@ async function executeEsBuild(context2) {
|
|
|
1422
1422
|
_chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
1423
1423
|
async function copyBuildAssets(context2) {
|
|
1424
1424
|
if (_optionalChain([context2, 'access', _35 => _35.result, 'optionalAccess', _36 => _36.errors, 'access', _37 => _37.length]) === 0) {
|
|
1425
|
-
|
|
1426
|
-
const stopwatch =
|
|
1425
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
1426
|
+
const stopwatch = _chunkTQAFH5OJjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1427
1427
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.projectName, context2.options.sourceRoot, true, false);
|
|
1428
1428
|
stopwatch();
|
|
1429
1429
|
}
|
|
@@ -1433,9 +1433,9 @@ _chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
1433
1433
|
async function reportResults(context2) {
|
|
1434
1434
|
if (_optionalChain([context2, 'access', _38 => _38.result, 'optionalAccess', _39 => _39.errors, 'access', _40 => _40.length]) === 0) {
|
|
1435
1435
|
if (context2.result.warnings.length > 0) {
|
|
1436
|
-
|
|
1436
|
+
_chunkTQAFH5OJjs.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);
|
|
1437
1437
|
}
|
|
1438
|
-
|
|
1438
|
+
_chunkTQAFH5OJjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
1439
1439
|
}
|
|
1440
1440
|
}
|
|
1441
1441
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -1477,8 +1477,8 @@ async function cleanOutputPath(context2) {
|
|
|
1477
1477
|
}
|
|
1478
1478
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1479
1479
|
async function build3(options) {
|
|
1480
|
-
|
|
1481
|
-
const stopwatch =
|
|
1480
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1481
|
+
const stopwatch = _chunkTQAFH5OJjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1482
1482
|
try {
|
|
1483
1483
|
const opts = Array.isArray(options) ? options : [
|
|
1484
1484
|
options
|
|
@@ -1488,9 +1488,9 @@ async function build3(options) {
|
|
|
1488
1488
|
}
|
|
1489
1489
|
void transduce.async(opts, dependencyCheck);
|
|
1490
1490
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
1491
|
-
|
|
1491
|
+
_chunkTQAFH5OJjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1492
1492
|
} catch (error) {
|
|
1493
|
-
|
|
1493
|
+
_chunkTQAFH5OJjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1494
1494
|
throw error;
|
|
1495
1495
|
} finally {
|
|
1496
1496
|
stopwatch();
|
|
@@ -1518,9 +1518,9 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1518
1518
|
return context2.rebuild();
|
|
1519
1519
|
});
|
|
1520
1520
|
if (rebuildResult instanceof Error) {
|
|
1521
|
-
|
|
1521
|
+
_chunkTQAFH5OJjs.writeError.call(void 0, rebuildResult.message);
|
|
1522
1522
|
}
|
|
1523
|
-
|
|
1523
|
+
_chunkTQAFH5OJjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
1524
1524
|
}, 10);
|
|
1525
1525
|
changeWatcher.on("change", fastRebuild);
|
|
1526
1526
|
return void 0;
|
|
@@ -1528,7 +1528,7 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1528
1528
|
|
|
1529
1529
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1530
1530
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1531
|
-
|
|
1531
|
+
_chunkTQAFH5OJjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1532
1532
|
if (!_optionalChain([context2, 'access', _41 => _41.projectsConfigurations, 'optionalAccess', _42 => _42.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _43 => _43.projectsConfigurations, 'access', _44 => _44.projects, 'access', _45 => _45[context2.projectName], 'optionalAccess', _46 => _46.root])) {
|
|
1533
1533
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1534
1534
|
}
|
|
@@ -1545,7 +1545,7 @@ async function esbuildExecutorFn(options, context2, config) {
|
|
|
1545
1545
|
};
|
|
1546
1546
|
}
|
|
1547
1547
|
_chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
|
|
1548
|
-
var executor_default6 =
|
|
1548
|
+
var executor_default6 = _chunkTQAFH5OJjs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
|
|
1549
1549
|
skipReadingConfig: false,
|
|
1550
1550
|
hooks: {
|
|
1551
1551
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1582,7 +1582,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1582
1582
|
if (!_optionalChain([context2, 'optionalAccess', _55 => _55.projectName]) || !_optionalChain([context2, 'access', _56 => _56.projectsConfigurations, 'optionalAccess', _57 => _57.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1583
1583
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
1584
1584
|
}
|
|
1585
|
-
|
|
1585
|
+
_chunkTQAFH5OJjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
1586
1586
|
_sizelimit2.default.call(void 0, [
|
|
1587
1587
|
_file2.default,
|
|
1588
1588
|
_esbuild3.default,
|
|
@@ -1590,14 +1590,14 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1590
1590
|
], {
|
|
1591
1591
|
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _58 => _58.projectsConfigurations, 'access', _59 => _59.projects, 'access', _60 => _60[context2.projectName], 'optionalAccess', _61 => _61.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _62 => _62.projectsConfigurations, 'access', _63 => _63.projects, 'access', _64 => _64[context2.projectName], 'optionalAccess', _65 => _65.root]), () => ( "./")), "src")))
|
|
1592
1592
|
}).then((result) => {
|
|
1593
|
-
|
|
1593
|
+
_chunkTQAFH5OJjs.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
1594
1594
|
});
|
|
1595
1595
|
return {
|
|
1596
1596
|
success: true
|
|
1597
1597
|
};
|
|
1598
1598
|
}
|
|
1599
1599
|
_chunk3GQAWCBQjs.__name.call(void 0, sizeLimitExecutorFn, "sizeLimitExecutorFn");
|
|
1600
|
-
var executor_default7 =
|
|
1600
|
+
var executor_default7 = _chunkTQAFH5OJjs.withRunExecutor.call(void 0, "Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
|
|
1601
1601
|
skipReadingConfig: false,
|
|
1602
1602
|
hooks: {
|
|
1603
1603
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1616,8 +1616,8 @@ var _tsdown = require('tsdown');
|
|
|
1616
1616
|
// ../tsdown/src/clean.ts
|
|
1617
1617
|
|
|
1618
1618
|
async function clean2(name = "ESBuild", directory, config) {
|
|
1619
|
-
|
|
1620
|
-
const stopwatch =
|
|
1619
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
1620
|
+
const stopwatch = _chunkTQAFH5OJjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
1621
1621
|
await _node.hfs.deleteAll(directory);
|
|
1622
1622
|
stopwatch();
|
|
1623
1623
|
}
|
|
@@ -1652,13 +1652,13 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1652
1652
|
if (!workspaceRoot3) {
|
|
1653
1653
|
throw new Error("Cannot find Nx workspace root");
|
|
1654
1654
|
}
|
|
1655
|
-
const config = await
|
|
1656
|
-
|
|
1657
|
-
const stopwatch =
|
|
1655
|
+
const config = await _chunkTQAFH5OJjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
|
|
1656
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1657
|
+
const stopwatch = _chunkTQAFH5OJjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1658
1658
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1659
1659
|
exitOnError: true
|
|
1660
1660
|
});
|
|
1661
|
-
const projectJsonPath =
|
|
1661
|
+
const projectJsonPath = _chunkTQAFH5OJjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1662
1662
|
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
1663
1663
|
throw new Error("Cannot find project.json configuration");
|
|
1664
1664
|
}
|
|
@@ -1671,7 +1671,7 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1671
1671
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
|
|
1672
1672
|
options.name ??= `${projectName}-${options.format}`;
|
|
1673
1673
|
options.target ??= DEFAULT_TARGET;
|
|
1674
|
-
const packageJsonPath =
|
|
1674
|
+
const packageJsonPath = _chunkTQAFH5OJjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1675
1675
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1676
1676
|
throw new Error("Cannot find package.json configuration");
|
|
1677
1677
|
}
|
|
@@ -1680,20 +1680,20 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1680
1680
|
...options,
|
|
1681
1681
|
config,
|
|
1682
1682
|
...userOptions,
|
|
1683
|
-
tsconfig:
|
|
1683
|
+
tsconfig: _chunkTQAFH5OJjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1684
1684
|
format: options.format || "cjs",
|
|
1685
1685
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1686
1686
|
"./src/index.ts"
|
|
1687
1687
|
], userOptions.emitOnAll),
|
|
1688
|
-
outdir: userOptions.outputPath ||
|
|
1688
|
+
outdir: userOptions.outputPath || _chunkTQAFH5OJjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1689
1689
|
plugins: [],
|
|
1690
1690
|
name: userOptions.name || projectName,
|
|
1691
1691
|
projectConfigurations,
|
|
1692
1692
|
projectName,
|
|
1693
1693
|
projectGraph,
|
|
1694
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1694
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkTQAFH5OJjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1695
1695
|
minify: userOptions.minify || !userOptions.debug,
|
|
1696
|
-
verbose: userOptions.verbose ||
|
|
1696
|
+
verbose: userOptions.verbose || _chunkTQAFH5OJjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1697
1697
|
includeSrc: userOptions.includeSrc === true,
|
|
1698
1698
|
metafile: userOptions.metafile !== false,
|
|
1699
1699
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1727,14 +1727,14 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1727
1727
|
return result;
|
|
1728
1728
|
}, "resolveOptions");
|
|
1729
1729
|
async function generatePackageJson2(options) {
|
|
1730
|
-
if (options.generatePackageJson !== false && await _node.hfs.isFile(
|
|
1731
|
-
|
|
1732
|
-
const stopwatch =
|
|
1733
|
-
const packageJsonPath =
|
|
1730
|
+
if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkTQAFH5OJjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1731
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1732
|
+
const stopwatch = _chunkTQAFH5OJjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1733
|
+
const packageJsonPath = _chunkTQAFH5OJjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1734
1734
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1735
1735
|
throw new Error("Cannot find package.json configuration");
|
|
1736
1736
|
}
|
|
1737
|
-
let packageJson = await _node.hfs.json(
|
|
1737
|
+
let packageJson = await _node.hfs.json(_chunkTQAFH5OJjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
|
|
1738
1738
|
if (!packageJson) {
|
|
1739
1739
|
throw new Error("Cannot find package.json configuration file");
|
|
1740
1740
|
}
|
|
@@ -1772,15 +1772,15 @@ async function generatePackageJson2(options) {
|
|
|
1772
1772
|
}
|
|
1773
1773
|
return ret;
|
|
1774
1774
|
}, packageJson.exports);
|
|
1775
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1775
|
+
await _devkit.writeJsonFile.call(void 0, _chunkTQAFH5OJjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
1776
1776
|
stopwatch();
|
|
1777
1777
|
}
|
|
1778
1778
|
return options;
|
|
1779
1779
|
}
|
|
1780
1780
|
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson2, "generatePackageJson");
|
|
1781
1781
|
async function executeTSDown(options) {
|
|
1782
|
-
|
|
1783
|
-
const stopwatch =
|
|
1782
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
1783
|
+
const stopwatch = _chunkTQAFH5OJjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1784
1784
|
await _tsdown.build.call(void 0, {
|
|
1785
1785
|
...options,
|
|
1786
1786
|
entry: options.entryPoints,
|
|
@@ -1792,15 +1792,15 @@ async function executeTSDown(options) {
|
|
|
1792
1792
|
}
|
|
1793
1793
|
_chunk3GQAWCBQjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
1794
1794
|
async function copyBuildAssets2(options) {
|
|
1795
|
-
|
|
1796
|
-
const stopwatch =
|
|
1795
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
1796
|
+
const stopwatch = _chunkTQAFH5OJjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1797
1797
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.projectName, options.sourceRoot, true, false);
|
|
1798
1798
|
stopwatch();
|
|
1799
1799
|
return options;
|
|
1800
1800
|
}
|
|
1801
1801
|
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets2, "copyBuildAssets");
|
|
1802
1802
|
async function reportResults2(options) {
|
|
1803
|
-
|
|
1803
|
+
_chunkTQAFH5OJjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
1804
1804
|
}
|
|
1805
1805
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults2, "reportResults");
|
|
1806
1806
|
async function cleanOutputPath2(options) {
|
|
@@ -1811,8 +1811,8 @@ async function cleanOutputPath2(options) {
|
|
|
1811
1811
|
}
|
|
1812
1812
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath2, "cleanOutputPath");
|
|
1813
1813
|
async function build4(options) {
|
|
1814
|
-
|
|
1815
|
-
const stopwatch =
|
|
1814
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1815
|
+
const stopwatch = _chunkTQAFH5OJjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1816
1816
|
try {
|
|
1817
1817
|
const opts = Array.isArray(options) ? options : [
|
|
1818
1818
|
options
|
|
@@ -1830,11 +1830,11 @@ async function build4(options) {
|
|
|
1830
1830
|
await reportResults2(opt);
|
|
1831
1831
|
}));
|
|
1832
1832
|
} else {
|
|
1833
|
-
|
|
1833
|
+
_chunkTQAFH5OJjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
1834
1834
|
}
|
|
1835
|
-
|
|
1835
|
+
_chunkTQAFH5OJjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1836
1836
|
} catch (error) {
|
|
1837
|
-
|
|
1837
|
+
_chunkTQAFH5OJjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1838
1838
|
throw error;
|
|
1839
1839
|
} finally {
|
|
1840
1840
|
stopwatch();
|
|
@@ -1844,7 +1844,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, build4, "build");
|
|
|
1844
1844
|
|
|
1845
1845
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1846
1846
|
async function tsdownExecutorFn(options, context2, config) {
|
|
1847
|
-
|
|
1847
|
+
_chunkTQAFH5OJjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
|
|
1848
1848
|
if (!_optionalChain([context2, 'access', _68 => _68.projectsConfigurations, 'optionalAccess', _69 => _69.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _70 => _70.projectsConfigurations, 'access', _71 => _71.projects, 'access', _72 => _72[context2.projectName], 'optionalAccess', _73 => _73.root])) {
|
|
1849
1849
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1850
1850
|
}
|
|
@@ -1861,7 +1861,7 @@ async function tsdownExecutorFn(options, context2, config) {
|
|
|
1861
1861
|
};
|
|
1862
1862
|
}
|
|
1863
1863
|
_chunk3GQAWCBQjs.__name.call(void 0, tsdownExecutorFn, "tsdownExecutorFn");
|
|
1864
|
-
var executor_default8 =
|
|
1864
|
+
var executor_default8 = _chunkTQAFH5OJjs.withRunExecutor.call(void 0, "Storm TSDown build executor", tsdownExecutorFn, {
|
|
1865
1865
|
skipReadingConfig: false,
|
|
1866
1866
|
hooks: {
|
|
1867
1867
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1880,11 +1880,11 @@ var _fsextra = require('fs-extra');
|
|
|
1880
1880
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1881
1881
|
async function typiaExecutorFn(options, _, config) {
|
|
1882
1882
|
if (options.clean !== false) {
|
|
1883
|
-
|
|
1883
|
+
_chunkTQAFH5OJjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1884
1884
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1885
1885
|
}
|
|
1886
1886
|
await Promise.all(options.entry.map((entry) => {
|
|
1887
|
-
|
|
1887
|
+
_chunkTQAFH5OJjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1888
1888
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1889
1889
|
input: entry,
|
|
1890
1890
|
output: options.outputPath,
|
|
@@ -1896,7 +1896,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
1896
1896
|
};
|
|
1897
1897
|
}
|
|
1898
1898
|
_chunk3GQAWCBQjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
|
|
1899
|
-
var executor_default9 =
|
|
1899
|
+
var executor_default9 = _chunkTQAFH5OJjs.withRunExecutor.call(void 0, "Typia runtime validation generator", typiaExecutorFn, {
|
|
1900
1900
|
skipReadingConfig: false,
|
|
1901
1901
|
hooks: {
|
|
1902
1902
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1915,22 +1915,27 @@ var executor_default9 = _chunkBW5TMV3Cjs.withRunExecutor.call(void 0, "Typia run
|
|
|
1915
1915
|
|
|
1916
1916
|
var _jiti = require('jiti');
|
|
1917
1917
|
async function unbuildExecutorFn(options, context2, config) {
|
|
1918
|
-
|
|
1919
|
-
if (!_optionalChain([context2, 'access', _82 => _82.projectsConfigurations, 'optionalAccess', _83 => _83.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]
|
|
1920
|
-
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1918
|
+
_chunkTQAFH5OJjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1919
|
+
if (!_optionalChain([context2, 'access', _82 => _82.projectsConfigurations, 'optionalAccess', _83 => _83.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1920
|
+
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
1921
|
+
}
|
|
1922
|
+
if (!context2.projectsConfigurations.projects[context2.projectName].root) {
|
|
1923
|
+
throw new Error("The Build process failed because the project root is not valid. Please run this command from a workspace root directory.");
|
|
1924
|
+
}
|
|
1925
|
+
if (!context2.projectsConfigurations.projects[context2.projectName].sourceRoot) {
|
|
1926
|
+
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.");
|
|
1921
1927
|
}
|
|
1922
1928
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1923
|
-
fsCache: config.skipCache ? false :
|
|
1929
|
+
fsCache: config.skipCache ? false : _chunkTQAFH5OJjs.joinPaths.call(void 0, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
1924
1930
|
interopDefault: true
|
|
1925
1931
|
});
|
|
1926
1932
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
1927
1933
|
await stormUnbuild.build(_defu.defu.call(void 0, {
|
|
1928
1934
|
...options,
|
|
1929
|
-
projectRoot:
|
|
1935
|
+
projectRoot: context2.projectsConfigurations.projects[context2.projectName].root,
|
|
1930
1936
|
projectName: context2.projectName,
|
|
1931
|
-
sourceRoot:
|
|
1932
|
-
platform: options.platform
|
|
1933
|
-
name: context2.projectName
|
|
1937
|
+
sourceRoot: context2.projectsConfigurations.projects[context2.projectName].sourceRoot,
|
|
1938
|
+
platform: options.platform
|
|
1934
1939
|
}, {
|
|
1935
1940
|
stubOptions: {
|
|
1936
1941
|
jiti: {
|
|
@@ -1940,20 +1945,15 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1940
1945
|
rollup: {
|
|
1941
1946
|
emitCJS: true,
|
|
1942
1947
|
watch: false,
|
|
1943
|
-
cjsBridge: false,
|
|
1944
1948
|
dts: {
|
|
1945
1949
|
respectExternal: true
|
|
1946
1950
|
},
|
|
1947
|
-
replace: {},
|
|
1948
|
-
alias: {},
|
|
1949
|
-
resolve: {},
|
|
1950
|
-
json: {},
|
|
1951
|
-
commonjs: {},
|
|
1952
1951
|
esbuild: {
|
|
1953
1952
|
target: options.target,
|
|
1954
1953
|
format: "esm",
|
|
1955
1954
|
platform: options.platform,
|
|
1956
|
-
minify: options.minify,
|
|
1955
|
+
minify: _nullishCoalesce(options.minify, () => ( !options.debug)),
|
|
1956
|
+
sourcemap: _nullishCoalesce(options.sourcemap, () => ( options.debug)),
|
|
1957
1957
|
treeShaking: options.treeShaking
|
|
1958
1958
|
}
|
|
1959
1959
|
}
|
|
@@ -1963,7 +1963,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1963
1963
|
};
|
|
1964
1964
|
}
|
|
1965
1965
|
_chunk3GQAWCBQjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
|
|
1966
|
-
var executor_default10 =
|
|
1966
|
+
var executor_default10 = _chunkTQAFH5OJjs.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
|
|
1967
1967
|
skipReadingConfig: false,
|
|
1968
1968
|
hooks: {
|
|
1969
1969
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1987,58 +1987,58 @@ var executor_default10 = _chunkBW5TMV3Cjs.withRunExecutor.call(void 0, "TypeScri
|
|
|
1987
1987
|
var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
1988
1988
|
skipReadingConfig: false
|
|
1989
1989
|
}) => async (tree, _options) => {
|
|
1990
|
-
const stopwatch =
|
|
1990
|
+
const stopwatch = _chunkTQAFH5OJjs.getStopwatch.call(void 0, name);
|
|
1991
1991
|
let options = _options;
|
|
1992
1992
|
let config;
|
|
1993
1993
|
try {
|
|
1994
|
-
|
|
1994
|
+
_chunkTQAFH5OJjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
1995
1995
|
|
|
1996
1996
|
`, config);
|
|
1997
|
-
const workspaceRoot3 =
|
|
1997
|
+
const workspaceRoot3 = _chunkTQAFH5OJjs.findWorkspaceRoot.call(void 0, );
|
|
1998
1998
|
if (!generatorOptions.skipReadingConfig) {
|
|
1999
|
-
|
|
1999
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
2000
2000
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
2001
|
-
config = await
|
|
2001
|
+
config = await _chunkTQAFH5OJjs.loadStormConfig.call(void 0, workspaceRoot3);
|
|
2002
2002
|
}
|
|
2003
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2004
|
-
|
|
2003
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _84 => _84.hooks, 'optionalAccess', _85 => _85.applyDefaultOptions])) {
|
|
2004
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
2005
2005
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
2006
|
-
|
|
2006
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
2007
2007
|
}
|
|
2008
|
-
|
|
2008
|
+
_chunkTQAFH5OJjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
|
|
2009
2009
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
|
|
2010
|
-
const tokenized = await
|
|
2010
|
+
const tokenized = await _chunkTQAFH5OJjs.applyWorkspaceTokens.call(void 0, options, {
|
|
2011
2011
|
workspaceRoot: tree.root,
|
|
2012
2012
|
config
|
|
2013
|
-
},
|
|
2014
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2015
|
-
|
|
2013
|
+
}, _chunkTQAFH5OJjs.applyWorkspaceBaseTokens);
|
|
2014
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _86 => _86.hooks, 'optionalAccess', _87 => _87.preProcess])) {
|
|
2015
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
2016
2016
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
2017
|
-
|
|
2017
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
2018
2018
|
}
|
|
2019
2019
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
2020
2020
|
if (result) {
|
|
2021
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
2021
|
+
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _88 => _88.error, 'optionalAccess', _89 => _89.message]) && typeof _optionalChain([result, 'optionalAccess', _90 => _90.error, 'optionalAccess', _91 => _91.message]) === "string" && _optionalChain([result, 'optionalAccess', _92 => _92.error, 'optionalAccess', _93 => _93.name]) && typeof _optionalChain([result, 'optionalAccess', _94 => _94.error, 'optionalAccess', _95 => _95.name]) === "string") {
|
|
2022
2022
|
throw new Error(`The ${name} generator failed to run`, {
|
|
2023
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
2023
|
+
cause: _optionalChain([result, 'optionalAccess', _96 => _96.error])
|
|
2024
2024
|
});
|
|
2025
2025
|
} else if (result.success && result.data) {
|
|
2026
2026
|
return result;
|
|
2027
2027
|
}
|
|
2028
2028
|
}
|
|
2029
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2030
|
-
|
|
2029
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _97 => _97.hooks, 'optionalAccess', _98 => _98.postProcess])) {
|
|
2030
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
2031
2031
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
2032
|
-
|
|
2032
|
+
_chunkTQAFH5OJjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
2033
2033
|
}
|
|
2034
2034
|
return () => {
|
|
2035
|
-
|
|
2035
|
+
_chunkTQAFH5OJjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
2036
2036
|
`, config);
|
|
2037
2037
|
};
|
|
2038
2038
|
} catch (error) {
|
|
2039
2039
|
return () => {
|
|
2040
|
-
|
|
2041
|
-
|
|
2040
|
+
_chunkTQAFH5OJjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
2041
|
+
_chunkTQAFH5OJjs.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
2042
2042
|
- Details: ${error.message}
|
|
2043
2043
|
- Stacktrace: ${error.stack}`, config);
|
|
2044
2044
|
};
|
|
@@ -2140,7 +2140,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2140
2140
|
const projectConfig = {
|
|
2141
2141
|
root: options.directory,
|
|
2142
2142
|
projectType: "library",
|
|
2143
|
-
sourceRoot:
|
|
2143
|
+
sourceRoot: _chunkTQAFH5OJjs.joinPaths.call(void 0, _nullishCoalesce(options.directory, () => ( "")), "src"),
|
|
2144
2144
|
targets: {
|
|
2145
2145
|
build: {
|
|
2146
2146
|
executor: schema.buildExecutor,
|
|
@@ -2149,11 +2149,11 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2149
2149
|
],
|
|
2150
2150
|
options: {
|
|
2151
2151
|
entry: [
|
|
2152
|
-
|
|
2152
|
+
_chunkTQAFH5OJjs.joinPaths.call(void 0, options.projectRoot, "src", "index.ts")
|
|
2153
2153
|
],
|
|
2154
2154
|
outputPath: getOutputPath(options),
|
|
2155
|
-
tsconfig:
|
|
2156
|
-
project:
|
|
2155
|
+
tsconfig: _chunkTQAFH5OJjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
2156
|
+
project: _chunkTQAFH5OJjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
2157
2157
|
defaultConfiguration: "production",
|
|
2158
2158
|
platform: "neutral",
|
|
2159
2159
|
assets: [
|
|
@@ -2192,22 +2192,22 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2192
2192
|
_devkit.addProjectConfiguration.call(void 0, tree, options.name, projectConfig);
|
|
2193
2193
|
let repository = {
|
|
2194
2194
|
type: "github",
|
|
2195
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
2195
|
+
url: _optionalChain([config, 'optionalAccess', _99 => _99.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _100 => _100.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _101 => _101.namespace]) || _optionalChain([config, 'optionalAccess', _102 => _102.name]) || "repository"}.git`
|
|
2196
2196
|
};
|
|
2197
2197
|
let description = schema.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
2198
2198
|
if (tree.exists("package.json")) {
|
|
2199
2199
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
2200
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2200
|
+
if (_optionalChain([packageJson, 'optionalAccess', _103 => _103.repository])) {
|
|
2201
2201
|
repository = packageJson.repository;
|
|
2202
2202
|
}
|
|
2203
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2203
|
+
if (_optionalChain([packageJson, 'optionalAccess', _104 => _104.description])) {
|
|
2204
2204
|
description = packageJson.description;
|
|
2205
2205
|
}
|
|
2206
2206
|
}
|
|
2207
2207
|
if (!options.importPath) {
|
|
2208
2208
|
options.importPath = options.name;
|
|
2209
2209
|
}
|
|
2210
|
-
const packageJsonPath =
|
|
2210
|
+
const packageJsonPath = _chunkTQAFH5OJjs.joinPaths.call(void 0, options.projectRoot, "package.json");
|
|
2211
2211
|
if (tree.exists(packageJsonPath)) {
|
|
2212
2212
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2213
2213
|
if (!options.importPath) {
|
|
@@ -2255,30 +2255,30 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2255
2255
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
2256
2256
|
...json,
|
|
2257
2257
|
pnpm: {
|
|
2258
|
-
..._optionalChain([json, 'optionalAccess',
|
|
2258
|
+
..._optionalChain([json, 'optionalAccess', _105 => _105.pnpm]),
|
|
2259
2259
|
overrides: {
|
|
2260
|
-
..._optionalChain([json, 'optionalAccess',
|
|
2260
|
+
..._optionalChain([json, 'optionalAccess', _106 => _106.pnpm, 'optionalAccess', _107 => _107.overrides]),
|
|
2261
2261
|
[_nullishCoalesce(options.importPath, () => ( ""))]: "workspace:*"
|
|
2262
2262
|
}
|
|
2263
2263
|
}
|
|
2264
2264
|
}));
|
|
2265
2265
|
}
|
|
2266
2266
|
_js.addTsConfigPath.call(void 0, tree, options.importPath, [
|
|
2267
|
-
|
|
2267
|
+
_chunkTQAFH5OJjs.joinPaths.call(void 0, options.projectRoot, "./src", `index.${options.js ? "js" : "ts"}`)
|
|
2268
2268
|
]);
|
|
2269
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2270
|
-
|
|
2269
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkTQAFH5OJjs.joinPaths.call(void 0, options.importPath, "/*"), [
|
|
2270
|
+
_chunkTQAFH5OJjs.joinPaths.call(void 0, options.projectRoot, "./src", "/*")
|
|
2271
2271
|
]);
|
|
2272
2272
|
if (tree.exists("package.json")) {
|
|
2273
2273
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
2274
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2274
|
+
if (_optionalChain([packageJson, 'optionalAccess', _108 => _108.repository])) {
|
|
2275
2275
|
repository = packageJson.repository;
|
|
2276
2276
|
}
|
|
2277
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2277
|
+
if (_optionalChain([packageJson, 'optionalAccess', _109 => _109.description])) {
|
|
2278
2278
|
description = packageJson.description;
|
|
2279
2279
|
}
|
|
2280
2280
|
}
|
|
2281
|
-
const tsconfigPath =
|
|
2281
|
+
const tsconfigPath = _chunkTQAFH5OJjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json");
|
|
2282
2282
|
if (tree.exists(tsconfigPath)) {
|
|
2283
2283
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2284
2284
|
json.composite ??= true;
|
|
@@ -2316,36 +2316,36 @@ function getOutputPath(options) {
|
|
|
2316
2316
|
} else {
|
|
2317
2317
|
parts.push(options.projectRoot);
|
|
2318
2318
|
}
|
|
2319
|
-
return
|
|
2319
|
+
return _chunkTQAFH5OJjs.joinPaths.call(void 0, ...parts);
|
|
2320
2320
|
}
|
|
2321
2321
|
_chunk3GQAWCBQjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
2322
2322
|
function createProjectTsConfigJson(tree, options) {
|
|
2323
2323
|
const tsconfig = {
|
|
2324
2324
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
2325
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2325
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _110 => _110.tsconfigOptions]), () => ( {})),
|
|
2326
2326
|
compilerOptions: {
|
|
2327
2327
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2328
|
-
outDir:
|
|
2328
|
+
outDir: _chunkTQAFH5OJjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2329
2329
|
noEmit: true,
|
|
2330
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2330
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _111 => _111.tsconfigOptions, 'optionalAccess', _112 => _112.compilerOptions]), () => ( {}))
|
|
2331
2331
|
},
|
|
2332
2332
|
files: [
|
|
2333
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2333
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _113 => _113.tsconfigOptions, 'optionalAccess', _114 => _114.files]), () => ( []))
|
|
2334
2334
|
],
|
|
2335
2335
|
include: [
|
|
2336
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2336
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _115 => _115.tsconfigOptions, 'optionalAccess', _116 => _116.include]), () => ( [])),
|
|
2337
2337
|
"src/**/*.ts",
|
|
2338
2338
|
"src/**/*.js",
|
|
2339
2339
|
"bin/**/*"
|
|
2340
2340
|
],
|
|
2341
2341
|
exclude: [
|
|
2342
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2342
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _117 => _117.tsconfigOptions, 'optionalAccess', _118 => _118.exclude]), () => ( [])),
|
|
2343
2343
|
"jest.config.ts",
|
|
2344
2344
|
"src/**/*.spec.ts",
|
|
2345
2345
|
"src/**/*.test.ts"
|
|
2346
2346
|
]
|
|
2347
2347
|
};
|
|
2348
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2348
|
+
_devkit.writeJson.call(void 0, tree, _chunkTQAFH5OJjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2349
2349
|
}
|
|
2350
2350
|
_chunk3GQAWCBQjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2351
2351
|
async function normalizeOptions(tree, options) {
|
|
@@ -2471,19 +2471,19 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
2471
2471
|
|
|
2472
2472
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
2473
2473
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0,
|
|
2474
|
+
_chunkTQAFH5OJjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Configuration JSON Schema generator", config);
|
|
2475
|
+
_chunkTQAFH5OJjs.writeTrace.call(void 0, `Determining the Storm Configuration JSON Schema...`, config);
|
|
2476
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkTQAFH5OJjs.StormConfigSchema, {
|
|
2477
2477
|
name: "StormWorkspaceConfiguration"
|
|
2478
2478
|
});
|
|
2479
|
-
|
|
2480
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
2481
|
-
|
|
2479
|
+
_chunkTQAFH5OJjs.writeTrace.call(void 0, jsonSchema, config);
|
|
2480
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _119 => _119.workspaceRoot]), () => ( _chunkTQAFH5OJjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _120 => _120.outputFile, 'optionalAccess', _121 => _121.startsWith, 'call', _122 => _122("./")]) ? "" : "./");
|
|
2481
|
+
_chunkTQAFH5OJjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
2482
2482
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
2483
2483
|
spaces: 2
|
|
2484
2484
|
});
|
|
2485
2485
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2486
|
-
|
|
2486
|
+
_chunkTQAFH5OJjs.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
|
|
2487
2487
|
return {
|
|
2488
2488
|
success: true
|
|
2489
2489
|
};
|