nitro 3.0.1-alpha.2 → 3.0.260415-beta
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 +6 -0
- package/README.md +2 -2
- package/dist/THIRD-PARTY-LICENSES.md +1646 -0
- package/dist/_build/common.mjs +7261 -3812
- package/dist/_build/rolldown.mjs +32 -42
- package/dist/_build/rollup.mjs +28 -48
- package/dist/_build/vite.build.mjs +10 -10
- package/dist/_chunks/nitro.mjs +102 -327
- package/dist/_chunks/nitro2.mjs +8 -9
- package/dist/_chunks/nitro3.mjs +136 -0
- package/dist/_chunks/nitro4.mjs +127 -0
- package/dist/_chunks/utils.mjs +40 -29
- package/dist/_common.mjs +13 -25
- package/dist/_dev.d.mts +0 -3
- package/dist/{_chunks/dev.mjs → _dev.mjs} +132 -330
- package/dist/_libs/_.mjs +2 -0
- package/dist/_libs/_2.mjs +2 -0
- package/dist/_libs/_3.mjs +2 -0
- package/dist/_libs/_4.mjs +2 -0
- package/dist/_libs/_5.mjs +2 -0
- package/dist/_libs/_6.mjs +2 -0
- package/dist/_libs/_7.mjs +2 -0
- package/dist/_libs/c12+rc9.mjs +814 -0
- package/dist/_libs/{c12+giget+readdirp+chokidar.d.mts → c12+readdirp+chokidar.d.mts} +49 -40
- package/dist/_libs/citty.mjs +142 -41
- package/dist/_libs/commondir+is-reference.mjs +60 -56
- package/dist/_libs/compatx.d.mts +0 -2
- package/dist/_libs/compatx.mjs +1 -4
- package/dist/_libs/esbuild.d.mts +0 -1
- package/dist/_libs/escape-string-regexp.mjs +1 -4
- package/dist/_libs/{pluginutils+plugin-commonjs.d.mts → estree+pluginutils.d.mts} +0 -5
- package/dist/_libs/estree-walker.mjs +4 -92
- package/dist/_libs/exsolve.d.mts +1 -0
- package/dist/_libs/hasown+resolve+deepmerge.mjs +160 -246
- package/dist/_libs/httpxy.d.mts +20 -13
- package/dist/_libs/httpxy.mjs +519 -95
- package/dist/_libs/js-tokens.d.mts +1 -0
- package/dist/_libs/klona.mjs +1 -4
- package/dist/_libs/magic-string.d.mts +0 -2
- package/dist/_libs/mlly.d.mts +0 -2
- package/dist/_libs/nypm+tinyexec.mjs +822 -0
- package/dist/_libs/perfect-debounce.mjs +68 -0
- package/dist/_libs/pkg-types.d.mts +0 -3
- package/dist/_libs/plugin-alias.mjs +1 -5
- package/dist/_libs/plugin-inject.mjs +1 -7
- package/dist/_libs/plugin-json.mjs +1 -5
- package/dist/_libs/pluginutils.mjs +3 -35
- package/dist/_libs/readdirp+chokidar.mjs +187 -365
- package/dist/_libs/remapping.mjs +1 -5
- package/dist/_libs/resolve-uri+gen-mapping.mjs +15 -53
- package/dist/_libs/rou3.d.mts +1 -4
- package/dist/_libs/rou3.mjs +223 -78
- package/dist/_libs/std-env.d.mts +8 -2
- package/dist/_libs/strip-literal.d.mts +1 -0
- package/dist/_libs/tsconfck.mjs +21 -334
- package/dist/_libs/ultrahtml.mjs +3 -16
- package/dist/_libs/unimport+unplugin.mjs +244 -388
- package/dist/_libs/unplugin+unimport.d.mts +5 -15
- package/dist/_libs/unwasm.d.mts +0 -3
- package/dist/_presets.mjs +576 -488
- package/dist/builder.d.mts +5 -25
- package/dist/builder.mjs +3 -8
- package/dist/cli/_chunks/build.mjs +22 -25
- package/dist/cli/_chunks/common.mjs +1 -4
- package/dist/cli/_chunks/deploy.mjs +37 -0
- package/dist/cli/_chunks/dev.mjs +6 -11
- package/dist/cli/_chunks/docs.mjs +28 -0
- package/dist/cli/_chunks/list.mjs +4 -8
- package/dist/cli/_chunks/prepare.mjs +2 -6
- package/dist/cli/_chunks/preview.mjs +48 -0
- package/dist/cli/_chunks/run.mjs +7 -11
- package/dist/cli/_chunks/task.mjs +1 -5
- package/dist/cli/index.mjs +5 -6
- package/dist/docs/0.docs/0.index/index.md +56 -0
- package/dist/docs/0.docs/1.quick-start.md +110 -0
- package/dist/docs/0.docs/10.lifecycle.md +204 -0
- package/dist/docs/0.docs/11.openapi.md +291 -0
- package/dist/docs/0.docs/12.plugins.md +164 -0
- package/dist/docs/0.docs/13.tasks.md +277 -0
- package/dist/docs/0.docs/14.websocket.md +386 -0
- package/dist/docs/0.docs/15.migration.md +213 -0
- package/dist/docs/0.docs/16.nightly.md +31 -0
- package/dist/docs/0.docs/2.renderer.md +322 -0
- package/dist/docs/0.docs/3.routing.md +711 -0
- package/dist/docs/0.docs/4.server-entry.md +239 -0
- package/dist/docs/0.docs/5.cache.md +408 -0
- package/dist/docs/0.docs/6.storage.md +261 -0
- package/dist/docs/0.docs/7.assets.md +166 -0
- package/dist/docs/0.docs/8.configuration.md +256 -0
- package/dist/docs/0.docs/9.database.md +185 -0
- package/dist/docs/1.deploy/0.index/index.md +64 -0
- package/dist/docs/1.deploy/1.runtimes/0.node.md +63 -0
- package/dist/docs/1.deploy/1.runtimes/1.bun.md +15 -0
- package/dist/docs/1.deploy/1.runtimes/2.deno.md +19 -0
- package/dist/docs/1.deploy/2.providers/0.alwaysdata.md +50 -0
- package/dist/docs/1.deploy/2.providers/1.aws.md +47 -0
- package/dist/docs/1.deploy/2.providers/10.flightcontrol.md +67 -0
- package/dist/docs/1.deploy/2.providers/11.genezio.md +67 -0
- package/dist/docs/1.deploy/2.providers/12.github-pages.md +68 -0
- package/dist/docs/1.deploy/2.providers/13.gitlab-pages.md +37 -0
- package/dist/docs/1.deploy/2.providers/14.heroku.md +84 -0
- package/dist/docs/1.deploy/2.providers/15.iis.md +38 -0
- package/dist/docs/1.deploy/2.providers/16.koyeb.md +109 -0
- package/dist/docs/1.deploy/2.providers/17.netlify.md +47 -0
- package/dist/docs/1.deploy/2.providers/18.platform-sh.md +37 -0
- package/dist/docs/1.deploy/2.providers/19.render.md +37 -0
- package/dist/docs/1.deploy/2.providers/2.aws-amplify.md +81 -0
- package/dist/docs/1.deploy/2.providers/20.stormkit.md +24 -0
- package/dist/docs/1.deploy/2.providers/21.vercel.md +270 -0
- package/dist/docs/1.deploy/2.providers/22.zeabur.md +19 -0
- package/dist/docs/1.deploy/2.providers/23.zephyr.md +99 -0
- package/dist/docs/1.deploy/2.providers/24.zerops.md +102 -0
- package/dist/docs/1.deploy/2.providers/3.azure.md +72 -0
- package/dist/docs/1.deploy/2.providers/4.cleavr.md +33 -0
- package/dist/docs/1.deploy/2.providers/5.cloudflare.md +369 -0
- package/dist/docs/1.deploy/2.providers/6.deno-deploy.md +66 -0
- package/dist/docs/1.deploy/2.providers/7.digitalocean.md +46 -0
- package/dist/docs/1.deploy/2.providers/8.edgeone.md +20 -0
- package/dist/docs/1.deploy/2.providers/9.firebase.md +32 -0
- package/dist/docs/2.config/0.index/index.md +1221 -0
- package/dist/docs/3.examples/0.index/index.md +3 -0
- package/dist/docs/3.examples/1.api-routes.md +145 -0
- package/dist/docs/3.examples/10.hono.md +74 -0
- package/dist/docs/3.examples/11.import-alias.md +97 -0
- package/dist/docs/3.examples/12.middleware.md +91 -0
- package/dist/docs/3.examples/13.mono-jsx.md +68 -0
- package/dist/docs/3.examples/14.nano-jsx.md +70 -0
- package/dist/docs/3.examples/15.plugins.md +91 -0
- package/dist/docs/3.examples/16.renderer.md +113 -0
- package/dist/docs/3.examples/17.runtime-config.md +97 -0
- package/dist/docs/3.examples/18.server-fetch.md +87 -0
- package/dist/docs/3.examples/19.shiki.md +198 -0
- package/dist/docs/3.examples/2.auto-imports.md +92 -0
- package/dist/docs/3.examples/20.virtual-routes.md +74 -0
- package/dist/docs/3.examples/21.vite-nitro-plugin.md +79 -0
- package/dist/docs/3.examples/22.vite-rsc.md +1041 -0
- package/dist/docs/3.examples/23.vite-ssr-html.md +217 -0
- package/dist/docs/3.examples/24.vite-ssr-preact.md +247 -0
- package/dist/docs/3.examples/25.vite-ssr-react.md +226 -0
- package/dist/docs/3.examples/26.vite-ssr-solid.md +256 -0
- package/dist/docs/3.examples/27.vite-ssr-tsr-react.md +442 -0
- package/dist/docs/3.examples/28.vite-ssr-tss-react.md +444 -0
- package/dist/docs/3.examples/29.vite-ssr-vue-router.md +617 -0
- package/dist/docs/3.examples/3.cached-handler.md +81 -0
- package/dist/docs/3.examples/30.vite-trpc.md +335 -0
- package/dist/docs/3.examples/31.websocket.md +282 -0
- package/dist/docs/3.examples/4.custom-error-handler.md +98 -0
- package/dist/docs/3.examples/5.database.md +157 -0
- package/dist/docs/3.examples/6.elysia.md +70 -0
- package/dist/docs/3.examples/7.express.md +78 -0
- package/dist/docs/3.examples/8.fastify.md +79 -0
- package/dist/docs/3.examples/9.hello-world.md +68 -0
- package/dist/docs/README.md +86 -0
- package/dist/docs/index.md +121 -0
- package/dist/node_modules/@poppinss/dumper/build/formatters/html/main.js +8 -0
- package/dist/node_modules/@poppinss/dumper/package.json +1 -1
- package/dist/node_modules/@speed-highlight/core/dist/index.js +4 -4
- package/dist/node_modules/@speed-highlight/core/dist/terminal.js +2 -2
- package/dist/node_modules/@speed-highlight/core/package.json +1 -1
- package/dist/node_modules/cookie-es/dist/index.mjs +299 -250
- package/dist/node_modules/cookie-es/package.json +26 -23
- package/dist/node_modules/croner/dist/croner.js +1 -1
- package/dist/node_modules/croner/package.json +11 -1
- package/dist/node_modules/defu/dist/defu.mjs +2 -2
- package/dist/node_modules/defu/package.json +33 -28
- package/dist/node_modules/rendu/dist/_chunks/libs/cookie-es.mjs +151 -0
- package/dist/node_modules/rendu/dist/index.mjs +5 -112
- package/dist/node_modules/rendu/package.json +25 -24
- package/dist/node_modules/youch/build/helpers-B9BQYaS6.js +23 -0
- package/dist/node_modules/youch/build/index.js +204 -351
- package/dist/node_modules/youch/build/public/error_info/script.js +1 -1
- 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 +35 -32
- package/dist/presets/_nitro/runtime/nitro-dev.mjs +12 -57
- package/dist/presets/_nitro/runtime/nitro-prerenderer.mjs +1 -0
- package/dist/presets/_nitro/runtime/service-worker.mjs +1 -2
- package/dist/presets/aws-lambda/runtime/_utils.mjs +6 -6
- package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.mjs +3 -1
- package/dist/presets/azure/runtime/_utils.mjs +5 -5
- package/dist/presets/azure/runtime/azure-swa.mjs +5 -5
- package/dist/presets/bun/runtime/bun.mjs +9 -6
- package/dist/presets/cloudflare/runtime/_module-handler.mjs +1 -1
- package/dist/presets/cloudflare/runtime/cloudflare-durable.mjs +4 -4
- package/dist/presets/cloudflare/runtime/cloudflare-module.mjs +3 -3
- package/dist/presets/cloudflare/runtime/cloudflare-pages.mjs +2 -2
- package/dist/presets/cloudflare/runtime/plugin.dev.mjs +10 -21
- package/dist/presets/deno/runtime/deno-deploy.mjs +4 -4
- package/dist/presets/deno/runtime/deno-server.mjs +9 -6
- package/dist/presets/edgeone/runtime/edgeone.mjs +10 -0
- package/dist/presets/netlify/runtime/netlify-edge.mjs +2 -3
- package/dist/presets/netlify/runtime/netlify.mjs +1 -1
- package/dist/presets/node/runtime/node-cluster.mjs +5 -4
- package/dist/presets/node/runtime/node-middleware.mjs +1 -1
- package/dist/presets/node/runtime/node-server.mjs +8 -5
- package/dist/presets/stormkit/runtime/stormkit.mjs +1 -2
- package/dist/presets/vercel/runtime/cron-handler.mjs +25 -0
- package/dist/presets/vercel/runtime/queue-handler.mjs +21 -0
- package/dist/presets/vercel/runtime/vercel.node.mjs +3 -3
- package/dist/presets/vercel/runtime/vercel.web.mjs +3 -5
- package/dist/presets/winterjs/runtime/winterjs.mjs +10 -10
- package/dist/presets/zephyr/runtime/server.mjs +3 -0
- package/dist/runtime/internal/app.mjs +12 -11
- package/dist/runtime/internal/cache.d.mts +0 -4
- package/dist/runtime/internal/cache.mjs +32 -256
- package/dist/runtime/internal/context.d.mts +3 -1
- package/dist/runtime/internal/context.mjs +1 -9
- package/dist/runtime/internal/error/dev.d.mts +5 -4
- package/dist/runtime/internal/error/dev.mjs +47 -49
- package/dist/runtime/internal/error/hooks.d.mts +1 -1
- package/dist/runtime/internal/error/prod.d.mts +2 -5
- package/dist/runtime/internal/error/prod.mjs +19 -33
- package/dist/runtime/internal/error/utils.d.mts +4 -4
- package/dist/runtime/internal/meta.d.mts +1 -1
- package/dist/runtime/internal/plugin.d.mts +2 -2
- package/dist/runtime/internal/route-rules.d.mts +11 -4
- package/dist/runtime/internal/route-rules.mjs +15 -5
- package/dist/runtime/internal/routes/dev-tasks.d.mts +3 -2
- package/dist/runtime/internal/routes/dev-tasks.mjs +15 -10
- package/dist/runtime/internal/routes/openapi.mjs +2 -2
- package/dist/runtime/internal/routes/renderer-template.d.mts +1 -1
- package/dist/runtime/internal/routes/renderer-template.dev.d.mts +2 -1
- package/dist/runtime/internal/routes/scalar.mjs +3 -3
- package/dist/runtime/internal/routes/swagger.mjs +7 -4
- package/dist/runtime/internal/runtime-config.d.mts +1 -1
- package/dist/runtime/internal/runtime-config.mjs +2 -2
- package/dist/runtime/internal/static.mjs +5 -4
- package/dist/runtime/internal/task.d.mts +3 -1
- package/dist/runtime/internal/task.mjs +7 -7
- package/dist/runtime/internal/vite/dev-entry.mjs +6 -3
- package/dist/runtime/internal/vite/dev-worker.mjs +264 -0
- package/dist/runtime/meta.d.mts +1 -0
- package/dist/runtime/meta.mjs +2 -0
- package/dist/runtime/nitro.d.mts +2 -0
- package/dist/runtime/nitro.mjs +4 -2
- package/dist/runtime/virtual/error-handler.mjs +1 -1
- package/dist/runtime/virtual/renderer-template.mjs +1 -1
- package/dist/runtime/virtual/server-assets.d.mts +2 -1
- package/dist/runtime/virtual/tracing.d.mts +5 -0
- package/dist/runtime/virtual/tracing.mjs +1 -0
- package/dist/runtime/vite.d.mts +1 -1
- package/dist/types/index.d.mts +215 -195
- package/dist/types/index.mjs +1 -11
- package/dist/vite.d.mts +3 -8
- package/dist/vite.mjs +285 -253
- package/lib/tsconfig.json +3 -5
- package/package.json +97 -80
- package/dist/_libs/confbox.mjs +0 -2509
- package/dist/_libs/nypm+giget+tinyexec.mjs +0 -3603
- package/dist/_libs/rc9+c12+dotenv.mjs +0 -972
- package/dist/node_modules/hookable/dist/index.mjs +0 -266
- package/dist/node_modules/hookable/package.json +0 -52
- package/dist/node_modules/youch/build/chunk-4L7RY2JA.js +0 -42
- package/dist/node_modules/youch/build/chunk-7QV3D5YX.js +0 -83
- package/dist/node_modules/youch/build/chunk-AUGPHE32.js +0 -39
- package/dist/node_modules/youch/build/chunk-CM7DWJNZ.js +0 -44
- package/dist/node_modules/youch/build/chunk-EJH674NB.js +0 -223
- package/dist/node_modules/youch/build/chunk-OIJ3WD7L.js +0 -81
- package/dist/node_modules/youch/build/chunk-P36L72PL.js +0 -87
- package/dist/node_modules/youch/build/chunk-PE3GG3TN.js +0 -65
- package/dist/node_modules/youch/build/chunk-X53OIOJH.js +0 -70
- package/dist/presets/_nitro/runtime/nitro-dev.d.mts +0 -2
- package/dist/presets/_nitro/runtime/nitro-prerenderer.d.mts +0 -3
- package/dist/presets/_nitro/runtime/service-worker.d.mts +0 -2
- package/dist/presets/aws-amplify/runtime/aws-amplify.d.mts +0 -2
- package/dist/presets/aws-lambda/runtime/_utils.d.mts +0 -8
- package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.d.mts +0 -2
- package/dist/presets/aws-lambda/runtime/aws-lambda.d.mts +0 -3
- package/dist/presets/azure/runtime/_utils.d.mts +0 -2
- package/dist/presets/azure/runtime/azure-swa.d.mts +0 -5
- package/dist/presets/bun/runtime/bun.d.mts +0 -3
- package/dist/presets/cloudflare/runtime/_module-handler.d.mts +0 -16
- package/dist/presets/cloudflare/runtime/cloudflare-durable.d.mts +0 -11
- package/dist/presets/cloudflare/runtime/cloudflare-module.d.mts +0 -3
- package/dist/presets/cloudflare/runtime/cloudflare-pages.d.mts +0 -20
- package/dist/presets/cloudflare/runtime/plugin.dev.d.mts +0 -3
- package/dist/presets/deno/runtime/deno-deploy.d.mts +0 -5
- package/dist/presets/deno/runtime/deno-server.d.mts +0 -3
- package/dist/presets/netlify/runtime/netlify-edge.d.mts +0 -3
- package/dist/presets/netlify/runtime/netlify.d.mts +0 -4
- package/dist/presets/node/runtime/node-cluster.d.mts +0 -3
- package/dist/presets/node/runtime/node-middleware.d.mts +0 -3
- package/dist/presets/node/runtime/node-server.d.mts +0 -3
- package/dist/presets/standard/runtime/server.d.mts +0 -3
- package/dist/presets/stormkit/runtime/stormkit.d.mts +0 -21
- package/dist/presets/vercel/runtime/isr.d.mts +0 -2
- package/dist/presets/vercel/runtime/vercel.node.d.mts +0 -3
- package/dist/presets/vercel/runtime/vercel.web.d.mts +0 -8
- package/dist/presets/winterjs/runtime/winterjs.d.mts +0 -2
- package/dist/presets/zeabur/runtime/zeabur.d.mts +0 -3
- package/dist/runtime/internal/vite/node-runner.mjs +0 -359
|
@@ -1,262 +1,311 @@
|
|
|
1
|
+
const COOKIE_MAX_AGE_LIMIT = 3456e4;
|
|
2
|
+
function endIndex(str, min, len) {
|
|
3
|
+
const index = str.indexOf(";", min);
|
|
4
|
+
return index === -1 ? len : index;
|
|
5
|
+
}
|
|
6
|
+
function eqIndex(str, min, max) {
|
|
7
|
+
const index = str.indexOf("=", min);
|
|
8
|
+
return index < max ? index : -1;
|
|
9
|
+
}
|
|
10
|
+
function valueSlice(str, min, max) {
|
|
11
|
+
if (min === max) return "";
|
|
12
|
+
let start = min;
|
|
13
|
+
let end = max;
|
|
14
|
+
do {
|
|
15
|
+
const code = str.charCodeAt(start);
|
|
16
|
+
if (code !== 32 && code !== 9) break;
|
|
17
|
+
} while (++start < end);
|
|
18
|
+
while (end > start) {
|
|
19
|
+
const code = str.charCodeAt(end - 1);
|
|
20
|
+
if (code !== 32 && code !== 9) break;
|
|
21
|
+
end--;
|
|
22
|
+
}
|
|
23
|
+
return str.slice(start, end);
|
|
24
|
+
}
|
|
25
|
+
const NullObject = /* @__PURE__ */ (() => {
|
|
26
|
+
const C = function() {};
|
|
27
|
+
C.prototype = Object.create(null);
|
|
28
|
+
return C;
|
|
29
|
+
})();
|
|
1
30
|
function parse(str, options) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
obj[key] = tryDecode(val, dec);
|
|
32
|
-
}
|
|
33
|
-
index = endIdx + 1;
|
|
34
|
-
}
|
|
35
|
-
return obj;
|
|
31
|
+
const obj = new NullObject();
|
|
32
|
+
const len = str.length;
|
|
33
|
+
if (len < 2) return obj;
|
|
34
|
+
const dec = options?.decode || decode;
|
|
35
|
+
const allowMultiple = options?.allowMultiple || false;
|
|
36
|
+
let index = 0;
|
|
37
|
+
do {
|
|
38
|
+
const eqIdx = eqIndex(str, index, len);
|
|
39
|
+
if (eqIdx === -1) break;
|
|
40
|
+
const endIdx = endIndex(str, index, len);
|
|
41
|
+
if (eqIdx > endIdx) {
|
|
42
|
+
index = str.lastIndexOf(";", eqIdx - 1) + 1;
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const key = valueSlice(str, index, eqIdx);
|
|
46
|
+
if (options?.filter && !options.filter(key)) {
|
|
47
|
+
index = endIdx + 1;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
const val = dec(valueSlice(str, eqIdx + 1, endIdx));
|
|
51
|
+
if (allowMultiple) {
|
|
52
|
+
const existing = obj[key];
|
|
53
|
+
if (existing === void 0) obj[key] = val;
|
|
54
|
+
else if (Array.isArray(existing)) existing.push(val);
|
|
55
|
+
else obj[key] = [existing, val];
|
|
56
|
+
} else if (obj[key] === void 0) obj[key] = val;
|
|
57
|
+
index = endIdx + 1;
|
|
58
|
+
} while (index < len);
|
|
59
|
+
return obj;
|
|
36
60
|
}
|
|
37
61
|
function decode(str) {
|
|
38
|
-
|
|
62
|
+
if (!str.includes("%")) return str;
|
|
63
|
+
try {
|
|
64
|
+
return decodeURIComponent(str);
|
|
65
|
+
} catch {
|
|
66
|
+
return str;
|
|
67
|
+
}
|
|
39
68
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
69
|
+
const cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/;
|
|
70
|
+
const cookieValueRegExp = /^[\u0021-\u003A\u003C-\u007E]*$/;
|
|
71
|
+
const domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
|
|
72
|
+
const pathValueRegExp = /^[\u0020-\u003A\u003C-\u007E]*$/;
|
|
73
|
+
const __toString = Object.prototype.toString;
|
|
74
|
+
function stringifyCookie(cookie, options) {
|
|
75
|
+
const enc = options?.encode || encodeURIComponent;
|
|
76
|
+
const keys = Object.keys(cookie);
|
|
77
|
+
let str = "";
|
|
78
|
+
for (const [i, name] of keys.entries()) {
|
|
79
|
+
const val = cookie[name];
|
|
80
|
+
if (val === void 0) continue;
|
|
81
|
+
if (!cookieNameRegExp.test(name)) throw new TypeError(`cookie name is invalid: ${name}`);
|
|
82
|
+
const value = enc(val);
|
|
83
|
+
if (!cookieValueRegExp.test(value)) throw new TypeError(`cookie val is invalid: ${val}`);
|
|
84
|
+
if (i > 0) str += "; ";
|
|
85
|
+
str += name + "=" + value;
|
|
86
|
+
}
|
|
87
|
+
return str;
|
|
46
88
|
}
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
str += "; SameSite=Strict";
|
|
119
|
-
break;
|
|
120
|
-
}
|
|
121
|
-
case "lax": {
|
|
122
|
-
str += "; SameSite=Lax";
|
|
123
|
-
break;
|
|
124
|
-
}
|
|
125
|
-
case "strict": {
|
|
126
|
-
str += "; SameSite=Strict";
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
case "none": {
|
|
130
|
-
str += "; SameSite=None";
|
|
131
|
-
break;
|
|
132
|
-
}
|
|
133
|
-
default: {
|
|
134
|
-
throw new TypeError("option sameSite is invalid");
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
if (opt.partitioned) {
|
|
139
|
-
str += "; Partitioned";
|
|
140
|
-
}
|
|
141
|
-
return str;
|
|
89
|
+
function serialize(_a0, _a1, _a2) {
|
|
90
|
+
const isObj = typeof _a0 === "object" && _a0 !== null;
|
|
91
|
+
const options = isObj ? _a1 : _a2;
|
|
92
|
+
const stringify = options?.stringify || JSON.stringify;
|
|
93
|
+
const cookie = isObj ? _a0 : {
|
|
94
|
+
..._a2,
|
|
95
|
+
name: _a0,
|
|
96
|
+
value: _a1 == void 0 ? "" : typeof _a1 === "string" ? _a1 : stringify(_a1)
|
|
97
|
+
};
|
|
98
|
+
const enc = options?.encode || encodeURIComponent;
|
|
99
|
+
if (!cookieNameRegExp.test(cookie.name)) throw new TypeError(`argument name is invalid: ${cookie.name}`);
|
|
100
|
+
const value = cookie.value ? enc(cookie.value) : "";
|
|
101
|
+
if (!cookieValueRegExp.test(value)) throw new TypeError(`argument val is invalid: ${cookie.value}`);
|
|
102
|
+
if (!cookie.secure) {
|
|
103
|
+
if (cookie.partitioned) throw new TypeError(`Partitioned cookies must have the Secure attribute`);
|
|
104
|
+
if (cookie.sameSite && String(cookie.sameSite).toLowerCase() === "none") throw new TypeError(`SameSite=None cookies must have the Secure attribute`);
|
|
105
|
+
if (cookie.name.length > 9 && cookie.name.charCodeAt(0) === 95 && cookie.name.charCodeAt(1) === 95) {
|
|
106
|
+
const nameLower = cookie.name.toLowerCase();
|
|
107
|
+
if (nameLower.startsWith("__secure-") || nameLower.startsWith("__host-")) throw new TypeError(`${cookie.name} cookies must have the Secure attribute`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (cookie.name.length > 7 && cookie.name.charCodeAt(0) === 95 && cookie.name.charCodeAt(1) === 95 && cookie.name.toLowerCase().startsWith("__host-")) {
|
|
111
|
+
if (cookie.path !== "/") throw new TypeError(`__Host- cookies must have Path=/`);
|
|
112
|
+
if (cookie.domain) throw new TypeError(`__Host- cookies must not have a Domain attribute`);
|
|
113
|
+
}
|
|
114
|
+
let str = cookie.name + "=" + value;
|
|
115
|
+
if (cookie.maxAge !== void 0) {
|
|
116
|
+
if (!Number.isInteger(cookie.maxAge)) throw new TypeError(`option maxAge is invalid: ${cookie.maxAge}`);
|
|
117
|
+
str += "; Max-Age=" + Math.max(0, Math.min(cookie.maxAge, COOKIE_MAX_AGE_LIMIT));
|
|
118
|
+
}
|
|
119
|
+
if (cookie.domain) {
|
|
120
|
+
if (!domainValueRegExp.test(cookie.domain)) throw new TypeError(`option domain is invalid: ${cookie.domain}`);
|
|
121
|
+
str += "; Domain=" + cookie.domain;
|
|
122
|
+
}
|
|
123
|
+
if (cookie.path) {
|
|
124
|
+
if (!pathValueRegExp.test(cookie.path)) throw new TypeError(`option path is invalid: ${cookie.path}`);
|
|
125
|
+
str += "; Path=" + cookie.path;
|
|
126
|
+
}
|
|
127
|
+
if (cookie.expires) {
|
|
128
|
+
if (!isDate(cookie.expires) || !Number.isFinite(cookie.expires.valueOf())) throw new TypeError(`option expires is invalid: ${cookie.expires}`);
|
|
129
|
+
str += "; Expires=" + cookie.expires.toUTCString();
|
|
130
|
+
}
|
|
131
|
+
if (cookie.httpOnly) str += "; HttpOnly";
|
|
132
|
+
if (cookie.secure) str += "; Secure";
|
|
133
|
+
if (cookie.partitioned) str += "; Partitioned";
|
|
134
|
+
if (cookie.priority) switch (typeof cookie.priority === "string" ? cookie.priority.toLowerCase() : void 0) {
|
|
135
|
+
case "low":
|
|
136
|
+
str += "; Priority=Low";
|
|
137
|
+
break;
|
|
138
|
+
case "medium":
|
|
139
|
+
str += "; Priority=Medium";
|
|
140
|
+
break;
|
|
141
|
+
case "high":
|
|
142
|
+
str += "; Priority=High";
|
|
143
|
+
break;
|
|
144
|
+
default: throw new TypeError(`option priority is invalid: ${cookie.priority}`);
|
|
145
|
+
}
|
|
146
|
+
if (cookie.sameSite) switch (typeof cookie.sameSite === "string" ? cookie.sameSite.toLowerCase() : cookie.sameSite) {
|
|
147
|
+
case true:
|
|
148
|
+
case "strict":
|
|
149
|
+
str += "; SameSite=Strict";
|
|
150
|
+
break;
|
|
151
|
+
case "lax":
|
|
152
|
+
str += "; SameSite=Lax";
|
|
153
|
+
break;
|
|
154
|
+
case "none":
|
|
155
|
+
str += "; SameSite=None";
|
|
156
|
+
break;
|
|
157
|
+
default: throw new TypeError(`option sameSite is invalid: ${cookie.sameSite}`);
|
|
158
|
+
}
|
|
159
|
+
return str;
|
|
142
160
|
}
|
|
143
161
|
function isDate(val) {
|
|
144
|
-
|
|
162
|
+
return __toString.call(val) === "[object Date]";
|
|
163
|
+
}
|
|
164
|
+
const maxAgeRegExp = /^-?\d+$/;
|
|
165
|
+
const _nullProto = /* @__PURE__ */ Object.getPrototypeOf({});
|
|
166
|
+
function parseSetCookie(str, options) {
|
|
167
|
+
const len = str.length;
|
|
168
|
+
let _endIdx = len;
|
|
169
|
+
let eqIdx = -1;
|
|
170
|
+
for (let i = 0; i < len; i++) {
|
|
171
|
+
const c = str.charCodeAt(i);
|
|
172
|
+
if (c === 59) {
|
|
173
|
+
_endIdx = i;
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
if (c === 61 && eqIdx === -1) eqIdx = i;
|
|
177
|
+
}
|
|
178
|
+
if (eqIdx >= _endIdx) eqIdx = -1;
|
|
179
|
+
const name = eqIdx === -1 ? "" : _trim(str, 0, eqIdx);
|
|
180
|
+
if (name && name in _nullProto) return void 0;
|
|
181
|
+
let value = eqIdx === -1 ? _trim(str, 0, _endIdx) : _trim(str, eqIdx + 1, _endIdx);
|
|
182
|
+
if (!name && !value) return void 0;
|
|
183
|
+
if (name.length + value.length > 4096) return void 0;
|
|
184
|
+
if (options?.decode !== false) value = _decode(value, options?.decode);
|
|
185
|
+
const setCookie = {
|
|
186
|
+
name,
|
|
187
|
+
value
|
|
188
|
+
};
|
|
189
|
+
let index = _endIdx + 1;
|
|
190
|
+
while (index < len) {
|
|
191
|
+
let endIdx = len;
|
|
192
|
+
let attrEqIdx = -1;
|
|
193
|
+
for (let i = index; i < len; i++) {
|
|
194
|
+
const c = str.charCodeAt(i);
|
|
195
|
+
if (c === 59) {
|
|
196
|
+
endIdx = i;
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
if (c === 61 && attrEqIdx === -1) attrEqIdx = i;
|
|
200
|
+
}
|
|
201
|
+
if (attrEqIdx >= endIdx) attrEqIdx = -1;
|
|
202
|
+
const attr = attrEqIdx === -1 ? _trim(str, index, endIdx) : _trim(str, index, attrEqIdx);
|
|
203
|
+
const val = attrEqIdx === -1 ? void 0 : _trim(str, attrEqIdx + 1, endIdx);
|
|
204
|
+
if (val === void 0 || val.length <= 1024) switch (attr.toLowerCase()) {
|
|
205
|
+
case "httponly":
|
|
206
|
+
setCookie.httpOnly = true;
|
|
207
|
+
break;
|
|
208
|
+
case "secure":
|
|
209
|
+
setCookie.secure = true;
|
|
210
|
+
break;
|
|
211
|
+
case "partitioned":
|
|
212
|
+
setCookie.partitioned = true;
|
|
213
|
+
break;
|
|
214
|
+
case "domain":
|
|
215
|
+
if (val) setCookie.domain = (val.charCodeAt(0) === 46 ? val.slice(1) : val).toLowerCase();
|
|
216
|
+
break;
|
|
217
|
+
case "path":
|
|
218
|
+
setCookie.path = val;
|
|
219
|
+
break;
|
|
220
|
+
case "max-age":
|
|
221
|
+
if (val && maxAgeRegExp.test(val)) setCookie.maxAge = Math.min(Number(val), COOKIE_MAX_AGE_LIMIT);
|
|
222
|
+
break;
|
|
223
|
+
case "expires": {
|
|
224
|
+
if (!val) break;
|
|
225
|
+
const date = new Date(val);
|
|
226
|
+
if (Number.isFinite(date.valueOf())) {
|
|
227
|
+
const maxDate = new Date(Date.now() + COOKIE_MAX_AGE_LIMIT * 1e3);
|
|
228
|
+
setCookie.expires = date > maxDate ? maxDate : date;
|
|
229
|
+
}
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
case "priority": {
|
|
233
|
+
if (!val) break;
|
|
234
|
+
const priority = val.toLowerCase();
|
|
235
|
+
if (priority === "low" || priority === "medium" || priority === "high") setCookie.priority = priority;
|
|
236
|
+
break;
|
|
237
|
+
}
|
|
238
|
+
case "samesite": {
|
|
239
|
+
if (!val) break;
|
|
240
|
+
const sameSite = val.toLowerCase();
|
|
241
|
+
if (sameSite === "lax" || sameSite === "strict" || sameSite === "none") setCookie.sameSite = sameSite;
|
|
242
|
+
else setCookie.sameSite = "lax";
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
default: {
|
|
246
|
+
const attrLower = attr.toLowerCase();
|
|
247
|
+
if (attrLower && !(attrLower in _nullProto)) setCookie[attrLower] = val;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
index = endIdx + 1;
|
|
251
|
+
}
|
|
252
|
+
return setCookie;
|
|
145
253
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
try {
|
|
154
|
-
value = options?.decode === false ? value : (options?.decode || decodeURIComponent)(value);
|
|
155
|
-
} catch {
|
|
156
|
-
}
|
|
157
|
-
const cookie = {
|
|
158
|
-
name,
|
|
159
|
-
value
|
|
160
|
-
};
|
|
161
|
-
for (const part of parts) {
|
|
162
|
-
const sides = part.split("=");
|
|
163
|
-
const partKey = (sides.shift() || "").trimStart().toLowerCase();
|
|
164
|
-
const partValue = sides.join("=");
|
|
165
|
-
switch (partKey) {
|
|
166
|
-
case "expires": {
|
|
167
|
-
cookie.expires = new Date(partValue);
|
|
168
|
-
break;
|
|
169
|
-
}
|
|
170
|
-
case "max-age": {
|
|
171
|
-
cookie.maxAge = Number.parseInt(partValue, 10);
|
|
172
|
-
break;
|
|
173
|
-
}
|
|
174
|
-
case "secure": {
|
|
175
|
-
cookie.secure = true;
|
|
176
|
-
break;
|
|
177
|
-
}
|
|
178
|
-
case "httponly": {
|
|
179
|
-
cookie.httpOnly = true;
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
case "samesite": {
|
|
183
|
-
cookie.sameSite = partValue;
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
default: {
|
|
187
|
-
cookie[partKey] = partValue;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
return cookie;
|
|
254
|
+
function _trim(str, start, end) {
|
|
255
|
+
if (start === end) return "";
|
|
256
|
+
let s = start;
|
|
257
|
+
let e = end;
|
|
258
|
+
while (s < e && (str.charCodeAt(s) === 32 || str.charCodeAt(s) === 9)) s++;
|
|
259
|
+
while (e > s && (str.charCodeAt(e - 1) === 32 || str.charCodeAt(e - 1) === 9)) e--;
|
|
260
|
+
return str.slice(s, e);
|
|
192
261
|
}
|
|
193
|
-
function
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
} else {
|
|
201
|
-
value = nameValuePairStr;
|
|
202
|
-
}
|
|
203
|
-
return { name, value };
|
|
262
|
+
function _decode(value, decode) {
|
|
263
|
+
if (!decode && !value.includes("%")) return value;
|
|
264
|
+
try {
|
|
265
|
+
return (decode || decodeURIComponent)(value);
|
|
266
|
+
} catch {
|
|
267
|
+
return value;
|
|
268
|
+
}
|
|
204
269
|
}
|
|
205
|
-
|
|
206
270
|
function splitSetCookieString(cookiesString) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
cookiesStrings.push(cookiesString.slice(start, lastComma));
|
|
247
|
-
start = pos;
|
|
248
|
-
} else {
|
|
249
|
-
pos = lastComma + 1;
|
|
250
|
-
}
|
|
251
|
-
} else {
|
|
252
|
-
pos += 1;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
|
256
|
-
cookiesStrings.push(cookiesString.slice(start));
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
return cookiesStrings;
|
|
271
|
+
if (Array.isArray(cookiesString)) return cookiesString.flatMap((c) => splitSetCookieString(c));
|
|
272
|
+
if (typeof cookiesString !== "string") return [];
|
|
273
|
+
const cookiesStrings = [];
|
|
274
|
+
let pos = 0;
|
|
275
|
+
let start;
|
|
276
|
+
let ch;
|
|
277
|
+
let lastComma;
|
|
278
|
+
let nextStart;
|
|
279
|
+
let cookiesSeparatorFound;
|
|
280
|
+
const skipWhitespace = () => {
|
|
281
|
+
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) pos += 1;
|
|
282
|
+
return pos < cookiesString.length;
|
|
283
|
+
};
|
|
284
|
+
const notSpecialChar = () => {
|
|
285
|
+
ch = cookiesString.charAt(pos);
|
|
286
|
+
return ch !== "=" && ch !== ";" && ch !== ",";
|
|
287
|
+
};
|
|
288
|
+
while (pos < cookiesString.length) {
|
|
289
|
+
start = pos;
|
|
290
|
+
cookiesSeparatorFound = false;
|
|
291
|
+
while (skipWhitespace()) {
|
|
292
|
+
ch = cookiesString.charAt(pos);
|
|
293
|
+
if (ch === ",") {
|
|
294
|
+
lastComma = pos;
|
|
295
|
+
pos += 1;
|
|
296
|
+
skipWhitespace();
|
|
297
|
+
nextStart = pos;
|
|
298
|
+
while (pos < cookiesString.length && notSpecialChar()) pos += 1;
|
|
299
|
+
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
|
300
|
+
cookiesSeparatorFound = true;
|
|
301
|
+
pos = nextStart;
|
|
302
|
+
cookiesStrings.push(cookiesString.slice(start, lastComma));
|
|
303
|
+
start = pos;
|
|
304
|
+
} else pos = lastComma + 1;
|
|
305
|
+
} else pos += 1;
|
|
306
|
+
}
|
|
307
|
+
if (!cookiesSeparatorFound || pos >= cookiesString.length) cookiesStrings.push(cookiesString.slice(start));
|
|
308
|
+
}
|
|
309
|
+
return cookiesStrings;
|
|
260
310
|
}
|
|
261
|
-
|
|
262
|
-
export { parse, parseSetCookie, serialize, splitSetCookieString };
|
|
311
|
+
export { parse, parse as parseCookie, parseSetCookie, serialize, serialize as serializeCookie, splitSetCookieString, stringifyCookie };
|
|
@@ -1,37 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cookie-es",
|
|
3
|
-
"version": "
|
|
4
|
-
"repository": "unjs/cookie-es",
|
|
3
|
+
"version": "3.1.1",
|
|
5
4
|
"license": "MIT",
|
|
6
|
-
"
|
|
7
|
-
"type": "module",
|
|
8
|
-
"exports": {
|
|
9
|
-
"types": "./dist/index.d.mts",
|
|
10
|
-
"default": "./dist/index.mjs"
|
|
11
|
-
},
|
|
12
|
-
"types": "./dist/index.d.mts",
|
|
5
|
+
"repository": "unjs/cookie-es",
|
|
13
6
|
"files": [
|
|
14
7
|
"dist"
|
|
15
8
|
],
|
|
9
|
+
"type": "module",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"types": "./dist/index.d.mts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./dist/index.mjs"
|
|
14
|
+
},
|
|
16
15
|
"scripts": {
|
|
17
|
-
"build": "
|
|
16
|
+
"build": "obuild",
|
|
18
17
|
"dev": "vitest --coverage",
|
|
19
|
-
"lint": "
|
|
20
|
-
"
|
|
18
|
+
"lint": "oxlint . && oxfmt --check src test",
|
|
19
|
+
"fmt": "automd && oxlint . --fix && oxfmt src test",
|
|
21
20
|
"release": "pnpm test && pnpm build && changelogen --release --push && npm publish",
|
|
22
21
|
"test": "pnpm lint && vitest run --coverage"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
|
25
|
-
"@types/node": "^
|
|
26
|
-
"@vitest/coverage-v8": "^
|
|
27
|
-
"automd": "^0.4.
|
|
28
|
-
"changelogen": "^0.6.
|
|
29
|
-
"
|
|
30
|
-
"eslint-config-unjs": "^0.
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
24
|
+
"@types/node": "^25.5.0",
|
|
25
|
+
"@vitest/coverage-v8": "^4.1.1",
|
|
26
|
+
"automd": "^0.4.3",
|
|
27
|
+
"changelogen": "^0.6.2",
|
|
28
|
+
"cookie": "^1.1.1",
|
|
29
|
+
"eslint-config-unjs": "^0.6.2",
|
|
30
|
+
"magic-string": "^0.30.21",
|
|
31
|
+
"mitata": "^1.0.34",
|
|
32
|
+
"obuild": "^0.4.32",
|
|
33
|
+
"oxfmt": "^0.41.0",
|
|
34
|
+
"oxlint": "^1.56.0",
|
|
35
|
+
"rolldown": "1.0.0-rc.11",
|
|
36
|
+
"typescript": "^6.0.2",
|
|
37
|
+
"vitest": "^4.1.1"
|
|
35
38
|
},
|
|
36
|
-
"packageManager": "pnpm@10.
|
|
39
|
+
"packageManager": "pnpm@10.32.1"
|
|
37
40
|
}
|