nitro-nightly 3.0.1-20260120-020848-6786d069 → 3.0.1-20260120-133849-ca1a9dee

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.
Files changed (93) hide show
  1. package/dist/_build/common.mjs +24931 -0
  2. package/dist/_build/rolldown.mjs +6 -11
  3. package/dist/_build/rollup.mjs +201 -0
  4. package/dist/_build/vite.build.mjs +1 -1
  5. package/dist/_chunks/dev.mjs +4 -6
  6. package/dist/_chunks/nitro.mjs +1183 -24
  7. package/dist/_chunks/nitro2.mjs +91 -248
  8. package/dist/_chunks/utils.mjs +254 -0
  9. package/dist/_common.mjs +45 -0
  10. package/dist/_libs/c12+giget+readdirp+chokidar.d.mts +214 -0
  11. package/dist/_libs/citty.mjs +140 -110
  12. package/dist/_libs/commondir+is-reference.mjs +1300 -0
  13. package/dist/_libs/compatx.d.mts +47 -0
  14. package/dist/_libs/confbox.mjs +2488 -70
  15. package/dist/_libs/esbuild.d.mts +20 -0
  16. package/dist/_libs/escape-string-regexp.mjs +8 -0
  17. package/dist/_libs/estree-walker.mjs +187 -0
  18. package/dist/_libs/hasown+resolve+deepmerge.mjs +1972 -0
  19. package/dist/_libs/httpxy.d.mts +79 -0
  20. package/dist/_libs/httpxy.mjs +6 -1
  21. package/dist/_libs/klona.mjs +38 -0
  22. package/dist/_libs/magic-string.d.mts +220 -0
  23. package/dist/_libs/mlly.d.mts +57 -0
  24. package/dist/_libs/nypm+giget+tinyexec.mjs +3603 -0
  25. package/dist/_libs/pkg-types.d.mts +23 -0
  26. package/dist/_libs/plugin-alias.mjs +64 -0
  27. package/dist/_libs/{plugin-alias+plugin-inject.mjs → plugin-inject.mjs} +2 -65
  28. package/dist/_libs/plugin-json.mjs +36 -0
  29. package/dist/_libs/pluginutils+plugin-commonjs.d.mts +241 -0
  30. package/dist/_libs/pluginutils.mjs +652 -0
  31. package/dist/_libs/{c12+dotenv+rc9.mjs → rc9+c12+dotenv.mjs} +105 -12
  32. package/dist/_libs/{chokidar+readdirp.mjs → readdirp+chokidar.mjs} +8 -1
  33. package/dist/_libs/remapping.mjs +117 -0
  34. package/dist/_libs/resolve-uri+gen-mapping.mjs +448 -0
  35. package/dist/_libs/rou3.d.mts +43 -0
  36. package/dist/_libs/rou3.mjs +322 -0
  37. package/dist/_libs/std-env.d.mts +4 -0
  38. package/dist/_libs/tsconfck.mjs +832 -0
  39. package/dist/_libs/ultrahtml.mjs +138 -0
  40. package/dist/_libs/{gen-mapping+remapping+resolve-uri+trace-mapping+unimport+unplugin+unplugin-utils+webpack-virtual-modules.mjs → unimport+unplugin.mjs} +228 -593
  41. package/dist/_libs/unplugin+unimport.d.mts +426 -0
  42. package/dist/_libs/unwasm.d.mts +29 -0
  43. package/dist/_presets.mjs +3 -8
  44. package/dist/builder.mjs +6 -8
  45. package/dist/cli/_chunks/build.mjs +1 -1
  46. package/dist/cli/_chunks/dev.mjs +2 -3
  47. package/dist/cli/_chunks/list.mjs +1 -1
  48. package/dist/cli/_chunks/prepare.mjs +1 -1
  49. package/dist/cli/_chunks/run.mjs +1 -1
  50. package/dist/cli/_chunks/task.mjs +16 -0
  51. package/dist/cli/index.mjs +1 -1
  52. package/dist/presets/aws-lambda/runtime/_utils.d.mts +0 -5
  53. package/dist/presets/netlify/runtime/netlify-edge.d.mts +0 -1
  54. package/dist/presets/winterjs/runtime/winterjs.d.mts +0 -1
  55. package/dist/runtime/internal/error/dev.d.mts +0 -1
  56. package/dist/runtime/internal/route-rules.d.mts +0 -4
  57. package/dist/runtime/internal/routes/openapi.d.mts +0 -1
  58. package/dist/runtime/internal/routes/scalar.d.mts +0 -1
  59. package/dist/runtime/internal/routes/swagger.d.mts +0 -1
  60. package/dist/runtime/internal/runtime-config.d.mts +0 -1
  61. package/dist/runtime/nitro.d.mts +0 -3
  62. package/dist/runtime/virtual/renderer-template.d.mts +0 -1
  63. package/dist/types/index.d.mts +25 -1394
  64. package/dist/vite.mjs +18 -641
  65. package/package.json +5 -5
  66. package/dist/_chunks/nitro3.mjs +0 -2696
  67. package/dist/_chunks/nitro4.mjs +0 -176
  68. package/dist/_chunks/nitro5.mjs +0 -733
  69. package/dist/_chunks/nitro6.mjs +0 -1458
  70. package/dist/_chunks/nitro7.mjs +0 -7561
  71. package/dist/_chunks/nitro8.mjs +0 -3524
  72. package/dist/_chunks/nitro9.mjs +0 -1729
  73. package/dist/_libs/_.mjs +0 -3
  74. package/dist/_libs/_2.mjs +0 -3
  75. package/dist/_libs/_3.mjs +0 -4
  76. package/dist/_libs/_4.mjs +0 -6
  77. package/dist/_libs/_5.mjs +0 -3
  78. package/dist/_libs/_6.mjs +0 -3
  79. package/dist/_libs/acorn+confbox+js-tokens+magic-string+mlly+pkg-types+sourcemap-codec+strip-literal+unimport.mjs +0 -8900
  80. package/dist/_libs/confbox+exsolve+pkg-types.mjs +0 -1249
  81. package/dist/_libs/confbox2.mjs +0 -786
  82. package/dist/_libs/confbox3.mjs +0 -404
  83. package/dist/_libs/confbox4.mjs +0 -3
  84. package/dist/_libs/estree-walker+unimport.mjs +0 -378
  85. package/dist/_libs/fdir+picomatch+tinyglobby.mjs +0 -2471
  86. package/dist/_libs/giget+node-fetch-native.mjs +0 -2692
  87. package/dist/_libs/local-pkg+quansync+unimport.mjs +0 -1526
  88. package/dist/_libs/nypm+tinyexec.mjs +0 -858
  89. package/dist/_libs/pathe.mjs +0 -164
  90. package/dist/_libs/perfect-debounce.mjs +0 -89
  91. package/dist/_libs/std-env.mjs +0 -158
  92. package/dist/_libs/unimport.mjs +0 -9
  93. package/dist/_libs/vite-plugin-fullstack.mjs +0 -26
