nitro 3.0.260311-beta → 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/dist/_build/common.mjs +630 -1602
- package/dist/_build/rolldown.mjs +0 -11
- package/dist/_build/rollup.mjs +0 -13
- package/dist/_build/vite.build.mjs +0 -2
- package/dist/_chunks/nitro.mjs +23 -216
- package/dist/_chunks/nitro2.mjs +0 -2
- package/dist/_chunks/nitro3.mjs +128 -121
- package/dist/_chunks/nitro4.mjs +127 -0
- package/dist/_chunks/utils.mjs +0 -7
- package/dist/_common.mjs +0 -2
- package/dist/_dev.d.mts +0 -3
- package/dist/_dev.mjs +0 -10
- package/dist/_libs/_.mjs +0 -1
- package/dist/_libs/_3.mjs +0 -1
- package/dist/_libs/_5.mjs +0 -1
- package/dist/_libs/_6.mjs +0 -2
- package/dist/_libs/_7.mjs +0 -3
- package/dist/_libs/c12+rc9.mjs +24 -22
- package/dist/_libs/c12+readdirp+chokidar.d.mts +0 -7
- package/dist/_libs/citty.mjs +134 -31
- package/dist/_libs/commondir+is-reference.mjs +2 -9
- package/dist/_libs/compatx.d.mts +0 -2
- package/dist/_libs/compatx.mjs +0 -2
- package/dist/_libs/esbuild.d.mts +0 -1
- package/dist/_libs/escape-string-regexp.mjs +0 -2
- package/dist/_libs/estree+pluginutils.d.mts +0 -5
- package/dist/_libs/estree-walker.mjs +3 -88
- package/dist/_libs/hasown+resolve+deepmerge.mjs +22 -85
- package/dist/_libs/httpxy.d.mts +9 -5
- package/dist/_libs/httpxy.mjs +284 -116
- package/dist/_libs/klona.mjs +0 -2
- package/dist/_libs/magic-string.d.mts +0 -2
- package/dist/_libs/mlly.d.mts +0 -2
- package/dist/_libs/nypm+tinyexec.mjs +111 -134
- package/dist/_libs/perfect-debounce.mjs +0 -20
- package/dist/_libs/pkg-types.d.mts +0 -3
- package/dist/_libs/plugin-alias.mjs +0 -2
- package/dist/_libs/plugin-inject.mjs +0 -2
- package/dist/_libs/plugin-json.mjs +0 -2
- package/dist/_libs/pluginutils.mjs +0 -26
- package/dist/_libs/readdirp+chokidar.mjs +0 -173
- package/dist/_libs/remapping.mjs +0 -2
- package/dist/_libs/resolve-uri+gen-mapping.mjs +0 -32
- package/dist/_libs/rou3.d.mts +0 -4
- package/dist/_libs/rou3.mjs +0 -29
- package/dist/_libs/std-env.d.mts +1 -3
- package/dist/_libs/tsconfck.mjs +0 -294
- package/dist/_libs/ultrahtml.mjs +0 -2
- package/dist/_libs/unimport+unplugin.mjs +1 -44
- package/dist/_libs/unplugin+unimport.d.mts +0 -7
- package/dist/_libs/unwasm.d.mts +0 -3
- package/dist/_presets.mjs +211 -80
- package/dist/builder.d.mts +1 -22
- package/dist/builder.mjs +0 -11
- package/dist/cli/_chunks/build.mjs +0 -2
- package/dist/cli/_chunks/common.mjs +0 -2
- package/dist/cli/_chunks/deploy.mjs +0 -3
- package/dist/cli/_chunks/dev.mjs +0 -5
- package/dist/cli/_chunks/docs.mjs +1 -3
- package/dist/cli/_chunks/list.mjs +0 -2
- package/dist/cli/_chunks/prepare.mjs +0 -2
- package/dist/cli/_chunks/preview.mjs +1 -4
- package/dist/cli/_chunks/run.mjs +0 -2
- package/dist/cli/_chunks/task.mjs +0 -2
- package/dist/cli/index.mjs +0 -2
- package/{skills/nitro/docs/docs/quick-start.md → dist/docs/0.docs/1.quick-start.md} +4 -4
- package/{skills/nitro/docs/docs/lifecycle.md → dist/docs/0.docs/10.lifecycle.md} +4 -4
- package/dist/docs/0.docs/11.openapi.md +291 -0
- package/{skills/nitro/docs/docs/plugins.md → dist/docs/0.docs/12.plugins.md} +2 -2
- package/{skills/nitro/docs/docs/tasks.md → dist/docs/0.docs/13.tasks.md} +6 -6
- package/dist/docs/0.docs/14.websocket.md +386 -0
- package/{skills/nitro/docs/docs/migration.md → dist/docs/0.docs/15.migration.md} +2 -4
- package/{skills/nitro/docs/docs/renderer.md → dist/docs/0.docs/2.renderer.md} +8 -8
- package/{skills/nitro/docs/docs/routing.md → dist/docs/0.docs/3.routing.md} +34 -34
- package/{skills/nitro/docs/docs/server-entry.md → dist/docs/0.docs/4.server-entry.md} +6 -6
- package/{skills/nitro/docs/docs/cache.md → dist/docs/0.docs/5.cache.md} +12 -12
- package/{skills/nitro/docs/docs/storage.md → dist/docs/0.docs/6.storage.md} +6 -6
- package/{skills/nitro/docs/docs/assets.md → dist/docs/0.docs/7.assets.md} +8 -8
- package/{skills/nitro/docs/docs/configuration.md → dist/docs/0.docs/8.configuration.md} +16 -16
- package/{skills/nitro/docs/docs/database.md → dist/docs/0.docs/9.database.md} +6 -6
- package/{skills/nitro/docs/deploy → dist/docs/1.deploy/0.index}/index.md +3 -3
- package/{skills/nitro/docs/deploy/providers/aws.md → dist/docs/1.deploy/2.providers/1.aws.md} +4 -4
- package/{skills/nitro/docs/deploy/providers/iis.md → dist/docs/1.deploy/2.providers/15.iis.md} +2 -2
- package/{skills/nitro/docs/deploy/providers/aws-amplify.md → dist/docs/1.deploy/2.providers/2.aws-amplify.md} +2 -2
- package/{skills/nitro/docs/deploy/providers/vercel.md → dist/docs/1.deploy/2.providers/21.vercel.md} +98 -7
- package/{skills/nitro/docs/deploy/providers/zephyr.md → dist/docs/1.deploy/2.providers/23.zephyr.md} +2 -2
- package/{skills/nitro/docs/deploy/providers/cloudflare.md → dist/docs/1.deploy/2.providers/5.cloudflare.md} +9 -15
- package/dist/docs/1.deploy/2.providers/8.edgeone.md +20 -0
- package/{skills/nitro/docs/config → dist/docs/2.config/0.index}/index.md +165 -91
- package/{skills/nitro/docs/examples/hono.md → dist/docs/3.examples/10.hono.md} +1 -1
- package/{skills/nitro/docs/examples/import-alias.md → dist/docs/3.examples/11.import-alias.md} +1 -4
- package/{skills/nitro/docs/examples/mono-jsx.md → dist/docs/3.examples/13.mono-jsx.md} +2 -2
- package/{skills/nitro/docs/examples/plugins.md → dist/docs/3.examples/15.plugins.md} +4 -4
- package/{skills/nitro/docs/examples/shiki.md → dist/docs/3.examples/19.shiki.md} +1 -1
- package/{skills/nitro/docs/examples/auto-imports.md → dist/docs/3.examples/2.auto-imports.md} +0 -1
- package/{skills/nitro/docs/examples/vite-nitro-plugin.md → dist/docs/3.examples/21.vite-nitro-plugin.md} +1 -1
- package/{skills/nitro/docs/examples/vite-rsc.md → dist/docs/3.examples/22.vite-rsc.md} +4 -4
- package/{skills/nitro/docs/examples/vite-ssr-html.md → dist/docs/3.examples/23.vite-ssr-html.md} +3 -3
- package/{skills/nitro/docs/examples/vite-ssr-preact.md → dist/docs/3.examples/24.vite-ssr-preact.md} +6 -6
- package/{skills/nitro/docs/examples/vite-ssr-react.md → dist/docs/3.examples/25.vite-ssr-react.md} +3 -3
- package/{skills/nitro/docs/examples/vite-ssr-solid.md → dist/docs/3.examples/26.vite-ssr-solid.md} +3 -3
- package/{skills/nitro/docs/examples/vite-ssr-tsr-react.md → dist/docs/3.examples/27.vite-ssr-tsr-react.md} +6 -6
- package/{skills/nitro/docs/examples/vite-ssr-tss-react.md → dist/docs/3.examples/28.vite-ssr-tss-react.md} +11 -11
- package/{skills/nitro/docs/examples/vite-ssr-vue-router.md → dist/docs/3.examples/29.vite-ssr-vue-router.md} +6 -5
- package/{skills/nitro/docs/examples/vite-trpc.md → dist/docs/3.examples/30.vite-trpc.md} +3 -3
- package/{skills/nitro/docs/examples/elysia.md → dist/docs/3.examples/6.elysia.md} +1 -1
- package/{skills/nitro/docs/examples/fastify.md → dist/docs/3.examples/8.fastify.md} +1 -1
- package/dist/docs/README.md +86 -0
- 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/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/package.json +2 -2
- package/dist/presets/_nitro/runtime/nitro-dev.mjs +3 -1
- package/dist/presets/_nitro/runtime/service-worker.mjs +1 -1
- package/dist/presets/aws-lambda/runtime/_utils.mjs +6 -6
- 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 +5 -3
- 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 +5 -3
- package/dist/presets/edgeone/runtime/edgeone.mjs +10 -0
- package/dist/presets/netlify/runtime/netlify-edge.mjs +2 -2
- package/dist/presets/node/runtime/node-cluster.mjs +2 -2
- package/dist/presets/node/runtime/node-middleware.mjs +1 -1
- package/dist/presets/node/runtime/node-server.mjs +5 -3
- package/dist/presets/stormkit/runtime/stormkit.mjs +1 -1
- package/dist/presets/vercel/runtime/cron-handler.mjs +1 -1
- 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 +1 -1
- package/dist/presets/winterjs/runtime/winterjs.mjs +10 -10
- package/dist/runtime/internal/app.mjs +12 -11
- package/dist/runtime/internal/context.mjs +1 -9
- package/dist/runtime/internal/error/dev.mjs +10 -10
- package/dist/runtime/internal/route-rules.d.mts +3 -1
- package/dist/runtime/internal/route-rules.mjs +9 -7
- package/dist/runtime/internal/routes/dev-tasks.mjs +13 -12
- package/dist/runtime/internal/routes/openapi.mjs +2 -2
- package/dist/runtime/internal/routes/scalar.mjs +3 -3
- package/dist/runtime/internal/routes/swagger.mjs +7 -4
- package/dist/runtime/internal/runtime-config.mjs +2 -2
- package/dist/runtime/internal/task.mjs +5 -5
- package/dist/runtime/meta.d.mts +1 -0
- package/dist/runtime/meta.mjs +1 -0
- package/dist/runtime/nitro.mjs +3 -3
- package/dist/runtime/virtual/renderer-template.mjs +1 -1
- package/dist/runtime/virtual/tracing.d.mts +5 -0
- package/dist/runtime/virtual/tracing.mjs +1 -0
- package/dist/types/index.d.mts +155 -86
- package/dist/vite.d.mts +0 -5
- package/dist/vite.mjs +57 -28
- package/lib/tsconfig.json +3 -5
- package/package.json +56 -54
- package/skills/nitro/SKILL.md +0 -10
- package/skills/nitro/docs/TOC.md +0 -83
- package/skills/nitro/docs/_navigation.json +0 -679
- /package/{skills/nitro/docs/docs → dist/docs/0.docs/0.index}/index.md +0 -0
- /package/{skills/nitro/docs/docs/nightly.md → dist/docs/0.docs/16.nightly.md} +0 -0
- /package/{skills/nitro/docs/deploy/runtimes/node.md → dist/docs/1.deploy/1.runtimes/0.node.md} +0 -0
- /package/{skills/nitro/docs/deploy/runtimes/bun.md → dist/docs/1.deploy/1.runtimes/1.bun.md} +0 -0
- /package/{skills/nitro/docs/deploy/runtimes/deno.md → dist/docs/1.deploy/1.runtimes/2.deno.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/alwaysdata.md → dist/docs/1.deploy/2.providers/0.alwaysdata.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/flightcontrol.md → dist/docs/1.deploy/2.providers/10.flightcontrol.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/genezio.md → dist/docs/1.deploy/2.providers/11.genezio.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/github-pages.md → dist/docs/1.deploy/2.providers/12.github-pages.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/gitlab-pages.md → dist/docs/1.deploy/2.providers/13.gitlab-pages.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/heroku.md → dist/docs/1.deploy/2.providers/14.heroku.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/koyeb.md → dist/docs/1.deploy/2.providers/16.koyeb.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/netlify.md → dist/docs/1.deploy/2.providers/17.netlify.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/platform-sh.md → dist/docs/1.deploy/2.providers/18.platform-sh.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/render.md → dist/docs/1.deploy/2.providers/19.render.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/stormkit.md → dist/docs/1.deploy/2.providers/20.stormkit.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/zeabur.md → dist/docs/1.deploy/2.providers/22.zeabur.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/zerops.md → dist/docs/1.deploy/2.providers/24.zerops.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/azure.md → dist/docs/1.deploy/2.providers/3.azure.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/cleavr.md → dist/docs/1.deploy/2.providers/4.cleavr.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/deno-deploy.md → dist/docs/1.deploy/2.providers/6.deno-deploy.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/digitalocean.md → dist/docs/1.deploy/2.providers/7.digitalocean.md} +0 -0
- /package/{skills/nitro/docs/deploy/providers/firebase.md → dist/docs/1.deploy/2.providers/9.firebase.md} +0 -0
- /package/{skills/nitro/docs/examples → dist/docs/3.examples/0.index}/index.md +0 -0
- /package/{skills/nitro/docs/examples/api-routes.md → dist/docs/3.examples/1.api-routes.md} +0 -0
- /package/{skills/nitro/docs/examples/middleware.md → dist/docs/3.examples/12.middleware.md} +0 -0
- /package/{skills/nitro/docs/examples/nano-jsx.md → dist/docs/3.examples/14.nano-jsx.md} +0 -0
- /package/{skills/nitro/docs/examples/renderer.md → dist/docs/3.examples/16.renderer.md} +0 -0
- /package/{skills/nitro/docs/examples/runtime-config.md → dist/docs/3.examples/17.runtime-config.md} +0 -0
- /package/{skills/nitro/docs/examples/server-fetch.md → dist/docs/3.examples/18.server-fetch.md} +0 -0
- /package/{skills/nitro/docs/examples/virtual-routes.md → dist/docs/3.examples/20.virtual-routes.md} +0 -0
- /package/{skills/nitro/docs/examples/cached-handler.md → dist/docs/3.examples/3.cached-handler.md} +0 -0
- /package/{skills/nitro/docs/examples/websocket.md → dist/docs/3.examples/31.websocket.md} +0 -0
- /package/{skills/nitro/docs/examples/custom-error-handler.md → dist/docs/3.examples/4.custom-error-handler.md} +0 -0
- /package/{skills/nitro/docs/examples/database.md → dist/docs/3.examples/5.database.md} +0 -0
- /package/{skills/nitro/docs/examples/express.md → dist/docs/3.examples/7.express.md} +0 -0
- /package/{skills/nitro/docs/examples/hello-world.md → dist/docs/3.examples/9.hello-world.md} +0 -0
- /package/{skills/nitro → dist}/docs/index.md +0 -0
package/dist/_build/common.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { i as __toESM$1, n as __exportAll, r as __require$1, t as __commonJSMin } from "../_common.mjs";
|
|
2
2
|
import { builtinModules, createRequire } from "node:module";
|
|
3
3
|
import consola from "consola";
|
|
4
|
+
import { pkgDir, runtimeDependencies, runtimeDir, version } from "nitro/meta";
|
|
4
5
|
import fs, { accessSync, constants, existsSync, lstatSync, promises, readFileSync, realpathSync, statSync } from "node:fs";
|
|
5
6
|
import { format, inspect } from "node:util";
|
|
6
7
|
import fsp, { mkdir, readFile, stat as stat$1, writeFile } from "node:fs/promises";
|
|
@@ -11,13 +12,12 @@ import assert from "node:assert";
|
|
|
11
12
|
import process$1 from "node:process";
|
|
12
13
|
import v8 from "node:v8";
|
|
13
14
|
import { defu } from "defu";
|
|
14
|
-
import { pkgDir, runtimeDependencies, runtimeDir, version } from "nitro/meta";
|
|
15
15
|
import { joinURL, withTrailingSlash } from "ufo";
|
|
16
16
|
import { createRequire as createRequire$1 } from "module";
|
|
17
17
|
import { colors } from "consola/utils";
|
|
18
|
-
import * as nativeFs
|
|
19
|
-
import
|
|
20
|
-
import
|
|
18
|
+
import * as nativeFs from "fs";
|
|
19
|
+
import { readdir as readdir$1, readdirSync, realpath as realpath$1, realpathSync as realpathSync$1, stat as stat$2, statSync as statSync$1 } from "fs";
|
|
20
|
+
import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, normalize as normalize$1, posix, relative as relative$1, resolve as resolve$1, sep as sep$1, win32 as win32$1 } from "path";
|
|
21
21
|
import { fileURLToPath as fileURLToPath$1 } from "url";
|
|
22
22
|
import { hash } from "ohash";
|
|
23
23
|
import zlib from "node:zlib";
|
|
@@ -27,7 +27,7 @@ import { connectors } from "db0";
|
|
|
27
27
|
import { RENDER_CONTEXT_KEYS, compileTemplateToString, hasTemplateSyntax } from "rendu";
|
|
28
28
|
import { builtinDrivers, normalizeKey } from "unstorage";
|
|
29
29
|
import { createHash } from "node:crypto";
|
|
30
|
-
|
|
30
|
+
import { FullTracePackages, NodeNativePackages, NonBundleablePackages } from "nf3/db";
|
|
31
31
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
32
32
|
function normalizeWindowsPath(input = "") {
|
|
33
33
|
if (!input) return input;
|
|
@@ -189,8 +189,6 @@ const parse$1 = function(p) {
|
|
|
189
189
|
};
|
|
190
190
|
};
|
|
191
191
|
globalThis.process?.platform;
|
|
192
|
-
//#endregion
|
|
193
|
-
//#region node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs
|
|
194
192
|
const nodeBuiltins = [
|
|
195
193
|
"_http_agent",
|
|
196
194
|
"_http_client",
|
|
@@ -277,23 +275,9 @@ const kTypes$1 = new Set([
|
|
|
277
275
|
const messages$1 = /* @__PURE__ */ new Map();
|
|
278
276
|
const nodeInternalPrefix$1 = "__node_internal_";
|
|
279
277
|
let userStackTraceLimit$1;
|
|
280
|
-
/**
|
|
281
|
-
* Create a list string in the form like 'A and B' or 'A, B, ..., and Z'.
|
|
282
|
-
* We cannot use Intl.ListFormat because it's not available in
|
|
283
|
-
* --without-intl builds.
|
|
284
|
-
*
|
|
285
|
-
* @param {Array<string>} array
|
|
286
|
-
* An array of strings.
|
|
287
|
-
* @param {string} [type]
|
|
288
|
-
* The list type to be inserted before the last element.
|
|
289
|
-
* @returns {string}
|
|
290
|
-
*/
|
|
291
278
|
function formatList$1(array, type = "and") {
|
|
292
279
|
return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`;
|
|
293
280
|
}
|
|
294
|
-
/**
|
|
295
|
-
* Utility function for registering the error codes.
|
|
296
|
-
*/
|
|
297
281
|
function createError$1(sym, value, constructor) {
|
|
298
282
|
messages$1.set(sym, value);
|
|
299
283
|
return makeNodeErrorWithCode$1(constructor, sym);
|
|
@@ -334,9 +318,6 @@ function isErrorStackTraceLimitWritable$1() {
|
|
|
334
318
|
if (desc === void 0) return Object.isExtensible(Error);
|
|
335
319
|
return own$1$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
|
|
336
320
|
}
|
|
337
|
-
/**
|
|
338
|
-
* This function removes unnecessary frames from Node.js core errors.
|
|
339
|
-
*/
|
|
340
321
|
function hideStackFrames$1(wrappedFunction) {
|
|
341
322
|
const hidden = nodeInternalPrefix$1 + wrappedFunction.name;
|
|
342
323
|
Object.defineProperty(wrappedFunction, "name", { value: hidden });
|
|
@@ -367,9 +348,6 @@ function getMessage$1(key, parameters, self) {
|
|
|
367
348
|
parameters.unshift(message);
|
|
368
349
|
return Reflect.apply(format, null, parameters);
|
|
369
350
|
}
|
|
370
|
-
/**
|
|
371
|
-
* Determine the specific type of a value for type-mismatch errors.
|
|
372
|
-
*/
|
|
373
351
|
function determineSpecificType$1(value) {
|
|
374
352
|
if (value === null || value === void 0) return String(value);
|
|
375
353
|
if (typeof value === "function" && value.name) return `function ${value.name}`;
|
|
@@ -425,18 +403,9 @@ createError$1("ERR_INVALID_ARG_TYPE", (name, expected, actual) => {
|
|
|
425
403
|
message += `. Received ${determineSpecificType$1(actual)}`;
|
|
426
404
|
return message;
|
|
427
405
|
}, TypeError);
|
|
428
|
-
const ERR_INVALID_MODULE_SPECIFIER$1 = createError$1(
|
|
429
|
-
"
|
|
430
|
-
|
|
431
|
-
* @param {string} request
|
|
432
|
-
* @param {string} reason
|
|
433
|
-
* @param {string} [base]
|
|
434
|
-
*/
|
|
435
|
-
(request, reason, base) => {
|
|
436
|
-
return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
|
|
437
|
-
},
|
|
438
|
-
TypeError
|
|
439
|
-
);
|
|
406
|
+
const ERR_INVALID_MODULE_SPECIFIER$1 = createError$1("ERR_INVALID_MODULE_SPECIFIER", (request, reason, base) => {
|
|
407
|
+
return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
|
|
408
|
+
}, TypeError);
|
|
440
409
|
const ERR_INVALID_PACKAGE_CONFIG$2 = createError$1("ERR_INVALID_PACKAGE_CONFIG", (path$1, base, message) => {
|
|
441
410
|
return `Invalid package config ${path$1}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
|
|
442
411
|
}, Error);
|
|
@@ -455,19 +424,10 @@ createError$1("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supp
|
|
|
455
424
|
const ERR_PACKAGE_IMPORT_NOT_DEFINED$1 = createError$1("ERR_PACKAGE_IMPORT_NOT_DEFINED", (specifier, packagePath, base) => {
|
|
456
425
|
return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath || ""}package.json` : ""} imported from ${base}`;
|
|
457
426
|
}, TypeError);
|
|
458
|
-
const ERR_PACKAGE_PATH_NOT_EXPORTED$1 = createError$1(
|
|
459
|
-
"
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
* @param {string} subpath
|
|
463
|
-
* @param {string} [base]
|
|
464
|
-
*/
|
|
465
|
-
(packagePath, subpath, base) => {
|
|
466
|
-
if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
467
|
-
return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
468
|
-
},
|
|
469
|
-
Error
|
|
470
|
-
);
|
|
427
|
+
const ERR_PACKAGE_PATH_NOT_EXPORTED$1 = createError$1("ERR_PACKAGE_PATH_NOT_EXPORTED", (packagePath, subpath, base) => {
|
|
428
|
+
if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
429
|
+
return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
430
|
+
}, Error);
|
|
471
431
|
const ERR_UNSUPPORTED_DIR_IMPORT$1 = createError$1("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error);
|
|
472
432
|
const ERR_UNSUPPORTED_RESOLVE_REQUEST$1 = createError$1("ERR_UNSUPPORTED_RESOLVE_REQUEST", "Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.", TypeError);
|
|
473
433
|
const ERR_UNKNOWN_FILE_EXTENSION$1 = createError$1("ERR_UNKNOWN_FILE_EXTENSION", (extension, path$1) => {
|
|
@@ -564,14 +524,6 @@ function getDataProtocolModuleFormat$1(parsed) {
|
|
|
564
524
|
];
|
|
565
525
|
return mimeToFormat$1(mime);
|
|
566
526
|
}
|
|
567
|
-
/**
|
|
568
|
-
* Returns the file extension from a URL.
|
|
569
|
-
*
|
|
570
|
-
* Should give similar result to
|
|
571
|
-
* `require('node:path').extname(require('node:url').fileURLToPath(url))`
|
|
572
|
-
* when used with a `file:` URL.
|
|
573
|
-
*
|
|
574
|
-
*/
|
|
575
527
|
function extname$3(url) {
|
|
576
528
|
const pathname = url.pathname;
|
|
577
529
|
let index = pathname.length;
|
|
@@ -633,14 +585,6 @@ function tryStatSync$1(path$1) {
|
|
|
633
585
|
return statSync(path$1);
|
|
634
586
|
} catch {}
|
|
635
587
|
}
|
|
636
|
-
/**
|
|
637
|
-
* Legacy CommonJS main resolution:
|
|
638
|
-
* 1. let M = pkg_url + (json main field)
|
|
639
|
-
* 2. TRY(M, M.js, M.json, M.node)
|
|
640
|
-
* 3. TRY(M/index.js, M/index.json, M/index.node)
|
|
641
|
-
* 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)
|
|
642
|
-
* 5. NOT_FOUND
|
|
643
|
-
*/
|
|
644
588
|
function fileExists$1(url) {
|
|
645
589
|
const stats = statSync(url, { throwIfNoEntry: false });
|
|
646
590
|
const isFile = stats ? stats.isFile() : void 0;
|
|
@@ -921,10 +865,6 @@ function packageImportsResolve$1(name, base, conditions) {
|
|
|
921
865
|
}
|
|
922
866
|
throw importNotDefined$1(name, packageJsonUrl, base);
|
|
923
867
|
}
|
|
924
|
-
/**
|
|
925
|
-
* @param {string} specifier
|
|
926
|
-
* @param {URL} base
|
|
927
|
-
*/
|
|
928
868
|
function parsePackageName$1(specifier, base) {
|
|
929
869
|
let separatorIndex = specifier.indexOf("/");
|
|
930
870
|
let validPackageName = true;
|
|
@@ -981,21 +921,6 @@ function shouldBeTreatedAsRelativeOrAbsolutePath$1(specifier) {
|
|
|
981
921
|
if (specifier[0] === "/") return true;
|
|
982
922
|
return isRelativeSpecifier$1(specifier);
|
|
983
923
|
}
|
|
984
|
-
/**
|
|
985
|
-
* The “Resolver Algorithm Specification” as detailed in the Node docs (which is
|
|
986
|
-
* sync and slightly lower-level than `resolve`).
|
|
987
|
-
*
|
|
988
|
-
* @param {string} specifier
|
|
989
|
-
* `/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`, etc.
|
|
990
|
-
* @param {URL} base
|
|
991
|
-
* Full URL (to a file) that `specifier` is resolved relative from.
|
|
992
|
-
* @param {Set<string>} [conditions]
|
|
993
|
-
* Conditions.
|
|
994
|
-
* @param {boolean} [preserveSymlinks]
|
|
995
|
-
* Keep symlinks instead of resolving them.
|
|
996
|
-
* @returns {URL}
|
|
997
|
-
* A URL object to the found thing.
|
|
998
|
-
*/
|
|
999
924
|
function moduleResolve$1(specifier, base, conditions, preserveSymlinks) {
|
|
1000
925
|
const protocol = base.protocol;
|
|
1001
926
|
const isData = protocol === "data:";
|
|
@@ -1025,13 +950,6 @@ function moduleResolve$1(specifier, base, conditions, preserveSymlinks) {
|
|
|
1025
950
|
const DEFAULT_CONDITIONS_SET$2 = /* @__PURE__ */ new Set(["node", "import"]);
|
|
1026
951
|
const isWindows = process.platform === "win32";
|
|
1027
952
|
const globalCache = globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map();
|
|
1028
|
-
/**
|
|
1029
|
-
* Synchronously resolves a module url based on the options provided.
|
|
1030
|
-
*
|
|
1031
|
-
* @param {string} input - The identifier or path of the module to resolve.
|
|
1032
|
-
* @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}.
|
|
1033
|
-
* @returns {string} The resolved URL as a string.
|
|
1034
|
-
*/
|
|
1035
953
|
function resolveModuleURL(input, options) {
|
|
1036
954
|
const parsedInput = _parseInput(input);
|
|
1037
955
|
if ("external" in parsedInput) return parsedInput.external;
|
|
@@ -1096,15 +1014,6 @@ function resolveModuleURL(input, options) {
|
|
|
1096
1014
|
if (cacheObj) cacheObj.set(cacheKey, resolved.href);
|
|
1097
1015
|
return resolved.href;
|
|
1098
1016
|
}
|
|
1099
|
-
/**
|
|
1100
|
-
* Synchronously resolves a module then converts it to a file path
|
|
1101
|
-
*
|
|
1102
|
-
* (throws error if reolved path is not file:// scheme)
|
|
1103
|
-
*
|
|
1104
|
-
* @param {string} id - The identifier or path of the module to resolve.
|
|
1105
|
-
* @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}.
|
|
1106
|
-
* @returns {string} The resolved URL as a string.
|
|
1107
|
-
*/
|
|
1108
1017
|
function resolveModulePath(id, options) {
|
|
1109
1018
|
const resolved = resolveModuleURL(id, options);
|
|
1110
1019
|
if (!resolved) return;
|
|
@@ -1186,8 +1095,6 @@ function _parseInput(input) {
|
|
|
1186
1095
|
}
|
|
1187
1096
|
throw new TypeError("id must be a `string` or `URL`");
|
|
1188
1097
|
}
|
|
1189
|
-
//#endregion
|
|
1190
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs
|
|
1191
1098
|
var e$6 = Object.create, t$10 = Object.defineProperty, n$10 = Object.getOwnPropertyDescriptor, r$10 = Object.getOwnPropertyNames, i$11 = Object.getPrototypeOf, a$9 = Object.prototype.hasOwnProperty, o$7 = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), s$6 = (e, i, o, s) => {
|
|
1192
1099
|
if (i && typeof i == `object` || typeof i == `function`) for (var c = r$10(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a$9.call(e, d) && d !== o && t$10(e, d, {
|
|
1193
1100
|
get: ((e) => i[e]).bind(null, d),
|
|
@@ -1198,8 +1105,6 @@ var e$6 = Object.create, t$10 = Object.defineProperty, n$10 = Object.getOwnPrope
|
|
|
1198
1105
|
value: n,
|
|
1199
1106
|
enumerable: !0
|
|
1200
1107
|
}) : a, n));
|
|
1201
|
-
//#endregion
|
|
1202
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs
|
|
1203
1108
|
var t$9 = o$7(((e, t) => {
|
|
1204
1109
|
t.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/, t.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/, t.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
|
|
1205
1110
|
})), n$9 = o$7(((e, n) => {
|
|
@@ -1954,8 +1859,6 @@ var t$9 = o$7(((e, t) => {
|
|
|
1954
1859
|
}
|
|
1955
1860
|
};
|
|
1956
1861
|
}));
|
|
1957
|
-
//#endregion
|
|
1958
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/detect-indent.mjs
|
|
1959
1862
|
const e$5 = /^(?:( )+|\t+)/, t$8 = `space`;
|
|
1960
1863
|
function n$8(e, n, r) {
|
|
1961
1864
|
return e && n === t$8 && r === 1;
|
|
@@ -2011,8 +1914,6 @@ function c$3(e) {
|
|
|
2011
1914
|
indent: l
|
|
2012
1915
|
};
|
|
2013
1916
|
}
|
|
2014
|
-
//#endregion
|
|
2015
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs
|
|
2016
1917
|
const t$7 = Symbol.for(`__confbox_fmt__`), n$7 = /^(\s+)/, r$7 = /(\s+)$/;
|
|
2017
1918
|
function i$8(e, t = {}) {
|
|
2018
1919
|
return {
|
|
@@ -2048,16 +1949,12 @@ function o$5(n, r) {
|
|
|
2048
1949
|
}
|
|
2049
1950
|
};
|
|
2050
1951
|
}
|
|
2051
|
-
//#endregion
|
|
2052
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs
|
|
2053
1952
|
var json5_exports = /* @__PURE__ */ __exportAll({ parseJSON5: () => s$4 }), a$6 = c$4(r$9(), 1);
|
|
2054
1953
|
c$4(i$10(), 1);
|
|
2055
1954
|
function s$4(e, n) {
|
|
2056
1955
|
let r = (0, a$6.default)(e, n?.reviver);
|
|
2057
1956
|
return a$7(e, r, n), r;
|
|
2058
1957
|
}
|
|
2059
|
-
//#endregion
|
|
2060
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs
|
|
2061
1958
|
function e$4(e, i = !1) {
|
|
2062
1959
|
let a = e.length, o = 0, s = ``, c = 0, l = 16, u = 0, d = 0, f = 0, p = 0, m = 0;
|
|
2063
1960
|
function h(t, n) {
|
|
@@ -2441,22 +2338,15 @@ var h$7;
|
|
|
2441
2338
|
(function(e) {
|
|
2442
2339
|
e[e.InvalidSymbol = 1] = `InvalidSymbol`, e[e.InvalidNumberFormat = 2] = `InvalidNumberFormat`, e[e.PropertyNameExpected = 3] = `PropertyNameExpected`, e[e.ValueExpected = 4] = `ValueExpected`, e[e.ColonExpected = 5] = `ColonExpected`, e[e.CommaExpected = 6] = `CommaExpected`, e[e.CloseBraceExpected = 7] = `CloseBraceExpected`, e[e.CloseBracketExpected = 8] = `CloseBracketExpected`, e[e.EndOfFileExpected = 9] = `EndOfFileExpected`, e[e.InvalidCommentToken = 10] = `InvalidCommentToken`, e[e.UnexpectedEndOfComment = 11] = `UnexpectedEndOfComment`, e[e.UnexpectedEndOfString = 12] = `UnexpectedEndOfString`, e[e.UnexpectedEndOfNumber = 13] = `UnexpectedEndOfNumber`, e[e.InvalidUnicode = 14] = `InvalidUnicode`, e[e.InvalidEscapeCharacter = 15] = `InvalidEscapeCharacter`, e[e.InvalidCharacter = 16] = `InvalidCharacter`;
|
|
2443
2340
|
})(h$7 ||= {});
|
|
2444
|
-
//#endregion
|
|
2445
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs
|
|
2446
2341
|
function n$5(t, n) {
|
|
2447
2342
|
let r = JSON.parse(t, n?.reviver);
|
|
2448
2343
|
return a$7(t, r, n), r;
|
|
2449
2344
|
}
|
|
2450
|
-
//#endregion
|
|
2451
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs
|
|
2452
2345
|
var jsonc_exports = /* @__PURE__ */ __exportAll({ parseJSONC: () => r$5 });
|
|
2453
2346
|
function r$5(n, r) {
|
|
2454
2347
|
let i = m$5(n, r?.errors, r);
|
|
2455
2348
|
return a$7(n, i, r), i;
|
|
2456
2349
|
}
|
|
2457
|
-
//#endregion
|
|
2458
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs
|
|
2459
|
-
/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
|
|
2460
2350
|
function e$3(e) {
|
|
2461
2351
|
return e == null;
|
|
2462
2352
|
}
|
|
@@ -3511,8 +3401,6 @@ function Pn$1(e, t) {
|
|
|
3511
3401
|
var Fn$1 = { dump: Pn$1 }, In$1 = Ft.load;
|
|
3512
3402
|
Ft.loadAll;
|
|
3513
3403
|
var Ln$1 = Fn$1.dump;
|
|
3514
|
-
//#endregion
|
|
3515
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs
|
|
3516
3404
|
var yaml_exports = /* @__PURE__ */ __exportAll({
|
|
3517
3405
|
parseYAML: () => i$5,
|
|
3518
3406
|
stringifyYAML: () => a$3
|
|
@@ -3528,35 +3416,6 @@ function a$3(e, n) {
|
|
|
3528
3416
|
});
|
|
3529
3417
|
return i.whitespace.start + a.trim() + i.whitespace.end;
|
|
3530
3418
|
}
|
|
3531
|
-
//#endregion
|
|
3532
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs
|
|
3533
|
-
/*!
|
|
3534
|
-
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
3535
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3536
|
-
*
|
|
3537
|
-
* Redistribution and use in source and binary forms, with or without
|
|
3538
|
-
* modification, are permitted provided that the following conditions are met:
|
|
3539
|
-
*
|
|
3540
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
3541
|
-
* list of conditions and the following disclaimer.
|
|
3542
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
3543
|
-
* this list of conditions and the following disclaimer in the
|
|
3544
|
-
* documentation and/or other materials provided with the distribution.
|
|
3545
|
-
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
3546
|
-
* may be used to endorse or promote products derived from this software without
|
|
3547
|
-
* specific prior written permission.
|
|
3548
|
-
*
|
|
3549
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
3550
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
3551
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
3552
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
3553
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
3554
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
3555
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
3556
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
3557
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
3558
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
3559
|
-
*/
|
|
3560
3419
|
function e$2(e, t) {
|
|
3561
3420
|
let n = e.slice(0, t).split(/\r\n|\n|\r/g);
|
|
3562
3421
|
return [n.length, n.pop().length + 1];
|
|
@@ -3580,33 +3439,6 @@ var n$3 = class extends Error {
|
|
|
3580
3439
|
super(`Invalid TOML document: ${n}\n\n${o}`, r), this.line = i, this.column = a, this.codeblock = o;
|
|
3581
3440
|
}
|
|
3582
3441
|
};
|
|
3583
|
-
/*!
|
|
3584
|
-
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
3585
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3586
|
-
*
|
|
3587
|
-
* Redistribution and use in source and binary forms, with or without
|
|
3588
|
-
* modification, are permitted provided that the following conditions are met:
|
|
3589
|
-
*
|
|
3590
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
3591
|
-
* list of conditions and the following disclaimer.
|
|
3592
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
3593
|
-
* this list of conditions and the following disclaimer in the
|
|
3594
|
-
* documentation and/or other materials provided with the distribution.
|
|
3595
|
-
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
3596
|
-
* may be used to endorse or promote products derived from this software without
|
|
3597
|
-
* specific prior written permission.
|
|
3598
|
-
*
|
|
3599
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
3600
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
3601
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
3602
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
3603
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
3604
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
3605
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
3606
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
3607
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
3608
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
3609
|
-
*/
|
|
3610
3442
|
function r$3(e, t) {
|
|
3611
3443
|
let n = 0;
|
|
3612
3444
|
for (; e[t - ++n] === `\\`;);
|
|
@@ -3661,33 +3493,6 @@ function c$1(e, t) {
|
|
|
3661
3493
|
while (t > -1 && n !== `'` && r$3(e, t));
|
|
3662
3494
|
return t > -1 && (t += i.length, i.length > 1 && (e[t] === n && t++, e[t] === n && t++)), t;
|
|
3663
3495
|
}
|
|
3664
|
-
/*!
|
|
3665
|
-
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
3666
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3667
|
-
*
|
|
3668
|
-
* Redistribution and use in source and binary forms, with or without
|
|
3669
|
-
* modification, are permitted provided that the following conditions are met:
|
|
3670
|
-
*
|
|
3671
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
3672
|
-
* list of conditions and the following disclaimer.
|
|
3673
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
3674
|
-
* this list of conditions and the following disclaimer in the
|
|
3675
|
-
* documentation and/or other materials provided with the distribution.
|
|
3676
|
-
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
3677
|
-
* may be used to endorse or promote products derived from this software without
|
|
3678
|
-
* specific prior written permission.
|
|
3679
|
-
*
|
|
3680
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
3681
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
3682
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
3683
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
3684
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
3685
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
3686
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
3687
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
3688
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
3689
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
3690
|
-
*/
|
|
3691
3496
|
let l$2 = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
3692
3497
|
var u$2 = class e extends Date {
|
|
3693
3498
|
#e = !1;
|
|
@@ -3742,33 +3547,6 @@ var u$2 = class e extends Date {
|
|
|
3742
3547
|
return n.#e = !1, n.#n = null, n;
|
|
3743
3548
|
}
|
|
3744
3549
|
};
|
|
3745
|
-
/*!
|
|
3746
|
-
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
3747
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3748
|
-
*
|
|
3749
|
-
* Redistribution and use in source and binary forms, with or without
|
|
3750
|
-
* modification, are permitted provided that the following conditions are met:
|
|
3751
|
-
*
|
|
3752
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
3753
|
-
* list of conditions and the following disclaimer.
|
|
3754
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
3755
|
-
* this list of conditions and the following disclaimer in the
|
|
3756
|
-
* documentation and/or other materials provided with the distribution.
|
|
3757
|
-
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
3758
|
-
* may be used to endorse or promote products derived from this software without
|
|
3759
|
-
* specific prior written permission.
|
|
3760
|
-
*
|
|
3761
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
3762
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
3763
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
3764
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
3765
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
3766
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
3767
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
3768
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
3769
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
3770
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
3771
|
-
*/
|
|
3772
3550
|
let d$1 = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/, f$2 = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/, p$1 = /^[+-]?0[0-9_]/, m$3 = /^[0-9a-f]{2,8}$/i, h$5 = {
|
|
3773
3551
|
b: `\b`,
|
|
3774
3552
|
t: ` `,
|
|
@@ -3866,33 +3644,6 @@ function _$3(e, t, r, i) {
|
|
|
3866
3644
|
});
|
|
3867
3645
|
return o;
|
|
3868
3646
|
}
|
|
3869
|
-
/*!
|
|
3870
|
-
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
3871
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3872
|
-
*
|
|
3873
|
-
* Redistribution and use in source and binary forms, with or without
|
|
3874
|
-
* modification, are permitted provided that the following conditions are met:
|
|
3875
|
-
*
|
|
3876
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
3877
|
-
* list of conditions and the following disclaimer.
|
|
3878
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
3879
|
-
* this list of conditions and the following disclaimer in the
|
|
3880
|
-
* documentation and/or other materials provided with the distribution.
|
|
3881
|
-
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
3882
|
-
* may be used to endorse or promote products derived from this software without
|
|
3883
|
-
* specific prior written permission.
|
|
3884
|
-
*
|
|
3885
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
3886
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
3887
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
3888
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
3889
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
3890
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
3891
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
3892
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
3893
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
3894
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
3895
|
-
*/
|
|
3896
3647
|
function v$3(e, t, n) {
|
|
3897
3648
|
let r = e.slice(t, n), i = r.indexOf(`#`);
|
|
3898
3649
|
return i > -1 && (a$2(e, i), r = r.slice(0, i)), [r.trimEnd(), i];
|
|
@@ -3936,33 +3687,6 @@ function y$3(e, t, r, i, a) {
|
|
|
3936
3687
|
});
|
|
3937
3688
|
return r && d[1] > -1 && (u = o$1(e, t + d[1]), u += +(e[u] === `,`)), [_$3(d[0], e, t, a), u];
|
|
3938
3689
|
}
|
|
3939
|
-
/*!
|
|
3940
|
-
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
3941
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3942
|
-
*
|
|
3943
|
-
* Redistribution and use in source and binary forms, with or without
|
|
3944
|
-
* modification, are permitted provided that the following conditions are met:
|
|
3945
|
-
*
|
|
3946
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
3947
|
-
* list of conditions and the following disclaimer.
|
|
3948
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
3949
|
-
* this list of conditions and the following disclaimer in the
|
|
3950
|
-
* documentation and/or other materials provided with the distribution.
|
|
3951
|
-
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
3952
|
-
* may be used to endorse or promote products derived from this software without
|
|
3953
|
-
* specific prior written permission.
|
|
3954
|
-
*
|
|
3955
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
3956
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
3957
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
3958
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
3959
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
3960
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
3961
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
3962
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
3963
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
3964
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
3965
|
-
*/
|
|
3966
3690
|
let b$3 = /^[a-zA-Z0-9-_]+[ \t]*$/;
|
|
3967
3691
|
function x$3(e, t, r = `=`) {
|
|
3968
3692
|
let a = t - 1, s = [], l = e.indexOf(r, t);
|
|
@@ -4061,33 +3785,6 @@ function C$2(e, t, r, i) {
|
|
|
4061
3785
|
});
|
|
4062
3786
|
return [o, t];
|
|
4063
3787
|
}
|
|
4064
|
-
/*!
|
|
4065
|
-
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
4066
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
4067
|
-
*
|
|
4068
|
-
* Redistribution and use in source and binary forms, with or without
|
|
4069
|
-
* modification, are permitted provided that the following conditions are met:
|
|
4070
|
-
*
|
|
4071
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
4072
|
-
* list of conditions and the following disclaimer.
|
|
4073
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
4074
|
-
* this list of conditions and the following disclaimer in the
|
|
4075
|
-
* documentation and/or other materials provided with the distribution.
|
|
4076
|
-
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
4077
|
-
* may be used to endorse or promote products derived from this software without
|
|
4078
|
-
* specific prior written permission.
|
|
4079
|
-
*
|
|
4080
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
4081
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
4082
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
4083
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
4084
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
4085
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
4086
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
4087
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
4088
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
4089
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
4090
|
-
*/
|
|
4091
3788
|
function w$3(e, t, n, r) {
|
|
4092
3789
|
let i = t, a = n, o, s = !1, c;
|
|
4093
3790
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -4164,15 +3861,11 @@ function T$3(e, { maxDepth: t = 1e3, integersAsBigInt: r } = {}) {
|
|
|
4164
3861
|
}
|
|
4165
3862
|
return i;
|
|
4166
3863
|
}
|
|
4167
|
-
//#endregion
|
|
4168
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/toml.mjs
|
|
4169
3864
|
var toml_exports = /* @__PURE__ */ __exportAll({ parseTOML: () => i$3 });
|
|
4170
3865
|
function i$3(t) {
|
|
4171
3866
|
let r = T$3(t);
|
|
4172
3867
|
return a$7(t, r, { preserveIndentation: !1 }), r;
|
|
4173
3868
|
}
|
|
4174
|
-
//#endregion
|
|
4175
|
-
//#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/ini.mjs
|
|
4176
3869
|
var t$2 = o$7(((e, t) => {
|
|
4177
3870
|
let { hasOwnProperty: n } = Object.prototype, r = (e, t = {}) => {
|
|
4178
3871
|
typeof t == `string` && (t = { section: t }), t.align = t.align === !0, t.newline = t.newline === !0, t.sort = t.sort === !0, t.whitespace = t.whitespace === !0 || t.align === !0, t.platform = t.platform || typeof process < `u` && process.platform, t.bracketedArray = t.bracketedArray !== !1;
|
|
@@ -4269,8 +3962,6 @@ var t$2 = o$7(((e, t) => {
|
|
|
4269
3962
|
function n$2(e, n) {
|
|
4270
3963
|
return (0, t$2.parse)(e, n);
|
|
4271
3964
|
}
|
|
4272
|
-
//#endregion
|
|
4273
|
-
//#region node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs
|
|
4274
3965
|
var dist_exports$1 = /* @__PURE__ */ __exportAll({
|
|
4275
3966
|
findFile: () => findFile$1,
|
|
4276
3967
|
findNearestFile: () => findNearestFile$1,
|
|
@@ -4407,8 +4098,6 @@ async function readGitConfig(dir, opts) {
|
|
|
4407
4098
|
function parseGitConfig(ini) {
|
|
4408
4099
|
return n$2(ini.replaceAll(/^\[(\w+) "(.+)"\]$/gm, "[$1.$2]"));
|
|
4409
4100
|
}
|
|
4410
|
-
//#endregion
|
|
4411
|
-
//#region node_modules/.pnpm/std-env@4.0.0/node_modules/std-env/dist/index.mjs
|
|
4412
4101
|
const e$1 = globalThis.process?.env || Object.create(null), t$1 = globalThis.process || { env: e$1 }, n$1 = t$1 !== void 0 && t$1.env && t$1.env.NODE_ENV || void 0, r$2 = [
|
|
4413
4102
|
[`claude`, [`CLAUDECODE`, `CLAUDE_CODE`]],
|
|
4414
4103
|
[`replit`, [`REPL_ID`]],
|
|
@@ -4534,6 +4223,11 @@ const l$1 = [
|
|
|
4534
4223
|
`FIREBASE_APP_HOSTING`,
|
|
4535
4224
|
`FIREBASE_APP_HOSTING`,
|
|
4536
4225
|
{ ci: !0 }
|
|
4226
|
+
],
|
|
4227
|
+
[
|
|
4228
|
+
`EDGEONE_PAGES`,
|
|
4229
|
+
`EO_PAGES_CI`,
|
|
4230
|
+
{ ci: !0 }
|
|
4537
4231
|
]
|
|
4538
4232
|
];
|
|
4539
4233
|
function u$1() {
|
|
@@ -4573,8 +4267,6 @@ function I$2() {
|
|
|
4573
4267
|
if (e) return { name: e[1] };
|
|
4574
4268
|
}
|
|
4575
4269
|
const R$1 = I$2()?.name || ``;
|
|
4576
|
-
//#endregion
|
|
4577
|
-
//#region node_modules/.pnpm/dot-prop@10.1.0/node_modules/dot-prop/index.js
|
|
4578
4270
|
const isObject$2 = (value) => {
|
|
4579
4271
|
const type = typeof value;
|
|
4580
4272
|
return value !== null && (type === "object" || type === "function");
|
|
@@ -4709,8 +4401,6 @@ function getProperty(object, path, value) {
|
|
|
4709
4401
|
}
|
|
4710
4402
|
return object === void 0 ? value : object;
|
|
4711
4403
|
}
|
|
4712
|
-
//#endregion
|
|
4713
|
-
//#region src/utils/fs.ts
|
|
4714
4404
|
function prettyPath(p, highlight = true) {
|
|
4715
4405
|
p = relative$2(process.cwd(), p);
|
|
4716
4406
|
return highlight ? colors.cyan(p) : p;
|
|
@@ -4741,8 +4431,6 @@ async function isDirectory(path) {
|
|
|
4741
4431
|
return false;
|
|
4742
4432
|
}
|
|
4743
4433
|
}
|
|
4744
|
-
//#endregion
|
|
4745
|
-
//#region node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.3/node_modules/fdir/dist/index.mjs
|
|
4746
4434
|
var __require = /* @__PURE__ */ createRequire$1(import.meta.url);
|
|
4747
4435
|
function cleanPath(path) {
|
|
4748
4436
|
let normalized = normalize$1(path);
|
|
@@ -4960,11 +4648,6 @@ const walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) =>
|
|
|
4960
4648
|
function build$8(isSynchronous) {
|
|
4961
4649
|
return isSynchronous ? walkSync : walkAsync;
|
|
4962
4650
|
}
|
|
4963
|
-
/**
|
|
4964
|
-
* This is a custom stateless queue to track concurrent async fs calls.
|
|
4965
|
-
* It increments a counter whenever a call is queued and decrements it
|
|
4966
|
-
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
|
|
4967
|
-
*/
|
|
4968
4651
|
var Queue = class {
|
|
4969
4652
|
count = 0;
|
|
4970
4653
|
constructor(onQueueEmpty) {
|
|
@@ -4999,18 +4682,10 @@ var Counter = class {
|
|
|
4999
4682
|
get directories() {
|
|
5000
4683
|
return this._directories;
|
|
5001
4684
|
}
|
|
5002
|
-
/**
|
|
5003
|
-
* @deprecated use `directories` instead
|
|
5004
|
-
*/
|
|
5005
|
-
/* c8 ignore next 3 */
|
|
5006
4685
|
get dirs() {
|
|
5007
4686
|
return this._directories;
|
|
5008
4687
|
}
|
|
5009
4688
|
};
|
|
5010
|
-
/**
|
|
5011
|
-
* AbortController is not supported on Node 14 so we use this until we can drop
|
|
5012
|
-
* support for Node 14.
|
|
5013
|
-
*/
|
|
5014
4689
|
var Aborter = class {
|
|
5015
4690
|
aborted = false;
|
|
5016
4691
|
abort() {
|
|
@@ -5043,7 +4718,7 @@ var Walker = class {
|
|
|
5043
4718
|
symlinks: /* @__PURE__ */ new Map(),
|
|
5044
4719
|
visited: [""].slice(0, 0),
|
|
5045
4720
|
controller: new Aborter(),
|
|
5046
|
-
fs: options.fs || nativeFs
|
|
4721
|
+
fs: options.fs || nativeFs
|
|
5047
4722
|
};
|
|
5048
4723
|
this.joinPath = build$7(this.root, options);
|
|
5049
4724
|
this.pushDirectory = build$6(this.root, options);
|
|
@@ -5122,7 +4797,6 @@ var APIBuilder = class {
|
|
|
5122
4797
|
}
|
|
5123
4798
|
};
|
|
5124
4799
|
let pm$2 = null;
|
|
5125
|
-
/* c8 ignore next 6 */
|
|
5126
4800
|
try {
|
|
5127
4801
|
__require.resolve("picomatch");
|
|
5128
4802
|
pm$2 = __require("picomatch");
|
|
@@ -5217,14 +4891,6 @@ var Builder = class {
|
|
|
5217
4891
|
this.globFunction = fn;
|
|
5218
4892
|
return this;
|
|
5219
4893
|
}
|
|
5220
|
-
/**
|
|
5221
|
-
* @deprecated Pass options using the constructor instead:
|
|
5222
|
-
* ```ts
|
|
5223
|
-
* new fdir(options).crawl("/path/to/root");
|
|
5224
|
-
* ```
|
|
5225
|
-
* This method will be removed in v7.0
|
|
5226
|
-
*/
|
|
5227
|
-
/* c8 ignore next 4 */
|
|
5228
4894
|
crawlWithOptions(root, options) {
|
|
5229
4895
|
this.options = {
|
|
5230
4896
|
...this.options,
|
|
@@ -5238,7 +4904,6 @@ var Builder = class {
|
|
|
5238
4904
|
}
|
|
5239
4905
|
globWithOptions(patterns, ...options) {
|
|
5240
4906
|
const globFn = this.globFunction || pm$2;
|
|
5241
|
-
/* c8 ignore next 5 */
|
|
5242
4907
|
if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
|
|
5243
4908
|
var isMatch = this.globCache[patterns.join("\0")];
|
|
5244
4909
|
if (!isMatch) {
|
|
@@ -5249,14 +4914,10 @@ var Builder = class {
|
|
|
5249
4914
|
return this;
|
|
5250
4915
|
}
|
|
5251
4916
|
};
|
|
5252
|
-
//#endregion
|
|
5253
|
-
//#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js
|
|
5254
4917
|
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5255
4918
|
const WIN_SLASH = "\\\\/";
|
|
5256
4919
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
5257
|
-
|
|
5258
|
-
* Posix glob regex
|
|
5259
|
-
*/
|
|
4920
|
+
const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
5260
4921
|
const DOT_LITERAL = "\\.";
|
|
5261
4922
|
const PLUS_LITERAL = "\\+";
|
|
5262
4923
|
const QMARK_LITERAL = "\\?";
|
|
@@ -5284,9 +4945,6 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5284
4945
|
START_ANCHOR,
|
|
5285
4946
|
SEP: "/"
|
|
5286
4947
|
};
|
|
5287
|
-
/**
|
|
5288
|
-
* Windows glob regex
|
|
5289
|
-
*/
|
|
5290
4948
|
const WINDOWS_CHARS = {
|
|
5291
4949
|
...POSIX_CHARS,
|
|
5292
4950
|
SLASH_LITERAL: `[${WIN_SLASH}]`,
|
|
@@ -5303,8 +4961,10 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5303
4961
|
SEP: "\\"
|
|
5304
4962
|
};
|
|
5305
4963
|
module.exports = {
|
|
4964
|
+
DEFAULT_MAX_EXTGLOB_RECURSION,
|
|
5306
4965
|
MAX_LENGTH: 1024 * 64,
|
|
5307
4966
|
POSIX_REGEX_SOURCE: {
|
|
4967
|
+
__proto__: null,
|
|
5308
4968
|
alnum: "a-zA-Z0-9",
|
|
5309
4969
|
alpha: "a-zA-Z",
|
|
5310
4970
|
ascii: "\\x00-\\x7F",
|
|
@@ -5409,8 +5069,6 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5409
5069
|
}
|
|
5410
5070
|
};
|
|
5411
5071
|
}));
|
|
5412
|
-
//#endregion
|
|
5413
|
-
//#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js
|
|
5414
5072
|
var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5415
5073
|
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
|
|
5416
5074
|
exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
@@ -5457,8 +5115,6 @@ var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5457
5115
|
return last;
|
|
5458
5116
|
};
|
|
5459
5117
|
}));
|
|
5460
|
-
//#endregion
|
|
5461
|
-
//#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js
|
|
5462
5118
|
var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5463
5119
|
const utils = require_utils$1();
|
|
5464
5120
|
const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants();
|
|
@@ -5468,22 +5124,6 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5468
5124
|
const depth = (token) => {
|
|
5469
5125
|
if (token.isPrefix !== true) token.depth = token.isGlobstar ? Infinity : 1;
|
|
5470
5126
|
};
|
|
5471
|
-
/**
|
|
5472
|
-
* Quickly scans a glob pattern and returns an object with a handful of
|
|
5473
|
-
* useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
|
|
5474
|
-
* `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
|
|
5475
|
-
* with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
|
|
5476
|
-
*
|
|
5477
|
-
* ```js
|
|
5478
|
-
* const pm = require('picomatch');
|
|
5479
|
-
* console.log(pm.scan('foo/bar/*.js'));
|
|
5480
|
-
* { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
|
|
5481
|
-
* ```
|
|
5482
|
-
* @param {String} `str`
|
|
5483
|
-
* @param {Object} `options`
|
|
5484
|
-
* @return {Object} Returns an object with tokens and regex source string.
|
|
5485
|
-
* @api public
|
|
5486
|
-
*/
|
|
5487
5127
|
const scan = (input, options) => {
|
|
5488
5128
|
const opts = options || {};
|
|
5489
5129
|
const length = input.length - 1;
|
|
@@ -5744,18 +5384,10 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5744
5384
|
};
|
|
5745
5385
|
module.exports = scan;
|
|
5746
5386
|
}));
|
|
5747
|
-
//#endregion
|
|
5748
|
-
//#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.js
|
|
5749
5387
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5750
5388
|
const constants = require_constants();
|
|
5751
5389
|
const utils = require_utils$1();
|
|
5752
|
-
/**
|
|
5753
|
-
* Constants
|
|
5754
|
-
*/
|
|
5755
5390
|
const { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants;
|
|
5756
|
-
/**
|
|
5757
|
-
* Helpers
|
|
5758
|
-
*/
|
|
5759
5391
|
const expandRange = (args, options) => {
|
|
5760
5392
|
if (typeof options.expandRange === "function") return options.expandRange(...args, options);
|
|
5761
5393
|
args.sort();
|
|
@@ -5767,18 +5399,180 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5767
5399
|
}
|
|
5768
5400
|
return value;
|
|
5769
5401
|
};
|
|
5770
|
-
/**
|
|
5771
|
-
* Create the message for a syntax error
|
|
5772
|
-
*/
|
|
5773
5402
|
const syntaxError = (type, char) => {
|
|
5774
5403
|
return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
|
|
5775
5404
|
};
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5405
|
+
const splitTopLevel = (input) => {
|
|
5406
|
+
const parts = [];
|
|
5407
|
+
let bracket = 0;
|
|
5408
|
+
let paren = 0;
|
|
5409
|
+
let quote = 0;
|
|
5410
|
+
let value = "";
|
|
5411
|
+
let escaped = false;
|
|
5412
|
+
for (const ch of input) {
|
|
5413
|
+
if (escaped === true) {
|
|
5414
|
+
value += ch;
|
|
5415
|
+
escaped = false;
|
|
5416
|
+
continue;
|
|
5417
|
+
}
|
|
5418
|
+
if (ch === "\\") {
|
|
5419
|
+
value += ch;
|
|
5420
|
+
escaped = true;
|
|
5421
|
+
continue;
|
|
5422
|
+
}
|
|
5423
|
+
if (ch === "\"") {
|
|
5424
|
+
quote = quote === 1 ? 0 : 1;
|
|
5425
|
+
value += ch;
|
|
5426
|
+
continue;
|
|
5427
|
+
}
|
|
5428
|
+
if (quote === 0) {
|
|
5429
|
+
if (ch === "[") bracket++;
|
|
5430
|
+
else if (ch === "]" && bracket > 0) bracket--;
|
|
5431
|
+
else if (bracket === 0) {
|
|
5432
|
+
if (ch === "(") paren++;
|
|
5433
|
+
else if (ch === ")" && paren > 0) paren--;
|
|
5434
|
+
else if (ch === "|" && paren === 0) {
|
|
5435
|
+
parts.push(value);
|
|
5436
|
+
value = "";
|
|
5437
|
+
continue;
|
|
5438
|
+
}
|
|
5439
|
+
}
|
|
5440
|
+
}
|
|
5441
|
+
value += ch;
|
|
5442
|
+
}
|
|
5443
|
+
parts.push(value);
|
|
5444
|
+
return parts;
|
|
5445
|
+
};
|
|
5446
|
+
const isPlainBranch = (branch) => {
|
|
5447
|
+
let escaped = false;
|
|
5448
|
+
for (const ch of branch) {
|
|
5449
|
+
if (escaped === true) {
|
|
5450
|
+
escaped = false;
|
|
5451
|
+
continue;
|
|
5452
|
+
}
|
|
5453
|
+
if (ch === "\\") {
|
|
5454
|
+
escaped = true;
|
|
5455
|
+
continue;
|
|
5456
|
+
}
|
|
5457
|
+
if (/[?*+@!()[\]{}]/.test(ch)) return false;
|
|
5458
|
+
}
|
|
5459
|
+
return true;
|
|
5460
|
+
};
|
|
5461
|
+
const normalizeSimpleBranch = (branch) => {
|
|
5462
|
+
let value = branch.trim();
|
|
5463
|
+
let changed = true;
|
|
5464
|
+
while (changed === true) {
|
|
5465
|
+
changed = false;
|
|
5466
|
+
if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
|
|
5467
|
+
value = value.slice(2, -1);
|
|
5468
|
+
changed = true;
|
|
5469
|
+
}
|
|
5470
|
+
}
|
|
5471
|
+
if (!isPlainBranch(value)) return;
|
|
5472
|
+
return value.replace(/\\(.)/g, "$1");
|
|
5473
|
+
};
|
|
5474
|
+
const hasRepeatedCharPrefixOverlap = (branches) => {
|
|
5475
|
+
const values = branches.map(normalizeSimpleBranch).filter(Boolean);
|
|
5476
|
+
for (let i = 0; i < values.length; i++) for (let j = i + 1; j < values.length; j++) {
|
|
5477
|
+
const a = values[i];
|
|
5478
|
+
const b = values[j];
|
|
5479
|
+
const char = a[0];
|
|
5480
|
+
if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) continue;
|
|
5481
|
+
if (a === b || a.startsWith(b) || b.startsWith(a)) return true;
|
|
5482
|
+
}
|
|
5483
|
+
return false;
|
|
5484
|
+
};
|
|
5485
|
+
const parseRepeatedExtglob = (pattern, requireEnd = true) => {
|
|
5486
|
+
if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") return;
|
|
5487
|
+
let bracket = 0;
|
|
5488
|
+
let paren = 0;
|
|
5489
|
+
let quote = 0;
|
|
5490
|
+
let escaped = false;
|
|
5491
|
+
for (let i = 1; i < pattern.length; i++) {
|
|
5492
|
+
const ch = pattern[i];
|
|
5493
|
+
if (escaped === true) {
|
|
5494
|
+
escaped = false;
|
|
5495
|
+
continue;
|
|
5496
|
+
}
|
|
5497
|
+
if (ch === "\\") {
|
|
5498
|
+
escaped = true;
|
|
5499
|
+
continue;
|
|
5500
|
+
}
|
|
5501
|
+
if (ch === "\"") {
|
|
5502
|
+
quote = quote === 1 ? 0 : 1;
|
|
5503
|
+
continue;
|
|
5504
|
+
}
|
|
5505
|
+
if (quote === 1) continue;
|
|
5506
|
+
if (ch === "[") {
|
|
5507
|
+
bracket++;
|
|
5508
|
+
continue;
|
|
5509
|
+
}
|
|
5510
|
+
if (ch === "]" && bracket > 0) {
|
|
5511
|
+
bracket--;
|
|
5512
|
+
continue;
|
|
5513
|
+
}
|
|
5514
|
+
if (bracket > 0) continue;
|
|
5515
|
+
if (ch === "(") {
|
|
5516
|
+
paren++;
|
|
5517
|
+
continue;
|
|
5518
|
+
}
|
|
5519
|
+
if (ch === ")") {
|
|
5520
|
+
paren--;
|
|
5521
|
+
if (paren === 0) {
|
|
5522
|
+
if (requireEnd === true && i !== pattern.length - 1) return;
|
|
5523
|
+
return {
|
|
5524
|
+
type: pattern[0],
|
|
5525
|
+
body: pattern.slice(2, i),
|
|
5526
|
+
end: i
|
|
5527
|
+
};
|
|
5528
|
+
}
|
|
5529
|
+
}
|
|
5530
|
+
}
|
|
5531
|
+
};
|
|
5532
|
+
const getStarExtglobSequenceOutput = (pattern) => {
|
|
5533
|
+
let index = 0;
|
|
5534
|
+
const chars = [];
|
|
5535
|
+
while (index < pattern.length) {
|
|
5536
|
+
const match = parseRepeatedExtglob(pattern.slice(index), false);
|
|
5537
|
+
if (!match || match.type !== "*") return;
|
|
5538
|
+
const branches = splitTopLevel(match.body).map((branch) => branch.trim());
|
|
5539
|
+
if (branches.length !== 1) return;
|
|
5540
|
+
const branch = normalizeSimpleBranch(branches[0]);
|
|
5541
|
+
if (!branch || branch.length !== 1) return;
|
|
5542
|
+
chars.push(branch);
|
|
5543
|
+
index += match.end + 1;
|
|
5544
|
+
}
|
|
5545
|
+
if (chars.length < 1) return;
|
|
5546
|
+
return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`;
|
|
5547
|
+
};
|
|
5548
|
+
const repeatedExtglobRecursion = (pattern) => {
|
|
5549
|
+
let depth = 0;
|
|
5550
|
+
let value = pattern.trim();
|
|
5551
|
+
let match = parseRepeatedExtglob(value);
|
|
5552
|
+
while (match) {
|
|
5553
|
+
depth++;
|
|
5554
|
+
value = match.body.trim();
|
|
5555
|
+
match = parseRepeatedExtglob(value);
|
|
5556
|
+
}
|
|
5557
|
+
return depth;
|
|
5558
|
+
};
|
|
5559
|
+
const analyzeRepeatedExtglob = (body, options) => {
|
|
5560
|
+
if (options.maxExtglobRecursion === false) return { risky: false };
|
|
5561
|
+
const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
|
|
5562
|
+
const branches = splitTopLevel(body).map((branch) => branch.trim());
|
|
5563
|
+
if (branches.length > 1) {
|
|
5564
|
+
if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return { risky: true };
|
|
5565
|
+
}
|
|
5566
|
+
for (const branch of branches) {
|
|
5567
|
+
const safeOutput = getStarExtglobSequenceOutput(branch);
|
|
5568
|
+
if (safeOutput) return {
|
|
5569
|
+
risky: true,
|
|
5570
|
+
safeOutput
|
|
5571
|
+
};
|
|
5572
|
+
if (repeatedExtglobRecursion(branch) > max) return { risky: true };
|
|
5573
|
+
}
|
|
5574
|
+
return { risky: false };
|
|
5575
|
+
};
|
|
5782
5576
|
const parse = (input, options) => {
|
|
5783
5577
|
if (typeof input !== "string") throw new TypeError("Expected a string");
|
|
5784
5578
|
input = REPLACEMENTS[input] || input;
|
|
@@ -5828,9 +5622,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5828
5622
|
const stack = [];
|
|
5829
5623
|
let prev = bos;
|
|
5830
5624
|
let value;
|
|
5831
|
-
/**
|
|
5832
|
-
* Tokenizing helpers
|
|
5833
|
-
*/
|
|
5834
5625
|
const eos = () => state.index === len - 1;
|
|
5835
5626
|
const peek = state.peek = (n = 1) => input[state.index + n];
|
|
5836
5627
|
const advance = state.advance = () => input[++state.index] || "";
|
|
@@ -5863,13 +5654,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5863
5654
|
state[type]--;
|
|
5864
5655
|
stack.pop();
|
|
5865
5656
|
};
|
|
5866
|
-
/**
|
|
5867
|
-
* Push tokens onto the tokens array. This helper speeds up
|
|
5868
|
-
* tokenizing by 1) helping us avoid backtracking as much as possible,
|
|
5869
|
-
* and 2) helping us avoid creating extra tokens when consecutive
|
|
5870
|
-
* characters are plain text. This improves performance and simplifies
|
|
5871
|
-
* lookbehinds.
|
|
5872
|
-
*/
|
|
5873
5657
|
const push = (tok) => {
|
|
5874
5658
|
if (prev.type === "globstar") {
|
|
5875
5659
|
const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
|
|
@@ -5902,6 +5686,8 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5902
5686
|
token.prev = prev;
|
|
5903
5687
|
token.parens = state.parens;
|
|
5904
5688
|
token.output = state.output;
|
|
5689
|
+
token.startIndex = state.index;
|
|
5690
|
+
token.tokensIndex = tokens.length;
|
|
5905
5691
|
const output = (opts.capture ? "(" : "") + token.open;
|
|
5906
5692
|
increment("parens");
|
|
5907
5693
|
push({
|
|
@@ -5918,6 +5704,30 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5918
5704
|
extglobs.push(token);
|
|
5919
5705
|
};
|
|
5920
5706
|
const extglobClose = (token) => {
|
|
5707
|
+
const literal = input.slice(token.startIndex, state.index + 1);
|
|
5708
|
+
const analysis = analyzeRepeatedExtglob(input.slice(token.startIndex + 2, state.index), opts);
|
|
5709
|
+
if ((token.type === "plus" || token.type === "star") && analysis.risky) {
|
|
5710
|
+
const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
|
|
5711
|
+
const open = tokens[token.tokensIndex];
|
|
5712
|
+
open.type = "text";
|
|
5713
|
+
open.value = literal;
|
|
5714
|
+
open.output = safeOutput || utils.escapeRegex(literal);
|
|
5715
|
+
for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
|
|
5716
|
+
tokens[i].value = "";
|
|
5717
|
+
tokens[i].output = "";
|
|
5718
|
+
delete tokens[i].suffix;
|
|
5719
|
+
}
|
|
5720
|
+
state.output = token.output + open.output;
|
|
5721
|
+
state.backtrack = true;
|
|
5722
|
+
push({
|
|
5723
|
+
type: "paren",
|
|
5724
|
+
extglob: true,
|
|
5725
|
+
value,
|
|
5726
|
+
output: ""
|
|
5727
|
+
});
|
|
5728
|
+
decrement("parens");
|
|
5729
|
+
return;
|
|
5730
|
+
}
|
|
5921
5731
|
let output = token.close + (opts.capture ? ")" : "");
|
|
5922
5732
|
let rest;
|
|
5923
5733
|
if (token.type === "negate") {
|
|
@@ -5938,9 +5748,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5938
5748
|
});
|
|
5939
5749
|
decrement("parens");
|
|
5940
5750
|
};
|
|
5941
|
-
/**
|
|
5942
|
-
* Fast paths
|
|
5943
|
-
*/
|
|
5944
5751
|
if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
|
|
5945
5752
|
let backslashes = false;
|
|
5946
5753
|
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
|
|
@@ -5971,15 +5778,9 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5971
5778
|
state.output = utils.wrapOutput(output, state, options);
|
|
5972
5779
|
return state;
|
|
5973
5780
|
}
|
|
5974
|
-
/**
|
|
5975
|
-
* Tokenize input until we reach end-of-string
|
|
5976
|
-
*/
|
|
5977
5781
|
while (!eos()) {
|
|
5978
5782
|
value = advance();
|
|
5979
5783
|
if (value === "\0") continue;
|
|
5980
|
-
/**
|
|
5981
|
-
* Escaped characters
|
|
5982
|
-
*/
|
|
5983
5784
|
if (value === "\\") {
|
|
5984
5785
|
const next = peek();
|
|
5985
5786
|
if (next === "/" && opts.bash !== true) continue;
|
|
@@ -6009,10 +5810,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6009
5810
|
continue;
|
|
6010
5811
|
}
|
|
6011
5812
|
}
|
|
6012
|
-
/**
|
|
6013
|
-
* If we're inside a regex character class, continue
|
|
6014
|
-
* until we reach the closing bracket.
|
|
6015
|
-
*/
|
|
6016
5813
|
if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
|
|
6017
5814
|
if (opts.posix !== false && value === ":") {
|
|
6018
5815
|
const inner = prev.value.slice(1);
|
|
@@ -6039,19 +5836,12 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6039
5836
|
append({ value });
|
|
6040
5837
|
continue;
|
|
6041
5838
|
}
|
|
6042
|
-
/**
|
|
6043
|
-
* If we're inside a quoted string, continue
|
|
6044
|
-
* until we reach the closing double quote.
|
|
6045
|
-
*/
|
|
6046
5839
|
if (state.quotes === 1 && value !== "\"") {
|
|
6047
5840
|
value = utils.escapeRegex(value);
|
|
6048
5841
|
prev.value += value;
|
|
6049
5842
|
append({ value });
|
|
6050
5843
|
continue;
|
|
6051
5844
|
}
|
|
6052
|
-
/**
|
|
6053
|
-
* Double quotes
|
|
6054
|
-
*/
|
|
6055
5845
|
if (value === "\"") {
|
|
6056
5846
|
state.quotes = state.quotes === 1 ? 0 : 1;
|
|
6057
5847
|
if (opts.keepQuotes === true) push({
|
|
@@ -6060,9 +5850,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6060
5850
|
});
|
|
6061
5851
|
continue;
|
|
6062
5852
|
}
|
|
6063
|
-
/**
|
|
6064
|
-
* Parentheses
|
|
6065
|
-
*/
|
|
6066
5853
|
if (value === "(") {
|
|
6067
5854
|
increment("parens");
|
|
6068
5855
|
push({
|
|
@@ -6086,9 +5873,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6086
5873
|
decrement("parens");
|
|
6087
5874
|
continue;
|
|
6088
5875
|
}
|
|
6089
|
-
/**
|
|
6090
|
-
* Square brackets
|
|
6091
|
-
*/
|
|
6092
5876
|
if (value === "[") {
|
|
6093
5877
|
if (opts.nobracket === true || !remaining().includes("]")) {
|
|
6094
5878
|
if (opts.nobracket !== true && opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
|
|
@@ -6135,9 +5919,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6135
5919
|
state.output += prev.value;
|
|
6136
5920
|
continue;
|
|
6137
5921
|
}
|
|
6138
|
-
/**
|
|
6139
|
-
* Braces
|
|
6140
|
-
*/
|
|
6141
5922
|
if (value === "{" && opts.nobrace !== true) {
|
|
6142
5923
|
increment("braces");
|
|
6143
5924
|
const open = {
|
|
@@ -6190,9 +5971,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6190
5971
|
braces.pop();
|
|
6191
5972
|
continue;
|
|
6192
5973
|
}
|
|
6193
|
-
/**
|
|
6194
|
-
* Pipes
|
|
6195
|
-
*/
|
|
6196
5974
|
if (value === "|") {
|
|
6197
5975
|
if (extglobs.length > 0) extglobs[extglobs.length - 1].conditions++;
|
|
6198
5976
|
push({
|
|
@@ -6201,9 +5979,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6201
5979
|
});
|
|
6202
5980
|
continue;
|
|
6203
5981
|
}
|
|
6204
|
-
/**
|
|
6205
|
-
* Commas
|
|
6206
|
-
*/
|
|
6207
5982
|
if (value === ",") {
|
|
6208
5983
|
let output = value;
|
|
6209
5984
|
const brace = braces[braces.length - 1];
|
|
@@ -6218,9 +5993,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6218
5993
|
});
|
|
6219
5994
|
continue;
|
|
6220
5995
|
}
|
|
6221
|
-
/**
|
|
6222
|
-
* Slashes
|
|
6223
|
-
*/
|
|
6224
5996
|
if (value === "/") {
|
|
6225
5997
|
if (prev.type === "dot" && state.index === state.start + 1) {
|
|
6226
5998
|
state.start = state.index + 1;
|
|
@@ -6237,9 +6009,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6237
6009
|
});
|
|
6238
6010
|
continue;
|
|
6239
6011
|
}
|
|
6240
|
-
/**
|
|
6241
|
-
* Dots
|
|
6242
|
-
*/
|
|
6243
6012
|
if (value === ".") {
|
|
6244
6013
|
if (state.braces > 0 && prev.type === "dot") {
|
|
6245
6014
|
if (prev.value === ".") prev.output = DOT_LITERAL;
|
|
@@ -6265,9 +6034,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6265
6034
|
});
|
|
6266
6035
|
continue;
|
|
6267
6036
|
}
|
|
6268
|
-
/**
|
|
6269
|
-
* Question marks
|
|
6270
|
-
*/
|
|
6271
6037
|
if (value === "?") {
|
|
6272
6038
|
if (!(prev && prev.value === "(") && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
|
|
6273
6039
|
extglobOpen("qmark", value);
|
|
@@ -6299,9 +6065,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6299
6065
|
});
|
|
6300
6066
|
continue;
|
|
6301
6067
|
}
|
|
6302
|
-
/**
|
|
6303
|
-
* Exclamation
|
|
6304
|
-
*/
|
|
6305
6068
|
if (value === "!") {
|
|
6306
6069
|
if (opts.noextglob !== true && peek() === "(") {
|
|
6307
6070
|
if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
|
|
@@ -6314,9 +6077,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6314
6077
|
continue;
|
|
6315
6078
|
}
|
|
6316
6079
|
}
|
|
6317
|
-
/**
|
|
6318
|
-
* Plus
|
|
6319
|
-
*/
|
|
6320
6080
|
if (value === "+") {
|
|
6321
6081
|
if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
|
|
6322
6082
|
extglobOpen("plus", value);
|
|
@@ -6343,9 +6103,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6343
6103
|
});
|
|
6344
6104
|
continue;
|
|
6345
6105
|
}
|
|
6346
|
-
/**
|
|
6347
|
-
* Plain text
|
|
6348
|
-
*/
|
|
6349
6106
|
if (value === "@") {
|
|
6350
6107
|
if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
|
|
6351
6108
|
push({
|
|
@@ -6362,9 +6119,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6362
6119
|
});
|
|
6363
6120
|
continue;
|
|
6364
6121
|
}
|
|
6365
|
-
/**
|
|
6366
|
-
* Plain text
|
|
6367
|
-
*/
|
|
6368
6122
|
if (value !== "*") {
|
|
6369
6123
|
if (value === "$" || value === "^") value = `\\${value}`;
|
|
6370
6124
|
const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
|
|
@@ -6378,9 +6132,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6378
6132
|
});
|
|
6379
6133
|
continue;
|
|
6380
6134
|
}
|
|
6381
|
-
/**
|
|
6382
|
-
* Stars
|
|
6383
|
-
*/
|
|
6384
6135
|
if (prev && (prev.type === "globstar" || prev.star === true)) {
|
|
6385
6136
|
prev.type = "star";
|
|
6386
6137
|
prev.star = true;
|
|
@@ -6552,11 +6303,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6552
6303
|
}
|
|
6553
6304
|
return state;
|
|
6554
6305
|
};
|
|
6555
|
-
/**
|
|
6556
|
-
* Fast paths for creating regular expressions for common glob patterns.
|
|
6557
|
-
* This can significantly speed up processing and has very little downside
|
|
6558
|
-
* impact when none of the fast paths match.
|
|
6559
|
-
*/
|
|
6560
6306
|
parse.fastpaths = (input, options) => {
|
|
6561
6307
|
const opts = { ...options };
|
|
6562
6308
|
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
@@ -6602,35 +6348,12 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6602
6348
|
};
|
|
6603
6349
|
module.exports = parse;
|
|
6604
6350
|
}));
|
|
6605
|
-
//#endregion
|
|
6606
|
-
//#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js
|
|
6607
6351
|
var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6608
6352
|
const scan = require_scan();
|
|
6609
6353
|
const parse = require_parse();
|
|
6610
6354
|
const utils = require_utils$1();
|
|
6611
6355
|
const constants = require_constants();
|
|
6612
6356
|
const isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
|
|
6613
|
-
/**
|
|
6614
|
-
* Creates a matcher function from one or more glob patterns. The
|
|
6615
|
-
* returned function takes a string to match as its first argument,
|
|
6616
|
-
* and returns true if the string is a match. The returned matcher
|
|
6617
|
-
* function also takes a boolean as the second argument that, when true,
|
|
6618
|
-
* returns an object with additional information.
|
|
6619
|
-
*
|
|
6620
|
-
* ```js
|
|
6621
|
-
* const picomatch = require('picomatch');
|
|
6622
|
-
* // picomatch(glob[, options]);
|
|
6623
|
-
*
|
|
6624
|
-
* const isMatch = picomatch('*.!(*a)');
|
|
6625
|
-
* console.log(isMatch('a.a')); //=> false
|
|
6626
|
-
* console.log(isMatch('a.b')); //=> true
|
|
6627
|
-
* ```
|
|
6628
|
-
* @name picomatch
|
|
6629
|
-
* @param {String|Array} `globs` One or more glob patterns.
|
|
6630
|
-
* @param {Object=} `options`
|
|
6631
|
-
* @return {Function=} Returns a matcher function.
|
|
6632
|
-
* @api public
|
|
6633
|
-
*/
|
|
6634
6357
|
const picomatch = (glob, options, returnState = false) => {
|
|
6635
6358
|
if (Array.isArray(glob)) {
|
|
6636
6359
|
const fns = glob.map((input) => picomatch(input, options, returnState));
|
|
@@ -6691,22 +6414,6 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6691
6414
|
if (returnState) matcher.state = state;
|
|
6692
6415
|
return matcher;
|
|
6693
6416
|
};
|
|
6694
|
-
/**
|
|
6695
|
-
* Test `input` with the given `regex`. This is used by the main
|
|
6696
|
-
* `picomatch()` function to test the input string.
|
|
6697
|
-
*
|
|
6698
|
-
* ```js
|
|
6699
|
-
* const picomatch = require('picomatch');
|
|
6700
|
-
* // picomatch.test(input, regex[, options]);
|
|
6701
|
-
*
|
|
6702
|
-
* console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
|
|
6703
|
-
* // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
|
|
6704
|
-
* ```
|
|
6705
|
-
* @param {String} `input` String to test.
|
|
6706
|
-
* @param {RegExp} `regex`
|
|
6707
|
-
* @return {Object} Returns an object with matching info.
|
|
6708
|
-
* @api public
|
|
6709
|
-
*/
|
|
6710
6417
|
picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
|
6711
6418
|
if (typeof input !== "string") throw new TypeError("Expected input to be a string");
|
|
6712
6419
|
if (input === "") return {
|
|
@@ -6729,52 +6436,10 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6729
6436
|
output
|
|
6730
6437
|
};
|
|
6731
6438
|
};
|
|
6732
|
-
/**
|
|
6733
|
-
* Match the basename of a filepath.
|
|
6734
|
-
*
|
|
6735
|
-
* ```js
|
|
6736
|
-
* const picomatch = require('picomatch');
|
|
6737
|
-
* // picomatch.matchBase(input, glob[, options]);
|
|
6738
|
-
* console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
|
|
6739
|
-
* ```
|
|
6740
|
-
* @param {String} `input` String to test.
|
|
6741
|
-
* @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
|
|
6742
|
-
* @return {Boolean}
|
|
6743
|
-
* @api public
|
|
6744
|
-
*/
|
|
6745
6439
|
picomatch.matchBase = (input, glob, options) => {
|
|
6746
6440
|
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input));
|
|
6747
6441
|
};
|
|
6748
|
-
/**
|
|
6749
|
-
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
|
6750
|
-
*
|
|
6751
|
-
* ```js
|
|
6752
|
-
* const picomatch = require('picomatch');
|
|
6753
|
-
* // picomatch.isMatch(string, patterns[, options]);
|
|
6754
|
-
*
|
|
6755
|
-
* console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
|
|
6756
|
-
* console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
|
|
6757
|
-
* ```
|
|
6758
|
-
* @param {String|Array} str The string to test.
|
|
6759
|
-
* @param {String|Array} patterns One or more glob patterns to use for matching.
|
|
6760
|
-
* @param {Object} [options] See available [options](#options).
|
|
6761
|
-
* @return {Boolean} Returns true if any patterns match `str`
|
|
6762
|
-
* @api public
|
|
6763
|
-
*/
|
|
6764
6442
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
6765
|
-
/**
|
|
6766
|
-
* Parse a glob pattern to create the source string for a regular
|
|
6767
|
-
* expression.
|
|
6768
|
-
*
|
|
6769
|
-
* ```js
|
|
6770
|
-
* const picomatch = require('picomatch');
|
|
6771
|
-
* const result = picomatch.parse(pattern[, options]);
|
|
6772
|
-
* ```
|
|
6773
|
-
* @param {String} `pattern`
|
|
6774
|
-
* @param {Object} `options`
|
|
6775
|
-
* @return {Object} Returns an object with useful properties and output to be used as a regex source string.
|
|
6776
|
-
* @api public
|
|
6777
|
-
*/
|
|
6778
6443
|
picomatch.parse = (pattern, options) => {
|
|
6779
6444
|
if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
|
|
6780
6445
|
return parse(pattern, {
|
|
@@ -6782,44 +6447,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6782
6447
|
fastpaths: false
|
|
6783
6448
|
});
|
|
6784
6449
|
};
|
|
6785
|
-
/**
|
|
6786
|
-
* Scan a glob pattern to separate the pattern into segments.
|
|
6787
|
-
*
|
|
6788
|
-
* ```js
|
|
6789
|
-
* const picomatch = require('picomatch');
|
|
6790
|
-
* // picomatch.scan(input[, options]);
|
|
6791
|
-
*
|
|
6792
|
-
* const result = picomatch.scan('!./foo/*.js');
|
|
6793
|
-
* console.log(result);
|
|
6794
|
-
* { prefix: '!./',
|
|
6795
|
-
* input: '!./foo/*.js',
|
|
6796
|
-
* start: 3,
|
|
6797
|
-
* base: 'foo',
|
|
6798
|
-
* glob: '*.js',
|
|
6799
|
-
* isBrace: false,
|
|
6800
|
-
* isBracket: false,
|
|
6801
|
-
* isGlob: true,
|
|
6802
|
-
* isExtglob: false,
|
|
6803
|
-
* isGlobstar: false,
|
|
6804
|
-
* negated: true }
|
|
6805
|
-
* ```
|
|
6806
|
-
* @param {String} `input` Glob pattern to scan.
|
|
6807
|
-
* @param {Object} `options`
|
|
6808
|
-
* @return {Object} Returns an object with
|
|
6809
|
-
* @api public
|
|
6810
|
-
*/
|
|
6811
6450
|
picomatch.scan = (input, options) => scan(input, options);
|
|
6812
|
-
/**
|
|
6813
|
-
* Compile a regular expression from the `state` object returned by the
|
|
6814
|
-
* [parse()](#parse) method.
|
|
6815
|
-
*
|
|
6816
|
-
* @param {Object} `state`
|
|
6817
|
-
* @param {Object} `options`
|
|
6818
|
-
* @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
|
|
6819
|
-
* @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
|
|
6820
|
-
* @return {RegExp}
|
|
6821
|
-
* @api public
|
|
6822
|
-
*/
|
|
6823
6451
|
picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
6824
6452
|
if (returnOutput === true) return state.output;
|
|
6825
6453
|
const opts = options || {};
|
|
@@ -6831,24 +6459,6 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6831
6459
|
if (returnState === true) regex.state = state;
|
|
6832
6460
|
return regex;
|
|
6833
6461
|
};
|
|
6834
|
-
/**
|
|
6835
|
-
* Create a regular expression from a parsed glob pattern.
|
|
6836
|
-
*
|
|
6837
|
-
* ```js
|
|
6838
|
-
* const picomatch = require('picomatch');
|
|
6839
|
-
* const state = picomatch.parse('*.js');
|
|
6840
|
-
* // picomatch.compileRe(state[, options]);
|
|
6841
|
-
*
|
|
6842
|
-
* console.log(picomatch.compileRe(state));
|
|
6843
|
-
* //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
|
|
6844
|
-
* ```
|
|
6845
|
-
* @param {String} `state` The object returned from the `.parse` method.
|
|
6846
|
-
* @param {Object} `options`
|
|
6847
|
-
* @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
|
|
6848
|
-
* @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
|
|
6849
|
-
* @return {RegExp} Returns a regex created from the given pattern.
|
|
6850
|
-
* @api public
|
|
6851
|
-
*/
|
|
6852
6462
|
picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
6853
6463
|
if (!input || typeof input !== "string") throw new TypeError("Expected a non-empty string");
|
|
6854
6464
|
let parsed = {
|
|
@@ -6859,22 +6469,6 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6859
6469
|
if (!parsed.output) parsed = parse(input, options);
|
|
6860
6470
|
return picomatch.compileRe(parsed, options, returnOutput, returnState);
|
|
6861
6471
|
};
|
|
6862
|
-
/**
|
|
6863
|
-
* Create a regular expression from the given regex source string.
|
|
6864
|
-
*
|
|
6865
|
-
* ```js
|
|
6866
|
-
* const picomatch = require('picomatch');
|
|
6867
|
-
* // picomatch.toRegex(source[, options]);
|
|
6868
|
-
*
|
|
6869
|
-
* const { output } = picomatch.parse('*.js');
|
|
6870
|
-
* console.log(picomatch.toRegex(output));
|
|
6871
|
-
* //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
|
|
6872
|
-
* ```
|
|
6873
|
-
* @param {String} `source` Regular expression source string.
|
|
6874
|
-
* @param {Object} `options`
|
|
6875
|
-
* @return {RegExp}
|
|
6876
|
-
* @api public
|
|
6877
|
-
*/
|
|
6878
6472
|
picomatch.toRegex = (source, options) => {
|
|
6879
6473
|
try {
|
|
6880
6474
|
const opts = options || {};
|
|
@@ -6884,18 +6478,9 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6884
6478
|
return /$^/;
|
|
6885
6479
|
}
|
|
6886
6480
|
};
|
|
6887
|
-
/**
|
|
6888
|
-
* Picomatch constants.
|
|
6889
|
-
* @return {Object}
|
|
6890
|
-
*/
|
|
6891
6481
|
picomatch.constants = constants;
|
|
6892
|
-
/**
|
|
6893
|
-
* Expose "picomatch"
|
|
6894
|
-
*/
|
|
6895
6482
|
module.exports = picomatch;
|
|
6896
6483
|
}));
|
|
6897
|
-
//#endregion
|
|
6898
|
-
//#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js
|
|
6899
6484
|
var require_picomatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6900
6485
|
const pico = require_picomatch$1();
|
|
6901
6486
|
const utils = require_utils$1();
|
|
@@ -6909,39 +6494,38 @@ var require_picomatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6909
6494
|
Object.assign(picomatch, pico);
|
|
6910
6495
|
module.exports = picomatch;
|
|
6911
6496
|
}));
|
|
6912
|
-
//#endregion
|
|
6913
|
-
//#region node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.mjs
|
|
6914
6497
|
var import_picomatch = /* @__PURE__ */ __toESM$1(require_picomatch(), 1);
|
|
6915
6498
|
const isReadonlyArray = Array.isArray;
|
|
6499
|
+
const BACKSLASHES = /\\/g;
|
|
6916
6500
|
const isWin = process.platform === "win32";
|
|
6917
6501
|
const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
|
|
6918
6502
|
function getPartialMatcher(patterns, options = {}) {
|
|
6919
6503
|
const patternsCount = patterns.length;
|
|
6920
6504
|
const patternsParts = Array(patternsCount);
|
|
6921
6505
|
const matchers = Array(patternsCount);
|
|
6922
|
-
|
|
6923
|
-
for (
|
|
6506
|
+
let i, j;
|
|
6507
|
+
for (i = 0; i < patternsCount; i++) {
|
|
6924
6508
|
const parts = splitPattern(patterns[i]);
|
|
6925
6509
|
patternsParts[i] = parts;
|
|
6926
6510
|
const partsCount = parts.length;
|
|
6927
6511
|
const partMatchers = Array(partsCount);
|
|
6928
|
-
for (
|
|
6512
|
+
for (j = 0; j < partsCount; j++) partMatchers[j] = (0, import_picomatch.default)(parts[j], options);
|
|
6929
6513
|
matchers[i] = partMatchers;
|
|
6930
6514
|
}
|
|
6931
6515
|
return (input) => {
|
|
6932
6516
|
const inputParts = input.split("/");
|
|
6933
6517
|
if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true;
|
|
6934
|
-
for (
|
|
6518
|
+
for (i = 0; i < patternsCount; i++) {
|
|
6935
6519
|
const patternParts = patternsParts[i];
|
|
6936
6520
|
const matcher = matchers[i];
|
|
6937
6521
|
const inputPatternCount = inputParts.length;
|
|
6938
6522
|
const minParts = Math.min(inputPatternCount, patternParts.length);
|
|
6939
|
-
|
|
6523
|
+
j = 0;
|
|
6940
6524
|
while (j < minParts) {
|
|
6941
6525
|
const part = patternParts[j];
|
|
6942
6526
|
if (part.includes("/")) return true;
|
|
6943
6527
|
if (!matcher[j](inputParts[j])) break;
|
|
6944
|
-
if (
|
|
6528
|
+
if (!options.noglobstar && part === "**") return true;
|
|
6945
6529
|
j++;
|
|
6946
6530
|
}
|
|
6947
6531
|
if (j === inputPatternCount) return true;
|
|
@@ -6949,13 +6533,12 @@ function getPartialMatcher(patterns, options = {}) {
|
|
|
6949
6533
|
return false;
|
|
6950
6534
|
};
|
|
6951
6535
|
}
|
|
6952
|
-
/* node:coverage ignore next 2 */
|
|
6953
6536
|
const WIN32_ROOT_DIR = /^[A-Z]:\/$/i;
|
|
6954
6537
|
const isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === "/";
|
|
6955
6538
|
function buildFormat(cwd, root, absolute) {
|
|
6956
6539
|
if (cwd === root || root.startsWith(`${cwd}/`)) {
|
|
6957
6540
|
if (absolute) {
|
|
6958
|
-
const start =
|
|
6541
|
+
const start = cwd.length + +!isRoot(cwd);
|
|
6959
6542
|
return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || ".";
|
|
6960
6543
|
}
|
|
6961
6544
|
const prefix = root.slice(cwd.length + 1);
|
|
@@ -6976,38 +6559,20 @@ function buildRelative(cwd, root) {
|
|
|
6976
6559
|
}
|
|
6977
6560
|
return (p) => {
|
|
6978
6561
|
const result = posix.relative(cwd, `${root}/${p}`);
|
|
6979
|
-
|
|
6980
|
-
return result || ".";
|
|
6562
|
+
return p[p.length - 1] === "/" && result !== "" ? `${result}/` : result || ".";
|
|
6981
6563
|
};
|
|
6982
6564
|
}
|
|
6983
6565
|
const splitPatternOptions = { parts: true };
|
|
6984
|
-
function splitPattern(path
|
|
6566
|
+
function splitPattern(path) {
|
|
6985
6567
|
var _result$parts;
|
|
6986
|
-
const result = import_picomatch.default.scan(path
|
|
6987
|
-
return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path
|
|
6568
|
+
const result = import_picomatch.default.scan(path, splitPatternOptions);
|
|
6569
|
+
return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path];
|
|
6988
6570
|
}
|
|
6989
6571
|
const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
|
|
6990
6572
|
const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
|
|
6991
|
-
const escapePosixPath = (path
|
|
6992
|
-
const escapeWin32Path = (path
|
|
6993
|
-
/**
|
|
6994
|
-
* Escapes a path's special characters depending on the platform.
|
|
6995
|
-
* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
|
|
6996
|
-
*/
|
|
6997
|
-
/* node:coverage ignore next */
|
|
6573
|
+
const escapePosixPath = (path) => path.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
6574
|
+
const escapeWin32Path = (path) => path.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
6998
6575
|
const escapePath = isWin ? escapeWin32Path : escapePosixPath;
|
|
6999
|
-
/**
|
|
7000
|
-
* Checks if a pattern has dynamic parts.
|
|
7001
|
-
*
|
|
7002
|
-
* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
|
|
7003
|
-
*
|
|
7004
|
-
* - Doesn't necessarily return `false` on patterns that include `\`.
|
|
7005
|
-
* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
|
|
7006
|
-
* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
|
|
7007
|
-
* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
|
|
7008
|
-
*
|
|
7009
|
-
* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
|
|
7010
|
-
*/
|
|
7011
6576
|
function isDynamicPattern(pattern, options) {
|
|
7012
6577
|
if ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true;
|
|
7013
6578
|
const scan = import_picomatch.default.scan(pattern);
|
|
@@ -7016,28 +6581,31 @@ function isDynamicPattern(pattern, options) {
|
|
|
7016
6581
|
function log(...tasks) {
|
|
7017
6582
|
console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
|
|
7018
6583
|
}
|
|
6584
|
+
function ensureStringArray(value) {
|
|
6585
|
+
return typeof value === "string" ? [value] : value !== null && value !== void 0 ? value : [];
|
|
6586
|
+
}
|
|
7019
6587
|
const PARENT_DIRECTORY = /^(\/?\.\.)+/;
|
|
7020
6588
|
const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
|
|
7021
|
-
|
|
7022
|
-
|
|
6589
|
+
function normalizePattern(pattern, opts, props, isIgnore) {
|
|
6590
|
+
var _PARENT_DIRECTORY$exe;
|
|
6591
|
+
const cwd = opts.cwd;
|
|
7023
6592
|
let result = pattern;
|
|
7024
|
-
if (pattern.
|
|
7025
|
-
if (
|
|
6593
|
+
if (pattern[pattern.length - 1] === "/") result = pattern.slice(0, -1);
|
|
6594
|
+
if (result[result.length - 1] !== "*" && opts.expandDirectories) result += "/**";
|
|
7026
6595
|
const escapedCwd = escapePath(cwd);
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
const parentDirectoryMatch = PARENT_DIRECTORY.exec(result);
|
|
6596
|
+
result = isAbsolute$1(result.replace(ESCAPING_BACKSLASHES, "")) ? posix.relative(escapedCwd, result) : posix.normalize(result);
|
|
6597
|
+
const parentDir = (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result)) === null || _PARENT_DIRECTORY$exe === void 0 ? void 0 : _PARENT_DIRECTORY$exe[0];
|
|
7030
6598
|
const parts = splitPattern(result);
|
|
7031
|
-
if (
|
|
7032
|
-
const n = (
|
|
6599
|
+
if (parentDir) {
|
|
6600
|
+
const n = (parentDir.length + 1) / 3;
|
|
7033
6601
|
let i = 0;
|
|
7034
6602
|
const cwdParts = escapedCwd.split("/");
|
|
7035
6603
|
while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
|
|
7036
6604
|
result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
|
|
7037
6605
|
i++;
|
|
7038
6606
|
}
|
|
7039
|
-
const potentialRoot = posix.join(cwd,
|
|
7040
|
-
if (
|
|
6607
|
+
const potentialRoot = posix.join(cwd, parentDir.slice(i * 3));
|
|
6608
|
+
if (potentialRoot[0] !== "." && props.root.length > potentialRoot.length) {
|
|
7041
6609
|
props.root = potentialRoot;
|
|
7042
6610
|
props.depthOffset = -n + i;
|
|
7043
6611
|
}
|
|
@@ -7053,7 +6621,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
|
|
7053
6621
|
newCommonPath.pop();
|
|
7054
6622
|
break;
|
|
7055
6623
|
}
|
|
7056
|
-
if (part !== props.commonPath[i] || isDynamicPattern(part)
|
|
6624
|
+
if (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part)) break;
|
|
7057
6625
|
newCommonPath.push(part);
|
|
7058
6626
|
}
|
|
7059
6627
|
props.depthOffset = newCommonPath.length;
|
|
@@ -7062,138 +6630,127 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
|
|
7062
6630
|
}
|
|
7063
6631
|
return result;
|
|
7064
6632
|
}
|
|
7065
|
-
function processPatterns(
|
|
7066
|
-
if (typeof patterns === "string") patterns = [patterns];
|
|
7067
|
-
if (typeof ignore === "string") ignore = [ignore];
|
|
6633
|
+
function processPatterns(options, patterns, props) {
|
|
7068
6634
|
const matchPatterns = [];
|
|
7069
6635
|
const ignorePatterns = [];
|
|
7070
|
-
for (const pattern of ignore) {
|
|
6636
|
+
for (const pattern of options.ignore) {
|
|
7071
6637
|
if (!pattern) continue;
|
|
7072
|
-
if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern,
|
|
6638
|
+
if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, options, props, true));
|
|
7073
6639
|
}
|
|
7074
6640
|
for (const pattern of patterns) {
|
|
7075
6641
|
if (!pattern) continue;
|
|
7076
|
-
if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern,
|
|
7077
|
-
else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1),
|
|
6642
|
+
if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, options, props, false));
|
|
6643
|
+
else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), options, props, true));
|
|
7078
6644
|
}
|
|
7079
6645
|
return {
|
|
7080
6646
|
match: matchPatterns,
|
|
7081
6647
|
ignore: ignorePatterns
|
|
7082
6648
|
};
|
|
7083
6649
|
}
|
|
7084
|
-
function
|
|
7085
|
-
|
|
7086
|
-
const path$1 = paths[i];
|
|
7087
|
-
paths[i] = relative(path$1);
|
|
7088
|
-
}
|
|
7089
|
-
return paths;
|
|
7090
|
-
}
|
|
7091
|
-
function normalizeCwd(cwd) {
|
|
7092
|
-
if (!cwd) return process.cwd().replace(BACKSLASHES, "/");
|
|
7093
|
-
if (cwd instanceof URL) return fileURLToPath$1(cwd).replace(BACKSLASHES, "/");
|
|
7094
|
-
return path$1.resolve(cwd).replace(BACKSLASHES, "/");
|
|
7095
|
-
}
|
|
7096
|
-
function getCrawler(patterns, inputOptions = {}) {
|
|
7097
|
-
const options = process.env.TINYGLOBBY_DEBUG ? {
|
|
7098
|
-
...inputOptions,
|
|
7099
|
-
debug: true
|
|
7100
|
-
} : inputOptions;
|
|
7101
|
-
const cwd = normalizeCwd(options.cwd);
|
|
7102
|
-
if (options.debug) log("globbing with:", {
|
|
7103
|
-
patterns,
|
|
7104
|
-
options,
|
|
7105
|
-
cwd
|
|
7106
|
-
});
|
|
7107
|
-
if (Array.isArray(patterns) && patterns.length === 0) return [{
|
|
7108
|
-
sync: () => [],
|
|
7109
|
-
withPromise: async () => []
|
|
7110
|
-
}, false];
|
|
6650
|
+
function buildCrawler(options, patterns) {
|
|
6651
|
+
const cwd = options.cwd;
|
|
7111
6652
|
const props = {
|
|
7112
6653
|
root: cwd,
|
|
7113
|
-
commonPath: null,
|
|
7114
6654
|
depthOffset: 0
|
|
7115
6655
|
};
|
|
7116
|
-
const processed = processPatterns(
|
|
7117
|
-
...options,
|
|
7118
|
-
patterns
|
|
7119
|
-
}, cwd, props);
|
|
6656
|
+
const processed = processPatterns(options, patterns, props);
|
|
7120
6657
|
if (options.debug) log("internal processing patterns:", processed);
|
|
6658
|
+
const { absolute, caseSensitiveMatch, debug, dot, followSymbolicLinks, onlyDirectories } = options;
|
|
6659
|
+
const root = props.root.replace(BACKSLASHES, "");
|
|
7121
6660
|
const matchOptions = {
|
|
7122
|
-
dot
|
|
6661
|
+
dot,
|
|
7123
6662
|
nobrace: options.braceExpansion === false,
|
|
7124
|
-
nocase:
|
|
6663
|
+
nocase: !caseSensitiveMatch,
|
|
7125
6664
|
noextglob: options.extglob === false,
|
|
7126
6665
|
noglobstar: options.globstar === false,
|
|
7127
6666
|
posix: true
|
|
7128
6667
|
};
|
|
7129
|
-
const matcher = (0, import_picomatch.default)(processed.match,
|
|
7130
|
-
...matchOptions,
|
|
7131
|
-
ignore: processed.ignore
|
|
7132
|
-
});
|
|
6668
|
+
const matcher = (0, import_picomatch.default)(processed.match, matchOptions);
|
|
7133
6669
|
const ignore = (0, import_picomatch.default)(processed.ignore, matchOptions);
|
|
7134
6670
|
const partialMatcher = getPartialMatcher(processed.match, matchOptions);
|
|
7135
|
-
const format = buildFormat(cwd,
|
|
7136
|
-
const
|
|
7137
|
-
const
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
6671
|
+
const format = buildFormat(cwd, root, absolute);
|
|
6672
|
+
const excludeFormatter = absolute ? format : buildFormat(cwd, root, true);
|
|
6673
|
+
const excludePredicate = (_, p) => {
|
|
6674
|
+
const relativePath = excludeFormatter(p, true);
|
|
6675
|
+
return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
|
|
6676
|
+
};
|
|
6677
|
+
let maxDepth;
|
|
6678
|
+
if (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);
|
|
6679
|
+
const crawler = new Builder({
|
|
6680
|
+
filters: [debug ? (p, isDirectory) => {
|
|
6681
|
+
const path = format(p, isDirectory);
|
|
6682
|
+
const matches = matcher(path) && !ignore(path);
|
|
6683
|
+
if (matches) log(`matched ${path}`);
|
|
7142
6684
|
return matches;
|
|
7143
|
-
} : (p, isDirectory) =>
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
6685
|
+
} : (p, isDirectory) => {
|
|
6686
|
+
const path = format(p, isDirectory);
|
|
6687
|
+
return matcher(path) && !ignore(path);
|
|
6688
|
+
}],
|
|
6689
|
+
exclude: debug ? (_, p) => {
|
|
6690
|
+
const skipped = excludePredicate(_, p);
|
|
6691
|
+
log(`${skipped ? "skipped" : "crawling"} ${p}`);
|
|
7149
6692
|
return skipped;
|
|
7150
|
-
} :
|
|
7151
|
-
|
|
7152
|
-
return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
|
|
7153
|
-
},
|
|
7154
|
-
fs: options.fs ? {
|
|
7155
|
-
readdir: options.fs.readdir || nativeFs.readdir,
|
|
7156
|
-
readdirSync: options.fs.readdirSync || nativeFs.readdirSync,
|
|
7157
|
-
realpath: options.fs.realpath || nativeFs.realpath,
|
|
7158
|
-
realpathSync: options.fs.realpathSync || nativeFs.realpathSync,
|
|
7159
|
-
stat: options.fs.stat || nativeFs.stat,
|
|
7160
|
-
statSync: options.fs.statSync || nativeFs.statSync
|
|
7161
|
-
} : void 0,
|
|
6693
|
+
} : excludePredicate,
|
|
6694
|
+
fs: options.fs,
|
|
7162
6695
|
pathSeparator: "/",
|
|
7163
|
-
relativePaths:
|
|
7164
|
-
|
|
6696
|
+
relativePaths: !absolute,
|
|
6697
|
+
resolvePaths: absolute,
|
|
6698
|
+
includeBasePath: absolute,
|
|
6699
|
+
resolveSymlinks: followSymbolicLinks,
|
|
6700
|
+
excludeSymlinks: !followSymbolicLinks,
|
|
6701
|
+
excludeFiles: onlyDirectories,
|
|
6702
|
+
includeDirs: onlyDirectories || !options.onlyFiles,
|
|
6703
|
+
maxDepth,
|
|
7165
6704
|
signal: options.signal
|
|
6705
|
+
}).crawl(root);
|
|
6706
|
+
if (options.debug) log("internal properties:", {
|
|
6707
|
+
...props,
|
|
6708
|
+
root
|
|
6709
|
+
});
|
|
6710
|
+
return [crawler, cwd !== root && !absolute && buildRelative(cwd, root)];
|
|
6711
|
+
}
|
|
6712
|
+
function formatPaths(paths, mapper) {
|
|
6713
|
+
if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
|
|
6714
|
+
return paths;
|
|
6715
|
+
}
|
|
6716
|
+
const defaultOptions$1 = {
|
|
6717
|
+
caseSensitiveMatch: true,
|
|
6718
|
+
cwd: process.cwd(),
|
|
6719
|
+
debug: !!process.env.TINYGLOBBY_DEBUG,
|
|
6720
|
+
expandDirectories: true,
|
|
6721
|
+
followSymbolicLinks: true,
|
|
6722
|
+
onlyFiles: true
|
|
6723
|
+
};
|
|
6724
|
+
function getOptions$1(options) {
|
|
6725
|
+
const opts = {
|
|
6726
|
+
...defaultOptions$1,
|
|
6727
|
+
...options
|
|
7166
6728
|
};
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
}
|
|
7177
|
-
if (
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
const
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
const
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
if (!relative) return crawler.withPromise();
|
|
7193
|
-
return formatPaths(await crawler.withPromise(), relative);
|
|
7194
|
-
}
|
|
7195
|
-
//#endregion
|
|
7196
|
-
//#region src/build/build.ts
|
|
6729
|
+
opts.cwd = (opts.cwd instanceof URL ? fileURLToPath$1(opts.cwd) : resolve$1(opts.cwd)).replace(BACKSLASHES, "/");
|
|
6730
|
+
opts.ignore = ensureStringArray(opts.ignore);
|
|
6731
|
+
opts.fs && (opts.fs = {
|
|
6732
|
+
readdir: opts.fs.readdir || readdir$1,
|
|
6733
|
+
readdirSync: opts.fs.readdirSync || readdirSync,
|
|
6734
|
+
realpath: opts.fs.realpath || realpath$1,
|
|
6735
|
+
realpathSync: opts.fs.realpathSync || realpathSync$1,
|
|
6736
|
+
stat: opts.fs.stat || stat$2,
|
|
6737
|
+
statSync: opts.fs.statSync || statSync$1
|
|
6738
|
+
});
|
|
6739
|
+
if (opts.debug) log("globbing with options:", opts);
|
|
6740
|
+
return opts;
|
|
6741
|
+
}
|
|
6742
|
+
function getCrawler(globInput, inputOptions = {}) {
|
|
6743
|
+
var _ref;
|
|
6744
|
+
if (globInput && (inputOptions === null || inputOptions === void 0 ? void 0 : inputOptions.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
|
|
6745
|
+
const isModern = isReadonlyArray(globInput) || typeof globInput === "string";
|
|
6746
|
+
const patterns = ensureStringArray((_ref = isModern ? globInput : globInput.patterns) !== null && _ref !== void 0 ? _ref : "**/*");
|
|
6747
|
+
const options = getOptions$1(isModern ? inputOptions : globInput);
|
|
6748
|
+
return patterns.length > 0 ? buildCrawler(options, patterns) : [];
|
|
6749
|
+
}
|
|
6750
|
+
async function glob(globInput, options) {
|
|
6751
|
+
const [crawler, relative] = getCrawler(globInput, options);
|
|
6752
|
+
return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
|
|
6753
|
+
}
|
|
7197
6754
|
async function build(nitro) {
|
|
7198
6755
|
switch (nitro.options.builder) {
|
|
7199
6756
|
case "rollup": {
|
|
@@ -7211,8 +6768,6 @@ async function build(nitro) {
|
|
|
7211
6768
|
default: throw new Error(`Unknown builder: ${nitro.options.builder}`);
|
|
7212
6769
|
}
|
|
7213
6770
|
}
|
|
7214
|
-
//#endregion
|
|
7215
|
-
//#region node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/types/other.js
|
|
7216
6771
|
const types$3 = {
|
|
7217
6772
|
"application/prs.cww": ["cww"],
|
|
7218
6773
|
"application/prs.xsf+xml": ["xsf"],
|
|
@@ -8049,8 +7604,6 @@ const types$3 = {
|
|
|
8049
7604
|
"x-conference/x-cooltalk": ["ice"]
|
|
8050
7605
|
};
|
|
8051
7606
|
Object.freeze(types$3);
|
|
8052
|
-
//#endregion
|
|
8053
|
-
//#region node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/types/standard.js
|
|
8054
7607
|
const types$2 = {
|
|
8055
7608
|
"application/andrew-inset": ["ez"],
|
|
8056
7609
|
"application/appinstaller": ["appinstaller"],
|
|
@@ -8522,8 +8075,6 @@ const types$2 = {
|
|
|
8522
8075
|
"video/webm": ["webm"]
|
|
8523
8076
|
};
|
|
8524
8077
|
Object.freeze(types$2);
|
|
8525
|
-
//#endregion
|
|
8526
|
-
//#region node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/src/Mime.js
|
|
8527
8078
|
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
8528
8079
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
8529
8080
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
@@ -8591,11 +8142,7 @@ var Mime = class {
|
|
|
8591
8142
|
}
|
|
8592
8143
|
};
|
|
8593
8144
|
_Mime_extensionToType = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtension = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtensions = /* @__PURE__ */ new WeakMap();
|
|
8594
|
-
//#endregion
|
|
8595
|
-
//#region node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/src/index.js
|
|
8596
8145
|
var src_default = new Mime(types$2, types$3)._freeze();
|
|
8597
|
-
//#endregion
|
|
8598
|
-
//#region src/utils/compress.ts
|
|
8599
8146
|
const EncodingMap = {
|
|
8600
8147
|
gzip: ".gz",
|
|
8601
8148
|
br: ".br",
|
|
@@ -8705,8 +8252,6 @@ const COMPRESSIBLE_MIMES_RE = new Set([
|
|
|
8705
8252
|
function isCompressibleMime(mimeType) {
|
|
8706
8253
|
return COMPRESSIBLE_MIMES_RE.has(mimeType);
|
|
8707
8254
|
}
|
|
8708
|
-
//#endregion
|
|
8709
|
-
//#region src/build/assets.ts
|
|
8710
8255
|
const NEGATION_RE = /^(!?)(.*)$/;
|
|
8711
8256
|
const PARENT_DIR_GLOB_RE = /!?\.\.\//;
|
|
8712
8257
|
async function scanUnprefixedPublicAssets(nitro) {
|
|
@@ -8750,8 +8295,6 @@ function getIncludePatterns(nitro, assetDir, ignorePatterns = nitro.options.igno
|
|
|
8750
8295
|
return (negation ? "" : "!") + (pattern.startsWith("*") ? pattern : relative$2(assetDir, resolve$3(nitro.options.rootDir, pattern)));
|
|
8751
8296
|
})].filter((p) => !PARENT_DIR_GLOB_RE.test(p));
|
|
8752
8297
|
}
|
|
8753
|
-
//#endregion
|
|
8754
|
-
//#region src/build/prepare.ts
|
|
8755
8298
|
async function prepare(nitro) {
|
|
8756
8299
|
await prepareDir(nitro.options.output.dir);
|
|
8757
8300
|
if (!nitro.options.noPublicDir) await prepareDir(nitro.options.output.publicDir);
|
|
@@ -8764,8 +8307,6 @@ async function prepareDir(dir) {
|
|
|
8764
8307
|
});
|
|
8765
8308
|
await fsp.mkdir(dir, { recursive: true });
|
|
8766
8309
|
}
|
|
8767
|
-
//#endregion
|
|
8768
|
-
//#region node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.mjs
|
|
8769
8310
|
var astralIdentifierCodes = [
|
|
8770
8311
|
509,
|
|
8771
8312
|
0,
|
|
@@ -12273,23 +11814,21 @@ var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
|
|
|
12273
11814
|
var ecma11BinaryProperties = ecma10BinaryProperties;
|
|
12274
11815
|
var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict";
|
|
12275
11816
|
var ecma13BinaryProperties = ecma12BinaryProperties;
|
|
12276
|
-
var ecma14BinaryProperties = ecma13BinaryProperties;
|
|
12277
11817
|
var unicodeBinaryProperties = {
|
|
12278
11818
|
9: ecma9BinaryProperties,
|
|
12279
11819
|
10: ecma10BinaryProperties,
|
|
12280
11820
|
11: ecma11BinaryProperties,
|
|
12281
11821
|
12: ecma12BinaryProperties,
|
|
12282
11822
|
13: ecma13BinaryProperties,
|
|
12283
|
-
14:
|
|
11823
|
+
14: ecma13BinaryProperties
|
|
12284
11824
|
};
|
|
12285
|
-
var ecma14BinaryPropertiesOfStrings = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji";
|
|
12286
11825
|
var unicodeBinaryPropertiesOfStrings = {
|
|
12287
11826
|
9: "",
|
|
12288
11827
|
10: "",
|
|
12289
11828
|
11: "",
|
|
12290
11829
|
12: "",
|
|
12291
11830
|
13: "",
|
|
12292
|
-
14:
|
|
11831
|
+
14: "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"
|
|
12293
11832
|
};
|
|
12294
11833
|
var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
|
|
12295
11834
|
var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
|
|
@@ -12297,14 +11836,13 @@ var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Han
|
|
|
12297
11836
|
var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
|
|
12298
11837
|
var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
|
|
12299
11838
|
var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
|
|
12300
|
-
var ecma14ScriptValues = ecma13ScriptValues + " " + scriptValuesAddedInUnicode;
|
|
12301
11839
|
var unicodeScriptValues = {
|
|
12302
11840
|
9: ecma9ScriptValues,
|
|
12303
11841
|
10: ecma10ScriptValues,
|
|
12304
11842
|
11: ecma11ScriptValues,
|
|
12305
11843
|
12: ecma12ScriptValues,
|
|
12306
11844
|
13: ecma13ScriptValues,
|
|
12307
|
-
14:
|
|
11845
|
+
14: ecma13ScriptValues + " " + scriptValuesAddedInUnicode
|
|
12308
11846
|
};
|
|
12309
11847
|
var data = {};
|
|
12310
11848
|
function buildUnicodeData(ecmaVersion) {
|
|
@@ -12434,12 +11972,6 @@ RegExpValidationState.prototype.eatChars = function eatChars(chs, forceU) {
|
|
|
12434
11972
|
this.pos = pos;
|
|
12435
11973
|
return true;
|
|
12436
11974
|
};
|
|
12437
|
-
/**
|
|
12438
|
-
* Validate the flags part of a given RegExpLiteral.
|
|
12439
|
-
*
|
|
12440
|
-
* @param {RegExpValidationState} state The state to validate RegExp.
|
|
12441
|
-
* @returns {void}
|
|
12442
|
-
*/
|
|
12443
11975
|
pp$1.validateRegExpFlags = function(state) {
|
|
12444
11976
|
var validFlags = state.validFlags;
|
|
12445
11977
|
var flags = state.flags;
|
|
@@ -12458,12 +11990,6 @@ function hasProp(obj) {
|
|
|
12458
11990
|
for (var _ in obj) return true;
|
|
12459
11991
|
return false;
|
|
12460
11992
|
}
|
|
12461
|
-
/**
|
|
12462
|
-
* Validate the pattern part of a given RegExpLiteral.
|
|
12463
|
-
*
|
|
12464
|
-
* @param {RegExpValidationState} state The state to validate RegExp.
|
|
12465
|
-
* @returns {void}
|
|
12466
|
-
*/
|
|
12467
11993
|
pp$1.validateRegExpPattern = function(state) {
|
|
12468
11994
|
this.regexp_pattern(state);
|
|
12469
11995
|
if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) {
|
|
@@ -13852,8 +13378,6 @@ function parse(input, options) {
|
|
|
13852
13378
|
function tokenizer(input, options) {
|
|
13853
13379
|
return Parser.tokenizer(input, options);
|
|
13854
13380
|
}
|
|
13855
|
-
//#endregion
|
|
13856
|
-
//#region node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/shared/confbox.9388d834.mjs
|
|
13857
13381
|
const m$1 = Symbol.for("__confbox_fmt__"), k$2 = /^(\s+)/, v$1 = /(\s+)$/;
|
|
13858
13382
|
function x$1(e, t = {}) {
|
|
13859
13383
|
return {
|
|
@@ -13872,8 +13396,6 @@ function N$2(e, t, n) {
|
|
|
13872
13396
|
value: x$1(e, n)
|
|
13873
13397
|
});
|
|
13874
13398
|
}
|
|
13875
|
-
//#endregion
|
|
13876
|
-
//#region node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/json5.mjs
|
|
13877
13399
|
function X$1(D) {
|
|
13878
13400
|
return D && D.__esModule && Object.prototype.hasOwnProperty.call(D, "default") ? D.default : D;
|
|
13879
13401
|
}
|
|
@@ -14632,8 +14154,6 @@ var Bu = function(C, E, n) {
|
|
|
14632
14154
|
}
|
|
14633
14155
|
};
|
|
14634
14156
|
X$1(Bu);
|
|
14635
|
-
//#endregion
|
|
14636
|
-
//#region node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/shared/confbox.f9f03f05.mjs
|
|
14637
14157
|
function $$1(n, l = !1) {
|
|
14638
14158
|
const g = n.length;
|
|
14639
14159
|
let e = 0, u = "", p = 0, k = 16, A = 0, o = 0, O = 0, B = 0, b = 0;
|
|
@@ -15032,9 +14552,7 @@ function h$2(n, l) {
|
|
|
15032
14552
|
const g = K$1(n, l?.errors, l);
|
|
15033
14553
|
return N$2(n, g, l), g;
|
|
15034
14554
|
}
|
|
15035
|
-
|
|
15036
|
-
//#region node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/yaml.mjs
|
|
15037
|
-
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ function oe(e) {
|
|
14555
|
+
function oe(e) {
|
|
15038
14556
|
return typeof e > "u" || e === null;
|
|
15039
14557
|
}
|
|
15040
14558
|
function We(e) {
|
|
@@ -16089,8 +15607,6 @@ function dr(e, n) {
|
|
|
16089
15607
|
var xr = { dump: dr };
|
|
16090
15608
|
Ni.load;
|
|
16091
15609
|
xr.dump;
|
|
16092
|
-
//#endregion
|
|
16093
|
-
//#region node_modules/.pnpm/pkg-types@1.3.1/node_modules/pkg-types/dist/index.mjs
|
|
16094
15610
|
const defaultFindOptions = {
|
|
16095
15611
|
startingFrom: ".",
|
|
16096
15612
|
rootPattern: /^node_modules$/,
|
|
@@ -16147,8 +15663,6 @@ async function resolvePackageJSON(id = process.cwd(), options = {}) {
|
|
|
16147
15663
|
...options
|
|
16148
15664
|
});
|
|
16149
15665
|
}
|
|
16150
|
-
//#endregion
|
|
16151
|
-
//#region node_modules/.pnpm/mlly@1.8.1/node_modules/mlly/dist/index.mjs
|
|
16152
15666
|
const BUILTIN_MODULES = new Set(builtinModules);
|
|
16153
15667
|
function normalizeSlash(path) {
|
|
16154
15668
|
return path.replace(/\\/g, "/");
|
|
@@ -16174,16 +15688,6 @@ function getImportNames(cleanedImports) {
|
|
|
16174
15688
|
defaultImport: topLevelImports.split(",").find((index) => !/[*{}]/.test(index))?.trim() || void 0
|
|
16175
15689
|
};
|
|
16176
15690
|
}
|
|
16177
|
-
/**
|
|
16178
|
-
* @typedef ErrnoExceptionFields
|
|
16179
|
-
* @property {number | undefined} [errnode]
|
|
16180
|
-
* @property {string | undefined} [code]
|
|
16181
|
-
* @property {string | undefined} [path]
|
|
16182
|
-
* @property {string | undefined} [syscall]
|
|
16183
|
-
* @property {string | undefined} [url]
|
|
16184
|
-
*
|
|
16185
|
-
* @typedef {Error & ErrnoExceptionFields} ErrnoException
|
|
16186
|
-
*/
|
|
16187
15691
|
const own$1 = {}.hasOwnProperty;
|
|
16188
15692
|
const classRegExp = /^([A-Z][a-z\d]*)+$/;
|
|
16189
15693
|
const kTypes = new Set([
|
|
@@ -16198,211 +15702,97 @@ const kTypes = new Set([
|
|
|
16198
15702
|
"symbol"
|
|
16199
15703
|
]);
|
|
16200
15704
|
const codes = {};
|
|
16201
|
-
/**
|
|
16202
|
-
* Create a list string in the form like 'A and B' or 'A, B, ..., and Z'.
|
|
16203
|
-
* We cannot use Intl.ListFormat because it's not available in
|
|
16204
|
-
* --without-intl builds.
|
|
16205
|
-
*
|
|
16206
|
-
* @param {Array<string>} array
|
|
16207
|
-
* An array of strings.
|
|
16208
|
-
* @param {string} [type]
|
|
16209
|
-
* The list type to be inserted before the last element.
|
|
16210
|
-
* @returns {string}
|
|
16211
|
-
*/
|
|
16212
15705
|
function formatList(array, type = "and") {
|
|
16213
15706
|
return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array[array.length - 1]}`;
|
|
16214
15707
|
}
|
|
16215
|
-
/** @type {Map<string, MessageFunction | string>} */
|
|
16216
15708
|
const messages = /* @__PURE__ */ new Map();
|
|
16217
15709
|
const nodeInternalPrefix = "__node_internal_";
|
|
16218
|
-
/** @type {number} */
|
|
16219
15710
|
let userStackTraceLimit;
|
|
16220
|
-
codes.ERR_INVALID_ARG_TYPE = createError(
|
|
16221
|
-
"
|
|
16222
|
-
|
|
16223
|
-
|
|
16224
|
-
|
|
16225
|
-
|
|
16226
|
-
|
|
16227
|
-
|
|
16228
|
-
|
|
16229
|
-
|
|
16230
|
-
|
|
16231
|
-
|
|
16232
|
-
|
|
16233
|
-
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16238
|
-
|
|
16239
|
-
|
|
16240
|
-
|
|
16241
|
-
|
|
16242
|
-
const
|
|
16243
|
-
|
|
16244
|
-
|
|
16245
|
-
|
|
16246
|
-
else if (classRegExp.exec(value) === null) {
|
|
16247
|
-
assert.ok(value !== "object", "The value \"object\" should be written as \"Object\"");
|
|
16248
|
-
other.push(value);
|
|
16249
|
-
} else instances.push(value);
|
|
16250
|
-
}
|
|
16251
|
-
if (instances.length > 0) {
|
|
16252
|
-
const pos = types.indexOf("object");
|
|
16253
|
-
if (pos !== -1) {
|
|
16254
|
-
types.slice(pos, 1);
|
|
16255
|
-
instances.push("Object");
|
|
16256
|
-
}
|
|
16257
|
-
}
|
|
16258
|
-
if (types.length > 0) {
|
|
16259
|
-
message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(types, "or")}`;
|
|
16260
|
-
if (instances.length > 0 || other.length > 0) message += " or ";
|
|
16261
|
-
}
|
|
16262
|
-
if (instances.length > 0) {
|
|
16263
|
-
message += `an instance of ${formatList(instances, "or")}`;
|
|
16264
|
-
if (other.length > 0) message += " or ";
|
|
16265
|
-
}
|
|
16266
|
-
if (other.length > 0) if (other.length > 1) message += `one of ${formatList(other, "or")}`;
|
|
16267
|
-
else {
|
|
16268
|
-
if (other[0].toLowerCase() !== other[0]) message += "an ";
|
|
16269
|
-
message += `${other[0]}`;
|
|
15711
|
+
codes.ERR_INVALID_ARG_TYPE = createError("ERR_INVALID_ARG_TYPE", (name, expected, actual) => {
|
|
15712
|
+
assert.ok(typeof name === "string", "'name' must be a string");
|
|
15713
|
+
if (!Array.isArray(expected)) expected = [expected];
|
|
15714
|
+
let message = "The ";
|
|
15715
|
+
if (name.endsWith(" argument")) message += `${name} `;
|
|
15716
|
+
else {
|
|
15717
|
+
const type = name.includes(".") ? "property" : "argument";
|
|
15718
|
+
message += `"${name}" ${type} `;
|
|
15719
|
+
}
|
|
15720
|
+
message += "must be ";
|
|
15721
|
+
const types = [];
|
|
15722
|
+
const instances = [];
|
|
15723
|
+
const other = [];
|
|
15724
|
+
for (const value of expected) {
|
|
15725
|
+
assert.ok(typeof value === "string", "All expected entries have to be of type string");
|
|
15726
|
+
if (kTypes.has(value)) types.push(value.toLowerCase());
|
|
15727
|
+
else if (classRegExp.exec(value) === null) {
|
|
15728
|
+
assert.ok(value !== "object", "The value \"object\" should be written as \"Object\"");
|
|
15729
|
+
other.push(value);
|
|
15730
|
+
} else instances.push(value);
|
|
15731
|
+
}
|
|
15732
|
+
if (instances.length > 0) {
|
|
15733
|
+
const pos = types.indexOf("object");
|
|
15734
|
+
if (pos !== -1) {
|
|
15735
|
+
types.slice(pos, 1);
|
|
15736
|
+
instances.push("Object");
|
|
16270
15737
|
}
|
|
16271
|
-
|
|
16272
|
-
|
|
16273
|
-
|
|
16274
|
-
|
|
16275
|
-
|
|
16276
|
-
|
|
16277
|
-
|
|
16278
|
-
|
|
16279
|
-
|
|
16280
|
-
|
|
16281
|
-
|
|
16282
|
-
|
|
16283
|
-
|
|
16284
|
-
|
|
16285
|
-
}
|
|
16286
|
-
|
|
16287
|
-
);
|
|
16288
|
-
codes.
|
|
16289
|
-
"
|
|
16290
|
-
|
|
16291
|
-
|
|
16292
|
-
|
|
16293
|
-
|
|
16294
|
-
|
|
16295
|
-
|
|
16296
|
-
|
|
16297
|
-
|
|
16298
|
-
|
|
16299
|
-
|
|
16300
|
-
|
|
16301
|
-
|
|
16302
|
-
|
|
16303
|
-
|
|
16304
|
-
|
|
16305
|
-
* @param {unknown} target
|
|
16306
|
-
* @param {boolean} [isImport=false]
|
|
16307
|
-
* @param {string} [base]
|
|
16308
|
-
*/
|
|
16309
|
-
(packagePath, key, target, isImport = false, base = void 0) => {
|
|
16310
|
-
const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
|
|
16311
|
-
if (key === ".") {
|
|
16312
|
-
assert.ok(isImport === false);
|
|
16313
|
-
return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
|
|
16314
|
-
}
|
|
16315
|
-
return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
|
|
16316
|
-
},
|
|
16317
|
-
Error
|
|
16318
|
-
);
|
|
16319
|
-
codes.ERR_MODULE_NOT_FOUND = createError(
|
|
16320
|
-
"ERR_MODULE_NOT_FOUND",
|
|
16321
|
-
/**
|
|
16322
|
-
* @param {string} path
|
|
16323
|
-
* @param {string} base
|
|
16324
|
-
* @param {boolean} [exactUrl]
|
|
16325
|
-
*/
|
|
16326
|
-
(path, base, exactUrl = false) => {
|
|
16327
|
-
return `Cannot find ${exactUrl ? "module" : "package"} '${path}' imported from ${base}`;
|
|
16328
|
-
},
|
|
16329
|
-
Error
|
|
16330
|
-
);
|
|
15738
|
+
}
|
|
15739
|
+
if (types.length > 0) {
|
|
15740
|
+
message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(types, "or")}`;
|
|
15741
|
+
if (instances.length > 0 || other.length > 0) message += " or ";
|
|
15742
|
+
}
|
|
15743
|
+
if (instances.length > 0) {
|
|
15744
|
+
message += `an instance of ${formatList(instances, "or")}`;
|
|
15745
|
+
if (other.length > 0) message += " or ";
|
|
15746
|
+
}
|
|
15747
|
+
if (other.length > 0) if (other.length > 1) message += `one of ${formatList(other, "or")}`;
|
|
15748
|
+
else {
|
|
15749
|
+
if (other[0].toLowerCase() !== other[0]) message += "an ";
|
|
15750
|
+
message += `${other[0]}`;
|
|
15751
|
+
}
|
|
15752
|
+
message += `. Received ${determineSpecificType(actual)}`;
|
|
15753
|
+
return message;
|
|
15754
|
+
}, TypeError);
|
|
15755
|
+
codes.ERR_INVALID_MODULE_SPECIFIER = createError("ERR_INVALID_MODULE_SPECIFIER", (request, reason, base = void 0) => {
|
|
15756
|
+
return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
|
|
15757
|
+
}, TypeError);
|
|
15758
|
+
codes.ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (path, base, message) => {
|
|
15759
|
+
return `Invalid package config ${path}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
|
|
15760
|
+
}, Error);
|
|
15761
|
+
codes.ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (packagePath, key, target, isImport = false, base = void 0) => {
|
|
15762
|
+
const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
|
|
15763
|
+
if (key === ".") {
|
|
15764
|
+
assert.ok(isImport === false);
|
|
15765
|
+
return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
|
|
15766
|
+
}
|
|
15767
|
+
return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
|
|
15768
|
+
}, Error);
|
|
15769
|
+
codes.ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (path, base, exactUrl = false) => {
|
|
15770
|
+
return `Cannot find ${exactUrl ? "module" : "package"} '${path}' imported from ${base}`;
|
|
15771
|
+
}, Error);
|
|
16331
15772
|
codes.ERR_NETWORK_IMPORT_DISALLOWED = createError("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error);
|
|
16332
|
-
codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(
|
|
16333
|
-
"
|
|
16334
|
-
|
|
16335
|
-
|
|
16336
|
-
|
|
16337
|
-
|
|
16338
|
-
|
|
16339
|
-
(specifier, packagePath, base) => {
|
|
16340
|
-
return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ""} imported from ${base}`;
|
|
16341
|
-
},
|
|
16342
|
-
TypeError
|
|
16343
|
-
);
|
|
16344
|
-
codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError(
|
|
16345
|
-
"ERR_PACKAGE_PATH_NOT_EXPORTED",
|
|
16346
|
-
/**
|
|
16347
|
-
* @param {string} packagePath
|
|
16348
|
-
* @param {string} subpath
|
|
16349
|
-
* @param {string} [base]
|
|
16350
|
-
*/
|
|
16351
|
-
(packagePath, subpath, base = void 0) => {
|
|
16352
|
-
if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
16353
|
-
return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
16354
|
-
},
|
|
16355
|
-
Error
|
|
16356
|
-
);
|
|
15773
|
+
codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError("ERR_PACKAGE_IMPORT_NOT_DEFINED", (specifier, packagePath, base) => {
|
|
15774
|
+
return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ""} imported from ${base}`;
|
|
15775
|
+
}, TypeError);
|
|
15776
|
+
codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError("ERR_PACKAGE_PATH_NOT_EXPORTED", (packagePath, subpath, base = void 0) => {
|
|
15777
|
+
if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
15778
|
+
return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
15779
|
+
}, Error);
|
|
16357
15780
|
codes.ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error);
|
|
16358
15781
|
codes.ERR_UNSUPPORTED_RESOLVE_REQUEST = createError("ERR_UNSUPPORTED_RESOLVE_REQUEST", "Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.", TypeError);
|
|
16359
|
-
codes.ERR_UNKNOWN_FILE_EXTENSION = createError(
|
|
16360
|
-
"
|
|
16361
|
-
|
|
16362
|
-
|
|
16363
|
-
|
|
16364
|
-
|
|
16365
|
-
(
|
|
16366
|
-
|
|
16367
|
-
},
|
|
16368
|
-
TypeError
|
|
16369
|
-
);
|
|
16370
|
-
codes.ERR_INVALID_ARG_VALUE = createError(
|
|
16371
|
-
"ERR_INVALID_ARG_VALUE",
|
|
16372
|
-
/**
|
|
16373
|
-
* @param {string} name
|
|
16374
|
-
* @param {unknown} value
|
|
16375
|
-
* @param {string} [reason='is invalid']
|
|
16376
|
-
*/
|
|
16377
|
-
(name, value, reason = "is invalid") => {
|
|
16378
|
-
let inspected = inspect(value);
|
|
16379
|
-
if (inspected.length > 128) inspected = `${inspected.slice(0, 128)}...`;
|
|
16380
|
-
return `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`;
|
|
16381
|
-
},
|
|
16382
|
-
TypeError
|
|
16383
|
-
);
|
|
16384
|
-
/**
|
|
16385
|
-
* Utility function for registering the error codes. Only used here. Exported
|
|
16386
|
-
* *only* to allow for testing.
|
|
16387
|
-
* @param {string} sym
|
|
16388
|
-
* @param {MessageFunction | string} value
|
|
16389
|
-
* @param {ErrorConstructor} constructor
|
|
16390
|
-
* @returns {new (...parameters: Array<any>) => Error}
|
|
16391
|
-
*/
|
|
15782
|
+
codes.ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", (extension, path) => {
|
|
15783
|
+
return `Unknown file extension "${extension}" for ${path}`;
|
|
15784
|
+
}, TypeError);
|
|
15785
|
+
codes.ERR_INVALID_ARG_VALUE = createError("ERR_INVALID_ARG_VALUE", (name, value, reason = "is invalid") => {
|
|
15786
|
+
let inspected = inspect(value);
|
|
15787
|
+
if (inspected.length > 128) inspected = `${inspected.slice(0, 128)}...`;
|
|
15788
|
+
return `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`;
|
|
15789
|
+
}, TypeError);
|
|
16392
15790
|
function createError(sym, value, constructor) {
|
|
16393
15791
|
messages.set(sym, value);
|
|
16394
15792
|
return makeNodeErrorWithCode(constructor, sym);
|
|
16395
15793
|
}
|
|
16396
|
-
/**
|
|
16397
|
-
* @param {ErrorConstructor} Base
|
|
16398
|
-
* @param {string} key
|
|
16399
|
-
* @returns {ErrorConstructor}
|
|
16400
|
-
*/
|
|
16401
15794
|
function makeNodeErrorWithCode(Base, key) {
|
|
16402
15795
|
return NodeError;
|
|
16403
|
-
/**
|
|
16404
|
-
* @param {Array<unknown>} parameters
|
|
16405
|
-
*/
|
|
16406
15796
|
function NodeError(...parameters) {
|
|
16407
15797
|
const limit = Error.stackTraceLimit;
|
|
16408
15798
|
if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;
|
|
@@ -16430,9 +15820,6 @@ function makeNodeErrorWithCode(Base, key) {
|
|
|
16430
15820
|
return error;
|
|
16431
15821
|
}
|
|
16432
15822
|
}
|
|
16433
|
-
/**
|
|
16434
|
-
* @returns {boolean}
|
|
16435
|
-
*/
|
|
16436
15823
|
function isErrorStackTraceLimitWritable() {
|
|
16437
15824
|
try {
|
|
16438
15825
|
if (v8.startupSnapshot.isBuildingSnapshot()) return false;
|
|
@@ -16441,39 +15828,21 @@ function isErrorStackTraceLimitWritable() {
|
|
|
16441
15828
|
if (desc === void 0) return Object.isExtensible(Error);
|
|
16442
15829
|
return own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
|
|
16443
15830
|
}
|
|
16444
|
-
/**
|
|
16445
|
-
* This function removes unnecessary frames from Node.js core errors.
|
|
16446
|
-
* @template {(...parameters: unknown[]) => unknown} T
|
|
16447
|
-
* @param {T} wrappedFunction
|
|
16448
|
-
* @returns {T}
|
|
16449
|
-
*/
|
|
16450
15831
|
function hideStackFrames(wrappedFunction) {
|
|
16451
15832
|
const hidden = nodeInternalPrefix + wrappedFunction.name;
|
|
16452
15833
|
Object.defineProperty(wrappedFunction, "name", { value: hidden });
|
|
16453
15834
|
return wrappedFunction;
|
|
16454
15835
|
}
|
|
16455
|
-
const captureLargerStackTrace = hideStackFrames(
|
|
16456
|
-
|
|
16457
|
-
|
|
16458
|
-
|
|
16459
|
-
|
|
16460
|
-
function(error) {
|
|
16461
|
-
const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
|
|
16462
|
-
if (stackTraceLimitIsWritable) {
|
|
16463
|
-
userStackTraceLimit = Error.stackTraceLimit;
|
|
16464
|
-
Error.stackTraceLimit = Number.POSITIVE_INFINITY;
|
|
16465
|
-
}
|
|
16466
|
-
Error.captureStackTrace(error);
|
|
16467
|
-
if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;
|
|
16468
|
-
return error;
|
|
15836
|
+
const captureLargerStackTrace = hideStackFrames(function(error) {
|
|
15837
|
+
const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
|
|
15838
|
+
if (stackTraceLimitIsWritable) {
|
|
15839
|
+
userStackTraceLimit = Error.stackTraceLimit;
|
|
15840
|
+
Error.stackTraceLimit = Number.POSITIVE_INFINITY;
|
|
16469
15841
|
}
|
|
16470
|
-
);
|
|
16471
|
-
|
|
16472
|
-
|
|
16473
|
-
|
|
16474
|
-
* @param {Error} self
|
|
16475
|
-
* @returns {string}
|
|
16476
|
-
*/
|
|
15842
|
+
Error.captureStackTrace(error);
|
|
15843
|
+
if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;
|
|
15844
|
+
return error;
|
|
15845
|
+
});
|
|
16477
15846
|
function getMessage(key, parameters, self) {
|
|
16478
15847
|
const message = messages.get(key);
|
|
16479
15848
|
assert.ok(message !== void 0, "expected `message` to be found");
|
|
@@ -16489,11 +15858,6 @@ function getMessage(key, parameters, self) {
|
|
|
16489
15858
|
parameters.unshift(message);
|
|
16490
15859
|
return Reflect.apply(format, null, parameters);
|
|
16491
15860
|
}
|
|
16492
|
-
/**
|
|
16493
|
-
* Determine the specific type of a value for type-mismatch errors.
|
|
16494
|
-
* @param {unknown} value
|
|
16495
|
-
* @returns {string}
|
|
16496
|
-
*/
|
|
16497
15861
|
function determineSpecificType(value) {
|
|
16498
15862
|
if (value === null || value === void 0) return String(value);
|
|
16499
15863
|
if (typeof value === "function" && value.name) return `function ${value.name}`;
|
|
@@ -16507,17 +15871,10 @@ function determineSpecificType(value) {
|
|
|
16507
15871
|
}
|
|
16508
15872
|
const hasOwnProperty$1 = {}.hasOwnProperty;
|
|
16509
15873
|
const { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes;
|
|
16510
|
-
/** @type {Map<string, PackageConfig>} */
|
|
16511
15874
|
const cache = /* @__PURE__ */ new Map();
|
|
16512
|
-
/**
|
|
16513
|
-
* @param {string} jsonPath
|
|
16514
|
-
* @param {{specifier: URL | string, base?: URL}} options
|
|
16515
|
-
* @returns {PackageConfig}
|
|
16516
|
-
*/
|
|
16517
15875
|
function read(jsonPath, { base, specifier }) {
|
|
16518
15876
|
const existing = cache.get(jsonPath);
|
|
16519
15877
|
if (existing) return existing;
|
|
16520
|
-
/** @type {string | undefined} */
|
|
16521
15878
|
let string;
|
|
16522
15879
|
try {
|
|
16523
15880
|
string = fs.readFileSync(path.toNamespacedPath(jsonPath), "utf8");
|
|
@@ -16525,7 +15882,6 @@ function read(jsonPath, { base, specifier }) {
|
|
|
16525
15882
|
const exception = error;
|
|
16526
15883
|
if (exception.code !== "ENOENT") throw exception;
|
|
16527
15884
|
}
|
|
16528
|
-
/** @type {PackageConfig} */
|
|
16529
15885
|
const result = {
|
|
16530
15886
|
exists: false,
|
|
16531
15887
|
pjsonPath: jsonPath,
|
|
@@ -16536,7 +15892,6 @@ function read(jsonPath, { base, specifier }) {
|
|
|
16536
15892
|
imports: void 0
|
|
16537
15893
|
};
|
|
16538
15894
|
if (string !== void 0) {
|
|
16539
|
-
/** @type {Record<string, unknown>} */
|
|
16540
15895
|
let parsed;
|
|
16541
15896
|
try {
|
|
16542
15897
|
parsed = JSON.parse(string);
|
|
@@ -16556,10 +15911,6 @@ function read(jsonPath, { base, specifier }) {
|
|
|
16556
15911
|
cache.set(jsonPath, result);
|
|
16557
15912
|
return result;
|
|
16558
15913
|
}
|
|
16559
|
-
/**
|
|
16560
|
-
* @param {URL | string} resolved
|
|
16561
|
-
* @returns {PackageConfig}
|
|
16562
|
-
*/
|
|
16563
15914
|
function getPackageScopeConfig(resolved) {
|
|
16564
15915
|
let packageJSONUrl = new URL("package.json", resolved);
|
|
16565
15916
|
while (true) {
|
|
@@ -16576,17 +15927,11 @@ function getPackageScopeConfig(resolved) {
|
|
|
16576
15927
|
type: "none"
|
|
16577
15928
|
};
|
|
16578
15929
|
}
|
|
16579
|
-
/**
|
|
16580
|
-
* Returns the package type for a given URL.
|
|
16581
|
-
* @param {URL} url - The URL to get the package type for.
|
|
16582
|
-
* @returns {PackageType}
|
|
16583
|
-
*/
|
|
16584
15930
|
function getPackageType(url) {
|
|
16585
15931
|
return getPackageScopeConfig(url).type;
|
|
16586
15932
|
}
|
|
16587
15933
|
const { ERR_UNKNOWN_FILE_EXTENSION } = codes;
|
|
16588
15934
|
const hasOwnProperty = {}.hasOwnProperty;
|
|
16589
|
-
/** @type {Record<string, string>} */
|
|
16590
15935
|
const extensionFormatMap = {
|
|
16591
15936
|
__proto__: null,
|
|
16592
15937
|
".cjs": "commonjs",
|
|
@@ -16594,25 +15939,11 @@ const extensionFormatMap = {
|
|
|
16594
15939
|
".json": "json",
|
|
16595
15940
|
".mjs": "module"
|
|
16596
15941
|
};
|
|
16597
|
-
/**
|
|
16598
|
-
* @param {string | null} mime
|
|
16599
|
-
* @returns {string | null}
|
|
16600
|
-
*/
|
|
16601
15942
|
function mimeToFormat(mime) {
|
|
16602
15943
|
if (mime && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(mime)) return "module";
|
|
16603
15944
|
if (mime === "application/json") return "json";
|
|
16604
15945
|
return null;
|
|
16605
15946
|
}
|
|
16606
|
-
/**
|
|
16607
|
-
* @callback ProtocolHandler
|
|
16608
|
-
* @param {URL} parsed
|
|
16609
|
-
* @param {{parentURL: string, source?: Buffer}} context
|
|
16610
|
-
* @param {boolean} ignoreErrors
|
|
16611
|
-
* @returns {string | null | void}
|
|
16612
|
-
*/
|
|
16613
|
-
/**
|
|
16614
|
-
* @type {Record<string, ProtocolHandler>}
|
|
16615
|
-
*/
|
|
16616
15947
|
const protocolHandlers = {
|
|
16617
15948
|
__proto__: null,
|
|
16618
15949
|
"data:": getDataProtocolModuleFormat,
|
|
@@ -16623,9 +15954,6 @@ const protocolHandlers = {
|
|
|
16623
15954
|
return "builtin";
|
|
16624
15955
|
}
|
|
16625
15956
|
};
|
|
16626
|
-
/**
|
|
16627
|
-
* @param {URL} parsed
|
|
16628
|
-
*/
|
|
16629
15957
|
function getDataProtocolModuleFormat(parsed) {
|
|
16630
15958
|
const { 1: mime } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(parsed.pathname) || [
|
|
16631
15959
|
null,
|
|
@@ -16634,16 +15962,6 @@ function getDataProtocolModuleFormat(parsed) {
|
|
|
16634
15962
|
];
|
|
16635
15963
|
return mimeToFormat(mime);
|
|
16636
15964
|
}
|
|
16637
|
-
/**
|
|
16638
|
-
* Returns the file extension from a URL.
|
|
16639
|
-
*
|
|
16640
|
-
* Should give similar result to
|
|
16641
|
-
* `require('node:path').extname(require('node:url').fileURLToPath(url))`
|
|
16642
|
-
* when used with a `file:` URL.
|
|
16643
|
-
*
|
|
16644
|
-
* @param {URL} url
|
|
16645
|
-
* @returns {string}
|
|
16646
|
-
*/
|
|
16647
15965
|
function extname$2(url) {
|
|
16648
15966
|
const pathname = url.pathname;
|
|
16649
15967
|
let index = pathname.length;
|
|
@@ -16654,9 +15972,6 @@ function extname$2(url) {
|
|
|
16654
15972
|
}
|
|
16655
15973
|
return "";
|
|
16656
15974
|
}
|
|
16657
|
-
/**
|
|
16658
|
-
* @type {ProtocolHandler}
|
|
16659
|
-
*/
|
|
16660
15975
|
function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
|
|
16661
15976
|
const value = extname$2(url);
|
|
16662
15977
|
if (value === ".js") {
|
|
@@ -16675,11 +15990,6 @@ function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
|
|
|
16675
15990
|
throw new ERR_UNKNOWN_FILE_EXTENSION(value, fileURLToPath(url));
|
|
16676
15991
|
}
|
|
16677
15992
|
function getHttpProtocolModuleFormat() {}
|
|
16678
|
-
/**
|
|
16679
|
-
* @param {URL} url
|
|
16680
|
-
* @param {{parentURL: string}} context
|
|
16681
|
-
* @returns {string | null}
|
|
16682
|
-
*/
|
|
16683
15993
|
function defaultGetFormatWithoutErrors(url, context) {
|
|
16684
15994
|
const protocol = url.protocol;
|
|
16685
15995
|
if (!hasOwnProperty.call(protocolHandlers, protocol)) return null;
|
|
@@ -16687,16 +15997,9 @@ function defaultGetFormatWithoutErrors(url, context) {
|
|
|
16687
15997
|
}
|
|
16688
15998
|
const DEFAULT_CONDITIONS = Object.freeze(["node", "import"]);
|
|
16689
15999
|
const DEFAULT_CONDITIONS_SET$1 = new Set(DEFAULT_CONDITIONS);
|
|
16690
|
-
/**
|
|
16691
|
-
* Returns the default conditions for ES module loading, as a Set.
|
|
16692
|
-
*/
|
|
16693
16000
|
function getDefaultConditionsSet() {
|
|
16694
16001
|
return DEFAULT_CONDITIONS_SET$1;
|
|
16695
16002
|
}
|
|
16696
|
-
/**
|
|
16697
|
-
* @param {Array<string>} [conditions]
|
|
16698
|
-
* @returns {Set<string>}
|
|
16699
|
-
*/
|
|
16700
16003
|
function getConditionsSet(conditions) {
|
|
16701
16004
|
return getDefaultConditionsSet();
|
|
16702
16005
|
}
|
|
@@ -16708,32 +16011,14 @@ const deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o
|
|
|
16708
16011
|
const invalidPackageNameRegEx = /^\.|%|\\/;
|
|
16709
16012
|
const patternRegEx = /\*/g;
|
|
16710
16013
|
const encodedSeparatorRegEx = /%2f|%5c/i;
|
|
16711
|
-
/** @type {Set<string>} */
|
|
16712
16014
|
const emittedPackageWarnings = /* @__PURE__ */ new Set();
|
|
16713
16015
|
const doubleSlashRegEx = /[/\\]{2}/;
|
|
16714
|
-
/**
|
|
16715
|
-
*
|
|
16716
|
-
* @param {string} target
|
|
16717
|
-
* @param {string} request
|
|
16718
|
-
* @param {string} match
|
|
16719
|
-
* @param {URL} packageJsonUrl
|
|
16720
|
-
* @param {boolean} internal
|
|
16721
|
-
* @param {URL} base
|
|
16722
|
-
* @param {boolean} isTarget
|
|
16723
|
-
*/
|
|
16724
16016
|
function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) {
|
|
16725
16017
|
if (process$1.noDeprecation) return;
|
|
16726
16018
|
const pjsonPath = fileURLToPath(packageJsonUrl);
|
|
16727
16019
|
const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;
|
|
16728
16020
|
process$1.emitWarning(`Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}.`, "DeprecationWarning", "DEP0166");
|
|
16729
16021
|
}
|
|
16730
|
-
/**
|
|
16731
|
-
* @param {URL} url
|
|
16732
|
-
* @param {URL} packageJsonUrl
|
|
16733
|
-
* @param {URL} base
|
|
16734
|
-
* @param {string} [main]
|
|
16735
|
-
* @returns {void}
|
|
16736
|
-
*/
|
|
16737
16022
|
function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
|
|
16738
16023
|
if (process$1.noDeprecation) return;
|
|
16739
16024
|
if (defaultGetFormatWithoutErrors(url, { parentURL: base.href }) !== "module") return;
|
|
@@ -16743,39 +16028,17 @@ function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
|
|
|
16743
16028
|
if (!main) process$1.emitWarning(`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
|
|
16744
16029
|
else if (path.resolve(packagePath, main) !== urlPath) process$1.emitWarning(`Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
|
|
16745
16030
|
}
|
|
16746
|
-
/**
|
|
16747
|
-
* @param {string} path
|
|
16748
|
-
* @returns {Stats | undefined}
|
|
16749
|
-
*/
|
|
16750
16031
|
function tryStatSync(path) {
|
|
16751
16032
|
try {
|
|
16752
16033
|
return statSync(path);
|
|
16753
16034
|
} catch {}
|
|
16754
16035
|
}
|
|
16755
|
-
/**
|
|
16756
|
-
* Legacy CommonJS main resolution:
|
|
16757
|
-
* 1. let M = pkg_url + (json main field)
|
|
16758
|
-
* 2. TRY(M, M.js, M.json, M.node)
|
|
16759
|
-
* 3. TRY(M/index.js, M/index.json, M/index.node)
|
|
16760
|
-
* 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)
|
|
16761
|
-
* 5. NOT_FOUND
|
|
16762
|
-
*
|
|
16763
|
-
* @param {URL} url
|
|
16764
|
-
* @returns {boolean}
|
|
16765
|
-
*/
|
|
16766
16036
|
function fileExists(url) {
|
|
16767
16037
|
const stats = statSync(url, { throwIfNoEntry: false });
|
|
16768
16038
|
const isFile = stats ? stats.isFile() : void 0;
|
|
16769
16039
|
return isFile === null || isFile === void 0 ? false : isFile;
|
|
16770
16040
|
}
|
|
16771
|
-
/**
|
|
16772
|
-
* @param {URL} packageJsonUrl
|
|
16773
|
-
* @param {PackageConfig} packageConfig
|
|
16774
|
-
* @param {URL} base
|
|
16775
|
-
* @returns {URL}
|
|
16776
|
-
*/
|
|
16777
16041
|
function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
16778
|
-
/** @type {URL | undefined} */
|
|
16779
16042
|
let guess;
|
|
16780
16043
|
if (packageConfig.main !== void 0) {
|
|
16781
16044
|
guess = new URL(packageConfig.main, packageJsonUrl);
|
|
@@ -16816,15 +16079,8 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
|
16816
16079
|
}
|
|
16817
16080
|
throw new ERR_MODULE_NOT_FOUND(fileURLToPath(new URL(".", packageJsonUrl)), fileURLToPath(base));
|
|
16818
16081
|
}
|
|
16819
|
-
/**
|
|
16820
|
-
* @param {URL} resolved
|
|
16821
|
-
* @param {URL} base
|
|
16822
|
-
* @param {boolean} [preserveSymlinks]
|
|
16823
|
-
* @returns {URL}
|
|
16824
|
-
*/
|
|
16825
16082
|
function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
16826
16083
|
if (encodedSeparatorRegEx.exec(resolved.pathname) !== null) throw new ERR_INVALID_MODULE_SPECIFIER(resolved.pathname, "must not include encoded \"/\" or \"\\\" characters", fileURLToPath(base));
|
|
16827
|
-
/** @type {string} */
|
|
16828
16084
|
let filePath;
|
|
16829
16085
|
try {
|
|
16830
16086
|
filePath = fileURLToPath(resolved);
|
|
@@ -16854,59 +16110,19 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
|
16854
16110
|
}
|
|
16855
16111
|
return resolved;
|
|
16856
16112
|
}
|
|
16857
|
-
/**
|
|
16858
|
-
* @param {string} specifier
|
|
16859
|
-
* @param {URL | undefined} packageJsonUrl
|
|
16860
|
-
* @param {URL} base
|
|
16861
|
-
* @returns {Error}
|
|
16862
|
-
*/
|
|
16863
16113
|
function importNotDefined(specifier, packageJsonUrl, base) {
|
|
16864
16114
|
return new ERR_PACKAGE_IMPORT_NOT_DEFINED(specifier, packageJsonUrl && fileURLToPath(new URL(".", packageJsonUrl)), fileURLToPath(base));
|
|
16865
16115
|
}
|
|
16866
|
-
/**
|
|
16867
|
-
* @param {string} subpath
|
|
16868
|
-
* @param {URL} packageJsonUrl
|
|
16869
|
-
* @param {URL} base
|
|
16870
|
-
* @returns {Error}
|
|
16871
|
-
*/
|
|
16872
16116
|
function exportsNotFound(subpath, packageJsonUrl, base) {
|
|
16873
16117
|
return new ERR_PACKAGE_PATH_NOT_EXPORTED(fileURLToPath(new URL(".", packageJsonUrl)), subpath, base && fileURLToPath(base));
|
|
16874
16118
|
}
|
|
16875
|
-
/**
|
|
16876
|
-
* @param {string} request
|
|
16877
|
-
* @param {string} match
|
|
16878
|
-
* @param {URL} packageJsonUrl
|
|
16879
|
-
* @param {boolean} internal
|
|
16880
|
-
* @param {URL} [base]
|
|
16881
|
-
* @returns {never}
|
|
16882
|
-
*/
|
|
16883
16119
|
function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) {
|
|
16884
16120
|
throw new ERR_INVALID_MODULE_SPECIFIER(request, `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath(packageJsonUrl)}`, base && fileURLToPath(base));
|
|
16885
16121
|
}
|
|
16886
|
-
/**
|
|
16887
|
-
* @param {string} subpath
|
|
16888
|
-
* @param {unknown} target
|
|
16889
|
-
* @param {URL} packageJsonUrl
|
|
16890
|
-
* @param {boolean} internal
|
|
16891
|
-
* @param {URL} [base]
|
|
16892
|
-
* @returns {Error}
|
|
16893
|
-
*/
|
|
16894
16122
|
function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) {
|
|
16895
16123
|
target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`;
|
|
16896
16124
|
return new ERR_INVALID_PACKAGE_TARGET(fileURLToPath(new URL(".", packageJsonUrl)), subpath, target, internal, base && fileURLToPath(base));
|
|
16897
16125
|
}
|
|
16898
|
-
/**
|
|
16899
|
-
* @param {string} target
|
|
16900
|
-
* @param {string} subpath
|
|
16901
|
-
* @param {string} match
|
|
16902
|
-
* @param {URL} packageJsonUrl
|
|
16903
|
-
* @param {URL} base
|
|
16904
|
-
* @param {boolean} pattern
|
|
16905
|
-
* @param {boolean} internal
|
|
16906
|
-
* @param {boolean} isPathMap
|
|
16907
|
-
* @param {Set<string> | undefined} conditions
|
|
16908
|
-
* @returns {URL}
|
|
16909
|
-
*/
|
|
16910
16126
|
function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) {
|
|
16911
16127
|
if (subpath !== "" && !pattern && target[target.length - 1] !== "/") throw invalidPackageTarget(match, target, packageJsonUrl, internal, base);
|
|
16912
16128
|
if (!target.startsWith("./")) {
|
|
@@ -16940,39 +16156,20 @@ function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base
|
|
|
16940
16156
|
if (pattern) return new URL(RegExpPrototypeSymbolReplace.call(patternRegEx, resolved.href, () => subpath));
|
|
16941
16157
|
return new URL(subpath, resolved);
|
|
16942
16158
|
}
|
|
16943
|
-
/**
|
|
16944
|
-
* @param {string} key
|
|
16945
|
-
* @returns {boolean}
|
|
16946
|
-
*/
|
|
16947
16159
|
function isArrayIndex(key) {
|
|
16948
16160
|
const keyNumber = Number(key);
|
|
16949
16161
|
if (`${keyNumber}` !== key) return false;
|
|
16950
16162
|
return keyNumber >= 0 && keyNumber < 4294967295;
|
|
16951
16163
|
}
|
|
16952
|
-
/**
|
|
16953
|
-
* @param {URL} packageJsonUrl
|
|
16954
|
-
* @param {unknown} target
|
|
16955
|
-
* @param {string} subpath
|
|
16956
|
-
* @param {string} packageSubpath
|
|
16957
|
-
* @param {URL} base
|
|
16958
|
-
* @param {boolean} pattern
|
|
16959
|
-
* @param {boolean} internal
|
|
16960
|
-
* @param {boolean} isPathMap
|
|
16961
|
-
* @param {Set<string> | undefined} conditions
|
|
16962
|
-
* @returns {URL | null}
|
|
16963
|
-
*/
|
|
16964
16164
|
function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions) {
|
|
16965
16165
|
if (typeof target === "string") return resolvePackageTargetString(target, subpath, packageSubpath, packageJsonUrl, base, pattern, internal, isPathMap, conditions);
|
|
16966
16166
|
if (Array.isArray(target)) {
|
|
16967
|
-
/** @type {Array<unknown>} */
|
|
16968
16167
|
const targetList = target;
|
|
16969
16168
|
if (targetList.length === 0) return null;
|
|
16970
|
-
/** @type {ErrnoException | null | undefined} */
|
|
16971
16169
|
let lastException;
|
|
16972
16170
|
let i = -1;
|
|
16973
16171
|
while (++i < targetList.length) {
|
|
16974
16172
|
const targetItem = targetList[i];
|
|
16975
|
-
/** @type {URL | null} */
|
|
16976
16173
|
let resolveResult;
|
|
16977
16174
|
try {
|
|
16978
16175
|
resolveResult = resolvePackageTarget(packageJsonUrl, targetItem, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions);
|
|
@@ -17014,12 +16211,6 @@ function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, b
|
|
|
17014
16211
|
if (target === null) return null;
|
|
17015
16212
|
throw invalidPackageTarget(packageSubpath, target, packageJsonUrl, internal, base);
|
|
17016
16213
|
}
|
|
17017
|
-
/**
|
|
17018
|
-
* @param {unknown} exports
|
|
17019
|
-
* @param {URL} packageJsonUrl
|
|
17020
|
-
* @param {URL} base
|
|
17021
|
-
* @returns {boolean}
|
|
17022
|
-
*/
|
|
17023
16214
|
function isConditionalExportsMainSugar(exports$1, packageJsonUrl, base) {
|
|
17024
16215
|
if (typeof exports$1 === "string" || Array.isArray(exports$1)) return true;
|
|
17025
16216
|
if (typeof exports$1 !== "object" || exports$1 === null) return false;
|
|
@@ -17035,11 +16226,6 @@ function isConditionalExportsMainSugar(exports$1, packageJsonUrl, base) {
|
|
|
17035
16226
|
}
|
|
17036
16227
|
return isConditionalSugar;
|
|
17037
16228
|
}
|
|
17038
|
-
/**
|
|
17039
|
-
* @param {string} match
|
|
17040
|
-
* @param {URL} pjsonUrl
|
|
17041
|
-
* @param {URL} base
|
|
17042
|
-
*/
|
|
17043
16229
|
function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
|
|
17044
16230
|
if (process$1.noDeprecation) return;
|
|
17045
16231
|
const pjsonPath = fileURLToPath(pjsonUrl);
|
|
@@ -17047,14 +16233,6 @@ function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
|
|
|
17047
16233
|
emittedPackageWarnings.add(pjsonPath + "|" + match);
|
|
17048
16234
|
process$1.emitWarning(`Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155");
|
|
17049
16235
|
}
|
|
17050
|
-
/**
|
|
17051
|
-
* @param {URL} packageJsonUrl
|
|
17052
|
-
* @param {string} packageSubpath
|
|
17053
|
-
* @param {Record<string, unknown>} packageConfig
|
|
17054
|
-
* @param {URL} base
|
|
17055
|
-
* @param {Set<string> | undefined} conditions
|
|
17056
|
-
* @returns {URL}
|
|
17057
|
-
*/
|
|
17058
16236
|
function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) {
|
|
17059
16237
|
let exports$1 = packageConfig.exports;
|
|
17060
16238
|
if (isConditionalExportsMainSugar(exports$1, packageJsonUrl, base)) exports$1 = { ".": exports$1 };
|
|
@@ -17088,10 +16266,6 @@ function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, ba
|
|
|
17088
16266
|
}
|
|
17089
16267
|
throw exportsNotFound(packageSubpath, packageJsonUrl, base);
|
|
17090
16268
|
}
|
|
17091
|
-
/**
|
|
17092
|
-
* @param {string} a
|
|
17093
|
-
* @param {string} b
|
|
17094
|
-
*/
|
|
17095
16269
|
function patternKeyCompare(a, b) {
|
|
17096
16270
|
const aPatternIndex = a.indexOf("*");
|
|
17097
16271
|
const bPatternIndex = b.indexOf("*");
|
|
@@ -17105,15 +16279,8 @@ function patternKeyCompare(a, b) {
|
|
|
17105
16279
|
if (b.length > a.length) return 1;
|
|
17106
16280
|
return 0;
|
|
17107
16281
|
}
|
|
17108
|
-
/**
|
|
17109
|
-
* @param {string} name
|
|
17110
|
-
* @param {URL} base
|
|
17111
|
-
* @param {Set<string>} [conditions]
|
|
17112
|
-
* @returns {URL}
|
|
17113
|
-
*/
|
|
17114
16282
|
function packageImportsResolve(name, base, conditions) {
|
|
17115
16283
|
if (name === "#" || name.startsWith("#/") || name.endsWith("/")) throw new ERR_INVALID_MODULE_SPECIFIER(name, "is not a valid internal imports specifier name", fileURLToPath(base));
|
|
17116
|
-
/** @type {URL | undefined} */
|
|
17117
16284
|
let packageJsonUrl;
|
|
17118
16285
|
const packageConfig = getPackageScopeConfig(base);
|
|
17119
16286
|
if (packageConfig.exists) {
|
|
@@ -17147,10 +16314,6 @@ function packageImportsResolve(name, base, conditions) {
|
|
|
17147
16314
|
}
|
|
17148
16315
|
throw importNotDefined(name, packageJsonUrl, base);
|
|
17149
16316
|
}
|
|
17150
|
-
/**
|
|
17151
|
-
* @param {string} specifier
|
|
17152
|
-
* @param {URL} base
|
|
17153
|
-
*/
|
|
17154
16317
|
function parsePackageName(specifier, base) {
|
|
17155
16318
|
let separatorIndex = specifier.indexOf("/");
|
|
17156
16319
|
let validPackageName = true;
|
|
@@ -17169,24 +16332,16 @@ function parsePackageName(specifier, base) {
|
|
|
17169
16332
|
isScoped
|
|
17170
16333
|
};
|
|
17171
16334
|
}
|
|
17172
|
-
/**
|
|
17173
|
-
* @param {string} specifier
|
|
17174
|
-
* @param {URL} base
|
|
17175
|
-
* @param {Set<string> | undefined} conditions
|
|
17176
|
-
* @returns {URL}
|
|
17177
|
-
*/
|
|
17178
16335
|
function packageResolve(specifier, base, conditions) {
|
|
17179
16336
|
if (builtinModules.includes(specifier)) return new URL("node:" + specifier);
|
|
17180
16337
|
const { packageName, packageSubpath, isScoped } = parsePackageName(specifier, base);
|
|
17181
16338
|
const packageConfig = getPackageScopeConfig(base);
|
|
17182
|
-
/* c8 ignore next 16 */
|
|
17183
16339
|
if (packageConfig.exists) {
|
|
17184
16340
|
const packageJsonUrl = pathToFileURL(packageConfig.pjsonPath);
|
|
17185
16341
|
if (packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions);
|
|
17186
16342
|
}
|
|
17187
16343
|
let packageJsonUrl = new URL("./node_modules/" + packageName + "/package.json", base);
|
|
17188
16344
|
let packageJsonPath = fileURLToPath(packageJsonUrl);
|
|
17189
|
-
/** @type {string} */
|
|
17190
16345
|
let lastPath;
|
|
17191
16346
|
do {
|
|
17192
16347
|
const stat = tryStatSync(packageJsonPath.slice(0, -13));
|
|
@@ -17206,10 +16361,6 @@ function packageResolve(specifier, base, conditions) {
|
|
|
17206
16361
|
} while (packageJsonPath.length !== lastPath.length);
|
|
17207
16362
|
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), false);
|
|
17208
16363
|
}
|
|
17209
|
-
/**
|
|
17210
|
-
* @param {string} specifier
|
|
17211
|
-
* @returns {boolean}
|
|
17212
|
-
*/
|
|
17213
16364
|
function isRelativeSpecifier(specifier) {
|
|
17214
16365
|
if (specifier[0] === ".") {
|
|
17215
16366
|
if (specifier.length === 1 || specifier[1] === "/") return true;
|
|
@@ -17217,35 +16368,15 @@ function isRelativeSpecifier(specifier) {
|
|
|
17217
16368
|
}
|
|
17218
16369
|
return false;
|
|
17219
16370
|
}
|
|
17220
|
-
/**
|
|
17221
|
-
* @param {string} specifier
|
|
17222
|
-
* @returns {boolean}
|
|
17223
|
-
*/
|
|
17224
16371
|
function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {
|
|
17225
16372
|
if (specifier === "") return false;
|
|
17226
16373
|
if (specifier[0] === "/") return true;
|
|
17227
16374
|
return isRelativeSpecifier(specifier);
|
|
17228
16375
|
}
|
|
17229
|
-
/**
|
|
17230
|
-
* The “Resolver Algorithm Specification” as detailed in the Node docs (which is
|
|
17231
|
-
* sync and slightly lower-level than `resolve`).
|
|
17232
|
-
*
|
|
17233
|
-
* @param {string} specifier
|
|
17234
|
-
* `/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`, etc.
|
|
17235
|
-
* @param {URL} base
|
|
17236
|
-
* Full URL (to a file) that `specifier` is resolved relative from.
|
|
17237
|
-
* @param {Set<string>} [conditions]
|
|
17238
|
-
* Conditions.
|
|
17239
|
-
* @param {boolean} [preserveSymlinks]
|
|
17240
|
-
* Keep symlinks instead of resolving them.
|
|
17241
|
-
* @returns {URL}
|
|
17242
|
-
* A URL object to the found thing.
|
|
17243
|
-
*/
|
|
17244
16376
|
function moduleResolve(specifier, base, conditions, preserveSymlinks) {
|
|
17245
16377
|
if (conditions === void 0) conditions = getConditionsSet();
|
|
17246
16378
|
const protocol = base.protocol;
|
|
17247
16379
|
const isRemote = protocol === "data:" || protocol === "http:" || protocol === "https:";
|
|
17248
|
-
/** @type {URL | undefined} */
|
|
17249
16380
|
let resolved;
|
|
17250
16381
|
if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) try {
|
|
17251
16382
|
resolved = new URL(specifier, base);
|
|
@@ -17463,7 +16594,11 @@ function _extractExtraNames(extraNamesStr) {
|
|
|
17463
16594
|
angleDepth++;
|
|
17464
16595
|
continue;
|
|
17465
16596
|
}
|
|
17466
|
-
if (inTypeAnnotation && char === "
|
|
16597
|
+
if (!inTypeAnnotation && char === "<" && depth === 0 && i > 0 && _isIdentifierBeforeAngleBracket(extraNamesStr, i)) {
|
|
16598
|
+
angleDepth++;
|
|
16599
|
+
continue;
|
|
16600
|
+
}
|
|
16601
|
+
if (char === ">" && angleDepth > 0 && extraNamesStr[i - 1] !== "=") {
|
|
17467
16602
|
angleDepth--;
|
|
17468
16603
|
continue;
|
|
17469
16604
|
}
|
|
@@ -17584,6 +16719,12 @@ function _getLocations(code, label) {
|
|
|
17584
16719
|
});
|
|
17585
16720
|
return locations;
|
|
17586
16721
|
}
|
|
16722
|
+
function _isIdentifierBeforeAngleBracket(str, i) {
|
|
16723
|
+
let j = i - 1;
|
|
16724
|
+
while (j >= 0 && /[A-Za-z0-9_$]/.test(str[j])) j--;
|
|
16725
|
+
const wordStart = j + 1;
|
|
16726
|
+
return wordStart < i && /[A-Za-z_$]/.test(str[wordStart]);
|
|
16727
|
+
}
|
|
17587
16728
|
const ESM_RE = /(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m;
|
|
17588
16729
|
const CJS_RE = /(?:[\s;]|^)(?:module\.exports\b|exports\.\w|require\s*\(|global\.\w)/m;
|
|
17589
16730
|
const COMMENT_RE = /\/\*.+?\*\/|\/\/.*(?=[nr])/g;
|
|
@@ -17605,8 +16746,6 @@ function detectSyntax(code, opts = {}) {
|
|
|
17605
16746
|
isMixed: hasESM && hasCJS
|
|
17606
16747
|
};
|
|
17607
16748
|
}
|
|
17608
|
-
//#endregion
|
|
17609
|
-
//#region node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/utils.mjs
|
|
17610
16749
|
const pathSeparators = /* @__PURE__ */ new Set([
|
|
17611
16750
|
"/",
|
|
17612
16751
|
"\\",
|
|
@@ -17642,8 +16781,6 @@ function hasTrailingSlash(path = "/") {
|
|
|
17642
16781
|
const lastChar = path[path.length - 1];
|
|
17643
16782
|
return lastChar === "/" || lastChar === "\\";
|
|
17644
16783
|
}
|
|
17645
|
-
//#endregion
|
|
17646
|
-
//#region node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs
|
|
17647
16784
|
function getType(val) {
|
|
17648
16785
|
const type = typeof val;
|
|
17649
16786
|
if (type === "undefined" || val === null) return;
|
|
@@ -17687,8 +16824,6 @@ function normalizeTypes(val) {
|
|
|
17687
16824
|
if (arr.length === 0 || arr.includes("any")) return;
|
|
17688
16825
|
return arr.length > 1 ? arr : arr[0];
|
|
17689
16826
|
}
|
|
17690
|
-
//#endregion
|
|
17691
|
-
//#region node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs
|
|
17692
16827
|
async function resolveSchema(obj, defaults, options = {}) {
|
|
17693
16828
|
return await _resolveSchema(obj, "", {
|
|
17694
16829
|
root: obj,
|
|
@@ -17754,8 +16889,6 @@ function normalizeSchema(schema, options) {
|
|
|
17754
16889
|
schema.default = Object.fromEntries(propsWithDefaults);
|
|
17755
16890
|
}
|
|
17756
16891
|
}
|
|
17757
|
-
//#endregion
|
|
17758
|
-
//#region node_modules/.pnpm/knitwork@1.3.0/node_modules/knitwork/dist/index.mjs
|
|
17759
16892
|
function genString(input, options = {}) {
|
|
17760
16893
|
const str = JSON.stringify(input);
|
|
17761
16894
|
if (!options.singleQuotes) return str;
|
|
@@ -17876,8 +17009,6 @@ function genRawValue(value, indent = "", options = {}) {
|
|
|
17876
17009
|
if (options.preserveTypes && typeof value !== "function") return JSON.stringify(value);
|
|
17877
17010
|
return value.toString();
|
|
17878
17011
|
}
|
|
17879
|
-
//#endregion
|
|
17880
|
-
//#region node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/index.mjs
|
|
17881
17012
|
const GenerateTypesDefaults = {
|
|
17882
17013
|
interfaceName: "Untyped",
|
|
17883
17014
|
addExport: true,
|
|
@@ -18028,8 +17159,6 @@ function isRequired(schema, key, opts) {
|
|
|
18028
17159
|
if (Array.isArray(schema.required) && schema.required.includes(key)) return true;
|
|
18029
17160
|
return !opts.partial;
|
|
18030
17161
|
}
|
|
18031
|
-
//#endregion
|
|
18032
|
-
//#region node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
18033
17162
|
var comma = ",".charCodeAt(0);
|
|
18034
17163
|
var semicolon = ";".charCodeAt(0);
|
|
18035
17164
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
@@ -18193,8 +17322,6 @@ function encode(decoded) {
|
|
|
18193
17322
|
}
|
|
18194
17323
|
return writer.flush();
|
|
18195
17324
|
}
|
|
18196
|
-
//#endregion
|
|
18197
|
-
//#region node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs
|
|
18198
17325
|
var BitSet = class BitSet {
|
|
18199
17326
|
constructor(arg) {
|
|
18200
17327
|
this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
|
|
@@ -19128,8 +18255,6 @@ var MagicString = class MagicString {
|
|
|
19128
18255
|
return this._replaceRegexp(searchValue, replacement);
|
|
19129
18256
|
}
|
|
19130
18257
|
};
|
|
19131
|
-
//#endregion
|
|
19132
|
-
//#region node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.mjs
|
|
19133
18258
|
var import_js_tokens = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
19134
18259
|
var HashbangComment, Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace;
|
|
19135
18260
|
Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;
|
|
@@ -19549,31 +18674,34 @@ function stripLiteral(code, options) {
|
|
|
19549
18674
|
for (const token of (0, import_js_tokens.default)(code, { jsx: false })) result += stripLiteralFromToken(token, _options.fillChar, _options.filter);
|
|
19550
18675
|
return result;
|
|
19551
18676
|
}
|
|
19552
|
-
|
|
19553
|
-
//#region node_modules/.pnpm/unimport@6.0.1/node_modules/unimport/dist/shared/unimport.CWY7iHFZ.mjs
|
|
19554
|
-
const excludeRE = [
|
|
18677
|
+
const RE_EXCLUDE = [
|
|
19555
18678
|
/\b(import|export)\b([\w$*{},\s]+?)\bfrom\s*["']/g,
|
|
19556
18679
|
/\bfunction\s*([\w$]+)\s*\(/g,
|
|
19557
18680
|
/\bclass\s*([\w$]+)\s*\{/g,
|
|
19558
|
-
/\b(?:const|let|var)\s+?(\[.*?\]|\{.*?\}|.+?)\s*?[=;\n]/gs
|
|
18681
|
+
/\b(?:const|let|var)\s+?(\[.*?\]|\{.*?\}|.+?)\s*?(?:[=;\n]|\bof\b|\bin\b)/gs
|
|
19559
18682
|
];
|
|
19560
|
-
const
|
|
19561
|
-
const
|
|
19562
|
-
const
|
|
19563
|
-
const
|
|
18683
|
+
const RE_IMPORT_AS = /^.*\sas\s+/;
|
|
18684
|
+
const RE_SEPARATOR = /[,[\]{}\n]|\b(?:import|export)\b/g;
|
|
18685
|
+
const RE_MATCH = /(^|\.\.\.|(?:\bcase|\?)\s+|[^\w$/)]|\bextends\s+)([\w$]+)\s*(?=[.()[\]}:;?+\-*&|`<>,\n]|\b(?:instanceof|in)\b|$|(?<=extends\s+\w+)\s+\{)/g;
|
|
18686
|
+
const RE_REGEX = /\/\S*?(?<!\\)(?<!\[[^\]]*)\/[gimsuy]*/g;
|
|
19564
18687
|
function stripCommentsAndStrings(code, options) {
|
|
19565
|
-
return stripLiteral(code, options).replace(
|
|
18688
|
+
return stripLiteral(code, options).replace(RE_REGEX, "new RegExp(\"\")");
|
|
19566
18689
|
}
|
|
19567
18690
|
function defineUnimportPreset(preset) {
|
|
19568
18691
|
return preset;
|
|
19569
18692
|
}
|
|
19570
|
-
const
|
|
19571
|
-
const
|
|
18693
|
+
const RE_IDENTIFIER = /^[A-Z_$][\w$]*$/i;
|
|
18694
|
+
const RE_SAFE_PROPERTY_NAME = /^[a-z$_][\w$]*$/i;
|
|
18695
|
+
const RE_FILE_EXT$1 = /\.[a-z]+$/i;
|
|
18696
|
+
const RE_RELATIVE_PATH = /^[./]/;
|
|
18697
|
+
const RE_DTS_EXT$1 = /\.d\.([cm]?)ts$/i;
|
|
18698
|
+
const RE_SHEBANG = /^#!.+/;
|
|
18699
|
+
const RE_IMPORT_BRACE = /^\s*import\s*\{/;
|
|
19572
18700
|
function stringifyWith(withValues) {
|
|
19573
18701
|
let withDefs = "";
|
|
19574
18702
|
for (let entries = Object.entries(withValues), l = entries.length, i = 0; i < l; i++) {
|
|
19575
18703
|
const [prop, value] = entries[i];
|
|
19576
|
-
withDefs +=
|
|
18704
|
+
withDefs += RE_SAFE_PROPERTY_NAME.test(prop) ? prop : JSON.stringify(prop);
|
|
19577
18705
|
withDefs += `: ${JSON.stringify(String(value))}`;
|
|
19578
18706
|
if (i + 1 !== l) withDefs += ", ";
|
|
19579
18707
|
}
|
|
@@ -19627,37 +18755,61 @@ function stringifyImports(imports, isCJS = false) {
|
|
|
19627
18755
|
return entries;
|
|
19628
18756
|
}).join("\n");
|
|
19629
18757
|
}
|
|
18758
|
+
function encodeImportName(name) {
|
|
18759
|
+
return `\uFFFF${name}\uFFFE`;
|
|
18760
|
+
}
|
|
19630
18761
|
function dedupeImports(imports, warn) {
|
|
19631
|
-
const
|
|
19632
|
-
|
|
19633
|
-
|
|
19634
|
-
if (
|
|
19635
|
-
|
|
19636
|
-
|
|
19637
|
-
map.set(name, idx);
|
|
19638
|
-
return;
|
|
18762
|
+
const deduped = /* @__PURE__ */ new Map();
|
|
18763
|
+
for (let idx = imports.length - 1; idx >= 0; idx--) {
|
|
18764
|
+
const currImp = imports[idx];
|
|
18765
|
+
if (currImp.disabled || currImp.declarationType === "enum" || currImp.declarationType === "const enum" || currImp.declarationType === "class") {
|
|
18766
|
+
deduped.set(idx, currImp);
|
|
18767
|
+
continue;
|
|
19639
18768
|
}
|
|
19640
|
-
const
|
|
19641
|
-
|
|
19642
|
-
|
|
19643
|
-
|
|
18769
|
+
const name = String(currImp.as ?? currImp.name);
|
|
18770
|
+
const prevImp = deduped.get(name);
|
|
18771
|
+
if (!prevImp) {
|
|
18772
|
+
deduped.set(name, currImp);
|
|
18773
|
+
continue;
|
|
19644
18774
|
}
|
|
19645
|
-
|
|
19646
|
-
|
|
19647
|
-
|
|
19648
|
-
|
|
19649
|
-
|
|
19650
|
-
|
|
19651
|
-
|
|
19652
|
-
|
|
18775
|
+
if (currImp.type || prevImp.type ? (currImp.typeFrom || currImp.from) === (prevImp.typeFrom || prevImp.from) : currImp.from === prevImp.from) {
|
|
18776
|
+
if (Boolean(currImp.type) === Boolean(prevImp.type)) {
|
|
18777
|
+
if ((currImp.priority || 1) > (prevImp.priority || 1)) {
|
|
18778
|
+
deduped.delete(name);
|
|
18779
|
+
deduped.set(name, currImp);
|
|
18780
|
+
}
|
|
18781
|
+
} else {
|
|
18782
|
+
const altName2 = encodeImportName(name);
|
|
18783
|
+
const prevImpComplement2 = deduped.get(altName2);
|
|
18784
|
+
if (!prevImpComplement2) deduped.set(altName2, currImp);
|
|
18785
|
+
else if ((currImp.priority || 1) > (prevImpComplement2.priority || 1)) {
|
|
18786
|
+
deduped.delete(altName2);
|
|
18787
|
+
deduped.set(altName2, currImp);
|
|
18788
|
+
}
|
|
18789
|
+
}
|
|
18790
|
+
continue;
|
|
18791
|
+
}
|
|
18792
|
+
const altName = encodeImportName(name);
|
|
18793
|
+
const prevImpComplement = deduped.get(altName);
|
|
18794
|
+
const priorityDiff = (currImp.priority || 1) - Math.max(prevImp.priority || 1, prevImpComplement?.priority || 1);
|
|
18795
|
+
if (priorityDiff > 0) {
|
|
18796
|
+
deduped.delete(name);
|
|
18797
|
+
deduped.delete(altName);
|
|
18798
|
+
deduped.set(name, currImp);
|
|
18799
|
+
} else if (priorityDiff === 0) warn(`Duplicated imports "${name}", the one from "${currImp.from}" has been ignored and "${prevImp.from}" is used`);
|
|
18800
|
+
}
|
|
18801
|
+
let i = deduped.size;
|
|
18802
|
+
const dedupedImports = new Array(i);
|
|
18803
|
+
for (const imp of deduped.values()) dedupedImports[--i] = imp;
|
|
18804
|
+
return dedupedImports;
|
|
19653
18805
|
}
|
|
19654
18806
|
function toExports(imports, fileDir, includeType = false, options = {}) {
|
|
19655
18807
|
const map = toImportModuleMap(imports, includeType, options);
|
|
19656
18808
|
return Object.entries(map).flatMap(([name, imports2]) => {
|
|
19657
|
-
if (isFilePath(name)) name = name.replace(
|
|
18809
|
+
if (isFilePath(name)) name = name.replace(RE_FILE_EXT$1, "");
|
|
19658
18810
|
if (fileDir && isAbsolute$2(name)) {
|
|
19659
18811
|
name = relative$2(fileDir, name);
|
|
19660
|
-
if (!
|
|
18812
|
+
if (!RE_RELATIVE_PATH.test(name)) name = `./${name}`;
|
|
19661
18813
|
}
|
|
19662
18814
|
const entries = [];
|
|
19663
18815
|
const filtered = Array.from(imports2).filter((i) => {
|
|
@@ -19672,7 +18824,7 @@ function toExports(imports, fileDir, includeType = false, options = {}) {
|
|
|
19672
18824
|
}).join("\n");
|
|
19673
18825
|
}
|
|
19674
18826
|
function stripFileExtension(path) {
|
|
19675
|
-
return path.replace(
|
|
18827
|
+
return path.replace(RE_FILE_EXT$1, "");
|
|
19676
18828
|
}
|
|
19677
18829
|
function toTypeDeclarationItems(imports, options) {
|
|
19678
18830
|
return imports.map((i) => {
|
|
@@ -19680,7 +18832,7 @@ function toTypeDeclarationItems(imports, options) {
|
|
|
19680
18832
|
let typeDef = "";
|
|
19681
18833
|
if (i.with) typeDef += `import('${from}', { with: ${stringifyWith(i.with)} })`;
|
|
19682
18834
|
else typeDef += `import('${from}')`;
|
|
19683
|
-
if (i.name !== "*" && i.name !== "=") typeDef +=
|
|
18835
|
+
if (i.name !== "*" && i.name !== "=") typeDef += RE_IDENTIFIER.test(i.name) ? `.${i.name}` : `['${i.name}']`;
|
|
19684
18836
|
return `const ${i.as}: typeof ${typeDef}`;
|
|
19685
18837
|
}).sort();
|
|
19686
18838
|
}
|
|
@@ -19720,7 +18872,7 @@ function toTypeReExports(imports, options) {
|
|
|
19720
18872
|
return `// for type re-export
|
|
19721
18873
|
declare global {
|
|
19722
18874
|
${Array.from(importsMap).flatMap(([from, module]) => {
|
|
19723
|
-
from = from.replace(
|
|
18875
|
+
from = from.replace(RE_DTS_EXT$1, ".$1js");
|
|
19724
18876
|
const { starTypeImport, typeImports } = module;
|
|
19725
18877
|
const strings = [];
|
|
19726
18878
|
if (typeImports.size) {
|
|
@@ -19763,7 +18915,7 @@ function addImportToCode(code, imports, isCJS = false, mergeExisting = false, in
|
|
|
19763
18915
|
return _staticImports;
|
|
19764
18916
|
}
|
|
19765
18917
|
function hasShebang() {
|
|
19766
|
-
return
|
|
18918
|
+
return RE_SHEBANG.test(s.original);
|
|
19767
18919
|
}
|
|
19768
18920
|
if (mergeExisting && !isCJS) {
|
|
19769
18921
|
const existingImports = findStaticImportsLazy();
|
|
@@ -19776,7 +18928,7 @@ function addImportToCode(code, imports, isCJS = false, mergeExisting = false, in
|
|
|
19776
18928
|
});
|
|
19777
18929
|
for (const [target, items] of map.entries()) {
|
|
19778
18930
|
const strings = items.map((i) => `${stringifyImportAlias(i)}, `);
|
|
19779
|
-
const importLength = target.code.match(
|
|
18931
|
+
const importLength = target.code.match(RE_IMPORT_BRACE)?.[0]?.length;
|
|
19780
18932
|
if (importLength) s.appendLeft(target.start + importLength, ` ${strings.join("").trim()}`);
|
|
19781
18933
|
}
|
|
19782
18934
|
} else newImports = imports;
|
|
@@ -19808,7 +18960,7 @@ function normalizeImports(imports) {
|
|
|
19808
18960
|
function isFilePath(path) {
|
|
19809
18961
|
return path.startsWith(".") || isAbsolute$2(path) || path.includes("://");
|
|
19810
18962
|
}
|
|
19811
|
-
const
|
|
18963
|
+
const RE_CONTEXT$1 = /\b_ctx\.([$\w]+)\b/g;
|
|
19812
18964
|
const UNREF_KEY = "__unimport_unref_";
|
|
19813
18965
|
const VUE_TEMPLATE_NAME = "unimport:vue-template";
|
|
19814
18966
|
function vueTemplateAddon() {
|
|
@@ -19816,7 +18968,7 @@ function vueTemplateAddon() {
|
|
|
19816
18968
|
name: VUE_TEMPLATE_NAME,
|
|
19817
18969
|
async transform(s, id) {
|
|
19818
18970
|
if (!s.original.includes("_ctx.") || s.original.includes(UNREF_KEY)) return s;
|
|
19819
|
-
const matches = Array.from(s.original.matchAll(
|
|
18971
|
+
const matches = Array.from(s.original.matchAll(RE_CONTEXT$1));
|
|
19820
18972
|
const imports = await this.getImports();
|
|
19821
18973
|
let targets = [];
|
|
19822
18974
|
for (const match of matches) {
|
|
@@ -19827,7 +18979,7 @@ function vueTemplateAddon() {
|
|
|
19827
18979
|
const end = start + match[0].length;
|
|
19828
18980
|
const tempName = `__unimport_${name}`;
|
|
19829
18981
|
s.overwrite(start, end, `(${JSON.stringify(name)} in _ctx ? _ctx.${name} : ${UNREF_KEY}(${tempName}))`);
|
|
19830
|
-
if (!targets.
|
|
18982
|
+
if (!targets.some((i) => i.as === tempName)) targets.push({
|
|
19831
18983
|
...item,
|
|
19832
18984
|
as: tempName
|
|
19833
18985
|
});
|
|
@@ -19868,9 +19020,10 @@ ${(await this.getImports()).map((i) => {
|
|
|
19868
19020
|
};
|
|
19869
19021
|
return self;
|
|
19870
19022
|
}
|
|
19871
|
-
const
|
|
19872
|
-
const
|
|
19873
|
-
const
|
|
19023
|
+
const RE_BACKSLASH = /\\/g;
|
|
19024
|
+
const RE_CONTEXT = /resolveDirective as _resolveDirective/;
|
|
19025
|
+
const contextText = `${RE_CONTEXT.source}, `;
|
|
19026
|
+
const RE_DIRECTIVE = /(?:var|const) (\w+) = _resolveDirective\("([\w.-]+)"\);?\s*/g;
|
|
19874
19027
|
const VUE_DIRECTIVES_NAME = "unimport:vue-directives";
|
|
19875
19028
|
function vueDirectivesAddon(options = {}) {
|
|
19876
19029
|
function isDirective(importEntry) {
|
|
@@ -19886,8 +19039,8 @@ function vueDirectivesAddon(options = {}) {
|
|
|
19886
19039
|
const self = {
|
|
19887
19040
|
name: VUE_DIRECTIVES_NAME,
|
|
19888
19041
|
async transform(s, id) {
|
|
19889
|
-
if (!s.original
|
|
19890
|
-
const matches = Array.from(s.original.matchAll(
|
|
19042
|
+
if (!RE_CONTEXT.test(s.original)) return s;
|
|
19043
|
+
const matches = Array.from(s.original.matchAll(RE_DIRECTIVE)).sort((a, b) => b.index - a.index);
|
|
19891
19044
|
if (!matches.length) return s;
|
|
19892
19045
|
let targets = [];
|
|
19893
19046
|
for await (const [begin, end, importEntry] of findDirectives(isDirective, matches, this.getImports())) {
|
|
@@ -19895,7 +19048,7 @@ function vueDirectivesAddon(options = {}) {
|
|
|
19895
19048
|
targets.push(importEntry);
|
|
19896
19049
|
}
|
|
19897
19050
|
if (!targets.length) return s;
|
|
19898
|
-
if (!s.toString()
|
|
19051
|
+
if (!RE_DIRECTIVE.test(s.toString())) s.replace(contextText, "");
|
|
19899
19052
|
for (const addon of this.addons) {
|
|
19900
19053
|
if (addon === self) continue;
|
|
19901
19054
|
targets = await addon.injectImportsResolved?.call(this, targets, s, id) ?? targets;
|
|
@@ -19939,7 +19092,7 @@ function resolvePath(cwd, path) {
|
|
|
19939
19092
|
return path[0] === "." ? resolve$3(cwd, path) : path;
|
|
19940
19093
|
}
|
|
19941
19094
|
function normalizePath$1(cwd, path) {
|
|
19942
|
-
return resolvePath(cwd, path).replace(
|
|
19095
|
+
return resolvePath(cwd, path).replace(RE_BACKSLASH, "/");
|
|
19943
19096
|
}
|
|
19944
19097
|
async function* findDirectives(isDirective, regexArray, importsPromise) {
|
|
19945
19098
|
const imports = (await importsPromise).filter(isDirective);
|
|
@@ -19991,8 +19144,6 @@ function* findDirective(imports, symbol, [begin, end, importName]) {
|
|
|
19991
19144
|
}
|
|
19992
19145
|
}
|
|
19993
19146
|
}
|
|
19994
|
-
//#endregion
|
|
19995
|
-
//#region node_modules/.pnpm/quansync@0.2.11/node_modules/quansync/dist/index.mjs
|
|
19996
19147
|
const GET_IS_ASYNC = Symbol.for("quansync.getIsAsync");
|
|
19997
19148
|
var QuansyncError = class extends Error {
|
|
19998
19149
|
constructor(message = "Unexpected promise in sync context") {
|
|
@@ -20075,11 +19226,7 @@ quansync$1({
|
|
|
20075
19226
|
async: () => Promise.resolve(true),
|
|
20076
19227
|
sync: () => false
|
|
20077
19228
|
});
|
|
20078
|
-
//#endregion
|
|
20079
|
-
//#region node_modules/.pnpm/quansync@0.2.11/node_modules/quansync/dist/macro.mjs
|
|
20080
19229
|
const quansync = quansync$1;
|
|
20081
|
-
//#endregion
|
|
20082
|
-
//#region node_modules/.pnpm/local-pkg@1.1.2/node_modules/local-pkg/dist/index.mjs
|
|
20083
19230
|
const toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
20084
19231
|
async function findUp$1(name, { cwd = process$1.cwd(), type = "file", stopAt } = {}) {
|
|
20085
19232
|
let directory = path.resolve(toPath(cwd) ?? "");
|
|
@@ -20190,9 +19337,7 @@ quansync(function* (name, cwd) {
|
|
|
20190
19337
|
const pkg = (yield loadPackageJSON(cwd)) || {};
|
|
20191
19338
|
return name in (pkg.dependencies || {}) || name in (pkg.devDependencies || {});
|
|
20192
19339
|
}).sync;
|
|
20193
|
-
|
|
20194
|
-
//#region node_modules/.pnpm/unimport@6.0.1/node_modules/unimport/dist/shared/unimport.Cyews8CQ.mjs
|
|
20195
|
-
const version$1 = "6.0.1";
|
|
19340
|
+
const version$1 = "6.1.0";
|
|
20196
19341
|
function configureAddons(opts) {
|
|
20197
19342
|
const addons = [];
|
|
20198
19343
|
if (Array.isArray(opts.addons)) addons.push(...opts.addons);
|
|
@@ -20225,7 +19370,7 @@ async function detectImportsRegex(code, ctx, options) {
|
|
|
20225
19370
|
const occurrenceMap = /* @__PURE__ */ new Map();
|
|
20226
19371
|
const map = await ctx.getImportMap();
|
|
20227
19372
|
if (options?.autoImport !== false) {
|
|
20228
|
-
Array.from(strippedCode.matchAll(
|
|
19373
|
+
Array.from(strippedCode.matchAll(RE_MATCH)).forEach((i) => {
|
|
20229
19374
|
if (i[1] === ".") return null;
|
|
20230
19375
|
const end = strippedCode[i.index + i[0].length];
|
|
20231
19376
|
const before = strippedCode[i.index - 1];
|
|
@@ -20234,10 +19379,10 @@ async function detectImportsRegex(code, ctx, options) {
|
|
|
20234
19379
|
const occurrence = i.index + i[1].length;
|
|
20235
19380
|
if (occurrenceMap.get(name) || Number.POSITIVE_INFINITY > occurrence) occurrenceMap.set(name, occurrence);
|
|
20236
19381
|
});
|
|
20237
|
-
for (const regex of
|
|
20238
|
-
const segments = [...match[1]?.split(
|
|
19382
|
+
for (const regex of RE_EXCLUDE) for (const match of strippedCode.matchAll(regex)) {
|
|
19383
|
+
const segments = [...match[1]?.split(RE_SEPARATOR) || [], ...match[2]?.split(RE_SEPARATOR) || []];
|
|
20239
19384
|
for (const segment of segments) {
|
|
20240
|
-
const identifier = segment.replace(
|
|
19385
|
+
const identifier = segment.replace(RE_IMPORT_AS, "").trim();
|
|
20241
19386
|
occurrenceMap.delete(identifier);
|
|
20242
19387
|
}
|
|
20243
19388
|
}
|
|
@@ -20355,8 +19500,12 @@ const FileExtensionLookup = [
|
|
|
20355
19500
|
"jsx"
|
|
20356
19501
|
];
|
|
20357
19502
|
const FileLookupPatterns = `*.{${FileExtensionLookup.join(",")}}`;
|
|
19503
|
+
const RE_EXCLAMATION_PREFIX = /^!/;
|
|
19504
|
+
const RE_FILE_EXT = /\.\w+$/;
|
|
19505
|
+
const RE_NAME_SEPARATOR = /[-_.]/;
|
|
19506
|
+
const RE_DTS_EXT = /\.d\.[mc]?ts$/;
|
|
20358
19507
|
function resolveGlobsExclude(glob2, cwd) {
|
|
20359
|
-
return `${glob2.startsWith("!") ? "!" : ""}${resolve$3(cwd, glob2.replace(
|
|
19508
|
+
return `${glob2.startsWith("!") ? "!" : ""}${resolve$3(cwd, glob2.replace(RE_EXCLAMATION_PREFIX, ""))}`;
|
|
20360
19509
|
}
|
|
20361
19510
|
function joinGlobFilePattern(glob2, filePattern) {
|
|
20362
19511
|
return join$2(basename$2(glob2) === "*" ? dirname$2(glob2) : glob2, filePattern);
|
|
@@ -20369,7 +19518,7 @@ function normalizeScanDirs(dirs, options) {
|
|
|
20369
19518
|
const isString = typeof dir === "string";
|
|
20370
19519
|
const glob2 = resolveGlobsExclude(isString ? dir : dir.glob, cwd);
|
|
20371
19520
|
const types = isString ? topLevelTypes : dir.types ?? topLevelTypes;
|
|
20372
|
-
if (
|
|
19521
|
+
if (RE_FILE_EXT.test(glob2)) return {
|
|
20373
19522
|
glob: glob2,
|
|
20374
19523
|
types
|
|
20375
19524
|
};
|
|
@@ -20412,7 +19561,7 @@ function dedupeDtsExports(exports) {
|
|
|
20412
19561
|
return exports.filter((i) => {
|
|
20413
19562
|
if (!i.type) return true;
|
|
20414
19563
|
if (i.declarationType === "enum" || i.declarationType === "const enum" || i.declarationType === "class") return true;
|
|
20415
|
-
return !exports.
|
|
19564
|
+
return !exports.some((e) => e.as === i.as && e.name === i.name && !e.type);
|
|
20416
19565
|
});
|
|
20417
19566
|
}
|
|
20418
19567
|
async function scanExports(filepath, includeTypes, seen = /* @__PURE__ */ new Set()) {
|
|
@@ -20427,7 +19576,7 @@ async function scanExports(filepath, includeTypes, seen = /* @__PURE__ */ new Se
|
|
|
20427
19576
|
if (exports.find((i) => i.type === "default")) {
|
|
20428
19577
|
let name = parse$1(filepath).name;
|
|
20429
19578
|
if (name === "index") name = parse$1(filepath.split("/").slice(0, -1).join("/")).name;
|
|
20430
|
-
const as =
|
|
19579
|
+
const as = RE_NAME_SEPARATOR.test(name) ? camelCase(name) : name;
|
|
20431
19580
|
imports.push({
|
|
20432
19581
|
name: "default",
|
|
20433
19582
|
as,
|
|
@@ -20492,7 +19641,7 @@ async function scanExports(filepath, includeTypes, seen = /* @__PURE__ */ new Se
|
|
|
20492
19641
|
})) : nested);
|
|
20493
19642
|
}
|
|
20494
19643
|
}
|
|
20495
|
-
if (filepath.match(
|
|
19644
|
+
if (filepath.match(RE_DTS_EXT)) {
|
|
20496
19645
|
if (includeTypes) {
|
|
20497
19646
|
await toImport(exports, { type: true });
|
|
20498
19647
|
await toImport(findTypeExports(code), { type: true });
|
|
@@ -21291,27 +20440,13 @@ const vueuseCore = () => {
|
|
|
21291
20440
|
}
|
|
21292
20441
|
return _cache;
|
|
21293
20442
|
};
|
|
21294
|
-
const vueuseHead = defineUnimportPreset({
|
|
21295
|
-
from: "@vueuse/head",
|
|
21296
|
-
imports: ["useHead"]
|
|
21297
|
-
});
|
|
21298
|
-
const vuex = defineUnimportPreset({
|
|
21299
|
-
from: "vuex",
|
|
21300
|
-
imports: [
|
|
21301
|
-
"createStore",
|
|
21302
|
-
"createLogger",
|
|
21303
|
-
"mapState",
|
|
21304
|
-
"mapGetters",
|
|
21305
|
-
"mapActions",
|
|
21306
|
-
"mapMutations",
|
|
21307
|
-
"createNamespacedHelpers",
|
|
21308
|
-
"useStore"
|
|
21309
|
-
]
|
|
21310
|
-
});
|
|
21311
20443
|
const builtinPresets = {
|
|
21312
20444
|
"@vue/composition-api": vueCompositionApi,
|
|
21313
20445
|
"@vueuse/core": vueuseCore,
|
|
21314
|
-
"@vueuse/head":
|
|
20446
|
+
"@vueuse/head": defineUnimportPreset({
|
|
20447
|
+
from: "@vueuse/head",
|
|
20448
|
+
imports: ["useHead"]
|
|
20449
|
+
}),
|
|
21315
20450
|
"pinia": pinia,
|
|
21316
20451
|
"preact": preact,
|
|
21317
20452
|
"quasar": quasar,
|
|
@@ -21332,7 +20467,19 @@ const builtinPresets = {
|
|
|
21332
20467
|
"vue-router-composables": vueRouterComposables,
|
|
21333
20468
|
"vue": vue,
|
|
21334
20469
|
"vue/macros": vueMacros,
|
|
21335
|
-
"vuex":
|
|
20470
|
+
"vuex": defineUnimportPreset({
|
|
20471
|
+
from: "vuex",
|
|
20472
|
+
imports: [
|
|
20473
|
+
"createStore",
|
|
20474
|
+
"createLogger",
|
|
20475
|
+
"mapState",
|
|
20476
|
+
"mapGetters",
|
|
20477
|
+
"mapActions",
|
|
20478
|
+
"mapMutations",
|
|
20479
|
+
"createNamespacedHelpers",
|
|
20480
|
+
"useStore"
|
|
20481
|
+
]
|
|
20482
|
+
}),
|
|
21336
20483
|
"vitest": vitest,
|
|
21337
20484
|
"uni-app": uniApp,
|
|
21338
20485
|
"solid-js": solid,
|
|
@@ -21455,14 +20602,18 @@ function createInternalContext(opts) {
|
|
|
21455
20602
|
opts.commentsDisable = opts.commentsDisable ?? ["@unimport-disable", "@imports-disable"];
|
|
21456
20603
|
opts.commentsDebug = opts.commentsDebug ?? ["@unimport-debug", "@imports-debug"];
|
|
21457
20604
|
let metadata;
|
|
21458
|
-
if (opts.collectMeta)
|
|
21459
|
-
injectionsUsageMap: /* @__PURE__ */ new Map()
|
|
21460
|
-
|
|
21461
|
-
|
|
21462
|
-
|
|
21463
|
-
|
|
21464
|
-
|
|
21465
|
-
|
|
20605
|
+
if (opts.collectMeta) {
|
|
20606
|
+
metadata = { injectionsUsageMap: /* @__PURE__ */ new Map() };
|
|
20607
|
+
Object.defineProperty(metadata, "injectionUsage", {
|
|
20608
|
+
enumerable: false,
|
|
20609
|
+
configurable: true,
|
|
20610
|
+
get() {
|
|
20611
|
+
const stack = (/* @__PURE__ */ new Error()).stack;
|
|
20612
|
+
console.warn("[unimport] `injectionUsage` is deprecated, use `injectionsUsageMap` instead", stack);
|
|
20613
|
+
return Object.fromEntries(this.injectionsUsageMap);
|
|
20614
|
+
}
|
|
20615
|
+
});
|
|
20616
|
+
}
|
|
21466
20617
|
let resolvePromise;
|
|
21467
20618
|
const ctx = {
|
|
21468
20619
|
version: version$1,
|
|
@@ -21557,14 +20708,10 @@ async function resolveImports(ctx, imports, id) {
|
|
|
21557
20708
|
};
|
|
21558
20709
|
}))).filter(Boolean);
|
|
21559
20710
|
}
|
|
21560
|
-
//#endregion
|
|
21561
|
-
//#region node_modules/.pnpm/unimport@6.0.1/node_modules/unimport/dist/index.mjs
|
|
21562
20711
|
var dist_exports = /* @__PURE__ */ __exportAll({
|
|
21563
20712
|
createUnimport: () => createUnimport,
|
|
21564
20713
|
version: () => version$1
|
|
21565
20714
|
});
|
|
21566
|
-
//#endregion
|
|
21567
|
-
//#region src/build/types.ts
|
|
21568
20715
|
async function writeTypes(nitro) {
|
|
21569
20716
|
const types = { routes: {} };
|
|
21570
20717
|
const generatedTypesDir = resolve$3(nitro.options.rootDir, nitro.options.typescript.generatedTypesDir || "node_modules/.nitro/types");
|
|
@@ -21643,7 +20790,11 @@ async function writeTypes(nitro) {
|
|
|
21643
20790
|
const config = [
|
|
21644
20791
|
"// Generated by nitro",
|
|
21645
20792
|
`declare module "nitro/types" {`,
|
|
21646
|
-
nitro.options.typescript.generateRuntimeConfigTypes ? generateTypes(await resolveSchema(Object.fromEntries(Object.entries(nitro.options.runtimeConfig).filter(([key]) => ![
|
|
20793
|
+
nitro.options.typescript.generateRuntimeConfigTypes ? generateTypes(await resolveSchema(Object.fromEntries(Object.entries(nitro.options.runtimeConfig).filter(([key]) => ![
|
|
20794
|
+
"app",
|
|
20795
|
+
"nitro",
|
|
20796
|
+
"wrangler"
|
|
20797
|
+
].includes(key)))), {
|
|
21647
20798
|
interfaceName: "NitroRuntimeConfig",
|
|
21648
20799
|
addExport: false,
|
|
21649
20800
|
addDefaults: false,
|
|
@@ -21731,8 +20882,6 @@ function relativeWithDot(from, to) {
|
|
|
21731
20882
|
const rel = relative$2(from, to);
|
|
21732
20883
|
return RELATIVE_RE.test(rel) ? rel : "./" + rel;
|
|
21733
20884
|
}
|
|
21734
|
-
//#endregion
|
|
21735
|
-
//#region src/presets/_types.gen.ts
|
|
21736
20885
|
const presetsWithConfig = [
|
|
21737
20886
|
"awsAmplify",
|
|
21738
20887
|
"awsLambda",
|
|
@@ -21743,8 +20892,6 @@ const presetsWithConfig = [
|
|
|
21743
20892
|
"vercel",
|
|
21744
20893
|
"zephyr"
|
|
21745
20894
|
];
|
|
21746
|
-
//#endregion
|
|
21747
|
-
//#region src/build/info.ts
|
|
21748
20895
|
const NITRO_WELLKNOWN_DIR = "node_modules/.nitro";
|
|
21749
20896
|
async function getBuildInfo(root) {
|
|
21750
20897
|
const outputDir = await findLastBuildDir(root);
|
|
@@ -21794,8 +20941,6 @@ async function writeDevBuildInfo(nitro, addr) {
|
|
|
21794
20941
|
};
|
|
21795
20942
|
await writeFile$1(buildInfoPath, JSON.stringify(buildInfo, null, 2));
|
|
21796
20943
|
}
|
|
21797
|
-
//#endregion
|
|
21798
|
-
//#region src/utils/parallel.ts
|
|
21799
20944
|
async function runParallel(inputs, cb, opts) {
|
|
21800
20945
|
const errors = [];
|
|
21801
20946
|
const tasks = /* @__PURE__ */ new Set();
|
|
@@ -21820,8 +20965,6 @@ async function runParallel(inputs, cb, opts) {
|
|
|
21820
20965
|
await refillQueue();
|
|
21821
20966
|
return { errors };
|
|
21822
20967
|
}
|
|
21823
|
-
//#endregion
|
|
21824
|
-
//#region src/utils/regex.ts
|
|
21825
20968
|
function escapeRegExp$1(string) {
|
|
21826
20969
|
return string.replace(/[-\\^$*+?.()|[\]{}]/g, String.raw`\$&`);
|
|
21827
20970
|
}
|
|
@@ -21836,8 +20979,6 @@ function toPathRegExp(input) {
|
|
|
21836
20979
|
if (typeof input === "string") return new RegExp(pathRegExp(input));
|
|
21837
20980
|
throw new TypeError("Expected a string or RegExp", { cause: input });
|
|
21838
20981
|
}
|
|
21839
|
-
//#endregion
|
|
21840
|
-
//#region src/build/config.ts
|
|
21841
20982
|
function baseBuildConfig(nitro) {
|
|
21842
20983
|
const extensions = [
|
|
21843
20984
|
".ts",
|
|
@@ -21910,8 +21051,6 @@ function resolveAliases(_aliases) {
|
|
|
21910
21051
|
}
|
|
21911
21052
|
return aliases;
|
|
21912
21053
|
}
|
|
21913
|
-
//#endregion
|
|
21914
|
-
//#region src/build/chunks.ts
|
|
21915
21054
|
const virtualRe = /^(?:\0|#|virtual:)/;
|
|
21916
21055
|
const NODE_MODULES_RE$1 = /node_modules[/\\](?!(?:nitro|nitro-nightly)[/\\])[^.]/;
|
|
21917
21056
|
function libChunkName(id) {
|
|
@@ -21954,8 +21093,6 @@ function joinPkgNames(moduleIds) {
|
|
|
21954
21093
|
function routeToFsPath(route) {
|
|
21955
21094
|
return route.split("/").slice(1).map((s) => s.replace(/:(\w+)/g, "[$1]").replace(/\*+/g, "[...]").replace(/[^a-zA-Z0-9_.[\]]/g, "_")).join("/") || "index";
|
|
21956
21095
|
}
|
|
21957
|
-
//#endregion
|
|
21958
|
-
//#region src/build/virtual/database.ts
|
|
21959
21096
|
function database(nitro) {
|
|
21960
21097
|
return {
|
|
21961
21098
|
id: "#nitro/virtual/database",
|
|
@@ -21977,8 +21114,6 @@ export const connectionConfigs = {
|
|
|
21977
21114
|
}
|
|
21978
21115
|
};
|
|
21979
21116
|
}
|
|
21980
|
-
//#endregion
|
|
21981
|
-
//#region src/build/virtual/error-handler.ts
|
|
21982
21117
|
function errorHandler(nitro) {
|
|
21983
21118
|
return {
|
|
21984
21119
|
id: "#nitro/virtual/error-handler",
|
|
@@ -22010,8 +21145,6 @@ export default async function(error, event) {
|
|
|
22010
21145
|
}
|
|
22011
21146
|
};
|
|
22012
21147
|
}
|
|
22013
|
-
//#endregion
|
|
22014
|
-
//#region src/build/virtual/feature-flags.ts
|
|
22015
21148
|
function featureFlags(nitro) {
|
|
22016
21149
|
return {
|
|
22017
21150
|
id: "#nitro/virtual/feature-flags",
|
|
@@ -22028,8 +21161,6 @@ function featureFlags(nitro) {
|
|
|
22028
21161
|
}
|
|
22029
21162
|
};
|
|
22030
21163
|
}
|
|
22031
|
-
//#endregion
|
|
22032
|
-
//#region src/build/virtual/plugins.ts
|
|
22033
21164
|
function plugins(nitro) {
|
|
22034
21165
|
return {
|
|
22035
21166
|
id: "#nitro/virtual/plugins",
|
|
@@ -22045,8 +21176,6 @@ function plugins(nitro) {
|
|
|
22045
21176
|
}
|
|
22046
21177
|
};
|
|
22047
21178
|
}
|
|
22048
|
-
//#endregion
|
|
22049
|
-
//#region src/build/virtual/polyfills.ts
|
|
22050
21179
|
function polyfills(_nitro, polyfills) {
|
|
22051
21180
|
return {
|
|
22052
21181
|
id: "#nitro/virtual/polyfills",
|
|
@@ -22056,46 +21185,16 @@ function polyfills(_nitro, polyfills) {
|
|
|
22056
21185
|
}
|
|
22057
21186
|
};
|
|
22058
21187
|
}
|
|
22059
|
-
//#endregion
|
|
22060
|
-
//#region src/build/virtual/public-assets.ts
|
|
22061
21188
|
var import_etag = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
22062
|
-
/**
|
|
22063
|
-
* Module exports.
|
|
22064
|
-
* @public
|
|
22065
|
-
*/
|
|
22066
21189
|
module.exports = etag;
|
|
22067
|
-
/**
|
|
22068
|
-
* Module dependencies.
|
|
22069
|
-
* @private
|
|
22070
|
-
*/
|
|
22071
21190
|
var crypto = __require$1("crypto");
|
|
22072
21191
|
var Stats$1 = __require$1("fs").Stats;
|
|
22073
|
-
/**
|
|
22074
|
-
* Module variables.
|
|
22075
|
-
* @private
|
|
22076
|
-
*/
|
|
22077
21192
|
var toString = Object.prototype.toString;
|
|
22078
|
-
/**
|
|
22079
|
-
* Generate an entity tag.
|
|
22080
|
-
*
|
|
22081
|
-
* @param {Buffer|string} entity
|
|
22082
|
-
* @return {string}
|
|
22083
|
-
* @private
|
|
22084
|
-
*/
|
|
22085
21193
|
function entitytag(entity) {
|
|
22086
21194
|
if (entity.length === 0) return "\"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk\"";
|
|
22087
21195
|
var hash = crypto.createHash("sha1").update(entity, "utf8").digest("base64").substring(0, 27);
|
|
22088
21196
|
return "\"" + (typeof entity === "string" ? Buffer.byteLength(entity, "utf8") : entity.length).toString(16) + "-" + hash + "\"";
|
|
22089
21197
|
}
|
|
22090
|
-
/**
|
|
22091
|
-
* Create a simple ETag.
|
|
22092
|
-
*
|
|
22093
|
-
* @param {string|Buffer|Stats} entity
|
|
22094
|
-
* @param {object} [options]
|
|
22095
|
-
* @param {boolean} [options.weak]
|
|
22096
|
-
* @return {String}
|
|
22097
|
-
* @public
|
|
22098
|
-
*/
|
|
22099
21198
|
function etag(entity, options) {
|
|
22100
21199
|
if (entity == null) throw new TypeError("argument entity is required");
|
|
22101
21200
|
var isStats = isstats(entity);
|
|
@@ -22104,24 +21203,10 @@ var import_etag = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin(((exp
|
|
|
22104
21203
|
var tag = isStats ? stattag(entity) : entitytag(entity);
|
|
22105
21204
|
return weak ? "W/" + tag : tag;
|
|
22106
21205
|
}
|
|
22107
|
-
/**
|
|
22108
|
-
* Determine if object is a Stats object.
|
|
22109
|
-
*
|
|
22110
|
-
* @param {object} obj
|
|
22111
|
-
* @return {boolean}
|
|
22112
|
-
* @api private
|
|
22113
|
-
*/
|
|
22114
21206
|
function isstats(obj) {
|
|
22115
21207
|
if (typeof Stats$1 === "function" && obj instanceof Stats$1) return true;
|
|
22116
21208
|
return obj && typeof obj === "object" && "ctime" in obj && toString.call(obj.ctime) === "[object Date]" && "mtime" in obj && toString.call(obj.mtime) === "[object Date]" && "ino" in obj && typeof obj.ino === "number" && "size" in obj && typeof obj.size === "number";
|
|
22117
21209
|
}
|
|
22118
|
-
/**
|
|
22119
|
-
* Generate a tag for a stat.
|
|
22120
|
-
*
|
|
22121
|
-
* @param {object} stat
|
|
22122
|
-
* @return {string}
|
|
22123
|
-
* @private
|
|
22124
|
-
*/
|
|
22125
21210
|
function stattag(stat) {
|
|
22126
21211
|
var mtime = stat.mtime.getTime().toString(16);
|
|
22127
21212
|
return "\"" + stat.size.toString(16) + "-" + mtime + "\"";
|
|
@@ -22253,8 +21338,6 @@ export function readAsset (id) {
|
|
|
22253
21338
|
}
|
|
22254
21339
|
];
|
|
22255
21340
|
}
|
|
22256
|
-
//#endregion
|
|
22257
|
-
//#region src/build/virtual/renderer-template.ts
|
|
22258
21341
|
function rendererTemplate(nitro) {
|
|
22259
21342
|
return {
|
|
22260
21343
|
id: "#nitro/virtual/renderer-template",
|
|
@@ -22286,17 +21369,15 @@ function rendererTemplate(nitro) {
|
|
|
22286
21369
|
}
|
|
22287
21370
|
};
|
|
22288
21371
|
}
|
|
22289
|
-
//#endregion
|
|
22290
|
-
//#region src/build/virtual/routing-meta.ts
|
|
22291
21372
|
function routingMeta(nitro) {
|
|
22292
21373
|
return {
|
|
22293
21374
|
id: "#nitro/virtual/routing-meta",
|
|
22294
21375
|
template: () => {
|
|
22295
|
-
const
|
|
21376
|
+
const handlers = Object.values(nitro.routing.routes.routes).flatMap((h) => h.data);
|
|
22296
21377
|
return `
|
|
22297
|
-
${
|
|
21378
|
+
${uniqueBy$1(handlers, "_importHash").map((h) => `import ${h._importHash}Meta from "${h.handler}?meta";`).join("\n")}
|
|
22298
21379
|
export const handlersMeta = [
|
|
22299
|
-
${
|
|
21380
|
+
${handlers.map((h) => `{ route: ${JSON.stringify(h.route)}, method: ${JSON.stringify(h.method?.toLowerCase())}, meta: ${h._importHash}Meta }`).join(",\n")}
|
|
22300
21381
|
];
|
|
22301
21382
|
`.trim();
|
|
22302
21383
|
}
|
|
@@ -22305,8 +21386,6 @@ export const handlersMeta = [
|
|
|
22305
21386
|
function uniqueBy$1(arr, key) {
|
|
22306
21387
|
return [...new Map(arr.map((item) => [item[key], item])).values()];
|
|
22307
21388
|
}
|
|
22308
|
-
//#endregion
|
|
22309
|
-
//#region src/build/virtual/routing.ts
|
|
22310
21389
|
const RuntimeRouteRules = [
|
|
22311
21390
|
"headers",
|
|
22312
21391
|
"redirect",
|
|
@@ -22388,8 +21467,6 @@ function serializeRouteRule(h) {
|
|
|
22388
21467
|
].filter(Boolean).join(",")}}`;
|
|
22389
21468
|
}).join(",")}]`;
|
|
22390
21469
|
}
|
|
22391
|
-
//#endregion
|
|
22392
|
-
//#region src/build/virtual/runtime-config.ts
|
|
22393
21470
|
function runtimeConfig(nitro) {
|
|
22394
21471
|
return {
|
|
22395
21472
|
id: "#nitro/virtual/runtime-config",
|
|
@@ -22398,8 +21475,6 @@ function runtimeConfig(nitro) {
|
|
|
22398
21475
|
}
|
|
22399
21476
|
};
|
|
22400
21477
|
}
|
|
22401
|
-
//#endregion
|
|
22402
|
-
//#region src/build/virtual/server-assets.ts
|
|
22403
21478
|
function serverAssets(nitro) {
|
|
22404
21479
|
return {
|
|
22405
21480
|
id: "#nitro/virtual/server-assets",
|
|
@@ -22463,8 +21538,6 @@ export const assets = {
|
|
|
22463
21538
|
}
|
|
22464
21539
|
};
|
|
22465
21540
|
}
|
|
22466
|
-
//#endregion
|
|
22467
|
-
//#region src/build/virtual/storage.ts
|
|
22468
21541
|
function storage(nitro) {
|
|
22469
21542
|
return {
|
|
22470
21543
|
id: "#nitro/virtual/storage",
|
|
@@ -22498,8 +21571,6 @@ export function initStorage() {
|
|
|
22498
21571
|
}
|
|
22499
21572
|
};
|
|
22500
21573
|
}
|
|
22501
|
-
//#endregion
|
|
22502
|
-
//#region src/build/virtual/tasks.ts
|
|
22503
21574
|
function tasks(nitro) {
|
|
22504
21575
|
return {
|
|
22505
21576
|
id: "#nitro/virtual/tasks",
|
|
@@ -22531,8 +21602,28 @@ export const tasks = {
|
|
|
22531
21602
|
}
|
|
22532
21603
|
};
|
|
22533
21604
|
}
|
|
22534
|
-
|
|
22535
|
-
|
|
21605
|
+
function tracing(nitro) {
|
|
21606
|
+
return {
|
|
21607
|
+
id: "#nitro/virtual/tracing",
|
|
21608
|
+
template: () => {
|
|
21609
|
+
const { srvx, h3 } = nitro.options.tracingChannel || {};
|
|
21610
|
+
const imports = [];
|
|
21611
|
+
const setup = [];
|
|
21612
|
+
if (srvx) imports.push(`import { tracingPlugin as srvxTracing } from "srvx/tracing";`);
|
|
21613
|
+
if (h3) {
|
|
21614
|
+
imports.push(`import { tracingPlugin as h3Tracing } from "h3/tracing";`);
|
|
21615
|
+
setup.push(` h3Tracing()(nitroApp.h3);`);
|
|
21616
|
+
}
|
|
21617
|
+
return [
|
|
21618
|
+
...imports,
|
|
21619
|
+
`export const tracingSrvxPlugins = [${srvx ? "srvxTracing()" : ""}];`,
|
|
21620
|
+
`export default function tracing(nitroApp) {`,
|
|
21621
|
+
...setup,
|
|
21622
|
+
`};`
|
|
21623
|
+
].join("\n");
|
|
21624
|
+
}
|
|
21625
|
+
};
|
|
21626
|
+
}
|
|
22536
21627
|
function virtualTemplates(nitro, _polyfills) {
|
|
22537
21628
|
const nitroTemplates = [
|
|
22538
21629
|
database,
|
|
@@ -22547,7 +21638,8 @@ function virtualTemplates(nitro, _polyfills) {
|
|
|
22547
21638
|
runtimeConfig,
|
|
22548
21639
|
serverAssets,
|
|
22549
21640
|
storage,
|
|
22550
|
-
tasks
|
|
21641
|
+
tasks,
|
|
21642
|
+
tracing
|
|
22551
21643
|
].flatMap((t) => t(nitro, _polyfills));
|
|
22552
21644
|
const customTemplates = Object.entries(nitro.options.virtual).map(([id, template]) => ({
|
|
22553
21645
|
id,
|
|
@@ -22555,81 +21647,32 @@ function virtualTemplates(nitro, _polyfills) {
|
|
|
22555
21647
|
}));
|
|
22556
21648
|
return [...nitroTemplates, ...customTemplates];
|
|
22557
21649
|
}
|
|
22558
|
-
//#endregion
|
|
22559
|
-
//#region node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/esm/estree-walker.js
|
|
22560
|
-
/** @typedef { import('estree').BaseNode} BaseNode */
|
|
22561
|
-
/** @typedef {{
|
|
22562
|
-
skip: () => void;
|
|
22563
|
-
remove: () => void;
|
|
22564
|
-
replace: (node: BaseNode) => void;
|
|
22565
|
-
}} WalkerContext */
|
|
22566
21650
|
var WalkerBase = class {
|
|
22567
21651
|
constructor() {
|
|
22568
|
-
/** @type {boolean} */
|
|
22569
21652
|
this.should_skip = false;
|
|
22570
|
-
/** @type {boolean} */
|
|
22571
21653
|
this.should_remove = false;
|
|
22572
|
-
/** @type {BaseNode | null} */
|
|
22573
21654
|
this.replacement = null;
|
|
22574
|
-
/** @type {WalkerContext} */
|
|
22575
21655
|
this.context = {
|
|
22576
21656
|
skip: () => this.should_skip = true,
|
|
22577
21657
|
remove: () => this.should_remove = true,
|
|
22578
21658
|
replace: (node) => this.replacement = node
|
|
22579
21659
|
};
|
|
22580
21660
|
}
|
|
22581
|
-
/**
|
|
22582
|
-
*
|
|
22583
|
-
* @param {any} parent
|
|
22584
|
-
* @param {string} prop
|
|
22585
|
-
* @param {number} index
|
|
22586
|
-
* @param {BaseNode} node
|
|
22587
|
-
*/
|
|
22588
21661
|
replace(parent, prop, index, node) {
|
|
22589
21662
|
if (parent) if (index !== null) parent[prop][index] = node;
|
|
22590
21663
|
else parent[prop] = node;
|
|
22591
21664
|
}
|
|
22592
|
-
/**
|
|
22593
|
-
*
|
|
22594
|
-
* @param {any} parent
|
|
22595
|
-
* @param {string} prop
|
|
22596
|
-
* @param {number} index
|
|
22597
|
-
*/
|
|
22598
21665
|
remove(parent, prop, index) {
|
|
22599
21666
|
if (parent) if (index !== null) parent[prop].splice(index, 1);
|
|
22600
21667
|
else delete parent[prop];
|
|
22601
21668
|
}
|
|
22602
21669
|
};
|
|
22603
|
-
/** @typedef { import('estree').BaseNode} BaseNode */
|
|
22604
|
-
/** @typedef { import('./walker.js').WalkerContext} WalkerContext */
|
|
22605
|
-
/** @typedef {(
|
|
22606
|
-
* this: WalkerContext,
|
|
22607
|
-
* node: BaseNode,
|
|
22608
|
-
* parent: BaseNode,
|
|
22609
|
-
* key: string,
|
|
22610
|
-
* index: number
|
|
22611
|
-
* ) => void} SyncHandler */
|
|
22612
21670
|
var SyncWalker = class extends WalkerBase {
|
|
22613
|
-
/**
|
|
22614
|
-
*
|
|
22615
|
-
* @param {SyncHandler} enter
|
|
22616
|
-
* @param {SyncHandler} leave
|
|
22617
|
-
*/
|
|
22618
21671
|
constructor(enter, leave) {
|
|
22619
21672
|
super();
|
|
22620
|
-
/** @type {SyncHandler} */
|
|
22621
21673
|
this.enter = enter;
|
|
22622
|
-
/** @type {SyncHandler} */
|
|
22623
21674
|
this.leave = leave;
|
|
22624
21675
|
}
|
|
22625
|
-
/**
|
|
22626
|
-
*
|
|
22627
|
-
* @param {BaseNode} node
|
|
22628
|
-
* @param {BaseNode} parent
|
|
22629
|
-
* @param {string} [prop]
|
|
22630
|
-
* @param {number} [index]
|
|
22631
|
-
* @returns {BaseNode}
|
|
22632
|
-
*/
|
|
22633
21676
|
visit(node, parent, prop, index) {
|
|
22634
21677
|
if (node) {
|
|
22635
21678
|
if (this.enter) {
|
|
@@ -22682,23 +21725,9 @@ var SyncWalker = class extends WalkerBase {
|
|
|
22682
21725
|
return node;
|
|
22683
21726
|
}
|
|
22684
21727
|
};
|
|
22685
|
-
/** @typedef { import('estree').BaseNode} BaseNode */
|
|
22686
|
-
/** @typedef { import('./sync.js').SyncHandler} SyncHandler */
|
|
22687
|
-
/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */
|
|
22688
|
-
/**
|
|
22689
|
-
*
|
|
22690
|
-
* @param {BaseNode} ast
|
|
22691
|
-
* @param {{
|
|
22692
|
-
* enter?: SyncHandler
|
|
22693
|
-
* leave?: SyncHandler
|
|
22694
|
-
* }} walker
|
|
22695
|
-
* @returns {BaseNode}
|
|
22696
|
-
*/
|
|
22697
21728
|
function walk(ast, { enter, leave }) {
|
|
22698
21729
|
return new SyncWalker(enter, leave).visit(ast, null);
|
|
22699
21730
|
}
|
|
22700
|
-
//#endregion
|
|
22701
|
-
//#region node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.59.0/node_modules/@rollup/pluginutils/dist/es/index.js
|
|
22702
21731
|
const extractors = {
|
|
22703
21732
|
ArrayPattern(names, param) {
|
|
22704
21733
|
for (const element of param.elements) if (element) extractors[element.type](names, element);
|
|
@@ -22930,8 +21959,6 @@ const dataToEsm = function dataToEsm(data, options = {}) {
|
|
|
22930
21959
|
const defaultExportCode = `export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`;
|
|
22931
21960
|
return `${namedExportCode}${arbitraryExportCode}${defaultExportCode}`;
|
|
22932
21961
|
};
|
|
22933
|
-
//#endregion
|
|
22934
|
-
//#region node_modules/.pnpm/@rollup+plugin-replace@6.0.3_rollup@4.59.0/node_modules/@rollup/plugin-replace/dist/es/index.js
|
|
22935
21962
|
function escape(str) {
|
|
22936
21963
|
return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
|
|
22937
21964
|
}
|
|
@@ -23029,8 +22056,6 @@ function replace(options) {
|
|
|
23029
22056
|
return options.sourceMap !== false && options.sourcemap !== false;
|
|
23030
22057
|
}
|
|
23031
22058
|
}
|
|
23032
|
-
//#endregion
|
|
23033
|
-
//#region node_modules/.pnpm/unwasm@0.5.3/node_modules/unwasm/dist/plugin/index.mjs
|
|
23034
22059
|
var __create = Object.create;
|
|
23035
22060
|
var __defProp = Object.defineProperty;
|
|
23036
22061
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -28625,7 +27650,6 @@ async function getWasmESMBinding(asset, opts) {
|
|
|
28625
27650
|
const instantiateCode = opts.esmImport ? getESMImportInstantiate(asset, autoImports.code) : getBase64Instantiate(asset, autoImports.code);
|
|
28626
27651
|
return opts.lazy !== true && autoImports.resolved ? getExports(asset, instantiateCode) : getLazyExports(asset, instantiateCode);
|
|
28627
27652
|
}
|
|
28628
|
-
/** Generate WebAssembly.Module binding for compatibility */
|
|
28629
27653
|
function getWasmModuleBinding(asset, opts) {
|
|
28630
27654
|
return opts.esmImport ? `
|
|
28631
27655
|
const _mod = ${opts.lazy === true ? "" : `await`} import("${UNWASM_EXTERNAL_PREFIX}${asset.name}").then(r => r.default || r);
|
|
@@ -28637,7 +27661,6 @@ const _mod = new WebAssembly.Module(_data);
|
|
|
28637
27661
|
export default _mod;
|
|
28638
27662
|
`;
|
|
28639
27663
|
}
|
|
28640
|
-
/** Get the code to instantiate module with direct import */
|
|
28641
27664
|
function getESMImportInstantiate(asset, importsCode) {
|
|
28642
27665
|
return `
|
|
28643
27666
|
${importsCode}
|
|
@@ -28648,7 +27671,6 @@ return WebAssembly.instantiate(_mod, imports)
|
|
|
28648
27671
|
}
|
|
28649
27672
|
`;
|
|
28650
27673
|
}
|
|
28651
|
-
/** Get the code to instantiate module from inlined base64 data */
|
|
28652
27674
|
function getBase64Instantiate(asset, importsCode) {
|
|
28653
27675
|
return `
|
|
28654
27676
|
import { base64ToUint8Array } from "${UMWASM_HELPERS_ID}";
|
|
@@ -28660,7 +27682,6 @@ function _instantiate(imports = _imports) {
|
|
|
28660
27682
|
return WebAssembly.instantiate(_data, imports) }
|
|
28661
27683
|
`;
|
|
28662
27684
|
}
|
|
28663
|
-
/** Get the exports code with top level await support */
|
|
28664
27685
|
function getExports(asset, instantiateCode) {
|
|
28665
27686
|
return `
|
|
28666
27687
|
import { getExports } from "${UMWASM_HELPERS_ID}";
|
|
@@ -28676,7 +27697,6 @@ ${asset.exports.map((name) => `defaultExport["${name}"] = $exports.${name};`).jo
|
|
|
28676
27697
|
export default defaultExport;
|
|
28677
27698
|
`;
|
|
28678
27699
|
}
|
|
28679
|
-
/** Proxied exports when imports are needed or we can't have top-level await */
|
|
28680
27700
|
function getLazyExports(asset, instantiateCode) {
|
|
28681
27701
|
return `
|
|
28682
27702
|
import { createLazyWasmModule } from "${UMWASM_HELPERS_ID}";
|
|
@@ -28914,11 +27934,9 @@ function unwasm(opts) {
|
|
|
28914
27934
|
}
|
|
28915
27935
|
};
|
|
28916
27936
|
}
|
|
28917
|
-
//#endregion
|
|
28918
|
-
//#region src/build/plugins/route-meta.ts
|
|
28919
27937
|
const PREFIX$1 = "\0nitro:route-meta:";
|
|
28920
27938
|
async function routeMeta(nitro) {
|
|
28921
|
-
const { transformSync } = await import("rolldown/
|
|
27939
|
+
const { transformSync } = await import("rolldown/utils");
|
|
28922
27940
|
return {
|
|
28923
27941
|
name: "nitro:route-meta",
|
|
28924
27942
|
resolveId: {
|
|
@@ -28946,7 +27964,7 @@ async function routeMeta(nitro) {
|
|
|
28946
27964
|
async handler(code, id) {
|
|
28947
27965
|
let meta = null;
|
|
28948
27966
|
try {
|
|
28949
|
-
const transformRes = transformSync(id, code);
|
|
27967
|
+
const transformRes = transformSync(id, code, { tsconfig: false });
|
|
28950
27968
|
if (transformRes.errors?.length > 0) {
|
|
28951
27969
|
for (const error of transformRes.errors) this.warn(error);
|
|
28952
27970
|
return {
|
|
@@ -28984,8 +28002,6 @@ function astToObject(node) {
|
|
|
28984
28002
|
case "Literal": return node.value;
|
|
28985
28003
|
}
|
|
28986
28004
|
}
|
|
28987
|
-
//#endregion
|
|
28988
|
-
//#region src/build/plugins/server-main.ts
|
|
28989
28005
|
function serverMain(nitro) {
|
|
28990
28006
|
return {
|
|
28991
28007
|
name: "nitro:server-main",
|
|
@@ -28997,8 +28013,6 @@ function serverMain(nitro) {
|
|
|
28997
28013
|
}
|
|
28998
28014
|
};
|
|
28999
28015
|
}
|
|
29000
|
-
//#endregion
|
|
29001
|
-
//#region src/build/plugins/virtual.ts
|
|
29002
28016
|
function virtual(input) {
|
|
29003
28017
|
const modules = /* @__PURE__ */ new Map();
|
|
29004
28018
|
for (const mod of input) {
|
|
@@ -29061,8 +28075,6 @@ function virtualDeps() {
|
|
|
29061
28075
|
}
|
|
29062
28076
|
};
|
|
29063
28077
|
}
|
|
29064
|
-
//#endregion
|
|
29065
|
-
//#region src/build/plugins/sourcemap-min.ts
|
|
29066
28078
|
function sourcemapMinify() {
|
|
29067
28079
|
return {
|
|
29068
28080
|
name: "nitro:sourcemap-minify",
|
|
@@ -29078,8 +28090,6 @@ function sourcemapMinify() {
|
|
|
29078
28090
|
}
|
|
29079
28091
|
};
|
|
29080
28092
|
}
|
|
29081
|
-
//#endregion
|
|
29082
|
-
//#region src/build/plugins/raw.ts
|
|
29083
28093
|
const HELPER_ID = "virtual:nitro-raw-helpers";
|
|
29084
28094
|
const RESOLVED_PREFIX = "virtual:nitro:raw:";
|
|
29085
28095
|
const PREFIX = "raw:";
|
|
@@ -29153,11 +28163,10 @@ function rawAssetMap(id) {
|
|
|
29153
28163
|
mappings: ""
|
|
29154
28164
|
};
|
|
29155
28165
|
}
|
|
29156
|
-
//#endregion
|
|
29157
|
-
//#region src/build/plugins/externals.ts
|
|
29158
28166
|
const PLUGIN_NAME = "nitro:externals";
|
|
29159
28167
|
function externals(opts) {
|
|
29160
|
-
const
|
|
28168
|
+
const resolved = opts.trace ? resolveTraceDeps(opts.include) : void 0;
|
|
28169
|
+
const include = resolved?.includePattern ? [resolved.includePattern] : void 0;
|
|
29161
28170
|
const exclude = [/^(?:[\0#~.]|[a-z0-9]{2,}:)|\?/, ...(opts?.exclude || []).map((p) => toPathRegExp(p))];
|
|
29162
28171
|
const filter = (id) => {
|
|
29163
28172
|
if (include && !include.some((r) => r.test(id))) return false;
|
|
@@ -29170,7 +28179,7 @@ function externals(opts) {
|
|
|
29170
28179
|
conditions: opts.conditions
|
|
29171
28180
|
});
|
|
29172
28181
|
const tracedPaths = /* @__PURE__ */ new Set();
|
|
29173
|
-
if (
|
|
28182
|
+
if (opts.trace && !resolved?.includePattern) return { name: PLUGIN_NAME };
|
|
29174
28183
|
return {
|
|
29175
28184
|
name: PLUGIN_NAME,
|
|
29176
28185
|
resolveId: {
|
|
@@ -29223,22 +28232,27 @@ function externals(opts) {
|
|
|
29223
28232
|
order: "post",
|
|
29224
28233
|
async handler() {
|
|
29225
28234
|
if (!opts.trace || tracedPaths.size === 0) return;
|
|
28235
|
+
const { hooks: userHooks, ...traceOpts } = opts.trace;
|
|
29226
28236
|
const { traceNodeModules } = await import("nf3");
|
|
29227
28237
|
const traceTime = Date.now();
|
|
29228
28238
|
let traceFilesCount = 0;
|
|
29229
28239
|
let tracedPkgsCount = 0;
|
|
29230
28240
|
await traceNodeModules([...tracedPaths], {
|
|
29231
|
-
...
|
|
28241
|
+
...traceOpts,
|
|
28242
|
+
fullTraceInclude: resolved?.fullTraceInclude,
|
|
29232
28243
|
conditions: opts.conditions,
|
|
29233
28244
|
rootDir: opts.rootDir,
|
|
29234
28245
|
writePackageJson: true,
|
|
29235
28246
|
hooks: {
|
|
29236
|
-
|
|
28247
|
+
...userHooks,
|
|
28248
|
+
tracedFiles: async (result) => {
|
|
29237
28249
|
traceFilesCount = Object.keys(result).length;
|
|
28250
|
+
await userHooks?.tracedFiles?.(result);
|
|
29238
28251
|
},
|
|
29239
|
-
tracedPackages: (pkgs) => {
|
|
28252
|
+
tracedPackages: async (pkgs) => {
|
|
29240
28253
|
tracedPkgsCount = Object.keys(pkgs).length;
|
|
29241
28254
|
consola.info(`Tracing dependencies:\n${Object.entries(pkgs).map(([name, versions]) => `- \`${name}\` (${Object.keys(versions.versions).join(", ")})`).join("\n")}`);
|
|
28255
|
+
await userHooks?.tracedPackages?.(pkgs);
|
|
29242
28256
|
}
|
|
29243
28257
|
}
|
|
29244
28258
|
});
|
|
@@ -29248,6 +28262,27 @@ function externals(opts) {
|
|
|
29248
28262
|
}
|
|
29249
28263
|
};
|
|
29250
28264
|
}
|
|
28265
|
+
function resolveTraceDeps(traceDeps, opts = {}) {
|
|
28266
|
+
const builtinPackages = opts.builtinPackages ?? [...NodeNativePackages, ...NonBundleablePackages];
|
|
28267
|
+
const builtinFullTrace = opts.builtinFullTrace ?? FullTracePackages;
|
|
28268
|
+
const negated = /* @__PURE__ */ new Set();
|
|
28269
|
+
const userTraceDeps = [];
|
|
28270
|
+
const userFullTrace = [];
|
|
28271
|
+
for (const d of traceDeps) if (typeof d !== "string") userTraceDeps.push(d);
|
|
28272
|
+
else if (d === "!" || d === "*" || d === "") throw new Error(`Invalid traceDeps selector: "${d}"`);
|
|
28273
|
+
else if (d.startsWith("!")) negated.add(d.slice(1));
|
|
28274
|
+
else if (d.endsWith("*")) {
|
|
28275
|
+
const name = d.slice(0, -1);
|
|
28276
|
+
userFullTrace.push(name);
|
|
28277
|
+
userTraceDeps.push(name);
|
|
28278
|
+
} else userTraceDeps.push(d);
|
|
28279
|
+
const tracePattern = [...new Set([...builtinPackages, ...userTraceDeps])].filter((d) => typeof d !== "string" || !negated.has(d)).map((d) => d instanceof RegExp ? d.source : escapeRegExp$1(d)).join("|");
|
|
28280
|
+
const fullTraceInclude = [...new Set([...builtinFullTrace, ...userFullTrace])].filter((d) => !negated.has(d));
|
|
28281
|
+
return {
|
|
28282
|
+
includePattern: tracePattern ? new RegExp(`(?:^|[/\\\\]node_modules[/\\\\])(?:${tracePattern})(?:[/\\\\]|$)`) : void 0,
|
|
28283
|
+
fullTraceInclude: fullTraceInclude.length > 0 ? fullTraceInclude : void 0
|
|
28284
|
+
};
|
|
28285
|
+
}
|
|
29251
28286
|
const NODE_MODULES_RE = /^(?<dir>.+[\\/]node_modules[\\/])(?<name>[^@\\/]+|@[^\\/]+[\\/][^\\/]+)(?:[\\/](?<subpath>.+))?$/;
|
|
29252
28287
|
const IMPORT_RE = /^(?!\.)(?<name>[^@/\\]+|@[^/\\]+[/\\][^/\\]+)(?:[/\\](?<subpath>.+))?$/;
|
|
29253
28288
|
function toImport(id) {
|
|
@@ -29294,8 +28329,6 @@ function flattenExports(exports = {}, parentSubpath = "./") {
|
|
|
29294
28329
|
return typeof value === "object" ? flattenExports(value, _subPath) : [];
|
|
29295
28330
|
});
|
|
29296
28331
|
}
|
|
29297
|
-
//#endregion
|
|
29298
|
-
//#region src/build/plugins.ts
|
|
29299
28332
|
async function baseBuildPlugins(nitro, base) {
|
|
29300
28333
|
const plugins = [];
|
|
29301
28334
|
const virtualPlugin = virtual(virtualTemplates(nitro, [...base.env.polyfill]));
|
|
@@ -29315,27 +28348,22 @@ async function baseBuildPlugins(nitro, base) {
|
|
|
29315
28348
|
}));
|
|
29316
28349
|
if (nitro.options.node && nitro.options.noExternals !== true) {
|
|
29317
28350
|
const isDevOrPrerender = nitro.options.dev || nitro.options.preset === "nitro-prerender";
|
|
29318
|
-
const { NodeNativePackages, NonBundleablePackages } = await import("nf3/db");
|
|
29319
|
-
const traceDeps = [...new Set([
|
|
29320
|
-
...NodeNativePackages,
|
|
29321
|
-
...NonBundleablePackages,
|
|
29322
|
-
...nitro.options.traceDeps || []
|
|
29323
|
-
])];
|
|
29324
28351
|
plugins.push(externals({
|
|
29325
28352
|
rootDir: nitro.options.rootDir,
|
|
29326
28353
|
conditions: nitro.options.exportConditions,
|
|
28354
|
+
include: nitro.options.traceDeps || [],
|
|
29327
28355
|
exclude: [...base.noExternal],
|
|
29328
|
-
|
|
29329
|
-
|
|
28356
|
+
trace: isDevOrPrerender ? false : {
|
|
28357
|
+
...nitro.options.traceOpts,
|
|
28358
|
+
outDir: nitro.options.output.serverDir
|
|
28359
|
+
}
|
|
29330
28360
|
}));
|
|
29331
28361
|
}
|
|
29332
28362
|
if (nitro.options.sourcemap && !nitro.options.dev && nitro.options.experimental.sourcemapMinify !== false) plugins.push(sourcemapMinify());
|
|
29333
28363
|
return plugins;
|
|
29334
28364
|
}
|
|
29335
|
-
//#endregion
|
|
29336
|
-
//#region src/build/plugins/oxc.ts
|
|
29337
28365
|
async function oxc(options) {
|
|
29338
|
-
const { minifySync, transformSync } = await import("rolldown/
|
|
28366
|
+
const { minifySync, transformSync } = await import("rolldown/utils");
|
|
29339
28367
|
return {
|
|
29340
28368
|
name: "nitro:oxc",
|
|
29341
28369
|
transform: {
|
|
@@ -29343,6 +28371,7 @@ async function oxc(options) {
|
|
|
29343
28371
|
handler(code, id) {
|
|
29344
28372
|
const res = transformSync(id, code, {
|
|
29345
28373
|
sourcemap: options.sourcemap,
|
|
28374
|
+
tsconfig: false,
|
|
29346
28375
|
...options.transform
|
|
29347
28376
|
});
|
|
29348
28377
|
if (res.errors?.length > 0) this.error(res.errors.join("\n"));
|
|
@@ -29357,5 +28386,4 @@ async function oxc(options) {
|
|
|
29357
28386
|
}
|
|
29358
28387
|
};
|
|
29359
28388
|
}
|
|
29360
|
-
//#endregion
|
|
29361
28389
|
export { jsonc_exports as $, src_default as A, f$1 as B, decode as C, copyPublicAssets as D, prepare as E, prettyPath as F, findNearestFile$1 as G, v$2 as H, resolveNitroPath as I, readPackageJSON$1 as J, findWorkspaceDir as K, writeFile$1 as L, glob as M, require_picomatch as N, scanUnprefixedPublicAssets as O, Builder as P, yaml_exports as Q, R$1 as R, MagicString as S, parse as T, dist_exports$1 as U, m$2 as V, findFile$1 as W, toml_exports as X, i$3 as Y, a$3 as Z, writeTypes as _, dataToEsm as a, dirname$2 as at, getMagicString as b, walk as c, join$2 as ct, libChunkName as d, resolve$3 as dt, r$5 as et, baseBuildConfig as f, writeDevBuildInfo as g, writeBuildInfo as h, createFilter as i, basename$2 as it, build as j, compressPublicAssets as k, NODE_MODULES_RE$1 as l, normalize$2 as lt, getBuildInfo as m, baseBuildPlugins as n, resolveModulePath as nt, extractAssignedNames as o, extname$4 as ot, runParallel as p, readGitConfig as q, attachScopes as r, resolveModuleURL as rt, makeLegalIdentifier as s, isAbsolute$2 as st, oxc as t, json5_exports as tt, getChunkName as u, relative$2 as ut, dist_exports as v, encode as w, stripLiteral as x, createUnimport as y, _$2 as z };
|