@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,812 @@
|
|
|
1
|
+
import { J as readPackageJSON, K as findWorkspaceDir, at as dirname$1, ct as join$1, dt as resolve$1, it as basename$1, lt as normalize$1, nt as resolveModulePath, ot as extname$1 } from "../_build/common.mjs";
|
|
2
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
3
|
+
import * as nodeUtil from "node:util";
|
|
4
|
+
import { readFile, rm } from "node:fs/promises";
|
|
5
|
+
import { pathToFileURL } from "node:url";
|
|
6
|
+
import { homedir } from "node:os";
|
|
7
|
+
import { resolve } from "node:path";
|
|
8
|
+
import destr from "destr";
|
|
9
|
+
import { defu } from "defu";
|
|
10
|
+
import { createHash } from "node:crypto";
|
|
11
|
+
//#region node_modules/.pnpm/c12@4.0.0-beta.3_chokidar@5.0.0_dotenv@17.3.1_giget@3.1.2_jiti@2.6.1_magicast@0.5.2/node_modules/c12/dist/_chunks/libs/perfect-debounce.mjs
|
|
12
|
+
const DEBOUNCE_DEFAULTS = { trailing: true };
|
|
13
|
+
function debounce(fn, wait = 25, options = {}) {
|
|
14
|
+
options = {
|
|
15
|
+
...DEBOUNCE_DEFAULTS,
|
|
16
|
+
...options
|
|
17
|
+
};
|
|
18
|
+
if (!Number.isFinite(wait)) throw new TypeError("Expected `wait` to be a finite number");
|
|
19
|
+
let leadingValue;
|
|
20
|
+
let timeout;
|
|
21
|
+
let resolveList = [];
|
|
22
|
+
let currentPromise;
|
|
23
|
+
let trailingArgs;
|
|
24
|
+
const applyFn = (_this, args) => {
|
|
25
|
+
currentPromise = _applyPromised(fn, _this, args);
|
|
26
|
+
currentPromise.finally(() => {
|
|
27
|
+
currentPromise = null;
|
|
28
|
+
if (options.trailing && trailingArgs && !timeout) {
|
|
29
|
+
const promise = applyFn(_this, trailingArgs);
|
|
30
|
+
trailingArgs = null;
|
|
31
|
+
return promise;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return currentPromise;
|
|
35
|
+
};
|
|
36
|
+
const debounced = function(...args) {
|
|
37
|
+
if (options.trailing) trailingArgs = args;
|
|
38
|
+
if (currentPromise) return currentPromise;
|
|
39
|
+
return new Promise((resolve) => {
|
|
40
|
+
const shouldCallNow = !timeout && options.leading;
|
|
41
|
+
clearTimeout(timeout);
|
|
42
|
+
timeout = setTimeout(() => {
|
|
43
|
+
timeout = null;
|
|
44
|
+
const promise = options.leading ? leadingValue : applyFn(this, args);
|
|
45
|
+
trailingArgs = null;
|
|
46
|
+
for (const _resolve of resolveList) _resolve(promise);
|
|
47
|
+
resolveList = [];
|
|
48
|
+
}, wait);
|
|
49
|
+
if (shouldCallNow) {
|
|
50
|
+
leadingValue = applyFn(this, args);
|
|
51
|
+
resolve(leadingValue);
|
|
52
|
+
} else resolveList.push(resolve);
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
const _clearTimeout = (timer) => {
|
|
56
|
+
if (timer) {
|
|
57
|
+
clearTimeout(timer);
|
|
58
|
+
timeout = null;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
debounced.isPending = () => !!timeout;
|
|
62
|
+
debounced.cancel = () => {
|
|
63
|
+
_clearTimeout(timeout);
|
|
64
|
+
resolveList = [];
|
|
65
|
+
trailingArgs = null;
|
|
66
|
+
};
|
|
67
|
+
debounced.flush = () => {
|
|
68
|
+
_clearTimeout(timeout);
|
|
69
|
+
if (!trailingArgs || currentPromise) return;
|
|
70
|
+
const args = trailingArgs;
|
|
71
|
+
trailingArgs = null;
|
|
72
|
+
return applyFn(this, args);
|
|
73
|
+
};
|
|
74
|
+
return debounced;
|
|
75
|
+
}
|
|
76
|
+
async function _applyPromised(fn, _this, args) {
|
|
77
|
+
return await fn.apply(_this, args);
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region node_modules/.pnpm/rc9@3.0.0/node_modules/rc9/dist/_chunks/libs/flat.mjs
|
|
81
|
+
function isBuffer(obj) {
|
|
82
|
+
return obj && obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
|
|
83
|
+
}
|
|
84
|
+
function keyIdentity(key) {
|
|
85
|
+
return key;
|
|
86
|
+
}
|
|
87
|
+
function flatten(target, opts) {
|
|
88
|
+
opts = opts || {};
|
|
89
|
+
const delimiter = opts.delimiter || ".";
|
|
90
|
+
const maxDepth = opts.maxDepth;
|
|
91
|
+
const transformKey = opts.transformKey || keyIdentity;
|
|
92
|
+
const output = {};
|
|
93
|
+
function step(object, prev, currentDepth) {
|
|
94
|
+
currentDepth = currentDepth || 1;
|
|
95
|
+
Object.keys(object).forEach(function(key) {
|
|
96
|
+
const value = object[key];
|
|
97
|
+
const isarray = opts.safe && Array.isArray(value);
|
|
98
|
+
const type = Object.prototype.toString.call(value);
|
|
99
|
+
const isbuffer = isBuffer(value);
|
|
100
|
+
const isobject = type === "[object Object]" || type === "[object Array]";
|
|
101
|
+
const newKey = prev ? prev + delimiter + transformKey(key) : transformKey(key);
|
|
102
|
+
if (!isarray && !isbuffer && isobject && Object.keys(value).length && (!opts.maxDepth || currentDepth < maxDepth)) return step(value, newKey, currentDepth + 1);
|
|
103
|
+
output[newKey] = value;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
step(target);
|
|
107
|
+
return output;
|
|
108
|
+
}
|
|
109
|
+
function unflatten(target, opts) {
|
|
110
|
+
opts = opts || {};
|
|
111
|
+
const delimiter = opts.delimiter || ".";
|
|
112
|
+
const overwrite = opts.overwrite || false;
|
|
113
|
+
const transformKey = opts.transformKey || keyIdentity;
|
|
114
|
+
const result = {};
|
|
115
|
+
if (isBuffer(target) || Object.prototype.toString.call(target) !== "[object Object]") return target;
|
|
116
|
+
function getkey(key) {
|
|
117
|
+
const parsedKey = Number(key);
|
|
118
|
+
return isNaN(parsedKey) || key.indexOf(".") !== -1 || opts.object ? key : parsedKey;
|
|
119
|
+
}
|
|
120
|
+
function addKeys(keyPrefix, recipient, target) {
|
|
121
|
+
return Object.keys(target).reduce(function(result, key) {
|
|
122
|
+
result[keyPrefix + delimiter + key] = target[key];
|
|
123
|
+
return result;
|
|
124
|
+
}, recipient);
|
|
125
|
+
}
|
|
126
|
+
function isEmpty(val) {
|
|
127
|
+
const type = Object.prototype.toString.call(val);
|
|
128
|
+
const isArray = type === "[object Array]";
|
|
129
|
+
const isObject = type === "[object Object]";
|
|
130
|
+
if (!val) return true;
|
|
131
|
+
else if (isArray) return !val.length;
|
|
132
|
+
else if (isObject) return !Object.keys(val).length;
|
|
133
|
+
}
|
|
134
|
+
target = Object.keys(target).reduce(function(result, key) {
|
|
135
|
+
const type = Object.prototype.toString.call(target[key]);
|
|
136
|
+
if (!(type === "[object Object]" || type === "[object Array]") || isEmpty(target[key])) {
|
|
137
|
+
result[key] = target[key];
|
|
138
|
+
return result;
|
|
139
|
+
} else return addKeys(key, result, flatten(target[key], opts));
|
|
140
|
+
}, {});
|
|
141
|
+
Object.keys(target).forEach(function(key) {
|
|
142
|
+
const split = key.split(delimiter).map(transformKey);
|
|
143
|
+
let key1 = getkey(split.shift());
|
|
144
|
+
let key2 = getkey(split[0]);
|
|
145
|
+
let recipient = result;
|
|
146
|
+
while (key2 !== void 0) {
|
|
147
|
+
if (key1 === "__proto__") return;
|
|
148
|
+
const type = Object.prototype.toString.call(recipient[key1]);
|
|
149
|
+
const isobject = type === "[object Object]" || type === "[object Array]";
|
|
150
|
+
if (!overwrite && !isobject && typeof recipient[key1] !== "undefined") return;
|
|
151
|
+
if (overwrite && !isobject || !overwrite && recipient[key1] == null) recipient[key1] = typeof key2 === "number" && !opts.object ? [] : {};
|
|
152
|
+
recipient = recipient[key1];
|
|
153
|
+
if (split.length > 0) {
|
|
154
|
+
key1 = getkey(split.shift());
|
|
155
|
+
key2 = getkey(split[0]);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
recipient[key1] = unflatten(target[key], opts);
|
|
159
|
+
});
|
|
160
|
+
return result;
|
|
161
|
+
}
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region node_modules/.pnpm/rc9@3.0.0/node_modules/rc9/dist/index.mjs
|
|
164
|
+
const RE_KEY_VAL = /^\s*([^\s=]+)\s*=\s*(.*)?\s*$/;
|
|
165
|
+
const RE_LINES = /\n|\r|\r\n/;
|
|
166
|
+
const defaults = {
|
|
167
|
+
name: ".conf",
|
|
168
|
+
dir: process.cwd(),
|
|
169
|
+
flat: false
|
|
170
|
+
};
|
|
171
|
+
function withDefaults(options) {
|
|
172
|
+
if (typeof options === "string") options = { name: options };
|
|
173
|
+
return {
|
|
174
|
+
...defaults,
|
|
175
|
+
...options
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
function parse(contents, options = {}) {
|
|
179
|
+
const config = {};
|
|
180
|
+
const lines = contents.split(RE_LINES);
|
|
181
|
+
for (const line of lines) {
|
|
182
|
+
const match = line.match(RE_KEY_VAL);
|
|
183
|
+
if (!match) continue;
|
|
184
|
+
const key = match[1];
|
|
185
|
+
if (!key || key === "__proto__" || key === "constructor") continue;
|
|
186
|
+
const value = destr((match[2] || "").trim());
|
|
187
|
+
if (key.endsWith("[]")) {
|
|
188
|
+
const nkey = key.slice(0, Math.max(0, key.length - 2));
|
|
189
|
+
config[nkey] = (config[nkey] || []).concat(value);
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
config[key] = value;
|
|
193
|
+
}
|
|
194
|
+
return options.flat ? config : unflatten(config, { overwrite: true });
|
|
195
|
+
}
|
|
196
|
+
function parseFile(path, options) {
|
|
197
|
+
if (!existsSync(path)) return {};
|
|
198
|
+
return parse(readFileSync(path, "utf8"), options);
|
|
199
|
+
}
|
|
200
|
+
function read(options) {
|
|
201
|
+
options = withDefaults(options);
|
|
202
|
+
return parseFile(resolve(options.dir, options.name), options);
|
|
203
|
+
}
|
|
204
|
+
function readUser(options) {
|
|
205
|
+
options = withDefaults(options);
|
|
206
|
+
options.dir = process.env.XDG_CONFIG_HOME || homedir();
|
|
207
|
+
return read(options);
|
|
208
|
+
}
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region node_modules/.pnpm/c12@4.0.0-beta.3_chokidar@5.0.0_dotenv@17.3.1_giget@3.1.2_jiti@2.6.1_magicast@0.5.2/node_modules/c12/dist/index.mjs
|
|
211
|
+
async function setupDotenv(options) {
|
|
212
|
+
const targetEnvironment = options.env ?? process.env;
|
|
213
|
+
const environment = await loadDotenv({
|
|
214
|
+
cwd: options.cwd,
|
|
215
|
+
fileName: options.fileName ?? ".env",
|
|
216
|
+
env: targetEnvironment,
|
|
217
|
+
interpolate: options.interpolate ?? true,
|
|
218
|
+
expandFileReferences: options.expandFileReferences ?? false
|
|
219
|
+
});
|
|
220
|
+
const dotenvVars = getDotEnvVars(targetEnvironment);
|
|
221
|
+
for (const key in environment) {
|
|
222
|
+
if (key.startsWith("_")) continue;
|
|
223
|
+
if (targetEnvironment[key] === void 0 || dotenvVars.has(key)) targetEnvironment[key] = environment[key];
|
|
224
|
+
}
|
|
225
|
+
return environment;
|
|
226
|
+
}
|
|
227
|
+
async function loadDotenv(options) {
|
|
228
|
+
const environment = Object.create(null);
|
|
229
|
+
const cwd = resolve$1(options.cwd || ".");
|
|
230
|
+
const _fileName = options.fileName || ".env";
|
|
231
|
+
const dotenvFiles = typeof _fileName === "string" ? [_fileName] : _fileName;
|
|
232
|
+
const dotenvVars = getDotEnvVars(options.env || {});
|
|
233
|
+
Object.assign(environment, options.env);
|
|
234
|
+
for (const file of dotenvFiles) {
|
|
235
|
+
const dotenvFile = resolve$1(cwd, file);
|
|
236
|
+
if (!statSync(dotenvFile, { throwIfNoEntry: false })?.isFile()) continue;
|
|
237
|
+
const parsed = await readEnvFile(dotenvFile);
|
|
238
|
+
for (const key in parsed) {
|
|
239
|
+
if (key in environment && !dotenvVars.has(key)) continue;
|
|
240
|
+
environment[key] = parsed[key];
|
|
241
|
+
dotenvVars.add(key);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if (options.expandFileReferences) {
|
|
245
|
+
for (const key in environment) if (key.endsWith("_FILE")) {
|
|
246
|
+
const targetKey = key.slice(0, -5);
|
|
247
|
+
if (environment[targetKey] === void 0) {
|
|
248
|
+
const filePath = environment[key];
|
|
249
|
+
if (filePath && statSync(filePath, { throwIfNoEntry: false })?.isFile()) {
|
|
250
|
+
environment[targetKey] = readFileSync(filePath, "utf8").trim();
|
|
251
|
+
dotenvVars.add(targetKey);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
if (options.interpolate) interpolate(environment);
|
|
257
|
+
return environment;
|
|
258
|
+
}
|
|
259
|
+
let _parseEnv = nodeUtil.parseEnv;
|
|
260
|
+
async function readEnvFile(path) {
|
|
261
|
+
const src = readFileSync(path, "utf8");
|
|
262
|
+
if (!_parseEnv) try {
|
|
263
|
+
const dotenv = await import("dotenv");
|
|
264
|
+
_parseEnv = (src) => dotenv.parse(src);
|
|
265
|
+
} catch {
|
|
266
|
+
throw new Error("Failed to parse .env file: `node:util.parseEnv` is not available and `dotenv` package is not installed. Please upgrade your runtime or install `dotenv` as a dependency.");
|
|
267
|
+
}
|
|
268
|
+
return _parseEnv(src);
|
|
269
|
+
}
|
|
270
|
+
function interpolate(target, source = {}, parse = (v) => v) {
|
|
271
|
+
function getValue(key) {
|
|
272
|
+
return source[key] === void 0 ? target[key] : source[key];
|
|
273
|
+
}
|
|
274
|
+
function interpolate(value, parents = []) {
|
|
275
|
+
if (typeof value !== "string") return value;
|
|
276
|
+
return parse((value.match(/(.?\${?(?:[\w:]+)?}?)/g) || []).reduce((newValue, match) => {
|
|
277
|
+
const parts = /(.?)\${?([\w:]+)?}?/g.exec(match) || [];
|
|
278
|
+
const prefix = parts[1];
|
|
279
|
+
let value, replacePart;
|
|
280
|
+
if (prefix === "\\") {
|
|
281
|
+
replacePart = parts[0] || "";
|
|
282
|
+
value = replacePart.replace(String.raw`\$`, "$");
|
|
283
|
+
} else {
|
|
284
|
+
const key = parts[2];
|
|
285
|
+
replacePart = (parts[0] || "").slice(prefix.length);
|
|
286
|
+
if (parents.includes(key)) {
|
|
287
|
+
console.warn(`Please avoid recursive environment variables ( loop: ${parents.join(" > ")} > ${key} )`);
|
|
288
|
+
return "";
|
|
289
|
+
}
|
|
290
|
+
value = getValue(key);
|
|
291
|
+
value = interpolate(value, [...parents, key]);
|
|
292
|
+
}
|
|
293
|
+
return value === void 0 ? newValue : newValue.replace(replacePart, value);
|
|
294
|
+
}, value));
|
|
295
|
+
}
|
|
296
|
+
for (const key in target) target[key] = interpolate(getValue(key));
|
|
297
|
+
}
|
|
298
|
+
function getDotEnvVars(targetEnvironment) {
|
|
299
|
+
const globalRegistry = globalThis.__c12_dotenv_vars__ ||= /* @__PURE__ */ new Map();
|
|
300
|
+
if (!globalRegistry.has(targetEnvironment)) globalRegistry.set(targetEnvironment, /* @__PURE__ */ new Set());
|
|
301
|
+
return globalRegistry.get(targetEnvironment);
|
|
302
|
+
}
|
|
303
|
+
const _normalize = (p) => p?.replace(/\\/g, "/");
|
|
304
|
+
const ASYNC_LOADERS = {
|
|
305
|
+
".yaml": () => import("../_build/common.mjs").then((n) => n.Q).then((r) => r.parseYAML),
|
|
306
|
+
".yml": () => import("../_build/common.mjs").then((n) => n.Q).then((r) => r.parseYAML),
|
|
307
|
+
".jsonc": () => import("../_build/common.mjs").then((n) => n.$).then((r) => r.parseJSONC),
|
|
308
|
+
".json5": () => import("../_build/common.mjs").then((n) => n.tt).then((r) => r.parseJSON5),
|
|
309
|
+
".toml": () => import("../_build/common.mjs").then((n) => n.X).then((r) => r.parseTOML)
|
|
310
|
+
};
|
|
311
|
+
const SUPPORTED_EXTENSIONS = Object.freeze([
|
|
312
|
+
".js",
|
|
313
|
+
".ts",
|
|
314
|
+
".mjs",
|
|
315
|
+
".cjs",
|
|
316
|
+
".mts",
|
|
317
|
+
".cts",
|
|
318
|
+
".json",
|
|
319
|
+
".jsonc",
|
|
320
|
+
".json5",
|
|
321
|
+
".yaml",
|
|
322
|
+
".yml",
|
|
323
|
+
".toml"
|
|
324
|
+
]);
|
|
325
|
+
async function loadConfig(options) {
|
|
326
|
+
options.cwd = resolve$1(process.cwd(), options.cwd || ".");
|
|
327
|
+
options.name = options.name || "config";
|
|
328
|
+
options.envName = options.envName ?? process.env.NODE_ENV;
|
|
329
|
+
options.configFile = options.configFile ?? (options.name === "config" ? "config" : `${options.name}.config`);
|
|
330
|
+
options.rcFile = options.rcFile ?? `.${options.name}rc`;
|
|
331
|
+
if (options.extend !== false) options.extend = {
|
|
332
|
+
extendKey: "extends",
|
|
333
|
+
...options.extend
|
|
334
|
+
};
|
|
335
|
+
const _merger = options.merger || defu;
|
|
336
|
+
const r = {
|
|
337
|
+
config: {},
|
|
338
|
+
cwd: options.cwd,
|
|
339
|
+
configFile: resolve$1(options.cwd, options.configFile),
|
|
340
|
+
layers: [],
|
|
341
|
+
_configFile: void 0
|
|
342
|
+
};
|
|
343
|
+
const rawConfigs = {
|
|
344
|
+
overrides: options.overrides,
|
|
345
|
+
main: void 0,
|
|
346
|
+
rc: void 0,
|
|
347
|
+
packageJson: void 0,
|
|
348
|
+
defaultConfig: options.defaultConfig
|
|
349
|
+
};
|
|
350
|
+
if (options.dotenv) await setupDotenv({
|
|
351
|
+
cwd: options.cwd,
|
|
352
|
+
...options.dotenv === true ? {} : options.dotenv
|
|
353
|
+
});
|
|
354
|
+
const _mainConfig = await resolveConfig(".", options);
|
|
355
|
+
if (_mainConfig.configFile) {
|
|
356
|
+
rawConfigs.main = _mainConfig.config;
|
|
357
|
+
r.configFile = _mainConfig.configFile;
|
|
358
|
+
r._configFile = _mainConfig._configFile;
|
|
359
|
+
}
|
|
360
|
+
if (_mainConfig.meta) r.meta = _mainConfig.meta;
|
|
361
|
+
if (options.rcFile) {
|
|
362
|
+
const rcSources = [];
|
|
363
|
+
rcSources.push(read({
|
|
364
|
+
name: options.rcFile,
|
|
365
|
+
dir: options.cwd
|
|
366
|
+
}));
|
|
367
|
+
if (options.globalRc) {
|
|
368
|
+
const workspaceDir = await findWorkspaceDir(options.cwd).catch(() => {});
|
|
369
|
+
if (workspaceDir) rcSources.push(read({
|
|
370
|
+
name: options.rcFile,
|
|
371
|
+
dir: workspaceDir
|
|
372
|
+
}));
|
|
373
|
+
rcSources.push(readUser({
|
|
374
|
+
name: options.rcFile,
|
|
375
|
+
dir: options.cwd
|
|
376
|
+
}));
|
|
377
|
+
}
|
|
378
|
+
rawConfigs.rc = _merger({}, ...rcSources);
|
|
379
|
+
}
|
|
380
|
+
if (options.packageJson) {
|
|
381
|
+
const keys = (Array.isArray(options.packageJson) ? options.packageJson : [typeof options.packageJson === "string" ? options.packageJson : options.name]).filter((t) => t && typeof t === "string");
|
|
382
|
+
const pkgJsonFile = await readPackageJSON(options.cwd).catch(() => {});
|
|
383
|
+
rawConfigs.packageJson = _merger({}, ...keys.map((key) => pkgJsonFile?.[key]));
|
|
384
|
+
}
|
|
385
|
+
const configs = {};
|
|
386
|
+
for (const key in rawConfigs) {
|
|
387
|
+
const value = rawConfigs[key];
|
|
388
|
+
configs[key] = await (typeof value === "function" ? value({
|
|
389
|
+
configs,
|
|
390
|
+
rawConfigs
|
|
391
|
+
}) : value);
|
|
392
|
+
}
|
|
393
|
+
if (Array.isArray(configs.main)) r.config = configs.main;
|
|
394
|
+
else {
|
|
395
|
+
r.config = _merger(configs.overrides, configs.main, configs.rc, configs.packageJson, configs.defaultConfig);
|
|
396
|
+
if (options.extend) {
|
|
397
|
+
await extendConfig(r.config, options);
|
|
398
|
+
r.layers = r.config._layers;
|
|
399
|
+
delete r.config._layers;
|
|
400
|
+
r.config = _merger(r.config, ...r.layers.map((e) => e.config));
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
r.layers = [...[
|
|
404
|
+
configs.overrides && {
|
|
405
|
+
config: configs.overrides,
|
|
406
|
+
configFile: void 0,
|
|
407
|
+
cwd: void 0
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
config: configs.main,
|
|
411
|
+
configFile: options.configFile,
|
|
412
|
+
cwd: options.cwd
|
|
413
|
+
},
|
|
414
|
+
configs.rc && {
|
|
415
|
+
config: configs.rc,
|
|
416
|
+
configFile: options.rcFile
|
|
417
|
+
},
|
|
418
|
+
configs.packageJson && {
|
|
419
|
+
config: configs.packageJson,
|
|
420
|
+
configFile: "package.json"
|
|
421
|
+
}
|
|
422
|
+
].filter((l) => l && l.config), ...r.layers];
|
|
423
|
+
if (options.defaults) r.config = _merger(r.config, options.defaults);
|
|
424
|
+
if (options.omit$Keys) {
|
|
425
|
+
for (const key in r.config) if (key.startsWith("$")) delete r.config[key];
|
|
426
|
+
}
|
|
427
|
+
if (options.configFileRequired && !r._configFile) throw new Error(`Required config (${r.configFile}) cannot be resolved.`);
|
|
428
|
+
return r;
|
|
429
|
+
}
|
|
430
|
+
async function extendConfig(config, options) {
|
|
431
|
+
config._layers = config._layers || [];
|
|
432
|
+
if (!options.extend) return;
|
|
433
|
+
let keys = options.extend.extendKey;
|
|
434
|
+
if (typeof keys === "string") keys = [keys];
|
|
435
|
+
const extendSources = [];
|
|
436
|
+
for (const key of keys) {
|
|
437
|
+
extendSources.push(...(Array.isArray(config[key]) ? config[key] : [config[key]]).filter(Boolean));
|
|
438
|
+
delete config[key];
|
|
439
|
+
}
|
|
440
|
+
for (let extendSource of extendSources) {
|
|
441
|
+
const originalExtendSource = extendSource;
|
|
442
|
+
let sourceOptions = {};
|
|
443
|
+
if (extendSource.source) {
|
|
444
|
+
sourceOptions = extendSource.options || {};
|
|
445
|
+
extendSource = extendSource.source;
|
|
446
|
+
}
|
|
447
|
+
if (Array.isArray(extendSource)) {
|
|
448
|
+
sourceOptions = extendSource[1] || {};
|
|
449
|
+
extendSource = extendSource[0];
|
|
450
|
+
}
|
|
451
|
+
if (typeof extendSource !== "string") {
|
|
452
|
+
console.warn(`Cannot extend config from \`${JSON.stringify(originalExtendSource)}\` in ${options.cwd}`);
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
const _config = await resolveConfig(extendSource, options, sourceOptions);
|
|
456
|
+
if (!_config.config) {
|
|
457
|
+
console.warn(`Cannot extend config from \`${extendSource}\` in ${options.cwd}`);
|
|
458
|
+
continue;
|
|
459
|
+
}
|
|
460
|
+
await extendConfig(_config.config, {
|
|
461
|
+
...options,
|
|
462
|
+
cwd: _config.cwd
|
|
463
|
+
});
|
|
464
|
+
config._layers.push(_config);
|
|
465
|
+
if (_config.config._layers) {
|
|
466
|
+
config._layers.push(..._config.config._layers);
|
|
467
|
+
delete _config.config._layers;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
const GIGET_PREFIXES = [
|
|
472
|
+
"gh:",
|
|
473
|
+
"github:",
|
|
474
|
+
"gitlab:",
|
|
475
|
+
"bitbucket:",
|
|
476
|
+
"https://",
|
|
477
|
+
"http://"
|
|
478
|
+
];
|
|
479
|
+
const NPM_PACKAGE_RE = /^(@[\da-z~-][\d._a-z~-]*\/)?[\da-z~-][\d._a-z~-]*($|\/.*)/;
|
|
480
|
+
async function resolveConfig(source, options, sourceOptions = {}) {
|
|
481
|
+
if (options.resolve) {
|
|
482
|
+
const res = await options.resolve(source, options);
|
|
483
|
+
if (res) return res;
|
|
484
|
+
}
|
|
485
|
+
const _merger = options.merger || defu;
|
|
486
|
+
const customProviderKeys = Object.keys(sourceOptions.giget?.providers || {}).map((key) => `${key}:`);
|
|
487
|
+
const gigetPrefixes = customProviderKeys.length > 0 ? [...new Set([...customProviderKeys, ...GIGET_PREFIXES])] : GIGET_PREFIXES;
|
|
488
|
+
if (options.giget !== false && gigetPrefixes.some((prefix) => source.startsWith(prefix))) {
|
|
489
|
+
const { downloadTemplate } = await import("giget").catch((error) => {
|
|
490
|
+
throw new Error(`Extending config from \`${source}\` requires \`giget\` peer dependency to be installed.\n\nInstall it with: \`npx nypm i giget\``, { cause: error });
|
|
491
|
+
});
|
|
492
|
+
const { digest } = await import("./_4.mjs").then((n) => n.n);
|
|
493
|
+
const cloneName = source.replace(/\W+/g, "_").split("_").splice(0, 3).join("_") + "_" + digest(source).slice(0, 10).replace(/[-_]/g, "");
|
|
494
|
+
let cloneDir;
|
|
495
|
+
const localNodeModules = resolve$1(options.cwd, "node_modules");
|
|
496
|
+
const parentDir = dirname$1(options.cwd);
|
|
497
|
+
if (basename$1(parentDir) === ".c12") cloneDir = join$1(parentDir, cloneName);
|
|
498
|
+
else if (existsSync(localNodeModules)) cloneDir = join$1(localNodeModules, ".c12", cloneName);
|
|
499
|
+
else cloneDir = process.env.XDG_CACHE_HOME ? resolve$1(process.env.XDG_CACHE_HOME, "c12", cloneName) : resolve$1(homedir(), ".cache/c12", cloneName);
|
|
500
|
+
if (existsSync(cloneDir) && !sourceOptions.install) await rm(cloneDir, { recursive: true });
|
|
501
|
+
source = (await downloadTemplate(source, {
|
|
502
|
+
dir: cloneDir,
|
|
503
|
+
install: sourceOptions.install,
|
|
504
|
+
force: sourceOptions.install,
|
|
505
|
+
auth: sourceOptions.auth,
|
|
506
|
+
...options.giget,
|
|
507
|
+
...sourceOptions.giget
|
|
508
|
+
})).dir;
|
|
509
|
+
}
|
|
510
|
+
if (NPM_PACKAGE_RE.test(source)) source = tryResolve(source, options) || source;
|
|
511
|
+
const ext = extname$1(source);
|
|
512
|
+
const isDir = !ext || ext === basename$1(source);
|
|
513
|
+
const cwd = resolve$1(options.cwd, isDir ? source : dirname$1(source));
|
|
514
|
+
if (isDir) source = options.configFile;
|
|
515
|
+
const res = {
|
|
516
|
+
config: void 0,
|
|
517
|
+
configFile: void 0,
|
|
518
|
+
cwd,
|
|
519
|
+
source,
|
|
520
|
+
sourceOptions
|
|
521
|
+
};
|
|
522
|
+
res.configFile = tryResolve(resolve$1(cwd, source), options) || tryResolve(resolve$1(cwd, ".config", source.replace(/\.config$/, "")), options) || tryResolve(resolve$1(cwd, ".config", source), options) || source;
|
|
523
|
+
if (!existsSync(res.configFile)) return res;
|
|
524
|
+
res._configFile = res.configFile;
|
|
525
|
+
const configFileExt = extname$1(res.configFile) || "";
|
|
526
|
+
if (configFileExt in ASYNC_LOADERS) res.config = (await ASYNC_LOADERS[configFileExt]())(await readFile(res.configFile, "utf8"));
|
|
527
|
+
else {
|
|
528
|
+
const _resolveModule = options.resolveModule || ((mod) => mod.default || mod);
|
|
529
|
+
if (options.import) res.config = _resolveModule(await options.import(res.configFile));
|
|
530
|
+
else res.config = await import(res.configFile).then(_resolveModule, async (error) => {
|
|
531
|
+
const { createJiti } = await import("jiti").catch(() => {
|
|
532
|
+
throw new Error(`Failed to load config file \`${res.configFile}\`: ${error?.message}. Hint install \`jiti\` for compatibility.`, { cause: error });
|
|
533
|
+
});
|
|
534
|
+
const jiti = createJiti(join$1(options.cwd || ".", options.configFile || "/"), {
|
|
535
|
+
interopDefault: true,
|
|
536
|
+
moduleCache: false,
|
|
537
|
+
extensions: [...SUPPORTED_EXTENSIONS]
|
|
538
|
+
});
|
|
539
|
+
options.import = (id) => jiti.import(id);
|
|
540
|
+
return _resolveModule(await options.import(res.configFile));
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
if (typeof res.config === "function") res.config = await res.config(options.context);
|
|
544
|
+
if (options.envName) {
|
|
545
|
+
const envConfig = {
|
|
546
|
+
...res.config["$" + options.envName],
|
|
547
|
+
...res.config.$env?.[options.envName]
|
|
548
|
+
};
|
|
549
|
+
if (Object.keys(envConfig).length > 0) res.config = _merger(envConfig, res.config);
|
|
550
|
+
}
|
|
551
|
+
res.meta = defu(res.sourceOptions.meta, res.config.$meta);
|
|
552
|
+
delete res.config.$meta;
|
|
553
|
+
if (res.sourceOptions.overrides) res.config = _merger(res.sourceOptions.overrides, res.config);
|
|
554
|
+
res.configFile = _normalize(res.configFile);
|
|
555
|
+
res.source = _normalize(res.source);
|
|
556
|
+
return res;
|
|
557
|
+
}
|
|
558
|
+
function tryResolve(id, options) {
|
|
559
|
+
const res = resolveModulePath(id, {
|
|
560
|
+
try: true,
|
|
561
|
+
from: pathToFileURL(join$1(options.cwd || ".", options.configFile || "/")),
|
|
562
|
+
suffixes: ["", "/index"],
|
|
563
|
+
extensions: SUPPORTED_EXTENSIONS,
|
|
564
|
+
cache: false
|
|
565
|
+
});
|
|
566
|
+
return res ? normalize$1(res) : void 0;
|
|
567
|
+
}
|
|
568
|
+
const eventMap = {
|
|
569
|
+
add: "created",
|
|
570
|
+
change: "updated",
|
|
571
|
+
unlink: "removed"
|
|
572
|
+
};
|
|
573
|
+
async function watchConfig(options) {
|
|
574
|
+
let config = await loadConfig(options);
|
|
575
|
+
const configName = options.name || "config";
|
|
576
|
+
const configFileName = options.configFile ?? (options.name === "config" ? "config" : `${options.name}.config`);
|
|
577
|
+
const watchingFiles = [...new Set((config.layers || []).filter((l) => l.cwd).flatMap((l) => [
|
|
578
|
+
...SUPPORTED_EXTENSIONS.flatMap((ext) => [
|
|
579
|
+
resolve$1(l.cwd, configFileName + ext),
|
|
580
|
+
resolve$1(l.cwd, ".config", configFileName + ext),
|
|
581
|
+
resolve$1(l.cwd, ".config", configFileName.replace(/\.config$/, "") + ext)
|
|
582
|
+
]),
|
|
583
|
+
l.source && resolve$1(l.cwd, l.source),
|
|
584
|
+
options.rcFile && resolve$1(l.cwd, typeof options.rcFile === "string" ? options.rcFile : `.${configName}rc`),
|
|
585
|
+
options.packageJson && resolve$1(l.cwd, "package.json")
|
|
586
|
+
]).filter(Boolean))];
|
|
587
|
+
const watch = await import("./readdirp+chokidar.mjs").then((n) => n.t).then((r) => r.watch || r.default || r);
|
|
588
|
+
const { diff } = await import("./_4.mjs").then((n) => n.t);
|
|
589
|
+
const _fswatcher = watch(watchingFiles, {
|
|
590
|
+
ignoreInitial: true,
|
|
591
|
+
...options.chokidarOptions
|
|
592
|
+
});
|
|
593
|
+
const onChange = async (event, path) => {
|
|
594
|
+
const type = eventMap[event];
|
|
595
|
+
if (!type) return;
|
|
596
|
+
if (options.onWatch) await options.onWatch({
|
|
597
|
+
type,
|
|
598
|
+
path
|
|
599
|
+
});
|
|
600
|
+
const oldConfig = config;
|
|
601
|
+
try {
|
|
602
|
+
config = await loadConfig(options);
|
|
603
|
+
} catch (error) {
|
|
604
|
+
console.warn(`Failed to load config ${path}\n${error}`);
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
const changeCtx = {
|
|
608
|
+
newConfig: config,
|
|
609
|
+
oldConfig,
|
|
610
|
+
getDiff: () => diff(oldConfig.config, config.config)
|
|
611
|
+
};
|
|
612
|
+
if (options.acceptHMR) {
|
|
613
|
+
if (await options.acceptHMR(changeCtx)) return;
|
|
614
|
+
}
|
|
615
|
+
if (options.onUpdate) await options.onUpdate(changeCtx);
|
|
616
|
+
};
|
|
617
|
+
if (options.debounce === false) _fswatcher.on("all", onChange);
|
|
618
|
+
else _fswatcher.on("all", debounce(onChange, options.debounce ?? 100));
|
|
619
|
+
const utils = {
|
|
620
|
+
watchingFiles,
|
|
621
|
+
unwatch: async () => {
|
|
622
|
+
await _fswatcher.close();
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
return new Proxy(utils, { get(_, prop) {
|
|
626
|
+
if (prop in utils) return utils[prop];
|
|
627
|
+
return config[prop];
|
|
628
|
+
} });
|
|
629
|
+
}
|
|
630
|
+
//#endregion
|
|
631
|
+
//#region node_modules/.pnpm/c12@4.0.0-beta.3_chokidar@5.0.0_dotenv@17.3.1_giget@3.1.2_jiti@2.6.1_magicast@0.5.2/node_modules/c12/dist/_chunks/libs/ohash.mjs
|
|
632
|
+
var __defProp = Object.defineProperty;
|
|
633
|
+
var __exportAll = (all, no_symbols) => {
|
|
634
|
+
let target = {};
|
|
635
|
+
for (var name in all) __defProp(target, name, {
|
|
636
|
+
get: all[name],
|
|
637
|
+
enumerable: true
|
|
638
|
+
});
|
|
639
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
640
|
+
return target;
|
|
641
|
+
};
|
|
642
|
+
function serialize(o) {
|
|
643
|
+
return typeof o == "string" ? `'${o}'` : new c().serialize(o);
|
|
644
|
+
}
|
|
645
|
+
const c = /* @__PURE__ */ function() {
|
|
646
|
+
class o {
|
|
647
|
+
#t = /* @__PURE__ */ new Map();
|
|
648
|
+
compare(t, r) {
|
|
649
|
+
const e = typeof t, n = typeof r;
|
|
650
|
+
return e === "string" && n === "string" ? t.localeCompare(r) : e === "number" && n === "number" ? t - r : String.prototype.localeCompare.call(this.serialize(t, true), this.serialize(r, true));
|
|
651
|
+
}
|
|
652
|
+
serialize(t, r) {
|
|
653
|
+
if (t === null) return "null";
|
|
654
|
+
switch (typeof t) {
|
|
655
|
+
case "string": return r ? t : `'${t}'`;
|
|
656
|
+
case "bigint": return `${t}n`;
|
|
657
|
+
case "object": return this.$object(t);
|
|
658
|
+
case "function": return this.$function(t);
|
|
659
|
+
}
|
|
660
|
+
return String(t);
|
|
661
|
+
}
|
|
662
|
+
serializeObject(t) {
|
|
663
|
+
const r = Object.prototype.toString.call(t);
|
|
664
|
+
if (r !== "[object Object]") return this.serializeBuiltInType(r.length < 10 ? `unknown:${r}` : r.slice(8, -1), t);
|
|
665
|
+
const e = t.constructor, n = e === Object || e === void 0 ? "" : e.name;
|
|
666
|
+
if (n !== "" && globalThis[n] === e) return this.serializeBuiltInType(n, t);
|
|
667
|
+
if (typeof t.toJSON == "function") {
|
|
668
|
+
const i = t.toJSON();
|
|
669
|
+
return n + (i !== null && typeof i == "object" ? this.$object(i) : `(${this.serialize(i)})`);
|
|
670
|
+
}
|
|
671
|
+
return this.serializeObjectEntries(n, Object.entries(t));
|
|
672
|
+
}
|
|
673
|
+
serializeBuiltInType(t, r) {
|
|
674
|
+
const e = this["$" + t];
|
|
675
|
+
if (e) return e.call(this, r);
|
|
676
|
+
if (typeof r?.entries == "function") return this.serializeObjectEntries(t, r.entries());
|
|
677
|
+
throw new Error(`Cannot serialize ${t}`);
|
|
678
|
+
}
|
|
679
|
+
serializeObjectEntries(t, r) {
|
|
680
|
+
const e = Array.from(r).sort((i, a) => this.compare(i[0], a[0]));
|
|
681
|
+
let n = `${t}{`;
|
|
682
|
+
for (let i = 0; i < e.length; i++) {
|
|
683
|
+
const [a, l] = e[i];
|
|
684
|
+
n += `${this.serialize(a, true)}:${this.serialize(l)}`, i < e.length - 1 && (n += ",");
|
|
685
|
+
}
|
|
686
|
+
return n + "}";
|
|
687
|
+
}
|
|
688
|
+
$object(t) {
|
|
689
|
+
let r = this.#t.get(t);
|
|
690
|
+
return r === void 0 && (this.#t.set(t, `#${this.#t.size}`), r = this.serializeObject(t), this.#t.set(t, r)), r;
|
|
691
|
+
}
|
|
692
|
+
$function(t) {
|
|
693
|
+
const r = Function.prototype.toString.call(t);
|
|
694
|
+
return r.slice(-15) === "[native code] }" ? `${t.name || ""}()[native]` : `${t.name}(${t.length})${r.replace(/\s*\n\s*/g, "")}`;
|
|
695
|
+
}
|
|
696
|
+
$Array(t) {
|
|
697
|
+
let r = "[";
|
|
698
|
+
for (let e = 0; e < t.length; e++) r += this.serialize(t[e]), e < t.length - 1 && (r += ",");
|
|
699
|
+
return r + "]";
|
|
700
|
+
}
|
|
701
|
+
$Date(t) {
|
|
702
|
+
try {
|
|
703
|
+
return `Date(${t.toISOString()})`;
|
|
704
|
+
} catch {
|
|
705
|
+
return "Date(null)";
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
$ArrayBuffer(t) {
|
|
709
|
+
return `ArrayBuffer[${new Uint8Array(t).join(",")}]`;
|
|
710
|
+
}
|
|
711
|
+
$Set(t) {
|
|
712
|
+
return `Set${this.$Array(Array.from(t).sort((r, e) => this.compare(r, e)))}`;
|
|
713
|
+
}
|
|
714
|
+
$Map(t) {
|
|
715
|
+
return this.serializeObjectEntries("Map", t.entries());
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
for (const s of [
|
|
719
|
+
"Error",
|
|
720
|
+
"RegExp",
|
|
721
|
+
"URL"
|
|
722
|
+
]) o.prototype["$" + s] = function(t) {
|
|
723
|
+
return `${s}(${t})`;
|
|
724
|
+
};
|
|
725
|
+
for (const s of [
|
|
726
|
+
"Int8Array",
|
|
727
|
+
"Uint8Array",
|
|
728
|
+
"Uint8ClampedArray",
|
|
729
|
+
"Int16Array",
|
|
730
|
+
"Uint16Array",
|
|
731
|
+
"Int32Array",
|
|
732
|
+
"Uint32Array",
|
|
733
|
+
"Float32Array",
|
|
734
|
+
"Float64Array"
|
|
735
|
+
]) o.prototype["$" + s] = function(t) {
|
|
736
|
+
return `${s}[${t.join(",")}]`;
|
|
737
|
+
};
|
|
738
|
+
for (const s of ["BigInt64Array", "BigUint64Array"]) o.prototype["$" + s] = function(t) {
|
|
739
|
+
return `${s}[${t.join("n,")}${t.length > 0 ? "n" : ""}]`;
|
|
740
|
+
};
|
|
741
|
+
return o;
|
|
742
|
+
}();
|
|
743
|
+
const e = globalThis.process?.getBuiltinModule?.("crypto")?.hash, r = "sha256", s = "base64url";
|
|
744
|
+
function digest(t) {
|
|
745
|
+
if (e) return e(r, t, s);
|
|
746
|
+
const o = createHash(r).update(t);
|
|
747
|
+
return globalThis.process?.versions?.webcontainer ? o.digest().toString(s) : o.digest(s);
|
|
748
|
+
}
|
|
749
|
+
var dist_exports = /* @__PURE__ */ __exportAll({ digest: () => digest });
|
|
750
|
+
var utils_exports = /* @__PURE__ */ __exportAll({ diff: () => diff });
|
|
751
|
+
function diff(obj1, obj2) {
|
|
752
|
+
return _diff(_toHashedObject(obj1), _toHashedObject(obj2));
|
|
753
|
+
}
|
|
754
|
+
function _diff(h1, h2) {
|
|
755
|
+
const diffs = [];
|
|
756
|
+
const allProps = /* @__PURE__ */ new Set([...Object.keys(h1.props || {}), ...Object.keys(h2.props || {})]);
|
|
757
|
+
if (h1.props && h2.props) for (const prop of allProps) {
|
|
758
|
+
const p1 = h1.props[prop];
|
|
759
|
+
const p2 = h2.props[prop];
|
|
760
|
+
if (p1 && p2) diffs.push(..._diff(h1.props?.[prop], h2.props?.[prop]));
|
|
761
|
+
else if (p1 || p2) diffs.push(new DiffEntry((p2 || p1).key, p1 ? "removed" : "added", p2, p1));
|
|
762
|
+
}
|
|
763
|
+
if (allProps.size === 0 && h1.hash !== h2.hash) diffs.push(new DiffEntry((h2 || h1).key, "changed", h2, h1));
|
|
764
|
+
return diffs;
|
|
765
|
+
}
|
|
766
|
+
function _toHashedObject(obj, key = "") {
|
|
767
|
+
if (obj && typeof obj !== "object") return new DiffHashedObject(key, obj, serialize(obj));
|
|
768
|
+
const props = {};
|
|
769
|
+
const hashes = [];
|
|
770
|
+
for (const _key in obj) {
|
|
771
|
+
props[_key] = _toHashedObject(obj[_key], key ? `${key}.${_key}` : _key);
|
|
772
|
+
hashes.push(props[_key].hash);
|
|
773
|
+
}
|
|
774
|
+
return new DiffHashedObject(key, obj, `{${hashes.join(":")}}`, props);
|
|
775
|
+
}
|
|
776
|
+
var DiffEntry = class {
|
|
777
|
+
constructor(key, type, newValue, oldValue) {
|
|
778
|
+
this.key = key;
|
|
779
|
+
this.type = type;
|
|
780
|
+
this.newValue = newValue;
|
|
781
|
+
this.oldValue = oldValue;
|
|
782
|
+
}
|
|
783
|
+
toString() {
|
|
784
|
+
return this.toJSON();
|
|
785
|
+
}
|
|
786
|
+
toJSON() {
|
|
787
|
+
switch (this.type) {
|
|
788
|
+
case "added": return `Added \`${this.key}\``;
|
|
789
|
+
case "removed": return `Removed \`${this.key}\``;
|
|
790
|
+
case "changed": return `Changed \`${this.key}\` from \`${this.oldValue?.toString() || "-"}\` to \`${this.newValue.toString()}\``;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
var DiffHashedObject = class {
|
|
795
|
+
constructor(key, value, hash, props) {
|
|
796
|
+
this.key = key;
|
|
797
|
+
this.value = value;
|
|
798
|
+
this.hash = hash;
|
|
799
|
+
this.props = props;
|
|
800
|
+
}
|
|
801
|
+
toString() {
|
|
802
|
+
if (this.props) return `{${Object.keys(this.props).join(",")}}`;
|
|
803
|
+
else return JSON.stringify(this.value);
|
|
804
|
+
}
|
|
805
|
+
toJSON() {
|
|
806
|
+
const k = this.key || ".";
|
|
807
|
+
if (this.props) return `${k}({${Object.keys(this.props).join(",")}})`;
|
|
808
|
+
return `${k}(${this.value})`;
|
|
809
|
+
}
|
|
810
|
+
};
|
|
811
|
+
//#endregion
|
|
812
|
+
export { loadDotenv as a, loadConfig as i, utils_exports as n, setupDotenv as o, SUPPORTED_EXTENSIONS as r, watchConfig as s, dist_exports as t };
|