nitro-nightly 3.0.1-20260120-020848-6786d069 → 3.0.1-20260120-133205-cbfce96c

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 (92) 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/@hiogawa/vite-plugin-fullstack.mjs +652 -0
  11. package/dist/_libs/@jridgewell/gen-mapping.mjs +448 -0
  12. package/dist/_libs/@jridgewell/remapping.mjs +117 -0
  13. package/dist/_libs/@rollup/plugin-alias.mjs +64 -0
  14. package/dist/_libs/@rollup/plugin-commonjs.d.mts +241 -0
  15. package/dist/_libs/@rollup/plugin-commonjs.mjs +1300 -0
  16. package/dist/_libs/{plugin-alias+plugin-inject.mjs → @rollup/plugin-inject.mjs} +2 -65
  17. package/dist/_libs/@rollup/plugin-json.mjs +36 -0
  18. package/dist/_libs/@rollup/plugin-node-resolve.mjs +1972 -0
  19. package/dist/_libs/c12.d.mts +214 -0
  20. package/dist/_libs/{c12+dotenv+rc9.mjs → c12.mjs} +105 -12
  21. package/dist/_libs/{chokidar+readdirp.mjs → chokidar.mjs} +8 -1
  22. package/dist/_libs/compatx.d.mts +47 -0
  23. package/dist/_libs/confbox.mjs +2488 -70
  24. package/dist/_libs/esbuild.d.mts +20 -0
  25. package/dist/_libs/escape-string-regexp.mjs +8 -0
  26. package/dist/_libs/estree-walker.mjs +187 -0
  27. package/dist/_libs/giget.mjs +3550 -0
  28. package/dist/_libs/httpxy.d.mts +79 -0
  29. package/dist/_libs/httpxy.mjs +6 -1
  30. package/dist/_libs/klona.mjs +38 -0
  31. package/dist/_libs/magic-string.d.mts +220 -0
  32. package/dist/_libs/mlly.d.mts +57 -0
  33. package/dist/_libs/pkg-types.d.mts +23 -0
  34. package/dist/_libs/rou3.d.mts +43 -0
  35. package/dist/_libs/rou3.mjs +322 -0
  36. package/dist/_libs/std-env.d.mts +4 -0
  37. package/dist/_libs/tsconfck.mjs +832 -0
  38. package/dist/_libs/ultrahtml.mjs +138 -0
  39. package/dist/_libs/unimport.d.mts +426 -0
  40. package/dist/_libs/unimport.mjs +1781 -5
  41. package/dist/_libs/unwasm.d.mts +29 -0
  42. package/dist/_presets.mjs +3 -8
  43. package/dist/builder.mjs +6 -8
  44. package/dist/cli/_chunks/build.mjs +1 -1
  45. package/dist/cli/_chunks/dev.mjs +2 -3
  46. package/dist/cli/_chunks/list.mjs +1 -1
  47. package/dist/cli/_chunks/prepare.mjs +1 -1
  48. package/dist/cli/_chunks/run.mjs +1 -1
  49. package/dist/cli/_chunks/task.mjs +16 -0
  50. package/dist/cli/index.mjs +1 -1
  51. package/dist/presets/aws-lambda/runtime/_utils.d.mts +0 -5
  52. package/dist/presets/netlify/runtime/netlify-edge.d.mts +0 -1
  53. package/dist/presets/winterjs/runtime/winterjs.d.mts +0 -1
  54. package/dist/runtime/internal/error/dev.d.mts +0 -1
  55. package/dist/runtime/internal/route-rules.d.mts +0 -4
  56. package/dist/runtime/internal/routes/openapi.d.mts +0 -1
  57. package/dist/runtime/internal/routes/scalar.d.mts +0 -1
  58. package/dist/runtime/internal/routes/swagger.d.mts +0 -1
  59. package/dist/runtime/internal/runtime-config.d.mts +0 -1
  60. package/dist/runtime/nitro.d.mts +0 -3
  61. package/dist/runtime/virtual/renderer-template.d.mts +0 -1
  62. package/dist/types/index.d.mts +36 -1405
  63. package/dist/vite.mjs +18 -641
  64. package/package.json +2 -2
  65. package/dist/_chunks/nitro3.mjs +0 -2696
  66. package/dist/_chunks/nitro4.mjs +0 -176
  67. package/dist/_chunks/nitro5.mjs +0 -733
  68. package/dist/_chunks/nitro6.mjs +0 -1458
  69. package/dist/_chunks/nitro7.mjs +0 -7561
  70. package/dist/_chunks/nitro8.mjs +0 -3524
  71. package/dist/_chunks/nitro9.mjs +0 -1729
  72. package/dist/_libs/_.mjs +0 -3
  73. package/dist/_libs/_2.mjs +0 -3
  74. package/dist/_libs/_3.mjs +0 -4
  75. package/dist/_libs/_4.mjs +0 -6
  76. package/dist/_libs/_5.mjs +0 -3
  77. package/dist/_libs/_6.mjs +0 -3
  78. package/dist/_libs/acorn+confbox+js-tokens+magic-string+mlly+pkg-types+sourcemap-codec+strip-literal+unimport.mjs +0 -8900
  79. package/dist/_libs/confbox+exsolve+pkg-types.mjs +0 -1249
  80. package/dist/_libs/confbox2.mjs +0 -786
  81. package/dist/_libs/confbox3.mjs +0 -404
  82. package/dist/_libs/confbox4.mjs +0 -3
  83. package/dist/_libs/estree-walker+unimport.mjs +0 -378
  84. package/dist/_libs/fdir+picomatch+tinyglobby.mjs +0 -2471
  85. package/dist/_libs/gen-mapping+remapping+resolve-uri+trace-mapping+unimport+unplugin+unplugin-utils+webpack-virtual-modules.mjs +0 -2150
  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/vite-plugin-fullstack.mjs +0 -26
@@ -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/c12.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/c12.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;