nitro-nightly 3.0.0-beta-28969273.f7aa9de6 → 4.0.0-20251010-091516-7cafddba
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 +8 -39
- package/dist/_chunks/app.mjs +19797 -0
- package/dist/_chunks/build.mjs +84 -0
- package/dist/_chunks/build2.mjs +318 -0
- package/dist/_chunks/build3.mjs +6452 -0
- package/dist/_chunks/detect-acorn.mjs +503 -0
- package/dist/_chunks/index.mjs +22242 -0
- package/dist/_chunks/index2.mjs +297 -0
- package/dist/_chunks/index3.mjs +1058 -0
- package/dist/_chunks/index4.mjs +1206 -0
- package/dist/_chunks/info.mjs +11157 -0
- package/dist/_chunks/json5.mjs +68 -0
- package/dist/_chunks/jsonc.mjs +51 -0
- package/dist/_chunks/pathe.M-eThtNZ.mjs +204 -0
- package/dist/_chunks/plugin.mjs +960 -0
- package/dist/_chunks/server.mjs +254 -0
- package/dist/_chunks/snapshot.mjs +284 -0
- package/dist/_chunks/toml.mjs +259 -0
- package/dist/_chunks/yaml.mjs +86 -0
- package/dist/cli/build.mjs +10 -3
- package/dist/cli/dev.mjs +41 -9
- package/dist/cli/index.mjs +460 -1
- package/dist/cli/index2.mjs +4 -1
- package/dist/cli/list.mjs +10 -4
- package/dist/cli/prepare.mjs +6 -3
- package/dist/cli/run.mjs +7 -4
- package/dist/index.d.mts +52 -0
- package/dist/index.mjs +55 -0
- package/dist/node_modules/@poppinss/colors/build/index.js +169 -0
- package/dist/node_modules/@poppinss/colors/package.json +116 -0
- package/dist/node_modules/@poppinss/dumper/build/chunk-26HALFTP.js +602 -0
- package/dist/node_modules/@poppinss/dumper/build/formatters/console/main.js +441 -0
- package/dist/node_modules/@poppinss/dumper/build/formatters/html/main.js +717 -0
- package/dist/node_modules/@poppinss/dumper/package.json +122 -0
- package/dist/node_modules/@poppinss/exception/build/index.js +63 -0
- package/dist/node_modules/@poppinss/exception/package.json +106 -0
- package/dist/node_modules/@sindresorhus/is/distribution/index.js +1313 -0
- package/dist/node_modules/@sindresorhus/is/distribution/utilities.js +3 -0
- package/dist/node_modules/@sindresorhus/is/package.json +81 -0
- package/dist/node_modules/@speed-highlight/core/dist/index.js +4 -0
- package/dist/node_modules/@speed-highlight/core/dist/terminal.js +2 -0
- package/dist/node_modules/@speed-highlight/core/package.json +90 -0
- package/dist/node_modules/cookie/dist/index.js +239 -0
- package/dist/node_modules/cookie/package.json +42 -0
- package/dist/node_modules/croner/dist/croner.js +1 -0
- package/dist/node_modules/croner/package.json +63 -0
- package/dist/node_modules/defu/dist/defu.mjs +69 -0
- package/dist/node_modules/defu/package.json +43 -0
- package/dist/node_modules/destr/dist/index.mjs +72 -0
- package/dist/node_modules/destr/package.json +47 -0
- package/dist/node_modules/error-stack-parser-es/dist/index.mjs +38 -0
- package/dist/node_modules/error-stack-parser-es/dist/lite.mjs +167 -0
- package/dist/node_modules/error-stack-parser-es/package.json +83 -0
- package/dist/node_modules/get-port-please/dist/index.mjs +430 -0
- package/dist/node_modules/get-port-please/package.json +39 -0
- package/dist/node_modules/hookable/dist/index.mjs +290 -0
- package/dist/node_modules/hookable/package.json +49 -0
- package/dist/node_modules/kleur/index.js +110 -0
- package/dist/node_modules/kleur/index.mjs +110 -0
- package/dist/node_modules/kleur/package.json +51 -0
- package/dist/node_modules/klona/dist/index.mjs +81 -0
- package/dist/node_modules/klona/full/index.mjs +53 -0
- package/dist/node_modules/klona/package.json +74 -0
- package/dist/node_modules/scule/dist/index.mjs +80 -0
- package/dist/node_modules/scule/package.json +43 -0
- package/dist/node_modules/source-map/lib/array-set.js +100 -0
- package/dist/node_modules/source-map/lib/base64-vlq.js +94 -0
- package/dist/node_modules/source-map/lib/base64.js +19 -0
- package/dist/node_modules/source-map/lib/binary-search.js +113 -0
- package/dist/node_modules/source-map/lib/mapping-list.js +83 -0
- package/dist/node_modules/source-map/lib/mappings.wasm +0 -0
- package/dist/node_modules/source-map/lib/read-wasm.js +27 -0
- package/dist/node_modules/source-map/lib/source-map-consumer.js +1081 -0
- package/dist/node_modules/source-map/lib/source-map-generator.js +439 -0
- package/dist/node_modules/source-map/lib/source-node.js +430 -0
- package/dist/node_modules/source-map/lib/url.js +13 -0
- package/dist/node_modules/source-map/lib/util.js +444 -0
- package/dist/node_modules/source-map/lib/wasm.js +138 -0
- package/dist/node_modules/source-map/package.json +79 -0
- package/dist/node_modules/source-map/source-map.js +10 -0
- package/dist/node_modules/std-env/dist/index.mjs +1 -0
- package/dist/node_modules/std-env/package.json +46 -0
- package/dist/node_modules/supports-color/index.js +202 -0
- package/dist/node_modules/supports-color/package.json +64 -0
- package/dist/node_modules/ufo/dist/index.mjs +638 -0
- package/dist/node_modules/ufo/package.json +47 -0
- package/dist/node_modules/unctx/dist/index.mjs +131 -0
- package/dist/node_modules/unctx/package.json +67 -0
- package/dist/node_modules/youch/build/chunk-4L7RY2JA.js +42 -0
- package/dist/node_modules/youch/build/chunk-4XB2BYKC.js +85 -0
- package/dist/node_modules/youch/build/chunk-4YEN7HVQ.js +61 -0
- package/dist/node_modules/youch/build/chunk-EUJBVOYB.js +83 -0
- package/dist/node_modules/youch/build/chunk-HFSXRSKS.js +85 -0
- package/dist/node_modules/youch/build/chunk-JAN2TFI2.js +222 -0
- package/dist/node_modules/youch/build/chunk-OSUFJZHZ.js +6 -0
- package/dist/node_modules/youch/build/chunk-PINJDICN.js +72 -0
- package/dist/node_modules/youch/build/chunk-PUHGL6HA.js +41 -0
- package/dist/node_modules/youch/build/chunk-VE4LENUR.js +45 -0
- package/dist/node_modules/youch/build/index.js +352 -0
- package/dist/node_modules/youch/build/public/error_cause/style.css +5 -0
- package/dist/node_modules/youch/build/public/error_info/script.js +13 -0
- package/dist/node_modules/youch/build/public/error_info/style.css +144 -0
- package/dist/node_modules/youch/build/public/error_stack/script.js +74 -0
- package/dist/node_modules/youch/build/public/error_stack/style.css +220 -0
- package/dist/node_modules/youch/build/public/error_stack_source/style.css +123 -0
- package/dist/node_modules/youch/build/public/header/script.js +16 -0
- package/dist/node_modules/youch/build/public/header/style.css +56 -0
- package/dist/node_modules/youch/build/public/layout/script.js +20 -0
- package/dist/node_modules/youch/build/public/layout/style.css +431 -0
- package/dist/node_modules/youch/package.json +133 -0
- package/dist/node_modules/youch-core/build/index.js +316 -0
- package/dist/node_modules/youch-core/package.json +124 -0
- package/dist/presets/_nitro/runtime/nitro-dev.mjs +48 -73
- package/dist/presets/_nitro/runtime/{nitro-prerenderer.d.ts → nitro-prerenderer.d.mts} +1 -1
- package/dist/presets/_nitro/runtime/nitro-prerenderer.mjs +12 -1
- package/dist/presets/_nitro/runtime/service-worker.mjs +5 -15
- package/dist/presets/aws-amplify/runtime/aws-amplify.mjs +2 -2
- package/dist/presets/aws-lambda/runtime/_utils.d.mts +18 -0
- package/dist/presets/aws-lambda/runtime/_utils.mjs +102 -0
- package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.d.mts +3 -0
- package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.mjs +12 -32
- package/dist/presets/aws-lambda/runtime/aws-lambda.d.mts +3 -0
- package/dist/presets/aws-lambda/runtime/aws-lambda.mjs +6 -38
- package/dist/{runtime/internal/utils.azure.d.ts → presets/azure/runtime/_utils.d.mts} +1 -1
- package/dist/{runtime/internal/utils.azure.mjs → presets/azure/runtime/_utils.mjs} +3 -4
- package/dist/presets/azure/runtime/azure-swa.mjs +11 -13
- package/dist/presets/bun/runtime/bun.mjs +13 -18
- package/dist/presets/cloudflare/runtime/_module-handler.d.mts +13 -0
- package/dist/presets/cloudflare/runtime/_module-handler.mjs +93 -0
- package/dist/presets/cloudflare/runtime/cloudflare-durable.d.mts +19 -0
- package/dist/presets/cloudflare/runtime/cloudflare-durable.mjs +74 -0
- package/dist/presets/cloudflare/runtime/cloudflare-module.d.mts +9 -0
- package/dist/presets/cloudflare/runtime/cloudflare-module.mjs +13 -97
- package/dist/presets/cloudflare/runtime/{cloudflare-pages.d.ts → cloudflare-pages.d.mts} +1 -1
- package/dist/presets/cloudflare/runtime/cloudflare-pages.mjs +19 -27
- package/dist/{runtime/internal/timing.d.ts → presets/cloudflare/runtime/plugin.dev.d.mts} +1 -0
- package/dist/presets/cloudflare/runtime/plugin.dev.mjs +89 -0
- package/dist/presets/deno/runtime/deno-deploy.mjs +11 -25
- package/dist/presets/deno/runtime/deno-server.d.mts +6 -0
- package/dist/presets/deno/runtime/deno-server.mjs +15 -21
- package/dist/presets/netlify/runtime/netlify-edge.d.mts +3 -0
- package/dist/presets/netlify/runtime/netlify-edge.mjs +8 -16
- package/dist/presets/netlify/runtime/netlify.mjs +16 -45
- package/dist/presets/node/runtime/{cluster.mjs → node-cluster.mjs} +1 -3
- package/dist/presets/node/runtime/node-middleware.d.mts +4 -0
- package/dist/presets/node/runtime/{node-listener.mjs → node-middleware.mjs} +3 -4
- package/dist/presets/node/runtime/node-server.mjs +3 -4
- package/dist/presets/standard/runtime/server.d.mts +5 -0
- package/dist/presets/standard/runtime/server.mjs +6 -0
- package/dist/presets/stormkit/runtime/stormkit.mjs +8 -12
- package/dist/presets/vercel/runtime/vercel.d.mts +8 -0
- package/dist/presets/vercel/runtime/vercel.mjs +11 -11
- package/dist/presets/winterjs/runtime/winterjs.mjs +22 -4
- package/dist/presets/{node/runtime/node-server.d.ts → zeabur/runtime/zeabur.d.mts} +1 -1
- package/dist/presets/zeabur/runtime/zeabur.mjs +2 -6
- package/dist/presets.mjs +2460 -0
- package/dist/runtime/index.d.mts +11 -0
- package/dist/runtime/index.mjs +8 -8
- package/dist/runtime/internal/app.d.mts +2 -0
- package/dist/runtime/internal/app.mjs +129 -128
- package/dist/runtime/internal/cache.d.mts +7 -0
- package/dist/runtime/internal/cache.mjs +82 -175
- package/dist/runtime/internal/{context.d.ts → context.d.mts} +3 -3
- package/dist/runtime/internal/context.mjs +6 -6
- package/dist/runtime/internal/error/dev.d.mts +9 -0
- package/dist/runtime/internal/error/dev.mjs +122 -0
- package/dist/runtime/internal/error/prod.d.mts +8 -0
- package/dist/runtime/internal/error/prod.mjs +62 -0
- package/dist/runtime/internal/error/utils.d.mts +8 -0
- package/dist/runtime/internal/error/utils.mjs +3 -0
- package/dist/runtime/internal/index.d.mts +3 -0
- package/dist/runtime/internal/index.mjs +1 -14
- package/dist/runtime/internal/renderer.d.mts +3 -0
- package/dist/runtime/internal/renderer.mjs +29 -33
- package/dist/runtime/internal/route-rules.d.mts +8 -0
- package/dist/runtime/internal/route-rules.mjs +58 -63
- package/dist/runtime/internal/routes/dev-tasks.d.mts +3 -0
- package/dist/runtime/internal/routes/dev-tasks.mjs +23 -0
- package/dist/runtime/internal/routes/openapi.d.mts +3 -0
- package/dist/runtime/internal/routes/openapi.mjs +24 -9
- package/dist/runtime/internal/routes/renderer-template.d.mts +2 -0
- package/dist/runtime/internal/routes/renderer-template.dev.d.mts +3 -0
- package/dist/runtime/internal/routes/renderer-template.dev.mjs +21 -0
- package/dist/runtime/internal/routes/renderer-template.mjs +4 -0
- package/dist/runtime/internal/routes/scalar.d.mts +3 -0
- package/dist/runtime/internal/routes/scalar.mjs +7 -4
- package/dist/runtime/internal/routes/swagger.d.mts +3 -0
- package/dist/runtime/internal/routes/swagger.mjs +5 -4
- package/dist/runtime/internal/{utils.env.d.ts → runtime-config.d.mts} +4 -2
- package/dist/runtime/internal/{utils.env.mjs → runtime-config.mjs} +16 -6
- package/dist/runtime/internal/static.d.mts +3 -0
- package/dist/runtime/internal/static.mjs +24 -36
- package/dist/runtime/internal/storage.mjs +2 -1
- package/dist/runtime/internal/task.mjs +6 -6
- package/dist/runtime/internal/utils.d.mts +1 -0
- package/dist/runtime/internal/utils.mjs +1 -116
- package/dist/runtime/internal/vite/dev-entry.d.mts +1 -0
- package/dist/runtime/internal/vite/dev-entry.mjs +6 -0
- package/dist/runtime/internal/vite/dev-worker.mjs +362 -0
- package/dist/runtime/internal/vite/prod-setup.d.mts +4 -0
- package/dist/runtime/internal/vite/prod-setup.mjs +55 -0
- package/dist/runtime/internal/vite/ssr-renderer.d.mts +4 -0
- package/dist/runtime/internal/vite/ssr-renderer.mjs +4 -0
- package/dist/types/index.d.mts +2688 -138
- package/dist/vite.d.mts +59 -0
- package/dist/vite.mjs +68 -0
- package/lib/config.d.mts +9 -0
- package/lib/deps/h3.d.mts +1 -0
- package/lib/deps/h3.mjs +1 -0
- package/lib/deps/ofetch.mjs +1 -0
- package/lib/deps/ofetch.mts +1 -0
- package/lib/meta.d.mts +5 -0
- package/lib/meta.mjs +21 -0
- package/{runtime-meta.d.ts → lib/runtime-meta.d.mts} +1 -0
- package/{runtime-meta.mjs → lib/runtime-meta.mjs} +12 -4
- package/package.json +142 -160
- package/cli.d.ts +0 -1
- package/config.d.ts +0 -1
- package/core.d.ts +0 -1
- package/dist/cli/index.d.ts +0 -1
- package/dist/config/index.d.mts +0 -6
- package/dist/config/index.d.ts +0 -6
- package/dist/core/index.d.mts +0 -30
- package/dist/core/index.d.ts +0 -30
- package/dist/core/index.mjs +0 -2456
- package/dist/kit/index.d.mts +0 -44
- package/dist/kit/index.d.ts +0 -44
- package/dist/kit/index.mjs +0 -71
- package/dist/meta/index.d.mts +0 -3
- package/dist/meta/index.d.ts +0 -3
- package/dist/meta/index.mjs +0 -3
- package/dist/presets/_all.gen.d.ts +0 -2
- package/dist/presets/_all.gen.mjs +0 -52
- package/dist/presets/_nitro/base-worker.d.ts +0 -2
- package/dist/presets/_nitro/base-worker.mjs +0 -25
- package/dist/presets/_nitro/nitro-dev.d.ts +0 -2
- package/dist/presets/_nitro/nitro-dev.mjs +0 -19
- package/dist/presets/_nitro/nitro-prerender.d.ts +0 -2
- package/dist/presets/_nitro/nitro-prerender.mjs +0 -17
- package/dist/presets/_nitro/preset.d.ts +0 -2
- package/dist/presets/_nitro/preset.mjs +0 -5
- package/dist/presets/_nitro/service-worker.d.ts +0 -2
- package/dist/presets/_nitro/service-worker.mjs +0 -110
- package/dist/presets/_resolve.d.ts +0 -8
- package/dist/presets/_resolve.mjs +0 -44
- package/dist/presets/_static/preset.d.ts +0 -2
- package/dist/presets/_static/preset.mjs +0 -69
- package/dist/presets/_types.gen.d.ts +0 -16
- package/dist/presets/alwaysdata/preset.d.ts +0 -2
- package/dist/presets/alwaysdata/preset.mjs +0 -14
- package/dist/presets/aws-amplify/preset.d.ts +0 -3
- package/dist/presets/aws-amplify/preset.mjs +0 -27
- package/dist/presets/aws-amplify/types.d.ts +0 -141
- package/dist/presets/aws-amplify/utils.d.ts +0 -2
- package/dist/presets/aws-amplify/utils.mjs +0 -82
- package/dist/presets/aws-lambda/preset.d.ts +0 -2
- package/dist/presets/aws-lambda/preset.mjs +0 -21
- package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.d.ts +0 -14
- package/dist/presets/aws-lambda/runtime/aws-lambda.d.ts +0 -4
- package/dist/presets/azure/preset.d.ts +0 -3
- package/dist/presets/azure/preset.mjs +0 -44
- package/dist/presets/azure/runtime/azure-functions.mjs +0 -24
- package/dist/presets/azure/runtime/azure-swa.d.ts +0 -5
- package/dist/presets/azure/types.d.ts +0 -13
- package/dist/presets/azure/types.mjs +0 -0
- package/dist/presets/azure/utils.d.ts +0 -3
- package/dist/presets/azure/utils.mjs +0 -183
- package/dist/presets/bun/preset.d.ts +0 -2
- package/dist/presets/bun/preset.mjs +0 -17
- package/dist/presets/cleavr/preset.d.ts +0 -2
- package/dist/presets/cleavr/preset.mjs +0 -12
- package/dist/presets/cloudflare/preset.d.ts +0 -3
- package/dist/presets/cloudflare/preset.mjs +0 -145
- package/dist/presets/cloudflare/runtime/cloudflare-module.d.ts +0 -13
- package/dist/presets/cloudflare/runtime/cloudflare-worker.mjs +0 -64
- package/dist/presets/cloudflare/types.d.ts +0 -89
- package/dist/presets/cloudflare/types.mjs +0 -0
- package/dist/presets/cloudflare/types.wrangler.d.ts +0 -974
- package/dist/presets/cloudflare/types.wrangler.mjs +0 -0
- package/dist/presets/cloudflare/utils.d.ts +0 -3
- package/dist/presets/cloudflare/utils.mjs +0 -163
- package/dist/presets/deno/preset.d.ts +0 -2
- package/dist/presets/deno/preset.mjs +0 -148
- package/dist/presets/deno/runtime/_deno-env-polyfill.d.ts +0 -0
- package/dist/presets/deno/runtime/_deno-env-polyfill.mjs +0 -1
- package/dist/presets/digitalocean/preset.d.ts +0 -2
- package/dist/presets/digitalocean/preset.mjs +0 -11
- package/dist/presets/edgio/preset.d.ts +0 -2
- package/dist/presets/edgio/preset.mjs +0 -95
- package/dist/presets/firebase/preset.d.ts +0 -3
- package/dist/presets/firebase/preset.mjs +0 -50
- package/dist/presets/firebase/runtime/firebase-gen-1.d.ts +0 -2
- package/dist/presets/firebase/runtime/firebase-gen-1.mjs +0 -7
- package/dist/presets/firebase/runtime/firebase-gen-2.d.ts +0 -2
- package/dist/presets/firebase/runtime/firebase-gen-2.mjs +0 -14
- package/dist/presets/firebase/runtime/firebase-gen-default.d.ts +0 -1
- package/dist/presets/firebase/runtime/firebase-gen-default.mjs +0 -1
- package/dist/presets/firebase/types.d.ts +0 -38
- package/dist/presets/firebase/types.mjs +0 -0
- package/dist/presets/firebase/utils.d.ts +0 -3
- package/dist/presets/firebase/utils.mjs +0 -50
- package/dist/presets/flightcontrol/preset.d.ts +0 -2
- package/dist/presets/flightcontrol/preset.mjs +0 -11
- package/dist/presets/heroku/preset.d.ts +0 -2
- package/dist/presets/heroku/preset.mjs +0 -11
- package/dist/presets/iis/preset.d.ts +0 -2
- package/dist/presets/iis/preset.mjs +0 -32
- package/dist/presets/iis/utils.d.ts +0 -3
- package/dist/presets/iis/utils.mjs +0 -161
- package/dist/presets/index.d.mts +0 -1
- package/dist/presets/index.d.ts +0 -2
- package/dist/presets/index.mjs +0 -1
- package/dist/presets/koyeb/preset.d.ts +0 -2
- package/dist/presets/koyeb/preset.mjs +0 -11
- package/dist/presets/netlify/legacy/preset.d.ts +0 -2
- package/dist/presets/netlify/legacy/preset.mjs +0 -143
- package/dist/presets/netlify/legacy/runtime/_deno-env-polyfill.d.ts +0 -0
- package/dist/presets/netlify/legacy/runtime/_deno-env-polyfill.mjs +0 -1
- package/dist/presets/netlify/legacy/runtime/netlify-builder.d.ts +0 -3
- package/dist/presets/netlify/legacy/runtime/netlify-builder.mjs +0 -5
- package/dist/presets/netlify/legacy/runtime/netlify-edge.d.ts +0 -2
- package/dist/presets/netlify/legacy/runtime/netlify-edge.mjs +0 -25
- package/dist/presets/netlify/legacy/runtime/netlify-lambda.d.ts +0 -3
- package/dist/presets/netlify/legacy/runtime/netlify-lambda.mjs +0 -38
- package/dist/presets/netlify/legacy/runtime/netlify.d.ts +0 -4
- package/dist/presets/netlify/legacy/runtime/netlify.mjs +0 -22
- package/dist/presets/netlify/legacy/utils.d.ts +0 -4
- package/dist/presets/netlify/legacy/utils.mjs +0 -113
- package/dist/presets/netlify/preset.d.ts +0 -3
- package/dist/presets/netlify/preset.mjs +0 -128
- package/dist/presets/netlify/runtime/_deno-env-polyfill.d.ts +0 -0
- package/dist/presets/netlify/runtime/_deno-env-polyfill.mjs +0 -1
- package/dist/presets/netlify/runtime/netlify-edge.d.ts +0 -2
- package/dist/presets/netlify/types.d.ts +0 -12
- package/dist/presets/netlify/types.mjs +0 -0
- package/dist/presets/netlify/utils.d.ts +0 -5
- package/dist/presets/netlify/utils.mjs +0 -94
- package/dist/presets/node/preset.d.ts +0 -2
- package/dist/presets/node/preset.mjs +0 -49
- package/dist/presets/node/runtime/cli.d.ts +0 -1
- package/dist/presets/node/runtime/cli.mjs +0 -22
- package/dist/presets/node/runtime/node-listener.d.ts +0 -6
- package/dist/presets/platform.sh/preset.d.ts +0 -2
- package/dist/presets/platform.sh/preset.mjs +0 -11
- package/dist/presets/render.com/preset.d.ts +0 -2
- package/dist/presets/render.com/preset.mjs +0 -11
- package/dist/presets/stormkit/preset.d.ts +0 -2
- package/dist/presets/stormkit/preset.mjs +0 -15
- package/dist/presets/vercel/preset.d.ts +0 -3
- package/dist/presets/vercel/preset.mjs +0 -104
- package/dist/presets/vercel/runtime/vercel-edge.d.ts +0 -2
- package/dist/presets/vercel/runtime/vercel-edge.mjs +0 -22
- package/dist/presets/vercel/runtime/vercel.d.ts +0 -4
- package/dist/presets/vercel/types.d.ts +0 -78
- package/dist/presets/vercel/types.mjs +0 -0
- package/dist/presets/vercel/utils.d.ts +0 -5
- package/dist/presets/vercel/utils.mjs +0 -186
- package/dist/presets/winterjs/preset.d.ts +0 -2
- package/dist/presets/winterjs/preset.mjs +0 -20
- package/dist/presets/winterjs/runtime/winterjs.d.ts +0 -1
- package/dist/presets/zeabur/preset.d.ts +0 -2
- package/dist/presets/zeabur/preset.mjs +0 -70
- package/dist/presets/zeabur/runtime/zeabur.d.ts +0 -4
- package/dist/rollup/index.d.mts +0 -5
- package/dist/rollup/index.d.ts +0 -5
- package/dist/rollup/index.mjs +0 -1673
- package/dist/runtime/index.d.ts +0 -12
- package/dist/runtime/internal/app.d.ts +0 -3
- package/dist/runtime/internal/cache.d.ts +0 -8
- package/dist/runtime/internal/client.mjs +0 -4
- package/dist/runtime/internal/config.d.ts +0 -5
- package/dist/runtime/internal/config.mjs +0 -45
- package/dist/runtime/internal/error.d.ts +0 -4
- package/dist/runtime/internal/error.mjs +0 -73
- package/dist/runtime/internal/index.d.ts +0 -6
- package/dist/runtime/internal/renderer.d.ts +0 -2
- package/dist/runtime/internal/route-rules.d.ts +0 -14
- package/dist/runtime/internal/routes/openapi.d.ts +0 -3
- package/dist/runtime/internal/routes/scalar.d.ts +0 -2
- package/dist/runtime/internal/routes/swagger.d.ts +0 -2
- package/dist/runtime/internal/static.d.ts +0 -2
- package/dist/runtime/internal/timing.mjs +0 -29
- package/dist/runtime/internal/utils.d.ts +0 -21
- package/dist/runtime/internal/utils.lambda.d.ts +0 -10
- package/dist/runtime/internal/utils.lambda.mjs +0 -30
- package/dist/shared/nitro.bra5i6ER.d.mts +0 -620
- package/dist/shared/nitro.bra5i6ER.d.ts +0 -620
- package/dist/types/index.d.ts +0 -260
- package/kit.d.ts +0 -1
- package/meta.d.ts +0 -1
- package/presets.d.ts +0 -1
- package/rollup.d.ts +0 -1
- package/runtime.d.ts +0 -1
- package/types.d.ts +0 -1
- /package/dist/presets/_nitro/runtime/{nitro-dev.d.ts → nitro-dev.d.mts} +0 -0
- /package/dist/presets/_nitro/runtime/{service-worker.d.ts → service-worker.d.mts} +0 -0
- /package/dist/presets/aws-amplify/runtime/{aws-amplify.d.ts → aws-amplify.d.mts} +0 -0
- /package/dist/presets/azure/runtime/{azure-functions.d.ts → azure-swa.d.mts} +0 -0
- /package/dist/presets/bun/runtime/{bun.d.ts → bun.d.mts} +0 -0
- /package/dist/presets/{cloudflare/runtime/cloudflare-worker.d.ts → deno/runtime/deno-deploy.d.mts} +0 -0
- /package/dist/presets/netlify/runtime/{netlify.d.ts → netlify.d.mts} +0 -0
- /package/dist/presets/node/runtime/{cluster.d.ts → node-cluster.d.mts} +0 -0
- /package/dist/presets/{deno/runtime/deno-server.d.ts → node/runtime/node-server.d.mts} +0 -0
- /package/dist/presets/stormkit/runtime/{stormkit.d.ts → stormkit.d.mts} +0 -0
- /package/dist/presets/{deno/runtime/deno-deploy.d.ts → winterjs/runtime/winterjs.d.mts} +0 -0
- /package/dist/runtime/internal/{database.d.ts → database.d.mts} +0 -0
- /package/dist/runtime/internal/{debug.d.ts → debug.d.mts} +0 -0
- /package/dist/{presets/_types.gen.mjs → runtime/internal/empty.d.mts} +0 -0
- /package/dist/{presets/aws-amplify/types.mjs → runtime/internal/empty.mjs} +0 -0
- /package/dist/runtime/internal/lib/{http-graceful-shutdown.d.ts → http-graceful-shutdown.d.mts} +0 -0
- /package/dist/runtime/internal/{meta.d.ts → meta.d.mts} +0 -0
- /package/dist/runtime/internal/{plugin.d.ts → plugin.d.mts} +0 -0
- /package/dist/runtime/internal/{shutdown.d.ts → shutdown.d.mts} +0 -0
- /package/dist/runtime/internal/{storage.d.ts → storage.d.mts} +0 -0
- /package/dist/runtime/internal/{task.d.ts → task.d.mts} +0 -0
- /package/dist/runtime/internal/{client.d.ts → vite/dev-worker.d.mts} +0 -0
- /package/{dist/config/index.mjs → lib/config.mjs} +0 -0
package/dist/kit/index.d.mts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { NitroPreset, NitroPresetMeta, Nitro } from 'nitro/types';
|
|
2
|
-
import { N as NitroModule } from '../shared/nitro.bra5i6ER.mjs';
|
|
3
|
-
import 'consola';
|
|
4
|
-
import 'h3';
|
|
5
|
-
import 'hookable';
|
|
6
|
-
import 'nitro/presets';
|
|
7
|
-
import 'unimport';
|
|
8
|
-
import 'unstorage';
|
|
9
|
-
import '@rollup/plugin-commonjs';
|
|
10
|
-
import 'c12';
|
|
11
|
-
import 'chokidar';
|
|
12
|
-
import 'compatx';
|
|
13
|
-
import 'db0';
|
|
14
|
-
import 'httpxy';
|
|
15
|
-
import 'pkg-types';
|
|
16
|
-
import 'rollup-plugin-visualizer';
|
|
17
|
-
import 'unenv';
|
|
18
|
-
import 'unimport/unplugin';
|
|
19
|
-
import 'unwasm/plugin';
|
|
20
|
-
import 'node:http';
|
|
21
|
-
import 'node:stream';
|
|
22
|
-
import 'node:worker_threads';
|
|
23
|
-
import 'listhen';
|
|
24
|
-
import 'openapi-typescript';
|
|
25
|
-
import '@rollup/pluginutils';
|
|
26
|
-
import '@vercel/nft';
|
|
27
|
-
import 'esbuild';
|
|
28
|
-
import 'rollup';
|
|
29
|
-
import '@scalar/api-reference';
|
|
30
|
-
import 'std-env';
|
|
31
|
-
|
|
32
|
-
declare function defineNitroPreset<P extends NitroPreset, M extends NitroPresetMeta>(preset: P, meta?: M): P & {
|
|
33
|
-
_meta: NitroPresetMeta;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
declare function defineNitroModule(def: NitroModule): NitroModule;
|
|
37
|
-
|
|
38
|
-
declare function writeFile(file: string, contents: Buffer | string, log?: boolean): Promise<void>;
|
|
39
|
-
declare function isDirectory(path: string): Promise<boolean>;
|
|
40
|
-
|
|
41
|
-
declare function prettyPath(p: string, highlight?: boolean): string;
|
|
42
|
-
declare function resolveNitroPath(path: string, nitroOptions: Nitro["options"], base?: string): string;
|
|
43
|
-
|
|
44
|
-
export { defineNitroModule, defineNitroPreset, isDirectory, prettyPath, resolveNitroPath, writeFile };
|
package/dist/kit/index.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { NitroPreset, NitroPresetMeta, Nitro } from 'nitro/types';
|
|
2
|
-
import { N as NitroModule } from '../shared/nitro.bra5i6ER.js';
|
|
3
|
-
import 'consola';
|
|
4
|
-
import 'h3';
|
|
5
|
-
import 'hookable';
|
|
6
|
-
import 'nitro/presets';
|
|
7
|
-
import 'unimport';
|
|
8
|
-
import 'unstorage';
|
|
9
|
-
import '@rollup/plugin-commonjs';
|
|
10
|
-
import 'c12';
|
|
11
|
-
import 'chokidar';
|
|
12
|
-
import 'compatx';
|
|
13
|
-
import 'db0';
|
|
14
|
-
import 'httpxy';
|
|
15
|
-
import 'pkg-types';
|
|
16
|
-
import 'rollup-plugin-visualizer';
|
|
17
|
-
import 'unenv';
|
|
18
|
-
import 'unimport/unplugin';
|
|
19
|
-
import 'unwasm/plugin';
|
|
20
|
-
import 'node:http';
|
|
21
|
-
import 'node:stream';
|
|
22
|
-
import 'node:worker_threads';
|
|
23
|
-
import 'listhen';
|
|
24
|
-
import 'openapi-typescript';
|
|
25
|
-
import '@rollup/pluginutils';
|
|
26
|
-
import '@vercel/nft';
|
|
27
|
-
import 'esbuild';
|
|
28
|
-
import 'rollup';
|
|
29
|
-
import '@scalar/api-reference';
|
|
30
|
-
import 'std-env';
|
|
31
|
-
|
|
32
|
-
declare function defineNitroPreset<P extends NitroPreset, M extends NitroPresetMeta>(preset: P, meta?: M): P & {
|
|
33
|
-
_meta: NitroPresetMeta;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
declare function defineNitroModule(def: NitroModule): NitroModule;
|
|
37
|
-
|
|
38
|
-
declare function writeFile(file: string, contents: Buffer | string, log?: boolean): Promise<void>;
|
|
39
|
-
declare function isDirectory(path: string): Promise<boolean>;
|
|
40
|
-
|
|
41
|
-
declare function prettyPath(p: string, highlight?: boolean): string;
|
|
42
|
-
declare function resolveNitroPath(path: string, nitroOptions: Nitro["options"], base?: string): string;
|
|
43
|
-
|
|
44
|
-
export { defineNitroModule, defineNitroPreset, isDirectory, prettyPath, resolveNitroPath, writeFile };
|
package/dist/kit/index.mjs
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from 'node:url';
|
|
2
|
-
import fsp from 'node:fs/promises';
|
|
3
|
-
import consola, { consola as consola$1 } from 'consola';
|
|
4
|
-
import { relative, resolve, dirname } from 'pathe';
|
|
5
|
-
import { colors } from 'consola/utils';
|
|
6
|
-
import { getProperty } from 'dot-prop';
|
|
7
|
-
|
|
8
|
-
function defineNitroPreset(preset, meta) {
|
|
9
|
-
if (meta?.url && typeof preset !== "function" && preset.entry && preset.entry.startsWith(".")) {
|
|
10
|
-
preset.entry = fileURLToPath(new URL(preset.entry, meta.url));
|
|
11
|
-
}
|
|
12
|
-
return { ...preset, _meta: meta };
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function defineNitroModule(def) {
|
|
16
|
-
if (typeof def?.setup !== "function") {
|
|
17
|
-
def.setup = () => {
|
|
18
|
-
throw new TypeError("NitroModule must implement a `setup` method!");
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
return def;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function prettyPath(p, highlight = true) {
|
|
25
|
-
p = relative(process.cwd(), p);
|
|
26
|
-
return highlight ? colors.cyan(p) : p;
|
|
27
|
-
}
|
|
28
|
-
function resolveNitroPath(path, nitroOptions, base) {
|
|
29
|
-
if (typeof path !== "string") {
|
|
30
|
-
throw new TypeError("Invalid path: " + path);
|
|
31
|
-
}
|
|
32
|
-
path = _compilePathTemplate(path)(nitroOptions);
|
|
33
|
-
for (const base2 in nitroOptions.alias) {
|
|
34
|
-
if (path.startsWith(base2)) {
|
|
35
|
-
path = nitroOptions.alias[base2] + path.slice(base2.length);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return resolve(base || nitroOptions.srcDir, path);
|
|
39
|
-
}
|
|
40
|
-
function _compilePathTemplate(contents) {
|
|
41
|
-
return (params) => contents.replace(/{{ ?([\w.]+) ?}}/g, (_, match) => {
|
|
42
|
-
const val = getProperty(params, match);
|
|
43
|
-
if (!val) {
|
|
44
|
-
consola.warn(
|
|
45
|
-
`cannot resolve template param '${match}' in ${contents.slice(0, 20)}`
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
return val || `${match}`;
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
async function writeFile(file, contents, log = false) {
|
|
53
|
-
await fsp.mkdir(dirname(file), { recursive: true });
|
|
54
|
-
await fsp.writeFile(
|
|
55
|
-
file,
|
|
56
|
-
contents,
|
|
57
|
-
typeof contents === "string" ? "utf8" : void 0
|
|
58
|
-
);
|
|
59
|
-
if (log) {
|
|
60
|
-
consola$1.info("Generated", prettyPath(file));
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
async function isDirectory(path) {
|
|
64
|
-
try {
|
|
65
|
-
return (await fsp.stat(path)).isDirectory();
|
|
66
|
-
} catch {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export { defineNitroModule, defineNitroPreset, isDirectory, prettyPath, resolveNitroPath, writeFile };
|
package/dist/meta/index.d.mts
DELETED
package/dist/meta/index.d.ts
DELETED
package/dist/meta/index.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: readonly [any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, ...any[], any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any];
|
|
2
|
-
export default _default;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import _nitro from "./_nitro/preset.mjs";
|
|
2
|
-
import _static from "./_static/preset.mjs";
|
|
3
|
-
import _alwaysdata from "./alwaysdata/preset.mjs";
|
|
4
|
-
import _awsAmplify from "./aws-amplify/preset.mjs";
|
|
5
|
-
import _awsLambda from "./aws-lambda/preset.mjs";
|
|
6
|
-
import _azure from "./azure/preset.mjs";
|
|
7
|
-
import _bun from "./bun/preset.mjs";
|
|
8
|
-
import _cleavr from "./cleavr/preset.mjs";
|
|
9
|
-
import _cloudflare from "./cloudflare/preset.mjs";
|
|
10
|
-
import _deno from "./deno/preset.mjs";
|
|
11
|
-
import _digitalocean from "./digitalocean/preset.mjs";
|
|
12
|
-
import _edgio from "./edgio/preset.mjs";
|
|
13
|
-
import _firebase from "./firebase/preset.mjs";
|
|
14
|
-
import _flightcontrol from "./flightcontrol/preset.mjs";
|
|
15
|
-
import _heroku from "./heroku/preset.mjs";
|
|
16
|
-
import _iis from "./iis/preset.mjs";
|
|
17
|
-
import _koyeb from "./koyeb/preset.mjs";
|
|
18
|
-
import _netlify from "./netlify/preset.mjs";
|
|
19
|
-
import _node from "./node/preset.mjs";
|
|
20
|
-
import _platformSh from "./platform.sh/preset.mjs";
|
|
21
|
-
import _renderCom from "./render.com/preset.mjs";
|
|
22
|
-
import _stormkit from "./stormkit/preset.mjs";
|
|
23
|
-
import _vercel from "./vercel/preset.mjs";
|
|
24
|
-
import _winterjs from "./winterjs/preset.mjs";
|
|
25
|
-
import _zeabur from "./zeabur/preset.mjs";
|
|
26
|
-
export default [
|
|
27
|
-
..._nitro,
|
|
28
|
-
..._static,
|
|
29
|
-
..._alwaysdata,
|
|
30
|
-
..._awsAmplify,
|
|
31
|
-
..._awsLambda,
|
|
32
|
-
..._azure,
|
|
33
|
-
..._bun,
|
|
34
|
-
..._cleavr,
|
|
35
|
-
..._cloudflare,
|
|
36
|
-
..._deno,
|
|
37
|
-
..._digitalocean,
|
|
38
|
-
..._edgio,
|
|
39
|
-
..._firebase,
|
|
40
|
-
..._flightcontrol,
|
|
41
|
-
..._heroku,
|
|
42
|
-
..._iis,
|
|
43
|
-
..._koyeb,
|
|
44
|
-
..._netlify,
|
|
45
|
-
..._node,
|
|
46
|
-
..._platformSh,
|
|
47
|
-
..._renderCom,
|
|
48
|
-
..._stormkit,
|
|
49
|
-
..._vercel,
|
|
50
|
-
..._winterjs,
|
|
51
|
-
..._zeabur
|
|
52
|
-
];
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { defineNitroPreset } from "nitro/kit";
|
|
2
|
-
const baseWorker = defineNitroPreset(
|
|
3
|
-
{
|
|
4
|
-
entry: null,
|
|
5
|
-
// Abstract
|
|
6
|
-
node: false,
|
|
7
|
-
minify: true,
|
|
8
|
-
noExternals: true,
|
|
9
|
-
rollupConfig: {
|
|
10
|
-
output: {
|
|
11
|
-
format: "iife",
|
|
12
|
-
generatedCode: {
|
|
13
|
-
symbols: true
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
inlineDynamicImports: true
|
|
18
|
-
// iffe does not support code-splitting
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
name: "base-worker",
|
|
22
|
-
url: import.meta.url
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
export default [baseWorker];
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { defineNitroPreset } from "nitro/kit";
|
|
2
|
-
const nitroDev = defineNitroPreset(
|
|
3
|
-
{
|
|
4
|
-
extends: "node",
|
|
5
|
-
entry: "./runtime/nitro-dev",
|
|
6
|
-
output: {
|
|
7
|
-
serverDir: "{{ buildDir }}/dev"
|
|
8
|
-
},
|
|
9
|
-
externals: { trace: false },
|
|
10
|
-
inlineDynamicImports: true,
|
|
11
|
-
// externals plugin limitation
|
|
12
|
-
sourceMap: true
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: "nitro-dev",
|
|
16
|
-
url: import.meta.url
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
export default [nitroDev];
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { defineNitroPreset } from "nitro/kit";
|
|
2
|
-
const nitroPrerender = defineNitroPreset(
|
|
3
|
-
{
|
|
4
|
-
extends: "node",
|
|
5
|
-
serveStatic: true,
|
|
6
|
-
entry: "./runtime/nitro-prerenderer",
|
|
7
|
-
output: {
|
|
8
|
-
serverDir: "{{ buildDir }}/prerender"
|
|
9
|
-
},
|
|
10
|
-
externals: { trace: false }
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: "nitro-prerender",
|
|
14
|
-
url: import.meta.url
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
export default [nitroPrerender];
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { existsSync, promises as fsp } from "node:fs";
|
|
2
|
-
import { defineNitroPreset } from "nitro/kit";
|
|
3
|
-
import { resolve } from "pathe";
|
|
4
|
-
import { joinURL } from "ufo";
|
|
5
|
-
const serviceWorker = defineNitroPreset(
|
|
6
|
-
() => {
|
|
7
|
-
return {
|
|
8
|
-
extends: "base-worker",
|
|
9
|
-
entry: "./runtime/service-worker",
|
|
10
|
-
output: {
|
|
11
|
-
serverDir: "{{ output.dir }}/public/server"
|
|
12
|
-
},
|
|
13
|
-
commands: {
|
|
14
|
-
preview: "npx serve ./public"
|
|
15
|
-
},
|
|
16
|
-
hooks: {
|
|
17
|
-
"prerender:generate"(route, nitro) {
|
|
18
|
-
const script = scriptTemplate(nitro.options.baseURL);
|
|
19
|
-
route.contents = (route.contents || "").replace(
|
|
20
|
-
"</head>",
|
|
21
|
-
`${script}
|
|
22
|
-
</head>`
|
|
23
|
-
);
|
|
24
|
-
},
|
|
25
|
-
async compiled(nitro) {
|
|
26
|
-
await fsp.writeFile(
|
|
27
|
-
resolve(nitro.options.output.publicDir, "sw.js"),
|
|
28
|
-
`self.importScripts('${joinURL(
|
|
29
|
-
nitro.options.baseURL,
|
|
30
|
-
"server/index.mjs"
|
|
31
|
-
)}');`,
|
|
32
|
-
"utf8"
|
|
33
|
-
);
|
|
34
|
-
const html = htmlTemplate(nitro.options.baseURL);
|
|
35
|
-
if (!existsSync(resolve(nitro.options.output.publicDir, "index.html"))) {
|
|
36
|
-
await fsp.writeFile(
|
|
37
|
-
resolve(nitro.options.output.publicDir, "index.html"),
|
|
38
|
-
html,
|
|
39
|
-
"utf8"
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
if (!existsSync(resolve(nitro.options.output.publicDir, "200.html"))) {
|
|
43
|
-
await fsp.writeFile(
|
|
44
|
-
resolve(nitro.options.output.publicDir, "200.html"),
|
|
45
|
-
html,
|
|
46
|
-
"utf8"
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
if (!existsSync(resolve(nitro.options.output.publicDir, "404.html"))) {
|
|
50
|
-
await fsp.writeFile(
|
|
51
|
-
resolve(nitro.options.output.publicDir, "404.html"),
|
|
52
|
-
html,
|
|
53
|
-
"utf8"
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: "service-worker",
|
|
62
|
-
url: import.meta.url
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
export default [serviceWorker];
|
|
66
|
-
function htmlTemplate(baseURL = "/") {
|
|
67
|
-
return (
|
|
68
|
-
/* html */
|
|
69
|
-
`<!DOCTYPE html>
|
|
70
|
-
<html>
|
|
71
|
-
<head>
|
|
72
|
-
<meta charset="utf-8">
|
|
73
|
-
<link rel="prefetch" href="${joinURL(baseURL, "sw.js")}">
|
|
74
|
-
<link rel="prefetch" href="${joinURL(baseURL, "server/index.mjs")}">
|
|
75
|
-
${scriptTemplate(baseURL)}
|
|
76
|
-
</head>
|
|
77
|
-
<body>
|
|
78
|
-
Initializing nitro service worker...
|
|
79
|
-
</body>
|
|
80
|
-
</html>`
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
function scriptTemplate(baseURL = "/") {
|
|
84
|
-
return (
|
|
85
|
-
/* js */
|
|
86
|
-
`
|
|
87
|
-
<script>
|
|
88
|
-
async function register () {
|
|
89
|
-
const registration = await navigator.serviceWorker.register('${joinURL(
|
|
90
|
-
baseURL,
|
|
91
|
-
"sw.js"
|
|
92
|
-
)}')
|
|
93
|
-
await navigator.serviceWorker.ready
|
|
94
|
-
registration.active.addEventListener('statechange', (event) => {
|
|
95
|
-
if (event.target.state === 'activated') {
|
|
96
|
-
window.location.reload()
|
|
97
|
-
}
|
|
98
|
-
})
|
|
99
|
-
}
|
|
100
|
-
if ('serviceWorker' in navigator) {
|
|
101
|
-
if (location.hostname !== 'localhost' && location.protocol === 'http:') {
|
|
102
|
-
location.replace(location.href.replace('http://', 'https://'))
|
|
103
|
-
} else {
|
|
104
|
-
register()
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
<\/script>
|
|
108
|
-
`
|
|
109
|
-
);
|
|
110
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type CompatibilityDateSpec } from "compatx";
|
|
2
|
-
import type { NitroPreset, NitroPresetMeta } from "nitro/types";
|
|
3
|
-
export declare function resolvePreset(name: string, opts: {
|
|
4
|
-
static?: boolean;
|
|
5
|
-
compatibilityDate?: CompatibilityDateSpec;
|
|
6
|
-
}): Promise<(NitroPreset & {
|
|
7
|
-
_meta?: NitroPresetMeta;
|
|
8
|
-
}) | undefined>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveCompatibilityDatesFromEnv
|
|
3
|
-
} from "compatx";
|
|
4
|
-
import { kebabCase } from "scule";
|
|
5
|
-
import { provider } from "std-env";
|
|
6
|
-
import allPresets from "./_all.gen.mjs";
|
|
7
|
-
const _stdProviderMap = {
|
|
8
|
-
aws_amplify: "aws",
|
|
9
|
-
azure_static: "azure",
|
|
10
|
-
cloudflare_pages: "cloudflare"
|
|
11
|
-
};
|
|
12
|
-
export async function resolvePreset(name, opts) {
|
|
13
|
-
const _name = kebabCase(name) || provider;
|
|
14
|
-
const _compatDates = resolveCompatibilityDatesFromEnv(opts.compatibilityDate);
|
|
15
|
-
const matches = allPresets.filter((preset2) => {
|
|
16
|
-
const names = [
|
|
17
|
-
preset2._meta.name,
|
|
18
|
-
preset2._meta.stdName,
|
|
19
|
-
...preset2._meta.aliases || []
|
|
20
|
-
].filter(Boolean);
|
|
21
|
-
if (!names.includes(_name)) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
const _date = _compatDates[_stdProviderMap[preset2._meta.stdName]] || _compatDates[preset2._meta.stdName] || _compatDates[preset2._meta.name] || _compatDates.default;
|
|
25
|
-
if (_date && preset2._meta.compatibilityDate && new Date(preset2._meta.compatibilityDate) > new Date(_date)) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
return true;
|
|
29
|
-
}).sort((a, b) => {
|
|
30
|
-
const aDate = new Date(a._meta.compatibilityDate || 0);
|
|
31
|
-
const bDate = new Date(b._meta.compatibilityDate || 0);
|
|
32
|
-
return bDate > aDate ? 1 : -1;
|
|
33
|
-
});
|
|
34
|
-
const preset = matches.find(
|
|
35
|
-
(p) => (p._meta.static || false) === (opts?.static || false)
|
|
36
|
-
) || matches[0];
|
|
37
|
-
if (typeof preset === "function") {
|
|
38
|
-
return preset();
|
|
39
|
-
}
|
|
40
|
-
if (!name && !preset) {
|
|
41
|
-
return opts?.static ? resolvePreset("static", opts) : resolvePreset("node-server", opts);
|
|
42
|
-
}
|
|
43
|
-
return preset;
|
|
44
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import fsp from "node:fs/promises";
|
|
2
|
-
import { defineNitroPreset } from "nitro/kit";
|
|
3
|
-
import { join } from "pathe";
|
|
4
|
-
const _static = defineNitroPreset(
|
|
5
|
-
{
|
|
6
|
-
static: true,
|
|
7
|
-
output: {
|
|
8
|
-
dir: "{{ rootDir }}/.output",
|
|
9
|
-
publicDir: "{{ output.dir }}/public"
|
|
10
|
-
},
|
|
11
|
-
prerender: {
|
|
12
|
-
crawlLinks: true
|
|
13
|
-
},
|
|
14
|
-
commands: {
|
|
15
|
-
preview: "npx serve ./public"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
name: "static",
|
|
20
|
-
static: true,
|
|
21
|
-
url: import.meta.url
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
const githubPages = defineNitroPreset(
|
|
25
|
-
{
|
|
26
|
-
extends: "static",
|
|
27
|
-
commands: {
|
|
28
|
-
deploy: "npx gh-pages --dotfiles -d ./public"
|
|
29
|
-
},
|
|
30
|
-
prerender: {
|
|
31
|
-
routes: [
|
|
32
|
-
"/",
|
|
33
|
-
// https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site
|
|
34
|
-
"/404.html"
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
hooks: {
|
|
38
|
-
async compiled(nitro) {
|
|
39
|
-
await fsp.writeFile(
|
|
40
|
-
join(nitro.options.output.publicDir, ".nojekyll"),
|
|
41
|
-
""
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: "github-pages",
|
|
48
|
-
static: true,
|
|
49
|
-
url: import.meta.url
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
const gitlabPages = defineNitroPreset(
|
|
53
|
-
{
|
|
54
|
-
extends: "static",
|
|
55
|
-
prerender: {
|
|
56
|
-
routes: [
|
|
57
|
-
"/",
|
|
58
|
-
// https://docs.gitlab.com/ee/user/project/pages/introduction.html#custom-error-codes-pages
|
|
59
|
-
"/404.html"
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
name: "gitlab-pages",
|
|
65
|
-
static: true,
|
|
66
|
-
url: import.meta.url
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
export default [_static, githubPages, gitlabPages];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { PresetOptions as AwsAmplifyOptions } from "./aws-amplify/preset";
|
|
2
|
-
import type { PresetOptions as AzureOptions } from "./azure/preset";
|
|
3
|
-
import type { PresetOptions as CloudflareOptions } from "./cloudflare/preset";
|
|
4
|
-
import type { PresetOptions as FirebaseOptions } from "./firebase/preset";
|
|
5
|
-
import type { PresetOptions as NetlifyOptions } from "./netlify/preset";
|
|
6
|
-
import type { PresetOptions as VercelOptions } from "./vercel/preset";
|
|
7
|
-
export interface PresetOptions {
|
|
8
|
-
awsAmplify: AwsAmplifyOptions;
|
|
9
|
-
azure: AzureOptions;
|
|
10
|
-
cloudflare: CloudflareOptions;
|
|
11
|
-
firebase: FirebaseOptions;
|
|
12
|
-
netlify: NetlifyOptions;
|
|
13
|
-
vercel: VercelOptions;
|
|
14
|
-
}
|
|
15
|
-
export type PresetName = "alwaysdata" | "aws-amplify" | "aws-lambda" | "aws-lambda-streaming" | "azure" | "azure-functions" | "azure-swa" | "base-worker" | "bun" | "cleavr" | "cli" | "cloudflare" | "cloudflare-module" | "cloudflare-pages" | "cloudflare-pages-static" | "cloudflare-worker" | "deno" | "deno-deploy" | "deno-server" | "digital-ocean" | "edgio" | "firebase" | "flight-control" | "github-pages" | "gitlab-pages" | "heroku" | "iis" | "iis-handler" | "iis-node" | "koyeb" | "layer0" | "netlify" | "netlify-builder" | "netlify-edge" | "netlify-legacy" | "netlify-static" | "nitro-dev" | "nitro-prerender" | "node" | "node-cluster" | "node-listener" | "node-server" | "platform-sh" | "render-com" | "service-worker" | "static" | "stormkit" | "vercel" | "vercel-edge" | "vercel-static" | "winterjs" | "zeabur" | "zeabur-static";
|
|
16
|
-
export type PresetNameInput = "alwaysdata" | "aws-amplify" | "awsAmplify" | "aws_amplify" | "aws-lambda" | "awsLambda" | "aws_lambda" | "aws-lambda-streaming" | "awsLambdaStreaming" | "aws_lambda_streaming" | "azure" | "azure-functions" | "azureFunctions" | "azure_functions" | "azure-swa" | "azureSwa" | "azure_swa" | "base-worker" | "baseWorker" | "base_worker" | "bun" | "cleavr" | "cli" | "cloudflare" | "cloudflare-module" | "cloudflareModule" | "cloudflare_module" | "cloudflare-pages" | "cloudflarePages" | "cloudflare_pages" | "cloudflare-pages-static" | "cloudflarePagesStatic" | "cloudflare_pages_static" | "cloudflare-worker" | "cloudflareWorker" | "cloudflare_worker" | "deno" | "deno-deploy" | "denoDeploy" | "deno_deploy" | "deno-server" | "denoServer" | "deno_server" | "digital-ocean" | "digitalOcean" | "digital_ocean" | "edgio" | "firebase" | "flight-control" | "flightControl" | "flight_control" | "github-pages" | "githubPages" | "github_pages" | "gitlab-pages" | "gitlabPages" | "gitlab_pages" | "heroku" | "iis" | "iis-handler" | "iisHandler" | "iis_handler" | "iis-node" | "iisNode" | "iis_node" | "koyeb" | "layer0" | "netlify" | "netlify-builder" | "netlifyBuilder" | "netlify_builder" | "netlify-edge" | "netlifyEdge" | "netlify_edge" | "netlify-legacy" | "netlifyLegacy" | "netlify_legacy" | "netlify-static" | "netlifyStatic" | "netlify_static" | "nitro-dev" | "nitroDev" | "nitro_dev" | "nitro-prerender" | "nitroPrerender" | "nitro_prerender" | "node" | "node-cluster" | "nodeCluster" | "node_cluster" | "node-listener" | "nodeListener" | "node_listener" | "node-server" | "nodeServer" | "node_server" | "platform-sh" | "platformSh" | "platform_sh" | "render-com" | "renderCom" | "render_com" | "service-worker" | "serviceWorker" | "service_worker" | "static" | "stormkit" | "vercel" | "vercel-edge" | "vercelEdge" | "vercel_edge" | "vercel-static" | "vercelStatic" | "vercel_static" | "winterjs" | "zeabur" | "zeabur-static" | "zeaburStatic" | "zeabur_static" | (string & {});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { defineNitroPreset } from "nitro/kit";
|
|
2
|
-
const alwaysdata = defineNitroPreset(
|
|
3
|
-
{
|
|
4
|
-
extends: "node-server",
|
|
5
|
-
commands: {
|
|
6
|
-
deploy: "rsync -rRt --info=progress2 ./ [account]@ssh-[account].alwaysdata.net:www/my-app"
|
|
7
|
-
}
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: "alwaysdata",
|
|
11
|
-
url: import.meta.url
|
|
12
|
-
}
|
|
13
|
-
);
|
|
14
|
-
export default [alwaysdata];
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { defineNitroPreset } from "nitro/kit";
|
|
2
|
-
import { writeAmplifyFiles } from "./utils.mjs";
|
|
3
|
-
const awsAmplify = defineNitroPreset(
|
|
4
|
-
{
|
|
5
|
-
extends: "node-server",
|
|
6
|
-
entry: "./runtime/aws-amplify",
|
|
7
|
-
output: {
|
|
8
|
-
dir: "{{ rootDir }}/.amplify-hosting",
|
|
9
|
-
serverDir: "{{ output.dir }}/compute/default",
|
|
10
|
-
publicDir: "{{ output.dir }}/static{{ baseURL }}"
|
|
11
|
-
},
|
|
12
|
-
commands: {
|
|
13
|
-
preview: "node ./compute/default/server.js"
|
|
14
|
-
},
|
|
15
|
-
hooks: {
|
|
16
|
-
async compiled(nitro) {
|
|
17
|
-
await writeAmplifyFiles(nitro);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
name: "aws-amplify",
|
|
23
|
-
stdName: "aws_amplify",
|
|
24
|
-
url: import.meta.url
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
export default [awsAmplify];
|