@storm-software/unbuild 0.17.3 → 0.18.0

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.
Files changed (62) hide show
  1. package/bin/unbuild.js +30733 -35355
  2. package/bin/{unbuild.cjs → unbuild.mjs} +30714 -35362
  3. package/dist/{build.d.cts → build.d.mts} +1 -1
  4. package/dist/build.js +16 -16
  5. package/dist/build.mjs +16 -0
  6. package/dist/chunk-2ML6ALMN.js +9 -9
  7. package/dist/{chunk-V37I6FRL.cjs → chunk-3BWHONLG.js} +287 -290
  8. package/dist/chunk-55B3XBWH.mjs +29 -0
  9. package/dist/chunk-6EUZQHAF.js +10 -10
  10. package/dist/{chunk-VNXPCFXP.js → chunk-ANPRZIKG.mjs} +76 -79
  11. package/dist/{chunk-R3YTTAZ5.js → chunk-BKBMIPZ6.mjs} +1 -1
  12. package/dist/chunk-C2KSDATI.mjs +33 -0
  13. package/dist/chunk-DX77GU2M.mjs +28 -0
  14. package/dist/{chunk-4XOYG7KV.cjs → chunk-FGN5X2T4.js} +2 -2
  15. package/dist/chunk-GGNOJ77I.js +1 -0
  16. package/dist/{chunk-3QBFDGR4.js → chunk-H5YLUXXE.mjs} +2 -2
  17. package/dist/{chunk-TMJKCWPB.cjs → chunk-HMWQVVLE.js} +46 -46
  18. package/dist/{chunk-E2QFB4NU.js → chunk-IYBW4IOL.mjs} +6 -6
  19. package/dist/chunk-KKPEE667.js +12 -12
  20. package/dist/{chunk-SSZ7VM2H.js → chunk-KYQEKSKC.mjs} +5172 -9801
  21. package/dist/chunk-PYJU2DCJ.js +10 -10
  22. package/dist/{chunk-SZZ6PSUY.cjs → chunk-S6U5RC6R.js} +15101 -19730
  23. package/dist/chunk-SRBMAPFT.js +10 -10
  24. package/dist/chunk-U4C3GQY2.mjs +18 -0
  25. package/dist/chunk-WAXGOBY2.mjs +0 -0
  26. package/dist/{chunk-HEEVZWS4.js → chunk-XRDEYS2Q.mjs} +1 -1
  27. package/dist/{chunk-C4IRH3TZ.cjs → chunk-Y65MI4DK.mjs} +10 -10
  28. package/dist/{chunk-2WTCOI6G.cjs → chunk-Y7B2FEG5.js} +4 -4
  29. package/dist/chunk-YIWBJCZO.js +31 -0
  30. package/dist/clean.d.mts +2 -0
  31. package/dist/clean.js +7 -7
  32. package/dist/clean.mjs +7 -0
  33. package/dist/{config.d.cts → config.d.mts} +1 -1
  34. package/dist/config.js +12 -12
  35. package/dist/config.mjs +12 -0
  36. package/dist/{dist-5FEBPCIF.js → dist-73LKVJOU.mjs} +2 -2
  37. package/dist/dist-G2KLYMK6.js +83 -0
  38. package/dist/{index.d.cts → index.d.mts} +5 -5
  39. package/dist/index.js +28 -28
  40. package/dist/index.mjs +28 -0
  41. package/dist/{prompt-2QA7QO2Y.cjs → prompt-5OLVTLXP.js} +120 -120
  42. package/dist/{prompt-CTBFX6QF.js → prompt-G22OCPDR.mjs} +2 -2
  43. package/dist/{sass.node-3YP74F4W.js → sass.node-3JFKIJQ4.mjs} +46 -47
  44. package/dist/{sass.node-2WXXYG5G.cjs → sass.node-C3IPCFGU.js} +3618 -3619
  45. package/dist/types.js +1 -1
  46. package/dist/types.mjs +1 -0
  47. package/package.json +1 -1
  48. package/dist/build.cjs +0 -16
  49. package/dist/chunk-IZYSCGNB.cjs +0 -28
  50. package/dist/chunk-KYPGHXZY.cjs +0 -31
  51. package/dist/chunk-PNQSAHAO.cjs +0 -18
  52. package/dist/chunk-QPWIL3K6.cjs +0 -33
  53. package/dist/chunk-SFZRYJZ2.cjs +0 -1
  54. package/dist/chunk-ZAHNNGDE.cjs +0 -29
  55. package/dist/clean.cjs +0 -7
  56. package/dist/clean.d.cts +0 -2
  57. package/dist/config.cjs +0 -12
  58. package/dist/dist-YYM2MCAV.cjs +0 -83
  59. package/dist/index.cjs +0 -28
  60. package/dist/types.cjs +0 -1
  61. /package/dist/{clean-BlXMN74D.d.cts → clean-BlXMN74D.d.mts} +0 -0
  62. /package/dist/{types.d.cts → types.d.mts} +0 -0
