@storm-software/unbuild 0.33.11 → 0.34.1
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 +133 -30
- package/bin/unbuild.js +125 -22
- package/dist/build.cjs +8 -8
- package/dist/build.js +7 -7
- package/dist/{chunk-ERYQ4O3N.js → chunk-2E6P5U5P.js} +1 -1
- package/dist/{chunk-I7SGCUR4.cjs → chunk-3HGUCQU6.cjs} +3 -3
- package/dist/{chunk-LFUHP3V6.cjs → chunk-5FQVMM7I.cjs} +121 -18
- package/dist/{chunk-Y3FGYCTG.cjs → chunk-AGJ2KZ3K.cjs} +2 -2
- package/dist/{chunk-HBOCJ3VS.cjs → chunk-DL7OBOWN.cjs} +6 -6
- package/dist/{chunk-6N2XN6DP.js → chunk-HHWS7REN.js} +1 -1
- package/dist/{chunk-ZGZI67KX.js → chunk-J7JXWCQS.js} +4 -4
- package/dist/{chunk-FYU6QKHN.cjs → chunk-LJ5GM5M6.cjs} +92 -92
- package/dist/{chunk-ZYPPSI2Q.cjs → chunk-NGL4NRBA.cjs} +2 -2
- package/dist/{chunk-J4VTEQNQ.js → chunk-PLJQK2VX.js} +125 -22
- package/dist/{chunk-ELBNF3ZV.cjs → chunk-SEWO2Q7T.cjs} +3 -3
- package/dist/{chunk-JN2D2LK7.js → chunk-UELS4AUC.js} +1 -1
- package/dist/{chunk-SRY6IWKG.js → chunk-UYR662XD.js} +3 -3
- package/dist/{chunk-I3ATI525.js → chunk-WI52QJ54.js} +1 -1
- 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
|
@@ -230,44 +230,147 @@ var COLOR_KEYS = [
|
|
|
230
230
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
231
231
|
var import_node_fs2 = require("fs");
|
|
232
232
|
var import_promises = require("fs/promises");
|
|
233
|
-
var
|
|
233
|
+
var import_node_path2 = require("path");
|
|
234
234
|
|
|
235
235
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
236
|
-
var
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
236
|
+
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
237
|
+
function normalizeWindowsPath(input = "") {
|
|
238
|
+
if (!input) {
|
|
239
|
+
return input;
|
|
240
|
+
}
|
|
241
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
242
|
+
}
|
|
243
|
+
__name(normalizeWindowsPath, "normalizeWindowsPath");
|
|
244
|
+
var _UNC_REGEX = /^[/\\]{2}/;
|
|
245
|
+
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
246
|
+
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
247
|
+
var correctPaths = /* @__PURE__ */ __name(function(path2) {
|
|
248
|
+
if (!path2 || path2.length === 0) {
|
|
249
|
+
return ".";
|
|
250
|
+
}
|
|
251
|
+
path2 = normalizeWindowsPath(path2);
|
|
252
|
+
const isUNCPath = path2.match(_UNC_REGEX);
|
|
253
|
+
const isPathAbsolute = isAbsolute(path2);
|
|
254
|
+
const trailingSeparator = path2[path2.length - 1] === "/";
|
|
255
|
+
path2 = normalizeString(path2, !isPathAbsolute);
|
|
256
|
+
if (path2.length === 0) {
|
|
257
|
+
if (isPathAbsolute) {
|
|
258
|
+
return "/";
|
|
259
|
+
}
|
|
260
|
+
return trailingSeparator ? "./" : ".";
|
|
261
|
+
}
|
|
262
|
+
if (trailingSeparator) {
|
|
263
|
+
path2 += "/";
|
|
264
|
+
}
|
|
265
|
+
if (_DRIVE_LETTER_RE.test(path2)) {
|
|
266
|
+
path2 += "/";
|
|
267
|
+
}
|
|
268
|
+
if (isUNCPath) {
|
|
269
|
+
if (!isPathAbsolute) {
|
|
270
|
+
return `//./${path2}`;
|
|
247
271
|
}
|
|
248
|
-
return path2
|
|
272
|
+
return `//${path2}`;
|
|
249
273
|
}
|
|
250
|
-
return
|
|
274
|
+
return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
|
|
251
275
|
}, "correctPaths");
|
|
252
|
-
var joinPaths = /* @__PURE__ */ __name((...
|
|
253
|
-
|
|
254
|
-
|
|
276
|
+
var joinPaths = /* @__PURE__ */ __name(function(...segments) {
|
|
277
|
+
let path2 = "";
|
|
278
|
+
for (const seg of segments) {
|
|
279
|
+
if (!seg) {
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
if (path2.length > 0) {
|
|
283
|
+
const pathTrailing = path2[path2.length - 1] === "/";
|
|
284
|
+
const segLeading = seg[0] === "/";
|
|
285
|
+
const both = pathTrailing && segLeading;
|
|
286
|
+
if (both) {
|
|
287
|
+
path2 += seg.slice(1);
|
|
288
|
+
} else {
|
|
289
|
+
path2 += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
290
|
+
}
|
|
291
|
+
} else {
|
|
292
|
+
path2 += seg;
|
|
293
|
+
}
|
|
255
294
|
}
|
|
256
|
-
return correctPaths(
|
|
295
|
+
return correctPaths(path2);
|
|
257
296
|
}, "joinPaths");
|
|
297
|
+
function normalizeString(path2, allowAboveRoot) {
|
|
298
|
+
let res = "";
|
|
299
|
+
let lastSegmentLength = 0;
|
|
300
|
+
let lastSlash = -1;
|
|
301
|
+
let dots = 0;
|
|
302
|
+
let char = null;
|
|
303
|
+
for (let index = 0; index <= path2.length; ++index) {
|
|
304
|
+
if (index < path2.length) {
|
|
305
|
+
char = path2[index];
|
|
306
|
+
} else if (char === "/") {
|
|
307
|
+
break;
|
|
308
|
+
} else {
|
|
309
|
+
char = "/";
|
|
310
|
+
}
|
|
311
|
+
if (char === "/") {
|
|
312
|
+
if (lastSlash === index - 1 || dots === 1) {
|
|
313
|
+
} else if (dots === 2) {
|
|
314
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
315
|
+
if (res.length > 2) {
|
|
316
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
317
|
+
if (lastSlashIndex === -1) {
|
|
318
|
+
res = "";
|
|
319
|
+
lastSegmentLength = 0;
|
|
320
|
+
} else {
|
|
321
|
+
res = res.slice(0, lastSlashIndex);
|
|
322
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
323
|
+
}
|
|
324
|
+
lastSlash = index;
|
|
325
|
+
dots = 0;
|
|
326
|
+
continue;
|
|
327
|
+
} else if (res.length > 0) {
|
|
328
|
+
res = "";
|
|
329
|
+
lastSegmentLength = 0;
|
|
330
|
+
lastSlash = index;
|
|
331
|
+
dots = 0;
|
|
332
|
+
continue;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
if (allowAboveRoot) {
|
|
336
|
+
res += res.length > 0 ? "/.." : "..";
|
|
337
|
+
lastSegmentLength = 2;
|
|
338
|
+
}
|
|
339
|
+
} else {
|
|
340
|
+
if (res.length > 0) {
|
|
341
|
+
res += `/${path2.slice(lastSlash + 1, index)}`;
|
|
342
|
+
} else {
|
|
343
|
+
res = path2.slice(lastSlash + 1, index);
|
|
344
|
+
}
|
|
345
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
346
|
+
}
|
|
347
|
+
lastSlash = index;
|
|
348
|
+
dots = 0;
|
|
349
|
+
} else if (char === "." && dots !== -1) {
|
|
350
|
+
++dots;
|
|
351
|
+
} else {
|
|
352
|
+
dots = -1;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
return res;
|
|
356
|
+
}
|
|
357
|
+
__name(normalizeString, "normalizeString");
|
|
358
|
+
var isAbsolute = /* @__PURE__ */ __name(function(p) {
|
|
359
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
360
|
+
}, "isAbsolute");
|
|
258
361
|
|
|
259
362
|
// ../config-tools/src/utilities/find-up.ts
|
|
260
363
|
var import_node_fs = require("fs");
|
|
261
|
-
var
|
|
364
|
+
var import_node_path = require("path");
|
|
262
365
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
263
366
|
var depth = 0;
|
|
264
367
|
function findFolderUp(startPath, endFileNames) {
|
|
265
368
|
const _startPath = startPath ?? process.cwd();
|
|
266
|
-
if (endFileNames.some((endFileName) => (0, import_node_fs.existsSync)((0,
|
|
369
|
+
if (endFileNames.some((endFileName) => (0, import_node_fs.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
|
|
267
370
|
return _startPath;
|
|
268
371
|
}
|
|
269
372
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
270
|
-
const parent = (0,
|
|
373
|
+
const parent = (0, import_node_path.join)(_startPath, "..");
|
|
271
374
|
return findFolderUp(parent, endFileNames);
|
|
272
375
|
}
|
|
273
376
|
return void 0;
|
|
@@ -364,7 +467,7 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
364
467
|
let namespace = void 0;
|
|
365
468
|
let repository = void 0;
|
|
366
469
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
367
|
-
if ((0, import_node_fs2.existsSync)((0,
|
|
470
|
+
if ((0, import_node_fs2.existsSync)((0, import_node_path2.join)(workspaceRoot, "package.json"))) {
|
|
368
471
|
const file = await (0, import_promises.readFile)(joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
369
472
|
if (file) {
|
|
370
473
|
const packageJson = JSON.parse(file);
|
|
@@ -1192,7 +1295,7 @@ var import_core = require("@swc/core");
|
|
|
1192
1295
|
// ../build-tools/src/plugins/ts-resolve.ts
|
|
1193
1296
|
var import_node_fs3 = __toESM(require("fs"));
|
|
1194
1297
|
var import_node_module = require("module");
|
|
1195
|
-
var
|
|
1298
|
+
var import_node_path3 = __toESM(require("path"));
|
|
1196
1299
|
var import_resolve = __toESM(require("resolve"));
|
|
1197
1300
|
|
|
1198
1301
|
// ../build-tools/src/plugins/type-definitions.ts
|
|
@@ -1364,7 +1467,7 @@ var import_defu3 = __toESM(require("defu"), 1);
|
|
|
1364
1467
|
var import_glob4 = require("glob");
|
|
1365
1468
|
var import_node_fs6 = require("fs");
|
|
1366
1469
|
var import_promises6 = require("fs/promises");
|
|
1367
|
-
var
|
|
1470
|
+
var import_node_path6 = require("path");
|
|
1368
1471
|
var import_find_workspace_root5 = require("nx/src/utils/find-workspace-root");
|
|
1369
1472
|
var import_unbuild = require("unbuild");
|
|
1370
1473
|
|
|
@@ -1440,11 +1543,11 @@ var import_rollup_plugin_typescript2 = __toESM(require("rollup-plugin-typescript
|
|
|
1440
1543
|
// src/utilities/helpers.ts
|
|
1441
1544
|
var import_devkit2 = require("@nx/devkit");
|
|
1442
1545
|
var import_buildable_libs_utils2 = require("@nx/js/src/utils/buildable-libs-utils");
|
|
1443
|
-
var
|
|
1546
|
+
var import_node_path4 = require("path");
|
|
1444
1547
|
var import_node_url = require("url");
|
|
1445
1548
|
var import_typescript = __toESM(require("typescript"), 1);
|
|
1446
1549
|
async function loadConfig2(configPath) {
|
|
1447
|
-
if (!/\.(js|mjs)$/.test((0,
|
|
1550
|
+
if (!/\.(js|mjs)$/.test((0, import_node_path4.extname)(configPath))) {
|
|
1448
1551
|
throw new Error("Unsupported config file format");
|
|
1449
1552
|
}
|
|
1450
1553
|
return import((0, import_node_url.pathToFileURL)(configPath).toString()).then((config) => config.default);
|
|
@@ -1452,7 +1555,7 @@ async function loadConfig2(configPath) {
|
|
|
1452
1555
|
__name(loadConfig2, "loadConfig");
|
|
1453
1556
|
async function createTsCompilerOptions(config, tsConfigPath, projectRoot, dependencies) {
|
|
1454
1557
|
const tsConfigFile = import_typescript.default.readConfigFile((0, import_devkit2.joinPathFragments)(config.workspaceRoot, projectRoot, tsConfigPath), import_typescript.default.sys.readFile);
|
|
1455
|
-
const tsConfig = import_typescript.default.parseJsonConfigFileContent(tsConfigFile.config, import_typescript.default.sys, (0,
|
|
1558
|
+
const tsConfig = import_typescript.default.parseJsonConfigFileContent(tsConfigFile.config, import_typescript.default.sys, (0, import_node_path4.dirname)((0, import_devkit2.joinPathFragments)(config.workspaceRoot, projectRoot, tsConfigPath)));
|
|
1456
1559
|
const compilerOptions = {
|
|
1457
1560
|
rootDir: projectRoot,
|
|
1458
1561
|
declaration: true,
|
|
@@ -1483,7 +1586,7 @@ var tscPlugin = /* @__PURE__ */ __name(async (options, resolvedOptions) => {
|
|
|
1483
1586
|
}, "tscPlugin");
|
|
1484
1587
|
|
|
1485
1588
|
// src/plugins/type-definitions.ts
|
|
1486
|
-
var
|
|
1589
|
+
var import_node_path5 = require("path");
|
|
1487
1590
|
function typeDefinitions(projectRoot) {
|
|
1488
1591
|
return {
|
|
1489
1592
|
name: "storm:dts-bundle",
|
|
@@ -1493,7 +1596,7 @@ function typeDefinitions(projectRoot) {
|
|
|
1493
1596
|
continue;
|
|
1494
1597
|
}
|
|
1495
1598
|
const hasDefaultExport = file.exports.includes("default");
|
|
1496
|
-
const entrySourceFileName = (0,
|
|
1599
|
+
const entrySourceFileName = (0, import_node_path5.relative)(projectRoot, file.facadeModuleId);
|
|
1497
1600
|
const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
|
|
1498
1601
|
const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
|
|
1499
1602
|
const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
|
|
@@ -1587,7 +1690,7 @@ async function resolveOptions(options, config) {
|
|
|
1587
1690
|
while (entryPath.startsWith("/")) {
|
|
1588
1691
|
entryPath = entryPath.substring(1);
|
|
1589
1692
|
}
|
|
1590
|
-
const outDir = joinPaths((0,
|
|
1693
|
+
const outDir = joinPaths((0, import_node_path6.relative)(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist");
|
|
1591
1694
|
ret.push({
|
|
1592
1695
|
name: `${name}-esm`,
|
|
1593
1696
|
builder: "mkdist",
|
package/bin/unbuild.js
CHANGED
|
@@ -209,44 +209,147 @@ 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 join2 } from "node:path";
|
|
213
213
|
|
|
214
214
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
215
|
+
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
216
|
+
function normalizeWindowsPath(input = "") {
|
|
217
|
+
if (!input) {
|
|
218
|
+
return input;
|
|
219
|
+
}
|
|
220
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
221
|
+
}
|
|
222
|
+
__name(normalizeWindowsPath, "normalizeWindowsPath");
|
|
223
|
+
var _UNC_REGEX = /^[/\\]{2}/;
|
|
224
|
+
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
225
|
+
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
226
|
+
var correctPaths = /* @__PURE__ */ __name(function(path2) {
|
|
227
|
+
if (!path2 || path2.length === 0) {
|
|
228
|
+
return ".";
|
|
229
|
+
}
|
|
230
|
+
path2 = normalizeWindowsPath(path2);
|
|
231
|
+
const isUNCPath = path2.match(_UNC_REGEX);
|
|
232
|
+
const isPathAbsolute = isAbsolute(path2);
|
|
233
|
+
const trailingSeparator = path2[path2.length - 1] === "/";
|
|
234
|
+
path2 = normalizeString(path2, !isPathAbsolute);
|
|
235
|
+
if (path2.length === 0) {
|
|
236
|
+
if (isPathAbsolute) {
|
|
237
|
+
return "/";
|
|
226
238
|
}
|
|
227
|
-
return
|
|
239
|
+
return trailingSeparator ? "./" : ".";
|
|
228
240
|
}
|
|
229
|
-
|
|
241
|
+
if (trailingSeparator) {
|
|
242
|
+
path2 += "/";
|
|
243
|
+
}
|
|
244
|
+
if (_DRIVE_LETTER_RE.test(path2)) {
|
|
245
|
+
path2 += "/";
|
|
246
|
+
}
|
|
247
|
+
if (isUNCPath) {
|
|
248
|
+
if (!isPathAbsolute) {
|
|
249
|
+
return `//./${path2}`;
|
|
250
|
+
}
|
|
251
|
+
return `//${path2}`;
|
|
252
|
+
}
|
|
253
|
+
return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
|
|
230
254
|
}, "correctPaths");
|
|
231
|
-
var joinPaths = /* @__PURE__ */ __name((...
|
|
232
|
-
|
|
233
|
-
|
|
255
|
+
var joinPaths = /* @__PURE__ */ __name(function(...segments) {
|
|
256
|
+
let path2 = "";
|
|
257
|
+
for (const seg of segments) {
|
|
258
|
+
if (!seg) {
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
if (path2.length > 0) {
|
|
262
|
+
const pathTrailing = path2[path2.length - 1] === "/";
|
|
263
|
+
const segLeading = seg[0] === "/";
|
|
264
|
+
const both = pathTrailing && segLeading;
|
|
265
|
+
if (both) {
|
|
266
|
+
path2 += seg.slice(1);
|
|
267
|
+
} else {
|
|
268
|
+
path2 += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
269
|
+
}
|
|
270
|
+
} else {
|
|
271
|
+
path2 += seg;
|
|
272
|
+
}
|
|
234
273
|
}
|
|
235
|
-
return correctPaths(
|
|
274
|
+
return correctPaths(path2);
|
|
236
275
|
}, "joinPaths");
|
|
276
|
+
function normalizeString(path2, allowAboveRoot) {
|
|
277
|
+
let res = "";
|
|
278
|
+
let lastSegmentLength = 0;
|
|
279
|
+
let lastSlash = -1;
|
|
280
|
+
let dots = 0;
|
|
281
|
+
let char = null;
|
|
282
|
+
for (let index = 0; index <= path2.length; ++index) {
|
|
283
|
+
if (index < path2.length) {
|
|
284
|
+
char = path2[index];
|
|
285
|
+
} else if (char === "/") {
|
|
286
|
+
break;
|
|
287
|
+
} else {
|
|
288
|
+
char = "/";
|
|
289
|
+
}
|
|
290
|
+
if (char === "/") {
|
|
291
|
+
if (lastSlash === index - 1 || dots === 1) {
|
|
292
|
+
} else if (dots === 2) {
|
|
293
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
294
|
+
if (res.length > 2) {
|
|
295
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
296
|
+
if (lastSlashIndex === -1) {
|
|
297
|
+
res = "";
|
|
298
|
+
lastSegmentLength = 0;
|
|
299
|
+
} else {
|
|
300
|
+
res = res.slice(0, lastSlashIndex);
|
|
301
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
302
|
+
}
|
|
303
|
+
lastSlash = index;
|
|
304
|
+
dots = 0;
|
|
305
|
+
continue;
|
|
306
|
+
} else if (res.length > 0) {
|
|
307
|
+
res = "";
|
|
308
|
+
lastSegmentLength = 0;
|
|
309
|
+
lastSlash = index;
|
|
310
|
+
dots = 0;
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (allowAboveRoot) {
|
|
315
|
+
res += res.length > 0 ? "/.." : "..";
|
|
316
|
+
lastSegmentLength = 2;
|
|
317
|
+
}
|
|
318
|
+
} else {
|
|
319
|
+
if (res.length > 0) {
|
|
320
|
+
res += `/${path2.slice(lastSlash + 1, index)}`;
|
|
321
|
+
} else {
|
|
322
|
+
res = path2.slice(lastSlash + 1, index);
|
|
323
|
+
}
|
|
324
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
325
|
+
}
|
|
326
|
+
lastSlash = index;
|
|
327
|
+
dots = 0;
|
|
328
|
+
} else if (char === "." && dots !== -1) {
|
|
329
|
+
++dots;
|
|
330
|
+
} else {
|
|
331
|
+
dots = -1;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
return res;
|
|
335
|
+
}
|
|
336
|
+
__name(normalizeString, "normalizeString");
|
|
337
|
+
var isAbsolute = /* @__PURE__ */ __name(function(p) {
|
|
338
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
339
|
+
}, "isAbsolute");
|
|
237
340
|
|
|
238
341
|
// ../config-tools/src/utilities/find-up.ts
|
|
239
342
|
import { existsSync } from "node:fs";
|
|
240
|
-
import { join
|
|
343
|
+
import { join } from "node:path";
|
|
241
344
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
242
345
|
var depth = 0;
|
|
243
346
|
function findFolderUp(startPath, endFileNames) {
|
|
244
347
|
const _startPath = startPath ?? process.cwd();
|
|
245
|
-
if (endFileNames.some((endFileName) => existsSync(
|
|
348
|
+
if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
|
|
246
349
|
return _startPath;
|
|
247
350
|
}
|
|
248
351
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
249
|
-
const parent =
|
|
352
|
+
const parent = join(_startPath, "..");
|
|
250
353
|
return findFolderUp(parent, endFileNames);
|
|
251
354
|
}
|
|
252
355
|
return void 0;
|
|
@@ -343,7 +446,7 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
343
446
|
let namespace = void 0;
|
|
344
447
|
let repository = void 0;
|
|
345
448
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
346
|
-
if (existsSync2(
|
|
449
|
+
if (existsSync2(join2(workspaceRoot, "package.json"))) {
|
|
347
450
|
const file = await readFile(joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
348
451
|
if (file) {
|
|
349
452
|
const packageJson = JSON.parse(file);
|
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 _chunkLJ5GM5M6cjs = require('./chunk-LJ5GM5M6.cjs');
|
|
9
|
+
require('./chunk-3HGUCQU6.cjs');
|
|
10
|
+
require('./chunk-DL7OBOWN.cjs');
|
|
11
|
+
require('./chunk-NGL4NRBA.cjs');
|
|
12
12
|
require('./chunk-BDHZY5E7.cjs');
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
13
|
+
require('./chunk-AGJ2KZ3K.cjs');
|
|
14
|
+
require('./chunk-SEWO2Q7T.cjs');
|
|
15
|
+
require('./chunk-5FQVMM7I.cjs');
|
|
16
16
|
require('./chunk-BGYQAVKQ.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
@@ -21,4 +21,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
exports.build =
|
|
24
|
+
exports.build = _chunkLJ5GM5M6cjs.build; exports.cleanOutputPath = _chunkLJ5GM5M6cjs.cleanOutputPath; exports.copyBuildAssets = _chunkLJ5GM5M6cjs.copyBuildAssets; exports.executeUnbuild = _chunkLJ5GM5M6cjs.executeUnbuild; exports.generatePackageJson = _chunkLJ5GM5M6cjs.generatePackageJson; exports.resolveOptions = _chunkLJ5GM5M6cjs.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-J7JXWCQS.js";
|
|
9
|
+
import "./chunk-2E6P5U5P.js";
|
|
10
|
+
import "./chunk-UYR662XD.js";
|
|
11
|
+
import "./chunk-WI52QJ54.js";
|
|
12
12
|
import "./chunk-ESRR2FD2.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-UELS4AUC.js";
|
|
14
|
+
import "./chunk-HHWS7REN.js";
|
|
15
|
+
import "./chunk-PLJQK2VX.js";
|
|
16
16
|
import "./chunk-3GQAWCBQ.js";
|
|
17
17
|
export {
|
|
18
18
|
build,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk5FQVMM7Icjs = require('./chunk-5FQVMM7I.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -9,8 +9,8 @@ var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.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
|
+
_chunk5FQVMM7Icjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
13
|
+
const stopwatch = _chunk5FQVMM7Icjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
14
14
|
await cleanDirectories(name, directory, config);
|
|
15
15
|
stopwatch();
|
|
16
16
|
}
|