@voidzero-dev/vite-plus-core 0.2.5 → 0.2.7
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 +31 -7
- package/dist/rolldown/cli.d.mts +1 -1
- package/dist/rolldown/cli.mjs +6 -6
- package/dist/rolldown/config.d.mts +16 -17
- package/dist/rolldown/config.mjs +2 -2
- package/dist/rolldown/experimental-index.d.mts +164 -155
- package/dist/rolldown/experimental-index.mjs +23 -14
- package/dist/rolldown/experimental-runtime-types.d.ts +111 -41
- package/dist/rolldown/filter-index.d.mts +6 -5
- package/dist/rolldown/get-log-filter.d.mts +2 -2
- package/dist/rolldown/index.d.mts +3 -3
- package/dist/rolldown/index.mjs +4 -4
- package/dist/rolldown/parallel-plugin-worker.d.mts +1 -1
- package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
- package/dist/rolldown/parallel-plugin.d.mts +3 -4
- package/dist/rolldown/parse-ast-index.d.mts +19 -20
- package/dist/rolldown/parse-ast-index.mjs +1 -1
- package/dist/rolldown/plugins-index.d.mts +27 -28
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-D26QphWG.d.mts → binding-Dbbi0RbO.d.mts} +37 -25
- package/dist/rolldown/shared/{binding-TuFFIE_J.mjs → binding-Dby9rwGk.mjs} +26 -26
- package/dist/rolldown/shared/{bindingify-input-options-CwbcQL6W.mjs → bindingify-input-options-DVQ4K-zY.mjs} +5 -5
- package/dist/rolldown/shared/{constructors-BbWPse2X.d.mts → constructors-CSWbNgBZ.d.mts} +9 -10
- package/dist/rolldown/shared/{constructors-D_3i7dpX.mjs → constructors-CuGa75s-.mjs} +1 -1
- package/dist/rolldown/shared/define-config-B-IDOhDz.d.mts +4003 -0
- package/dist/rolldown/shared/{error-BHRSI0R7.mjs → error-DFGNOCle.mjs} +1 -1
- package/dist/rolldown/shared/get-log-filter-AjBknEEO.d.mts +34 -0
- package/dist/rolldown/shared/{load-config-Bd7MgqCK.mjs → load-config-R0z2olkB.mjs} +1 -1
- package/dist/rolldown/shared/{logging-BSNejiLS.d.mts → logging-xuHO4mAy.d.mts} +6 -6
- package/dist/rolldown/shared/{normalize-string-or-regex-dnh67V_w.mjs → normalize-string-or-regex-SiXbePVH.mjs} +1 -1
- package/dist/rolldown/shared/{parse-B6_waszz.mjs → parse-D5dkElpf.mjs} +2 -2
- package/dist/rolldown/shared/{resolve-tsconfig-DxqIJB3x.mjs → resolve-tsconfig-2TXRF_zr.mjs} +2 -2
- package/dist/rolldown/shared/{rolldown-CACDGVWV.mjs → rolldown-BnV7isAX.mjs} +1 -1
- package/dist/rolldown/shared/{rolldown-build-BV22mk7t.mjs → rolldown-build-BGXNOfvH.mjs} +4 -4
- package/dist/rolldown/shared/transform-Cs2bUDRH.d.mts +148 -0
- package/dist/rolldown/shared/{watch-CS_JygCu.mjs → watch-DVucf-VG.mjs} +4 -4
- package/dist/rolldown/utils-index.d.mts +29 -30
- package/dist/rolldown/utils-index.mjs +6 -8
- package/dist/tsdown/{build-BlM3pDGJ-C8Uovnt4.js → build-D_enfyvD-DX5mX46j.js} +149 -1255
- package/dist/tsdown/debug-CKcBYQLP-GQrJ--dM.js +159 -0
- package/dist/tsdown/{detect-BNXt7gkp-DKAC9Z7n.js → detect-DGhJGEqb-Cz6qOZuP.js} +7 -1
- package/dist/tsdown/{dist-Pjag7IPt.js → dist-CWolxbYK.js} +1939 -2529
- package/dist/tsdown/dist-DCMiHFrJ.js +1061 -0
- package/dist/tsdown/index-types.d.ts +740 -554
- package/dist/tsdown/index.js +4 -4
- package/dist/tsdown/internal-DAh_SWnB.js +3 -0
- package/dist/tsdown/load-tsc-BKULZsrs-Bha6Vsu1.js +18 -0
- package/dist/tsdown/{main-BlTcyuFi.js → main-DI8qthUB.js} +222 -9
- package/dist/tsdown/{resolver-DtsKFXi2-B8Z3WwZh.js → resolver-cwLsPb2o-DvUqSYux.js} +4 -3
- package/dist/tsdown/run.js +5 -5
- package/dist/tsdown/{src-CK50m8R_.js → src-CPDzmpAq.js} +5 -5
- package/dist/tsdown/target-Bab3CUeB-Di6tCARH.js +582 -0
- package/dist/tsdown/{tsc-CilQvmj4.js → tsc-BQoNcjeB.js} +49 -116
- package/dist/tsdown/tsc-context-BhMGQ9Qr.js +23 -0
- package/dist/tsdown/tsdown-css.js +11 -12
- package/dist/tsdown/tsdown-exe.js +129 -877
- package/dist/vite/client/client.mjs +5 -5
- package/dist/vite/node/chunks/build.js +19 -19
- package/dist/vite/node/chunks/moduleRunnerTransport.d.ts +25 -26
- package/dist/vite/node/chunks/node.js +73 -38
- package/dist/vite/node/chunks/postcss-import.js +10 -10
- package/dist/vite/node/index.d.ts +1282 -1283
- package/dist/vite/node/module-runner.d.ts +76 -77
- package/dist/vite/node/module-runner.js +6 -7
- package/package.json +16 -16
- package/dist/rolldown/shared/define-config-BhJ90aEv.d.mts +0 -3978
- package/dist/rolldown/shared/get-log-filter-BpNVNJ5-.d.mts +0 -35
- package/dist/rolldown/shared/transform-BPrUvqEZ.d.mts +0 -149
- package/dist/tsdown/debug-B1wUEHkd-DhRzGJTf.js +0 -265
- package/dist/tsdown/fs-qxJxxoCE-B_amenYz.js +0 -46
- package/dist/tsdown/general-Cp4NiJNK-xAqmPhMP.js +0 -97
- package/dist/tsdown/internal-Bn6NGoha.js +0 -3
- package/dist/tsdown/npm_cjs_chunk_range.cjs +0 -475
- package/dist/tsdown/npm_cjs_chunk_semver.cjs +0 -357
- package/dist/tsdown/npm_entry_semver_functions_coerce.cjs +0 -52
- package/dist/tsdown/npm_entry_semver_functions_satisfies.cjs +0 -19
- package/dist/tsdown/npm_entry_semver_ranges_min-version.cjs +0 -46
- package/dist/tsdown/target-CqeSqtms-CIvlAiuG.js +0 -35
- package/dist/tsdown/tsc-context-BusiAGCd.js +0 -27
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { a as RolldownLog } from "./logging-BSNejiLS.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/get-log-filter.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* @param filters A list of log filters to apply
|
|
6
|
-
* @returns A function that tests whether a log should be output
|
|
7
|
-
*
|
|
8
|
-
* @category Config
|
|
9
|
-
*/
|
|
10
|
-
type GetLogFilter = (filters: string[]) => (log: RolldownLog) => boolean;
|
|
11
|
-
/**
|
|
12
|
-
* A helper function to generate log filters using the same syntax as the CLI.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* import { defineConfig } from 'rolldown';
|
|
17
|
-
* import { getLogFilter } from 'rolldown/getLogFilter';
|
|
18
|
-
*
|
|
19
|
-
* const logFilter = getLogFilter(['code:FOO', 'code:BAR']);
|
|
20
|
-
*
|
|
21
|
-
* export default defineConfig({
|
|
22
|
-
* input: 'main.js',
|
|
23
|
-
* onLog(level, log, handler) {
|
|
24
|
-
* if (logFilter(log)) {
|
|
25
|
-
* handler(level, log);
|
|
26
|
-
* }
|
|
27
|
-
* }
|
|
28
|
-
* });
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* @category Config
|
|
32
|
-
*/
|
|
33
|
-
declare const getLogFilter: GetLogFilter;
|
|
34
|
-
//#endregion
|
|
35
|
-
export { getLogFilter as n, GetLogFilter as t };
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { a as RolldownLog } from "./logging-BSNejiLS.mjs";
|
|
2
|
-
import { F as MinifyResult$1, H as SourceMap, L as ParseResult$1, P as MinifyOptions$1, R as ParserOptions$1, W as TsconfigCache$1, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, v as BindingTsconfigResult } from "./binding-D26QphWG.mjs";
|
|
3
|
-
|
|
4
|
-
//#region src/utils/resolve-tsconfig.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Cache for tsconfig resolution to avoid redundant file system operations.
|
|
7
|
-
*
|
|
8
|
-
* The cache stores resolved tsconfig configurations keyed by their file paths.
|
|
9
|
-
* When transforming multiple files in the same project, tsconfig lookups are
|
|
10
|
-
* deduplicated, improving performance.
|
|
11
|
-
*
|
|
12
|
-
* @category Utilities
|
|
13
|
-
* @experimental
|
|
14
|
-
*/
|
|
15
|
-
declare class TsconfigCache extends TsconfigCache$1 {
|
|
16
|
-
constructor();
|
|
17
|
-
}
|
|
18
|
-
/** @hidden This is only expected to be used by Vite */
|
|
19
|
-
declare function resolveTsconfig(filename: string, cache?: TsconfigCache | null): BindingTsconfigResult | null;
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/utils/parse.d.ts
|
|
22
|
-
/**
|
|
23
|
-
* Result of parsing a code
|
|
24
|
-
*
|
|
25
|
-
* @category Utilities
|
|
26
|
-
*/
|
|
27
|
-
interface ParseResult extends ParseResult$1 {}
|
|
28
|
-
/**
|
|
29
|
-
* Options for parsing a code
|
|
30
|
-
*
|
|
31
|
-
* @category Utilities
|
|
32
|
-
*/
|
|
33
|
-
interface ParserOptions extends ParserOptions$1 {}
|
|
34
|
-
/**
|
|
35
|
-
* Parse JS/TS source asynchronously on a separate thread.
|
|
36
|
-
*
|
|
37
|
-
* Note that not all of the workload can happen on a separate thread.
|
|
38
|
-
* Parsing on Rust side does happen in a separate thread, but deserialization of the AST to JS objects
|
|
39
|
-
* has to happen on current thread. This synchronous deserialization work typically outweighs
|
|
40
|
-
* the asynchronous parsing by a factor of between 3 and 20.
|
|
41
|
-
*
|
|
42
|
-
* i.e. the majority of the workload cannot be parallelized by using this method.
|
|
43
|
-
*
|
|
44
|
-
* Generally {@linkcode parseSync} is preferable to use as it does not have the overhead of spawning a thread.
|
|
45
|
-
* If you need to parallelize parsing multiple files, it is recommended to use worker threads.
|
|
46
|
-
*
|
|
47
|
-
* @category Utilities
|
|
48
|
-
*/
|
|
49
|
-
declare function parse(filename: string, sourceText: string, options?: ParserOptions | null): Promise<ParseResult>;
|
|
50
|
-
/**
|
|
51
|
-
* Parse JS/TS source synchronously on current thread.
|
|
52
|
-
*
|
|
53
|
-
* This is generally preferable over {@linkcode parse} (async) as it does not have the overhead
|
|
54
|
-
* of spawning a thread, and the majority of the workload cannot be parallelized anyway
|
|
55
|
-
* (see {@linkcode parse} documentation for details).
|
|
56
|
-
*
|
|
57
|
-
* If you need to parallelize parsing multiple files, it is recommended to use worker threads
|
|
58
|
-
* with {@linkcode parseSync} rather than using {@linkcode parse}.
|
|
59
|
-
*
|
|
60
|
-
* @category Utilities
|
|
61
|
-
*/
|
|
62
|
-
declare function parseSync(filename: string, sourceText: string, options?: ParserOptions | null): ParseResult;
|
|
63
|
-
//#endregion
|
|
64
|
-
//#region src/utils/minify.d.ts
|
|
65
|
-
/**
|
|
66
|
-
* Options for minification.
|
|
67
|
-
*
|
|
68
|
-
* @category Utilities
|
|
69
|
-
*/
|
|
70
|
-
interface MinifyOptions extends MinifyOptions$1 {
|
|
71
|
-
inputMap?: SourceMap;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* The result of minification.
|
|
75
|
-
*
|
|
76
|
-
* @category Utilities
|
|
77
|
-
*/
|
|
78
|
-
interface MinifyResult extends MinifyResult$1 {}
|
|
79
|
-
/**
|
|
80
|
-
* Minify asynchronously.
|
|
81
|
-
*
|
|
82
|
-
* Note: This function can be slower than {@linkcode minifySync} due to the overhead of spawning a thread.
|
|
83
|
-
*
|
|
84
|
-
* @category Utilities
|
|
85
|
-
* @experimental
|
|
86
|
-
*/
|
|
87
|
-
declare function minify(filename: string, sourceText: string, options?: MinifyOptions | null): Promise<MinifyResult>;
|
|
88
|
-
/**
|
|
89
|
-
* Minify synchronously.
|
|
90
|
-
*
|
|
91
|
-
* @category Utilities
|
|
92
|
-
* @experimental
|
|
93
|
-
*/
|
|
94
|
-
declare function minifySync(filename: string, sourceText: string, options?: MinifyOptions | null): MinifyResult;
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region src/utils/transform.d.ts
|
|
97
|
-
/**
|
|
98
|
-
* Options for transforming a code.
|
|
99
|
-
*
|
|
100
|
-
* @category Utilities
|
|
101
|
-
*/
|
|
102
|
-
interface TransformOptions extends BindingEnhancedTransformOptions {}
|
|
103
|
-
/**
|
|
104
|
-
* Result of transforming a code.
|
|
105
|
-
*
|
|
106
|
-
* @category Utilities
|
|
107
|
-
*/
|
|
108
|
-
type TransformResult = Omit<BindingEnhancedTransformResult, "errors" | "warnings"> & {
|
|
109
|
-
errors: Error[];
|
|
110
|
-
warnings: RolldownLog[];
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* Transpile a JavaScript or TypeScript into a target ECMAScript version, asynchronously.
|
|
114
|
-
*
|
|
115
|
-
* Note: This function can be slower than `transformSync` due to the overhead of spawning a thread.
|
|
116
|
-
*
|
|
117
|
-
* @param filename The name of the file being transformed. If this is a
|
|
118
|
-
* relative path, consider setting the {@linkcode TransformOptions#cwd} option.
|
|
119
|
-
* @param sourceText The source code to transform.
|
|
120
|
-
* @param options The transform options including tsconfig and inputMap. See {@linkcode TransformOptions} for more information.
|
|
121
|
-
* @param cache Optional tsconfig cache for reusing resolved tsconfig across multiple transforms.
|
|
122
|
-
* Only used when `options.tsconfig` is `true`.
|
|
123
|
-
*
|
|
124
|
-
* @returns a promise that resolves to an object containing the transformed code,
|
|
125
|
-
* source maps, and any errors that occurred during parsing or transformation.
|
|
126
|
-
*
|
|
127
|
-
* @category Utilities
|
|
128
|
-
* @experimental
|
|
129
|
-
*/
|
|
130
|
-
declare function transform(filename: string, sourceText: string, options?: TransformOptions | null, cache?: TsconfigCache | null): Promise<TransformResult>;
|
|
131
|
-
/**
|
|
132
|
-
* Transpile a JavaScript or TypeScript into a target ECMAScript version.
|
|
133
|
-
*
|
|
134
|
-
* @param filename The name of the file being transformed. If this is a
|
|
135
|
-
* relative path, consider setting the {@linkcode TransformOptions#cwd} option.
|
|
136
|
-
* @param sourceText The source code to transform.
|
|
137
|
-
* @param options The transform options including tsconfig and inputMap. See {@linkcode TransformOptions} for more information.
|
|
138
|
-
* @param cache Optional tsconfig cache for reusing resolved tsconfig across multiple transforms.
|
|
139
|
-
* Only used when `options.tsconfig` is `true`.
|
|
140
|
-
*
|
|
141
|
-
* @returns an object containing the transformed code, source maps, and any errors
|
|
142
|
-
* that occurred during parsing or transformation.
|
|
143
|
-
*
|
|
144
|
-
* @category Utilities
|
|
145
|
-
* @experimental
|
|
146
|
-
*/
|
|
147
|
-
declare function transformSync(filename: string, sourceText: string, options?: TransformOptions | null, cache?: TsconfigCache | null): TransformResult;
|
|
148
|
-
//#endregion
|
|
149
|
-
export { MinifyOptions as a, minifySync as c, parse as d, parseSync as f, transformSync as i, ParseResult as l, resolveTsconfig as m, TransformResult as n, MinifyResult as o, TsconfigCache as p, transform as r, minify as s, TransformOptions as t, ParserOptions as u };
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
import { d as __commonJSMin, i as noop, m as __toESM, s as resolveComma, u as toArray } from "./general-Cp4NiJNK-xAqmPhMP.js";
|
|
2
|
-
import { a as namespaces, i as enable, r as createDebug } from "./main-BlTcyuFi.js";
|
|
3
|
-
import process from "node:process";
|
|
4
|
-
import readline from "node:readline";
|
|
5
|
-
const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, link, bold, dim, italic, underline, strikethrough, black, red, green, yellow, blue, magenta, cyan, white, gray, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGray, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright } = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6
|
-
let e, { defineProperty: r, getPrototypeOf: t, setPrototypeOf: n, create: o, keys: l } = Object, i = "", { round: f, max: s } = Math, u = (e) => {
|
|
7
|
-
let r = /([a-f\d]{3,6})/i.exec(e)?.[0], t = r?.length, n = "0x" + (6 ^ t ? 3 ^ t ? "0" : r[0] + r[0] + r[1] + r[1] + r[2] + r[2] : r) | 0;
|
|
8
|
-
return [
|
|
9
|
-
n >> 16,
|
|
10
|
-
n >> 8 & 255,
|
|
11
|
-
255 & n
|
|
12
|
-
];
|
|
13
|
-
}, a = (e) => {
|
|
14
|
-
if (8 > e) return 30 + e;
|
|
15
|
-
if (16 > e) return 82 + e;
|
|
16
|
-
if (e > 231) return e > 243 ? 37 : 30;
|
|
17
|
-
let r = (e -= 16) % 36, t = e / 36 | 0, n = r / 6 | 0, o = r % 6;
|
|
18
|
-
return 30 + (t > 2 | (n > 2) << 1 | (o > 2) << 2) + (s(t, n, o) > 4 ? 60 : 0);
|
|
19
|
-
}, c = {
|
|
20
|
-
open: i,
|
|
21
|
-
close: i
|
|
22
|
-
}, g = (e, { open: r = "", close: o = "", f: l }) => {
|
|
23
|
-
let f = (e.open || i) + r, s = o + (e.close || i), u = (e, ...t) => {
|
|
24
|
-
if (!e) {
|
|
25
|
-
if (!o) return r;
|
|
26
|
-
if ((e ?? i) === i) return i;
|
|
27
|
-
}
|
|
28
|
-
let n, a = l ? l(e, ...t) : e.raw ? String.raw({ raw: e }, ...t) : i + e, c = u;
|
|
29
|
-
if (a.includes("\x1B")) for (; c = c.p;) {
|
|
30
|
-
let { t: e, o: r } = c, t = r.length, o = i, l = 0;
|
|
31
|
-
if (t) for (; ~(n = a.indexOf(r, l)); l = n + t) o += a.slice(l, n) + e;
|
|
32
|
-
a = o + a.slice(l);
|
|
33
|
-
}
|
|
34
|
-
return f + (a.includes("\n") ? a.replace(/(\r?\n)/g, s + "$1" + f) : a) + s;
|
|
35
|
-
};
|
|
36
|
-
return n(u, t(e)).p = {
|
|
37
|
-
t: r,
|
|
38
|
-
o,
|
|
39
|
-
p: e.p
|
|
40
|
-
}, u.open = f, u.close = s, u;
|
|
41
|
-
};
|
|
42
|
-
const d = new function t(s = globalThis) {
|
|
43
|
-
let d = "number" == typeof s ? s : ((r) => {
|
|
44
|
-
let t = r.process ?? {}, n = t.argv ?? [], o = t.env ?? {}, i = 0;
|
|
45
|
-
try {
|
|
46
|
-
i = ((r, t, n) => (e = t.TERM, {
|
|
47
|
-
"24bit": 3,
|
|
48
|
-
truecolor: 3,
|
|
49
|
-
ansi256: 2,
|
|
50
|
-
ansi: 1
|
|
51
|
-
}[t.COLORTERM] || (t.CI ? /,GITHUB/.test(n) ? 3 : 1 : (t.PM2_HOME || /edge/.test(t.NEXT_RUNTIME) || r.stdout?.isTTY) && "dumb" !== e ? "win32" === r.platform ? 3 : /-256/.test(e) ? 2 : 1 : 0)))(t, o, "," + l(o).join(","));
|
|
52
|
-
} catch (e) {
|
|
53
|
-
o = {};
|
|
54
|
-
}
|
|
55
|
-
let f, s = i || 1, u = "FORCE_COLOR", a = {
|
|
56
|
-
false: 0,
|
|
57
|
-
0: 0,
|
|
58
|
-
1: 1,
|
|
59
|
-
2: 2,
|
|
60
|
-
3: 3
|
|
61
|
-
}[o[u]] ?? s, c = -1;
|
|
62
|
-
for (f of n) /^--color=?(true|always)?$/.test(f) && (c = s), /^--(no-color|color=(false|never))$/.test(f) && (c = 0);
|
|
63
|
-
return r.window?.chrome ? 3 : u in o ? a : ~c ? c : o.NO_COLOR ? 0 : i;
|
|
64
|
-
})(s), b = {}, p = {
|
|
65
|
-
Ansis: t,
|
|
66
|
-
level: d,
|
|
67
|
-
isSupported: () => m,
|
|
68
|
-
strip: (e) => e.replace(/][^]*|[][[()#;?]*(?:\d+(?:;\d*)*)?[\dA-ORZcf-nqry=><]/g, i),
|
|
69
|
-
extend(e) {
|
|
70
|
-
for (let r in e) {
|
|
71
|
-
let t = e[r];
|
|
72
|
-
"s" === (typeof t)[0] && (h(w(r), A(...u(t))), t = P(...u(t))), h(r, t);
|
|
73
|
-
}
|
|
74
|
-
return n(p, o({}, b));
|
|
75
|
-
}
|
|
76
|
-
}, h = (e, t) => {
|
|
77
|
-
b[e] = { get() {
|
|
78
|
-
return r(this, e, { value: t.call ? (...e) => g(this, t(...e)) : g(this, t) })[e];
|
|
79
|
-
} };
|
|
80
|
-
}, y = 1 ^ d, $ = d > 2, m = d > 0, O = (e, r) => m ? {
|
|
81
|
-
open: `[${e}m`,
|
|
82
|
-
close: r ? `[${r}m` : i
|
|
83
|
-
} : c, w = (e) => "bg" + e[0].toUpperCase() + e.slice(1), v = (e) => (r) => e(...u(r)), x = (e, r) => (t, n, o) => O(`${e}8;2;${t};${n};${o}`, r), _ = (e) => (r, t, n) => e(((e, r, t) => e ^ r | r ^ t ? 16 + 36 * f(e / 51) + 6 * f(r / 51) + f(t / 51) : 8 > e ? 16 : e > 248 ? 231 : f(24 * (e - 8) / 247) + 232)(r, t, n)), k = (e) => O(y ? "38;5;" + e : a(e), 39), R = (e) => O(y ? "48;5;" + e : a(e) + 10, 49), P = $ ? x(3, 39) : _(k), A = $ ? x(4, 49) : _(R), B = {
|
|
84
|
-
fg: k,
|
|
85
|
-
bg: R,
|
|
86
|
-
rgb: P,
|
|
87
|
-
bgRgb: A,
|
|
88
|
-
hex: v(P),
|
|
89
|
-
bgHex: v(A),
|
|
90
|
-
visible: c,
|
|
91
|
-
reset: O(0, i),
|
|
92
|
-
bold: O(1, 22),
|
|
93
|
-
dim: O(2, 22),
|
|
94
|
-
italic: O(3, 23),
|
|
95
|
-
underline: O(4, 24),
|
|
96
|
-
inverse: O(7, 27),
|
|
97
|
-
hidden: O(8, 28),
|
|
98
|
-
strikethrough: O(9, 29),
|
|
99
|
-
link: { f: (e, r = e) => m ? `]8;;${e}${r}]8;;` : r != e ? r + ` (${e})` : e }
|
|
100
|
-
}, C = (e, r) => {
|
|
101
|
-
B[e] = O(r, 39), B[w(e)] = O(r + 10, 49);
|
|
102
|
-
};
|
|
103
|
-
return "gray,black,red,green,yellow,blue,magenta,cyan,white".split(",").map(((e, r) => {
|
|
104
|
-
r ? C(e + "Bright", 89 + r) : r = 61, C(e, 29 + r);
|
|
105
|
-
})), p.extend(B);
|
|
106
|
-
}();
|
|
107
|
-
module.exports = d.default = d;
|
|
108
|
-
})))(), 1)).default;
|
|
109
|
-
//#endregion
|
|
110
|
-
//#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/logger-9ze2jxCr.mjs
|
|
111
|
-
const LogLevels = {
|
|
112
|
-
silent: 0,
|
|
113
|
-
error: 1,
|
|
114
|
-
warn: 2,
|
|
115
|
-
info: 3
|
|
116
|
-
};
|
|
117
|
-
function format(msgs) {
|
|
118
|
-
return msgs.filter((arg) => arg !== void 0 && arg !== false).join(" ");
|
|
119
|
-
}
|
|
120
|
-
function clearScreen() {
|
|
121
|
-
const repeatCount = process.stdout.rows - 2;
|
|
122
|
-
const blank = repeatCount > 0 ? "\n".repeat(repeatCount) : "";
|
|
123
|
-
console.info(blank);
|
|
124
|
-
readline.cursorTo(process.stdout, 0, 0);
|
|
125
|
-
readline.clearScreenDown(process.stdout);
|
|
126
|
-
}
|
|
127
|
-
const warnedMessages = /* @__PURE__ */ new Set();
|
|
128
|
-
function createSuppressWarnings(suppressWarnings) {
|
|
129
|
-
if (typeof suppressWarnings === "function") return suppressWarnings;
|
|
130
|
-
const patterns = toArray(suppressWarnings);
|
|
131
|
-
if (!patterns.length) return () => false;
|
|
132
|
-
return (msg) => patterns.some((pattern) => {
|
|
133
|
-
if (pattern instanceof RegExp) {
|
|
134
|
-
pattern.lastIndex = 0;
|
|
135
|
-
return pattern.test(msg);
|
|
136
|
-
}
|
|
137
|
-
return msg.includes(pattern);
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
function createLogger(level = "info", options = {}) {
|
|
141
|
-
const resolvedOptions = {
|
|
142
|
-
allowClearScreen: true,
|
|
143
|
-
failOnWarn: false,
|
|
144
|
-
console: globalThis.console,
|
|
145
|
-
...options
|
|
146
|
-
};
|
|
147
|
-
const { allowClearScreen, console, customLogger, failOnWarn } = resolvedOptions;
|
|
148
|
-
if (customLogger) return customLogger;
|
|
149
|
-
function output(type, msg) {
|
|
150
|
-
if (LogLevels[logger.level] < LogLevels[type]) return;
|
|
151
|
-
console[type === "info" ? "log" : type](msg);
|
|
152
|
-
}
|
|
153
|
-
const clear = allowClearScreen && process.stdout.isTTY && !process.env.CI ? clearScreen : () => {};
|
|
154
|
-
const isWindowsTerminal = !!process.env.WT_SESSION;
|
|
155
|
-
const emojiDivier = " ".repeat(isWindowsTerminal ? 2 : 1);
|
|
156
|
-
const isSuppressed = createSuppressWarnings(resolvedOptions.suppressWarnings);
|
|
157
|
-
const logger = {
|
|
158
|
-
level,
|
|
159
|
-
options: resolvedOptions,
|
|
160
|
-
info(...msgs) {
|
|
161
|
-
output("info", `${blue`ℹ`}${emojiDivier}${format(msgs)}`);
|
|
162
|
-
},
|
|
163
|
-
warn(...msgs) {
|
|
164
|
-
const message = format(msgs);
|
|
165
|
-
if (isSuppressed(message)) return;
|
|
166
|
-
if (failOnWarn) return this.error(...msgs);
|
|
167
|
-
warnedMessages.add(message);
|
|
168
|
-
output("warn", `${bold(yellow`warn:`)} ${message}`);
|
|
169
|
-
},
|
|
170
|
-
warnOnce(...msgs) {
|
|
171
|
-
const message = format(msgs);
|
|
172
|
-
if (isSuppressed(message)) return;
|
|
173
|
-
if (failOnWarn) return this.error(...msgs);
|
|
174
|
-
if (warnedMessages.has(message)) return;
|
|
175
|
-
warnedMessages.add(message);
|
|
176
|
-
output("warn", `${bold(yellow`warn:`)} ${message}`);
|
|
177
|
-
},
|
|
178
|
-
error(...msgs) {
|
|
179
|
-
output("error", `${bold(red`error:`)} ${format(msgs).replace(/^([A-Za-z]*Error):\s*/, "")}`);
|
|
180
|
-
process.exitCode = 1;
|
|
181
|
-
},
|
|
182
|
-
success(...msgs) {
|
|
183
|
-
output("info", `${green`✔`}${emojiDivier}${format(msgs)}`);
|
|
184
|
-
},
|
|
185
|
-
clearScreen(type) {
|
|
186
|
-
if (LogLevels[logger.level] >= LogLevels[type]) clear();
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
return logger;
|
|
190
|
-
}
|
|
191
|
-
const globalLogger = createLogger();
|
|
192
|
-
function getNameLabel(ansis, name) {
|
|
193
|
-
if (!name) return void 0;
|
|
194
|
-
return ansis(`[${name}]`);
|
|
195
|
-
}
|
|
196
|
-
function prettyFormat(format) {
|
|
197
|
-
const formatColor = format === "es" ? blue : format === "cjs" ? yellow : noop;
|
|
198
|
-
let formatText;
|
|
199
|
-
switch (format) {
|
|
200
|
-
case "es":
|
|
201
|
-
formatText = "ESM";
|
|
202
|
-
break;
|
|
203
|
-
default:
|
|
204
|
-
formatText = format.toUpperCase();
|
|
205
|
-
break;
|
|
206
|
-
}
|
|
207
|
-
return formatColor(`[${formatText}]`);
|
|
208
|
-
}
|
|
209
|
-
const colors = /* @__PURE__ */ new Map();
|
|
210
|
-
function generateColor(name = "default") {
|
|
211
|
-
if (colors.has(name)) return colors.get(name);
|
|
212
|
-
let color;
|
|
213
|
-
if (name === "default") color = blue;
|
|
214
|
-
else {
|
|
215
|
-
let hash = 0;
|
|
216
|
-
for (let i = 0; i < name.length; i++) hash = name.charCodeAt(i) + ((hash << 5) - hash);
|
|
217
|
-
color = rgb(...hslToRgb(hash % 360, 35, 55));
|
|
218
|
-
}
|
|
219
|
-
colors.set(name, color);
|
|
220
|
-
return color;
|
|
221
|
-
}
|
|
222
|
-
function hslToRgb(h, s, l) {
|
|
223
|
-
h = h % 360;
|
|
224
|
-
h /= 360;
|
|
225
|
-
s /= 100;
|
|
226
|
-
l /= 100;
|
|
227
|
-
let r, g, b;
|
|
228
|
-
if (s === 0) r = g = b = l;
|
|
229
|
-
else {
|
|
230
|
-
const q = l < .5 ? l * (1 + s) : l + s - l * s;
|
|
231
|
-
const p = 2 * l - q;
|
|
232
|
-
r = hue2rgb(p, q, h + 1 / 3);
|
|
233
|
-
g = hue2rgb(p, q, h);
|
|
234
|
-
b = hue2rgb(p, q, h - 1 / 3);
|
|
235
|
-
}
|
|
236
|
-
return [
|
|
237
|
-
Math.max(0, Math.round(r * 255)),
|
|
238
|
-
Math.max(0, Math.round(g * 255)),
|
|
239
|
-
Math.max(0, Math.round(b * 255))
|
|
240
|
-
];
|
|
241
|
-
}
|
|
242
|
-
function hue2rgb(p, q, t) {
|
|
243
|
-
if (t < 0) t += 1;
|
|
244
|
-
if (t > 1) t -= 1;
|
|
245
|
-
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
246
|
-
if (t < 1 / 2) return q;
|
|
247
|
-
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
248
|
-
return p;
|
|
249
|
-
}
|
|
250
|
-
//#endregion
|
|
251
|
-
//#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/debug-B1wUEHkd.mjs
|
|
252
|
-
var version = "0.22.7";
|
|
253
|
-
const debugLog = createDebug("tsdown:debug");
|
|
254
|
-
function enableDebug(debug) {
|
|
255
|
-
if (!debug) return;
|
|
256
|
-
let namespace;
|
|
257
|
-
if (debug === true) namespace = "tsdown:*";
|
|
258
|
-
else namespace = resolveComma(toArray(debug)).map((v) => `tsdown:${v}`).join(",");
|
|
259
|
-
const ns = namespaces();
|
|
260
|
-
if (ns) namespace += `,${ns}`;
|
|
261
|
-
enable(namespace);
|
|
262
|
-
debugLog("Debugging enabled", namespace);
|
|
263
|
-
}
|
|
264
|
-
//#endregion
|
|
265
|
-
export { yellow as _, createSuppressWarnings as a, globalLogger as c, bold as d, dim as f, underline as g, red as h, createLogger as i, prettyFormat as l, hex as m, version as n, generateColor as o, green as p, LogLevels as r, getNameLabel as s, enableDebug as t, blue as u };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { access, cp, rm, stat } from "node:fs/promises";
|
|
3
|
-
//#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/fs-qxJxxoCE.mjs
|
|
4
|
-
function fsExists(path) {
|
|
5
|
-
return access(path).then(() => true, () => false);
|
|
6
|
-
}
|
|
7
|
-
function fsStat(path) {
|
|
8
|
-
return stat(path).catch(() => null);
|
|
9
|
-
}
|
|
10
|
-
function fsRemove(path) {
|
|
11
|
-
return rm(path, {
|
|
12
|
-
force: true,
|
|
13
|
-
recursive: true
|
|
14
|
-
}).catch(() => {});
|
|
15
|
-
}
|
|
16
|
-
function fsCopy(from, to) {
|
|
17
|
-
return cp(from, to, {
|
|
18
|
-
recursive: true,
|
|
19
|
-
force: true
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
function lowestCommonAncestor(...filepaths) {
|
|
23
|
-
if (filepaths.length === 0) return "";
|
|
24
|
-
if (filepaths.length === 1) return path.dirname(filepaths[0]);
|
|
25
|
-
filepaths = filepaths.map(path.normalize);
|
|
26
|
-
const [first, ...rest] = filepaths;
|
|
27
|
-
let ancestor = first.split(path.sep);
|
|
28
|
-
for (const filepath of rest) {
|
|
29
|
-
const directories = filepath.split(path.sep, ancestor.length);
|
|
30
|
-
let index = 0;
|
|
31
|
-
for (const directory of directories) if (directory === ancestor[index]) index += 1;
|
|
32
|
-
else {
|
|
33
|
-
ancestor = ancestor.slice(0, index);
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
ancestor = ancestor.slice(0, index);
|
|
37
|
-
}
|
|
38
|
-
return ancestor.length <= 1 && ancestor[0] === "" ? path.sep + ancestor[0] : ancestor.join(path.sep);
|
|
39
|
-
}
|
|
40
|
-
function stripExtname(filePath) {
|
|
41
|
-
const ext = path.extname(filePath);
|
|
42
|
-
if (!ext.length) return filePath;
|
|
43
|
-
return filePath.slice(0, -ext.length);
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
export { lowestCommonAncestor as a, fsStat as i, fsExists as n, stripExtname as o, fsRemove as r, fsCopy as t };
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
//#region \0rolldown/runtime.js
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
10
|
-
var __exportAll = (all, no_symbols) => {
|
|
11
|
-
let target = {};
|
|
12
|
-
for (var name in all) __defProp(target, name, {
|
|
13
|
-
get: all[name],
|
|
14
|
-
enumerable: true
|
|
15
|
-
});
|
|
16
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
17
|
-
return target;
|
|
18
|
-
};
|
|
19
|
-
var __copyProps = (to, from, except, desc) => {
|
|
20
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
21
|
-
key = keys[i];
|
|
22
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
23
|
-
get: ((k) => from[k]).bind(null, key),
|
|
24
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return to;
|
|
28
|
-
};
|
|
29
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
-
value: mod,
|
|
31
|
-
enumerable: true
|
|
32
|
-
}) : target, mod));
|
|
33
|
-
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
34
|
-
//#endregion
|
|
35
|
-
//#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/general-Cp4NiJNK.mjs
|
|
36
|
-
const picomatch = createRequire(import.meta.url)("./npm_entry_picomatch.cjs");
|
|
37
|
-
function toArray(val, defaultValue) {
|
|
38
|
-
if (Array.isArray(val)) return val;
|
|
39
|
-
else if (val == null) {
|
|
40
|
-
if (defaultValue) return [defaultValue];
|
|
41
|
-
return [];
|
|
42
|
-
} else return [val];
|
|
43
|
-
}
|
|
44
|
-
function resolveComma(arr) {
|
|
45
|
-
return arr.flatMap((format) => format.split(","));
|
|
46
|
-
}
|
|
47
|
-
function resolveRegex(str) {
|
|
48
|
-
if (typeof str === "string" && str.length > 2 && str[0] === "/" && str.at(-1) === "/") return new RegExp(str.slice(1, -1));
|
|
49
|
-
return str;
|
|
50
|
-
}
|
|
51
|
-
function slash(string) {
|
|
52
|
-
return string.replaceAll("\\", "/");
|
|
53
|
-
}
|
|
54
|
-
const noop = (v) => v;
|
|
55
|
-
function matchPattern(id, patterns) {
|
|
56
|
-
return patterns.some((pattern) => {
|
|
57
|
-
if (pattern instanceof RegExp) {
|
|
58
|
-
pattern.lastIndex = 0;
|
|
59
|
-
return pattern.test(id);
|
|
60
|
-
}
|
|
61
|
-
return id === pattern || picomatch(pattern)(id);
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
function pkgExists(moduleName) {
|
|
65
|
-
try {
|
|
66
|
-
import.meta.resolve(moduleName);
|
|
67
|
-
return true;
|
|
68
|
-
} catch {}
|
|
69
|
-
return false;
|
|
70
|
-
}
|
|
71
|
-
async function importWithError(moduleName) {
|
|
72
|
-
try {
|
|
73
|
-
return await import(moduleName);
|
|
74
|
-
} catch (error) {
|
|
75
|
-
throw new Error(`Failed to import module "${moduleName}". Please ensure it is installed.`, { cause: error });
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
function promiseWithResolvers() {
|
|
79
|
-
let resolve;
|
|
80
|
-
return {
|
|
81
|
-
promise: new Promise((res) => {
|
|
82
|
-
resolve = res;
|
|
83
|
-
}),
|
|
84
|
-
resolve
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
function debounce(fn, delay) {
|
|
88
|
-
let timer;
|
|
89
|
-
const debounced = (...args) => {
|
|
90
|
-
clearTimeout(timer);
|
|
91
|
-
timer = setTimeout(() => fn(...args), delay);
|
|
92
|
-
};
|
|
93
|
-
debounced.cancel = () => clearTimeout(timer);
|
|
94
|
-
return debounced;
|
|
95
|
-
}
|
|
96
|
-
//#endregion
|
|
97
|
-
export { pkgExists as a, resolveRegex as c, __commonJSMin as d, __exportAll as f, noop as i, slash as l, __toESM as m, importWithError as n, promiseWithResolvers as o, __require as p, matchPattern as r, resolveComma as s, debounce as t, toArray as u };
|