@@ -0,0 +1,426 @@
1
+ import { t as MagicString } from "./magic-string.mjs";
2
+ import { t as ESMExport } from "./mlly.mjs";
3
+ import "vite";
4
+ import "rolldown";
5
+ import "rollup";
6
+ import "webpack";
7
+ import "@farmfe/core";
8
+ import "@rspack/core";
9
+ import "unloader";
10
+
11
+ //#region node_modules/.pnpm/unplugin-utils@0.3.1/node_modules/unplugin-utils/dist/index.d.ts
12
+ //#region src/filter.d.ts
13
+ /**
14
+ * A valid `picomatch` glob pattern, or array of patterns.
15
+ */
16
+ type FilterPattern = ReadonlyArray<string | RegExp> | string | RegExp | null;
17
+ /**
18
+ * Constructs a filter function which can be used to determine whether or not
19
+ * certain modules should be operated upon.
20
+ * @param include If `include` is omitted or has zero length, filter will return `true` by default.
21
+ * @param exclude ID must not match any of the `exclude` patterns.
22
+ * @param options Additional options.
23
+ * @param options.resolve Optionally resolves the patterns against a directory other than `process.cwd()`.
24
+ * If a `string` is specified, then the value will be used as the base directory.
25
+ * Relative paths will be resolved against `process.cwd()` first.
26
+ * If `false`, then the patterns will not be resolved against any directory.
27
+ * This can be useful if you want to create a filter for virtual module names.
28
+ */
29
+ //#endregion
30
+ //#region node_modules/.pnpm/unimport@5.6.0/node_modules/unimport/dist/shared/unimport.C0UbTDPO.d.mts
31
+ declare const builtinPresets: {
32
+ '@vue/composition-api': InlinePreset;
33
+ '@vueuse/core': () => Preset;
34
+ '@vueuse/head': InlinePreset;
35
+ pinia: InlinePreset;
36
+ preact: InlinePreset;
37
+ quasar: InlinePreset;
38
+ react: InlinePreset;
39
+ 'react-router': InlinePreset;
40
+ 'react-router-dom': InlinePreset;
41
+ svelte: InlinePreset;
42
+ 'svelte/animate': InlinePreset;
43
+ 'svelte/easing': InlinePreset;
44
+ 'svelte/motion': InlinePreset;
45
+ 'svelte/store': InlinePreset;
46
+ 'svelte/transition': InlinePreset;
47
+ 'vee-validate': InlinePreset;
48
+ vitepress: InlinePreset;
49
+ 'vue-demi': InlinePreset;
50
+ 'vue-i18n': InlinePreset;
51
+ 'vue-router': InlinePreset;
52
+ 'vue-router-composables': InlinePreset;
53
+ vue: InlinePreset;
54
+ 'vue/macros': InlinePreset;
55
+ vuex: InlinePreset;
56
+ vitest: InlinePreset;
57
+ 'uni-app': InlinePreset;
58
+ 'solid-js': InlinePreset;
59
+ 'solid-app-router': InlinePreset;
60
+ rxjs: InlinePreset;
61
+ 'date-fns': InlinePreset;
62
+ };
63
+ type BuiltinPresetName = keyof typeof builtinPresets;
64
+ type ModuleId = string;
65
+ type ImportName = string;
66
+ interface ImportCommon {
67
+ /** Module specifier to import from */
68
+ from: ModuleId;
69
+ /**
70
+ * Priority of the import, if multiple imports have the same name, the one with the highest priority will be used
71
+ * @default 1
72
+ */
73
+ priority?: number;
74
+ /** If this import is disabled */
75
+ disabled?: boolean;
76
+ /** Won't output import in declaration file if true */
77
+ dtsDisabled?: boolean;
78
+ /** Import declaration type like const / var / enum */
79
+ declarationType?: ESMExport['declarationType'];
80
+ /**
81
+ * Metadata of the import
82
+ */
83
+ meta?: {
84
+ /** Short description of the import */description?: string; /** URL to the documentation */
85
+ docsUrl?: string; /** Additional metadata */
86
+ [key: string]: any;
87
+ };
88
+ /**
89
+ * If this import is a pure type import
90
+ */
91
+ type?: boolean;
92
+ /**
93
+ * Using this as the from when generating type declarations
94
+ */
95
+ typeFrom?: ModuleId;
96
+ }
97
+ interface Import extends ImportCommon {
98
+ /** Import name to be detected */
99
+ name: ImportName;
100
+ /** Import as this name */
101
+ as?: ImportName;
102
+ /**
103
+ * With properties
104
+ *
105
+ * Ignored for CJS imports.
106
+ */
107
+ with?: Record<string, string>;
108
+ }
109
+ type PresetImport = Omit<Import, 'from'> | ImportName | [name: ImportName, as?: ImportName, from?: ModuleId];
110
+ interface InlinePreset extends ImportCommon {
111
+ imports: (PresetImport | InlinePreset)[];
112
+ }
113
+ /**
114
+ * Auto extract exports from a package for auto import
115
+ */
116
+ interface PackagePreset {
117
+ /**
118
+ * Name of the package
119
+ */
120
+ package: string;
121
+ /**
122
+ * Path of the importer
123
+ * @default process.cwd()
124
+ */
125
+ url?: string;
126
+ /**
127
+ * RegExp, string, or custom function to exclude names of the extracted imports
128
+ */
129
+ ignore?: (string | RegExp | ((name: string) => boolean))[];
130
+ /**
131
+ * Use local cache if exits
132
+ * @default true
133
+ */
134
+ cache?: boolean;
135
+ }
136
+ type Preset = InlinePreset | PackagePreset;
137
+ interface UnimportContext {
138
+ readonly version: string;
139
+ options: Partial<UnimportOptions>;
140
+ staticImports: Import[];
141
+ dynamicImports: Import[];
142
+ addons: Addon[];
143
+ getImports: () => Promise<Import[]>;
144
+ getImportMap: () => Promise<Map<string, Import>>;
145
+ getMetadata: () => UnimportMeta | undefined;
146
+ modifyDynamicImports: (fn: (imports: Import[]) => Thenable<void | Import[]>) => Promise<void>;
147
+ clearDynamicImports: () => void;
148
+ replaceImports: (imports: UnimportOptions['imports']) => Promise<Import[]>;
149
+ invalidate: () => void;
150
+ resolveId: (id: string, parentId?: string) => Thenable<string | null | undefined | void>;
151
+ }
152
+ interface DetectImportResult {
153
+ s: MagicString;
154
+ strippedCode: string;
155
+ isCJSContext: boolean;
156
+ matchedImports: Import[];
157
+ firstOccurrence: number;
158
+ }
159
+ interface Unimport {
160
+ readonly version: string;
161
+ init: () => Promise<void>;
162
+ clearDynamicImports: UnimportContext['clearDynamicImports'];
163
+ getImportMap: UnimportContext['getImportMap'];
164
+ getImports: UnimportContext['getImports'];
165
+ getInternalContext: () => UnimportContext;
166
+ getMetadata: UnimportContext['getMetadata'];
167
+ modifyDynamicImports: UnimportContext['modifyDynamicImports'];
168
+ generateTypeDeclarations: (options?: TypeDeclarationOptions) => Promise<string>;
169
+ /**
170
+ * Get un-imported usages from code
171
+ */
172
+ detectImports: (code: string | MagicString) => Promise<DetectImportResult>;
173
+ /**
174
+ * Insert missing imports statements to code
175
+ */
176
+ injectImports: (code: string | MagicString, id?: string, options?: InjectImportsOptions) => Promise<ImportInjectionResult>;
177
+ scanImportsFromDir: (dir?: (string | ScanDir)[], options?: ScanDirExportsOptions) => Promise<Import[]>;
178
+ scanImportsFromFile: (file: string, includeTypes?: boolean) => Promise<Import[]>;
179
+ /**
180
+ * @deprecated
181
+ */
182
+ toExports: (filepath?: string, includeTypes?: boolean) => Promise<string>;
183
+ }
184
+ interface InjectionUsageRecord {
185
+ import: Import;
186
+ count: number;
187
+ moduleIds: string[];
188
+ }
189
+ interface UnimportMeta {
190
+ injectionUsage: Record<string, InjectionUsageRecord>;
191
+ }
192
+ interface AddonsOptions {
193
+ addons?: Addon[];
194
+ /**
195
+ * Enable auto import inside for Vue's <template>
196
+ *
197
+ * @default false
198
+ */
199
+ vueTemplate?: boolean;
200
+ /**
201
+ * Enable auto import directives for Vue's SFC.
202
+ *
203
+ * Library authors should include `meta.vueDirective: true` in the import metadata.
204
+ *
205
+ * When using a local directives folder, provide the `isDirective`
206
+ * callback to check if the import is a Vue directive.
207
+ */
208
+ vueDirectives?: true | AddonVueDirectivesOptions;
209
+ }
210
+ interface AddonVueDirectivesOptions {
211
+ /**
212
+ * Checks if the import is a Vue directive.
213
+ *
214
+ * **NOTES**:
215
+ * - imports from a library should include `meta.vueDirective: true`.
216
+ * - this callback is only invoked for local directives (only when meta.vueDirective is not set).
217
+ *
218
+ * @param from The path of the import normalized.
219
+ * @param importEntry The import entry.
220
+ */
221
+ isDirective?: (from: string, importEntry: Import) => boolean;
222
+ }
223
+ interface UnimportOptions extends Pick<InjectImportsOptions, 'injectAtEnd' | 'mergeExisting' | 'parser'> {
224
+ /**
225
+ * Auto import items
226
+ */
227
+ imports: Import[];
228
+ /**
229
+ * Auto import preset
230
+ */
231
+ presets: (Preset | BuiltinPresetName)[];
232
+ /**
233
+ * Custom warning function
234
+ * @default console.warn
235
+ */
236
+ warn: (msg: string) => void;
237
+ /**
238
+ * Custom debug log function
239
+ * @default console.log
240
+ */
241
+ debugLog: (msg: string) => void;
242
+ /**
243
+ * Unimport Addons.
244
+ * To use built-in addons, use:
245
+ * ```js
246
+ * addons: {
247
+ * addons: [<custom-addons-here>] // if you want to use also custom addons
248
+ * vueTemplate: true,
249
+ * vueDirectives: [<the-directives-here>]
250
+ * }
251
+ * ```
252
+ *
253
+ * Built-in addons:
254
+ * - vueDirectives: enable auto import directives for Vue's SFC
255
+ * - vueTemplate: enable auto import inside for Vue's <template>
256
+ *
257
+ * @default {}
258
+ */
259
+ addons: AddonsOptions | Addon[];
260
+ /**
261
+ * Name of virtual modules that exposed all the registed auto-imports
262
+ * @default []
263
+ */
264
+ virtualImports: string[];
265
+ /**
266
+ * Directories to scan for auto import
267
+ * @default []
268
+ */
269
+ dirs?: (string | ScanDir)[];
270
+ /**
271
+ * Options for scanning directories for auto import
272
+ */
273
+ dirsScanOptions?: ScanDirExportsOptions;
274
+ /**
275
+ * Custom resolver to auto import id
276
+ */
277
+ resolveId?: (id: string, importee?: string) => Thenable<string | void>;
278
+ /**
279
+ * Custom magic comments to be opt-out for auto import, per file/module
280
+ *
281
+ * @default ['@unimport-disable', '@imports-disable']
282
+ */
283
+ commentsDisable?: string[];
284
+ /**
285
+ * Custom magic comments to debug auto import, printed to console
286
+ *
287
+ * @default ['@unimport-debug', '@imports-debug']
288
+ */
289
+ commentsDebug?: string[];
290
+ /**
291
+ * Collect meta data for each auto import. Accessible via `ctx.meta`
292
+ */
293
+ collectMeta?: boolean;
294
+ }
295
+ type PathFromResolver = (_import: Import) => string | undefined;
296
+ interface ScanDirExportsOptions {
297
+ /**
298
+ * Glob patterns for matching files
299
+ *
300
+ * @default ['*.{ts,js,mjs,cjs,mts,cts,tsx,jsx}']
301
+ */
302
+ filePatterns?: string[];
303
+ /**
304
+ * Custom function to filter scanned files
305
+ */
306
+ fileFilter?: (file: string) => boolean;
307
+ /**
308
+ * Register type exports
309
+ *
310
+ * @default true
311
+ */
312
+ types?: boolean;
313
+ /**
314
+ * Current working directory
315
+ *
316
+ * @default process.cwd()
317
+ */
318
+ cwd?: string;
319
+ }
320
+ interface ScanDir {
321
+ /**
322
+ * Path pattern of the directory
323
+ */
324
+ glob: string;
325
+ /**
326
+ * Register type exports
327
+ *
328
+ * @default true
329
+ */
330
+ types?: boolean;
331
+ }
332
+ interface TypeDeclarationOptions {
333
+ /**
334
+ * Custom resolver for path of the import
335
+ */
336
+ resolvePath?: PathFromResolver;
337
+ /**
338
+ * Append `export {}` to the end of the file
339
+ *
340
+ * @default true
341
+ */
342
+ exportHelper?: boolean;
343
+ /**
344
+ * Auto-import for type exports
345
+ *
346
+ * @default true
347
+ */
348
+ typeReExports?: boolean;
349
+ }
350
+ interface InjectImportsOptions {
351
+ /**
352
+ * Merge the existing imports
353
+ *
354
+ * @default false
355
+ */
356
+ mergeExisting?: boolean;
357
+ /**
358
+ * If the module should be auto imported
359
+ *
360
+ * @default true
361
+ */
362
+ autoImport?: boolean;
363
+ /**
364
+ * If the module should be transformed for virtual modules.
365
+ * Only available when `virtualImports` is set.
366
+ *
367
+ * @default true
368
+ */
369
+ transformVirtualImports?: boolean;
370
+ /**
371
+ * Parser to use for parsing the code
372
+ *
373
+ * Note that `acorn` only takes valid JS Code, should usually only be used after transformationa and transpilation
374
+ *
375
+ * @default 'regex'
376
+ */
377
+ parser?: 'acorn' | 'regex';
378
+ /**
379
+ * Inject the imports at the end of other imports
380
+ *
381
+ * @default false
382
+ */
383
+ injectAtEnd?: boolean;
384
+ }
385
+ type Thenable<T> = Promise<T> | T;
386
+ interface Addon {
387
+ name?: string;
388
+ transform?: (this: UnimportContext, code: MagicString, id: string | undefined) => Thenable<MagicString>;
389
+ declaration?: (this: UnimportContext, dts: string, options: TypeDeclarationOptions) => Thenable<string>;
390
+ matchImports?: (this: UnimportContext, identifiers: Set<string>, matched: Import[]) => Thenable<Import[] | void>;
391
+ /**
392
+ * Extend or modify the imports list before injecting
393
+ */
394
+ extendImports?: (this: UnimportContext, imports: Import[]) => Import[] | void;
395
+ /**
396
+ * Resolve imports before injecting
397
+ */
398
+ injectImportsResolved?: (this: UnimportContext, imports: Import[], code: MagicString, id?: string) => Import[] | void;
399
+ /**
400
+ * Modify the injection code before injecting
401
+ */
402
+ injectImportsStringified?: (this: UnimportContext, injection: string, imports: Import[], code: MagicString, id?: string) => string | void;
403
+ }
404
+ interface MagicStringResult {
405
+ s: MagicString;
406
+ code: string;
407
+ }
408
+ interface ImportInjectionResult extends MagicStringResult {
409
+ imports: Import[];
410
+ }
411
+ //#endregion
412
+ //#region node_modules/.pnpm/unimport@5.6.0/node_modules/unimport/dist/unplugin.d.mts
413
+ interface UnimportPluginOptions extends UnimportOptions {
414
+ include: FilterPattern;
415
+ exclude: FilterPattern;
416
+ dts: boolean | string;
417
+ /**
418
+ * Enable implicit auto import.
419
+ * Generate global TypeScript definitions.
420
+ *
421
+ * @default true
422
+ */
423
+ autoImport?: boolean;
424
+ }
425
+ //#endregion
426
+ export { type Unimport as n, type UnimportPluginOptions as t };
@@ -0,0 +1,29 @@
1
+ import { Plugin } from "rollup";
2
+
3
+ //#region node_modules/.pnpm/unwasm@0.5.3/node_modules/unwasm/dist/plugin/index.d.mts
4
+ //#region src/plugin/shared.d.ts
5
+ interface UnwasmPluginOptions {
6
+ /**
7
+ * Directly import the `.wasm` files instead of bundling as base64 string.
8
+ *
9
+ * @default false
10
+ */
11
+ esmImport?: boolean;
12
+ /**
13
+ * Avoid using top level await and always use a proxy.
14
+ *
15
+ * Useful for compatibility with environments that don't support top level await.
16
+ *
17
+ * @default false
18
+ */
19
+ lazy?: boolean;
20
+ /**
21
+ * Suppress all warnings from the plugin.
22
+ *
23
+ * @default false
24
+ */
25
+ silent?: boolean;
26
+ } //#endregion
27
+ //#region src/plugin/index.d.ts
28
+ //#endregion
29
+ export { UnwasmPluginOptions as t };
package/dist/_presets.mjs CHANGED
@@ -1,12 +1,7 @@
1
- import "./_chunks/nitro.mjs";
2
- import { a as join$1, l as relative$1, n as dirname$1, u as resolve$1 } from "./_libs/pathe.mjs";
3
- import { a as readGitConfig, l as resolveModulePath, n as findNearestFile, o as readPackageJSON, t as findFile } from "./_libs/confbox+exsolve+pkg-types.mjs";
4
- import { t as h } from "./_libs/confbox3.mjs";
1
+ import "./_common.mjs";
2
+ import { $ as resolveModulePath, G as findFile, I as prettyPath$1, J as readGitConfig, K as findNearestFile, N as glob, R as writeFile$2, U as p, V as a, X as h, Y as readPackageJSON, at as join$1, ct as resolve$1, nt as dirname$1, st as relative$1, z as K } from "./_build/common.mjs";
3
+ import { i as gr, n as Q } from "./_libs/confbox.mjs";
5
4
  import { r as resolveCompatibilityDatesFromEnv, t as formatCompatibilityDate } from "./_libs/compatx.mjs";
