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