@voidzero-dev/vite-plus-core 0.1.22 → 0.1.24

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 (94) hide show
  1. package/LICENSE +37 -26
  2. package/dist/pluginutils/filter/index.d.mts +194 -0
  3. package/dist/pluginutils/filter/index.mjs +2 -0
  4. package/dist/pluginutils/filter-B_mD-HGz.mjs +323 -0
  5. package/dist/pluginutils/index.d.mts +2 -0
  6. package/dist/pluginutils/index.mjs +2 -0
  7. package/dist/rolldown/cli.mjs +7 -7
  8. package/dist/rolldown/config.d.mts +1 -1
  9. package/dist/rolldown/config.mjs +3 -3
  10. package/dist/rolldown/experimental-index.d.mts +21 -4
  11. package/dist/rolldown/experimental-index.mjs +14 -9
  12. package/dist/rolldown/filter-index.d.mts +8 -9
  13. package/dist/rolldown/filter-index.mjs +2 -8
  14. package/dist/rolldown/get-log-filter.d.mts +3 -3
  15. package/dist/rolldown/index.d.mts +4 -4
  16. package/dist/rolldown/index.mjs +5 -5
  17. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  18. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  19. package/dist/rolldown/parse-ast-index.d.mts +1 -1
  20. package/dist/rolldown/parse-ast-index.mjs +2 -2
  21. package/dist/rolldown/plugins-index.d.mts +3 -3
  22. package/dist/rolldown/plugins-index.mjs +2 -2
  23. package/dist/rolldown/shared/{binding-zH1vcmbM.d.mts → binding-BaCZTfMx.d.mts} +32 -3
  24. package/dist/rolldown/shared/{binding-ESkOU1xr.mjs → binding-CXquf8ay.mjs} +27 -26
  25. package/dist/rolldown/shared/{bindingify-input-options-wZdDRbfo.mjs → bindingify-input-options-D2ORek5s.mjs} +14 -14
  26. package/dist/rolldown/shared/{constructors-D6i2Tbyl.mjs → constructors-BiPdtLBB.mjs} +1 -1
  27. package/dist/rolldown/shared/{constructors-D0W3rNfA.d.mts → constructors-CbNaT434.d.mts} +2 -2
  28. package/dist/rolldown/shared/{define-config-5HJ1b9vG.d.mts → define-config-3BX_X2Am.d.mts} +70 -16
  29. package/dist/rolldown/shared/{error-BrnLyQ-g.mjs → error-BuvQYXuZ.mjs} +1 -1
  30. package/dist/rolldown/shared/{get-log-filter-semyr3Lj.d.mts → get-log-filter-BpNVNJ5-.d.mts} +1 -1
  31. package/dist/rolldown/shared/{load-config-BZFgt8GH.mjs → load-config-uvbpmLwO.mjs} +1 -1
  32. package/dist/rolldown/shared/{normalize-string-or-regex-dAjLOSbp.mjs → normalize-string-or-regex-CNPF6PU9.mjs} +2 -2
  33. package/dist/rolldown/shared/{parse-DFts7Hyl.mjs → parse-1VOPJ1Lj.mjs} +2 -2
  34. package/dist/rolldown/shared/{prompt-Bm9aMQjm.mjs → prompt-DV1XbtjC.mjs} +1 -1
  35. package/dist/rolldown/shared/{resolve-tsconfig-DCdBlPeK.mjs → resolve-tsconfig-CcfxWrib.mjs} +15 -4
  36. package/dist/rolldown/shared/{rolldown-Cs2eRf4R.mjs → rolldown-BZYLlfsv.mjs} +1 -1
  37. package/dist/rolldown/shared/{rolldown-build-CNhzgsn2.mjs → rolldown-build-CgMNHFY3.mjs} +54 -65
  38. package/dist/rolldown/shared/{transform-DgZ3paSD.d.mts → transform-7xCUVrpL.d.mts} +2 -2
  39. package/dist/rolldown/shared/{watch-De_8Tgeq.mjs → watch-BX_aH1Oh.mjs} +6 -6
  40. package/dist/rolldown/utils-index.d.mts +3 -3
  41. package/dist/rolldown/utils-index.mjs +5 -5
  42. package/dist/tsdown/{build-5FURNVr0-D2dbyiC6.js → build-BZshaq8i-C7uS6x65.js} +1173 -93
  43. package/dist/tsdown/{detect-DN3DXXYt-8gmDjZqp.js → detect-B97OSl92-CgjrIbmD.js} +1 -1
  44. package/dist/tsdown/{dist-DTzJRoOQ.js → dist-BHLOKn-2.js} +526 -224
  45. package/dist/tsdown/index-types.d.ts +30 -12
  46. package/dist/tsdown/index.js +3 -4
  47. package/dist/tsdown/main-nVIFtu2j.js +938 -0
  48. package/dist/tsdown/npm_cjs_chunk_range.cjs +11 -11
  49. package/dist/tsdown/npm_cjs_chunk_semver.cjs +6 -6
  50. package/dist/tsdown/npm_entry_semver_functions_coerce.cjs +2 -2
  51. package/dist/tsdown/npm_entry_semver_functions_satisfies.cjs +1 -1
  52. package/dist/tsdown/npm_entry_semver_ranges_min-version.cjs +1 -1
  53. package/dist/tsdown/{resolver-DkvdaW3s-BeVUoOo-.js → resolver-DtsKFXi2-QB-x8j3e.js} +1 -1
  54. package/dist/tsdown/run.js +5 -6
  55. package/dist/tsdown/{tsc-Dr9kCkDm.js → tsc-WMktM0FW.js} +3 -3
  56. package/dist/tsdown/{tsc-context-CANQEB9U.js → tsc-context-DKufFI_s.js} +2 -2
  57. package/dist/vite/client/client.mjs +61 -27
  58. package/dist/vite/node/chunks/build.js +21 -21
  59. package/dist/vite/node/chunks/dist.js +1 -1
  60. package/dist/vite/node/chunks/dist2.js +136 -110
  61. package/dist/vite/node/chunks/lib.js +1 -1
  62. package/dist/vite/node/chunks/logger.js +36 -3
  63. package/dist/vite/node/chunks/node.js +490 -277
  64. package/dist/vite/node/chunks/postcss-import.js +11 -11
  65. package/dist/vite/node/cli.js +1 -2
  66. package/dist/vite/node/index.d.ts +29 -14
  67. package/dist/vite/node/module-runner.d.ts +1 -2
  68. package/dist/vite/node/module-runner.js +19 -18
  69. package/dist/vite/types/customEvent.d.ts +1 -1
  70. package/package.json +17 -23
  71. package/dist/pluginutils/filter/composable-filters.d.ts +0 -90
  72. package/dist/pluginutils/filter/composable-filters.js +0 -256
  73. package/dist/pluginutils/filter/filter-vite-plugins.d.ts +0 -28
  74. package/dist/pluginutils/filter/filter-vite-plugins.js +0 -75
  75. package/dist/pluginutils/filter/index.d.ts +0 -3
  76. package/dist/pluginutils/filter/index.js +0 -3
  77. package/dist/pluginutils/filter/simple-filters.d.ts +0 -71
  78. package/dist/pluginutils/filter/simple-filters.js +0 -70
  79. package/dist/pluginutils/index.d.ts +0 -1
  80. package/dist/pluginutils/index.js +0 -1
  81. package/dist/pluginutils/utils.d.ts +0 -2
  82. package/dist/pluginutils/utils.js +0 -17
  83. package/dist/tsdown/chunk-N93fKeF6.js +0 -34
  84. package/dist/tsdown/debug-CLlnG64L-BkAqwHVS.js +0 -16
  85. package/dist/tsdown/dist-Cv2Z0Bi_.js +0 -1012
  86. package/dist/tsdown/filename-DQnUJlio-D7-CzKqs.js +0 -29
  87. package/dist/tsdown/main-BNUO6D3N.js +0 -893
  88. package/dist/tsdown/node-B3Gdtau1.js +0 -268
  89. package/dist/vite/node/chunks/chunk.js +0 -35
  90. /package/dist/rolldown/shared/{define-config-DJOr6Iwt.mjs → define-config-Demdg3_4.mjs} +0 -0
  91. /package/dist/rolldown/shared/{logging-C6h4g8dA.d.mts → logging-BSNejiLS.d.mts} +0 -0
  92. /package/dist/rolldown/shared/{logs-D80CXhvg.mjs → logs-aMKUxRpj.mjs} +0 -0
  93. /package/dist/rolldown/shared/{misc-DJYbNKZX.mjs → misc-CoQm4NHO.mjs} +0 -0
  94. /package/dist/tsdown/{dist-JaOach5K.js → dist-CZtGyfn3.js} +0 -0
@@ -1,20 +1,17 @@
1
- import { n as __exportAll$1, r as __toESM, t as __commonJSMin } from "./chunk-N93fKeF6.js";
2
- import { C as promiseWithResolvers, D as toArray, E as slash, S as pkgExists, T as resolveRegex, _ as yellow, a as createLogger, b as matchPattern, c as globalLogger, d as bold, f as dim, g as underline, h as red, i as LogLevels, l as prettyFormat, n as V, o as generateColor, p as green, r as version, s as getNameLabel, t as H, u as blue, v as debounce, w as resolveComma, x as noop, y as importWithError } from "./main-BNUO6D3N.js";
3
- import { t as createDebug } from "./node-B3Gdtau1.js";
4
- import { d as filename_js_to_dts, i as RE_JS, n as RE_DTS, o as RE_NODE_MODULES$1, t as RE_CSS } from "./filename-DQnUJlio-D7-CzKqs.js";
5
- import { n as ee } from "./dist-Cv2Z0Bi_.js";
1
+ import { A as __commonJSMin, C as noop, D as resolveRegex, E as resolveComma, M as __toESM, O as slash, S as matchPattern, T as promiseWithResolvers, _ as red, a as createDebug, b as debounce, c as generateColor, d as prettyFormat, f as blue, h as green, i as version, j as __exportAll$1, k as toArray, l as getNameLabel, m as dim, n as z$1, o as LogLevels, p as bold, s as createLogger, t as R$2, u as globalLogger, v as underline, w as pkgExists, x as importWithError, y as yellow } from "./main-nVIFtu2j.js";
6
2
  import module$1, { builtinModules, createRequire, isBuiltin } from "node:module";
7
3
  import process$1, { env } from "node:process";
8
4
  import readline from "node:readline";
9
5
  import { formatWithOptions, inspect, isDeepStrictEqual, promisify } from "node:util";
10
6
  import path, { dirname, isAbsolute, join, parse, resolve } from "node:path";
11
- import { VERSION, build, watch } from "@voidzero-dev/vite-plus-core/rolldown";
7
+ import fs, { existsSync, readFileSync, writeFileSync } from "node:fs";
8
+ import { RUNTIME_MODULE_ID, VERSION, build, watch } from "@voidzero-dev/vite-plus-core/rolldown";
12
9
  import { access, chmod, cp, mkdir, mkdtemp, readFile, readdir, rm, stat, writeFile } from "node:fs/promises";
13
- import { and, id, importerId, include } from "@voidzero-dev/vite-plus-core/rolldown/filter";
14
- import re, { existsSync, readFileSync, writeFileSync } from "node:fs";
10
+ import { and, exactRegex, id, importerId, include } from "@voidzero-dev/vite-plus-core/rolldown/filter";
15
11
  import * as nativeFs from "fs";
16
- import { readdir as readdir$1, readdirSync, realpath, realpathSync, stat as stat$1, statSync } from "fs";
17
- import { basename, dirname as dirname$1, isAbsolute as isAbsolute$1, normalize, posix, relative, resolve as resolve$1, sep } from "path";
12
+ import Ue, { readdir as readdir$1, readdirSync, realpath, realpathSync, stat as stat$1, statSync as statSync$1 } from "fs";
13
+ import Ie from "os";
14
+ import Se, { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, normalize as normalize$1, posix, relative, resolve as resolve$1, sep } from "path";
18
15
  import { fileURLToPath } from "url";
19
16
  import { createRequire as createRequire$1 } from "module";
20
17
  import { tmpdir } from "node:os";
@@ -23,7 +20,7 @@ import { AsyncLocalStorage } from "node:async_hooks";
23
20
  import { Buffer } from "node:buffer";
24
21
  import { brotliCompress, gzip } from "node:zlib";
25
22
  import { importGlobPlugin } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
26
- //#region ../../node_modules/.pnpm/tsdown@0.22.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.0_@tsdown+exe@0.22.0_@type_d181d85b1bafdbf27821083f8481d00c/node_modules/tsdown/dist/fs-Dd6Htx2P.mjs
23
+ //#region ../../node_modules/.pnpm/tsdown@0.22.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.1_@tsdown+exe@0.22.1_@type_b2f732f99208225f009f13478ba95350/node_modules/tsdown/dist/fs-qxJxxoCE.mjs
27
24
  function fsExists(path) {
28
25
  return access(path).then(() => true, () => false);
29
26
  }