6
- import { i as a, n as K, o as p } from "./_libs/std-env.mjs";
7
- import { i as writeFile$2, n as prettyPath$1 } from "./_chunks/nitro4.mjs";
8
- import { t as glob } from "./_libs/fdir+picomatch+tinyglobby.mjs";
9
- import { n as gr, t as Q } from "./_chunks/nitro9.mjs";
10
5
  import { builtinModules } from "node:module";
11
6
  import consola$1 from "consola";
12
7
  import { existsSync, promises } from "node:fs";
package/dist/builder.mjs CHANGED
@@ -1,11 +1,9 @@
1
- import "./_chunks/nitro.mjs";
2
- import "./_libs/c12+dotenv+rc9.mjs";
3
- import { a as copyPublicAssets, c as loadOptions, i as prepare, n as runTask, o as build, r as prerender, s as createNitro, t as listTasks } from "./_chunks/nitro3.mjs";
4
- import "./_chunks/nitro4.mjs";
5
- import "./_libs/fdir+picomatch+tinyglobby.mjs";
6
- import { n as writeTypes } from "./_chunks/nitro5.mjs";
7
- import { t as getBuildInfo } from "./_chunks/nitro6.mjs";
8
- import "./_libs/acorn+confbox+js-tokens+magic-string+mlly+pkg-types+sourcemap-codec+strip-literal+unimport.mjs";
1
+ import "./_common.mjs";
2
+ import { D as prepare, M as build, O as copyPublicAssets, _ as writeTypes, m as getBuildInfo } from "./_build/common.mjs";
3
+ import "./_libs/rc9+c12+dotenv.mjs";
4
+ import { a as loadOptions, i as createNitro, n as runTask, r as prerender, t as listTasks } from "./_chunks/nitro.mjs";
5
+ import "./_libs/tsconfck.mjs";
6
+ import "./_chunks/nitro2.mjs";
9
7
  import { n as createDevServer } from "./_chunks/dev.mjs";
