@storm-software/projen 0.9.52 → 0.9.53
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 +7 -0
- package/README.md +1 -1
- package/dist/{chunk-2GR7WKWK.mjs → chunk-MTVIRC7N.mjs} +198 -28
- package/dist/{chunk-RB3ISR5Z.js → chunk-PWRTPR5P.js} +211 -41
- package/dist/generators.js +2 -2
- package/dist/generators.mjs +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +1 -1
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Projen
|
|
4
4
|
|
|
5
|
+
## [0.9.53](https://github.com/storm-software/storm-ops/releases/tag/projen%400.9.53) (2025-04-16)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Regenerate README markdown files
|
|
10
|
+
([762e7076f](https://github.com/storm-software/storm-ops/commit/762e7076f))
|
|
11
|
+
|
|
5
12
|
## [0.9.52](https://github.com/storm-software/storm-ops/releases/tag/projen%400.9.52) (2025-04-15)
|
|
6
13
|
|
|
7
14
|
### Miscellaneous
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -861,12 +861,12 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
861
861
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
862
862
|
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
863
863
|
directories: {
|
|
864
|
-
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
865
|
-
data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
866
|
-
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
867
|
-
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
868
|
-
log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
869
|
-
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
864
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
865
|
+
data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? correctPaths(process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
866
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? correctPaths(process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
867
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? correctPaths(process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
868
|
+
log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? correctPaths(process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
869
|
+
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? correctPaths(process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
870
870
|
},
|
|
871
871
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
872
872
|
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
@@ -1087,21 +1087,27 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
1087
1087
|
if (config.directories) {
|
|
1088
1088
|
if (!config.skipCache && config.directories.cache) {
|
|
1089
1089
|
process.env[`${prefix}CACHE_DIR`] = correctPaths(config.directories.cache);
|
|
1090
|
+
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
1090
1091
|
}
|
|
1091
1092
|
if (config.directories.data) {
|
|
1092
1093
|
process.env[`${prefix}DATA_DIR`] = correctPaths(config.directories.data);
|
|
1094
|
+
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
1093
1095
|
}
|
|
1094
1096
|
if (config.directories.config) {
|
|
1095
1097
|
process.env[`${prefix}CONFIG_DIR`] = correctPaths(config.directories.config);
|
|
1098
|
+
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
1096
1099
|
}
|
|
1097
1100
|
if (config.directories.temp) {
|
|
1098
1101
|
process.env[`${prefix}TEMP_DIR`] = correctPaths(config.directories.temp);
|
|
1102
|
+
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
1099
1103
|
}
|
|
1100
1104
|
if (config.directories.log) {
|
|
1101
1105
|
process.env[`${prefix}LOG_DIR`] = correctPaths(config.directories.log);
|
|
1106
|
+
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
1102
1107
|
}
|
|
1103
1108
|
if (config.directories.build) {
|
|
1104
1109
|
process.env[`${prefix}BUILD_DIR`] = correctPaths(config.directories.build);
|
|
1110
|
+
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
1105
1111
|
}
|
|
1106
1112
|
}
|
|
1107
1113
|
if (config.skipCache !== void 0) {
|
|
@@ -1919,12 +1925,12 @@ import { createTaskGraph, mapTargetDefaultsToDependencies } from "nx/src/tasks-r
|
|
|
1919
1925
|
|
|
1920
1926
|
// ../esbuild/src/build.ts
|
|
1921
1927
|
import { watch as createWatcher } from "chokidar";
|
|
1922
|
-
import
|
|
1928
|
+
import defu5 from "defu";
|
|
1923
1929
|
import { debounce, flatten } from "es-toolkit";
|
|
1924
1930
|
import { map } from "es-toolkit/compat";
|
|
1925
1931
|
import * as esbuild2 from "esbuild";
|
|
1926
1932
|
import { globbySync } from "globby";
|
|
1927
|
-
import { existsSync as
|
|
1933
|
+
import { existsSync as existsSync7 } from "node:fs";
|
|
1928
1934
|
import hf from "node:fs/promises";
|
|
1929
1935
|
import { findWorkspaceRoot as findWorkspaceRoot2 } from "nx/src/utils/find-workspace-root";
|
|
1930
1936
|
|
|
@@ -2324,7 +2330,7 @@ __name(bundleTypeDefinitions, "bundleTypeDefinitions");
|
|
|
2324
2330
|
var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
2325
2331
|
name: "storm:tsc",
|
|
2326
2332
|
setup(build4) {
|
|
2327
|
-
if (options.
|
|
2333
|
+
if (options.dts === false) {
|
|
2328
2334
|
return;
|
|
2329
2335
|
}
|
|
2330
2336
|
build4.onStart(async () => {
|
|
@@ -2376,7 +2382,7 @@ var getDefaultBuildPlugins = /* @__PURE__ */ __name((options, resolvedOptions) =
|
|
|
2376
2382
|
var DEFAULT_BUILD_OPTIONS = {
|
|
2377
2383
|
platform: "node",
|
|
2378
2384
|
target: "node22",
|
|
2379
|
-
format: "
|
|
2385
|
+
format: "esm",
|
|
2380
2386
|
external: [],
|
|
2381
2387
|
logLevel: "error",
|
|
2382
2388
|
tsconfig: "tsconfig.json",
|
|
@@ -2527,6 +2533,156 @@ var shebangRenderer = {
|
|
|
2527
2533
|
}
|
|
2528
2534
|
};
|
|
2529
2535
|
|
|
2536
|
+
// ../esbuild/src/tsc.ts
|
|
2537
|
+
init_esm_shims();
|
|
2538
|
+
import { loadTsConfig } from "bundle-require";
|
|
2539
|
+
import defu4 from "defu";
|
|
2540
|
+
import { existsSync as existsSync6, mkdirSync, writeFileSync } from "node:fs";
|
|
2541
|
+
import { dirname as dirname2, isAbsolute, join as join3, normalize } from "node:path";
|
|
2542
|
+
import ts from "typescript";
|
|
2543
|
+
function ensureTempDeclarationDir(workspaceConfig) {
|
|
2544
|
+
const root = workspaceConfig.directories.temp || join3(workspaceConfig.workspaceRoot, "tmp");
|
|
2545
|
+
const dirPath = join3(root, ".tsc", "declaration");
|
|
2546
|
+
if (existsSync6(dirPath)) {
|
|
2547
|
+
return dirPath;
|
|
2548
|
+
}
|
|
2549
|
+
mkdirSync(dirPath, {
|
|
2550
|
+
recursive: true
|
|
2551
|
+
});
|
|
2552
|
+
const gitIgnorePath = join3(root, ".tsc", ".gitignore");
|
|
2553
|
+
writeFileSync(gitIgnorePath, "**/*\n");
|
|
2554
|
+
return dirPath;
|
|
2555
|
+
}
|
|
2556
|
+
__name(ensureTempDeclarationDir, "ensureTempDeclarationDir");
|
|
2557
|
+
function slash(path7) {
|
|
2558
|
+
const isExtendedLengthPath = path7.startsWith("\\\\?\\");
|
|
2559
|
+
if (isExtendedLengthPath) {
|
|
2560
|
+
return path7;
|
|
2561
|
+
}
|
|
2562
|
+
return path7.replace(/\\/g, "/");
|
|
2563
|
+
}
|
|
2564
|
+
__name(slash, "slash");
|
|
2565
|
+
function toAbsolutePath(workspaceConfig, p, cwd) {
|
|
2566
|
+
if (isAbsolute(p)) {
|
|
2567
|
+
return p;
|
|
2568
|
+
}
|
|
2569
|
+
return slash(normalize(join3(cwd || workspaceConfig.workspaceRoot, p)));
|
|
2570
|
+
}
|
|
2571
|
+
__name(toAbsolutePath, "toAbsolutePath");
|
|
2572
|
+
var AliasPool = class AliasPool2 {
|
|
2573
|
+
static {
|
|
2574
|
+
__name(this, "AliasPool");
|
|
2575
|
+
}
|
|
2576
|
+
seen = /* @__PURE__ */ new Set();
|
|
2577
|
+
assign(name) {
|
|
2578
|
+
let suffix = 0;
|
|
2579
|
+
let alias = name === "default" ? "default_alias" : name;
|
|
2580
|
+
while (this.seen.has(alias)) {
|
|
2581
|
+
alias = `${name}_alias_${++suffix}`;
|
|
2582
|
+
if (suffix >= 1e3) {
|
|
2583
|
+
throw new Error("Alias generation exceeded limit. Possible infinite loop detected.");
|
|
2584
|
+
}
|
|
2585
|
+
}
|
|
2586
|
+
this.seen.add(alias);
|
|
2587
|
+
return alias;
|
|
2588
|
+
}
|
|
2589
|
+
};
|
|
2590
|
+
function getExports(workspaceConfig, program, fileMapping) {
|
|
2591
|
+
const checker = program.getTypeChecker();
|
|
2592
|
+
const aliasPool = new AliasPool();
|
|
2593
|
+
const assignAlias = aliasPool.assign.bind(aliasPool);
|
|
2594
|
+
function extractExports(sourceFileName) {
|
|
2595
|
+
const cwd = program.getCurrentDirectory();
|
|
2596
|
+
sourceFileName = toAbsolutePath(workspaceConfig, sourceFileName, cwd);
|
|
2597
|
+
const sourceFile = program.getSourceFile(sourceFileName);
|
|
2598
|
+
if (!sourceFile) {
|
|
2599
|
+
return [];
|
|
2600
|
+
}
|
|
2601
|
+
const destFileName = fileMapping.get(sourceFileName);
|
|
2602
|
+
if (!destFileName) {
|
|
2603
|
+
return [];
|
|
2604
|
+
}
|
|
2605
|
+
const moduleSymbol = checker.getSymbolAtLocation(sourceFile);
|
|
2606
|
+
if (!moduleSymbol) {
|
|
2607
|
+
return [];
|
|
2608
|
+
}
|
|
2609
|
+
const exports = [];
|
|
2610
|
+
const exportSymbols = checker.getExportsOfModule(moduleSymbol);
|
|
2611
|
+
exportSymbols.forEach((symbol) => {
|
|
2612
|
+
const name = symbol.getName();
|
|
2613
|
+
exports.push({
|
|
2614
|
+
kind: "named",
|
|
2615
|
+
sourceFileName,
|
|
2616
|
+
destFileName,
|
|
2617
|
+
name,
|
|
2618
|
+
alias: assignAlias(name),
|
|
2619
|
+
isTypeOnly: false
|
|
2620
|
+
});
|
|
2621
|
+
});
|
|
2622
|
+
return exports;
|
|
2623
|
+
}
|
|
2624
|
+
__name(extractExports, "extractExports");
|
|
2625
|
+
return program.getRootFileNames().flatMap(extractExports);
|
|
2626
|
+
}
|
|
2627
|
+
__name(getExports, "getExports");
|
|
2628
|
+
function emitDtsFiles(workspaceConfig, program, host, emitOnlyDtsFiles = true, customTransformers) {
|
|
2629
|
+
const fileMapping = /* @__PURE__ */ new Map();
|
|
2630
|
+
const writeFile3 = /* @__PURE__ */ __name((fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
|
|
2631
|
+
const sourceFile = sourceFiles?.[0];
|
|
2632
|
+
const sourceFileName = sourceFile?.fileName;
|
|
2633
|
+
if (sourceFileName && !fileName.endsWith(".map")) {
|
|
2634
|
+
const cwd = program.getCurrentDirectory();
|
|
2635
|
+
fileMapping.set(toAbsolutePath(workspaceConfig, sourceFileName, cwd), toAbsolutePath(workspaceConfig, fileName, cwd));
|
|
2636
|
+
}
|
|
2637
|
+
return host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
2638
|
+
}, "writeFile");
|
|
2639
|
+
const emitResult = program.emit(void 0, writeFile3, void 0, emitOnlyDtsFiles, customTransformers);
|
|
2640
|
+
const diagnostics = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
|
|
2641
|
+
const diagnosticMessages = [];
|
|
2642
|
+
diagnostics.forEach((diagnostic) => {
|
|
2643
|
+
if (diagnostic.file) {
|
|
2644
|
+
const { line, character } = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
|
|
2645
|
+
const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
2646
|
+
diagnosticMessages.push(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
|
|
2647
|
+
} else {
|
|
2648
|
+
const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
2649
|
+
diagnosticMessages.push(message);
|
|
2650
|
+
}
|
|
2651
|
+
});
|
|
2652
|
+
const diagnosticMessage = diagnosticMessages.join("\n");
|
|
2653
|
+
if (diagnosticMessage) {
|
|
2654
|
+
writeError(`Failed to emit declaration files.
|
|
2655
|
+
|
|
2656
|
+
${diagnosticMessage}`, workspaceConfig);
|
|
2657
|
+
throw new Error("TypeScript compilation failed");
|
|
2658
|
+
}
|
|
2659
|
+
return fileMapping;
|
|
2660
|
+
}
|
|
2661
|
+
__name(emitDtsFiles, "emitDtsFiles");
|
|
2662
|
+
function emitDts(workspaceConfig, tsconfig, tsconfigRaw, emitOnlyDtsFiles = true, customTransformers) {
|
|
2663
|
+
const rawTsconfig = loadTsConfig(workspaceConfig.workspaceRoot, tsconfig);
|
|
2664
|
+
if (!rawTsconfig) {
|
|
2665
|
+
throw new Error(`Unable to find ${tsconfig || "tsconfig.json"} in ${workspaceConfig.workspaceRoot}`);
|
|
2666
|
+
}
|
|
2667
|
+
const declarationDir = ensureTempDeclarationDir(workspaceConfig);
|
|
2668
|
+
const parsedTsconfig = ts.parseJsonConfigFileContent(defu4({
|
|
2669
|
+
compilerOptions: {
|
|
2670
|
+
// Enable declaration emit and disable javascript emit
|
|
2671
|
+
noEmit: false,
|
|
2672
|
+
declaration: true,
|
|
2673
|
+
declarationMap: true,
|
|
2674
|
+
declarationDir,
|
|
2675
|
+
emitDeclarationOnly: true
|
|
2676
|
+
}
|
|
2677
|
+
}, tsconfigRaw?.compilerOptions ?? {}, rawTsconfig.data ?? {}), ts.sys, tsconfig ? dirname2(tsconfig) : "./");
|
|
2678
|
+
const options = parsedTsconfig.options;
|
|
2679
|
+
const host = ts.createCompilerHost(options);
|
|
2680
|
+
const program = ts.createProgram(parsedTsconfig.fileNames, options, host);
|
|
2681
|
+
const fileMapping = emitDtsFiles(workspaceConfig, program, host, emitOnlyDtsFiles, customTransformers);
|
|
2682
|
+
return getExports(workspaceConfig, program, fileMapping);
|
|
2683
|
+
}
|
|
2684
|
+
__name(emitDts, "emitDts");
|
|
2685
|
+
|
|
2530
2686
|
// ../esbuild/src/utilities/get-entry-points.ts
|
|
2531
2687
|
init_esm_shims();
|
|
2532
2688
|
import { glob as glob3 } from "glob";
|
|
@@ -2690,7 +2846,7 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
2690
2846
|
exitOnError: true
|
|
2691
2847
|
});
|
|
2692
2848
|
const projectJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "project.json");
|
|
2693
|
-
if (!
|
|
2849
|
+
if (!existsSync7(projectJsonPath)) {
|
|
2694
2850
|
throw new Error("Cannot find project.json configuration");
|
|
2695
2851
|
}
|
|
2696
2852
|
const projectJsonFile = await hf.readFile(projectJsonPath, "utf8");
|
|
@@ -2700,11 +2856,11 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
2700
2856
|
if (!projectConfigurations?.projects?.[projectName]) {
|
|
2701
2857
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
2702
2858
|
}
|
|
2703
|
-
const options =
|
|
2859
|
+
const options = defu5(userOptions, DEFAULT_BUILD_OPTIONS);
|
|
2704
2860
|
options.name ??= `${projectName}-${options.format}`;
|
|
2705
2861
|
options.target ??= DEFAULT_TARGET;
|
|
2706
2862
|
const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
2707
|
-
if (!
|
|
2863
|
+
if (!existsSync7(packageJsonPath)) {
|
|
2708
2864
|
throw new Error("Cannot find package.json configuration");
|
|
2709
2865
|
}
|
|
2710
2866
|
const env = getEnv("esbuild", options);
|
|
@@ -2786,11 +2942,11 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
2786
2942
|
return result;
|
|
2787
2943
|
}, "resolveOptions");
|
|
2788
2944
|
async function generatePackageJson(context2) {
|
|
2789
|
-
if (context2.options.generatePackageJson !== false &&
|
|
2945
|
+
if (context2.options.generatePackageJson !== false && existsSync7(joinPaths(context2.options.projectRoot, "package.json"))) {
|
|
2790
2946
|
writeDebug(" \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
2791
2947
|
const stopwatch = getStopwatch("Write package.json file");
|
|
2792
2948
|
const packageJsonPath = joinPaths(context2.options.projectRoot, "project.json");
|
|
2793
|
-
if (!
|
|
2949
|
+
if (!existsSync7(packageJsonPath)) {
|
|
2794
2950
|
throw new Error("Cannot find package.json configuration");
|
|
2795
2951
|
}
|
|
2796
2952
|
const packageJsonFile = await hf.readFile(joinPaths(context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
|
|
@@ -2861,6 +3017,7 @@ async function executeEsBuild(context2) {
|
|
|
2861
3017
|
options.inject === {}) {
|
|
2862
3018
|
delete options.inject;
|
|
2863
3019
|
}
|
|
3020
|
+
delete options.dts;
|
|
2864
3021
|
delete options.env;
|
|
2865
3022
|
delete options.name;
|
|
2866
3023
|
delete options.assets;
|
|
@@ -2896,6 +3053,16 @@ ${formatLogMessage({
|
|
|
2896
3053
|
return context2;
|
|
2897
3054
|
}
|
|
2898
3055
|
__name(executeEsBuild, "executeEsBuild");
|
|
3056
|
+
async function executeTypescript(context2) {
|
|
3057
|
+
if (context2.result?.errors.length === 0 && context2.options.dts) {
|
|
3058
|
+
writeDebug(` \u{1F4CB} Running TypeScript Compiler for ${context2.options.name}`, context2.options.config);
|
|
3059
|
+
const stopwatch = getStopwatch(`${context2.options.name} asset copy`);
|
|
3060
|
+
await emitDts(context2.options.config, context2.options.tsconfig, context2.options.tsconfigRaw, true);
|
|
3061
|
+
stopwatch();
|
|
3062
|
+
}
|
|
3063
|
+
return context2;
|
|
3064
|
+
}
|
|
3065
|
+
__name(executeTypescript, "executeTypescript");
|
|
2899
3066
|
async function copyBuildAssets(context2) {
|
|
2900
3067
|
if (context2.result?.errors.length === 0) {
|
|
2901
3068
|
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
@@ -2912,6 +3079,9 @@ async function reportResults(context2) {
|
|
|
2912
3079
|
writeWarning(` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
|
|
2913
3080
|
}
|
|
2914
3081
|
writeSuccess(` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
3082
|
+
} else if (context2.result?.errors && context2.result?.errors.length > 0) {
|
|
3083
|
+
writeError(` \u274C The ${context2.options.name} build failed with the following errors: ${context2.result.errors.map((error) => error.text).join("\n")}`, context2.options.config);
|
|
3084
|
+
throw new Error(`The ${context2.options.name} build failed with the following errors: ${context2.result.errors.map((error) => error.text).join("\n")}`);
|
|
2915
3085
|
}
|
|
2916
3086
|
}
|
|
2917
3087
|
__name(reportResults, "reportResults");
|
|
@@ -2966,7 +3136,7 @@ async function build3(options) {
|
|
|
2966
3136
|
throw new Error("No build options were provided");
|
|
2967
3137
|
}
|
|
2968
3138
|
void transduce.async(opts, dependencyCheck);
|
|
2969
|
-
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
3139
|
+
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeTypescript, executeEsBuild, copyBuildAssets, reportResults));
|
|
2970
3140
|
writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
2971
3141
|
} catch (error) {
|
|
2972
3142
|
writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
@@ -3045,7 +3215,7 @@ import { readFile as readFile6 } from "node:fs/promises";
|
|
|
3045
3215
|
|
|
3046
3216
|
// ../workspace-tools/src/utils/pnpm-deps-update.ts
|
|
3047
3217
|
init_esm_shims();
|
|
3048
|
-
import { existsSync as
|
|
3218
|
+
import { existsSync as existsSync8 } from "node:fs";
|
|
3049
3219
|
import { readFile as readFile5, writeFile as writeFile2 } from "node:fs/promises";
|
|
3050
3220
|
import { format } from "prettier";
|
|
3051
3221
|
import readYamlFile from "read-yaml-file";
|
|
@@ -3127,7 +3297,7 @@ var executor_default8 = withRunExecutor("Typia runtime validation generator", ty
|
|
|
3127
3297
|
|
|
3128
3298
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
3129
3299
|
init_esm_shims();
|
|
3130
|
-
import { defu as
|
|
3300
|
+
import { defu as defu6 } from "defu";
|
|
3131
3301
|
import { createJiti } from "jiti";
|
|
3132
3302
|
async function unbuildExecutorFn(options, context2, config) {
|
|
3133
3303
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
@@ -3145,7 +3315,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
3145
3315
|
interopDefault: true
|
|
3146
3316
|
});
|
|
3147
3317
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
3148
|
-
await stormUnbuild.build(
|
|
3318
|
+
await stormUnbuild.build(defu6({
|
|
3149
3319
|
...options,
|
|
3150
3320
|
projectRoot: context2.projectsConfigurations.projects[context2.projectName].root,
|
|
3151
3321
|
projectName: context2.projectName,
|
|
@@ -4732,29 +4902,29 @@ import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/proj
|
|
|
4732
4902
|
// ../workspace-tools/src/utils/lock-file.ts
|
|
4733
4903
|
init_esm_shims();
|
|
4734
4904
|
import { output as output2, readJsonFile, workspaceRoot as workspaceRoot2 } from "@nx/devkit";
|
|
4735
|
-
import { existsSync as
|
|
4736
|
-
import { join as
|
|
4905
|
+
import { existsSync as existsSync9 } from "node:fs";
|
|
4906
|
+
import { join as join5 } from "node:path";
|
|
4737
4907
|
import { getNpmLockfileDependencies, getNpmLockfileNodes } from "nx/src/plugins/js/lock-file/npm-parser";
|
|
4738
4908
|
import { getPnpmLockfileDependencies, getPnpmLockfileNodes } from "nx/src/plugins/js/lock-file/pnpm-parser";
|
|
4739
4909
|
import { getYarnLockfileDependencies, getYarnLockfileNodes } from "nx/src/plugins/js/lock-file/yarn-parser";
|
|
4740
4910
|
var YARN_LOCK_FILE = "yarn.lock";
|
|
4741
4911
|
var NPM_LOCK_FILE = "package-lock.json";
|
|
4742
4912
|
var PNPM_LOCK_FILE = "pnpm-lock.yaml";
|
|
4743
|
-
var YARN_LOCK_PATH =
|
|
4744
|
-
var NPM_LOCK_PATH =
|
|
4745
|
-
var PNPM_LOCK_PATH =
|
|
4913
|
+
var YARN_LOCK_PATH = join5(workspaceRoot2, YARN_LOCK_FILE);
|
|
4914
|
+
var NPM_LOCK_PATH = join5(workspaceRoot2, NPM_LOCK_FILE);
|
|
4915
|
+
var PNPM_LOCK_PATH = join5(workspaceRoot2, PNPM_LOCK_FILE);
|
|
4746
4916
|
|
|
4747
4917
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
4748
4918
|
init_esm_shims();
|
|
4749
4919
|
import { joinPathFragments as joinPathFragments6, readJsonFile as readJsonFile2 } from "@nx/devkit";
|
|
4750
|
-
import { existsSync as
|
|
4920
|
+
import { existsSync as existsSync10 } from "node:fs";
|
|
4751
4921
|
|
|
4752
4922
|
// ../workspace-tools/src/utils/plugin-helpers.ts
|
|
4753
4923
|
init_esm_shims();
|
|
4754
4924
|
import { readJsonFile as readJsonFile3 } from "@nx/devkit";
|
|
4755
|
-
import
|
|
4756
|
-
import { existsSync as
|
|
4757
|
-
import { dirname as
|
|
4925
|
+
import defu7 from "defu";
|
|
4926
|
+
import { existsSync as existsSync11 } from "node:fs";
|
|
4927
|
+
import { dirname as dirname3, join as join6 } from "node:path";
|
|
4758
4928
|
|
|
4759
4929
|
// ../workspace-tools/src/utils/typia-transform.ts
|
|
4760
4930
|
init_esm_shims();
|
|
@@ -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(); } } 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; }
|
|
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; } var _class;
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunkRMDWM2XCjs = require('./chunk-RMDWM2XC.js');
|
|
@@ -860,12 +860,12 @@ var getConfigEnv = /* @__PURE__ */ _chunk3HFBGYEUjs.__name.call(void 0, () => {
|
|
|
860
860
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
861
861
|
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
862
862
|
directories: {
|
|
863
|
-
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
864
|
-
data: process.env[`${prefix}DATA_DIR`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
865
|
-
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
866
|
-
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
867
|
-
log: process.env[`${prefix}LOG_DIR`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
868
|
-
build: process.env[`${prefix}BUILD_DIR`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
863
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
864
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
865
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
866
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
867
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
868
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkRMDWM2XCjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
869
869
|
},
|
|
870
870
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
871
871
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -1086,21 +1086,27 @@ var setConfigEnv = /* @__PURE__ */ _chunk3HFBGYEUjs.__name.call(void 0, (config)
|
|
|
1086
1086
|
if (config.directories) {
|
|
1087
1087
|
if (!config.skipCache && config.directories.cache) {
|
|
1088
1088
|
process.env[`${prefix}CACHE_DIR`] = _chunkRMDWM2XCjs.correctPaths.call(void 0, config.directories.cache);
|
|
1089
|
+
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
1089
1090
|
}
|
|
1090
1091
|
if (config.directories.data) {
|
|
1091
1092
|
process.env[`${prefix}DATA_DIR`] = _chunkRMDWM2XCjs.correctPaths.call(void 0, config.directories.data);
|
|
1093
|
+
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
1092
1094
|
}
|
|
1093
1095
|
if (config.directories.config) {
|
|
1094
1096
|
process.env[`${prefix}CONFIG_DIR`] = _chunkRMDWM2XCjs.correctPaths.call(void 0, config.directories.config);
|
|
1097
|
+
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
1095
1098
|
}
|
|
1096
1099
|
if (config.directories.temp) {
|
|
1097
1100
|
process.env[`${prefix}TEMP_DIR`] = _chunkRMDWM2XCjs.correctPaths.call(void 0, config.directories.temp);
|
|
1101
|
+
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
1098
1102
|
}
|
|
1099
1103
|
if (config.directories.log) {
|
|
1100
1104
|
process.env[`${prefix}LOG_DIR`] = _chunkRMDWM2XCjs.correctPaths.call(void 0, config.directories.log);
|
|
1105
|
+
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
1101
1106
|
}
|
|
1102
1107
|
if (config.directories.build) {
|
|
1103
1108
|
process.env[`${prefix}BUILD_DIR`] = _chunkRMDWM2XCjs.correctPaths.call(void 0, config.directories.build);
|
|
1109
|
+
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
1104
1110
|
}
|
|
1105
1111
|
}
|
|
1106
1112
|
if (config.skipCache !== void 0) {
|
|
@@ -2323,7 +2329,7 @@ _chunk3HFBGYEUjs.__name.call(void 0, bundleTypeDefinitions, "bundleTypeDefinitio
|
|
|
2323
2329
|
var tscPlugin = /* @__PURE__ */ _chunk3HFBGYEUjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
2324
2330
|
name: "storm:tsc",
|
|
2325
2331
|
setup(build4) {
|
|
2326
|
-
if (options.
|
|
2332
|
+
if (options.dts === false) {
|
|
2327
2333
|
return;
|
|
2328
2334
|
}
|
|
2329
2335
|
build4.onStart(async () => {
|
|
@@ -2375,7 +2381,7 @@ var getDefaultBuildPlugins = /* @__PURE__ */ _chunk3HFBGYEUjs.__name.call(void 0
|
|
|
2375
2381
|
var DEFAULT_BUILD_OPTIONS = {
|
|
2376
2382
|
platform: "node",
|
|
2377
2383
|
target: "node22",
|
|
2378
|
-
format: "
|
|
2384
|
+
format: "esm",
|
|
2379
2385
|
external: [],
|
|
2380
2386
|
logLevel: "error",
|
|
2381
2387
|
tsconfig: "tsconfig.json",
|
|
@@ -2526,6 +2532,156 @@ var shebangRenderer = {
|
|
|
2526
2532
|
}
|
|
2527
2533
|
};
|
|
2528
2534
|
|
|
2535
|
+
// ../esbuild/src/tsc.ts
|
|
2536
|
+
_chunk3HFBGYEUjs.init_cjs_shims.call(void 0, );
|
|
2537
|
+
var _bundlerequire = require('bundle-require');
|
|
2538
|
+
|
|
2539
|
+
|
|
2540
|
+
|
|
2541
|
+
var _typescript = require('typescript'); var _typescript2 = _interopRequireDefault(_typescript);
|
|
2542
|
+
function ensureTempDeclarationDir(workspaceConfig) {
|
|
2543
|
+
const root = workspaceConfig.directories.temp || _path.join.call(void 0, workspaceConfig.workspaceRoot, "tmp");
|
|
2544
|
+
const dirPath = _path.join.call(void 0, root, ".tsc", "declaration");
|
|
2545
|
+
if (_fs.existsSync.call(void 0, dirPath)) {
|
|
2546
|
+
return dirPath;
|
|
2547
|
+
}
|
|
2548
|
+
_fs.mkdirSync.call(void 0, dirPath, {
|
|
2549
|
+
recursive: true
|
|
2550
|
+
});
|
|
2551
|
+
const gitIgnorePath = _path.join.call(void 0, root, ".tsc", ".gitignore");
|
|
2552
|
+
_fs.writeFileSync.call(void 0, gitIgnorePath, "**/*\n");
|
|
2553
|
+
return dirPath;
|
|
2554
|
+
}
|
|
2555
|
+
_chunk3HFBGYEUjs.__name.call(void 0, ensureTempDeclarationDir, "ensureTempDeclarationDir");
|
|
2556
|
+
function slash(path7) {
|
|
2557
|
+
const isExtendedLengthPath = path7.startsWith("\\\\?\\");
|
|
2558
|
+
if (isExtendedLengthPath) {
|
|
2559
|
+
return path7;
|
|
2560
|
+
}
|
|
2561
|
+
return path7.replace(/\\/g, "/");
|
|
2562
|
+
}
|
|
2563
|
+
_chunk3HFBGYEUjs.__name.call(void 0, slash, "slash");
|
|
2564
|
+
function toAbsolutePath(workspaceConfig, p, cwd) {
|
|
2565
|
+
if (_path.isAbsolute.call(void 0, p)) {
|
|
2566
|
+
return p;
|
|
2567
|
+
}
|
|
2568
|
+
return slash(_path.normalize.call(void 0, _path.join.call(void 0, cwd || workspaceConfig.workspaceRoot, p)));
|
|
2569
|
+
}
|
|
2570
|
+
_chunk3HFBGYEUjs.__name.call(void 0, toAbsolutePath, "toAbsolutePath");
|
|
2571
|
+
var AliasPool = (_class = class AliasPool2 {constructor() { _class.prototype.__init.call(this); }
|
|
2572
|
+
static {
|
|
2573
|
+
_chunk3HFBGYEUjs.__name.call(void 0, this, "AliasPool");
|
|
2574
|
+
}
|
|
2575
|
+
__init() {this.seen = /* @__PURE__ */ new Set()}
|
|
2576
|
+
assign(name) {
|
|
2577
|
+
let suffix = 0;
|
|
2578
|
+
let alias = name === "default" ? "default_alias" : name;
|
|
2579
|
+
while (this.seen.has(alias)) {
|
|
2580
|
+
alias = `${name}_alias_${++suffix}`;
|
|
2581
|
+
if (suffix >= 1e3) {
|
|
2582
|
+
throw new Error("Alias generation exceeded limit. Possible infinite loop detected.");
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
this.seen.add(alias);
|
|
2586
|
+
return alias;
|
|
2587
|
+
}
|
|
2588
|
+
}, _class);
|
|
2589
|
+
function getExports(workspaceConfig, program, fileMapping) {
|
|
2590
|
+
const checker = program.getTypeChecker();
|
|
2591
|
+
const aliasPool = new AliasPool();
|
|
2592
|
+
const assignAlias = aliasPool.assign.bind(aliasPool);
|
|
2593
|
+
function extractExports(sourceFileName) {
|
|
2594
|
+
const cwd = program.getCurrentDirectory();
|
|
2595
|
+
sourceFileName = toAbsolutePath(workspaceConfig, sourceFileName, cwd);
|
|
2596
|
+
const sourceFile = program.getSourceFile(sourceFileName);
|
|
2597
|
+
if (!sourceFile) {
|
|
2598
|
+
return [];
|
|
2599
|
+
}
|
|
2600
|
+
const destFileName = fileMapping.get(sourceFileName);
|
|
2601
|
+
if (!destFileName) {
|
|
2602
|
+
return [];
|
|
2603
|
+
}
|
|
2604
|
+
const moduleSymbol = checker.getSymbolAtLocation(sourceFile);
|
|
2605
|
+
if (!moduleSymbol) {
|
|
2606
|
+
return [];
|
|
2607
|
+
}
|
|
2608
|
+
const exports = [];
|
|
2609
|
+
const exportSymbols = checker.getExportsOfModule(moduleSymbol);
|
|
2610
|
+
exportSymbols.forEach((symbol) => {
|
|
2611
|
+
const name = symbol.getName();
|
|
2612
|
+
exports.push({
|
|
2613
|
+
kind: "named",
|
|
2614
|
+
sourceFileName,
|
|
2615
|
+
destFileName,
|
|
2616
|
+
name,
|
|
2617
|
+
alias: assignAlias(name),
|
|
2618
|
+
isTypeOnly: false
|
|
2619
|
+
});
|
|
2620
|
+
});
|
|
2621
|
+
return exports;
|
|
2622
|
+
}
|
|
2623
|
+
_chunk3HFBGYEUjs.__name.call(void 0, extractExports, "extractExports");
|
|
2624
|
+
return program.getRootFileNames().flatMap(extractExports);
|
|
2625
|
+
}
|
|
2626
|
+
_chunk3HFBGYEUjs.__name.call(void 0, getExports, "getExports");
|
|
2627
|
+
function emitDtsFiles(workspaceConfig, program, host, emitOnlyDtsFiles = true, customTransformers) {
|
|
2628
|
+
const fileMapping = /* @__PURE__ */ new Map();
|
|
2629
|
+
const writeFile3 = /* @__PURE__ */ _chunk3HFBGYEUjs.__name.call(void 0, (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
|
|
2630
|
+
const sourceFile = _optionalChain([sourceFiles, 'optionalAccess', _127 => _127[0]]);
|
|
2631
|
+
const sourceFileName = _optionalChain([sourceFile, 'optionalAccess', _128 => _128.fileName]);
|
|
2632
|
+
if (sourceFileName && !fileName.endsWith(".map")) {
|
|
2633
|
+
const cwd = program.getCurrentDirectory();
|
|
2634
|
+
fileMapping.set(toAbsolutePath(workspaceConfig, sourceFileName, cwd), toAbsolutePath(workspaceConfig, fileName, cwd));
|
|
2635
|
+
}
|
|
2636
|
+
return host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
2637
|
+
}, "writeFile");
|
|
2638
|
+
const emitResult = program.emit(void 0, writeFile3, void 0, emitOnlyDtsFiles, customTransformers);
|
|
2639
|
+
const diagnostics = _typescript2.default.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
|
|
2640
|
+
const diagnosticMessages = [];
|
|
2641
|
+
diagnostics.forEach((diagnostic) => {
|
|
2642
|
+
if (diagnostic.file) {
|
|
2643
|
+
const { line, character } = _typescript2.default.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
|
|
2644
|
+
const message = _typescript2.default.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
2645
|
+
diagnosticMessages.push(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
|
|
2646
|
+
} else {
|
|
2647
|
+
const message = _typescript2.default.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
2648
|
+
diagnosticMessages.push(message);
|
|
2649
|
+
}
|
|
2650
|
+
});
|
|
2651
|
+
const diagnosticMessage = diagnosticMessages.join("\n");
|
|
2652
|
+
if (diagnosticMessage) {
|
|
2653
|
+
writeError(`Failed to emit declaration files.
|
|
2654
|
+
|
|
2655
|
+
${diagnosticMessage}`, workspaceConfig);
|
|
2656
|
+
throw new Error("TypeScript compilation failed");
|
|
2657
|
+
}
|
|
2658
|
+
return fileMapping;
|
|
2659
|
+
}
|
|
2660
|
+
_chunk3HFBGYEUjs.__name.call(void 0, emitDtsFiles, "emitDtsFiles");
|
|
2661
|
+
function emitDts(workspaceConfig, tsconfig, tsconfigRaw, emitOnlyDtsFiles = true, customTransformers) {
|
|
2662
|
+
const rawTsconfig = _bundlerequire.loadTsConfig.call(void 0, workspaceConfig.workspaceRoot, tsconfig);
|
|
2663
|
+
if (!rawTsconfig) {
|
|
2664
|
+
throw new Error(`Unable to find ${tsconfig || "tsconfig.json"} in ${workspaceConfig.workspaceRoot}`);
|
|
2665
|
+
}
|
|
2666
|
+
const declarationDir = ensureTempDeclarationDir(workspaceConfig);
|
|
2667
|
+
const parsedTsconfig = _typescript2.default.parseJsonConfigFileContent(_defu2.default.call(void 0, {
|
|
2668
|
+
compilerOptions: {
|
|
2669
|
+
// Enable declaration emit and disable javascript emit
|
|
2670
|
+
noEmit: false,
|
|
2671
|
+
declaration: true,
|
|
2672
|
+
declarationMap: true,
|
|
2673
|
+
declarationDir,
|
|
2674
|
+
emitDeclarationOnly: true
|
|
2675
|
+
}
|
|
2676
|
+
}, _nullishCoalesce(_optionalChain([tsconfigRaw, 'optionalAccess', _129 => _129.compilerOptions]), () => ( {})), _nullishCoalesce(rawTsconfig.data, () => ( {}))), _typescript2.default.sys, tsconfig ? _path.dirname.call(void 0, tsconfig) : "./");
|
|
2677
|
+
const options = parsedTsconfig.options;
|
|
2678
|
+
const host = _typescript2.default.createCompilerHost(options);
|
|
2679
|
+
const program = _typescript2.default.createProgram(parsedTsconfig.fileNames, options, host);
|
|
2680
|
+
const fileMapping = emitDtsFiles(workspaceConfig, program, host, emitOnlyDtsFiles, customTransformers);
|
|
2681
|
+
return getExports(workspaceConfig, program, fileMapping);
|
|
2682
|
+
}
|
|
2683
|
+
_chunk3HFBGYEUjs.__name.call(void 0, emitDts, "emitDts");
|
|
2684
|
+
|
|
2529
2685
|
// ../esbuild/src/utilities/get-entry-points.ts
|
|
2530
2686
|
_chunk3HFBGYEUjs.init_cjs_shims.call(void 0, );
|
|
2531
2687
|
|
|
@@ -2656,7 +2812,7 @@ function pipeSync(fn, ...fns) {
|
|
|
2656
2812
|
return (...args) => {
|
|
2657
2813
|
let result = fn(...args);
|
|
2658
2814
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
2659
|
-
result = _optionalChain([fns, 'access',
|
|
2815
|
+
result = _optionalChain([fns, 'access', _130 => _130[i], 'optionalCall', _131 => _131(result)]);
|
|
2660
2816
|
}
|
|
2661
2817
|
return result;
|
|
2662
2818
|
};
|
|
@@ -2666,7 +2822,7 @@ function pipeAsync(fn, ...fns) {
|
|
|
2666
2822
|
return async (...args) => {
|
|
2667
2823
|
let result = await fn(...args);
|
|
2668
2824
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
2669
|
-
result = await _optionalChain([fns, 'access',
|
|
2825
|
+
result = await _optionalChain([fns, 'access', _132 => _132[i], 'optionalCall', _133 => _133(result)]);
|
|
2670
2826
|
}
|
|
2671
2827
|
return result;
|
|
2672
2828
|
};
|
|
@@ -2696,7 +2852,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3HFBGYEUjs.__name.call(void 0, async
|
|
|
2696
2852
|
const projectJson = JSON.parse(projectJsonFile);
|
|
2697
2853
|
const projectName = projectJson.name;
|
|
2698
2854
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2699
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
2855
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _134 => _134.projects, 'optionalAccess', _135 => _135[projectName]])) {
|
|
2700
2856
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
2701
2857
|
}
|
|
2702
2858
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
@@ -2860,6 +3016,7 @@ async function executeEsBuild(context2) {
|
|
|
2860
3016
|
options.inject === {}) {
|
|
2861
3017
|
delete options.inject;
|
|
2862
3018
|
}
|
|
3019
|
+
delete options.dts;
|
|
2863
3020
|
delete options.env;
|
|
2864
3021
|
delete options.name;
|
|
2865
3022
|
delete options.assets;
|
|
@@ -2895,8 +3052,18 @@ ${formatLogMessage({
|
|
|
2895
3052
|
return context2;
|
|
2896
3053
|
}
|
|
2897
3054
|
_chunk3HFBGYEUjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
3055
|
+
async function executeTypescript(context2) {
|
|
3056
|
+
if (_optionalChain([context2, 'access', _136 => _136.result, 'optionalAccess', _137 => _137.errors, 'access', _138 => _138.length]) === 0 && context2.options.dts) {
|
|
3057
|
+
writeDebug(` \u{1F4CB} Running TypeScript Compiler for ${context2.options.name}`, context2.options.config);
|
|
3058
|
+
const stopwatch = getStopwatch(`${context2.options.name} asset copy`);
|
|
3059
|
+
await emitDts(context2.options.config, context2.options.tsconfig, context2.options.tsconfigRaw, true);
|
|
3060
|
+
stopwatch();
|
|
3061
|
+
}
|
|
3062
|
+
return context2;
|
|
3063
|
+
}
|
|
3064
|
+
_chunk3HFBGYEUjs.__name.call(void 0, executeTypescript, "executeTypescript");
|
|
2898
3065
|
async function copyBuildAssets(context2) {
|
|
2899
|
-
if (_optionalChain([context2, 'access',
|
|
3066
|
+
if (_optionalChain([context2, 'access', _139 => _139.result, 'optionalAccess', _140 => _140.errors, 'access', _141 => _141.length]) === 0) {
|
|
2900
3067
|
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
2901
3068
|
const stopwatch = getStopwatch(`${context2.options.name} asset copy`);
|
|
2902
3069
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
@@ -2906,11 +3073,14 @@ async function copyBuildAssets(context2) {
|
|
|
2906
3073
|
}
|
|
2907
3074
|
_chunk3HFBGYEUjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
2908
3075
|
async function reportResults(context2) {
|
|
2909
|
-
if (_optionalChain([context2, 'access',
|
|
3076
|
+
if (_optionalChain([context2, 'access', _142 => _142.result, 'optionalAccess', _143 => _143.errors, 'access', _144 => _144.length]) === 0) {
|
|
2910
3077
|
if (context2.result.warnings.length > 0) {
|
|
2911
3078
|
writeWarning(` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
|
|
2912
3079
|
}
|
|
2913
3080
|
writeSuccess(` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
3081
|
+
} else if (_optionalChain([context2, 'access', _145 => _145.result, 'optionalAccess', _146 => _146.errors]) && _optionalChain([context2, 'access', _147 => _147.result, 'optionalAccess', _148 => _148.errors, 'access', _149 => _149.length]) > 0) {
|
|
3082
|
+
writeError(` \u274C The ${context2.options.name} build failed with the following errors: ${context2.result.errors.map((error) => error.text).join("\n")}`, context2.options.config);
|
|
3083
|
+
throw new Error(`The ${context2.options.name} build failed with the following errors: ${context2.result.errors.map((error) => error.text).join("\n")}`);
|
|
2914
3084
|
}
|
|
2915
3085
|
}
|
|
2916
3086
|
_chunk3HFBGYEUjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -2965,7 +3135,7 @@ async function build3(options) {
|
|
|
2965
3135
|
throw new Error("No build options were provided");
|
|
2966
3136
|
}
|
|
2967
3137
|
void transduce.async(opts, dependencyCheck);
|
|
2968
|
-
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
3138
|
+
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeTypescript, executeEsBuild, copyBuildAssets, reportResults));
|
|
2969
3139
|
writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
2970
3140
|
} catch (error) {
|
|
2971
3141
|
writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
@@ -3007,14 +3177,14 @@ var watch = /* @__PURE__ */ _chunk3HFBGYEUjs.__name.call(void 0, (context2, opti
|
|
|
3007
3177
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
3008
3178
|
async function esbuildExecutorFn(options, context2, config) {
|
|
3009
3179
|
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
3010
|
-
if (!_optionalChain([context2, 'access',
|
|
3180
|
+
if (!_optionalChain([context2, 'access', _150 => _150.projectsConfigurations, 'optionalAccess', _151 => _151.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _152 => _152.projectsConfigurations, 'access', _153 => _153.projects, 'access', _154 => _154[context2.projectName], 'optionalAccess', _155 => _155.root])) {
|
|
3011
3181
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
3012
3182
|
}
|
|
3013
3183
|
await build3({
|
|
3014
3184
|
...options,
|
|
3015
|
-
projectRoot: _optionalChain([context2, 'access',
|
|
3185
|
+
projectRoot: _optionalChain([context2, 'access', _156 => _156.projectsConfigurations, 'access', _157 => _157.projects, 'optionalAccess', _158 => _158[context2.projectName], 'access', _159 => _159.root]),
|
|
3016
3186
|
projectName: context2.projectName,
|
|
3017
|
-
sourceRoot: _optionalChain([context2, 'access',
|
|
3187
|
+
sourceRoot: _optionalChain([context2, 'access', _160 => _160.projectsConfigurations, 'access', _161 => _161.projects, 'optionalAccess', _162 => _162[context2.projectName], 'optionalAccess', _163 => _163.sourceRoot]),
|
|
3018
3188
|
format: options.format,
|
|
3019
3189
|
platform: options.format
|
|
3020
3190
|
});
|
|
@@ -3060,7 +3230,7 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
|
|
|
3060
3230
|
var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
|
|
3061
3231
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
3062
3232
|
async function sizeLimitExecutorFn(options, context2, config) {
|
|
3063
|
-
if (!_optionalChain([context2, 'optionalAccess',
|
|
3233
|
+
if (!_optionalChain([context2, 'optionalAccess', _164 => _164.projectName]) || !_optionalChain([context2, 'access', _165 => _165.projectsConfigurations, 'optionalAccess', _166 => _166.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
3064
3234
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
3065
3235
|
}
|
|
3066
3236
|
writeInfo(`\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
@@ -3069,7 +3239,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
3069
3239
|
_esbuild3.default,
|
|
3070
3240
|
_esbuildwhy2.default
|
|
3071
3241
|
], {
|
|
3072
|
-
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access',
|
|
3242
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _167 => _167.projectsConfigurations, 'access', _168 => _168.projects, 'access', _169 => _169[context2.projectName], 'optionalAccess', _170 => _170.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _171 => _171.projectsConfigurations, 'access', _172 => _172.projects, 'access', _173 => _173[context2.projectName], 'optionalAccess', _174 => _174.root]), () => ( "./")), "src")))
|
|
3073
3243
|
}).then((result) => {
|
|
3074
3244
|
writeInfo(`\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
3075
3245
|
});
|
|
@@ -3130,7 +3300,7 @@ _chunk3HFBGYEUjs.init_cjs_shims.call(void 0, );
|
|
|
3130
3300
|
var _jiti = require('jiti');
|
|
3131
3301
|
async function unbuildExecutorFn(options, context2, config) {
|
|
3132
3302
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
3133
|
-
if (!_optionalChain([context2, 'access',
|
|
3303
|
+
if (!_optionalChain([context2, 'access', _175 => _175.projectsConfigurations, 'optionalAccess', _176 => _176.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
3134
3304
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
3135
3305
|
}
|
|
3136
3306
|
if (!context2.projectsConfigurations.projects[context2.projectName].root) {
|
|
@@ -3219,7 +3389,7 @@ var withRunGenerator = /* @__PURE__ */ _chunk3HFBGYEUjs.__name.call(void 0, (nam
|
|
|
3219
3389
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
3220
3390
|
config = await getConfig(workspaceRoot3);
|
|
3221
3391
|
}
|
|
3222
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
3392
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _177 => _177.hooks, 'optionalAccess', _178 => _178.applyDefaultOptions])) {
|
|
3223
3393
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
3224
3394
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
3225
3395
|
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
@@ -3230,22 +3400,22 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
3230
3400
|
workspaceRoot: tree.root,
|
|
3231
3401
|
config
|
|
3232
3402
|
}, applyWorkspaceBaseTokens);
|
|
3233
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
3403
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _179 => _179.hooks, 'optionalAccess', _180 => _180.preProcess])) {
|
|
3234
3404
|
writeDebug("Running the preProcess hook...", config);
|
|
3235
3405
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
3236
3406
|
writeDebug("Completed the preProcess hook", config);
|
|
3237
3407
|
}
|
|
3238
3408
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
3239
3409
|
if (result) {
|
|
3240
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
3410
|
+
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _181 => _181.error, 'optionalAccess', _182 => _182.message]) && typeof _optionalChain([result, 'optionalAccess', _183 => _183.error, 'optionalAccess', _184 => _184.message]) === "string" && _optionalChain([result, 'optionalAccess', _185 => _185.error, 'optionalAccess', _186 => _186.name]) && typeof _optionalChain([result, 'optionalAccess', _187 => _187.error, 'optionalAccess', _188 => _188.name]) === "string") {
|
|
3241
3411
|
throw new Error(`The ${name} generator failed to run`, {
|
|
3242
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
3412
|
+
cause: _optionalChain([result, 'optionalAccess', _189 => _189.error])
|
|
3243
3413
|
});
|
|
3244
3414
|
} else if (result.success && result.data) {
|
|
3245
3415
|
return result;
|
|
3246
3416
|
}
|
|
3247
3417
|
}
|
|
3248
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
3418
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _190 => _190.hooks, 'optionalAccess', _191 => _191.postProcess])) {
|
|
3249
3419
|
writeDebug("Running the postProcess hook...", config);
|
|
3250
3420
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
3251
3421
|
writeDebug("Completed the postProcess hook", config);
|
|
@@ -3414,15 +3584,15 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3414
3584
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
3415
3585
|
let repository = {
|
|
3416
3586
|
type: "github",
|
|
3417
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
3587
|
+
url: _optionalChain([config, 'optionalAccess', _192 => _192.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _193 => _193.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _194 => _194.namespace]) || _optionalChain([config, 'optionalAccess', _195 => _195.name]) || "repository"}.git`
|
|
3418
3588
|
};
|
|
3419
3589
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
3420
3590
|
if (tree.exists("package.json")) {
|
|
3421
3591
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
3422
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3592
|
+
if (_optionalChain([packageJson, 'optionalAccess', _196 => _196.repository])) {
|
|
3423
3593
|
repository = packageJson.repository;
|
|
3424
3594
|
}
|
|
3425
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3595
|
+
if (_optionalChain([packageJson, 'optionalAccess', _197 => _197.description])) {
|
|
3426
3596
|
description = packageJson.description;
|
|
3427
3597
|
}
|
|
3428
3598
|
}
|
|
@@ -3477,9 +3647,9 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3477
3647
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
3478
3648
|
...json,
|
|
3479
3649
|
pnpm: {
|
|
3480
|
-
..._optionalChain([json, 'optionalAccess',
|
|
3650
|
+
..._optionalChain([json, 'optionalAccess', _198 => _198.pnpm]),
|
|
3481
3651
|
overrides: {
|
|
3482
|
-
..._optionalChain([json, 'optionalAccess',
|
|
3652
|
+
..._optionalChain([json, 'optionalAccess', _199 => _199.pnpm, 'optionalAccess', _200 => _200.overrides]),
|
|
3483
3653
|
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
3484
3654
|
}
|
|
3485
3655
|
}
|
|
@@ -3493,10 +3663,10 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3493
3663
|
]);
|
|
3494
3664
|
if (tree.exists("package.json")) {
|
|
3495
3665
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
3496
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3666
|
+
if (_optionalChain([packageJson, 'optionalAccess', _201 => _201.repository])) {
|
|
3497
3667
|
repository = packageJson.repository;
|
|
3498
3668
|
}
|
|
3499
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3669
|
+
if (_optionalChain([packageJson, 'optionalAccess', _202 => _202.description])) {
|
|
3500
3670
|
description = packageJson.description;
|
|
3501
3671
|
}
|
|
3502
3672
|
}
|
|
@@ -3544,24 +3714,24 @@ _chunk3HFBGYEUjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
|
3544
3714
|
function createProjectTsConfigJson(tree, options) {
|
|
3545
3715
|
const tsconfig = {
|
|
3546
3716
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
3547
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3717
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _203 => _203.tsconfigOptions]), () => ( {})),
|
|
3548
3718
|
compilerOptions: {
|
|
3549
3719
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
3550
3720
|
outDir: _chunkRMDWM2XCjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
3551
3721
|
noEmit: true,
|
|
3552
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3722
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _204 => _204.tsconfigOptions, 'optionalAccess', _205 => _205.compilerOptions]), () => ( {}))
|
|
3553
3723
|
},
|
|
3554
3724
|
files: [
|
|
3555
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3725
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _206 => _206.tsconfigOptions, 'optionalAccess', _207 => _207.files]), () => ( []))
|
|
3556
3726
|
],
|
|
3557
3727
|
include: [
|
|
3558
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3728
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _208 => _208.tsconfigOptions, 'optionalAccess', _209 => _209.include]), () => ( [])),
|
|
3559
3729
|
"src/**/*.ts",
|
|
3560
3730
|
"src/**/*.js",
|
|
3561
3731
|
"bin/**/*"
|
|
3562
3732
|
],
|
|
3563
3733
|
exclude: [
|
|
3564
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3734
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _210 => _210.tsconfigOptions, 'optionalAccess', _211 => _211.exclude]), () => ( [])),
|
|
3565
3735
|
"jest.config.ts",
|
|
3566
3736
|
"src/**/*.spec.ts",
|
|
3567
3737
|
"src/**/*.test.ts"
|
|
@@ -3572,8 +3742,8 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
3572
3742
|
_chunk3HFBGYEUjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
3573
3743
|
async function normalizeOptions(tree, options, config) {
|
|
3574
3744
|
let importPath = options.importPath;
|
|
3575
|
-
if (!importPath && _optionalChain([config, 'optionalAccess',
|
|
3576
|
-
importPath = `@${_optionalChain([config, 'optionalAccess',
|
|
3745
|
+
if (!importPath && _optionalChain([config, 'optionalAccess', _212 => _212.namespace])) {
|
|
3746
|
+
importPath = `@${_optionalChain([config, 'optionalAccess', _213 => _213.namespace])}/${options.name}`;
|
|
3577
3747
|
}
|
|
3578
3748
|
if (options.publishable) {
|
|
3579
3749
|
if (!importPath) {
|
|
@@ -3706,7 +3876,7 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
3706
3876
|
name: "StormWorkspaceConfiguration"
|
|
3707
3877
|
});
|
|
3708
3878
|
writeTrace(jsonSchema, config);
|
|
3709
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
3879
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _214 => _214.workspaceRoot]), () => ( findWorkspaceRoot())), _optionalChain([options, 'access', _215 => _215.outputFile, 'optionalAccess', _216 => _216.startsWith, 'call', _217 => _217("./")]) ? "" : "./");
|
|
3710
3880
|
writeTrace(`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
3711
3881
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
3712
3882
|
spaces: 2
|
package/dist/generators.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-FC4VZESQ.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkPWRTPR5Pjs = require('./chunk-PWRTPR5P.js');
|
|
5
5
|
require('./chunk-RMDWM2XC.js');
|
|
6
6
|
require('./chunk-3HFBGYEU.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.initGeneratorFn =
|
|
9
|
+
exports.initGeneratorFn = _chunkPWRTPR5Pjs.initGeneratorFn;
|
package/dist/generators.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkGBSU3GE2js = require('./chunk-GBSU3GE2.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkPWRTPR5Pjs = require('./chunk-PWRTPR5P.js');
|
|
8
8
|
require('./chunk-RMDWM2XC.js');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -16,10 +16,10 @@ var _chunk3HFBGYEUjs = require('./chunk-3HFBGYEU.js');
|
|
|
16
16
|
// index.ts
|
|
17
17
|
var index_exports = {};
|
|
18
18
|
_chunk3HFBGYEUjs.__export.call(void 0, index_exports, {
|
|
19
|
-
initGeneratorFn: () =>
|
|
19
|
+
initGeneratorFn: () => _chunkPWRTPR5Pjs.initGeneratorFn
|
|
20
20
|
});
|
|
21
21
|
_chunk3HFBGYEUjs.init_cjs_shims.call(void 0, );
|
|
22
22
|
_chunk3HFBGYEUjs.__reExport.call(void 0, index_exports, _chunk3HFBGYEUjs.__toESM.call(void 0, _chunkGBSU3GE2js.require_components.call(void 0, )));
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
exports.initGeneratorFn =
|
|
25
|
+
exports.initGeneratorFn = _chunkPWRTPR5Pjs.initGeneratorFn;
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkPWRTPR5Pjs = require('../../../chunk-PWRTPR5P.js');
|
|
5
5
|
require('../../../chunk-RMDWM2XC.js');
|
|
6
6
|
require('../../../chunk-3HFBGYEU.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.default =
|
|
10
|
+
exports.default = _chunkPWRTPR5Pjs.generator_default; exports.initGeneratorFn = _chunkPWRTPR5Pjs.initGeneratorFn;
|