@nuxt/schema-nightly 5.0.0-29354479.c2e19985 β†’ 5.0.0-29550727.fea006dd

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/README.md CHANGED
@@ -1,37 +1,39 @@
1
- [![Nuxt banner](https://github.com/nuxt/nuxt/tree/main/.github/assets/banner.svg)](https://nuxt.com)
1
+ <a href="https://nuxt.com"><img width="830" height="213" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/banner.svg" alt="Nuxt banner"></a>
2
2
 
3
3
  # Nuxt
4
4
 
5
5
  <p>
6
- <a href="https://www.npmjs.com/package/nuxt"><img src="https://img.shields.io/npm/v/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="Version"></a>
7
- <a href="https://www.npmjs.com/package/nuxt"><img src="https://img.shields.io/npm/dm/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="Downloads"></a>
8
- <a href="https://github.com/nuxt/nuxt/tree/main/LICENSE"><img src="https://img.shields.io/github/license/nuxt/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="License"></a>
6
+ <a href="https://npmx.dev/package/nuxt"><img src="https://npmx.dev/api/registry/badge/version/nuxt" alt="Version"></a>
7
+ <a href="https://npmx.dev/package/nuxt"><img src="https://npmx.dev/api/registry/badge/downloads/nuxt" alt="Downloads"></a>
8
+ <a href="https://github.com/nuxt/nuxt/blob/main/LICENSE"><img src="https://img.shields.io/github/license/nuxt/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="License"></a>
9
+ <a href="https://nuxt.com/modules"><img src="https://img.shields.io/badge/dynamic/json?url=https://nuxt.com/api/v1/modules&query=$.stats.modules&label=Modules&style=flat&colorA=18181B&colorB=28CF8D" alt="Modules"></a>
9
10
  <a href="https://nuxt.com"><img src="https://img.shields.io/badge/Nuxt%20Docs-18181B?logo=nuxt" alt="Website"></a>
10
11
  <a href="https://chat.nuxt.dev"><img src="https://img.shields.io/badge/Nuxt%20Discord-18181B?logo=discord" alt="Discord"></a>
11
- <a href="https://securityscorecards.dev/"><img src="https://api.securityscorecards.dev/projects/github.com/nuxt/nuxt/badge" alt="Nuxt openssf scorecard score"></a>
12
+ <a href="https://securityscorecards.dev/viewer/?uri=github.com/nuxt/nuxt"><img src="https://api.securityscorecards.dev/projects/github.com/nuxt/nuxt/badge" alt="Nuxt openssf scorecard score"></a>
13
+ <a href="https://deepwiki.com/nuxt/nuxt"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
12
14
  </p>
13
15
 
14
16
  Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.
15
17
 
16
18
  It provides a number of features that make it easy to build fast, SEO-friendly, and scalable web applications, including:
17
- - Server-side rendering, Static Site Generation, Hybrid Rendering and Edge-Side Rendering
19
+ - Server-side rendering, static site generation, hybrid rendering and edge-side rendering
18
20
  - Automatic routing with code-splitting and pre-fetching
19
21
  - Data fetching and state management
20
- - SEO Optimization and Meta tags definition
22
+ - Search engine optimization and defining meta tags
21
23
  - Auto imports of components, composables and utils
22
24
  - TypeScript with zero configuration
23
- - Go fullstack with our server/ directory
24
- - Extensible with [200+ modules](https://nuxt.com/modules)
25
+ - Go full-stack with our server/ directory
26
+ - Extensible with [300+ modules](https://nuxt.com/modules)
25
27
  - Deployment to a variety of [hosting platforms](https://nuxt.com/deploy)
26
28
  - ...[and much more](https://nuxt.com) πŸš€
27
29
 
28
30
  ### Table of Contents
29
31
 
30
32
  - πŸš€ [Getting Started](#getting-started)
31
- - πŸ’» [ Vue Development](#vue-development)
33
+ - πŸ’» [Vue Development](#vue-development)
32
34
  - πŸ“– [Documentation](#documentation)
33
35
  - 🧩 [Modules](#modules)
34
- - ❀️ [Contribute](#contribute)
36
+ - ❀️ [Contribute](#contribute)
35
37
  - 🏠 [Local Development](#local-development)
36
38
  - πŸ›Ÿ [Professional Support](#professional-support)
37
39
  - πŸ”— [Follow Us](#follow-us)
@@ -109,9 +111,9 @@ Follow the docs to [Set Up Your Local Development Environment](https://nuxt.com/
109
111
  ## <a name="follow-us">πŸ”— Follow Us</a>
110
112
 
111
113
  <p valign="center">
112
- <a href="https://go.nuxt.com/discord"><img width="20px" src="https://github.com/nuxt/nuxt/tree/main/.github/assets/discord.svg" alt="Discord"></a>&nbsp;&nbsp;<a href="https://go.nuxt.com/x"><img width="20px" src="https://github.com/nuxt/nuxt/tree/main/.github/assets/twitter.svg" alt="Twitter"></a>&nbsp;&nbsp;<a href="https://go.nuxt.com/github"><img width="20px" src="https://github.com/nuxt/nuxt/tree/main/.github/assets/github.svg" alt="GitHub"></a>&nbsp;&nbsp;<a href="https://go.nuxt.com/bluesky"><img width="20px" src="https://github.com/nuxt/nuxt/tree/main/.github/assets/bluesky.svg" alt="Bluesky"></a>
114
+ <a href="https://go.nuxt.com/discord"><img width="20" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/discord.svg" alt="Discord"></a>&nbsp;&nbsp;<a href="https://go.nuxt.com/x"><img width="20" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/twitter.svg" alt="Twitter"></a>&nbsp;&nbsp;<a href="https://go.nuxt.com/github"><img width="20" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/github.svg" alt="GitHub"></a>&nbsp;&nbsp;<a href="https://go.nuxt.com/bluesky"><img width="20" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/bluesky.svg" alt="Bluesky"></a>
113
115
  </p>
114
116
 
115
117
  ## <a name="license">βš–οΈ License</a>
116
118
 
117
- [MIT](https://github.com/nuxt/nuxt/tree/main/LICENSE)
119
+ [MIT](https://github.com/nuxt/nuxt/blob/main/LICENSE)
package/builder-env.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './dist/builder-env'
1
+ export * from './dist/builder-env.mts'
@@ -1,297 +1,283 @@
1
+ //#region src/types/builder-env/vite.d.ts
1
2
  /**
2
- * Reference: https://github.com/vitejs/vite/blob/main/packages/vite/types/importMeta.d.ts
3
- */
3
+ * Reference: https://github.com/vitejs/vite/blob/main/packages/vite/types/importMeta.d.ts
4
+ */
4
5
  type ModuleNamespace = Record<string, any> & {
5
- [Symbol.toStringTag]: 'Module';
6
+ [Symbol.toStringTag]: "Module";
6
7
  };
7
8
  interface ViteHot {
8
- readonly data: any;
9
- accept(): void;
10
- accept(cb: (mod: ModuleNamespace | undefined) => void): void;
11
- accept(dep: string, cb: (mod: ModuleNamespace | undefined) => void): void;
12
- accept(deps: readonly string[], cb: (mods: Array<ModuleNamespace | undefined>) => void): void;
13
- acceptExports(exportNames: string | readonly string[], cb?: (mod: ModuleNamespace | undefined) => void): void;
14
- dispose(cb: (data: any) => void): void;
15
- prune(cb: (data: any) => void): void;
16
- invalidate(message?: string): void;
17
- on(event: any, cb: (payload: any) => void): void;
18
- send(event: any, data?: any): void;
9
+ readonly data: any;
10
+ accept(): void;
11
+ accept(cb: (mod: ModuleNamespace | undefined) => void): void;
12
+ accept(dep: string, cb: (mod: ModuleNamespace | undefined) => void): void;
13
+ accept(deps: readonly string[], cb: (mods: Array<ModuleNamespace | undefined>) => void): void;
14
+ acceptExports(exportNames: string | readonly string[], cb?: (mod: ModuleNamespace | undefined) => void): void;
15
+ dispose(cb: (data: any) => void): void;
16
+ prune(cb: (data: any) => void): void;
17
+ invalidate(message?: string): void;
18
+ on(event: any, cb: (payload: any) => void): void;
19
+ send(event: any, data?: any): void;
19
20
  }
20
21
  interface KnownAsTypeMap {
21
- raw: string;
22
- url: string;
23
- worker: Worker;
22
+ raw: string;
23
+ url: string;
24
+ worker: Worker;
24
25
  }
25
26
  interface ImportGlobOptions<Eager extends boolean, AsType extends string> {
26
- /**
27
- * Import type for the import url.
28
- */
29
- as?: AsType;
30
- /**
31
- * Import as static or dynamic
32
- */
33
- eager?: Eager;
34
- /**
35
- * Import only the specific named export. Set to `default` to import the default export.
36
- */
37
- import?: string;
38
- /**
39
- * Custom queries
40
- */
41
- query?: string | Record<string, string | number | boolean>;
42
- /**
43
- * Search files also inside `node_modules/` and hidden directories (e.g. `.git/`). This might have impact on performance.
44
- */
45
- exhaustive?: boolean;
27
+ /**
28
+ * Import type for the import url.
29
+ */
30
+ as?: AsType;
31
+ /**
32
+ * Import as static or dynamic
33
+ */
34
+ eager?: Eager;
35
+ /**
36
+ * Import only the specific named export. Set to `default` to import the default export.
37
+ */
38
+ import?: string;
39
+ /**
40
+ * Custom queries
41
+ */
42
+ query?: string | Record<string, string | number | boolean>;
43
+ /**
44
+ * Search files also inside `node_modules/` and hidden directories (e.g. `.git/`). This might have impact on performance.
45
+ */
46
+ exhaustive?: boolean;
46
47
  }
47
48
  interface ImportGlobFunction {
48
- /**
49
- * Import a list of files with a glob pattern.
50
- *
51
- * Overload 1: No generic provided, infer the type from `eager` and `as`
52
- */
53
- <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>>;
54
- /**
55
- * Import a list of files with a glob pattern.
56
- *
57
- * Overload 2: Module generic provided, infer the type from `eager: false`
58
- */
59
- <M>(glob: string | string[], options?: ImportGlobOptions<false, string>): Record<string, () => Promise<M>>;
60
- /**
61
- * Import a list of files with a glob pattern.
62
- *
63
- * Overload 3: Module generic provided, infer the type from `eager: true`
64
- */
65
- <M>(glob: string | string[], options: ImportGlobOptions<true, string>): Record<string, M>;
66
- }
67
- interface ImportGlobEagerFunction {
68
- /**
69
- * Eagerly import a list of files with a glob pattern.
70
- *
71
- * Overload 1: No generic provided, infer the type from `as`
72
- */
73
- <As extends string, T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown>(glob: string | string[], options?: Omit<ImportGlobOptions<boolean, As>, 'eager'>): Record<string, T>;
74
- /**
75
- * Eagerly import a list of files with a glob pattern.
76
- *
77
- * Overload 2: Module generic provided
78
- */
79
- <M>(glob: string | string[], options?: Omit<ImportGlobOptions<boolean, string>, 'eager'>): Record<string, M>;
49
+ /**
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
+ /**
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
+ <M>(glob: string | string[], options?: ImportGlobOptions<false, string>): Record<string, () => Promise<M>>;
61
+ /**
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
+ <M>(glob: string | string[], options: ImportGlobOptions<true, string>): Record<string, M>;
80
67
  }
81
68
  interface ViteImportMeta {
82
- /** Vite client HMR API - see https://vite.dev/guide/api-hmr.html */
83
- readonly hot?: ViteHot;
84
- /** vite glob import utility - https://vite.dev/guide/features.html#glob-import */
85
- glob: ImportGlobFunction;
86
- /**
87
- * @deprecated Use `import.meta.glob('*', { eager: true })` instead
88
- */
89
- globEager: ImportGlobEagerFunction;
69
+ /** Vite client HMR API - see https://vite.dev/guide/api-hmr */
70
+ readonly hot?: ViteHot;
71
+ /** vite glob import utility - https://vite.dev/guide/features.html#glob-import */
72
+ glob: ImportGlobFunction;
90
73
  }
91
-
74
+ //#endregion
75
+ //#region src/types/builder-env/webpack.d.ts
92
76
  /**
93
- * Reference: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/webpack-env/index.d.ts
94
- */
77
+ * Reference: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/webpack-env/index.d.ts
78
+ */
95
79
  type WebpackModuleId = string | number;
96
80
  interface HotNotifierInfo {
97
- type: 'self-declined' | 'declined' | 'unaccepted' | 'accepted' | 'disposed' | 'accept-errored' | 'self-accept-errored' | 'self-accept-error-handler-errored';
98
- /**
99
- * The module in question.
100
- */
101
- moduleId: number;
102
- /**
103
- * For errors: the module id owning the accept handler.
104
- */
105
- dependencyId?: number | undefined;
106
- /**
107
- * For declined/accepted/unaccepted: the chain from where the update was propagated.
108
- */
109
- chain?: number[] | undefined;
110
- /**
111
- * For declined: the module id of the declining parent
112
- */
113
- parentId?: number | undefined;
114
- /**
115
- * For accepted: the modules that are outdated and will be disposed
116
- */
117
- outdatedModules?: number[] | undefined;
118
- /**
119
- * For accepted: The location of accept handlers that will handle the update
120
- */
121
- outdatedDependencies?: {
122
- [dependencyId: number]: number[];
123
- } | undefined;
124
- /**
125
- * For errors: the thrown error
126
- */
127
- error?: Error | undefined;
128
- /**
129
- * For self-accept-error-handler-errored: the error thrown by the module
130
- * before the error handler tried to handle it.
131
- */
132
- originalError?: Error | undefined;
81
+ type: "self-declined" | "declined" | "unaccepted" | "accepted" | "disposed" | "accept-errored" | "self-accept-errored" | "self-accept-error-handler-errored";
82
+ /**
83
+ * The module in question.
84
+ */
85
+ moduleId: number;
86
+ /**
87
+ * For errors: the module id owning the accept handler.
88
+ */
89
+ dependencyId?: number | undefined;
90
+ /**
91
+ * For declined/accepted/unaccepted: the chain from where the update was propagated.
92
+ */
93
+ chain?: number[] | undefined;
94
+ /**
95
+ * For declined: the module id of the declining parent
96
+ */
97
+ parentId?: number | undefined;
98
+ /**
99
+ * For accepted: the modules that are outdated and will be disposed
100
+ */
101
+ outdatedModules?: number[] | undefined;
102
+ /**
103
+ * For accepted: The location of accept handlers that will handle the update
104
+ */
105
+ outdatedDependencies?: {
106
+ [dependencyId: number]: number[];
107
+ } | undefined;
108
+ /**
109
+ * For errors: the thrown error
110
+ */
111
+ error?: Error | undefined;
112
+ /**
113
+ * For self-accept-error-handler-errored: the error thrown by the module
114
+ * before the error handler tried to handle it.
115
+ */
116
+ originalError?: Error | undefined;
133
117
  }
134
118
  interface AcceptOptions {
135
- /**
136
- * If true the update process continues even if some modules are not accepted (and would bubble to the entry point).
137
- */
138
- ignoreUnaccepted?: boolean | undefined;
139
- /**
140
- * Ignore changes made to declined modules.
141
- */
142
- ignoreDeclined?: boolean | undefined;
143
- /**
144
- * Ignore errors throw in accept handlers, error handlers and while reevaluating module.
145
- */
146
- ignoreErrored?: boolean | undefined;
147
- /**
148
- * Notifier for declined modules.
149
- */
150
- onDeclined?: ((info: HotNotifierInfo) => void) | undefined;
151
- /**
152
- * Notifier for unaccepted modules.
153
- */
154
- onUnaccepted?: ((info: HotNotifierInfo) => void) | undefined;
155
- /**
156
- * Notifier for accepted modules.
157
- */
158
- onAccepted?: ((info: HotNotifierInfo) => void) | undefined;
159
- /**
160
- * Notifier for disposed modules.
161
- */
162
- onDisposed?: ((info: HotNotifierInfo) => void) | undefined;
163
- /**
164
- * Notifier for errors.
165
- */
166
- onErrored?: ((info: HotNotifierInfo) => void) | undefined;
167
- /**
168
- * Indicates that apply() is automatically called by check function
169
- */
170
- autoApply?: boolean | undefined;
119
+ /**
120
+ * If true the update process continues even if some modules are not accepted (and would bubble to the entry point).
121
+ */
122
+ ignoreUnaccepted?: boolean | undefined;
123
+ /**
124
+ * Ignore changes made to declined modules.
125
+ */
126
+ ignoreDeclined?: boolean | undefined;
127
+ /**
128
+ * Ignore errors throw in accept handlers, error handlers and while reevaluating module.
129
+ */
130
+ ignoreErrored?: boolean | undefined;
131
+ /**
132
+ * Notifier for declined modules.
133
+ */
134
+ onDeclined?: ((info: HotNotifierInfo) => void) | undefined;
135
+ /**
136
+ * Notifier for unaccepted modules.
137
+ */
138
+ onUnaccepted?: ((info: HotNotifierInfo) => void) | undefined;
139
+ /**
140
+ * Notifier for accepted modules.
141
+ */
142
+ onAccepted?: ((info: HotNotifierInfo) => void) | undefined;
143
+ /**
144
+ * Notifier for disposed modules.
145
+ */
146
+ onDisposed?: ((info: HotNotifierInfo) => void) | undefined;
147
+ /**
148
+ * Notifier for errors.
149
+ */
150
+ onErrored?: ((info: HotNotifierInfo) => void) | undefined;
151
+ /**
152
+ * Indicates that apply() is automatically called by check function
153
+ */
154
+ autoApply?: boolean | undefined;
171
155
  }
172
156
  interface WebpackHot {
173
- /**
174
- * Accept code updates for the specified dependencies. The callback is called when dependencies were replaced.
175
- * @param dependencies
176
- * @param callback
177
- * @param errorHandler
178
- */
179
- accept(dependencies: string[], callback?: (updatedDependencies: WebpackModuleId[]) => void, errorHandler?: (err: Error) => void): void;
180
- /**
181
- * Accept code updates for the specified dependencies. The callback is called when dependencies were replaced.
182
- * @param dependency
183
- * @param callback
184
- * @param errorHandler
185
- */
186
- accept(dependency: string, callback?: () => void, errorHandler?: (err: Error) => void): void;
187
- /**
188
- * Accept code updates for this module without notification of parents.
189
- * This should only be used if the module doesn’t export anything.
190
- * The errHandler can be used to handle errors that occur while loading the updated module.
191
- * @param errHandler
192
- */
193
- accept(errHandler?: (err: Error) => void): void;
194
- /**
195
- * Do not accept updates for the specified dependencies. If any dependencies is updated, the code update fails with code "decline".
196
- */
197
- decline(dependencies: string[]): void;
198
- /**
199
- * Do not accept updates for the specified dependencies. If any dependencies is updated, the code update fails with code "decline".
200
- */
201
- decline(dependency: string): void;
202
- /**
203
- * Flag the current module as not update-able. If updated the update code would fail with code "decline".
204
- */
205
- decline(): void;
206
- /**
207
- * Add a one time handler, which is executed when the current module code is replaced.
208
- * Here you should destroy/remove any persistent resource you have claimed/created.
209
- * If you want to transfer state to the new module, add it to data object.
210
- * The data will be available at module.hot.data on the new module.
211
- * @param callback
212
- */
213
- dispose(callback: (data: any) => void): void;
214
- dispose(callback: <T>(data: T) => void): void;
215
- /**
216
- * Add a one time handler, which is executed when the current module code is replaced.
217
- * Here you should destroy/remove any persistent resource you have claimed/created.
218
- * If you want to transfer state to the new module, add it to data object.
219
- * The data will be available at module.hot.data on the new module.
220
- * @param callback
221
- */
222
- addDisposeHandler(callback: (data: any) => void): void;
223
- addDisposeHandler<T>(callback: (data: T) => void): void;
224
- /**
225
- * Remove a handler.
226
- * 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.
227
- * @param callback
228
- */
229
- removeDisposeHandler(callback: (data: any) => void): void;
230
- removeDisposeHandler<T>(callback: (data: T) => void): void;
231
- /**
232
- * Throws an exceptions if status() is not idle.
233
- * Check all currently loaded modules for updates and apply updates if found.
234
- * If no update was found, the callback is called with null.
235
- * If autoApply is truthy the callback will be called with all modules that were disposed.
236
- * apply() is automatically called with autoApply as options parameter.
237
- * If autoApply is not set the callback will be called with all modules that will be disposed on apply().
238
- * @param autoApply
239
- * @param callback
240
- */
241
- check(autoApply: boolean, callback: (err: Error, outdatedModules: WebpackModuleId[]) => void): void;
242
- /**
243
- * Throws an exceptions if status() is not idle.
244
- * Check all currently loaded modules for updates and apply updates if found.
245
- * If no update was found, the callback is called with null.
246
- * The callback will be called with all modules that will be disposed on apply().
247
- * @param callback
248
- */
249
- check(callback: (err: Error, outdatedModules: WebpackModuleId[]) => void): void;
250
- /**
251
- * If status() != "ready" it throws an error.
252
- * Continue the update process.
253
- * @param options
254
- * @param callback
255
- */
256
- apply(options: AcceptOptions, callback: (err: Error, outdatedModules: WebpackModuleId[]) => void): void;
257
- /**
258
- * If status() != "ready" it throws an error.
259
- * Continue the update process.
260
- * @param callback
261
- */
262
- apply(callback: (err: Error, outdatedModules: WebpackModuleId[]) => void): void;
263
- /**
264
- * Return one of idle, check, watch, watch-delay, prepare, ready, dispose, apply, abort or fail.
265
- */
266
- status(): string;
267
- /** Register a callback on status change. */
268
- status(callback: (status: string) => void): void;
269
- /** Register a callback on status change. */
270
- addStatusHandler(callback: (status: string) => void): void;
271
- /**
272
- * Remove a registered status change handler.
273
- * @param callback
274
- */
275
- removeStatusHandler(callback: (status: string) => void): void;
276
- active: boolean;
277
- data: any;
157
+ /**
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
+ accept(dependencies: string[], callback?: (updatedDependencies: WebpackModuleId[]) => void, errorHandler?: (err: Error) => void): void;
164
+ /**
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
+ accept(dependency: string, callback?: () => void, errorHandler?: (err: Error) => void): void;
171
+ /**
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
+ accept(errHandler?: (err: Error) => void): void;
178
+ /**
179
+ * Do not accept updates for the specified dependencies. If any dependencies is updated, the code update fails with code "decline".
180
+ */
181
+ decline(dependencies: string[]): void;
182
+ /**
183
+ * Do not accept updates for the specified dependencies. If any dependencies is updated, the code update fails with code "decline".
184
+ */
185
+ decline(dependency: string): void;
186
+ /**
187
+ * Flag the current module as not update-able. If updated the update code would fail with code "decline".
188
+ */
189
+ decline(): void;
190
+ /**
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
+ dispose(callback: (data: any) => void): void;
198
+ dispose(callback: <T>(data: T) => void): void;
199
+ /**
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
+ addDisposeHandler(callback: (data: any) => void): void;
207
+ addDisposeHandler<T>(callback: (data: T) => void): void;
208
+ /**
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
+ removeDisposeHandler(callback: (data: any) => void): void;
214
+ removeDisposeHandler<T>(callback: (data: T) => void): void;
215
+ /**
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
+ check(autoApply: boolean, callback: (err: Error, outdatedModules: WebpackModuleId[]) => void): void;
226
+ /**
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
+ check(callback: (err: Error, outdatedModules: WebpackModuleId[]) => void): void;
234
+ /**
235
+ * If status() != "ready" it throws an error.
236
+ * Continue the update process.
237
+ * @param options
238
+ * @param callback
239
+ */
240
+ apply(options: AcceptOptions, callback: (err: Error, outdatedModules: WebpackModuleId[]) => void): void;
241
+ /**
242
+ * If status() != "ready" it throws an error.
243
+ * Continue the update process.
244
+ * @param callback
245
+ */
246
+ apply(callback: (err: Error, outdatedModules: WebpackModuleId[]) => void): void;
247
+ /**
248
+ * Return one of idle, check, watch, watch-delay, prepare, ready, dispose, apply, abort or fail.
249
+ */
250
+ status(): string;
251
+ /** Register a callback on status change. */
252
+ status(callback: (status: string) => void): void;
253
+ /** Register a callback on status change. */
254
+ addStatusHandler(callback: (status: string) => void): void;
255
+ /**
256
+ * Remove a registered status change handler.
257
+ * @param callback
258
+ */
259
+ removeStatusHandler(callback: (status: string) => void): void;
260
+ active: boolean;
261
+ data: any;
278
262
  }
279
263
  interface WebpackImportMeta {
280
- /** an alias for `module.hot` - see https://webpack.js.org/api/hot-module-replacement/ */
281
- webpackHot?: WebpackHot | undefined;
282
- /** the webpack major version as number */
283
- webpack?: number;
264
+ /** an alias for `module.hot` - see https://webpack.js.org/api/hot-module-replacement/ */
265
+ webpackHot?: WebpackHot | undefined;
266
+ /** the webpack major version as number */
267
+ webpack?: number;
284
268
  }
285
-
269
+ //#endregion
270
+ //#region src/types/builder-env/index.d.ts
286
271
  type BundlerImportMeta = ViteImportMeta & WebpackImportMeta;
272
+ //#endregion
273
+ //#region src/builder-env.d.ts
287
274
  declare global {
288
- interface ImportMeta extends BundlerImportMeta {
289
- /** the `file:` url of the current file (similar to `__filename` but as file url) */
290
- url: string;
291
- readonly env: Record<string, string | boolean | undefined>;
292
- }
275
+ interface ImportMeta extends BundlerImportMeta {
276
+ /** the `file:` url of the current file (similar to `__filename` but as file url) */
277
+ url: string;
278
+ readonly env: Record<string, string | boolean | undefined>;
279
+ }
293
280
  }
294
-
295
- declare const builders: string[];
296
-
297
- export { builders };
281
+ declare const builders: readonly ["vite", "webpack"];
282
+ //#endregion
283
+ export { builders };
@@ -1,3 +1,4 @@
1
+ //#region src/builder-env.ts
1
2
  const builders = ["vite", "webpack"];
2
-
3
+ //#endregion
3
4
  export { builders };