@storm-software/cloudflare-tools 0.50.0 → 0.50.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/dist/{chunk-FEVYI765.js → chunk-3JJSMPBT.js} +41 -41
- package/dist/{chunk-CYPHDXO4.mjs → chunk-6PVMDNO7.mjs} +49 -467
- package/dist/{chunk-JCB2DTP6.js → chunk-ABCBYQGV.js} +3 -3
- package/dist/{chunk-FARER72T.js → chunk-AXWOHQDN.js} +1 -1
- package/dist/{chunk-GTCFSQI5.js → chunk-MHBXIMZJ.js} +188 -606
- package/dist/{chunk-RGEF6YBW.js → chunk-O2XVQQLQ.js} +17 -17
- package/dist/{chunk-FDWGGCRH.mjs → chunk-O6M6COTZ.mjs} +1 -1
- package/dist/{chunk-VYOULWAK.mjs → chunk-OTQ3T47C.mjs} +1 -1
- package/dist/{chunk-RCE3CC76.js → chunk-TH4KH35P.js} +1 -2
- package/dist/{chunk-WWU5M5GO.mjs → chunk-TKQA6SOX.mjs} +6 -6
- package/dist/{chunk-7KICJG4N.mjs → chunk-U7RXDO26.mjs} +5 -5
- package/dist/{chunk-JJVEBF3V.mjs → chunk-UOZU7VQX.mjs} +3 -3
- package/dist/{chunk-NSLK6ZDO.mjs → chunk-XBFOA367.mjs} +0 -1
- package/dist/{chunk-IF6J7SWP.js → chunk-YYQ6E55Y.js} +12 -12
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +5 -5
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.js +12 -12
- package/dist/index.mjs +16 -16
- package/dist/src/executors/cloudflare-publish/executor.js +3 -3
- package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
- package/dist/src/executors/r2-upload-publish/executor.js +5 -5
- package/dist/src/executors/r2-upload-publish/executor.mjs +4 -4
- package/dist/src/executors/serve/executor.js +4 -4
- package/dist/src/executors/serve/executor.mjs +3 -3
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/dist/src/generators/worker/generator.js +5 -5
- package/dist/src/generators/worker/generator.mjs +4 -4
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.mjs +2 -2
- package/dist/src/utils/r2-bucket-helpers.js +3 -3
- package/dist/src/utils/r2-bucket-helpers.mjs +2 -2
- package/package.json +150 -1
|
@@ -4,9 +4,8 @@ import {
|
|
|
4
4
|
} from "./chunk-XU6MTFCV.mjs";
|
|
5
5
|
import {
|
|
6
6
|
loadStormConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UOZU7VQX.mjs";
|
|
8
8
|
import {
|
|
9
|
-
LogLevelLabel,
|
|
10
9
|
StormConfigSchema,
|
|
11
10
|
correctPaths,
|
|
12
11
|
findWorkspaceRoot,
|
|
@@ -21,7 +20,7 @@ import {
|
|
|
21
20
|
writeSuccess,
|
|
22
21
|
writeTrace,
|
|
23
22
|
writeWarning
|
|
24
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XBFOA367.mjs";
|
|
25
24
|
import {
|
|
26
25
|
__dirname,
|
|
27
26
|
__name,
|
|
@@ -516,7 +515,7 @@ var readNxConfig = /* @__PURE__ */ __name(async (workspaceRoot3) => {
|
|
|
516
515
|
}, "readNxConfig");
|
|
517
516
|
|
|
518
517
|
// ../build-tools/src/utilities/copy-assets.ts
|
|
519
|
-
var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, projectName, sourceRoot,
|
|
518
|
+
var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
|
|
520
519
|
const pendingAssets = Array.from(assets ?? []);
|
|
521
520
|
if (!pendingAssets?.some((asset) => asset?.glob === "*.md")) {
|
|
522
521
|
pendingAssets.push({
|
|
@@ -525,7 +524,7 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
|
|
|
525
524
|
output: "/"
|
|
526
525
|
});
|
|
527
526
|
}
|
|
528
|
-
if (
|
|
527
|
+
if (generatePackageJson3 === false) {
|
|
529
528
|
pendingAssets.push({
|
|
530
529
|
input: sourceRoot,
|
|
531
530
|
glob: "package.json",
|
|
@@ -704,34 +703,6 @@ var addPackageJsonExport = /* @__PURE__ */ __name((file, type = "module", source
|
|
|
704
703
|
}
|
|
705
704
|
};
|
|
706
705
|
}, "addPackageJsonExport");
|
|
707
|
-
var addPackageJsonExports = /* @__PURE__ */ __name(async (sourceRoot, packageJson) => {
|
|
708
|
-
packageJson.exports ??= {};
|
|
709
|
-
const files = await new Glob("**/*.{ts,tsx}", {
|
|
710
|
-
absolute: false,
|
|
711
|
-
cwd: sourceRoot,
|
|
712
|
-
root: sourceRoot
|
|
713
|
-
}).walk();
|
|
714
|
-
files.forEach((file) => {
|
|
715
|
-
addPackageJsonExport(file, packageJson.type, sourceRoot);
|
|
716
|
-
const split = file.split(".");
|
|
717
|
-
split.pop();
|
|
718
|
-
const entry = split.join(".").replaceAll("\\", "/");
|
|
719
|
-
packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, sourceRoot);
|
|
720
|
-
});
|
|
721
|
-
packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
722
|
-
packageJson.module = packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
|
|
723
|
-
packageJson.types = "./dist/index.d.ts";
|
|
724
|
-
packageJson.exports ??= {};
|
|
725
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
|
|
726
|
-
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
727
|
-
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
728
|
-
}
|
|
729
|
-
return ret;
|
|
730
|
-
}, packageJson.exports);
|
|
731
|
-
packageJson.exports["./package.json"] ??= "./package.json";
|
|
732
|
-
packageJson.exports["."] = packageJson.exports["."] ?? addPackageJsonExport("index", packageJson.type, sourceRoot);
|
|
733
|
-
return packageJson;
|
|
734
|
-
}, "addPackageJsonExports");
|
|
735
706
|
|
|
736
707
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
737
708
|
import { glob as glob2 } from "glob";
|
|
@@ -788,18 +759,18 @@ var getEnv = /* @__PURE__ */ __name((builder, options) => {
|
|
|
788
759
|
}, "getEnv");
|
|
789
760
|
|
|
790
761
|
// ../build-tools/src/utilities/get-out-extension.ts
|
|
791
|
-
function getOutExtension(
|
|
762
|
+
function getOutExtension(format2, pkgType) {
|
|
792
763
|
let jsExtension = ".js";
|
|
793
764
|
let dtsExtension = ".d.ts";
|
|
794
|
-
if (pkgType === "module" &&
|
|
765
|
+
if (pkgType === "module" && format2 === "cjs") {
|
|
795
766
|
jsExtension = ".cjs";
|
|
796
767
|
dtsExtension = ".d.cts";
|
|
797
768
|
}
|
|
798
|
-
if (pkgType !== "module" &&
|
|
769
|
+
if (pkgType !== "module" && format2 === "esm") {
|
|
799
770
|
jsExtension = ".mjs";
|
|
800
771
|
dtsExtension = ".d.mts";
|
|
801
772
|
}
|
|
802
|
-
if (
|
|
773
|
+
if (format2 === "iife") {
|
|
803
774
|
jsExtension = ".global.js";
|
|
804
775
|
}
|
|
805
776
|
return {
|
|
@@ -976,8 +947,8 @@ __name(clean, "clean");
|
|
|
976
947
|
import * as esbuild from "esbuild";
|
|
977
948
|
var esmSplitCodeToCjsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
978
949
|
name: "storm:esm-split-code-to-cjs",
|
|
979
|
-
setup(
|
|
980
|
-
|
|
950
|
+
setup(build5) {
|
|
951
|
+
build5.onEnd(async (result) => {
|
|
981
952
|
const outFiles = Object.keys(result.metafile?.outputs ?? {});
|
|
982
953
|
const jsFiles = outFiles.filter((f) => f.endsWith("js"));
|
|
983
954
|
await esbuild.build({
|
|
@@ -995,15 +966,15 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
|
|
|
995
966
|
// ../esbuild/src/plugins/fix-imports.ts
|
|
996
967
|
var fixImportsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
997
968
|
name: "storm:fix-imports",
|
|
998
|
-
setup(
|
|
999
|
-
|
|
969
|
+
setup(build5) {
|
|
970
|
+
build5.onResolve({
|
|
1000
971
|
filter: /^spdx-exceptions/
|
|
1001
972
|
}, () => {
|
|
1002
973
|
return {
|
|
1003
974
|
path: __require.resolve("spdx-exceptions")
|
|
1004
975
|
};
|
|
1005
976
|
});
|
|
1006
|
-
|
|
977
|
+
build5.onResolve({
|
|
1007
978
|
filter: /^spdx-license-ids/
|
|
1008
979
|
}, () => {
|
|
1009
980
|
return {
|
|
@@ -1018,8 +989,8 @@ import { dirname } from "node:path";
|
|
|
1018
989
|
var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
|
|
1019
990
|
return {
|
|
1020
991
|
name: "native-node-modules",
|
|
1021
|
-
setup(
|
|
1022
|
-
|
|
992
|
+
setup(build5) {
|
|
993
|
+
build5.onResolve({
|
|
1023
994
|
filter: /\.node$/,
|
|
1024
995
|
namespace: "file"
|
|
1025
996
|
}, (args) => {
|
|
@@ -1038,7 +1009,7 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
|
|
|
1038
1009
|
path: resolvedId
|
|
1039
1010
|
};
|
|
1040
1011
|
});
|
|
1041
|
-
|
|
1012
|
+
build5.onLoad({
|
|
1042
1013
|
filter: /.*/,
|
|
1043
1014
|
namespace: "node-file"
|
|
1044
1015
|
}, (args) => {
|
|
@@ -1051,14 +1022,14 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
|
|
|
1051
1022
|
resolveDir: dirname(args.path)
|
|
1052
1023
|
};
|
|
1053
1024
|
});
|
|
1054
|
-
|
|
1025
|
+
build5.onResolve({
|
|
1055
1026
|
filter: /\.node$/,
|
|
1056
1027
|
namespace: "node-file"
|
|
1057
1028
|
}, (args) => ({
|
|
1058
1029
|
path: args.path,
|
|
1059
1030
|
namespace: "file"
|
|
1060
1031
|
}));
|
|
1061
|
-
const opts =
|
|
1032
|
+
const opts = build5.initialOptions;
|
|
1062
1033
|
opts.loader = opts.loader || {};
|
|
1063
1034
|
opts.loader[".node"] = "file";
|
|
1064
1035
|
}
|
|
@@ -1084,8 +1055,8 @@ var nodeProtocolPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
|
|
|
1084
1055
|
// ../esbuild/src/plugins/on-error.ts
|
|
1085
1056
|
var onErrorPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
1086
1057
|
name: "storm:on-error",
|
|
1087
|
-
setup(
|
|
1088
|
-
|
|
1058
|
+
setup(build5) {
|
|
1059
|
+
build5.onEnd((result) => {
|
|
1089
1060
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
1090
1061
|
writeError(`The following errors occurred during the build:
|
|
1091
1062
|
${result.errors.map((error) => error.text).join("\n")}
|
|
@@ -1121,14 +1092,14 @@ function resolvePathsConfig(options, cwd) {
|
|
|
1121
1092
|
__name(resolvePathsConfig, "resolvePathsConfig");
|
|
1122
1093
|
var resolvePathsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
1123
1094
|
name: "storm:resolve-paths",
|
|
1124
|
-
setup(
|
|
1125
|
-
const parentTsConfig =
|
|
1095
|
+
setup(build5) {
|
|
1096
|
+
const parentTsConfig = build5.initialOptions.tsconfig ? __require(joinPaths(resolvedOptions.config.workspaceRoot, build5.initialOptions.tsconfig)) : __require(joinPaths(resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
1126
1097
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
1127
1098
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
1128
|
-
|
|
1099
|
+
build5.onResolve({
|
|
1129
1100
|
filter: packagesRegex
|
|
1130
1101
|
}, (args) => {
|
|
1131
|
-
if (
|
|
1102
|
+
if (build5.initialOptions.external?.includes(args.path)) {
|
|
1132
1103
|
return {
|
|
1133
1104
|
path: args.path,
|
|
1134
1105
|
external: true
|
|
@@ -1202,11 +1173,11 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
1202
1173
|
__name(bundleTypeDefinitions, "bundleTypeDefinitions");
|
|
1203
1174
|
var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
1204
1175
|
name: "storm:tsc",
|
|
1205
|
-
setup(
|
|
1176
|
+
setup(build5) {
|
|
1206
1177
|
if (options.emitTypes === false) {
|
|
1207
1178
|
return;
|
|
1208
1179
|
}
|
|
1209
|
-
|
|
1180
|
+
build5.onStart(async () => {
|
|
1210
1181
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
1211
1182
|
await run(resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
1212
1183
|
}
|
|
@@ -1329,7 +1300,7 @@ var missingIgnore = [
|
|
|
1329
1300
|
];
|
|
1330
1301
|
var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
|
|
1331
1302
|
name: "storm:deps-check",
|
|
1332
|
-
setup(
|
|
1303
|
+
setup(build5) {
|
|
1333
1304
|
const pkgJsonPath = path5.join(process.cwd(), "package.json");
|
|
1334
1305
|
const pkgContents = __require(pkgJsonPath);
|
|
1335
1306
|
const regDependencies = Object.keys(pkgContents["dependencies"] ?? {});
|
|
@@ -1341,7 +1312,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
|
|
|
1341
1312
|
];
|
|
1342
1313
|
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
1343
1314
|
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
1344
|
-
|
|
1315
|
+
build5.onResolve({
|
|
1345
1316
|
filter: onlyPackages
|
|
1346
1317
|
}, (args) => {
|
|
1347
1318
|
if (args.importer.includes(process.cwd())) {
|
|
@@ -1357,7 +1328,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
|
|
|
1357
1328
|
external: true
|
|
1358
1329
|
};
|
|
1359
1330
|
});
|
|
1360
|
-
|
|
1331
|
+
build5.onEnd(() => {
|
|
1361
1332
|
const unusedDependencies = [
|
|
1362
1333
|
...dependencies
|
|
1363
1334
|
].filter((dep) => {
|
|
@@ -1803,6 +1774,7 @@ import fs3 from "node:fs/promises";
|
|
|
1803
1774
|
// ../workspace-tools/src/utils/pnpm-deps-update.ts
|
|
1804
1775
|
import { existsSync as existsSync3 } from "node:fs";
|
|
1805
1776
|
import { readFile as readFile4, writeFile as writeFile2 } from "node:fs/promises";
|
|
1777
|
+
import { format } from "prettier";
|
|
1806
1778
|
import readYamlFile from "read-yaml-file";
|
|
1807
1779
|
|
|
1808
1780
|
// ../workspace-tools/src/executors/npm-publish/executor.ts
|
|
@@ -2147,410 +2119,20 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
|
|
|
2147
2119
|
}
|
|
2148
2120
|
});
|
|
2149
2121
|
|
|
2150
|
-
// ../unbuild/src/build.ts
|
|
2151
|
-
import { readCachedProjectGraph as readCachedProjectGraph4, writeJsonFile as writeJsonFile3 } from "@nx/devkit";
|
|
2152
|
-
import { getHelperDependency as getHelperDependency2, HelperDependency as HelperDependency2 } from "@nx/js";
|
|
2153
|
-
import { calculateProjectBuildableDependencies as calculateProjectBuildableDependencies3 } from "@nx/js/src/utils/buildable-libs-utils";
|
|
2154
|
-
import defu3 from "defu";
|
|
2155
|
-
import { existsSync as existsSync4 } from "node:fs";
|
|
2156
|
-
import { readFile as readFile5 } from "node:fs/promises";
|
|
2157
|
-
import { relative as relative4 } from "node:path";
|
|
2158
|
-
import { findWorkspaceRoot as findWorkspaceRoot4 } from "nx/src/utils/find-workspace-root";
|
|
2159
|
-
import { build as unbuild } from "unbuild";
|
|
2160
|
-
|
|
2161
|
-
// ../unbuild/src/clean.ts
|
|
2162
|
-
import { rm } from "node:fs/promises";
|
|
2163
|
-
async function clean3(name = "Unbuild", directory, config) {
|
|
2164
|
-
writeDebug(` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
2165
|
-
const stopwatch = getStopwatch(`${name} output clean`);
|
|
2166
|
-
await rm(directory, {
|
|
2167
|
-
recursive: true,
|
|
2168
|
-
force: true
|
|
2169
|
-
});
|
|
2170
|
-
stopwatch();
|
|
2171
|
-
}
|
|
2172
|
-
__name(clean3, "clean");
|
|
2173
|
-
|
|
2174
|
-
// ../unbuild/src/plugins/analyze.ts
|
|
2175
|
-
var formatBytes = /* @__PURE__ */ __name((bytes) => {
|
|
2176
|
-
if (bytes === 0) return "0 Byte";
|
|
2177
|
-
const k = 1e3;
|
|
2178
|
-
const dm = 3;
|
|
2179
|
-
const sizes = [
|
|
2180
|
-
"Bytes",
|
|
2181
|
-
"KB",
|
|
2182
|
-
"MB",
|
|
2183
|
-
"GB"
|
|
2184
|
-
];
|
|
2185
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
2186
|
-
return `${parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;
|
|
2187
|
-
}, "formatBytes");
|
|
2188
|
-
var analyzePlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
|
|
2189
|
-
return {
|
|
2190
|
-
name: "storm:analyzer",
|
|
2191
|
-
renderChunk(source, chunk) {
|
|
2192
|
-
const sourceBytes = formatBytes(source.length);
|
|
2193
|
-
const fileName = chunk.fileName;
|
|
2194
|
-
writeInfo(` - ${fileName} ${sourceBytes}`, resolvedOptions.config);
|
|
2195
|
-
}
|
|
2196
|
-
};
|
|
2197
|
-
}, "analyzePlugin");
|
|
2198
|
-
|
|
2199
|
-
// ../unbuild/src/plugins/on-error.ts
|
|
2200
|
-
var onErrorPlugin2 = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
2201
|
-
name: "storm:on-error",
|
|
2202
|
-
buildEnd(error) {
|
|
2203
|
-
if (error) {
|
|
2204
|
-
writeError(`The following errors occurred during the build:
|
|
2205
|
-
${error ? error.message : "Unknown build error"}
|
|
2206
|
-
|
|
2207
|
-
`, resolvedOptions.config);
|
|
2208
|
-
throw new Error("Storm unbuild process failed with errors.");
|
|
2209
|
-
}
|
|
2210
|
-
},
|
|
2211
|
-
renderError(error) {
|
|
2212
|
-
writeError(`The following errors occurred during the build:
|
|
2213
|
-
${error ? error.message : "Unknown build error"}
|
|
2214
|
-
|
|
2215
|
-
`, resolvedOptions.config);
|
|
2216
|
-
throw new Error("Storm unbuild process failed with errors.");
|
|
2217
|
-
}
|
|
2218
|
-
}), "onErrorPlugin");
|
|
2219
|
-
|
|
2220
|
-
// ../unbuild/src/plugins/tsc.ts
|
|
2221
|
-
import { readCachedProjectGraph as readCachedProjectGraph3 } from "@nx/devkit";
|
|
2222
|
-
import { calculateProjectBuildableDependencies as calculateProjectBuildableDependencies2 } from "@nx/js/src/utils/buildable-libs-utils";
|
|
2223
|
-
import { getHelperDependency, HelperDependency } from "@nx/js/src/utils/compiler-helper-dependency";
|
|
2224
|
-
import ts2Plugin from "rollup-plugin-typescript2";
|
|
2225
|
-
|
|
2226
|
-
// ../unbuild/src/utilities/helpers.ts
|
|
2227
|
-
import { joinPathFragments as joinPathFragments4 } from "@nx/devkit";
|
|
2228
|
-
import { computeCompilerOptionsPaths } from "@nx/js/src/utils/buildable-libs-utils";
|
|
2229
|
-
import { dirname as dirname2, extname } from "node:path";
|
|
2230
|
-
import { pathToFileURL } from "node:url";
|
|
2231
|
-
import ts from "typescript";
|
|
2232
|
-
async function loadConfig(configPath) {
|
|
2233
|
-
if (!/\.(js|mjs)$/.test(extname(configPath))) {
|
|
2234
|
-
throw new Error("Unsupported config file format");
|
|
2235
|
-
}
|
|
2236
|
-
return import(pathToFileURL(configPath).toString()).then((config) => config.default);
|
|
2237
|
-
}
|
|
2238
|
-
__name(loadConfig, "loadConfig");
|
|
2239
|
-
async function createTsCompilerOptions(config, tsConfigPath, projectRoot, dependencies) {
|
|
2240
|
-
const tsConfigFile = ts.readConfigFile(joinPathFragments4(config.workspaceRoot, projectRoot, tsConfigPath), ts.sys.readFile);
|
|
2241
|
-
const tsConfig = ts.parseJsonConfigFileContent(tsConfigFile.config, ts.sys, dirname2(joinPathFragments4(config.workspaceRoot, projectRoot, tsConfigPath)));
|
|
2242
|
-
const compilerOptions = {
|
|
2243
|
-
rootDir: projectRoot,
|
|
2244
|
-
declaration: true,
|
|
2245
|
-
paths: computeCompilerOptionsPaths(tsConfig, dependencies ?? [])
|
|
2246
|
-
};
|
|
2247
|
-
writeTrace(compilerOptions, config);
|
|
2248
|
-
return compilerOptions;
|
|
2249
|
-
}
|
|
2250
|
-
__name(createTsCompilerOptions, "createTsCompilerOptions");
|
|
2251
|
-
|
|
2252
|
-
// ../unbuild/src/plugins/tsc.ts
|
|
2253
|
-
var tscPlugin2 = /* @__PURE__ */ __name(async (options, resolvedOptions) => {
|
|
2254
|
-
const projectGraph = readCachedProjectGraph3();
|
|
2255
|
-
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);
|
|
2256
|
-
let dependencies = result.dependencies;
|
|
2257
|
-
const tsLibDependency = getHelperDependency(HelperDependency.tsc, resolvedOptions.tsconfig, dependencies, projectGraph, true);
|
|
2258
|
-
if (tsLibDependency) {
|
|
2259
|
-
dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
|
|
2260
|
-
dependencies.push(tsLibDependency);
|
|
2261
|
-
}
|
|
2262
|
-
return ts2Plugin({
|
|
2263
|
-
check: options.emitTypes !== false,
|
|
2264
|
-
tsconfig: resolvedOptions.tsconfig,
|
|
2265
|
-
tsconfigOverride: {
|
|
2266
|
-
compilerOptions: await createTsCompilerOptions(resolvedOptions.config, resolvedOptions.tsconfig, resolvedOptions.projectRoot, dependencies)
|
|
2267
|
-
}
|
|
2268
|
-
});
|
|
2269
|
-
}, "tscPlugin");
|
|
2270
|
-
|
|
2271
|
-
// ../unbuild/src/plugins/type-definitions.ts
|
|
2272
|
-
import { relative as relative3 } from "node:path";
|
|
2273
|
-
function typeDefinitions(projectRoot) {
|
|
2274
|
-
return {
|
|
2275
|
-
name: "storm:dts-bundle",
|
|
2276
|
-
async generateBundle(_opts, bundle) {
|
|
2277
|
-
for (const file of Object.values(bundle)) {
|
|
2278
|
-
if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
|
|
2279
|
-
continue;
|
|
2280
|
-
}
|
|
2281
|
-
const hasDefaultExport = file.exports.includes("default");
|
|
2282
|
-
const entrySourceFileName = relative3(projectRoot, file.facadeModuleId);
|
|
2283
|
-
const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
|
|
2284
|
-
const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
|
|
2285
|
-
const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
|
|
2286
|
-
const dtsFileSource = hasDefaultExport ? `
|
|
2287
|
-
export * from ${relativeSourceDtsName};
|
|
2288
|
-
export { default } from ${relativeSourceDtsName};
|
|
2289
|
-
` : `export * from ${relativeSourceDtsName};
|
|
2290
|
-
`;
|
|
2291
|
-
this.emitFile({
|
|
2292
|
-
type: "asset",
|
|
2293
|
-
fileName: dtsFileName,
|
|
2294
|
-
source: dtsFileSource
|
|
2295
|
-
});
|
|
2296
|
-
}
|
|
2297
|
-
}
|
|
2298
|
-
};
|
|
2299
|
-
}
|
|
2300
|
-
__name(typeDefinitions, "typeDefinitions");
|
|
2301
|
-
|
|
2302
|
-
// ../unbuild/src/config.ts
|
|
2303
|
-
var getDefaultBuildPlugins2 = /* @__PURE__ */ __name(async (options, resolvedOptions) => Promise.all([
|
|
2304
|
-
analyzePlugin(options, resolvedOptions),
|
|
2305
|
-
typeDefinitions(resolvedOptions.projectRoot),
|
|
2306
|
-
tscPlugin2(options, resolvedOptions),
|
|
2307
|
-
onErrorPlugin2(options, resolvedOptions)
|
|
2308
|
-
].map((plugin) => Promise.resolve(plugin))), "getDefaultBuildPlugins");
|
|
2309
|
-
|
|
2310
|
-
// ../unbuild/src/build.ts
|
|
2311
|
-
async function resolveOptions3(options) {
|
|
2312
|
-
const projectRoot = options.projectRoot;
|
|
2313
|
-
if (!projectRoot) {
|
|
2314
|
-
throw new Error("Cannot find project root");
|
|
2315
|
-
}
|
|
2316
|
-
const outputPath = options.outputPath || joinPaths("dist", projectRoot);
|
|
2317
|
-
const workspaceRoot3 = findWorkspaceRoot4(projectRoot);
|
|
2318
|
-
if (!workspaceRoot3) {
|
|
2319
|
-
throw new Error("Cannot find workspace root");
|
|
2320
|
-
}
|
|
2321
|
-
const config = await loadStormConfig(workspaceRoot3.dir);
|
|
2322
|
-
writeDebug(" \u2699\uFE0F Resolving build options", config);
|
|
2323
|
-
const stopwatch = getStopwatch("Build options resolution");
|
|
2324
|
-
if (options.configPath) {
|
|
2325
|
-
const configFile = await loadConfig(options.configPath);
|
|
2326
|
-
if (configFile) {
|
|
2327
|
-
options = defu3(options, configFile);
|
|
2328
|
-
}
|
|
2329
|
-
}
|
|
2330
|
-
const projectGraph = readCachedProjectGraph4();
|
|
2331
|
-
const projectJsonPath = joinPaths(config.workspaceRoot, projectRoot, "project.json");
|
|
2332
|
-
if (!existsSync4(projectJsonPath)) {
|
|
2333
|
-
throw new Error("Cannot find project.json configuration");
|
|
2334
|
-
}
|
|
2335
|
-
const projectJsonContent = await readFile5(projectJsonPath, "utf8");
|
|
2336
|
-
const projectJson = JSON.parse(projectJsonContent);
|
|
2337
|
-
const projectName = projectJson.name;
|
|
2338
|
-
const packageJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "package.json");
|
|
2339
|
-
if (!existsSync4(packageJsonPath)) {
|
|
2340
|
-
throw new Error("Cannot find package.json configuration");
|
|
2341
|
-
}
|
|
2342
|
-
const packageJsonContent = await readFile5(packageJsonPath, "utf8");
|
|
2343
|
-
const packageJson = JSON.parse(packageJsonContent);
|
|
2344
|
-
let tsconfig = options.tsconfig;
|
|
2345
|
-
if (!tsconfig) {
|
|
2346
|
-
tsconfig = joinPaths(workspaceRoot3.dir, projectRoot, "tsconfig.json");
|
|
2347
|
-
}
|
|
2348
|
-
if (!existsSync4(tsconfig)) {
|
|
2349
|
-
throw new Error("Cannot find tsconfig.json configuration");
|
|
2350
|
-
}
|
|
2351
|
-
let sourceRoot = projectJson.sourceRoot;
|
|
2352
|
-
if (!sourceRoot) {
|
|
2353
|
-
sourceRoot = joinPaths(projectRoot, "src");
|
|
2354
|
-
}
|
|
2355
|
-
if (!existsSync4(sourceRoot)) {
|
|
2356
|
-
throw new Error("Cannot find sourceRoot directory");
|
|
2357
|
-
}
|
|
2358
|
-
const result = calculateProjectBuildableDependencies3(void 0, projectGraph, workspaceRoot3.dir, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
2359
|
-
let dependencies = result.dependencies;
|
|
2360
|
-
const tsLibDependency = getHelperDependency2(HelperDependency2.tsc, tsconfig, dependencies, projectGraph, true);
|
|
2361
|
-
if (tsLibDependency) {
|
|
2362
|
-
dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
|
|
2363
|
-
dependencies.push(tsLibDependency);
|
|
2364
|
-
}
|
|
2365
|
-
const resolvedOptions = {
|
|
2366
|
-
name: projectName,
|
|
2367
|
-
config,
|
|
2368
|
-
projectRoot,
|
|
2369
|
-
sourceRoot,
|
|
2370
|
-
projectName,
|
|
2371
|
-
tsconfig,
|
|
2372
|
-
clean: false,
|
|
2373
|
-
entries: [
|
|
2374
|
-
{
|
|
2375
|
-
builder: "mkdist",
|
|
2376
|
-
input: `.${sourceRoot.replace(projectRoot, "")}`,
|
|
2377
|
-
outDir: joinPaths(relative4(joinPaths(config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
|
|
2378
|
-
declaration: options.emitTypes !== false,
|
|
2379
|
-
format: "esm"
|
|
2380
|
-
},
|
|
2381
|
-
{
|
|
2382
|
-
builder: "mkdist",
|
|
2383
|
-
input: `.${sourceRoot.replace(projectRoot, "")}`,
|
|
2384
|
-
outDir: joinPaths(relative4(joinPaths(config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
|
|
2385
|
-
declaration: options.emitTypes !== false,
|
|
2386
|
-
format: "cjs",
|
|
2387
|
-
ext: "cjs"
|
|
2388
|
-
}
|
|
2389
|
-
],
|
|
2390
|
-
declaration: options.emitTypes !== false ? "compatible" : false,
|
|
2391
|
-
failOnWarn: false,
|
|
2392
|
-
sourcemap: options.sourcemap ?? !!options.debug,
|
|
2393
|
-
outDir: outputPath,
|
|
2394
|
-
parallel: true,
|
|
2395
|
-
stub: false,
|
|
2396
|
-
stubOptions: {
|
|
2397
|
-
jiti: {}
|
|
2398
|
-
},
|
|
2399
|
-
externals: options.external ?? [],
|
|
2400
|
-
dependencies: [],
|
|
2401
|
-
peerDependencies: [],
|
|
2402
|
-
devDependencies: [],
|
|
2403
|
-
hooks: {},
|
|
2404
|
-
alias: {},
|
|
2405
|
-
replace: {},
|
|
2406
|
-
rollup: {
|
|
2407
|
-
replace: {},
|
|
2408
|
-
alias: {},
|
|
2409
|
-
json: {},
|
|
2410
|
-
commonjs: {
|
|
2411
|
-
sourceMap: options.sourcemap ?? true
|
|
2412
|
-
},
|
|
2413
|
-
emitCJS: true,
|
|
2414
|
-
cjsBridge: true,
|
|
2415
|
-
dts: {
|
|
2416
|
-
respectExternal: true,
|
|
2417
|
-
tsconfig
|
|
2418
|
-
},
|
|
2419
|
-
output: {
|
|
2420
|
-
banner: options.banner || `
|
|
2421
|
-
// \u26A1 Built by Storm Software
|
|
2422
|
-
`,
|
|
2423
|
-
footer: options.footer
|
|
2424
|
-
},
|
|
2425
|
-
resolve: {
|
|
2426
|
-
preferBuiltins: true,
|
|
2427
|
-
extensions: [
|
|
2428
|
-
".cjs",
|
|
2429
|
-
".mjs",
|
|
2430
|
-
".js",
|
|
2431
|
-
".jsx",
|
|
2432
|
-
".ts",
|
|
2433
|
-
".tsx",
|
|
2434
|
-
".json"
|
|
2435
|
-
]
|
|
2436
|
-
},
|
|
2437
|
-
esbuild: {
|
|
2438
|
-
minify: !!options.minify,
|
|
2439
|
-
splitting: options.splitting !== false,
|
|
2440
|
-
treeShaking: options.treeShaking !== false,
|
|
2441
|
-
color: true,
|
|
2442
|
-
logLevel: config.logLevel === LogLevelLabel.FATAL ? LogLevelLabel.ERROR : isVerbose() ? "verbose" : config.logLevel
|
|
2443
|
-
}
|
|
2444
|
-
}
|
|
2445
|
-
};
|
|
2446
|
-
dependencies = dependencies.filter((dep) => dep.node.type === "npm" || dep.node.type === "lib" || dep.node.type === "app");
|
|
2447
|
-
if (dependencies.length > 0) {
|
|
2448
|
-
resolvedOptions.dependencies = dependencies.map((dep) => dep.name);
|
|
2449
|
-
}
|
|
2450
|
-
if (packageJson.devDependencies) {
|
|
2451
|
-
resolvedOptions.devDependencies = Object.keys(packageJson.devDependencies);
|
|
2452
|
-
}
|
|
2453
|
-
if (packageJson.peerDependencies) {
|
|
2454
|
-
resolvedOptions.peerDependencies = Object.keys(packageJson.peerDependencies);
|
|
2455
|
-
}
|
|
2456
|
-
if (options.rollup) {
|
|
2457
|
-
let rollup = {};
|
|
2458
|
-
if (typeof options.rollup === "string") {
|
|
2459
|
-
const rollupFile = await loadConfig(options.rollup);
|
|
2460
|
-
if (rollupFile) {
|
|
2461
|
-
rollup = rollupFile;
|
|
2462
|
-
}
|
|
2463
|
-
} else {
|
|
2464
|
-
rollup = options.rollup;
|
|
2465
|
-
}
|
|
2466
|
-
resolvedOptions.rollup = defu3(resolvedOptions.rollup ?? {}, rollup);
|
|
2467
|
-
}
|
|
2468
|
-
resolvedOptions.hooks = {
|
|
2469
|
-
"rollup:options": /* @__PURE__ */ __name(async (ctx, opts) => {
|
|
2470
|
-
opts.plugins = options.plugins ?? await getDefaultBuildPlugins2(options, resolvedOptions);
|
|
2471
|
-
}, "rollup:options")
|
|
2472
|
-
};
|
|
2473
|
-
stopwatch();
|
|
2474
|
-
return resolvedOptions;
|
|
2475
|
-
}
|
|
2476
|
-
__name(resolveOptions3, "resolveOptions");
|
|
2477
|
-
async function generatePackageJson3(options) {
|
|
2478
|
-
if (options.generatePackageJson !== false && existsSync4(joinPaths(options.projectRoot, "package.json"))) {
|
|
2479
|
-
writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
|
|
2480
|
-
const stopwatch = getStopwatch("Write package.json file");
|
|
2481
|
-
const packageJsonPath = joinPaths(options.projectRoot, "project.json");
|
|
2482
|
-
if (!existsSync4(packageJsonPath)) {
|
|
2483
|
-
throw new Error("Cannot find package.json configuration");
|
|
2484
|
-
}
|
|
2485
|
-
let packageJsonContent = await readFile5(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
2486
|
-
if (!packageJsonContent) {
|
|
2487
|
-
throw new Error("Cannot find package.json configuration file");
|
|
2488
|
-
}
|
|
2489
|
-
let packageJson = JSON.parse(packageJsonContent);
|
|
2490
|
-
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
2491
|
-
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
2492
|
-
await writeJsonFile3(joinPaths(options.outDir, "package.json"), await addPackageJsonExports(options.sourceRoot, packageJson));
|
|
2493
|
-
stopwatch();
|
|
2494
|
-
}
|
|
2495
|
-
return options;
|
|
2496
|
-
}
|
|
2497
|
-
__name(generatePackageJson3, "generatePackageJson");
|
|
2498
|
-
async function executeUnbuild(options) {
|
|
2499
|
-
writeDebug(` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
|
|
2500
|
-
const stopwatch = getStopwatch(`${options.name} (${options.projectRoot}) build`);
|
|
2501
|
-
try {
|
|
2502
|
-
await unbuild(options.projectRoot, false, {
|
|
2503
|
-
...options,
|
|
2504
|
-
rootDir: options.projectRoot
|
|
2505
|
-
});
|
|
2506
|
-
} finally {
|
|
2507
|
-
stopwatch();
|
|
2508
|
-
}
|
|
2509
|
-
return options;
|
|
2510
|
-
}
|
|
2511
|
-
__name(executeUnbuild, "executeUnbuild");
|
|
2512
|
-
async function copyBuildAssets3(options) {
|
|
2513
|
-
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
|
|
2514
|
-
const stopwatch = getStopwatch(`${options.name} asset copy`);
|
|
2515
|
-
await copyAssets(options.config, options.assets ?? [], options.outDir, options.projectRoot, options.projectName, options.sourceRoot, options.generatePackageJson, options.includeSrc);
|
|
2516
|
-
stopwatch();
|
|
2517
|
-
return options;
|
|
2518
|
-
}
|
|
2519
|
-
__name(copyBuildAssets3, "copyBuildAssets");
|
|
2520
|
-
async function cleanOutputPath3(options) {
|
|
2521
|
-
if (options.clean !== false && options.outDir) {
|
|
2522
|
-
await clean3(options.name, options.outDir, options.config);
|
|
2523
|
-
}
|
|
2524
|
-
return options;
|
|
2525
|
-
}
|
|
2526
|
-
__name(cleanOutputPath3, "cleanOutputPath");
|
|
2527
|
-
async function build5(options) {
|
|
2528
|
-
writeDebug(` \u26A1 Executing Storm Unbuild pipeline`);
|
|
2529
|
-
const stopwatch = getStopwatch("Unbuild pipeline");
|
|
2530
|
-
try {
|
|
2531
|
-
const resolvedOptions = await resolveOptions3(options);
|
|
2532
|
-
await cleanOutputPath3(resolvedOptions);
|
|
2533
|
-
await generatePackageJson3(resolvedOptions);
|
|
2534
|
-
await executeUnbuild(resolvedOptions);
|
|
2535
|
-
await copyBuildAssets3(resolvedOptions);
|
|
2536
|
-
writeSuccess(` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`, resolvedOptions.config);
|
|
2537
|
-
} catch (error) {
|
|
2538
|
-
writeFatal(" \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
2539
|
-
throw error;
|
|
2540
|
-
} finally {
|
|
2541
|
-
stopwatch();
|
|
2542
|
-
}
|
|
2543
|
-
}
|
|
2544
|
-
__name(build5, "build");
|
|
2545
|
-
|
|
2546
2122
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
2547
|
-
import { defu as
|
|
2123
|
+
import { defu as defu3 } from "defu";
|
|
2124
|
+
import { createJiti } from "jiti";
|
|
2548
2125
|
async function unbuildExecutorFn(options, context2, config) {
|
|
2549
2126
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
2550
2127
|
if (!context2.projectsConfigurations?.projects || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !context2.projectsConfigurations.projects[context2.projectName]?.root) {
|
|
2551
2128
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
2552
2129
|
}
|
|
2553
|
-
|
|
2130
|
+
const jiti = createJiti(config.workspaceRoot, {
|
|
2131
|
+
fsCache: config.skipCache ? false : joinPaths(config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
2132
|
+
interopDefault: true
|
|
2133
|
+
});
|
|
2134
|
+
const stormUnbuild = await jiti.import("@storm-software/unbuild");
|
|
2135
|
+
await stormUnbuild.build(defu3({
|
|
2554
2136
|
...options,
|
|
2555
2137
|
projectRoot: context2.projectsConfigurations.projects?.[context2.projectName].root,
|
|
2556
2138
|
projectName: context2.projectName,
|
|
@@ -2604,7 +2186,7 @@ var executor_default10 = withRunExecutor("TypeScript Unbuild build", unbuildExec
|
|
|
2604
2186
|
});
|
|
2605
2187
|
|
|
2606
2188
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2607
|
-
import { formatFiles as formatFiles2, generateFiles, joinPathFragments as
|
|
2189
|
+
import { formatFiles as formatFiles2, generateFiles, joinPathFragments as joinPathFragments4, names as names2, offsetFromRoot as offsetFromRoot2 } from "@nx/devkit";
|
|
2608
2190
|
|
|
2609
2191
|
// ../workspace-tools/src/base/base-generator.ts
|
|
2610
2192
|
var withRunGenerator = /* @__PURE__ */ __name((name, generatorFn, generatorOptions = {
|
|
@@ -2966,7 +2548,7 @@ __name(normalizeOptions, "normalizeOptions");
|
|
|
2966
2548
|
|
|
2967
2549
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2968
2550
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
2969
|
-
const filesDir =
|
|
2551
|
+
const filesDir = joinPathFragments4(__dirname, "./files");
|
|
2970
2552
|
const tsLibraryGeneratorOptions = {
|
|
2971
2553
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
2972
2554
|
platform: "browser",
|
|
@@ -3069,9 +2651,9 @@ var generator_default2 = withRunGenerator("Configuration Schema Creator", config
|
|
|
3069
2651
|
import { addDependenciesToPackageJson as addDependenciesToPackageJson2, formatFiles as formatFiles4 } from "@nx/devkit";
|
|
3070
2652
|
|
|
3071
2653
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
3072
|
-
import { formatFiles as formatFiles5, generateFiles as generateFiles2, joinPathFragments as
|
|
2654
|
+
import { formatFiles as formatFiles5, generateFiles as generateFiles2, joinPathFragments as joinPathFragments5, names as names3, offsetFromRoot as offsetFromRoot3 } from "@nx/devkit";
|
|
3073
2655
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
3074
|
-
const filesDir =
|
|
2656
|
+
const filesDir = joinPathFragments5(__dirname, "./files");
|
|
3075
2657
|
const tsLibraryGeneratorOptions = {
|
|
3076
2658
|
...schema,
|
|
3077
2659
|
platform: "neutral",
|
|
@@ -3112,9 +2694,9 @@ var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral P
|
|
|
3112
2694
|
});
|
|
3113
2695
|
|
|
3114
2696
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
3115
|
-
import { formatFiles as formatFiles6, generateFiles as generateFiles3, joinPathFragments as
|
|
2697
|
+
import { formatFiles as formatFiles6, generateFiles as generateFiles3, joinPathFragments as joinPathFragments6, names as names4, offsetFromRoot as offsetFromRoot4 } from "@nx/devkit";
|
|
3116
2698
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
3117
|
-
const filesDir =
|
|
2699
|
+
const filesDir = joinPathFragments6(__dirname, "./files");
|
|
3118
2700
|
const tsLibraryGeneratorOptions = {
|
|
3119
2701
|
platform: "node",
|
|
3120
2702
|
devDependencies: {
|
|
@@ -3159,7 +2741,7 @@ var generator_default4 = withRunGenerator("TypeScript Library Creator (NodeJs Pl
|
|
|
3159
2741
|
});
|
|
3160
2742
|
|
|
3161
2743
|
// ../workspace-tools/src/generators/preset/generator.ts
|
|
3162
|
-
import { addDependenciesToPackageJson as addDependenciesToPackageJson3, addProjectConfiguration as addProjectConfiguration2, formatFiles as formatFiles7, generateFiles as generateFiles4, joinPathFragments as
|
|
2744
|
+
import { addDependenciesToPackageJson as addDependenciesToPackageJson3, addProjectConfiguration as addProjectConfiguration2, formatFiles as formatFiles7, generateFiles as generateFiles4, joinPathFragments as joinPathFragments7, updateJson as updateJson2 } from "@nx/devkit";
|
|
3163
2745
|
import * as path6 from "node:path";
|
|
3164
2746
|
async function presetGeneratorFn(tree, options) {
|
|
3165
2747
|
const projectRoot = ".";
|
|
@@ -3377,14 +2959,14 @@ async function presetGeneratorFn(tree, options) {
|
|
|
3377
2959
|
"nx-cloud": "latest"
|
|
3378
2960
|
};
|
|
3379
2961
|
}
|
|
3380
|
-
await Promise.resolve(addDependenciesToPackageJson3(tree, dependencies, {},
|
|
2962
|
+
await Promise.resolve(addDependenciesToPackageJson3(tree, dependencies, {}, joinPathFragments7(projectRoot, "package.json")));
|
|
3381
2963
|
return null;
|
|
3382
2964
|
}
|
|
3383
2965
|
__name(presetGeneratorFn, "presetGeneratorFn");
|
|
3384
2966
|
var generator_default5 = withRunGenerator("Storm Workspace Preset Generator", presetGeneratorFn);
|
|
3385
2967
|
|
|
3386
2968
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
3387
|
-
import { formatFiles as formatFiles8, joinPathFragments as
|
|
2969
|
+
import { formatFiles as formatFiles8, joinPathFragments as joinPathFragments8, output, readJson as readJson2, updateJson as updateJson3, writeJson as writeJson3 } from "@nx/devkit";
|
|
3388
2970
|
import { resolveLocalPackageDependencies as resolveLocalPackageJsonDependencies } from "@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies";
|
|
3389
2971
|
import { updateLockFile } from "@nx/js/src/generators/release-version/utils/update-lock-file";
|
|
3390
2972
|
|
|
@@ -3401,7 +2983,7 @@ import ChangelogRenderer from "nx/release/changelog-renderer/index";
|
|
|
3401
2983
|
|
|
3402
2984
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
3403
2985
|
import { exec as exec2, execSync as execSync5 } from "node:child_process";
|
|
3404
|
-
import { relative as
|
|
2986
|
+
import { relative as relative3 } from "node:path";
|
|
3405
2987
|
import { IMPLICIT_DEFAULT_RELEASE_GROUP } from "nx/src/command-line/release/config/config";
|
|
3406
2988
|
import { getFirstGitCommit, getLatestGitTagForPattern } from "nx/src/command-line/release/utils/git";
|
|
3407
2989
|
import { resolveSemverSpecifierFromConventionalCommits, resolveSemverSpecifierFromPrompt } from "nx/src/command-line/release/utils/resolve-semver-specifier";
|
|
@@ -3990,7 +3572,7 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
|
|
|
3990
3572
|
import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/project-graph/utils/retrieve-workspace-files";
|
|
3991
3573
|
|
|
3992
3574
|
// ../workspace-tools/src/utils/lock-file.ts
|
|
3993
|
-
import { existsSync as
|
|
3575
|
+
import { existsSync as existsSync4 } from "node:fs";
|
|
3994
3576
|
import { join as join2 } from "node:path";
|
|
3995
3577
|
import { output as output2, readJsonFile, workspaceRoot as workspaceRoot2 } from "nx/src/devkit-exports";
|
|
3996
3578
|
import { getNpmLockfileDependencies, getNpmLockfileNodes } from "nx/src/plugins/js/lock-file/npm-parser";
|