10
8
 
11
9
  export { build, copyPublicAssets, createDevServer, createNitro, getBuildInfo, listTasks, loadOptions, prepare, prerender, runTask, writeTypes };
@@ -1,4 +1,4 @@
1
- import { u as resolve } from "../../_libs/pathe.mjs";
1
+ import { ct as resolve } from "../../_build/common.mjs";
2
2
  import { t as defineCommand } from "../../_libs/citty.mjs";
3
3
  import { t as commonArgs } from "./common.mjs";
4
4
  import { build, copyPublicAssets, createNitro, prepare, prerender } from "nitro/builder";
@@ -1,6 +1,5 @@
1
- import { u as resolve } from "../../_libs/pathe.mjs";
2
- import "../../_chunks/nitro4.mjs";
3
- import "../../_chunks/nitro6.mjs";
1
+ import { ct as resolve } from "../../_build/common.mjs";
2
+ import "../../_libs/rc9+c12+dotenv.mjs";
4
3
  import { t as NitroDevServer } from "../../_chunks/dev.mjs";
5
4
  import { t as defineCommand } from "../../_libs/citty.mjs";
6
5
  import { t as commonArgs } from "./common.mjs";
@@ -1,4 +1,4 @@
1
- import { u as resolve } from "../../_libs/pathe.mjs";
1
+ import { ct as resolve } from "../../_build/common.mjs";
2
2
  import { t as defineCommand } from "../../_libs/citty.mjs";
