@nuxt/schema-nightly 4.5.1-29752449.30d24817 → 4.5.2-2610052030-052d82e
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/builder-env.d.mts +134 -132
- package/dist/components-D8Oys4sc.d.mts +4861 -0
- package/dist/index.d.mts +3 -3260
- package/dist/index.mjs +122 -16
- package/dist/internal.d.mts +2 -0
- package/dist/internal.mjs +1 -0
- package/package.json +33 -28
package/dist/builder-env.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/types/builder-env/vite.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* Reference: https://github.com/vitejs/vite/blob/main/packages/vite/types/importMeta.d.ts
|
|
4
|
-
*/
|
|
3
|
+
* Reference: https://github.com/vitejs/vite/blob/main/packages/vite/types/importMeta.d.ts
|
|
4
|
+
*/
|
|
5
5
|
type ModuleNamespace = Record<string, any> & {
|
|
6
6
|
[Symbol.toStringTag]: "Module";
|
|
7
7
|
};
|
|
@@ -25,44 +25,44 @@ interface KnownAsTypeMap {
|
|
|
25
25
|
}
|
|
26
26
|
interface ImportGlobOptions<Eager extends boolean, AsType extends string> {
|
|
27
27
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
* Import type for the import url.
|
|
29
|
+
*/
|
|
30
30
|
as?: AsType;
|
|
31
31
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
* Import as static or dynamic
|
|
33
|
+
*/
|
|
34
34
|
eager?: Eager;
|
|
35
35
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
* Import only the specific named export. Set to `default` to import the default export.
|
|
37
|
+
*/
|
|
38
38
|
import?: string;
|
|
39
39
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
* Custom queries
|
|
41
|
+
*/
|
|
42
42
|
query?: string | Record<string, string | number | boolean>;
|
|
43
43
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
* Search files also inside `node_modules/` and hidden directories (e.g. `.git/`). This might have impact on performance.
|
|
45
|
+
*/
|
|
46
46
|
exhaustive?: boolean;
|
|
47
47
|
}
|
|
48
48
|
interface ImportGlobFunction {
|
|
49
49
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<Eager extends boolean, As extends string, T =
|
|
50
|
+
* Import a list of files with a glob pattern.
|
|
51
|
+
*
|
|
52
|
+
* Overload 1: No generic provided, infer the type from `eager` and `as`
|
|
53
|
+
*/
|
|
54
|
+
<Eager extends boolean, As extends string, T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown>(glob: string | string[], options?: ImportGlobOptions<Eager, As>): (Eager extends true ? true : false) extends true ? Record<string, T> : Record<string, () => Promise<T>>;
|
|
55
55
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
* Import a list of files with a glob pattern.
|
|
57
|
+
*
|
|
58
|
+
* Overload 2: Module generic provided, infer the type from `eager: false`
|
|
59
|
+
*/
|
|
60
60
|
<M>(glob: string | string[], options?: ImportGlobOptions<false, string>): Record<string, () => Promise<M>>;
|
|
61
61
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
* Import a list of files with a glob pattern.
|
|
63
|
+
*
|
|
64
|
+
* Overload 3: Module generic provided, infer the type from `eager: true`
|
|
65
|
+
*/
|
|
66
66
|
<M>(glob: string | string[], options: ImportGlobOptions<true, string>): Record<string, M>;
|
|
67
67
|
}
|
|
68
68
|
interface ViteImportMeta {
|
|
@@ -74,188 +74,188 @@ interface ViteImportMeta {
|
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region src/types/builder-env/webpack.d.ts
|
|
76
76
|
/**
|
|
77
|
-
* Reference: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/webpack-env/index.d.ts
|
|
78
|
-
*/
|
|
77
|
+
* Reference: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/webpack-env/index.d.ts
|
|
78
|
+
*/
|
|
79
79
|
type WebpackModuleId = string | number;
|
|
80
80
|
interface HotNotifierInfo {
|
|
81
81
|
type: "self-declined" | "declined" | "unaccepted" | "accepted" | "disposed" | "accept-errored" | "self-accept-errored" | "self-accept-error-handler-errored";
|
|
82
82
|
/**
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
* The module in question.
|
|
84
|
+
*/
|
|
85
85
|
moduleId: number;
|
|
86
86
|
/**
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
* For errors: the module id owning the accept handler.
|
|
88
|
+
*/
|
|
89
89
|
dependencyId?: number | undefined;
|
|
90
90
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
* For declined/accepted/unaccepted: the chain from where the update was propagated.
|
|
92
|
+
*/
|
|
93
93
|
chain?: number[] | undefined;
|
|
94
94
|
/**
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
* For declined: the module id of the declining parent
|
|
96
|
+
*/
|
|
97
97
|
parentId?: number | undefined;
|
|
98
98
|
/**
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
* For accepted: the modules that are outdated and will be disposed
|
|
100
|
+
*/
|
|
101
101
|
outdatedModules?: number[] | undefined;
|
|
102
102
|
/**
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
* For accepted: The location of accept handlers that will handle the update
|
|
104
|
+
*/
|
|
105
105
|
outdatedDependencies?: {
|
|
106
106
|
[dependencyId: number]: number[];
|
|
107
107
|
} | undefined;
|
|
108
108
|
/**
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
* For errors: the thrown error
|
|
110
|
+
*/
|
|
111
111
|
error?: Error | undefined;
|
|
112
112
|
/**
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
* For self-accept-error-handler-errored: the error thrown by the module
|
|
114
|
+
* before the error handler tried to handle it.
|
|
115
|
+
*/
|
|
116
116
|
originalError?: Error | undefined;
|
|
117
117
|
}
|
|
118
118
|
interface AcceptOptions {
|
|
119
119
|
/**
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
* If true the update process continues even if some modules are not accepted (and would bubble to the entry point).
|
|
121
|
+
*/
|
|
122
122
|
ignoreUnaccepted?: boolean | undefined;
|
|
123
123
|
/**
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
* Ignore changes made to declined modules.
|
|
125
|
+
*/
|
|
126
126
|
ignoreDeclined?: boolean | undefined;
|
|
127
127
|
/**
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
* Ignore errors throw in accept handlers, error handlers and while reevaluating module.
|
|
129
|
+
*/
|
|
130
130
|
ignoreErrored?: boolean | undefined;
|
|
131
131
|
/**
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
* Notifier for declined modules.
|
|
133
|
+
*/
|
|
134
134
|
onDeclined?: ((info: HotNotifierInfo) => void) | undefined;
|
|
135
135
|
/**
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
* Notifier for unaccepted modules.
|
|
137
|
+
*/
|
|
138
138
|
onUnaccepted?: ((info: HotNotifierInfo) => void) | undefined;
|
|
139
139
|
/**
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
* Notifier for accepted modules.
|
|
141
|
+
*/
|
|
142
142
|
onAccepted?: ((info: HotNotifierInfo) => void) | undefined;
|
|
143
143
|
/**
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
* Notifier for disposed modules.
|
|
145
|
+
*/
|
|
146
146
|
onDisposed?: ((info: HotNotifierInfo) => void) | undefined;
|
|
147
147
|
/**
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
* Notifier for errors.
|
|
149
|
+
*/
|
|
150
150
|
onErrored?: ((info: HotNotifierInfo) => void) | undefined;
|
|
151
151
|
/**
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
* Indicates that apply() is automatically called by check function
|
|
153
|
+
*/
|
|
154
154
|
autoApply?: boolean | undefined;
|
|
155
155
|
}
|
|
156
156
|
interface WebpackHot {
|
|
157
157
|
/**
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
* Accept code updates for the specified dependencies. The callback is called when dependencies were replaced.
|
|
159
|
+
* @param dependencies
|
|
160
|
+
* @param callback
|
|
161
|
+
* @param errorHandler
|
|
162
|
+
*/
|
|
163
163
|
accept(dependencies: string[], callback?: (updatedDependencies: WebpackModuleId[]) => void, errorHandler?: (err: Error) => void): void;
|
|
164
164
|
/**
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
165
|
+
* Accept code updates for the specified dependencies. The callback is called when dependencies were replaced.
|
|
166
|
+
* @param dependency
|
|
167
|
+
* @param callback
|
|
168
|
+
* @param errorHandler
|
|
169
|
+
*/
|
|
170
170
|
accept(dependency: string, callback?: () => void, errorHandler?: (err: Error) => void): void;
|
|
171
171
|
/**
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
172
|
+
* Accept code updates for this module without notification of parents.
|
|
173
|
+
* This should only be used if the module doesn’t export anything.
|
|
174
|
+
* The errHandler can be used to handle errors that occur while loading the updated module.
|
|
175
|
+
* @param errHandler
|
|
176
|
+
*/
|
|
177
177
|
accept(errHandler?: (err: Error) => void): void;
|
|
178
178
|
/**
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
* Do not accept updates for the specified dependencies. If any dependencies is updated, the code update fails with code "decline".
|
|
180
|
+
*/
|
|
181
181
|
decline(dependencies: string[]): void;
|
|
182
182
|
/**
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
* Do not accept updates for the specified dependencies. If any dependencies is updated, the code update fails with code "decline".
|
|
184
|
+
*/
|
|
185
185
|
decline(dependency: string): void;
|
|
186
186
|
/**
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
* Flag the current module as not update-able. If updated the update code would fail with code "decline".
|
|
188
|
+
*/
|
|
189
189
|
decline(): void;
|
|
190
190
|
/**
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
191
|
+
* Add a one time handler, which is executed when the current module code is replaced.
|
|
192
|
+
* Here you should destroy/remove any persistent resource you have claimed/created.
|
|
193
|
+
* If you want to transfer state to the new module, add it to data object.
|
|
194
|
+
* The data will be available at module.hot.data on the new module.
|
|
195
|
+
* @param callback
|
|
196
|
+
*/
|
|
197
197
|
dispose(callback: (data: any) => void): void;
|
|
198
198
|
dispose(callback: <T>(data: T) => void): void;
|
|
199
199
|
/**
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
200
|
+
* Add a one time handler, which is executed when the current module code is replaced.
|
|
201
|
+
* Here you should destroy/remove any persistent resource you have claimed/created.
|
|
202
|
+
* If you want to transfer state to the new module, add it to data object.
|
|
203
|
+
* The data will be available at module.hot.data on the new module.
|
|
204
|
+
* @param callback
|
|
205
|
+
*/
|
|
206
206
|
addDisposeHandler(callback: (data: any) => void): void;
|
|
207
207
|
addDisposeHandler<T>(callback: (data: T) => void): void;
|
|
208
208
|
/**
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
209
|
+
* Remove a handler.
|
|
210
|
+
* This can useful to add a temporary dispose handler. You could i. e. replace code while in the middle of a multi-step async function.
|
|
211
|
+
* @param callback
|
|
212
|
+
*/
|
|
213
213
|
removeDisposeHandler(callback: (data: any) => void): void;
|
|
214
214
|
removeDisposeHandler<T>(callback: (data: T) => void): void;
|
|
215
215
|
/**
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
216
|
+
* Throws an exceptions if status() is not idle.
|
|
217
|
+
* Check all currently loaded modules for updates and apply updates if found.
|
|
218
|
+
* If no update was found, the callback is called with null.
|
|
219
|
+
* If autoApply is truthy the callback will be called with all modules that were disposed.
|
|
220
|
+
* apply() is automatically called with autoApply as options parameter.
|
|
221
|
+
* If autoApply is not set the callback will be called with all modules that will be disposed on apply().
|
|
222
|
+
* @param autoApply
|
|
223
|
+
* @param callback
|
|
224
|
+
*/
|
|
225
225
|
check(autoApply: boolean, callback: (err: Error, outdatedModules: WebpackModuleId[]) => void): void;
|
|
226
226
|
/**
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
227
|
+
* Throws an exceptions if status() is not idle.
|
|
228
|
+
* Check all currently loaded modules for updates and apply updates if found.
|
|
229
|
+
* If no update was found, the callback is called with null.
|
|
230
|
+
* The callback will be called with all modules that will be disposed on apply().
|
|
231
|
+
* @param callback
|
|
232
|
+
*/
|
|
233
233
|
check(callback: (err: Error, outdatedModules: WebpackModuleId[]) => void): void;
|
|
234
234
|
/**
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
235
|
+
* If status() != "ready" it throws an error.
|
|
236
|
+
* Continue the update process.
|
|
237
|
+
* @param options
|
|
238
|
+
* @param callback
|
|
239
|
+
*/
|
|
240
240
|
apply(options: AcceptOptions, callback: (err: Error, outdatedModules: WebpackModuleId[]) => void): void;
|
|
241
241
|
/**
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
242
|
+
* If status() != "ready" it throws an error.
|
|
243
|
+
* Continue the update process.
|
|
244
|
+
* @param callback
|
|
245
|
+
*/
|
|
246
246
|
apply(callback: (err: Error, outdatedModules: WebpackModuleId[]) => void): void;
|
|
247
247
|
/**
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
* Return one of idle, check, watch, watch-delay, prepare, ready, dispose, apply, abort or fail.
|
|
249
|
+
*/
|
|
250
250
|
status(): string;
|
|
251
251
|
/** Register a callback on status change. */
|
|
252
252
|
status(callback: (status: string) => void): void;
|
|
253
253
|
/** Register a callback on status change. */
|
|
254
254
|
addStatusHandler(callback: (status: string) => void): void;
|
|
255
255
|
/**
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
256
|
+
* Remove a registered status change handler.
|
|
257
|
+
* @param callback
|
|
258
|
+
*/
|
|
259
259
|
removeStatusHandler(callback: (status: string) => void): void;
|
|
260
260
|
active: boolean;
|
|
261
261
|
data: any;
|
|
@@ -272,12 +272,14 @@ type BundlerImportMeta = ViteImportMeta & WebpackImportMeta;
|
|
|
272
272
|
//#endregion
|
|
273
273
|
//#region src/builder-env.d.ts
|
|
274
274
|
declare global {
|
|
275
|
+
interface ImportMetaEnv {
|
|
276
|
+
[key: string]: any;
|
|
277
|
+
}
|
|
275
278
|
interface ImportMeta extends BundlerImportMeta {
|
|
276
279
|
/** the `file:` url of the current file (similar to `__filename` but as file url) */
|
|
277
280
|
url: string;
|
|
278
|
-
readonly env:
|
|
281
|
+
readonly env: ImportMetaEnv;
|
|
279
282
|
}
|
|
280
283
|
}
|
|
281
|
-
declare const builders: readonly ["vite", "webpack"];
|
|
282
|
-
//#endregion
|
|
283
|
-
export { builders };
|
|
284
|
+
export declare const builders: readonly ["vite", "webpack"];
|
|
285
|
+
//#endregion
|