@storm-software/unbuild 0.31.3 → 0.31.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/README.md +1 -1
- package/bin/unbuild.cjs +32 -26
- package/bin/unbuild.js +21 -15
- package/dist/build.cjs +8 -8
- package/dist/build.js +7 -7
- package/dist/{chunk-LXCK6Y4C.cjs → chunk-36DXI2BP.cjs} +12 -6
- package/dist/{chunk-G2BQ6VSR.js → chunk-6N2XN6DP.js} +1 -1
- package/dist/{chunk-26OHEX55.cjs → chunk-7JMYS6DV.cjs} +2 -2
- package/dist/{chunk-O45RUFL3.cjs → chunk-AK65ISF4.cjs} +6 -6
- package/dist/{chunk-XGZOR6PZ.js → chunk-ERYQ4O3N.js} +1 -1
- package/dist/{chunk-BZJA6TK2.js → chunk-FGTLL4QO.js} +4 -4
- package/dist/{chunk-GVX7LSWK.cjs → chunk-FSQI7UVH.cjs} +3 -3
- package/dist/{chunk-NYVG7QMW.js → chunk-I3ATI525.js} +1 -1
- package/dist/{chunk-VWXW3RW5.js → chunk-J4VTEQNQ.js} +16 -10
- package/dist/{chunk-3Q2ZB7CN.js → chunk-JN2D2LK7.js} +1 -1
- package/dist/{chunk-OAOLAATA.js → chunk-SRY6IWKG.js} +3 -3
- package/dist/{chunk-CUQLNBV5.cjs → chunk-TXZ34CR4.cjs} +3 -3
- package/dist/{chunk-N2XPKSKO.cjs → chunk-XXT4GSHP.cjs} +92 -92
- package/dist/{chunk-KDTFDJN3.cjs → chunk-ZPOKDFLY.cjs} +2 -2
- package/dist/clean.cjs +3 -3
- package/dist/clean.js +2 -2
- package/dist/config.cjs +6 -6
- package/dist/config.js +5 -5
- package/dist/index.cjs +8 -8
- package/dist/index.js +7 -7
- package/dist/plugins/analyze.cjs +3 -3
- package/dist/plugins/analyze.js +2 -2
- package/dist/plugins/on-error.cjs +3 -3
- package/dist/plugins/on-error.js +2 -2
- package/dist/plugins/tsc.cjs +3 -3
- package/dist/plugins/tsc.js +2 -2
- package/package.json +1 -1
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 -->
|
package/bin/unbuild.cjs
CHANGED
|
@@ -234,38 +234,44 @@ var COLOR_KEYS = [
|
|
|
234
234
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
235
235
|
var import_node_fs2 = require("fs");
|
|
236
236
|
var import_promises = require("fs/promises");
|
|
237
|
-
var
|
|
237
|
+
var import_node_path3 = require("path");
|
|
238
238
|
|
|
239
239
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
240
|
-
var
|
|
240
|
+
var import_node_path = require("path");
|
|
241
|
+
var removeWindowsDriveLetter = /* @__PURE__ */ __name((osSpecificPath) => {
|
|
242
|
+
return osSpecificPath.replace(/^[A-Z]:/, "");
|
|
243
|
+
}, "removeWindowsDriveLetter");
|
|
241
244
|
var correctPaths = /* @__PURE__ */ __name((path2) => {
|
|
242
245
|
if (!path2) {
|
|
243
246
|
return "";
|
|
244
247
|
}
|
|
245
|
-
if (
|
|
246
|
-
path2
|
|
248
|
+
if (path2.includes("\\")) {
|
|
249
|
+
if (!path2.toUpperCase().startsWith("C:")) {
|
|
250
|
+
path2 = `C:${path2}`;
|
|
251
|
+
}
|
|
252
|
+
return path2.replaceAll("/", "\\");
|
|
247
253
|
}
|
|
248
|
-
return path2.
|
|
254
|
+
return removeWindowsDriveLetter(path2).split("\\").join("/");
|
|
249
255
|
}, "correctPaths");
|
|
250
256
|
var joinPaths = /* @__PURE__ */ __name((...paths) => {
|
|
251
257
|
if (!paths || paths.length === 0) {
|
|
252
258
|
return "";
|
|
253
259
|
}
|
|
254
|
-
return correctPaths((0,
|
|
260
|
+
return correctPaths((0, import_node_path.join)(...paths));
|
|
255
261
|
}, "joinPaths");
|
|
256
262
|
|
|
257
263
|
// ../config-tools/src/utilities/find-up.ts
|
|
258
264
|
var import_node_fs = require("fs");
|
|
259
|
-
var
|
|
265
|
+
var import_node_path2 = require("path");
|
|
260
266
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
261
267
|
var depth = 0;
|
|
262
268
|
function findFolderUp(startPath, endFileNames) {
|
|
263
269
|
const _startPath = startPath ?? process.cwd();
|
|
264
|
-
if (endFileNames.some((endFileName) => (0, import_node_fs.existsSync)((0,
|
|
270
|
+
if (endFileNames.some((endFileName) => (0, import_node_fs.existsSync)((0, import_node_path2.join)(_startPath, endFileName)))) {
|
|
265
271
|
return _startPath;
|
|
266
272
|
}
|
|
267
273
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
268
|
-
const parent = (0,
|
|
274
|
+
const parent = (0, import_node_path2.join)(_startPath, "..");
|
|
269
275
|
return findFolderUp(parent, endFileNames);
|
|
270
276
|
}
|
|
271
277
|
return void 0;
|
|
@@ -362,7 +368,7 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
362
368
|
let namespace = void 0;
|
|
363
369
|
let repository = void 0;
|
|
364
370
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
365
|
-
if ((0, import_node_fs2.existsSync)((0,
|
|
371
|
+
if ((0, import_node_fs2.existsSync)((0, import_node_path3.join)(workspaceRoot, "package.json"))) {
|
|
366
372
|
const file = await (0, import_promises.readFile)(joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
367
373
|
if (file) {
|
|
368
374
|
const packageJson = JSON.parse(file);
|
|
@@ -1180,7 +1186,7 @@ var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
|
|
|
1180
1186
|
var import_commander = require("commander");
|
|
1181
1187
|
|
|
1182
1188
|
// src/build.ts
|
|
1183
|
-
var
|
|
1189
|
+
var import_devkit4 = require("@nx/devkit");
|
|
1184
1190
|
var import_js = require("@nx/js");
|
|
1185
1191
|
var import_buildable_libs_utils4 = require("@nx/js/src/utils/buildable-libs-utils");
|
|
1186
1192
|
|
|
@@ -1190,11 +1196,11 @@ var import_core = require("@swc/core");
|
|
|
1190
1196
|
// ../build-tools/src/plugins/ts-resolve.ts
|
|
1191
1197
|
var import_node_fs3 = __toESM(require("fs"));
|
|
1192
1198
|
var import_node_module = require("module");
|
|
1193
|
-
var
|
|
1199
|
+
var import_node_path4 = __toESM(require("path"));
|
|
1194
1200
|
var import_resolve = __toESM(require("resolve"));
|
|
1195
1201
|
|
|
1196
1202
|
// ../build-tools/src/plugins/type-definitions.ts
|
|
1197
|
-
var
|
|
1203
|
+
var import_devkit = require("@nx/devkit");
|
|
1198
1204
|
var import_path = require("path");
|
|
1199
1205
|
|
|
1200
1206
|
// ../build-tools/src/utilities/copy-assets.ts
|
|
@@ -1362,7 +1368,7 @@ var import_defu5 = __toESM(require("defu"), 1);
|
|
|
1362
1368
|
var import_glob4 = require("glob");
|
|
1363
1369
|
var import_node_fs8 = require("fs");
|
|
1364
1370
|
var import_promises8 = require("fs/promises");
|
|
1365
|
-
var
|
|
1371
|
+
var import_node_path7 = require("path");
|
|
1366
1372
|
var import_find_workspace_root5 = require("nx/src/utils/find-workspace-root");
|
|
1367
1373
|
|
|
1368
1374
|
// ../../node_modules/.pnpm/unbuild@3.3.1_sass@1.83.4_typescript@5.7.3/node_modules/unbuild/dist/shared/unbuild.B2_7OVir.mjs
|
|
@@ -2860,27 +2866,27 @@ ${error ? error.message : "Unknown build error"}
|
|
|
2860
2866
|
}), "onErrorPlugin");
|
|
2861
2867
|
|
|
2862
2868
|
// src/plugins/tsc.ts
|
|
2863
|
-
var
|
|
2869
|
+
var import_devkit3 = require("@nx/devkit");
|
|
2864
2870
|
var import_buildable_libs_utils3 = require("@nx/js/src/utils/buildable-libs-utils");
|
|
2865
2871
|
var import_compiler_helper_dependency = require("@nx/js/src/utils/compiler-helper-dependency");
|
|
2866
2872
|
var import_rollup_plugin_typescript2 = __toESM(require("rollup-plugin-typescript2"), 1);
|
|
2867
2873
|
|
|
2868
2874
|
// src/utilities/helpers.ts
|
|
2869
|
-
var
|
|
2875
|
+
var import_devkit2 = require("@nx/devkit");
|
|
2870
2876
|
var import_buildable_libs_utils2 = require("@nx/js/src/utils/buildable-libs-utils");
|
|
2871
|
-
var
|
|
2877
|
+
var import_node_path5 = require("path");
|
|
2872
2878
|
var import_node_url = require("url");
|
|
2873
2879
|
var import_typescript = __toESM(require("typescript"), 1);
|
|
2874
2880
|
async function loadConfig2(configPath) {
|
|
2875
|
-
if (!/\.(js|mjs)$/.test((0,
|
|
2881
|
+
if (!/\.(js|mjs)$/.test((0, import_node_path5.extname)(configPath))) {
|
|
2876
2882
|
throw new Error("Unsupported config file format");
|
|
2877
2883
|
}
|
|
2878
2884
|
return import((0, import_node_url.pathToFileURL)(configPath).toString()).then((config) => config.default);
|
|
2879
2885
|
}
|
|
2880
2886
|
__name(loadConfig2, "loadConfig");
|
|
2881
2887
|
async function createTsCompilerOptions(config, tsConfigPath, projectRoot, dependencies) {
|
|
2882
|
-
const tsConfigFile = import_typescript.default.readConfigFile((0,
|
|
2883
|
-
const tsConfig = import_typescript.default.parseJsonConfigFileContent(tsConfigFile.config, import_typescript.default.sys, (0,
|
|
2888
|
+
const tsConfigFile = import_typescript.default.readConfigFile((0, import_devkit2.joinPathFragments)(config.workspaceRoot, projectRoot, tsConfigPath), import_typescript.default.sys.readFile);
|
|
2889
|
+
const tsConfig = import_typescript.default.parseJsonConfigFileContent(tsConfigFile.config, import_typescript.default.sys, (0, import_node_path5.dirname)((0, import_devkit2.joinPathFragments)(config.workspaceRoot, projectRoot, tsConfigPath)));
|
|
2884
2890
|
const compilerOptions = {
|
|
2885
2891
|
rootDir: projectRoot,
|
|
2886
2892
|
declaration: true,
|
|
@@ -2893,7 +2899,7 @@ __name(createTsCompilerOptions, "createTsCompilerOptions");
|
|
|
2893
2899
|
|
|
2894
2900
|
// src/plugins/tsc.ts
|
|
2895
2901
|
var tscPlugin = /* @__PURE__ */ __name(async (options, resolvedOptions) => {
|
|
2896
|
-
const projectGraph = (0,
|
|
2902
|
+
const projectGraph = (0, import_devkit3.readCachedProjectGraph)();
|
|
2897
2903
|
const result = (0, import_buildable_libs_utils3.calculateProjectBuildableDependencies)(void 0, projectGraph, resolvedOptions.config.workspaceRoot, resolvedOptions.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
2898
2904
|
let dependencies = result.dependencies;
|
|
2899
2905
|
const tsLibDependency = (0, import_compiler_helper_dependency.getHelperDependency)(import_compiler_helper_dependency.HelperDependency.tsc, resolvedOptions.tsconfig, dependencies, projectGraph, true);
|
|
@@ -2911,7 +2917,7 @@ var tscPlugin = /* @__PURE__ */ __name(async (options, resolvedOptions) => {
|
|
|
2911
2917
|
}, "tscPlugin");
|
|
2912
2918
|
|
|
2913
2919
|
// src/plugins/type-definitions.ts
|
|
2914
|
-
var
|
|
2920
|
+
var import_node_path6 = require("path");
|
|
2915
2921
|
function typeDefinitions(projectRoot) {
|
|
2916
2922
|
return {
|
|
2917
2923
|
name: "storm:dts-bundle",
|
|
@@ -2921,7 +2927,7 @@ function typeDefinitions(projectRoot) {
|
|
|
2921
2927
|
continue;
|
|
2922
2928
|
}
|
|
2923
2929
|
const hasDefaultExport = file.exports.includes("default");
|
|
2924
|
-
const entrySourceFileName = (0,
|
|
2930
|
+
const entrySourceFileName = (0, import_node_path6.relative)(projectRoot, file.facadeModuleId);
|
|
2925
2931
|
const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
|
|
2926
2932
|
const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
|
|
2927
2933
|
const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
|
|
@@ -2960,7 +2966,7 @@ async function resolveOptions(options, config) {
|
|
|
2960
2966
|
}
|
|
2961
2967
|
}
|
|
2962
2968
|
const outputPath = options.outputPath || joinPaths("dist", options.projectRoot);
|
|
2963
|
-
const projectGraph = (0,
|
|
2969
|
+
const projectGraph = (0, import_devkit4.readCachedProjectGraph)();
|
|
2964
2970
|
const projectJsonPath = joinPaths(config.workspaceRoot, options.projectRoot, "project.json");
|
|
2965
2971
|
if (!(0, import_node_fs8.existsSync)(projectJsonPath)) {
|
|
2966
2972
|
throw new Error("Cannot find project.json configuration");
|
|
@@ -3015,7 +3021,7 @@ async function resolveOptions(options, config) {
|
|
|
3015
3021
|
while (entryPath.startsWith("/")) {
|
|
3016
3022
|
entryPath = entryPath.substring(1);
|
|
3017
3023
|
}
|
|
3018
|
-
const outDir = joinPaths((0,
|
|
3024
|
+
const outDir = joinPaths((0, import_node_path7.relative)(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist");
|
|
3019
3025
|
ret.push({
|
|
3020
3026
|
name: `${name}-esm`,
|
|
3021
3027
|
builder: "mkdist",
|
|
@@ -3209,7 +3215,7 @@ async function generatePackageJson(options) {
|
|
|
3209
3215
|
}, packageJson.exports);
|
|
3210
3216
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
3211
3217
|
packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, options.sourceRoot, options.projectRoot);
|
|
3212
|
-
await (0,
|
|
3218
|
+
await (0, import_devkit4.writeJsonFile)(joinPaths(options.outDir, "package.json"), packageJson);
|
|
3213
3219
|
stopwatch();
|
|
3214
3220
|
}
|
|
3215
3221
|
return options;
|
package/bin/unbuild.js
CHANGED
|
@@ -209,38 +209,44 @@ var COLOR_KEYS = [
|
|
|
209
209
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
210
210
|
import { existsSync as existsSync2 } from "node:fs";
|
|
211
211
|
import { readFile } from "node:fs/promises";
|
|
212
|
-
import { join as
|
|
212
|
+
import { join as join3 } from "node:path";
|
|
213
213
|
|
|
214
214
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
215
|
-
import {
|
|
215
|
+
import { join } from "node:path";
|
|
216
|
+
var removeWindowsDriveLetter = /* @__PURE__ */ __name((osSpecificPath) => {
|
|
217
|
+
return osSpecificPath.replace(/^[A-Z]:/, "");
|
|
218
|
+
}, "removeWindowsDriveLetter");
|
|
216
219
|
var correctPaths = /* @__PURE__ */ __name((path2) => {
|
|
217
220
|
if (!path2) {
|
|
218
221
|
return "";
|
|
219
222
|
}
|
|
220
|
-
if (
|
|
221
|
-
path2
|
|
223
|
+
if (path2.includes("\\")) {
|
|
224
|
+
if (!path2.toUpperCase().startsWith("C:")) {
|
|
225
|
+
path2 = `C:${path2}`;
|
|
226
|
+
}
|
|
227
|
+
return path2.replaceAll("/", "\\");
|
|
222
228
|
}
|
|
223
|
-
return path2.
|
|
229
|
+
return removeWindowsDriveLetter(path2).split("\\").join("/");
|
|
224
230
|
}, "correctPaths");
|
|
225
231
|
var joinPaths = /* @__PURE__ */ __name((...paths) => {
|
|
226
232
|
if (!paths || paths.length === 0) {
|
|
227
233
|
return "";
|
|
228
234
|
}
|
|
229
|
-
return correctPaths(
|
|
235
|
+
return correctPaths(join(...paths));
|
|
230
236
|
}, "joinPaths");
|
|
231
237
|
|
|
232
238
|
// ../config-tools/src/utilities/find-up.ts
|
|
233
239
|
import { existsSync } from "node:fs";
|
|
234
|
-
import { join } from "node:path";
|
|
240
|
+
import { join as join2 } from "node:path";
|
|
235
241
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
236
242
|
var depth = 0;
|
|
237
243
|
function findFolderUp(startPath, endFileNames) {
|
|
238
244
|
const _startPath = startPath ?? process.cwd();
|
|
239
|
-
if (endFileNames.some((endFileName) => existsSync(
|
|
245
|
+
if (endFileNames.some((endFileName) => existsSync(join2(_startPath, endFileName)))) {
|
|
240
246
|
return _startPath;
|
|
241
247
|
}
|
|
242
248
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
243
|
-
const parent =
|
|
249
|
+
const parent = join2(_startPath, "..");
|
|
244
250
|
return findFolderUp(parent, endFileNames);
|
|
245
251
|
}
|
|
246
252
|
return void 0;
|
|
@@ -337,7 +343,7 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
337
343
|
let namespace = void 0;
|
|
338
344
|
let repository = void 0;
|
|
339
345
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
340
|
-
if (existsSync2(
|
|
346
|
+
if (existsSync2(join3(workspaceRoot, "package.json"))) {
|
|
341
347
|
const file = await readFile(joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
342
348
|
if (file) {
|
|
343
349
|
const packageJson = JSON.parse(file);
|
|
@@ -1343,7 +1349,7 @@ import { findWorkspaceRoot as findWorkspaceRoot2 } from "nx/src/utils/find-works
|
|
|
1343
1349
|
// ../../node_modules/.pnpm/unbuild@3.3.1_sass@1.83.4_typescript@5.7.3/node_modules/unbuild/dist/shared/unbuild.B2_7OVir.mjs
|
|
1344
1350
|
import Module from "node:module";
|
|
1345
1351
|
import { existsSync as existsSync5, readdirSync, statSync, promises } from "node:fs";
|
|
1346
|
-
import { join as
|
|
1352
|
+
import { join as join4, resolve, normalize, dirname, relative as relative2, extname, isAbsolute } from "pathe";
|
|
1347
1353
|
import { colors } from "consola/utils";
|
|
1348
1354
|
import consola$1, { consola } from "consola";
|
|
1349
1355
|
import { defu as defu3 } from "defu";
|
|
@@ -1379,7 +1385,7 @@ var autoPreset = definePreset(() => {
|
|
|
1379
1385
|
if (!ctx.pkg || ctx.options.entries.length > 0) {
|
|
1380
1386
|
return;
|
|
1381
1387
|
}
|
|
1382
|
-
const sourceFiles = listRecursively(
|
|
1388
|
+
const sourceFiles = listRecursively(join4(ctx.options.rootDir, "src"));
|
|
1383
1389
|
const res = inferEntries(ctx.pkg, sourceFiles, ctx.options.rootDir);
|
|
1384
1390
|
for (const message of res.warnings) {
|
|
1385
1391
|
warn(ctx, message);
|
|
@@ -2841,7 +2847,7 @@ import { getHelperDependency, HelperDependency } from "@nx/js/src/utils/compiler
|
|
|
2841
2847
|
import ts2Plugin from "rollup-plugin-typescript2";
|
|
2842
2848
|
|
|
2843
2849
|
// src/utilities/helpers.ts
|
|
2844
|
-
import { joinPathFragments
|
|
2850
|
+
import { joinPathFragments } from "@nx/devkit";
|
|
2845
2851
|
import { computeCompilerOptionsPaths } from "@nx/js/src/utils/buildable-libs-utils";
|
|
2846
2852
|
import { dirname as dirname2, extname as extname2 } from "node:path";
|
|
2847
2853
|
import { pathToFileURL } from "node:url";
|
|
@@ -2854,8 +2860,8 @@ async function loadConfig2(configPath) {
|
|
|
2854
2860
|
}
|
|
2855
2861
|
__name(loadConfig2, "loadConfig");
|
|
2856
2862
|
async function createTsCompilerOptions(config, tsConfigPath, projectRoot, dependencies) {
|
|
2857
|
-
const tsConfigFile = ts.readConfigFile(
|
|
2858
|
-
const tsConfig = ts.parseJsonConfigFileContent(tsConfigFile.config, ts.sys, dirname2(
|
|
2863
|
+
const tsConfigFile = ts.readConfigFile(joinPathFragments(config.workspaceRoot, projectRoot, tsConfigPath), ts.sys.readFile);
|
|
2864
|
+
const tsConfig = ts.parseJsonConfigFileContent(tsConfigFile.config, ts.sys, dirname2(joinPathFragments(config.workspaceRoot, projectRoot, tsConfigPath)));
|
|
2859
2865
|
const compilerOptions = {
|
|
2860
2866
|
rootDir: projectRoot,
|
|
2861
2867
|
declaration: true,
|
package/dist/build.cjs
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
8
|
+
var _chunkXXT4GSHPcjs = require('./chunk-XXT4GSHP.cjs');
|
|
9
|
+
require('./chunk-TXZ34CR4.cjs');
|
|
10
|
+
require('./chunk-AK65ISF4.cjs');
|
|
11
|
+
require('./chunk-7JMYS6DV.cjs');
|
|
12
12
|
require('./chunk-SHHAZOHN.cjs');
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
13
|
+
require('./chunk-ZPOKDFLY.cjs');
|
|
14
|
+
require('./chunk-FSQI7UVH.cjs');
|
|
15
|
+
require('./chunk-36DXI2BP.cjs');
|
|
16
16
|
require('./chunk-YDYGZTJK.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
@@ -21,4 +21,4 @@ require('./chunk-YDYGZTJK.cjs');
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
exports.build =
|
|
24
|
+
exports.build = _chunkXXT4GSHPcjs.build; exports.cleanOutputPath = _chunkXXT4GSHPcjs.cleanOutputPath; exports.copyBuildAssets = _chunkXXT4GSHPcjs.copyBuildAssets; exports.executeUnbuild = _chunkXXT4GSHPcjs.executeUnbuild; exports.generatePackageJson = _chunkXXT4GSHPcjs.generatePackageJson; exports.resolveOptions = _chunkXXT4GSHPcjs.resolveOptions;
|
package/dist/build.js
CHANGED
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-FGTLL4QO.js";
|
|
9
|
+
import "./chunk-ERYQ4O3N.js";
|
|
10
|
+
import "./chunk-SRY6IWKG.js";
|
|
11
|
+
import "./chunk-I3ATI525.js";
|
|
12
12
|
import "./chunk-ESRR2FD2.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-JN2D2LK7.js";
|
|
14
|
+
import "./chunk-6N2XN6DP.js";
|
|
15
|
+
import "./chunk-J4VTEQNQ.js";
|
|
16
16
|
import "./chunk-3GQAWCBQ.js";
|
|
17
17
|
export {
|
|
18
18
|
build,
|
|
@@ -27,21 +27,27 @@ var LogLevelLabel = {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
30
|
-
var
|
|
30
|
+
var _path = require('path');
|
|
31
|
+
var removeWindowsDriveLetter = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (osSpecificPath) => {
|
|
32
|
+
return osSpecificPath.replace(/^[A-Z]:/, "");
|
|
33
|
+
}, "removeWindowsDriveLetter");
|
|
31
34
|
var correctPaths = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (path) => {
|
|
32
35
|
if (!path) {
|
|
33
36
|
return "";
|
|
34
37
|
}
|
|
35
|
-
if (
|
|
36
|
-
path
|
|
38
|
+
if (path.includes("\\")) {
|
|
39
|
+
if (!path.toUpperCase().startsWith("C:")) {
|
|
40
|
+
path = `C:${path}`;
|
|
41
|
+
}
|
|
42
|
+
return path.replaceAll("/", "\\");
|
|
37
43
|
}
|
|
38
|
-
return path.
|
|
44
|
+
return removeWindowsDriveLetter(path).split("\\").join("/");
|
|
39
45
|
}, "correctPaths");
|
|
40
46
|
var joinPaths = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (...paths) => {
|
|
41
47
|
if (!paths || paths.length === 0) {
|
|
42
48
|
return "";
|
|
43
49
|
}
|
|
44
|
-
return correctPaths(
|
|
50
|
+
return correctPaths(_path.join.call(void 0, ...paths));
|
|
45
51
|
}, "joinPaths");
|
|
46
52
|
|
|
47
53
|
// ../config-tools/src/logger/get-log-level.ts
|
|
@@ -273,7 +279,7 @@ var COLOR_KEYS = [
|
|
|
273
279
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
274
280
|
var _fs = require('fs');
|
|
275
281
|
var _promises = require('fs/promises');
|
|
276
|
-
|
|
282
|
+
|
|
277
283
|
|
|
278
284
|
// ../config-tools/src/utilities/find-up.ts
|
|
279
285
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk36DXI2BPcjs = require('./chunk-36DXI2BP.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkYDYGZTJKcjs = require('./chunk-YDYGZTJK.cjs');
|
|
@@ -32,7 +32,7 @@ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, depend
|
|
|
32
32
|
declaration: true,
|
|
33
33
|
paths: _buildablelibsutils.computeCompilerOptionsPaths.call(void 0, tsConfig, _nullishCoalesce(dependencies, () => ( [])))
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
_chunk36DXI2BPcjs.writeTrace.call(void 0, compilerOptions, config);
|
|
36
36
|
return compilerOptions;
|
|
37
37
|
}
|
|
38
38
|
_chunkYDYGZTJKcjs.__name.call(void 0, createTsCompilerOptions, "createTsCompilerOptions");
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk7JMYS6DVcjs = require('./chunk-7JMYS6DV.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSHHAZOHNcjs = require('./chunk-SHHAZOHN.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkZPOKDFLYcjs = require('./chunk-ZPOKDFLY.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkFSQI7UVHcjs = require('./chunk-FSQI7UVH.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
var _chunkYDYGZTJKcjs = require('./chunk-YDYGZTJK.cjs');
|
|
16
16
|
|
|
17
17
|
// src/config.ts
|
|
18
18
|
var getDefaultBuildPlugins = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, async (options, resolvedOptions) => Promise.all([
|
|
19
|
-
|
|
19
|
+
_chunkZPOKDFLYcjs.analyzePlugin.call(void 0, options, resolvedOptions),
|
|
20
20
|
_chunkSHHAZOHNcjs.typeDefinitions.call(void 0, resolvedOptions.projectRoot),
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
_chunk7JMYS6DVcjs.tscPlugin.call(void 0, options, resolvedOptions),
|
|
22
|
+
_chunkFSQI7UVHcjs.onErrorPlugin.call(void 0, options, resolvedOptions)
|
|
23
23
|
].map((plugin) => Promise.resolve(plugin))), "getDefaultBuildPlugins");
|
|
24
24
|
|
|
25
25
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cleanDirectories
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ERYQ4O3N.js";
|
|
4
4
|
import {
|
|
5
5
|
getDefaultBuildPlugins
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SRY6IWKG.js";
|
|
7
7
|
import {
|
|
8
8
|
loadConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-I3ATI525.js";
|
|
10
10
|
import {
|
|
11
11
|
COLOR_KEYS,
|
|
12
12
|
LogLevel,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
writeSuccess,
|
|
30
30
|
writeTrace,
|
|
31
31
|
writeWarning
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-J4VTEQNQ.js";
|
|
33
33
|
import {
|
|
34
34
|
__name
|
|
35
35
|
} from "./chunk-3GQAWCBQ.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk36DXI2BPcjs = require('./chunk-36DXI2BP.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkYDYGZTJKcjs = require('./chunk-YDYGZTJK.cjs');
|
|
@@ -10,7 +10,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (optio
|
|
|
10
10
|
name: "storm:on-error",
|
|
11
11
|
buildEnd(error) {
|
|
12
12
|
if (error) {
|
|
13
|
-
|
|
13
|
+
_chunk36DXI2BPcjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
14
14
|
${error ? error.message : "Unknown build error"}
|
|
15
15
|
|
|
16
16
|
`, resolvedOptions.config);
|
|
@@ -18,7 +18,7 @@ ${error ? error.message : "Unknown build error"}
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
renderError(error) {
|
|
21
|
-
|
|
21
|
+
_chunk36DXI2BPcjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
22
22
|
${error ? error.message : "Unknown build error"}
|
|
23
23
|
|
|
24
24
|
`, resolvedOptions.config);
|
|
@@ -27,21 +27,27 @@ var LogLevelLabel = {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
30
|
-
import {
|
|
30
|
+
import { join } from "node:path";
|
|
31
|
+
var removeWindowsDriveLetter = /* @__PURE__ */ __name((osSpecificPath) => {
|
|
32
|
+
return osSpecificPath.replace(/^[A-Z]:/, "");
|
|
33
|
+
}, "removeWindowsDriveLetter");
|
|
31
34
|
var correctPaths = /* @__PURE__ */ __name((path) => {
|
|
32
35
|
if (!path) {
|
|
33
36
|
return "";
|
|
34
37
|
}
|
|
35
|
-
if (
|
|
36
|
-
path
|
|
38
|
+
if (path.includes("\\")) {
|
|
39
|
+
if (!path.toUpperCase().startsWith("C:")) {
|
|
40
|
+
path = `C:${path}`;
|
|
41
|
+
}
|
|
42
|
+
return path.replaceAll("/", "\\");
|
|
37
43
|
}
|
|
38
|
-
return path.
|
|
44
|
+
return removeWindowsDriveLetter(path).split("\\").join("/");
|
|
39
45
|
}, "correctPaths");
|
|
40
46
|
var joinPaths = /* @__PURE__ */ __name((...paths) => {
|
|
41
47
|
if (!paths || paths.length === 0) {
|
|
42
48
|
return "";
|
|
43
49
|
}
|
|
44
|
-
return correctPaths(
|
|
50
|
+
return correctPaths(join(...paths));
|
|
45
51
|
}, "joinPaths");
|
|
46
52
|
|
|
47
53
|
// ../config-tools/src/logger/get-log-level.ts
|
|
@@ -273,20 +279,20 @@ var COLOR_KEYS = [
|
|
|
273
279
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
274
280
|
import { existsSync as existsSync2 } from "node:fs";
|
|
275
281
|
import { readFile } from "node:fs/promises";
|
|
276
|
-
import { join as
|
|
282
|
+
import { join as join3 } from "node:path";
|
|
277
283
|
|
|
278
284
|
// ../config-tools/src/utilities/find-up.ts
|
|
279
285
|
import { existsSync } from "node:fs";
|
|
280
|
-
import { join } from "node:path";
|
|
286
|
+
import { join as join2 } from "node:path";
|
|
281
287
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
282
288
|
var depth = 0;
|
|
283
289
|
function findFolderUp(startPath, endFileNames) {
|
|
284
290
|
const _startPath = startPath ?? process.cwd();
|
|
285
|
-
if (endFileNames.some((endFileName) => existsSync(
|
|
291
|
+
if (endFileNames.some((endFileName) => existsSync(join2(_startPath, endFileName)))) {
|
|
286
292
|
return _startPath;
|
|
287
293
|
}
|
|
288
294
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
289
|
-
const parent =
|
|
295
|
+
const parent = join2(_startPath, "..");
|
|
290
296
|
return findFolderUp(parent, endFileNames);
|
|
291
297
|
}
|
|
292
298
|
return void 0;
|
|
@@ -383,7 +389,7 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
383
389
|
let namespace = void 0;
|
|
384
390
|
let repository = void 0;
|
|
385
391
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
386
|
-
if (existsSync2(
|
|
392
|
+
if (existsSync2(join3(workspaceRoot, "package.json"))) {
|
|
387
393
|
const file = await readFile(joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
388
394
|
if (file) {
|
|
389
395
|
const packageJson = JSON.parse(file);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tscPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I3ATI525.js";
|
|
4
4
|
import {
|
|
5
5
|
typeDefinitions
|
|
6
6
|
} from "./chunk-ESRR2FD2.js";
|
|
7
7
|
import {
|
|
8
8
|
analyzePlugin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JN2D2LK7.js";
|
|
10
10
|
import {
|
|
11
11
|
onErrorPlugin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6N2XN6DP.js";
|
|
13
13
|
import {
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-3GQAWCBQ.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk36DXI2BPcjs = require('./chunk-36DXI2BP.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkYDYGZTJKcjs = require('./chunk-YDYGZTJK.cjs');
|
|
@@ -9,8 +9,8 @@ var _chunkYDYGZTJKcjs = require('./chunk-YDYGZTJK.cjs');
|
|
|
9
9
|
// src/clean.ts
|
|
10
10
|
var _promises = require('fs/promises');
|
|
11
11
|
async function clean(name = "Unbuild", directory, config) {
|
|
12
|
-
|
|
13
|
-
const stopwatch =
|
|
12
|
+
_chunk36DXI2BPcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
13
|
+
const stopwatch = _chunk36DXI2BPcjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
14
14
|
await cleanDirectories(name, directory, config);
|
|
15
15
|
stopwatch();
|
|
16
16
|
}
|