3
3
  import { consola } from "consola";
4
4
  import { listTasks, loadOptions } from "nitro/builder";
@@ -1,4 +1,4 @@
1
- import { u as resolve } from "../../_libs/pathe.mjs";
1
+ import { ct as resolve } from "../../_build/common.mjs";
2
2
  import { t as defineCommand } from "../../_libs/citty.mjs";
3
3
  import { t as commonArgs } from "./common.mjs";
4
4
  import { createNitro, writeTypes } from "nitro/builder";
@@ -1,4 +1,4 @@
1
- import { u as resolve } from "../../_libs/pathe.mjs";
1
+ import { ct as resolve } from "../../_build/common.mjs";
2
2
  import { t as defineCommand } from "../../_libs/citty.mjs";
3
3
  import { consola } from "consola";
4
4
  import destr from "destr";
@@ -0,0 +1,16 @@
1
+ import { t as defineCommand } from "../../_libs/citty.mjs";
2
+
3
+ //#region src/cli/commands/task/index.ts
4
+ var task_default = defineCommand({
5
+ meta: {
6
+ name: "task",
7
+ description: "Operate in nitro tasks (experimental)"
8
+ },
9
+ subCommands: {
10
+ list: () => import("./list.mjs").then((r) => r.default),
11
+ run: () => import("./run.mjs").then((r) => r.default)
12
+ }
13
+ });
14
+
15
+ //#endregion
16
+ export { task_default as default };
@@ -13,7 +13,7 @@ runMain(defineCommand({
13
13
  dev: () => import("./_chunks/dev.mjs").then((r) => r.default),
14
14
  build: () => import("./_chunks/build.mjs").then((r) => r.default),
15
15
  prepare: () => import("./_chunks/prepare.mjs").then((r) => r.default),
16
- task: () => import("../_chunks/nitro9.mjs").then((r) => r.default)
16
+ task: () => import("./_chunks/task.mjs").then((r) => r.default)
17
17
  }
18
18
  }));
