@depup/nitro 3.0.260311-beta-depup.0
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/LICENSE +27 -0
- package/README.md +32 -0
- package/changes.json +14 -0
- package/dist/THIRD-PARTY-LICENSES.md +1646 -0
- package/dist/_build/common.mjs +29361 -0
- package/dist/_build/rolldown.mjs +173 -0
- package/dist/_build/rollup.mjs +194 -0
- package/dist/_build/vite.build.mjs +18 -0
- package/dist/_chunks/nitro.mjs +1159 -0
- package/dist/_chunks/nitro2.mjs +102 -0
- package/dist/_chunks/nitro3.mjs +129 -0
- package/dist/_chunks/utils.mjs +272 -0
- package/dist/_common.mjs +35 -0
- package/dist/_dev.d.mts +12 -0
- package/dist/_dev.mjs +519 -0
- package/dist/_libs/_.mjs +3 -0
- package/dist/_libs/_2.mjs +2 -0
- package/dist/_libs/_3.mjs +3 -0
- package/dist/_libs/_4.mjs +2 -0
- package/dist/_libs/_5.mjs +3 -0
- package/dist/_libs/_6.mjs +4 -0
- package/dist/_libs/_7.mjs +5 -0
- package/dist/_libs/c12+rc9.mjs +812 -0
- package/dist/_libs/c12+readdirp+chokidar.d.mts +230 -0
- package/dist/_libs/citty.mjs +361 -0
- package/dist/_libs/commondir+is-reference.mjs +1311 -0
- package/dist/_libs/compatx.d.mts +47 -0
- package/dist/_libs/compatx.mjs +45 -0
- package/dist/_libs/esbuild.d.mts +20 -0
- package/dist/_libs/escape-string-regexp.mjs +7 -0
- package/dist/_libs/estree+pluginutils.d.mts +241 -0
- package/dist/_libs/estree-walker.mjs +184 -0
- package/dist/_libs/exsolve.d.mts +1 -0
- package/dist/_libs/hasown+resolve+deepmerge.mjs +1949 -0
- package/dist/_libs/httpxy.d.mts +82 -0
- package/dist/_libs/httpxy.mjs +671 -0
- package/dist/_libs/js-tokens.d.mts +1 -0
- package/dist/_libs/klona.mjs +37 -0
- package/dist/_libs/magic-string.d.mts +220 -0
- package/dist/_libs/mlly.d.mts +57 -0
- package/dist/_libs/nypm+tinyexec.mjs +845 -0
- package/dist/_libs/perfect-debounce.mjs +88 -0
- package/dist/_libs/pkg-types.d.mts +23 -0
- package/dist/_libs/plugin-alias.mjs +64 -0
- package/dist/_libs/plugin-inject.mjs +131 -0
- package/dist/_libs/plugin-json.mjs +34 -0
- package/dist/_libs/pluginutils.mjs +646 -0
- package/dist/_libs/readdirp+chokidar.mjs +1606 -0
- package/dist/_libs/remapping.mjs +115 -0
- package/dist/_libs/resolve-uri+gen-mapping.mjs +442 -0
- package/dist/_libs/rou3.d.mts +44 -0
- package/dist/_libs/rou3.mjs +496 -0
- package/dist/_libs/std-env.d.mts +12 -0
- package/dist/_libs/strip-literal.d.mts +1 -0
- package/dist/_libs/tsconfck.mjs +813 -0
- package/dist/_libs/ultrahtml.mjs +127 -0
- package/dist/_libs/unimport+unplugin.mjs +1684 -0
- package/dist/_libs/unplugin+unimport.d.mts +423 -0
- package/dist/_libs/unwasm.d.mts +29 -0
- package/dist/_presets.mjs +1759 -0
- package/dist/builder.d.mts +64 -0
- package/dist/builder.mjs +15 -0
- package/dist/cli/_chunks/build.mjs +47 -0
- package/dist/cli/_chunks/common.mjs +14 -0
- package/dist/cli/_chunks/deploy.mjs +40 -0
- package/dist/cli/_chunks/dev.mjs +62 -0
- package/dist/cli/_chunks/docs.mjs +30 -0
- package/dist/cli/_chunks/list.mjs +25 -0
- package/dist/cli/_chunks/prepare.mjs +17 -0
- package/dist/cli/_chunks/preview.mjs +51 -0
- package/dist/cli/_chunks/run.mjs +53 -0
- package/dist/cli/_chunks/task.mjs +14 -0
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.mjs +22 -0
- package/dist/node_modules/@poppinss/colors/build/index.js +139 -0
- package/dist/node_modules/@poppinss/colors/package.json +118 -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 +725 -0
- package/dist/node_modules/@poppinss/dumper/package.json +122 -0
- package/dist/node_modules/@poppinss/exception/build/index.js +44 -0
- package/dist/node_modules/@poppinss/exception/package.json +109 -0
- package/dist/node_modules/@sindresorhus/is/distribution/index.js +1354 -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 +94 -0
- package/dist/node_modules/cookie-es/dist/index.mjs +262 -0
- package/dist/node_modules/cookie-es/package.json +37 -0
- package/dist/node_modules/croner/dist/croner.js +1 -0
- package/dist/node_modules/croner/package.json +73 -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/kleur/index.mjs +110 -0
- package/dist/node_modules/kleur/package.json +51 -0
- package/dist/node_modules/rendu/dist/index.mjs +380 -0
- package/dist/node_modules/rendu/package.json +47 -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/supports-color/index.js +202 -0
- package/dist/node_modules/supports-color/package.json +64 -0
- package/dist/node_modules/ufo/dist/index.mjs +645 -0
- package/dist/node_modules/ufo/package.json +48 -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/helpers-B9BQYaS6.js +23 -0
- package/dist/node_modules/youch/build/index.js +212 -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 +145 -0
- package/dist/node_modules/youch/build/public/error_metadata/style.css +3 -0
- package/dist/node_modules/youch/build/public/error_stack/script.js +72 -0
- package/dist/node_modules/youch/build/public/error_stack/style.css +219 -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 +14 -0
- package/dist/node_modules/youch/build/public/header/style.css +56 -0
- package/dist/node_modules/youch/build/public/layout/script.js +12 -0
- package/dist/node_modules/youch/build/public/layout/style.css +435 -0
- package/dist/node_modules/youch/build/public_dir-C5bujZKB.js +25 -0
- package/dist/node_modules/youch/build/src/templates/error_cause/main.js +44 -0
- package/dist/node_modules/youch/build/src/templates/error_info/main.js +72 -0
- package/dist/node_modules/youch/build/src/templates/error_metadata/main.js +65 -0
- package/dist/node_modules/youch/build/src/templates/error_stack/main.js +152 -0
- package/dist/node_modules/youch/build/src/templates/error_stack_source/main.js +46 -0
- package/dist/node_modules/youch/build/src/templates/header/main.js +24 -0
- package/dist/node_modules/youch/build/src/templates/layout/main.js +27 -0
- package/dist/node_modules/youch/package.json +135 -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 +20 -0
- package/dist/presets/_nitro/runtime/nitro-prerenderer.mjs +15 -0
- package/dist/presets/_nitro/runtime/service-worker.mjs +23 -0
- package/dist/presets/aws-amplify/runtime/aws-amplify.mjs +14 -0
- package/dist/presets/aws-lambda/runtime/_utils.mjs +116 -0
- package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.mjs +31 -0
- package/dist/presets/aws-lambda/runtime/aws-lambda.mjs +13 -0
- package/dist/presets/azure/runtime/_utils.mjs +50 -0
- package/dist/presets/azure/runtime/azure-swa.mjs +30 -0
- package/dist/presets/bun/runtime/bun.mjs +40 -0
- package/dist/presets/cloudflare/runtime/_module-handler.mjs +87 -0
- package/dist/presets/cloudflare/runtime/cloudflare-durable.mjs +72 -0
- package/dist/presets/cloudflare/runtime/cloudflare-module.mjs +17 -0
- package/dist/presets/cloudflare/runtime/cloudflare-pages.mjs +39 -0
- package/dist/presets/cloudflare/runtime/plugin.dev.mjs +96 -0
- package/dist/presets/cloudflare/runtime/shims/workers.dev.mjs +27 -0
- package/dist/presets/deno/runtime/deno-deploy.mjs +19 -0
- package/dist/presets/deno/runtime/deno-server.mjs +39 -0
- package/dist/presets/netlify/runtime/netlify-edge.mjs +20 -0
- package/dist/presets/netlify/runtime/netlify.mjs +20 -0
- package/dist/presets/node/runtime/node-cluster.mjs +54 -0
- package/dist/presets/node/runtime/node-middleware.mjs +14 -0
- package/dist/presets/node/runtime/node-server.mjs +47 -0
- package/dist/presets/standard/runtime/server.mjs +4 -0
- package/dist/presets/stormkit/runtime/stormkit.mjs +27 -0
- package/dist/presets/vercel/runtime/cron-handler.mjs +25 -0
- package/dist/presets/vercel/runtime/isr.mjs +19 -0
- package/dist/presets/vercel/runtime/vercel.node.mjs +24 -0
- package/dist/presets/vercel/runtime/vercel.web.mjs +23 -0
- package/dist/presets/winterjs/runtime/winterjs.mjs +91 -0
- package/dist/presets/zeabur/runtime/zeabur.mjs +4 -0
- package/dist/presets/zephyr/runtime/server.mjs +3 -0
- package/dist/runtime/app.d.mts +1 -0
- package/dist/runtime/app.mjs +1 -0
- package/dist/runtime/cache.d.mts +1 -0
- package/dist/runtime/cache.mjs +1 -0
- package/dist/runtime/config.d.mts +3 -0
- package/dist/runtime/config.mjs +4 -0
- package/dist/runtime/context.d.mts +1 -0
- package/dist/runtime/context.mjs +1 -0
- package/dist/runtime/database.d.mts +1 -0
- package/dist/runtime/database.mjs +1 -0
- package/dist/runtime/internal/app.d.mts +16 -0
- package/dist/runtime/internal/app.mjs +208 -0
- package/dist/runtime/internal/cache.d.mts +7 -0
- package/dist/runtime/internal/cache.mjs +41 -0
- package/dist/runtime/internal/context.d.mts +14 -0
- package/dist/runtime/internal/context.mjs +24 -0
- package/dist/runtime/internal/database.d.mts +2 -0
- package/dist/runtime/internal/database.mjs +12 -0
- package/dist/runtime/internal/empty.mjs +0 -0
- package/dist/runtime/internal/error/dev.d.mts +10 -0
- package/dist/runtime/internal/error/dev.mjs +121 -0
- package/dist/runtime/internal/error/hooks.d.mts +1 -0
- package/dist/runtime/internal/error/hooks.mjs +9 -0
- package/dist/runtime/internal/error/prod.d.mts +6 -0
- package/dist/runtime/internal/error/prod.mjs +40 -0
- package/dist/runtime/internal/error/utils.d.mts +8 -0
- package/dist/runtime/internal/error/utils.mjs +3 -0
- package/dist/runtime/internal/meta.d.mts +2 -0
- package/dist/runtime/internal/meta.mjs +3 -0
- package/dist/runtime/internal/plugin.d.mts +3 -0
- package/dist/runtime/internal/plugin.mjs +4 -0
- package/dist/runtime/internal/route-rules.d.mts +9 -0
- package/dist/runtime/internal/route-rules.mjs +72 -0
- package/dist/runtime/internal/routes/dev-tasks.d.mts +3 -0
- package/dist/runtime/internal/routes/dev-tasks.mjs +25 -0
- package/dist/runtime/internal/routes/openapi.d.mts +3 -0
- package/dist/runtime/internal/routes/openapi.mjs +94 -0
- 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 +19 -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 +193 -0
- package/dist/runtime/internal/routes/swagger.d.mts +3 -0
- package/dist/runtime/internal/routes/swagger.mjs +42 -0
- package/dist/runtime/internal/runtime-config.d.mts +9 -0
- package/dist/runtime/internal/runtime-config.mjs +54 -0
- package/dist/runtime/internal/static.d.mts +3 -0
- package/dist/runtime/internal/static.mjs +67 -0
- package/dist/runtime/internal/storage.d.mts +2 -0
- package/dist/runtime/internal/storage.mjs +6 -0
- package/dist/runtime/internal/task.d.mts +19 -0
- package/dist/runtime/internal/task.mjs +69 -0
- package/dist/runtime/internal/vite/dev-entry.mjs +18 -0
- package/dist/runtime/internal/vite/dev-worker.mjs +264 -0
- package/dist/runtime/internal/vite/ssr-renderer.mjs +6 -0
- package/dist/runtime/meta.d.mts +5 -0
- package/dist/runtime/meta.mjs +27 -0
- package/dist/runtime/nitro.d.mts +11 -0
- package/dist/runtime/nitro.mjs +34 -0
- package/dist/runtime/runtime-config.d.mts +1 -0
- package/dist/runtime/runtime-config.mjs +1 -0
- package/dist/runtime/storage.d.mts +1 -0
- package/dist/runtime/storage.mjs +1 -0
- package/dist/runtime/task.d.mts +1 -0
- package/dist/runtime/task.mjs +1 -0
- package/dist/runtime/virtual/_runtime_warn.d.mts +1 -0
- package/dist/runtime/virtual/_runtime_warn.mjs +5 -0
- package/dist/runtime/virtual/database.d.mts +8 -0
- package/dist/runtime/virtual/database.mjs +2 -0
- package/dist/runtime/virtual/error-handler.d.mts +6 -0
- package/dist/runtime/virtual/error-handler.mjs +9 -0
- package/dist/runtime/virtual/feature-flags.d.mts +7 -0
- package/dist/runtime/virtual/feature-flags.mjs +7 -0
- package/dist/runtime/virtual/plugins.d.mts +3 -0
- package/dist/runtime/virtual/plugins.mjs +2 -0
- package/dist/runtime/virtual/polyfills.d.mts +3 -0
- package/dist/runtime/virtual/polyfills.mjs +2 -0
- package/dist/runtime/virtual/public-assets.d.mts +9 -0
- package/dist/runtime/virtual/public-assets.mjs +8 -0
- package/dist/runtime/virtual/renderer-template.d.mts +4 -0
- package/dist/runtime/virtual/renderer-template.mjs +7 -0
- package/dist/runtime/virtual/routing-meta.d.mts +7 -0
- package/dist/runtime/virtual/routing-meta.mjs +2 -0
- package/dist/runtime/virtual/routing.d.mts +8 -0
- package/dist/runtime/virtual/routing.mjs +11 -0
- package/dist/runtime/virtual/runtime-config.d.mts +3 -0
- package/dist/runtime/virtual/runtime-config.mjs +5 -0
- package/dist/runtime/virtual/server-assets.d.mts +7 -0
- package/dist/runtime/virtual/server-assets.mjs +12 -0
- package/dist/runtime/virtual/storage.d.mts +3 -0
- package/dist/runtime/virtual/storage.mjs +5 -0
- package/dist/runtime/virtual/tasks.d.mts +10 -0
- package/dist/runtime/virtual/tasks.mjs +3 -0
- package/dist/runtime/vite.d.mts +8 -0
- package/dist/runtime/vite.mjs +9 -0
- package/dist/types/index.d.mts +3010 -0
- package/dist/types/index.mjs +1 -0
- package/dist/vite.d.mts +52 -0
- package/dist/vite.mjs +740 -0
- package/lib/h3.d.mts +1 -0
- package/lib/h3.mjs +1 -0
- package/lib/tsconfig.json +27 -0
- package/lib/vite.types.d.mts +26 -0
- package/lib/vite.types.mjs +2 -0
- package/package.json +256 -0
- package/skills/nitro/SKILL.md +10 -0
- package/skills/nitro/docs/TOC.md +83 -0
- package/skills/nitro/docs/_navigation.json +679 -0
- package/skills/nitro/docs/config/index.md +1147 -0
- package/skills/nitro/docs/deploy/index.md +64 -0
- package/skills/nitro/docs/deploy/providers/alwaysdata.md +50 -0
- package/skills/nitro/docs/deploy/providers/aws-amplify.md +81 -0
- package/skills/nitro/docs/deploy/providers/aws.md +47 -0
- package/skills/nitro/docs/deploy/providers/azure.md +72 -0
- package/skills/nitro/docs/deploy/providers/cleavr.md +33 -0
- package/skills/nitro/docs/deploy/providers/cloudflare.md +375 -0
- package/skills/nitro/docs/deploy/providers/deno-deploy.md +66 -0
- package/skills/nitro/docs/deploy/providers/digitalocean.md +46 -0
- package/skills/nitro/docs/deploy/providers/firebase.md +32 -0
- package/skills/nitro/docs/deploy/providers/flightcontrol.md +67 -0
- package/skills/nitro/docs/deploy/providers/genezio.md +67 -0
- package/skills/nitro/docs/deploy/providers/github-pages.md +68 -0
- package/skills/nitro/docs/deploy/providers/gitlab-pages.md +37 -0
- package/skills/nitro/docs/deploy/providers/heroku.md +84 -0
- package/skills/nitro/docs/deploy/providers/iis.md +38 -0
- package/skills/nitro/docs/deploy/providers/koyeb.md +109 -0
- package/skills/nitro/docs/deploy/providers/netlify.md +47 -0
- package/skills/nitro/docs/deploy/providers/platform-sh.md +37 -0
- package/skills/nitro/docs/deploy/providers/render.md +37 -0
- package/skills/nitro/docs/deploy/providers/stormkit.md +24 -0
- package/skills/nitro/docs/deploy/providers/vercel.md +179 -0
- package/skills/nitro/docs/deploy/providers/zeabur.md +19 -0
- package/skills/nitro/docs/deploy/providers/zephyr.md +99 -0
- package/skills/nitro/docs/deploy/providers/zerops.md +102 -0
- package/skills/nitro/docs/deploy/runtimes/bun.md +15 -0
- package/skills/nitro/docs/deploy/runtimes/deno.md +19 -0
- package/skills/nitro/docs/deploy/runtimes/node.md +63 -0
- package/skills/nitro/docs/docs/assets.md +166 -0
- package/skills/nitro/docs/docs/cache.md +408 -0
- package/skills/nitro/docs/docs/configuration.md +256 -0
- package/skills/nitro/docs/docs/database.md +185 -0
- package/skills/nitro/docs/docs/index.md +56 -0
- package/skills/nitro/docs/docs/lifecycle.md +204 -0
- package/skills/nitro/docs/docs/migration.md +215 -0
- package/skills/nitro/docs/docs/nightly.md +31 -0
- package/skills/nitro/docs/docs/plugins.md +164 -0
- package/skills/nitro/docs/docs/quick-start.md +110 -0
- package/skills/nitro/docs/docs/renderer.md +322 -0
- package/skills/nitro/docs/docs/routing.md +711 -0
- package/skills/nitro/docs/docs/server-entry.md +239 -0
- package/skills/nitro/docs/docs/storage.md +261 -0
- package/skills/nitro/docs/docs/tasks.md +277 -0
- package/skills/nitro/docs/examples/api-routes.md +145 -0
- package/skills/nitro/docs/examples/auto-imports.md +93 -0
- package/skills/nitro/docs/examples/cached-handler.md +81 -0
- package/skills/nitro/docs/examples/custom-error-handler.md +98 -0
- package/skills/nitro/docs/examples/database.md +157 -0
- package/skills/nitro/docs/examples/elysia.md +70 -0
- package/skills/nitro/docs/examples/express.md +78 -0
- package/skills/nitro/docs/examples/fastify.md +79 -0
- package/skills/nitro/docs/examples/hello-world.md +68 -0
- package/skills/nitro/docs/examples/hono.md +74 -0
- package/skills/nitro/docs/examples/import-alias.md +100 -0
- package/skills/nitro/docs/examples/index.md +3 -0
- package/skills/nitro/docs/examples/middleware.md +91 -0
- package/skills/nitro/docs/examples/mono-jsx.md +68 -0
- package/skills/nitro/docs/examples/nano-jsx.md +70 -0
- package/skills/nitro/docs/examples/plugins.md +91 -0
- package/skills/nitro/docs/examples/renderer.md +113 -0
- package/skills/nitro/docs/examples/runtime-config.md +97 -0
- package/skills/nitro/docs/examples/server-fetch.md +87 -0
- package/skills/nitro/docs/examples/shiki.md +198 -0
- package/skills/nitro/docs/examples/virtual-routes.md +74 -0
- package/skills/nitro/docs/examples/vite-nitro-plugin.md +79 -0
- package/skills/nitro/docs/examples/vite-rsc.md +1041 -0
- package/skills/nitro/docs/examples/vite-ssr-html.md +217 -0
- package/skills/nitro/docs/examples/vite-ssr-preact.md +247 -0
- package/skills/nitro/docs/examples/vite-ssr-react.md +226 -0
- package/skills/nitro/docs/examples/vite-ssr-solid.md +256 -0
- package/skills/nitro/docs/examples/vite-ssr-tsr-react.md +442 -0
- package/skills/nitro/docs/examples/vite-ssr-tss-react.md +444 -0
- package/skills/nitro/docs/examples/vite-ssr-vue-router.md +616 -0
- package/skills/nitro/docs/examples/vite-trpc.md +335 -0
- package/skills/nitro/docs/examples/websocket.md +282 -0
- package/skills/nitro/docs/index.md +121 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/perfect-debounce@2.1.0/node_modules/perfect-debounce/dist/index.mjs
|
|
2
|
+
const DEBOUNCE_DEFAULTS = { trailing: true };
|
|
3
|
+
/**
|
|
4
|
+
Debounce functions
|
|
5
|
+
@param fn - Promise-returning/async function to debounce.
|
|
6
|
+
@param wait - Milliseconds to wait before calling `fn`. Default value is 25ms
|
|
7
|
+
@returns A function that delays calling `fn` until after `wait` milliseconds have elapsed since the last time it was called.
|
|
8
|
+
@example
|
|
9
|
+
```
|
|
10
|
+
import { debounce } from 'perfect-debounce';
|
|
11
|
+
const expensiveCall = async input => input;
|
|
12
|
+
const debouncedFn = debounce(expensiveCall, 200);
|
|
13
|
+
for (const number of [1, 2, 3]) {
|
|
14
|
+
console.log(await debouncedFn(number));
|
|
15
|
+
}
|
|
16
|
+
//=> 1
|
|
17
|
+
//=> 2
|
|
18
|
+
//=> 3
|
|
19
|
+
```
|
|
20
|
+
*/
|
|
21
|
+
function debounce(fn, wait = 25, options = {}) {
|
|
22
|
+
options = {
|
|
23
|
+
...DEBOUNCE_DEFAULTS,
|
|
24
|
+
...options
|
|
25
|
+
};
|
|
26
|
+
if (!Number.isFinite(wait)) throw new TypeError("Expected `wait` to be a finite number");
|
|
27
|
+
let leadingValue;
|
|
28
|
+
let timeout;
|
|
29
|
+
let resolveList = [];
|
|
30
|
+
let currentPromise;
|
|
31
|
+
let trailingArgs;
|
|
32
|
+
const applyFn = (_this, args) => {
|
|
33
|
+
currentPromise = _applyPromised(fn, _this, args);
|
|
34
|
+
currentPromise.finally(() => {
|
|
35
|
+
currentPromise = null;
|
|
36
|
+
if (options.trailing && trailingArgs && !timeout) {
|
|
37
|
+
const promise = applyFn(_this, trailingArgs);
|
|
38
|
+
trailingArgs = null;
|
|
39
|
+
return promise;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return currentPromise;
|
|
43
|
+
};
|
|
44
|
+
const debounced = function(...args) {
|
|
45
|
+
if (options.trailing) trailingArgs = args;
|
|
46
|
+
if (currentPromise) return currentPromise;
|
|
47
|
+
return new Promise((resolve) => {
|
|
48
|
+
const shouldCallNow = !timeout && options.leading;
|
|
49
|
+
clearTimeout(timeout);
|
|
50
|
+
timeout = setTimeout(() => {
|
|
51
|
+
timeout = null;
|
|
52
|
+
const promise = options.leading ? leadingValue : applyFn(this, args);
|
|
53
|
+
trailingArgs = null;
|
|
54
|
+
for (const _resolve of resolveList) _resolve(promise);
|
|
55
|
+
resolveList = [];
|
|
56
|
+
}, wait);
|
|
57
|
+
if (shouldCallNow) {
|
|
58
|
+
leadingValue = applyFn(this, args);
|
|
59
|
+
resolve(leadingValue);
|
|
60
|
+
} else resolveList.push(resolve);
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
const _clearTimeout = (timer) => {
|
|
64
|
+
if (timer) {
|
|
65
|
+
clearTimeout(timer);
|
|
66
|
+
timeout = null;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
debounced.isPending = () => !!timeout;
|
|
70
|
+
debounced.cancel = () => {
|
|
71
|
+
_clearTimeout(timeout);
|
|
72
|
+
resolveList = [];
|
|
73
|
+
trailingArgs = null;
|
|
74
|
+
};
|
|
75
|
+
debounced.flush = () => {
|
|
76
|
+
_clearTimeout(timeout);
|
|
77
|
+
if (!trailingArgs || currentPromise) return;
|
|
78
|
+
const args = trailingArgs;
|
|
79
|
+
trailingArgs = null;
|
|
80
|
+
return applyFn(this, args);
|
|
81
|
+
};
|
|
82
|
+
return debounced;
|
|
83
|
+
}
|
|
84
|
+
async function _applyPromised(fn, _this, args) {
|
|
85
|
+
return await fn.apply(_this, args);
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
export { debounce as t };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CompilerOptions, TypeAcquisition } from "typescript";
|
|
2
|
+
|
|
3
|
+
//#region node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.d.mts
|
|
4
|
+
type StripEnums<T extends Record<string, any>> = { [K in keyof T]: T[K] extends boolean ? T[K] : T[K] extends string ? T[K] : T[K] extends object ? T[K] : T[K] extends Array<any> ? T[K] : T[K] extends undefined ? undefined : any };
|
|
5
|
+
interface TSConfig {
|
|
6
|
+
compilerOptions?: StripEnums<CompilerOptions>;
|
|
7
|
+
exclude?: string[];
|
|
8
|
+
compileOnSave?: boolean;
|
|
9
|
+
extends?: string | string[];
|
|
10
|
+
files?: string[];
|
|
11
|
+
include?: string[];
|
|
12
|
+
typeAcquisition?: TypeAcquisition;
|
|
13
|
+
references?: {
|
|
14
|
+
path: string;
|
|
15
|
+
}[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Defines a TSConfig structure.
|
|
19
|
+
* @param tsconfig - The contents of `tsconfig.json` as an object. See {@link TSConfig}.
|
|
20
|
+
* @returns the same `tsconfig.json` object.
|
|
21
|
+
*/
|
|
22
|
+
//#endregion
|
|
23
|
+
export { TSConfig as t };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { n as __exportAll } from "../_common.mjs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
//#region node_modules/.pnpm/@rollup+plugin-alias@6.0.0_rollup@4.59.0/node_modules/@rollup/plugin-alias/dist/index.js
|
|
4
|
+
var dist_exports = /* @__PURE__ */ __exportAll({ default: () => alias });
|
|
5
|
+
function matches(pattern, importee) {
|
|
6
|
+
if (pattern instanceof RegExp) return pattern.test(importee);
|
|
7
|
+
if (importee.length < pattern.length) return false;
|
|
8
|
+
if (importee === pattern) return true;
|
|
9
|
+
return importee.startsWith(pattern + "/");
|
|
10
|
+
}
|
|
11
|
+
function getEntries({ entries, customResolver }) {
|
|
12
|
+
if (!entries) return [];
|
|
13
|
+
const resolverFunctionFromOptions = resolveCustomResolver(customResolver);
|
|
14
|
+
if (Array.isArray(entries)) return entries.map((entry) => {
|
|
15
|
+
return {
|
|
16
|
+
find: entry.find,
|
|
17
|
+
replacement: entry.replacement,
|
|
18
|
+
resolverFunction: resolveCustomResolver(entry.customResolver) || resolverFunctionFromOptions
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
return Object.entries(entries).map(([key, value]) => {
|
|
22
|
+
return {
|
|
23
|
+
find: key,
|
|
24
|
+
replacement: value,
|
|
25
|
+
resolverFunction: resolverFunctionFromOptions
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function getHookFunction(hook) {
|
|
30
|
+
if (typeof hook === "function") return hook;
|
|
31
|
+
if (hook && "handler" in hook && typeof hook.handler === "function") return hook.handler;
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
function resolveCustomResolver(customResolver) {
|
|
35
|
+
if (typeof customResolver === "function") return customResolver;
|
|
36
|
+
if (customResolver) return getHookFunction(customResolver.resolveId);
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
function alias(options = {}) {
|
|
40
|
+
const entries = getEntries(options);
|
|
41
|
+
if (entries.length === 0) return {
|
|
42
|
+
name: "alias",
|
|
43
|
+
resolveId: () => null
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
name: "alias",
|
|
47
|
+
async buildStart(inputOptions) {
|
|
48
|
+
await Promise.all([...Array.isArray(options.entries) ? options.entries : [], options].map(({ customResolver }) => customResolver && getHookFunction(customResolver.buildStart)?.call(this, inputOptions)));
|
|
49
|
+
},
|
|
50
|
+
resolveId(importee, importer, resolveOptions) {
|
|
51
|
+
const matchedEntry = entries.find((entry) => matches(entry.find, importee));
|
|
52
|
+
if (!matchedEntry) return null;
|
|
53
|
+
const updatedId = importee.replace(matchedEntry.find, matchedEntry.replacement);
|
|
54
|
+
if (matchedEntry.resolverFunction) return matchedEntry.resolverFunction.call(this, updatedId, importer, resolveOptions);
|
|
55
|
+
return this.resolve(updatedId, importer, Object.assign({ skipSelf: true }, resolveOptions)).then((resolved) => {
|
|
56
|
+
if (resolved) return resolved;
|
|
57
|
+
if (!path.isAbsolute(updatedId)) this.warn(`rewrote ${importee} to ${updatedId} but was not an absolute path and was not handled by other plugins. This will lead to duplicated modules for the same path. To avoid duplicating modules, you should resolve to an absolute path.`);
|
|
58
|
+
return { id: updatedId };
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { dist_exports as n, alias as t };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { S as MagicString, c as walk, i as createFilter, r as attachScopes, s as makeLegalIdentifier } from "../_build/common.mjs";
|
|
2
|
+
import { sep } from "path";
|
|
3
|
+
//#region node_modules/.pnpm/@rollup+plugin-inject@5.0.5_rollup@4.59.0/node_modules/@rollup/plugin-inject/dist/es/index.js
|
|
4
|
+
var escape = function(str) {
|
|
5
|
+
return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
|
|
6
|
+
};
|
|
7
|
+
var isReference = function(node, parent) {
|
|
8
|
+
if (node.type === "MemberExpression") return !node.computed && isReference(node.object, node);
|
|
9
|
+
if (node.type === "Identifier") {
|
|
10
|
+
if (parent.type === "MemberExpression") return parent.computed || node === parent.object;
|
|
11
|
+
if (parent.type === "Property" && node !== parent.value) return false;
|
|
12
|
+
if (parent.type === "MethodDefinition") return false;
|
|
13
|
+
if (parent.type === "ExportSpecifier" && node !== parent.local) return false;
|
|
14
|
+
if (parent.type === "ImportSpecifier" && node === parent.imported) return false;
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
};
|
|
19
|
+
var flatten = function(startNode) {
|
|
20
|
+
var parts = [];
|
|
21
|
+
var node = startNode;
|
|
22
|
+
while (node.type === "MemberExpression") {
|
|
23
|
+
parts.unshift(node.property.name);
|
|
24
|
+
node = node.object;
|
|
25
|
+
}
|
|
26
|
+
var name = node.name;
|
|
27
|
+
parts.unshift(name);
|
|
28
|
+
return {
|
|
29
|
+
name,
|
|
30
|
+
keypath: parts.join(".")
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
function inject(options) {
|
|
34
|
+
if (!options) throw new Error("Missing options");
|
|
35
|
+
var filter = createFilter(options.include, options.exclude);
|
|
36
|
+
var modules = options.modules;
|
|
37
|
+
if (!modules) {
|
|
38
|
+
modules = Object.assign({}, options);
|
|
39
|
+
delete modules.include;
|
|
40
|
+
delete modules.exclude;
|
|
41
|
+
delete modules.sourceMap;
|
|
42
|
+
delete modules.sourcemap;
|
|
43
|
+
}
|
|
44
|
+
var modulesMap = new Map(Object.entries(modules));
|
|
45
|
+
if (sep !== "/") modulesMap.forEach(function(mod, key) {
|
|
46
|
+
modulesMap.set(key, Array.isArray(mod) ? [mod[0].split(sep).join("/"), mod[1]] : mod.split(sep).join("/"));
|
|
47
|
+
});
|
|
48
|
+
var firstpass = new RegExp("(?:" + Array.from(modulesMap.keys()).map(escape).join("|") + ")", "g");
|
|
49
|
+
var sourceMap = options.sourceMap !== false && options.sourcemap !== false;
|
|
50
|
+
return {
|
|
51
|
+
name: "inject",
|
|
52
|
+
transform: function transform(code, id) {
|
|
53
|
+
if (!filter(id)) return null;
|
|
54
|
+
if (code.search(firstpass) === -1) return null;
|
|
55
|
+
if (sep !== "/") id = id.split(sep).join("/");
|
|
56
|
+
var ast = null;
|
|
57
|
+
try {
|
|
58
|
+
ast = this.parse(code);
|
|
59
|
+
} catch (err) {
|
|
60
|
+
this.warn({
|
|
61
|
+
code: "PARSE_ERROR",
|
|
62
|
+
message: "rollup-plugin-inject: failed to parse " + id + ". Consider restricting the plugin to particular files via options.include"
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (!ast) return null;
|
|
66
|
+
var imports = /* @__PURE__ */ new Set();
|
|
67
|
+
ast.body.forEach(function(node) {
|
|
68
|
+
if (node.type === "ImportDeclaration") node.specifiers.forEach(function(specifier) {
|
|
69
|
+
imports.add(specifier.local.name);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
var scope = attachScopes(ast, "scope");
|
|
73
|
+
var magicString = new MagicString(code);
|
|
74
|
+
var newImports = /* @__PURE__ */ new Map();
|
|
75
|
+
function handleReference(node, name, keypath) {
|
|
76
|
+
var mod = modulesMap.get(keypath);
|
|
77
|
+
if (mod && !imports.has(name) && !scope.contains(name)) {
|
|
78
|
+
if (typeof mod === "string") mod = [mod, "default"];
|
|
79
|
+
if (mod[0] === id) return false;
|
|
80
|
+
var hash = keypath + ":" + mod[0] + ":" + mod[1];
|
|
81
|
+
var importLocalName = name === keypath ? name : makeLegalIdentifier("$inject_" + keypath);
|
|
82
|
+
if (!newImports.has(hash)) {
|
|
83
|
+
var modName = mod[0].replace(/[''\\]/g, "\\$&");
|
|
84
|
+
if (mod[1] === "*") newImports.set(hash, "import * as " + importLocalName + " from '" + modName + "';");
|
|
85
|
+
else newImports.set(hash, "import { " + mod[1] + " as " + importLocalName + " } from '" + modName + "';");
|
|
86
|
+
}
|
|
87
|
+
if (name !== keypath) magicString.overwrite(node.start, node.end, importLocalName, { storeName: true });
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
walk(ast, {
|
|
93
|
+
enter: function enter(node, parent) {
|
|
94
|
+
if (sourceMap) {
|
|
95
|
+
magicString.addSourcemapLocation(node.start);
|
|
96
|
+
magicString.addSourcemapLocation(node.end);
|
|
97
|
+
}
|
|
98
|
+
if (node.scope) scope = node.scope;
|
|
99
|
+
if (node.type === "Property" && node.shorthand && node.value.type === "Identifier") {
|
|
100
|
+
var name = node.key.name;
|
|
101
|
+
handleReference(node, name, name);
|
|
102
|
+
this.skip();
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (isReference(node, parent)) {
|
|
106
|
+
var ref$1 = flatten(node);
|
|
107
|
+
var name$1 = ref$1.name;
|
|
108
|
+
var keypath = ref$1.keypath;
|
|
109
|
+
if (handleReference(node, name$1, keypath)) this.skip();
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
leave: function leave(node) {
|
|
113
|
+
if (node.scope) scope = scope.parent;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
if (newImports.size === 0) return {
|
|
117
|
+
code,
|
|
118
|
+
ast,
|
|
119
|
+
map: sourceMap ? magicString.generateMap({ hires: true }) : null
|
|
120
|
+
};
|
|
121
|
+
var importBlock = Array.from(newImports.values()).join("\n\n");
|
|
122
|
+
magicString.prepend(importBlock + "\n\n");
|
|
123
|
+
return {
|
|
124
|
+
code: magicString.toString(),
|
|
125
|
+
map: sourceMap ? magicString.generateMap({ hires: true }) : null
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
export { inject as t };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { a as dataToEsm, i as createFilter } from "../_build/common.mjs";
|
|
2
|
+
//#region node_modules/.pnpm/@rollup+plugin-json@6.1.0_rollup@4.59.0/node_modules/@rollup/plugin-json/dist/es/index.js
|
|
3
|
+
function json(options) {
|
|
4
|
+
if (options === void 0) options = {};
|
|
5
|
+
var filter = createFilter(options.include, options.exclude);
|
|
6
|
+
var indent = "indent" in options ? options.indent : " ";
|
|
7
|
+
return {
|
|
8
|
+
name: "json",
|
|
9
|
+
transform: function transform(code, id) {
|
|
10
|
+
if (id.slice(-5) !== ".json" || !filter(id)) return null;
|
|
11
|
+
try {
|
|
12
|
+
return {
|
|
13
|
+
code: dataToEsm(JSON.parse(code), {
|
|
14
|
+
preferConst: options.preferConst,
|
|
15
|
+
compact: options.compact,
|
|
16
|
+
namedExports: options.namedExports,
|
|
17
|
+
includeArbitraryNames: options.includeArbitraryNames,
|
|
18
|
+
indent
|
|
19
|
+
}),
|
|
20
|
+
map: { mappings: "" }
|
|
21
|
+
};
|
|
22
|
+
} catch (err) {
|
|
23
|
+
this.error({
|
|
24
|
+
message: "Could not parse JSON file",
|
|
25
|
+
id,
|
|
26
|
+
cause: err
|
|
27
|
+
});
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { json as t };
|