@@ -66,8 +63,1053 @@ function stripExtname(filePath) {
66
63
  return filePath.slice(0, -ext.length);
67
64
  }
68
65
  //#endregion
69
- //#region ../../node_modules/.pnpm/tsdown@0.22.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.0_@tsdown+exe@0.22.0_@type_d181d85b1bafdbf27821083f8481d00c/node_modules/tsdown/dist/format-CajNSstg.mjs
66
+ //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.25.2_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_8152cf0e534aee518f40abeb59f8494a/node_modules/rolldown-plugin-dts/dist/filename-BR9JpwkC.mjs
67
+ const RE_JS = /\.([cm]?)jsx?$/;
68
+ const RE_TS = /\.([cm]?)tsx?$/;
69
+ const RE_DTS = /\.d\.([cm]?)ts$/;
70
+ const RE_DTS_MAP = /\.d\.([cm]?)ts\.map$/;
71
+ const RE_NODE_MODULES$1 = /[\\/]node_modules[\\/]/;
72
+ const RE_CSS = /\.(?:css|scss|sass|less|styl|stylus)$/;
73
+ const RE_VUE = /\.vue$/;
74
+ const RE_JSON = /\.json$/;
75
+ const RE_ROLLDOWN_RUNTIME = exactRegex(RUNTIME_MODULE_ID);
76
+ function filename_js_to_dts(id) {
77
+ return id.replace(RE_JS, ".d.$1ts");
78
+ }
79
+ function filename_to_dts(id) {
80
+ return id.replace(RE_VUE, ".vue.ts").replace(RE_TS, ".d.$1ts").replace(RE_JS, ".d.$1ts").replace(RE_JSON, ".json.d.ts");
81
+ }
82
+ function filename_dts_to(id, ext) {
83
+ return id.replace(RE_DTS, `.$1${ext}`);
84
+ }
85
+ function resolveTemplateFn(fn, chunk) {
86
+ return typeof fn === "function" ? fn(chunk) : fn;
87
+ }
88
+ function replaceTemplateName(template, name) {
89
+ return template.replaceAll("[name]", name);
90
+ }
91
+ //#endregion
92
+ //#region ../../node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.mjs
93
+ const A = (r) => r !== null && typeof r == "object", a = (r, t) => Object.assign(/* @__PURE__ */ new Error(`[${r}]: ${t}`), { code: r }), _$1 = "ERR_INVALID_PACKAGE_CONFIG", E = "ERR_INVALID_PACKAGE_TARGET", I$1 = "ERR_PACKAGE_PATH_NOT_EXPORTED", R$1 = /^\d+$/, O = /^(\.{1,2}|node_modules)$/i, w = /\/|\\/;
94
+ var h = ((r) => (r.Export = "exports", r.Import = "imports", r))(h || {});
95
+ const f = (r, t, e, o, c) => {
96
+ if (t == null) return [];
97
+ if (typeof t == "string") {
98
+ const [n, ...i] = t.split(w);
99
+ if (n === ".." || i.some((l) => O.test(l))) throw a(E, `Invalid "${r}" target "${t}" defined in the package config`);
100
+ return [c ? t.replace(/\*/g, c) : t];
101
+ }
102
+ if (Array.isArray(t)) return t.flatMap((n) => f(r, n, e, o, c));
103
+ if (A(t)) {
104
+ for (const n of Object.keys(t)) {
105
+ if (R$1.test(n)) throw a(_$1, "Cannot contain numeric property keys");
106
+ if (n === "default" || o.includes(n)) return f(r, t[n], e, o, c);
107
+ }
108
+ return [];
109
+ }
110
+ throw a(E, `Invalid "${r}" target "${t}"`);
111
+ }, s = "*", m = (r, t) => {
112
+ const e = r.indexOf(s), o = t.indexOf(s);
113
+ return e === o ? t.length > r.length : o > e;
114
+ };
115
+ function d(r, t) {
116
+ if (!t.includes(s) && r.hasOwnProperty(t)) return [t];
117
+ let e, o;
118
+ for (const c of Object.keys(r)) if (c.includes(s)) {
119
+ const [n, i, l] = c.split(s);
120
+ if (l === void 0 && t.startsWith(n) && t.endsWith(i)) {
121
+ const g = t.slice(n.length, -i.length || void 0);
122
+ g && (!e || m(e, c)) && (e = c, o = g);
123
+ }
124
+ }
125
+ return [e, o];
126
+ }
127
+ const p = (r) => Object.keys(r).reduce((t, e) => {
128
+ const o = e === "" || e[0] !== ".";
129
+ if (t === void 0 || t === o) return o;
130
+ throw a(_$1, "\"exports\" cannot contain some keys starting with \".\" and some not");
131
+ }, void 0), u = /^\w+:/, v = (r, t, e) => {
132
+ if (!r) throw new Error("\"exports\" is required");
133
+ t = t === "" ? "." : `./${t}`, (typeof r == "string" || Array.isArray(r) || A(r) && p(r)) && (r = { ".": r });
134
+ const [o, c] = d(r, t), n = f(h.Export, r[o], t, e, c);
135
+ if (n.length === 0) throw a(I$1, t === "." ? "No \"exports\" main defined" : `Package subpath '${t}' is not defined by "exports"`);
136
+ for (const i of n) if (!i.startsWith("./") && !u.test(i)) throw a(E, `Invalid "exports" target "${i}" defined in the package config`);
137
+ return n;
138
+ };
139
+ //#endregion
140
+ //#region ../../node_modules/.pnpm/get-tsconfig@5.0.0-beta.5/node_modules/get-tsconfig/dist/index.mjs
141
+ var Le = Object.defineProperty;
142
+ var i = (e, n) => Le(e, "name", {
143
+ value: n,
144
+ configurable: !0
145
+ });
146
+ function x(e) {
147
+ return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
148
+ }
149
+ i(x, "slash");
150
+ const _e = i((e, n) => {
151
+ const s = `readFileSync:${n}`;
152
+ let t = e?.get(s);
153
+ return t === void 0 && (t = fs.readFileSync(n, "utf8"), e?.set(s, t)), t;
154
+ }, "readFile"), F = i((e, n) => {
155
+ const s = `tryStat:${n}`;
156
+ let t = e?.get(s);
157
+ if (t === void 0) {
158
+ try {
159
+ t = fs.statSync(n);
160
+ } catch {
161
+ t = null;
162
+ }
163
+ e?.set(s, t);
164
+ }
165
+ return t ?? void 0;
166
+ }, "tryStat"), R = i((e, n, s) => {
167
+ for (;;) {
168
+ const t = path.posix.join(e, n);
169
+ if (F(s, t)) return t;
170
+ const o = path.dirname(e);
171
+ if (o === e) return;
172
+ e = o;
173
+ }
174
+ }, "findUp");
175
+ function Ne(e, n = !1) {
176
+ const s = e.length;
177
+ let t = 0, o = "", r = 0, l = 16, g = 0, m = 0, k = 0, w = 0, u = 0;
178
+ function A(f, y) {
179
+ let j = 0, v = 0;
180
+ for (; j < f;) {
181
+ let d = e.charCodeAt(t);
182
+ if (d >= 48 && d <= 57) v = v * 16 + d - 48;
183
+ else if (d >= 65 && d <= 70) v = v * 16 + d - 65 + 10;
184
+ else if (d >= 97 && d <= 102) v = v * 16 + d - 97 + 10;
185
+ else break;
186
+ t++, j++;
187
+ }
188
+ return j < f && (v = -1), v;
189
+ }
190
+ i(A, "scanHexDigits");
191
+ function O(f) {
192
+ t = f, o = "", r = 0, l = 16, u = 0;
193
+ }
194
+ i(O, "setPosition");
195
+ function h() {
196
+ let f = t;
197
+ if (e.charCodeAt(t) === 48) t++;
198
+ else for (t++; t < e.length && S(e.charCodeAt(t));) t++;
199
+ if (t < e.length && e.charCodeAt(t) === 46) if (t++, t < e.length && S(e.charCodeAt(t))) for (t++; t < e.length && S(e.charCodeAt(t));) t++;
200
+ else return u = 3, e.substring(f, t);
201
+ let y = t;
202
+ if (t < e.length && (e.charCodeAt(t) === 69 || e.charCodeAt(t) === 101)) if (t++, (t < e.length && e.charCodeAt(t) === 43 || e.charCodeAt(t) === 45) && t++, t < e.length && S(e.charCodeAt(t))) {
203
+ for (t++; t < e.length && S(e.charCodeAt(t));) t++;
204
+ y = t;
205
+ } else u = 3;
206
+ return e.substring(f, y);
207
+ }
208
+ i(h, "scanNumber");
209
+ function D() {
210
+ let f = "", y = t;
211
+ for (;;) {
212
+ if (t >= s) {
213
+ f += e.substring(y, t), u = 2;
214
+ break;
215
+ }
216
+ const j = e.charCodeAt(t);
217
+ if (j === 34) {
218
+ f += e.substring(y, t), t++;
219
+ break;
220
+ }
221
+ if (j === 92) {
222
+ if (f += e.substring(y, t), t++, t >= s) {
223
+ u = 2;
224
+ break;
225
+ }
226
+ switch (e.charCodeAt(t++)) {
227
+ case 34:
228
+ f += "\"";
229
+ break;
230
+ case 92:
231
+ f += "\\";
232
+ break;
233
+ case 47:
234
+ f += "/";
235
+ break;
236
+ case 98:
237
+ f += "\b";
238
+ break;
239
+ case 102:
240
+ f += "\f";
241
+ break;
242
+ case 110:
243
+ f += `
244
+ `;
245
+ break;
246
+ case 114:
247
+ f += "\r";
248
+ break;
249
+ case 116:
250
+ f += " ";
251
+ break;
252
+ case 117:
253
+ const d = A(4);
254
+ d >= 0 ? f += String.fromCharCode(d) : u = 4;
255
+ break;
256
+ default: u = 5;
257
+ }
258
+ y = t;
259
+ continue;
260
+ }
261
+ if (j >= 0 && j <= 31) if (P(j)) {
262
+ f += e.substring(y, t), u = 2;
263
+ break;
264
+ } else u = 6;
265
+ t++;
266
+ }
267
+ return f;
268
+ }
269
+ i(D, "scanString");
270
+ function c() {
271
+ if (o = "", u = 0, r = t, m = g, w = k, t >= s) return r = s, l = 17;
272
+ let f = e.charCodeAt(t);
273
+ if (X(f)) {
274
+ do
275
+ t++, o += String.fromCharCode(f), f = e.charCodeAt(t);
276
+ while (X(f));
277
+ return l = 15;
278
+ }
279
+ if (P(f)) return t++, o += String.fromCharCode(f), f === 13 && e.charCodeAt(t) === 10 && (t++, o += `
280
+ `), g++, k = t, l = 14;
281
+ switch (f) {
282
+ case 123: return t++, l = 1;
283
+ case 125: return t++, l = 2;
284
+ case 91: return t++, l = 3;
285
+ case 93: return t++, l = 4;
286
+ case 58: return t++, l = 6;
287
+ case 44: return t++, l = 5;
288
+ case 34: return t++, o = D(), l = 10;
289
+ case 47:
290
+ const y = t - 1;
291
+ if (e.charCodeAt(t + 1) === 47) {
292
+ for (t += 2; t < s && !P(e.charCodeAt(t));) t++;
293
+ return o = e.substring(y, t), l = 12;
294
+ }
295
+ if (e.charCodeAt(t + 1) === 42) {
296
+ t += 2;
297
+ const j = s - 1;
298
+ let v = !1;
299
+ for (; t < j;) {
300
+ const d = e.charCodeAt(t);
301
+ if (d === 42 && e.charCodeAt(t + 1) === 47) {
302
+ t += 2, v = !0;
303
+ break;
304
+ }
305
+ t++, P(d) && (d === 13 && e.charCodeAt(t) === 10 && t++, g++, k = t);
306
+ }
307
+ return v || (t++, u = 1), o = e.substring(y, t), l = 13;
308
+ }
309
+ return o += String.fromCharCode(f), t++, l = 16;
310
+ case 45: if (o += String.fromCharCode(f), t++, t === s || !S(e.charCodeAt(t))) return l = 16;
311
+ case 48:
312
+ case 49:
313
+ case 50:
314
+ case 51:
315
+ case 52:
316
+ case 53:
317
+ case 54:
318
+ case 55:
319
+ case 56:
320
+ case 57: return o += h(), l = 11;
321
+ default:
322
+ for (; t < s && p(f);) t++, f = e.charCodeAt(t);
323
+ if (r !== t) {
324
+ switch (o = e.substring(r, t), o) {
325
+ case "true": return l = 8;
326
+ case "false": return l = 9;
327
+ case "null": return l = 7;
328
+ }
329
+ return l = 16;
330
+ }
331
+ return o += String.fromCharCode(f), t++, l = 16;
332
+ }
333
+ }
334
+ i(c, "scanNext");
335
+ function p(f) {
336
+ if (X(f) || P(f)) return !1;
337
+ switch (f) {
338
+ case 125:
339
+ case 93:
340
+ case 123:
341
+ case 91:
342
+ case 34:
343
+ case 58:
344
+ case 44:
345
+ case 47: return !1;
346
+ }
347
+ return !0;
348
+ }
349
+ i(p, "isUnknownContentCharacter");
350
+ function b() {
351
+ let f;
352
+ do
353
+ f = c();
354
+ while (f >= 12 && f <= 15);
355
+ return f;
356
+ }
357
+ return i(b, "scanNextNonTrivia"), {
358
+ setPosition: O,
359
+ getPosition: i(() => t, "getPosition"),
360
+ scan: n ? b : c,
361
+ getToken: i(() => l, "getToken"),
362
+ getTokenValue: i(() => o, "getTokenValue"),
363
+ getTokenOffset: i(() => r, "getTokenOffset"),
364
+ getTokenLength: i(() => t - r, "getTokenLength"),
365
+ getTokenStartLine: i(() => m, "getTokenStartLine"),
366
+ getTokenStartCharacter: i(() => r - w, "getTokenStartCharacter"),
367
+ getTokenError: i(() => u, "getTokenError")
368
+ };
369
+ }
370
+ i(Ne, "createScanner");
371
+ function X(e) {
372
+ return e === 32 || e === 9;
373
+ }
374
+ i(X, "isWhiteSpace");
375
+ function P(e) {
376
+ return e === 10 || e === 13;
377
+ }
378
+ i(P, "isLineBreak");
379
+ function S(e) {
380
+ return e >= 48 && e <= 57;
381
+ }
382
+ i(S, "isDigit");
383
+ var ce;
384
+ (function(e) {
385
+ e[e.lineFeed = 10] = "lineFeed", e[e.carriageReturn = 13] = "carriageReturn", e[e.space = 32] = "space", e[e._0 = 48] = "_0", e[e._1 = 49] = "_1", e[e._2 = 50] = "_2", e[e._3 = 51] = "_3", e[e._4 = 52] = "_4", e[e._5 = 53] = "_5", e[e._6 = 54] = "_6", e[e._7 = 55] = "_7", e[e._8 = 56] = "_8", e[e._9 = 57] = "_9", e[e.a = 97] = "a", e[e.b = 98] = "b", e[e.c = 99] = "c", e[e.d = 100] = "d", e[e.e = 101] = "e", e[e.f = 102] = "f", e[e.g = 103] = "g", e[e.h = 104] = "h", e[e.i = 105] = "i", e[e.j = 106] = "j", e[e.k = 107] = "k", e[e.l = 108] = "l", e[e.m = 109] = "m", e[e.n = 110] = "n", e[e.o = 111] = "o", e[e.p = 112] = "p", e[e.q = 113] = "q", e[e.r = 114] = "r", e[e.s = 115] = "s", e[e.t = 116] = "t", e[e.u = 117] = "u", e[e.v = 118] = "v", e[e.w = 119] = "w", e[e.x = 120] = "x", e[e.y = 121] = "y", e[e.z = 122] = "z", e[e.A = 65] = "A", e[e.B = 66] = "B", e[e.C = 67] = "C", e[e.D = 68] = "D", e[e.E = 69] = "E", e[e.F = 70] = "F", e[e.G = 71] = "G", e[e.H = 72] = "H", e[e.I = 73] = "I", e[e.J = 74] = "J", e[e.K = 75] = "K", e[e.L = 76] = "L", e[e.M = 77] = "M", e[e.N = 78] = "N", e[e.O = 79] = "O", e[e.P = 80] = "P", e[e.Q = 81] = "Q", e[e.R = 82] = "R", e[e.S = 83] = "S", e[e.T = 84] = "T", e[e.U = 85] = "U", e[e.V = 86] = "V", e[e.W = 87] = "W", e[e.X = 88] = "X", e[e.Y = 89] = "Y", e[e.Z = 90] = "Z", e[e.asterisk = 42] = "asterisk", e[e.backslash = 92] = "backslash", e[e.closeBrace = 125] = "closeBrace", e[e.closeBracket = 93] = "closeBracket", e[e.colon = 58] = "colon", e[e.comma = 44] = "comma", e[e.dot = 46] = "dot", e[e.doubleQuote = 34] = "doubleQuote", e[e.minus = 45] = "minus", e[e.openBrace = 123] = "openBrace", e[e.openBracket = 91] = "openBracket", e[e.plus = 43] = "plus", e[e.slash = 47] = "slash", e[e.formFeed = 12] = "formFeed", e[e.tab = 9] = "tab";
386
+ })(ce || (ce = {})), new Array(20).fill(0).map((e, n) => " ".repeat(n));
387
+ const _ = 200;
388
+ new Array(_).fill(0).map((e, n) => `
389
+ ` + " ".repeat(n)), new Array(_).fill(0).map((e, n) => "\r" + " ".repeat(n)), new Array(_).fill(0).map((e, n) => `\r
390
+ ` + " ".repeat(n)), new Array(_).fill(0).map((e, n) => `
391
+ ` + " ".repeat(n)), new Array(_).fill(0).map((e, n) => "\r" + " ".repeat(n)), new Array(_).fill(0).map((e, n) => `\r
392
+ ` + " ".repeat(n));
393
+ var W;
394
+ (function(e) {
395
+ e.DEFAULT = { allowTrailingComma: !1 };
396
+ })(W || (W = {}));
397
+ function Re(e, n = [], s = W.DEFAULT) {
398
+ let t = null, o = [];
399
+ const r = [];
400
+ function l(m) {
401
+ Array.isArray(o) ? o.push(m) : t !== null && (o[t] = m);
402
+ }
403
+ return i(l, "onValue"), Pe(e, {
404
+ onObjectBegin: i(() => {
405
+ const m = {};
406
+ l(m), r.push(o), o = m, t = null;
407
+ }, "onObjectBegin"),
408
+ onObjectProperty: i((m) => {
409
+ t = m;
410
+ }, "onObjectProperty"),
411
+ onObjectEnd: i(() => {
412
+ o = r.pop();
413
+ }, "onObjectEnd"),
414
+ onArrayBegin: i(() => {
415
+ const m = [];
416
+ l(m), r.push(o), o = m, t = null;
417
+ }, "onArrayBegin"),
418
+ onArrayEnd: i(() => {
419
+ o = r.pop();
420
+ }, "onArrayEnd"),
421
+ onLiteralValue: l,
422
+ onError: i((m, k, w) => {
423
+ n.push({
424
+ error: m,
425
+ offset: k,
426
+ length: w
427
+ });
428
+ }, "onError")
429
+ }, s), o[0];
430
+ }
431
+ i(Re, "parse$1");
432
+ function Pe(e, n, s = W.DEFAULT) {
433
+ const t = Ne(e, !1), o = [];
434
+ let r = 0;
435
+ function l(T) {
436
+ return T ? () => r === 0 && T(t.getTokenOffset(), t.getTokenLength(), t.getTokenStartLine(), t.getTokenStartCharacter()) : () => !0;
437
+ }
438
+ i(l, "toNoArgVisit");
439
+ function g(T) {
440
+ return T ? (E) => r === 0 && T(E, t.getTokenOffset(), t.getTokenLength(), t.getTokenStartLine(), t.getTokenStartCharacter()) : () => !0;
441
+ }
442
+ i(g, "toOneArgVisit");
443
+ function m(T) {
444
+ return T ? (E) => r === 0 && T(E, t.getTokenOffset(), t.getTokenLength(), t.getTokenStartLine(), t.getTokenStartCharacter(), () => o.slice()) : () => !0;
445
+ }
446
+ i(m, "toOneArgVisitWithPath");
447
+ function k(T) {
448
+ return T ? () => {
449
+ r > 0 ? r++ : T(t.getTokenOffset(), t.getTokenLength(), t.getTokenStartLine(), t.getTokenStartCharacter(), () => o.slice()) === !1 && (r = 1);
450
+ } : () => !0;
451
+ }
452
+ i(k, "toBeginVisit");
453
+ function w(T) {
454
+ return T ? () => {
455
+ r > 0 && r--, r === 0 && T(t.getTokenOffset(), t.getTokenLength(), t.getTokenStartLine(), t.getTokenStartCharacter());
456
+ } : () => !0;
457
+ }
458
+ i(w, "toEndVisit");
459
+ const u = k(n.onObjectBegin), A = m(n.onObjectProperty), O = w(n.onObjectEnd), h = k(n.onArrayBegin), D = w(n.onArrayEnd), c = m(n.onLiteralValue), p = g(n.onSeparator), b = l(n.onComment), f = g(n.onError), y = s && s.disallowComments, j = s && s.allowTrailingComma;
460
+ function v() {
461
+ for (;;) {
462
+ const T = t.scan();
463
+ switch (t.getTokenError()) {
464
+ case 4:
465
+ d(14);
466
+ break;
467
+ case 5:
468
+ d(15);
469
+ break;
470
+ case 3:
471
+ d(13);
472
+ break;
473
+ case 1:
474
+ y || d(11);
475
+ break;
476
+ case 2:
477
+ d(12);
478
+ break;
479
+ case 6:
480
+ d(16);
481
+ break;
482
+ }
483
+ switch (T) {
484
+ case 12:
485
+ case 13:
486
+ y ? d(10) : b();
487
+ break;
488
+ case 16:
489
+ d(1);
490
+ break;
491
+ case 15:
492
+ case 14: break;
493
+ default: return T;
494
+ }
495
+ }
496
+ }
497
+ i(v, "scanNext");
498
+ function d(T, E = [], ie = []) {
499
+ if (f(T), E.length + ie.length > 0) {
500
+ let V = t.getToken();
501
+ for (; V !== 17;) {
502
+ if (E.indexOf(V) !== -1) {
503
+ v();
504
+ break;
505
+ } else if (ie.indexOf(V) !== -1) break;
506
+ V = v();
507
+ }
508
+ }
509
+ }
510
+ i(d, "handleError");
511
+ function L(T) {
512
+ const E = t.getTokenValue();
513
+ return T ? c(E) : (A(E), o.push(E)), v(), !0;
514
+ }
515
+ i(L, "parseString");
516
+ function B() {
517
+ switch (t.getToken()) {
518
+ case 11:
519
+ const T = t.getTokenValue();
520
+ let E = Number(T);
521
+ isNaN(E) && (d(2), E = 0), c(E);
522
+ break;
523
+ case 7:
524
+ c(null);
525
+ break;
526
+ case 8:
527
+ c(!0);
528
+ break;
529
+ case 9:
530
+ c(!1);
531
+ break;
532
+ default: return !1;
533
+ }
534
+ return v(), !0;
535
+ }
536
+ i(B, "parseLiteral");
537
+ function $() {
538
+ return t.getToken() !== 10 ? (d(3, [], [2, 5]), !1) : (L(!1), t.getToken() === 6 ? (p(":"), v(), H() || d(4, [], [2, 5])) : d(5, [], [2, 5]), o.pop(), !0);
539
+ }
540
+ i($, "parseProperty");
541
+ function N() {
542
+ u(), v();
543
+ let T = !1;
544
+ for (; t.getToken() !== 2 && t.getToken() !== 17;) {
545
+ if (t.getToken() === 5) {
546
+ if (T || d(4, [], []), p(","), v(), t.getToken() === 2 && j) break;
547
+ } else T && d(6, [], []);
548
+ $() || d(4, [], [2, 5]), T = !0;
549
+ }
550
+ return O(), t.getToken() !== 2 ? d(7, [2], []) : v(), !0;
551
+ }
552
+ i(N, "parseObject");
553
+ function $e() {
554
+ h(), v();
555
+ let T = !0, E = !1;
556
+ for (; t.getToken() !== 4 && t.getToken() !== 17;) {
557
+ if (t.getToken() === 5) {
558
+ if (E || d(4, [], []), p(","), v(), t.getToken() === 4 && j) break;
559
+ } else E && d(6, [], []);
560
+ T ? (o.push(0), T = !1) : o[o.length - 1]++, H() || d(4, [], [4, 5]), E = !0;
561
+ }
562
+ return D(), T || o.pop(), t.getToken() !== 4 ? d(8, [4], []) : v(), !0;
563
+ }
564
+ i($e, "parseArray");
565
+ function H() {
566
+ switch (t.getToken()) {
567
+ case 3: return $e();
568
+ case 1: return N();
569
+ case 10: return L(!0);
570
+ default: return B();
571
+ }
572
+ }
573
+ return i(H, "parseValue"), v(), t.getToken() === 17 ? s.allowEmptyContent ? !0 : (d(4, [], []), !1) : H() ? (t.getToken() !== 17 && d(9, [], []), !0) : (d(4, [], []), !1);
574
+ }
575
+ i(Pe, "visit");
576
+ var fe;
577
+ (function(e) {
578
+ e[e.None = 0] = "None", e[e.UnexpectedEndOfComment = 1] = "UnexpectedEndOfComment", e[e.UnexpectedEndOfString = 2] = "UnexpectedEndOfString", e[e.UnexpectedEndOfNumber = 3] = "UnexpectedEndOfNumber", e[e.InvalidUnicode = 4] = "InvalidUnicode", e[e.InvalidEscapeCharacter = 5] = "InvalidEscapeCharacter", e[e.InvalidCharacter = 6] = "InvalidCharacter";
579
+ })(fe || (fe = {}));
580
+ var ue;
581
+ (function(e) {
582
+ e[e.OpenBraceToken = 1] = "OpenBraceToken", e[e.CloseBraceToken = 2] = "CloseBraceToken", e[e.OpenBracketToken = 3] = "OpenBracketToken", e[e.CloseBracketToken = 4] = "CloseBracketToken", e[e.CommaToken = 5] = "CommaToken", e[e.ColonToken = 6] = "ColonToken", e[e.NullKeyword = 7] = "NullKeyword", e[e.TrueKeyword = 8] = "TrueKeyword", e[e.FalseKeyword = 9] = "FalseKeyword", e[e.StringLiteral = 10] = "StringLiteral", e[e.NumericLiteral = 11] = "NumericLiteral", e[e.LineCommentTrivia = 12] = "LineCommentTrivia", e[e.BlockCommentTrivia = 13] = "BlockCommentTrivia", e[e.LineBreakTrivia = 14] = "LineBreakTrivia", e[e.Trivia = 15] = "Trivia", e[e.Unknown = 16] = "Unknown", e[e.EOF = 17] = "EOF";
583
+ })(ue || (ue = {}));
584
+ const Ve = Re;
585
+ var ae;
586
+ (function(e) {
587
+ e[e.InvalidSymbol = 1] = "InvalidSymbol", e[e.InvalidNumberFormat = 2] = "InvalidNumberFormat", e[e.PropertyNameExpected = 3] = "PropertyNameExpected", e[e.ValueExpected = 4] = "ValueExpected", e[e.ColonExpected = 5] = "ColonExpected", e[e.CommaExpected = 6] = "CommaExpected", e[e.CloseBraceExpected = 7] = "CloseBraceExpected", e[e.CloseBracketExpected = 8] = "CloseBracketExpected", e[e.EndOfFileExpected = 9] = "EndOfFileExpected", e[e.InvalidCommentToken = 10] = "InvalidCommentToken", e[e.UnexpectedEndOfComment = 11] = "UnexpectedEndOfComment", e[e.UnexpectedEndOfString = 12] = "UnexpectedEndOfString", e[e.UnexpectedEndOfNumber = 13] = "UnexpectedEndOfNumber", e[e.InvalidUnicode = 14] = "InvalidUnicode", e[e.InvalidEscapeCharacter = 15] = "InvalidEscapeCharacter", e[e.InvalidCharacter = 16] = "InvalidCharacter";
588
+ })(ae || (ae = {}));
589
+ const Y = i((e, n) => Ve(_e(n, e)), "readJsonc"), pe = i(() => {
590
+ const { findPnpApi: e } = module$1;
591
+ return e && e(process.cwd());
592
+ }, "getPnpApi"), We = "detectTypeScriptVersion:", Me = i((e, n) => {
593
+ const s = `${We}${e}`, t = n?.get(s);
594
+ if (t !== void 0) return t ?? void 0;
595
+ let o;
596
+ const r = pe();
597
+ if (r) try {
598
+ o = r.resolveRequest("typescript/package.json", e) ?? void 0;
599
+ } catch {}
600
+ o ??= R(path.resolve(e), path.join("node_modules", "typescript", "package.json"), n);
601
+ let l;
602
+ if (o) try {
603
+ const g = Y(o, n);
604
+ typeof g?.version == "string" && (l = g.version);
605
+ } catch {}
606
+ return n?.set(s, l ?? null), l;
607
+ }, "detectTypeScriptVersion"), I = "package.json", M = "tsconfig.json", Je = i((e, n, s) => {
608
+ const t = module$1.createRequire(path.join(s, "tsconfig.json"));
609
+ if (e !== n) try {
610
+ return t.resolve(e);
611
+ } catch {}
612
+ try {
613
+ return t.resolve(n);
614
+ } catch {}
615
+ try {
616
+ return t.resolve(`${n}/${I}`);
617
+ } catch {}
618
+ }, "resolvePackageEntryWithNode"), Z = i((e, n, s, t) => {
619
+ const o = `resolveFromPackageJsonPath:${e}:${n}:${s}`;
620
+ if (t?.has(o)) return t.get(o) || !1;
621
+ const r = Y(e, t);
622
+ if (!r) return;
623
+ let l = n || M;
624
+ if (!s && r.exports) try {
625
+ const [g] = v(r.exports, n, ["require", "types"]);
626
+ l = g;
627
+ } catch {
628
+ return t?.set(o, ""), !1;
629
+ }
630
+ else !n && r.tsconfig && (l = r.tsconfig);
631
+ return l = path.join(e, "..", l), t?.set(o, l), l;
632
+ }, "resolveFromPackageJsonPath"), ze = i((e, n, s) => {
633
+ const t = `resolveExtendsPath:${e}:${n}`;
634
+ if (s?.has(t)) return s.get(t) || void 0;
635
+ const o = Ge(e, n, s);
636
+ return s?.set(t, o || ""), o;
637
+ }, "resolveExtendsPath"), Ge = i((e, n, s) => {
638
+ let t = e;
639
+ if (e === ".." && (t = path.join(t, M)), e[0] === "." && (t = path.resolve(n, t)), path.isAbsolute(t)) {
640
+ const c = F(s, t);
641
+ if (c) {
642
+ if (c.isFile()) return t;
643
+ } else if (!t.endsWith(".json")) {
644
+ const p = `${t}.json`;
645
+ if (F(s, p)) return p;
646
+ }
647
+ return;
648
+ }
649
+ const [o, ...r] = e.split("/"), l = o[0] === "@" ? `${o}/${r.shift()}` : o, g = r.join("/"), m = pe();
650
+ if (m) {
651
+ const { resolveRequest: c } = m;
652
+ try {
653
+ if (l === e) {
654
+ const p = c(path.join(l, I), n);
655
+ if (p) {
656
+ const b = Z(p, g, !1, s);
657
+ if (b && F(s, b)) return b;
658
+ }
659
+ } else {
660
+ let p;
661
+ try {
662
+ p = c(e, n, { extensions: [".json"] });
663
+ } catch {
664
+ p = c(path.join(e, M), n);
665
+ }
666
+ if (p) return p;
667
+ }
668
+ } catch {}
669
+ }
670
+ const k = Je(e, l, n);
671
+ let w;
672
+ if (k) {
673
+ if (path.basename(k) !== I && k.endsWith(".json")) return k;
674
+ w = path.basename(k) === I ? k : R(path.dirname(k), I, s);
675
+ }
676
+ const u = w && path.dirname(w) || R(path.resolve(n), path.join("node_modules", l), s);
677
+ if (!u || !F(s, u)?.isDirectory()) return;
678
+ const A = path.join(u, I);
679
+ if (F(s, A)) {
680
+ const c = Z(A, g, !1, s);
681
+ if (c === !1) return;
682
+ if (c && F(s, c)?.isFile()) return c;
683
+ }
684
+ const O = path.join(u, g), h = O.endsWith(".json");
685
+ if (!h) {
686
+ const c = `${O}.json`;
687
+ if (F(s, c)) return c;
688
+ }
689
+ const D = F(s, O);
690
+ if (D) {
691
+ if (D.isDirectory()) {
692
+ const c = path.join(O, I);
693
+ if (F(s, c)) {
694
+ const b = Z(c, "", !0, s);
695
+ if (b && F(s, b)) return b;
696
+ }
697
+ const p = path.join(O, M);
698
+ if (F(s, p)) return p;
699
+ } else if (h) return O;
700
+ }
701
+ }, "resolveExtendsPathUncached"), q = Symbol("implicitBaseUrl"), U = "${configDir}", K = /^\.{1,2}(\/.*)?$/, J = i((e) => {
702
+ const n = x(e);
703
+ return K.test(n) ? n : `./${n}`;
704
+ }, "normalizeRelativePath"), Qe = i((e) => {
705
+ const n = { ...e };
706
+ if (n.strict) for (const t of [
707
+ "noImplicitAny",
708
+ "noImplicitThis",
709
+ "strictNullChecks",
710
+ "strictFunctionTypes",
711
+ "strictBindCallApply",
712
+ "strictPropertyInitialization",
713
+ "strictBuiltinIteratorReturn",
714
+ "alwaysStrict",
715
+ "useUnknownInCatchVariables"
716
+ ]) n[t] === void 0 && (n[t] = !0);
717
+ if (n.composite && (n.declaration ??= !0, n.incremental ??= !0), n.target) {
718
+ let s = n.target.toLowerCase();
719
+ s === "es2015" && (s = "es6"), n.target = s, s === "esnext" && (n.module ??= "es6", n.useDefineForClassFields ??= !0), (s === "es6" || s === "es2016" || s === "es2017" || s === "es2018" || s === "es2019" || s === "es2020" || s === "es2021" || s === "es2022" || s === "es2023" || s === "es2024" || s === "es2025") && (n.module ??= "es6"), (s === "es2022" || s === "es2023" || s === "es2024" || s === "es2025") && (n.useDefineForClassFields ??= !0);
720
+ }
721
+ if (n.module) {
722
+ let s = n.module.toLowerCase();
723
+ if (s === "es2015" && (s = "es6"), n.module = s, (s === "es6" || s === "es2020" || s === "es2022" || s === "esnext" || s === "none" || s === "system" || s === "umd" || s === "amd") && (n.moduleResolution ??= "classic"), s === "system" && (n.allowSyntheticDefaultImports ??= !0), (s === "node16" || s === "node18" || s === "node20" || s === "nodenext" || s === "preserve") && (n.esModuleInterop ??= !0, n.allowSyntheticDefaultImports ??= !0), (s === "node16" || s === "node18" || s === "node20" || s === "nodenext") && (n.moduleDetection ??= "force"), (s === "node16" || s === "node18") && (n.target ??= "es2022", n.moduleResolution ??= "node16"), s === "node20" && (n.target ??= "es2023", n.moduleResolution ??= "node16", n.resolveJsonModule ??= !0), s === "nodenext" && (n.target ??= "esnext", n.moduleResolution ??= "nodenext", n.resolveJsonModule ??= !0), s === "node16" || s === "node18" || s === "node20" || s === "nodenext") {
724
+ const t = n.target;
725
+ (t === "es3" || t === "es2022" || t === "es2023" || t === "es2024" || t === "esnext") && (n.useDefineForClassFields ??= !0);
726
+ }
727
+ s === "preserve" && (n.moduleResolution ??= "bundler");
728
+ }
729
+ if (n.moduleResolution) {
730
+ let s = n.moduleResolution.toLowerCase();
731
+ s === "node" && (s = "node10"), n.moduleResolution = s, (s === "node16" || s === "nodenext" || s === "bundler") && (n.resolvePackageJsonExports ??= !0, n.resolvePackageJsonImports ??= !0), s === "bundler" && (n.allowSyntheticDefaultImports ??= !0, n.resolveJsonModule ??= !0);
732
+ }
733
+ for (const s of [
734
+ "jsx",
735
+ "moduleDetection",
736
+ "importsNotUsedAsValues",
737
+ "newLine"
738
+ ]) n[s] && (n[s] = n[s].toLowerCase());
739
+ return n.esModuleInterop && (n.allowSyntheticDefaultImports ??= !0), n.verbatimModuleSyntax && (n.isolatedModules ??= !0, n.preserveConstEnums ??= !0), n.isolatedModules && (n.preserveConstEnums ??= !0), n.rewriteRelativeImportExtensions && (n.allowImportingTsExtensions ??= !0), n.lib && (n.lib = n.lib.map((s) => s.toLowerCase())), n.checkJs && (n.allowJs ??= !0), n;
740
+ }, "normalizeCompilerOptions"), He = i((e, n) => {
741
+ !n.has("target") && !Xe(e.module) && (e.target = "es3");
742
+ }, "applyV4Defaults"), Xe = i((e) => e === "node16" || e === "node18" || e === "node20" || e === "nodenext", "moduleDictatesTarget$1"), Ye = i((e, n) => {
743
+ !n.has("target") && !Ze(e.module) && (e.target = "es5");
744
+ }, "applyV5Defaults"), Ze = i((e) => e === "node16" || e === "node18" || e === "node20" || e === "nodenext", "moduleDictatesTarget"), qe = i((e, n) => {
745
+ n.has("strict") || (e.strict = !0), n.has("target") || (e.target = "es2025"), n.has("module") || (e.module = "es2022"), n.has("moduleResolution") || (e.moduleResolution = "bundler"), n.has("rootDir") || (e.rootDir = "."), n.has("types") || (e.types = []), n.has("noUncheckedSideEffectImports") || (e.noUncheckedSideEffectImports = !0), n.has("libReplacement") || (e.libReplacement = !1);
746
+ }, "applyV6Defaults"), Ke = [
747
+ [4, He],
748
+ [5, Ye],
749
+ [6, qe]
750
+ ], Ce = i((e) => {
751
+ const n = /^v?(\d+)/.exec(e);
752
+ return n ? Number(n[1]) : void 0;
753
+ }, "parseMajor"), et = i((e, n) => {
754
+ const s = Ce(n);
755
+ if (s === void 0) return;
756
+ const t = new Set(Object.keys(e));
757
+ for (const [o, r] of Ke) o <= s && r(e, t);
758
+ }, "applyVersionDefaults"), C = i((e, n) => J(path.relative(e, n)), "pathRelative"), me = [
759
+ "files",
760
+ "include",
761
+ "exclude"
762
+ ], ge = i((e, n, s) => {
763
+ const t = path.join(n, s);
764
+ return x(path.relative(e, t)) || "./";
765
+ }, "resolveAndRelativize"), tt = i((e, n, s) => {
766
+ const t = path.relative(e, n);
767
+ if (!t) return s;
768
+ return x(`${t}/${s.startsWith("./") ? s.slice(2) : s}`);
769
+ }, "prefixPattern"), de = ["outDir", "declarationDir"], z = i((e, n) => {
770
+ if (e.startsWith(U)) return x(path.join(n, e.slice(12)));
771
+ }, "interpolateConfigDir"), nt = [
772
+ "outDir",
773
+ "declarationDir",
774
+ "outFile",
775
+ "rootDir",
776
+ "baseUrl",
777
+ "tsBuildInfoFile"
778
+ ], ke = i((e, n = {}) => {
779
+ if (e.length === 0) throw new Error("Chain must not be empty");
780
+ const { typescriptVersion: s } = n, t = new Map(e.map((u) => [u.path, u])), o = /* @__PURE__ */ new Map(), r = i((u) => {
781
+ const A = o.get(u);
782
+ if (A) return A;
783
+ const O = t.get(u);
784
+ if (!O) throw new Error(`Config not found in chain: ${u}`);
785
+ const h = O.config, D = path.dirname(u);
786
+ let c = {
787
+ ...h,
788
+ ...h.compilerOptions && { compilerOptions: { ...h.compilerOptions } },
789
+ ...h.watchOptions && { watchOptions: { ...h.watchOptions } }
790
+ };
791
+ if (delete c.extends, c.compilerOptions?.paths && !c.compilerOptions.baseUrl && (c.compilerOptions[q] = D), h.extends) {
792
+ const p = Array.isArray(h.extends) ? h.extends : [h.extends];
793
+ for (const b of p.toReversed()) {
794
+ const f = r(b), y = path.dirname(b), { references: j, ...v } = f;
795
+ if (v.compilerOptions) {
796
+ const L = { ...v.compilerOptions };
797
+ for (const B of [
798
+ "baseUrl",
799
+ "outDir",
800
+ "declarationDir",
801
+ "rootDir"
802
+ ]) {
803
+ const $ = L[B];
804
+ $ && !$.startsWith(U) && (L[B] = ge(D, y, $));
805
+ }
806
+ for (const B of ["rootDirs", "typeRoots"]) {
807
+ const $ = L[B];
808
+ $ && (L[B] = $.map((N) => N.startsWith(U) ? N : ge(D, y, N)));
809
+ }
810
+ v.compilerOptions = L;
811
+ }
812
+ for (const L of me) {
813
+ const B = v[L];
814
+ B && (v[L] = B.map(($) => $.startsWith(U) ? $ : tt(D, y, $)));
815
+ }
816
+ const d = {
817
+ ...v,
818
+ ...c,
819
+ compilerOptions: {
820
+ ...v.compilerOptions,
821
+ ...c.compilerOptions
822
+ }
823
+ };
824
+ v.watchOptions && (d.watchOptions = {
825
+ ...v.watchOptions,
826
+ ...c.watchOptions
827
+ }), c = d;
828
+ }
829
+ }
830
+ if (c.compilerOptions) {
831
+ const { compilerOptions: p } = c;
832
+ for (const f of ["baseUrl", "rootDir"]) {
833
+ const y = p[f];
834
+ if (y && !y.startsWith(U)) p[f] = C(D, path.resolve(D, y));
835
+ }
836
+ for (const f of de) {
837
+ let y = p[f];
838
+ y && (Array.isArray(c.exclude) || (c.exclude = de.map((j) => p[j]).filter(Boolean)), y.startsWith(U) || (y = J(y)), p[f] = y);
839
+ }
840
+ } else c.compilerOptions = {};
841
+ if (c.include && (c.include = c.include.map(x)), c.files && (c.files = c.files.map((p) => p.startsWith(U) ? p : J(p))), c.watchOptions) {
842
+ const { watchOptions: p } = c;
843
+ for (const b of ["excludeDirectories", "excludeFiles"]) p[b] && (p[b] = p[b].map((f) => x(path.resolve(D, f))));
844
+ for (const b of [
845
+ "watchFile",
846
+ "watchDirectory",
847
+ "fallbackPolling"
848
+ ]) if (p[b]) {
849
+ const f = p;
850
+ f[b] = p[b].toLowerCase();
851
+ }
852
+ }
853
+ return o.set(u, c), c;
854
+ }, "resolveEntry"), l = e[0], g = r(l.path), m = path.dirname(l.path), k = {
855
+ ...g,
856
+ compilerOptions: g.compilerOptions ? { ...g.compilerOptions } : {}
857
+ }, { compilerOptions: w } = k;
858
+ if (w) {
859
+ for (const u of nt) {
860
+ const A = w[u];
861
+ if (A) {
862
+ const O = z(A, m);
863
+ w[u] = O ? C(m, O) : A;
864
+ }
865
+ }
866
+ for (const u of ["rootDirs", "typeRoots"]) {
867
+ const A = w[u];
868
+ A && (w[u] = A.map((O) => {
869
+ const h = z(O, m);
870
+ return h ? C(m, h) : J(O);
871
+ }));
872
+ }
873
+ if (w.paths) {
874
+ const u = {};
875
+ for (const [A, O] of Object.entries(w.paths)) u[A] = O.map((h) => z(h, m) ?? h);
876
+ w.paths = u;
877
+ }
878
+ s && et(w, s), k.compilerOptions = Qe(w);
879
+ }
880
+ for (const u of me) {
881
+ const A = k[u];
882
+ A && (k[u] = A.map((O) => z(O, m) ?? O));
883
+ }
884
+ return {
885
+ path: l.path,
886
+ config: k,
887
+ sources: e.map((u) => u.path)
888
+ };
889
+ }, "resolveExtendsChain"), we = i((e, n = {}) => {
890
+ const { cache: s = /* @__PURE__ */ new Map() } = n, t = path.resolve(e), o = [], r = /* @__PURE__ */ new Set(), l = i((g, m) => {
891
+ const k = x(g);
892
+ if (r.has(k)) return;
893
+ r.add(k);
894
+ let w;
895
+ try {
896
+ w = Y(g, s) || {};
897
+ } catch {
898
+ throw new Error(`Cannot resolve tsconfig at path: ${g}`);
899
+ }
900
+ if (typeof w != "object") throw new SyntaxError(`Failed to parse tsconfig at: ${g}`);
901
+ const u = path.dirname(g);
902
+ if (w.extends) {
903
+ const A = Array.isArray(w.extends), h = (A ? w.extends : [w.extends]).map((c) => {
904
+ const p = ze(c, u, s);
905
+ if (!p) throw new Error(`File '${c}' not found.`);
906
+ const b = x(p);
907
+ if (m.has(b) || b === k) throw new Error(`Circularity detected while resolving configuration: ${b}`);
908
+ return b;
909
+ });
910
+ w.extends = A ? h : h[0], o.push({
911
+ path: k,
912
+ config: w
913
+ });
914
+ const D = new Set(m);
915
+ D.add(k);
916
+ for (const c of [...h].reverse()) l(c, D);
917
+ } else o.push({
918
+ path: k,
919
+ config: w
920
+ });
921
+ }, "collect");
922
+ return l(t, /* @__PURE__ */ new Set()), o;
923
+ }, "getExtendsChain"), ee = i((e, n = {}) => {
924
+ const { cache: s = /* @__PURE__ */ new Map(), typescriptVersion: t = "auto" } = n, o = we(e, { cache: s });
925
+ let r;
926
+ return t === "auto" ? r = Me(path.dirname(o[0].path), s) : t !== !1 && (r = t), ke(o, { typescriptVersion: r });
927
+ }, "readTsconfig");
928
+ var st = Object.defineProperty, G = i((e, n) => st(e, "name", {
929
+ value: n,
930
+ configurable: !0
931
+ }), "s");
932
+ const ve = G((e) => {
933
+ let n = "";
934
+ for (let s = 0; s < e.length; s += 1) {
935
+ const t = e[s], o = t.toUpperCase();
936
+ n += t === o ? t.toLowerCase() : o;
937
+ }
938
+ return n;
939
+ }, "invertCase"), te = /* @__PURE__ */ new Map(), be = G((e, n) => {
940
+ const s = Se.join(e, `.is-fs-case-sensitive-test-${process.pid}`);
941
+ try {
942
+ return n.writeFileSync(s, ""), !n.existsSync(ve(s));
943
+ } finally {
944
+ try {
945
+ n.unlinkSync(s);
946
+ } catch {}
947
+ }
948
+ }, "checkDirectoryCaseWithWrite"), ot = G((e, n, s) => {
949
+ try {
950
+ return be(e, s);
951
+ } catch (t) {
952
+ if (n === void 0) return be(Ie.tmpdir(), s);
953
+ throw t;
954
+ }
955
+ }, "checkDirectoryCaseWithFallback"), it = G((e, n = Ue, s = !0) => {
956
+ const t = e ?? process.cwd();
957
+ if (s && te.has(t)) return te.get(t);
958
+ let o;
959
+ const r = ve(t);
960
+ return r !== t && n.existsSync(t) ? o = !n.existsSync(r) : o = ot(t, e, n), s && te.set(t, o), o;
961
+ }, "isFsCaseSensitive"), { join: ye } = path.posix, ne = {
962
+ ts: [
963
+ ".ts",
964
+ ".tsx",
965
+ ".d.ts"
966
+ ],
967
+ cts: [".cts", ".d.cts"],
968
+ mts: [".mts", ".d.mts"]
969
+ }, rt = i((e) => {
970
+ const n = [...ne.ts], s = [...ne.cts], t = [...ne.mts];
971
+ return e?.allowJs && (n.push(".js", ".jsx"), s.push(".cjs"), t.push(".mjs")), [
972
+ ...n,
973
+ ...s,
974
+ ...t
975
+ ];
976
+ }, "getSupportedExtensions"), lt = i((e) => {
977
+ const n = [];
978
+ if (!e) return n;
979
+ const { outDir: s, declarationDir: t } = e;
980
+ return s && n.push(s), t && n.push(t), n;
981
+ }, "getDefaultExcludeSpec"), Te = i((e) => e.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`), "escapeForRegexp"), se = `(?!(${[
982
+ "node_modules",
983
+ "bower_components",
984
+ "jspm_packages"
985
+ ].join("|")})(/|$))`, ft = /(?:^|\/)[^.*?]+$/, he = "**/*", Q = "[^/]", oe = "[^./]", Oe = process.platform === "win32", ut = i(({ config: e, path: n }, s) => {
986
+ if ("extends" in e) throw new Error("tsconfig#extends must be resolved. Use getTsconfig or readTsconfig to resolve it.");
987
+ if (!path.isAbsolute(n)) throw new Error("The tsconfig path must be absolute");
988
+ Oe && (n = x(n));
989
+ const t = path.dirname(n), { files: o, include: r, exclude: l, compilerOptions: g } = e, m = i((c) => path.isAbsolute(c) ? c : ye(t, c), "resolvePattern"), k = o ? new Set(o.map(m)) : void 0, w = rt(g), u = s ? "" : "i", O = (l || lt(g)).map((c) => {
990
+ const b = Te(m(c)).replaceAll(String.raw`\*\*/`, "(.+/)?").replaceAll(String.raw`\*`, `${Q}*`).replaceAll(String.raw`\?`, Q);
991
+ return new RegExp(`^${b}($|/)`, u);
992
+ }), h = o || r ? r : [he];
993
+ return {
994
+ filesSet: k,
995
+ extensions: w,
996
+ excludePatterns: O,
997
+ includePatterns: h ? h.map((c) => {
998
+ let p = m(c);
999
+ ft.test(p) && (p = ye(p, he));
1000
+ const b = Te(p).replaceAll(String.raw`/\*\*`, `(/${se}${oe}${Q}*)*?`).replaceAll(/(\/)?\\\*/g, (f, y) => {
1001
+ const j = String.raw`(${oe}|(\.(?!min\.js$))?)*`;
1002
+ return y ? `/${se}${oe}${j}` : j;
1003
+ }).replaceAll(/(\/)?\\\?/g, (f, y) => {
1004
+ const j = Q;
1005
+ return y ? `/${se}${j}` : j;
1006
+ });
1007
+ return new RegExp(`^${b}$`, u);
1008
+ }) : void 0
1009
+ };
1010
+ }, "compilePatterns"), Ae = /* @__PURE__ */ new WeakMap(), je = i((e, n) => {
1011
+ if (!path.isAbsolute(n)) return !1;
1012
+ Oe && (n = x(n));
1013
+ let s = Ae.get(e);
1014
+ s || (s = ut(e, it()), Ae.set(e, s));
1015
+ const { filesSet: t, extensions: o, excludePatterns: r, includePatterns: l } = s;
1016
+ return t?.has(n) ? !0 : !o.some((g) => n.endsWith(g)) || r.some((g) => g.test(n)) ? !1 : !!(l && l.some((g) => g.test(n)));
1017
+ }, "isFileIncluded"), De = i((e, n, s, t) => {
1018
+ const o = path.resolve(e);
1019
+ let r = x(e);
1020
+ for (;;) {
1021
+ const l = R(r, n, s);
1022
+ if (!l) return;
1023
+ const m = ee(path.resolve(l), {
1024
+ cache: s,
1025
+ typescriptVersion: t
1026
+ });
1027
+ if (je(m, o)) return m;
1028
+ const k = path.dirname(l), w = path.dirname(k);
1029
+ if (w === k) return;
1030
+ r = w;
1031
+ }
1032
+ }, "findConfigApplicable"), Ee = i((e = process.cwd(), n = {}) => {
1033
+ const { configName: s = "tsconfig.json", cache: t = /* @__PURE__ */ new Map(), includes: o = !1 } = n;
1034
+ if (!o) {
1035
+ const r = path.resolve(e);
1036
+ return path.basename(r) === s && F(t, r)?.isFile() ? x(r) : R(x(e), s, t);
1037
+ }
1038
+ return De(e, s, t, !1)?.path;
1039
+ }, "findTsconfig"), at = i((e = process.cwd(), n = {}) => {
1040
+ const { configName: s = "tsconfig.json", cache: t = /* @__PURE__ */ new Map(), includes: o = !1, typescriptVersion: r = "auto" } = n;
1041
+ if (!o) {
1042
+ const l = Ee(e, {
1043
+ configName: s,
1044
+ cache: t
1045
+ });
1046
+ return l ? ee(l, {
1047
+ cache: t,
1048
+ typescriptVersion: r
1049
+ }) : void 0;
1050
+ }
1051
+ return De(e, s, t, r);
1052
+ }, "getTsconfig"), pt = /\*/g, xe = i((e, n) => {
1053
+ const s = e.match(pt);
1054
+ if (s && s.length > 1) throw new Error(n);
1055
+ }, "assertStarCount"), mt = i((e) => {
1056
+ if (e.includes("*")) {
1057
+ const [n, s] = e.split("*");
1058
+ return {
1059
+ prefix: n,
1060
+ suffix: s
1061
+ };
1062
+ }
1063
+ return e;
1064
+ }, "parsePattern"), gt = i(({ prefix: e, suffix: n }, s) => s.startsWith(e) && s.endsWith(n), "isPatternMatch"), dt = i((e, n, s) => Object.entries(e).map(([t, o]) => (xe(t, `Pattern '${t}' can have at most one '*' character.`), {
1065
+ pattern: mt(t),
1066
+ substitutions: o.map((r) => {
1067
+ if (xe(r, `Substitution '${r}' in pattern '${t}' can have at most one '*' character.`), !n && !K.test(r) && !path.isAbsolute(r)) throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");
1068
+ return path.resolve(s, r);
1069
+ })
1070
+ })), "parsePaths"), kt = i((e) => {
1071
+ const { compilerOptions: n } = e.config;
1072
+ if (!n) return null;
1073
+ const { baseUrl: s, paths: t } = n;
1074
+ if (!s && !t) return null;
1075
+ const o = q in n && n[q], r = path.resolve(path.dirname(e.path), s || o || "."), l = t ? dt(t, s, r) : [], g = /* @__PURE__ */ new Map(), m = [];
1076
+ for (const k of l) typeof k.pattern == "string" ? g.set(k.pattern, k.substitutions) : m.push(k);
1077
+ return {
1078
+ exactEntries: g,
1079
+ patternEntries: m,
1080
+ resolvedBaseUrl: r,
1081
+ baseUrl: s
1082
+ };
1083
+ }, "compilePaths"), Fe = /* @__PURE__ */ new WeakMap();
1084
+ i((e, n) => {
1085
+ let s = Fe.get(e);
1086
+ if (s === void 0 && (s = kt(e), Fe.set(e, s)), !s) return [];
1087
+ if (K.test(n)) return [];
1088
+ const { exactEntries: t, patternEntries: o, resolvedBaseUrl: r, baseUrl: l } = s, g = t.get(n);
1089
+ if (g) return g.map(x);
1090
+ let m, k = -1;
1091
+ for (const u of o) gt(u.pattern, n) && u.pattern.prefix.length > k && (k = u.pattern.prefix.length, m = u);
1092
+ if (!m) return l ? [x(path.join(r, n))] : [];
1093
+ const w = n.slice(m.pattern.prefix.length, n.length - m.pattern.suffix.length);
1094
+ return m.substitutions.map((u) => x(u.replace("*", w)));
1095
+ }, "resolvePathAlias");
1096
+ //#endregion
1097
+ //#region ../../node_modules/.pnpm/tsdown@0.22.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.1_@tsdown+exe@0.22.1_@type_b2f732f99208225f009f13478ba95350/node_modules/tsdown/dist/format-DMceewlS.mjs
70
1098
  const shimFile = path.resolve(import.meta.dirname, "..", "esm-shims.js");
1099
+ const shimsDefine = {
1100
+ __dirname: "__TSDOWN_SHIM_DIRNAME__",
1101
+ __filename: "__TSDOWN_SHIM_FILENAME__"
1102
+ };
1103
+ const shimsPlugin = {
1104
+ name: "tsdown:shims-banner",
1105
+ banner: `
1106
+ import __tsdown_shims_path from 'node:path'
1107
+ import __tsdown_shims_url from 'node:url'
1108
+
1109
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
1110
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
1111
+ `
1112
+ };
71
1113
  function getShimsInject(format, platform) {
72
1114
  if (format === "es" && platform === "node") return {
73
1115
  __dirname: [shimFile, "__dirname"],
@@ -102,22 +1144,26 @@ function resolveDepsConfig(config, logger) {
102
1144
  logger?.warn("`skipNodeModulesBundle` is deprecated. Use `deps.skipNodeModulesBundle` instead.");
103
1145
  skipNodeModulesBundle = config.skipNodeModulesBundle;
104
1146
  }
105
- if (typeof neverBundle === "string") neverBundle = resolveRegex(neverBundle);
106
- if (typeof alwaysBundle === "string") alwaysBundle = resolveRegex(alwaysBundle);
1147
+ if (skipNodeModulesBundle && alwaysBundle != null) throw new TypeError("`deps.skipNodeModulesBundle` and `deps.alwaysBundle` are mutually exclusive options and cannot be used together.");
1148
+ if (onlyBundle != null && onlyBundle !== false) onlyBundle = toArray(onlyBundle);
1149
+ return {
1150
+ ...normalizeDepsOptions(alwaysBundle, neverBundle),
1151
+ onlyBundle,
1152
+ skipNodeModulesBundle,
1153
+ dts: normalizeDepsOptions(config.deps?.dts?.alwaysBundle, config.deps?.dts?.neverBundle)
1154
+ };
1155
+ }
1156
+ function normalizeDepsOptions(alwaysBundle, neverBundle) {
107
1157
  if (alwaysBundle != null && typeof alwaysBundle !== "function") {
108
1158
  const alwaysBundlePatterns = toArray(alwaysBundle);
109
1159
  alwaysBundle = (id) => matchPattern(id, alwaysBundlePatterns);
110
1160
  }
111
- if (skipNodeModulesBundle && alwaysBundle != null) throw new TypeError("`deps.skipNodeModulesBundle` and `deps.alwaysBundle` are mutually exclusive options and cannot be used together.");
112
- if (onlyBundle != null && onlyBundle !== false) onlyBundle = toArray(onlyBundle);
113
1161
  return {
114
- neverBundle,
115
1162
  alwaysBundle,
116
- onlyBundle,
117
- skipNodeModulesBundle
1163
+ neverBundle: resolveRegex(neverBundle)
118
1164
  };
119
1165
  }
120
- function DepsPlugin({ pkg, deps: { alwaysBundle, onlyBundle, skipNodeModulesBundle }, logger, nameLabel }, tsdownBundle) {
1166
+ function DepsPlugin({ pkg, deps: { alwaysBundle: jsAlwaysBundle, onlyBundle, skipNodeModulesBundle, dts }, logger, nameLabel }, tsdownBundle) {
121
1167
  const deps = pkg && Array.from(getProductionDeps(pkg));
122
1168
  return {
123
1169
  name: "tsdown:deps",
@@ -185,7 +1231,7 @@ function DepsPlugin({ pkg, deps: { alwaysBundle, onlyBundle, skipNodeModulesBund
185
1231
  */
186
1232
  async function externalStrategy(id, importer, resolved) {
187
1233
  if (id === shimFile) return false;
188
- if (alwaysBundle?.(id, importer)) return "no-external";
1234
+ if (((importer ? RE_DTS.test(importer) : false) && dts?.alwaysBundle || jsAlwaysBundle)?.(id, importer)) return "no-external";
189
1235
  if (skipNodeModulesBundle && resolved && (resolved.external || RE_NODE_MODULES$1.test(resolved.id))) {
190
1236
  const resolvedDep = await resolveDepSubpath(id, resolved);
191
1237
  return resolvedDep ? [true, resolvedDep] : true;
@@ -330,7 +1376,7 @@ function createDefu(merger) {
330
1376
  //#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.4/node_modules/fdir/dist/index.mjs
331
1377
  var __require$1 = /* @__PURE__ */ createRequire$1(import.meta.url);
332
1378
  function cleanPath(path) {
333
- let normalized = normalize(path);
1379
+ let normalized = normalize$1(path);
334
1380
  if (normalized.length > 1 && normalized[normalized.length - 1] === sep) normalized = normalized.substring(0, normalized.length - 1);
335
1381
  return normalized;
336
1382
  }
@@ -666,7 +1712,7 @@ var Walker = class {
666
1712
  this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
667
1713
  } else {
668
1714
  resolvedPath = useRealPaths ? resolvedPath : path;
669
- const filename = basename(resolvedPath);
1715
+ const filename = basename$1(resolvedPath);
670
1716
  const directoryPath$1 = normalizePath(dirname$1(resolvedPath), this.state.options);
671
1717
  resolvedPath = this.joinPath(filename, directoryPath$1);
672
1718
  this.pushFile(resolvedPath, files, this.state.counts, filters);
@@ -2694,7 +3740,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2694
3740
  module.exports = picomatch;
2695
3741
  }));
2696
3742
  //#endregion
2697
- //#region ../../node_modules/.pnpm/tinyglobby@0.2.16/node_modules/tinyglobby/dist/index.mjs
3743
+ //#region ../../node_modules/.pnpm/tinyglobby@0.2.17/node_modules/tinyglobby/dist/index.mjs
2698
3744
  var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
2699
3745
  const pico = require_picomatch$1();
2700
3746
  const utils = require_utils();
@@ -2710,6 +3756,7 @@ var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((
2710
3756
  })))(), 1);
2711
3757
  const isReadonlyArray = Array.isArray;
2712
3758
  const BACKSLASHES = /\\/g;
3759
+ const DRIVE_RELATIVE_PATH = /^[A-Za-z]:$/;
2713
3760
  const isWin = process.platform === "win32";
2714
3761
  const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
2715
3762
  function getPartialMatcher(patterns, options = {}) {
@@ -2776,6 +3823,9 @@ function buildRelative(cwd, root) {
2776
3823
  return p[p.length - 1] === "/" && result !== "" ? `${result}/` : result || ".";
2777
3824
  };
2778
3825
  }
3826
+ function ensureNonDriveRelativePath(path) {
3827
+ return path.replace(DRIVE_RELATIVE_PATH, (match) => `${match}/`);
3828
+ }
2779
3829
  const splitPatternOptions = { parts: true };
2780
3830
  function splitPattern(path) {
2781
3831
  var _result$parts;
@@ -2837,7 +3887,7 @@ function normalizePattern(pattern, opts, props, isIgnore) {
2837
3887
  }
2838
3888
  const potentialRoot = posix.join(cwd, parentDir.slice(i * 3));
2839
3889
  if (potentialRoot[0] !== "." && props.root.length > potentialRoot.length) {
2840
- props.root = potentialRoot;
3890
+ props.root = ensureNonDriveRelativePath(potentialRoot);
2841
3891
  props.depthOffset = -n + i;
2842
3892
  }
2843
3893
  }
@@ -2857,7 +3907,7 @@ function normalizePattern(pattern, opts, props, isIgnore) {
2857
3907
  }
2858
3908
  props.depthOffset = newCommonPath.length;
2859
3909
  props.commonPath = newCommonPath;
2860
- props.root = newCommonPath.length > 0 ? posix.join(cwd, ...newCommonPath) : cwd;
3910
+ props.root = ensureNonDriveRelativePath(newCommonPath.length > 0 ? posix.join(cwd, ...newCommonPath) : cwd);
2861
3911
  }
2862
3912
  return result;
2863
3913
  }
@@ -2946,18 +3996,15 @@ function formatPaths(paths, mapper) {
2946
3996
  }
2947
3997
  const defaultOptions$1 = {
2948
3998
  caseSensitiveMatch: true,
2949
- cwd: process.cwd(),
2950
3999
  debug: !!process.env.TINYGLOBBY_DEBUG,
2951
4000
  expandDirectories: true,
2952
4001
  followSymbolicLinks: true,
2953
4002
  onlyFiles: true
2954
4003
  };
2955
4004
  function getOptions(options) {
2956
- const opts = {
2957
- ...defaultOptions$1,
2958
- ...options
2959
- };
2960
- opts.cwd = (opts.cwd instanceof URL ? fileURLToPath(opts.cwd) : resolve$1(opts.cwd)).replace(BACKSLASHES, "/");
4005
+ const opts = Object.assign({}, options);
4006
+ for (const key in defaultOptions$1) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions$1[key] });
4007
+ opts.cwd = (opts.cwd instanceof URL ? fileURLToPath(opts.cwd) : resolve$1(opts.cwd || process.cwd())).replace(BACKSLASHES, "/");
2961
4008
  opts.ignore = ensureStringArray(opts.ignore);
2962
4009
  opts.fs && (opts.fs = {
2963
4010
  readdir: opts.fs.readdir || readdir$1,
@@ -2965,7 +4012,7 @@ function getOptions(options) {
2965
4012
  realpath: opts.fs.realpath || realpath,
2966
4013
  realpathSync: opts.fs.realpathSync || realpathSync,
2967
4014
  stat: opts.fs.stat || stat$1,
2968
- statSync: opts.fs.statSync || statSync
4015
+ statSync: opts.fs.statSync || statSync$1
2969
4016
  });
2970
4017
  if (opts.debug) log("globbing with options:", opts);
2971
4018
  return opts;
@@ -2983,7 +4030,7 @@ async function glob(globInput, options) {
2983
4030
  return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
2984
4031
  }
2985
4032
  //#endregion
2986
- //#region ../../node_modules/.pnpm/empathic@2.0.0/node_modules/empathic/resolve.mjs
4033
+ //#region ../../node_modules/.pnpm/empathic@2.0.1/node_modules/empathic/resolve.mjs
2987
4034
  /**
2988
4035
  * Resolve an absolute path from {@link root}, but only
2989
4036
  * if {@link input} isn't already absolute.
@@ -2996,7 +4043,7 @@ function absolute(input, root) {
2996
4043
  return isAbsolute(input) ? input : resolve(root || ".", input);
2997
4044
  }
2998
4045
  //#endregion
2999
- //#region ../../node_modules/.pnpm/empathic@2.0.0/node_modules/empathic/walk.mjs
4046
+ //#region ../../node_modules/.pnpm/empathic@2.0.1/node_modules/empathic/walk.mjs
3000
4047
  /**
3001
4048
  * Get all parent directories of {@link base}.
3002
4049
  * Stops after {@link Options['last']} is processed.
@@ -3016,7 +4063,7 @@ function up$2(base, options) {
3016
4063
  return arr;
3017
4064
  }
3018
4065
  //#endregion
3019
- //#region ../../node_modules/.pnpm/empathic@2.0.0/node_modules/empathic/find.mjs
4066
+ //#region ../../node_modules/.pnpm/empathic@2.0.1/node_modules/empathic/find.mjs
3020
4067
  /**
3021
4068
  * Find an item by name, walking parent directories until found.
3022
4069
  *
@@ -3031,7 +4078,7 @@ function up$1(name, options) {
3031
4078
  }
3032
4079
  }
3033
4080
  //#endregion
3034
- //#region ../../node_modules/.pnpm/empathic@2.0.0/node_modules/empathic/package.mjs
4081
+ //#region ../../node_modules/.pnpm/empathic@2.0.1/node_modules/empathic/package.mjs
3035
4082
  /**
3036
4083
  * Find the closest "package.json" file while walking parent directories.
3037
4084
  * @returns The absolute path to a "package.json", if found.
@@ -3195,87 +4242,87 @@ quansync$1({
3195
4242
  */
3196
4243
  const quansync = quansync$1;
3197
4244
  quansync$1({
3198
- sync: re.readFileSync,
3199
- async: re.promises.readFile
4245
+ sync: fs.readFileSync,
4246
+ async: fs.promises.readFile
3200
4247
  });
3201
4248
  quansync$1({
3202
- sync: re.writeFileSync,
3203
- async: re.promises.writeFile
4249
+ sync: fs.writeFileSync,
4250
+ async: fs.promises.writeFile
3204
4251
  });
3205
4252
  quansync$1({
3206
- sync: re.unlinkSync,
3207
- async: re.promises.unlink
4253
+ sync: fs.unlinkSync,
4254
+ async: fs.promises.unlink
3208
4255
  });
3209
4256
  quansync$1({
3210
- sync: re.accessSync,
3211
- async: re.promises.access
4257
+ sync: fs.accessSync,
4258
+ async: fs.promises.access
3212
4259
  });
3213
4260
  /**
3214
4261
  * @link https://nodejs.org/api/fs.html#fspromisesstatpath-options
3215
4262
  */
3216
4263
  const stat$2 = quansync$1({
3217
- sync: re.statSync,
3218
- async: re.promises.stat
4264
+ sync: fs.statSync,
4265
+ async: fs.promises.stat
3219
4266
  });
3220
4267
  const lstat = quansync$1({
3221
- sync: re.lstatSync,
3222
- async: re.promises.lstat
4268
+ sync: fs.lstatSync,
4269
+ async: fs.promises.lstat
3223
4270
  });
3224
4271
  quansync$1({
3225
- sync: re.copyFileSync,
3226
- async: re.promises.copyFile
4272
+ sync: fs.copyFileSync,
4273
+ async: fs.promises.copyFile
3227
4274
  });
3228
4275
  quansync$1({
3229
- sync: re.rmSync,
3230
- async: re.promises.rm
4276
+ sync: fs.rmSync,
4277
+ async: fs.promises.rm
3231
4278
  });
3232
4279
  quansync$1({
3233
- sync: re.mkdirSync,
3234
- async: re.promises.mkdir
4280
+ sync: fs.mkdirSync,
4281
+ async: fs.promises.mkdir
3235
4282
  });
3236
4283
  quansync$1({
3237
- sync: re.renameSync,
3238
- async: re.promises.rename
4284
+ sync: fs.renameSync,
4285
+ async: fs.promises.rename
3239
4286
  });
3240
4287
  quansync$1({
3241
- sync: re.readdirSync,
3242
- async: re.promises.readdir
4288
+ sync: fs.readdirSync,
4289
+ async: fs.promises.readdir
3243
4290
  });
3244
4291
  quansync$1({
3245
- sync: re.realpathSync,
3246
- async: re.promises.realpath
4292
+ sync: fs.realpathSync,
4293
+ async: fs.promises.realpath
3247
4294
  });
3248
4295
  quansync$1({
3249
- sync: re.readlinkSync,
3250
- async: re.promises.readlink
4296
+ sync: fs.readlinkSync,
4297
+ async: fs.promises.readlink
3251
4298
  });
3252
4299
  quansync$1({
3253
- sync: re.symlinkSync,
3254
- async: re.promises.symlink
4300
+ sync: fs.symlinkSync,
4301
+ async: fs.promises.symlink
3255
4302
  });
3256
4303
  quansync$1({
3257
- sync: re.chownSync,
3258
- async: re.promises.chown
4304
+ sync: fs.chownSync,
4305
+ async: fs.promises.chown
3259
4306
  });
3260
4307
  quansync$1({
3261
- sync: re.lchownSync,
3262
- async: re.promises.lchown
4308
+ sync: fs.lchownSync,
4309
+ async: fs.promises.lchown
3263
4310
  });
3264
4311
  quansync$1({
3265
- sync: re.chmodSync,
3266
- async: re.promises.chmod
4312
+ sync: fs.chmodSync,
4313
+ async: fs.promises.chmod
3267
4314
  });
3268
4315
  quansync$1({
3269
- sync: re.utimesSync,
3270
- async: re.promises.utimes
4316
+ sync: fs.utimesSync,
4317
+ async: fs.promises.utimes
3271
4318
  });
3272
4319
  quansync$1({
3273
- sync: re.lutimesSync,
3274
- async: re.promises.lutimes
4320
+ sync: fs.lutimesSync,
4321
+ async: fs.promises.lutimes
3275
4322
  });
3276
4323
  quansync$1({
3277
- sync: re.mkdtempSync,
3278
- async: re.promises.mkdtemp
4324
+ sync: fs.mkdtempSync,
4325
+ async: fs.promises.mkdtemp
3279
4326
  });
3280
4327
  //#endregion
3281
4328
  //#region ../../node_modules/.pnpm/unconfig-core@7.5.0/node_modules/unconfig-core/dist/index.mjs
@@ -3354,7 +4401,7 @@ function createConfigCoreLoader(options) {
3354
4401
  };
3355
4402
  }
3356
4403
  //#endregion
3357
- //#region ../../node_modules/.pnpm/tsdown@0.22.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.0_@tsdown+exe@0.22.0_@type_d181d85b1bafdbf27821083f8481d00c/node_modules/tsdown/dist/options-DUthngzZ.mjs
4404
+ //#region ../../node_modules/.pnpm/tsdown@0.22.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.1_@tsdown+exe@0.22.1_@type_b2f732f99208225f009f13478ba95350/node_modules/tsdown/dist/options-DWGUHu4D.mjs
3358
4405
  const __cjs_require$1 = createRequire(import.meta.url);
3359
4406
  const picomatch = __cjs_require$1("./npm_entry_picomatch.cjs");
3360
4407
  const satisfies$1 = __cjs_require$1("./npm_entry_semver_functions_satisfies.cjs");
@@ -3527,7 +4574,7 @@ async function buildSingleExe(config, bundledFile, outputFile, executable, targe
3527
4574
  await writeFile(seaConfigPath, JSON.stringify(seaConfig));
3528
4575
  debug$3$2("Wrote sea-config.json: %O -> %s", seaConfig, seaConfigPath);
3529
4576
  debug$3$2("Running: %s --build-sea %s", process$1.execPath, seaConfigPath);
3530
- await V(process$1.execPath, ["--build-sea", seaConfigPath], {
4577
+ await R$2(process$1.execPath, ["--build-sea", seaConfigPath], {
3531
4578
  nodeOptions: { stdio: [
3532
4579
  "ignore",
3533
4580
  "ignore",
@@ -3540,7 +4587,7 @@ async function buildSingleExe(config, bundledFile, outputFile, executable, targe
3540
4587
  else await fsRemove(tempDir);
3541
4588
  }
3542
4589
  if ((target?.platform || process$1.platform) === "darwin") try {
3543
- await V("codesign", [
4590
+ await R$2("codesign", [
3544
4591
  "--sign",
3545
4592
  "-",
3546
4593
  outputPath
@@ -3996,6 +5043,7 @@ async function nativeImport(id) {
3996
5043
  } else if (!isBun) url.searchParams.set("no-cache", crypto.randomUUID());
3997
5044
  const mod = await depsStore.run(deps, () => import(url.href, { with: importAttributes }).catch((error) => {
3998
5045
  if (error?.message?.includes?.("Cannot find module")) throw new Error(`Failed to load the config file. Try setting the --config-loader CLI flag to \`tsx\` or \`unrun\`.\n\n${error.message}`, { cause: error });