19
19
 
@@ -1,12 +1,7 @@
1
1
  import type { APIGatewayProxyEvent, APIGatewayProxyEventV2 } from "aws-lambda";
2
2
  import type { ServerRequest } from "srvx";
3
- // Incoming (AWS => Web)
4
3
  export declare function awsRequest(event: APIGatewayProxyEvent | APIGatewayProxyEventV2, context: unknown): ServerRequest;
5
- // Outgoing (Web => AWS)
6
4
  export declare function awsResponseHeaders(response: Response);
7
- // AWS Lambda proxy integrations requires base64 encoded buffers
8
- // binaryMediaTypes should be */*
9
- // see https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-payload-encodings.html
10
5
  export declare function awsResponseBody(response: Response): Promise<{
11
6
  body: string;
12
7
  isBase64Encoded?: boolean;
@@ -1,4 +1,3 @@
1
1
  import "#nitro/virtual/polyfills";
2
2
  import type { Context } from "@netlify/edge-functions";
3
- // https://docs.netlify.com/edge-functions/api/
4
3
  export default function netlifyEdge(netlifyReq: Request, context: Context);
@@ -1,3 +1,2 @@
1
- // @ts-nocheck TODO: Remove after removing polyfills
2
1
  import "#nitro/virtual/polyfills";
3
2
  export {};
@@ -6,5 +6,4 @@ export declare function defaultHandler(error: HTTPError, event: HTTPEvent, opts?
6
6
  silent?: boolean;
7
7
  json?: boolean;
8
8
  }): Promise<InternalHandlerResponse>;
