@storm-software/terraform-tools 0.50.0 → 0.50.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-PXJNG3Y3.js → chunk-3YAEZHUD.js} +148 -148
- package/dist/{chunk-SL6KQXE7.mjs → chunk-4DAOD5DG.mjs} +2 -2
- package/dist/{chunk-TKSHNSJF.js → chunk-7OAEVGV3.js} +3 -3
- package/dist/{chunk-OA47DQLZ.mjs → chunk-AN6TJFDI.mjs} +1 -1
- package/dist/{chunk-4RU3LQAK.mjs → chunk-CX6K23RM.mjs} +1 -2
- package/dist/{chunk-45WMQB3Q.js → chunk-EQY3LNPR.js} +2 -2
- package/dist/{chunk-RZCRSYLK.js → chunk-HFEQN3NL.js} +2 -2
- package/dist/{chunk-4KG7E7J4.mjs → chunk-HTBODFT6.mjs} +1 -1
- package/dist/{chunk-TG7H7WMN.js → chunk-L3W5NLSN.js} +2 -2
- package/dist/{chunk-RZBT2Y2L.mjs → chunk-NV54O4LW.mjs} +1 -1
- package/dist/{chunk-RKZ4FHTS.mjs → chunk-PU7ULQHZ.mjs} +1 -1
- package/dist/{chunk-24N7QQ4L.mjs → chunk-RN6UUJRU.mjs} +1 -1
- package/dist/{chunk-YXUJXXZP.js → chunk-VKA4AOSX.js} +2 -2
- package/dist/{chunk-DNKGKYNG.js → chunk-YX6ZIWFA.js} +1 -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 +2 -2
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkYX6ZIWFAjs = require('./chunk-YX6ZIWFA.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 = _chunkYX6ZIWFAjs.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 = _chunkYX6ZIWFAjs.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 = _chunkYX6ZIWFAjs.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 = _chunkYX6ZIWFAjs.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 = _chunkYX6ZIWFAjs.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 _chunkYX6ZIWFAjs.loadStormConfig.call(void 0, );
|
|
303
303
|
rootDir = config.workspaceRoot;
|
|
304
304
|
}
|
|
305
|
-
const nxJsonPath =
|
|
305
|
+
const nxJsonPath = _chunkYX6ZIWFAjs.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
|
}
|
|
@@ -349,7 +349,7 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
349
349
|
}
|
|
350
350
|
const buildTarget = _optionalChain([projectsConfigurations, 'access', _13 => _13.projects, 'access', _14 => _14[projectName], 'access', _15 => _15.targets, 'optionalAccess', _16 => _16.build]);
|
|
351
351
|
if (!buildTarget) {
|
|
352
|
-
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 ${
|
|
352
|
+
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 ${_chunkYX6ZIWFAjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
|
|
353
353
|
}
|
|
354
354
|
const result = await _js.copyAssets.call(void 0, {
|
|
355
355
|
assets,
|
|
@@ -364,18 +364,18 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
364
364
|
projectsConfigurations,
|
|
365
365
|
nxJsonConfiguration: nxJson,
|
|
366
366
|
cwd: config.workspaceRoot,
|
|
367
|
-
isVerbose:
|
|
367
|
+
isVerbose: _chunkYX6ZIWFAjs.isVerbose.call(void 0, config.logLevel)
|
|
368
368
|
});
|
|
369
369
|
if (!result.success) {
|
|
370
370
|
throw new Error("The Build process failed trying to copy assets");
|
|
371
371
|
}
|
|
372
372
|
if (includeSrc === true) {
|
|
373
|
-
|
|
373
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkYX6ZIWFAjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
374
374
|
const files = await _glob.glob.call(void 0, [
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
375
|
+
_chunkYX6ZIWFAjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
376
|
+
_chunkYX6ZIWFAjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
377
|
+
_chunkYX6ZIWFAjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
378
|
+
_chunkYX6ZIWFAjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
379
379
|
]);
|
|
380
380
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
381
381
|
|
|
@@ -397,7 +397,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
397
397
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
|
|
398
398
|
const projectNode = project.node;
|
|
399
399
|
if (projectNode.data.root) {
|
|
400
|
-
const projectPackageJsonPath =
|
|
400
|
+
const projectPackageJsonPath = _chunkYX6ZIWFAjs.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
|
|
401
401
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
402
402
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
403
403
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -408,7 +408,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
if (localPackages.length > 0) {
|
|
411
|
-
|
|
411
|
+
_chunkYX6ZIWFAjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
412
412
|
packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
|
|
413
413
|
if (!ret[localPackage.name]) {
|
|
414
414
|
ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
|
|
@@ -430,13 +430,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
430
430
|
return ret;
|
|
431
431
|
}, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
|
|
432
432
|
} else {
|
|
433
|
-
|
|
433
|
+
_chunkYX6ZIWFAjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
434
434
|
}
|
|
435
435
|
return packageJson;
|
|
436
436
|
}, "addPackageDependencies");
|
|
437
437
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
438
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
439
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
438
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkYX6ZIWFAjs.findWorkspaceRoot.call(void 0, );
|
|
439
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkYX6ZIWFAjs.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
440
440
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
441
441
|
packageJson.type ??= "module";
|
|
442
442
|
packageJson.sideEffects ??= false;
|
|
@@ -445,7 +445,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
445
445
|
if (distSrc.startsWith("/")) {
|
|
446
446
|
distSrc = distSrc.substring(1);
|
|
447
447
|
}
|
|
448
|
-
packageJson.source ??= `${
|
|
448
|
+
packageJson.source ??= `${_chunkYX6ZIWFAjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
449
449
|
}
|
|
450
450
|
packageJson.files ??= [
|
|
451
451
|
"dist/**/*"
|
|
@@ -476,7 +476,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
476
476
|
];
|
|
477
477
|
}
|
|
478
478
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
479
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
479
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkYX6ZIWFAjs.joinPaths.call(void 0, "packages", projectName);
|
|
480
480
|
return packageJson;
|
|
481
481
|
}, "addWorkspacePackageJsonFields");
|
|
482
482
|
var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
@@ -503,7 +503,7 @@ var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
503
503
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
504
504
|
|
|
505
505
|
var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
506
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
506
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkYX6ZIWFAjs.findWorkspaceRoot.call(void 0, );
|
|
507
507
|
const entryPoints = [];
|
|
508
508
|
if (entry) {
|
|
509
509
|
if (Array.isArray(entry)) {
|
|
@@ -515,7 +515,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
517
|
if (emitOnAll) {
|
|
518
|
-
entryPoints.push(
|
|
518
|
+
entryPoints.push(_chunkYX6ZIWFAjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
519
519
|
}
|
|
520
520
|
const results = [];
|
|
521
521
|
for (const entryPoint in entryPoints) {
|
|
@@ -524,9 +524,9 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
524
524
|
withFileTypes: true
|
|
525
525
|
});
|
|
526
526
|
results.push(...files.reduce((ret, filePath) => {
|
|
527
|
-
const result =
|
|
527
|
+
const result = _chunkYX6ZIWFAjs.correctPaths.call(void 0, _chunkYX6ZIWFAjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkYX6ZIWFAjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkYX6ZIWFAjs.correctPaths.call(void 0, projectRoot), ""));
|
|
528
528
|
if (result) {
|
|
529
|
-
|
|
529
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkYX6ZIWFAjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
530
530
|
if (!results.includes(result)) {
|
|
531
531
|
results.push(result);
|
|
532
532
|
}
|
|
@@ -732,8 +732,8 @@ var RendererEngine = class {
|
|
|
732
732
|
// ../esbuild/src/clean.ts
|
|
733
733
|
|
|
734
734
|
async function clean(name = "ESBuild", directory, config) {
|
|
735
|
-
|
|
736
|
-
const stopwatch =
|
|
735
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
736
|
+
const stopwatch = _chunkYX6ZIWFAjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
737
737
|
await _node.hfs.deleteAll(directory);
|
|
738
738
|
stopwatch();
|
|
739
739
|
}
|
|
@@ -854,7 +854,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
|
|
|
854
854
|
setup(build5) {
|
|
855
855
|
build5.onEnd((result) => {
|
|
856
856
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
857
|
-
|
|
857
|
+
_chunkYX6ZIWFAjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
858
858
|
${result.errors.map((error) => error.text).join("\n")}
|
|
859
859
|
|
|
860
860
|
`, resolvedOptions.config);
|
|
@@ -889,7 +889,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
|
889
889
|
var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
890
890
|
name: "storm:resolve-paths",
|
|
891
891
|
setup(build5) {
|
|
892
|
-
const parentTsConfig = build5.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0,
|
|
892
|
+
const parentTsConfig = build5.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0, _chunkYX6ZIWFAjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build5.initialOptions.tsconfig)) : _chunk3GQAWCBQjs.__require.call(void 0, _chunkYX6ZIWFAjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
893
893
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
894
894
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
895
895
|
build5.onResolve({
|
|
@@ -912,7 +912,7 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (o
|
|
|
912
912
|
|
|
913
913
|
var _apiextractor = require('@microsoft/api-extractor');
|
|
914
914
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
915
|
-
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0,
|
|
915
|
+
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0, _chunkYX6ZIWFAjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
916
916
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
917
917
|
p,
|
|
918
918
|
getTypeDependencyPackageName(p)
|
|
@@ -948,13 +948,13 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
948
948
|
},
|
|
949
949
|
dtsRollup: {
|
|
950
950
|
enabled: true,
|
|
951
|
-
untrimmedFilePath:
|
|
951
|
+
untrimmedFilePath: _chunkYX6ZIWFAjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
952
952
|
},
|
|
953
953
|
tsdocMetadata: {
|
|
954
954
|
enabled: false
|
|
955
955
|
}
|
|
956
956
|
},
|
|
957
|
-
packageJsonFullPath:
|
|
957
|
+
packageJsonFullPath: _chunkYX6ZIWFAjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
958
958
|
configObjectFullPath: void 0
|
|
959
959
|
});
|
|
960
960
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -962,7 +962,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
962
962
|
localBuild: true
|
|
963
963
|
});
|
|
964
964
|
if (extractorResult.succeeded === false) {
|
|
965
|
-
|
|
965
|
+
_chunkYX6ZIWFAjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
966
966
|
throw new Error("API Extractor completed with errors");
|
|
967
967
|
}
|
|
968
968
|
}
|
|
@@ -975,18 +975,18 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
|
|
|
975
975
|
}
|
|
976
976
|
build5.onStart(async () => {
|
|
977
977
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
978
|
-
await
|
|
978
|
+
await _chunkYX6ZIWFAjs.run.call(void 0, resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
979
979
|
}
|
|
980
980
|
if (resolvedOptions.bundle && resolvedOptions.entryPoints && resolvedOptions.entryPoints.length > 0 && resolvedOptions.entryPoints[0] && resolvedOptions.entryPoints[0].endsWith(".ts")) {
|
|
981
981
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
982
982
|
const typeOutDir = resolvedOptions.outdir;
|
|
983
983
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
984
|
-
const bundlePath =
|
|
984
|
+
const bundlePath = _chunkYX6ZIWFAjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
985
985
|
let dtsPath;
|
|
986
|
-
if (await _node.hfs.isFile(
|
|
987
|
-
dtsPath =
|
|
988
|
-
} else if (await _node.hfs.isFile(
|
|
989
|
-
dtsPath =
|
|
986
|
+
if (await _node.hfs.isFile(_chunkYX6ZIWFAjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
987
|
+
dtsPath = _chunkYX6ZIWFAjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
988
|
+
} else if (await _node.hfs.isFile(_chunkYX6ZIWFAjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
989
|
+
dtsPath = _chunkYX6ZIWFAjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
990
990
|
}
|
|
991
991
|
const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
992
992
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -1141,8 +1141,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
1141
1141
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
1142
1142
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
1143
1143
|
});
|
|
1144
|
-
|
|
1145
|
-
|
|
1144
|
+
_chunkYX6ZIWFAjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
1145
|
+
_chunkYX6ZIWFAjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
1146
1146
|
if (filteredMissingDeps.length > 0) {
|
|
1147
1147
|
throw new Error(`Missing dependencies detected - please install them:
|
|
1148
1148
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1236,13 +1236,13 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1236
1236
|
if (!workspaceRoot3) {
|
|
1237
1237
|
throw new Error("Cannot find Nx workspace root");
|
|
1238
1238
|
}
|
|
1239
|
-
const config = await
|
|
1240
|
-
|
|
1241
|
-
const stopwatch =
|
|
1239
|
+
const config = await _chunkYX6ZIWFAjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
|
|
1240
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1241
|
+
const stopwatch = _chunkYX6ZIWFAjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1242
1242
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1243
1243
|
exitOnError: true
|
|
1244
1244
|
});
|
|
1245
|
-
const projectJsonPath =
|
|
1245
|
+
const projectJsonPath = _chunkYX6ZIWFAjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1246
1246
|
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
1247
1247
|
throw new Error("Cannot find project.json configuration");
|
|
1248
1248
|
}
|
|
@@ -1255,7 +1255,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1255
1255
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
1256
1256
|
options.name ??= `${projectName}-${options.format}`;
|
|
1257
1257
|
options.target ??= DEFAULT_TARGET;
|
|
1258
|
-
const packageJsonPath =
|
|
1258
|
+
const packageJsonPath = _chunkYX6ZIWFAjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1259
1259
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1260
1260
|
throw new Error("Cannot find package.json configuration");
|
|
1261
1261
|
}
|
|
@@ -1279,20 +1279,20 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1279
1279
|
".node"
|
|
1280
1280
|
],
|
|
1281
1281
|
...userOptions,
|
|
1282
|
-
tsconfig:
|
|
1282
|
+
tsconfig: _chunkYX6ZIWFAjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1283
1283
|
format: options.format || "cjs",
|
|
1284
1284
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1285
1285
|
"./src/index.ts"
|
|
1286
1286
|
], userOptions.emitOnAll),
|
|
1287
|
-
outdir: userOptions.outputPath ||
|
|
1287
|
+
outdir: userOptions.outputPath || _chunkYX6ZIWFAjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1288
1288
|
plugins: [],
|
|
1289
1289
|
name: userOptions.name || projectName,
|
|
1290
1290
|
projectConfigurations,
|
|
1291
1291
|
projectName,
|
|
1292
1292
|
projectGraph,
|
|
1293
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1293
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkYX6ZIWFAjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1294
1294
|
minify: userOptions.minify || !userOptions.debug,
|
|
1295
|
-
verbose: userOptions.verbose ||
|
|
1295
|
+
verbose: userOptions.verbose || _chunkYX6ZIWFAjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1296
1296
|
includeSrc: userOptions.includeSrc === true,
|
|
1297
1297
|
metafile: userOptions.metafile !== false,
|
|
1298
1298
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1328,8 +1328,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1328
1328
|
}, {})
|
|
1329
1329
|
},
|
|
1330
1330
|
inject: [
|
|
1331
|
-
options.format === "cjs" && options.injectShims ?
|
|
1332
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ?
|
|
1331
|
+
options.format === "cjs" && options.injectShims ? _chunkYX6ZIWFAjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
|
|
1332
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkYX6ZIWFAjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : "",
|
|
1333
1333
|
..._nullishCoalesce(options.inject, () => ( []))
|
|
1334
1334
|
].filter(Boolean)
|
|
1335
1335
|
};
|
|
@@ -1338,14 +1338,14 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1338
1338
|
return result;
|
|
1339
1339
|
}, "resolveOptions");
|
|
1340
1340
|
async function generatePackageJson(context2) {
|
|
1341
|
-
if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(
|
|
1342
|
-
|
|
1343
|
-
const stopwatch =
|
|
1344
|
-
const packageJsonPath =
|
|
1341
|
+
if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(_chunkYX6ZIWFAjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
1342
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
1343
|
+
const stopwatch = _chunkYX6ZIWFAjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1344
|
+
const packageJsonPath = _chunkYX6ZIWFAjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
1345
1345
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1346
1346
|
throw new Error("Cannot find package.json configuration");
|
|
1347
1347
|
}
|
|
1348
|
-
let packageJson = await _node.hfs.json(
|
|
1348
|
+
let packageJson = await _node.hfs.json(_chunkYX6ZIWFAjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"));
|
|
1349
1349
|
if (!packageJson) {
|
|
1350
1350
|
throw new Error("Cannot find package.json configuration file");
|
|
1351
1351
|
}
|
|
@@ -1383,7 +1383,7 @@ async function generatePackageJson(context2) {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
return ret;
|
|
1385
1385
|
}, packageJson.exports);
|
|
1386
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1386
|
+
await _devkit.writeJsonFile.call(void 0, _chunkYX6ZIWFAjs.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
|
|
1387
1387
|
stopwatch();
|
|
1388
1388
|
}
|
|
1389
1389
|
return context2;
|
|
@@ -1409,8 +1409,8 @@ async function generateContext(getOptions) {
|
|
|
1409
1409
|
}
|
|
1410
1410
|
_chunk3GQAWCBQjs.__name.call(void 0, generateContext, "generateContext");
|
|
1411
1411
|
async function executeEsBuild(context2) {
|
|
1412
|
-
|
|
1413
|
-
const stopwatch =
|
|
1412
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
1413
|
+
const stopwatch = _chunkYX6ZIWFAjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
1414
1414
|
if (process.env.WATCH === "true") {
|
|
1415
1415
|
const ctx = await esbuild2.context(context2.options);
|
|
1416
1416
|
watch(ctx, context2.options);
|
|
@@ -1426,8 +1426,8 @@ async function executeEsBuild(context2) {
|
|
|
1426
1426
|
_chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
1427
1427
|
async function copyBuildAssets(context2) {
|
|
1428
1428
|
if (_optionalChain([context2, 'access', _41 => _41.result, 'optionalAccess', _42 => _42.errors, 'access', _43 => _43.length]) === 0) {
|
|
1429
|
-
|
|
1430
|
-
const stopwatch =
|
|
1429
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
1430
|
+
const stopwatch = _chunkYX6ZIWFAjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1431
1431
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.projectName, context2.options.sourceRoot, true, false);
|
|
1432
1432
|
stopwatch();
|
|
1433
1433
|
}
|
|
@@ -1437,9 +1437,9 @@ _chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
1437
1437
|
async function reportResults(context2) {
|
|
1438
1438
|
if (_optionalChain([context2, 'access', _44 => _44.result, 'optionalAccess', _45 => _45.errors, 'access', _46 => _46.length]) === 0) {
|
|
1439
1439
|
if (context2.result.warnings.length > 0) {
|
|
1440
|
-
|
|
1440
|
+
_chunkYX6ZIWFAjs.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);
|
|
1441
1441
|
}
|
|
1442
|
-
|
|
1442
|
+
_chunkYX6ZIWFAjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
1443
1443
|
}
|
|
1444
1444
|
}
|
|
1445
1445
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -1481,8 +1481,8 @@ async function cleanOutputPath(context2) {
|
|
|
1481
1481
|
}
|
|
1482
1482
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1483
1483
|
async function build3(options) {
|
|
1484
|
-
|
|
1485
|
-
const stopwatch =
|
|
1484
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1485
|
+
const stopwatch = _chunkYX6ZIWFAjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1486
1486
|
try {
|
|
1487
1487
|
const opts = Array.isArray(options) ? options : [
|
|
1488
1488
|
options
|
|
@@ -1492,9 +1492,9 @@ async function build3(options) {
|
|
|
1492
1492
|
}
|
|
1493
1493
|
void transduce.async(opts, dependencyCheck);
|
|
1494
1494
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
1495
|
-
|
|
1495
|
+
_chunkYX6ZIWFAjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1496
1496
|
} catch (error) {
|
|
1497
|
-
|
|
1497
|
+
_chunkYX6ZIWFAjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1498
1498
|
throw error;
|
|
1499
1499
|
} finally {
|
|
1500
1500
|
stopwatch();
|
|
@@ -1522,9 +1522,9 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1522
1522
|
return context2.rebuild();
|
|
1523
1523
|
});
|
|
1524
1524
|
if (rebuildResult instanceof Error) {
|
|
1525
|
-
|
|
1525
|
+
_chunkYX6ZIWFAjs.writeError.call(void 0, rebuildResult.message);
|
|
1526
1526
|
}
|
|
1527
|
-
|
|
1527
|
+
_chunkYX6ZIWFAjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
1528
1528
|
}, 10);
|
|
1529
1529
|
changeWatcher.on("change", fastRebuild);
|
|
1530
1530
|
return void 0;
|
|
@@ -1532,7 +1532,7 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1532
1532
|
|
|
1533
1533
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1534
1534
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1535
|
-
|
|
1535
|
+
_chunkYX6ZIWFAjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1536
1536
|
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])) {
|
|
1537
1537
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1538
1538
|
}
|
|
@@ -1549,7 +1549,7 @@ async function esbuildExecutorFn(options, context2, config) {
|
|
|
1549
1549
|
};
|
|
1550
1550
|
}
|
|
1551
1551
|
_chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
|
|
1552
|
-
var executor_default6 =
|
|
1552
|
+
var executor_default6 = _chunkYX6ZIWFAjs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
|
|
1553
1553
|
skipReadingConfig: false,
|
|
1554
1554
|
hooks: {
|
|
1555
1555
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1586,7 +1586,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1586
1586
|
if (!_optionalChain([context2, 'optionalAccess', _61 => _61.projectName]) || !_optionalChain([context2, 'access', _62 => _62.projectsConfigurations, 'optionalAccess', _63 => _63.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1587
1587
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
1588
1588
|
}
|
|
1589
|
-
|
|
1589
|
+
_chunkYX6ZIWFAjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
1590
1590
|
_sizelimit2.default.call(void 0, [
|
|
1591
1591
|
_file2.default,
|
|
1592
1592
|
_esbuild3.default,
|
|
@@ -1594,14 +1594,14 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1594
1594
|
], {
|
|
1595
1595
|
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")))
|
|
1596
1596
|
}).then((result) => {
|
|
1597
|
-
|
|
1597
|
+
_chunkYX6ZIWFAjs.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
1598
1598
|
});
|
|
1599
1599
|
return {
|
|
1600
1600
|
success: true
|
|
1601
1601
|
};
|
|
1602
1602
|
}
|
|
1603
1603
|
_chunk3GQAWCBQjs.__name.call(void 0, sizeLimitExecutorFn, "sizeLimitExecutorFn");
|
|
1604
|
-
var executor_default7 =
|
|
1604
|
+
var executor_default7 = _chunkYX6ZIWFAjs.withRunExecutor.call(void 0, "Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
|
|
1605
1605
|
skipReadingConfig: false,
|
|
1606
1606
|
hooks: {
|
|
1607
1607
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1620,8 +1620,8 @@ var _tsdown = require('tsdown');
|
|
|
1620
1620
|
// ../tsdown/src/clean.ts
|
|
1621
1621
|
|
|
1622
1622
|
async function clean2(name = "ESBuild", directory, config) {
|
|
1623
|
-
|
|
1624
|
-
const stopwatch =
|
|
1623
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
1624
|
+
const stopwatch = _chunkYX6ZIWFAjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
1625
1625
|
await _node.hfs.deleteAll(directory);
|
|
1626
1626
|
stopwatch();
|
|
1627
1627
|
}
|
|
@@ -1656,13 +1656,13 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1656
1656
|
if (!workspaceRoot3) {
|
|
1657
1657
|
throw new Error("Cannot find Nx workspace root");
|
|
1658
1658
|
}
|
|
1659
|
-
const config = await
|
|
1660
|
-
|
|
1661
|
-
const stopwatch =
|
|
1659
|
+
const config = await _chunkYX6ZIWFAjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
|
|
1660
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1661
|
+
const stopwatch = _chunkYX6ZIWFAjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1662
1662
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1663
1663
|
exitOnError: true
|
|
1664
1664
|
});
|
|
1665
|
-
const projectJsonPath =
|
|
1665
|
+
const projectJsonPath = _chunkYX6ZIWFAjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1666
1666
|
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
1667
1667
|
throw new Error("Cannot find project.json configuration");
|
|
1668
1668
|
}
|
|
@@ -1675,7 +1675,7 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1675
1675
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
|
|
1676
1676
|
options.name ??= `${projectName}-${options.format}`;
|
|
1677
1677
|
options.target ??= DEFAULT_TARGET;
|
|
1678
|
-
const packageJsonPath =
|
|
1678
|
+
const packageJsonPath = _chunkYX6ZIWFAjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1679
1679
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1680
1680
|
throw new Error("Cannot find package.json configuration");
|
|
1681
1681
|
}
|
|
@@ -1684,20 +1684,20 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1684
1684
|
...options,
|
|
1685
1685
|
config,
|
|
1686
1686
|
...userOptions,
|
|
1687
|
-
tsconfig:
|
|
1687
|
+
tsconfig: _chunkYX6ZIWFAjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1688
1688
|
format: options.format || "cjs",
|
|
1689
1689
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1690
1690
|
"./src/index.ts"
|
|
1691
1691
|
], userOptions.emitOnAll),
|
|
1692
|
-
outdir: userOptions.outputPath ||
|
|
1692
|
+
outdir: userOptions.outputPath || _chunkYX6ZIWFAjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1693
1693
|
plugins: [],
|
|
1694
1694
|
name: userOptions.name || projectName,
|
|
1695
1695
|
projectConfigurations,
|
|
1696
1696
|
projectName,
|
|
1697
1697
|
projectGraph,
|
|
1698
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1698
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkYX6ZIWFAjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1699
1699
|
minify: userOptions.minify || !userOptions.debug,
|
|
1700
|
-
verbose: userOptions.verbose ||
|
|
1700
|
+
verbose: userOptions.verbose || _chunkYX6ZIWFAjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1701
1701
|
includeSrc: userOptions.includeSrc === true,
|
|
1702
1702
|
metafile: userOptions.metafile !== false,
|
|
1703
1703
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1731,14 +1731,14 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1731
1731
|
return result;
|
|
1732
1732
|
}, "resolveOptions");
|
|
1733
1733
|
async function generatePackageJson2(options) {
|
|
1734
|
-
if (options.generatePackageJson !== false && await _node.hfs.isFile(
|
|
1735
|
-
|
|
1736
|
-
const stopwatch =
|
|
1737
|
-
const packageJsonPath =
|
|
1734
|
+
if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkYX6ZIWFAjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1735
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1736
|
+
const stopwatch = _chunkYX6ZIWFAjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1737
|
+
const packageJsonPath = _chunkYX6ZIWFAjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1738
1738
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1739
1739
|
throw new Error("Cannot find package.json configuration");
|
|
1740
1740
|
}
|
|
1741
|
-
let packageJson = await _node.hfs.json(
|
|
1741
|
+
let packageJson = await _node.hfs.json(_chunkYX6ZIWFAjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
|
|
1742
1742
|
if (!packageJson) {
|
|
1743
1743
|
throw new Error("Cannot find package.json configuration file");
|
|
1744
1744
|
}
|
|
@@ -1776,15 +1776,15 @@ async function generatePackageJson2(options) {
|
|
|
1776
1776
|
}
|
|
1777
1777
|
return ret;
|
|
1778
1778
|
}, packageJson.exports);
|
|
1779
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1779
|
+
await _devkit.writeJsonFile.call(void 0, _chunkYX6ZIWFAjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
1780
1780
|
stopwatch();
|
|
1781
1781
|
}
|
|
1782
1782
|
return options;
|
|
1783
1783
|
}
|
|
1784
1784
|
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson2, "generatePackageJson");
|
|
1785
1785
|
async function executeTSDown(options) {
|
|
1786
|
-
|
|
1787
|
-
const stopwatch =
|
|
1786
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
1787
|
+
const stopwatch = _chunkYX6ZIWFAjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1788
1788
|
await _tsdown.build.call(void 0, {
|
|
1789
1789
|
...options,
|
|
1790
1790
|
entry: options.entryPoints,
|
|
@@ -1796,15 +1796,15 @@ async function executeTSDown(options) {
|
|
|
1796
1796
|
}
|
|
1797
1797
|
_chunk3GQAWCBQjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
1798
1798
|
async function copyBuildAssets2(options) {
|
|
1799
|
-
|
|
1800
|
-
const stopwatch =
|
|
1799
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
1800
|
+
const stopwatch = _chunkYX6ZIWFAjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1801
1801
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.projectName, options.sourceRoot, true, false);
|
|
1802
1802
|
stopwatch();
|
|
1803
1803
|
return options;
|
|
1804
1804
|
}
|
|
1805
1805
|
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets2, "copyBuildAssets");
|
|
1806
1806
|
async function reportResults2(options) {
|
|
1807
|
-
|
|
1807
|
+
_chunkYX6ZIWFAjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
1808
1808
|
}
|
|
1809
1809
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults2, "reportResults");
|
|
1810
1810
|
async function cleanOutputPath2(options) {
|
|
@@ -1815,8 +1815,8 @@ async function cleanOutputPath2(options) {
|
|
|
1815
1815
|
}
|
|
1816
1816
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath2, "cleanOutputPath");
|
|
1817
1817
|
async function build4(options) {
|
|
1818
|
-
|
|
1819
|
-
const stopwatch =
|
|
1818
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1819
|
+
const stopwatch = _chunkYX6ZIWFAjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1820
1820
|
try {
|
|
1821
1821
|
const opts = Array.isArray(options) ? options : [
|
|
1822
1822
|
options
|
|
@@ -1834,11 +1834,11 @@ async function build4(options) {
|
|
|
1834
1834
|
await reportResults2(opt);
|
|
1835
1835
|
}));
|
|
1836
1836
|
} else {
|
|
1837
|
-
|
|
1837
|
+
_chunkYX6ZIWFAjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
1838
1838
|
}
|
|
1839
|
-
|
|
1839
|
+
_chunkYX6ZIWFAjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1840
1840
|
} catch (error) {
|
|
1841
|
-
|
|
1841
|
+
_chunkYX6ZIWFAjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1842
1842
|
throw error;
|
|
1843
1843
|
} finally {
|
|
1844
1844
|
stopwatch();
|
|
@@ -1848,7 +1848,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, build4, "build");
|
|
|
1848
1848
|
|
|
1849
1849
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1850
1850
|
async function tsdownExecutorFn(options, context2, config) {
|
|
1851
|
-
|
|
1851
|
+
_chunkYX6ZIWFAjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
|
|
1852
1852
|
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])) {
|
|
1853
1853
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1854
1854
|
}
|
|
@@ -1865,7 +1865,7 @@ async function tsdownExecutorFn(options, context2, config) {
|
|
|
1865
1865
|
};
|
|
1866
1866
|
}
|
|
1867
1867
|
_chunk3GQAWCBQjs.__name.call(void 0, tsdownExecutorFn, "tsdownExecutorFn");
|
|
1868
|
-
var executor_default8 =
|
|
1868
|
+
var executor_default8 = _chunkYX6ZIWFAjs.withRunExecutor.call(void 0, "Storm TSDown build executor", tsdownExecutorFn, {
|
|
1869
1869
|
skipReadingConfig: false,
|
|
1870
1870
|
hooks: {
|
|
1871
1871
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1884,11 +1884,11 @@ var _fsextra = require('fs-extra');
|
|
|
1884
1884
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1885
1885
|
async function typiaExecutorFn(options, _, config) {
|
|
1886
1886
|
if (options.clean !== false) {
|
|
1887
|
-
|
|
1887
|
+
_chunkYX6ZIWFAjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1888
1888
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1889
1889
|
}
|
|
1890
1890
|
await Promise.all(options.entry.map((entry) => {
|
|
1891
|
-
|
|
1891
|
+
_chunkYX6ZIWFAjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1892
1892
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1893
1893
|
input: entry,
|
|
1894
1894
|
output: options.outputPath,
|
|
@@ -1900,7 +1900,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
1900
1900
|
};
|
|
1901
1901
|
}
|
|
1902
1902
|
_chunk3GQAWCBQjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
|
|
1903
|
-
var executor_default9 =
|
|
1903
|
+
var executor_default9 = _chunkYX6ZIWFAjs.withRunExecutor.call(void 0, "Typia runtime validation generator", typiaExecutorFn, {
|
|
1904
1904
|
skipReadingConfig: false,
|
|
1905
1905
|
hooks: {
|
|
1906
1906
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1919,15 +1919,15 @@ var executor_default9 = _chunkDNKGKYNGjs.withRunExecutor.call(void 0, "Typia run
|
|
|
1919
1919
|
|
|
1920
1920
|
var _jiti = require('jiti');
|
|
1921
1921
|
async function unbuildExecutorFn(options, context2, config) {
|
|
1922
|
-
|
|
1922
|
+
_chunkYX6ZIWFAjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1923
1923
|
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])) {
|
|
1924
1924
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1925
1925
|
}
|
|
1926
1926
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1927
|
-
fsCache: config.skipCache ? false :
|
|
1927
|
+
fsCache: config.skipCache ? false : _chunkYX6ZIWFAjs.joinPaths.call(void 0, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
1928
1928
|
interopDefault: true
|
|
1929
1929
|
});
|
|
1930
|
-
const stormUnbuild = await jiti.import("@storm-software/unbuild");
|
|
1930
|
+
const stormUnbuild = await jiti.import("@storm-software/unbuild/build");
|
|
1931
1931
|
await stormUnbuild.build(_defu.defu.call(void 0, {
|
|
1932
1932
|
...options,
|
|
1933
1933
|
projectRoot: _optionalChain([context2, 'access', _94 => _94.projectsConfigurations, 'access', _95 => _95.projects, 'optionalAccess', _96 => _96[context2.projectName], 'access', _97 => _97.root]),
|
|
@@ -1967,7 +1967,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1967
1967
|
};
|
|
1968
1968
|
}
|
|
1969
1969
|
_chunk3GQAWCBQjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
|
|
1970
|
-
var executor_default10 =
|
|
1970
|
+
var executor_default10 = _chunkYX6ZIWFAjs.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
|
|
1971
1971
|
skipReadingConfig: false,
|
|
1972
1972
|
hooks: {
|
|
1973
1973
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1988,34 +1988,34 @@ var executor_default10 = _chunkDNKGKYNGjs.withRunExecutor.call(void 0, "TypeScri
|
|
|
1988
1988
|
var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
1989
1989
|
skipReadingConfig: false
|
|
1990
1990
|
}) => async (tree, _options) => {
|
|
1991
|
-
const stopwatch =
|
|
1991
|
+
const stopwatch = _chunkYX6ZIWFAjs.getStopwatch.call(void 0, name);
|
|
1992
1992
|
let options = _options;
|
|
1993
1993
|
let config;
|
|
1994
1994
|
try {
|
|
1995
|
-
|
|
1995
|
+
_chunkYX6ZIWFAjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
1996
1996
|
|
|
1997
1997
|
`, config);
|
|
1998
|
-
const workspaceRoot3 =
|
|
1998
|
+
const workspaceRoot3 = _chunkYX6ZIWFAjs.findWorkspaceRoot.call(void 0, );
|
|
1999
1999
|
if (!generatorOptions.skipReadingConfig) {
|
|
2000
|
-
|
|
2000
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
2001
2001
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
2002
|
-
config = await
|
|
2002
|
+
config = await _chunkYX6ZIWFAjs.loadStormConfig.call(void 0, workspaceRoot3);
|
|
2003
2003
|
}
|
|
2004
2004
|
if (_optionalChain([generatorOptions, 'optionalAccess', _102 => _102.hooks, 'optionalAccess', _103 => _103.applyDefaultOptions])) {
|
|
2005
|
-
|
|
2005
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
2006
2006
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
2007
|
-
|
|
2007
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
2008
2008
|
}
|
|
2009
|
-
|
|
2009
|
+
_chunkYX6ZIWFAjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
|
|
2010
2010
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
|
|
2011
|
-
const tokenized = await
|
|
2011
|
+
const tokenized = await _chunkYX6ZIWFAjs.applyWorkspaceTokens.call(void 0, options, {
|
|
2012
2012
|
workspaceRoot: tree.root,
|
|
2013
2013
|
config
|
|
2014
|
-
},
|
|
2014
|
+
}, _chunkYX6ZIWFAjs.applyWorkspaceBaseTokens);
|
|
2015
2015
|
if (_optionalChain([generatorOptions, 'optionalAccess', _104 => _104.hooks, 'optionalAccess', _105 => _105.preProcess])) {
|
|
2016
|
-
|
|
2016
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
2017
2017
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
2018
|
-
|
|
2018
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
2019
2019
|
}
|
|
2020
2020
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
2021
2021
|
if (result) {
|
|
@@ -2028,18 +2028,18 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
2028
2028
|
}
|
|
2029
2029
|
}
|
|
2030
2030
|
if (_optionalChain([generatorOptions, 'optionalAccess', _115 => _115.hooks, 'optionalAccess', _116 => _116.postProcess])) {
|
|
2031
|
-
|
|
2031
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
2032
2032
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
2033
|
-
|
|
2033
|
+
_chunkYX6ZIWFAjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
2034
2034
|
}
|
|
2035
2035
|
return () => {
|
|
2036
|
-
|
|
2036
|
+
_chunkYX6ZIWFAjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
2037
2037
|
`, config);
|
|
2038
2038
|
};
|
|
2039
2039
|
} catch (error) {
|
|
2040
2040
|
return () => {
|
|
2041
|
-
|
|
2042
|
-
|
|
2041
|
+
_chunkYX6ZIWFAjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
2042
|
+
_chunkYX6ZIWFAjs.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
2043
2043
|
- Details: ${error.message}
|
|
2044
2044
|
- Stacktrace: ${error.stack}`, config);
|
|
2045
2045
|
};
|
|
@@ -2141,7 +2141,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2141
2141
|
const projectConfig = {
|
|
2142
2142
|
root: options.directory,
|
|
2143
2143
|
projectType: "library",
|
|
2144
|
-
sourceRoot:
|
|
2144
|
+
sourceRoot: _chunkYX6ZIWFAjs.joinPaths.call(void 0, _nullishCoalesce(options.directory, () => ( "")), "src"),
|
|
2145
2145
|
targets: {
|
|
2146
2146
|
build: {
|
|
2147
2147
|
executor: schema.buildExecutor,
|
|
@@ -2150,11 +2150,11 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2150
2150
|
],
|
|
2151
2151
|
options: {
|
|
2152
2152
|
entry: [
|
|
2153
|
-
|
|
2153
|
+
_chunkYX6ZIWFAjs.joinPaths.call(void 0, options.projectRoot, "src", "index.ts")
|
|
2154
2154
|
],
|
|
2155
2155
|
outputPath: getOutputPath(options),
|
|
2156
|
-
tsconfig:
|
|
2157
|
-
project:
|
|
2156
|
+
tsconfig: _chunkYX6ZIWFAjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
2157
|
+
project: _chunkYX6ZIWFAjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
2158
2158
|
defaultConfiguration: "production",
|
|
2159
2159
|
platform: "neutral",
|
|
2160
2160
|
assets: [
|
|
@@ -2208,7 +2208,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2208
2208
|
if (!options.importPath) {
|
|
2209
2209
|
options.importPath = options.name;
|
|
2210
2210
|
}
|
|
2211
|
-
const packageJsonPath =
|
|
2211
|
+
const packageJsonPath = _chunkYX6ZIWFAjs.joinPaths.call(void 0, options.projectRoot, "package.json");
|
|
2212
2212
|
if (tree.exists(packageJsonPath)) {
|
|
2213
2213
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2214
2214
|
if (!options.importPath) {
|
|
@@ -2265,10 +2265,10 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2265
2265
|
}));
|
|
2266
2266
|
}
|
|
2267
2267
|
_js.addTsConfigPath.call(void 0, tree, options.importPath, [
|
|
2268
|
-
|
|
2268
|
+
_chunkYX6ZIWFAjs.joinPaths.call(void 0, options.projectRoot, "./src", `index.${options.js ? "js" : "ts"}`)
|
|
2269
2269
|
]);
|
|
2270
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2271
|
-
|
|
2270
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkYX6ZIWFAjs.joinPaths.call(void 0, options.importPath, "/*"), [
|
|
2271
|
+
_chunkYX6ZIWFAjs.joinPaths.call(void 0, options.projectRoot, "./src", "/*")
|
|
2272
2272
|
]);
|
|
2273
2273
|
if (tree.exists("package.json")) {
|
|
2274
2274
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2279,7 +2279,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2279
2279
|
description = packageJson.description;
|
|
2280
2280
|
}
|
|
2281
2281
|
}
|
|
2282
|
-
const tsconfigPath =
|
|
2282
|
+
const tsconfigPath = _chunkYX6ZIWFAjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json");
|
|
2283
2283
|
if (tree.exists(tsconfigPath)) {
|
|
2284
2284
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2285
2285
|
json.composite ??= true;
|
|
@@ -2317,7 +2317,7 @@ function getOutputPath(options) {
|
|
|
2317
2317
|
} else {
|
|
2318
2318
|
parts.push(options.projectRoot);
|
|
2319
2319
|
}
|
|
2320
|
-
return
|
|
2320
|
+
return _chunkYX6ZIWFAjs.joinPaths.call(void 0, ...parts);
|
|
2321
2321
|
}
|
|
2322
2322
|
_chunk3GQAWCBQjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
2323
2323
|
function createProjectTsConfigJson(tree, options) {
|
|
@@ -2326,7 +2326,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2326
2326
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _128 => _128.tsconfigOptions]), () => ( {})),
|
|
2327
2327
|
compilerOptions: {
|
|
2328
2328
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2329
|
-
outDir:
|
|
2329
|
+
outDir: _chunkYX6ZIWFAjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2330
2330
|
noEmit: true,
|
|
2331
2331
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _129 => _129.tsconfigOptions, 'optionalAccess', _130 => _130.compilerOptions]), () => ( {}))
|
|
2332
2332
|
},
|
|
@@ -2346,7 +2346,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2346
2346
|
"src/**/*.test.ts"
|
|
2347
2347
|
]
|
|
2348
2348
|
};
|
|
2349
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2349
|
+
_devkit.writeJson.call(void 0, tree, _chunkYX6ZIWFAjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2350
2350
|
}
|
|
2351
2351
|
_chunk3GQAWCBQjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2352
2352
|
async function normalizeOptions(tree, options) {
|
|
@@ -2472,19 +2472,19 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
2472
2472
|
|
|
2473
2473
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
2474
2474
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0,
|
|
2475
|
+
_chunkYX6ZIWFAjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Configuration JSON Schema generator", config);
|
|
2476
|
+
_chunkYX6ZIWFAjs.writeTrace.call(void 0, `Determining the Storm Configuration JSON Schema...`, config);
|
|
2477
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkYX6ZIWFAjs.StormConfigSchema, {
|
|
2478
2478
|
name: "StormWorkspaceConfiguration"
|
|
2479
2479
|
});
|
|
2480
|
-
|
|
2481
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _137 => _137.workspaceRoot]), () => (
|
|
2482
|
-
|
|
2480
|
+
_chunkYX6ZIWFAjs.writeTrace.call(void 0, jsonSchema, config);
|
|
2481
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _137 => _137.workspaceRoot]), () => ( _chunkYX6ZIWFAjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _138 => _138.outputFile, 'optionalAccess', _139 => _139.startsWith, 'call', _140 => _140("./")]) ? "" : "./");
|
|
2482
|
+
_chunkYX6ZIWFAjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
2483
2483
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
2484
2484
|
spaces: 2
|
|
2485
2485
|
});
|
|
2486
2486
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2487
|
-
|
|
2487
|
+
_chunkYX6ZIWFAjs.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
|
|
2488
2488
|
return {
|
|
2489
2489
|
success: true
|
|
2490
2490
|
};
|