5046
+ if (String(error).includes("not supported in strip-only mode")) throw new Error(`Failed to load the config file because it contains TypeScript-specific syntax that Node.js cannot execute directly. Please set the --config-loader CLI flag to \`tsx\` or \`unrun\`.\n\n${error.message}`, { cause: error });
3999
5047
  if (typeof error?.stack === "string" && error.stack.includes("node:internal/modules/esm/translators")) throw new Error(`Failed to load the config file due to a known Node.js bug. Try setting the --config-loader CLI flag to \`tsx\` or \`unrun\`, or upgrading Node.js to v24.11.1 or later.\n\n${error.message}`, { cause: error });
4000
5048
  throw error;
4001
5049
  }));
@@ -4027,7 +5075,7 @@ async function resolveUserConfig(userConfig, inlineConfig, configDeps) {
4027
5075
  if (result) userConfig = mergeConfig(userConfig, result);
4028
5076
  }
4029
5077
  }
4030
- let { entry, format, plugins = [], clean = true, logLevel = "info", failOnWarn = false, customLogger, treeshake = true, platform = "node", outDir = "dist", sourcemap = false, dts, unused = false, watch = false, ignoreWatch, shims = false, publint = false, attw = false, fromVite, alias, tsconfig, report = true, target, env = {}, envFile, envPrefix = "TSDOWN_", copy, publicDir, hash = true, cwd = process$1.cwd(), name, workspace, exports = false, bundle, unbundle = typeof bundle === "boolean" ? !bundle : false, root, removeNodeProtocol, nodeProtocol, cjsDefault = true, globImport = true, css, injectStyle, fixedExtension = platform === "node", devtools = false, write = true, exe = false } = userConfig;
5078
+ let { entry, format, plugins = [], clean = true, logLevel = "info", failOnWarn = false, customLogger, treeshake = true, platform = "node", outDir = "dist", sourcemap = false, dts, unused = false, watch = false, ignoreWatch, shims = false, publint = false, attw = false, fromVite, alias, tsconfig, report = true, target, env = {}, envFile, envPrefix = "TSDOWN_", copy, publicDir, hash = true, cwd = process$1.cwd(), name, workspace, exports = false, bundle, unbundle = typeof bundle === "boolean" ? !bundle : false, root, removeNodeProtocol, nodeProtocol, cjsDefault = true, globImport = true, css, injectStyle, outExtension, outExtensions, fixedExtension = platform === "node", devtools = false, write = true, exe = false } = userConfig;
4031
5079
  const pkg = await readPackageJson(cwd);