9
- // ---- Source Map support ----
10
9
  export declare function loadStackTrace(error: any);
@@ -1,8 +1,4 @@
1
- // Headers route rule
2
1
  export declare const headers: unknown;
3
- // Redirect route rule
4
2
  export declare const redirect: unknown;
5
- // Proxy route rule
6
3
  export declare const proxy: unknown;
7
- // Cache route rule
8
4
  export declare const cache: unknown;
@@ -1,4 +1,3 @@
1
1
  import type { EventHandler } from "h3";
2
- // Served as /_openapi.json
3
2
  declare const _default: EventHandler;
4
3
  export default _default;
@@ -1,4 +1,3 @@
1
1
  import { type EventHandler } from "h3";
2
- // Served as /_scalar
3
2
  declare const _default: EventHandler;
4
3
  export default _default;
@@ -1,4 +1,3 @@
1
1
  import type { EventHandler } from "h3";
2
- // https://github.com/swagger-api/swagger-ui
3
2
  declare const _default: EventHandler;
4
3
  export default _default;
@@ -1,6 +1,5 @@
1
1
  import type { NitroRuntimeConfig } from "nitro/types";
2
2
  export declare function useRuntimeConfig(): NitroRuntimeConfig;
3
- // ---- utils ----
4
3
  type EnvOptions = {
5
4
  prefix?: string;
6
5
  altPrefix?: string;
@@ -1,12 +1,9 @@
1
- // Config
2
1
  import type { NitroConfig } from "nitro/types";
3
2
  import type { ServerRequestContext } from "srvx";
4
3
  import { type H3EventContext } from "h3";
5
4
  export declare function defineConfig(config: Omit<NitroConfig, "rootDir">): Omit<NitroConfig, "rootDir">;
6
- // Type (only) helpers
7
5
  export { defineNitroPlugin as definePlugin } from "./internal/plugin.mjs";
8
6
  export { defineRouteMeta } from "./internal/meta.mjs";
9
7
  export { defineNitroErrorHandler as defineErrorHandler } from "./internal/error/utils.mjs";
10
- // Runtime
11
8
  export declare function serverFetch(resource: string | URL | Request, init?: RequestInit, context?: ServerRequestContext | H3EventContext): Promise<Response>;
12
9
  export declare function fetch(resource: string | URL | Request, init?: RequestInit, context?: ServerRequestContext | H3EventContext): Promise<Response>;
@@ -1,5 +1,4 @@
1
1
  import "./_runtime_warn.mjs";
2
2
  export declare function rendererTemplate(_req: Request): string | Promise<string>;
3
- // dev only
4
3
  export declare const rendererTemplateFile: string | undefined;
5
4
  export declare const isStaticTemplate: boolean | undefined;