@voidzero-dev/vite-plus-core 1.0.0-rc.0 → 1.0.0-rc.1
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 +6 -6
- package/dist/rolldown/config.d.mts +1 -1
- package/dist/rolldown/config.mjs +2 -2
- package/dist/rolldown/experimental-index.d.mts +8 -5
- package/dist/rolldown/experimental-index.mjs +14 -11
- package/dist/rolldown/experimental-runtime-types.d.ts +3 -26
- package/dist/rolldown/experimental-runtime.d.ts +3 -26
- package/dist/rolldown/experimental-runtime.mjs +4 -47
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/index.d.mts +1 -1
- package/dist/rolldown/index.mjs +4 -4
- package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
- package/dist/rolldown/parallel-plugin.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.mjs +2 -2
- package/dist/rolldown/plugins-index.d.mts +2 -2
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-BbrDfv1x.mjs → binding-BY0qR5iS.mjs} +28 -27
- package/dist/rolldown/shared/{bindingify-input-options-CbBAjvu6.mjs → bindingify-input-options-B8JHmN6_.mjs} +10 -8
- package/dist/rolldown/shared/{constructors-CmDKpWIU.d.mts → constructors-DuOq7MqW.d.mts} +1 -1
- package/dist/rolldown/shared/{constructors-D9jwEbE4.mjs → constructors-xEvVj3lN.mjs} +1 -1
- package/dist/rolldown/shared/{create-bundler-option-wxuQPB7F.mjs → create-bundler-option-COco-7P6.mjs} +93 -19
- package/dist/rolldown/shared/{define-config-BFdLpVut.d.mts → define-config-C7HCoqY8.d.mts} +11 -1
- package/dist/rolldown/shared/{error-CGhV1ebk.mjs → error-C7pxws0W.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-DOMKIWz0.mjs → load-config-DkUBnDsI.mjs} +1 -1
- package/dist/rolldown/shared/{logs-DmYCAKcW.mjs → logs-D6uA606S.mjs} +8 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-zc1bUto6.mjs → normalize-string-or-regex-F14uvr6D.mjs} +2 -2
- package/dist/rolldown/shared/{parse-6TJ5OMPh.mjs → parse-BWeE7Vr9.mjs} +1 -1
- package/dist/rolldown/shared/{resolve-tsconfig-Bf6oL9fm.mjs → resolve-tsconfig-DHwpIs5e.mjs} +2 -2
- package/dist/rolldown/shared/{rolldown-DZGaRc5R.mjs → rolldown-Bue0gNT5.mjs} +4 -4
- package/dist/rolldown/shared/{watch-CUKYWzxY.mjs → watch-RXhXN1aG.mjs} +5 -5
- package/dist/rolldown/utils-index.mjs +2 -2
- package/dist/tsdown/{build-JVmLFaZt-BN9yuB6k.js → build-JVmLFaZt-DRlLhpV3.js} +10 -8
- package/dist/tsdown/{debug-CpC4hV25-BeCITV83.js → debug-CpC4hV25-C-OYr2iI.js} +4 -3
- package/dist/tsdown/{detect-Bg-d8iUV-Cr_BRLVW.js → detect-Bg-d8iUV-Du8LljhG.js} +1 -1
- package/dist/tsdown/{dist-ByW_jJfv.js → dist-VDcV1Qyy.js} +19 -49
- package/dist/tsdown/index-types.d.ts +209 -209
- package/dist/tsdown/index.js +4 -4
- package/dist/tsdown/{main-bgV9NlwM.js → main-CyNcZUzu.js} +3 -88
- package/dist/tsdown/require-BbBF8Ii0-BDaWJgzA.js +320 -0
- package/dist/tsdown/{resolver-DE0_sy8o-UMsN-SXx.js → resolver-DE0_sy8o-Bi3xbRxi.js} +2 -3
- package/dist/tsdown/run.js +5 -4
- package/dist/tsdown/{src-D5xv98Iu.js → src-pN7Bl6zo.js} +4 -4
- package/dist/tsdown/style-DiMP8pYv-DIC5PXeH.js +88 -0
- package/dist/tsdown/{target-DgdLrXba-DaJJ11xX.js → target-DgdLrXba-DpO9JXxB.js} +6 -172
- package/dist/tsdown/{tsc-BFDF_Im9.js → tsc-BLb4pSBY.js} +8 -7
- package/dist/tsdown/tsdown-css.js +4 -5
- package/dist/tsdown/tsdown-exe.js +41 -4
- package/dist/tsdown/version-CQ98ZBpL-D6GAHapk.js +169 -0
- package/dist/vite/client/bundledDevClient.mjs +8 -42
- package/dist/vite/client/client.mjs +4 -4
- package/dist/vite/node/chunks/dist2.js +107 -104
- package/dist/vite/node/chunks/node.js +303 -100
- package/dist/vite/node/index.d.ts +4 -3
- package/package.json +14 -14
- package/dist/tsdown/internal-DTYQdXId.js +0 -3
|
@@ -2,210 +2,6 @@ import { TransformOptions } from "lightningcss";
|
|
|
2
2
|
import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
|
|
3
3
|
import { BuildOptions, ChecksOptions, ExternalOption, InputOptions, InternalModuleFormat, MinifyOptions, ModuleFormat, ModuleTypes, OutputAsset, OutputChunk, OutputOptions, Plugin, RolldownPlugin, TreeshakingOptions } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
4
4
|
import { IsolatedDeclarationsOptions } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
5
|
-
//#region ../../node_modules/.pnpm/@tsdown+exe@0.23.0_tsdown@0.23.0/node_modules/@tsdown/exe/dist/index.d.mts
|
|
6
|
-
//#region src/platform.d.ts
|
|
7
|
-
type ExePlatform = "win" | "darwin" | "linux";
|
|
8
|
-
type ExeArch = "x64" | "arm64";
|
|
9
|
-
interface ExeTarget {
|
|
10
|
-
platform: ExePlatform;
|
|
11
|
-
arch: ExeArch;
|
|
12
|
-
/**
|
|
13
|
-
* Node.js version to use for the executable.
|
|
14
|
-
*
|
|
15
|
-
* Accepts a valid semver string (e.g., `"25.7.0"`), or the special values
|
|
16
|
-
* `"latest"` / `"latest-lts"` which resolve the version automatically from
|
|
17
|
-
* {@link https://nodejs.org/dist/index.json}.
|
|
18
|
-
*
|
|
19
|
-
* The minimum required version is 25.7.0, which is when ESM entry point
|
|
20
|
-
* support was added to Node.js SEA.
|
|
21
|
-
*/
|
|
22
|
-
nodeVersion: (string & {}) | "latest" | "latest-lts" | `${string}.${string}.${string}`;
|
|
23
|
-
}
|
|
24
|
-
interface ExeExtensionOptions$1 {
|
|
25
|
-
/**
|
|
26
|
-
* Cross-platform targets for building executables.
|
|
27
|
-
* Requires `@tsdown/exe` to be installed.
|
|
28
|
-
* When specified, builds an executable for each target platform/arch combination.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* targets: [
|
|
33
|
-
* { platform: 'linux', arch: 'x64', nodeVersion: '25.7.0' },
|
|
34
|
-
* { platform: 'darwin', arch: 'arm64', nodeVersion: '25.7.0' },
|
|
35
|
-
* { platform: 'win', arch: 'x64', nodeVersion: '25.7.0' },
|
|
36
|
-
* ]
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
targets?: ExeTarget[];
|
|
40
|
-
/**
|
|
41
|
-
* Customize the download URL for Node.js binaries, e.g. to use a mirror.
|
|
42
|
-
* Defaults to downloading from {@link https://nodejs.org/dist/}.
|
|
43
|
-
*/
|
|
44
|
-
getDownloadUrl?: (target: ExeTarget) => string | Promise<string>;
|
|
45
|
-
/**
|
|
46
|
-
* URL of the Node.js release index used to resolve the `latest` and
|
|
47
|
-
* `latest-lts` versions.
|
|
48
|
-
* @default 'https://nodejs.org/dist/index.json'
|
|
49
|
-
*/
|
|
50
|
-
nodeDistIndexUrl?: string;
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region ../../node_modules/.pnpm/@tsdown+css@0.23.0_jiti@2.7.0_postcss-import@16.2.0_postcss@8.5.28__postcss-modules@9.0_e1d5b637aa455af0c2e0c072fcd26c64/node_modules/@tsdown/css/dist/index.d.mts
|
|
54
|
-
//#region src/options.d.ts
|
|
55
|
-
type LightningCSSOptions = Omit<TransformOptions<any>, "filename" | "code">;
|
|
56
|
-
type CSSModulesLocalsConvention = "camelCase" | "camelCaseOnly" | "dashes" | "dashesOnly" | ((originalClassName: string, generatedClassName: string, inputFile: string) => string);
|
|
57
|
-
interface CSSModulesOptions {
|
|
58
|
-
/**
|
|
59
|
-
* Controls the scoping behavior.
|
|
60
|
-
* @default 'local'
|
|
61
|
-
*/
|
|
62
|
-
scopeBehaviour?: "global" | "local";
|
|
63
|
-
/**
|
|
64
|
-
* File paths matching these patterns will use global scoping.
|
|
65
|
-
*/
|
|
66
|
-
globalModulePaths?: RegExp[];
|
|
67
|
-
/**
|
|
68
|
-
* Pattern or function to generate scoped class names.
|
|
69
|
-
* When using `transformer: 'lightningcss'`, only string patterns are supported.
|
|
70
|
-
*/
|
|
71
|
-
generateScopedName?: string | ((name: string, filename: string, css: string) => string);
|
|
72
|
-
/**
|
|
73
|
-
* Prefix added to hashes when generating scoped names.
|
|
74
|
-
*/
|
|
75
|
-
hashPrefix?: string;
|
|
76
|
-
/**
|
|
77
|
-
* Transform convention for exported class names.
|
|
78
|
-
*/
|
|
79
|
-
localsConvention?: CSSModulesLocalsConvention;
|
|
80
|
-
/**
|
|
81
|
-
* Whether to include global class names in the export.
|
|
82
|
-
*/
|
|
83
|
-
exportGlobals?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Callback to receive the generated class name mappings.
|
|
86
|
-
*/
|
|
87
|
-
getJSON?: (cssFileName: string, json: Record<string, string>, outputFileName: string) => void;
|
|
88
|
-
}
|
|
89
|
-
interface CssOptions$1 {
|
|
90
|
-
/**
|
|
91
|
-
* Enable/disable CSS code splitting.
|
|
92
|
-
* When set to `false`, all CSS in the entire project will be extracted into
|
|
93
|
-
* a single CSS file named by {@linkcode fileName}.
|
|
94
|
-
* When set to `true`, CSS imported in async JS chunks will be preserved as chunks.
|
|
95
|
-
*
|
|
96
|
-
* Defaults to `false`, but if `unbundle` is `true`, it defaults to `true` to preserve chunk splitting.
|
|
97
|
-
*/
|
|
98
|
-
splitting?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Specify the name of the CSS file generated when {@linkcode splitting} is
|
|
101
|
-
* `false`.
|
|
102
|
-
*
|
|
103
|
-
* @default 'style.css'
|
|
104
|
-
*/
|
|
105
|
-
fileName?: string;
|
|
106
|
-
/**
|
|
107
|
-
* Set the target environment for CSS syntax lowering.
|
|
108
|
-
* Accepts esbuild-style target strings (e.g., `'chrome99'`, `'safari16.2'`).
|
|
109
|
-
* Defaults to the top-level `target` option.
|
|
110
|
-
*
|
|
111
|
-
* @see https://vite.dev/config/build-options#build-csstarget
|
|
112
|
-
* @default tsdownConfig.target
|
|
113
|
-
*/
|
|
114
|
-
target?: string | string[] | false;
|
|
115
|
-
/**
|
|
116
|
-
* Options for CSS preprocessors (Sass/Less/Stylus).
|
|
117
|
-
*
|
|
118
|
-
* In addition to options specific to each processor, `additionalData` option
|
|
119
|
-
* can be used to inject extra code for each style content.
|
|
120
|
-
*/
|
|
121
|
-
preprocessorOptions?: PreprocessorOptions;
|
|
122
|
-
/**
|
|
123
|
-
* Enable/disable CSS minification.
|
|
124
|
-
*
|
|
125
|
-
* @default false
|
|
126
|
-
*/
|
|
127
|
-
minify?: boolean;
|
|
128
|
-
/**
|
|
129
|
-
* Lightning CSS options for CSS syntax lowering and transformations.
|
|
130
|
-
*/
|
|
131
|
-
lightningcss?: LightningCSSOptions;
|
|
132
|
-
/**
|
|
133
|
-
* PostCSS configuration.
|
|
134
|
-
*
|
|
135
|
-
* - `string`: Path to the directory to search for PostCSS config files.
|
|
136
|
-
* - `object`: Inline PostCSS options with optional `plugins` array.
|
|
137
|
-
* - Omitted: Auto-detect PostCSS config from the project root.
|
|
138
|
-
*
|
|
139
|
-
* Only used when {@linkcode transformer} is `'postcss'`.
|
|
140
|
-
* Requires `postcss` to be installed.
|
|
141
|
-
*
|
|
142
|
-
* @see https://github.com/postcss/postcss
|
|
143
|
-
*/
|
|
144
|
-
postcss?: PostCSSOptions;
|
|
145
|
-
/**
|
|
146
|
-
* When enabled, JS output preserves import statements pointing to emitted CSS files.
|
|
147
|
-
* Consumers of the library will automatically import the CSS alongside the JS.
|
|
148
|
-
*
|
|
149
|
-
* @default false
|
|
150
|
-
*/
|
|
151
|
-
inject?: boolean;
|
|
152
|
-
/**
|
|
153
|
-
* CSS modules configuration.
|
|
154
|
-
* When not `false`, `.module.css` files (and preprocessor variants) are
|
|
155
|
-
* treated as CSS modules with scoped class names.
|
|
156
|
-
*
|
|
157
|
-
* @see https://github.com/css-modules/css-modules
|
|
158
|
-
*
|
|
159
|
-
* @default {}
|
|
160
|
-
*/
|
|
161
|
-
modules?: CSSModulesOptions | false;
|
|
162
|
-
/**
|
|
163
|
-
* CSS transformer to use. Controls how CSS is processed:
|
|
164
|
-
*
|
|
165
|
-
* - `'lightningcss'` (default): `@import` handled by Lightning CSS
|
|
166
|
-
* `bundleAsync()`, PostCSS is **not** used at all.
|
|
167
|
-
* - `'postcss'`: `@import` handled by `postcss-import`,
|
|
168
|
-
* PostCSS plugins applied, Lightning CSS used only for final
|
|
169
|
-
* targets/minify transform.
|
|
170
|
-
*
|
|
171
|
-
* @default 'lightningcss'
|
|
172
|
-
* @see https://vite.dev/config/shared-options#css-transformer
|
|
173
|
-
*/
|
|
174
|
-
transformer?: "postcss" | "lightningcss";
|
|
175
|
-
}
|
|
176
|
-
type PostCSSOptions = string | (Record<string, any> & {
|
|
177
|
-
plugins?: any[];
|
|
178
|
-
});
|
|
179
|
-
interface PreprocessorOptions {
|
|
180
|
-
scss?: SassPreprocessorOptions;
|
|
181
|
-
sass?: SassPreprocessorOptions;
|
|
182
|
-
less?: LessPreprocessorOptions;
|
|
183
|
-
styl?: StylusPreprocessorOptions;
|
|
184
|
-
stylus?: StylusPreprocessorOptions;
|
|
185
|
-
}
|
|
186
|
-
type PreprocessorAdditionalDataResult = string | {
|
|
187
|
-
content: string;
|
|
188
|
-
map?: any;
|
|
189
|
-
};
|
|
190
|
-
type PreprocessorAdditionalData = string | ((source: string, filename: string) => PreprocessorAdditionalDataResult | Promise<PreprocessorAdditionalDataResult>);
|
|
191
|
-
interface SassPreprocessorOptions {
|
|
192
|
-
additionalData?: PreprocessorAdditionalData;
|
|
193
|
-
[key: string]: any;
|
|
194
|
-
}
|
|
195
|
-
interface LessPreprocessorOptions {
|
|
196
|
-
additionalData?: PreprocessorAdditionalData;
|
|
197
|
-
math?: any;
|
|
198
|
-
paths?: string[];
|
|
199
|
-
plugins?: any[];
|
|
200
|
-
[key: string]: any;
|
|
201
|
-
}
|
|
202
|
-
interface StylusPreprocessorOptions {
|
|
203
|
-
additionalData?: PreprocessorAdditionalData;
|
|
204
|
-
define?: Record<string, any>;
|
|
205
|
-
paths?: string[];
|
|
206
|
-
[key: string]: any;
|
|
207
|
-
}
|
|
208
|
-
//#endregion
|
|
209
5
|
//#region ../../node_modules/.pnpm/hookable@6.1.1/node_modules/hookable/dist/index.d.mts
|
|
210
6
|
type HookCallback = (...arguments_: any) => Promise<void> | void;
|
|
211
7
|
type HookKeys<T> = keyof T & string;
|
|
@@ -262,7 +58,7 @@ declare global {
|
|
|
262
58
|
}
|
|
263
59
|
}
|
|
264
60
|
//#endregion
|
|
265
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.
|
|
61
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.6_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_d7b1f0f9db662f38e672c8f14bf9ba00/node_modules/rolldown-plugin-dts/dist/custom-language-CFzWzq69.d.mts
|
|
266
62
|
//#region src/custom-language.d.ts
|
|
267
63
|
/** @ts-ignore - TS 7 mismatch */
|
|
268
64
|
type FileExtensionInfo = import("typescript").FileExtensionInfo;
|
|
@@ -1148,7 +944,7 @@ type TsConfigJson = {
|
|
|
1148
944
|
references?: TsConfigJson.References[];
|
|
1149
945
|
};
|
|
1150
946
|
//#endregion
|
|
1151
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.
|
|
947
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.6_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_d7b1f0f9db662f38e672c8f14bf9ba00/node_modules/rolldown-plugin-dts/dist/index.d.mts
|
|
1152
948
|
//#region src/tsc/vue.d.ts
|
|
1153
949
|
interface VueLanguageOptions {
|
|
1154
950
|
/** @ts-ignore - optional dep */
|
|
@@ -1338,7 +1134,211 @@ interface TsgoOptions {
|
|
|
1338
1134
|
path?: string;
|
|
1339
1135
|
}
|
|
1340
1136
|
//#endregion
|
|
1341
|
-
//#region ../../node_modules/.pnpm
|
|
1137
|
+
//#region ../../node_modules/.pnpm/@tsdown+exe@0.23.0_tsdown@0.23.0/node_modules/@tsdown/exe/dist/index.d.mts
|
|
1138
|
+
//#region src/platform.d.ts
|
|
1139
|
+
type ExePlatform = "win" | "darwin" | "linux";
|
|
1140
|
+
type ExeArch = "x64" | "arm64";
|
|
1141
|
+
interface ExeTarget {
|
|
1142
|
+
platform: ExePlatform;
|
|
1143
|
+
arch: ExeArch;
|
|
1144
|
+
/**
|
|
1145
|
+
* Node.js version to use for the executable.
|
|
1146
|
+
*
|
|
1147
|
+
* Accepts a valid semver string (e.g., `"25.7.0"`), or the special values
|
|
1148
|
+
* `"latest"` / `"latest-lts"` which resolve the version automatically from
|
|
1149
|
+
* {@link https://nodejs.org/dist/index.json}.
|
|
1150
|
+
*
|
|
1151
|
+
* The minimum required version is 25.7.0, which is when ESM entry point
|
|
1152
|
+
* support was added to Node.js SEA.
|
|
1153
|
+
*/
|
|
1154
|
+
nodeVersion: (string & {}) | "latest" | "latest-lts" | `${string}.${string}.${string}`;
|
|
1155
|
+
}
|
|
1156
|
+
interface ExeExtensionOptions$1 {
|
|
1157
|
+
/**
|
|
1158
|
+
* Cross-platform targets for building executables.
|
|
1159
|
+
* Requires `@tsdown/exe` to be installed.
|
|
1160
|
+
* When specified, builds an executable for each target platform/arch combination.
|
|
1161
|
+
*
|
|
1162
|
+
* @example
|
|
1163
|
+
* ```ts
|
|
1164
|
+
* targets: [
|
|
1165
|
+
* { platform: 'linux', arch: 'x64', nodeVersion: '25.7.0' },
|
|
1166
|
+
* { platform: 'darwin', arch: 'arm64', nodeVersion: '25.7.0' },
|
|
1167
|
+
* { platform: 'win', arch: 'x64', nodeVersion: '25.7.0' },
|
|
1168
|
+
* ]
|
|
1169
|
+
* ```
|
|
1170
|
+
*/
|
|
1171
|
+
targets?: ExeTarget[];
|
|
1172
|
+
/**
|
|
1173
|
+
* Customize the download URL for Node.js binaries, e.g. to use a mirror.
|
|
1174
|
+
* Defaults to downloading from {@link https://nodejs.org/dist/}.
|
|
1175
|
+
*/
|
|
1176
|
+
getDownloadUrl?: (target: ExeTarget) => string | Promise<string>;
|
|
1177
|
+
/**
|
|
1178
|
+
* URL of the Node.js release index used to resolve the `latest` and
|
|
1179
|
+
* `latest-lts` versions.
|
|
1180
|
+
* @default 'https://nodejs.org/dist/index.json'
|
|
1181
|
+
*/
|
|
1182
|
+
nodeDistIndexUrl?: string;
|
|
1183
|
+
}
|
|
1184
|
+
//#endregion
|
|
1185
|
+
//#region ../../node_modules/.pnpm/@tsdown+css@0.23.0_jiti@2.7.0_postcss-import@16.2.0_postcss@8.5.28__postcss-modules@9.0_9eb8cb267bbbb73fcfb5dbe1e056f9b1/node_modules/@tsdown/css/dist/index.d.mts
|
|
1186
|
+
//#region src/options.d.ts
|
|
1187
|
+
type LightningCSSOptions = Omit<TransformOptions<any>, "filename" | "code">;
|
|
1188
|
+
type CSSModulesLocalsConvention = "camelCase" | "camelCaseOnly" | "dashes" | "dashesOnly" | ((originalClassName: string, generatedClassName: string, inputFile: string) => string);
|
|
1189
|
+
interface CSSModulesOptions {
|
|
1190
|
+
/**
|
|
1191
|
+
* Controls the scoping behavior.
|
|
1192
|
+
* @default 'local'
|
|
1193
|
+
*/
|
|
1194
|
+
scopeBehaviour?: "global" | "local";
|
|
1195
|
+
/**
|
|
1196
|
+
* File paths matching these patterns will use global scoping.
|
|
1197
|
+
*/
|
|
1198
|
+
globalModulePaths?: RegExp[];
|
|
1199
|
+
/**
|
|
1200
|
+
* Pattern or function to generate scoped class names.
|
|
1201
|
+
* When using `transformer: 'lightningcss'`, only string patterns are supported.
|
|
1202
|
+
*/
|
|
1203
|
+
generateScopedName?: string | ((name: string, filename: string, css: string) => string);
|
|
1204
|
+
/**
|
|
1205
|
+
* Prefix added to hashes when generating scoped names.
|
|
1206
|
+
*/
|
|
1207
|
+
hashPrefix?: string;
|
|
1208
|
+
/**
|
|
1209
|
+
* Transform convention for exported class names.
|
|
1210
|
+
*/
|
|
1211
|
+
localsConvention?: CSSModulesLocalsConvention;
|
|
1212
|
+
/**
|
|
1213
|
+
* Whether to include global class names in the export.
|
|
1214
|
+
*/
|
|
1215
|
+
exportGlobals?: boolean;
|
|
1216
|
+
/**
|
|
1217
|
+
* Callback to receive the generated class name mappings.
|
|
1218
|
+
*/
|
|
1219
|
+
getJSON?: (cssFileName: string, json: Record<string, string>, outputFileName: string) => void;
|
|
1220
|
+
}
|
|
1221
|
+
interface CssOptions$1 {
|
|
1222
|
+
/**
|
|
1223
|
+
* Enable/disable CSS code splitting.
|
|
1224
|
+
* When set to `false`, all CSS in the entire project will be extracted into
|
|
1225
|
+
* a single CSS file named by {@linkcode fileName}.
|
|
1226
|
+
* When set to `true`, CSS imported in async JS chunks will be preserved as chunks.
|
|
1227
|
+
*
|
|
1228
|
+
* Defaults to `false`, but if `unbundle` is `true`, it defaults to `true` to preserve chunk splitting.
|
|
1229
|
+
*/
|
|
1230
|
+
splitting?: boolean;
|
|
1231
|
+
/**
|
|
1232
|
+
* Specify the name of the CSS file generated when {@linkcode splitting} is
|
|
1233
|
+
* `false`.
|
|
1234
|
+
*
|
|
1235
|
+
* @default 'style.css'
|
|
1236
|
+
*/
|
|
1237
|
+
fileName?: string;
|
|
1238
|
+
/**
|
|
1239
|
+
* Set the target environment for CSS syntax lowering.
|
|
1240
|
+
* Accepts esbuild-style target strings (e.g., `'chrome99'`, `'safari16.2'`).
|
|
1241
|
+
* Defaults to the top-level `target` option.
|
|
1242
|
+
*
|
|
1243
|
+
* @see https://vite.dev/config/build-options#build-csstarget
|
|
1244
|
+
* @default tsdownConfig.target
|
|
1245
|
+
*/
|
|
1246
|
+
target?: string | string[] | false;
|
|
1247
|
+
/**
|
|
1248
|
+
* Options for CSS preprocessors (Sass/Less/Stylus).
|
|
1249
|
+
*
|
|
1250
|
+
* In addition to options specific to each processor, `additionalData` option
|
|
1251
|
+
* can be used to inject extra code for each style content.
|
|
1252
|
+
*/
|
|
1253
|
+
preprocessorOptions?: PreprocessorOptions;
|
|
1254
|
+
/**
|
|
1255
|
+
* Enable/disable CSS minification.
|
|
1256
|
+
*
|
|
1257
|
+
* @default false
|
|
1258
|
+
*/
|
|
1259
|
+
minify?: boolean;
|
|
1260
|
+
/**
|
|
1261
|
+
* Lightning CSS options for CSS syntax lowering and transformations.
|
|
1262
|
+
*/
|
|
1263
|
+
lightningcss?: LightningCSSOptions;
|
|
1264
|
+
/**
|
|
1265
|
+
* PostCSS configuration.
|
|
1266
|
+
*
|
|
1267
|
+
* - `string`: Path to the directory to search for PostCSS config files.
|
|
1268
|
+
* - `object`: Inline PostCSS options with optional `plugins` array.
|
|
1269
|
+
* - Omitted: Auto-detect PostCSS config from the project root.
|
|
1270
|
+
*
|
|
1271
|
+
* Only used when {@linkcode transformer} is `'postcss'`.
|
|
1272
|
+
* Requires `postcss` to be installed.
|
|
1273
|
+
*
|
|
1274
|
+
* @see https://github.com/postcss/postcss
|
|
1275
|
+
*/
|
|
1276
|
+
postcss?: PostCSSOptions;
|
|
1277
|
+
/**
|
|
1278
|
+
* When enabled, JS output preserves import statements pointing to emitted CSS files.
|
|
1279
|
+
* Consumers of the library will automatically import the CSS alongside the JS.
|
|
1280
|
+
*
|
|
1281
|
+
* @default false
|
|
1282
|
+
*/
|
|
1283
|
+
inject?: boolean;
|
|
1284
|
+
/**
|
|
1285
|
+
* CSS modules configuration.
|
|
1286
|
+
* When not `false`, `.module.css` files (and preprocessor variants) are
|
|
1287
|
+
* treated as CSS modules with scoped class names.
|
|
1288
|
+
*
|
|
1289
|
+
* @see https://github.com/css-modules/css-modules
|
|
1290
|
+
*
|
|
1291
|
+
* @default {}
|
|
1292
|
+
*/
|
|
1293
|
+
modules?: CSSModulesOptions | false;
|
|
1294
|
+
/**
|
|
1295
|
+
* CSS transformer to use. Controls how CSS is processed:
|
|
1296
|
+
*
|
|
1297
|
+
* - `'lightningcss'` (default): `@import` handled by Lightning CSS
|
|
1298
|
+
* `bundleAsync()`, PostCSS is **not** used at all.
|
|
1299
|
+
* - `'postcss'`: `@import` handled by `postcss-import`,
|
|
1300
|
+
* PostCSS plugins applied, Lightning CSS used only for final
|
|
1301
|
+
* targets/minify transform.
|
|
1302
|
+
*
|
|
1303
|
+
* @default 'lightningcss'
|
|
1304
|
+
* @see https://vite.dev/config/shared-options#css-transformer
|
|
1305
|
+
*/
|
|
1306
|
+
transformer?: "postcss" | "lightningcss";
|
|
1307
|
+
}
|
|
1308
|
+
type PostCSSOptions = string | (Record<string, any> & {
|
|
1309
|
+
plugins?: any[];
|
|
1310
|
+
});
|
|
1311
|
+
interface PreprocessorOptions {
|
|
1312
|
+
scss?: SassPreprocessorOptions;
|
|
1313
|
+
sass?: SassPreprocessorOptions;
|
|
1314
|
+
less?: LessPreprocessorOptions;
|
|
1315
|
+
styl?: StylusPreprocessorOptions;
|
|
1316
|
+
stylus?: StylusPreprocessorOptions;
|
|
1317
|
+
}
|
|
1318
|
+
type PreprocessorAdditionalDataResult = string | {
|
|
1319
|
+
content: string;
|
|
1320
|
+
map?: any;
|
|
1321
|
+
};
|
|
1322
|
+
type PreprocessorAdditionalData = string | ((source: string, filename: string) => PreprocessorAdditionalDataResult | Promise<PreprocessorAdditionalDataResult>);
|
|
1323
|
+
interface SassPreprocessorOptions {
|
|
1324
|
+
additionalData?: PreprocessorAdditionalData;
|
|
1325
|
+
[key: string]: any;
|
|
1326
|
+
}
|
|
1327
|
+
interface LessPreprocessorOptions {
|
|
1328
|
+
additionalData?: PreprocessorAdditionalData;
|
|
1329
|
+
math?: any;
|
|
1330
|
+
paths?: string[];
|
|
1331
|
+
plugins?: any[];
|
|
1332
|
+
[key: string]: any;
|
|
1333
|
+
}
|
|
1334
|
+
interface StylusPreprocessorOptions {
|
|
1335
|
+
additionalData?: PreprocessorAdditionalData;
|
|
1336
|
+
define?: Record<string, any>;
|
|
1337
|
+
paths?: string[];
|
|
1338
|
+
[key: string]: any;
|
|
1339
|
+
}
|
|
1340
|
+
//#endregion
|
|
1341
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_322c16727ed86a15fb2ecef349e911e9/node_modules/tsdown/dist/types-CYHmmaKd.d.mts
|
|
1342
1342
|
//#region src/utils/types.d.ts
|
|
1343
1343
|
type Overwrite<T, U> = Omit<T, keyof U> & U;
|
|
1344
1344
|
type Awaitable<T> = T | Promise<T>;
|
|
@@ -2780,7 +2780,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
|
|
|
2780
2780
|
exe: false | ExeOptions;
|
|
2781
2781
|
}>;
|
|
2782
2782
|
//#endregion
|
|
2783
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@
|
|
2783
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_322c16727ed86a15fb2ecef349e911e9/node_modules/tsdown/dist/config-DR1wR8P-.d.mts
|
|
2784
2784
|
//#region src/config/options.d.ts
|
|
2785
2785
|
/**
|
|
2786
2786
|
* Resolve user config into resolved configs
|
|
@@ -2801,7 +2801,7 @@ declare function defineConfig(options: UserConfig[]): UserConfig[];
|
|
|
2801
2801
|
declare function defineConfig(options: UserConfigFn): UserConfigFn;
|
|
2802
2802
|
declare function defineConfig(options: UserConfigExport): UserConfigExport;
|
|
2803
2803
|
//#endregion
|
|
2804
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@
|
|
2804
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_322c16727ed86a15fb2ecef349e911e9/node_modules/tsdown/dist/index.d.mts
|
|
2805
2805
|
//#region src/build.d.ts
|
|
2806
2806
|
/**
|
|
2807
2807
|
* Build with tsdown.
|
package/dist/tsdown/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { c as globalLogger, n as version$1, t as enableDebug } from "./debug-CpC4hV25-
|
|
2
|
-
import { a as resolveUserConfig, i as mergeConfig, n as buildWithConfigs, t as build$1 } from "./build-JVmLFaZt-
|
|
1
|
+
import { c as globalLogger, n as version$1, t as enableDebug } from "./debug-CpC4hV25-C-OYr2iI.js";
|
|
2
|
+
import { a as resolveUserConfig, i as mergeConfig, n as buildWithConfigs, t as build$1 } from "./build-JVmLFaZt-DRlLhpV3.js";
|
|
3
3
|
import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
|
|
4
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@
|
|
4
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_322c16727ed86a15fb2ecef349e911e9/node_modules/tsdown/dist/config.mjs
|
|
5
5
|
function defineConfig(options) {
|
|
6
6
|
return options;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@
|
|
9
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_322c16727ed86a15fb2ecef349e911e9/node_modules/tsdown/dist/index.mjs
|
|
10
10
|
const version = version$1;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Rolldown, build$1 as build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig, version };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { formatWithOptions, inspect, styleText } from "node:util";
|
|
1
|
+
import { cwd } from "node:process";
|
|
2
|
+
import { formatWithOptions, inspect } from "node:util";
|
|
4
3
|
import readline from "node:readline";
|
|
5
4
|
import { isatty } from "node:tty";
|
|
6
5
|
import { spawn } from "node:child_process";
|
|
@@ -9,90 +8,6 @@ import { fileURLToPath } from "node:url";
|
|
|
9
8
|
import { pipeline } from "node:stream/promises";
|
|
10
9
|
import { PassThrough } from "node:stream";
|
|
11
10
|
import { closeSync, openSync, readSync, statSync } from "node:fs";
|
|
12
|
-
const picomatch = createRequire(import.meta.url)("./npm_entry_picomatch.cjs");
|
|
13
|
-
function toArray(val, defaultValue) {
|
|
14
|
-
if (Array.isArray(val)) return val;
|
|
15
|
-
else if (val == null) {
|
|
16
|
-
if (defaultValue) return [defaultValue];
|
|
17
|
-
return [];
|
|
18
|
-
} else return [val];
|
|
19
|
-
}
|
|
20
|
-
function resolveComma(arr) {
|
|
21
|
-
return arr.flatMap((format) => format.split(","));
|
|
22
|
-
}
|
|
23
|
-
function resolveRegex(str) {
|
|
24
|
-
if (typeof str === "string" && str.length > 2 && str[0] === "/" && str.at(-1) === "/") return new RegExp(str.slice(1, -1));
|
|
25
|
-
return str;
|
|
26
|
-
}
|
|
27
|
-
function slash(string) {
|
|
28
|
-
return string.replaceAll("\\", "/");
|
|
29
|
-
}
|
|
30
|
-
const noop = (v) => v;
|
|
31
|
-
function matchPattern(id, patterns) {
|
|
32
|
-
return patterns.some((pattern) => {
|
|
33
|
-
if (pattern instanceof RegExp) {
|
|
34
|
-
pattern.lastIndex = 0;
|
|
35
|
-
return pattern.test(id);
|
|
36
|
-
}
|
|
37
|
-
return id === pattern || picomatch(pattern)(id);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function pkgExists(moduleName) {
|
|
41
|
-
try {
|
|
42
|
-
import.meta.resolve(moduleName);
|
|
43
|
-
return true;
|
|
44
|
-
} catch {}
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
async function importWithError(moduleName) {
|
|
48
|
-
try {
|
|
49
|
-
return await import(moduleName);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
throw new Error(`Failed to import module "${moduleName}". Please ensure it is installed.`, { cause: error });
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function createConcurrencyExecutor(concurrency) {
|
|
55
|
-
if (concurrency == null) return (task) => task();
|
|
56
|
-
if (!Number.isInteger(concurrency) || concurrency < 1) throw new TypeError("`--concurrency` must be a positive integer");
|
|
57
|
-
const queue = [];
|
|
58
|
-
let active = 0;
|
|
59
|
-
return async (task) => {
|
|
60
|
-
if (active >= concurrency) await new Promise((resolve) => queue.push(resolve));
|
|
61
|
-
else active++;
|
|
62
|
-
try {
|
|
63
|
-
return await task();
|
|
64
|
-
} finally {
|
|
65
|
-
const next = queue.shift();
|
|
66
|
-
if (next) next();
|
|
67
|
-
else active--;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
function debounce(fn, delay) {
|
|
72
|
-
let timer;
|
|
73
|
-
const debounced = (...args) => {
|
|
74
|
-
clearTimeout(timer);
|
|
75
|
-
timer = setTimeout(() => fn(...args), delay);
|
|
76
|
-
};
|
|
77
|
-
debounced.cancel = () => clearTimeout(timer);
|
|
78
|
-
return debounced;
|
|
79
|
-
}
|
|
80
|
-
let supportRGB = !!process$1.stdout.hasColors?.(2 ** 24);
|
|
81
|
-
if (supportRGB) try {
|
|
82
|
-
styleText("#000", "");
|
|
83
|
-
} catch {
|
|
84
|
-
supportRGB = false;
|
|
85
|
-
}
|
|
86
|
-
const factory = (...formats) => new Proxy(styleText.bind(void 0, formats), { get: (_, format) => {
|
|
87
|
-
if (format[0] === "#") {
|
|
88
|
-
const [color, fallback] = format.split(",", 2);
|
|
89
|
-
if (!supportRGB) return fallback ? factory(...formats, fallback) : factory(...formats);
|
|
90
|
-
return factory(...formats, color);
|
|
91
|
-
}
|
|
92
|
-
return factory(...formats, format);
|
|
93
|
-
} });
|
|
94
|
-
const styleText$1 = factory();
|
|
95
|
-
//#endregion
|
|
96
11
|
//#region ../../node_modules/.pnpm/obug@2.1.4/node_modules/obug/dist/core.js
|
|
97
12
|
/**
|
|
98
13
|
* Coerce `value`.
|
|
@@ -737,4 +652,4 @@ const x = (command, args, userOptions) => {
|
|
|
737
652
|
};
|
|
738
653
|
const exec = x;
|
|
739
654
|
//#endregion
|
|
740
|
-
export { namespaces as a,
|
|
655
|
+
export { namespaces as a, enable as i, x as n, createDebug as r, exec as t };
|