@voidzero-dev/vite-plus-core 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +7 -115
- package/dist/rolldown/cli.mjs +11 -8
- package/dist/rolldown/config.d.mts +15 -2
- package/dist/rolldown/config.mjs +2 -2
- package/dist/rolldown/experimental-index.d.mts +4 -4
- package/dist/rolldown/experimental-index.mjs +8 -8
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/index.d.mts +3 -3
- package/dist/rolldown/index.mjs +10 -4
- package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
- package/dist/rolldown/parallel-plugin.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.mjs +2 -2
- package/dist/rolldown/plugins-index.d.mts +3 -3
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-B1q9aYT-.d.mts → binding-D26QphWG.d.mts} +12 -0
- package/dist/rolldown/shared/{binding-BmkJW3Wy.mjs → binding-TuFFIE_J.mjs} +26 -26
- package/dist/rolldown/shared/{bindingify-input-options-Cmm60vfj.mjs → bindingify-input-options-CwbcQL6W.mjs} +11 -13
- package/dist/rolldown/shared/{constructors-2i1T9YcF.d.mts → constructors-BbWPse2X.d.mts} +2 -2
- package/dist/rolldown/shared/{constructors-CE6zZSUt.mjs → constructors-D_3i7dpX.mjs} +1 -1
- package/dist/rolldown/shared/{define-config-BBz954-q.d.mts → define-config-BhJ90aEv.d.mts} +79 -2
- package/dist/rolldown/shared/dist-DX3cAjHx.mjs +154 -0
- package/dist/rolldown/shared/{error-BlQ0-ek7.mjs → error-BHRSI0R7.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-CVVMWSlg.mjs → load-config-Bd7MgqCK.mjs} +19 -2
- package/dist/rolldown/shared/{logs-aMKUxRpj.mjs → logs-ZGEh6uhb.mjs} +6 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-BYkbbGqQ.mjs → normalize-string-or-regex-dnh67V_w.mjs} +2 -2
- package/dist/rolldown/shared/{parse-Dphnedsw.mjs → parse-B6_waszz.mjs} +2 -2
- package/dist/rolldown/shared/{prompt-Bgj-uEyc.mjs → prompt-pZFoa1TT.mjs} +59 -17
- package/dist/rolldown/shared/{resolve-tsconfig-CdIAR1Eb.mjs → resolve-tsconfig-DxqIJB3x.mjs} +2 -2
- package/dist/rolldown/shared/{rolldown-Bnp916iM.mjs → rolldown-CACDGVWV.mjs} +1 -1
- package/dist/rolldown/shared/{rolldown-build-Cs2iVJuw.mjs → rolldown-build-BV22mk7t.mjs} +33 -13
- package/dist/rolldown/shared/{transform-CEmFsvJW.d.mts → transform-BPrUvqEZ.d.mts} +1 -1
- package/dist/rolldown/shared/{watch-ECGr-_QS.mjs → watch-CS_JygCu.mjs} +5 -5
- package/dist/rolldown/utils-index.d.mts +3 -3
- package/dist/rolldown/utils-index.mjs +8 -6
- package/dist/tsdown/{build-B_nvJe4A-CvbtVBxy.js → build-BlM3pDGJ-C8Uovnt4.js} +166 -76
- package/dist/tsdown/{debug-DLdR-9XB-DQZ6QLC0.js → debug-B1wUEHkd-DhRzGJTf.js} +21 -6
- package/dist/tsdown/{detect-B97OSl92-BJPZyIKJ.js → detect-BNXt7gkp-DKAC9Z7n.js} +7 -2
- package/dist/tsdown/dist-Pjag7IPt.js +3206 -0
- package/dist/tsdown/fs-qxJxxoCE-B_amenYz.js +46 -0
- package/dist/tsdown/{general-Cp4NiJNK-CbyrS9q1.js → general-Cp4NiJNK-xAqmPhMP.js} +1 -1
- package/dist/tsdown/index-types.d.ts +1361 -1326
- package/dist/tsdown/index.js +7 -4
- package/dist/tsdown/internal-Bn6NGoha.js +3 -0
- package/dist/tsdown/npm_cjs_chunk_range.cjs +14 -13
- package/dist/tsdown/npm_cjs_chunk_semver.cjs +6 -6
- package/dist/tsdown/npm_entry_picomatch.cjs +44 -15
- package/dist/tsdown/npm_entry_semver_functions_coerce.cjs +2 -2
- package/dist/tsdown/npm_entry_semver_functions_satisfies.cjs +1 -1
- package/dist/tsdown/npm_entry_semver_ranges_min-version.cjs +1 -1
- package/dist/tsdown/run.js +3 -3
- package/dist/tsdown/{src-CISfE_A0.js → src-CK50m8R_.js} +5 -5
- package/dist/tsdown/target-CqeSqtms-CIvlAiuG.js +35 -0
- package/dist/tsdown/{tsc-CdZE7QwS.js → tsc-CilQvmj4.js} +15 -7
- package/dist/tsdown/{tsc-context-CX_GXdyS.js → tsc-context-BusiAGCd.js} +6 -2
- package/dist/tsdown/tsdown-css.js +74 -23
- package/dist/tsdown/tsdown-exe.js +27 -26
- package/dist/vite/client/client.mjs +4 -4
- package/dist/vite/node/chunks/build.js +194 -84
- package/dist/vite/node/chunks/dist2.js +1 -1
- package/dist/vite/node/chunks/lib.js +1 -1
- package/dist/vite/node/chunks/node.js +484 -71
- package/dist/vite/node/chunks/postcss-import.js +1 -1
- package/dist/vite/node/cli.js +3 -4
- package/dist/vite/node/index.d.ts +3 -3
- package/dist/vite/node/index.js +1 -2
- package/package.json +18 -16
- package/dist/tsdown/dist-CZtGyfn3.js +0 -200
- package/dist/tsdown/dist-CqbVlnVq.js +0 -32057
- package/dist/tsdown/internal-bfoxcI4F.js +0 -3
- package/dist/tsdown/target-CqeSqtms-FAqYuGyB.js +0 -79
- package/dist/vite/node/chunks/logger.js +0 -361
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { a as pkgExists, c as resolveRegex, d as __commonJSMin, f as __exportAll$1, i as noop, l as slash, m as __toESM, n as importWithError, o as promiseWithResolvers, r as matchPattern, s as resolveComma, t as debounce, u as toArray } from "./general-Cp4NiJNK-
|
|
2
|
-
import { a as
|
|
1
|
+
import { a as pkgExists, c as resolveRegex, d as __commonJSMin, f as __exportAll$1, i as noop, l as slash, m as __toESM, n as importWithError, o as promiseWithResolvers, r as matchPattern, s as resolveComma, t as debounce, u as toArray } from "./general-Cp4NiJNK-xAqmPhMP.js";
|
|
2
|
+
import { _ as yellow, a as createSuppressWarnings, c as globalLogger, d as bold, f as dim, g as underline, h as red, i as createLogger, l as prettyFormat, n as version, o as generateColor, p as green, r as LogLevels, s as getNameLabel, u as blue } from "./debug-B1wUEHkd-DhRzGJTf.js";
|
|
3
3
|
import { n as z$1, r as createDebug, t as R$2 } from "./main-BlTcyuFi.js";
|
|
4
|
-
import { a as
|
|
4
|
+
import { a as lowestCommonAncestor, i as fsStat, n as fsExists, o as stripExtname, r as fsRemove, t as fsCopy } from "./fs-qxJxxoCE-B_amenYz.js";
|
|
5
|
+
import { n as resolveTarget } from "./target-CqeSqtms-CIvlAiuG.js";
|
|
5
6
|
import module$1, { builtinModules, createRequire, isBuiltin } from "node:module";
|
|
6
7
|
import process$1 from "node:process";
|
|
7
8
|
import readline from "node:readline";
|
|
@@ -23,7 +24,7 @@ import { AsyncLocalStorage } from "node:async_hooks";
|
|
|
23
24
|
import { Buffer } from "node:buffer";
|
|
24
25
|
import { brotliCompress, gzip } from "node:zlib";
|
|
25
26
|
import { importGlobPlugin } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
26
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.
|
|
27
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.27.9_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_9f43f644337e3a4030148b21b794fdcf/node_modules/rolldown-plugin-dts/dist/filename-BR9JpwkC.mjs
|
|
27
28
|
const RE_JS = /\.([cm]?)jsx?$/;
|
|
28
29
|
const RE_TS = /\.([cm]?)tsx?$/;
|
|
29
30
|
const RE_DTS = /\.d\.([cm]?)ts$/;
|
|
@@ -50,7 +51,14 @@ function replaceTemplateName(template, name) {
|
|
|
50
51
|
}
|
|
51
52
|
//#endregion
|
|
52
53
|
//#region ../../node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.mjs
|
|
53
|
-
const A = (r) => r !== null && typeof r == "object"
|
|
54
|
+
const A = (r) => r !== null && typeof r == "object";
|
|
55
|
+
const a = (r, t) => Object.assign(/* @__PURE__ */ new Error(`[${r}]: ${t}`), { code: r });
|
|
56
|
+
const _$1 = "ERR_INVALID_PACKAGE_CONFIG";
|
|
57
|
+
const E = "ERR_INVALID_PACKAGE_TARGET";
|
|
58
|
+
const I$1 = "ERR_PACKAGE_PATH_NOT_EXPORTED";
|
|
59
|
+
const R$1 = /^\d+$/;
|
|
60
|
+
const O = /^(\.{1,2}|node_modules)$/i;
|
|
61
|
+
const w = /\/|\\/;
|
|
54
62
|
var h = ((r) => (r.Export = "exports", r.Import = "imports", r))(h || {});
|
|
55
63
|
const f = (r, t, e, o, c) => {
|
|
56
64
|
if (t == null) return [];
|
|
@@ -68,7 +76,9 @@ const f = (r, t, e, o, c) => {
|
|
|
68
76
|
return [];
|
|
69
77
|
}
|
|
70
78
|
throw a(E, `Invalid "${r}" target "${t}"`);
|
|
71
|
-
}
|
|
79
|
+
};
|
|
80
|
+
const s = "*";
|
|
81
|
+
const m = (r, t) => {
|
|
72
82
|
const e = r.indexOf(s), o = t.indexOf(s);
|
|
73
83
|
return e === o ? t.length > r.length : o > e;
|
|
74
84
|
};
|
|
@@ -88,7 +98,9 @@ const p = (r) => Object.keys(r).reduce((t, e) => {
|
|
|
88
98
|
const o = e === "" || e[0] !== ".";
|
|
89
99
|
if (t === void 0 || t === o) return o;
|
|
90
100
|
throw a(_$1, "\"exports\" cannot contain some keys starting with \".\" and some not");
|
|
91
|
-
}, void 0)
|
|
101
|
+
}, void 0);
|
|
102
|
+
const u = /^\w+:/;
|
|
103
|
+
const v = (r, t, e) => {
|
|
92
104
|
if (!r) throw new Error("\"exports\" is required");
|
|
93
105
|
t = t === "" ? "." : `./${t}`, (typeof r == "string" || Array.isArray(r) || A(r) && p(r)) && (r = { ".": r });
|
|
94
106
|
const [o, c] = d(r, t), n = f(h.Export, r[o], t, e, c);
|
|
@@ -111,7 +123,8 @@ const _e = i((e, n) => {
|
|
|
111
123
|
const s = `readFileSync:${n}`;
|
|
112
124
|
let t = e?.get(s);
|
|
113
125
|
return t === void 0 && (t = re.readFileSync(n, "utf8"), e?.set(s, t)), t;
|
|
114
|
-
}, "readFile")
|
|
126
|
+
}, "readFile");
|
|
127
|
+
const F = i((e, n) => {
|
|
115
128
|
const s = `tryStat:${n}`;
|
|
116
129
|
let t = e?.get(s);
|
|
117
130
|
if (t === void 0) {
|
|
@@ -123,7 +136,8 @@ const _e = i((e, n) => {
|
|
|
123
136
|
e?.set(s, t);
|
|
124
137
|
}
|
|
125
138
|
return t ?? void 0;
|
|
126
|
-
}, "tryStat")
|
|
139
|
+
}, "tryStat");
|
|
140
|
+
const R = i((e, n, s) => {
|
|
127
141
|
for (;;) {
|
|
128
142
|
const t = path.posix.join(e, n);
|
|
129
143
|
if (F(s, t)) return t;
|
|
@@ -546,10 +560,13 @@ var ae;
|
|
|
546
560
|
(function(e) {
|
|
547
561
|
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";
|
|
548
562
|
})(ae || (ae = {}));
|
|
549
|
-
const Y = i((e, n) => Ve(_e(n, e)), "readJsonc")
|
|
563
|
+
const Y = i((e, n) => Ve(_e(n, e)), "readJsonc");
|
|
564
|
+
const pe = i(() => {
|
|
550
565
|
const { findPnpApi: e } = module$1;
|
|
551
566
|
return e && e(process.cwd());
|
|
552
|
-
}, "getPnpApi")
|
|
567
|
+
}, "getPnpApi");
|
|
568
|
+
const We = "detectTypeScriptVersion:";
|
|
569
|
+
const Me = i((e, n) => {
|
|
553
570
|
const s = `${We}${e}`, t = n?.get(s);
|
|
554
571
|
if (t !== void 0) return t ?? void 0;
|
|
555
572
|
let o;
|
|
@@ -564,7 +581,10 @@ const Y = i((e, n) => Ve(_e(n, e)), "readJsonc"), pe = i(() => {
|
|
|
564
581
|
typeof g?.version == "string" && (l = g.version);
|
|
565
582
|
} catch {}
|
|
566
583
|
return n?.set(s, l ?? null), l;
|
|
567
|
-
}, "detectTypeScriptVersion")
|
|
584
|
+
}, "detectTypeScriptVersion");
|
|
585
|
+
const I = "package.json";
|
|
586
|
+
const M = "tsconfig.json";
|
|
587
|
+
const Je = i((e, n, s) => {
|
|
568
588
|
const t = module$1.createRequire(path.join(s, "tsconfig.json"));
|
|
569
589
|
if (e !== n) try {
|
|
570
590
|
return t.resolve(e);
|
|
@@ -575,7 +595,8 @@ const Y = i((e, n) => Ve(_e(n, e)), "readJsonc"), pe = i(() => {
|
|
|
575
595
|
try {
|
|
576
596
|
return t.resolve(`${n}/${I}`);
|
|
577
597
|
} catch {}
|
|
578
|
-
}, "resolvePackageEntryWithNode")
|
|
598
|
+
}, "resolvePackageEntryWithNode");
|
|
599
|
+
const Z = i((e, n, s, t) => {
|
|
579
600
|
const o = `resolveFromPackageJsonPath:${e}:${n}:${s}`;
|
|
580
601
|
if (t?.has(o)) return t.get(o) || !1;
|
|
581
602
|
const r = Y(e, t);
|
|
@@ -589,12 +610,14 @@ const Y = i((e, n) => Ve(_e(n, e)), "readJsonc"), pe = i(() => {
|
|
|
589
610
|
}
|
|
590
611
|
else !n && r.tsconfig && (l = r.tsconfig);
|
|
591
612
|
return l = path.join(e, "..", l), t?.set(o, l), l;
|
|
592
|
-
}, "resolveFromPackageJsonPath")
|
|
613
|
+
}, "resolveFromPackageJsonPath");
|
|
614
|
+
const ze = i((e, n, s) => {
|
|
593
615
|
const t = `resolveExtendsPath:${e}:${n}`;
|
|
594
616
|
if (s?.has(t)) return s.get(t) || void 0;
|
|
595
617
|
const o = Ge(e, n, s);
|
|
596
618
|
return s?.set(t, o || ""), o;
|
|
597
|
-
}, "resolveExtendsPath")
|
|
619
|
+
}, "resolveExtendsPath");
|
|
620
|
+
const Ge = i((e, n, s) => {
|
|
598
621
|
let t = e;
|
|
599
622
|
if (e === ".." && (t = path.join(t, M)), e[0] === "." && (t = path.resolve(n, t)), path.isAbsolute(t)) {
|
|
600
623
|
const c = F(s, t);
|
|
@@ -658,10 +681,15 @@ const Y = i((e, n) => Ve(_e(n, e)), "readJsonc"), pe = i(() => {
|
|
|
658
681
|
if (F(s, p)) return p;
|
|
659
682
|
} else if (h) return O;
|
|
660
683
|
}
|
|
661
|
-
}, "resolveExtendsPathUncached")
|
|
684
|
+
}, "resolveExtendsPathUncached");
|
|
685
|
+
const q = Symbol("implicitBaseUrl");
|
|
686
|
+
const U = "${configDir}";
|
|
687
|
+
const K = /^\.{1,2}(\/.*)?$/;
|
|
688
|
+
const J = i((e) => {
|
|
662
689
|
const n = x(e);
|
|
663
690
|
return K.test(n) ? n : `./${n}`;
|
|
664
|
-
}, "normalizeRelativePath")
|
|
691
|
+
}, "normalizeRelativePath");
|
|
692
|
+
const Qe = i((e) => {
|
|
665
693
|
const n = { ...e };
|
|
666
694
|
if (n.strict) for (const t of [
|
|
667
695
|
"noImplicitAny",
|
|
@@ -697,45 +725,61 @@ const Y = i((e, n) => Ve(_e(n, e)), "readJsonc"), pe = i(() => {
|
|
|
697
725
|
"newLine"
|
|
698
726
|
]) n[s] && (n[s] = n[s].toLowerCase());
|
|
699
727
|
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;
|
|
700
|
-
}, "normalizeCompilerOptions")
|
|
728
|
+
}, "normalizeCompilerOptions");
|
|
729
|
+
const He = i((e, n) => {
|
|
701
730
|
!n.has("target") && !Xe(e.module) && (e.target = "es3");
|
|
702
|
-
}, "applyV4Defaults")
|
|
731
|
+
}, "applyV4Defaults");
|
|
732
|
+
const Xe = i((e) => e === "node16" || e === "node18" || e === "node20" || e === "nodenext", "moduleDictatesTarget$1");
|
|
733
|
+
const Ye = i((e, n) => {
|
|
703
734
|
!n.has("target") && !Ze(e.module) && (e.target = "es5");
|
|
704
|
-
}, "applyV5Defaults")
|
|
735
|
+
}, "applyV5Defaults");
|
|
736
|
+
const Ze = i((e) => e === "node16" || e === "node18" || e === "node20" || e === "nodenext", "moduleDictatesTarget");
|
|
737
|
+
const qe = i((e, n) => {
|
|
705
738
|
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);
|
|
706
|
-
}, "applyV6Defaults")
|
|
739
|
+
}, "applyV6Defaults");
|
|
740
|
+
const Ke = [
|
|
707
741
|
[4, He],
|
|
708
742
|
[5, Ye],
|
|
709
743
|
[6, qe]
|
|
710
|
-
]
|
|
744
|
+
];
|
|
745
|
+
const Ce = i((e) => {
|
|
711
746
|
const n = /^v?(\d+)/.exec(e);
|
|
712
747
|
return n ? Number(n[1]) : void 0;
|
|
713
|
-
}, "parseMajor")
|
|
748
|
+
}, "parseMajor");
|
|
749
|
+
const et = i((e, n) => {
|
|
714
750
|
const s = Ce(n);
|
|
715
751
|
if (s === void 0) return;
|
|
716
752
|
const t = new Set(Object.keys(e));
|
|
717
753
|
for (const [o, r] of Ke) o <= s && r(e, t);
|
|
718
|
-
}, "applyVersionDefaults")
|
|
754
|
+
}, "applyVersionDefaults");
|
|
755
|
+
const C = i((e, n) => J(path.relative(e, n)), "pathRelative");
|
|
756
|
+
const me = [
|
|
719
757
|
"files",
|
|
720
758
|
"include",
|
|
721
759
|
"exclude"
|
|
722
|
-
]
|
|
760
|
+
];
|
|
761
|
+
const ge = i((e, n, s) => {
|
|
723
762
|
const t = path.join(n, s);
|
|
724
763
|
return x(path.relative(e, t)) || "./";
|
|
725
|
-
}, "resolveAndRelativize")
|
|
764
|
+
}, "resolveAndRelativize");
|
|
765
|
+
const tt = i((e, n, s) => {
|
|
726
766
|
const t = path.relative(e, n);
|
|
727
767
|
if (!t) return s;
|
|
728
768
|
return x(`${t}/${s.startsWith("./") ? s.slice(2) : s}`);
|
|
729
|
-
}, "prefixPattern")
|
|
769
|
+
}, "prefixPattern");
|
|
770
|
+
const de = ["outDir", "declarationDir"];
|
|
771
|
+
const z = i((e, n) => {
|
|
730
772
|
if (e.startsWith(U)) return x(path.join(n, e.slice(12)));
|
|
731
|
-
}, "interpolateConfigDir")
|
|
773
|
+
}, "interpolateConfigDir");
|
|
774
|
+
const nt = [
|
|
732
775
|
"outDir",
|
|
733
776
|
"declarationDir",
|
|
734
777
|
"outFile",
|
|
735
778
|
"rootDir",
|
|
736
779
|
"baseUrl",
|
|
737
780
|
"tsBuildInfoFile"
|
|
738
|
-
]
|
|
781
|
+
];
|
|
782
|
+
const ke = i((e, n = {}) => {
|
|
739
783
|
if (e.length === 0) throw new Error("Chain must not be empty");
|
|
740
784
|
const { typescriptVersion: s } = n, t = new Map(e.map((u) => [u.path, u])), o = /* @__PURE__ */ new Map(), r = i((u) => {
|
|
741
785
|
const A = o.get(u);
|
|
@@ -849,7 +893,8 @@ const Y = i((e, n) => Ve(_e(n, e)), "readJsonc"), pe = i(() => {
|
|
|
849
893
|
config: k,
|
|
850
894
|
sources: e.map((u) => u.path)
|
|
851
895
|
};
|
|
852
|
-
}, "resolveExtendsChain")
|
|
896
|
+
}, "resolveExtendsChain");
|
|
897
|
+
const we = i((e, n = {}) => {
|
|
853
898
|
const { cache: s = /* @__PURE__ */ new Map() } = n, t = path.resolve(e), o = [], r = /* @__PURE__ */ new Set(), l = i((g, m) => {
|
|
854
899
|
const k = x(g);
|
|
855
900
|
if (r.has(k)) return;
|
|
@@ -883,12 +928,14 @@ const Y = i((e, n) => Ve(_e(n, e)), "readJsonc"), pe = i(() => {
|
|
|
883
928
|
});
|
|
884
929
|
}, "collect");
|
|
885
930
|
return l(t, /* @__PURE__ */ new Set()), o;
|
|
886
|
-
}, "getExtendsChain")
|
|
931
|
+
}, "getExtendsChain");
|
|
932
|
+
const ee = i((e, n = {}) => {
|
|
887
933
|
const { cache: s = /* @__PURE__ */ new Map(), typescriptVersion: t = "auto" } = n, o = we(e, { cache: s });
|
|
888
934
|
let r;
|
|
889
935
|
return t === "auto" ? r = Me(path.dirname(o[0].path), s) : t !== !1 && (r = t), ke(o, { typescriptVersion: r });
|
|
890
936
|
}, "readTsconfig");
|
|
891
|
-
var st = Object.defineProperty
|
|
937
|
+
var st = Object.defineProperty;
|
|
938
|
+
var G = i((e, n) => st(e, "name", {
|
|
892
939
|
value: n,
|
|
893
940
|
configurable: !0
|
|
894
941
|
}), "s");
|
|
@@ -1057,8 +1104,12 @@ i((e, n) => {
|
|
|
1057
1104
|
return m.substitutions.map((u) => x(u.replace("*", w)));
|
|
1058
1105
|
}, "resolvePathAlias");
|
|
1059
1106
|
//#endregion
|
|
1060
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
1107
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.7_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.7_@tsdown+exe@0.22.7_@type_53c241a653f2227a5df8ba2949047afe/node_modules/tsdown/dist/format-V8jMDi-4.mjs
|
|
1061
1108
|
const shimFile = path.resolve(import.meta.dirname, "..", "esm-shims.js");
|
|
1109
|
+
const shimsInject = {
|
|
1110
|
+
__dirname: [shimFile, "__dirname"],
|
|
1111
|
+
__filename: [shimFile, "__filename"]
|
|
1112
|
+
};
|
|
1062
1113
|
const shimsDefine = {
|
|
1063
1114
|
__dirname: "__TSDOWN_SHIM_DIRNAME__",
|
|
1064
1115
|
__filename: "__TSDOWN_SHIM_FILENAME__"
|
|
@@ -1073,11 +1124,13 @@ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPat
|
|
|
1073
1124
|
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
1074
1125
|
`
|
|
1075
1126
|
};
|
|
1076
|
-
function
|
|
1077
|
-
if (format
|
|
1078
|
-
|
|
1079
|
-
|
|
1127
|
+
function getShims(config) {
|
|
1128
|
+
if (config.format !== "es" || config.platform !== "node") return {};
|
|
1129
|
+
if (config.unbundle) return {
|
|
1130
|
+
define: shimsDefine,
|
|
1131
|
+
plugin: shimsPlugin
|
|
1080
1132
|
};
|
|
1133
|
+
return { inject: shimsInject };
|
|
1081
1134
|
}
|
|
1082
1135
|
const debug$7 = createDebug("tsdown:deps");
|
|
1083
1136
|
function resolveDepsConfig(config, logger) {
|
|
@@ -1305,7 +1358,7 @@ function createDefu(merger) {
|
|
|
1305
1358
|
return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
|
|
1306
1359
|
}
|
|
1307
1360
|
//#endregion
|
|
1308
|
-
//#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.
|
|
1361
|
+
//#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.5/node_modules/fdir/dist/index.mjs
|
|
1309
1362
|
var __require$1 = /* @__PURE__ */ createRequire$1(import.meta.url);
|
|
1310
1363
|
function cleanPath(path) {
|
|
1311
1364
|
let normalized = normalize$1(path);
|
|
@@ -1813,7 +1866,7 @@ var Builder = class {
|
|
|
1813
1866
|
}
|
|
1814
1867
|
};
|
|
1815
1868
|
//#endregion
|
|
1816
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
1869
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/constants.js
|
|
1817
1870
|
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1818
1871
|
const WIN_SLASH = "\\\\/";
|
|
1819
1872
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
@@ -1982,7 +2035,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1982
2035
|
};
|
|
1983
2036
|
}));
|
|
1984
2037
|
//#endregion
|
|
1985
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
2038
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/utils.js
|
|
1986
2039
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1987
2040
|
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
|
|
1988
2041
|
exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
@@ -2030,7 +2083,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2030
2083
|
};
|
|
2031
2084
|
}));
|
|
2032
2085
|
//#endregion
|
|
2033
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
2086
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/scan.js
|
|
2034
2087
|
var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2035
2088
|
const utils = require_utils();
|
|
2036
2089
|
const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants();
|
|
@@ -2317,7 +2370,7 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2317
2370
|
module.exports = scan;
|
|
2318
2371
|
}));
|
|
2319
2372
|
//#endregion
|
|
2320
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
2373
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/parse.js
|
|
2321
2374
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2322
2375
|
const constants = require_constants();
|
|
2323
2376
|
const utils = require_utils();
|
|
@@ -2472,7 +2525,10 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2472
2525
|
}
|
|
2473
2526
|
}
|
|
2474
2527
|
};
|
|
2475
|
-
const
|
|
2528
|
+
const buildCharClassStar = (chars) => {
|
|
2529
|
+
return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`;
|
|
2530
|
+
};
|
|
2531
|
+
const getStarExtglobSequenceChars = (pattern) => {
|
|
2476
2532
|
let index = 0;
|
|
2477
2533
|
const chars = [];
|
|
2478
2534
|
while (index < pattern.length) {
|
|
@@ -2486,7 +2542,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2486
2542
|
index += match.end + 1;
|
|
2487
2543
|
}
|
|
2488
2544
|
if (chars.length < 1) return;
|
|
2489
|
-
return
|
|
2545
|
+
return chars;
|
|
2490
2546
|
};
|
|
2491
2547
|
const repeatedExtglobRecursion = (pattern) => {
|
|
2492
2548
|
let depth = 0;
|
|
@@ -2506,14 +2562,28 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2506
2562
|
if (branches.length > 1) {
|
|
2507
2563
|
if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return { risky: true };
|
|
2508
2564
|
}
|
|
2565
|
+
const safeChars = [];
|
|
2566
|
+
let sawStarSequence = false;
|
|
2567
|
+
let combinable = true;
|
|
2509
2568
|
for (const branch of branches) {
|
|
2510
|
-
const
|
|
2511
|
-
if (
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2569
|
+
const chars = getStarExtglobSequenceChars(branch);
|
|
2570
|
+
if (chars) {
|
|
2571
|
+
sawStarSequence = true;
|
|
2572
|
+
safeChars.push(...chars);
|
|
2573
|
+
continue;
|
|
2574
|
+
}
|
|
2575
|
+
const literal = normalizeSimpleBranch(branch);
|
|
2576
|
+
if (literal && literal.length === 1) {
|
|
2577
|
+
safeChars.push(literal);
|
|
2578
|
+
continue;
|
|
2579
|
+
}
|
|
2580
|
+
combinable = false;
|
|
2515
2581
|
if (repeatedExtglobRecursion(branch) > max) return { risky: true };
|
|
2516
2582
|
}
|
|
2583
|
+
if (sawStarSequence) return combinable ? {
|
|
2584
|
+
risky: true,
|
|
2585
|
+
safeOutput: buildCharClassStar([...new Set(safeChars)])
|
|
2586
|
+
} : { risky: true };
|
|
2517
2587
|
return { risky: false };
|
|
2518
2588
|
};
|
|
2519
2589
|
/**
|
|
@@ -3374,7 +3444,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3374
3444
|
module.exports = parse;
|
|
3375
3445
|
}));
|
|
3376
3446
|
//#endregion
|
|
3377
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
3447
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/picomatch.js
|
|
3378
3448
|
var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3379
3449
|
const scan = require_scan();
|
|
3380
3450
|
const parse = require_parse();
|
|
@@ -3395,6 +3465,18 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3395
3465
|
* const isMatch = picomatch('*.!(*a)');
|
|
3396
3466
|
* console.log(isMatch('a.a')); //=> false
|
|
3397
3467
|
* console.log(isMatch('a.b')); //=> true
|
|
3468
|
+
*
|
|
3469
|
+
* // For environments without `node.js`, `picomatch/posix` provides you a dependency-free matcher, without automatic OS detection.
|
|
3470
|
+
* const picomatch = require('picomatch/posix');
|
|
3471
|
+
* // the same API, defaulting to posix paths
|
|
3472
|
+
* const isMatch = picomatch('a/*');
|
|
3473
|
+
* console.log(isMatch('a\\b')); //=> false
|
|
3474
|
+
* console.log(isMatch('a/b')); //=> true
|
|
3475
|
+
*
|
|
3476
|
+
* // you can still configure the matcher function to accept windows paths
|
|
3477
|
+
* const isMatch = picomatch('a/*', { options: windows });
|
|
3478
|
+
* console.log(isMatch('a\\b')); //=> true
|
|
3479
|
+
* console.log(isMatch('a/b')); //=> true
|
|
3398
3480
|
* ```
|
|
3399
3481
|
* @name picomatch
|
|
3400
3482
|
* @param {String|Array} `globs` One or more glob patterns.
|
|
@@ -3513,8 +3595,8 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3513
3595
|
* @return {Boolean}
|
|
3514
3596
|
* @api public
|
|
3515
3597
|
*/
|
|
3516
|
-
picomatch.matchBase = (input, glob, options) => {
|
|
3517
|
-
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input));
|
|
3598
|
+
picomatch.matchBase = (input, glob, options, posix = options && options.windows) => {
|
|
3599
|
+
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input, { windows: posix }));
|
|
3518
3600
|
};
|
|
3519
3601
|
/**
|
|
3520
3602
|
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
|
@@ -4335,7 +4417,7 @@ function createConfigCoreLoader(options) {
|
|
|
4335
4417
|
};
|
|
4336
4418
|
}
|
|
4337
4419
|
//#endregion
|
|
4338
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
4420
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.7_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.7_@tsdown+exe@0.22.7_@type_53c241a653f2227a5df8ba2949047afe/node_modules/tsdown/dist/options-B1sH8aYv.mjs
|
|
4339
4421
|
const __cjs_require$1 = createRequire(import.meta.url);
|
|
4340
4422
|
const picomatch = __cjs_require$1("./npm_entry_picomatch.cjs");
|
|
4341
4423
|
const satisfies$1 = __cjs_require$1("./npm_entry_semver_functions_satisfies.cjs");
|
|
@@ -5011,7 +5093,7 @@ async function resolveUserConfig(userConfig, inlineConfig, configDeps) {
|
|
|
5011
5093
|
if (result) userConfig = mergeConfig(userConfig, result);
|
|
5012
5094
|
}
|
|
5013
5095
|
}
|
|
5014
|
-
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;
|
|
5096
|
+
let { entry, format, plugins = [], clean = true, logLevel = "info", failOnWarn = false, suppressWarnings, 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;
|
|
5015
5097
|
const pkg = await readPackageJson(cwd);
|
|
5016
5098
|
if (workspace) name ||= pkg?.name;
|
|
5017
5099
|
const color = generateColor(name);
|
|
@@ -5022,7 +5104,8 @@ async function resolveUserConfig(userConfig, inlineConfig, configDeps) {
|
|
|
5022
5104
|
}
|
|
5023
5105
|
const logger = createLogger(logLevel, {
|
|
5024
5106
|
customLogger,
|
|
5025
|
-
failOnWarn: resolveFeatureOption(failOnWarn, true)
|
|
5107
|
+
failOnWarn: resolveFeatureOption(failOnWarn, true),
|
|
5108
|
+
suppressWarnings
|
|
5026
5109
|
});
|
|
5027
5110
|
if (typeof bundle === "boolean") logger.warn("`bundle` option is deprecated. Use `unbundle` instead.");
|
|
5028
5111
|
if (removeNodeProtocol) {
|
|
@@ -5211,7 +5294,7 @@ function filterConfig(filter, configCwd, name) {
|
|
|
5211
5294
|
return toArray(filter).some((value) => name && name === value || cwd === value);
|
|
5212
5295
|
}
|
|
5213
5296
|
//#endregion
|
|
5214
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
5297
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.7_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.7_@tsdown+exe@0.22.7_@type_53c241a653f2227a5df8ba2949047afe/node_modules/tsdown/dist/watch-C4J7vt20.mjs
|
|
5215
5298
|
async function copy(options) {
|
|
5216
5299
|
if (!options.copy) return;
|
|
5217
5300
|
const resolved = await resolveCopyEntries(options);
|
|
@@ -5591,8 +5674,8 @@ var Hookable = class {
|
|
|
5591
5674
|
}
|
|
5592
5675
|
};
|
|
5593
5676
|
//#endregion
|
|
5594
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
5595
|
-
var
|
|
5677
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.7_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.7_@tsdown+exe@0.22.7_@type_53c241a653f2227a5df8ba2949047afe/node_modules/tsdown/dist/build-BlM3pDGJ.mjs
|
|
5678
|
+
var build_BlM3pDGJ_exports = /* @__PURE__ */ __exportAll$1({
|
|
5596
5679
|
n: () => buildWithConfigs,
|
|
5597
5680
|
r: () => build_exports,
|
|
5598
5681
|
t: () => build$1
|
|
@@ -5680,7 +5763,7 @@ async function resolveConfig(inlineConfig) {
|
|
|
5680
5763
|
function warnLegacyCJS(config) {
|
|
5681
5764
|
if (config.exe || !config.target || !(config.checks?.legacyCjs ?? true) || !config.format.includes("cjs")) return;
|
|
5682
5765
|
if (config.target.some((t) => {
|
|
5683
|
-
const version = coerce(t.split("node")[1]);
|
|
5766
|
+
const version = coerce(t.split("node", 2)[1]);
|
|
5684
5767
|
return version && satisfies(version, "^20.19.0 || >=22.12.0");
|
|
5685
5768
|
})) config.logger.warnOnce("We recommend using the ESM format instead of CommonJS.\nThe ESM format is compatible with modern platforms and runtimes, and most new libraries are now distributed only in ESM format.\nLearn more at https://nodejs.org/en/learn/modules/publishing-a-package#how-did-we-get-here");
|
|
5686
5769
|
}
|
|
@@ -5906,14 +5989,14 @@ async function bundleDone(bundleByPkg, bundle) {
|
|
|
5906
5989
|
async function packTarball(packageJsonPath) {
|
|
5907
5990
|
const pkgDir = path.dirname(packageJsonPath);
|
|
5908
5991
|
const destination = await mkdtemp(path.join(tmpdir(), "tsdown-pack-"));
|
|
5909
|
-
const { detect } = await import("./detect-
|
|
5992
|
+
const { detect } = await import("./detect-BNXt7gkp-DKAC9Z7n.js");
|
|
5910
5993
|
try {
|
|
5911
5994
|
const detected = await detect({ cwd: pkgDir });
|
|
5912
5995
|
debug$1("Detected package manager: %o", detected);
|
|
5913
5996
|
if (detected?.name === "deno") throw new Error(`Cannot pack tarball for Deno projects at ${pkgDir}`);
|
|
5914
5997
|
const tarballPath = await pack(pkgDir, detected, destination, true);
|
|
5915
5998
|
debug$1("Packed tarball at %s", tarballPath);
|
|
5916
|
-
return readFile(tarballPath);
|
|
5999
|
+
return await readFile(tarballPath);
|
|
5917
6000
|
} finally {
|
|
5918
6001
|
if (debug$1.enabled) debug$1("Preserving pack directory for debugging: %s", destination);
|
|
5919
6002
|
else await fsRemove(destination);
|
|
@@ -6015,15 +6098,15 @@ function createChunkFilename(basename, jsExtension, dtsExtension) {
|
|
|
6015
6098
|
function resolveChunkAddon(chunkAddon, format) {
|
|
6016
6099
|
if (!chunkAddon) return;
|
|
6017
6100
|
return (chunk) => {
|
|
6018
|
-
|
|
6101
|
+
const resolved = typeof chunkAddon === "function" ? chunkAddon({
|
|
6019
6102
|
format,
|
|
6020
6103
|
fileName: chunk.fileName
|
|
6021
|
-
});
|
|
6022
|
-
if (typeof
|
|
6104
|
+
}) : chunkAddon;
|
|
6105
|
+
if (typeof resolved === "string") return resolved;
|
|
6023
6106
|
switch (true) {
|
|
6024
|
-
case RE_JS.test(chunk.fileName): return
|
|
6025
|
-
case RE_CSS.test(chunk.fileName): return
|
|
6026
|
-
case RE_DTS.test(chunk.fileName): return
|
|
6107
|
+
case RE_JS.test(chunk.fileName): return resolved?.js || "";
|
|
6108
|
+
case RE_CSS.test(chunk.fileName): return resolved?.css || "";
|
|
6109
|
+
case RE_DTS.test(chunk.fileName): return resolved?.dts || "";
|
|
6027
6110
|
default: return "";
|
|
6028
6111
|
}
|
|
6029
6112
|
};
|
|
@@ -6041,15 +6124,18 @@ async function getBuildOptions(config, format, configDeps, bundle, cjsDts = fals
|
|
|
6041
6124
|
return rolldownConfig;
|
|
6042
6125
|
}
|
|
6043
6126
|
async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, isDualFormat) {
|
|
6044
|
-
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,
|
|
6127
|
+
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, unused, watch } = config;
|
|
6128
|
+
const loggerLevelIndex = LogLevels[logger.level];
|
|
6129
|
+
const isSuppressed = createSuppressWarnings(logger.options?.suppressWarnings);
|
|
6045
6130
|
const plugins = [];
|
|
6046
6131
|
if (nodeProtocol) plugins.push(NodeProtocolPlugin(nodeProtocol));
|
|
6047
6132
|
if (config.pkg || config.deps.skipNodeModulesBundle) plugins.push(DepsPlugin(config, bundle));
|
|
6048
6133
|
if (dts) {
|
|
6049
|
-
const { dts: dtsPlugin } = await import("./dist-
|
|
6134
|
+
const { dts: dtsPlugin } = await import("./dist-Pjag7IPt.js");
|
|
6050
6135
|
const { cjsReexport: _, ...dtsPluginOptions } = dts;
|
|
6051
6136
|
const options = {
|
|
6052
6137
|
tsconfig,
|
|
6138
|
+
logger,
|
|
6053
6139
|
...dtsPluginOptions
|
|
6054
6140
|
};
|
|
6055
6141
|
if (format === "es") plugins.push(dtsPlugin(options));
|
|
@@ -6078,7 +6164,7 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
|
|
|
6078
6164
|
plugins.push(ShebangPlugin(logger, cwd, nameLabel, isDualFormat));
|
|
6079
6165
|
if (globImport) plugins.push(importGlobPlugin({ root: cwd }));
|
|
6080
6166
|
}
|
|
6081
|
-
if (report &&
|
|
6167
|
+
if (report && loggerLevelIndex >= 3) plugins.push(ReportPlugin(config, cjsDts, isDualFormat));
|
|
6082
6168
|
if (watch) plugins.push(WatchPlugin(configDeps, bundle));
|
|
6083
6169
|
if (!cjsDts) plugins.push(userPlugins);
|
|
6084
6170
|
if (cssPostPlugins) plugins.push(...cssPostPlugins);
|
|
@@ -6092,13 +6178,15 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
|
|
|
6092
6178
|
}, Object.create(null))
|
|
6093
6179
|
};
|
|
6094
6180
|
let inject;
|
|
6095
|
-
if (shims && !cjsDts)
|
|
6181
|
+
if (shims && !cjsDts) {
|
|
6182
|
+
const shims = getShims(config);
|
|
6183
|
+
inject = shims.inject;
|
|
6096
6184
|
define = {
|
|
6097
6185
|
...define,
|
|
6098
|
-
...
|
|
6186
|
+
...shims.define
|
|
6099
6187
|
};
|
|
6100
|
-
plugins.push(
|
|
6101
|
-
}
|
|
6188
|
+
if (shims.plugin) plugins.push(shims.plugin);
|
|
6189
|
+
}
|
|
6102
6190
|
const dtsExternal = deps.dts.neverBundle ? functionifyExternal(deps.dts.neverBundle) : void 0;
|
|
6103
6191
|
let external;
|
|
6104
6192
|
if (deps.neverBundle && dtsExternal) {
|
|
@@ -6110,6 +6198,7 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
|
|
|
6110
6198
|
return (importer ? RE_DTS.test(importer) : false) ? dtsExternal(id, importer, ...args) : void 0;
|
|
6111
6199
|
};
|
|
6112
6200
|
else external = deps.neverBundle;
|
|
6201
|
+
const logLevel = logger.options?.failOnWarn && loggerLevelIndex < 2 ? "warn" : logger.level === "error" ? "silent" : logger.level;
|
|
6113
6202
|
return await mergeUserOptions({
|
|
6114
6203
|
input: entry,
|
|
6115
6204
|
cwd,
|
|
@@ -6128,9 +6217,10 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
|
|
|
6128
6217
|
".node": "copy",
|
|
6129
6218
|
...loader
|
|
6130
6219
|
},
|
|
6131
|
-
logLevel
|
|
6220
|
+
logLevel,
|
|
6132
6221
|
onLog(level, log, defaultHandler) {
|
|
6133
6222
|
if (cjsDefault && log.code === "MIXED_EXPORT") return;
|
|
6223
|
+
if (level === "warn" && isSuppressed(log.message)) return;
|
|
6134
6224
|
if (logger.options?.failOnWarn && level === "warn" && log.code !== "PLUGIN_TIMINGS") defaultHandler("error", log);
|
|
6135
6225
|
defaultHandler(level, log);
|
|
6136
6226
|
},
|
|
@@ -6423,4 +6513,4 @@ async function buildSingle(config, configDeps, isDualFormat, clean, restart, don
|
|
|
6423
6513
|
}
|
|
6424
6514
|
}
|
|
6425
6515
|
//#endregion
|
|
6426
|
-
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,
|
|
6516
|
+
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_BlM3pDGJ_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 };
|