4032
5080
  if (workspace) name ||= pkg?.name;
4033
5081
  const color = generateColor(name);
@@ -4079,6 +5127,11 @@ async function resolveUserConfig(userConfig, inlineConfig, configDeps) {
4079
5127
  } else throw new TypeError("`injectStyle` is deprecated. Cannot be used with `css.inject`");
4080
5128
  if (publicDir) if (copy) throw new TypeError("`publicDir` is deprecated. Cannot be used with `copy`");
4081
5129
  else logger.warn(`${blue`publicDir`} is deprecated. Use ${blue`copy`} instead.`);
5130
+ if (outExtension) {
5131
+ if (outExtensions) throw new TypeError("`outExtension` is deprecated. Cannot be used with `outExtensions`");
5132
+ logger.warn(`${blue`outExtension`} is deprecated. Use ${blue`outExtensions`} instead.`);
5133
+ outExtensions = outExtension;
5134
+ }
4082
5135
  envPrefix = toArray(envPrefix);
4083
5136
  if (envPrefix.includes("")) logger.warn("`envPrefix` includes an empty string; filtering is disabled. All environment variables from the env file and process.env will be injected into the build. Ensure this is intended to avoid accidental leakage of sensitive information.");
4084
5137
  const envFromProcess = filterEnv(process$1.env, envPrefix);
