@storm-software/terraform-tools 0.49.2 → 0.49.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +1 -1
- package/dist/{chunk-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,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
LogLevelLabel,
|
|
3
2
|
StormConfigSchema,
|
|
4
3
|
applyWorkspaceBaseTokens,
|
|
5
4
|
applyWorkspaceTokens,
|
|
@@ -18,7 +17,7 @@ import {
|
|
|
18
17
|
writeSuccess,
|
|
19
18
|
writeTrace,
|
|
20
19
|
writeWarning
|
|
21
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4RU3LQAK.mjs";
|
|
22
21
|
import {
|
|
23
22
|
__dirname,
|
|
24
23
|
__name,
|
|
@@ -313,7 +312,7 @@ var readNxConfig = /* @__PURE__ */ __name(async (workspaceRoot3) => {
|
|
|
313
312
|
}, "readNxConfig");
|
|
314
313
|
|
|
315
314
|
// ../build-tools/src/utilities/copy-assets.ts
|
|
316
|
-
var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, projectName, sourceRoot,
|
|
315
|
+
var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
|
|
317
316
|
const pendingAssets = Array.from(assets ?? []);
|
|
318
317
|
if (!pendingAssets?.some((asset) => asset?.glob === "*.md")) {
|
|
319
318
|
pendingAssets.push({
|
|
@@ -322,7 +321,7 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
|
|
|
322
321
|
output: "/"
|
|
323
322
|
});
|
|
324
323
|
}
|
|
325
|
-
if (
|
|
324
|
+
if (generatePackageJson3 === false) {
|
|
326
325
|
pendingAssets.push({
|
|
327
326
|
input: sourceRoot,
|
|
328
327
|
glob: "package.json",
|
|
@@ -501,34 +500,6 @@ var addPackageJsonExport = /* @__PURE__ */ __name((file, type = "module", source
|
|
|
501
500
|
}
|
|
502
501
|
};
|
|
503
502
|
}, "addPackageJsonExport");
|
|
504
|
-
var addPackageJsonExports = /* @__PURE__ */ __name(async (sourceRoot, packageJson) => {
|
|
505
|
-
packageJson.exports ??= {};
|
|
506
|
-
const files = await new Glob("**/*.{ts,tsx}", {
|
|
507
|
-
absolute: false,
|
|
508
|
-
cwd: sourceRoot,
|
|
509
|
-
root: sourceRoot
|
|
510
|
-
}).walk();
|
|
511
|
-
files.forEach((file) => {
|
|
512
|
-
addPackageJsonExport(file, packageJson.type, sourceRoot);
|
|
513
|
-
const split = file.split(".");
|
|
514
|
-
split.pop();
|
|
515
|
-
const entry = split.join(".").replaceAll("\\", "/");
|
|
516
|
-
packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, sourceRoot);
|
|
517
|
-
});
|
|
518
|
-
packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
519
|
-
packageJson.module = packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
|
|
520
|
-
packageJson.types = "./dist/index.d.ts";
|
|
521
|
-
packageJson.exports ??= {};
|
|
522
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
|
|
523
|
-
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
524
|
-
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
525
|
-
}
|
|
526
|
-
return ret;
|
|
527
|
-
}, packageJson.exports);
|
|
528
|
-
packageJson.exports["./package.json"] ??= "./package.json";
|
|
529
|
-
packageJson.exports["."] = packageJson.exports["."] ?? addPackageJsonExport("index", packageJson.type, sourceRoot);
|
|
530
|
-
return packageJson;
|
|
531
|
-
}, "addPackageJsonExports");
|
|
532
503
|
|
|
533
504
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
534
505
|
import { glob as glob2 } from "glob";
|
|
@@ -773,8 +744,8 @@ __name(clean, "clean");
|
|
|
773
744
|
import * as esbuild from "esbuild";
|
|
774
745
|
var esmSplitCodeToCjsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
775
746
|
name: "storm:esm-split-code-to-cjs",
|
|
776
|
-
setup(
|
|
777
|
-
|
|
747
|
+
setup(build5) {
|
|
748
|
+
build5.onEnd(async (result) => {
|
|
778
749
|
const outFiles = Object.keys(result.metafile?.outputs ?? {});
|
|
779
750
|
const jsFiles = outFiles.filter((f) => f.endsWith("js"));
|
|
780
751
|
await esbuild.build({
|
|
@@ -792,15 +763,15 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
|
|
|
792
763
|
// ../esbuild/src/plugins/fix-imports.ts
|
|
793
764
|
var fixImportsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
794
765
|
name: "storm:fix-imports",
|
|
795
|
-
setup(
|
|
796
|
-
|
|
766
|
+
setup(build5) {
|
|
767
|
+
build5.onResolve({
|
|
797
768
|
filter: /^spdx-exceptions/
|
|
798
769
|
}, () => {
|
|
799
770
|
return {
|
|
800
771
|
path: __require.resolve("spdx-exceptions")
|
|
801
772
|
};
|
|
802
773
|
});
|
|
803
|
-
|
|
774
|
+
build5.onResolve({
|
|
804
775
|
filter: /^spdx-license-ids/
|
|
805
776
|
}, () => {
|
|
806
777
|
return {
|
|
@@ -815,8 +786,8 @@ import { dirname } from "node:path";
|
|
|
815
786
|
var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
|
|
816
787
|
return {
|
|
817
788
|
name: "native-node-modules",
|
|
818
|
-
setup(
|
|
819
|
-
|
|
789
|
+
setup(build5) {
|
|
790
|
+
build5.onResolve({
|
|
820
791
|
filter: /\.node$/,
|
|
821
792
|
namespace: "file"
|
|
822
793
|
}, (args) => {
|
|
@@ -835,7 +806,7 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
|
|
|
835
806
|
path: resolvedId
|
|
836
807
|
};
|
|
837
808
|
});
|
|
838
|
-
|
|
809
|
+
build5.onLoad({
|
|
839
810
|
filter: /.*/,
|
|
840
811
|
namespace: "node-file"
|
|
841
812
|
}, (args) => {
|
|
@@ -848,14 +819,14 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
|
|
|
848
819
|
resolveDir: dirname(args.path)
|
|
849
820
|
};
|
|
850
821
|
});
|
|
851
|
-
|
|
822
|
+
build5.onResolve({
|
|
852
823
|
filter: /\.node$/,
|
|
853
824
|
namespace: "node-file"
|
|
854
825
|
}, (args) => ({
|
|
855
826
|
path: args.path,
|
|
856
827
|
namespace: "file"
|
|
857
828
|
}));
|
|
858
|
-
const opts =
|
|
829
|
+
const opts = build5.initialOptions;
|
|
859
830
|
opts.loader = opts.loader || {};
|
|
860
831
|
opts.loader[".node"] = "file";
|
|
861
832
|
}
|
|
@@ -881,8 +852,8 @@ var nodeProtocolPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
|
|
|
881
852
|
// ../esbuild/src/plugins/on-error.ts
|
|
882
853
|
var onErrorPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
883
854
|
name: "storm:on-error",
|
|
884
|
-
setup(
|
|
885
|
-
|
|
855
|
+
setup(build5) {
|
|
856
|
+
build5.onEnd((result) => {
|
|
886
857
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
887
858
|
writeError(`The following errors occurred during the build:
|
|
888
859
|
${result.errors.map((error) => error.text).join("\n")}
|
|
@@ -918,14 +889,14 @@ function resolvePathsConfig(options, cwd) {
|
|
|
918
889
|
__name(resolvePathsConfig, "resolvePathsConfig");
|
|
919
890
|
var resolvePathsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
920
891
|
name: "storm:resolve-paths",
|
|
921
|
-
setup(
|
|
922
|
-
const parentTsConfig =
|
|
892
|
+
setup(build5) {
|
|
893
|
+
const parentTsConfig = build5.initialOptions.tsconfig ? __require(joinPaths(resolvedOptions.config.workspaceRoot, build5.initialOptions.tsconfig)) : __require(joinPaths(resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
923
894
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
924
895
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
925
|
-
|
|
896
|
+
build5.onResolve({
|
|
926
897
|
filter: packagesRegex
|
|
927
898
|
}, (args) => {
|
|
928
|
-
if (
|
|
899
|
+
if (build5.initialOptions.external?.includes(args.path)) {
|
|
929
900
|
return {
|
|
930
901
|
path: args.path,
|
|
931
902
|
external: true
|
|
@@ -999,11 +970,11 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
999
970
|
__name(bundleTypeDefinitions, "bundleTypeDefinitions");
|
|
1000
971
|
var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
1001
972
|
name: "storm:tsc",
|
|
1002
|
-
setup(
|
|
973
|
+
setup(build5) {
|
|
1003
974
|
if (options.emitTypes === false) {
|
|
1004
975
|
return;
|
|
1005
976
|
}
|
|
1006
|
-
|
|
977
|
+
build5.onStart(async () => {
|
|
1007
978
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
1008
979
|
await run(resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
1009
980
|
}
|
|
@@ -1126,7 +1097,7 @@ var missingIgnore = [
|
|
|
1126
1097
|
];
|
|
1127
1098
|
var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
|
|
1128
1099
|
name: "storm:deps-check",
|
|
1129
|
-
setup(
|
|
1100
|
+
setup(build5) {
|
|
1130
1101
|
const pkgJsonPath = path5.join(process.cwd(), "package.json");
|
|
1131
1102
|
const pkgContents = __require(pkgJsonPath);
|
|
1132
1103
|
const regDependencies = Object.keys(pkgContents["dependencies"] ?? {});
|
|
@@ -1138,7 +1109,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
|
|
|
1138
1109
|
];
|
|
1139
1110
|
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
1140
1111
|
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
1141
|
-
|
|
1112
|
+
build5.onResolve({
|
|
1142
1113
|
filter: onlyPackages
|
|
1143
1114
|
}, (args) => {
|
|
1144
1115
|
if (args.importer.includes(process.cwd())) {
|
|
@@ -1154,7 +1125,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
|
|
|
1154
1125
|
external: true
|
|
1155
1126
|
};
|
|
1156
1127
|
});
|
|
1157
|
-
|
|
1128
|
+
build5.onEnd(() => {
|
|
1158
1129
|
const unusedDependencies = [
|
|
1159
1130
|
...dependencies
|
|
1160
1131
|
].filter((dep) => {
|
|
@@ -1945,429 +1916,20 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
|
|
|
1945
1916
|
}
|
|
1946
1917
|
});
|
|
1947
1918
|
|
|
1948
|
-
// ../unbuild/src/build.ts
|
|
1949
|
-
import { readCachedProjectGraph as readCachedProjectGraph4, writeJsonFile as writeJsonFile3 } from "@nx/devkit";
|
|
1950
|
-
import { getHelperDependency as getHelperDependency2, HelperDependency as HelperDependency2 } from "@nx/js";
|
|
1951
|
-
import { calculateProjectBuildableDependencies as calculateProjectBuildableDependencies3 } from "@nx/js/src/utils/buildable-libs-utils";
|
|
1952
|
-
import defu3 from "defu";
|
|
1953
|
-
import { createJiti } from "jiti";
|
|
1954
|
-
import { existsSync as existsSync4 } from "node:fs";
|
|
1955
|
-
import { readFile as readFile5 } from "node:fs/promises";
|
|
1956
|
-
import { relative as relative4 } from "node:path";
|
|
1957
|
-
import { findWorkspaceRoot as findWorkspaceRoot4 } from "nx/src/utils/find-workspace-root";
|
|
1958
|
-
|
|
1959
|
-
// ../unbuild/src/clean.ts
|
|
1960
|
-
import { rm } from "node:fs/promises";
|
|
1961
|
-
async function clean3(name = "Unbuild", directory, config) {
|
|
1962
|
-
writeDebug(` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
1963
|
-
const stopwatch = getStopwatch(`${name} output clean`);
|
|
1964
|
-
await rm(directory, {
|
|
1965
|
-
recursive: true,
|
|
1966
|
-
force: true
|
|
1967
|
-
});
|
|
1968
|
-
stopwatch();
|
|
1969
|
-
}
|
|
1970
|
-
__name(clean3, "clean");
|
|
1971
|
-
|
|
1972
|
-
// ../unbuild/src/plugins/analyze.ts
|
|
1973
|
-
var formatBytes = /* @__PURE__ */ __name((bytes) => {
|
|
1974
|
-
if (bytes === 0) return "0 Byte";
|
|
1975
|
-
const k = 1e3;
|
|
1976
|
-
const dm = 3;
|
|
1977
|
-
const sizes = [
|
|
1978
|
-
"Bytes",
|
|
1979
|
-
"KB",
|
|
1980
|
-
"MB",
|
|
1981
|
-
"GB"
|
|
1982
|
-
];
|
|
1983
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
1984
|
-
return `${parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;
|
|
1985
|
-
}, "formatBytes");
|
|
1986
|
-
var analyzePlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
|
|
1987
|
-
return {
|
|
1988
|
-
name: "storm:analyzer",
|
|
1989
|
-
renderChunk(source, chunk) {
|
|
1990
|
-
const sourceBytes = formatBytes(source.length);
|
|
1991
|
-
const fileName = chunk.fileName;
|
|
1992
|
-
writeInfo(` - ${fileName} ${sourceBytes}`, resolvedOptions.config);
|
|
1993
|
-
}
|
|
1994
|
-
};
|
|
1995
|
-
}, "analyzePlugin");
|
|
1996
|
-
|
|
1997
|
-
// ../unbuild/src/plugins/on-error.ts
|
|
1998
|
-
var onErrorPlugin2 = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
1999
|
-
name: "storm:on-error",
|
|
2000
|
-
buildEnd(error) {
|
|
2001
|
-
if (error) {
|
|
2002
|
-
writeError(`The following errors occurred during the build:
|
|
2003
|
-
${error ? error.message : "Unknown build error"}
|
|
2004
|
-
|
|
2005
|
-
`, resolvedOptions.config);
|
|
2006
|
-
throw new Error("Storm unbuild process failed with errors.");
|
|
2007
|
-
}
|
|
2008
|
-
},
|
|
2009
|
-
renderError(error) {
|
|
2010
|
-
writeError(`The following errors occurred during the build:
|
|
2011
|
-
${error ? error.message : "Unknown build error"}
|
|
2012
|
-
|
|
2013
|
-
`, resolvedOptions.config);
|
|
2014
|
-
throw new Error("Storm unbuild process failed with errors.");
|
|
2015
|
-
}
|
|
2016
|
-
}), "onErrorPlugin");
|
|
2017
|
-
|
|
2018
|
-
// ../unbuild/src/plugins/tsc.ts
|
|
2019
|
-
import { readCachedProjectGraph as readCachedProjectGraph3 } from "@nx/devkit";
|
|
2020
|
-
import { calculateProjectBuildableDependencies as calculateProjectBuildableDependencies2 } from "@nx/js/src/utils/buildable-libs-utils";
|
|
2021
|
-
import { getHelperDependency, HelperDependency } from "@nx/js/src/utils/compiler-helper-dependency";
|
|
2022
|
-
import ts2Plugin from "rollup-plugin-typescript2";
|
|
2023
|
-
|
|
2024
|
-
// ../unbuild/src/utilities/helpers.ts
|
|
2025
|
-
import { joinPathFragments as joinPathFragments4 } from "@nx/devkit";
|
|
2026
|
-
import { computeCompilerOptionsPaths } from "@nx/js/src/utils/buildable-libs-utils";
|
|
2027
|
-
import { dirname as dirname2, extname } from "node:path";
|
|
2028
|
-
import { pathToFileURL } from "node:url";
|
|
2029
|
-
import ts from "typescript";
|
|
2030
|
-
async function loadConfig(configPath) {
|
|
2031
|
-
if (!/\.(js|mjs)$/.test(extname(configPath))) {
|
|
2032
|
-
throw new Error("Unsupported config file format");
|
|
2033
|
-
}
|
|
2034
|
-
return import(pathToFileURL(configPath).toString()).then((config) => config.default);
|
|
2035
|
-
}
|
|
2036
|
-
__name(loadConfig, "loadConfig");
|
|
2037
|
-
async function createTsCompilerOptions(config, tsConfigPath, projectRoot, dependencies) {
|
|
2038
|
-
const tsConfigFile = ts.readConfigFile(joinPathFragments4(config.workspaceRoot, projectRoot, tsConfigPath), ts.sys.readFile);
|
|
2039
|
-
const tsConfig = ts.parseJsonConfigFileContent(tsConfigFile.config, ts.sys, dirname2(joinPathFragments4(config.workspaceRoot, projectRoot, tsConfigPath)));
|
|
2040
|
-
const compilerOptions = {
|
|
2041
|
-
rootDir: projectRoot,
|
|
2042
|
-
declaration: true,
|
|
2043
|
-
paths: computeCompilerOptionsPaths(tsConfig, dependencies ?? [])
|
|
2044
|
-
};
|
|
2045
|
-
writeTrace(compilerOptions, config);
|
|
2046
|
-
return compilerOptions;
|
|
2047
|
-
}
|
|
2048
|
-
__name(createTsCompilerOptions, "createTsCompilerOptions");
|
|
2049
|
-
|
|
2050
|
-
// ../unbuild/src/plugins/tsc.ts
|
|
2051
|
-
var tscPlugin2 = /* @__PURE__ */ __name(async (options, resolvedOptions) => {
|
|
2052
|
-
const projectGraph = readCachedProjectGraph3();
|
|
2053
|
-
const result = calculateProjectBuildableDependencies2(void 0, projectGraph, resolvedOptions.config.workspaceRoot, resolvedOptions.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
2054
|
-
let dependencies = result.dependencies;
|
|
2055
|
-
const tsLibDependency = getHelperDependency(HelperDependency.tsc, resolvedOptions.tsconfig, dependencies, projectGraph, true);
|
|
2056
|
-
if (tsLibDependency) {
|
|
2057
|
-
dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
|
|
2058
|
-
dependencies.push(tsLibDependency);
|
|
2059
|
-
}
|
|
2060
|
-
return ts2Plugin({
|
|
2061
|
-
check: options.emitTypes !== false,
|
|
2062
|
-
tsconfig: resolvedOptions.tsconfig,
|
|
2063
|
-
tsconfigOverride: {
|
|
2064
|
-
compilerOptions: await createTsCompilerOptions(resolvedOptions.config, resolvedOptions.tsconfig, resolvedOptions.projectRoot, dependencies)
|
|
2065
|
-
}
|
|
2066
|
-
});
|
|
2067
|
-
}, "tscPlugin");
|
|
2068
|
-
|
|
2069
|
-
// ../unbuild/src/plugins/type-definitions.ts
|
|
2070
|
-
import { relative as relative3 } from "node:path";
|
|
2071
|
-
function typeDefinitions(projectRoot) {
|
|
2072
|
-
return {
|
|
2073
|
-
name: "storm:dts-bundle",
|
|
2074
|
-
async generateBundle(_opts, bundle) {
|
|
2075
|
-
for (const file of Object.values(bundle)) {
|
|
2076
|
-
if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
|
|
2077
|
-
continue;
|
|
2078
|
-
}
|
|
2079
|
-
const hasDefaultExport = file.exports.includes("default");
|
|
2080
|
-
const entrySourceFileName = relative3(projectRoot, file.facadeModuleId);
|
|
2081
|
-
const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
|
|
2082
|
-
const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
|
|
2083
|
-
const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
|
|
2084
|
-
const dtsFileSource = hasDefaultExport ? `
|
|
2085
|
-
export * from ${relativeSourceDtsName};
|
|
2086
|
-
export { default } from ${relativeSourceDtsName};
|
|
2087
|
-
` : `export * from ${relativeSourceDtsName};
|
|
2088
|
-
`;
|
|
2089
|
-
this.emitFile({
|
|
2090
|
-
type: "asset",
|
|
2091
|
-
fileName: dtsFileName,
|
|
2092
|
-
source: dtsFileSource
|
|
2093
|
-
});
|
|
2094
|
-
}
|
|
2095
|
-
}
|
|
2096
|
-
};
|
|
2097
|
-
}
|
|
2098
|
-
__name(typeDefinitions, "typeDefinitions");
|
|
2099
|
-
|
|
2100
|
-
// ../unbuild/src/config.ts
|
|
2101
|
-
var getDefaultBuildPlugins2 = /* @__PURE__ */ __name(async (options, resolvedOptions) => Promise.all([
|
|
2102
|
-
analyzePlugin(options, resolvedOptions),
|
|
2103
|
-
typeDefinitions(resolvedOptions.projectRoot),
|
|
2104
|
-
tscPlugin2(options, resolvedOptions),
|
|
2105
|
-
onErrorPlugin2(options, resolvedOptions)
|
|
2106
|
-
].map((plugin) => Promise.resolve(plugin))), "getDefaultBuildPlugins");
|
|
2107
|
-
|
|
2108
|
-
// ../unbuild/src/build.ts
|
|
2109
|
-
async function resolveOptions3(options) {
|
|
2110
|
-
const projectRoot = options.projectRoot;
|
|
2111
|
-
if (!projectRoot) {
|
|
2112
|
-
throw new Error("Cannot find project root");
|
|
2113
|
-
}
|
|
2114
|
-
const outputPath = options.outputPath || joinPaths("dist", projectRoot);
|
|
2115
|
-
const workspaceRoot3 = findWorkspaceRoot4(projectRoot);
|
|
2116
|
-
if (!workspaceRoot3) {
|
|
2117
|
-
throw new Error("Cannot find workspace root");
|
|
2118
|
-
}
|
|
2119
|
-
const config = await loadStormConfig(workspaceRoot3.dir);
|
|
2120
|
-
writeDebug(" \u2699\uFE0F Resolving build options", config);
|
|
2121
|
-
const stopwatch = getStopwatch("Build options resolution");
|
|
2122
|
-
if (options.configPath) {
|
|
2123
|
-
const configFile = await loadConfig(options.configPath);
|
|
2124
|
-
if (configFile) {
|
|
2125
|
-
options = defu3(options, configFile);
|
|
2126
|
-
}
|
|
2127
|
-
}
|
|
2128
|
-
const projectGraph = readCachedProjectGraph4();
|
|
2129
|
-
const projectJsonPath = joinPaths(config.workspaceRoot, projectRoot, "project.json");
|
|
2130
|
-
if (!existsSync4(projectJsonPath)) {
|
|
2131
|
-
throw new Error("Cannot find project.json configuration");
|
|
2132
|
-
}
|
|
2133
|
-
const projectJsonContent = await readFile5(projectJsonPath, "utf8");
|
|
2134
|
-
const projectJson = JSON.parse(projectJsonContent);
|
|
2135
|
-
const projectName = projectJson.name;
|
|
2136
|
-
const packageJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "package.json");
|
|
2137
|
-
if (!existsSync4(packageJsonPath)) {
|
|
2138
|
-
throw new Error("Cannot find package.json configuration");
|
|
2139
|
-
}
|
|
2140
|
-
const packageJsonContent = await readFile5(packageJsonPath, "utf8");
|
|
2141
|
-
const packageJson = JSON.parse(packageJsonContent);
|
|
2142
|
-
let tsconfig = options.tsconfig;
|
|
2143
|
-
if (!tsconfig) {
|
|
2144
|
-
tsconfig = joinPaths(workspaceRoot3.dir, projectRoot, "tsconfig.json");
|
|
2145
|
-
}
|
|
2146
|
-
if (!existsSync4(tsconfig)) {
|
|
2147
|
-
throw new Error("Cannot find tsconfig.json configuration");
|
|
2148
|
-
}
|
|
2149
|
-
let sourceRoot = projectJson.sourceRoot;
|
|
2150
|
-
if (!sourceRoot) {
|
|
2151
|
-
sourceRoot = joinPaths(projectRoot, "src");
|
|
2152
|
-
}
|
|
2153
|
-
if (!existsSync4(sourceRoot)) {
|
|
2154
|
-
throw new Error("Cannot find sourceRoot directory");
|
|
2155
|
-
}
|
|
2156
|
-
const result = calculateProjectBuildableDependencies3(void 0, projectGraph, workspaceRoot3.dir, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
2157
|
-
let dependencies = result.dependencies;
|
|
2158
|
-
const tsLibDependency = getHelperDependency2(HelperDependency2.tsc, tsconfig, dependencies, projectGraph, true);
|
|
2159
|
-
if (tsLibDependency) {
|
|
2160
|
-
dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
|
|
2161
|
-
dependencies.push(tsLibDependency);
|
|
2162
|
-
}
|
|
2163
|
-
const jiti = createJiti(config.workspaceRoot, {
|
|
2164
|
-
cache: true,
|
|
2165
|
-
fsCache: config.skipCache ? false : joinPaths(config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
2166
|
-
interopDefault: true
|
|
2167
|
-
});
|
|
2168
|
-
const resolvedOptions = {
|
|
2169
|
-
name: projectName,
|
|
2170
|
-
config,
|
|
2171
|
-
projectRoot,
|
|
2172
|
-
sourceRoot,
|
|
2173
|
-
projectName,
|
|
2174
|
-
tsconfig,
|
|
2175
|
-
jiti,
|
|
2176
|
-
clean: false,
|
|
2177
|
-
entries: [
|
|
2178
|
-
{
|
|
2179
|
-
builder: "mkdist",
|
|
2180
|
-
input: `.${sourceRoot.replace(projectRoot, "")}`,
|
|
2181
|
-
outDir: joinPaths(relative4(joinPaths(config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
|
|
2182
|
-
declaration: options.emitTypes !== false,
|
|
2183
|
-
format: "esm"
|
|
2184
|
-
},
|
|
2185
|
-
{
|
|
2186
|
-
builder: "mkdist",
|
|
2187
|
-
input: `.${sourceRoot.replace(projectRoot, "")}`,
|
|
2188
|
-
outDir: joinPaths(relative4(joinPaths(config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
|
|
2189
|
-
declaration: options.emitTypes !== false,
|
|
2190
|
-
format: "cjs",
|
|
2191
|
-
ext: "cjs"
|
|
2192
|
-
}
|
|
2193
|
-
],
|
|
2194
|
-
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2195
|
-
failOnWarn: false,
|
|
2196
|
-
sourcemap: options.sourcemap ?? !!options.debug,
|
|
2197
|
-
outDir: outputPath,
|
|
2198
|
-
parallel: true,
|
|
2199
|
-
stub: false,
|
|
2200
|
-
stubOptions: {
|
|
2201
|
-
jiti: {}
|
|
2202
|
-
},
|
|
2203
|
-
externals: options.external ?? [],
|
|
2204
|
-
dependencies: [],
|
|
2205
|
-
peerDependencies: [],
|
|
2206
|
-
devDependencies: [],
|
|
2207
|
-
hooks: {},
|
|
2208
|
-
alias: {},
|
|
2209
|
-
replace: {},
|
|
2210
|
-
rollup: {
|
|
2211
|
-
replace: {},
|
|
2212
|
-
alias: {},
|
|
2213
|
-
json: {},
|
|
2214
|
-
commonjs: {
|
|
2215
|
-
sourceMap: options.sourcemap ?? true
|
|
2216
|
-
},
|
|
2217
|
-
emitCJS: true,
|
|
2218
|
-
cjsBridge: true,
|
|
2219
|
-
dts: {
|
|
2220
|
-
respectExternal: true,
|
|
2221
|
-
tsconfig
|
|
2222
|
-
},
|
|
2223
|
-
output: {
|
|
2224
|
-
banner: options.banner || `
|
|
2225
|
-
// \u26A1 Built by Storm Software
|
|
2226
|
-
`,
|
|
2227
|
-
footer: options.footer
|
|
2228
|
-
},
|
|
2229
|
-
resolve: {
|
|
2230
|
-
preferBuiltins: true,
|
|
2231
|
-
extensions: [
|
|
2232
|
-
".cjs",
|
|
2233
|
-
".mjs",
|
|
2234
|
-
".js",
|
|
2235
|
-
".jsx",
|
|
2236
|
-
".ts",
|
|
2237
|
-
".tsx",
|
|
2238
|
-
".json"
|
|
2239
|
-
]
|
|
2240
|
-
},
|
|
2241
|
-
esbuild: {
|
|
2242
|
-
minify: options.minify !== false,
|
|
2243
|
-
splitting: options.splitting !== false,
|
|
2244
|
-
treeShaking: options.treeShaking !== false,
|
|
2245
|
-
color: true,
|
|
2246
|
-
logLevel: config.logLevel === LogLevelLabel.FATAL ? LogLevelLabel.ERROR : isVerbose() ? "verbose" : config.logLevel
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
};
|
|
2250
|
-
dependencies = dependencies.filter((dep) => dep.node.type === "npm" || dep.node.type === "lib" || dep.node.type === "app");
|
|
2251
|
-
if (dependencies.length > 0) {
|
|
2252
|
-
resolvedOptions.dependencies = dependencies.map((dep) => dep.name);
|
|
2253
|
-
}
|
|
2254
|
-
if (packageJson.devDependencies) {
|
|
2255
|
-
resolvedOptions.devDependencies = Object.keys(packageJson.devDependencies);
|
|
2256
|
-
}
|
|
2257
|
-
if (packageJson.peerDependencies) {
|
|
2258
|
-
resolvedOptions.peerDependencies = Object.keys(packageJson.peerDependencies);
|
|
2259
|
-
}
|
|
2260
|
-
if (options.rollup) {
|
|
2261
|
-
let rollup = {};
|
|
2262
|
-
if (typeof options.rollup === "string") {
|
|
2263
|
-
const rollupFile = await loadConfig(options.rollup);
|
|
2264
|
-
if (rollupFile) {
|
|
2265
|
-
rollup = rollupFile;
|
|
2266
|
-
}
|
|
2267
|
-
} else {
|
|
2268
|
-
rollup = options.rollup;
|
|
2269
|
-
}
|
|
2270
|
-
resolvedOptions.rollup = defu3(resolvedOptions.rollup ?? {}, rollup);
|
|
2271
|
-
}
|
|
2272
|
-
resolvedOptions.hooks = {
|
|
2273
|
-
"rollup:options": /* @__PURE__ */ __name(async (ctx, opts) => {
|
|
2274
|
-
opts.plugins = options.plugins ?? await getDefaultBuildPlugins2(options, resolvedOptions);
|
|
2275
|
-
}, "rollup:options")
|
|
2276
|
-
};
|
|
2277
|
-
stopwatch();
|
|
2278
|
-
return resolvedOptions;
|
|
2279
|
-
}
|
|
2280
|
-
__name(resolveOptions3, "resolveOptions");
|
|
2281
|
-
async function generatePackageJson3(options) {
|
|
2282
|
-
if (options.generatePackageJson !== false && existsSync4(joinPaths(options.projectRoot, "package.json"))) {
|
|
2283
|
-
writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
|
|
2284
|
-
const stopwatch = getStopwatch("Write package.json file");
|
|
2285
|
-
const packageJsonPath = joinPaths(options.projectRoot, "project.json");
|
|
2286
|
-
if (!existsSync4(packageJsonPath)) {
|
|
2287
|
-
throw new Error("Cannot find package.json configuration");
|
|
2288
|
-
}
|
|
2289
|
-
let packageJsonContent = await readFile5(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
2290
|
-
if (!packageJsonContent) {
|
|
2291
|
-
throw new Error("Cannot find package.json configuration file");
|
|
2292
|
-
}
|
|
2293
|
-
let packageJson = JSON.parse(packageJsonContent);
|
|
2294
|
-
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
2295
|
-
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
2296
|
-
await writeJsonFile3(joinPaths(options.outDir, "package.json"), await addPackageJsonExports(options.sourceRoot, packageJson));
|
|
2297
|
-
stopwatch();
|
|
2298
|
-
}
|
|
2299
|
-
return options;
|
|
2300
|
-
}
|
|
2301
|
-
__name(generatePackageJson3, "generatePackageJson");
|
|
2302
|
-
async function resolveUnbuild(options) {
|
|
2303
|
-
writeTrace(`Resolving Unbuild package with Jiti`, options.config);
|
|
2304
|
-
try {
|
|
2305
|
-
return options.jiti.import("unbuild");
|
|
2306
|
-
} catch (error) {
|
|
2307
|
-
writeError(" \u274C An error occurred while resolving the Unbuild package", options.config);
|
|
2308
|
-
throw new Error("An error occurred while resolving the Unbuild package", {
|
|
2309
|
-
cause: error
|
|
2310
|
-
});
|
|
2311
|
-
}
|
|
2312
|
-
}
|
|
2313
|
-
__name(resolveUnbuild, "resolveUnbuild");
|
|
2314
|
-
async function executeUnbuild(options) {
|
|
2315
|
-
writeDebug(` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
|
|
2316
|
-
const stopwatch = getStopwatch(`${options.name} (${options.projectRoot}) build`);
|
|
2317
|
-
try {
|
|
2318
|
-
const unbuild = await resolveUnbuild(options);
|
|
2319
|
-
await unbuild.build(options.projectRoot, false, {
|
|
2320
|
-
...options,
|
|
2321
|
-
rootDir: options.projectRoot
|
|
2322
|
-
});
|
|
2323
|
-
} finally {
|
|
2324
|
-
stopwatch();
|
|
2325
|
-
}
|
|
2326
|
-
return options;
|
|
2327
|
-
}
|
|
2328
|
-
__name(executeUnbuild, "executeUnbuild");
|
|
2329
|
-
async function copyBuildAssets3(options) {
|
|
2330
|
-
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
|
|
2331
|
-
const stopwatch = getStopwatch(`${options.name} asset copy`);
|
|
2332
|
-
await copyAssets(options.config, options.assets ?? [], options.outDir, options.projectRoot, options.projectName, options.sourceRoot, options.generatePackageJson, options.includeSrc);
|
|
2333
|
-
stopwatch();
|
|
2334
|
-
return options;
|
|
2335
|
-
}
|
|
2336
|
-
__name(copyBuildAssets3, "copyBuildAssets");
|
|
2337
|
-
async function cleanOutputPath3(options) {
|
|
2338
|
-
if (options.clean !== false && options.outDir) {
|
|
2339
|
-
await clean3(options.name, options.outDir, options.config);
|
|
2340
|
-
}
|
|
2341
|
-
return options;
|
|
2342
|
-
}
|
|
2343
|
-
__name(cleanOutputPath3, "cleanOutputPath");
|
|
2344
|
-
async function build5(options) {
|
|
2345
|
-
writeDebug(` \u26A1 Executing Storm Unbuild pipeline`);
|
|
2346
|
-
const stopwatch = getStopwatch("Unbuild pipeline");
|
|
2347
|
-
try {
|
|
2348
|
-
const resolvedOptions = await resolveOptions3(options);
|
|
2349
|
-
await cleanOutputPath3(resolvedOptions);
|
|
2350
|
-
await generatePackageJson3(resolvedOptions);
|
|
2351
|
-
await executeUnbuild(resolvedOptions);
|
|
2352
|
-
await copyBuildAssets3(resolvedOptions);
|
|
2353
|
-
writeSuccess(` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`, resolvedOptions.config);
|
|
2354
|
-
} catch (error) {
|
|
2355
|
-
writeFatal(" \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
2356
|
-
throw error;
|
|
2357
|
-
} finally {
|
|
2358
|
-
stopwatch();
|
|
2359
|
-
}
|
|
2360
|
-
}
|
|
2361
|
-
__name(build5, "build");
|
|
2362
|
-
|
|
2363
1919
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
2364
|
-
import { defu as
|
|
1920
|
+
import { defu as defu3 } from "defu";
|
|
1921
|
+
import { createJiti } from "jiti";
|
|
2365
1922
|
async function unbuildExecutorFn(options, context2, config) {
|
|
2366
1923
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
2367
1924
|
if (!context2.projectsConfigurations?.projects || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !context2.projectsConfigurations.projects[context2.projectName]?.root) {
|
|
2368
1925
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
2369
1926
|
}
|
|
2370
|
-
|
|
1927
|
+
const jiti = createJiti(config.workspaceRoot, {
|
|
1928
|
+
fsCache: config.skipCache ? false : joinPaths(config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
1929
|
+
interopDefault: true
|
|
1930
|
+
});
|
|
1931
|
+
const stormUnbuild = await jiti.import("@storm-software/unbuild");
|
|
1932
|
+
await stormUnbuild.build(defu3({
|
|
2371
1933
|
...options,
|
|
2372
1934
|
projectRoot: context2.projectsConfigurations.projects?.[context2.projectName].root,
|
|
2373
1935
|
projectName: context2.projectName,
|
|
@@ -2421,7 +1983,7 @@ var executor_default10 = withRunExecutor("TypeScript Unbuild build", unbuildExec
|
|
|
2421
1983
|
});
|
|
2422
1984
|
|
|
2423
1985
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2424
|
-
import { formatFiles as formatFiles2, generateFiles, joinPathFragments as
|
|
1986
|
+
import { formatFiles as formatFiles2, generateFiles, joinPathFragments as joinPathFragments4, names as names2, offsetFromRoot as offsetFromRoot2 } from "@nx/devkit";
|
|
2425
1987
|
|
|
2426
1988
|
// ../workspace-tools/src/base/base-generator.ts
|
|
2427
1989
|
var withRunGenerator = /* @__PURE__ */ __name((name, generatorFn, generatorOptions = {
|
|
@@ -2839,7 +2401,7 @@ __name(normalizeOptions, "normalizeOptions");
|
|
|
2839
2401
|
|
|
2840
2402
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2841
2403
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
2842
|
-
const filesDir =
|
|
2404
|
+
const filesDir = joinPathFragments4(__dirname, "./files");
|
|
2843
2405
|
const tsLibraryGeneratorOptions = {
|
|
2844
2406
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
2845
2407
|
platform: "browser",
|
|
@@ -2960,9 +2522,9 @@ async function initGenerator(tree, schema) {
|
|
|
2960
2522
|
__name(initGenerator, "initGenerator");
|
|
2961
2523
|
|
|
2962
2524
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
2963
|
-
import { formatFiles as formatFiles5, generateFiles as generateFiles2, joinPathFragments as
|
|
2525
|
+
import { formatFiles as formatFiles5, generateFiles as generateFiles2, joinPathFragments as joinPathFragments5, names as names3, offsetFromRoot as offsetFromRoot3 } from "@nx/devkit";
|
|
2964
2526
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
2965
|
-
const filesDir =
|
|
2527
|
+
const filesDir = joinPathFragments5(__dirname, "./files");
|
|
2966
2528
|
const tsLibraryGeneratorOptions = {
|
|
2967
2529
|
...schema,
|
|
2968
2530
|
platform: "neutral",
|
|
@@ -3003,9 +2565,9 @@ var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral P
|
|
|
3003
2565
|
});
|
|
3004
2566
|
|
|
3005
2567
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
3006
|
-
import { formatFiles as formatFiles6, generateFiles as generateFiles3, joinPathFragments as
|
|
2568
|
+
import { formatFiles as formatFiles6, generateFiles as generateFiles3, joinPathFragments as joinPathFragments6, names as names4, offsetFromRoot as offsetFromRoot4 } from "@nx/devkit";
|
|
3007
2569
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
3008
|
-
const filesDir =
|
|
2570
|
+
const filesDir = joinPathFragments6(__dirname, "./files");
|
|
3009
2571
|
const tsLibraryGeneratorOptions = {
|
|
3010
2572
|
platform: "node",
|
|
3011
2573
|
devDependencies: {
|
|
@@ -3050,7 +2612,7 @@ var generator_default4 = withRunGenerator("TypeScript Library Creator (NodeJs Pl
|
|
|
3050
2612
|
});
|
|
3051
2613
|
|
|
3052
2614
|
// ../workspace-tools/src/generators/preset/generator.ts
|
|
3053
|
-
import { addDependenciesToPackageJson as addDependenciesToPackageJson3, addProjectConfiguration as addProjectConfiguration2, formatFiles as formatFiles7, generateFiles as generateFiles4, joinPathFragments as
|
|
2615
|
+
import { addDependenciesToPackageJson as addDependenciesToPackageJson3, addProjectConfiguration as addProjectConfiguration2, formatFiles as formatFiles7, generateFiles as generateFiles4, joinPathFragments as joinPathFragments7, updateJson as updateJson2 } from "@nx/devkit";
|
|
3054
2616
|
import * as path6 from "node:path";
|
|
3055
2617
|
async function presetGeneratorFn(tree, options) {
|
|
3056
2618
|
const projectRoot = ".";
|
|
@@ -3268,14 +2830,14 @@ async function presetGeneratorFn(tree, options) {
|
|
|
3268
2830
|
"nx-cloud": "latest"
|
|
3269
2831
|
};
|
|
3270
2832
|
}
|
|
3271
|
-
await Promise.resolve(addDependenciesToPackageJson3(tree, dependencies, {},
|
|
2833
|
+
await Promise.resolve(addDependenciesToPackageJson3(tree, dependencies, {}, joinPathFragments7(projectRoot, "package.json")));
|
|
3272
2834
|
return null;
|
|
3273
2835
|
}
|
|
3274
2836
|
__name(presetGeneratorFn, "presetGeneratorFn");
|
|
3275
2837
|
var generator_default5 = withRunGenerator("Storm Workspace Preset Generator", presetGeneratorFn);
|
|
3276
2838
|
|
|
3277
2839
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
3278
|
-
import { formatFiles as formatFiles8, joinPathFragments as
|
|
2840
|
+
import { formatFiles as formatFiles8, joinPathFragments as joinPathFragments8, output, readJson as readJson2, updateJson as updateJson3, writeJson as writeJson3 } from "@nx/devkit";
|
|
3279
2841
|
import { resolveLocalPackageDependencies as resolveLocalPackageJsonDependencies } from "@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies";
|
|
3280
2842
|
import { updateLockFile } from "@nx/js/src/generators/release-version/utils/update-lock-file";
|
|
3281
2843
|
|
|
@@ -3292,7 +2854,7 @@ import ChangelogRenderer from "nx/release/changelog-renderer/index";
|
|
|
3292
2854
|
|
|
3293
2855
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
3294
2856
|
import { exec, execSync as execSync4 } from "node:child_process";
|
|
3295
|
-
import { relative as
|
|
2857
|
+
import { relative as relative3 } from "node:path";
|
|
3296
2858
|
import { IMPLICIT_DEFAULT_RELEASE_GROUP } from "nx/src/command-line/release/config/config";
|
|
3297
2859
|
import { getFirstGitCommit, getLatestGitTagForPattern } from "nx/src/command-line/release/utils/git";
|
|
3298
2860
|
import { resolveSemverSpecifierFromConventionalCommits, resolveSemverSpecifierFromPrompt } from "nx/src/command-line/release/utils/resolve-semver-specifier";
|
|
@@ -3884,7 +3446,7 @@ import { names as names5 } from "@nx/devkit";
|
|
|
3884
3446
|
import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/project-graph/utils/retrieve-workspace-files";
|
|
3885
3447
|
|
|
3886
3448
|
// ../workspace-tools/src/utils/lock-file.ts
|
|
3887
|
-
import { existsSync as
|
|
3449
|
+
import { existsSync as existsSync4 } from "node:fs";
|
|
3888
3450
|
import { join as join2 } from "node:path";
|
|
3889
3451
|
import { output as output2, readJsonFile, workspaceRoot as workspaceRoot2 } from "nx/src/devkit-exports";
|
|
3890
3452
|
import { getNpmLockfileDependencies, getNpmLockfileNodes } from "nx/src/plugins/js/lock-file/npm-parser";
|
|
@@ -3898,8 +3460,8 @@ var NPM_LOCK_PATH = join2(workspaceRoot2, NPM_LOCK_FILE);
|
|
|
3898
3460
|
var PNPM_LOCK_PATH = join2(workspaceRoot2, PNPM_LOCK_FILE);
|
|
3899
3461
|
|
|
3900
3462
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
3901
|
-
import { joinPathFragments as
|
|
3902
|
-
import { existsSync as
|
|
3463
|
+
import { joinPathFragments as joinPathFragments9, readJsonFile as readJsonFile2 } from "@nx/devkit";
|
|
3464
|
+
import { existsSync as existsSync5 } from "node:fs";
|
|
3903
3465
|
|
|
3904
3466
|
// ../workspace-tools/src/utils/typia-transform.ts
|
|
3905
3467
|
import transform2 from "typia/lib/transform";
|