nitro 3.0.1-alpha.2 → 3.0.260311-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 +6977 -2556
- package/dist/_build/rolldown.mjs +32 -31
- package/dist/_build/rollup.mjs +28 -35
- package/dist/_build/vite.build.mjs +10 -8
- package/dist/_chunks/nitro.mjs +80 -112
- package/dist/_chunks/nitro2.mjs +8 -7
- package/dist/_chunks/nitro3.mjs +129 -0
- package/dist/_chunks/utils.mjs +42 -24
- package/dist/_common.mjs +14 -24
- package/dist/{_chunks/dev.mjs → _dev.mjs} +132 -320
- 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+giget+readdirp+chokidar.d.mts → c12+readdirp+chokidar.d.mts} +52 -36
- package/dist/_libs/citty.mjs +10 -12
- package/dist/_libs/commondir+is-reference.mjs +60 -49
- package/dist/_libs/compatx.mjs +1 -2
- package/dist/_libs/esbuild.d.mts +1 -1
- package/dist/_libs/escape-string-regexp.mjs +1 -2
- package/dist/_libs/{pluginutils+plugin-commonjs.d.mts → estree+pluginutils.d.mts} +2 -2
- package/dist/_libs/estree-walker.mjs +1 -4
- package/dist/_libs/exsolve.d.mts +1 -0
- package/dist/_libs/hasown+resolve+deepmerge.mjs +146 -169
- package/dist/_libs/httpxy.d.mts +12 -9
- package/dist/_libs/httpxy.mjs +299 -43
- package/dist/_libs/js-tokens.d.mts +1 -0
- package/dist/_libs/klona.mjs +1 -2
- package/dist/_libs/mlly.d.mts +1 -1
- package/dist/_libs/nypm+tinyexec.mjs +845 -0
- package/dist/_libs/perfect-debounce.mjs +88 -0
- package/dist/_libs/plugin-alias.mjs +2 -4
- package/dist/_libs/plugin-inject.mjs +2 -6
- package/dist/_libs/plugin-json.mjs +2 -4
- package/dist/_libs/pluginutils.mjs +5 -11
- package/dist/_libs/readdirp+chokidar.mjs +187 -192
- package/dist/_libs/remapping.mjs +1 -3
- package/dist/_libs/resolve-uri+gen-mapping.mjs +15 -21
- package/dist/_libs/rou3.d.mts +3 -2
- package/dist/_libs/rou3.mjs +225 -51
- package/dist/_libs/std-env.d.mts +10 -2
- package/dist/_libs/strip-literal.d.mts +1 -0
- package/dist/_libs/tsconfck.mjs +21 -40
- package/dist/_libs/ultrahtml.mjs +3 -14
- package/dist/_libs/unimport+unplugin.mjs +250 -351
- package/dist/_libs/unplugin+unimport.d.mts +7 -10
- package/dist/_presets.mjs +389 -432
- package/dist/builder.d.mts +5 -4
- package/dist/builder.mjs +12 -6
- package/dist/cli/_chunks/build.mjs +22 -23
- package/dist/cli/_chunks/common.mjs +1 -2
- package/dist/cli/_chunks/deploy.mjs +40 -0
- package/dist/cli/_chunks/dev.mjs +9 -9
- package/dist/cli/_chunks/docs.mjs +30 -0
- package/dist/cli/_chunks/list.mjs +4 -6
- package/dist/cli/_chunks/prepare.mjs +2 -4
- package/dist/cli/_chunks/preview.mjs +51 -0
- package/dist/cli/_chunks/run.mjs +7 -9
- package/dist/cli/_chunks/task.mjs +1 -3
- package/dist/cli/index.mjs +5 -4
- 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/croner/dist/croner.js +1 -1
- package/dist/node_modules/croner/package.json +11 -1
- 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 +34 -31
- package/dist/presets/_nitro/runtime/nitro-dev.mjs +9 -56
- package/dist/presets/_nitro/runtime/nitro-prerenderer.mjs +1 -0
- package/dist/presets/_nitro/runtime/service-worker.mjs +0 -1
- package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.mjs +3 -1
- package/dist/presets/bun/runtime/bun.mjs +4 -3
- package/dist/presets/deno/runtime/deno-server.mjs +4 -3
- package/dist/presets/netlify/runtime/netlify-edge.mjs +0 -1
- package/dist/presets/netlify/runtime/netlify.mjs +1 -1
- package/dist/presets/node/runtime/node-cluster.mjs +3 -2
- package/dist/presets/node/runtime/node-server.mjs +3 -2
- package/dist/presets/stormkit/runtime/stormkit.mjs +0 -1
- package/dist/presets/vercel/runtime/cron-handler.mjs +25 -0
- package/dist/presets/vercel/runtime/vercel.web.mjs +2 -4
- package/dist/presets/zephyr/runtime/server.mjs +3 -0
- 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/error/dev.d.mts +5 -4
- package/dist/runtime/internal/error/dev.mjs +38 -40
- 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 +9 -4
- package/dist/runtime/internal/route-rules.mjs +9 -1
- package/dist/runtime/internal/routes/dev-tasks.d.mts +3 -2
- package/dist/runtime/internal/routes/dev-tasks.mjs +6 -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/runtime-config.d.mts +1 -1
- package/dist/runtime/internal/static.mjs +5 -4
- package/dist/runtime/internal/task.d.mts +3 -1
- package/dist/runtime/internal/task.mjs +2 -2
- package/dist/runtime/internal/vite/dev-entry.mjs +6 -3
- package/dist/runtime/internal/vite/dev-worker.mjs +264 -0
- package/dist/runtime/meta.mjs +1 -0
- package/dist/runtime/nitro.d.mts +2 -0
- package/dist/runtime/nitro.mjs +2 -0
- package/dist/runtime/virtual/error-handler.mjs +1 -1
- package/dist/runtime/virtual/server-assets.d.mts +2 -1
- package/dist/runtime/vite.d.mts +1 -1
- package/dist/types/index.d.mts +68 -117
- package/dist/types/index.mjs +1 -11
- package/dist/vite.d.mts +3 -3
- package/dist/vite.mjs +236 -233
- package/package.json +83 -68
- 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
- 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,9 +1,38 @@
|
|
|
1
1
|
import { Stats } from "node:fs";
|
|
2
|
-
import { Jiti, JitiOptions } from "jiti";
|
|
3
2
|
import { EventEmitter } from "node:events";
|
|
4
3
|
import { Readable } from "node:stream";
|
|
5
|
-
import {
|
|
4
|
+
import { DownloadTemplateOptions } from "giget";
|
|
6
5
|
|
|
6
|
+
//#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.d.mts
|
|
7
|
+
//#region node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/utils/index.d.mts
|
|
8
|
+
/**
|
|
9
|
+
* Calculates the difference between two objects and returns a list of differences.
|
|
10
|
+
*
|
|
11
|
+
* @param {any} obj1 - The first object to compare.
|
|
12
|
+
* @param {any} obj2 - The second object to compare.
|
|
13
|
+
* @param {HashOptions} [opts={}] - Configuration options for hashing the objects. See {@link HashOptions}.
|
|
14
|
+
* @returns {DiffEntry[]} An array with the differences between the two objects.
|
|
15
|
+
*/
|
|
16
|
+
declare function diff(obj1: any, obj2: any): DiffEntry[];
|
|
17
|
+
declare class DiffEntry {
|
|
18
|
+
key: string;
|
|
19
|
+
type: "changed" | "added" | "removed";
|
|
20
|
+
newValue: DiffHashedObject;
|
|
21
|
+
oldValue?: DiffHashedObject | undefined;
|
|
22
|
+
constructor(key: string, type: "changed" | "added" | "removed", newValue: DiffHashedObject, oldValue?: DiffHashedObject | undefined);
|
|
23
|
+
toString(): string;
|
|
24
|
+
toJSON(): string;
|
|
25
|
+
}
|
|
26
|
+
declare class DiffHashedObject {
|
|
27
|
+
key: string;
|
|
28
|
+
value: any;
|
|
29
|
+
hash?: string | undefined;
|
|
30
|
+
props?: Record<string, DiffHashedObject> | undefined;
|
|
31
|
+
constructor(key: string, value: any, hash?: string | undefined, props?: Record<string, DiffHashedObject> | undefined);
|
|
32
|
+
toString(): string;
|
|
33
|
+
toJSON(): string;
|
|
34
|
+
} //#endregion
|
|
35
|
+
//#endregion
|
|
7
36
|
//#region node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/index.d.ts
|
|
8
37
|
type AWF = {
|
|
9
38
|
stabilityThreshold: number;
|
|
@@ -33,38 +62,7 @@ interface MatcherObject {
|
|
|
33
62
|
}
|
|
34
63
|
type Matcher = string | RegExp | MatchFunction | MatcherObject;
|
|
35
64
|
//#endregion
|
|
36
|
-
//#region node_modules/.pnpm/
|
|
37
|
-
interface TemplateInfo {
|
|
38
|
-
name: string;
|
|
39
|
-
tar: string;
|
|
40
|
-
version?: string;
|
|
41
|
-
subdir?: string;
|
|
42
|
-
url?: string;
|
|
43
|
-
defaultDir?: string;
|
|
44
|
-
headers?: Record<string, string | undefined>;
|
|
45
|
-
source?: never;
|
|
46
|
-
dir?: never;
|
|
47
|
-
[key: string]: any;
|
|
48
|
-
}
|
|
49
|
-
type TemplateProvider = (input: string, options: {
|
|
50
|
-
auth?: string;
|
|
51
|
-
}) => TemplateInfo | Promise<TemplateInfo> | null;
|
|
52
|
-
interface DownloadTemplateOptions {
|
|
53
|
-
provider?: string;
|
|
54
|
-
force?: boolean;
|
|
55
|
-
forceClean?: boolean;
|
|
56
|
-
offline?: boolean;
|
|
57
|
-
preferOffline?: boolean;
|
|
58
|
-
providers?: Record<string, TemplateProvider>;
|
|
59
|
-
dir?: string;
|
|
60
|
-
registry?: false | string;
|
|
61
|
-
cwd?: string;
|
|
62
|
-
auth?: string;
|
|
63
|
-
install?: boolean;
|
|
64
|
-
silent?: boolean;
|
|
65
|
-
}
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.d.mts
|
|
65
|
+
//#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.d.mts
|
|
68
66
|
//#region src/dotenv.d.ts
|
|
69
67
|
interface DotenvOptions {
|
|
70
68
|
/**
|
|
@@ -94,6 +92,22 @@ interface DotenvOptions {
|
|
|
94
92
|
* An object describing environment variables (key, value pairs).
|
|
95
93
|
*/
|
|
96
94
|
env?: NodeJS.ProcessEnv;
|
|
95
|
+
/**
|
|
96
|
+
* Resolve `_FILE` suffixed environment variables by reading the file at the
|
|
97
|
+
* specified path and assigning its trimmed content to the base key.
|
|
98
|
+
*
|
|
99
|
+
* This is useful for container secrets (e.g. Docker, Kubernetes) where
|
|
100
|
+
* sensitive values are mounted as files.
|
|
101
|
+
*
|
|
102
|
+
* @default false
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```env
|
|
106
|
+
* DATABASE_PASSWORD_FILE="/run/secrets/db_password"
|
|
107
|
+
* # resolves to DATABASE_PASSWORD=<contents of /run/secrets/db_password>
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
expandFileReferences?: boolean;
|
|
97
111
|
}
|
|
98
112
|
declare global {
|
|
99
113
|
var __c12_dotenv_vars__: Map<Record<string, any>, Set<string>>;
|
|
@@ -176,8 +190,10 @@ interface LoadConfigOptions<T extends UserInputConfig = UserInputConfig, MT exte
|
|
|
176
190
|
/** Context passed to config functions */
|
|
177
191
|
context?: ConfigFunctionContext;
|
|
178
192
|
resolve?: (id: string, options: LoadConfigOptions<T, MT>) => null | undefined | ResolvedConfig<T, MT> | Promise<ResolvedConfig<T, MT> | undefined | null>;
|
|
179
|
-
|
|
180
|
-
|
|
193
|
+
/** Custom import function used to load configuration files */
|
|
194
|
+
import?: (id: string) => Promise<unknown>;
|
|
195
|
+
/** Custom resolver for picking which export to use from the loaded module. Default: `(mod) => mod.default || mod` */
|
|
196
|
+
resolveModule?: (mod: any) => any;
|
|
181
197
|
giget?: false | DownloadTemplateOptions;
|
|
182
198
|
merger?: (...sources: Array<T | null | undefined>) => T;
|
|
183
199
|
extend?: false | {
|
package/dist/_libs/citty.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { parseArgs } from "node:util";
|
|
2
|
-
|
|
3
|
-
//#region node_modules/.pnpm/citty@0.2.0/node_modules/citty/dist/_chunks/libs/scule.mjs
|
|
2
|
+
//#region node_modules/.pnpm/citty@0.2.1/node_modules/citty/dist/_chunks/libs/scule.mjs
|
|
4
3
|
const NUMBER_CHAR_RE = /\d/;
|
|
5
4
|
const STR_SPLITTERS = [
|
|
6
5
|
"-",
|
|
@@ -65,9 +64,8 @@ function camelCase(str, opts) {
|
|
|
65
64
|
function kebabCase(str, joiner) {
|
|
66
65
|
return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => p.toLowerCase()).join(joiner ?? "-") : "";
|
|
67
66
|
}
|
|
68
|
-
|
|
69
67
|
//#endregion
|
|
70
|
-
//#region node_modules/.pnpm/citty@0.2.
|
|
68
|
+
//#region node_modules/.pnpm/citty@0.2.1/node_modules/citty/dist/index.mjs
|
|
71
69
|
function toArray(val) {
|
|
72
70
|
if (Array.isArray(val)) return val;
|
|
73
71
|
return val === void 0 ? [] : [val];
|
|
@@ -157,7 +155,13 @@ function parseRawArgs(args = [], opts = {}) {
|
|
|
157
155
|
const out = { _: [] };
|
|
158
156
|
out._ = parsed.positionals;
|
|
159
157
|
for (const [key, value] of Object.entries(parsed.values)) out[key] = value;
|
|
160
|
-
for (const [name] of Object.entries(negatedFlags))
|
|
158
|
+
for (const [name] of Object.entries(negatedFlags)) {
|
|
159
|
+
out[name] = false;
|
|
160
|
+
const mainName = aliasToMain.get(name);
|
|
161
|
+
if (mainName) out[mainName] = false;
|
|
162
|
+
const aliases = mainToAliases.get(name);
|
|
163
|
+
if (aliases) for (const alias of aliases) out[alias] = false;
|
|
164
|
+
}
|
|
161
165
|
for (const [alias, main] of aliasToMain.entries()) {
|
|
162
166
|
if (out[alias] !== void 0 && out[main] === void 0) out[main] = out[alias];
|
|
163
167
|
if (out[main] !== void 0 && out[alias] === void 0) out[alias] = out[main];
|
|
@@ -294,11 +298,6 @@ async function renderUsage(cmd, parent) {
|
|
|
294
298
|
const isRequired = arg.required === true && arg.default === void 0;
|
|
295
299
|
const argStr = [...(arg.alias || []).map((a) => `-${a}`), `--${arg.name}`].join(", ") + (arg.type === "string" && (arg.valueHint || arg.default) ? `=${arg.valueHint ? `<${arg.valueHint}>` : `"${arg.default || ""}"`}` : "") + (arg.type === "enum" && arg.options ? `=<${arg.options.join("|")}>` : "");
|
|
296
300
|
argLines.push([cyan(argStr + (isRequired ? " (required)" : "")), arg.description || ""]);
|
|
297
|
-
/**
|
|
298
|
-
* print negative boolean arg variant usage when
|
|
299
|
-
* - enabled by default or has `negativeDescription`
|
|
300
|
-
* - not prefixed with `no-` or `no[A-Z]`
|
|
301
|
-
*/
|
|
302
301
|
if (arg.type === "boolean" && (arg.default === true || arg.negativeDescription) && !negativePrefixRe.test(arg.name)) {
|
|
303
302
|
const negativeArgStr = [...(arg.alias || []).map((a) => `--no-${a}`), `--no-${arg.name}`].join(", ");
|
|
304
303
|
argLines.push([cyan(negativeArgStr + (isRequired ? " (required)" : "")), arg.negativeDescription || ""]);
|
|
@@ -358,6 +357,5 @@ async function runMain(cmd, opts = {}) {
|
|
|
358
357
|
process.exit(1);
|
|
359
358
|
}
|
|
360
359
|
}
|
|
361
|
-
|
|
362
360
|
//#endregion
|
|
363
|
-
export { runMain as n, defineCommand as t };
|
|
361
|
+
export { runMain as n, defineCommand as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "../_common.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { P as Builder, S as MagicString, c as walk, i as createFilter, o as extractAssignedNames, r as attachScopes, s as makeLegalIdentifier } from "../_build/common.mjs";
|
|
3
3
|
import { existsSync, readFileSync, statSync } from "fs";
|
|
4
4
|
import { basename, dirname, extname, join, relative, resolve, sep } from "path";
|
|
5
|
-
|
|
6
5
|
//#region node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js
|
|
7
6
|
var require_commondir = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8
7
|
var path$1 = __require("path");
|
|
@@ -20,42 +19,31 @@ var require_commondir = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
20
19
|
return res.length > 1 ? res.join("/") : "/";
|
|
21
20
|
};
|
|
22
21
|
}));
|
|
23
|
-
|
|
24
22
|
//#endregion
|
|
25
|
-
//#region node_modules/.pnpm/is-reference@1.2.1/node_modules/is-reference/dist/is-reference.js
|
|
26
|
-
|
|
27
|
-
(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
case "ImportSpecifier": return node === parent.local;
|
|
42
|
-
case "LabeledStatement":
|
|
43
|
-
case "BreakStatement":
|
|
44
|
-
case "ContinueStatement": return false;
|
|
45
|
-
default: return true;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return false;
|
|
23
|
+
//#region node_modules/.pnpm/is-reference@1.2.1/node_modules/is-reference/dist/is-reference.es.js
|
|
24
|
+
function isReference(node, parent) {
|
|
25
|
+
if (node.type === "MemberExpression") return !node.computed && isReference(node.object, node);
|
|
26
|
+
if (node.type === "Identifier") {
|
|
27
|
+
if (!parent) return true;
|
|
28
|
+
switch (parent.type) {
|
|
29
|
+
case "MemberExpression": return parent.computed || node === parent.object;
|
|
30
|
+
case "MethodDefinition": return parent.computed;
|
|
31
|
+
case "FieldDefinition": return parent.computed || node === parent.value;
|
|
32
|
+
case "Property": return parent.computed || node === parent.value;
|
|
33
|
+
case "ExportSpecifier":
|
|
34
|
+
case "ImportSpecifier": return node === parent.local;
|
|
35
|
+
case "LabeledStatement":
|
|
36
|
+
case "BreakStatement":
|
|
37
|
+
case "ContinueStatement": return false;
|
|
38
|
+
default: return true;
|
|
49
39
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
54
43
|
//#endregion
|
|
55
|
-
//#region node_modules/.pnpm/@rollup+plugin-commonjs@29.0.
|
|
44
|
+
//#region node_modules/.pnpm/@rollup+plugin-commonjs@29.0.2_rollup@4.59.0/node_modules/@rollup/plugin-commonjs/dist/es/index.js
|
|
56
45
|
var import_commondir = /* @__PURE__ */ __toESM(require_commondir(), 1);
|
|
57
|
-
var
|
|
58
|
-
var version = "29.0.0";
|
|
46
|
+
var version = "29.0.1";
|
|
59
47
|
var peerDependencies = { rollup: "^2.68.0||^3.0.0||^4.0.0" };
|
|
60
48
|
function tryParse(parse, code, id) {
|
|
61
49
|
try {
|
|
@@ -118,10 +106,10 @@ function getName(id) {
|
|
|
118
106
|
if (name !== "index") return name;
|
|
119
107
|
return makeLegalIdentifier(basename(dirname(id)));
|
|
120
108
|
}
|
|
121
|
-
function normalizePathSlashes(path
|
|
122
|
-
return path
|
|
109
|
+
function normalizePathSlashes(path) {
|
|
110
|
+
return path.replace(/\\/g, "/");
|
|
123
111
|
}
|
|
124
|
-
const getVirtualPathForDynamicRequirePath = (path
|
|
112
|
+
const getVirtualPathForDynamicRequirePath = (path, commonDir) => `/${normalizePathSlashes(relative(commonDir, path))}`;
|
|
125
113
|
function capitalize(name) {
|
|
126
114
|
return name[0].toUpperCase() + name.slice(1);
|
|
127
115
|
}
|
|
@@ -157,9 +145,9 @@ function getPackageEntryPoint(dirPath) {
|
|
|
157
145
|
} catch (ignored) {}
|
|
158
146
|
return entryPoint;
|
|
159
147
|
}
|
|
160
|
-
function isDirectory(path
|
|
148
|
+
function isDirectory(path) {
|
|
161
149
|
try {
|
|
162
|
-
if (statSync(path
|
|
150
|
+
if (statSync(path).isDirectory()) return true;
|
|
163
151
|
} catch (ignored) {}
|
|
164
152
|
return false;
|
|
165
153
|
}
|
|
@@ -169,12 +157,12 @@ function getDynamicRequireModules(patterns, dynamicRequireRoot) {
|
|
|
169
157
|
for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) {
|
|
170
158
|
const isNegated = pattern.startsWith("!");
|
|
171
159
|
const modifyMap = (targetPath, resolvedPath) => isNegated ? dynamicRequireModules.delete(targetPath) : dynamicRequireModules.set(targetPath, resolvedPath);
|
|
172
|
-
for (const path
|
|
173
|
-
const resolvedPath = resolve(path
|
|
160
|
+
for (const path of new Builder().withBasePath().withDirs().glob(isNegated ? pattern.substr(1) : pattern).crawl(relative(".", dynamicRequireRoot)).sync().sort((a, b) => a.localeCompare(b, "en"))) {
|
|
161
|
+
const resolvedPath = resolve(path);
|
|
174
162
|
const requirePath = normalizePathSlashes(resolvedPath);
|
|
175
163
|
if (isDirectory(resolvedPath)) {
|
|
176
164
|
dirNames.add(resolvedPath);
|
|
177
|
-
const modulePath = resolve(join(resolvedPath, getPackageEntryPoint(path
|
|
165
|
+
const modulePath = resolve(join(resolvedPath, getPackageEntryPoint(path)));
|
|
178
166
|
modifyMap(requirePath, modulePath);
|
|
179
167
|
modifyMap(normalizePathSlashes(modulePath), modulePath);
|
|
180
168
|
} else {
|
|
@@ -606,14 +594,26 @@ function validateVersion(actualVersion, peerDependencyVersion, name) {
|
|
|
606
594
|
const [major, minor, patch] = actualVersion.split(".").map(Number);
|
|
607
595
|
if (major < minMajor || major === minMajor && (minor < minMinor || minor === minMinor && patch < minPatch)) throw new Error(`Insufficient ${name} version: "@rollup/plugin-commonjs" requires at least ${name}@${minMajor}.${minMinor}.${minPatch} but found ${name}@${actualVersion}.`);
|
|
608
596
|
}
|
|
597
|
+
function triStateAnd(a, b) {
|
|
598
|
+
if (a === false) return false;
|
|
599
|
+
if (b === false) return false;
|
|
600
|
+
if (a === true && b === true) return true;
|
|
601
|
+
return null;
|
|
602
|
+
}
|
|
603
|
+
function triStateOr(a, b) {
|
|
604
|
+
if (a === true) return true;
|
|
605
|
+
if (b === true) return true;
|
|
606
|
+
if (a === false && b === false) return false;
|
|
607
|
+
return null;
|
|
608
|
+
}
|
|
609
609
|
const operators = {
|
|
610
610
|
"==": (x) => equals(x.left, x.right, false),
|
|
611
611
|
"!=": (x) => not(operators["=="](x)),
|
|
612
612
|
"===": (x) => equals(x.left, x.right, true),
|
|
613
613
|
"!==": (x) => not(operators["==="](x)),
|
|
614
614
|
"!": (x) => isFalsy(x.argument),
|
|
615
|
-
"&&": (x) => isTruthy(x.left)
|
|
616
|
-
"||": (x) => isTruthy(x.left)
|
|
615
|
+
"&&": (x) => triStateAnd(isTruthy(x.left), isTruthy(x.right)),
|
|
616
|
+
"||": (x) => triStateOr(isTruthy(x.left), isTruthy(x.right))
|
|
617
617
|
};
|
|
618
618
|
function not(value) {
|
|
619
619
|
return value === null ? value : !value;
|
|
@@ -679,6 +679,9 @@ function getDefinePropertyCallName(node, targetName) {
|
|
|
679
679
|
function isShorthandProperty(parent) {
|
|
680
680
|
return parent && parent.type === "Property" && parent.shorthand;
|
|
681
681
|
}
|
|
682
|
+
function isPropertyDefinitionKey(parent, node) {
|
|
683
|
+
return parent && parent.type === "PropertyDefinition" && parent.key === node;
|
|
684
|
+
}
|
|
682
685
|
function wrapCode(magicString, uses, moduleName, exportsName, indentExclusionRanges) {
|
|
683
686
|
const args = [];
|
|
684
687
|
const passedArgs = [];
|
|
@@ -1018,7 +1021,7 @@ async function transformCommonjs(parse, code, id, isEsModule, ignoreGlobal, igno
|
|
|
1018
1021
|
return;
|
|
1019
1022
|
case "Identifier": {
|
|
1020
1023
|
const { name } = node;
|
|
1021
|
-
if (!(
|
|
1024
|
+
if (!isReference(node, parent) || scope.contains(name) || isPropertyDefinitionKey(parent, node)) return;
|
|
1022
1025
|
switch (name) {
|
|
1023
1026
|
case "require":
|
|
1024
1027
|
uses.require = true;
|
|
@@ -1038,7 +1041,13 @@ async function transformCommonjs(parse, code, id, isEsModule, ignoreGlobal, igno
|
|
|
1038
1041
|
return;
|
|
1039
1042
|
case "global":
|
|
1040
1043
|
uses.global = true;
|
|
1041
|
-
if (!ignoreGlobal)
|
|
1044
|
+
if (!ignoreGlobal) {
|
|
1045
|
+
if (isShorthandProperty(parent)) {
|
|
1046
|
+
skippedNodes.add(parent.value);
|
|
1047
|
+
magicString.prependRight(node.start, "global: ");
|
|
1048
|
+
}
|
|
1049
|
+
replacedGlobal.push(node);
|
|
1050
|
+
}
|
|
1042
1051
|
return;
|
|
1043
1052
|
case "define":
|
|
1044
1053
|
magicString.overwrite(node.start, node.end, "undefined", { storeName: true });
|
|
@@ -1108,7 +1117,10 @@ async function transformCommonjs(parse, code, id, isEsModule, ignoreGlobal, igno
|
|
|
1108
1117
|
const dynamicRequireName = replacedDynamicRequires.length > 0 && deconflict([scope], globals, isDynamicRequireModulesEnabled ? CREATE_COMMONJS_REQUIRE_EXPORT : COMMONJS_REQUIRE_EXPORT);
|
|
1109
1118
|
const deconflictedExportNames = Object.create(null);
|
|
1110
1119
|
for (const [exportName, { scopes }] of exportsAssignmentsByName) deconflictedExportNames[exportName] = deconflict([...scopes], globals, exportName);
|
|
1111
|
-
for (const node of replacedGlobal) magicString.overwrite(node.start, node.end, `${helpersName}.commonjsGlobal`, {
|
|
1120
|
+
for (const node of replacedGlobal) magicString.overwrite(node.start, node.end, `${helpersName}.commonjsGlobal`, {
|
|
1121
|
+
contentOnly: true,
|
|
1122
|
+
storeName: true
|
|
1123
|
+
});
|
|
1112
1124
|
for (const node of replacedThis) magicString.overwrite(node.start, node.end, exportsName, { storeName: true });
|
|
1113
1125
|
for (const node of replacedDynamicRequires) magicString.overwrite(node.start, node.end, isDynamicRequireModulesEnabled ? `${dynamicRequireName}(${JSON.stringify(virtualDynamicRequirePath)})` : dynamicRequireName, {
|
|
1114
1126
|
contentOnly: true,
|
|
@@ -1295,6 +1307,5 @@ function commonjs(options = {}) {
|
|
|
1295
1307
|
}
|
|
1296
1308
|
};
|
|
1297
1309
|
}
|
|
1298
|
-
|
|
1299
1310
|
//#endregion
|
|
1300
|
-
export { commonjs as t };
|
|
1311
|
+
export { commonjs as t };
|
package/dist/_libs/compatx.mjs
CHANGED
|
@@ -41,6 +41,5 @@ function normalizeDate(date) {
|
|
|
41
41
|
if (date === "latest") return /* @__PURE__ */ new Date();
|
|
42
42
|
return new Date(date);
|
|
43
43
|
}
|
|
44
|
-
|
|
45
44
|
//#endregion
|
|
46
|
-
export { resolveCompatibilityDates as n, resolveCompatibilityDatesFromEnv as r, formatCompatibilityDate as t };
|
|
45
|
+
export { resolveCompatibilityDates as n, resolveCompatibilityDatesFromEnv as r, formatCompatibilityDate as t };
|
package/dist/_libs/esbuild.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/esbuild@0.27.
|
|
1
|
+
//#region node_modules/.pnpm/esbuild@0.27.3/node_modules/esbuild/lib/main.d.ts
|
|
2
2
|
// Note: These declarations exist to avoid type errors when you omit "dom" from
|
|
3
3
|
// "lib" in your "tsconfig.json" file. TypeScript confusingly declares the
|
|
4
4
|
// global "WebAssembly" type in "lib.dom.d.ts" even though it has nothing to do
|
|
@@ -3,6 +3,5 @@ function escapeStringRegexp(string) {
|
|
|
3
3
|
if (typeof string !== "string") throw new TypeError("Expected a string");
|
|
4
4
|
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
5
5
|
}
|
|
6
|
-
|
|
7
6
|
//#endregion
|
|
8
|
-
export { escapeStringRegexp as t };
|
|
7
|
+
export { escapeStringRegexp as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Plugin } from "rollup";
|
|
2
2
|
|
|
3
|
-
//#region node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.
|
|
3
|
+
//#region node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.59.0/node_modules/@rollup/pluginutils/types/index.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A valid `picomatch` glob pattern, or array of patterns.
|
|
6
6
|
*/
|
|
7
7
|
type FilterPattern = ReadonlyArray<string | RegExp> | string | RegExp | null;
|
|
8
8
|
//#endregion
|
|
9
|
-
//#region node_modules/.pnpm/@rollup+plugin-commonjs@29.0.
|
|
9
|
+
//#region node_modules/.pnpm/@rollup+plugin-commonjs@29.0.2_rollup@4.59.0/node_modules/@rollup/plugin-commonjs/types/index.d.ts
|
|
10
10
|
type RequireReturnsDefaultOption = boolean | 'auto' | 'preferred' | 'namespace';
|
|
11
11
|
type DefaultIsModuleExportsOption = boolean | 'auto';
|
|
12
12
|
interface RollupCommonJSOptions {
|
|
@@ -47,7 +47,6 @@ var WalkerBase = class {
|
|
|
47
47
|
else delete parent[prop];
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
|
|
51
50
|
//#endregion
|
|
52
51
|
//#region node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/sync.js
|
|
53
52
|
/**
|
|
@@ -163,7 +162,6 @@ var SyncWalker = class extends WalkerBase {
|
|
|
163
162
|
function isNode(value) {
|
|
164
163
|
return value !== null && typeof value === "object" && "type" in value && typeof value.type === "string";
|
|
165
164
|
}
|
|
166
|
-
|
|
167
165
|
//#endregion
|
|
168
166
|
//#region node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/index.js
|
|
169
167
|
/**
|
|
@@ -182,6 +180,5 @@ function isNode(value) {
|
|
|
182
180
|
function walk(ast, { enter, leave }) {
|
|
183
181
|
return new SyncWalker(enter, leave).visit(ast, null);
|
|
184
182
|
}
|
|
185
|
-
|
|
186
183
|
//#endregion
|
|
187
|
-
export { walk as t };
|
|
184
|
+
export { walk as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|