@@ -4148,6 +5201,7 @@ async function resolveUserConfig(userConfig, inlineConfig, configDeps) {
4148
5201
  nameLabel,
4149
5202
  nodeProtocol,
4150
5203
  outDir,
5204
+ outExtensions,
4151
5205
  pkg,
4152
5206
  platform,
4153
5207
  plugins,
@@ -4221,7 +5275,7 @@ function filterConfig(filter, configCwd, name) {
4221
5275
  return toArray(filter).some((value) => name && name === value || cwd === value);
4222
5276
  }
4223
5277
  //#endregion
4224
- //#region ../../node_modules/.pnpm/tsdown@0.22.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.0_@tsdown+exe@0.22.0_@type_d181d85b1bafdbf27821083f8481d00c/node_modules/tsdown/dist/watch-B659_4oi.mjs
5278
+ //#region ../../node_modules/.pnpm/tsdown@0.22.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.1_@tsdown+exe@0.22.1_@type_b2f732f99208225f009f13478ba95350/node_modules/tsdown/dist/watch-C3ocHLCt.mjs
4225
5279
  async function copy(options) {
4226
5280
  if (!options.copy) return;
4227
5281
  const resolved = await resolveCopyEntries(options);
@@ -4601,8 +5655,8 @@ var Hookable = class {
4601
5655
  }
4602
5656
  };
4603
5657
  //#endregion
4604
- //#region ../../node_modules/.pnpm/tsdown@0.22.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.0_@tsdown+exe@0.22.0_@type_d181d85b1bafdbf27821083f8481d00c/node_modules/tsdown/dist/build-5FURNVr0.mjs
4605
- var build_5FURNVr0_exports = /* @__PURE__ */ __exportAll$1({
5658
+ //#region ../../node_modules/.pnpm/tsdown@0.22.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.1_@tsdown+exe@0.22.1_@type_b2f732f99208225f009f13478ba95350/node_modules/tsdown/dist/build-BZshaq8i.mjs
5659
+ var build_BZshaq8i_exports = /* @__PURE__ */ __exportAll$1({
4606
5660
  n: () => buildWithConfigs,
4607
5661
  r: () => build_exports,
4608
5662
  t: () => build$1
@@ -4735,7 +5789,7 @@ function executeOnSuccess(config) {
4735
5789
  if (!config.onSuccess) return;
4736
5790
  const ab = new AbortController();
4737
5791
  if (typeof config.onSuccess === "string") {
4738
- const p = H(config.onSuccess, [], { nodeOptions: {
5792
+ const p = z$1(config.onSuccess, [], { nodeOptions: {
4739
5793
  shell: true,
4740
5794
  stdio: "inherit",
4741
5795
  cwd: config.cwd
@@ -4909,13 +5963,14 @@ async function bundleDone(bundleByPkg, bundle) {
4909
5963
  }
4910
5964
  } catch (error) {
4911
5965
  configs[0].logger.error("Pack failed:", error);
5966
+ debug$1("Pack failed for %s: %O", pkg.packageJsonPath, error);
4912
5967
  }
4913
5968
  ctx.resolve();
4914
5969
  }
4915
5970
  async function packTarball(packageJsonPath) {
4916
5971
  const pkgDir = path.dirname(packageJsonPath);
4917
5972
  const destination = await mkdtemp(path.join(tmpdir(), "tsdown-pack-"));
4918
- const { detect } = await import("./detect-DN3DXXYt-8gmDjZqp.js");
5973
+ const { detect } = await import("./detect-B97OSl92-CgjrIbmD.js");
4919
5974
  try {
4920
5975
  const detected = await detect({ cwd: pkgDir });
4921
5976
  debug$1("Detected package manager: %o", detected);
@@ -4986,7 +6041,7 @@ async function pack(dir, pm, destination, ignoreScripts) {
4986
6041
  args.push("--ignore-scripts");
4987
6042
  break;
4988
6043
  }
4989
- const output = await V(command, args, { nodeOptions: { cwd: dir } });
6044
+ const output = await R$2(command, args, { nodeOptions: { cwd: dir } });
4990
6045
  const tarballFile = await readdir(destination).then((files) => files.find((file) => file.endsWith(".tgz")));
4991
6046
  if (!tarballFile) throw new Error(`Failed to find packed tarball file in ${destination}. Command output:\n${JSON.stringify(output, null, 2)}`);
4992
6047
  return path.join(destination, tarballFile);
@@ -5050,12 +6105,12 @@ async function getBuildOptions(config, format, configDeps, bundle, cjsDts = fals
5050
6105
  return rolldownConfig;
5051
6106
  }
5052
6107
  async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, isDualFormat) {
5053
- const { alias, checks: { legacyCjs, ...checks } = {}, cjsDefault, cwd, deps: { neverBundle }, devtools, dts, entry, env, globImport, loader, logger, nameLabel, nodeProtocol, platform, plugins: userPlugins, report, shims, target, treeshake, tsconfig, unused, watch } = config;
6108
+ const { alias, checks: { legacyCjs, ...checks } = {}, cjsDefault, cwd, deps, devtools, dts, entry, env, globImport, loader, logger, nameLabel, nodeProtocol, platform, plugins: userPlugins, report, shims, target, treeshake, tsconfig, unbundle, unused, watch } = config;
5054
6109
  const plugins = [];
5055
6110
  if (nodeProtocol) plugins.push(NodeProtocolPlugin(nodeProtocol));
5056
6111
  if (config.pkg || config.deps.skipNodeModulesBundle) plugins.push(DepsPlugin(config, bundle));
5057
6112
  if (dts) {
5058
- const { dts: dtsPlugin } = await import("./dist-DTzJRoOQ.js");
6113
+ const { dts: dtsPlugin } = await import("./dist-BHLOKn-2.js");
5059
6114
  const { cjsReexport: _, ...dtsPluginOptions } = dts;
5060
6115
  const options = {
5061
6116
  tsconfig,
@@ -5091,7 +6146,7 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
5091
6146
  if (watch) plugins.push(WatchPlugin(configDeps, bundle));
5092
6147
  if (!cjsDts) plugins.push(userPlugins);
5093
6148
  if (cssPostPlugins) plugins.push(...cssPostPlugins);
5094
- const define = {
6149
+ let define = {
5095
6150
  ...config.define,
5096
6151
  ...Object.keys(env).reduce((acc, key) => {
5097
6152
  const value = JSON.stringify(env[key]);
@@ -5100,11 +6155,29 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
5100
6155
  return acc;
5101
6156
  }, Object.create(null))
5102
6157
  };
5103
- const inject = shims && !cjsDts ? getShimsInject(format, platform) : void 0;
6158
+ let inject;
6159
+ if (shims && !cjsDts) if (unbundle) {
6160
+ define = {
6161
+ ...define,
6162
+ ...shimsDefine
6163
+ };
6164
+ plugins.push(shimsPlugin);
6165
+ } else inject = getShimsInject(format, platform);
6166
+ const dtsExternal = deps.dts.neverBundle ? functionifyExternal(deps.dts.neverBundle) : void 0;
6167
+ let external;
6168
+ if (deps.neverBundle && dtsExternal) {
6169
+ const jsExternal = functionifyExternal(deps.neverBundle);
6170
+ external = (id, importer, ...args) => {
6171
+ return ((importer ? RE_DTS.test(importer) : false) ? dtsExternal : jsExternal)(id, importer, ...args);
6172
+ };
6173
+ } else if (dtsExternal) external = (id, importer, ...args) => {
6174
+ return (importer ? RE_DTS.test(importer) : false) ? dtsExternal(id, importer, ...args) : void 0;
6175
+ };
6176
+ else external = deps.neverBundle;
5104
6177
  return await mergeUserOptions({
5105
6178
  input: entry,
5106
6179
  cwd,
5107
- external: neverBundle,
6180
+ external,
5108
6181
  resolve: { alias },
5109
6182
  tsconfig: tsconfig || void 0,
5110
6183
  treeshake,
@@ -5191,6 +6264,13 @@ function CssGuardPlugin() {
5191
6264
  }
5192
6265
  };
5193
6266
  }
6267
+ function functionifyExternal(external) {
6268
+ if (typeof external === "function") return external;
6269
+ external = toArray(external);
6270
+ return (id) => {
6271
+ return external.some((item) => item instanceof RegExp ? item.test(id) : item === id);
6272
+ };
6273
+ }
5194
6274
  function shortcuts(restart) {
5195
6275
  let actionRunning = false;
5196
6276
  async function onInput(input) {
@@ -5407,4 +6487,4 @@ async function buildSingle(config, configDeps, isDualFormat, clean, restart, don
5407
6487
  }
5408
6488
  }
5409
6489
  //#endregion
5410
- export { resolveUserConfig as a, mergeConfig as i, buildWithConfigs as n, build_5FURNVr0_exports as r, build$1 as t };
6490
+ export { filename_dts_to as _, resolveUserConfig as a, replaceTemplateName as b, RE_CSS as c, RE_JS as d, RE_JSON as f, RE_VUE as g, RE_TS as h, mergeConfig as i, RE_DTS as l, RE_ROLLDOWN_RUNTIME as m, buildWithConfigs as n, at as o, RE_NODE_MODULES$1 as p, build_BZshaq8i_exports as r, ee as s, build$1 as t, RE_DTS_MAP as u, filename_js_to_dts as v, resolveTemplateFn as x, filename_to_dts as y };