@storm-software/terraform-tools 0.49.0 → 0.49.2
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 +22 -0
- package/README.md +1 -1
- package/dist/{chunk-R4XW4ES7.mjs → chunk-2G5G6H2X.mjs} +1 -1
- package/dist/{chunk-455PVGLF.js → chunk-3QQYGWLX.js} +2 -2
- package/dist/{chunk-UAZET5ED.mjs → chunk-4FQ7OTSE.mjs} +2 -2
- package/dist/{chunk-QMDMW4SA.mjs → chunk-4UCIB5EX.mjs} +1 -1
- package/dist/{chunk-F7GLIHEV.js → chunk-55SRZ3NV.js} +2 -2
- package/dist/{chunk-Y52W5WN7.mjs → chunk-DNTE5MBP.mjs} +28 -8
- package/dist/{chunk-AMLRXVM3.js → chunk-DTYPMVS2.js} +2 -2
- package/dist/{chunk-3I64RHEK.mjs → chunk-M4Q23Z5H.mjs} +1 -1
- package/dist/{chunk-N4VDOPZF.mjs → chunk-MUBINZ32.mjs} +1 -1
- package/dist/{chunk-MOTE7YBG.js → chunk-PCZI22PL.js} +3 -3
- package/dist/{chunk-OM64FIV6.mjs → chunk-QUA3WPTX.mjs} +1 -1
- package/dist/{chunk-665YWX4A.js → chunk-VORJFDGV.js} +204 -184
- package/dist/{chunk-FFFM47KZ.js → chunk-WUQW2NTB.js} +2 -2
- package/dist/{chunk-NLQAVRJ6.js → chunk-ZW3ZP7CV.js} +2 -2
- package/dist/executors.js +6 -6
- package/dist/executors.mjs +6 -6
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +2 -2
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/src/base/index.js +3 -3
- package/dist/src/base/index.mjs +2 -2
- package/dist/src/base/terraform-executor.js +3 -3
- package/dist/src/base/terraform-executor.mjs +2 -2
- package/dist/src/executors/apply/executor.js +4 -4
- package/dist/src/executors/apply/executor.mjs +3 -3
- package/dist/src/executors/destroy/executor.js +4 -4
- package/dist/src/executors/destroy/executor.mjs +3 -3
- package/dist/src/executors/output/executor.js +4 -4
- package/dist/src/executors/output/executor.mjs +3 -3
- package/dist/src/executors/plan/executor.js +4 -4
- package/dist/src/executors/plan/executor.mjs +3 -3
- package/dist/src/generators/init/init.js +3 -3
- package/dist/src/generators/init/init.mjs +2 -2
- package/package.json +140 -1
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkZW3ZP7CVjs = require('./chunk-ZW3ZP7CV.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -159,7 +159,7 @@ async function cargoBuildExecutor(options, context2) {
|
|
|
159
159
|
return await cargoCommand(...command);
|
|
160
160
|
}
|
|
161
161
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoBuildExecutor, "cargoBuildExecutor");
|
|
162
|
-
var executor_default =
|
|
162
|
+
var executor_default = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Cargo Build", cargoBuildExecutor, {
|
|
163
163
|
skipReadingConfig: false,
|
|
164
164
|
hooks: {
|
|
165
165
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -176,7 +176,7 @@ async function cargoCheckExecutor(options, context2) {
|
|
|
176
176
|
return await cargoCommand(...command);
|
|
177
177
|
}
|
|
178
178
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoCheckExecutor, "cargoCheckExecutor");
|
|
179
|
-
var executor_default2 =
|
|
179
|
+
var executor_default2 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Cargo Check", cargoCheckExecutor, {
|
|
180
180
|
skipReadingConfig: false,
|
|
181
181
|
hooks: {
|
|
182
182
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -192,7 +192,7 @@ async function cargoClippyExecutor(options, context2) {
|
|
|
192
192
|
return await cargoCommand(...command);
|
|
193
193
|
}
|
|
194
194
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoClippyExecutor, "cargoClippyExecutor");
|
|
195
|
-
var executor_default3 =
|
|
195
|
+
var executor_default3 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Cargo Clippy", cargoClippyExecutor, {
|
|
196
196
|
skipReadingConfig: false,
|
|
197
197
|
hooks: {
|
|
198
198
|
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 = _chunkZW3ZP7CVjs.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 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Cargo Format", cargoFormatExecutor, {
|
|
240
240
|
skipReadingConfig: false,
|
|
241
241
|
hooks: {
|
|
242
242
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -300,10 +300,10 @@ var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(
|
|
|
300
300
|
var readNxConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot3) => {
|
|
301
301
|
let rootDir = workspaceRoot3;
|
|
302
302
|
if (!rootDir) {
|
|
303
|
-
const config = await
|
|
303
|
+
const config = await _chunkZW3ZP7CVjs.loadStormConfig.call(void 0, );
|
|
304
304
|
rootDir = config.workspaceRoot;
|
|
305
305
|
}
|
|
306
|
-
const nxJsonPath =
|
|
306
|
+
const nxJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, rootDir, "nx.json");
|
|
307
307
|
if (!_fs.existsSync.call(void 0, nxJsonPath)) {
|
|
308
308
|
throw new Error("Cannot find project.json configuration");
|
|
309
309
|
}
|
|
@@ -350,7 +350,7 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
350
350
|
}
|
|
351
351
|
const buildTarget = _optionalChain([projectsConfigurations, 'access', _13 => _13.projects, 'access', _14 => _14[projectName], 'access', _15 => _15.targets, 'optionalAccess', _16 => _16.build]);
|
|
352
352
|
if (!buildTarget) {
|
|
353
|
-
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 ${
|
|
353
|
+
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 ${_chunkZW3ZP7CVjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
|
|
354
354
|
}
|
|
355
355
|
const result = await _js.copyAssets.call(void 0, {
|
|
356
356
|
assets,
|
|
@@ -365,18 +365,18 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
365
365
|
projectsConfigurations,
|
|
366
366
|
nxJsonConfiguration: nxJson,
|
|
367
367
|
cwd: config.workspaceRoot,
|
|
368
|
-
isVerbose:
|
|
368
|
+
isVerbose: _chunkZW3ZP7CVjs.isVerbose.call(void 0, config.logLevel)
|
|
369
369
|
});
|
|
370
370
|
if (!result.success) {
|
|
371
371
|
throw new Error("The Build process failed trying to copy assets");
|
|
372
372
|
}
|
|
373
373
|
if (includeSrc === true) {
|
|
374
|
-
|
|
374
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkZW3ZP7CVjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
375
375
|
const files = await _glob.glob.call(void 0, [
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
376
|
+
_chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
377
|
+
_chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
378
|
+
_chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
379
|
+
_chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
380
380
|
]);
|
|
381
381
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
382
382
|
|
|
@@ -398,7 +398,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
398
398
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
|
|
399
399
|
const projectNode = project.node;
|
|
400
400
|
if (projectNode.data.root) {
|
|
401
|
-
const projectPackageJsonPath =
|
|
401
|
+
const projectPackageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
|
|
402
402
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
403
403
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
404
404
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -409,7 +409,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
if (localPackages.length > 0) {
|
|
412
|
-
|
|
412
|
+
_chunkZW3ZP7CVjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
413
413
|
packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
|
|
414
414
|
if (!ret[localPackage.name]) {
|
|
415
415
|
ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
|
|
@@ -431,13 +431,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
431
431
|
return ret;
|
|
432
432
|
}, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
|
|
433
433
|
} else {
|
|
434
|
-
|
|
434
|
+
_chunkZW3ZP7CVjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
435
435
|
}
|
|
436
436
|
return packageJson;
|
|
437
437
|
}, "addPackageDependencies");
|
|
438
438
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
439
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
440
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
439
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkZW3ZP7CVjs.findWorkspaceRoot.call(void 0, );
|
|
440
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
441
441
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
442
442
|
packageJson.type ??= "module";
|
|
443
443
|
packageJson.sideEffects ??= false;
|
|
@@ -446,7 +446,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
446
446
|
if (distSrc.startsWith("/")) {
|
|
447
447
|
distSrc = distSrc.substring(1);
|
|
448
448
|
}
|
|
449
|
-
packageJson.source ??= `${
|
|
449
|
+
packageJson.source ??= `${_chunkZW3ZP7CVjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
450
450
|
}
|
|
451
451
|
packageJson.files ??= [
|
|
452
452
|
"dist/**/*"
|
|
@@ -477,7 +477,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
477
477
|
];
|
|
478
478
|
}
|
|
479
479
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
480
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
480
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkZW3ZP7CVjs.joinPaths.call(void 0, "packages", projectName);
|
|
481
481
|
return packageJson;
|
|
482
482
|
}, "addWorkspacePackageJsonFields");
|
|
483
483
|
var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
@@ -532,7 +532,7 @@ var addPackageJsonExports = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
532
532
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
533
533
|
|
|
534
534
|
var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
535
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
535
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkZW3ZP7CVjs.findWorkspaceRoot.call(void 0, );
|
|
536
536
|
const entryPoints = [];
|
|
537
537
|
if (entry) {
|
|
538
538
|
if (Array.isArray(entry)) {
|
|
@@ -544,7 +544,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
if (emitOnAll) {
|
|
547
|
-
entryPoints.push(
|
|
547
|
+
entryPoints.push(_chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
548
548
|
}
|
|
549
549
|
const results = [];
|
|
550
550
|
for (const entryPoint in entryPoints) {
|
|
@@ -553,9 +553,9 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
553
553
|
withFileTypes: true
|
|
554
554
|
});
|
|
555
555
|
results.push(...files.reduce((ret, filePath) => {
|
|
556
|
-
const result =
|
|
556
|
+
const result = _chunkZW3ZP7CVjs.correctPaths.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkZW3ZP7CVjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkZW3ZP7CVjs.correctPaths.call(void 0, projectRoot), ""));
|
|
557
557
|
if (result) {
|
|
558
|
-
|
|
558
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkZW3ZP7CVjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
559
559
|
if (!results.includes(result)) {
|
|
560
560
|
results.push(result);
|
|
561
561
|
}
|
|
@@ -584,18 +584,18 @@ var getEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (builder, opti
|
|
|
584
584
|
}, "getEnv");
|
|
585
585
|
|
|
586
586
|
// ../build-tools/src/utilities/get-out-extension.ts
|
|
587
|
-
function getOutExtension(
|
|
587
|
+
function getOutExtension(format2, pkgType) {
|
|
588
588
|
let jsExtension = ".js";
|
|
589
589
|
let dtsExtension = ".d.ts";
|
|
590
|
-
if (pkgType === "module" &&
|
|
590
|
+
if (pkgType === "module" && format2 === "cjs") {
|
|
591
591
|
jsExtension = ".cjs";
|
|
592
592
|
dtsExtension = ".d.cts";
|
|
593
593
|
}
|
|
594
|
-
if (pkgType !== "module" &&
|
|
594
|
+
if (pkgType !== "module" && format2 === "esm") {
|
|
595
595
|
jsExtension = ".mjs";
|
|
596
596
|
dtsExtension = ".d.mts";
|
|
597
597
|
}
|
|
598
|
-
if (
|
|
598
|
+
if (format2 === "iife") {
|
|
599
599
|
jsExtension = ".global.js";
|
|
600
600
|
}
|
|
601
601
|
return {
|
|
@@ -761,8 +761,8 @@ var RendererEngine = class {
|
|
|
761
761
|
// ../esbuild/src/clean.ts
|
|
762
762
|
|
|
763
763
|
async function clean(name = "ESBuild", directory, config) {
|
|
764
|
-
|
|
765
|
-
const stopwatch =
|
|
764
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
765
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
766
766
|
await _node.hfs.deleteAll(directory);
|
|
767
767
|
stopwatch();
|
|
768
768
|
}
|
|
@@ -883,7 +883,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
|
|
|
883
883
|
setup(build6) {
|
|
884
884
|
build6.onEnd((result) => {
|
|
885
885
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
886
|
-
|
|
886
|
+
_chunkZW3ZP7CVjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
887
887
|
${result.errors.map((error) => error.text).join("\n")}
|
|
888
888
|
|
|
889
889
|
`, resolvedOptions.config);
|
|
@@ -918,7 +918,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
|
918
918
|
var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
919
919
|
name: "storm:resolve-paths",
|
|
920
920
|
setup(build6) {
|
|
921
|
-
const parentTsConfig = build6.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0,
|
|
921
|
+
const parentTsConfig = build6.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build6.initialOptions.tsconfig)) : _chunk3GQAWCBQjs.__require.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
922
922
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
923
923
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
924
924
|
build6.onResolve({
|
|
@@ -941,7 +941,7 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (o
|
|
|
941
941
|
|
|
942
942
|
var _apiextractor = require('@microsoft/api-extractor');
|
|
943
943
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
944
|
-
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0,
|
|
944
|
+
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
945
945
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
946
946
|
p,
|
|
947
947
|
getTypeDependencyPackageName(p)
|
|
@@ -977,13 +977,13 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
977
977
|
},
|
|
978
978
|
dtsRollup: {
|
|
979
979
|
enabled: true,
|
|
980
|
-
untrimmedFilePath:
|
|
980
|
+
untrimmedFilePath: _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
981
981
|
},
|
|
982
982
|
tsdocMetadata: {
|
|
983
983
|
enabled: false
|
|
984
984
|
}
|
|
985
985
|
},
|
|
986
|
-
packageJsonFullPath:
|
|
986
|
+
packageJsonFullPath: _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
987
987
|
configObjectFullPath: void 0
|
|
988
988
|
});
|
|
989
989
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -991,7 +991,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
991
991
|
localBuild: true
|
|
992
992
|
});
|
|
993
993
|
if (extractorResult.succeeded === false) {
|
|
994
|
-
|
|
994
|
+
_chunkZW3ZP7CVjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
995
995
|
throw new Error("API Extractor completed with errors");
|
|
996
996
|
}
|
|
997
997
|
}
|
|
@@ -1004,18 +1004,18 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
|
|
|
1004
1004
|
}
|
|
1005
1005
|
build6.onStart(async () => {
|
|
1006
1006
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
1007
|
-
await
|
|
1007
|
+
await _chunkZW3ZP7CVjs.run.call(void 0, resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
1008
1008
|
}
|
|
1009
1009
|
if (resolvedOptions.bundle && resolvedOptions.entryPoints && resolvedOptions.entryPoints.length > 0 && resolvedOptions.entryPoints[0] && resolvedOptions.entryPoints[0].endsWith(".ts")) {
|
|
1010
1010
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
1011
1011
|
const typeOutDir = resolvedOptions.outdir;
|
|
1012
1012
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
1013
|
-
const bundlePath =
|
|
1013
|
+
const bundlePath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
1014
1014
|
let dtsPath;
|
|
1015
|
-
if (await _node.hfs.isFile(
|
|
1016
|
-
dtsPath =
|
|
1017
|
-
} else if (await _node.hfs.isFile(
|
|
1018
|
-
dtsPath =
|
|
1015
|
+
if (await _node.hfs.isFile(_chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
1016
|
+
dtsPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
1017
|
+
} else if (await _node.hfs.isFile(_chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
1018
|
+
dtsPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
1019
1019
|
}
|
|
1020
1020
|
const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
1021
1021
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -1170,8 +1170,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
1170
1170
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
1171
1171
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
1172
1172
|
});
|
|
1173
|
-
|
|
1174
|
-
|
|
1173
|
+
_chunkZW3ZP7CVjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
1174
|
+
_chunkZW3ZP7CVjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
1175
1175
|
if (filteredMissingDeps.length > 0) {
|
|
1176
1176
|
throw new Error(`Missing dependencies detected - please install them:
|
|
1177
1177
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1265,13 +1265,13 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1265
1265
|
if (!workspaceRoot3) {
|
|
1266
1266
|
throw new Error("Cannot find Nx workspace root");
|
|
1267
1267
|
}
|
|
1268
|
-
const config = await
|
|
1269
|
-
|
|
1270
|
-
const stopwatch =
|
|
1268
|
+
const config = await _chunkZW3ZP7CVjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
|
|
1269
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1270
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1271
1271
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1272
1272
|
exitOnError: true
|
|
1273
1273
|
});
|
|
1274
|
-
const projectJsonPath =
|
|
1274
|
+
const projectJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1275
1275
|
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
1276
1276
|
throw new Error("Cannot find project.json configuration");
|
|
1277
1277
|
}
|
|
@@ -1284,7 +1284,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1284
1284
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
1285
1285
|
options.name ??= `${projectName}-${options.format}`;
|
|
1286
1286
|
options.target ??= DEFAULT_TARGET;
|
|
1287
|
-
const packageJsonPath =
|
|
1287
|
+
const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1288
1288
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1289
1289
|
throw new Error("Cannot find package.json configuration");
|
|
1290
1290
|
}
|
|
@@ -1308,20 +1308,20 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1308
1308
|
".node"
|
|
1309
1309
|
],
|
|
1310
1310
|
...userOptions,
|
|
1311
|
-
tsconfig:
|
|
1311
|
+
tsconfig: _chunkZW3ZP7CVjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1312
1312
|
format: options.format || "cjs",
|
|
1313
1313
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1314
1314
|
"./src/index.ts"
|
|
1315
1315
|
], userOptions.emitOnAll),
|
|
1316
|
-
outdir: userOptions.outputPath ||
|
|
1316
|
+
outdir: userOptions.outputPath || _chunkZW3ZP7CVjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1317
1317
|
plugins: [],
|
|
1318
1318
|
name: userOptions.name || projectName,
|
|
1319
1319
|
projectConfigurations,
|
|
1320
1320
|
projectName,
|
|
1321
1321
|
projectGraph,
|
|
1322
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1322
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkZW3ZP7CVjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1323
1323
|
minify: userOptions.minify || !userOptions.debug,
|
|
1324
|
-
verbose: userOptions.verbose ||
|
|
1324
|
+
verbose: userOptions.verbose || _chunkZW3ZP7CVjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1325
1325
|
includeSrc: userOptions.includeSrc === true,
|
|
1326
1326
|
metafile: userOptions.metafile !== false,
|
|
1327
1327
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1357,8 +1357,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1357
1357
|
}, {})
|
|
1358
1358
|
},
|
|
1359
1359
|
inject: [
|
|
1360
|
-
options.format === "cjs" && options.injectShims ?
|
|
1361
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ?
|
|
1360
|
+
options.format === "cjs" && options.injectShims ? _chunkZW3ZP7CVjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
|
|
1361
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkZW3ZP7CVjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : "",
|
|
1362
1362
|
..._nullishCoalesce(options.inject, () => ( []))
|
|
1363
1363
|
].filter(Boolean)
|
|
1364
1364
|
};
|
|
@@ -1367,14 +1367,14 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1367
1367
|
return result;
|
|
1368
1368
|
}, "resolveOptions");
|
|
1369
1369
|
async function generatePackageJson(context2) {
|
|
1370
|
-
if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(
|
|
1371
|
-
|
|
1372
|
-
const stopwatch =
|
|
1373
|
-
const packageJsonPath =
|
|
1370
|
+
if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(_chunkZW3ZP7CVjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
1371
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
1372
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1373
|
+
const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
1374
1374
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1375
1375
|
throw new Error("Cannot find package.json configuration");
|
|
1376
1376
|
}
|
|
1377
|
-
let packageJson = await _node.hfs.json(
|
|
1377
|
+
let packageJson = await _node.hfs.json(_chunkZW3ZP7CVjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"));
|
|
1378
1378
|
if (!packageJson) {
|
|
1379
1379
|
throw new Error("Cannot find package.json configuration file");
|
|
1380
1380
|
}
|
|
@@ -1412,7 +1412,7 @@ async function generatePackageJson(context2) {
|
|
|
1412
1412
|
}
|
|
1413
1413
|
return ret;
|
|
1414
1414
|
}, packageJson.exports);
|
|
1415
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1415
|
+
await _devkit.writeJsonFile.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
|
|
1416
1416
|
stopwatch();
|
|
1417
1417
|
}
|
|
1418
1418
|
return context2;
|
|
@@ -1438,8 +1438,8 @@ async function generateContext(getOptions) {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
_chunk3GQAWCBQjs.__name.call(void 0, generateContext, "generateContext");
|
|
1440
1440
|
async function executeEsBuild(context2) {
|
|
1441
|
-
|
|
1442
|
-
const stopwatch =
|
|
1441
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
1442
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
1443
1443
|
if (process.env.WATCH === "true") {
|
|
1444
1444
|
const ctx = await esbuild2.context(context2.options);
|
|
1445
1445
|
watch(ctx, context2.options);
|
|
@@ -1455,8 +1455,8 @@ async function executeEsBuild(context2) {
|
|
|
1455
1455
|
_chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
1456
1456
|
async function copyBuildAssets(context2) {
|
|
1457
1457
|
if (_optionalChain([context2, 'access', _41 => _41.result, 'optionalAccess', _42 => _42.errors, 'access', _43 => _43.length]) === 0) {
|
|
1458
|
-
|
|
1459
|
-
const stopwatch =
|
|
1458
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
1459
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1460
1460
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.projectName, context2.options.sourceRoot, true, false);
|
|
1461
1461
|
stopwatch();
|
|
1462
1462
|
}
|
|
@@ -1466,9 +1466,9 @@ _chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
1466
1466
|
async function reportResults(context2) {
|
|
1467
1467
|
if (_optionalChain([context2, 'access', _44 => _44.result, 'optionalAccess', _45 => _45.errors, 'access', _46 => _46.length]) === 0) {
|
|
1468
1468
|
if (context2.result.warnings.length > 0) {
|
|
1469
|
-
|
|
1469
|
+
_chunkZW3ZP7CVjs.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);
|
|
1470
1470
|
}
|
|
1471
|
-
|
|
1471
|
+
_chunkZW3ZP7CVjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
1474
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -1510,8 +1510,8 @@ async function cleanOutputPath(context2) {
|
|
|
1510
1510
|
}
|
|
1511
1511
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1512
1512
|
async function build3(options) {
|
|
1513
|
-
|
|
1514
|
-
const stopwatch =
|
|
1513
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1514
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1515
1515
|
try {
|
|
1516
1516
|
const opts = Array.isArray(options) ? options : [
|
|
1517
1517
|
options
|
|
@@ -1521,9 +1521,9 @@ async function build3(options) {
|
|
|
1521
1521
|
}
|
|
1522
1522
|
void transduce.async(opts, dependencyCheck);
|
|
1523
1523
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
1524
|
-
|
|
1524
|
+
_chunkZW3ZP7CVjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1525
1525
|
} catch (error) {
|
|
1526
|
-
|
|
1526
|
+
_chunkZW3ZP7CVjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1527
1527
|
throw error;
|
|
1528
1528
|
} finally {
|
|
1529
1529
|
stopwatch();
|
|
@@ -1551,9 +1551,9 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1551
1551
|
return context2.rebuild();
|
|
1552
1552
|
});
|
|
1553
1553
|
if (rebuildResult instanceof Error) {
|
|
1554
|
-
|
|
1554
|
+
_chunkZW3ZP7CVjs.writeError.call(void 0, rebuildResult.message);
|
|
1555
1555
|
}
|
|
1556
|
-
|
|
1556
|
+
_chunkZW3ZP7CVjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
1557
1557
|
}, 10);
|
|
1558
1558
|
changeWatcher.on("change", fastRebuild);
|
|
1559
1559
|
return void 0;
|
|
@@ -1561,7 +1561,7 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1561
1561
|
|
|
1562
1562
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1563
1563
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1564
|
-
|
|
1564
|
+
_chunkZW3ZP7CVjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1565
1565
|
if (!_optionalChain([context2, 'access', _47 => _47.projectsConfigurations, 'optionalAccess', _48 => _48.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _49 => _49.projectsConfigurations, 'access', _50 => _50.projects, 'access', _51 => _51[context2.projectName], 'optionalAccess', _52 => _52.root])) {
|
|
1566
1566
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1567
1567
|
}
|
|
@@ -1578,7 +1578,7 @@ async function esbuildExecutorFn(options, context2, config) {
|
|
|
1578
1578
|
};
|
|
1579
1579
|
}
|
|
1580
1580
|
_chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
|
|
1581
|
-
var executor_default6 =
|
|
1581
|
+
var executor_default6 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
|
|
1582
1582
|
skipReadingConfig: false,
|
|
1583
1583
|
hooks: {
|
|
1584
1584
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1599,6 +1599,7 @@ var executor_default6 = _chunkNLQAVRJ6js.withRunExecutor.call(void 0, "Storm ESB
|
|
|
1599
1599
|
// ../workspace-tools/src/utils/pnpm-deps-update.ts
|
|
1600
1600
|
|
|
1601
1601
|
|
|
1602
|
+
var _prettier = require('prettier');
|
|
1602
1603
|
var _readyamlfile = require('read-yaml-file'); var _readyamlfile2 = _interopRequireDefault(_readyamlfile);
|
|
1603
1604
|
|
|
1604
1605
|
// ../workspace-tools/src/executors/npm-publish/executor.ts
|
|
@@ -1614,7 +1615,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1614
1615
|
if (!_optionalChain([context2, 'optionalAccess', _61 => _61.projectName]) || !_optionalChain([context2, 'access', _62 => _62.projectsConfigurations, 'optionalAccess', _63 => _63.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1615
1616
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
1616
1617
|
}
|
|
1617
|
-
|
|
1618
|
+
_chunkZW3ZP7CVjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
1618
1619
|
_sizelimit2.default.call(void 0, [
|
|
1619
1620
|
_file2.default,
|
|
1620
1621
|
_esbuild3.default,
|
|
@@ -1622,14 +1623,14 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1622
1623
|
], {
|
|
1623
1624
|
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _64 => _64.projectsConfigurations, 'access', _65 => _65.projects, 'access', _66 => _66[context2.projectName], 'optionalAccess', _67 => _67.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _68 => _68.projectsConfigurations, 'access', _69 => _69.projects, 'access', _70 => _70[context2.projectName], 'optionalAccess', _71 => _71.root]), () => ( "./")), "src")))
|
|
1624
1625
|
}).then((result) => {
|
|
1625
|
-
|
|
1626
|
+
_chunkZW3ZP7CVjs.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
1626
1627
|
});
|
|
1627
1628
|
return {
|
|
1628
1629
|
success: true
|
|
1629
1630
|
};
|
|
1630
1631
|
}
|
|
1631
1632
|
_chunk3GQAWCBQjs.__name.call(void 0, sizeLimitExecutorFn, "sizeLimitExecutorFn");
|
|
1632
|
-
var executor_default7 =
|
|
1633
|
+
var executor_default7 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
|
|
1633
1634
|
skipReadingConfig: false,
|
|
1634
1635
|
hooks: {
|
|
1635
1636
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1648,8 +1649,8 @@ var _tsdown = require('tsdown');
|
|
|
1648
1649
|
// ../tsdown/src/clean.ts
|
|
1649
1650
|
|
|
1650
1651
|
async function clean2(name = "ESBuild", directory, config) {
|
|
1651
|
-
|
|
1652
|
-
const stopwatch =
|
|
1652
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
1653
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
1653
1654
|
await _node.hfs.deleteAll(directory);
|
|
1654
1655
|
stopwatch();
|
|
1655
1656
|
}
|
|
@@ -1684,13 +1685,13 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1684
1685
|
if (!workspaceRoot3) {
|
|
1685
1686
|
throw new Error("Cannot find Nx workspace root");
|
|
1686
1687
|
}
|
|
1687
|
-
const config = await
|
|
1688
|
-
|
|
1689
|
-
const stopwatch =
|
|
1688
|
+
const config = await _chunkZW3ZP7CVjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
|
|
1689
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1690
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1690
1691
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1691
1692
|
exitOnError: true
|
|
1692
1693
|
});
|
|
1693
|
-
const projectJsonPath =
|
|
1694
|
+
const projectJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1694
1695
|
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
1695
1696
|
throw new Error("Cannot find project.json configuration");
|
|
1696
1697
|
}
|
|
@@ -1703,7 +1704,7 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1703
1704
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
|
|
1704
1705
|
options.name ??= `${projectName}-${options.format}`;
|
|
1705
1706
|
options.target ??= DEFAULT_TARGET;
|
|
1706
|
-
const packageJsonPath =
|
|
1707
|
+
const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1707
1708
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1708
1709
|
throw new Error("Cannot find package.json configuration");
|
|
1709
1710
|
}
|
|
@@ -1712,20 +1713,20 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1712
1713
|
...options,
|
|
1713
1714
|
config,
|
|
1714
1715
|
...userOptions,
|
|
1715
|
-
tsconfig:
|
|
1716
|
+
tsconfig: _chunkZW3ZP7CVjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1716
1717
|
format: options.format || "cjs",
|
|
1717
1718
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1718
1719
|
"./src/index.ts"
|
|
1719
1720
|
], userOptions.emitOnAll),
|
|
1720
|
-
outdir: userOptions.outputPath ||
|
|
1721
|
+
outdir: userOptions.outputPath || _chunkZW3ZP7CVjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1721
1722
|
plugins: [],
|
|
1722
1723
|
name: userOptions.name || projectName,
|
|
1723
1724
|
projectConfigurations,
|
|
1724
1725
|
projectName,
|
|
1725
1726
|
projectGraph,
|
|
1726
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1727
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkZW3ZP7CVjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1727
1728
|
minify: userOptions.minify || !userOptions.debug,
|
|
1728
|
-
verbose: userOptions.verbose ||
|
|
1729
|
+
verbose: userOptions.verbose || _chunkZW3ZP7CVjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1729
1730
|
includeSrc: userOptions.includeSrc === true,
|
|
1730
1731
|
metafile: userOptions.metafile !== false,
|
|
1731
1732
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1759,14 +1760,14 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1759
1760
|
return result;
|
|
1760
1761
|
}, "resolveOptions");
|
|
1761
1762
|
async function generatePackageJson2(options) {
|
|
1762
|
-
if (options.generatePackageJson !== false && await _node.hfs.isFile(
|
|
1763
|
-
|
|
1764
|
-
const stopwatch =
|
|
1765
|
-
const packageJsonPath =
|
|
1763
|
+
if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1764
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1765
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1766
|
+
const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1766
1767
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1767
1768
|
throw new Error("Cannot find package.json configuration");
|
|
1768
1769
|
}
|
|
1769
|
-
let packageJson = await _node.hfs.json(
|
|
1770
|
+
let packageJson = await _node.hfs.json(_chunkZW3ZP7CVjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
|
|
1770
1771
|
if (!packageJson) {
|
|
1771
1772
|
throw new Error("Cannot find package.json configuration file");
|
|
1772
1773
|
}
|
|
@@ -1804,15 +1805,15 @@ async function generatePackageJson2(options) {
|
|
|
1804
1805
|
}
|
|
1805
1806
|
return ret;
|
|
1806
1807
|
}, packageJson.exports);
|
|
1807
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1808
|
+
await _devkit.writeJsonFile.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
1808
1809
|
stopwatch();
|
|
1809
1810
|
}
|
|
1810
1811
|
return options;
|
|
1811
1812
|
}
|
|
1812
1813
|
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson2, "generatePackageJson");
|
|
1813
1814
|
async function executeTSDown(options) {
|
|
1814
|
-
|
|
1815
|
-
const stopwatch =
|
|
1815
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
1816
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1816
1817
|
await _tsdown.build.call(void 0, {
|
|
1817
1818
|
...options,
|
|
1818
1819
|
entry: options.entryPoints,
|
|
@@ -1824,15 +1825,15 @@ async function executeTSDown(options) {
|
|
|
1824
1825
|
}
|
|
1825
1826
|
_chunk3GQAWCBQjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
1826
1827
|
async function copyBuildAssets2(options) {
|
|
1827
|
-
|
|
1828
|
-
const stopwatch =
|
|
1828
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
1829
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1829
1830
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.projectName, options.sourceRoot, true, false);
|
|
1830
1831
|
stopwatch();
|
|
1831
1832
|
return options;
|
|
1832
1833
|
}
|
|
1833
1834
|
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets2, "copyBuildAssets");
|
|
1834
1835
|
async function reportResults2(options) {
|
|
1835
|
-
|
|
1836
|
+
_chunkZW3ZP7CVjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
1836
1837
|
}
|
|
1837
1838
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults2, "reportResults");
|
|
1838
1839
|
async function cleanOutputPath2(options) {
|
|
@@ -1843,8 +1844,8 @@ async function cleanOutputPath2(options) {
|
|
|
1843
1844
|
}
|
|
1844
1845
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath2, "cleanOutputPath");
|
|
1845
1846
|
async function build4(options) {
|
|
1846
|
-
|
|
1847
|
-
const stopwatch =
|
|
1847
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1848
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1848
1849
|
try {
|
|
1849
1850
|
const opts = Array.isArray(options) ? options : [
|
|
1850
1851
|
options
|
|
@@ -1862,11 +1863,11 @@ async function build4(options) {
|
|
|
1862
1863
|
await reportResults2(opt);
|
|
1863
1864
|
}));
|
|
1864
1865
|
} else {
|
|
1865
|
-
|
|
1866
|
+
_chunkZW3ZP7CVjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
1866
1867
|
}
|
|
1867
|
-
|
|
1868
|
+
_chunkZW3ZP7CVjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1868
1869
|
} catch (error) {
|
|
1869
|
-
|
|
1870
|
+
_chunkZW3ZP7CVjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1870
1871
|
throw error;
|
|
1871
1872
|
} finally {
|
|
1872
1873
|
stopwatch();
|
|
@@ -1876,7 +1877,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, build4, "build");
|
|
|
1876
1877
|
|
|
1877
1878
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1878
1879
|
async function tsdownExecutorFn(options, context2, config) {
|
|
1879
|
-
|
|
1880
|
+
_chunkZW3ZP7CVjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
|
|
1880
1881
|
if (!_optionalChain([context2, 'access', _74 => _74.projectsConfigurations, 'optionalAccess', _75 => _75.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _76 => _76.projectsConfigurations, 'access', _77 => _77.projects, 'access', _78 => _78[context2.projectName], 'optionalAccess', _79 => _79.root])) {
|
|
1881
1882
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1882
1883
|
}
|
|
@@ -1893,7 +1894,7 @@ async function tsdownExecutorFn(options, context2, config) {
|
|
|
1893
1894
|
};
|
|
1894
1895
|
}
|
|
1895
1896
|
_chunk3GQAWCBQjs.__name.call(void 0, tsdownExecutorFn, "tsdownExecutorFn");
|
|
1896
|
-
var executor_default8 =
|
|
1897
|
+
var executor_default8 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Storm TSDown build executor", tsdownExecutorFn, {
|
|
1897
1898
|
skipReadingConfig: false,
|
|
1898
1899
|
hooks: {
|
|
1899
1900
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1912,11 +1913,11 @@ var _fsextra = require('fs-extra');
|
|
|
1912
1913
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1913
1914
|
async function typiaExecutorFn(options, _, config) {
|
|
1914
1915
|
if (options.clean !== false) {
|
|
1915
|
-
|
|
1916
|
+
_chunkZW3ZP7CVjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1916
1917
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1917
1918
|
}
|
|
1918
1919
|
await Promise.all(options.entry.map((entry) => {
|
|
1919
|
-
|
|
1920
|
+
_chunkZW3ZP7CVjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1920
1921
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1921
1922
|
input: entry,
|
|
1922
1923
|
output: options.outputPath,
|
|
@@ -1928,7 +1929,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
1928
1929
|
};
|
|
1929
1930
|
}
|
|
1930
1931
|
_chunk3GQAWCBQjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
|
|
1931
|
-
var executor_default9 =
|
|
1932
|
+
var executor_default9 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Typia runtime validation generator", typiaExecutorFn, {
|
|
1932
1933
|
skipReadingConfig: false,
|
|
1933
1934
|
hooks: {
|
|
1934
1935
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1948,17 +1949,17 @@ var executor_default9 = _chunkNLQAVRJ6js.withRunExecutor.call(void 0, "Typia run
|
|
|
1948
1949
|
|
|
1949
1950
|
|
|
1950
1951
|
|
|
1952
|
+
var _jiti = require('jiti');
|
|
1951
1953
|
|
|
1952
1954
|
|
|
1953
1955
|
|
|
1954
1956
|
|
|
1955
|
-
var _unbuild = require('unbuild');
|
|
1956
1957
|
|
|
1957
1958
|
// ../unbuild/src/clean.ts
|
|
1958
1959
|
|
|
1959
1960
|
async function clean3(name = "Unbuild", directory, config) {
|
|
1960
|
-
|
|
1961
|
-
const stopwatch =
|
|
1961
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
1962
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
1962
1963
|
await _promises.rm.call(void 0, directory, {
|
|
1963
1964
|
recursive: true,
|
|
1964
1965
|
force: true
|
|
@@ -1987,7 +1988,7 @@ var analyzePlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
|
|
|
1987
1988
|
renderChunk(source, chunk) {
|
|
1988
1989
|
const sourceBytes = formatBytes(source.length);
|
|
1989
1990
|
const fileName = chunk.fileName;
|
|
1990
|
-
|
|
1991
|
+
_chunkZW3ZP7CVjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, resolvedOptions.config);
|
|
1991
1992
|
}
|
|
1992
1993
|
};
|
|
1993
1994
|
}, "analyzePlugin");
|
|
@@ -1997,7 +1998,7 @@ var onErrorPlugin2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (optio
|
|
|
1997
1998
|
name: "storm:on-error",
|
|
1998
1999
|
buildEnd(error) {
|
|
1999
2000
|
if (error) {
|
|
2000
|
-
|
|
2001
|
+
_chunkZW3ZP7CVjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
2001
2002
|
${error ? error.message : "Unknown build error"}
|
|
2002
2003
|
|
|
2003
2004
|
`, resolvedOptions.config);
|
|
@@ -2005,7 +2006,7 @@ ${error ? error.message : "Unknown build error"}
|
|
|
2005
2006
|
}
|
|
2006
2007
|
},
|
|
2007
2008
|
renderError(error) {
|
|
2008
|
-
|
|
2009
|
+
_chunkZW3ZP7CVjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
2009
2010
|
${error ? error.message : "Unknown build error"}
|
|
2010
2011
|
|
|
2011
2012
|
`, resolvedOptions.config);
|
|
@@ -2040,7 +2041,7 @@ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, depend
|
|
|
2040
2041
|
declaration: true,
|
|
2041
2042
|
paths: _buildablelibsutils.computeCompilerOptionsPaths.call(void 0, tsConfig, _nullishCoalesce(dependencies, () => ( [])))
|
|
2042
2043
|
};
|
|
2043
|
-
|
|
2044
|
+
_chunkZW3ZP7CVjs.writeTrace.call(void 0, compilerOptions, config);
|
|
2044
2045
|
return compilerOptions;
|
|
2045
2046
|
}
|
|
2046
2047
|
_chunk3GQAWCBQjs.__name.call(void 0, createTsCompilerOptions, "createTsCompilerOptions");
|
|
@@ -2109,14 +2110,14 @@ async function resolveOptions3(options) {
|
|
|
2109
2110
|
if (!projectRoot) {
|
|
2110
2111
|
throw new Error("Cannot find project root");
|
|
2111
2112
|
}
|
|
2112
|
-
const outputPath = options.outputPath ||
|
|
2113
|
+
const outputPath = options.outputPath || _chunkZW3ZP7CVjs.joinPaths.call(void 0, "dist", projectRoot);
|
|
2113
2114
|
const workspaceRoot3 = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
|
|
2114
2115
|
if (!workspaceRoot3) {
|
|
2115
2116
|
throw new Error("Cannot find workspace root");
|
|
2116
2117
|
}
|
|
2117
|
-
const config = await
|
|
2118
|
-
|
|
2119
|
-
const stopwatch =
|
|
2118
|
+
const config = await _chunkZW3ZP7CVjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
|
|
2119
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
2120
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Build options resolution");
|
|
2120
2121
|
if (options.configPath) {
|
|
2121
2122
|
const configFile = await loadConfig(options.configPath);
|
|
2122
2123
|
if (configFile) {
|
|
@@ -2124,14 +2125,14 @@ async function resolveOptions3(options) {
|
|
|
2124
2125
|
}
|
|
2125
2126
|
}
|
|
2126
2127
|
const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
2127
|
-
const projectJsonPath =
|
|
2128
|
+
const projectJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot, "project.json");
|
|
2128
2129
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
2129
2130
|
throw new Error("Cannot find project.json configuration");
|
|
2130
2131
|
}
|
|
2131
2132
|
const projectJsonContent = await _promises.readFile.call(void 0, projectJsonPath, "utf8");
|
|
2132
2133
|
const projectJson = JSON.parse(projectJsonContent);
|
|
2133
2134
|
const projectName = projectJson.name;
|
|
2134
|
-
const packageJsonPath =
|
|
2135
|
+
const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "package.json");
|
|
2135
2136
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2136
2137
|
throw new Error("Cannot find package.json configuration");
|
|
2137
2138
|
}
|
|
@@ -2139,14 +2140,14 @@ async function resolveOptions3(options) {
|
|
|
2139
2140
|
const packageJson = JSON.parse(packageJsonContent);
|
|
2140
2141
|
let tsconfig = options.tsconfig;
|
|
2141
2142
|
if (!tsconfig) {
|
|
2142
|
-
tsconfig =
|
|
2143
|
+
tsconfig = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "tsconfig.json");
|
|
2143
2144
|
}
|
|
2144
2145
|
if (!_fs.existsSync.call(void 0, tsconfig)) {
|
|
2145
2146
|
throw new Error("Cannot find tsconfig.json configuration");
|
|
2146
2147
|
}
|
|
2147
2148
|
let sourceRoot = projectJson.sourceRoot;
|
|
2148
2149
|
if (!sourceRoot) {
|
|
2149
|
-
sourceRoot =
|
|
2150
|
+
sourceRoot = _chunkZW3ZP7CVjs.joinPaths.call(void 0, projectRoot, "src");
|
|
2150
2151
|
}
|
|
2151
2152
|
if (!_fs.existsSync.call(void 0, sourceRoot)) {
|
|
2152
2153
|
throw new Error("Cannot find sourceRoot directory");
|
|
@@ -2158,6 +2159,11 @@ async function resolveOptions3(options) {
|
|
|
2158
2159
|
dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
|
|
2159
2160
|
dependencies.push(tsLibDependency);
|
|
2160
2161
|
}
|
|
2162
|
+
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
2163
|
+
cache: true,
|
|
2164
|
+
fsCache: config.skipCache ? false : _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
2165
|
+
interopDefault: true
|
|
2166
|
+
});
|
|
2161
2167
|
const resolvedOptions = {
|
|
2162
2168
|
name: projectName,
|
|
2163
2169
|
config,
|
|
@@ -2165,19 +2171,20 @@ async function resolveOptions3(options) {
|
|
|
2165
2171
|
sourceRoot,
|
|
2166
2172
|
projectName,
|
|
2167
2173
|
tsconfig,
|
|
2174
|
+
jiti,
|
|
2168
2175
|
clean: false,
|
|
2169
2176
|
entries: [
|
|
2170
2177
|
{
|
|
2171
2178
|
builder: "mkdist",
|
|
2172
2179
|
input: `.${sourceRoot.replace(projectRoot, "")}`,
|
|
2173
|
-
outDir:
|
|
2180
|
+
outDir: _chunkZW3ZP7CVjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
|
|
2174
2181
|
declaration: options.emitTypes !== false,
|
|
2175
2182
|
format: "esm"
|
|
2176
2183
|
},
|
|
2177
2184
|
{
|
|
2178
2185
|
builder: "mkdist",
|
|
2179
2186
|
input: `.${sourceRoot.replace(projectRoot, "")}`,
|
|
2180
|
-
outDir:
|
|
2187
|
+
outDir: _chunkZW3ZP7CVjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
|
|
2181
2188
|
declaration: options.emitTypes !== false,
|
|
2182
2189
|
format: "cjs",
|
|
2183
2190
|
ext: "cjs"
|
|
@@ -2231,11 +2238,11 @@ async function resolveOptions3(options) {
|
|
|
2231
2238
|
]
|
|
2232
2239
|
},
|
|
2233
2240
|
esbuild: {
|
|
2234
|
-
minify:
|
|
2241
|
+
minify: options.minify !== false,
|
|
2235
2242
|
splitting: options.splitting !== false,
|
|
2236
2243
|
treeShaking: options.treeShaking !== false,
|
|
2237
2244
|
color: true,
|
|
2238
|
-
logLevel: config.logLevel ===
|
|
2245
|
+
logLevel: config.logLevel === _chunkZW3ZP7CVjs.LogLevelLabel.FATAL ? _chunkZW3ZP7CVjs.LogLevelLabel.ERROR : _chunkZW3ZP7CVjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
|
|
2239
2246
|
}
|
|
2240
2247
|
}
|
|
2241
2248
|
};
|
|
@@ -2271,31 +2278,44 @@ async function resolveOptions3(options) {
|
|
|
2271
2278
|
}
|
|
2272
2279
|
_chunk3GQAWCBQjs.__name.call(void 0, resolveOptions3, "resolveOptions");
|
|
2273
2280
|
async function generatePackageJson3(options) {
|
|
2274
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
2275
|
-
|
|
2276
|
-
const stopwatch =
|
|
2277
|
-
const packageJsonPath =
|
|
2281
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
2282
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
2283
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Write package.json file");
|
|
2284
|
+
const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
2278
2285
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2279
2286
|
throw new Error("Cannot find package.json configuration");
|
|
2280
2287
|
}
|
|
2281
|
-
let packageJsonContent = await _promises.readFile.call(void 0,
|
|
2288
|
+
let packageJsonContent = await _promises.readFile.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
2282
2289
|
if (!packageJsonContent) {
|
|
2283
2290
|
throw new Error("Cannot find package.json configuration file");
|
|
2284
2291
|
}
|
|
2285
2292
|
let packageJson = JSON.parse(packageJsonContent);
|
|
2286
2293
|
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
2287
2294
|
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
2288
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
2295
|
+
await _devkit.writeJsonFile.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.outDir, "package.json"), await addPackageJsonExports(options.sourceRoot, packageJson));
|
|
2289
2296
|
stopwatch();
|
|
2290
2297
|
}
|
|
2291
2298
|
return options;
|
|
2292
2299
|
}
|
|
2293
2300
|
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson3, "generatePackageJson");
|
|
2301
|
+
async function resolveUnbuild(options) {
|
|
2302
|
+
_chunkZW3ZP7CVjs.writeTrace.call(void 0, `Resolving Unbuild package with Jiti`, options.config);
|
|
2303
|
+
try {
|
|
2304
|
+
return options.jiti.import("unbuild");
|
|
2305
|
+
} catch (error) {
|
|
2306
|
+
_chunkZW3ZP7CVjs.writeError.call(void 0, " \u274C An error occurred while resolving the Unbuild package", options.config);
|
|
2307
|
+
throw new Error("An error occurred while resolving the Unbuild package", {
|
|
2308
|
+
cause: error
|
|
2309
|
+
});
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2312
|
+
_chunk3GQAWCBQjs.__name.call(void 0, resolveUnbuild, "resolveUnbuild");
|
|
2294
2313
|
async function executeUnbuild(options) {
|
|
2295
|
-
|
|
2296
|
-
const stopwatch =
|
|
2314
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
|
|
2315
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${options.name} (${options.projectRoot}) build`);
|
|
2297
2316
|
try {
|
|
2298
|
-
await
|
|
2317
|
+
const unbuild = await resolveUnbuild(options);
|
|
2318
|
+
await unbuild.build(options.projectRoot, false, {
|
|
2299
2319
|
...options,
|
|
2300
2320
|
rootDir: options.projectRoot
|
|
2301
2321
|
});
|
|
@@ -2306,8 +2326,8 @@ async function executeUnbuild(options) {
|
|
|
2306
2326
|
}
|
|
2307
2327
|
_chunk3GQAWCBQjs.__name.call(void 0, executeUnbuild, "executeUnbuild");
|
|
2308
2328
|
async function copyBuildAssets3(options) {
|
|
2309
|
-
|
|
2310
|
-
const stopwatch =
|
|
2329
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
|
|
2330
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
2311
2331
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outDir, options.projectRoot, options.projectName, options.sourceRoot, options.generatePackageJson, options.includeSrc);
|
|
2312
2332
|
stopwatch();
|
|
2313
2333
|
return options;
|
|
@@ -2321,17 +2341,17 @@ async function cleanOutputPath3(options) {
|
|
|
2321
2341
|
}
|
|
2322
2342
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath3, "cleanOutputPath");
|
|
2323
2343
|
async function build5(options) {
|
|
2324
|
-
|
|
2325
|
-
const stopwatch =
|
|
2344
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u26A1 Executing Storm Unbuild pipeline`);
|
|
2345
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Unbuild pipeline");
|
|
2326
2346
|
try {
|
|
2327
2347
|
const resolvedOptions = await resolveOptions3(options);
|
|
2328
2348
|
await cleanOutputPath3(resolvedOptions);
|
|
2329
2349
|
await generatePackageJson3(resolvedOptions);
|
|
2330
2350
|
await executeUnbuild(resolvedOptions);
|
|
2331
2351
|
await copyBuildAssets3(resolvedOptions);
|
|
2332
|
-
|
|
2352
|
+
_chunkZW3ZP7CVjs.writeSuccess.call(void 0, ` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`, resolvedOptions.config);
|
|
2333
2353
|
} catch (error) {
|
|
2334
|
-
|
|
2354
|
+
_chunkZW3ZP7CVjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
2335
2355
|
throw error;
|
|
2336
2356
|
} finally {
|
|
2337
2357
|
stopwatch();
|
|
@@ -2342,7 +2362,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, build5, "build");
|
|
|
2342
2362
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
2343
2363
|
|
|
2344
2364
|
async function unbuildExecutorFn(options, context2, config) {
|
|
2345
|
-
|
|
2365
|
+
_chunkZW3ZP7CVjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
2346
2366
|
if (!_optionalChain([context2, 'access', _88 => _88.projectsConfigurations, 'optionalAccess', _89 => _89.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _90 => _90.projectsConfigurations, 'access', _91 => _91.projects, 'access', _92 => _92[context2.projectName], 'optionalAccess', _93 => _93.root])) {
|
|
2347
2367
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
2348
2368
|
}
|
|
@@ -2385,7 +2405,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
2385
2405
|
};
|
|
2386
2406
|
}
|
|
2387
2407
|
_chunk3GQAWCBQjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
|
|
2388
|
-
var executor_default10 =
|
|
2408
|
+
var executor_default10 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
|
|
2389
2409
|
skipReadingConfig: false,
|
|
2390
2410
|
hooks: {
|
|
2391
2411
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -2406,34 +2426,34 @@ var executor_default10 = _chunkNLQAVRJ6js.withRunExecutor.call(void 0, "TypeScri
|
|
|
2406
2426
|
var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
2407
2427
|
skipReadingConfig: false
|
|
2408
2428
|
}) => async (tree, _options) => {
|
|
2409
|
-
const stopwatch =
|
|
2429
|
+
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, name);
|
|
2410
2430
|
let options = _options;
|
|
2411
2431
|
let config;
|
|
2412
2432
|
try {
|
|
2413
|
-
|
|
2433
|
+
_chunkZW3ZP7CVjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
2414
2434
|
|
|
2415
2435
|
`, config);
|
|
2416
|
-
const workspaceRoot3 =
|
|
2436
|
+
const workspaceRoot3 = _chunkZW3ZP7CVjs.findWorkspaceRoot.call(void 0, );
|
|
2417
2437
|
if (!generatorOptions.skipReadingConfig) {
|
|
2418
|
-
|
|
2438
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
2419
2439
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
2420
|
-
config = await
|
|
2440
|
+
config = await _chunkZW3ZP7CVjs.loadStormConfig.call(void 0, workspaceRoot3);
|
|
2421
2441
|
}
|
|
2422
2442
|
if (_optionalChain([generatorOptions, 'optionalAccess', _102 => _102.hooks, 'optionalAccess', _103 => _103.applyDefaultOptions])) {
|
|
2423
|
-
|
|
2443
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
2424
2444
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
2425
|
-
|
|
2445
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
2426
2446
|
}
|
|
2427
|
-
|
|
2447
|
+
_chunkZW3ZP7CVjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
|
|
2428
2448
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
|
|
2429
|
-
const tokenized = await
|
|
2449
|
+
const tokenized = await _chunkZW3ZP7CVjs.applyWorkspaceTokens.call(void 0, options, {
|
|
2430
2450
|
workspaceRoot: tree.root,
|
|
2431
2451
|
config
|
|
2432
|
-
},
|
|
2452
|
+
}, _chunkZW3ZP7CVjs.applyWorkspaceBaseTokens);
|
|
2433
2453
|
if (_optionalChain([generatorOptions, 'optionalAccess', _104 => _104.hooks, 'optionalAccess', _105 => _105.preProcess])) {
|
|
2434
|
-
|
|
2454
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
2435
2455
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
2436
|
-
|
|
2456
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
2437
2457
|
}
|
|
2438
2458
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
2439
2459
|
if (result) {
|
|
@@ -2446,18 +2466,18 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
2446
2466
|
}
|
|
2447
2467
|
}
|
|
2448
2468
|
if (_optionalChain([generatorOptions, 'optionalAccess', _115 => _115.hooks, 'optionalAccess', _116 => _116.postProcess])) {
|
|
2449
|
-
|
|
2469
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
2450
2470
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
2451
|
-
|
|
2471
|
+
_chunkZW3ZP7CVjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
2452
2472
|
}
|
|
2453
2473
|
return () => {
|
|
2454
|
-
|
|
2474
|
+
_chunkZW3ZP7CVjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
2455
2475
|
`, config);
|
|
2456
2476
|
};
|
|
2457
2477
|
} catch (error) {
|
|
2458
2478
|
return () => {
|
|
2459
|
-
|
|
2460
|
-
|
|
2479
|
+
_chunkZW3ZP7CVjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
2480
|
+
_chunkZW3ZP7CVjs.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
2461
2481
|
- Details: ${error.message}
|
|
2462
2482
|
- Stacktrace: ${error.stack}`, config);
|
|
2463
2483
|
};
|
|
@@ -2559,7 +2579,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2559
2579
|
const projectConfig = {
|
|
2560
2580
|
root: options.directory,
|
|
2561
2581
|
projectType: "library",
|
|
2562
|
-
sourceRoot:
|
|
2582
|
+
sourceRoot: _chunkZW3ZP7CVjs.joinPaths.call(void 0, _nullishCoalesce(options.directory, () => ( "")), "src"),
|
|
2563
2583
|
targets: {
|
|
2564
2584
|
build: {
|
|
2565
2585
|
executor: schema.buildExecutor,
|
|
@@ -2568,11 +2588,11 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2568
2588
|
],
|
|
2569
2589
|
options: {
|
|
2570
2590
|
entry: [
|
|
2571
|
-
|
|
2591
|
+
_chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "src", "index.ts")
|
|
2572
2592
|
],
|
|
2573
2593
|
outputPath: getOutputPath(options),
|
|
2574
|
-
tsconfig:
|
|
2575
|
-
project:
|
|
2594
|
+
tsconfig: _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
2595
|
+
project: _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
2576
2596
|
defaultConfiguration: "production",
|
|
2577
2597
|
platform: "neutral",
|
|
2578
2598
|
assets: [
|
|
@@ -2626,7 +2646,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2626
2646
|
if (!options.importPath) {
|
|
2627
2647
|
options.importPath = options.name;
|
|
2628
2648
|
}
|
|
2629
|
-
const packageJsonPath =
|
|
2649
|
+
const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "package.json");
|
|
2630
2650
|
if (tree.exists(packageJsonPath)) {
|
|
2631
2651
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2632
2652
|
if (!options.importPath) {
|
|
@@ -2683,10 +2703,10 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2683
2703
|
}));
|
|
2684
2704
|
}
|
|
2685
2705
|
_js.addTsConfigPath.call(void 0, tree, options.importPath, [
|
|
2686
|
-
|
|
2706
|
+
_chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "./src", `index.${options.js ? "js" : "ts"}`)
|
|
2687
2707
|
]);
|
|
2688
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2689
|
-
|
|
2708
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.importPath, "/*"), [
|
|
2709
|
+
_chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "./src", "/*")
|
|
2690
2710
|
]);
|
|
2691
2711
|
if (tree.exists("package.json")) {
|
|
2692
2712
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2697,7 +2717,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2697
2717
|
description = packageJson.description;
|
|
2698
2718
|
}
|
|
2699
2719
|
}
|
|
2700
|
-
const tsconfigPath =
|
|
2720
|
+
const tsconfigPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json");
|
|
2701
2721
|
if (tree.exists(tsconfigPath)) {
|
|
2702
2722
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2703
2723
|
json.composite ??= true;
|
|
@@ -2735,7 +2755,7 @@ function getOutputPath(options) {
|
|
|
2735
2755
|
} else {
|
|
2736
2756
|
parts.push(options.projectRoot);
|
|
2737
2757
|
}
|
|
2738
|
-
return
|
|
2758
|
+
return _chunkZW3ZP7CVjs.joinPaths.call(void 0, ...parts);
|
|
2739
2759
|
}
|
|
2740
2760
|
_chunk3GQAWCBQjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
2741
2761
|
function createProjectTsConfigJson(tree, options) {
|
|
@@ -2744,7 +2764,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2744
2764
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _128 => _128.tsconfigOptions]), () => ( {})),
|
|
2745
2765
|
compilerOptions: {
|
|
2746
2766
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2747
|
-
outDir:
|
|
2767
|
+
outDir: _chunkZW3ZP7CVjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2748
2768
|
noEmit: true,
|
|
2749
2769
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _129 => _129.tsconfigOptions, 'optionalAccess', _130 => _130.compilerOptions]), () => ( {}))
|
|
2750
2770
|
},
|
|
@@ -2764,7 +2784,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2764
2784
|
"src/**/*.test.ts"
|
|
2765
2785
|
]
|
|
2766
2786
|
};
|
|
2767
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2787
|
+
_devkit.writeJson.call(void 0, tree, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2768
2788
|
}
|
|
2769
2789
|
_chunk3GQAWCBQjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2770
2790
|
async function normalizeOptions(tree, options) {
|
|
@@ -2890,19 +2910,19 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
2890
2910
|
|
|
2891
2911
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
2892
2912
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0,
|
|
2913
|
+
_chunkZW3ZP7CVjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Configuration JSON Schema generator", config);
|
|
2914
|
+
_chunkZW3ZP7CVjs.writeTrace.call(void 0, `Determining the Storm Configuration JSON Schema...`, config);
|
|
2915
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkZW3ZP7CVjs.StormConfigSchema, {
|
|
2896
2916
|
name: "StormWorkspaceConfiguration"
|
|
2897
2917
|
});
|
|
2898
|
-
|
|
2899
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _137 => _137.workspaceRoot]), () => (
|
|
2900
|
-
|
|
2918
|
+
_chunkZW3ZP7CVjs.writeTrace.call(void 0, jsonSchema, config);
|
|
2919
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _137 => _137.workspaceRoot]), () => ( _chunkZW3ZP7CVjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _138 => _138.outputFile, 'optionalAccess', _139 => _139.startsWith, 'call', _140 => _140("./")]) ? "" : "./");
|
|
2920
|
+
_chunkZW3ZP7CVjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
2901
2921
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
2902
2922
|
spaces: 2
|
|
2903
2923
|
});
|
|
2904
2924
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2905
|
-
|
|
2925
|
+
_chunkZW3ZP7CVjs.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
|
|
2906
2926
|
return {
|
|
2907
2927
|
success: true
|
|
2908
2928
|
};
|