@@ -0,0 +1,29 @@
1
+ import {
2
+ __name
3
+ } from "./chunk-Y65MI4DK.mjs";
4
+
5
+ // src/plugins/on-error.ts
6
+ import { writeError } from "@storm-software/config-tools";
7
+ var onErrorPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
8
+ name: "storm:on-error",
9
+ buildEnd(error) {
10
+ if (error) {
11
+ writeError(`The following errors occurred during the build:
12
+ ${error ? error.message : "Unknown build error"}
13
+
14
+ `, resolvedOptions.config);
15
+ throw new Error("Storm unbuild process failed with errors.");
16
+ }
17
+ },
18
+ renderError(error) {
19
+ writeError(`The following errors occurred during the build:
20
+ ${error ? error.message : "Unknown build error"}
21
+
22
+ `, resolvedOptions.config);
23
+ throw new Error("Storm unbuild process failed with errors.");
24
+ }
25
+ }), "onErrorPlugin");
26
+
27
+ export {
28
+ onErrorPlugin
29
+ };
@@ -1,4 +1,4 @@
1
- var __create = Object.create;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -39,12 +39,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
  ));
40
40
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
41
41
 
42
- export {
43
- __name,
44
- __require,
45
- __esm,
46
- __commonJS,
47
- __export,
48
- __toESM,
49
- __toCommonJS
50
- };
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+ exports.__name = __name; exports.__require = __require; exports.__esm = __esm; exports.__commonJS = __commonJS; exports.__export = __export; exports.__toESM = __toESM; exports.__toCommonJS = __toCommonJS;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __name
3
- } from "./chunk-6EUZQHAF.js";
3
+ } from "./chunk-Y65MI4DK.mjs";
4
4
 
5
5
  // ../../node_modules/.pnpm/acorn@8.14.0/node_modules/acorn/dist/acorn.mjs
6
6
  var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
@@ -5571,7 +5571,7 @@ function tokenizer2(input, options) {
5571
5571
  }
5572
5572
  __name(tokenizer2, "tokenizer");
5573
5573
 
5574
- // ../../node_modules/.pnpm/mlly@1.7.3/node_modules/mlly/dist/index.mjs
5574
+ // ../../node_modules/.pnpm/mlly@1.7.4/node_modules/mlly/dist/index.mjs
5575
5575
  import { builtinModules, createRequire } from "node:module";
5576
5576
  import fs, { realpathSync, statSync as statSync2, promises as promises2 } from "node:fs";
5577
5577
 
