@voidzero-dev/vite-plus-core 0.1.1-alpha.0 → 0.1.2
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 +1 -1
- package/dist/rolldown/config.d.mts +0 -1
- package/dist/rolldown/filter-index.d.mts +0 -1
- package/dist/rolldown/index.mjs +1 -1
- package/dist/rolldown/parallel-plugin.d.mts +0 -1
- package/dist/rolldown/shared/{watch-Cn-znpX_.mjs → watch-CVufTfok.mjs} +1 -1
- package/dist/tsdown/{build-BjQ7Rt90-tMPZTflz.js → build-TmLngPCw-I7MHSf0I.js} +269 -188
- package/dist/tsdown/build-gOkJM1H9-BRI3DQle.js +6 -0
- package/dist/tsdown/{debug-BUVkFfEZ-D3UMJnif.js → debug-tOJ_PtrM-DITcI9An.js} +2 -2
- package/dist/tsdown/{detect-CCATtVj7-DhvBg5EF.js → detect-DK-FDZQ9-CALXiuJa.js} +1 -1
- package/dist/tsdown/{dist-CFTDWtv2.js → dist-DVPyDO-_.js} +5 -2
- package/dist/tsdown/{dist-DNcnO8LL.js → dist-uzMTIu3J.js} +488 -521
- package/dist/tsdown/{filename-CPj0AKvV.js → filename-C2azOotK.js} +2 -2
- package/dist/tsdown/{index-node-ShM0x2b6-Bt7Chc0I.js → index-node-Djp92Gzb-fgHTblzo.js} +1 -1
- package/dist/tsdown/index-types.d.ts +175 -25
- package/dist/tsdown/index.js +5 -5
- package/dist/tsdown/{main-B3qcLRNf.js → main-BWoReXjl.js} +72 -69
- package/dist/tsdown/npm_cjs_chunk_lt.cjs +31 -0
- package/dist/tsdown/npm_cjs_chunk_range.cjs +7 -22
- package/dist/tsdown/npm_cjs_chunk_semver.cjs +17 -17
- package/dist/tsdown/npm_entry_semver_functions_lt.cjs +7 -0
- package/dist/tsdown/npm_entry_semver_functions_satisfies.cjs +2 -1
- package/dist/tsdown/npm_entry_semver_ranges_min-version.cjs +2 -1
- package/dist/tsdown/{resolver-j7HY1N36-DHVsN9q6.js → resolver-CdD-yT15-OWjlgV0D.js} +1 -1
- package/dist/tsdown/run.js +209 -68
- package/dist/tsdown/{tsc-CBjlgM2A.js → tsc-D6YfZJBZ.js} +62 -67
- package/dist/tsdown/{tsc-context-D1h5oZB8.js → tsc-context-CGmk4Cps.js} +1 -1
- package/package.json +12 -8
- package/dist/tsdown/build-2oRq4mfQ-YC_gzK3u.js +0 -6
|
@@ -1,13 +1,13 @@
|
|
|
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
3
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.22.
|
|
4
|
+
//#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
5
|
const RE_JS = /\.([cm]?)jsx?$/;
|
|
6
6
|
const RE_TS = /\.([cm]?)tsx?$/;
|
|
7
7
|
const RE_DTS = /\.d\.([cm]?)ts$/;
|
|
8
8
|
const RE_DTS_MAP = /\.d\.([cm]?)ts\.map$/;
|
|
9
9
|
const RE_NODE_MODULES = /[\\/]node_modules[\\/]/;
|
|
10
|
-
const RE_CSS = /\.css$/;
|
|
10
|
+
const RE_CSS = /\.(?:css|scss|sass|less|styl|stylus)$/;
|
|
11
11
|
const RE_VUE = /\.vue$/;
|
|
12
12
|
const RE_JSON = /\.json$/;
|
|
13
13
|
const RE_ROLLDOWN_RUNTIME = exactRegex(RUNTIME_MODULE_ID);
|
|
@@ -5,7 +5,7 @@ import fs from "node:fs/promises";
|
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import zlib from "node:zlib";
|
|
7
7
|
|
|
8
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
8
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_743816f26d68021f6369d2afb428dae9/node_modules/tsdown/dist/index-node-Djp92Gzb.mjs
|
|
9
9
|
/** @type {import('../index.d.ts').pack} */
|
|
10
10
|
async function pack(dir, opts) {
|
|
11
11
|
const packageManager = opts?.packageManager ?? "npm";
|
|
@@ -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
|
/**
|
|
@@ -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
|
/**
|
|
@@ -1109,7 +1145,7 @@ interface Options$1 {
|
|
|
1109
1145
|
depKinds?: Array<DepKind>;
|
|
1110
1146
|
}
|
|
1111
1147
|
//#endregion
|
|
1112
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
1148
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_743816f26d68021f6369d2afb428dae9/node_modules/tsdown/dist/types-DS6cAXR1.d.mts
|
|
1113
1149
|
//#region src/utils/types.d.ts
|
|
1114
1150
|
type Overwrite<T, U> = Omit<T, keyof U> & U;
|
|
1115
1151
|
type Awaitable<T> = T | Promise<T>;
|
|
@@ -1150,7 +1186,7 @@ interface CssOptions {
|
|
|
1150
1186
|
* Enable/disable CSS code splitting.
|
|
1151
1187
|
* When set to `false`, all CSS in the entire project will be extracted into a single CSS file.
|
|
1152
1188
|
* When set to `true`, CSS imported in async JS chunks will be preserved as chunks.
|
|
1153
|
-
* @default
|
|
1189
|
+
* @default false
|
|
1154
1190
|
*/
|
|
1155
1191
|
splitting?: boolean;
|
|
1156
1192
|
/**
|
|
@@ -1158,6 +1194,121 @@ interface CssOptions {
|
|
|
1158
1194
|
* @default 'style.css'
|
|
1159
1195
|
*/
|
|
1160
1196
|
fileName?: string;
|
|
1197
|
+
/**
|
|
1198
|
+
* Set the target environment for CSS syntax lowering.
|
|
1199
|
+
* Accepts esbuild-style target strings (e.g., `'chrome99'`, `'safari16.2'`).
|
|
1200
|
+
* Defaults to the top-level `target` option.
|
|
1201
|
+
*
|
|
1202
|
+
* Requires `@tsdown/css` to be installed.
|
|
1203
|
+
*
|
|
1204
|
+
* @see https://vite.dev/config/build-options#build-csstarget
|
|
1205
|
+
*/
|
|
1206
|
+
target?: string | string[] | false;
|
|
1207
|
+
/**
|
|
1208
|
+
* Options for CSS preprocessors (Sass/Less/Stylus).
|
|
1209
|
+
*
|
|
1210
|
+
* In addition to options specific to each processor, `additionalData` option
|
|
1211
|
+
* can be used to inject extra code for each style content.
|
|
1212
|
+
*
|
|
1213
|
+
* Requires `@tsdown/css` to be installed.
|
|
1214
|
+
*/
|
|
1215
|
+
preprocessorOptions?: PreprocessorOptions;
|
|
1216
|
+
/**
|
|
1217
|
+
* Enable/disable CSS minification.
|
|
1218
|
+
*
|
|
1219
|
+
* Requires `@tsdown/css` to be installed.
|
|
1220
|
+
*
|
|
1221
|
+
* @default false
|
|
1222
|
+
*/
|
|
1223
|
+
minify?: boolean;
|
|
1224
|
+
/**
|
|
1225
|
+
* Lightning CSS options for CSS syntax lowering and transformations.
|
|
1226
|
+
*
|
|
1227
|
+
* Requires `@tsdown/css` to be installed.
|
|
1228
|
+
*/
|
|
1229
|
+
lightningcss?: LightningCSSOptions;
|
|
1230
|
+
/**
|
|
1231
|
+
* PostCSS configuration.
|
|
1232
|
+
*
|
|
1233
|
+
* - `string`: Path to the directory to search for PostCSS config files.
|
|
1234
|
+
* - `object`: Inline PostCSS options with optional `plugins` array.
|
|
1235
|
+
* - Omitted: Auto-detect PostCSS config from the project root.
|
|
1236
|
+
*
|
|
1237
|
+
* Only used when `transformer` is `'postcss'`.
|
|
1238
|
+
* Requires `postcss` and `@tsdown/css` to be installed.
|
|
1239
|
+
*
|
|
1240
|
+
* @see https://github.com/postcss/postcss
|
|
1241
|
+
*/
|
|
1242
|
+
postcss?: PostCSSOptions;
|
|
1243
|
+
/**
|
|
1244
|
+
* CSS transformer to use. Controls how CSS is processed:
|
|
1245
|
+
*
|
|
1246
|
+
* - `'lightningcss'` (default): `@import` handled by Lightning CSS
|
|
1247
|
+
* `bundleAsync()`, PostCSS is **not** used at all.
|
|
1248
|
+
* - `'postcss'`: `@import` handled by `postcss-import`,
|
|
1249
|
+
* PostCSS plugins applied, Lightning CSS used only for final
|
|
1250
|
+
* targets/minify transform.
|
|
1251
|
+
*
|
|
1252
|
+
* Requires `@tsdown/css` to be installed.
|
|
1253
|
+
*
|
|
1254
|
+
* @default 'lightningcss'
|
|
1255
|
+
* @see https://vite.dev/config/shared-options#css-transformer
|
|
1256
|
+
*/
|
|
1257
|
+
transformer?: "postcss" | "lightningcss";
|
|
1258
|
+
}
|
|
1259
|
+
type PostCSSOptions = string | (Record<string, any> & {
|
|
1260
|
+
plugins?: any[];
|
|
1261
|
+
});
|
|
1262
|
+
interface PreprocessorOptions {
|
|
1263
|
+
scss?: SassPreprocessorOptions;
|
|
1264
|
+
sass?: SassPreprocessorOptions;
|
|
1265
|
+
less?: LessPreprocessorOptions;
|
|
1266
|
+
styl?: StylusPreprocessorOptions;
|
|
1267
|
+
stylus?: StylusPreprocessorOptions;
|
|
1268
|
+
}
|
|
1269
|
+
type PreprocessorAdditionalDataResult = string | {
|
|
1270
|
+
content: string;
|
|
1271
|
+
map?: any;
|
|
1272
|
+
};
|
|
1273
|
+
type PreprocessorAdditionalData = string | ((source: string, filename: string) => PreprocessorAdditionalDataResult | Promise<PreprocessorAdditionalDataResult>);
|
|
1274
|
+
interface SassPreprocessorOptions {
|
|
1275
|
+
additionalData?: PreprocessorAdditionalData;
|
|
1276
|
+
[key: string]: any;
|
|
1277
|
+
}
|
|
1278
|
+
interface LessPreprocessorOptions {
|
|
1279
|
+
additionalData?: PreprocessorAdditionalData;
|
|
1280
|
+
math?: any;
|
|
1281
|
+
paths?: string[];
|
|
1282
|
+
plugins?: any[];
|
|
1283
|
+
[key: string]: any;
|
|
1284
|
+
}
|
|
1285
|
+
interface StylusPreprocessorOptions {
|
|
1286
|
+
additionalData?: PreprocessorAdditionalData;
|
|
1287
|
+
define?: Record<string, any>;
|
|
1288
|
+
paths?: string[];
|
|
1289
|
+
[key: string]: any;
|
|
1290
|
+
}
|
|
1291
|
+
type LightningCSSOptions = Record<string, any>;
|
|
1292
|
+
interface ResolvedCssOptions {
|
|
1293
|
+
transformer: "postcss" | "lightningcss";
|
|
1294
|
+
splitting: boolean;
|
|
1295
|
+
fileName: string;
|
|
1296
|
+
minify: boolean;
|
|
1297
|
+
target?: string[];
|
|
1298
|
+
preprocessorOptions?: PreprocessorOptions;
|
|
1299
|
+
lightningcss?: LightningCSSOptions;
|
|
1300
|
+
postcss?: PostCSSOptions;
|
|
1301
|
+
}
|
|
1302
|
+
//#endregion
|
|
1303
|
+
//#region src/utils/chunks.d.ts
|
|
1304
|
+
type RolldownChunk = (OutputChunk | OutputAsset) & {
|
|
1305
|
+
outDir: string;
|
|
1306
|
+
};
|
|
1307
|
+
type ChunksByFormat = Partial<Record<NormalizedFormat, RolldownChunk[]>>;
|
|
1308
|
+
interface TsdownBundle extends AsyncDisposable {
|
|
1309
|
+
chunks: RolldownChunk[];
|
|
1310
|
+
config: ResolvedConfig;
|
|
1311
|
+
inlinedDeps: Map<string, Set<string>>;
|
|
1161
1312
|
} //#endregion
|
|
1162
1313
|
//#region src/utils/logger.d.ts
|
|
1163
1314
|
type LogType = "error" | "warn" | "info";
|
|
@@ -1233,8 +1384,12 @@ interface DevtoolsOptions extends NonNullable<InputOptions["devtools"]> {
|
|
|
1233
1384
|
clean?: boolean;
|
|
1234
1385
|
} //#endregion
|
|
1235
1386
|
//#region src/features/exe.d.ts
|
|
1236
|
-
interface ExeOptions {
|
|
1387
|
+
interface ExeOptions extends ExeExtensionOptions {
|
|
1237
1388
|
seaConfig?: Omit<SeaConfig, "main" | "output" | "mainFormat">;
|
|
1389
|
+
/**
|
|
1390
|
+
* Output file name without any suffix or extension.
|
|
1391
|
+
* For example, do not include `.exe`, platform suffixes, or architecture suffixes.
|
|
1392
|
+
*/
|
|
1238
1393
|
fileName?: string | ((chunk: RolldownChunk) => string);
|
|
1239
1394
|
}
|
|
1240
1395
|
/**
|
|
@@ -1666,15 +1821,6 @@ interface AttwOptions extends CheckPackageOptions {
|
|
|
1666
1821
|
*/
|
|
1667
1822
|
ignoreRules?: string[];
|
|
1668
1823
|
} //#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
1824
|
//#region src/features/pkg/exports.d.ts
|
|
1679
1825
|
interface ExportsOptions {
|
|
1680
1826
|
/**
|
|
@@ -1738,6 +1884,14 @@ interface ExportsOptions {
|
|
|
1738
1884
|
chunks: ChunksByFormat;
|
|
1739
1885
|
isPublish: boolean;
|
|
1740
1886
|
}) => Awaitable<Record<string, any>>);
|
|
1887
|
+
/**
|
|
1888
|
+
* Generate `inlinedDependencies` field in package.json.
|
|
1889
|
+
* Lists dependencies that are physically inlined into the bundle with their exact versions.
|
|
1890
|
+
*
|
|
1891
|
+
* @default true
|
|
1892
|
+
* @see {@link https://github.com/e18e/ecosystem-issues/issues/237}
|
|
1893
|
+
*/
|
|
1894
|
+
inlinedDependencies?: boolean;
|
|
1741
1895
|
} //#endregion
|
|
1742
1896
|
//#region src/features/pkg/publint.d.ts
|
|
1743
1897
|
interface PublintOptions extends Omit<Options$2, "pack" | "pkgDir"> {} //#endregion
|
|
@@ -1985,11 +2139,6 @@ interface UserConfig {
|
|
|
1985
2139
|
* - `umd`: UMD
|
|
1986
2140
|
*
|
|
1987
2141
|
* 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
2142
|
*/
|
|
1994
2143
|
format?: Format | Format[] | Partial<Record<Format, Partial<ResolvedConfig>>>;
|
|
1995
2144
|
globalName?: string;
|
|
@@ -2190,7 +2339,7 @@ interface UserConfig {
|
|
|
2190
2339
|
* **[experimental]** Bundle as executable using Node.js SEA (Single Executable Applications).
|
|
2191
2340
|
*
|
|
2192
2341
|
* 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.
|
|
2342
|
+
* Note that this is only supported on Node.js 25.7.0 and later, and is not supported in Bun or Deno.
|
|
2194
2343
|
*/
|
|
2195
2344
|
exe?: WithEnabled<ExeOptions>;
|
|
2196
2345
|
/**
|
|
@@ -2219,7 +2368,8 @@ type UserConfigFn = (inlineConfig: InlineConfig, context: {
|
|
|
2219
2368
|
}) => Awaitable<Arrayable<UserConfig>>;
|
|
2220
2369
|
type UserConfigExport = Awaitable<Arrayable<UserConfig> | UserConfigFn>;
|
|
2221
2370
|
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>;
|
|
2371
|
+
/** Resolved entry map (after glob expansion) */entry: Record<string, string>; /** Original entry config before glob resolution (for watch mode re-globbing) */
|
|
2372
|
+
rawEntry?: TsdownInputOption;
|
|
2223
2373
|
nameLabel: string | undefined;
|
|
2224
2374
|
format: NormalizedFormat;
|
|
2225
2375
|
target?: string[];
|
|
@@ -2229,7 +2379,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
|
|
|
2229
2379
|
logger: Logger;
|
|
2230
2380
|
ignoreWatch: Array<string | RegExp>;
|
|
2231
2381
|
deps: ResolvedDepsConfig;
|
|
2232
|
-
css:
|
|
2382
|
+
css: ResolvedCssOptions;
|
|
2233
2383
|
dts: false | Options;
|
|
2234
2384
|
report: false | ReportOptions;
|
|
2235
2385
|
tsconfig: false | string;
|
|
@@ -2241,7 +2391,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
|
|
|
2241
2391
|
exe: false | ExeOptions;
|
|
2242
2392
|
}>; //#endregion
|
|
2243
2393
|
//#endregion
|
|
2244
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
2394
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_743816f26d68021f6369d2afb428dae9/node_modules/tsdown/dist/config-BJBl3n_a.d.mts
|
|
2245
2395
|
//#region src/config/options.d.ts
|
|
2246
2396
|
/**
|
|
2247
2397
|
* Resolve user config into resolved configs
|
|
@@ -2261,7 +2411,7 @@ declare function defineConfig(options: UserConfig[]): UserConfig[];
|
|
|
2261
2411
|
declare function defineConfig(options: UserConfigFn): UserConfigFn;
|
|
2262
2412
|
declare function defineConfig(options: UserConfigExport): UserConfigExport; //#endregion
|
|
2263
2413
|
//#endregion
|
|
2264
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
2414
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_743816f26d68021f6369d2afb428dae9/node_modules/tsdown/dist/index.d.mts
|
|
2265
2415
|
//#region src/build.d.ts
|
|
2266
2416
|
/**
|
|
2267
2417
|
* Build with tsdown.
|
|
@@ -2277,4 +2427,4 @@ declare function buildWithConfigs(configs: ResolvedConfig[], configFiles: string
|
|
|
2277
2427
|
//#region src/features/debug.d.ts
|
|
2278
2428
|
declare function enableDebug(debug?: boolean | Arrayable<string>): void; //#endregion
|
|
2279
2429
|
//#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 };
|
|
2430
|
+
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,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as globalLogger } from "./main-BWoReXjl.js";
|
|
2
2
|
import "./node-Ba_UB_xO.js";
|
|
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-
|
|
3
|
+
import { t as enableDebug } from "./debug-tOJ_PtrM-DITcI9An.js";
|
|
4
|
+
import "./filename-C2azOotK.js";
|
|
5
|
+
import { i as resolveUserConfig, n as buildWithConfigs, r as mergeConfig, t as build$1 } from "./build-TmLngPCw-I7MHSf0I.js";
|
|
6
6
|
import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
|
|
7
7
|
|
|
8
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
8
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_743816f26d68021f6369d2afb428dae9/node_modules/tsdown/dist/config.mjs
|
|
9
9
|
function defineConfig(options) {
|
|
10
10
|
return options;
|
|
11
11
|
}
|
|
@@ -1,13 +1,80 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./chunk-CdeBBKNj.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
10
|
|
|
11
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_743816f26d68021f6369d2afb428dae9/node_modules/tsdown/dist/general-CRszZCrY.mjs
|
|
12
|
+
const __cjs_require = createRequire(import.meta.url);
|
|
13
|
+
const picomatch = __cjs_require("./npm_entry_picomatch.cjs");
|
|
14
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
15
|
+
function toArray(val, defaultValue) {
|
|
16
|
+
if (Array.isArray(val)) return val;
|
|
17
|
+
else if (val == null) {
|
|
18
|
+
if (defaultValue) return [defaultValue];
|
|
19
|
+
return [];
|
|
20
|
+
} else return [val];
|
|
21
|
+
}
|
|
22
|
+
function resolveComma(arr) {
|
|
23
|
+
return arr.flatMap((format) => format.split(","));
|
|
24
|
+
}
|
|
25
|
+
function resolveRegex(str) {
|
|
26
|
+
if (typeof str === "string" && str.length > 2 && str[0] === "/" && str.at(-1) === "/") return new RegExp(str.slice(1, -1));
|
|
27
|
+
return str;
|
|
28
|
+
}
|
|
29
|
+
function slash(string) {
|
|
30
|
+
return string.replaceAll("\\", "/");
|
|
31
|
+
}
|
|
32
|
+
const noop = (v) => v;
|
|
33
|
+
function matchPattern(id, patterns) {
|
|
34
|
+
return patterns.some((pattern) => {
|
|
35
|
+
if (pattern instanceof RegExp) {
|
|
36
|
+
pattern.lastIndex = 0;
|
|
37
|
+
return pattern.test(id);
|
|
38
|
+
}
|
|
39
|
+
return id === pattern || picomatch(pattern)(id);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function pkgExists(moduleName) {
|
|
43
|
+
try {
|
|
44
|
+
import.meta.resolve(moduleName);
|
|
45
|
+
return true;
|
|
46
|
+
} catch {}
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
async function importWithError(moduleName, resolvePaths) {
|
|
50
|
+
let resolved;
|
|
51
|
+
if (resolvePaths) resolved = pathToFileURL(__require.resolve(moduleName, { paths: resolvePaths })).href;
|
|
52
|
+
try {
|
|
53
|
+
return await import(resolved || moduleName);
|
|
54
|
+
} catch (error) {
|
|
55
|
+
throw new Error(`Failed to import module "${moduleName}". Please ensure it is installed.`, { cause: error });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function promiseWithResolvers() {
|
|
59
|
+
let resolve;
|
|
60
|
+
return {
|
|
61
|
+
promise: new Promise((res) => {
|
|
62
|
+
resolve = res;
|
|
63
|
+
}),
|
|
64
|
+
resolve
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function debounce(fn, delay) {
|
|
68
|
+
let timer;
|
|
69
|
+
const debounced = (...args) => {
|
|
70
|
+
clearTimeout(timer);
|
|
71
|
+
timer = setTimeout(() => fn(...args), delay);
|
|
72
|
+
};
|
|
73
|
+
debounced.cancel = () => clearTimeout(timer);
|
|
74
|
+
return debounced;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
11
78
|
//#region ../../node_modules/.pnpm/ansis@4.2.0/node_modules/ansis/index.cjs
|
|
12
79
|
var require_ansis = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
13
80
|
let e, t, r, { defineProperty: l, setPrototypeOf: n, create: o, keys: s } = Object, i = "", { round: c, max: a } = Math, p = (e) => {
|
|
@@ -118,71 +185,7 @@ var import_ansis = /* @__PURE__ */ __toESM(require_ansis(), 1);
|
|
|
118
185
|
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
186
|
|
|
120
187
|
//#endregion
|
|
121
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
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
|
-
}
|
|
188
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_743816f26d68021f6369d2afb428dae9/node_modules/tsdown/dist/logger-BU0v7CAk.mjs
|
|
186
189
|
const LogLevels = {
|
|
187
190
|
silent: 0,
|
|
188
191
|
error: 1,
|
|
@@ -307,8 +310,8 @@ function hue2rgb(p, q, t) {
|
|
|
307
310
|
}
|
|
308
311
|
|
|
309
312
|
//#endregion
|
|
310
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
311
|
-
var version = "0.21.0
|
|
313
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_743816f26d68021f6369d2afb428dae9/node_modules/tsdown/dist/package-BzvC5Wbf.mjs
|
|
314
|
+
var version = "0.21.0";
|
|
312
315
|
|
|
313
316
|
//#endregion
|
|
314
317
|
//#region ../../node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.js
|
|
@@ -930,4 +933,4 @@ const K = (e, t, n) => {
|
|
|
930
933
|
const q = K;
|
|
931
934
|
|
|
932
935
|
//#endregion
|
|
933
|
-
export {
|
|
936
|
+
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 };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const require_chunk = require('./npm_cjs_chunk_chunk.cjs');
|
|
2
|
+
const require_semver$1 = require('./npm_cjs_chunk_semver.cjs');
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.js
|
|
5
|
+
var require_compare = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
6
|
+
const SemVer = require_semver$1.require_semver();
|
|
7
|
+
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
8
|
+
module.exports = compare;
|
|
9
|
+
}));
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.js
|
|
13
|
+
var require_lt = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
14
|
+
const compare = require_compare();
|
|
15
|
+
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
16
|
+
module.exports = lt;
|
|
17
|
+
}));
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
Object.defineProperty(exports, 'require_compare', {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return require_compare;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, 'require_lt', {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () {
|
|
29
|
+
return require_lt;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./npm_cjs_chunk_chunk.cjs');
|
|
2
2
|
const require_semver$1 = require('./npm_cjs_chunk_semver.cjs');
|
|
3
|
+
const require_lt$1 = require('./npm_cjs_chunk_lt.cjs');
|
|
3
4
|
|
|
4
5
|
//#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.js
|
|
5
6
|
var require_lrucache = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
@@ -34,18 +35,10 @@ var require_lrucache = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
34
35
|
module.exports = LRUCache;
|
|
35
36
|
}));
|
|
36
37
|
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.js
|
|
39
|
-
var require_compare = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
40
|
-
const SemVer = require_semver$1.require_semver();
|
|
41
|
-
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
42
|
-
module.exports = compare;
|
|
43
|
-
}));
|
|
44
|
-
|
|
45
38
|
//#endregion
|
|
46
39
|
//#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.js
|
|
47
40
|
var require_eq = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
48
|
-
const compare = require_compare();
|
|
41
|
+
const compare = require_lt$1.require_compare();
|
|
49
42
|
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
50
43
|
module.exports = eq;
|
|
51
44
|
}));
|
|
@@ -53,7 +46,7 @@ var require_eq = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
53
46
|
//#endregion
|
|
54
47
|
//#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.js
|
|
55
48
|
var require_neq = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
56
|
-
const compare = require_compare();
|
|
49
|
+
const compare = require_lt$1.require_compare();
|
|
57
50
|
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
58
51
|
module.exports = neq;
|
|
59
52
|
}));
|
|
@@ -61,7 +54,7 @@ var require_neq = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
61
54
|
//#endregion
|
|
62
55
|
//#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.js
|
|
63
56
|
var require_gt = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
64
|
-
const compare = require_compare();
|
|
57
|
+
const compare = require_lt$1.require_compare();
|
|
65
58
|
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
66
59
|
module.exports = gt;
|
|
67
60
|
}));
|
|
@@ -69,23 +62,15 @@ var require_gt = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
69
62
|
//#endregion
|
|
70
63
|
//#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.js
|
|
71
64
|
var require_gte = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
72
|
-
const compare = require_compare();
|
|
65
|
+
const compare = require_lt$1.require_compare();
|
|
73
66
|
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
74
67
|
module.exports = gte;
|
|
75
68
|
}));
|
|
76
69
|
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.js
|
|
79
|
-
var require_lt = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
80
|
-
const compare = require_compare();
|
|
81
|
-
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
82
|
-
module.exports = lt;
|
|
83
|
-
}));
|
|
84
|
-
|
|
85
70
|
//#endregion
|
|
86
71
|
//#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.js
|
|
87
72
|
var require_lte = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
88
|
-
const compare = require_compare();
|
|
73
|
+
const compare = require_lt$1.require_compare();
|
|
89
74
|
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
90
75
|
module.exports = lte;
|
|
91
76
|
}));
|
|
@@ -97,7 +82,7 @@ var require_cmp = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
97
82
|
const neq = require_neq();
|
|
98
83
|
const gt = require_gt();
|
|
99
84
|
const gte = require_gte();
|
|
100
|
-
const lt = require_lt();
|
|
85
|
+
const lt = require_lt$1.require_lt();
|
|
101
86
|
const lte = require_lte();
|
|
102
87
|
const cmp = (a, op, b, loose) => {
|
|
103
88
|
switch (op) {
|