@storm-software/terraform-tools 0.49.2 → 0.49.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +1 -1
- package/dist/{chunk-QUA3WPTX.mjs → chunk-24N7QQ4L.mjs} +1 -1
- package/dist/{chunk-55SRZ3NV.js → chunk-45WMQB3Q.js} +2 -2
- package/dist/{chunk-2G5G6H2X.mjs → chunk-4KG7E7J4.mjs} +1 -1
- package/dist/{chunk-4FQ7OTSE.mjs → chunk-4RU3LQAK.mjs} +0 -1
- package/dist/{chunk-ZW3ZP7CV.js → chunk-DNKGKYNG.js} +1 -2
- package/dist/{chunk-MUBINZ32.mjs → chunk-OA47DQLZ.mjs} +1 -1
- package/dist/{chunk-VORJFDGV.js → chunk-PXJNG3Y3.js} +176 -614
- package/dist/{chunk-4UCIB5EX.mjs → chunk-RKZ4FHTS.mjs} +1 -1
- package/dist/{chunk-M4Q23Z5H.mjs → chunk-RZBT2Y2L.mjs} +1 -1
- package/dist/{chunk-WUQW2NTB.js → chunk-RZCRSYLK.js} +2 -2
- package/dist/{chunk-DNTE5MBP.mjs → chunk-SL6KQXE7.mjs} +45 -483
- package/dist/{chunk-DTYPMVS2.js → chunk-TG7H7WMN.js} +2 -2
- package/dist/{chunk-PCZI22PL.js → chunk-TKSHNSJF.js} +3 -3
- package/dist/{chunk-3QQYGWLX.js → chunk-YXUJXXZP.js} +2 -2
- package/dist/executors.js +6 -6
- package/dist/executors.mjs +6 -6
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +2 -2
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/src/base/index.js +3 -3
- package/dist/src/base/index.mjs +2 -2
- package/dist/src/base/terraform-executor.js +3 -3
- package/dist/src/base/terraform-executor.mjs +2 -2
- package/dist/src/executors/apply/executor.js +4 -4
- package/dist/src/executors/apply/executor.mjs +3 -3
- package/dist/src/executors/destroy/executor.js +4 -4
- package/dist/src/executors/destroy/executor.mjs +3 -3
- package/dist/src/executors/output/executor.js +4 -4
- package/dist/src/executors/output/executor.mjs +3 -3
- package/dist/src/executors/plan/executor.js +4 -4
- package/dist/src/executors/plan/executor.mjs +3 -3
- package/dist/src/generators/init/init.js +3 -3
- package/dist/src/generators/init/init.mjs +2 -2
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
var _chunkZW3ZP7CVjs = require('./chunk-ZW3ZP7CV.js');
|
|
20
|
+
var _chunkDNKGKYNGjs = require('./chunk-DNKGKYNG.js');
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
|
|
@@ -159,7 +158,7 @@ async function cargoBuildExecutor(options, context2) {
|
|
|
159
158
|
return await cargoCommand(...command);
|
|
160
159
|
}
|
|
161
160
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoBuildExecutor, "cargoBuildExecutor");
|
|
162
|
-
var executor_default =
|
|
161
|
+
var executor_default = _chunkDNKGKYNGjs.withRunExecutor.call(void 0, "Cargo Build", cargoBuildExecutor, {
|
|
163
162
|
skipReadingConfig: false,
|
|
164
163
|
hooks: {
|
|
165
164
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -176,7 +175,7 @@ async function cargoCheckExecutor(options, context2) {
|
|
|
176
175
|
return await cargoCommand(...command);
|
|
177
176
|
}
|
|
178
177
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoCheckExecutor, "cargoCheckExecutor");
|
|
179
|
-
var executor_default2 =
|
|
178
|
+
var executor_default2 = _chunkDNKGKYNGjs.withRunExecutor.call(void 0, "Cargo Check", cargoCheckExecutor, {
|
|
180
179
|
skipReadingConfig: false,
|
|
181
180
|
hooks: {
|
|
182
181
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -192,7 +191,7 @@ async function cargoClippyExecutor(options, context2) {
|
|
|
192
191
|
return await cargoCommand(...command);
|
|
193
192
|
}
|
|
194
193
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoClippyExecutor, "cargoClippyExecutor");
|
|
195
|
-
var executor_default3 =
|
|
194
|
+
var executor_default3 = _chunkDNKGKYNGjs.withRunExecutor.call(void 0, "Cargo Clippy", cargoClippyExecutor, {
|
|
196
195
|
skipReadingConfig: false,
|
|
197
196
|
hooks: {
|
|
198
197
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -213,7 +212,7 @@ async function cargoDocExecutor(options, context2) {
|
|
|
213
212
|
return await cargoCommand(...command);
|
|
214
213
|
}
|
|
215
214
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoDocExecutor, "cargoDocExecutor");
|
|
216
|
-
var executor_default4 =
|
|
215
|
+
var executor_default4 = _chunkDNKGKYNGjs.withRunExecutor.call(void 0, "Cargo Doc", cargoDocExecutor, {
|
|
217
216
|
skipReadingConfig: false,
|
|
218
217
|
hooks: {
|
|
219
218
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -236,7 +235,7 @@ async function cargoFormatExecutor(options, context2) {
|
|
|
236
235
|
return await cargoCommand(...command);
|
|
237
236
|
}
|
|
238
237
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoFormatExecutor, "cargoFormatExecutor");
|
|
239
|
-
var executor_default5 =
|
|
238
|
+
var executor_default5 = _chunkDNKGKYNGjs.withRunExecutor.call(void 0, "Cargo Format", cargoFormatExecutor, {
|
|
240
239
|
skipReadingConfig: false,
|
|
241
240
|
hooks: {
|
|
242
241
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -300,10 +299,10 @@ var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(
|
|
|
300
299
|
var readNxConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot3) => {
|
|
301
300
|
let rootDir = workspaceRoot3;
|
|
302
301
|
if (!rootDir) {
|
|
303
|
-
const config = await
|
|
302
|
+
const config = await _chunkDNKGKYNGjs.loadStormConfig.call(void 0, );
|
|
304
303
|
rootDir = config.workspaceRoot;
|
|
305
304
|
}
|
|
306
|
-
const nxJsonPath =
|
|
305
|
+
const nxJsonPath = _chunkDNKGKYNGjs.joinPaths.call(void 0, rootDir, "nx.json");
|
|
307
306
|
if (!_fs.existsSync.call(void 0, nxJsonPath)) {
|
|
308
307
|
throw new Error("Cannot find project.json configuration");
|
|
309
308
|
}
|
|
@@ -312,7 +311,7 @@ var readNxConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (w
|
|
|
312
311
|
}, "readNxConfig");
|
|
313
312
|
|
|
314
313
|
// ../build-tools/src/utilities/copy-assets.ts
|
|
315
|
-
var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, assets, outputPath, projectRoot, projectName, sourceRoot,
|
|
314
|
+
var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
|
|
316
315
|
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
317
316
|
if (!_optionalChain([pendingAssets, 'optionalAccess', _5 => _5.some, 'call', _6 => _6((asset) => _optionalChain([asset, 'optionalAccess', _7 => _7.glob]) === "*.md")])) {
|
|
318
317
|
pendingAssets.push({
|
|
@@ -321,7 +320,7 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
321
320
|
output: "/"
|
|
322
321
|
});
|
|
323
322
|
}
|
|
324
|
-
if (
|
|
323
|
+
if (generatePackageJson3 === false) {
|
|
325
324
|
pendingAssets.push({
|
|
326
325
|
input: sourceRoot,
|
|
327
326
|
glob: "package.json",
|
|
@@ -350,7 +349,7 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
350
349
|
}
|
|
351
350
|
const buildTarget = _optionalChain([projectsConfigurations, 'access', _13 => _13.projects, 'access', _14 => _14[projectName], 'access', _15 => _15.targets, 'optionalAccess', _16 => _16.build]);
|
|
352
351
|
if (!buildTarget) {
|
|
353
|
-
throw new Error(`The Build process failed because the project does not have a valid build target in the project.json file. Check if the file exists in the root of the project at ${
|
|
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 ${_chunkDNKGKYNGjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
|
|
354
353
|
}
|
|
355
354
|
const result = await _js.copyAssets.call(void 0, {
|
|
356
355
|
assets,
|
|
@@ -365,18 +364,18 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
365
364
|
projectsConfigurations,
|
|
366
365
|
nxJsonConfiguration: nxJson,
|
|
367
366
|
cwd: config.workspaceRoot,
|
|
368
|
-
isVerbose:
|
|
367
|
+
isVerbose: _chunkDNKGKYNGjs.isVerbose.call(void 0, config.logLevel)
|
|
369
368
|
});
|
|
370
369
|
if (!result.success) {
|
|
371
370
|
throw new Error("The Build process failed trying to copy assets");
|
|
372
371
|
}
|
|
373
372
|
if (includeSrc === true) {
|
|
374
|
-
|
|
373
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkDNKGKYNGjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
375
374
|
const files = await _glob.glob.call(void 0, [
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
375
|
+
_chunkDNKGKYNGjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
376
|
+
_chunkDNKGKYNGjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
377
|
+
_chunkDNKGKYNGjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
378
|
+
_chunkDNKGKYNGjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
380
379
|
]);
|
|
381
380
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
382
381
|
|
|
@@ -398,7 +397,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
398
397
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
|
|
399
398
|
const projectNode = project.node;
|
|
400
399
|
if (projectNode.data.root) {
|
|
401
|
-
const projectPackageJsonPath =
|
|
400
|
+
const projectPackageJsonPath = _chunkDNKGKYNGjs.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
|
|
402
401
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
403
402
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
404
403
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -409,7 +408,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
409
408
|
}
|
|
410
409
|
}
|
|
411
410
|
if (localPackages.length > 0) {
|
|
412
|
-
|
|
411
|
+
_chunkDNKGKYNGjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
413
412
|
packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
|
|
414
413
|
if (!ret[localPackage.name]) {
|
|
415
414
|
ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
|
|
@@ -431,13 +430,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
431
430
|
return ret;
|
|
432
431
|
}, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
|
|
433
432
|
} else {
|
|
434
|
-
|
|
433
|
+
_chunkDNKGKYNGjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
435
434
|
}
|
|
436
435
|
return packageJson;
|
|
437
436
|
}, "addPackageDependencies");
|
|
438
437
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
439
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
440
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
438
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkDNKGKYNGjs.findWorkspaceRoot.call(void 0, );
|
|
439
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkDNKGKYNGjs.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
441
440
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
442
441
|
packageJson.type ??= "module";
|
|
443
442
|
packageJson.sideEffects ??= false;
|
|
@@ -446,7 +445,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
446
445
|
if (distSrc.startsWith("/")) {
|
|
447
446
|
distSrc = distSrc.substring(1);
|
|
448
447
|
}
|
|
449
|
-
packageJson.source ??= `${
|
|
448
|
+
packageJson.source ??= `${_chunkDNKGKYNGjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
450
449
|
}
|
|
451
450
|
packageJson.files ??= [
|
|
452
451
|
"dist/**/*"
|
|
@@ -477,7 +476,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
477
476
|
];
|
|
478
477
|
}
|
|
479
478
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
480
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
479
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkDNKGKYNGjs.joinPaths.call(void 0, "packages", projectName);
|
|
481
480
|
return packageJson;
|
|
482
481
|
}, "addWorkspacePackageJsonFields");
|
|
483
482
|
var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
@@ -500,39 +499,11 @@ var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
500
499
|
}
|
|
501
500
|
};
|
|
502
501
|
}, "addPackageJsonExport");
|
|
503
|
-
var addPackageJsonExports = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (sourceRoot, packageJson) => {
|
|
504
|
-
packageJson.exports ??= {};
|
|
505
|
-
const files = await new (0, _glob.Glob)("**/*.{ts,tsx}", {
|
|
506
|
-
absolute: false,
|
|
507
|
-
cwd: sourceRoot,
|
|
508
|
-
root: sourceRoot
|
|
509
|
-
}).walk();
|
|
510
|
-
files.forEach((file) => {
|
|
511
|
-
addPackageJsonExport(file, packageJson.type, sourceRoot);
|
|
512
|
-
const split = file.split(".");
|
|
513
|
-
split.pop();
|
|
514
|
-
const entry = split.join(".").replaceAll("\\", "/");
|
|
515
|
-
packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, sourceRoot);
|
|
516
|
-
});
|
|
517
|
-
packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
518
|
-
packageJson.module = packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
|
|
519
|
-
packageJson.types = "./dist/index.d.ts";
|
|
520
|
-
packageJson.exports ??= {};
|
|
521
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
|
|
522
|
-
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
523
|
-
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
524
|
-
}
|
|
525
|
-
return ret;
|
|
526
|
-
}, packageJson.exports);
|
|
527
|
-
packageJson.exports["./package.json"] ??= "./package.json";
|
|
528
|
-
packageJson.exports["."] = _nullishCoalesce(packageJson.exports["."], () => ( addPackageJsonExport("index", packageJson.type, sourceRoot)));
|
|
529
|
-
return packageJson;
|
|
530
|
-
}, "addPackageJsonExports");
|
|
531
502
|
|
|
532
503
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
533
504
|
|
|
534
505
|
var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
535
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
506
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkDNKGKYNGjs.findWorkspaceRoot.call(void 0, );
|
|
536
507
|
const entryPoints = [];
|
|
537
508
|
if (entry) {
|
|
538
509
|
if (Array.isArray(entry)) {
|
|
@@ -544,7 +515,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
544
515
|
}
|
|
545
516
|
}
|
|
546
517
|
if (emitOnAll) {
|
|
547
|
-
entryPoints.push(
|
|
518
|
+
entryPoints.push(_chunkDNKGKYNGjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
548
519
|
}
|
|
549
520
|
const results = [];
|
|
550
521
|
for (const entryPoint in entryPoints) {
|
|
@@ -553,9 +524,9 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
553
524
|
withFileTypes: true
|
|
554
525
|
});
|
|
555
526
|
results.push(...files.reduce((ret, filePath) => {
|
|
556
|
-
const result =
|
|
527
|
+
const result = _chunkDNKGKYNGjs.correctPaths.call(void 0, _chunkDNKGKYNGjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkDNKGKYNGjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkDNKGKYNGjs.correctPaths.call(void 0, projectRoot), ""));
|
|
557
528
|
if (result) {
|
|
558
|
-
|
|
529
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkDNKGKYNGjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
559
530
|
if (!results.includes(result)) {
|
|
560
531
|
results.push(result);
|
|
561
532
|
}
|
|
@@ -761,8 +732,8 @@ var RendererEngine = class {
|
|
|
761
732
|
// ../esbuild/src/clean.ts
|
|
762
733
|
|
|
763
734
|
async function clean(name = "ESBuild", directory, config) {
|
|
764
|
-
|
|
765
|
-
const stopwatch =
|
|
735
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
736
|
+
const stopwatch = _chunkDNKGKYNGjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
766
737
|
await _node.hfs.deleteAll(directory);
|
|
767
738
|
stopwatch();
|
|
768
739
|
}
|
|
@@ -772,8 +743,8 @@ _chunk3GQAWCBQjs.__name.call(void 0, clean, "clean");
|
|
|
772
743
|
|
|
773
744
|
var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
774
745
|
name: "storm:esm-split-code-to-cjs",
|
|
775
|
-
setup(
|
|
776
|
-
|
|
746
|
+
setup(build5) {
|
|
747
|
+
build5.onEnd(async (result) => {
|
|
777
748
|
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _25 => _25.metafile, 'optionalAccess', _26 => _26.outputs]), () => ( {})));
|
|
778
749
|
const jsFiles = outFiles.filter((f) => f.endsWith("js"));
|
|
779
750
|
await esbuild.build({
|
|
@@ -791,15 +762,15 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
|
|
|
791
762
|
// ../esbuild/src/plugins/fix-imports.ts
|
|
792
763
|
var fixImportsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
793
764
|
name: "storm:fix-imports",
|
|
794
|
-
setup(
|
|
795
|
-
|
|
765
|
+
setup(build5) {
|
|
766
|
+
build5.onResolve({
|
|
796
767
|
filter: /^spdx-exceptions/
|
|
797
768
|
}, () => {
|
|
798
769
|
return {
|
|
799
770
|
path: _chunk3GQAWCBQjs.__require.resolve("spdx-exceptions")
|
|
800
771
|
};
|
|
801
772
|
});
|
|
802
|
-
|
|
773
|
+
build5.onResolve({
|
|
803
774
|
filter: /^spdx-license-ids/
|
|
804
775
|
}, () => {
|
|
805
776
|
return {
|
|
@@ -814,8 +785,8 @@ var fixImportsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (opt
|
|
|
814
785
|
var nativeNodeModulesPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => {
|
|
815
786
|
return {
|
|
816
787
|
name: "native-node-modules",
|
|
817
|
-
setup(
|
|
818
|
-
|
|
788
|
+
setup(build5) {
|
|
789
|
+
build5.onResolve({
|
|
819
790
|
filter: /\.node$/,
|
|
820
791
|
namespace: "file"
|
|
821
792
|
}, (args) => {
|
|
@@ -834,7 +805,7 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
|
|
|
834
805
|
path: resolvedId
|
|
835
806
|
};
|
|
836
807
|
});
|
|
837
|
-
|
|
808
|
+
build5.onLoad({
|
|
838
809
|
filter: /.*/,
|
|
839
810
|
namespace: "node-file"
|
|
840
811
|
}, (args) => {
|
|
@@ -847,14 +818,14 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
|
|
|
847
818
|
resolveDir: _path.dirname.call(void 0, args.path)
|
|
848
819
|
};
|
|
849
820
|
});
|
|
850
|
-
|
|
821
|
+
build5.onResolve({
|
|
851
822
|
filter: /\.node$/,
|
|
852
823
|
namespace: "node-file"
|
|
853
824
|
}, (args) => ({
|
|
854
825
|
path: args.path,
|
|
855
826
|
namespace: "file"
|
|
856
827
|
}));
|
|
857
|
-
const opts =
|
|
828
|
+
const opts = build5.initialOptions;
|
|
858
829
|
opts.loader = opts.loader || {};
|
|
859
830
|
opts.loader[".node"] = "file";
|
|
860
831
|
}
|
|
@@ -880,10 +851,10 @@ var nodeProtocolPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (o
|
|
|
880
851
|
// ../esbuild/src/plugins/on-error.ts
|
|
881
852
|
var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
882
853
|
name: "storm:on-error",
|
|
883
|
-
setup(
|
|
884
|
-
|
|
854
|
+
setup(build5) {
|
|
855
|
+
build5.onEnd((result) => {
|
|
885
856
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
886
|
-
|
|
857
|
+
_chunkDNKGKYNGjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
887
858
|
${result.errors.map((error) => error.text).join("\n")}
|
|
888
859
|
|
|
889
860
|
`, resolvedOptions.config);
|
|
@@ -917,14 +888,14 @@ function resolvePathsConfig(options, cwd) {
|
|
|
917
888
|
_chunk3GQAWCBQjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
918
889
|
var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
919
890
|
name: "storm:resolve-paths",
|
|
920
|
-
setup(
|
|
921
|
-
const parentTsConfig =
|
|
891
|
+
setup(build5) {
|
|
892
|
+
const parentTsConfig = build5.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0, _chunkDNKGKYNGjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build5.initialOptions.tsconfig)) : _chunk3GQAWCBQjs.__require.call(void 0, _chunkDNKGKYNGjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
922
893
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
923
894
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
924
|
-
|
|
895
|
+
build5.onResolve({
|
|
925
896
|
filter: packagesRegex
|
|
926
897
|
}, (args) => {
|
|
927
|
-
if (_optionalChain([
|
|
898
|
+
if (_optionalChain([build5, 'access', _29 => _29.initialOptions, 'access', _30 => _30.external, 'optionalAccess', _31 => _31.includes, 'call', _32 => _32(args.path)])) {
|
|
928
899
|
return {
|
|
929
900
|
path: args.path,
|
|
930
901
|
external: true
|
|
@@ -941,7 +912,7 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (o
|
|
|
941
912
|
|
|
942
913
|
var _apiextractor = require('@microsoft/api-extractor');
|
|
943
914
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
944
|
-
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0,
|
|
915
|
+
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0, _chunkDNKGKYNGjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
945
916
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
946
917
|
p,
|
|
947
918
|
getTypeDependencyPackageName(p)
|
|
@@ -977,13 +948,13 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
977
948
|
},
|
|
978
949
|
dtsRollup: {
|
|
979
950
|
enabled: true,
|
|
980
|
-
untrimmedFilePath:
|
|
951
|
+
untrimmedFilePath: _chunkDNKGKYNGjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
981
952
|
},
|
|
982
953
|
tsdocMetadata: {
|
|
983
954
|
enabled: false
|
|
984
955
|
}
|
|
985
956
|
},
|
|
986
|
-
packageJsonFullPath:
|
|
957
|
+
packageJsonFullPath: _chunkDNKGKYNGjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
987
958
|
configObjectFullPath: void 0
|
|
988
959
|
});
|
|
989
960
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -991,31 +962,31 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
991
962
|
localBuild: true
|
|
992
963
|
});
|
|
993
964
|
if (extractorResult.succeeded === false) {
|
|
994
|
-
|
|
965
|
+
_chunkDNKGKYNGjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
995
966
|
throw new Error("API Extractor completed with errors");
|
|
996
967
|
}
|
|
997
968
|
}
|
|
998
969
|
_chunk3GQAWCBQjs.__name.call(void 0, bundleTypeDefinitions, "bundleTypeDefinitions");
|
|
999
970
|
var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
1000
971
|
name: "storm:tsc",
|
|
1001
|
-
setup(
|
|
972
|
+
setup(build5) {
|
|
1002
973
|
if (options.emitTypes === false) {
|
|
1003
974
|
return;
|
|
1004
975
|
}
|
|
1005
|
-
|
|
976
|
+
build5.onStart(async () => {
|
|
1006
977
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
1007
|
-
await
|
|
978
|
+
await _chunkDNKGKYNGjs.run.call(void 0, resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
1008
979
|
}
|
|
1009
980
|
if (resolvedOptions.bundle && resolvedOptions.entryPoints && resolvedOptions.entryPoints.length > 0 && resolvedOptions.entryPoints[0] && resolvedOptions.entryPoints[0].endsWith(".ts")) {
|
|
1010
981
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
1011
982
|
const typeOutDir = resolvedOptions.outdir;
|
|
1012
983
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
1013
|
-
const bundlePath =
|
|
984
|
+
const bundlePath = _chunkDNKGKYNGjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
1014
985
|
let dtsPath;
|
|
1015
|
-
if (await _node.hfs.isFile(
|
|
1016
|
-
dtsPath =
|
|
1017
|
-
} else if (await _node.hfs.isFile(
|
|
1018
|
-
dtsPath =
|
|
986
|
+
if (await _node.hfs.isFile(_chunkDNKGKYNGjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
987
|
+
dtsPath = _chunkDNKGKYNGjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
988
|
+
} else if (await _node.hfs.isFile(_chunkDNKGKYNGjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
989
|
+
dtsPath = _chunkDNKGKYNGjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
1019
990
|
}
|
|
1020
991
|
const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
1021
992
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -1125,7 +1096,7 @@ var missingIgnore = [
|
|
|
1125
1096
|
];
|
|
1126
1097
|
var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bundle) => ({
|
|
1127
1098
|
name: "storm:deps-check",
|
|
1128
|
-
setup(
|
|
1099
|
+
setup(build5) {
|
|
1129
1100
|
const pkgJsonPath = path6.default.join(process.cwd(), "package.json");
|
|
1130
1101
|
const pkgContents = _chunk3GQAWCBQjs.__require.call(void 0, pkgJsonPath);
|
|
1131
1102
|
const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
|
|
@@ -1137,7 +1108,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
1137
1108
|
];
|
|
1138
1109
|
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
1139
1110
|
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
1140
|
-
|
|
1111
|
+
build5.onResolve({
|
|
1141
1112
|
filter: onlyPackages
|
|
1142
1113
|
}, (args) => {
|
|
1143
1114
|
if (args.importer.includes(process.cwd())) {
|
|
@@ -1153,7 +1124,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
1153
1124
|
external: true
|
|
1154
1125
|
};
|
|
1155
1126
|
});
|
|
1156
|
-
|
|
1127
|
+
build5.onEnd(() => {
|
|
1157
1128
|
const unusedDependencies = [
|
|
1158
1129
|
...dependencies
|
|
1159
1130
|
].filter((dep) => {
|
|
@@ -1170,8 +1141,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
1170
1141
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
1171
1142
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
1172
1143
|
});
|
|
1173
|
-
|
|
1174
|
-
|
|
1144
|
+
_chunkDNKGKYNGjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
1145
|
+
_chunkDNKGKYNGjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
1175
1146
|
if (filteredMissingDeps.length > 0) {
|
|
1176
1147
|
throw new Error(`Missing dependencies detected - please install them:
|
|
1177
1148
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1265,13 +1236,13 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1265
1236
|
if (!workspaceRoot3) {
|
|
1266
1237
|
throw new Error("Cannot find Nx workspace root");
|
|
1267
1238
|
}
|
|
1268
|
-
const config = await
|
|
1269
|
-
|
|
1270
|
-
const stopwatch =
|
|
1239
|
+
const config = await _chunkDNKGKYNGjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
|
|
1240
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1241
|
+
const stopwatch = _chunkDNKGKYNGjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1271
1242
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1272
1243
|
exitOnError: true
|
|
1273
1244
|
});
|
|
1274
|
-
const projectJsonPath =
|
|
1245
|
+
const projectJsonPath = _chunkDNKGKYNGjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1275
1246
|
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
1276
1247
|
throw new Error("Cannot find project.json configuration");
|
|
1277
1248
|
}
|
|
@@ -1284,7 +1255,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1284
1255
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
1285
1256
|
options.name ??= `${projectName}-${options.format}`;
|
|
1286
1257
|
options.target ??= DEFAULT_TARGET;
|
|
1287
|
-
const packageJsonPath =
|
|
1258
|
+
const packageJsonPath = _chunkDNKGKYNGjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1288
1259
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1289
1260
|
throw new Error("Cannot find package.json configuration");
|
|
1290
1261
|
}
|
|
@@ -1308,20 +1279,20 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1308
1279
|
".node"
|
|
1309
1280
|
],
|
|
1310
1281
|
...userOptions,
|
|
1311
|
-
tsconfig:
|
|
1282
|
+
tsconfig: _chunkDNKGKYNGjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1312
1283
|
format: options.format || "cjs",
|
|
1313
1284
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1314
1285
|
"./src/index.ts"
|
|
1315
1286
|
], userOptions.emitOnAll),
|
|
1316
|
-
outdir: userOptions.outputPath ||
|
|
1287
|
+
outdir: userOptions.outputPath || _chunkDNKGKYNGjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1317
1288
|
plugins: [],
|
|
1318
1289
|
name: userOptions.name || projectName,
|
|
1319
1290
|
projectConfigurations,
|
|
1320
1291
|
projectName,
|
|
1321
1292
|
projectGraph,
|
|
1322
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1293
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkDNKGKYNGjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1323
1294
|
minify: userOptions.minify || !userOptions.debug,
|
|
1324
|
-
verbose: userOptions.verbose ||
|
|
1295
|
+
verbose: userOptions.verbose || _chunkDNKGKYNGjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1325
1296
|
includeSrc: userOptions.includeSrc === true,
|
|
1326
1297
|
metafile: userOptions.metafile !== false,
|
|
1327
1298
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1357,8 +1328,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1357
1328
|
}, {})
|
|
1358
1329
|
},
|
|
1359
1330
|
inject: [
|
|
1360
|
-
options.format === "cjs" && options.injectShims ?
|
|
1361
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ?
|
|
1331
|
+
options.format === "cjs" && options.injectShims ? _chunkDNKGKYNGjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
|
|
1332
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkDNKGKYNGjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : "",
|
|
1362
1333
|
..._nullishCoalesce(options.inject, () => ( []))
|
|
1363
1334
|
].filter(Boolean)
|
|
1364
1335
|
};
|
|
@@ -1367,14 +1338,14 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1367
1338
|
return result;
|
|
1368
1339
|
}, "resolveOptions");
|
|
1369
1340
|
async function generatePackageJson(context2) {
|
|
1370
|
-
if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(
|
|
1371
|
-
|
|
1372
|
-
const stopwatch =
|
|
1373
|
-
const packageJsonPath =
|
|
1341
|
+
if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(_chunkDNKGKYNGjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
1342
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
1343
|
+
const stopwatch = _chunkDNKGKYNGjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1344
|
+
const packageJsonPath = _chunkDNKGKYNGjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
1374
1345
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1375
1346
|
throw new Error("Cannot find package.json configuration");
|
|
1376
1347
|
}
|
|
1377
|
-
let packageJson = await _node.hfs.json(
|
|
1348
|
+
let packageJson = await _node.hfs.json(_chunkDNKGKYNGjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"));
|
|
1378
1349
|
if (!packageJson) {
|
|
1379
1350
|
throw new Error("Cannot find package.json configuration file");
|
|
1380
1351
|
}
|
|
@@ -1412,7 +1383,7 @@ async function generatePackageJson(context2) {
|
|
|
1412
1383
|
}
|
|
1413
1384
|
return ret;
|
|
1414
1385
|
}, packageJson.exports);
|
|
1415
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1386
|
+
await _devkit.writeJsonFile.call(void 0, _chunkDNKGKYNGjs.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
|
|
1416
1387
|
stopwatch();
|
|
1417
1388
|
}
|
|
1418
1389
|
return context2;
|
|
@@ -1438,8 +1409,8 @@ async function generateContext(getOptions) {
|
|
|
1438
1409
|
}
|
|
1439
1410
|
_chunk3GQAWCBQjs.__name.call(void 0, generateContext, "generateContext");
|
|
1440
1411
|
async function executeEsBuild(context2) {
|
|
1441
|
-
|
|
1442
|
-
const stopwatch =
|
|
1412
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
1413
|
+
const stopwatch = _chunkDNKGKYNGjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
1443
1414
|
if (process.env.WATCH === "true") {
|
|
1444
1415
|
const ctx = await esbuild2.context(context2.options);
|
|
1445
1416
|
watch(ctx, context2.options);
|
|
@@ -1455,8 +1426,8 @@ async function executeEsBuild(context2) {
|
|
|
1455
1426
|
_chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
1456
1427
|
async function copyBuildAssets(context2) {
|
|
1457
1428
|
if (_optionalChain([context2, 'access', _41 => _41.result, 'optionalAccess', _42 => _42.errors, 'access', _43 => _43.length]) === 0) {
|
|
1458
|
-
|
|
1459
|
-
const stopwatch =
|
|
1429
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
1430
|
+
const stopwatch = _chunkDNKGKYNGjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1460
1431
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.projectName, context2.options.sourceRoot, true, false);
|
|
1461
1432
|
stopwatch();
|
|
1462
1433
|
}
|
|
@@ -1466,9 +1437,9 @@ _chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
1466
1437
|
async function reportResults(context2) {
|
|
1467
1438
|
if (_optionalChain([context2, 'access', _44 => _44.result, 'optionalAccess', _45 => _45.errors, 'access', _46 => _46.length]) === 0) {
|
|
1468
1439
|
if (context2.result.warnings.length > 0) {
|
|
1469
|
-
|
|
1440
|
+
_chunkDNKGKYNGjs.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
|
|
1470
1441
|
}
|
|
1471
|
-
|
|
1442
|
+
_chunkDNKGKYNGjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
1472
1443
|
}
|
|
1473
1444
|
}
|
|
1474
1445
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -1510,8 +1481,8 @@ async function cleanOutputPath(context2) {
|
|
|
1510
1481
|
}
|
|
1511
1482
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1512
1483
|
async function build3(options) {
|
|
1513
|
-
|
|
1514
|
-
const stopwatch =
|
|
1484
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1485
|
+
const stopwatch = _chunkDNKGKYNGjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1515
1486
|
try {
|
|
1516
1487
|
const opts = Array.isArray(options) ? options : [
|
|
1517
1488
|
options
|
|
@@ -1521,9 +1492,9 @@ async function build3(options) {
|
|
|
1521
1492
|
}
|
|
1522
1493
|
void transduce.async(opts, dependencyCheck);
|
|
1523
1494
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
1524
|
-
|
|
1495
|
+
_chunkDNKGKYNGjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1525
1496
|
} catch (error) {
|
|
1526
|
-
|
|
1497
|
+
_chunkDNKGKYNGjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1527
1498
|
throw error;
|
|
1528
1499
|
} finally {
|
|
1529
1500
|
stopwatch();
|
|
@@ -1551,9 +1522,9 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1551
1522
|
return context2.rebuild();
|
|
1552
1523
|
});
|
|
1553
1524
|
if (rebuildResult instanceof Error) {
|
|
1554
|
-
|
|
1525
|
+
_chunkDNKGKYNGjs.writeError.call(void 0, rebuildResult.message);
|
|
1555
1526
|
}
|
|
1556
|
-
|
|
1527
|
+
_chunkDNKGKYNGjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
1557
1528
|
}, 10);
|
|
1558
1529
|
changeWatcher.on("change", fastRebuild);
|
|
1559
1530
|
return void 0;
|
|
@@ -1561,7 +1532,7 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1561
1532
|
|
|
1562
1533
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1563
1534
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1564
|
-
|
|
1535
|
+
_chunkDNKGKYNGjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1565
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])) {
|
|
1566
1537
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1567
1538
|
}
|
|
@@ -1578,7 +1549,7 @@ async function esbuildExecutorFn(options, context2, config) {
|
|
|
1578
1549
|
};
|
|
1579
1550
|
}
|
|
1580
1551
|
_chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
|
|
1581
|
-
var executor_default6 =
|
|
1552
|
+
var executor_default6 = _chunkDNKGKYNGjs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
|
|
1582
1553
|
skipReadingConfig: false,
|
|
1583
1554
|
hooks: {
|
|
1584
1555
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1615,7 +1586,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1615
1586
|
if (!_optionalChain([context2, 'optionalAccess', _61 => _61.projectName]) || !_optionalChain([context2, 'access', _62 => _62.projectsConfigurations, 'optionalAccess', _63 => _63.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1616
1587
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
1617
1588
|
}
|
|
1618
|
-
|
|
1589
|
+
_chunkDNKGKYNGjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
1619
1590
|
_sizelimit2.default.call(void 0, [
|
|
1620
1591
|
_file2.default,
|
|
1621
1592
|
_esbuild3.default,
|
|
@@ -1623,14 +1594,14 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1623
1594
|
], {
|
|
1624
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")))
|
|
1625
1596
|
}).then((result) => {
|
|
1626
|
-
|
|
1597
|
+
_chunkDNKGKYNGjs.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
1627
1598
|
});
|
|
1628
1599
|
return {
|
|
1629
1600
|
success: true
|
|
1630
1601
|
};
|
|
1631
1602
|
}
|
|
1632
1603
|
_chunk3GQAWCBQjs.__name.call(void 0, sizeLimitExecutorFn, "sizeLimitExecutorFn");
|
|
1633
|
-
var executor_default7 =
|
|
1604
|
+
var executor_default7 = _chunkDNKGKYNGjs.withRunExecutor.call(void 0, "Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
|
|
1634
1605
|
skipReadingConfig: false,
|
|
1635
1606
|
hooks: {
|
|
1636
1607
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1649,8 +1620,8 @@ var _tsdown = require('tsdown');
|
|
|
1649
1620
|
// ../tsdown/src/clean.ts
|
|
1650
1621
|
|
|
1651
1622
|
async function clean2(name = "ESBuild", directory, config) {
|
|
1652
|
-
|
|
1653
|
-
const stopwatch =
|
|
1623
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
1624
|
+
const stopwatch = _chunkDNKGKYNGjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
1654
1625
|
await _node.hfs.deleteAll(directory);
|
|
1655
1626
|
stopwatch();
|
|
1656
1627
|
}
|
|
@@ -1685,13 +1656,13 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1685
1656
|
if (!workspaceRoot3) {
|
|
1686
1657
|
throw new Error("Cannot find Nx workspace root");
|
|
1687
1658
|
}
|
|
1688
|
-
const config = await
|
|
1689
|
-
|
|
1690
|
-
const stopwatch =
|
|
1659
|
+
const config = await _chunkDNKGKYNGjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
|
|
1660
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1661
|
+
const stopwatch = _chunkDNKGKYNGjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1691
1662
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1692
1663
|
exitOnError: true
|
|
1693
1664
|
});
|
|
1694
|
-
const projectJsonPath =
|
|
1665
|
+
const projectJsonPath = _chunkDNKGKYNGjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1695
1666
|
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
1696
1667
|
throw new Error("Cannot find project.json configuration");
|
|
1697
1668
|
}
|
|
@@ -1704,7 +1675,7 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1704
1675
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
|
|
1705
1676
|
options.name ??= `${projectName}-${options.format}`;
|
|
1706
1677
|
options.target ??= DEFAULT_TARGET;
|
|
1707
|
-
const packageJsonPath =
|
|
1678
|
+
const packageJsonPath = _chunkDNKGKYNGjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1708
1679
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1709
1680
|
throw new Error("Cannot find package.json configuration");
|
|
1710
1681
|
}
|
|
@@ -1713,20 +1684,20 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1713
1684
|
...options,
|
|
1714
1685
|
config,
|
|
1715
1686
|
...userOptions,
|
|
1716
|
-
tsconfig:
|
|
1687
|
+
tsconfig: _chunkDNKGKYNGjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1717
1688
|
format: options.format || "cjs",
|
|
1718
1689
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1719
1690
|
"./src/index.ts"
|
|
1720
1691
|
], userOptions.emitOnAll),
|
|
1721
|
-
outdir: userOptions.outputPath ||
|
|
1692
|
+
outdir: userOptions.outputPath || _chunkDNKGKYNGjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1722
1693
|
plugins: [],
|
|
1723
1694
|
name: userOptions.name || projectName,
|
|
1724
1695
|
projectConfigurations,
|
|
1725
1696
|
projectName,
|
|
1726
1697
|
projectGraph,
|
|
1727
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1698
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkDNKGKYNGjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1728
1699
|
minify: userOptions.minify || !userOptions.debug,
|
|
1729
|
-
verbose: userOptions.verbose ||
|
|
1700
|
+
verbose: userOptions.verbose || _chunkDNKGKYNGjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1730
1701
|
includeSrc: userOptions.includeSrc === true,
|
|
1731
1702
|
metafile: userOptions.metafile !== false,
|
|
1732
1703
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1760,14 +1731,14 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1760
1731
|
return result;
|
|
1761
1732
|
}, "resolveOptions");
|
|
1762
1733
|
async function generatePackageJson2(options) {
|
|
1763
|
-
if (options.generatePackageJson !== false && await _node.hfs.isFile(
|
|
1764
|
-
|
|
1765
|
-
const stopwatch =
|
|
1766
|
-
const packageJsonPath =
|
|
1734
|
+
if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkDNKGKYNGjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1735
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1736
|
+
const stopwatch = _chunkDNKGKYNGjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1737
|
+
const packageJsonPath = _chunkDNKGKYNGjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1767
1738
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1768
1739
|
throw new Error("Cannot find package.json configuration");
|
|
1769
1740
|
}
|
|
1770
|
-
let packageJson = await _node.hfs.json(
|
|
1741
|
+
let packageJson = await _node.hfs.json(_chunkDNKGKYNGjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
|
|
1771
1742
|
if (!packageJson) {
|
|
1772
1743
|
throw new Error("Cannot find package.json configuration file");
|
|
1773
1744
|
}
|
|
@@ -1805,15 +1776,15 @@ async function generatePackageJson2(options) {
|
|
|
1805
1776
|
}
|
|
1806
1777
|
return ret;
|
|
1807
1778
|
}, packageJson.exports);
|
|
1808
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1779
|
+
await _devkit.writeJsonFile.call(void 0, _chunkDNKGKYNGjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
1809
1780
|
stopwatch();
|
|
1810
1781
|
}
|
|
1811
1782
|
return options;
|
|
1812
1783
|
}
|
|
1813
1784
|
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson2, "generatePackageJson");
|
|
1814
1785
|
async function executeTSDown(options) {
|
|
1815
|
-
|
|
1816
|
-
const stopwatch =
|
|
1786
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
1787
|
+
const stopwatch = _chunkDNKGKYNGjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1817
1788
|
await _tsdown.build.call(void 0, {
|
|
1818
1789
|
...options,
|
|
1819
1790
|
entry: options.entryPoints,
|
|
@@ -1825,15 +1796,15 @@ async function executeTSDown(options) {
|
|
|
1825
1796
|
}
|
|
1826
1797
|
_chunk3GQAWCBQjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
1827
1798
|
async function copyBuildAssets2(options) {
|
|
1828
|
-
|
|
1829
|
-
const stopwatch =
|
|
1799
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
1800
|
+
const stopwatch = _chunkDNKGKYNGjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1830
1801
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.projectName, options.sourceRoot, true, false);
|
|
1831
1802
|
stopwatch();
|
|
1832
1803
|
return options;
|
|
1833
1804
|
}
|
|
1834
1805
|
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets2, "copyBuildAssets");
|
|
1835
1806
|
async function reportResults2(options) {
|
|
1836
|
-
|
|
1807
|
+
_chunkDNKGKYNGjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
1837
1808
|
}
|
|
1838
1809
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults2, "reportResults");
|
|
1839
1810
|
async function cleanOutputPath2(options) {
|
|
@@ -1844,8 +1815,8 @@ async function cleanOutputPath2(options) {
|
|
|
1844
1815
|
}
|
|
1845
1816
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath2, "cleanOutputPath");
|
|
1846
1817
|
async function build4(options) {
|
|
1847
|
-
|
|
1848
|
-
const stopwatch =
|
|
1818
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1819
|
+
const stopwatch = _chunkDNKGKYNGjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1849
1820
|
try {
|
|
1850
1821
|
const opts = Array.isArray(options) ? options : [
|
|
1851
1822
|
options
|
|
@@ -1863,11 +1834,11 @@ async function build4(options) {
|
|
|
1863
1834
|
await reportResults2(opt);
|
|
1864
1835
|
}));
|
|
1865
1836
|
} else {
|
|
1866
|
-
|
|
1837
|
+
_chunkDNKGKYNGjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
1867
1838
|
}
|
|
1868
|
-
|
|
1839
|
+
_chunkDNKGKYNGjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1869
1840
|
} catch (error) {
|
|
1870
|
-
|
|
1841
|
+
_chunkDNKGKYNGjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1871
1842
|
throw error;
|
|
1872
1843
|
} finally {
|
|
1873
1844
|
stopwatch();
|
|
@@ -1877,7 +1848,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, build4, "build");
|
|
|
1877
1848
|
|
|
1878
1849
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1879
1850
|
async function tsdownExecutorFn(options, context2, config) {
|
|
1880
|
-
|
|
1851
|
+
_chunkDNKGKYNGjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
|
|
1881
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])) {
|
|
1882
1853
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1883
1854
|
}
|
|
@@ -1894,7 +1865,7 @@ async function tsdownExecutorFn(options, context2, config) {
|
|
|
1894
1865
|
};
|
|
1895
1866
|
}
|
|
1896
1867
|
_chunk3GQAWCBQjs.__name.call(void 0, tsdownExecutorFn, "tsdownExecutorFn");
|
|
1897
|
-
var executor_default8 =
|
|
1868
|
+
var executor_default8 = _chunkDNKGKYNGjs.withRunExecutor.call(void 0, "Storm TSDown build executor", tsdownExecutorFn, {
|
|
1898
1869
|
skipReadingConfig: false,
|
|
1899
1870
|
hooks: {
|
|
1900
1871
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1913,11 +1884,11 @@ var _fsextra = require('fs-extra');
|
|
|
1913
1884
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1914
1885
|
async function typiaExecutorFn(options, _, config) {
|
|
1915
1886
|
if (options.clean !== false) {
|
|
1916
|
-
|
|
1887
|
+
_chunkDNKGKYNGjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1917
1888
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1918
1889
|
}
|
|
1919
1890
|
await Promise.all(options.entry.map((entry) => {
|
|
1920
|
-
|
|
1891
|
+
_chunkDNKGKYNGjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1921
1892
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1922
1893
|
input: entry,
|
|
1923
1894
|
output: options.outputPath,
|
|
@@ -1929,7 +1900,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
1929
1900
|
};
|
|
1930
1901
|
}
|
|
1931
1902
|
_chunk3GQAWCBQjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
|
|
1932
|
-
var executor_default9 =
|
|
1903
|
+
var executor_default9 = _chunkDNKGKYNGjs.withRunExecutor.call(void 0, "Typia runtime validation generator", typiaExecutorFn, {
|
|
1933
1904
|
skipReadingConfig: false,
|
|
1934
1905
|
hooks: {
|
|
1935
1906
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1944,429 +1915,20 @@ var executor_default9 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Typia run
|
|
|
1944
1915
|
}
|
|
1945
1916
|
});
|
|
1946
1917
|
|
|
1947
|
-
// ../unbuild/src/build.ts
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
var _jiti = require('jiti');
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
// ../unbuild/src/clean.ts
|
|
1959
|
-
|
|
1960
|
-
async function clean3(name = "Unbuild", directory, config) {
|
|
1961
|
-
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
1962
|
-
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
1963
|
-
await _promises.rm.call(void 0, directory, {
|
|
1964
|
-
recursive: true,
|
|
1965
|
-
force: true
|
|
1966
|
-
});
|
|
1967
|
-
stopwatch();
|
|
1968
|
-
}
|
|
1969
|
-
_chunk3GQAWCBQjs.__name.call(void 0, clean3, "clean");
|
|
1970
|
-
|
|
1971
|
-
// ../unbuild/src/plugins/analyze.ts
|
|
1972
|
-
var formatBytes = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bytes) => {
|
|
1973
|
-
if (bytes === 0) return "0 Byte";
|
|
1974
|
-
const k = 1e3;
|
|
1975
|
-
const dm = 3;
|
|
1976
|
-
const sizes = [
|
|
1977
|
-
"Bytes",
|
|
1978
|
-
"KB",
|
|
1979
|
-
"MB",
|
|
1980
|
-
"GB"
|
|
1981
|
-
];
|
|
1982
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
1983
|
-
return `${parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;
|
|
1984
|
-
}, "formatBytes");
|
|
1985
|
-
var analyzePlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => {
|
|
1986
|
-
return {
|
|
1987
|
-
name: "storm:analyzer",
|
|
1988
|
-
renderChunk(source, chunk) {
|
|
1989
|
-
const sourceBytes = formatBytes(source.length);
|
|
1990
|
-
const fileName = chunk.fileName;
|
|
1991
|
-
_chunkZW3ZP7CVjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, resolvedOptions.config);
|
|
1992
|
-
}
|
|
1993
|
-
};
|
|
1994
|
-
}, "analyzePlugin");
|
|
1995
|
-
|
|
1996
|
-
// ../unbuild/src/plugins/on-error.ts
|
|
1997
|
-
var onErrorPlugin2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
1998
|
-
name: "storm:on-error",
|
|
1999
|
-
buildEnd(error) {
|
|
2000
|
-
if (error) {
|
|
2001
|
-
_chunkZW3ZP7CVjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
2002
|
-
${error ? error.message : "Unknown build error"}
|
|
2003
|
-
|
|
2004
|
-
`, resolvedOptions.config);
|
|
2005
|
-
throw new Error("Storm unbuild process failed with errors.");
|
|
2006
|
-
}
|
|
2007
|
-
},
|
|
2008
|
-
renderError(error) {
|
|
2009
|
-
_chunkZW3ZP7CVjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
2010
|
-
${error ? error.message : "Unknown build error"}
|
|
2011
|
-
|
|
2012
|
-
`, resolvedOptions.config);
|
|
2013
|
-
throw new Error("Storm unbuild process failed with errors.");
|
|
2014
|
-
}
|
|
2015
|
-
}), "onErrorPlugin");
|
|
2016
|
-
|
|
2017
|
-
// ../unbuild/src/plugins/tsc.ts
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
var _compilerhelperdependency = require('@nx/js/src/utils/compiler-helper-dependency');
|
|
2021
|
-
var _rollupplugintypescript2 = require('rollup-plugin-typescript2'); var _rollupplugintypescript22 = _interopRequireDefault(_rollupplugintypescript2);
|
|
2022
|
-
|
|
2023
|
-
// ../unbuild/src/utilities/helpers.ts
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
var _url = require('url');
|
|
2028
|
-
var _typescript = require('typescript'); var _typescript2 = _interopRequireDefault(_typescript);
|
|
2029
|
-
async function loadConfig(configPath) {
|
|
2030
|
-
if (!/\.(js|mjs)$/.test(_path.extname.call(void 0, configPath))) {
|
|
2031
|
-
throw new Error("Unsupported config file format");
|
|
2032
|
-
}
|
|
2033
|
-
return Promise.resolve().then(() => _interopRequireWildcard(require(_url.pathToFileURL.call(void 0, configPath).toString()))).then((config) => config.default);
|
|
2034
|
-
}
|
|
2035
|
-
_chunk3GQAWCBQjs.__name.call(void 0, loadConfig, "loadConfig");
|
|
2036
|
-
async function createTsCompilerOptions(config, tsConfigPath, projectRoot, dependencies) {
|
|
2037
|
-
const tsConfigFile = _typescript2.default.readConfigFile(_devkit.joinPathFragments.call(void 0, config.workspaceRoot, projectRoot, tsConfigPath), _typescript2.default.sys.readFile);
|
|
2038
|
-
const tsConfig = _typescript2.default.parseJsonConfigFileContent(tsConfigFile.config, _typescript2.default.sys, _path.dirname.call(void 0, _devkit.joinPathFragments.call(void 0, config.workspaceRoot, projectRoot, tsConfigPath)));
|
|
2039
|
-
const compilerOptions = {
|
|
2040
|
-
rootDir: projectRoot,
|
|
2041
|
-
declaration: true,
|
|
2042
|
-
paths: _buildablelibsutils.computeCompilerOptionsPaths.call(void 0, tsConfig, _nullishCoalesce(dependencies, () => ( [])))
|
|
2043
|
-
};
|
|
2044
|
-
_chunkZW3ZP7CVjs.writeTrace.call(void 0, compilerOptions, config);
|
|
2045
|
-
return compilerOptions;
|
|
2046
|
-
}
|
|
2047
|
-
_chunk3GQAWCBQjs.__name.call(void 0, createTsCompilerOptions, "createTsCompilerOptions");
|
|
2048
|
-
|
|
2049
|
-
// ../unbuild/src/plugins/tsc.ts
|
|
2050
|
-
var tscPlugin2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, resolvedOptions) => {
|
|
2051
|
-
const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
2052
|
-
const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, resolvedOptions.config.workspaceRoot, resolvedOptions.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
2053
|
-
let dependencies = result.dependencies;
|
|
2054
|
-
const tsLibDependency = _compilerhelperdependency.getHelperDependency.call(void 0, _compilerhelperdependency.HelperDependency.tsc, resolvedOptions.tsconfig, dependencies, projectGraph, true);
|
|
2055
|
-
if (tsLibDependency) {
|
|
2056
|
-
dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
|
|
2057
|
-
dependencies.push(tsLibDependency);
|
|
2058
|
-
}
|
|
2059
|
-
return _rollupplugintypescript22.default.call(void 0, {
|
|
2060
|
-
check: options.emitTypes !== false,
|
|
2061
|
-
tsconfig: resolvedOptions.tsconfig,
|
|
2062
|
-
tsconfigOverride: {
|
|
2063
|
-
compilerOptions: await createTsCompilerOptions(resolvedOptions.config, resolvedOptions.tsconfig, resolvedOptions.projectRoot, dependencies)
|
|
2064
|
-
}
|
|
2065
|
-
});
|
|
2066
|
-
}, "tscPlugin");
|
|
2067
|
-
|
|
2068
|
-
// ../unbuild/src/plugins/type-definitions.ts
|
|
2069
|
-
|
|
2070
|
-
function typeDefinitions(projectRoot) {
|
|
2071
|
-
return {
|
|
2072
|
-
name: "storm:dts-bundle",
|
|
2073
|
-
async generateBundle(_opts, bundle) {
|
|
2074
|
-
for (const file of Object.values(bundle)) {
|
|
2075
|
-
if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
|
|
2076
|
-
continue;
|
|
2077
|
-
}
|
|
2078
|
-
const hasDefaultExport = file.exports.includes("default");
|
|
2079
|
-
const entrySourceFileName = _path.relative.call(void 0, projectRoot, file.facadeModuleId);
|
|
2080
|
-
const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
|
|
2081
|
-
const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
|
|
2082
|
-
const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
|
|
2083
|
-
const dtsFileSource = hasDefaultExport ? `
|
|
2084
|
-
export * from ${relativeSourceDtsName};
|
|
2085
|
-
export { default } from ${relativeSourceDtsName};
|
|
2086
|
-
` : `export * from ${relativeSourceDtsName};
|
|
2087
|
-
`;
|
|
2088
|
-
this.emitFile({
|
|
2089
|
-
type: "asset",
|
|
2090
|
-
fileName: dtsFileName,
|
|
2091
|
-
source: dtsFileSource
|
|
2092
|
-
});
|
|
2093
|
-
}
|
|
2094
|
-
}
|
|
2095
|
-
};
|
|
2096
|
-
}
|
|
2097
|
-
_chunk3GQAWCBQjs.__name.call(void 0, typeDefinitions, "typeDefinitions");
|
|
2098
|
-
|
|
2099
|
-
// ../unbuild/src/config.ts
|
|
2100
|
-
var getDefaultBuildPlugins2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, resolvedOptions) => Promise.all([
|
|
2101
|
-
analyzePlugin(options, resolvedOptions),
|
|
2102
|
-
typeDefinitions(resolvedOptions.projectRoot),
|
|
2103
|
-
tscPlugin2(options, resolvedOptions),
|
|
2104
|
-
onErrorPlugin2(options, resolvedOptions)
|
|
2105
|
-
].map((plugin) => Promise.resolve(plugin))), "getDefaultBuildPlugins");
|
|
2106
|
-
|
|
2107
|
-
// ../unbuild/src/build.ts
|
|
2108
|
-
async function resolveOptions3(options) {
|
|
2109
|
-
const projectRoot = options.projectRoot;
|
|
2110
|
-
if (!projectRoot) {
|
|
2111
|
-
throw new Error("Cannot find project root");
|
|
2112
|
-
}
|
|
2113
|
-
const outputPath = options.outputPath || _chunkZW3ZP7CVjs.joinPaths.call(void 0, "dist", projectRoot);
|
|
2114
|
-
const workspaceRoot3 = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
|
|
2115
|
-
if (!workspaceRoot3) {
|
|
2116
|
-
throw new Error("Cannot find workspace root");
|
|
2117
|
-
}
|
|
2118
|
-
const config = await _chunkZW3ZP7CVjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
|
|
2119
|
-
_chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
2120
|
-
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Build options resolution");
|
|
2121
|
-
if (options.configPath) {
|
|
2122
|
-
const configFile = await loadConfig(options.configPath);
|
|
2123
|
-
if (configFile) {
|
|
2124
|
-
options = _defu2.default.call(void 0, options, configFile);
|
|
2125
|
-
}
|
|
2126
|
-
}
|
|
2127
|
-
const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
2128
|
-
const projectJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot, "project.json");
|
|
2129
|
-
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
2130
|
-
throw new Error("Cannot find project.json configuration");
|
|
2131
|
-
}
|
|
2132
|
-
const projectJsonContent = await _promises.readFile.call(void 0, projectJsonPath, "utf8");
|
|
2133
|
-
const projectJson = JSON.parse(projectJsonContent);
|
|
2134
|
-
const projectName = projectJson.name;
|
|
2135
|
-
const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "package.json");
|
|
2136
|
-
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2137
|
-
throw new Error("Cannot find package.json configuration");
|
|
2138
|
-
}
|
|
2139
|
-
const packageJsonContent = await _promises.readFile.call(void 0, packageJsonPath, "utf8");
|
|
2140
|
-
const packageJson = JSON.parse(packageJsonContent);
|
|
2141
|
-
let tsconfig = options.tsconfig;
|
|
2142
|
-
if (!tsconfig) {
|
|
2143
|
-
tsconfig = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "tsconfig.json");
|
|
2144
|
-
}
|
|
2145
|
-
if (!_fs.existsSync.call(void 0, tsconfig)) {
|
|
2146
|
-
throw new Error("Cannot find tsconfig.json configuration");
|
|
2147
|
-
}
|
|
2148
|
-
let sourceRoot = projectJson.sourceRoot;
|
|
2149
|
-
if (!sourceRoot) {
|
|
2150
|
-
sourceRoot = _chunkZW3ZP7CVjs.joinPaths.call(void 0, projectRoot, "src");
|
|
2151
|
-
}
|
|
2152
|
-
if (!_fs.existsSync.call(void 0, sourceRoot)) {
|
|
2153
|
-
throw new Error("Cannot find sourceRoot directory");
|
|
2154
|
-
}
|
|
2155
|
-
const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot3.dir, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
2156
|
-
let dependencies = result.dependencies;
|
|
2157
|
-
const tsLibDependency = _js.getHelperDependency.call(void 0, _js.HelperDependency.tsc, tsconfig, dependencies, projectGraph, true);
|
|
2158
|
-
if (tsLibDependency) {
|
|
2159
|
-
dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
|
|
2160
|
-
dependencies.push(tsLibDependency);
|
|
2161
|
-
}
|
|
2162
|
-
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
2163
|
-
cache: true,
|
|
2164
|
-
fsCache: config.skipCache ? false : _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
2165
|
-
interopDefault: true
|
|
2166
|
-
});
|
|
2167
|
-
const resolvedOptions = {
|
|
2168
|
-
name: projectName,
|
|
2169
|
-
config,
|
|
2170
|
-
projectRoot,
|
|
2171
|
-
sourceRoot,
|
|
2172
|
-
projectName,
|
|
2173
|
-
tsconfig,
|
|
2174
|
-
jiti,
|
|
2175
|
-
clean: false,
|
|
2176
|
-
entries: [
|
|
2177
|
-
{
|
|
2178
|
-
builder: "mkdist",
|
|
2179
|
-
input: `.${sourceRoot.replace(projectRoot, "")}`,
|
|
2180
|
-
outDir: _chunkZW3ZP7CVjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
|
|
2181
|
-
declaration: options.emitTypes !== false,
|
|
2182
|
-
format: "esm"
|
|
2183
|
-
},
|
|
2184
|
-
{
|
|
2185
|
-
builder: "mkdist",
|
|
2186
|
-
input: `.${sourceRoot.replace(projectRoot, "")}`,
|
|
2187
|
-
outDir: _chunkZW3ZP7CVjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
|
|
2188
|
-
declaration: options.emitTypes !== false,
|
|
2189
|
-
format: "cjs",
|
|
2190
|
-
ext: "cjs"
|
|
2191
|
-
}
|
|
2192
|
-
],
|
|
2193
|
-
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2194
|
-
failOnWarn: false,
|
|
2195
|
-
sourcemap: _nullishCoalesce(options.sourcemap, () => ( !!options.debug)),
|
|
2196
|
-
outDir: outputPath,
|
|
2197
|
-
parallel: true,
|
|
2198
|
-
stub: false,
|
|
2199
|
-
stubOptions: {
|
|
2200
|
-
jiti: {}
|
|
2201
|
-
},
|
|
2202
|
-
externals: _nullishCoalesce(options.external, () => ( [])),
|
|
2203
|
-
dependencies: [],
|
|
2204
|
-
peerDependencies: [],
|
|
2205
|
-
devDependencies: [],
|
|
2206
|
-
hooks: {},
|
|
2207
|
-
alias: {},
|
|
2208
|
-
replace: {},
|
|
2209
|
-
rollup: {
|
|
2210
|
-
replace: {},
|
|
2211
|
-
alias: {},
|
|
2212
|
-
json: {},
|
|
2213
|
-
commonjs: {
|
|
2214
|
-
sourceMap: _nullishCoalesce(options.sourcemap, () => ( true))
|
|
2215
|
-
},
|
|
2216
|
-
emitCJS: true,
|
|
2217
|
-
cjsBridge: true,
|
|
2218
|
-
dts: {
|
|
2219
|
-
respectExternal: true,
|
|
2220
|
-
tsconfig
|
|
2221
|
-
},
|
|
2222
|
-
output: {
|
|
2223
|
-
banner: options.banner || `
|
|
2224
|
-
// \u26A1 Built by Storm Software
|
|
2225
|
-
`,
|
|
2226
|
-
footer: options.footer
|
|
2227
|
-
},
|
|
2228
|
-
resolve: {
|
|
2229
|
-
preferBuiltins: true,
|
|
2230
|
-
extensions: [
|
|
2231
|
-
".cjs",
|
|
2232
|
-
".mjs",
|
|
2233
|
-
".js",
|
|
2234
|
-
".jsx",
|
|
2235
|
-
".ts",
|
|
2236
|
-
".tsx",
|
|
2237
|
-
".json"
|
|
2238
|
-
]
|
|
2239
|
-
},
|
|
2240
|
-
esbuild: {
|
|
2241
|
-
minify: options.minify !== false,
|
|
2242
|
-
splitting: options.splitting !== false,
|
|
2243
|
-
treeShaking: options.treeShaking !== false,
|
|
2244
|
-
color: true,
|
|
2245
|
-
logLevel: config.logLevel === _chunkZW3ZP7CVjs.LogLevelLabel.FATAL ? _chunkZW3ZP7CVjs.LogLevelLabel.ERROR : _chunkZW3ZP7CVjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
|
|
2246
|
-
}
|
|
2247
|
-
}
|
|
2248
|
-
};
|
|
2249
|
-
dependencies = dependencies.filter((dep) => dep.node.type === "npm" || dep.node.type === "lib" || dep.node.type === "app");
|
|
2250
|
-
if (dependencies.length > 0) {
|
|
2251
|
-
resolvedOptions.dependencies = dependencies.map((dep) => dep.name);
|
|
2252
|
-
}
|
|
2253
|
-
if (packageJson.devDependencies) {
|
|
2254
|
-
resolvedOptions.devDependencies = Object.keys(packageJson.devDependencies);
|
|
2255
|
-
}
|
|
2256
|
-
if (packageJson.peerDependencies) {
|
|
2257
|
-
resolvedOptions.peerDependencies = Object.keys(packageJson.peerDependencies);
|
|
2258
|
-
}
|
|
2259
|
-
if (options.rollup) {
|
|
2260
|
-
let rollup = {};
|
|
2261
|
-
if (typeof options.rollup === "string") {
|
|
2262
|
-
const rollupFile = await loadConfig(options.rollup);
|
|
2263
|
-
if (rollupFile) {
|
|
2264
|
-
rollup = rollupFile;
|
|
2265
|
-
}
|
|
2266
|
-
} else {
|
|
2267
|
-
rollup = options.rollup;
|
|
2268
|
-
}
|
|
2269
|
-
resolvedOptions.rollup = _defu2.default.call(void 0, _nullishCoalesce(resolvedOptions.rollup, () => ( {})), rollup);
|
|
2270
|
-
}
|
|
2271
|
-
resolvedOptions.hooks = {
|
|
2272
|
-
"rollup:options": /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (ctx, opts) => {
|
|
2273
|
-
opts.plugins = await _asyncNullishCoalesce(options.plugins, async () => ( await getDefaultBuildPlugins2(options, resolvedOptions)));
|
|
2274
|
-
}, "rollup:options")
|
|
2275
|
-
};
|
|
2276
|
-
stopwatch();
|
|
2277
|
-
return resolvedOptions;
|
|
2278
|
-
}
|
|
2279
|
-
_chunk3GQAWCBQjs.__name.call(void 0, resolveOptions3, "resolveOptions");
|
|
2280
|
-
async function generatePackageJson3(options) {
|
|
2281
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
2282
|
-
_chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
2283
|
-
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Write package.json file");
|
|
2284
|
-
const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
2285
|
-
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2286
|
-
throw new Error("Cannot find package.json configuration");
|
|
2287
|
-
}
|
|
2288
|
-
let packageJsonContent = await _promises.readFile.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
2289
|
-
if (!packageJsonContent) {
|
|
2290
|
-
throw new Error("Cannot find package.json configuration file");
|
|
2291
|
-
}
|
|
2292
|
-
let packageJson = JSON.parse(packageJsonContent);
|
|
2293
|
-
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
2294
|
-
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
2295
|
-
await _devkit.writeJsonFile.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.outDir, "package.json"), await addPackageJsonExports(options.sourceRoot, packageJson));
|
|
2296
|
-
stopwatch();
|
|
2297
|
-
}
|
|
2298
|
-
return options;
|
|
2299
|
-
}
|
|
2300
|
-
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson3, "generatePackageJson");
|
|
2301
|
-
async function resolveUnbuild(options) {
|
|
2302
|
-
_chunkZW3ZP7CVjs.writeTrace.call(void 0, `Resolving Unbuild package with Jiti`, options.config);
|
|
2303
|
-
try {
|
|
2304
|
-
return options.jiti.import("unbuild");
|
|
2305
|
-
} catch (error) {
|
|
2306
|
-
_chunkZW3ZP7CVjs.writeError.call(void 0, " \u274C An error occurred while resolving the Unbuild package", options.config);
|
|
2307
|
-
throw new Error("An error occurred while resolving the Unbuild package", {
|
|
2308
|
-
cause: error
|
|
2309
|
-
});
|
|
2310
|
-
}
|
|
2311
|
-
}
|
|
2312
|
-
_chunk3GQAWCBQjs.__name.call(void 0, resolveUnbuild, "resolveUnbuild");
|
|
2313
|
-
async function executeUnbuild(options) {
|
|
2314
|
-
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
|
|
2315
|
-
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${options.name} (${options.projectRoot}) build`);
|
|
2316
|
-
try {
|
|
2317
|
-
const unbuild = await resolveUnbuild(options);
|
|
2318
|
-
await unbuild.build(options.projectRoot, false, {
|
|
2319
|
-
...options,
|
|
2320
|
-
rootDir: options.projectRoot
|
|
2321
|
-
});
|
|
2322
|
-
} finally {
|
|
2323
|
-
stopwatch();
|
|
2324
|
-
}
|
|
2325
|
-
return options;
|
|
2326
|
-
}
|
|
2327
|
-
_chunk3GQAWCBQjs.__name.call(void 0, executeUnbuild, "executeUnbuild");
|
|
2328
|
-
async function copyBuildAssets3(options) {
|
|
2329
|
-
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
|
|
2330
|
-
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
2331
|
-
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outDir, options.projectRoot, options.projectName, options.sourceRoot, options.generatePackageJson, options.includeSrc);
|
|
2332
|
-
stopwatch();
|
|
2333
|
-
return options;
|
|
2334
|
-
}
|
|
2335
|
-
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets3, "copyBuildAssets");
|
|
2336
|
-
async function cleanOutputPath3(options) {
|
|
2337
|
-
if (options.clean !== false && options.outDir) {
|
|
2338
|
-
await clean3(options.name, options.outDir, options.config);
|
|
2339
|
-
}
|
|
2340
|
-
return options;
|
|
2341
|
-
}
|
|
2342
|
-
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath3, "cleanOutputPath");
|
|
2343
|
-
async function build5(options) {
|
|
2344
|
-
_chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u26A1 Executing Storm Unbuild pipeline`);
|
|
2345
|
-
const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Unbuild pipeline");
|
|
2346
|
-
try {
|
|
2347
|
-
const resolvedOptions = await resolveOptions3(options);
|
|
2348
|
-
await cleanOutputPath3(resolvedOptions);
|
|
2349
|
-
await generatePackageJson3(resolvedOptions);
|
|
2350
|
-
await executeUnbuild(resolvedOptions);
|
|
2351
|
-
await copyBuildAssets3(resolvedOptions);
|
|
2352
|
-
_chunkZW3ZP7CVjs.writeSuccess.call(void 0, ` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`, resolvedOptions.config);
|
|
2353
|
-
} catch (error) {
|
|
2354
|
-
_chunkZW3ZP7CVjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
2355
|
-
throw error;
|
|
2356
|
-
} finally {
|
|
2357
|
-
stopwatch();
|
|
2358
|
-
}
|
|
2359
|
-
}
|
|
2360
|
-
_chunk3GQAWCBQjs.__name.call(void 0, build5, "build");
|
|
2361
|
-
|
|
2362
1918
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
2363
1919
|
|
|
1920
|
+
var _jiti = require('jiti');
|
|
2364
1921
|
async function unbuildExecutorFn(options, context2, config) {
|
|
2365
|
-
|
|
1922
|
+
_chunkDNKGKYNGjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
2366
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])) {
|
|
2367
1924
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
2368
1925
|
}
|
|
2369
|
-
|
|
1926
|
+
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1927
|
+
fsCache: config.skipCache ? false : _chunkDNKGKYNGjs.joinPaths.call(void 0, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
1928
|
+
interopDefault: true
|
|
1929
|
+
});
|
|
1930
|
+
const stormUnbuild = await jiti.import("@storm-software/unbuild");
|
|
1931
|
+
await stormUnbuild.build(_defu.defu.call(void 0, {
|
|
2370
1932
|
...options,
|
|
2371
1933
|
projectRoot: _optionalChain([context2, 'access', _94 => _94.projectsConfigurations, 'access', _95 => _95.projects, 'optionalAccess', _96 => _96[context2.projectName], 'access', _97 => _97.root]),
|
|
2372
1934
|
projectName: context2.projectName,
|
|
@@ -2405,7 +1967,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
2405
1967
|
};
|
|
2406
1968
|
}
|
|
2407
1969
|
_chunk3GQAWCBQjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
|
|
2408
|
-
var executor_default10 =
|
|
1970
|
+
var executor_default10 = _chunkDNKGKYNGjs.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
|
|
2409
1971
|
skipReadingConfig: false,
|
|
2410
1972
|
hooks: {
|
|
2411
1973
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -2426,34 +1988,34 @@ var executor_default10 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "TypeScri
|
|
|
2426
1988
|
var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
2427
1989
|
skipReadingConfig: false
|
|
2428
1990
|
}) => async (tree, _options) => {
|
|
2429
|
-
const stopwatch =
|
|
1991
|
+
const stopwatch = _chunkDNKGKYNGjs.getStopwatch.call(void 0, name);
|
|
2430
1992
|
let options = _options;
|
|
2431
1993
|
let config;
|
|
2432
1994
|
try {
|
|
2433
|
-
|
|
1995
|
+
_chunkDNKGKYNGjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
2434
1996
|
|
|
2435
1997
|
`, config);
|
|
2436
|
-
const workspaceRoot3 =
|
|
1998
|
+
const workspaceRoot3 = _chunkDNKGKYNGjs.findWorkspaceRoot.call(void 0, );
|
|
2437
1999
|
if (!generatorOptions.skipReadingConfig) {
|
|
2438
|
-
|
|
2000
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
2439
2001
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
2440
|
-
config = await
|
|
2002
|
+
config = await _chunkDNKGKYNGjs.loadStormConfig.call(void 0, workspaceRoot3);
|
|
2441
2003
|
}
|
|
2442
2004
|
if (_optionalChain([generatorOptions, 'optionalAccess', _102 => _102.hooks, 'optionalAccess', _103 => _103.applyDefaultOptions])) {
|
|
2443
|
-
|
|
2005
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
2444
2006
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
2445
|
-
|
|
2007
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
2446
2008
|
}
|
|
2447
|
-
|
|
2009
|
+
_chunkDNKGKYNGjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
|
|
2448
2010
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
|
|
2449
|
-
const tokenized = await
|
|
2011
|
+
const tokenized = await _chunkDNKGKYNGjs.applyWorkspaceTokens.call(void 0, options, {
|
|
2450
2012
|
workspaceRoot: tree.root,
|
|
2451
2013
|
config
|
|
2452
|
-
},
|
|
2014
|
+
}, _chunkDNKGKYNGjs.applyWorkspaceBaseTokens);
|
|
2453
2015
|
if (_optionalChain([generatorOptions, 'optionalAccess', _104 => _104.hooks, 'optionalAccess', _105 => _105.preProcess])) {
|
|
2454
|
-
|
|
2016
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
2455
2017
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
2456
|
-
|
|
2018
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
2457
2019
|
}
|
|
2458
2020
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
2459
2021
|
if (result) {
|
|
@@ -2466,18 +2028,18 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
2466
2028
|
}
|
|
2467
2029
|
}
|
|
2468
2030
|
if (_optionalChain([generatorOptions, 'optionalAccess', _115 => _115.hooks, 'optionalAccess', _116 => _116.postProcess])) {
|
|
2469
|
-
|
|
2031
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
2470
2032
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
2471
|
-
|
|
2033
|
+
_chunkDNKGKYNGjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
2472
2034
|
}
|
|
2473
2035
|
return () => {
|
|
2474
|
-
|
|
2036
|
+
_chunkDNKGKYNGjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
2475
2037
|
`, config);
|
|
2476
2038
|
};
|
|
2477
2039
|
} catch (error) {
|
|
2478
2040
|
return () => {
|
|
2479
|
-
|
|
2480
|
-
|
|
2041
|
+
_chunkDNKGKYNGjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
2042
|
+
_chunkDNKGKYNGjs.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
2481
2043
|
- Details: ${error.message}
|
|
2482
2044
|
- Stacktrace: ${error.stack}`, config);
|
|
2483
2045
|
};
|
|
@@ -2579,7 +2141,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2579
2141
|
const projectConfig = {
|
|
2580
2142
|
root: options.directory,
|
|
2581
2143
|
projectType: "library",
|
|
2582
|
-
sourceRoot:
|
|
2144
|
+
sourceRoot: _chunkDNKGKYNGjs.joinPaths.call(void 0, _nullishCoalesce(options.directory, () => ( "")), "src"),
|
|
2583
2145
|
targets: {
|
|
2584
2146
|
build: {
|
|
2585
2147
|
executor: schema.buildExecutor,
|
|
@@ -2588,11 +2150,11 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2588
2150
|
],
|
|
2589
2151
|
options: {
|
|
2590
2152
|
entry: [
|
|
2591
|
-
|
|
2153
|
+
_chunkDNKGKYNGjs.joinPaths.call(void 0, options.projectRoot, "src", "index.ts")
|
|
2592
2154
|
],
|
|
2593
2155
|
outputPath: getOutputPath(options),
|
|
2594
|
-
tsconfig:
|
|
2595
|
-
project:
|
|
2156
|
+
tsconfig: _chunkDNKGKYNGjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
2157
|
+
project: _chunkDNKGKYNGjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
2596
2158
|
defaultConfiguration: "production",
|
|
2597
2159
|
platform: "neutral",
|
|
2598
2160
|
assets: [
|
|
@@ -2646,7 +2208,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2646
2208
|
if (!options.importPath) {
|
|
2647
2209
|
options.importPath = options.name;
|
|
2648
2210
|
}
|
|
2649
|
-
const packageJsonPath =
|
|
2211
|
+
const packageJsonPath = _chunkDNKGKYNGjs.joinPaths.call(void 0, options.projectRoot, "package.json");
|
|
2650
2212
|
if (tree.exists(packageJsonPath)) {
|
|
2651
2213
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2652
2214
|
if (!options.importPath) {
|
|
@@ -2703,10 +2265,10 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2703
2265
|
}));
|
|
2704
2266
|
}
|
|
2705
2267
|
_js.addTsConfigPath.call(void 0, tree, options.importPath, [
|
|
2706
|
-
|
|
2268
|
+
_chunkDNKGKYNGjs.joinPaths.call(void 0, options.projectRoot, "./src", `index.${options.js ? "js" : "ts"}`)
|
|
2707
2269
|
]);
|
|
2708
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2709
|
-
|
|
2270
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkDNKGKYNGjs.joinPaths.call(void 0, options.importPath, "/*"), [
|
|
2271
|
+
_chunkDNKGKYNGjs.joinPaths.call(void 0, options.projectRoot, "./src", "/*")
|
|
2710
2272
|
]);
|
|
2711
2273
|
if (tree.exists("package.json")) {
|
|
2712
2274
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2717,7 +2279,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2717
2279
|
description = packageJson.description;
|
|
2718
2280
|
}
|
|
2719
2281
|
}
|
|
2720
|
-
const tsconfigPath =
|
|
2282
|
+
const tsconfigPath = _chunkDNKGKYNGjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json");
|
|
2721
2283
|
if (tree.exists(tsconfigPath)) {
|
|
2722
2284
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2723
2285
|
json.composite ??= true;
|
|
@@ -2755,7 +2317,7 @@ function getOutputPath(options) {
|
|
|
2755
2317
|
} else {
|
|
2756
2318
|
parts.push(options.projectRoot);
|
|
2757
2319
|
}
|
|
2758
|
-
return
|
|
2320
|
+
return _chunkDNKGKYNGjs.joinPaths.call(void 0, ...parts);
|
|
2759
2321
|
}
|
|
2760
2322
|
_chunk3GQAWCBQjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
2761
2323
|
function createProjectTsConfigJson(tree, options) {
|
|
@@ -2764,7 +2326,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2764
2326
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _128 => _128.tsconfigOptions]), () => ( {})),
|
|
2765
2327
|
compilerOptions: {
|
|
2766
2328
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2767
|
-
outDir:
|
|
2329
|
+
outDir: _chunkDNKGKYNGjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2768
2330
|
noEmit: true,
|
|
2769
2331
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _129 => _129.tsconfigOptions, 'optionalAccess', _130 => _130.compilerOptions]), () => ( {}))
|
|
2770
2332
|
},
|
|
@@ -2784,7 +2346,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2784
2346
|
"src/**/*.test.ts"
|
|
2785
2347
|
]
|
|
2786
2348
|
};
|
|
2787
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2349
|
+
_devkit.writeJson.call(void 0, tree, _chunkDNKGKYNGjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2788
2350
|
}
|
|
2789
2351
|
_chunk3GQAWCBQjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2790
2352
|
async function normalizeOptions(tree, options) {
|
|
@@ -2910,19 +2472,19 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
2910
2472
|
|
|
2911
2473
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
2912
2474
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0,
|
|
2475
|
+
_chunkDNKGKYNGjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Configuration JSON Schema generator", config);
|
|
2476
|
+
_chunkDNKGKYNGjs.writeTrace.call(void 0, `Determining the Storm Configuration JSON Schema...`, config);
|
|
2477
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkDNKGKYNGjs.StormConfigSchema, {
|
|
2916
2478
|
name: "StormWorkspaceConfiguration"
|
|
2917
2479
|
});
|
|
2918
|
-
|
|
2919
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _137 => _137.workspaceRoot]), () => (
|
|
2920
|
-
|
|
2480
|
+
_chunkDNKGKYNGjs.writeTrace.call(void 0, jsonSchema, config);
|
|
2481
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _137 => _137.workspaceRoot]), () => ( _chunkDNKGKYNGjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _138 => _138.outputFile, 'optionalAccess', _139 => _139.startsWith, 'call', _140 => _140("./")]) ? "" : "./");
|
|
2482
|
+
_chunkDNKGKYNGjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
2921
2483
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
2922
2484
|
spaces: 2
|
|
2923
2485
|
});
|
|
2924
2486
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2925
|
-
|
|
2487
|
+
_chunkDNKGKYNGjs.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
|
|
2926
2488
|
return {
|
|
2927
2489
|
success: true
|
|
2928
2490
|
};
|