@voidzero-dev/vite-plus-core 0.3.0 → 0.3.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/LICENSE +0 -29
- 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 +38 -4
- package/dist/rolldown/experimental-index.mjs +35 -9
- package/dist/rolldown/experimental-runtime-types.d.ts +2 -2
- package/dist/rolldown/experimental-runtime.d.ts +2 -2
- package/dist/rolldown/experimental-runtime.mjs +2 -2
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/filter-index.mjs +1 -3
- package/dist/rolldown/index.d.mts +3 -3
- 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.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.mjs +1 -1
- package/dist/rolldown/plugins-index.d.mts +3 -3
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-C__LJDBG.mjs → binding-DH95uVkp.mjs} +27 -27
- package/dist/rolldown/shared/{binding-Bvw14S3g.d.mts → binding-DZuNHVw4.d.mts} +19 -5
- package/dist/rolldown/shared/{bindingify-input-options-V9YvAjrr.mjs → bindingify-input-options-BL4xrXys.mjs} +11 -9
- package/dist/rolldown/shared/{constructors-CRumnw21.d.mts → constructors-BnIg8feC.d.mts} +2 -2
- package/dist/rolldown/shared/{constructors-DklcHr18.mjs → constructors-CrhQ-yy_.mjs} +1 -1
- package/dist/rolldown/shared/{create-bundler-option-DbV2ud0B.mjs → create-bundler-option-Dk9AZBn_.mjs} +72 -6
- package/dist/rolldown/shared/{define-config-DwTNhgWB.d.mts → define-config-DjHYbH6S.d.mts} +40 -3
- package/dist/rolldown/shared/{error-NcRuXAVN.mjs → error-CRNyaqoL.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-Dd7jKGUy.mjs → load-config-CKqTUKwB.mjs} +1 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-CFtim40S.mjs → normalize-string-or-regex-BgP6W4eD.mjs} +1 -1
- package/dist/rolldown/shared/{parse-rvxTD36n.mjs → parse-DYyNe0IU.mjs} +2 -2
- package/dist/rolldown/shared/{resolve-tsconfig-D2vSIIkR.mjs → resolve-tsconfig-jh43hFM_.mjs} +10 -6
- package/dist/rolldown/shared/{rolldown-Bblizyw1.mjs → rolldown-BpXK1q5_.mjs} +5 -4
- package/dist/rolldown/shared/{transform--WSMLt1x.d.mts → transform-CVse9_mH.d.mts} +8 -4
- package/dist/rolldown/shared/{watch-DPvOlccK.mjs → watch-Due6uYkS.mjs} +4 -4
- package/dist/rolldown/utils-index.d.mts +3 -3
- package/dist/rolldown/utils-index.mjs +5 -5
- package/dist/tsdown/{build-D_enfyvD-tOzhITac.js → build-JVmLFaZt-BN9yuB6k.js} +683 -682
- package/dist/tsdown/{debug-CKcBYQLP-By_AQqN8.js → debug-CpC4hV25-BeCITV83.js} +18 -14
- package/dist/tsdown/{detect-DGhJGEqb-LL52mV6u.js → detect-Bg-d8iUV-Cr_BRLVW.js} +10 -12
- package/dist/tsdown/{dist-BsS7BOcb.js → dist-ByW_jJfv.js} +1226 -893
- package/dist/tsdown/index-types.d.ts +239 -317
- package/dist/tsdown/index.js +4 -4
- package/dist/tsdown/internal-DTYQdXId.js +3 -0
- package/dist/tsdown/{main-Bcv7jU2b.js → main-bgV9NlwM.js} +24 -145
- package/dist/tsdown/{resolver-cwLsPb2o-Bb9SDBm6.js → resolver-DE0_sy8o-UMsN-SXx.js} +4 -4
- package/dist/tsdown/rolldown-runtime-B4iAMlE-.js +35 -0
- package/dist/tsdown/run.js +44 -8
- package/dist/tsdown/{src-JVSpR8xt.js → src-D5xv98Iu.js} +5 -5
- package/dist/tsdown/{target-Bab3CUeB-8PBzMh3p.js → target-DgdLrXba-DaJJ11xX.js} +78 -74
- package/dist/tsdown/{tsc-B8FD48Oc.js → tsc-BFDF_Im9.js} +26 -20
- package/dist/tsdown/tsdown-css.js +19 -11
- package/dist/tsdown/tsdown-exe.js +4 -4
- package/dist/vite/client/bundledDevClient.mjs +77 -42
- package/dist/vite/client/client.mjs +288 -260
- package/dist/vite/node/chunks/build.js +21 -21
- package/dist/vite/node/chunks/lib.js +2 -2
- package/dist/vite/node/chunks/node.js +32781 -32305
- package/dist/vite/node/chunks/postcss-import.js +10 -10
- package/dist/vite/node/cli.js +12 -8
- package/dist/vite/node/index.d.ts +1568 -1577
- package/dist/vite/node/index.js +1 -1
- package/dist/vite/node/module-runner.d.ts +1 -1
- package/dist/vite/node/module-runner.js +201 -202
- package/dist/vite/types/customEvent.d.ts +2 -0
- package/dist/vite/types/hmrPayload.d.ts +2 -0
- package/dist/vite/types/internal/cssPreprocessorOptions.d.ts +2 -2
- package/dist/vite/types/internal/devtoolsOptions.d.ts +9 -0
- package/package.json +28 -31
- package/dist/tsdown/internal-DSmmwu4u.js +0 -3
|
@@ -1,69 +1,8 @@
|
|
|
1
|
+
import { TransformOptions } from "lightningcss";
|
|
1
2
|
import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
|
|
2
3
|
import { BuildOptions, ChecksOptions, ExternalOption, InputOptions, InternalModuleFormat, MinifyOptions, ModuleFormat, ModuleTypes, OutputAsset, OutputChunk, OutputOptions, Plugin, RolldownPlugin, TreeshakingOptions } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
3
|
-
import { StartOptions } from "@vitejs/devtools/cli-commands";
|
|
4
|
-
import { CheckPackageOptions } from "@arethetypeswrong/core";
|
|
5
|
-
import { Options } from "publint";
|
|
6
|
-
import { TransformOptions } from "lightningcss";
|
|
7
|
-
import { FileExtensionInfo } from "typescript";
|
|
8
4
|
import { IsolatedDeclarationsOptions } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
9
|
-
|
|
10
|
-
//#region ../../node_modules/.pnpm/hookable@6.1.1/node_modules/hookable/dist/index.d.mts
|
|
11
|
-
type HookCallback = (...arguments_: any) => Promise<void> | void;
|
|
12
|
-
type HookKeys<T> = keyof T & string;
|
|
13
|
-
type DeprecatedHook<T> = {
|
|
14
|
-
message?: string;
|
|
15
|
-
to: HookKeys<T>;
|
|
16
|
-
};
|
|
17
|
-
type ValueOf<C> = C extends Record<any, any> ? C[keyof C] : never;
|
|
18
|
-
type Strings<T> = Exclude<keyof T, number | symbol>;
|
|
19
|
-
type KnownKeys<T> = keyof { [K in keyof T as string extends K ? never : number extends K ? never : K]: never; };
|
|
20
|
-
type StripGeneric<T> = Pick<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
|
|
21
|
-
type OnlyGeneric<T> = Omit<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
|
|
22
|
-
type Namespaces<T> = ValueOf<{ [key in Strings<T>]: key extends `${infer Namespace}:${string}` ? Namespace : never; }>;
|
|
23
|
-
type BareHooks<T> = ValueOf<{ [key in Strings<T>]: key extends `${string}:${string}` ? never : key; }>;
|
|
24
|
-
type HooksInNamespace<T, Namespace extends string> = ValueOf<{ [key in Strings<T>]: key extends `${Namespace}:${infer HookName}` ? HookName : never; }>;
|
|
25
|
-
type WithoutNamespace<T, Namespace extends string> = { [key in HooksInNamespace<T, Namespace>]: `${Namespace}:${key}` extends keyof T ? T[`${Namespace}:${key}`] : never; };
|
|
26
|
-
type NestedHooks<T> = (Partial<StripGeneric<T>> | Partial<OnlyGeneric<T>>) & Partial<{ [key in Namespaces<StripGeneric<T>>]: NestedHooks<WithoutNamespace<T, key>>; }> & Partial<{ [key in BareHooks<StripGeneric<T>>]: T[key]; }>;
|
|
27
|
-
type InferCallback<HT, HN extends keyof HT> = HT[HN] extends HookCallback ? HT[HN] : never;
|
|
28
|
-
type InferSpyEvent<HT extends Record<string, any>> = { [key in keyof HT]: {
|
|
29
|
-
name: key;
|
|
30
|
-
args: Parameters<HT[key]>;
|
|
31
|
-
context: Record<string, any>;
|
|
32
|
-
}; }[keyof HT];
|
|
33
|
-
declare class Hookable<HooksT extends Record<string, any> = Record<string, HookCallback>, HookNameT extends HookKeys<HooksT> = HookKeys<HooksT>> {
|
|
34
|
-
private _hooks;
|
|
35
|
-
private _before?;
|
|
36
|
-
private _after?;
|
|
37
|
-
private _deprecatedHooks;
|
|
38
|
-
private _deprecatedMessages?;
|
|
39
|
-
constructor();
|
|
40
|
-
hook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>, options?: {
|
|
41
|
-
allowDeprecated?: boolean;
|
|
42
|
-
}): () => void;
|
|
43
|
-
hookOnce<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): () => void;
|
|
44
|
-
removeHook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): void;
|
|
45
|
-
clearHook<NameT extends HookNameT>(name: NameT): void;
|
|
46
|
-
deprecateHook<NameT extends HookNameT>(name: NameT, deprecated: HookKeys<HooksT> | DeprecatedHook<HooksT>): void;
|
|
47
|
-
deprecateHooks(deprecatedHooks: Partial<Record<HookNameT, DeprecatedHook<HooksT>>>): void;
|
|
48
|
-
addHooks(configHooks: NestedHooks<HooksT>): () => void;
|
|
49
|
-
removeHooks(configHooks: NestedHooks<HooksT>): void;
|
|
50
|
-
removeAllHooks(): void;
|
|
51
|
-
callHook<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any> | void;
|
|
52
|
-
callHookParallel<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any[]> | void;
|
|
53
|
-
callHookWith<NameT extends HookNameT, CallFunction extends (hooks: HookCallback[], args: Parameters<InferCallback<HooksT, NameT>>, name: NameT) => any>(caller: CallFunction, name: NameT, args: Parameters<InferCallback<HooksT, NameT>>): ReturnType<CallFunction>;
|
|
54
|
-
beforeEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
|
|
55
|
-
afterEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
|
|
56
|
-
}
|
|
57
|
-
type CreateTask = (name?: string) => {
|
|
58
|
-
run: (function_: () => Promise<any> | any) => Promise<any> | any;
|
|
59
|
-
};
|
|
60
|
-
declare global {
|
|
61
|
-
interface Console {
|
|
62
|
-
createTask?: CreateTask;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region ../../node_modules/.pnpm/@tsdown+exe@0.22.14_tsdown@0.22.14/node_modules/@tsdown/exe/dist/index.d.mts
|
|
5
|
+
//#region ../../node_modules/.pnpm/@tsdown+exe@0.23.0_tsdown@0.23.0/node_modules/@tsdown/exe/dist/index.d.mts
|
|
67
6
|
//#region src/platform.d.ts
|
|
68
7
|
type ExePlatform = "win" | "darwin" | "linux";
|
|
69
8
|
type ExeArch = "x64" | "arm64";
|
|
@@ -82,7 +21,7 @@ interface ExeTarget {
|
|
|
82
21
|
*/
|
|
83
22
|
nodeVersion: (string & {}) | "latest" | "latest-lts" | `${string}.${string}.${string}`;
|
|
84
23
|
}
|
|
85
|
-
interface ExeExtensionOptions {
|
|
24
|
+
interface ExeExtensionOptions$1 {
|
|
86
25
|
/**
|
|
87
26
|
* Cross-platform targets for building executables.
|
|
88
27
|
* Requires `@tsdown/exe` to be installed.
|
|
@@ -98,16 +37,23 @@ interface ExeExtensionOptions {
|
|
|
98
37
|
* ```
|
|
99
38
|
*/
|
|
100
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
|
+
*/
|
|
101
44
|
getDownloadUrl?: (target: ExeTarget) => string | Promise<string>;
|
|
102
45
|
/**
|
|
46
|
+
* URL of the Node.js release index used to resolve the `latest` and
|
|
47
|
+
* `latest-lts` versions.
|
|
103
48
|
* @default 'https://nodejs.org/dist/index.json'
|
|
104
49
|
*/
|
|
105
50
|
nodeDistIndexUrl?: string;
|
|
106
51
|
}
|
|
107
52
|
//#endregion
|
|
108
|
-
//#region ../../node_modules/.pnpm/@tsdown+css@0.
|
|
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
|
|
109
54
|
//#region src/options.d.ts
|
|
110
55
|
type LightningCSSOptions = Omit<TransformOptions<any>, "filename" | "code">;
|
|
56
|
+
type CSSModulesLocalsConvention = "camelCase" | "camelCaseOnly" | "dashes" | "dashesOnly" | ((originalClassName: string, generatedClassName: string, inputFile: string) => string);
|
|
111
57
|
interface CSSModulesOptions {
|
|
112
58
|
/**
|
|
113
59
|
* Controls the scoping behavior.
|
|
@@ -130,7 +76,7 @@ interface CSSModulesOptions {
|
|
|
130
76
|
/**
|
|
131
77
|
* Transform convention for exported class names.
|
|
132
78
|
*/
|
|
133
|
-
localsConvention?:
|
|
79
|
+
localsConvention?: CSSModulesLocalsConvention;
|
|
134
80
|
/**
|
|
135
81
|
* Whether to include global class names in the export.
|
|
136
82
|
*/
|
|
@@ -140,7 +86,7 @@ interface CSSModulesOptions {
|
|
|
140
86
|
*/
|
|
141
87
|
getJSON?: (cssFileName: string, json: Record<string, string>, outputFileName: string) => void;
|
|
142
88
|
}
|
|
143
|
-
interface CssOptions {
|
|
89
|
+
interface CssOptions$1 {
|
|
144
90
|
/**
|
|
145
91
|
* Enable/disable CSS code splitting.
|
|
146
92
|
* When set to `false`, all CSS in the entire project will be extracted into
|
|
@@ -260,17 +206,86 @@ interface StylusPreprocessorOptions {
|
|
|
260
206
|
[key: string]: any;
|
|
261
207
|
}
|
|
262
208
|
//#endregion
|
|
263
|
-
//#region ../../node_modules/.pnpm/
|
|
264
|
-
|
|
265
|
-
|
|
209
|
+
//#region ../../node_modules/.pnpm/hookable@6.1.1/node_modules/hookable/dist/index.d.mts
|
|
210
|
+
type HookCallback = (...arguments_: any) => Promise<void> | void;
|
|
211
|
+
type HookKeys<T> = keyof T & string;
|
|
212
|
+
type DeprecatedHook<T> = {
|
|
213
|
+
message?: string;
|
|
214
|
+
to: HookKeys<T>;
|
|
215
|
+
};
|
|
216
|
+
type ValueOf<C> = C extends Record<any, any> ? C[keyof C] : never;
|
|
217
|
+
type Strings<T> = Exclude<keyof T, number | symbol>;
|
|
218
|
+
type KnownKeys<T> = keyof { [K in keyof T as string extends K ? never : number extends K ? never : K]: never; };
|
|
219
|
+
type StripGeneric<T> = Pick<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
|
|
220
|
+
type OnlyGeneric<T> = Omit<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
|
|
221
|
+
type Namespaces<T> = ValueOf<{ [key in Strings<T>]: key extends `${infer Namespace}:${string}` ? Namespace : never; }>;
|
|
222
|
+
type BareHooks<T> = ValueOf<{ [key in Strings<T>]: key extends `${string}:${string}` ? never : key; }>;
|
|
223
|
+
type HooksInNamespace<T, Namespace extends string> = ValueOf<{ [key in Strings<T>]: key extends `${Namespace}:${infer HookName}` ? HookName : never; }>;
|
|
224
|
+
type WithoutNamespace<T, Namespace extends string> = { [key in HooksInNamespace<T, Namespace>]: `${Namespace}:${key}` extends keyof T ? T[`${Namespace}:${key}`] : never; };
|
|
225
|
+
type NestedHooks<T> = (Partial<StripGeneric<T>> | Partial<OnlyGeneric<T>>) & Partial<{ [key in Namespaces<StripGeneric<T>>]: NestedHooks<WithoutNamespace<T, key>>; }> & Partial<{ [key in BareHooks<StripGeneric<T>>]: T[key]; }>;
|
|
226
|
+
type InferCallback<HT, HN extends keyof HT> = HT[HN] extends HookCallback ? HT[HN] : never;
|
|
227
|
+
type InferSpyEvent<HT extends Record<string, any>> = { [key in keyof HT]: {
|
|
228
|
+
name: key;
|
|
229
|
+
args: Parameters<HT[key]>;
|
|
230
|
+
context: Record<string, any>;
|
|
231
|
+
}; }[keyof HT];
|
|
232
|
+
declare class Hookable<HooksT extends Record<string, any> = Record<string, HookCallback>, HookNameT extends HookKeys<HooksT> = HookKeys<HooksT>> {
|
|
233
|
+
private _hooks;
|
|
234
|
+
private _before?;
|
|
235
|
+
private _after?;
|
|
236
|
+
private _deprecatedHooks;
|
|
237
|
+
private _deprecatedMessages?;
|
|
238
|
+
constructor();
|
|
239
|
+
hook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>, options?: {
|
|
240
|
+
allowDeprecated?: boolean;
|
|
241
|
+
}): () => void;
|
|
242
|
+
hookOnce<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): () => void;
|
|
243
|
+
removeHook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): void;
|
|
244
|
+
clearHook<NameT extends HookNameT>(name: NameT): void;
|
|
245
|
+
deprecateHook<NameT extends HookNameT>(name: NameT, deprecated: HookKeys<HooksT> | DeprecatedHook<HooksT>): void;
|
|
246
|
+
deprecateHooks(deprecatedHooks: Partial<Record<HookNameT, DeprecatedHook<HooksT>>>): void;
|
|
247
|
+
addHooks(configHooks: NestedHooks<HooksT>): () => void;
|
|
248
|
+
removeHooks(configHooks: NestedHooks<HooksT>): void;
|
|
249
|
+
removeAllHooks(): void;
|
|
250
|
+
callHook<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any> | void;
|
|
251
|
+
callHookParallel<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any[]> | void;
|
|
252
|
+
callHookWith<NameT extends HookNameT, CallFunction extends (hooks: HookCallback[], args: Parameters<InferCallback<HooksT, NameT>>, name: NameT) => any>(caller: CallFunction, name: NameT, args: Parameters<InferCallback<HooksT, NameT>>): ReturnType<CallFunction>;
|
|
253
|
+
beforeEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
|
|
254
|
+
afterEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
|
|
255
|
+
}
|
|
256
|
+
type CreateTask = (name?: string) => {
|
|
257
|
+
run: (function_: () => Promise<any> | any) => Promise<any> | any;
|
|
258
|
+
};
|
|
259
|
+
declare global {
|
|
260
|
+
interface Console {
|
|
261
|
+
createTask?: CreateTask;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.5_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_395c84c3f0e463da1bb9023138bdcb2e/node_modules/rolldown-plugin-dts/dist/custom-language-CFzWzq69.d.mts
|
|
266
|
+
//#region src/custom-language.d.ts
|
|
267
|
+
/** @ts-ignore - TS 7 mismatch */
|
|
268
|
+
type FileExtensionInfo = import("typescript").FileExtensionInfo;
|
|
269
|
+
/**
|
|
270
|
+
* Describes a non-standard source language, such as Vue or Astro.
|
|
271
|
+
*
|
|
272
|
+
* If the language is supported via Volar, {@linkcode volarTypeScript} and
|
|
273
|
+
* {@linkcode createVolarPlugins} must both be provided.
|
|
274
|
+
*/
|
|
275
|
+
interface CustomLanguage {
|
|
276
|
+
/** Patterns that identify files written in this language. */
|
|
266
277
|
extensionPatterns: RegExp[];
|
|
278
|
+
/** Extra file extensions passed to the TypeScript compiler. */
|
|
267
279
|
tsFileExtensionInfos?: FileExtensionInfo[];
|
|
268
|
-
|
|
269
|
-
create?: Parameters<(typeof import("@volar/typescript"))["proxyCreateProgram"]>[2];
|
|
280
|
+
/** Maps a source filename to the TypeScript filename used for declarations. */
|
|
270
281
|
toTsFilename?: (id: string) => string;
|
|
282
|
+
/** @ts-ignore - optional dep */
|
|
283
|
+
volarTypeScript?: typeof import("@volar/typescript");
|
|
284
|
+
/** @ts-ignore - optional dep */
|
|
285
|
+
createVolarPlugins?: Parameters<(typeof import("@volar/typescript"))["proxyCreateProgram"]>[2];
|
|
271
286
|
}
|
|
272
287
|
//#endregion
|
|
273
|
-
//#region ../../node_modules/.pnpm/get-tsconfig@5.0.0-beta.
|
|
288
|
+
//#region ../../node_modules/.pnpm/get-tsconfig@5.0.0-beta.6/node_modules/get-tsconfig/dist/index.d.mts
|
|
274
289
|
declare namespace TsConfigJson {
|
|
275
290
|
namespace CompilerOptions {
|
|
276
291
|
type JSX = 'preserve' | 'react' | 'react-jsx' | 'react-jsxdev' | 'react-native';
|
|
@@ -1133,7 +1148,13 @@ type TsConfigJson = {
|
|
|
1133
1148
|
references?: TsConfigJson.References[];
|
|
1134
1149
|
};
|
|
1135
1150
|
//#endregion
|
|
1136
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.
|
|
1151
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.5_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_395c84c3f0e463da1bb9023138bdcb2e/node_modules/rolldown-plugin-dts/dist/index.d.mts
|
|
1152
|
+
//#region src/tsc/vue.d.ts
|
|
1153
|
+
interface VueLanguageOptions {
|
|
1154
|
+
/** @ts-ignore - optional dep */
|
|
1155
|
+
vueCompilerOptions?: Partial<import("@vue/language-core").VueCompilerOptions>;
|
|
1156
|
+
}
|
|
1157
|
+
//#endregion
|
|
1137
1158
|
//#region src/options.d.ts
|
|
1138
1159
|
interface Logger$1 {
|
|
1139
1160
|
info: (...args: any[]) => void;
|
|
@@ -1142,238 +1163,182 @@ interface Logger$1 {
|
|
|
1142
1163
|
}
|
|
1143
1164
|
interface GeneralOptions {
|
|
1144
1165
|
/**
|
|
1145
|
-
* The generator used to produce
|
|
1166
|
+
* The generator used to produce declaration files.
|
|
1146
1167
|
*
|
|
1147
|
-
* - `'tsc'
|
|
1148
|
-
* - `'oxc'
|
|
1149
|
-
* faster than `tsc`, but only supports code that satisfies
|
|
1168
|
+
* - `'tsc'` supports the full TypeScript type system.
|
|
1169
|
+
* - `'oxc'` is faster but requires code compatible with
|
|
1150
1170
|
* [`isolatedDeclarations`](https://www.typescriptlang.org/tsconfig/#isolatedDeclarations).
|
|
1151
|
-
* - `'tsgo'
|
|
1152
|
-
* ({@link https://github.com/microsoft/typescript-go tsgo}). May not support
|
|
1153
|
-
* all TypeScript features yet.
|
|
1171
|
+
* - `'tsgo'` uses the experimental TypeScript Go compiler.
|
|
1154
1172
|
*
|
|
1155
|
-
* When
|
|
1156
|
-
*
|
|
1157
|
-
*
|
|
1158
|
-
* - `'tsgo'` if TypeScript 7.0 (or `@typescript/native-preview`) is installed,
|
|
1159
|
-
* or {@link Options.tsgo tsgo} options are provided.
|
|
1160
|
-
* - `'tsc'` otherwise, and always when {@link TscOptions.vue vue} is enabled.
|
|
1173
|
+
* When omitted, the plugin selects `'oxc'` for `isolatedDeclarations`,
|
|
1174
|
+
* `'tsgo'` for TypeScript 7, and `'tsc'` otherwise. Volar-based custom
|
|
1175
|
+
* languages require `'tsc'`.
|
|
1161
1176
|
*
|
|
1162
|
-
* @default
|
|
1177
|
+
* @default Inferred from the TypeScript configuration and installed compiler.
|
|
1163
1178
|
*/
|
|
1164
1179
|
generator?: "tsc" | "oxc" | "tsgo";
|
|
1165
1180
|
/**
|
|
1166
|
-
* Glob pattern(s)
|
|
1167
|
-
*
|
|
1168
|
-
* When specified, only entry files matching these patterns will emit `.d.ts` chunks.
|
|
1169
|
-
* When not specified, all entries get `.d.ts` generation.
|
|
1181
|
+
* Glob pattern(s) that select source files for declaration generation.
|
|
1170
1182
|
*
|
|
1171
|
-
*
|
|
1172
|
-
*
|
|
1183
|
+
* Patterns are relative to {@link cwd} and may be negated with `!`. Matching
|
|
1184
|
+
* files are emitted even when they are not Rolldown entry points.
|
|
1173
1185
|
*
|
|
1174
1186
|
* @example
|
|
1175
|
-
*
|
|
1187
|
+
* ```ts
|
|
1176
1188
|
* entry: ['src/*.ts', '!src/internal/**']
|
|
1189
|
+
* ```
|
|
1177
1190
|
*/
|
|
1178
1191
|
entry?: string | string[];
|
|
1179
1192
|
/**
|
|
1180
|
-
*
|
|
1193
|
+
* Base directory for config discovery, glob matching, and relative paths.
|
|
1194
|
+
*
|
|
1195
|
+
* @default process.cwd()
|
|
1181
1196
|
*/
|
|
1182
1197
|
cwd?: string;
|
|
1183
1198
|
/**
|
|
1184
|
-
*
|
|
1199
|
+
* Treats entry files as existing declarations instead of source files.
|
|
1185
1200
|
*
|
|
1186
|
-
*
|
|
1201
|
+
* @default false
|
|
1187
1202
|
*/
|
|
1188
1203
|
dtsInput?: boolean;
|
|
1189
1204
|
/**
|
|
1190
|
-
*
|
|
1205
|
+
* Removes non-declaration chunks from the output.
|
|
1191
1206
|
*
|
|
1192
|
-
*
|
|
1207
|
+
* @default false
|
|
1193
1208
|
*/
|
|
1194
1209
|
emitDtsOnly?: boolean;
|
|
1195
1210
|
/**
|
|
1196
|
-
*
|
|
1197
|
-
*
|
|
1198
|
-
* If set to `false`, the plugin will ignore any `tsconfig.json` file.
|
|
1199
|
-
* You can still specify `compilerOptions` directly in the options.
|
|
1211
|
+
* A `tsconfig.json` path, resolved relative to {@link cwd}.
|
|
1200
1212
|
*
|
|
1201
|
-
* @
|
|
1213
|
+
* When omitted or `true`, the nearest config is discovered from {@link cwd}.
|
|
1214
|
+
* Set to `false` to disable config loading.
|
|
1202
1215
|
*/
|
|
1203
1216
|
tsconfig?: string | boolean;
|
|
1204
|
-
/**
|
|
1205
|
-
* Pass a raw `tsconfig.json` object directly to the plugin.
|
|
1206
|
-
*
|
|
1207
|
-
* @see https://www.typescriptlang.org/tsconfig
|
|
1208
|
-
*/
|
|
1217
|
+
/** Raw `tsconfig.json` values merged over the loaded config. */
|
|
1209
1218
|
tsconfigRaw?: Omit<TsConfigJson, "compilerOptions">;
|
|
1210
1219
|
/**
|
|
1211
|
-
*
|
|
1212
|
-
*
|
|
1213
|
-
* @see https://www.typescriptlang.org/tsconfig/#compilerOptions
|
|
1220
|
+
* Compiler options merged over those loaded from `tsconfig.json`.
|
|
1214
1221
|
*/
|
|
1215
1222
|
compilerOptions?: TsConfigJson.CompilerOptions;
|
|
1216
1223
|
/**
|
|
1217
|
-
*
|
|
1224
|
+
* Emits declaration maps (`.d.ts.map`).
|
|
1225
|
+
*
|
|
1226
|
+
* @default The value of `compilerOptions.declarationMap`.
|
|
1218
1227
|
*/
|
|
1219
1228
|
sourcemap?: boolean;
|
|
1220
1229
|
/**
|
|
1221
|
-
*
|
|
1230
|
+
* Resolver used for declaration imports, including packages in `node_modules`.
|
|
1222
1231
|
*
|
|
1223
|
-
*
|
|
1224
|
-
*
|
|
1232
|
+
* Use `'tsc'` when a project depends on TypeScript-specific resolution
|
|
1233
|
+
* behavior; otherwise `'oxc'` is faster.
|
|
1225
1234
|
*
|
|
1226
1235
|
* @default 'oxc'
|
|
1227
1236
|
*/
|
|
1228
1237
|
resolver?: "oxc" | "tsc";
|
|
1229
1238
|
/**
|
|
1230
|
-
*
|
|
1239
|
+
* Converts a single default export to `export =` for CommonJS consumers.
|
|
1240
|
+
* This does not add support for CommonJS-style declaration input.
|
|
1231
1241
|
*
|
|
1232
|
-
*
|
|
1233
|
-
* the output will use `export = ...` instead of the standard ES module syntax.
|
|
1234
|
-
* This is useful for compatibility with CommonJS.
|
|
1235
|
-
* This only controls the output format and does not enable support for
|
|
1236
|
-
* CommonJS-style `.d.ts` input.
|
|
1242
|
+
* @default false
|
|
1237
1243
|
*/
|
|
1238
1244
|
cjsDefault?: boolean;
|
|
1239
1245
|
/**
|
|
1240
|
-
*
|
|
1241
|
-
* - If set to `true`, Rolldown will treat the `.d.ts` files as having side effects during tree-shaking.
|
|
1242
|
-
* - If set to `false`, Rolldown may consider the `.d.ts` files as side-effect-free, potentially removing them if they are not imported.
|
|
1246
|
+
* Marks declaration modules as having side effects during tree-shaking.
|
|
1243
1247
|
*
|
|
1244
1248
|
* @default false
|
|
1245
1249
|
*/
|
|
1246
1250
|
sideEffects?: boolean;
|
|
1251
|
+
/**
|
|
1252
|
+
* Logger used for plugin messages.
|
|
1253
|
+
*
|
|
1254
|
+
* @default console
|
|
1255
|
+
*/
|
|
1247
1256
|
logger?: Logger$1;
|
|
1248
1257
|
}
|
|
1249
1258
|
interface TscOptions {
|
|
1250
1259
|
/**
|
|
1251
|
-
*
|
|
1252
|
-
*
|
|
1253
|
-
* - If `true`, the plugin will use [`tsc -b`](https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript) to build the project and all referenced projects before emitting `.d.ts` files.
|
|
1254
|
-
* - If `false`, the plugin will use [`tsc`](https://www.typescriptlang.org/docs/handbook/compiler-options.html) to emit `.d.ts` files without building referenced projects.
|
|
1260
|
+
* Uses TypeScript build mode (`tsc -b`) and follows project references.
|
|
1255
1261
|
*
|
|
1256
1262
|
* @default false
|
|
1257
1263
|
*/
|
|
1258
1264
|
build?: boolean;
|
|
1259
1265
|
/**
|
|
1260
|
-
*
|
|
1261
|
-
*
|
|
1262
|
-
* `rolldown-plugin-dts` will use [`tsc
|
|
1263
|
-
* -b`](https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript)
|
|
1264
|
-
* to build the project and all referenced projects before emitting `.d.ts`
|
|
1265
|
-
* files.
|
|
1266
|
-
*
|
|
1267
|
-
* In such case, if this option is `true`, `rolldown-plugin-dts` will write
|
|
1268
|
-
* down all built files into your disk, including
|
|
1269
|
-
* [`.tsbuildinfo`](https://www.typescriptlang.org/tsconfig/#tsBuildInfoFile)
|
|
1270
|
-
* and other built files. This is equivalent to running `tsc -b` in your
|
|
1271
|
-
* project.
|
|
1266
|
+
* Persists build-mode outputs, including `.tsbuildinfo`, to disk for reuse.
|
|
1267
|
+
* When disabled, build outputs stay in memory.
|
|
1272
1268
|
*
|
|
1273
|
-
*
|
|
1274
|
-
* built files only into memory and leave a small footprint in your disk.
|
|
1275
|
-
*
|
|
1276
|
-
* Enabling this option will decrease the build time by caching previous build
|
|
1277
|
-
* results. This is helpful when you have a large project with multiple
|
|
1278
|
-
* referenced projects.
|
|
1279
|
-
*
|
|
1280
|
-
* By default, `incremental` is `true` if your tsconfig has
|
|
1281
|
-
* [`incremental`](https://www.typescriptlang.org/tsconfig/#incremental) or
|
|
1282
|
-
* [`tsBuildInfoFile`](https://www.typescriptlang.org/tsconfig/#tsBuildInfoFile)
|
|
1283
|
-
* enabled.
|
|
1284
|
-
*
|
|
1285
|
-
* This option is only used when {@link Options.oxc} is
|
|
1286
|
-
* `false`.
|
|
1269
|
+
* @default Enabled when the config sets `incremental` or `tsBuildInfoFile`.
|
|
1287
1270
|
*/
|
|
1288
1271
|
incremental?: boolean;
|
|
1289
1272
|
/**
|
|
1290
|
-
*
|
|
1273
|
+
* Registers the built-in Vue language integration using `vue-tsc`.
|
|
1274
|
+
*
|
|
1275
|
+
* This is a shortcut for a preconfigured {@link Options.customLanguages}
|
|
1276
|
+
* entry and requires the `tsc` generator.
|
|
1277
|
+
*
|
|
1278
|
+
* @default false
|
|
1291
1279
|
*/
|
|
1292
|
-
vue?: boolean;
|
|
1280
|
+
vue?: boolean | VueLanguageOptions;
|
|
1293
1281
|
/**
|
|
1294
|
-
*
|
|
1295
|
-
*
|
|
1282
|
+
* Runs `tsc` or `vue-tsc` in a separate process.
|
|
1283
|
+
*
|
|
1284
|
+
* @default false
|
|
1296
1285
|
*/
|
|
1297
1286
|
parallel?: boolean;
|
|
1298
1287
|
/**
|
|
1299
|
-
*
|
|
1288
|
+
* Loads every file listed by `tsconfig.json` into the TypeScript program.
|
|
1300
1289
|
*
|
|
1301
|
-
*
|
|
1290
|
+
* Useful when one config covers multiple packages or entry points.
|
|
1291
|
+
*
|
|
1292
|
+
* @default false
|
|
1302
1293
|
*/
|
|
1303
1294
|
eager?: boolean;
|
|
1304
1295
|
/**
|
|
1305
|
-
*
|
|
1306
|
-
* ensuring that previously generated `.d.ts` code and caches are not reused.
|
|
1307
|
-
*
|
|
1308
|
-
* By default, the plugin may reuse internal caches or incremental build artifacts
|
|
1309
|
-
* to speed up repeated builds. Enabling this option forces a clean context,
|
|
1310
|
-
* guaranteeing that all type definitions are generated from scratch.
|
|
1296
|
+
* Uses an isolated TypeScript cache instead of the shared global context.
|
|
1311
1297
|
*
|
|
1312
1298
|
* @default false
|
|
1313
1299
|
*/
|
|
1314
1300
|
newContext?: boolean;
|
|
1315
1301
|
/**
|
|
1316
|
-
*
|
|
1317
|
-
* This is useful when you want to generate type definitions for JavaScript files with JSDoc comments.
|
|
1302
|
+
* Generates declarations for JavaScript files with JSDoc types.
|
|
1318
1303
|
*
|
|
1319
|
-
* Enabled
|
|
1320
|
-
* This option is only used when {@link Options.oxc} is
|
|
1321
|
-
* `false`.
|
|
1304
|
+
* @default Enabled when `allowJs` or `checkJs` is set.
|
|
1322
1305
|
*/
|
|
1323
1306
|
emitJs?: boolean;
|
|
1324
1307
|
}
|
|
1325
|
-
|
|
1308
|
+
/** Configuration accepted by {@link dts}. */
|
|
1309
|
+
interface Options extends GeneralOptions, TscOptions {
|
|
1326
1310
|
/**
|
|
1327
|
-
*
|
|
1328
|
-
* which is significantly faster than the TypeScript compiler.
|
|
1311
|
+
* Options for the `oxc` generator.
|
|
1329
1312
|
*
|
|
1330
|
-
*
|
|
1313
|
+
* The top-level {@link GeneralOptions.sourcemap sourcemap} option controls
|
|
1314
|
+
* declaration maps.
|
|
1331
1315
|
*/
|
|
1332
|
-
oxc?:
|
|
1316
|
+
oxc?: Omit<IsolatedDeclarationsOptions, "sourcemap">;
|
|
1333
1317
|
/**
|
|
1334
|
-
* **[Experimental]**
|
|
1335
|
-
*
|
|
1336
|
-
* This is automatically enabled when the TypeScript Go compiler (v7+) is
|
|
1337
|
-
* installed as the `typescript` package. Otherwise, make sure
|
|
1338
|
-
* `@typescript/native-preview` is installed as a dependency, or provide a
|
|
1339
|
-
* custom path to the `tsgo` binary using the `path` option.
|
|
1318
|
+
* **[Experimental]** Options for the `tsgo` generator.
|
|
1340
1319
|
*
|
|
1341
|
-
*
|
|
1342
|
-
*
|
|
1343
|
-
* options (such as `tsconfigRaw` and `isolatedDeclarations`) will be
|
|
1344
|
-
* unavailable when it is enabled.
|
|
1345
|
-
*
|
|
1346
|
-
*
|
|
1347
|
-
* ```ts
|
|
1348
|
-
* // Use tsgo from `@typescript/native-preview` dependency
|
|
1349
|
-
* tsgo: true
|
|
1350
|
-
*
|
|
1351
|
-
* // Use custom tsgo path (e.g., managed by Nix)
|
|
1352
|
-
* tsgo: { path: '/path/to/tsgo' }
|
|
1353
|
-
* ```
|
|
1320
|
+
* Used when {@link GeneralOptions.generator generator} is `'tsgo'` or
|
|
1321
|
+
* TypeScript 7 is detected.
|
|
1354
1322
|
*/
|
|
1355
|
-
tsgo?:
|
|
1323
|
+
tsgo?: TsgoOptions;
|
|
1356
1324
|
/**
|
|
1357
|
-
* Registers
|
|
1358
|
-
* allowing the `tsc` generator to process non-standard file types (such as
|
|
1359
|
-
* `.vue`) when generating `.d.ts` files. Multiple plugins can be provided and
|
|
1360
|
-
* are applied together.
|
|
1325
|
+
* Registers non-standard source languages such as Vue or Astro.
|
|
1361
1326
|
*
|
|
1362
|
-
*
|
|
1363
|
-
*
|
|
1327
|
+
* If a language is supported via {@link https://volarjs.dev Volar},
|
|
1328
|
+
* {@link CustomLanguage.volarTypeScript} and
|
|
1329
|
+
* {@link CustomLanguage.createVolarPlugins} are both required. Volar
|
|
1330
|
+
* languages require `tsc`; `tsgo` does not support custom languages.
|
|
1364
1331
|
*
|
|
1365
|
-
* @experimental
|
|
1332
|
+
* @experimental
|
|
1366
1333
|
*/
|
|
1367
|
-
|
|
1334
|
+
customLanguages?: CustomLanguage[];
|
|
1368
1335
|
}
|
|
1369
1336
|
interface TsgoOptions {
|
|
1370
|
-
/**
|
|
1371
|
-
* Custom path to the `tsgo` binary.
|
|
1372
|
-
*/
|
|
1337
|
+
/** Path to a custom `tsgo` executable. */
|
|
1373
1338
|
path?: string;
|
|
1374
1339
|
}
|
|
1375
1340
|
//#endregion
|
|
1376
|
-
//#region ../../node_modules/.pnpm/tsdown@0.
|
|
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_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/types-CYHmmaKd.d.mts
|
|
1377
1342
|
//#region src/utils/types.d.ts
|
|
1378
1343
|
type Overwrite<T, U> = Omit<T, keyof U> & U;
|
|
1379
1344
|
type Awaitable<T> = T | Promise<T>;
|
|
@@ -1420,6 +1385,13 @@ interface TsdownBundle extends AsyncDisposable {
|
|
|
1420
1385
|
config: ResolvedConfig;
|
|
1421
1386
|
inlinedDeps: Map<string, Set<string>>;
|
|
1422
1387
|
}
|
|
1388
|
+
interface TsdownHandle {
|
|
1389
|
+
bundles: TsdownBundle[];
|
|
1390
|
+
watch: {
|
|
1391
|
+
restart: () => Promise<TsdownHandle>;
|
|
1392
|
+
close: () => Promise<void>;
|
|
1393
|
+
};
|
|
1394
|
+
}
|
|
1423
1395
|
//#endregion
|
|
1424
1396
|
//#region src/utils/logger.d.ts
|
|
1425
1397
|
type LogType = "error" | "warn" | "info";
|
|
@@ -1469,8 +1441,9 @@ interface DepsConfig {
|
|
|
1469
1441
|
* Whitelist of dependencies allowed to be bundled from `node_modules`.
|
|
1470
1442
|
* Throws an error if any unlisted dependency is bundled.
|
|
1471
1443
|
*
|
|
1472
|
-
* - `undefined` (default):
|
|
1473
|
-
*
|
|
1444
|
+
* - `undefined` (default): Log an info-level hint if any `node_modules`
|
|
1445
|
+
* dependencies are bundled.
|
|
1446
|
+
* - `false`: Disable the hint and all checks about bundled dependencies.
|
|
1474
1447
|
*
|
|
1475
1448
|
* Note: Be sure to include all required sub-dependencies as well.
|
|
1476
1449
|
*/
|
|
@@ -1486,24 +1459,11 @@ interface DepsConfig {
|
|
|
1486
1459
|
* `require` calls are not detected.
|
|
1487
1460
|
*/
|
|
1488
1461
|
onlyImport?: Arrayable<string | RegExp>;
|
|
1489
|
-
/**
|
|
1490
|
-
* @deprecated Use {@linkcode onlyBundle} instead.
|
|
1491
|
-
*/
|
|
1492
|
-
onlyAllowBundle?: Arrayable<string | RegExp> | false;
|
|
1493
|
-
/**
|
|
1494
|
-
* Skip bundling all `node_modules` dependencies.
|
|
1495
|
-
*
|
|
1496
|
-
* **Note:** This option cannot be used together with {@linkcode alwaysBundle}.
|
|
1497
|
-
*
|
|
1498
|
-
* @default false
|
|
1499
|
-
* @deprecated Use {@linkcode neverBundle | neverBundle: true} instead.
|
|
1500
|
-
*/
|
|
1501
|
-
skipNodeModulesBundle?: boolean;
|
|
1502
1462
|
/**
|
|
1503
1463
|
* Resolve dependency subpath imports to their actual package-relative paths
|
|
1504
1464
|
* when externalizing packages without an `exports` field.
|
|
1505
1465
|
*
|
|
1506
|
-
* @default
|
|
1466
|
+
* @default false
|
|
1507
1467
|
*/
|
|
1508
1468
|
resolveDepSubpath?: boolean;
|
|
1509
1469
|
/**
|
|
@@ -1511,7 +1471,7 @@ interface DepsConfig {
|
|
|
1511
1471
|
*/
|
|
1512
1472
|
dts?: Pick<DepsConfig, "alwaysBundle" | "neverBundle">;
|
|
1513
1473
|
}
|
|
1514
|
-
interface ResolvedDepsConfig extends Pick<DepsConfig, "neverBundle" | "
|
|
1474
|
+
interface ResolvedDepsConfig extends Pick<DepsConfig, "neverBundle" | "resolveDepSubpath"> {
|
|
1515
1475
|
alwaysBundle?: NoExternalFn;
|
|
1516
1476
|
onlyBundle?: Array<string | RegExp> | false;
|
|
1517
1477
|
onlyImport?: Array<string | RegExp>;
|
|
@@ -1522,6 +1482,8 @@ interface ResolvedDepsConfig extends Pick<DepsConfig, "neverBundle" | "skipNodeM
|
|
|
1522
1482
|
}
|
|
1523
1483
|
//#endregion
|
|
1524
1484
|
//#region src/features/devtools.d.ts
|
|
1485
|
+
/** @ts-ignore - optional dep */
|
|
1486
|
+
type StartOptions = import("@vitejs/devtools/cli-commands").StartOptions;
|
|
1525
1487
|
interface DevtoolsOptions extends NonNullable<InputOptions["devtools"]> {
|
|
1526
1488
|
/**
|
|
1527
1489
|
* **[experimental]** Enable devtools integration. `@vitejs/devtools` must be installed as a dependency.
|
|
@@ -1536,6 +1498,8 @@ interface DevtoolsOptions extends NonNullable<InputOptions["devtools"]> {
|
|
|
1536
1498
|
*/
|
|
1537
1499
|
clean?: boolean;
|
|
1538
1500
|
}
|
|
1501
|
+
/** @ts-ignore - optional dep */
|
|
1502
|
+
type ExeExtensionOptions = ExeExtensionOptions$1;
|
|
1539
1503
|
interface ExeOptions extends ExeExtensionOptions {
|
|
1540
1504
|
seaConfig?: Omit<SeaConfig, "main" | "output" | "mainFormat">;
|
|
1541
1505
|
/**
|
|
@@ -1552,7 +1516,7 @@ interface ExeOptions extends ExeExtensionOptions {
|
|
|
1552
1516
|
/**
|
|
1553
1517
|
* See also [Node.js SEA Documentation](https://nodejs.org/api/single-executable-applications.html#generating-single-executable-applications-with---build-sea)
|
|
1554
1518
|
*
|
|
1555
|
-
* Note some default values are different from Node.js defaults to optimize for typical use cases (e.g. disabling experimental warning
|
|
1519
|
+
* Note some default values are different from Node.js defaults to optimize for typical use cases (e.g. disabling the experimental SEA warning). These can be overridden.
|
|
1556
1520
|
*/
|
|
1557
1521
|
interface SeaConfig {
|
|
1558
1522
|
main?: string;
|
|
@@ -1617,9 +1581,7 @@ interface TsdownHooks {
|
|
|
1617
1581
|
}) => void | Promise<void>;
|
|
1618
1582
|
}
|
|
1619
1583
|
//#endregion
|
|
1620
|
-
//#region node_modules/.pnpm/pkg-types@2.3.
|
|
1621
|
-
//#endregion
|
|
1622
|
-
//#region src/packagejson/types.d.ts
|
|
1584
|
+
//#region node_modules/.pnpm/pkg-types@2.3.2/node_modules/pkg-types/dist/index.d.mts
|
|
1623
1585
|
interface PackageJson {
|
|
1624
1586
|
/**
|
|
1625
1587
|
* The name is what your thing is called.
|
|
@@ -1947,7 +1909,10 @@ type ChunkAddonFunction = (ctx: {
|
|
|
1947
1909
|
type ChunkAddon = ChunkAddonObject | ChunkAddonFunction | string;
|
|
1948
1910
|
//#endregion
|
|
1949
1911
|
//#region src/features/pkg/attw.d.ts
|
|
1912
|
+
/** @ts-ignore - optional dep */
|
|
1913
|
+
type CheckPackageOptions = import("@arethetypeswrong/core").CheckPackageOptions;
|
|
1950
1914
|
interface AttwOptions extends CheckPackageOptions {
|
|
1915
|
+
/** @ts-ignore - optional dep */
|
|
1951
1916
|
module?: typeof import("@arethetypeswrong/core");
|
|
1952
1917
|
/**
|
|
1953
1918
|
* Profiles select a set of resolution modes to require/ignore. All are evaluated but failures outside
|
|
@@ -2055,10 +2020,10 @@ interface ExportsOptions {
|
|
|
2055
2020
|
*/
|
|
2056
2021
|
exclude?: (RegExp | string)[];
|
|
2057
2022
|
/**
|
|
2058
|
-
* Generate legacy fields (`main` and `
|
|
2059
|
-
* that do not support package `exports` field.
|
|
2023
|
+
* Generate legacy fields (`main`, `module`, and `types`) for older Node.js
|
|
2024
|
+
* versions and bundlers that do not support the package `exports` field.
|
|
2060
2025
|
*
|
|
2061
|
-
* Defaults to false
|
|
2026
|
+
* Defaults to `false` if only ESM builds are included, `true` otherwise.
|
|
2062
2027
|
*
|
|
2063
2028
|
* @see {@link https://github.com/publint/publint/issues/24}
|
|
2064
2029
|
*/
|
|
@@ -2174,7 +2139,10 @@ interface ExportsOptions {
|
|
|
2174
2139
|
}
|
|
2175
2140
|
//#endregion
|
|
2176
2141
|
//#region src/features/pkg/publint.d.ts
|
|
2177
|
-
|
|
2142
|
+
/** @ts-ignore - optional dep */
|
|
2143
|
+
type Options$1 = import("publint").Options;
|
|
2144
|
+
interface PublintOptions extends Omit<Options$1, "pack" | "pkgDir"> {
|
|
2145
|
+
/** @ts-ignore - optional dep */
|
|
2178
2146
|
module?: [typeof import("publint"), typeof import("publint/utils")];
|
|
2179
2147
|
}
|
|
2180
2148
|
//#endregion
|
|
@@ -2252,34 +2220,19 @@ interface ReportOptions {
|
|
|
2252
2220
|
* @default 1_000_000 // 1 MB
|
|
2253
2221
|
*/
|
|
2254
2222
|
maxCompressSize?: number;
|
|
2255
|
-
}
|
|
2256
|
-
type ConcurrencyExecutor = <T>(task: () => Promise<T>) => Promise<T>;
|
|
2257
|
-
//#endregion
|
|
2258
|
-
//#region src/config/types.d.ts
|
|
2259
|
-
interface DtsOptions extends Options$1 {
|
|
2260
2223
|
/**
|
|
2261
|
-
*
|
|
2262
|
-
*
|
|
2263
|
-
*
|
|
2264
|
-
* The stub re-exports everything from the corresponding `.d.mts` file,
|
|
2265
|
-
* ensuring CJS and ESM consumers share the same type declarations. This
|
|
2266
|
-
* eliminates the TypeScript "dual module hazard" where separate `.d.cts`
|
|
2267
|
-
* and `.d.mts` declarations cause `TS2352` ("neither type sufficiently
|
|
2268
|
-
* overlaps") errors when casting between types derived from the same class.
|
|
2269
|
-
*
|
|
2270
|
-
* Only applies when building both `esm` and `cjs` formats simultaneously.
|
|
2271
|
-
*
|
|
2272
|
-
* @remarks
|
|
2273
|
-
* The generated `.d.cts` stub uses a relative path to re-export from the
|
|
2274
|
-
* corresponding `.d.mts` file, so both formats must be emitted to the
|
|
2275
|
-
* **same** `outDir`. Splitting CJS and ESM outputs into separate
|
|
2276
|
-
* format-specific directories (e.g. `dist/cjs` and `dist/esm`) is not
|
|
2277
|
-
* supported with this option, because the re-export path would be invalid.
|
|
2224
|
+
* Only report the total size, skipping the per-file breakdown.
|
|
2225
|
+
* Useful for libraries that emit many files in unbundle mode.
|
|
2278
2226
|
*
|
|
2279
2227
|
* @default false
|
|
2280
2228
|
*/
|
|
2281
|
-
|
|
2229
|
+
summary?: boolean;
|
|
2282
2230
|
}
|
|
2231
|
+
type ConcurrencyExecutor = <T>(task: () => Promise<T>) => Promise<T>;
|
|
2232
|
+
//#endregion
|
|
2233
|
+
//#region src/config/types.d.ts
|
|
2234
|
+
/** @ts-ignore - optional dep */
|
|
2235
|
+
type UnusedOptions = import("unplugin-unused").Options;
|
|
2283
2236
|
type Sourcemap = boolean | "inline" | "hidden";
|
|
2284
2237
|
type Format = ModuleFormat;
|
|
2285
2238
|
type NormalizedFormat = InternalModuleFormat;
|
|
@@ -2327,6 +2280,8 @@ type WithEnabled<T> = boolean | undefined | CIOption | (T & {
|
|
|
2327
2280
|
*/
|
|
2328
2281
|
enabled?: boolean | CIOption;
|
|
2329
2282
|
});
|
|
2283
|
+
/** @ts-ignore - optional dep */
|
|
2284
|
+
type CssOptions = CssOptions$1;
|
|
2330
2285
|
/**
|
|
2331
2286
|
* Options for tsdown.
|
|
2332
2287
|
*/
|
|
@@ -2422,6 +2377,13 @@ interface UserConfig {
|
|
|
2422
2377
|
envPrefix?: string | string[];
|
|
2423
2378
|
define?: Record<string, string>;
|
|
2424
2379
|
/**
|
|
2380
|
+
* Inject CJS `__dirname` and `__filename` shims into ESM output.
|
|
2381
|
+
* Only applies when {@linkcode platform} is set to `node`.
|
|
2382
|
+
*
|
|
2383
|
+
* Note: `import.meta.url`, `import.meta.dirname`, and `import.meta.filename`
|
|
2384
|
+
* are always shimmed in CJS output, regardless of this option.
|
|
2385
|
+
*
|
|
2386
|
+
* @see https://tsdown.dev/options/shims
|
|
2425
2387
|
* @default false
|
|
2426
2388
|
*/
|
|
2427
2389
|
shims?: boolean;
|
|
@@ -2490,7 +2452,8 @@ interface UserConfig {
|
|
|
2490
2452
|
checks?: ChecksOptions & {
|
|
2491
2453
|
/**
|
|
2492
2454
|
* If the config includes the `cjs` format and
|
|
2493
|
-
* one of its
|
|
2455
|
+
* one of its targets is a Node.js version that supports `require(esm)`
|
|
2456
|
+
* (`^20.19.0 || >=22.12.0`),
|
|
2494
2457
|
* warn the user about the deprecation of CommonJS.
|
|
2495
2458
|
*
|
|
2496
2459
|
* @default true
|
|
@@ -2664,12 +2627,13 @@ interface UserConfig {
|
|
|
2664
2627
|
/**
|
|
2665
2628
|
* Enables generation of TypeScript declaration files (`.d.ts`).
|
|
2666
2629
|
*
|
|
2667
|
-
* By default, this option is auto-detected
|
|
2630
|
+
* By default, this option is auto-detected:
|
|
2668
2631
|
* - If {@linkcode exe} is enabled, declaration file generation is disabled by default.
|
|
2669
|
-
* - If the `types` field is present
|
|
2632
|
+
* - If the `types` or `typings` field is present in `package.json`, or if its `exports` field contains a `types` entry, declaration file generation is enabled by default.
|
|
2633
|
+
* - Otherwise, if the resolved `tsconfig.json` has `declaration: true`, declaration file generation is enabled by default.
|
|
2670
2634
|
* - Otherwise, declaration file generation is disabled by default.
|
|
2671
2635
|
*/
|
|
2672
|
-
dts?: WithEnabled<
|
|
2636
|
+
dts?: WithEnabled<Options>;
|
|
2673
2637
|
/**
|
|
2674
2638
|
* Enable unused dependencies check with `unplugin-unused`
|
|
2675
2639
|
* Requires `unplugin-unused` to be installed.
|
|
@@ -2745,59 +2709,15 @@ interface UserConfig {
|
|
|
2745
2709
|
*/
|
|
2746
2710
|
workspace?: Workspace | Arrayable<string> | true;
|
|
2747
2711
|
/**
|
|
2712
|
+
* Cannot be combined with `deps.neverBundle`; setting both throws an error.
|
|
2748
2713
|
* @deprecated Use {@linkcode DepsConfig.neverBundle | deps.neverBundle} instead.
|
|
2749
2714
|
*/
|
|
2750
2715
|
external?: ExternalOption;
|
|
2751
2716
|
/**
|
|
2717
|
+
* Cannot be combined with `deps.alwaysBundle`; setting both throws an error.
|
|
2752
2718
|
* @deprecated Use {@linkcode DepsConfig.alwaysBundle | deps.alwaysBundle} instead.
|
|
2753
2719
|
*/
|
|
2754
2720
|
noExternal?: Arrayable<string | RegExp> | NoExternalFn;
|
|
2755
|
-
/**
|
|
2756
|
-
* @deprecated Use {@linkcode DepsConfig.onlyBundle | deps.onlyBundle} instead.
|
|
2757
|
-
*/
|
|
2758
|
-
inlineOnly?: Arrayable<string | RegExp> | false;
|
|
2759
|
-
/**
|
|
2760
|
-
* @deprecated Use {@linkcode DepsConfig.neverBundle | deps.neverBundle: true} instead.
|
|
2761
|
-
* @default false
|
|
2762
|
-
*/
|
|
2763
|
-
skipNodeModulesBundle?: boolean;
|
|
2764
|
-
/**
|
|
2765
|
-
* Remove the `node:` prefix from built-in Node.js module imports.
|
|
2766
|
-
* When enabled, rewrites import sources like `node:fs` to `fs`.
|
|
2767
|
-
*
|
|
2768
|
-
* @default false
|
|
2769
|
-
* @deprecated Use {@linkcode nodeProtocol | nodeProtocol: 'strip'} instead.
|
|
2770
|
-
*
|
|
2771
|
-
* @example
|
|
2772
|
-
* <caption>`removeNodeProtocol: true` — remove the `node:` prefix</caption>
|
|
2773
|
-
*
|
|
2774
|
-
* ```ts
|
|
2775
|
-
* // Input
|
|
2776
|
-
* import 'node:fs'
|
|
2777
|
-
*
|
|
2778
|
-
* // Output
|
|
2779
|
-
* import 'fs'
|
|
2780
|
-
* ```
|
|
2781
|
-
*/
|
|
2782
|
-
removeNodeProtocol?: boolean;
|
|
2783
|
-
/**
|
|
2784
|
-
* @deprecated Use {@linkcode unbundle} instead.
|
|
2785
|
-
* @default true
|
|
2786
|
-
*/
|
|
2787
|
-
bundle?: boolean;
|
|
2788
|
-
/**
|
|
2789
|
-
* @deprecated Use {@linkcode outExtensions} instead.
|
|
2790
|
-
*/
|
|
2791
|
-
outExtension?: OutExtensionFactory;
|
|
2792
|
-
/**
|
|
2793
|
-
* @deprecated Use {@linkcode CssOptions.inject | css.inject} instead.
|
|
2794
|
-
*/
|
|
2795
|
-
injectStyle?: boolean;
|
|
2796
|
-
/**
|
|
2797
|
-
* @alias copy
|
|
2798
|
-
* @deprecated Alias for {@linkcode copy}, will be removed in the future.
|
|
2799
|
-
*/
|
|
2800
|
-
publicDir?: CopyOptions | CopyOptionsFn;
|
|
2801
2721
|
}
|
|
2802
2722
|
interface InlineConfig extends UserConfig {
|
|
2803
2723
|
/**
|
|
@@ -2818,12 +2738,14 @@ interface InlineConfig extends UserConfig {
|
|
|
2818
2738
|
*/
|
|
2819
2739
|
concurrency?: number;
|
|
2820
2740
|
}
|
|
2821
|
-
|
|
2741
|
+
interface UserConfigFnContext {
|
|
2822
2742
|
ci: boolean;
|
|
2823
2743
|
rootConfig?: UserConfig;
|
|
2824
|
-
|
|
2744
|
+
watch: TsdownHandle["watch"];
|
|
2745
|
+
}
|
|
2746
|
+
type UserConfigFn = (inlineConfig: InlineConfig, context: UserConfigFnContext) => Awaitable<Arrayable<UserConfig>>;
|
|
2825
2747
|
type UserConfigExport = Awaitable<Arrayable<UserConfig> | UserConfigFn>;
|
|
2826
|
-
type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "fromVite" | "
|
|
2748
|
+
type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "fromVite" | "external" | "noExternal" | "logLevel" | "failOnWarn" | "suppressWarnings" | "customLogger" | "envFile" | "envPrefix">, "globalName" | "inputOptions" | "outputOptions" | "minify" | "define" | "alias" | "onSuccess" | "outExtensions" | "hooks" | "copy" | "loader" | "name" | "banner" | "footer" | "checks" | "css">, {
|
|
2827
2749
|
/**
|
|
2828
2750
|
* Resolved entry map (after glob expansion)
|
|
2829
2751
|
*/
|
|
@@ -2847,7 +2769,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
|
|
|
2847
2769
|
root: string;
|
|
2848
2770
|
configDeps: Set<string>;
|
|
2849
2771
|
runBuild: ConcurrencyExecutor;
|
|
2850
|
-
dts: false |
|
|
2772
|
+
dts: false | Options;
|
|
2851
2773
|
report: false | ReportOptions;
|
|
2852
2774
|
tsconfig: false | string;
|
|
2853
2775
|
exports: false | ExportsOptions;
|
|
@@ -2858,7 +2780,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
|
|
|
2858
2780
|
exe: false | ExeOptions;
|
|
2859
2781
|
}>;
|
|
2860
2782
|
//#endregion
|
|
2861
|
-
//#region ../../node_modules/.pnpm/tsdown@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_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/config-DR1wR8P-.d.mts
|
|
2862
2784
|
//#region src/config/options.d.ts
|
|
2863
2785
|
/**
|
|
2864
2786
|
* Resolve user config into resolved configs
|
|
@@ -2879,19 +2801,19 @@ declare function defineConfig(options: UserConfig[]): UserConfig[];
|
|
|
2879
2801
|
declare function defineConfig(options: UserConfigFn): UserConfigFn;
|
|
2880
2802
|
declare function defineConfig(options: UserConfigExport): UserConfigExport;
|
|
2881
2803
|
//#endregion
|
|
2882
|
-
//#region ../../node_modules/.pnpm/tsdown@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_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/index.d.mts
|
|
2883
2805
|
//#region src/build.d.ts
|
|
2884
2806
|
/**
|
|
2885
2807
|
* Build with tsdown.
|
|
2886
2808
|
*/
|
|
2887
|
-
declare function build$1(inlineConfig?: InlineConfig): Promise<
|
|
2809
|
+
declare function build$1(inlineConfig?: InlineConfig): Promise<TsdownHandle>;
|
|
2888
2810
|
/**
|
|
2889
2811
|
* Build with `ResolvedConfigs`.
|
|
2890
2812
|
*
|
|
2891
2813
|
* **Internal API, not for public use**
|
|
2892
2814
|
* @private
|
|
2893
2815
|
*/
|
|
2894
|
-
declare function buildWithConfigs(configs: ResolvedConfig[], configDeps: Set<string>,
|
|
2816
|
+
declare function buildWithConfigs(configs: ResolvedConfig[], configDeps: Set<string>, rebuild: () => Promise<TsdownHandle>): Promise<TsdownHandle>;
|
|
2895
2817
|
//#endregion
|
|
2896
2818
|
//#region src/features/debug.d.ts
|
|
2897
2819
|
declare function enableDebug(debug?: boolean | Arrayable<string>): void;
|
|
@@ -2899,4 +2821,4 @@ declare function enableDebug(debug?: boolean | Arrayable<string>): void;
|
|
|
2899
2821
|
//#region src/index.d.ts
|
|
2900
2822
|
declare const version: string;
|
|
2901
2823
|
//#endregion
|
|
2902
|
-
export { type AttwOptions, type BuildContext, CIOption, type ChunkAddon, type ChunkAddonFunction, type ChunkAddonObject, type CopyEntry, type CopyOptions, type CopyOptionsFn, type DepsConfig, type DevtoolsOptions, DtsOptions, type ExeOptions, type ExportsOptions, Format, InlineConfig, type Logger, type NoExternalFn, NormalizedFormat, type OutExtensionContext, type OutExtensionFactory, type OutExtensionObject, type PackageJsonWithPath, type PackageType, type PublintOptions, type ReportOptions, ResolvedConfig, type ResolvedDepsConfig, Rolldown, type RolldownChunk, type RolldownContext, type SeaConfig, Sourcemap, type TreeshakingOptions, type TsdownBundle, type TsdownHooks, TsdownInputOption, type TsdownPlugin, type TsdownPluginOption, type UnusedOptions, UserConfig, UserConfigExport, UserConfigFn, WithEnabled, Workspace, build$1 as build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig, version };
|
|
2824
|
+
export { type AttwOptions, type BuildContext, CIOption, type ChunkAddon, type ChunkAddonFunction, type ChunkAddonObject, type CopyEntry, type CopyOptions, type CopyOptionsFn, type DepsConfig, type DevtoolsOptions, type Options as DtsOptions, type ExeOptions, type ExportsOptions, Format, InlineConfig, type Logger, type NoExternalFn, NormalizedFormat, type OutExtensionContext, type OutExtensionFactory, type OutExtensionObject, type PackageJsonWithPath, type PackageType, type PublintOptions, type ReportOptions, ResolvedConfig, type ResolvedDepsConfig, Rolldown, type RolldownChunk, type RolldownContext, type SeaConfig, Sourcemap, type TreeshakingOptions, type TsdownBundle, type TsdownHandle, type TsdownHooks, TsdownInputOption, type TsdownPlugin, type TsdownPluginOption, type UnusedOptions, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnContext, WithEnabled, Workspace, build$1 as build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig, version };
|