@@ -5593,17 +5593,17 @@ function withTrailingSlash(input = "", respectQueryAndFragment) {
5593
5593
  if (hasTrailingSlash(input, true)) {
5594
5594
  return input || "/";
5595
5595
  }
5596
- let path3 = input;
5596
+ let path2 = input;
5597
5597
  let fragment = "";
5598
5598
  const fragmentIndex = input.indexOf("#");
5599
5599
  if (fragmentIndex >= 0) {
5600
- path3 = input.slice(0, fragmentIndex);
5600
+ path2 = input.slice(0, fragmentIndex);
5601
5601
  fragment = input.slice(fragmentIndex);
5602
- if (!path3) {
5602
+ if (!path2) {
5603
5603
  return fragment;
5604
5604
  }
5605
5605
  }
5606
- const [s0, ...s] = path3.split("?");
5606
+ const [s0, ...s] = path2.split("?");
5607
5607
  return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
5608
5608
  }
5609
5609
  __name(withTrailingSlash, "withTrailingSlash");
@@ -5626,7 +5626,7 @@ function joinURL(base, ...input) {
5626
5626
  __name(joinURL, "joinURL");
5627
5627
  var protocolRelative = Symbol.for("ufo:protocolRelative");
5628
5628
 
5629
- // ../../node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.mjs
5629
+ // ../../node_modules/.pnpm/pathe@2.0.1/node_modules/pathe/dist/shared/pathe.BLwDEnA5.mjs
5630
5630
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
5631
5631
  function normalizeWindowsPath(input = "") {
5632
5632
  if (!input) {
@@ -5639,53 +5639,56 @@ var _UNC_REGEX = /^[/\\]{2}/;
5639
5639
  var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
5640
5640
  var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
5641
5641
  var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
5642
- var normalize = /* @__PURE__ */ __name(function(path3) {
5643
- if (path3.length === 0) {
5642
+ var _EXTNAME_RE = /.(\.[^./]+)$/;
5643
+ var normalize = /* @__PURE__ */ __name(function(path2) {
5644
+ if (path2.length === 0) {
5644
5645
  return ".";
5645
5646
  }
5646
- path3 = normalizeWindowsPath(path3);
5647
- const isUNCPath = path3.match(_UNC_REGEX);
5648
- const isPathAbsolute = isAbsolute(path3);
5649
- const trailingSeparator = path3[path3.length - 1] === "/";
5650
- path3 = normalizeString(path3, !isPathAbsolute);
5651
- if (path3.length === 0) {
5647
+ path2 = normalizeWindowsPath(path2);
5648
+ const isUNCPath = path2.match(_UNC_REGEX);
5649
+ const isPathAbsolute = isAbsolute(path2);
5650
+ const trailingSeparator = path2[path2.length - 1] === "/";
5651
+ path2 = normalizeString(path2, !isPathAbsolute);
5652
+ if (path2.length === 0) {
5652
5653
  if (isPathAbsolute) {
5653
5654
  return "/";
5654
5655
  }
5655
5656
  return trailingSeparator ? "./" : ".";
5656
5657
  }
5657
5658
  if (trailingSeparator) {
5658
- path3 += "/";
5659
+ path2 += "/";
5659
5660
  }
5660
- if (_DRIVE_LETTER_RE.test(path3)) {
5661
- path3 += "/";
5661
+ if (_DRIVE_LETTER_RE.test(path2)) {
5662
+ path2 += "/";
5662
5663
  }
5663
5664
  if (isUNCPath) {
5664
5665
  if (!isPathAbsolute) {
5665
- return `//./${path3}`;
5666
+ return `//./${path2}`;
5666
5667
  }
5667
- return `//${path3}`;
5668
+ return `//${path2}`;
5668
5669
  }
5669
- return isPathAbsolute && !isAbsolute(path3) ? `/${path3}` : path3;
5670
+ return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
5670
5671
  }, "normalize");
5671
- var join = /* @__PURE__ */ __name(function(...arguments_) {
5672
- if (arguments_.length === 0) {
5673
- return ".";
5674
- }
5675
- let joined;
5676
- for (const argument of arguments_) {
5677
- if (argument && argument.length > 0) {
5678
- if (joined === void 0) {
5679
- joined = argument;
5672
+ var join = /* @__PURE__ */ __name(function(...segments) {
5673
+ let path2 = "";
5674
+ for (const seg of segments) {
5675
+ if (!seg) {
5676
+ continue;
5677
+ }
5678
+ if (path2.length > 0) {
5679
+ const pathTrailing = path2[path2.length - 1] === "/";
5680
+ const segLeading = seg[0] === "/";
5681
+ const both = pathTrailing && segLeading;
5682
+ if (both) {
5683
+ path2 += seg.slice(1);
5680
5684
  } else {
5681
- joined += `/${argument}`;
5685
+ path2 += pathTrailing || segLeading ? seg : `/${seg}`;
5682
5686
  }
5687
+ } else {
5688
+ path2 += seg;
5683
5689
  }
5684
5690
  }
5685
- if (joined === void 0) {
5686
- return ".";
5687
- }
5688
- return normalize(joined.replace(/\/\/+/g, "/"));
5691
+ return normalize(path2);
5689
5692
  }, "join");
5690
5693
  function cwd() {
5691
5694
  if (typeof process !== "undefined" && typeof process.cwd === "function") {
@@ -5699,12 +5702,12 @@ var resolve = /* @__PURE__ */ __name(function(...arguments_) {
5699
5702
  let resolvedPath = "";
5700
5703
  let resolvedAbsolute = false;
5701
5704
  for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
5702
- const path3 = index >= 0 ? arguments_[index] : cwd();
5703
- if (!path3 || path3.length === 0) {
5705
+ const path2 = index >= 0 ? arguments_[index] : cwd();
5706
+ if (!path2 || path2.length === 0) {
5704
5707
  continue;
5705
5708
  }
5706
- resolvedPath = `${path3}/${resolvedPath}`;
5707
- resolvedAbsolute = isAbsolute(path3);
5709
+ resolvedPath = `${path2}/${resolvedPath}`;
5710
+ resolvedAbsolute = isAbsolute(path2);
5708
5711
  }
5709
5712
  resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
5710
5713
  if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
@@ -5712,15 +5715,15 @@ var resolve = /* @__PURE__ */ __name(function(...arguments_) {
5712
5715
  }
5713
5716
  return resolvedPath.length > 0 ? resolvedPath : ".";
5714
5717
  }, "resolve");
5715
- function normalizeString(path3, allowAboveRoot) {
5718
+ function normalizeString(path2, allowAboveRoot) {
5716
5719
  let res = "";
5717
5720
  let lastSegmentLength = 0;
5718
5721
  let lastSlash = -1;
5719
5722
  let dots = 0;
5720
5723
  let char = null;
5721
- for (let index = 0; index <= path3.length; ++index) {
5722
- if (index < path3.length) {
5723
- char = path3[index];
5724
+ for (let index = 0; index <= path2.length; ++index) {
5725
+ if (index < path2.length) {
5726
+ char = path2[index];
5724
5727
  } else if (char === "/") {
5725
5728
  break;
5726
5729
  } else {
@@ -5756,9 +5759,9 @@ function normalizeString(path3, allowAboveRoot) {
5756
5759
  }
5757
5760
  } else {
5758
5761
  if (res.length > 0) {
5759
- res += `/${path3.slice(lastSlash + 1, index)}`;
5762
+ res += `/${path2.slice(lastSlash + 1, index)}`;
5760
5763
  } else {
5761
- res = path3.slice(lastSlash + 1, index);
5764
+ res = path2.slice(lastSlash + 1, index);
5762
5765
  }
5763
5766
  lastSegmentLength = index - lastSlash - 1;
5764
5767
  }
@@ -5776,7 +5779,6 @@ __name(normalizeString, "normalizeString");
5776
5779
  var isAbsolute = /* @__PURE__ */ __name(function(p) {
5777
5780
  return _IS_ABSOLUTE_RE.test(p);
5778
5781
  }, "isAbsolute");
5779
- var _EXTNAME_RE = /.(\.[^./]+)$/;
5780
5782
  var extname = /* @__PURE__ */ __name(function(p) {
5781
5783
  const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
5782
5784
  return match && match[1] || "";
@@ -5804,12 +5806,8 @@ var dirname = /* @__PURE__ */ __name(function(p) {
5804
5806
  }
5805
5807
  return segments.join("/") || (isAbsolute(p) ? "/" : ".");
5806
5808
  }, "dirname");
5807
- var basename = /* @__PURE__ */ __name(function(p, extension) {
5808
- const lastSegment = normalizeWindowsPath(p).split("/").pop();
5809
- return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
5810
- }, "basename");
5811
5809
 
5812
- // ../../node_modules/.pnpm/pkg-types@1.3.0/node_modules/pkg-types/dist/index.mjs
5810
+ // ../../node_modules/.pnpm/pkg-types@1.3.1/node_modules/pkg-types/dist/index.mjs
5813
5811
  import { statSync, promises } from "node:fs";
5814
5812
 
5815
5813
  // ../../node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/shared/confbox.9388d834.mjs
@@ -6253,7 +6251,7 @@ function h(n, l) {
6253
6251
  }
6254
6252
  __name(h, "h");
6255
6253
 
6256
- // ../../node_modules/.pnpm/pkg-types@1.3.0/node_modules/pkg-types/dist/index.mjs
6254
+ // ../../node_modules/.pnpm/pkg-types@1.3.1/node_modules/pkg-types/dist/index.mjs
6257
6255
  var defaultFindOptions = {
6258
6256
  startingFrom: ".",
6259
6257
  rootPattern: /^node_modules$/,
@@ -6335,16 +6333,16 @@ async function resolvePackageJSON(id = process.cwd(), options = {}) {
6335
6333
  }
6336
6334
  __name(resolvePackageJSON, "resolvePackageJSON");
6337
6335
 
6338
- // ../../node_modules/.pnpm/mlly@1.7.3/node_modules/mlly/dist/index.mjs
6336
+ // ../../node_modules/.pnpm/mlly@1.7.4/node_modules/mlly/dist/index.mjs
6339
6337
  import { fileURLToPath as fileURLToPath$1, URL as URL$1, pathToFileURL as pathToFileURL$1 } from "node:url";
6340
6338
  import assert from "node:assert";
6341
6339
  import process$1 from "node:process";
6342
- import path2, { dirname as dirname2 } from "node:path";
6340
+ import path, { dirname as dirname2 } from "node:path";
6343
6341
  import v8 from "node:v8";
6344
6342
  import { format as format2, inspect } from "node:util";
6345
6343
  var BUILTIN_MODULES = new Set(builtinModules);
6346
- function normalizeSlash(path3) {
6347
- return path3.replace(/\\/g, "/");
6344
+ function normalizeSlash(path2) {
6345
+ return path2.replace(/\\/g, "/");
6348
6346
  }
6349
6347
  __name(normalizeSlash, "normalizeSlash");
6350
6348
  function isObject(value) {
@@ -6491,8 +6489,8 @@ codes.ERR_INVALID_PACKAGE_CONFIG = createError(
6491
6489
  * @param {string} [base]
6492
6490
  * @param {string} [message]
6493
6491
  */
6494
- (path3, base, message) => {
6495
- return `Invalid package config ${path3}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
6492
+ (path2, base, message) => {
6493
+ return `Invalid package config ${path2}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
6496
6494
  },
6497
6495
  Error
6498
6496
  );
@@ -6524,8 +6522,8 @@ codes.ERR_MODULE_NOT_FOUND = createError(
6524
6522
  * @param {string} base
6525
6523
  * @param {boolean} [exactUrl]
6526
6524
  */
6527
- (path3, base, exactUrl = false) => {
6528
- return `Cannot find ${exactUrl ? "module" : "package"} '${path3}' imported from ${base}`;
6525
+ (path2, base, exactUrl = false) => {
6526
+ return `Cannot find ${exactUrl ? "module" : "package"} '${path2}' imported from ${base}`;
6529
6527
  },
6530
6528
  Error
6531
6529
  );
@@ -6576,8 +6574,8 @@ codes.ERR_UNKNOWN_FILE_EXTENSION = createError(
6576
6574
  * @param {string} extension
6577
6575
  * @param {string} path
6578
6576
  */
6579
- (extension, path3) => {
6580
- return `Unknown file extension "${extension}" for ${path3}`;
6577
+ (extension, path2) => {
6578
+ return `Unknown file extension "${extension}" for ${path2}`;
6581
6579
  },
6582
6580
  TypeError
6583
6581
  );
@@ -6729,7 +6727,7 @@ function read(jsonPath, { base, specifier }) {
6729
6727
  }
6730
6728
  let string;
6731
6729
  try {
6732
- string = fs.readFileSync(path2.toNamespacedPath(jsonPath), "utf8");
6730
+ string = fs.readFileSync(path.toNamespacedPath(jsonPath), "utf8");
6733
6731
  } catch (error) {
6734
6732
  const exception = (
6735
6733
  /** @type {ErrnoException} */
@@ -6955,7 +6953,7 @@ Default "index" lookups for the main are deprecated for ES modules.`,
6955
6953
  "DeprecationWarning",
6956
6954
  "DEP0151"
6957
6955
  );
6958
- } else if (path2.resolve(packagePath, main) !== urlPath) {
6956
+ } else if (path.resolve(packagePath, main) !== urlPath) {
6959
6957
  process$1.emitWarning(
6960
6958
  `Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(
6961
6959
  packagePath.length
@@ -6967,9 +6965,9 @@ Default "index" lookups for the main are deprecated for ES modules.`,
6967
6965
  }
6968
6966
  }
6969
6967
  __name(emitLegacyIndexDeprecation, "emitLegacyIndexDeprecation");
6970
- function tryStatSync(path3) {
6968
+ function tryStatSync(path2) {
6971
6969
  try {
6972
- return statSync2(path3);
6970
+ return statSync2(path2);
6973
6971
  } catch {
6974
6972
  }
6975
6973
  }
@@ -7063,10 +7061,10 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
7063
7061
  error.url = String(resolved);
7064
7062
  throw error;
7065
7063
  }
7066
- if (!preserveSymlinks) {
7064
+ {
7067
7065
  const real = realpathSync(filePath);
7068
7066
  const { search, hash } = resolved;
7069
- resolved = pathToFileURL$1(real + (filePath.endsWith(path2.sep) ? "/" : ""));
7067
+ resolved = pathToFileURL$1(real + (filePath.endsWith(path.sep) ? "/" : ""));
7070
7068
  resolved.search = search;
7071
7069
  resolved.hash = hash;
7072
7070
  }
@@ -7627,7 +7625,7 @@ function moduleResolve(specifier, base, conditions, preserveSymlinks) {
7627
7625
  if (resolved.protocol !== "file:") {
7628
7626
  return resolved;
7629
7627
  }
7630
- return finalizeResolution(resolved, base, preserveSymlinks);
7628
+ return finalizeResolution(resolved, base);
7631
7629
  }
7632
7630
  __name(moduleResolve, "moduleResolve");
7633
7631
  function fileURLToPath(id) {
@@ -7814,12 +7812,12 @@ function createResolve(defaults) {
7814
7812
  }
7815
7813
  __name(createResolve, "createResolve");
7816
7814
  var NODE_MODULES_RE = /^(.+\/node_modules\/)([^/@]+|@[^/]+\/[^/]+)(\/?.*?)?$/;
7817
- function parseNodeModulePath(path3) {
7818
- if (!path3) {
7815
+ function parseNodeModulePath(path2) {
7816
+ if (!path2) {
7819
7817
  return {};
7820
7818
  }
7821
- path3 = normalize(fileURLToPath(path3));
7822
- const match = NODE_MODULES_RE.exec(path3);
7819
+ path2 = normalize(fileURLToPath(path2));
7820
+ const match = NODE_MODULES_RE.exec(path2);
7823
7821
  if (!match) {
7824
7822
  return {};
7825
7823
  }
@@ -7831,13 +7829,13 @@ function parseNodeModulePath(path3) {
7831
7829
  };
7832
7830
  }
7833
7831
  __name(parseNodeModulePath, "parseNodeModulePath");
7834
- async function lookupNodeModuleSubpath(path3) {
7835
- path3 = normalize(fileURLToPath(path3));
7836
- const { name, subpath } = parseNodeModulePath(path3);
7832
+ async function lookupNodeModuleSubpath(path2) {
7833
+ path2 = normalize(fileURLToPath(path2));
7834
+ const { name, subpath } = parseNodeModulePath(path2);
7837
7835
  if (!name || !subpath) {
7838
7836
  return subpath;
7839
7837
  }
7840
- const { exports } = await readPackageJSON(path3).catch(() => {
7838
+ const { exports } = await readPackageJSON(path2).catch(() => {
7841
7839
  }) || {};
7842
7840
  if (exports) {
7843
7841
  const resolvedSubpath = _findSubpath(subpath, exports);
@@ -8310,6 +8308,7 @@ async function isValidNodeImport(id, _options = {}) {
8310
8308
  __name(isValidNodeImport, "isValidNodeImport");
8311
8309
 
8312
8310
  export {
8311
+ normalizeWindowsPath,
8313
8312
  normalize,
8314
8313
  join,
8315
8314
  resolve,
@@ -8317,8 +8316,6 @@ export {
8317
8316
  extname,
8318
8317
  relative,
8319
8318
  dirname,
8320
- basename,
8321
- withTrailingSlash,
8322
8319
  readPackageJSON,
8323
8320
  fileURLToPath,
8324
8321
  pathToFileURL,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __name
3
- } from "./chunk-6EUZQHAF.js";
3
+ } from "./chunk-Y65MI4DK.mjs";
4
4
 
5
5
  // src/plugins/tsc.ts
6
6
  import { createProjectGraphAsync } from "@nx/devkit";
@@ -0,0 +1,33 @@
1
+ import {
2
+ __name
3
+ } from "./chunk-Y65MI4DK.mjs";
4
+
5
+ // src/plugins/analyze.ts
6
+ import { writeInfo } from "@storm-software/config-tools";
7
+ var formatBytes = /* @__PURE__ */ __name((bytes) => {
8
+ if (bytes === 0) return "0 Byte";
9
+ const k = 1e3;
10
+ const dm = 3;
11
+ const sizes = [
12
+ "Bytes",
13
+ "KB",
14
+ "MB",
15
+ "GB"
16
+ ];
17
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
18
+ return `${parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;
19
+ }, "formatBytes");
20
+ var analyzePlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
21
+ return {
22
+ name: "storm:analyzer",
23
+ renderChunk(source, chunk) {
24
+ const sourceBytes = formatBytes(source.length);
25
+ const fileName = chunk.fileName;
26
+ writeInfo(` - ${fileName} ${sourceBytes}`, resolvedOptions.config);
27
+ }
28
+ };
29
+ }, "analyzePlugin");
30
+
31
+ export {
32
+ analyzePlugin
33
+ };
@@ -0,0 +1,28 @@
1
+ import {
2
+ __name,
3
+ __require
4
+ } from "./chunk-Y65MI4DK.mjs";
5
+
6
+ // src/plugins/swc.ts
7
+ var swcPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
8
+ const { transform } = __require("@swc/core");
9
+ return {
10
+ name: "storm:swc",
11
+ transform(code, filename) {
12
+ return transform(code, {
13
+ filename,
14
+ jsc: {
15
+ transform: {
16
+ react: {
17
+ runtime: "automatic"
18
+ }
19
+ }
20
+ }
21
+ });
22
+ }
23
+ };
24
+ }, "swcPlugin");
25
+
26
+ export {
27
+ swcPlugin
28
+ };
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkC4IRH3TZcjs = require('./chunk-C4IRH3TZ.cjs');
3
+ var _chunk6EUZQHAFjs = require('./chunk-6EUZQHAF.js');
4
4
 
5
5
  // src/plugins/type-definitions.ts
6
6
  var _path = require('path');
7
- var typeDefinitions = /* @__PURE__ */ _chunkC4IRH3TZcjs.__name.call(void 0, (options, resolvedOptions) => ({
7
+ var typeDefinitions = /* @__PURE__ */ _chunk6EUZQHAFjs.__name.call(void 0, (options, resolvedOptions) => ({
8
8
  name: "storm:dts-bundle",
9
9
  async generateBundle(_opts, bundle) {
10
10
  for (const file of Object.values(bundle)) {
@@ -0,0 +1 @@
1
+ "use strict";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __name
3
- } from "./chunk-6EUZQHAF.js";
3
+ } from "./chunk-Y65MI4DK.mjs";
4
4
 
5
5
  // ../../node_modules/.pnpm/consola@3.3.3/node_modules/consola/dist/shared/consola.CBi6Nm9s.mjs
6
6
  import * as tty from "node:tty";
@@ -1118,7 +1118,7 @@ function createConsola2(options = {}) {
1118
1118
  defaults: { level },
1119
1119
  stdout: process.stdout,
1120
1120
  stderr: process.stderr,
1121
- prompt: /* @__PURE__ */ __name((...args) => import("./prompt-CTBFX6QF.js").then((m) => m.prompt(...args)), "prompt"),
1121
+ prompt: /* @__PURE__ */ __name((...args) => import("./prompt-G22OCPDR.mjs").then((m) => m.prompt(...args)), "prompt"),
1122
1122
  reporters: options.reporters || [
1123
1123
  options.fancy ?? !(T || A) ? new FancyReporter() : new BasicReporter()
1124
1124
  ],