@voidzero-dev/vite-plus-core 0.1.1 → 0.1.3
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/dist/rolldown/cli.mjs +11 -22
- package/dist/rolldown/config.d.mts +1 -2
- package/dist/rolldown/config.mjs +10 -11
- package/dist/rolldown/experimental-index.d.mts +20 -6
- package/dist/rolldown/experimental-index.mjs +24 -22
- package/dist/rolldown/filter-index.d.mts +1 -2
- package/dist/rolldown/filter-index.mjs +2 -8
- package/dist/rolldown/get-log-filter.mjs +1 -2
- package/dist/rolldown/index.d.mts +3 -3
- package/dist/rolldown/index.mjs +10 -13
- package/dist/rolldown/parallel-plugin-worker.mjs +7 -9
- package/dist/rolldown/parallel-plugin.d.mts +1 -2
- package/dist/rolldown/parallel-plugin.mjs +1 -2
- package/dist/rolldown/parse-ast-index.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.mjs +4 -6
- package/dist/rolldown/plugins-index.d.mts +3 -3
- package/dist/rolldown/plugins-index.mjs +4 -6
- package/dist/rolldown/shared/{binding-C4ZlFAt6.d.mts → binding-BohGL_65.d.mts} +10 -5
- package/dist/rolldown/shared/{binding-Bd04_f8P.mjs → binding-COZdHtee.mjs} +7 -16
- package/dist/rolldown/shared/{bindingify-input-options-ffqkmT9z.mjs → bindingify-input-options-DdW_FOGG.mjs} +33 -56
- package/dist/rolldown/shared/{constructors-C5a55nbY.mjs → constructors-CQlws1EK.mjs} +2 -4
- package/dist/rolldown/shared/{constructors-cPsD1J5w.d.mts → constructors-ColrbLxz.d.mts} +2 -2
- package/dist/rolldown/shared/{define-config-DX_4SBzo.d.mts → define-config-BqZZMLjO.d.mts} +66 -30
- package/dist/rolldown/shared/{define-config-BMj_QknW.mjs → define-config-DJOr6Iwt.mjs} +1 -2
- package/dist/rolldown/shared/{error-BYPsvVEN.mjs → error-FTNambir.mjs} +3 -8
- package/dist/rolldown/shared/{load-config-Oj1-3DPg.mjs → load-config-DBRCgd9m.mjs} +2 -4
- package/dist/rolldown/shared/{logs-CCc_0vhs.mjs → logs-D80CXhvg.mjs} +5 -8
- package/dist/rolldown/shared/{misc-Xty885dB.mjs → misc-DJYbNKZX.mjs} +1 -2
- package/dist/rolldown/shared/{normalize-string-or-regex-DoNa0azR.mjs → normalize-string-or-regex-CJTjKt5t.mjs} +3 -6
- package/dist/rolldown/shared/{parse-Wj8OTS4w.mjs → parse-q7gzDQmi.mjs} +2 -5
- package/dist/rolldown/shared/{prompt-CmNr0AI-.mjs → prompt-DZIXsnf9.mjs} +1 -3
- package/dist/rolldown/shared/{rolldown-y9H0nYAD.mjs → rolldown-BJMdRJb1.mjs} +2 -4
- package/dist/rolldown/shared/{rolldown-build-DkOWV5Vu.mjs → rolldown-build-DKv2K096.mjs} +424 -473
- package/dist/rolldown/shared/{transform-DoG7c5_r.d.mts → transform-BoJxrM-e.d.mts} +1 -1
- package/dist/rolldown/shared/{transform-D55YcCvB.mjs → transform-CQppMqL8.mjs} +3 -6
- package/dist/rolldown/shared/{watch-Cn-znpX_.mjs → watch-BeMWbIuq.mjs} +71 -77
- package/dist/rolldown/utils-index.d.mts +2 -2
- package/dist/rolldown/utils-index.mjs +9 -18
- package/dist/tsdown/{build-BjQ7Rt90-tMPZTflz.js → build-TmLngPCw-CBoVPzkZ.js} +312 -324
- package/dist/tsdown/build-gOkJM1H9-D9ngUBpk.js +5 -0
- package/dist/tsdown/{chunk-CdeBBKNj.js → chunk-CSNpwdVU.js} +13 -23
- package/dist/tsdown/{debug-BUVkFfEZ-D3UMJnif.js → debug-tOJ_PtrM-C-Do1Twv.js} +4 -6
- package/dist/tsdown/{detect-CCATtVj7-DhvBg5EF.js → detect-DK-FDZQ9-CHuRhyUG.js} +2 -4
- package/dist/tsdown/{dist-CFTDWtv2.js → dist-Ba2DZx1w.js} +7 -7
- package/dist/tsdown/{dist-DNcnO8LL.js → dist-DCol2bGA.js} +503 -568
- package/dist/tsdown/{dist-kuoe97DJ.js → dist-_l70jCqI.js} +1 -2
- package/dist/tsdown/{filename-CPj0AKvV.js → filename-BDcjeHGl.js} +3 -5
- package/dist/tsdown/{index-node-ShM0x2b6-Bt7Chc0I.js → index-node-Djp92Gzb-B-AUHI4t.js} +2 -4
- package/dist/tsdown/index-types.d.ts +180 -29
- package/dist/tsdown/index.js +7 -9
- package/dist/tsdown/{main-B3qcLRNf.js → main-DYgM-9Cb.js} +71 -83
- package/dist/tsdown/{node-Ba_UB_xO.js → node-B3Gdtau1.js} +1 -4
- package/dist/tsdown/npm_cjs_chunk_chunk.cjs +6 -8
- package/dist/tsdown/npm_cjs_chunk_lt.cjs +28 -0
- package/dist/tsdown/npm_cjs_chunk_range.cjs +22 -49
- package/dist/tsdown/npm_cjs_chunk_semver.cjs +54 -66
- package/dist/tsdown/npm_entry_picomatch.cjs +18 -30
- package/dist/tsdown/npm_entry_semver_functions_coerce.cjs +3 -7
- package/dist/tsdown/npm_entry_semver_functions_lt.cjs +5 -0
- package/dist/tsdown/npm_entry_semver_functions_satisfies.cjs +5 -7
- package/dist/tsdown/npm_entry_semver_ranges_min-version.cjs +5 -7
- package/dist/tsdown/npm_entry_tree-kill.cjs +2 -6
- package/dist/tsdown/{resolver-j7HY1N36-DHVsN9q6.js → resolver-CdD-yT15-3eaymYLw.js} +3 -5
- package/dist/tsdown/run.js +209 -74
- package/dist/tsdown/{tsc-CBjlgM2A.js → tsc-CberiTDq.js} +64 -71
- package/dist/tsdown/{tsc-context-D1h5oZB8.js → tsc-context-DiIjfXAG.js} +3 -5
- package/dist/vite/client/client.mjs +4 -19
- package/dist/vite/client/env.mjs +1 -2
- package/dist/vite/node/chunks/build.js +2 -3
- package/dist/vite/node/chunks/build2.js +91 -243
- package/dist/vite/node/chunks/chunk.js +7 -13
- package/dist/vite/node/chunks/config.js +2 -3
- package/dist/vite/node/chunks/dist.js +27 -61
- package/dist/vite/node/chunks/dist2.js +11 -95
- package/dist/vite/node/chunks/lib.js +1 -7
- package/dist/vite/node/chunks/logger.js +3 -8
- package/dist/vite/node/chunks/node.js +137 -428
- package/dist/vite/node/chunks/optimizer.js +2 -3
- package/dist/vite/node/chunks/postcss-import.js +1 -13
- package/dist/vite/node/chunks/preview.js +2 -3
- package/dist/vite/node/chunks/server.js +2 -3
- package/dist/vite/node/cli.js +1 -4
- package/dist/vite/node/index.d.ts +2 -2
- package/dist/vite/node/index.js +1 -2
- package/dist/vite/node/internal.js +1 -2
- package/dist/vite/node/module-runner.js +44 -3
- package/package.json +15 -11
- package/dist/rolldown/cli-setup.d.mts +0 -1
- package/dist/rolldown/cli-setup.mjs +0 -17
- package/dist/tsdown/build-2oRq4mfQ-YC_gzK3u.js +0 -6
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { RUNTIME_MODULE_ID } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
2
2
|
import { exactRegex } from "@voidzero-dev/vite-plus-core/rolldown/filter";
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.22.1_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_d2e4a246ecba2d40b4415d1b79df8dc9/node_modules/rolldown-plugin-dts/dist/filename.mjs
|
|
3
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.22.4_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_e2c498b62da30912fd0b48bf4746dbba/node_modules/rolldown-plugin-dts/dist/filename.mjs
|
|
5
4
|
const RE_JS = /\.([cm]?)jsx?$/;
|
|
6
5
|
const RE_TS = /\.([cm]?)tsx?$/;
|
|
7
6
|
const RE_DTS = /\.d\.([cm]?)ts$/;
|
|
8
7
|
const RE_DTS_MAP = /\.d\.([cm]?)ts\.map$/;
|
|
9
8
|
const RE_NODE_MODULES = /[\\/]node_modules[\\/]/;
|
|
10
|
-
const RE_CSS = /\.css$/;
|
|
9
|
+
const RE_CSS = /\.(?:css|scss|sass|less|styl|stylus)$/;
|
|
11
10
|
const RE_VUE = /\.vue$/;
|
|
12
11
|
const RE_JSON = /\.json$/;
|
|
13
12
|
const RE_ROLLDOWN_RUNTIME = exactRegex(RUNTIME_MODULE_ID);
|
|
@@ -26,6 +25,5 @@ function resolveTemplateFn(fn, chunk) {
|
|
|
26
25
|
function replaceTemplateName(template, name) {
|
|
27
26
|
return template.replaceAll("[name]", name);
|
|
28
27
|
}
|
|
29
|
-
|
|
30
28
|
//#endregion
|
|
31
|
-
export { RE_JSON as a, RE_TS as c, filename_js_to_dts as d, filename_to_dts as f, RE_JS as i, RE_VUE as l, resolveTemplateFn as m, RE_DTS as n, RE_NODE_MODULES as o, replaceTemplateName as p, RE_DTS_MAP as r, RE_ROLLDOWN_RUNTIME as s, RE_CSS as t, filename_dts_to as u };
|
|
29
|
+
export { RE_JSON as a, RE_TS as c, filename_js_to_dts as d, filename_to_dts as f, RE_JS as i, RE_VUE as l, resolveTemplateFn as m, RE_DTS as n, RE_NODE_MODULES as o, replaceTemplateName as p, RE_DTS_MAP as r, RE_ROLLDOWN_RUNTIME as s, RE_CSS as t, filename_dts_to as u };
|
|
@@ -4,8 +4,7 @@ import path from "node:path";
|
|
|
4
4
|
import fs from "node:fs/promises";
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import zlib from "node:zlib";
|
|
7
|
-
|
|
8
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.0-beta.2_@arethetypeswrong+core@0.18.2_@typescript+native-preview@7.0.0-dev_d0d0ed2124937ee9dd401a280008a3bf/node_modules/tsdown/dist/index-node-ShM0x2b6.mjs
|
|
7
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_df9c58766eba71ed4fabe78a2cfe9dc9/node_modules/tsdown/dist/index-node-Djp92Gzb.mjs
|
|
9
8
|
/** @type {import('../index.d.ts').pack} */
|
|
10
9
|
async function pack(dir, opts) {
|
|
11
10
|
const packageManager = opts?.packageManager ?? "npm";
|
|
@@ -246,6 +245,5 @@ async function getPackDirectory(dir, packageManager) {
|
|
|
246
245
|
} catch {}
|
|
247
246
|
return dir;
|
|
248
247
|
}
|
|
249
|
-
|
|
250
248
|
//#endregion
|
|
251
|
-
export { getPackDirectory, pack, packAsJson, packAsList, unpack };
|
|
249
|
+
export { getPackDirectory, pack, packAsJson, packAsList, unpack };
|
|
@@ -60,7 +60,7 @@ declare global {
|
|
|
60
60
|
}
|
|
61
61
|
/** @deprecated */
|
|
62
62
|
//#endregion
|
|
63
|
-
//#region ../../node_modules/.pnpm/get-tsconfig@4.13.
|
|
63
|
+
//#region ../../node_modules/.pnpm/get-tsconfig@4.13.6/node_modules/get-tsconfig/dist/index.d.cts
|
|
64
64
|
declare namespace TsConfigJson {
|
|
65
65
|
namespace CompilerOptions {
|
|
66
66
|
type JSX = 'preserve' | 'react' | 'react-jsx' | 'react-jsxdev' | 'react-native';
|
|
@@ -809,7 +809,7 @@ type TsConfigJson = {
|
|
|
809
809
|
references?: TsConfigJson.References[];
|
|
810
810
|
};
|
|
811
811
|
//#endregion
|
|
812
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.22.
|
|
812
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.22.4_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_e2c498b62da30912fd0b48bf4746dbba/node_modules/rolldown-plugin-dts/dist/index.d.mts
|
|
813
813
|
//#region src/options.d.ts
|
|
814
814
|
interface GeneralOptions {
|
|
815
815
|
/**
|
|
@@ -995,7 +995,7 @@ interface TsgoOptions {
|
|
|
995
995
|
path?: string;
|
|
996
996
|
}
|
|
997
997
|
//#endregion
|
|
998
|
-
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.0.0-alpha.
|
|
998
|
+
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.0.0-alpha.33_@pnpm+logger@1001.0.1_typescript@5.9.3_vite@packages+core_vue@3.5.27_typescript@5.9.3_/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
|
|
999
999
|
//#region src/node/cli-commands.d.ts
|
|
1000
1000
|
interface StartOptions {
|
|
1001
1001
|
root?: string;
|
|
@@ -1005,6 +1005,42 @@ interface StartOptions {
|
|
|
1005
1005
|
open?: boolean;
|
|
1006
1006
|
}
|
|
1007
1007
|
//#endregion
|
|
1008
|
+
//#region ../../node_modules/.pnpm/@tsdown+exe@0.21.0/node_modules/@tsdown/exe/dist/index.d.mts
|
|
1009
|
+
//#region src/platform.d.ts
|
|
1010
|
+
type ExePlatform = "win" | "darwin" | "linux";
|
|
1011
|
+
type ExeArch = "x64" | "arm64";
|
|
1012
|
+
interface ExeTarget {
|
|
1013
|
+
platform: ExePlatform;
|
|
1014
|
+
arch: ExeArch;
|
|
1015
|
+
/**
|
|
1016
|
+
* Node.js version to use for the executable.
|
|
1017
|
+
*
|
|
1018
|
+
* Accepts a valid semver string (e.g., `"25.7.0"`), or the special values
|
|
1019
|
+
* `"latest"` / `"latest-lts"` which resolve the version automatically from
|
|
1020
|
+
* {@link https://nodejs.org/dist/index.json}.
|
|
1021
|
+
*
|
|
1022
|
+
* The minimum required version is 25.7.0, which is when SEA support was added to Node.js.
|
|
1023
|
+
*/
|
|
1024
|
+
nodeVersion: (string & {}) | "latest" | "latest-lts" | `${string}.${string}.${string}`;
|
|
1025
|
+
}
|
|
1026
|
+
interface ExeExtensionOptions {
|
|
1027
|
+
/**
|
|
1028
|
+
* Cross-platform targets for building executables.
|
|
1029
|
+
* Requires `@tsdown/exe` to be installed.
|
|
1030
|
+
* When specified, builds an executable for each target platform/arch combination.
|
|
1031
|
+
*
|
|
1032
|
+
* @example
|
|
1033
|
+
* ```ts
|
|
1034
|
+
* targets: [
|
|
1035
|
+
* { platform: 'linux', arch: 'x64', nodeVersion: '25.7.0' },
|
|
1036
|
+
* { platform: 'darwin', arch: 'arm64', nodeVersion: '25.7.0' },
|
|
1037
|
+
* { platform: 'win', arch: 'x64', nodeVersion: '25.7.0' },
|
|
1038
|
+
* ]
|
|
1039
|
+
* ```
|
|
1040
|
+
*/
|
|
1041
|
+
targets?: ExeTarget[];
|
|
1042
|
+
}
|
|
1043
|
+
//#endregion
|
|
1008
1044
|
//#region ../../node_modules/.pnpm/@arethetypeswrong+core@0.18.2/node_modules/@arethetypeswrong/core/dist/checkPackage.d.ts
|
|
1009
1045
|
interface CheckPackageOptions {
|
|
1010
1046
|
/**
|
|
@@ -1028,7 +1064,7 @@ interface CheckPackageOptions {
|
|
|
1028
1064
|
entrypointsLegacy?: boolean;
|
|
1029
1065
|
}
|
|
1030
1066
|
//#endregion
|
|
1031
|
-
//#region ../../node_modules/.pnpm/publint@0.3.
|
|
1067
|
+
//#region ../../node_modules/.pnpm/publint@0.3.18/node_modules/publint/src/index.d.ts
|
|
1032
1068
|
interface PackFile {
|
|
1033
1069
|
name: string;
|
|
1034
1070
|
data: string | ArrayBuffer | Uint8Array;
|
|
@@ -1040,7 +1076,7 @@ interface Options$2 {
|
|
|
1040
1076
|
* ::: info Environment notes
|
|
1041
1077
|
* - **Node.js**: Defaults to `process.cwd()`.
|
|
1042
1078
|
* - **Browser**: Automatically inferred from `{ tarball: ArrayBuffer | ReadableStream }`. If `{ files: PackFile[] }` is used,
|
|
1043
|
-
* this must be the shared directory of all files in `files`. e.g. if `name` has `"package/src/index.js"
|
|
1079
|
+
* this must be the shared directory of all files in `files`. e.g. if `name` has `"package/src/index.js"`,
|
|
1044
1080
|
* the `pkgDir` should be `"package"`.
|
|
1045
1081
|
* :::
|
|
1046
1082
|
*/
|
|
@@ -1078,7 +1114,8 @@ interface Options$2 {
|
|
|
1078
1114
|
files: PackFile[];
|
|
1079
1115
|
} | false;
|
|
1080
1116
|
/**
|
|
1081
|
-
* Report warnings as errors.
|
|
1117
|
+
* Report warnings as errors. This runs before `level` filters the result, which means that if
|
|
1118
|
+
* `level` is set to `'error'`, all warnings (elevated as errors) will still be reported.
|
|
1082
1119
|
*/
|
|
1083
1120
|
strict?: boolean;
|
|
1084
1121
|
}
|
|
@@ -1109,7 +1146,7 @@ interface Options$1 {
|
|
|
1109
1146
|
depKinds?: Array<DepKind>;
|
|
1110
1147
|
}
|
|
1111
1148
|
//#endregion
|
|
1112
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
1149
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_df9c58766eba71ed4fabe78a2cfe9dc9/node_modules/tsdown/dist/types-DS6cAXR1.d.mts
|
|
1113
1150
|
//#region src/utils/types.d.ts
|
|
1114
1151
|
type Overwrite<T, U> = Omit<T, keyof U> & U;
|
|
1115
1152
|
type Awaitable<T> = T | Promise<T>;
|
|
@@ -1150,7 +1187,7 @@ interface CssOptions {
|
|
|
1150
1187
|
* Enable/disable CSS code splitting.
|
|
1151
1188
|
* When set to `false`, all CSS in the entire project will be extracted into a single CSS file.
|
|
1152
1189
|
* When set to `true`, CSS imported in async JS chunks will be preserved as chunks.
|
|
1153
|
-
* @default
|
|
1190
|
+
* @default false
|
|
1154
1191
|
*/
|
|
1155
1192
|
splitting?: boolean;
|
|
1156
1193
|
/**
|
|
@@ -1158,6 +1195,121 @@ interface CssOptions {
|
|
|
1158
1195
|
* @default 'style.css'
|
|
1159
1196
|
*/
|
|
1160
1197
|
fileName?: string;
|
|
1198
|
+
/**
|
|
1199
|
+
* Set the target environment for CSS syntax lowering.
|
|
1200
|
+
* Accepts esbuild-style target strings (e.g., `'chrome99'`, `'safari16.2'`).
|
|
1201
|
+
* Defaults to the top-level `target` option.
|
|
1202
|
+
*
|
|
1203
|
+
* Requires `@tsdown/css` to be installed.
|
|
1204
|
+
*
|
|
1205
|
+
* @see https://vite.dev/config/build-options#build-csstarget
|
|
1206
|
+
*/
|
|
1207
|
+
target?: string | string[] | false;
|
|
1208
|
+
/**
|
|
1209
|
+
* Options for CSS preprocessors (Sass/Less/Stylus).
|
|
1210
|
+
*
|
|
1211
|
+
* In addition to options specific to each processor, `additionalData` option
|
|
1212
|
+
* can be used to inject extra code for each style content.
|
|
1213
|
+
*
|
|
1214
|
+
* Requires `@tsdown/css` to be installed.
|
|
1215
|
+
*/
|
|
1216
|
+
preprocessorOptions?: PreprocessorOptions;
|
|
1217
|
+
/**
|
|
1218
|
+
* Enable/disable CSS minification.
|
|
1219
|
+
*
|
|
1220
|
+
* Requires `@tsdown/css` to be installed.
|
|
1221
|
+
*
|
|
1222
|
+
* @default false
|
|
1223
|
+
*/
|
|
1224
|
+
minify?: boolean;
|
|
1225
|
+
/**
|
|
1226
|
+
* Lightning CSS options for CSS syntax lowering and transformations.
|
|
1227
|
+
*
|
|
1228
|
+
* Requires `@tsdown/css` to be installed.
|
|
1229
|
+
*/
|
|
1230
|
+
lightningcss?: LightningCSSOptions;
|
|
1231
|
+
/**
|
|
1232
|
+
* PostCSS configuration.
|
|
1233
|
+
*
|
|
1234
|
+
* - `string`: Path to the directory to search for PostCSS config files.
|
|
1235
|
+
* - `object`: Inline PostCSS options with optional `plugins` array.
|
|
1236
|
+
* - Omitted: Auto-detect PostCSS config from the project root.
|
|
1237
|
+
*
|
|
1238
|
+
* Only used when `transformer` is `'postcss'`.
|
|
1239
|
+
* Requires `postcss` and `@tsdown/css` to be installed.
|
|
1240
|
+
*
|
|
1241
|
+
* @see https://github.com/postcss/postcss
|
|
1242
|
+
*/
|
|
1243
|
+
postcss?: PostCSSOptions;
|
|
1244
|
+
/**
|
|
1245
|
+
* CSS transformer to use. Controls how CSS is processed:
|
|
1246
|
+
*
|
|
1247
|
+
* - `'lightningcss'` (default): `@import` handled by Lightning CSS
|
|
1248
|
+
* `bundleAsync()`, PostCSS is **not** used at all.
|
|
1249
|
+
* - `'postcss'`: `@import` handled by `postcss-import`,
|
|
1250
|
+
* PostCSS plugins applied, Lightning CSS used only for final
|
|
1251
|
+
* targets/minify transform.
|
|
1252
|
+
*
|
|
1253
|
+
* Requires `@tsdown/css` to be installed.
|
|
1254
|
+
*
|
|
1255
|
+
* @default 'lightningcss'
|
|
1256
|
+
* @see https://vite.dev/config/shared-options#css-transformer
|
|
1257
|
+
*/
|
|
1258
|
+
transformer?: "postcss" | "lightningcss";
|
|
1259
|
+
}
|
|
1260
|
+
type PostCSSOptions = string | (Record<string, any> & {
|
|
1261
|
+
plugins?: any[];
|
|
1262
|
+
});
|
|
1263
|
+
interface PreprocessorOptions {
|
|
1264
|
+
scss?: SassPreprocessorOptions;
|
|
1265
|
+
sass?: SassPreprocessorOptions;
|
|
1266
|
+
less?: LessPreprocessorOptions;
|
|
1267
|
+
styl?: StylusPreprocessorOptions;
|
|
1268
|
+
stylus?: StylusPreprocessorOptions;
|
|
1269
|
+
}
|
|
1270
|
+
type PreprocessorAdditionalDataResult = string | {
|
|
1271
|
+
content: string;
|
|
1272
|
+
map?: any;
|
|
1273
|
+
};
|
|
1274
|
+
type PreprocessorAdditionalData = string | ((source: string, filename: string) => PreprocessorAdditionalDataResult | Promise<PreprocessorAdditionalDataResult>);
|
|
1275
|
+
interface SassPreprocessorOptions {
|
|
1276
|
+
additionalData?: PreprocessorAdditionalData;
|
|
1277
|
+
[key: string]: any;
|
|
1278
|
+
}
|
|
1279
|
+
interface LessPreprocessorOptions {
|
|
1280
|
+
additionalData?: PreprocessorAdditionalData;
|
|
1281
|
+
math?: any;
|
|
1282
|
+
paths?: string[];
|
|
1283
|
+
plugins?: any[];
|
|
1284
|
+
[key: string]: any;
|
|
1285
|
+
}
|
|
1286
|
+
interface StylusPreprocessorOptions {
|
|
1287
|
+
additionalData?: PreprocessorAdditionalData;
|
|
1288
|
+
define?: Record<string, any>;
|
|
1289
|
+
paths?: string[];
|
|
1290
|
+
[key: string]: any;
|
|
1291
|
+
}
|
|
1292
|
+
type LightningCSSOptions = Record<string, any>;
|
|
1293
|
+
interface ResolvedCssOptions {
|
|
1294
|
+
transformer: "postcss" | "lightningcss";
|
|
1295
|
+
splitting: boolean;
|
|
1296
|
+
fileName: string;
|
|
1297
|
+
minify: boolean;
|
|
1298
|
+
target?: string[];
|
|
1299
|
+
preprocessorOptions?: PreprocessorOptions;
|
|
1300
|
+
lightningcss?: LightningCSSOptions;
|
|
1301
|
+
postcss?: PostCSSOptions;
|
|
1302
|
+
}
|
|
1303
|
+
//#endregion
|
|
1304
|
+
//#region src/utils/chunks.d.ts
|
|
1305
|
+
type RolldownChunk = (OutputChunk | OutputAsset) & {
|
|
1306
|
+
outDir: string;
|
|
1307
|
+
};
|
|
1308
|
+
type ChunksByFormat = Partial<Record<NormalizedFormat, RolldownChunk[]>>;
|
|
1309
|
+
interface TsdownBundle extends AsyncDisposable {
|
|
1310
|
+
chunks: RolldownChunk[];
|
|
1311
|
+
config: ResolvedConfig;
|
|
1312
|
+
inlinedDeps: Map<string, Set<string>>;
|
|
1161
1313
|
} //#endregion
|
|
1162
1314
|
//#region src/utils/logger.d.ts
|
|
1163
1315
|
type LogType = "error" | "warn" | "info";
|
|
@@ -1233,8 +1385,12 @@ interface DevtoolsOptions extends NonNullable<InputOptions["devtools"]> {
|
|
|
1233
1385
|
clean?: boolean;
|
|
1234
1386
|
} //#endregion
|
|
1235
1387
|
//#region src/features/exe.d.ts
|
|
1236
|
-
interface ExeOptions {
|
|
1388
|
+
interface ExeOptions extends ExeExtensionOptions {
|
|
1237
1389
|
seaConfig?: Omit<SeaConfig, "main" | "output" | "mainFormat">;
|
|
1390
|
+
/**
|
|
1391
|
+
* Output file name without any suffix or extension.
|
|
1392
|
+
* For example, do not include `.exe`, platform suffixes, or architecture suffixes.
|
|
1393
|
+
*/
|
|
1238
1394
|
fileName?: string | ((chunk: RolldownChunk) => string);
|
|
1239
1395
|
}
|
|
1240
1396
|
/**
|
|
@@ -1666,15 +1822,6 @@ interface AttwOptions extends CheckPackageOptions {
|
|
|
1666
1822
|
*/
|
|
1667
1823
|
ignoreRules?: string[];
|
|
1668
1824
|
} //#endregion
|
|
1669
|
-
//#region src/utils/chunks.d.ts
|
|
1670
|
-
type RolldownChunk = (OutputChunk | OutputAsset) & {
|
|
1671
|
-
outDir: string;
|
|
1672
|
-
};
|
|
1673
|
-
type ChunksByFormat = Partial<Record<NormalizedFormat, RolldownChunk[]>>;
|
|
1674
|
-
interface TsdownBundle extends AsyncDisposable {
|
|
1675
|
-
chunks: RolldownChunk[];
|
|
1676
|
-
config: ResolvedConfig;
|
|
1677
|
-
} //#endregion
|
|
1678
1825
|
//#region src/features/pkg/exports.d.ts
|
|
1679
1826
|
interface ExportsOptions {
|
|
1680
1827
|
/**
|
|
@@ -1738,6 +1885,14 @@ interface ExportsOptions {
|
|
|
1738
1885
|
chunks: ChunksByFormat;
|
|
1739
1886
|
isPublish: boolean;
|
|
1740
1887
|
}) => Awaitable<Record<string, any>>);
|
|
1888
|
+
/**
|
|
1889
|
+
* Generate `inlinedDependencies` field in package.json.
|
|
1890
|
+
* Lists dependencies that are physically inlined into the bundle with their exact versions.
|
|
1891
|
+
*
|
|
1892
|
+
* @default true
|
|
1893
|
+
* @see {@link https://github.com/e18e/ecosystem-issues/issues/237}
|
|
1894
|
+
*/
|
|
1895
|
+
inlinedDependencies?: boolean;
|
|
1741
1896
|
} //#endregion
|
|
1742
1897
|
//#region src/features/pkg/publint.d.ts
|
|
1743
1898
|
interface PublintOptions extends Omit<Options$2, "pack" | "pkgDir"> {} //#endregion
|
|
@@ -1985,11 +2140,6 @@ interface UserConfig {
|
|
|
1985
2140
|
* - `umd`: UMD
|
|
1986
2141
|
*
|
|
1987
2142
|
* Defaults to ESM.
|
|
1988
|
-
*
|
|
1989
|
-
* ### Usage with {@link exe}
|
|
1990
|
-
* If `exe` is enabled, the default format will depend on support level of SEA in the target Node.js version:
|
|
1991
|
-
* - If ESM SEA is supported (Node.js > v25.7), the default format will be ESM.
|
|
1992
|
-
* - If only CJS SEA is supported, the default format will be CJS.
|
|
1993
2143
|
*/
|
|
1994
2144
|
format?: Format | Format[] | Partial<Record<Format, Partial<ResolvedConfig>>>;
|
|
1995
2145
|
globalName?: string;
|
|
@@ -2190,7 +2340,7 @@ interface UserConfig {
|
|
|
2190
2340
|
* **[experimental]** Bundle as executable using Node.js SEA (Single Executable Applications).
|
|
2191
2341
|
*
|
|
2192
2342
|
* This will bundle the output into a single executable file using Node.js SEA.
|
|
2193
|
-
* Note that this is only supported on Node.js 25.
|
|
2343
|
+
* Note that this is only supported on Node.js 25.7.0 and later, and is not supported in Bun or Deno.
|
|
2194
2344
|
*/
|
|
2195
2345
|
exe?: WithEnabled<ExeOptions>;
|
|
2196
2346
|
/**
|
|
@@ -2219,7 +2369,8 @@ type UserConfigFn = (inlineConfig: InlineConfig, context: {
|
|
|
2219
2369
|
}) => Awaitable<Arrayable<UserConfig>>;
|
|
2220
2370
|
type UserConfigExport = Awaitable<Arrayable<UserConfig> | UserConfigFn>;
|
|
2221
2371
|
type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "fromVite" | "publicDir" | "bundle" | "removeNodeProtocol" | "external" | "noExternal" | "inlineOnly" | "skipNodeModulesBundle" | "logLevel" | "failOnWarn" | "customLogger" | "envFile" | "envPrefix">, "globalName" | "inputOptions" | "outputOptions" | "minify" | "define" | "alias" | "onSuccess" | "outExtensions" | "hooks" | "copy" | "loader" | "name" | "banner" | "footer" | "checks">, {
|
|
2222
|
-
/** Resolved entry map (after glob expansion) */entry: Record<string, string>;
|
|
2372
|
+
/** Resolved entry map (after glob expansion) */entry: Record<string, string>; /** Original entry config before glob resolution (for watch mode re-globbing) */
|
|
2373
|
+
rawEntry?: TsdownInputOption;
|
|
2223
2374
|
nameLabel: string | undefined;
|
|
2224
2375
|
format: NormalizedFormat;
|
|
2225
2376
|
target?: string[];
|
|
@@ -2229,7 +2380,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
|
|
|
2229
2380
|
logger: Logger;
|
|
2230
2381
|
ignoreWatch: Array<string | RegExp>;
|
|
2231
2382
|
deps: ResolvedDepsConfig;
|
|
2232
|
-
css:
|
|
2383
|
+
css: ResolvedCssOptions;
|
|
2233
2384
|
dts: false | Options;
|
|
2234
2385
|
report: false | ReportOptions;
|
|
2235
2386
|
tsconfig: false | string;
|
|
@@ -2241,7 +2392,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
|
|
|
2241
2392
|
exe: false | ExeOptions;
|
|
2242
2393
|
}>; //#endregion
|
|
2243
2394
|
//#endregion
|
|
2244
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
2395
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_df9c58766eba71ed4fabe78a2cfe9dc9/node_modules/tsdown/dist/config-BJBl3n_a.d.mts
|
|
2245
2396
|
//#region src/config/options.d.ts
|
|
2246
2397
|
/**
|
|
2247
2398
|
* Resolve user config into resolved configs
|
|
@@ -2261,7 +2412,7 @@ declare function defineConfig(options: UserConfig[]): UserConfig[];
|
|
|
2261
2412
|
declare function defineConfig(options: UserConfigFn): UserConfigFn;
|
|
2262
2413
|
declare function defineConfig(options: UserConfigExport): UserConfigExport; //#endregion
|
|
2263
2414
|
//#endregion
|
|
2264
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
2415
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_df9c58766eba71ed4fabe78a2cfe9dc9/node_modules/tsdown/dist/index.d.mts
|
|
2265
2416
|
//#region src/build.d.ts
|
|
2266
2417
|
/**
|
|
2267
2418
|
* Build with tsdown.
|
|
@@ -2277,4 +2428,4 @@ declare function buildWithConfigs(configs: ResolvedConfig[], configFiles: string
|
|
|
2277
2428
|
//#region src/features/debug.d.ts
|
|
2278
2429
|
declare function enableDebug(debug?: boolean | Arrayable<string>): void; //#endregion
|
|
2279
2430
|
//#endregion
|
|
2280
|
-
export { AttwOptions, BuildContext, CIOption, ChunkAddon, ChunkAddonFunction, ChunkAddonObject, CopyEntry, CopyOptions, CopyOptionsFn, CssOptions, DepsConfig, DevtoolsOptions, Options as DtsOptions, ExeOptions, ExportsOptions, Format, InlineConfig, type Logger, NoExternalFn, NormalizedFormat, OutExtensionContext, OutExtensionFactory, OutExtensionObject, PackageJsonWithPath, PackageType, PublintOptions, ReportOptions, ResolvedConfig, ResolvedDepsConfig, Rolldown, RolldownChunk, RolldownContext, SeaConfig, Sourcemap, TreeshakingOptions, TsdownBundle, TsdownHooks, TsdownInputOption, Options$1 as UnusedOptions, UserConfig, UserConfigExport, UserConfigFn, WithEnabled, Workspace, build$1 as build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig };
|
|
2431
|
+
export { AttwOptions, BuildContext, CIOption, ChunkAddon, ChunkAddonFunction, ChunkAddonObject, CopyEntry, CopyOptions, CopyOptionsFn, CssOptions, DepsConfig, DevtoolsOptions, Options as DtsOptions, ExeOptions, ExportsOptions, Format, InlineConfig, LessPreprocessorOptions, LightningCSSOptions, type Logger, NoExternalFn, NormalizedFormat, OutExtensionContext, OutExtensionFactory, OutExtensionObject, PackageJsonWithPath, PackageType, PreprocessorOptions, PublintOptions, ReportOptions, ResolvedConfig, ResolvedCssOptions, ResolvedDepsConfig, Rolldown, RolldownChunk, RolldownContext, SassPreprocessorOptions, SeaConfig, Sourcemap, StylusPreprocessorOptions, TreeshakingOptions, TsdownBundle, TsdownHooks, TsdownInputOption, Options$1 as UnusedOptions, UserConfig, UserConfigExport, UserConfigFn, WithEnabled, Workspace, build$1 as build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig };
|
package/dist/tsdown/index.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./node-
|
|
3
|
-
import { t as enableDebug } from "./debug-
|
|
4
|
-
import "./filename-
|
|
5
|
-
import { i as resolveUserConfig, n as buildWithConfigs, r as mergeConfig, t as build$1 } from "./build-
|
|
1
|
+
import { c as globalLogger } from "./main-DYgM-9Cb.js";
|
|
2
|
+
import "./node-B3Gdtau1.js";
|
|
3
|
+
import { t as enableDebug } from "./debug-tOJ_PtrM-C-Do1Twv.js";
|
|
4
|
+
import "./filename-BDcjeHGl.js";
|
|
5
|
+
import { i as resolveUserConfig, n as buildWithConfigs, r as mergeConfig, t as build$1 } from "./build-TmLngPCw-CBoVPzkZ.js";
|
|
6
6
|
import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
|
|
7
|
-
|
|
8
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.0-beta.2_@arethetypeswrong+core@0.18.2_@typescript+native-preview@7.0.0-dev_d0d0ed2124937ee9dd401a280008a3bf/node_modules/tsdown/dist/config.mjs
|
|
7
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_df9c58766eba71ed4fabe78a2cfe9dc9/node_modules/tsdown/dist/config.mjs
|
|
9
8
|
function defineConfig(options) {
|
|
10
9
|
return options;
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
//#endregion
|
|
14
|
-
export { Rolldown, build$1 as build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig };
|
|
12
|
+
export { Rolldown, build$1 as build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig };
|
|
@@ -1,15 +1,76 @@
|
|
|
1
|
-
import { r as __toESM, t as __commonJSMin } from "./chunk-
|
|
1
|
+
import { r as __toESM, t as __commonJSMin } from "./chunk-CSNpwdVU.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
|
-
import process$1, { cwd } from "node:process";
|
|
4
3
|
import { pathToFileURL } from "node:url";
|
|
4
|
+
import process$1, { cwd } from "node:process";
|
|
5
5
|
import readline from "node:readline";
|
|
6
6
|
import { createRequire as createRequire$1 } from "module";
|
|
7
7
|
import { spawn } from "node:child_process";
|
|
8
8
|
import { delimiter, dirname, normalize, resolve } from "node:path";
|
|
9
9
|
import { PassThrough } from "node:stream";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const picomatch = createRequire(import.meta.url)("./npm_entry_picomatch.cjs");
|
|
11
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
12
|
+
function toArray(val, defaultValue) {
|
|
13
|
+
if (Array.isArray(val)) return val;
|
|
14
|
+
else if (val == null) {
|
|
15
|
+
if (defaultValue) return [defaultValue];
|
|
16
|
+
return [];
|
|
17
|
+
} else return [val];
|
|
18
|
+
}
|
|
19
|
+
function resolveComma(arr) {
|
|
20
|
+
return arr.flatMap((format) => format.split(","));
|
|
21
|
+
}
|
|
22
|
+
function resolveRegex(str) {
|
|
23
|
+
if (typeof str === "string" && str.length > 2 && str[0] === "/" && str.at(-1) === "/") return new RegExp(str.slice(1, -1));
|
|
24
|
+
return str;
|
|
25
|
+
}
|
|
26
|
+
function slash(string) {
|
|
27
|
+
return string.replaceAll("\\", "/");
|
|
28
|
+
}
|
|
29
|
+
const noop = (v) => v;
|
|
30
|
+
function matchPattern(id, patterns) {
|
|
31
|
+
return patterns.some((pattern) => {
|
|
32
|
+
if (pattern instanceof RegExp) {
|
|
33
|
+
pattern.lastIndex = 0;
|
|
34
|
+
return pattern.test(id);
|
|
35
|
+
}
|
|
36
|
+
return id === pattern || picomatch(pattern)(id);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function pkgExists(moduleName) {
|
|
40
|
+
try {
|
|
41
|
+
import.meta.resolve(moduleName);
|
|
42
|
+
return true;
|
|
43
|
+
} catch {}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
async function importWithError(moduleName, resolvePaths) {
|
|
47
|
+
let resolved;
|
|
48
|
+
if (resolvePaths) resolved = pathToFileURL(__require.resolve(moduleName, { paths: resolvePaths })).href;
|
|
49
|
+
try {
|
|
50
|
+
return await import(resolved || moduleName);
|
|
51
|
+
} catch (error) {
|
|
52
|
+
throw new Error(`Failed to import module "${moduleName}". Please ensure it is installed.`, { cause: error });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function promiseWithResolvers() {
|
|
56
|
+
let resolve;
|
|
57
|
+
return {
|
|
58
|
+
promise: new Promise((res) => {
|
|
59
|
+
resolve = res;
|
|
60
|
+
}),
|
|
61
|
+
resolve
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function debounce(fn, delay) {
|
|
65
|
+
let timer;
|
|
66
|
+
const debounced = (...args) => {
|
|
67
|
+
clearTimeout(timer);
|
|
68
|
+
timer = setTimeout(() => fn(...args), delay);
|
|
69
|
+
};
|
|
70
|
+
debounced.cancel = () => clearTimeout(timer);
|
|
71
|
+
return debounced;
|
|
72
|
+
}
|
|
73
|
+
const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, 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) => {
|
|
13
74
|
let e, t, r, { defineProperty: l, setPrototypeOf: n, create: o, keys: s } = Object, i = "", { round: c, max: a } = Math, p = (e) => {
|
|
14
75
|
let t = /([a-f\d]{3,6})/i.exec(e)?.[1], r = t?.length, l = parseInt(6 ^ r ? 3 ^ r ? "0" : t[0] + t[0] + t[1] + t[1] + t[2] + t[2] : t, 16);
|
|
15
76
|
return [
|
|
@@ -110,79 +171,9 @@ var require_ansis = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
110
171
|
})), s.extend(I);
|
|
111
172
|
}();
|
|
112
173
|
module.exports = w, w.default = w;
|
|
113
|
-
}));
|
|
114
|
-
|
|
174
|
+
})))(), 1)).default;
|
|
115
175
|
//#endregion
|
|
116
|
-
//#region ../../node_modules/.pnpm/
|
|
117
|
-
var import_ansis = /* @__PURE__ */ __toESM(require_ansis(), 1);
|
|
118
|
-
const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, 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 } = import_ansis.default;
|
|
119
|
-
|
|
120
|
-
//#endregion
|
|
121
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.0-beta.2_@arethetypeswrong+core@0.18.2_@typescript+native-preview@7.0.0-dev_d0d0ed2124937ee9dd401a280008a3bf/node_modules/tsdown/dist/logger-JoV-m1IK.mjs
|
|
122
|
-
const __cjs_require = createRequire(import.meta.url);
|
|
123
|
-
const picomatch = __cjs_require("./npm_entry_picomatch.cjs");
|
|
124
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
125
|
-
function toArray(val, defaultValue) {
|
|
126
|
-
if (Array.isArray(val)) return val;
|
|
127
|
-
else if (val == null) {
|
|
128
|
-
if (defaultValue) return [defaultValue];
|
|
129
|
-
return [];
|
|
130
|
-
} else return [val];
|
|
131
|
-
}
|
|
132
|
-
function resolveComma(arr) {
|
|
133
|
-
return arr.flatMap((format) => format.split(","));
|
|
134
|
-
}
|
|
135
|
-
function resolveRegex(str) {
|
|
136
|
-
if (typeof str === "string" && str.length > 2 && str[0] === "/" && str.at(-1) === "/") return new RegExp(str.slice(1, -1));
|
|
137
|
-
return str;
|
|
138
|
-
}
|
|
139
|
-
function slash(string) {
|
|
140
|
-
return string.replaceAll("\\", "/");
|
|
141
|
-
}
|
|
142
|
-
const noop = (v) => v;
|
|
143
|
-
function matchPattern(id, patterns) {
|
|
144
|
-
return patterns.some((pattern) => {
|
|
145
|
-
if (pattern instanceof RegExp) {
|
|
146
|
-
pattern.lastIndex = 0;
|
|
147
|
-
return pattern.test(id);
|
|
148
|
-
}
|
|
149
|
-
return id === pattern || picomatch(pattern)(id);
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
function pkgExists(moduleName) {
|
|
153
|
-
try {
|
|
154
|
-
import.meta.resolve(moduleName);
|
|
155
|
-
return true;
|
|
156
|
-
} catch {}
|
|
157
|
-
return false;
|
|
158
|
-
}
|
|
159
|
-
async function importWithError(moduleName, resolvePaths) {
|
|
160
|
-
let resolved;
|
|
161
|
-
if (resolvePaths) resolved = pathToFileURL(__require.resolve(moduleName, { paths: resolvePaths })).href;
|
|
162
|
-
try {
|
|
163
|
-
return await import(resolved || moduleName);
|
|
164
|
-
} catch (error) {
|
|
165
|
-
throw new Error(`Failed to import module "${moduleName}". Please ensure it is installed.`, { cause: error });
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
function promiseWithResolvers() {
|
|
169
|
-
let resolve;
|
|
170
|
-
return {
|
|
171
|
-
promise: new Promise((res) => {
|
|
172
|
-
resolve = res;
|
|
173
|
-
}),
|
|
174
|
-
resolve
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
function debounce(fn, delay) {
|
|
178
|
-
let timer;
|
|
179
|
-
const debounced = (...args) => {
|
|
180
|
-
clearTimeout(timer);
|
|
181
|
-
timer = setTimeout(() => fn(...args), delay);
|
|
182
|
-
};
|
|
183
|
-
debounced.cancel = () => clearTimeout(timer);
|
|
184
|
-
return debounced;
|
|
185
|
-
}
|
|
176
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_df9c58766eba71ed4fabe78a2cfe9dc9/node_modules/tsdown/dist/logger-BU0v7CAk.mjs
|
|
186
177
|
const LogLevels = {
|
|
187
178
|
silent: 0,
|
|
188
179
|
error: 1,
|
|
@@ -305,11 +296,9 @@ function hue2rgb(p, q, t) {
|
|
|
305
296
|
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
306
297
|
return p;
|
|
307
298
|
}
|
|
308
|
-
|
|
309
299
|
//#endregion
|
|
310
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
311
|
-
var version = "0.21.0
|
|
312
|
-
|
|
300
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_df9c58766eba71ed4fabe78a2cfe9dc9/node_modules/tsdown/dist/package-BzvC5Wbf.mjs
|
|
301
|
+
var version = "0.21.0";
|
|
313
302
|
//#endregion
|
|
314
303
|
//#region ../../node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.js
|
|
315
304
|
var l = Object.create;
|
|
@@ -928,6 +917,5 @@ const K = (e, t, n) => {
|
|
|
928
917
|
return r;
|
|
929
918
|
};
|
|
930
919
|
const q = K;
|
|
931
|
-
|
|
932
920
|
//#endregion
|
|
933
|
-
export {
|
|
921
|
+
export { resolveComma as C, toArray as E, promiseWithResolvers as S, slash as T, debounce as _, createLogger as a, noop as b, globalLogger as c, bold as d, dim as f, yellow as g, underline as h, LogLevels as i, prettyFormat as l, red as m, q as n, generateColor as o, green as p, version as r, getNameLabel as s, K as t, blue as u, importWithError as v, resolveRegex as w, pkgExists as x, matchPattern as y };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { isatty } from "node:tty";
|
|
2
2
|
import { formatWithOptions, inspect } from "node:util";
|
|
3
|
-
|
|
4
3
|
//#region ../../node_modules/.pnpm/obug@2.1.1/node_modules/obug/dist/core.js
|
|
5
4
|
function coerce(value) {
|
|
6
5
|
if (value instanceof Error) return value.stack || value.message;
|
|
@@ -116,7 +115,6 @@ function enabled(name) {
|
|
|
116
115
|
for (const ns of names) if (matchesTemplate(name, ns)) return true;
|
|
117
116
|
return false;
|
|
118
117
|
}
|
|
119
|
-
|
|
120
118
|
//#endregion
|
|
121
119
|
//#region ../../node_modules/.pnpm/obug@2.1.1/node_modules/obug/dist/node.js
|
|
122
120
|
const colors = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2 ? [
|
|
@@ -266,6 +264,5 @@ function enable(namespaces$1) {
|
|
|
266
264
|
enable$1(namespaces$1);
|
|
267
265
|
}
|
|
268
266
|
enable$1(process.env.DEBUG || "");
|
|
269
|
-
|
|
270
267
|
//#endregion
|
|
271
|
-
export { enable as n, namespaces as r, createDebug as t };
|
|
268
|
+
export { enable as n, namespaces as r, createDebug as t };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
//#region \0rolldown/runtime.js
|
|
2
2
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
3
|
-
|
|
4
3
|
//#endregion
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
4
|
+
Object.defineProperty(exports, "__commonJSMin", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: function() {
|
|
7
|
+
return __commonJSMin;
|
|
8
|
+
}
|
|
9
|
+
});
|