@cloudflare/vite-plugin 1.51.3 → 1.52.1
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/index.mjs +426 -342
- package/dist/index.mjs.map +1 -1
- package/dist/{open-PBXRGS4R-MlJKk7qC.mjs → open-PBXRGS4R-7GUxLVbA.mjs} +4 -4
- package/dist/open-PBXRGS4R-7GUxLVbA.mjs.map +1 -0
- package/dist/{package-CtblTTJQ.mjs → package-CHUB35_A.mjs} +2 -2
- package/dist/{package-CtblTTJQ.mjs.map → package-CHUB35_A.mjs.map} +1 -1
- package/package.json +12 -12
- package/dist/open-PBXRGS4R-MlJKk7qC.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import assert from "node:assert";
|
|
|
5
5
|
import { CoreHeaders, CorePaths, DeferredPromise, Log, LogLevel, Miniflare, MiniflareCoreError, Mutex, Request as Request$1, Response as Response$1, buildPublicUrl, convertV4MiniflareOptions, coupleWebSocket, getDefaultDevRegistryPath, getNodeCompat, getWorkerRegistry, kUnsafeEphemeralUniqueKey, parseModuleFallbackRequest } from "miniflare";
|
|
6
6
|
import * as wrangler from "wrangler";
|
|
7
7
|
import * as path2 from "node:path";
|
|
8
|
-
import
|
|
8
|
+
import path2__default, { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
9
9
|
import * as util$1 from "node:util";
|
|
10
10
|
import util, { TextEncoder as TextEncoder$1, format, inspect, promisify, styleText } from "node:util";
|
|
11
11
|
import * as vite from "vite";
|
|
@@ -1489,7 +1489,7 @@ async function assertWranglerVersion() {
|
|
|
1489
1489
|
* The default compatibility date to use when the user omits one.
|
|
1490
1490
|
* This value is injected at build time and remains fixed for each release.
|
|
1491
1491
|
*/
|
|
1492
|
-
const DEFAULT_COMPAT_DATE = "2026-08-
|
|
1492
|
+
const DEFAULT_COMPAT_DATE = "2026-08-13";
|
|
1493
1493
|
|
|
1494
1494
|
//#endregion
|
|
1495
1495
|
//#region src/build-output-env.ts
|
|
@@ -1578,7 +1578,7 @@ const PROXY_SHARED_SECRET = randomUUID();
|
|
|
1578
1578
|
const kRequestType = Symbol("kRequestType");
|
|
1579
1579
|
|
|
1580
1580
|
//#endregion
|
|
1581
|
-
//#region ../workers-utils/dist/chunk-
|
|
1581
|
+
//#region ../workers-utils/dist/chunk-NMPHTL5R.mjs
|
|
1582
1582
|
function isCompatDate(str) {
|
|
1583
1583
|
return /^\d{4}-\d{2}-\d{2}$/.test(str);
|
|
1584
1584
|
}
|
|
@@ -1593,6 +1593,27 @@ function getTodaysCompatDate() {
|
|
|
1593
1593
|
return formatCompatibilityDate(/* @__PURE__ */ new Date());
|
|
1594
1594
|
}
|
|
1595
1595
|
__name$4(getTodaysCompatDate, "getTodaysCompatDate");
|
|
1596
|
+
var NODEJS_COMPAT_DEFAULT_ON_DATE = "2026-08-04";
|
|
1597
|
+
function isNodejsCompatDefaultOn(compatibilityDate) {
|
|
1598
|
+
return compatibilityDate !== void 0 && compatibilityDate >= NODEJS_COMPAT_DEFAULT_ON_DATE;
|
|
1599
|
+
}
|
|
1600
|
+
__name$4(isNodejsCompatDefaultOn, "isNodejsCompatDefaultOn");
|
|
1601
|
+
var NODEJS_COMPAT_V2_SWITCH_OVER_DATE = "2024-09-23";
|
|
1602
|
+
function resolveNodejsCompat(compatibilityDate, compatibilityFlags) {
|
|
1603
|
+
const isDefaultOn = isNodejsCompatDefaultOn(compatibilityDate);
|
|
1604
|
+
const isNodejsCompatEnabled = compatibilityFlags.includes("nodejs_compat") || isDefaultOn && !compatibilityFlags.includes("no_nodejs_compat");
|
|
1605
|
+
return {
|
|
1606
|
+
isNodejsCompatEnabled,
|
|
1607
|
+
isNodejsCompatV2Enabled: compatibilityFlags.includes("nodejs_compat_v2") || !compatibilityFlags.includes("no_nodejs_compat_v2") && (isDefaultOn || isNodejsCompatEnabled && compatibilityDate >= NODEJS_COMPAT_V2_SWITCH_OVER_DATE)
|
|
1608
|
+
};
|
|
1609
|
+
}
|
|
1610
|
+
__name$4(resolveNodejsCompat, "resolveNodejsCompat");
|
|
1611
|
+
function stripRedundantNodejsCompatFlags(compatibilityDate, compatibilityFlags) {
|
|
1612
|
+
if (!isNodejsCompatDefaultOn(compatibilityDate)) return compatibilityFlags;
|
|
1613
|
+
const redundantFlags = ["nodejs_compat", "nodejs_compat_v2"].filter((flag) => !compatibilityFlags.includes(`no_${flag}`));
|
|
1614
|
+
return compatibilityFlags.filter((flag) => !redundantFlags.includes(flag));
|
|
1615
|
+
}
|
|
1616
|
+
__name$4(stripRedundantNodejsCompatFlags, "stripRedundantNodejsCompatFlags");
|
|
1596
1617
|
function assertNever(_value) {}
|
|
1597
1618
|
__name$4(assertNever, "assertNever");
|
|
1598
1619
|
function mapWorkerMetadataBindings(bindings$1) {
|
|
@@ -1884,8 +1905,8 @@ __name$4(constructWranglerConfig, "constructWranglerConfig");
|
|
|
1884
1905
|
|
|
1885
1906
|
//#endregion
|
|
1886
1907
|
//#region ../workers-utils/dist/chunk-53IMCORZ.mjs
|
|
1887
|
-
function isDirectory$1(path$
|
|
1888
|
-
return fs2.statSync(path$
|
|
1908
|
+
function isDirectory$1(path$1) {
|
|
1909
|
+
return fs2.statSync(path$1, { throwIfNoEntry: false })?.isDirectory() ?? false;
|
|
1889
1910
|
}
|
|
1890
1911
|
__name$4(isDirectory$1, "isDirectory");
|
|
1891
1912
|
function removeDir$1(dirPath, { fireAndForget = false } = {}) {
|
|
@@ -1928,7 +1949,7 @@ function getEnv(name) {
|
|
|
1928
1949
|
}
|
|
1929
1950
|
__name$4(getEnv, "getEnv");
|
|
1930
1951
|
function normalizePath$2(p$2) {
|
|
1931
|
-
return p$2 ?
|
|
1952
|
+
return p$2 ? path2__default.normalize(path2__default.join(p$2, ".")) : void 0;
|
|
1932
1953
|
}
|
|
1933
1954
|
__name$4(normalizePath$2, "normalizePath");
|
|
1934
1955
|
function homeDir() {
|
|
@@ -1936,13 +1957,13 @@ function homeDir() {
|
|
|
1936
1957
|
os.homedir(),
|
|
1937
1958
|
getEnv("USERPROFILE"),
|
|
1938
1959
|
getEnv("HOME"),
|
|
1939
|
-
getEnv("HOMEDRIVE") || getEnv("HOMEPATH") ?
|
|
1960
|
+
getEnv("HOMEDRIVE") || getEnv("HOMEPATH") ? path2__default.join(getEnv("HOMEDRIVE") ?? "", getEnv("HOMEPATH") ?? "") : void 0
|
|
1940
1961
|
].find(isNonEmpty));
|
|
1941
1962
|
return normalizePath$2(os.homedir() || getEnv("HOME"));
|
|
1942
1963
|
}
|
|
1943
1964
|
__name$4(homeDir, "homeDir");
|
|
1944
1965
|
function joinToBase(base, segments) {
|
|
1945
|
-
return base ?
|
|
1966
|
+
return base ? path2__default.join(base, ...segments) : void 0;
|
|
1946
1967
|
}
|
|
1947
1968
|
__name$4(joinToBase, "joinToBase");
|
|
1948
1969
|
function tempDir() {
|
|
@@ -1978,7 +1999,7 @@ function baseDir() {
|
|
|
1978
1999
|
}
|
|
1979
2000
|
__name$4(baseDir, "baseDir");
|
|
1980
2001
|
function valOrPath(value, segments) {
|
|
1981
|
-
return value ||
|
|
2002
|
+
return value || path2__default.join(...segments);
|
|
1982
2003
|
}
|
|
1983
2004
|
__name$4(valOrPath, "valOrPath");
|
|
1984
2005
|
function windowsAppData() {
|
|
@@ -2018,10 +2039,10 @@ function xdgCache() {
|
|
|
2018
2039
|
}
|
|
2019
2040
|
__name$4(xdgCache, "xdgCache");
|
|
2020
2041
|
function xdgAppPaths(name) {
|
|
2021
|
-
const segment =
|
|
2042
|
+
const segment = path2__default.parse(name).name;
|
|
2022
2043
|
return {
|
|
2023
|
-
config: /* @__PURE__ */ __name$4(() =>
|
|
2024
|
-
cache: /* @__PURE__ */ __name$4(() =>
|
|
2044
|
+
config: /* @__PURE__ */ __name$4(() => path2__default.join(xdgConfig(), segment), "config"),
|
|
2045
|
+
cache: /* @__PURE__ */ __name$4(() => path2__default.join(xdgCache(), segment), "cache")
|
|
2025
2046
|
};
|
|
2026
2047
|
}
|
|
2027
2048
|
__name$4(xdgAppPaths, "xdgAppPaths");
|
|
@@ -2029,7 +2050,7 @@ function getGlobalConfigPath({ appName = "wrangler", leadingDot = true, useLegac
|
|
|
2029
2050
|
const dirName = `${leadingDot ? "." : ""}${appName}`;
|
|
2030
2051
|
const configDir = xdgAppPaths(dirName).config();
|
|
2031
2052
|
if (useLegacyHomeDir) {
|
|
2032
|
-
const legacyConfigDir =
|
|
2053
|
+
const legacyConfigDir = path2__default.join(os.homedir(), dirName);
|
|
2033
2054
|
if (isDirectory$1(legacyConfigDir)) return legacyConfigDir;
|
|
2034
2055
|
}
|
|
2035
2056
|
return configDir;
|
|
@@ -4406,7 +4427,7 @@ function resolveWranglerConfigPath$1({ config: config$2, script }, options) {
|
|
|
4406
4427
|
deployConfigPath: void 0,
|
|
4407
4428
|
redirected: false
|
|
4408
4429
|
};
|
|
4409
|
-
return findWranglerConfig$2(script !== void 0 ?
|
|
4430
|
+
return findWranglerConfig$2(script !== void 0 ? path2__default.dirname(script) : process.cwd(), options);
|
|
4410
4431
|
}
|
|
4411
4432
|
__name$4(resolveWranglerConfigPath$1, "resolveWranglerConfigPath");
|
|
4412
4433
|
function findWranglerConfig$2(referencePath = process.cwd(), { useRedirectIfAvailable = false } = {}) {
|
|
@@ -4437,15 +4458,15 @@ function findRedirectedWranglerConfig$1(cwd, userConfigPath) {
|
|
|
4437
4458
|
const deployConfigFile = readFileSync$1(deployConfigPath);
|
|
4438
4459
|
try {
|
|
4439
4460
|
const deployConfig = parseJSONC$1(deployConfigFile, deployConfigPath);
|
|
4440
|
-
redirectedConfigPath = deployConfig.configPath &&
|
|
4461
|
+
redirectedConfigPath = deployConfig.configPath && path2__default.resolve(path2__default.dirname(deployConfigPath), deployConfig.configPath);
|
|
4441
4462
|
} catch (e) {
|
|
4442
|
-
throw new UserError(`Failed to parse the deploy configuration file at ${
|
|
4463
|
+
throw new UserError(`Failed to parse the deploy configuration file at ${path2__default.relative(".", deployConfigPath)}`, {
|
|
4443
4464
|
cause: e,
|
|
4444
4465
|
telemetryMessage: false
|
|
4445
4466
|
});
|
|
4446
4467
|
}
|
|
4447
4468
|
if (!redirectedConfigPath) throw new UserError(esm_default$2`
|
|
4448
|
-
A deploy configuration file was found at "${
|
|
4469
|
+
A deploy configuration file was found at "${path2__default.relative(".", deployConfigPath)}".
|
|
4449
4470
|
But this is not valid - the required "configPath" property was not found.
|
|
4450
4471
|
Instead this file contains:
|
|
4451
4472
|
\`\`\`
|
|
@@ -4453,13 +4474,13 @@ function findRedirectedWranglerConfig$1(cwd, userConfigPath) {
|
|
|
4453
4474
|
\`\`\`
|
|
4454
4475
|
`, { telemetryMessage: false });
|
|
4455
4476
|
if (!existsSync(redirectedConfigPath)) throw new UserError(esm_default$2`
|
|
4456
|
-
There is a deploy configuration at "${
|
|
4457
|
-
But the redirected configuration path it points to, "${
|
|
4477
|
+
There is a deploy configuration at "${path2__default.relative(".", deployConfigPath)}".
|
|
4478
|
+
But the redirected configuration path it points to, "${path2__default.relative(".", redirectedConfigPath)}", does not exist.
|
|
4458
4479
|
`, { telemetryMessage: false });
|
|
4459
4480
|
if (userConfigPath) {
|
|
4460
|
-
if (
|
|
4461
|
-
Found both a user configuration file at "${
|
|
4462
|
-
and a deploy configuration file at "${
|
|
4481
|
+
if (path2__default.join(path2__default.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG$1) !== deployConfigPath) throw new UserError(esm_default$2`
|
|
4482
|
+
Found both a user configuration file at "${path2__default.relative(".", userConfigPath)}"
|
|
4483
|
+
and a deploy configuration file at "${path2__default.relative(".", deployConfigPath)}".
|
|
4463
4484
|
But these do not share the same base path so it is not clear which should be used.
|
|
4464
4485
|
`, { telemetryMessage: false });
|
|
4465
4486
|
}
|
|
@@ -5651,10 +5672,10 @@ var require_util$5 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/un
|
|
|
5651
5672
|
if (!isHttpOrHttpsPrefixed(url$2.origin || url$2.protocol)) throw new InvalidArgumentError$37("Invalid URL protocol: the URL must start with `http:` or `https:`.");
|
|
5652
5673
|
const port = url$2.port != null ? url$2.port : url$2.protocol === "https:" ? 443 : 80;
|
|
5653
5674
|
let origin = url$2.origin != null ? url$2.origin : `${url$2.protocol || ""}//${url$2.hostname || ""}:${port}`;
|
|
5654
|
-
let path$
|
|
5675
|
+
let path$1 = url$2.path != null ? url$2.path : `${url$2.pathname || ""}${url$2.search || ""}`;
|
|
5655
5676
|
if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1);
|
|
5656
|
-
if (path$
|
|
5657
|
-
return new URL(`${origin}${path$
|
|
5677
|
+
if (path$1 && path$1[0] !== "/") path$1 = `/${path$1}`;
|
|
5678
|
+
return new URL(`${origin}${path$1}`);
|
|
5658
5679
|
}
|
|
5659
5680
|
if (!isHttpOrHttpsPrefixed(url$2.origin || url$2.protocol)) throw new InvalidArgumentError$37("Invalid URL protocol: the URL must start with `http:` or `https:`.");
|
|
5660
5681
|
return url$2;
|
|
@@ -6529,8 +6550,8 @@ var require_diagnostics = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
6529
6550
|
debugLog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version$6, error$2.message);
|
|
6530
6551
|
});
|
|
6531
6552
|
diagnosticsChannel$1.subscribe("undici:client:sendHeaders", (evt) => {
|
|
6532
|
-
const { request: { method, path: path$
|
|
6533
|
-
debugLog("sending request to %s %s%s", method, origin, path$
|
|
6553
|
+
const { request: { method, path: path$1, origin } } = evt;
|
|
6554
|
+
debugLog("sending request to %s %s%s", method, origin, path$1);
|
|
6534
6555
|
});
|
|
6535
6556
|
}
|
|
6536
6557
|
let isTrackingRequestEvents = false;
|
|
@@ -6542,16 +6563,16 @@ var require_diagnostics = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
6542
6563
|
}
|
|
6543
6564
|
isTrackingRequestEvents = true;
|
|
6544
6565
|
diagnosticsChannel$1.subscribe("undici:request:headers", (evt) => {
|
|
6545
|
-
const { request: { method, path: path$
|
|
6546
|
-
debugLog("received response to %s %s%s - HTTP %d", method, origin, path$
|
|
6566
|
+
const { request: { method, path: path$1, origin }, response: { statusCode } } = evt;
|
|
6567
|
+
debugLog("received response to %s %s%s - HTTP %d", method, origin, path$1, statusCode);
|
|
6547
6568
|
});
|
|
6548
6569
|
diagnosticsChannel$1.subscribe("undici:request:trailers", (evt) => {
|
|
6549
|
-
const { request: { method, path: path$
|
|
6550
|
-
debugLog("trailers received from %s %s%s", method, origin, path$
|
|
6570
|
+
const { request: { method, path: path$1, origin } } = evt;
|
|
6571
|
+
debugLog("trailers received from %s %s%s", method, origin, path$1);
|
|
6551
6572
|
});
|
|
6552
6573
|
diagnosticsChannel$1.subscribe("undici:request:error", (evt) => {
|
|
6553
|
-
const { request: { method, path: path$
|
|
6554
|
-
debugLog("request to %s %s%s errored - %s", method, origin, path$
|
|
6574
|
+
const { request: { method, path: path$1, origin }, error: error$2 } = evt;
|
|
6575
|
+
debugLog("request to %s %s%s errored - %s", method, origin, path$1, error$2.message);
|
|
6555
6576
|
});
|
|
6556
6577
|
}
|
|
6557
6578
|
let isTrackingWebSocketEvents = false;
|
|
@@ -6612,10 +6633,10 @@ var require_request$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
6612
6633
|
}
|
|
6613
6634
|
const kHandler = Symbol("handler");
|
|
6614
6635
|
var Request$6 = class {
|
|
6615
|
-
constructor(origin, { path: path$
|
|
6616
|
-
if (typeof path$
|
|
6617
|
-
else if (path$
|
|
6618
|
-
else if (invalidPathRegex.test(path$
|
|
6636
|
+
constructor(origin, { path: path$1, method, body, headers, query, idempotent, blocking, upgrade: upgrade$1, headersTimeout, bodyTimeout, reset, expectContinue, servername, throwOnError, maxRedirections, typeOfService }, handler) {
|
|
6637
|
+
if (typeof path$1 !== "string") throw new InvalidArgumentError$36("path must be a string");
|
|
6638
|
+
else if (path$1[0] !== "/" && !(path$1.startsWith("http://") || path$1.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError$36("path must be an absolute URL or start with a slash");
|
|
6639
|
+
else if (invalidPathRegex.test(path$1)) throw new InvalidArgumentError$36("invalid request path");
|
|
6619
6640
|
if (typeof method !== "string") throw new InvalidArgumentError$36("method must be a string");
|
|
6620
6641
|
else if (normalizedMethodRecords$1[method] === void 0 && !isValidHTTPToken$3(method)) throw new InvalidArgumentError$36("invalid request method");
|
|
6621
6642
|
if (upgrade$1 && typeof upgrade$1 !== "string") throw new InvalidArgumentError$36("upgrade must be a string");
|
|
@@ -6656,7 +6677,7 @@ var require_request$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
6656
6677
|
this.completed = false;
|
|
6657
6678
|
this.aborted = false;
|
|
6658
6679
|
this.upgrade = upgrade$1 || null;
|
|
6659
|
-
this.path = query ? serializePathWithQuery$3(path$
|
|
6680
|
+
this.path = query ? serializePathWithQuery$3(path$1, query) : path$1;
|
|
6660
6681
|
this.origin = origin;
|
|
6661
6682
|
this.protocol = getProtocolFromUrlString(origin);
|
|
6662
6683
|
this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
|
|
@@ -11262,7 +11283,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
11262
11283
|
* @returns
|
|
11263
11284
|
*/
|
|
11264
11285
|
function writeH1(client, request$2) {
|
|
11265
|
-
const { method, path: path$
|
|
11286
|
+
const { method, path: path$1, host, upgrade: upgrade$1, blocking, reset } = request$2;
|
|
11266
11287
|
let { body, headers, contentLength } = request$2;
|
|
11267
11288
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
|
|
11268
11289
|
if (util$22.isFormDataLike(body)) {
|
|
@@ -11318,7 +11339,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
11318
11339
|
if (client[kMaxRequests$1] && socket[kCounter$1]++ >= client[kMaxRequests$1]) socket[kReset$1] = true;
|
|
11319
11340
|
if (blocking) socket[kBlocking] = true;
|
|
11320
11341
|
if (socket.setTypeOfService) socket.setTypeOfService(request$2.typeOfService);
|
|
11321
|
-
let header = `${method} ${path$
|
|
11342
|
+
let header = `${method} ${path$1} HTTP/1.1\r\n`;
|
|
11322
11343
|
if (typeof host === "string") header += `host: ${host}\r\n`;
|
|
11323
11344
|
else header += client[kHostHeader$1];
|
|
11324
11345
|
if (upgrade$1) header += `connection: upgrade\r\nupgrade: ${upgrade$1}\r\n`;
|
|
@@ -11854,7 +11875,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
11854
11875
|
function writeH2(client, request$2) {
|
|
11855
11876
|
const requestTimeout = request$2.bodyTimeout ?? client[kBodyTimeout$1];
|
|
11856
11877
|
const session = client[kHTTP2Session];
|
|
11857
|
-
const { method, path: path$
|
|
11878
|
+
const { method, path: path$1, host, upgrade: upgrade$1, expectContinue, signal, protocol, headers: reqHeaders } = request$2;
|
|
11858
11879
|
let { body } = request$2;
|
|
11859
11880
|
if (upgrade$1 != null && upgrade$1 !== "websocket") {
|
|
11860
11881
|
util$21.errorRequest(client, request$2, new InvalidArgumentError$30(`Custom upgrade "${upgrade$1}" not supported over HTTP/2`));
|
|
@@ -11907,7 +11928,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
11907
11928
|
}
|
|
11908
11929
|
headers[HTTP2_HEADER_METHOD] = "CONNECT";
|
|
11909
11930
|
headers[HTTP2_HEADER_PROTOCOL] = "websocket";
|
|
11910
|
-
headers[HTTP2_HEADER_PATH] = path$
|
|
11931
|
+
headers[HTTP2_HEADER_PATH] = path$1;
|
|
11911
11932
|
if (protocol === "ws:" || protocol === "wss:") headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https";
|
|
11912
11933
|
else headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
|
|
11913
11934
|
stream$2 = session.request(headers, {
|
|
@@ -11949,7 +11970,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
11949
11970
|
stream$2.setTimeout(requestTimeout);
|
|
11950
11971
|
return true;
|
|
11951
11972
|
}
|
|
11952
|
-
headers[HTTP2_HEADER_PATH] = path$
|
|
11973
|
+
headers[HTTP2_HEADER_PATH] = path$1;
|
|
11953
11974
|
headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
|
|
11954
11975
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
|
|
11955
11976
|
if (body && typeof body.read === "function") body.read(0);
|
|
@@ -13814,8 +13835,8 @@ var require_proxy_agent = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
13814
13835
|
}
|
|
13815
13836
|
if (onHeaders) onHeaders.call(this, statusCode, data$1, resume$1);
|
|
13816
13837
|
};
|
|
13817
|
-
const { origin, path: path$
|
|
13818
|
-
opts.path = origin + path$
|
|
13838
|
+
const { origin, path: path$1 = "/", headers = {} } = opts;
|
|
13839
|
+
opts.path = origin + path$1;
|
|
13819
13840
|
if (!("host" in headers) && !("Host" in headers)) {
|
|
13820
13841
|
const { host } = new URL(origin);
|
|
13821
13842
|
headers.host = host;
|
|
@@ -15613,16 +15634,16 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnp
|
|
|
15613
15634
|
}
|
|
15614
15635
|
return normalizedQp;
|
|
15615
15636
|
}
|
|
15616
|
-
function safeUrl(path$
|
|
15617
|
-
if (typeof path$
|
|
15618
|
-
const pathSegments = path$
|
|
15619
|
-
if (pathSegments.length !== 2) return path$
|
|
15637
|
+
function safeUrl(path$1) {
|
|
15638
|
+
if (typeof path$1 !== "string") return path$1;
|
|
15639
|
+
const pathSegments = path$1.split("?", 3);
|
|
15640
|
+
if (pathSegments.length !== 2) return path$1;
|
|
15620
15641
|
const qp = new URLSearchParams(pathSegments.pop());
|
|
15621
15642
|
qp.sort();
|
|
15622
15643
|
return [...pathSegments, qp.toString()].join("?");
|
|
15623
15644
|
}
|
|
15624
|
-
function matchKey(mockDispatch$1, { path: path$
|
|
15625
|
-
const pathMatch = matchValue$1(mockDispatch$1.path, path$
|
|
15645
|
+
function matchKey(mockDispatch$1, { path: path$1, method, body, headers }) {
|
|
15646
|
+
const pathMatch = matchValue$1(mockDispatch$1.path, path$1);
|
|
15626
15647
|
const methodMatch = matchValue$1(mockDispatch$1.method, method);
|
|
15627
15648
|
const bodyMatch = typeof mockDispatch$1.body !== "undefined" ? matchValue$1(mockDispatch$1.body, body) : true;
|
|
15628
15649
|
const headersMatch = matchHeaders(mockDispatch$1, headers);
|
|
@@ -15640,8 +15661,8 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnp
|
|
|
15640
15661
|
const basePath = key.query ? serializePathWithQuery$2(key.path, key.query) : key.path;
|
|
15641
15662
|
const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
|
|
15642
15663
|
const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath);
|
|
15643
|
-
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path$
|
|
15644
|
-
return ignoreTrailingSlash ? matchValue$1(removeTrailingSlash(safeUrl(path$
|
|
15664
|
+
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path$1, ignoreTrailingSlash }) => {
|
|
15665
|
+
return ignoreTrailingSlash ? matchValue$1(removeTrailingSlash(safeUrl(path$1)), resolvedPathWithoutTrailingSlash) : matchValue$1(safeUrl(path$1), resolvedPath);
|
|
15645
15666
|
});
|
|
15646
15667
|
if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
|
|
15647
15668
|
matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue$1(method, key.method));
|
|
@@ -15684,15 +15705,15 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnp
|
|
|
15684
15705
|
/**
|
|
15685
15706
|
* @param {string} path Path to remove trailing slash from
|
|
15686
15707
|
*/
|
|
15687
|
-
function removeTrailingSlash(path$
|
|
15688
|
-
while (path$
|
|
15689
|
-
if (path$
|
|
15690
|
-
return path$
|
|
15708
|
+
function removeTrailingSlash(path$1) {
|
|
15709
|
+
while (path$1.endsWith("/")) path$1 = path$1.slice(0, -1);
|
|
15710
|
+
if (path$1.length === 0) path$1 = "/";
|
|
15711
|
+
return path$1;
|
|
15691
15712
|
}
|
|
15692
15713
|
function buildKey$1(opts) {
|
|
15693
|
-
const { path: path$
|
|
15714
|
+
const { path: path$1, method, body, headers, query } = opts;
|
|
15694
15715
|
return {
|
|
15695
|
-
path: path$
|
|
15716
|
+
path: path$1,
|
|
15696
15717
|
method,
|
|
15697
15718
|
body,
|
|
15698
15719
|
headers,
|
|
@@ -16259,10 +16280,10 @@ var require_pending_interceptors_formatter = /* @__PURE__ */ __commonJS$2({ "../
|
|
|
16259
16280
|
});
|
|
16260
16281
|
}
|
|
16261
16282
|
format(pendingInterceptors) {
|
|
16262
|
-
const withPrettyHeaders = pendingInterceptors.map(({ method, path: path$
|
|
16283
|
+
const withPrettyHeaders = pendingInterceptors.map(({ method, path: path$1, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
|
|
16263
16284
|
Method: method,
|
|
16264
16285
|
Origin: origin,
|
|
16265
|
-
Path: path$
|
|
16286
|
+
Path: path$1,
|
|
16266
16287
|
"Status code": statusCode,
|
|
16267
16288
|
Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
|
|
16268
16289
|
Invocations: timesInvoked,
|
|
@@ -16320,8 +16341,8 @@ var require_mock_agent = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnp
|
|
|
16320
16341
|
const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters];
|
|
16321
16342
|
const dispatchOpts = { ...opts };
|
|
16322
16343
|
if (acceptNonStandardSearchParameters && dispatchOpts.path) {
|
|
16323
|
-
const [path$
|
|
16324
|
-
dispatchOpts.path = `${path$
|
|
16344
|
+
const [path$1, searchParams] = dispatchOpts.path.split("?");
|
|
16345
|
+
dispatchOpts.path = `${path$1}?${normalizeSearchParams(searchParams, acceptNonStandardSearchParameters)}`;
|
|
16325
16346
|
}
|
|
16326
16347
|
return this[kAgent].dispatch(dispatchOpts, handler);
|
|
16327
16348
|
}
|
|
@@ -16798,10 +16819,10 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$2({ "../../node_modul
|
|
|
16798
16819
|
* @return {Promise<void>} - Resolves when snapshots are loaded
|
|
16799
16820
|
*/
|
|
16800
16821
|
async loadSnapshots(filePath) {
|
|
16801
|
-
const path$
|
|
16802
|
-
if (!path$
|
|
16822
|
+
const path$1 = filePath || this.#snapshotPath;
|
|
16823
|
+
if (!path$1) throw new InvalidArgumentError$6("Snapshot path is required");
|
|
16803
16824
|
try {
|
|
16804
|
-
const data$1 = await readFile(resolve$3(path$
|
|
16825
|
+
const data$1 = await readFile(resolve$3(path$1), "utf8");
|
|
16805
16826
|
const parsed = JSON.parse(data$1);
|
|
16806
16827
|
if (Array.isArray(parsed)) {
|
|
16807
16828
|
this.#snapshots.clear();
|
|
@@ -16809,7 +16830,7 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$2({ "../../node_modul
|
|
|
16809
16830
|
} else this.#snapshots = new Map(Object.entries(parsed));
|
|
16810
16831
|
} catch (error$2) {
|
|
16811
16832
|
if (error$2.code === "ENOENT") this.#snapshots.clear();
|
|
16812
|
-
else throw new UndiciError$1(`Failed to load snapshots from ${path$
|
|
16833
|
+
else throw new UndiciError$1(`Failed to load snapshots from ${path$1}`, { cause: error$2 });
|
|
16813
16834
|
}
|
|
16814
16835
|
}
|
|
16815
16836
|
/**
|
|
@@ -16819,9 +16840,9 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$2({ "../../node_modul
|
|
|
16819
16840
|
* @returns {Promise<void>} - Resolves when snapshots are saved
|
|
16820
16841
|
*/
|
|
16821
16842
|
async saveSnapshots(filePath) {
|
|
16822
|
-
const path$
|
|
16823
|
-
if (!path$
|
|
16824
|
-
const resolvedPath = resolve$3(path$
|
|
16843
|
+
const path$1 = filePath || this.#snapshotPath;
|
|
16844
|
+
if (!path$1) throw new InvalidArgumentError$6("Snapshot path is required");
|
|
16845
|
+
const resolvedPath = resolve$3(path$1);
|
|
16825
16846
|
await mkdir(dirname$2(resolvedPath), { recursive: true });
|
|
16826
16847
|
const data$1 = Array.from(this.#snapshots.entries()).map(([hash$1, snapshot]) => ({
|
|
16827
16848
|
hash: hash$1,
|
|
@@ -17395,11 +17416,11 @@ var require_redirect_handler = /* @__PURE__ */ __commonJS$2({ "../../node_module
|
|
|
17395
17416
|
return;
|
|
17396
17417
|
}
|
|
17397
17418
|
const { origin, pathname, search } = util$9.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
|
|
17398
|
-
const path$
|
|
17399
|
-
const redirectUrlString = `${origin}${path$
|
|
17419
|
+
const path$1 = search ? `${pathname}${search}` : pathname;
|
|
17420
|
+
const redirectUrlString = `${origin}${path$1}`;
|
|
17400
17421
|
for (const historyUrl of this.history) if (historyUrl.toString() === redirectUrlString) throw new InvalidArgumentError$3(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`);
|
|
17401
17422
|
this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
|
|
17402
|
-
this.opts.path = path$
|
|
17423
|
+
this.opts.path = path$1;
|
|
17403
17424
|
this.opts.origin = origin;
|
|
17404
17425
|
this.opts.query = null;
|
|
17405
17426
|
}
|
|
@@ -18739,17 +18760,17 @@ var require_cache_handler = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.
|
|
|
18739
18760
|
if (locationUrl.origin !== originUrl.origin) return;
|
|
18740
18761
|
return locationUrl.pathname + locationUrl.search;
|
|
18741
18762
|
}
|
|
18742
|
-
function deleteCachedUri(store, cacheKey, path$
|
|
18763
|
+
function deleteCachedUri(store, cacheKey, path$1) {
|
|
18743
18764
|
deleteCachedValue$1(store, {
|
|
18744
18765
|
...cacheKey,
|
|
18745
|
-
path: path$
|
|
18766
|
+
path: path$1
|
|
18746
18767
|
});
|
|
18747
18768
|
for (let i$1 = 0; i$1 < util$8.safeHTTPMethods.length; i$1++) {
|
|
18748
18769
|
const method = util$8.safeHTTPMethods[i$1];
|
|
18749
18770
|
if (method !== cacheKey.method) deleteCachedValue$1(store, {
|
|
18750
18771
|
...cacheKey,
|
|
18751
18772
|
method,
|
|
18752
|
-
path: path$
|
|
18773
|
+
path: path$1
|
|
18753
18774
|
});
|
|
18754
18775
|
}
|
|
18755
18776
|
}
|
|
@@ -18757,8 +18778,8 @@ var require_cache_handler = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.
|
|
|
18757
18778
|
if (headerValue === void 0) return;
|
|
18758
18779
|
const values = Array.isArray(headerValue) ? headerValue : [headerValue];
|
|
18759
18780
|
for (let i$1 = 0; i$1 < values.length; i$1++) {
|
|
18760
|
-
const path$
|
|
18761
|
-
if (path$
|
|
18781
|
+
const path$1 = getSameOriginPath(cacheKey, values[i$1]);
|
|
18782
|
+
if (path$1 !== void 0) deleteCachedUri(store, cacheKey, path$1);
|
|
18762
18783
|
}
|
|
18763
18784
|
}
|
|
18764
18785
|
function invalidateUnsafeRequest(store, cacheKey, resHeaders) {
|
|
@@ -22763,10 +22784,10 @@ var require_fetch = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/und
|
|
|
22763
22784
|
const url$2 = requestCurrentURL(request$2);
|
|
22764
22785
|
/** @type {import('../../..').Agent} */
|
|
22765
22786
|
const agent = fetchParams.controller.dispatcher;
|
|
22766
|
-
const path$
|
|
22787
|
+
const path$1 = url$2.pathname + url$2.search;
|
|
22767
22788
|
const hasTrailingQuestionMark = url$2.search.length === 0 && url$2.href[url$2.href.length - url$2.hash.length - 1] === "?";
|
|
22768
22789
|
return new Promise((resolve$4, reject) => agent.dispatch({
|
|
22769
|
-
path: hasTrailingQuestionMark ? `${path$
|
|
22790
|
+
path: hasTrailingQuestionMark ? `${path$1}?` : path$1,
|
|
22770
22791
|
origin: url$2.origin,
|
|
22771
22792
|
method: request$2.method,
|
|
22772
22793
|
body: agent.isMockActive ? request$2.body && (request$2.body.source || request$2.body.stream) : body,
|
|
@@ -23548,9 +23569,9 @@ var require_util$2 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/un
|
|
|
23548
23569
|
* path-value = <any CHAR except CTLs or ";">
|
|
23549
23570
|
* @param {string} path
|
|
23550
23571
|
*/
|
|
23551
|
-
function validateCookiePath(path$
|
|
23552
|
-
for (let i$1 = 0; i$1 < path$
|
|
23553
|
-
const code = path$
|
|
23572
|
+
function validateCookiePath(path$1) {
|
|
23573
|
+
for (let i$1 = 0; i$1 < path$1.length; ++i$1) {
|
|
23574
|
+
const code = path$1.charCodeAt(i$1);
|
|
23554
23575
|
if (code < 32 || code > 126 || code === 59) throw new Error("Invalid cookie path");
|
|
23555
23576
|
}
|
|
23556
23577
|
}
|
|
@@ -26720,9 +26741,9 @@ var require_undici = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/un
|
|
|
26720
26741
|
if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts");
|
|
26721
26742
|
if (opts && opts.path != null) {
|
|
26722
26743
|
if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path");
|
|
26723
|
-
let path$
|
|
26724
|
-
if (!opts.path.startsWith("/")) path$
|
|
26725
|
-
url$2 = new URL(util$2.parseOrigin(url$2).origin + path$
|
|
26744
|
+
let path$1 = opts.path;
|
|
26745
|
+
if (!opts.path.startsWith("/")) path$1 = `/${path$1}`;
|
|
26746
|
+
url$2 = new URL(util$2.parseOrigin(url$2).origin + path$1);
|
|
26726
26747
|
} else {
|
|
26727
26748
|
if (!opts) opts = typeof url$2 === "object" ? url$2 : {};
|
|
26728
26749
|
url$2 = util$2.parseURL(url$2);
|
|
@@ -28204,6 +28225,7 @@ var defaultWranglerConfig = {
|
|
|
28204
28225
|
upload_source_maps: void 0,
|
|
28205
28226
|
assets: void 0,
|
|
28206
28227
|
observability: { enabled: true },
|
|
28228
|
+
access: void 0,
|
|
28207
28229
|
cache: void 0,
|
|
28208
28230
|
compliance_region: void 0,
|
|
28209
28231
|
python_modules: { exclude: ["**/*.pyc"] },
|
|
@@ -29790,8 +29812,8 @@ function datetime$2(args) {
|
|
|
29790
29812
|
}
|
|
29791
29813
|
__name$4(datetime$2, "datetime");
|
|
29792
29814
|
var string$2 = /* @__PURE__ */ __name$4((params) => {
|
|
29793
|
-
const regex$
|
|
29794
|
-
return /* @__PURE__ */ new RegExp(`^${regex$
|
|
29815
|
+
const regex$2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
29816
|
+
return /* @__PURE__ */ new RegExp(`^${regex$2}$`);
|
|
29795
29817
|
}, "string");
|
|
29796
29818
|
var bigint = /^-?\d+n?$/;
|
|
29797
29819
|
var integer$1 = /^-?\d+$/;
|
|
@@ -39411,9 +39433,9 @@ var stringProcessor$1 = /* @__PURE__ */ __name$4((schema, ctx, _json, _params) =
|
|
|
39411
39433
|
if (patterns && patterns.size > 0) {
|
|
39412
39434
|
const regexes = [...patterns];
|
|
39413
39435
|
if (regexes.length === 1) json2.pattern = regexes[0].source;
|
|
39414
|
-
else if (regexes.length > 1) json2.allOf = [...regexes.map((regex$
|
|
39436
|
+
else if (regexes.length > 1) json2.allOf = [...regexes.map((regex$2) => ({
|
|
39415
39437
|
...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
|
|
39416
|
-
pattern: regex$
|
|
39438
|
+
pattern: regex$2.source
|
|
39417
39439
|
}))];
|
|
39418
39440
|
}
|
|
39419
39441
|
}, "stringProcessor");
|
|
@@ -40647,9 +40669,9 @@ function hex2(_params) {
|
|
|
40647
40669
|
__name$4(hex2, "hex");
|
|
40648
40670
|
function hash(alg, params) {
|
|
40649
40671
|
const format2$2 = `${alg}_${params?.enc ?? "hex"}`;
|
|
40650
|
-
const regex$
|
|
40651
|
-
if (!regex$
|
|
40652
|
-
return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, format2$2, regex$
|
|
40672
|
+
const regex$2 = regexes_exports$1[format2$2];
|
|
40673
|
+
if (!regex$2) throw new Error(`Unrecognized hash format: ${format2$2}`);
|
|
40674
|
+
return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, format2$2, regex$2, params);
|
|
40653
40675
|
}
|
|
40654
40676
|
__name$4(hash, "hash");
|
|
40655
40677
|
var ZodNumber$1 = /* @__PURE__ */ $constructor$1("ZodNumber", (inst, def) => {
|
|
@@ -42016,6 +42038,7 @@ function getWranglerSendMetricsFromEnv() {
|
|
|
42016
42038
|
return getWranglerSendMetricsVariableFromEnv();
|
|
42017
42039
|
}
|
|
42018
42040
|
__name$4(getWranglerSendMetricsFromEnv, "getWranglerSendMetricsFromEnv");
|
|
42041
|
+
var getNoSkillsUpdatePromptsFromEnv = getBooleanEnvironmentVariableFactory({ variableName: "WRANGLER_NO_SKILLS_UPDATE_PROMPTS" });
|
|
42019
42042
|
var getWranglerSendErrorReportsFromEnv = getBooleanEnvironmentVariableFactory({
|
|
42020
42043
|
variableName: "WRANGLER_SEND_ERROR_REPORTS",
|
|
42021
42044
|
defaultValue: false
|
|
@@ -42072,7 +42095,7 @@ var getBuildPlatformFromEnv = getEnvironmentVariableFactory({ variableName: "WRA
|
|
|
42072
42095
|
var getRegistryPath = getEnvironmentVariableFactory({
|
|
42073
42096
|
variableName: "WRANGLER_REGISTRY_PATH",
|
|
42074
42097
|
defaultValue() {
|
|
42075
|
-
return
|
|
42098
|
+
return path2__default.join(getGlobalConfigPath(), "registry");
|
|
42076
42099
|
}
|
|
42077
42100
|
});
|
|
42078
42101
|
var getD1ExtraLocationChoices = getEnvironmentVariableFactory({ variableName: "WRANGLER_D1_EXTRA_LOCATION_CHOICES" });
|
|
@@ -42482,7 +42505,7 @@ function isPagesConfig(rawConfig) {
|
|
|
42482
42505
|
}
|
|
42483
42506
|
__name$4(isPagesConfig, "isPagesConfig");
|
|
42484
42507
|
function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args, preserveOriginalMain = false) {
|
|
42485
|
-
const diagnostics = new Diagnostics(`Processing ${configPath ?
|
|
42508
|
+
const diagnostics = new Diagnostics(`Processing ${configPath ? path2__default.relative(process.cwd(), configPath) : "wrangler"} configuration:`);
|
|
42486
42509
|
const isRedirectedConfig2 = isRedirectedRawConfig$1(rawConfig, configPath, userConfigPath);
|
|
42487
42510
|
if ("legacy_env" in rawConfig) {
|
|
42488
42511
|
if (!isRedirectedConfig2) diagnostics.errors.push(dedent$2`
|
|
@@ -42600,34 +42623,34 @@ function normalizeAndValidateBuild(diagnostics, rawEnv, rawBuild, configPath) {
|
|
|
42600
42623
|
else validateOptionalProperty(diagnostics, "build", "watch_dir", watch_dir, "string");
|
|
42601
42624
|
return {
|
|
42602
42625
|
command,
|
|
42603
|
-
watch_dir: command && configPath ? Array.isArray(watch_dir) ? watch_dir.map((dir2) =>
|
|
42626
|
+
watch_dir: command && configPath ? Array.isArray(watch_dir) ? watch_dir.map((dir2) => path2__default.relative(process.cwd(), path2__default.join(path2__default.dirname(configPath), `${dir2}`))) : path2__default.relative(process.cwd(), path2__default.join(path2__default.dirname(configPath), `${watch_dir}`)) : watch_dir,
|
|
42604
42627
|
cwd
|
|
42605
42628
|
};
|
|
42606
42629
|
}
|
|
42607
42630
|
__name$4(normalizeAndValidateBuild, "normalizeAndValidateBuild");
|
|
42608
42631
|
function normalizeAndValidateMainField(configPath, rawMain) {
|
|
42609
|
-
const configDir =
|
|
42632
|
+
const configDir = path2__default.dirname(configPath ?? "wrangler.toml");
|
|
42610
42633
|
if (rawMain !== void 0) if (typeof rawMain === "string") {
|
|
42611
|
-
const directory =
|
|
42612
|
-
return
|
|
42634
|
+
const directory = path2__default.resolve(configDir);
|
|
42635
|
+
return path2__default.resolve(directory, rawMain);
|
|
42613
42636
|
} else return rawMain;
|
|
42614
42637
|
else return;
|
|
42615
42638
|
}
|
|
42616
42639
|
__name$4(normalizeAndValidateMainField, "normalizeAndValidateMainField");
|
|
42617
42640
|
function normalizeAndValidateBaseDirField(configPath, rawDir) {
|
|
42618
|
-
const configDir =
|
|
42641
|
+
const configDir = path2__default.dirname(configPath ?? "wrangler.toml");
|
|
42619
42642
|
if (rawDir !== void 0) if (typeof rawDir === "string") {
|
|
42620
|
-
const directory =
|
|
42621
|
-
return
|
|
42643
|
+
const directory = path2__default.resolve(configDir);
|
|
42644
|
+
return path2__default.resolve(directory, rawDir);
|
|
42622
42645
|
} else return rawDir;
|
|
42623
42646
|
else return;
|
|
42624
42647
|
}
|
|
42625
42648
|
__name$4(normalizeAndValidateBaseDirField, "normalizeAndValidateBaseDirField");
|
|
42626
42649
|
function normalizeAndValidatePagesBuildOutputDir(configPath, rawPagesDir) {
|
|
42627
|
-
const configDir =
|
|
42650
|
+
const configDir = path2__default.dirname(configPath ?? "wrangler.toml");
|
|
42628
42651
|
if (rawPagesDir !== void 0) if (typeof rawPagesDir === "string") {
|
|
42629
|
-
const directory =
|
|
42630
|
-
return
|
|
42652
|
+
const directory = path2__default.resolve(configDir);
|
|
42653
|
+
return path2__default.resolve(directory, rawPagesDir);
|
|
42631
42654
|
} else return rawPagesDir;
|
|
42632
42655
|
else return;
|
|
42633
42656
|
}
|
|
@@ -42681,7 +42704,7 @@ function normalizeAndValidateSite(diagnostics, configPath, rawConfig, mainEntryP
|
|
|
42681
42704
|
validateOptionalProperty(diagnostics, "site", "entry-point", legacySiteEntryPoint, "string");
|
|
42682
42705
|
deprecated(diagnostics, rawConfig, `site.entry-point`, `Delete the \`site.entry-point\` field, then add the top level \`main\` field to your configuration file:
|
|
42683
42706
|
\`\`\`
|
|
42684
|
-
main = "${
|
|
42707
|
+
main = "${path2__default.join(String(legacySiteEntryPoint) || "workers-site", path2__default.extname(String(legacySiteEntryPoint) || "workers-site") ? "" : "index.js")}"
|
|
42685
42708
|
\`\`\``, false, void 0, "warning");
|
|
42686
42709
|
let siteEntryPoint = legacySiteEntryPoint;
|
|
42687
42710
|
if (!mainEntryPoint && !siteEntryPoint) {
|
|
@@ -42694,7 +42717,7 @@ main = "workers-site/index.js"
|
|
|
42694
42717
|
} else if (mainEntryPoint && siteEntryPoint) diagnostics.errors.push(`Don't define both the \`main\` and \`site.entry-point\` fields in your configuration.
|
|
42695
42718
|
They serve the same purpose: to point to the entry-point of your worker.
|
|
42696
42719
|
Delete the deprecated \`site.entry-point\` field from your config.`);
|
|
42697
|
-
if (configPath && siteEntryPoint) siteEntryPoint =
|
|
42720
|
+
if (configPath && siteEntryPoint) siteEntryPoint = path2__default.relative(process.cwd(), path2__default.join(path2__default.dirname(configPath), siteEntryPoint));
|
|
42698
42721
|
return {
|
|
42699
42722
|
bucket,
|
|
42700
42723
|
"entry-point": siteEntryPoint,
|
|
@@ -42726,7 +42749,7 @@ function normalizeAndValidateModulePaths(diagnostics, configPath, field, rawMapp
|
|
|
42726
42749
|
if (rawMapping === void 0) return;
|
|
42727
42750
|
const mapping = {};
|
|
42728
42751
|
for (const [name, filePath] of Object.entries(rawMapping)) if (isString$2(diagnostics, `${field}['${name}']`, filePath, void 0)) {
|
|
42729
|
-
if (configPath) mapping[name] = configPath ?
|
|
42752
|
+
if (configPath) mapping[name] = configPath ? path2__default.relative(process.cwd(), path2__default.join(path2__default.dirname(configPath), filePath)) : filePath;
|
|
42730
42753
|
}
|
|
42731
42754
|
return mapping;
|
|
42732
42755
|
}
|
|
@@ -42973,6 +42996,7 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
|
|
|
42973
42996
|
logpush: inheritable(diagnostics, topLevelEnv, rawEnv, "logpush", isBoolean, void 0),
|
|
42974
42997
|
upload_source_maps: inheritable(diagnostics, topLevelEnv, rawEnv, "upload_source_maps", isBoolean, void 0),
|
|
42975
42998
|
observability: inheritable(diagnostics, topLevelEnv, rawEnv, "observability", validateObservability, void 0),
|
|
42999
|
+
access: inheritable(diagnostics, topLevelEnv, rawEnv, "access", validateAccess, void 0),
|
|
42976
43000
|
cache: inheritable(diagnostics, topLevelEnv, rawEnv, "cache", validateCache, void 0),
|
|
42977
43001
|
compliance_region: inheritable(diagnostics, topLevelEnv, rawEnv, "compliance_region", isOneOf("public", "fedramp_high"), void 0),
|
|
42978
43002
|
python_modules: inheritable(diagnostics, topLevelEnv, rawEnv, "python_modules", validatePythonModules, { exclude: ["**/*.pyc"] }),
|
|
@@ -42986,7 +43010,7 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
|
|
|
42986
43010
|
__name$4(normalizeAndValidateEnvironment, "normalizeAndValidateEnvironment");
|
|
42987
43011
|
function validateAndNormalizeTsconfig(diagnostics, topLevelEnv, rawEnv, configPath) {
|
|
42988
43012
|
const tsconfig = inheritable(diagnostics, topLevelEnv, rawEnv, "tsconfig", isString$2, void 0);
|
|
42989
|
-
return configPath && tsconfig ?
|
|
43013
|
+
return configPath && tsconfig ? path2__default.relative(process.cwd(), path2__default.join(path2__default.dirname(configPath), tsconfig)) : tsconfig;
|
|
42990
43014
|
}
|
|
42991
43015
|
__name$4(validateAndNormalizeTsconfig, "validateAndNormalizeTsconfig");
|
|
42992
43016
|
var validateAndNormalizeRules = /* @__PURE__ */ __name$4((diagnostics, topLevelEnv, rawEnv, envName) => {
|
|
@@ -43529,9 +43553,9 @@ function validateContainerApp(envName, topLevelName, configPath) {
|
|
|
43529
43553
|
let resolvedBuildContextPath = void 0;
|
|
43530
43554
|
try {
|
|
43531
43555
|
if (isDockerfile(resolvedImage, configPath)) {
|
|
43532
|
-
const baseDir$1 = configPath ?
|
|
43533
|
-
resolvedImage =
|
|
43534
|
-
resolvedBuildContextPath = containerAppOptional.image_build_context ?
|
|
43556
|
+
const baseDir$1 = configPath ? path2__default.dirname(configPath) : process.cwd();
|
|
43557
|
+
resolvedImage = path2__default.resolve(baseDir$1, resolvedImage);
|
|
43558
|
+
resolvedBuildContextPath = containerAppOptional.image_build_context ? path2__default.resolve(baseDir$1, containerAppOptional.image_build_context) : path2__default.dirname(resolvedImage);
|
|
43535
43559
|
}
|
|
43536
43560
|
} catch (err) {
|
|
43537
43561
|
if (err instanceof Error && err.message) diagnostics.errors.push(err.message);
|
|
@@ -44845,6 +44869,23 @@ function validateHeadSamplingRate(diagnostics, container, key, samplingRate) {
|
|
|
44845
44869
|
if (samplingRate && (samplingRate < 0 || samplingRate > 1)) diagnostics.errors.push(`"${container}.${key}" must be a value between 0 and 1.`);
|
|
44846
44870
|
}
|
|
44847
44871
|
__name$4(validateHeadSamplingRate, "validateHeadSamplingRate");
|
|
44872
|
+
var validateAccess = /* @__PURE__ */ __name$4((diagnostics, field, value) => {
|
|
44873
|
+
if (value === void 0) return true;
|
|
44874
|
+
if (typeof value !== "object" || value === null) {
|
|
44875
|
+
diagnostics.errors.push(`"${field}" should be an object but got ${JSON.stringify(value)}.`);
|
|
44876
|
+
return false;
|
|
44877
|
+
}
|
|
44878
|
+
const val = value;
|
|
44879
|
+
let isValid = true;
|
|
44880
|
+
isValid = validateOptionalProperty(diagnostics, field, "dev", val.dev, "object") && isValid;
|
|
44881
|
+
isValid = validateAdditionalProperties(diagnostics, field, Object.keys(val), ["dev"]) && isValid;
|
|
44882
|
+
if (typeof val.dev === "object" && val.dev !== null) {
|
|
44883
|
+
isValid = validateRequiredProperty(diagnostics, `${field}.dev`, "aud", val.dev.aud, "string") && isValid;
|
|
44884
|
+
isValid = validateOptionalProperty(diagnostics, `${field}.dev`, "identity", val.dev.identity, "object") && isValid;
|
|
44885
|
+
isValid = validateAdditionalProperties(diagnostics, `${field}.dev`, Object.keys(val.dev), ["aud", "identity"]) && isValid;
|
|
44886
|
+
}
|
|
44887
|
+
return isValid;
|
|
44888
|
+
}, "validateAccess");
|
|
44848
44889
|
var validateCache = /* @__PURE__ */ __name$4((diagnostics, field, value) => {
|
|
44849
44890
|
if (value === void 0) return true;
|
|
44850
44891
|
if (typeof value !== "object" || value === null) {
|
|
@@ -44908,8 +44949,8 @@ function isRemoteValid(targetObject, fieldPath, diagnostics) {
|
|
|
44908
44949
|
}
|
|
44909
44950
|
__name$4(isRemoteValid, "isRemoteValid");
|
|
44910
44951
|
function isDockerfile(imagePath, configPath) {
|
|
44911
|
-
const baseDir$1 = configPath ?
|
|
44912
|
-
const maybeDockerfile =
|
|
44952
|
+
const baseDir$1 = configPath ? path2__default.dirname(configPath) : process.cwd();
|
|
44953
|
+
const maybeDockerfile = path2__default.resolve(baseDir$1, imagePath);
|
|
44913
44954
|
if (fs2.existsSync(maybeDockerfile)) {
|
|
44914
44955
|
if (isDirectory$1(maybeDockerfile)) throw new UserError(`${imagePath} is a directory, you should specify a path to the Dockerfile`, { telemetryMessage: false });
|
|
44915
44956
|
return true;
|
|
@@ -45060,10 +45101,10 @@ Pages requires Durable Object bindings to specify the name of the Worker where t
|
|
|
45060
45101
|
__name$4(validateDurableObjectBinding2, "validateDurableObjectBinding");
|
|
45061
45102
|
function getPackagePath(packageName, projectPath) {
|
|
45062
45103
|
try {
|
|
45063
|
-
return
|
|
45104
|
+
return path2__default.dirname(__require$1.resolve(`${packageName}/package.json`, { paths: [projectPath] }));
|
|
45064
45105
|
} catch {}
|
|
45065
45106
|
try {
|
|
45066
|
-
return
|
|
45107
|
+
return path2__default.dirname(__require$1.resolve(packageName, { paths: [projectPath] }));
|
|
45067
45108
|
} catch {}
|
|
45068
45109
|
}
|
|
45069
45110
|
__name$4(getPackagePath, "getPackagePath");
|
|
@@ -45088,14 +45129,14 @@ function getInstalledPackageVersion(packageName, projectPath, opts = {}) {
|
|
|
45088
45129
|
__name$4(getInstalledPackageVersion, "getInstalledPackageVersion");
|
|
45089
45130
|
function findFileUp(name, startDir, lastDir) {
|
|
45090
45131
|
let dir2 = startDir;
|
|
45091
|
-
const root =
|
|
45132
|
+
const root = path2__default.parse(dir2).root;
|
|
45092
45133
|
while (true) {
|
|
45093
|
-
const candidate =
|
|
45134
|
+
const candidate = path2__default.join(dir2, name);
|
|
45094
45135
|
try {
|
|
45095
45136
|
if (statSync(candidate).isFile()) return candidate;
|
|
45096
45137
|
} catch {}
|
|
45097
45138
|
if (lastDir !== void 0 && dir2 === lastDir) break;
|
|
45098
|
-
const parent =
|
|
45139
|
+
const parent = path2__default.dirname(dir2);
|
|
45099
45140
|
if (parent === dir2 || dir2 === root) break;
|
|
45100
45141
|
dir2 = parent;
|
|
45101
45142
|
}
|
|
@@ -45361,7 +45402,7 @@ var process3 = globalThis.process;
|
|
|
45361
45402
|
var { onExit, load: load$1, unload: unload$1 } = signalExitWrap(processOk$1(process3) ? new SignalExit(process3) : new SignalExitFallback());
|
|
45362
45403
|
function getWranglerHiddenDirPath(projectRoot) {
|
|
45363
45404
|
projectRoot ??= process.cwd();
|
|
45364
|
-
return
|
|
45405
|
+
return path2__default.join(projectRoot, ".wrangler");
|
|
45365
45406
|
}
|
|
45366
45407
|
__name$4(getWranglerHiddenDirPath, "getWranglerHiddenDirPath");
|
|
45367
45408
|
var STALE_WRANGLER_TMP_DIR_MS = 1440 * 60 * 1e3;
|
|
@@ -45378,7 +45419,7 @@ function sweepStaleWranglerTmpDirs(tmpRoot) {
|
|
|
45378
45419
|
const cutoff = Date.now() - STALE_WRANGLER_TMP_DIR_MS;
|
|
45379
45420
|
for (const entry of entries) {
|
|
45380
45421
|
if (!entry.isDirectory()) continue;
|
|
45381
|
-
const entryPath =
|
|
45422
|
+
const entryPath = path2__default.join(tmpRoot, entry.name);
|
|
45382
45423
|
try {
|
|
45383
45424
|
if (fs2.statSync(entryPath).mtimeMs < cutoff) removeDirSync$1(entryPath);
|
|
45384
45425
|
} catch {}
|
|
@@ -45386,10 +45427,10 @@ function sweepStaleWranglerTmpDirs(tmpRoot) {
|
|
|
45386
45427
|
}
|
|
45387
45428
|
__name$4(sweepStaleWranglerTmpDirs, "sweepStaleWranglerTmpDirs");
|
|
45388
45429
|
function getWranglerTmpDir(projectRoot, prefix, cleanup = true) {
|
|
45389
|
-
const tmpRoot =
|
|
45430
|
+
const tmpRoot = path2__default.join(getWranglerHiddenDirPath(projectRoot), "tmp");
|
|
45390
45431
|
fs2.mkdirSync(tmpRoot, { recursive: true });
|
|
45391
45432
|
sweepStaleWranglerTmpDirs(tmpRoot);
|
|
45392
|
-
const tmpPrefix =
|
|
45433
|
+
const tmpPrefix = path2__default.join(tmpRoot, `${prefix}-`);
|
|
45393
45434
|
const tmpDir = fs2.realpathSync(fs2.mkdtempSync(tmpPrefix));
|
|
45394
45435
|
const cleanupDir = /* @__PURE__ */ __name$4(() => {
|
|
45395
45436
|
if (cleanup) try {
|
|
@@ -46265,7 +46306,7 @@ async function fetchLatestNpmVersion(name, version2) {
|
|
|
46265
46306
|
__name$4(fetchLatestNpmVersion, "fetchLatestNpmVersion");
|
|
46266
46307
|
async function openInBrowser(url2, logger$1) {
|
|
46267
46308
|
try {
|
|
46268
|
-
const { default: open$1 } = await import("./open-PBXRGS4R-
|
|
46309
|
+
const { default: open$1 } = await import("./open-PBXRGS4R-7GUxLVbA.mjs");
|
|
46269
46310
|
(await open$1(url2)).on("error", (err) => {
|
|
46270
46311
|
handleBrowserOpenError(url2, err, logger$1);
|
|
46271
46312
|
});
|
|
@@ -48821,8 +48862,8 @@ const postfixRE = /[?#].*$/;
|
|
|
48821
48862
|
function cleanUrl(url$2) {
|
|
48822
48863
|
return url$2.replace(postfixRE, "");
|
|
48823
48864
|
}
|
|
48824
|
-
function withTrailingSlash(path$
|
|
48825
|
-
return path$
|
|
48865
|
+
function withTrailingSlash(path$1) {
|
|
48866
|
+
return path$1.endsWith("/") ? path$1 : `${path$1}/`;
|
|
48826
48867
|
}
|
|
48827
48868
|
function createRequestHandler(handler) {
|
|
48828
48869
|
return async (req, res, next) => {
|
|
@@ -49461,11 +49502,11 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
49461
49502
|
for (let i$1 = startIndex; i$1 < x.issues.length; i$1++) if (x.issues[i$1]?.continue === false) return true;
|
|
49462
49503
|
return false;
|
|
49463
49504
|
}
|
|
49464
|
-
function prefixIssues(path$
|
|
49505
|
+
function prefixIssues(path$1, issues) {
|
|
49465
49506
|
return issues.map((iss) => {
|
|
49466
49507
|
var _a$3;
|
|
49467
49508
|
(_a$3 = iss).path ?? (_a$3.path = []);
|
|
49468
|
-
iss.path.unshift(path$
|
|
49509
|
+
iss.path.unshift(path$1);
|
|
49469
49510
|
return iss;
|
|
49470
49511
|
});
|
|
49471
49512
|
}
|
|
@@ -49530,12 +49571,12 @@ function flattenError(error$2, mapper = (issue$2) => issue$2.message) {
|
|
|
49530
49571
|
}
|
|
49531
49572
|
function formatError(error$2, mapper = (issue$2) => issue$2.message) {
|
|
49532
49573
|
const fieldErrors = { _errors: [] };
|
|
49533
|
-
const processError = (error$3, path$
|
|
49534
|
-
for (const issue$2 of error$3.issues) if (issue$2.code === "invalid_union" && issue$2.errors.length) issue$2.errors.map((issues) => processError({ issues }, [...path$
|
|
49535
|
-
else if (issue$2.code === "invalid_key") processError({ issues: issue$2.issues }, [...path$
|
|
49536
|
-
else if (issue$2.code === "invalid_element") processError({ issues: issue$2.issues }, [...path$
|
|
49574
|
+
const processError = (error$3, path$1 = []) => {
|
|
49575
|
+
for (const issue$2 of error$3.issues) if (issue$2.code === "invalid_union" && issue$2.errors.length) issue$2.errors.map((issues) => processError({ issues }, [...path$1, ...issue$2.path]));
|
|
49576
|
+
else if (issue$2.code === "invalid_key") processError({ issues: issue$2.issues }, [...path$1, ...issue$2.path]);
|
|
49577
|
+
else if (issue$2.code === "invalid_element") processError({ issues: issue$2.issues }, [...path$1, ...issue$2.path]);
|
|
49537
49578
|
else {
|
|
49538
|
-
const fullpath = [...path$
|
|
49579
|
+
const fullpath = [...path$1, ...issue$2.path];
|
|
49539
49580
|
if (fullpath.length === 0) fieldErrors._errors.push(mapper(issue$2));
|
|
49540
49581
|
else {
|
|
49541
49582
|
let curr = fieldErrors;
|
|
@@ -49738,8 +49779,8 @@ function datetime$1(args) {
|
|
|
49738
49779
|
return /* @__PURE__ */ new RegExp(`^${dateSource}T(?:${timeRegex})$`);
|
|
49739
49780
|
}
|
|
49740
49781
|
const string$1 = (params) => {
|
|
49741
|
-
const regex$
|
|
49742
|
-
return /* @__PURE__ */ new RegExp(`^${regex$
|
|
49782
|
+
const regex$2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
49783
|
+
return /* @__PURE__ */ new RegExp(`^${regex$2}$`);
|
|
49743
49784
|
};
|
|
49744
49785
|
const integer = /^-?\d+$/;
|
|
49745
49786
|
const number$1 = /^-?\d+(?:\.\d+)?$/;
|
|
@@ -52408,9 +52449,9 @@ const stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
52408
52449
|
if (patterns && patterns.size > 0) {
|
|
52409
52450
|
const regexes = [...patterns];
|
|
52410
52451
|
if (regexes.length === 1) json$2.pattern = regexes[0].source;
|
|
52411
|
-
else if (regexes.length > 1) json$2.allOf = [...regexes.map((regex$
|
|
52452
|
+
else if (regexes.length > 1) json$2.allOf = [...regexes.map((regex$2) => ({
|
|
52412
52453
|
...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
|
|
52413
|
-
pattern: regex$
|
|
52454
|
+
pattern: regex$2.source
|
|
52414
52455
|
}))];
|
|
52415
52456
|
}
|
|
52416
52457
|
};
|
|
@@ -56508,7 +56549,7 @@ function resolveWranglerConfigPath({ config: config$2, script }, options) {
|
|
|
56508
56549
|
deployConfigPath: void 0,
|
|
56509
56550
|
redirected: false
|
|
56510
56551
|
};
|
|
56511
|
-
return findWranglerConfig$1(script !== void 0 ?
|
|
56552
|
+
return findWranglerConfig$1(script !== void 0 ? path2__default.dirname(script) : process.cwd(), options);
|
|
56512
56553
|
}
|
|
56513
56554
|
__name$3(resolveWranglerConfigPath, "resolveWranglerConfigPath");
|
|
56514
56555
|
function findWranglerConfig$1(referencePath = process.cwd(), { useRedirectIfAvailable = false } = {}) {
|
|
@@ -56539,15 +56580,15 @@ function findRedirectedWranglerConfig(cwd, userConfigPath) {
|
|
|
56539
56580
|
const deployConfigFile = readFileSync$1$1(deployConfigPath);
|
|
56540
56581
|
try {
|
|
56541
56582
|
const deployConfig = parseJSONC(deployConfigFile, deployConfigPath);
|
|
56542
|
-
redirectedConfigPath = deployConfig.configPath &&
|
|
56583
|
+
redirectedConfigPath = deployConfig.configPath && path2__default.resolve(path2__default.dirname(deployConfigPath), deployConfig.configPath);
|
|
56543
56584
|
} catch (e) {
|
|
56544
|
-
throw new UserError$1(`Failed to parse the deploy configuration file at ${
|
|
56585
|
+
throw new UserError$1(`Failed to parse the deploy configuration file at ${path2__default.relative(".", deployConfigPath)}`, {
|
|
56545
56586
|
cause: e,
|
|
56546
56587
|
telemetryMessage: false
|
|
56547
56588
|
});
|
|
56548
56589
|
}
|
|
56549
56590
|
if (!redirectedConfigPath) throw new UserError$1(esm_default$1`
|
|
56550
|
-
A deploy configuration file was found at "${
|
|
56591
|
+
A deploy configuration file was found at "${path2__default.relative(".", deployConfigPath)}".
|
|
56551
56592
|
But this is not valid - the required "configPath" property was not found.
|
|
56552
56593
|
Instead this file contains:
|
|
56553
56594
|
\`\`\`
|
|
@@ -56555,13 +56596,13 @@ function findRedirectedWranglerConfig(cwd, userConfigPath) {
|
|
|
56555
56596
|
\`\`\`
|
|
56556
56597
|
`, { telemetryMessage: false });
|
|
56557
56598
|
if (!existsSync(redirectedConfigPath)) throw new UserError$1(esm_default$1`
|
|
56558
|
-
There is a deploy configuration at "${
|
|
56559
|
-
But the redirected configuration path it points to, "${
|
|
56599
|
+
There is a deploy configuration at "${path2__default.relative(".", deployConfigPath)}".
|
|
56600
|
+
But the redirected configuration path it points to, "${path2__default.relative(".", redirectedConfigPath)}", does not exist.
|
|
56560
56601
|
`, { telemetryMessage: false });
|
|
56561
56602
|
if (userConfigPath) {
|
|
56562
|
-
if (
|
|
56563
|
-
Found both a user configuration file at "${
|
|
56564
|
-
and a deploy configuration file at "${
|
|
56603
|
+
if (path2__default.join(path2__default.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG) !== deployConfigPath) throw new UserError$1(esm_default$1`
|
|
56604
|
+
Found both a user configuration file at "${path2__default.relative(".", userConfigPath)}"
|
|
56605
|
+
and a deploy configuration file at "${path2__default.relative(".", deployConfigPath)}".
|
|
56565
56606
|
But these do not share the same base path so it is not clear which should be used.
|
|
56566
56607
|
`, { telemetryMessage: false });
|
|
56567
56608
|
}
|
|
@@ -57358,9 +57399,9 @@ async function generate({ compatibilityDate, compatibilityFlags = [] }) {
|
|
|
57358
57399
|
modules: true,
|
|
57359
57400
|
script: (await fsp.readFile(require$1.resolve("workerd/worker.mjs"))).toString()
|
|
57360
57401
|
}));
|
|
57361
|
-
const path$
|
|
57402
|
+
const path$1 = `http://dummy.com/${compatibilityDate}${compatibilityFlags.length ? `+${compatibilityFlags.join("+")}` : ""}`;
|
|
57362
57403
|
try {
|
|
57363
|
-
const res = await mf.dispatchFetch(path$
|
|
57404
|
+
const res = await mf.dispatchFetch(path$1);
|
|
57364
57405
|
const text = await res.text();
|
|
57365
57406
|
if (!res.ok) throw new Error(text);
|
|
57366
57407
|
return text;
|
|
@@ -57555,8 +57596,8 @@ var __name$2 = (target$1, value) => __defProp$2(target$1, "name", {
|
|
|
57555
57596
|
value,
|
|
57556
57597
|
configurable: true
|
|
57557
57598
|
});
|
|
57558
|
-
function isDirectory(path$1
|
|
57559
|
-
return fs2.statSync(path$1
|
|
57599
|
+
function isDirectory(path$1) {
|
|
57600
|
+
return fs2.statSync(path$1, { throwIfNoEntry: false })?.isDirectory() ?? false;
|
|
57560
57601
|
}
|
|
57561
57602
|
__name$2(isDirectory, "isDirectory");
|
|
57562
57603
|
function removeDir(dirPath, { fireAndForget = false } = {}) {
|
|
@@ -62866,15 +62907,15 @@ function hasTrailingSlash(input = "", respectQueryAndFragment) {
|
|
|
62866
62907
|
function withTrailingSlash$1(input = "", respectQueryAndFragment) {
|
|
62867
62908
|
if (!respectQueryAndFragment) return input.endsWith("/") ? input : input + "/";
|
|
62868
62909
|
if (hasTrailingSlash(input, true)) return input || "/";
|
|
62869
|
-
let path$
|
|
62910
|
+
let path$1 = input;
|
|
62870
62911
|
let fragment = "";
|
|
62871
62912
|
const fragmentIndex = input.indexOf("#");
|
|
62872
62913
|
if (fragmentIndex >= 0) {
|
|
62873
|
-
path$
|
|
62914
|
+
path$1 = input.slice(0, fragmentIndex);
|
|
62874
62915
|
fragment = input.slice(fragmentIndex);
|
|
62875
|
-
if (!path$
|
|
62916
|
+
if (!path$1) return fragment;
|
|
62876
62917
|
}
|
|
62877
|
-
const [s0, ...s] = path$
|
|
62918
|
+
const [s0, ...s] = path$1.split("?");
|
|
62878
62919
|
return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
|
|
62879
62920
|
}
|
|
62880
62921
|
function isNonEmptyURL(url$2) {
|
|
@@ -62900,8 +62941,8 @@ const isAbsolute$2 = function(p$2) {
|
|
|
62900
62941
|
//#endregion
|
|
62901
62942
|
//#region ../../node_modules/.pnpm/mlly@1.7.4/node_modules/mlly/dist/index.mjs
|
|
62902
62943
|
const BUILTIN_MODULES = new Set(builtinModules);
|
|
62903
|
-
function normalizeSlash(path$
|
|
62904
|
-
return path$
|
|
62944
|
+
function normalizeSlash(path$1) {
|
|
62945
|
+
return path$1.replace(/\\/g, "/");
|
|
62905
62946
|
}
|
|
62906
62947
|
/**
|
|
62907
62948
|
* @typedef ErrnoExceptionFields
|
|
@@ -63021,8 +63062,8 @@ codes.ERR_INVALID_PACKAGE_CONFIG = createError(
|
|
|
63021
63062
|
* @param {string} [base]
|
|
63022
63063
|
* @param {string} [message]
|
|
63023
63064
|
*/
|
|
63024
|
-
(path$
|
|
63025
|
-
return `Invalid package config ${path$
|
|
63065
|
+
(path$1, base, message) => {
|
|
63066
|
+
return `Invalid package config ${path$1}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
|
|
63026
63067
|
},
|
|
63027
63068
|
Error
|
|
63028
63069
|
);
|
|
@@ -63052,8 +63093,8 @@ codes.ERR_MODULE_NOT_FOUND = createError(
|
|
|
63052
63093
|
* @param {string} base
|
|
63053
63094
|
* @param {boolean} [exactUrl]
|
|
63054
63095
|
*/
|
|
63055
|
-
(path$
|
|
63056
|
-
return `Cannot find ${exactUrl ? "module" : "package"} '${path$
|
|
63096
|
+
(path$1, base, exactUrl = false) => {
|
|
63097
|
+
return `Cannot find ${exactUrl ? "module" : "package"} '${path$1}' imported from ${base}`;
|
|
63057
63098
|
},
|
|
63058
63099
|
Error
|
|
63059
63100
|
);
|
|
@@ -63091,8 +63132,8 @@ codes.ERR_UNKNOWN_FILE_EXTENSION = createError(
|
|
|
63091
63132
|
* @param {string} extension
|
|
63092
63133
|
* @param {string} path
|
|
63093
63134
|
*/
|
|
63094
|
-
(extension, path$
|
|
63095
|
-
return `Unknown file extension "${extension}" for ${path$
|
|
63135
|
+
(extension, path$1) => {
|
|
63136
|
+
return `Unknown file extension "${extension}" for ${path$1}`;
|
|
63096
63137
|
},
|
|
63097
63138
|
TypeError
|
|
63098
63139
|
);
|
|
@@ -63210,9 +63251,9 @@ function getMessage(key, parameters, self) {
|
|
|
63210
63251
|
assert(message.length <= parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`);
|
|
63211
63252
|
return Reflect.apply(message, self, parameters);
|
|
63212
63253
|
}
|
|
63213
|
-
const regex$
|
|
63254
|
+
const regex$2 = /%[dfijoOs]/g;
|
|
63214
63255
|
let expectedLength = 0;
|
|
63215
|
-
while (regex$
|
|
63256
|
+
while (regex$2.exec(message) !== null) expectedLength++;
|
|
63216
63257
|
assert(expectedLength === parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`);
|
|
63217
63258
|
if (parameters.length === 0) return message;
|
|
63218
63259
|
parameters.unshift(message);
|
|
@@ -63249,7 +63290,7 @@ function read(jsonPath, { base, specifier }) {
|
|
|
63249
63290
|
/** @type {string | undefined} */
|
|
63250
63291
|
let string$3;
|
|
63251
63292
|
try {
|
|
63252
|
-
string$3 = fs2.readFileSync(
|
|
63293
|
+
string$3 = fs2.readFileSync(path2__default.toNamespacedPath(jsonPath), "utf8");
|
|
63253
63294
|
} catch (error$2) {
|
|
63254
63295
|
const exception = error$2;
|
|
63255
63296
|
if (exception.code !== "ENOENT") throw exception;
|
|
@@ -63455,15 +63496,15 @@ function emitLegacyIndexDeprecation(url$2, packageJsonUrl, base, main) {
|
|
|
63455
63496
|
const packagePath = fileURLToPath(new URL$1(".", packageJsonUrl));
|
|
63456
63497
|
const basePath = fileURLToPath(base);
|
|
63457
63498
|
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");
|
|
63458
|
-
else if (
|
|
63499
|
+
else if (path2__default.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");
|
|
63459
63500
|
}
|
|
63460
63501
|
/**
|
|
63461
63502
|
* @param {string} path
|
|
63462
63503
|
* @returns {Stats | undefined}
|
|
63463
63504
|
*/
|
|
63464
|
-
function tryStatSync(path$
|
|
63505
|
+
function tryStatSync(path$1) {
|
|
63465
63506
|
try {
|
|
63466
|
-
return statSync(path$
|
|
63507
|
+
return statSync(path$1);
|
|
63467
63508
|
} catch {}
|
|
63468
63509
|
}
|
|
63469
63510
|
/**
|
|
@@ -63562,7 +63603,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
|
63562
63603
|
{
|
|
63563
63604
|
const real = realpathSync(filePath);
|
|
63564
63605
|
const { search, hash: hash$1 } = resolved;
|
|
63565
|
-
resolved = pathToFileURL(real + (filePath.endsWith(
|
|
63606
|
+
resolved = pathToFileURL(real + (filePath.endsWith(path2__default.sep) ? "/" : ""));
|
|
63566
63607
|
resolved.search = search;
|
|
63567
63608
|
resolved.hash = hash$1;
|
|
63568
63609
|
}
|
|
@@ -66868,9 +66909,9 @@ function constructHeaders({ headers, headersFile, logger: logger$1 }) {
|
|
|
66868
66909
|
|
|
66869
66910
|
//#endregion
|
|
66870
66911
|
//#region ../workers-shared/utils/configuration/validateURL.ts
|
|
66871
|
-
const extractPathname = (path$
|
|
66872
|
-
if (!path$
|
|
66873
|
-
const url$2 = new URL(`//${path$
|
|
66912
|
+
const extractPathname = (path$1 = "/", includeSearch, includeHash) => {
|
|
66913
|
+
if (!path$1.startsWith("/")) path$1 = `/${path$1}`;
|
|
66914
|
+
const url$2 = new URL(`//${path$1}`, "relative://");
|
|
66874
66915
|
return `${url$2.pathname}${includeSearch ? url$2.search : ""}${includeHash ? url$2.hash : ""}`;
|
|
66875
66916
|
};
|
|
66876
66917
|
const URL_REGEX = /^https:\/\/+(?<host>[^/]+)\/?(?<path>.*)/;
|
|
@@ -66929,7 +66970,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
|
|
|
66929
66970
|
lineNumber: i$1 + 1,
|
|
66930
66971
|
message: "No headers specified"
|
|
66931
66972
|
});
|
|
66932
|
-
const [path$
|
|
66973
|
+
const [path$1, pathError] = validateUrl(line, false, true);
|
|
66933
66974
|
if (pathError) {
|
|
66934
66975
|
invalid.push({
|
|
66935
66976
|
line,
|
|
@@ -66940,7 +66981,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
|
|
|
66940
66981
|
skipUntilNextPath = true;
|
|
66941
66982
|
continue;
|
|
66942
66983
|
}
|
|
66943
|
-
const wildcardError = validateNoMultipleWildcards(path$
|
|
66984
|
+
const wildcardError = validateNoMultipleWildcards(path$1);
|
|
66944
66985
|
if (wildcardError) {
|
|
66945
66986
|
invalid.push({
|
|
66946
66987
|
line,
|
|
@@ -66952,7 +66993,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
|
|
|
66952
66993
|
continue;
|
|
66953
66994
|
}
|
|
66954
66995
|
rule = {
|
|
66955
|
-
path: path$
|
|
66996
|
+
path: path$1,
|
|
66956
66997
|
line,
|
|
66957
66998
|
headers: {},
|
|
66958
66999
|
unsetHeaders: []
|
|
@@ -67035,11 +67076,11 @@ function isValidRule(rule) {
|
|
|
67035
67076
|
* `:splat` placeholder, would result in duplicate `:splat` parameters which is
|
|
67036
67077
|
* unsupported.
|
|
67037
67078
|
*/
|
|
67038
|
-
function validateNoMultipleWildcards(path$
|
|
67039
|
-
const wildcardCount = (path$
|
|
67040
|
-
const hasSplatPlaceholder = /:splat(?!\w)/.test(path$
|
|
67041
|
-
if (wildcardCount > 1) return `Only one wildcard is allowed per rule. Use a named placeholder (e.g. :project) instead. Skipping ${path$
|
|
67042
|
-
if (wildcardCount > 0 && hasSplatPlaceholder) return `Cannot combine a wildcard * with a :splat placeholder because wildcards are converted to :splat at runtime. Skipping ${path$
|
|
67079
|
+
function validateNoMultipleWildcards(path$1) {
|
|
67080
|
+
const wildcardCount = (path$1.match(SPLAT_REGEX) ?? []).length;
|
|
67081
|
+
const hasSplatPlaceholder = /:splat(?!\w)/.test(path$1);
|
|
67082
|
+
if (wildcardCount > 1) return `Only one wildcard is allowed per rule. Use a named placeholder (e.g. :project) instead. Skipping ${path$1}.`;
|
|
67083
|
+
if (wildcardCount > 0 && hasSplatPlaceholder) return `Cannot combine a wildcard * with a :splat placeholder because wildcards are converted to :splat at runtime. Skipping ${path$1}.`;
|
|
67043
67084
|
}
|
|
67044
67085
|
|
|
67045
67086
|
//#endregion
|
|
@@ -67235,11 +67276,11 @@ var require_ignore = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/ig
|
|
|
67235
67276
|
const checkPattern = (pattern) => pattern && isString$1(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0;
|
|
67236
67277
|
const splitPattern$1 = (pattern) => pattern.split(REGEX_SPLITALL_CRLF);
|
|
67237
67278
|
var IgnoreRule = class {
|
|
67238
|
-
constructor(origin, pattern, negative, regex$
|
|
67279
|
+
constructor(origin, pattern, negative, regex$2) {
|
|
67239
67280
|
this.origin = origin;
|
|
67240
67281
|
this.pattern = pattern;
|
|
67241
67282
|
this.negative = negative;
|
|
67242
|
-
this.regex = regex$
|
|
67283
|
+
this.regex = regex$2;
|
|
67243
67284
|
}
|
|
67244
67285
|
};
|
|
67245
67286
|
const createRule = (pattern, ignoreCase) => {
|
|
@@ -67250,19 +67291,19 @@ var require_ignore = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/ig
|
|
|
67250
67291
|
pattern = pattern.substr(1);
|
|
67251
67292
|
}
|
|
67252
67293
|
pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
|
|
67253
|
-
const regex$
|
|
67254
|
-
return new IgnoreRule(origin, pattern, negative, regex$
|
|
67294
|
+
const regex$2 = makeRegex(pattern, ignoreCase);
|
|
67295
|
+
return new IgnoreRule(origin, pattern, negative, regex$2);
|
|
67255
67296
|
};
|
|
67256
67297
|
const throwError = (message, Ctor) => {
|
|
67257
67298
|
throw new Ctor(message);
|
|
67258
67299
|
};
|
|
67259
|
-
const checkPath = (path$
|
|
67260
|
-
if (!isString$1(path$
|
|
67261
|
-
if (!path$
|
|
67262
|
-
if (checkPath.isNotRelative(path$
|
|
67300
|
+
const checkPath = (path$1, originalPath, doThrow) => {
|
|
67301
|
+
if (!isString$1(path$1)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
|
|
67302
|
+
if (!path$1) return doThrow(`path must not be empty`, TypeError);
|
|
67303
|
+
if (checkPath.isNotRelative(path$1)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
|
|
67263
67304
|
return true;
|
|
67264
67305
|
};
|
|
67265
|
-
const isNotRelative = (path$
|
|
67306
|
+
const isNotRelative = (path$1) => REGEX_TEST_INVALID_PATH.test(path$1);
|
|
67266
67307
|
checkPath.isNotRelative = isNotRelative;
|
|
67267
67308
|
checkPath.convert = (p$2) => p$2;
|
|
67268
67309
|
var Ignore = class {
|
|
@@ -67298,13 +67339,13 @@ var require_ignore = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/ig
|
|
|
67298
67339
|
addPattern(pattern) {
|
|
67299
67340
|
return this.add(pattern);
|
|
67300
67341
|
}
|
|
67301
|
-
_testOne(path$
|
|
67342
|
+
_testOne(path$1, checkUnignored) {
|
|
67302
67343
|
let ignored = false;
|
|
67303
67344
|
let unignored = false;
|
|
67304
67345
|
this._rules.forEach((rule) => {
|
|
67305
67346
|
const { negative } = rule;
|
|
67306
67347
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) return;
|
|
67307
|
-
if (rule.regex.test(path$
|
|
67348
|
+
if (rule.regex.test(path$1)) {
|
|
67308
67349
|
ignored = !negative;
|
|
67309
67350
|
unignored = negative;
|
|
67310
67351
|
}
|
|
@@ -67315,33 +67356,33 @@ var require_ignore = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/ig
|
|
|
67315
67356
|
};
|
|
67316
67357
|
}
|
|
67317
67358
|
_test(originalPath, cache$2, checkUnignored, slices) {
|
|
67318
|
-
const path$
|
|
67319
|
-
checkPath(path$
|
|
67320
|
-
return this._t(path$
|
|
67359
|
+
const path$1 = originalPath && checkPath.convert(originalPath);
|
|
67360
|
+
checkPath(path$1, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError);
|
|
67361
|
+
return this._t(path$1, cache$2, checkUnignored, slices);
|
|
67321
67362
|
}
|
|
67322
|
-
_t(path$
|
|
67323
|
-
if (path$
|
|
67324
|
-
if (!slices) slices = path$
|
|
67363
|
+
_t(path$1, cache$2, checkUnignored, slices) {
|
|
67364
|
+
if (path$1 in cache$2) return cache$2[path$1];
|
|
67365
|
+
if (!slices) slices = path$1.split(SLASH);
|
|
67325
67366
|
slices.pop();
|
|
67326
|
-
if (!slices.length) return cache$2[path$
|
|
67367
|
+
if (!slices.length) return cache$2[path$1] = this._testOne(path$1, checkUnignored);
|
|
67327
67368
|
const parent = this._t(slices.join(SLASH) + SLASH, cache$2, checkUnignored, slices);
|
|
67328
|
-
return cache$2[path$
|
|
67369
|
+
return cache$2[path$1] = parent.ignored ? parent : this._testOne(path$1, checkUnignored);
|
|
67329
67370
|
}
|
|
67330
|
-
ignores(path$
|
|
67331
|
-
return this._test(path$
|
|
67371
|
+
ignores(path$1) {
|
|
67372
|
+
return this._test(path$1, this._ignoreCache, false).ignored;
|
|
67332
67373
|
}
|
|
67333
67374
|
createFilter() {
|
|
67334
|
-
return (path$
|
|
67375
|
+
return (path$1) => !this.ignores(path$1);
|
|
67335
67376
|
}
|
|
67336
67377
|
filter(paths) {
|
|
67337
67378
|
return makeArray(paths).filter(this.createFilter());
|
|
67338
67379
|
}
|
|
67339
|
-
test(path$
|
|
67340
|
-
return this._test(path$
|
|
67380
|
+
test(path$1) {
|
|
67381
|
+
return this._test(path$1, this._testCache, true);
|
|
67341
67382
|
}
|
|
67342
67383
|
};
|
|
67343
67384
|
const factory = (options) => new Ignore(options);
|
|
67344
|
-
const isPathValid = (path$
|
|
67385
|
+
const isPathValid = (path$1) => checkPath(path$1 && checkPath.convert(path$1), path$1, RETURN_FALSE);
|
|
67345
67386
|
factory.isPathValid = isPathValid;
|
|
67346
67387
|
factory.default = factory;
|
|
67347
67388
|
module.exports = factory;
|
|
@@ -67350,7 +67391,7 @@ var require_ignore = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/ig
|
|
|
67350
67391
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
67351
67392
|
checkPath.convert = makePosix;
|
|
67352
67393
|
const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
67353
|
-
checkPath.isNotRelative = (path$
|
|
67394
|
+
checkPath.isNotRelative = (path$1) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path$1) || isNotRelative(path$1);
|
|
67354
67395
|
}
|
|
67355
67396
|
}) });
|
|
67356
67397
|
|
|
@@ -68705,11 +68746,11 @@ var Mime = class {
|
|
|
68705
68746
|
}
|
|
68706
68747
|
return this;
|
|
68707
68748
|
}
|
|
68708
|
-
getType(path$
|
|
68709
|
-
if (typeof path$
|
|
68710
|
-
const last = path$
|
|
68749
|
+
getType(path$1) {
|
|
68750
|
+
if (typeof path$1 !== "string") return null;
|
|
68751
|
+
const last = path$1.replace(/^.*[/\\]/s, "").toLowerCase();
|
|
68711
68752
|
const ext = last.replace(/^.*\./s, "").toLowerCase();
|
|
68712
|
-
const hasPath = last.length < path$
|
|
68753
|
+
const hasPath = last.length < path$1.length;
|
|
68713
68754
|
if (!(ext.length < last.length - 1) && hasPath) return null;
|
|
68714
68755
|
return __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(ext) ?? null;
|
|
68715
68756
|
}
|
|
@@ -69482,11 +69523,11 @@ const getQueryString = (params) => {
|
|
|
69482
69523
|
};
|
|
69483
69524
|
const getUrl = (config$2, options) => {
|
|
69484
69525
|
const encoder$1 = config$2.ENCODE_PATH || encodeURI;
|
|
69485
|
-
const path$
|
|
69526
|
+
const path$1 = options.url.replace("{api-version}", config$2.VERSION).replace(/{(.*?)}/g, (substring, group) => {
|
|
69486
69527
|
if (options.path?.hasOwnProperty(group)) return encoder$1(String(options.path[group]));
|
|
69487
69528
|
return substring;
|
|
69488
69529
|
});
|
|
69489
|
-
const url$2 = `${config$2.BASE}${path$
|
|
69530
|
+
const url$2 = `${config$2.BASE}${path$1}`;
|
|
69490
69531
|
if (options.query) return `${url$2}${getQueryString(options.query)}`;
|
|
69491
69532
|
return url$2;
|
|
69492
69533
|
};
|
|
@@ -70584,7 +70625,7 @@ function getContainerOptions(options) {
|
|
|
70584
70625
|
return containersConfig.map((container) => {
|
|
70585
70626
|
if (isDockerfile(container.image, configPath)) return {
|
|
70586
70627
|
dockerfile: container.image,
|
|
70587
|
-
image_build_context: container.image_build_context ??
|
|
70628
|
+
image_build_context: container.image_build_context ?? path2__default.dirname(container.image),
|
|
70588
70629
|
image_vars: container.image_vars,
|
|
70589
70630
|
class_name: container.class_name,
|
|
70590
70631
|
image_tag: getDevContainerImageName(container.class_name, containerBuildId)
|
|
@@ -72250,8 +72291,8 @@ const cancel = (msg, { shape = shapes.corners.bl, multiline = false } = {}) => {
|
|
|
72250
72291
|
};
|
|
72251
72292
|
const stripAnsi = (str) => {
|
|
72252
72293
|
const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
72253
|
-
const regex$
|
|
72254
|
-
return str.replace(linkRegex, "$2").replace(regex$
|
|
72294
|
+
const regex$2 = RegExp(pattern, "g");
|
|
72295
|
+
return str.replace(linkRegex, "$2").replace(regex$2, "");
|
|
72255
72296
|
};
|
|
72256
72297
|
const linkRegex = /\u001B\]8;;(?<url>.+)\u001B\\(?<label>.+)\u001B\]8;;\u001B\\/g;
|
|
72257
72298
|
const crash = (msg, extra) => {
|
|
@@ -72574,18 +72615,18 @@ cliCursor.toggle = (force, writableStream) => {
|
|
|
72574
72615
|
var cli_cursor_default = cliCursor;
|
|
72575
72616
|
|
|
72576
72617
|
//#endregion
|
|
72577
|
-
//#region ../../node_modules/.pnpm/ansi-regex@6.
|
|
72578
|
-
function ansiRegex({ onlyFirst = false } = {}) {
|
|
72579
|
-
|
|
72580
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
72618
|
+
//#region ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
72619
|
+
function ansiRegex$1({ onlyFirst = false } = {}) {
|
|
72620
|
+
return new RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`, onlyFirst ? void 0 : "g");
|
|
72581
72621
|
}
|
|
72582
72622
|
|
|
72583
72623
|
//#endregion
|
|
72584
|
-
//#region ../../node_modules/.pnpm/strip-ansi@7.
|
|
72585
|
-
const regex = ansiRegex();
|
|
72586
|
-
function stripAnsi$
|
|
72624
|
+
//#region ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
|
|
72625
|
+
const regex$1 = ansiRegex$1();
|
|
72626
|
+
function stripAnsi$2(string$3) {
|
|
72587
72627
|
if (typeof string$3 !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string$3}\``);
|
|
72588
|
-
|
|
72628
|
+
if (!string$3.includes("\x1B") && !string$3.includes("")) return string$3;
|
|
72629
|
+
return string$3.replace(regex$1, "");
|
|
72589
72630
|
}
|
|
72590
72631
|
|
|
72591
72632
|
//#endregion
|
|
@@ -72663,7 +72704,7 @@ function stringWidth(string$3, options = {}) {
|
|
|
72663
72704
|
ambiguousIsNarrow: true,
|
|
72664
72705
|
...options
|
|
72665
72706
|
};
|
|
72666
|
-
string$3 = stripAnsi$
|
|
72707
|
+
string$3 = stripAnsi$2(string$3);
|
|
72667
72708
|
if (string$3.length === 0) return 0;
|
|
72668
72709
|
string$3 = string$3.replace((0, import_emoji_regex.default)(), " ");
|
|
72669
72710
|
const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
|
|
@@ -72868,7 +72909,7 @@ const wrapWord = (rows, word, columns) => {
|
|
|
72868
72909
|
const characters = [...word];
|
|
72869
72910
|
let isInsideEscape = false;
|
|
72870
72911
|
let isInsideLinkEscape = false;
|
|
72871
|
-
let visible = stringWidth(stripAnsi$
|
|
72912
|
+
let visible = stringWidth(stripAnsi$2(rows[rows.length - 1]));
|
|
72872
72913
|
for (const [index, character] of characters.entries()) {
|
|
72873
72914
|
const characterLength = stringWidth(character);
|
|
72874
72915
|
if (visible + characterLength <= columns) rows[rows.length - 1] += character;
|
|
@@ -73046,6 +73087,21 @@ function sliceAnsi(string$3, begin, end) {
|
|
|
73046
73087
|
return output;
|
|
73047
73088
|
}
|
|
73048
73089
|
|
|
73090
|
+
//#endregion
|
|
73091
|
+
//#region ../../node_modules/.pnpm/ansi-regex@6.0.1/node_modules/ansi-regex/index.js
|
|
73092
|
+
function ansiRegex({ onlyFirst = false } = {}) {
|
|
73093
|
+
const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
|
|
73094
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
73095
|
+
}
|
|
73096
|
+
|
|
73097
|
+
//#endregion
|
|
73098
|
+
//#region ../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
|
|
73099
|
+
const regex = ansiRegex();
|
|
73100
|
+
function stripAnsi$1(string$3) {
|
|
73101
|
+
if (typeof string$3 !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string$3}\``);
|
|
73102
|
+
return string$3.replace(regex, "");
|
|
73103
|
+
}
|
|
73104
|
+
|
|
73049
73105
|
//#endregion
|
|
73050
73106
|
//#region ../../node_modules/.pnpm/log-update@5.0.1/node_modules/log-update/index.js
|
|
73051
73107
|
const defaultTerminalHeight = 24;
|
|
@@ -74815,13 +74871,13 @@ function createProfileStore(args) {
|
|
|
74815
74871
|
args.bindings.write(currentBindings);
|
|
74816
74872
|
},
|
|
74817
74873
|
activate(profile, dir$2) {
|
|
74818
|
-
const normalizedDir =
|
|
74874
|
+
const normalizedDir = path2__default.resolve(dir$2);
|
|
74819
74875
|
const currentBindings = args.bindings.read();
|
|
74820
74876
|
currentBindings[normalizedDir] = profile;
|
|
74821
74877
|
args.bindings.write(currentBindings);
|
|
74822
74878
|
},
|
|
74823
74879
|
deactivate(dir$2) {
|
|
74824
|
-
const normalizedDir =
|
|
74880
|
+
const normalizedDir = path2__default.resolve(dir$2);
|
|
74825
74881
|
const currentBindings = args.bindings.read();
|
|
74826
74882
|
const boundProfile = currentBindings[normalizedDir];
|
|
74827
74883
|
if (boundProfile === void 0) {
|
|
@@ -74893,18 +74949,18 @@ function validateProfileName(name) {
|
|
|
74893
74949
|
}
|
|
74894
74950
|
__name$1(validateProfileName, "validateProfileName");
|
|
74895
74951
|
function formatDirectoryForUserError(dir$2) {
|
|
74896
|
-
return
|
|
74952
|
+
return path2__default.relative(process.cwd(), dir$2) || ".";
|
|
74897
74953
|
}
|
|
74898
74954
|
__name$1(formatDirectoryForUserError, "formatDirectoryForUserError");
|
|
74899
74955
|
function getProfileForDirectoryFromBindings(startDir, bindings$1) {
|
|
74900
|
-
const normalizedDir =
|
|
74956
|
+
const normalizedDir = path2__default.resolve(startDir);
|
|
74901
74957
|
const sortedEntries = Object.entries(bindings$1).sort(([a], [b]) => b.length - a.length);
|
|
74902
74958
|
for (const [boundDir, profile] of sortedEntries) {
|
|
74903
74959
|
if (normalizedDir === boundDir) return {
|
|
74904
74960
|
profile,
|
|
74905
74961
|
dir: boundDir
|
|
74906
74962
|
};
|
|
74907
|
-
if (normalizedDir.startsWith(boundDir) && normalizedDir[boundDir.length] ===
|
|
74963
|
+
if (normalizedDir.startsWith(boundDir) && normalizedDir[boundDir.length] === path2__default.sep) return {
|
|
74908
74964
|
profile,
|
|
74909
74965
|
dir: boundDir
|
|
74910
74966
|
};
|
|
@@ -75659,7 +75715,7 @@ function resolveAuthProfileBaseName(profile) {
|
|
|
75659
75715
|
}
|
|
75660
75716
|
__name$1(resolveAuthProfileBaseName, "resolveAuthProfileBaseName");
|
|
75661
75717
|
function getAuthConfigFilePath$2(configPath, profile, extension = "toml") {
|
|
75662
|
-
return
|
|
75718
|
+
return path2__default.join(configPath, USER_AUTH_CONFIG_PATH, `${resolveAuthProfileBaseName(profile)}.${extension}`);
|
|
75663
75719
|
}
|
|
75664
75720
|
__name$1(getAuthConfigFilePath$2, "getAuthConfigFilePath");
|
|
75665
75721
|
var FileCredentialStore = class {
|
|
@@ -75690,7 +75746,7 @@ var FileCredentialStore = class {
|
|
|
75690
75746
|
}
|
|
75691
75747
|
write(config$2) {
|
|
75692
75748
|
const filePath = this.filePath();
|
|
75693
|
-
mkdirSync(
|
|
75749
|
+
mkdirSync(path2__default.dirname(filePath), { recursive: true });
|
|
75694
75750
|
writeFileSync(filePath, stringifyFile(this.format, config$2), {
|
|
75695
75751
|
encoding: "utf-8",
|
|
75696
75752
|
mode: 384
|
|
@@ -75755,7 +75811,7 @@ function parseEncryptedEnvelope(raw) {
|
|
|
75755
75811
|
}
|
|
75756
75812
|
__name$1(parseEncryptedEnvelope, "parseEncryptedEnvelope");
|
|
75757
75813
|
function getEncryptedAuthConfigFilePath$2(configPath, profile) {
|
|
75758
|
-
return
|
|
75814
|
+
return path2__default.join(configPath, "config", `${resolveAuthProfileBaseName(profile)}.enc`);
|
|
75759
75815
|
}
|
|
75760
75816
|
__name$1(getEncryptedAuthConfigFilePath$2, "getEncryptedAuthConfigFilePath");
|
|
75761
75817
|
var EncryptedFileCredentialStore = class {
|
|
@@ -75794,7 +75850,7 @@ var EncryptedFileCredentialStore = class {
|
|
|
75794
75850
|
const key = this.ensureKey();
|
|
75795
75851
|
const envelope = encryptString(stringifyFile(this.format, config$2), key);
|
|
75796
75852
|
const encryptedPath = getEncryptedAuthConfigFilePath$2(this.configPath, this.profile);
|
|
75797
|
-
mkdirSync(
|
|
75853
|
+
mkdirSync(path2__default.dirname(encryptedPath), { recursive: true });
|
|
75798
75854
|
writeFileSync(encryptedPath, JSON.stringify(envelope, null, " "), {
|
|
75799
75855
|
encoding: "utf-8",
|
|
75800
75856
|
mode: 384
|
|
@@ -75899,26 +75955,26 @@ function setNpmRunner(fn) {
|
|
|
75899
75955
|
}
|
|
75900
75956
|
__name$1(setNpmRunner, "setNpmRunner");
|
|
75901
75957
|
function getKeyringInstallDir(configPath) {
|
|
75902
|
-
return
|
|
75958
|
+
return path2__default.join(configPath, "native", "keyring");
|
|
75903
75959
|
}
|
|
75904
75960
|
__name$1(getKeyringInstallDir, "getKeyringInstallDir");
|
|
75905
75961
|
function getInstalledBindingPath(installDir) {
|
|
75906
|
-
return
|
|
75962
|
+
return path2__default.join(installDir, "node_modules", "@napi-rs", "keyring");
|
|
75907
75963
|
}
|
|
75908
75964
|
__name$1(getInstalledBindingPath, "getInstalledBindingPath");
|
|
75909
75965
|
function findKeyringBinding(installDir) {
|
|
75910
75966
|
const cached$2 = cachedBindingPathByDir.get(installDir);
|
|
75911
75967
|
if (cached$2 !== void 0) return cached$2;
|
|
75912
75968
|
const lazy$2 = getInstalledBindingPath(installDir);
|
|
75913
|
-
if (existsSync(
|
|
75969
|
+
if (existsSync(path2__default.join(lazy$2, "index.js"))) {
|
|
75914
75970
|
cachedBindingPathByDir.set(installDir, lazy$2);
|
|
75915
75971
|
return lazy$2;
|
|
75916
75972
|
}
|
|
75917
75973
|
try {
|
|
75918
75974
|
const r$1 = npmRunner(["root", "-g"]);
|
|
75919
75975
|
if (r$1.status === 0) {
|
|
75920
|
-
const global$2 =
|
|
75921
|
-
if (existsSync(
|
|
75976
|
+
const global$2 = path2__default.join(r$1.stdout.trim(), "@napi-rs", "keyring");
|
|
75977
|
+
if (existsSync(path2__default.join(global$2, "index.js"))) {
|
|
75922
75978
|
cachedBindingPathByDir.set(installDir, global$2);
|
|
75923
75979
|
return global$2;
|
|
75924
75980
|
}
|
|
@@ -75931,7 +75987,7 @@ __name$1(findKeyringBinding, "findKeyringBinding");
|
|
|
75931
75987
|
function installKeyringBindingSync(installDir) {
|
|
75932
75988
|
const dir$2 = installDir;
|
|
75933
75989
|
mkdirSync(dir$2, { recursive: true });
|
|
75934
|
-
const hostPkgJson =
|
|
75990
|
+
const hostPkgJson = path2__default.join(dir$2, "package.json");
|
|
75935
75991
|
if (!existsSync(hostPkgJson)) writeFileSync(hostPkgJson, JSON.stringify({
|
|
75936
75992
|
private: true,
|
|
75937
75993
|
name: "cloudflare-auth-keyring-host"
|
|
@@ -76363,7 +76419,7 @@ __name$1(scrubEncryptedCredentials, "scrubEncryptedCredentials");
|
|
|
76363
76419
|
//#region ../workers-auth/dist/chunk-AEOSGWMT.mjs
|
|
76364
76420
|
function createPreferences(getConfigPath) {
|
|
76365
76421
|
function getUserPreferencesPath() {
|
|
76366
|
-
return
|
|
76422
|
+
return path2__default.resolve(getConfigPath(), "preferences.json");
|
|
76367
76423
|
}
|
|
76368
76424
|
__name$1(getUserPreferencesPath, "getUserPreferencesPath");
|
|
76369
76425
|
function readUserPreferences$2() {
|
|
@@ -76383,7 +76439,7 @@ function createPreferences(getConfigPath) {
|
|
|
76383
76439
|
...update
|
|
76384
76440
|
};
|
|
76385
76441
|
const filePath = getUserPreferencesPath();
|
|
76386
|
-
mkdirSync(
|
|
76442
|
+
mkdirSync(path2__default.dirname(filePath), { recursive: true });
|
|
76387
76443
|
writeFileSync(filePath, JSON.stringify(next, null, " "), { encoding: "utf-8" });
|
|
76388
76444
|
}
|
|
76389
76445
|
__name$1(updateUserPreferences$2, "updateUserPreferences");
|
|
@@ -77018,7 +77074,7 @@ function createFileStorage(format$4, getPath) {
|
|
|
77018
77074
|
}, "read"),
|
|
77019
77075
|
write(config$2) {
|
|
77020
77076
|
const configPath = getPath();
|
|
77021
|
-
mkdirSync(
|
|
77077
|
+
mkdirSync(path2__default.dirname(configPath), { recursive: true });
|
|
77022
77078
|
writeFileSync(configPath, stringifyFile(format$4, config$2), {
|
|
77023
77079
|
encoding: "utf-8",
|
|
77024
77080
|
mode: 384
|
|
@@ -77332,7 +77388,7 @@ function createCloudflareProfileStore(ctx) {
|
|
|
77332
77388
|
}
|
|
77333
77389
|
__name$1(encryptedPath, "encryptedPath");
|
|
77334
77390
|
function getProfileConfigDirectory() {
|
|
77335
|
-
return
|
|
77391
|
+
return path2__default.dirname(plaintextPath("default"));
|
|
77336
77392
|
}
|
|
77337
77393
|
__name$1(getProfileConfigDirectory, "getProfileConfigDirectory");
|
|
77338
77394
|
const configs = {
|
|
@@ -77359,7 +77415,7 @@ function createCloudflareProfileStore(ctx) {
|
|
|
77359
77415
|
}
|
|
77360
77416
|
};
|
|
77361
77417
|
function getDirectoryBindingsPath() {
|
|
77362
|
-
return
|
|
77418
|
+
return path2__default.join(getConfigPath(), DIRECTORY_BINDINGS_FILE);
|
|
77363
77419
|
}
|
|
77364
77420
|
__name$1(getDirectoryBindingsPath, "getDirectoryBindingsPath");
|
|
77365
77421
|
return createProfileStore({
|
|
@@ -77375,7 +77431,7 @@ function createCloudflareProfileStore(ctx) {
|
|
|
77375
77431
|
},
|
|
77376
77432
|
write(dirBindings) {
|
|
77377
77433
|
const bindingsPath = getDirectoryBindingsPath();
|
|
77378
|
-
mkdirSync(
|
|
77434
|
+
mkdirSync(path2__default.dirname(bindingsPath), { recursive: true });
|
|
77379
77435
|
writeFileSync(bindingsPath, JSON.stringify(dirBindings, null, " "), "utf-8");
|
|
77380
77436
|
}
|
|
77381
77437
|
}
|
|
@@ -77616,7 +77672,7 @@ function getTemporaryAccountConfigFile$1() {
|
|
|
77616
77672
|
}
|
|
77617
77673
|
__name$1(getTemporaryAccountConfigFile$1, "getTemporaryAccountConfigFile");
|
|
77618
77674
|
function getCfTemporaryAccountConfigPath() {
|
|
77619
|
-
return
|
|
77675
|
+
return path2__default.join(getCfConfigPath(), getTemporaryAccountConfigFile$1());
|
|
77620
77676
|
}
|
|
77621
77677
|
__name$1(getCfTemporaryAccountConfigPath, "getCfTemporaryAccountConfigPath");
|
|
77622
77678
|
function createJsonFileStorage(getPath) {
|
|
@@ -77739,7 +77795,7 @@ function getTemporaryAccountConfigFile() {
|
|
|
77739
77795
|
}
|
|
77740
77796
|
__name$1(getTemporaryAccountConfigFile, "getTemporaryAccountConfigFile");
|
|
77741
77797
|
function getTemporaryPreviewAccountConfigPath() {
|
|
77742
|
-
return
|
|
77798
|
+
return path2__default.join(getGlobalConfigPath(), getTemporaryAccountConfigFile());
|
|
77743
77799
|
}
|
|
77744
77800
|
__name$1(getTemporaryPreviewAccountConfigPath, "getTemporaryPreviewAccountConfigPath");
|
|
77745
77801
|
function createTomlFileStorage(getPath) {
|
|
@@ -77813,7 +77869,7 @@ var require_command_exists$1 = /* @__PURE__ */ __commonJS$2({ "../../node_module
|
|
|
77813
77869
|
var exec = __require$2("child_process").exec;
|
|
77814
77870
|
var execSync$1 = __require$2("child_process").execSync;
|
|
77815
77871
|
var fs$2 = __require$2("fs");
|
|
77816
|
-
var path
|
|
77872
|
+
var path = __require$2("path");
|
|
77817
77873
|
var access = fs$2.access;
|
|
77818
77874
|
var accessSync$1 = fs$2.accessSync;
|
|
77819
77875
|
var constants$4 = fs$2.constants || fs$2;
|
|
@@ -77890,8 +77946,8 @@ var require_command_exists$1 = /* @__PURE__ */ __commonJS$2({ "../../node_module
|
|
|
77890
77946
|
};
|
|
77891
77947
|
if (isUsingWindows) cleanInput = function(s) {
|
|
77892
77948
|
if (/[\\]/.test(s)) {
|
|
77893
|
-
var dirname$3 = "\"" + path
|
|
77894
|
-
var basename$2 = "\"" + path
|
|
77949
|
+
var dirname$3 = "\"" + path.dirname(s) + "\"";
|
|
77950
|
+
var basename$2 = "\"" + path.basename(s) + "\"";
|
|
77895
77951
|
return dirname$3 + ":" + basename$2;
|
|
77896
77952
|
}
|
|
77897
77953
|
return "\"" + s + "\"";
|
|
@@ -78705,11 +78761,11 @@ function createWorkerUploadForm(worker, bindings$1, options) {
|
|
|
78705
78761
|
const manifestModuleName = "__STATIC_CONTENT_MANIFEST";
|
|
78706
78762
|
if (modules?.some(({ name }) => name === manifestModuleName) && main.type === "esm") {
|
|
78707
78763
|
assert(modules !== void 0);
|
|
78708
|
-
const subDirs = new Set(modules.map((module$1) =>
|
|
78764
|
+
const subDirs = new Set(modules.map((module$1) => path2__default.posix.dirname(module$1.name)));
|
|
78709
78765
|
for (const subDir of subDirs) {
|
|
78710
78766
|
if (subDir === ".") continue;
|
|
78711
|
-
const relativePath =
|
|
78712
|
-
const filePath =
|
|
78767
|
+
const relativePath = path2__default.posix.relative(subDir, manifestModuleName);
|
|
78768
|
+
const filePath = path2__default.posix.join(subDir, manifestModuleName);
|
|
78713
78769
|
modules.push({
|
|
78714
78770
|
name: filePath,
|
|
78715
78771
|
filePath,
|
|
@@ -78789,7 +78845,7 @@ __name(createWorkerUploadForm, "createWorkerUploadForm");
|
|
|
78789
78845
|
//#endregion
|
|
78790
78846
|
//#region ../remote-bindings/dist/index.mjs
|
|
78791
78847
|
var import_undici = require_undici();
|
|
78792
|
-
var version$2 = "0.0.
|
|
78848
|
+
var version$2 = "0.0.12";
|
|
78793
78849
|
var NoDefaultValueProvided = class extends UserError {
|
|
78794
78850
|
constructor() {
|
|
78795
78851
|
super("This command cannot be run in a non-interactive context", { telemetryMessage: "remote bindings prompt default missing" });
|
|
@@ -79234,7 +79290,7 @@ function createRemoteWorkerInit(props) {
|
|
|
79234
79290
|
return {
|
|
79235
79291
|
name: props.name,
|
|
79236
79292
|
main: {
|
|
79237
|
-
name:
|
|
79293
|
+
name: path2__default.basename(props.bundle.path),
|
|
79238
79294
|
filePath: props.bundle.path,
|
|
79239
79295
|
type: props.bundle.type,
|
|
79240
79296
|
content: props.bundle.entrypointSource
|
|
@@ -79479,7 +79535,6 @@ var DevEnv = class extends EventEmitter {
|
|
|
79479
79535
|
runtime;
|
|
79480
79536
|
proxy;
|
|
79481
79537
|
#bundle;
|
|
79482
|
-
#bundleVersion = 0;
|
|
79483
79538
|
#config;
|
|
79484
79539
|
start() {
|
|
79485
79540
|
this.proxy.start(this.#config);
|
|
@@ -79494,7 +79549,7 @@ var DevEnv = class extends EventEmitter {
|
|
|
79494
79549
|
config: config$2,
|
|
79495
79550
|
bundle: {
|
|
79496
79551
|
...this.#bundle,
|
|
79497
|
-
entrypointSource: `${this.#bundle.entrypointSource}\n// remote-bindings-update:${
|
|
79552
|
+
entrypointSource: `${this.#bundle.entrypointSource}\n// remote-bindings-update:${randomUUID()}`
|
|
79498
79553
|
}
|
|
79499
79554
|
});
|
|
79500
79555
|
}
|
|
@@ -79701,28 +79756,28 @@ function deepStrictEqual(source, target$1) {
|
|
|
79701
79756
|
}
|
|
79702
79757
|
|
|
79703
79758
|
//#endregion
|
|
79704
|
-
//#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.
|
|
79759
|
+
//#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.5/node_modules/fdir/dist/index.mjs
|
|
79705
79760
|
var __require = /* @__PURE__ */ createRequire$1(import.meta.url);
|
|
79706
|
-
function cleanPath(path$
|
|
79707
|
-
let normalized = normalize(path$
|
|
79761
|
+
function cleanPath(path$1) {
|
|
79762
|
+
let normalized = normalize(path$1);
|
|
79708
79763
|
if (normalized.length > 1 && normalized[normalized.length - 1] === sep) normalized = normalized.substring(0, normalized.length - 1);
|
|
79709
79764
|
return normalized;
|
|
79710
79765
|
}
|
|
79711
79766
|
const SLASHES_REGEX = /[\\/]/g;
|
|
79712
|
-
function convertSlashes(path$
|
|
79713
|
-
return path$
|
|
79767
|
+
function convertSlashes(path$1, separator) {
|
|
79768
|
+
return path$1.replace(SLASHES_REGEX, separator);
|
|
79714
79769
|
}
|
|
79715
79770
|
const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
|
|
79716
|
-
function isRootDirectory(path$
|
|
79717
|
-
return path$
|
|
79771
|
+
function isRootDirectory(path$1) {
|
|
79772
|
+
return path$1 === "/" || WINDOWS_ROOT_DIR_REGEX.test(path$1);
|
|
79718
79773
|
}
|
|
79719
|
-
function normalizePath$1(path$
|
|
79774
|
+
function normalizePath$1(path$1, options) {
|
|
79720
79775
|
const { resolvePaths, normalizePath: normalizePath$1$1, pathSeparator } = options;
|
|
79721
|
-
const pathNeedsCleaning = process.platform === "win32" && path$
|
|
79722
|
-
if (resolvePaths) path$
|
|
79723
|
-
if (normalizePath$1$1 || pathNeedsCleaning) path$
|
|
79724
|
-
if (path$
|
|
79725
|
-
return convertSlashes(path$
|
|
79776
|
+
const pathNeedsCleaning = process.platform === "win32" && path$1.includes("/") || path$1.startsWith(".");
|
|
79777
|
+
if (resolvePaths) path$1 = resolve$1(path$1);
|
|
79778
|
+
if (normalizePath$1$1 || pathNeedsCleaning) path$1 = cleanPath(path$1);
|
|
79779
|
+
if (path$1 === ".") return "";
|
|
79780
|
+
return convertSlashes(path$1[path$1.length - 1] !== pathSeparator ? path$1 + pathSeparator : path$1, pathSeparator);
|
|
79726
79781
|
}
|
|
79727
79782
|
function joinPathWithBasePath(filename, directoryPath) {
|
|
79728
79783
|
return directoryPath + filename;
|
|
@@ -79758,8 +79813,8 @@ const pushDirectory = (directoryPath, paths) => {
|
|
|
79758
79813
|
paths.push(directoryPath || ".");
|
|
79759
79814
|
};
|
|
79760
79815
|
const pushDirectoryFilter = (directoryPath, paths, filters) => {
|
|
79761
|
-
const path$
|
|
79762
|
-
if (filters.every((filter) => filter(path$
|
|
79816
|
+
const path$1 = directoryPath || ".";
|
|
79817
|
+
if (filters.every((filter) => filter(path$1, true))) paths.push(path$1);
|
|
79763
79818
|
};
|
|
79764
79819
|
const empty$2 = () => {};
|
|
79765
79820
|
function build$6(root, options) {
|
|
@@ -79808,26 +79863,26 @@ const empty = () => {};
|
|
|
79808
79863
|
function build$3(options) {
|
|
79809
79864
|
return options.group ? groupFiles : empty;
|
|
79810
79865
|
}
|
|
79811
|
-
const resolveSymlinksAsync = function(path$
|
|
79866
|
+
const resolveSymlinksAsync = function(path$1, state, callback$1) {
|
|
79812
79867
|
const { queue, fs: fs$3, options: { suppressErrors } } = state;
|
|
79813
79868
|
queue.enqueue();
|
|
79814
|
-
fs$3.realpath(path$
|
|
79869
|
+
fs$3.realpath(path$1, (error$2, resolvedPath) => {
|
|
79815
79870
|
if (error$2) return queue.dequeue(suppressErrors ? null : error$2, state);
|
|
79816
79871
|
fs$3.stat(resolvedPath, (error$1$1, stat$1) => {
|
|
79817
79872
|
if (error$1$1) return queue.dequeue(suppressErrors ? null : error$1$1, state);
|
|
79818
|
-
if (stat$1.isDirectory() && isRecursive(path$
|
|
79873
|
+
if (stat$1.isDirectory() && isRecursive(path$1, resolvedPath, state)) return queue.dequeue(null, state);
|
|
79819
79874
|
callback$1(stat$1, resolvedPath);
|
|
79820
79875
|
queue.dequeue(null, state);
|
|
79821
79876
|
});
|
|
79822
79877
|
});
|
|
79823
79878
|
};
|
|
79824
|
-
const resolveSymlinks = function(path$
|
|
79879
|
+
const resolveSymlinks = function(path$1, state, callback$1) {
|
|
79825
79880
|
const { queue, fs: fs$3, options: { suppressErrors } } = state;
|
|
79826
79881
|
queue.enqueue();
|
|
79827
79882
|
try {
|
|
79828
|
-
const resolvedPath = fs$3.realpathSync(path$
|
|
79883
|
+
const resolvedPath = fs$3.realpathSync(path$1);
|
|
79829
79884
|
const stat$1 = fs$3.statSync(resolvedPath);
|
|
79830
|
-
if (stat$1.isDirectory() && isRecursive(path$
|
|
79885
|
+
if (stat$1.isDirectory() && isRecursive(path$1, resolvedPath, state)) return;
|
|
79831
79886
|
callback$1(stat$1, resolvedPath);
|
|
79832
79887
|
} catch (e) {
|
|
79833
79888
|
if (!suppressErrors) throw e;
|
|
@@ -79837,16 +79892,16 @@ function build$2(options, isSynchronous) {
|
|
|
79837
79892
|
if (!options.resolveSymlinks || options.excludeSymlinks) return null;
|
|
79838
79893
|
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
|
|
79839
79894
|
}
|
|
79840
|
-
function isRecursive(path$
|
|
79895
|
+
function isRecursive(path$1, resolved, state) {
|
|
79841
79896
|
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
|
|
79842
|
-
let parent = dirname$1(path$
|
|
79897
|
+
let parent = dirname$1(path$1);
|
|
79843
79898
|
let depth$1 = 1;
|
|
79844
79899
|
while (parent !== state.root && depth$1 < 2) {
|
|
79845
79900
|
const resolvedPath = state.symlinks.get(parent);
|
|
79846
79901
|
if (!!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath))) depth$1++;
|
|
79847
79902
|
else parent = dirname$1(parent);
|
|
79848
79903
|
}
|
|
79849
|
-
state.symlinks.set(path$
|
|
79904
|
+
state.symlinks.set(path$1, resolved);
|
|
79850
79905
|
return depth$1 > 1;
|
|
79851
79906
|
}
|
|
79852
79907
|
function isRecursiveUsingRealPaths(resolved, state) {
|
|
@@ -80027,19 +80082,19 @@ var Walker = class {
|
|
|
80027
80082
|
const filename = this.joinPath(entry.name, directoryPath);
|
|
80028
80083
|
this.pushFile(filename, files, this.state.counts, filters);
|
|
80029
80084
|
} else if (entry.isDirectory()) {
|
|
80030
|
-
let path$
|
|
80031
|
-
if (exclude && exclude(entry.name, path$
|
|
80032
|
-
this.pushDirectory(path$
|
|
80033
|
-
this.walkDirectory(this.state, path$
|
|
80085
|
+
let path$1 = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
|
|
80086
|
+
if (exclude && exclude(entry.name, path$1)) continue;
|
|
80087
|
+
this.pushDirectory(path$1, paths, filters);
|
|
80088
|
+
this.walkDirectory(this.state, path$1, path$1, depth$1 - 1, this.walk);
|
|
80034
80089
|
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
|
80035
|
-
let path$
|
|
80036
|
-
this.resolveSymlink(path$
|
|
80090
|
+
let path$1 = joinPathWithBasePath(entry.name, directoryPath);
|
|
80091
|
+
this.resolveSymlink(path$1, this.state, (stat$1, resolvedPath) => {
|
|
80037
80092
|
if (stat$1.isDirectory()) {
|
|
80038
80093
|
resolvedPath = normalizePath$1(resolvedPath, this.state.options);
|
|
80039
|
-
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path$
|
|
80040
|
-
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path$
|
|
80094
|
+
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path$1 + pathSeparator)) return;
|
|
80095
|
+
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path$1 + pathSeparator, depth$1 - 1, this.walk);
|
|
80041
80096
|
} else {
|
|
80042
|
-
resolvedPath = useRealPaths ? resolvedPath : path$
|
|
80097
|
+
resolvedPath = useRealPaths ? resolvedPath : path$1;
|
|
80043
80098
|
const filename = basename$1(resolvedPath);
|
|
80044
80099
|
const directoryPath$1 = normalizePath$1(dirname$1(resolvedPath), this.state.options);
|
|
80045
80100
|
resolvedPath = this.joinPath(filename, directoryPath$1);
|
|
@@ -80204,14 +80259,14 @@ var Builder = class {
|
|
|
80204
80259
|
isMatch = globFn(patterns, ...options);
|
|
80205
80260
|
this.globCache[patterns.join("\0")] = isMatch;
|
|
80206
80261
|
}
|
|
80207
|
-
this.options.filters.push((path$
|
|
80262
|
+
this.options.filters.push((path$1) => isMatch(path$1));
|
|
80208
80263
|
return this;
|
|
80209
80264
|
}
|
|
80210
80265
|
};
|
|
80211
80266
|
|
|
80212
80267
|
//#endregion
|
|
80213
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
80214
|
-
var require_constants = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/picomatch@4.0.
|
|
80268
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/constants.js
|
|
80269
|
+
var require_constants = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/constants.js": ((exports, module) => {
|
|
80215
80270
|
const WIN_SLASH = "\\\\/";
|
|
80216
80271
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
80217
80272
|
const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
@@ -80378,8 +80433,8 @@ var require_constants = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
80378
80433
|
}) });
|
|
80379
80434
|
|
|
80380
80435
|
//#endregion
|
|
80381
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
80382
|
-
var require_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/picomatch@4.0.
|
|
80436
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/utils.js
|
|
80437
|
+
var require_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/utils.js": ((exports) => {
|
|
80383
80438
|
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
|
|
80384
80439
|
exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
80385
80440
|
exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
|
|
@@ -80418,8 +80473,8 @@ var require_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/pic
|
|
|
80418
80473
|
if (state.negated === true) output = `(?:^(?!${output}).*$)`;
|
|
80419
80474
|
return output;
|
|
80420
80475
|
};
|
|
80421
|
-
exports.basename = (path$
|
|
80422
|
-
const segs = path$
|
|
80476
|
+
exports.basename = (path$1, { windows } = {}) => {
|
|
80477
|
+
const segs = path$1.split(windows ? /[\\/]/ : "/");
|
|
80423
80478
|
const last = segs[segs.length - 1];
|
|
80424
80479
|
if (last === "") return segs[segs.length - 2];
|
|
80425
80480
|
return last;
|
|
@@ -80427,8 +80482,8 @@ var require_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/pic
|
|
|
80427
80482
|
}) });
|
|
80428
80483
|
|
|
80429
80484
|
//#endregion
|
|
80430
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
80431
|
-
var require_scan = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/picomatch@4.0.
|
|
80485
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/scan.js
|
|
80486
|
+
var require_scan = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/scan.js": ((exports, module) => {
|
|
80432
80487
|
const utils$3 = require_utils();
|
|
80433
80488
|
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();
|
|
80434
80489
|
const isPathSeparator = (code) => {
|
|
@@ -80715,8 +80770,8 @@ var require_scan = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/pico
|
|
|
80715
80770
|
}) });
|
|
80716
80771
|
|
|
80717
80772
|
//#endregion
|
|
80718
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
80719
|
-
var require_parse = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/picomatch@4.0.
|
|
80773
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/parse.js
|
|
80774
|
+
var require_parse = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/parse.js": ((exports, module) => {
|
|
80720
80775
|
const constants$3 = require_constants();
|
|
80721
80776
|
const utils$2 = require_utils();
|
|
80722
80777
|
/**
|
|
@@ -80870,7 +80925,10 @@ var require_parse = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/pic
|
|
|
80870
80925
|
}
|
|
80871
80926
|
}
|
|
80872
80927
|
};
|
|
80873
|
-
const
|
|
80928
|
+
const buildCharClassStar = (chars$1) => {
|
|
80929
|
+
return `${chars$1.length === 1 ? utils$2.escapeRegex(chars$1[0]) : `[${chars$1.map((ch) => utils$2.escapeRegex(ch)).join("")}]`}*`;
|
|
80930
|
+
};
|
|
80931
|
+
const getStarExtglobSequenceChars = (pattern) => {
|
|
80874
80932
|
let index = 0;
|
|
80875
80933
|
const chars$1 = [];
|
|
80876
80934
|
while (index < pattern.length) {
|
|
@@ -80884,7 +80942,7 @@ var require_parse = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/pic
|
|
|
80884
80942
|
index += match.end + 1;
|
|
80885
80943
|
}
|
|
80886
80944
|
if (chars$1.length < 1) return;
|
|
80887
|
-
return
|
|
80945
|
+
return chars$1;
|
|
80888
80946
|
};
|
|
80889
80947
|
const repeatedExtglobRecursion = (pattern) => {
|
|
80890
80948
|
let depth$1 = 0;
|
|
@@ -80904,14 +80962,28 @@ var require_parse = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/pic
|
|
|
80904
80962
|
if (branches.length > 1) {
|
|
80905
80963
|
if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return { risky: true };
|
|
80906
80964
|
}
|
|
80965
|
+
const safeChars = [];
|
|
80966
|
+
let sawStarSequence = false;
|
|
80967
|
+
let combinable = true;
|
|
80907
80968
|
for (const branch of branches) {
|
|
80908
|
-
const
|
|
80909
|
-
if (
|
|
80910
|
-
|
|
80911
|
-
|
|
80912
|
-
|
|
80969
|
+
const chars$1 = getStarExtglobSequenceChars(branch);
|
|
80970
|
+
if (chars$1) {
|
|
80971
|
+
sawStarSequence = true;
|
|
80972
|
+
safeChars.push(...chars$1);
|
|
80973
|
+
continue;
|
|
80974
|
+
}
|
|
80975
|
+
const literal$3 = normalizeSimpleBranch(branch);
|
|
80976
|
+
if (literal$3 && literal$3.length === 1) {
|
|
80977
|
+
safeChars.push(literal$3);
|
|
80978
|
+
continue;
|
|
80979
|
+
}
|
|
80980
|
+
combinable = false;
|
|
80913
80981
|
if (repeatedExtglobRecursion(branch) > max) return { risky: true };
|
|
80914
80982
|
}
|
|
80983
|
+
if (sawStarSequence) return combinable ? {
|
|
80984
|
+
risky: true,
|
|
80985
|
+
safeOutput: buildCharClassStar([...new Set(safeChars)])
|
|
80986
|
+
} : { risky: true };
|
|
80915
80987
|
return { risky: false };
|
|
80916
80988
|
};
|
|
80917
80989
|
/**
|
|
@@ -81771,8 +81843,8 @@ var require_parse = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/pic
|
|
|
81771
81843
|
}) });
|
|
81772
81844
|
|
|
81773
81845
|
//#endregion
|
|
81774
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
81775
|
-
var require_picomatch$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/picomatch@4.0.
|
|
81846
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/picomatch.js
|
|
81847
|
+
var require_picomatch$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/picomatch.js": ((exports, module) => {
|
|
81776
81848
|
const scan = require_scan();
|
|
81777
81849
|
const parse = require_parse();
|
|
81778
81850
|
const utils$1 = require_utils();
|
|
@@ -81792,6 +81864,18 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
81792
81864
|
* const isMatch = picomatch('*.!(*a)');
|
|
81793
81865
|
* console.log(isMatch('a.a')); //=> false
|
|
81794
81866
|
* console.log(isMatch('a.b')); //=> true
|
|
81867
|
+
*
|
|
81868
|
+
* // For environments without `node.js`, `picomatch/posix` provides you a dependency-free matcher, without automatic OS detection.
|
|
81869
|
+
* const picomatch = require('picomatch/posix');
|
|
81870
|
+
* // the same API, defaulting to posix paths
|
|
81871
|
+
* const isMatch = picomatch('a/*');
|
|
81872
|
+
* console.log(isMatch('a\\b')); //=> false
|
|
81873
|
+
* console.log(isMatch('a/b')); //=> true
|
|
81874
|
+
*
|
|
81875
|
+
* // you can still configure the matcher function to accept windows paths
|
|
81876
|
+
* const isMatch = picomatch('a/*', { options: windows });
|
|
81877
|
+
* console.log(isMatch('a\\b')); //=> true
|
|
81878
|
+
* console.log(isMatch('a/b')); //=> true
|
|
81795
81879
|
* ```
|
|
81796
81880
|
* @name picomatch
|
|
81797
81881
|
* @param {String|Array} `globs` One or more glob patterns.
|
|
@@ -81815,9 +81899,9 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
81815
81899
|
if (glob === "" || typeof glob !== "string" && !isState) throw new TypeError("Expected pattern to be a non-empty string");
|
|
81816
81900
|
const opts = options || {};
|
|
81817
81901
|
const posix$1 = opts.windows;
|
|
81818
|
-
const regex$
|
|
81819
|
-
const state = regex$
|
|
81820
|
-
delete regex$
|
|
81902
|
+
const regex$2 = isState ? picomatch$2.compileRe(glob, options) : picomatch$2.makeRe(glob, options, false, true);
|
|
81903
|
+
const state = regex$2.state;
|
|
81904
|
+
delete regex$2.state;
|
|
81821
81905
|
let isIgnored = () => false;
|
|
81822
81906
|
if (opts.ignore) {
|
|
81823
81907
|
const ignoreOpts = {
|
|
@@ -81829,14 +81913,14 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
81829
81913
|
isIgnored = picomatch$2(opts.ignore, ignoreOpts, returnState);
|
|
81830
81914
|
}
|
|
81831
81915
|
const matcher = (input, returnObject = false) => {
|
|
81832
|
-
const { isMatch, match, output } = picomatch$2.test(input, regex$
|
|
81916
|
+
const { isMatch, match, output } = picomatch$2.test(input, regex$2, options, {
|
|
81833
81917
|
glob,
|
|
81834
81918
|
posix: posix$1
|
|
81835
81919
|
});
|
|
81836
81920
|
const result = {
|
|
81837
81921
|
glob,
|
|
81838
81922
|
state,
|
|
81839
|
-
regex: regex$
|
|
81923
|
+
regex: regex$2,
|
|
81840
81924
|
posix: posix$1,
|
|
81841
81925
|
input,
|
|
81842
81926
|
output,
|
|
@@ -81875,7 +81959,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
81875
81959
|
* @return {Object} Returns an object with matching info.
|
|
81876
81960
|
* @api public
|
|
81877
81961
|
*/
|
|
81878
|
-
picomatch$2.test = (input, regex$
|
|
81962
|
+
picomatch$2.test = (input, regex$2, options, { glob, posix: posix$1 } = {}) => {
|
|
81879
81963
|
if (typeof input !== "string") throw new TypeError("Expected input to be a string");
|
|
81880
81964
|
if (input === "") return {
|
|
81881
81965
|
isMatch: false,
|
|
@@ -81889,8 +81973,8 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
81889
81973
|
output = format$4 ? format$4(input) : input;
|
|
81890
81974
|
match = output === glob;
|
|
81891
81975
|
}
|
|
81892
|
-
if (match === false || opts.capture === true) if (opts.matchBase === true || opts.basename === true) match = picomatch$2.matchBase(input, regex$
|
|
81893
|
-
else match = regex$
|
|
81976
|
+
if (match === false || opts.capture === true) if (opts.matchBase === true || opts.basename === true) match = picomatch$2.matchBase(input, regex$2, options, posix$1);
|
|
81977
|
+
else match = regex$2.exec(output);
|
|
81894
81978
|
return {
|
|
81895
81979
|
isMatch: Boolean(match),
|
|
81896
81980
|
match,
|
|
@@ -81910,8 +81994,8 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
81910
81994
|
* @return {Boolean}
|
|
81911
81995
|
* @api public
|
|
81912
81996
|
*/
|
|
81913
|
-
picomatch$2.matchBase = (input, glob, options) => {
|
|
81914
|
-
return (glob instanceof RegExp ? glob : picomatch$2.makeRe(glob, options)).test(utils$1.basename(input));
|
|
81997
|
+
picomatch$2.matchBase = (input, glob, options, posix$1 = options && options.windows) => {
|
|
81998
|
+
return (glob instanceof RegExp ? glob : picomatch$2.makeRe(glob, options)).test(utils$1.basename(input, { windows: posix$1 }));
|
|
81915
81999
|
};
|
|
81916
82000
|
/**
|
|
81917
82001
|
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
|
@@ -82003,9 +82087,9 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
82003
82087
|
const append = opts.contains ? "" : "$";
|
|
82004
82088
|
let source = `${prepend}(?:${state.output})${append}`;
|
|
82005
82089
|
if (state && state.negated === true) source = `^(?!${source}).*$`;
|
|
82006
|
-
const regex$
|
|
82007
|
-
if (returnState === true) regex$
|
|
82008
|
-
return regex$
|
|
82090
|
+
const regex$2 = picomatch$2.toRegex(source, options);
|
|
82091
|
+
if (returnState === true) regex$2.state = state;
|
|
82092
|
+
return regex$2;
|
|
82009
82093
|
};
|
|
82010
82094
|
/**
|
|
82011
82095
|
* Create a regular expression from a parsed glob pattern.
|
|
@@ -82072,8 +82156,8 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
82072
82156
|
}) });
|
|
82073
82157
|
|
|
82074
82158
|
//#endregion
|
|
82075
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
82076
|
-
var require_picomatch = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/picomatch@4.0.
|
|
82159
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/index.js
|
|
82160
|
+
var require_picomatch = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/index.js": ((exports, module) => {
|
|
82077
82161
|
const pico = require_picomatch$1();
|
|
82078
82162
|
const utils = require_utils();
|
|
82079
82163
|
function picomatch$1(glob, options, returnState = false) {
|
|
@@ -82159,15 +82243,15 @@ function buildRelative(cwd, root) {
|
|
|
82159
82243
|
};
|
|
82160
82244
|
}
|
|
82161
82245
|
const splitPatternOptions = { parts: true };
|
|
82162
|
-
function splitPattern(path$
|
|
82246
|
+
function splitPattern(path$1) {
|
|
82163
82247
|
var _result$parts;
|
|
82164
|
-
const result = import_picomatch.default.scan(path$
|
|
82165
|
-
return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$
|
|
82248
|
+
const result = import_picomatch.default.scan(path$1, splitPatternOptions);
|
|
82249
|
+
return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$1];
|
|
82166
82250
|
}
|
|
82167
82251
|
const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
|
|
82168
82252
|
const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
|
|
82169
|
-
const escapePosixPath = (path$
|
|
82170
|
-
const escapeWin32Path = (path$
|
|
82253
|
+
const escapePosixPath = (path$1) => path$1.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
82254
|
+
const escapeWin32Path = (path$1) => path$1.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
82171
82255
|
/**
|
|
82172
82256
|
* Escapes a path's special characters depending on the platform.
|
|
82173
82257
|
* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
|
|
@@ -82291,13 +82375,13 @@ function buildCrawler(options, patterns) {
|
|
|
82291
82375
|
if (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);
|
|
82292
82376
|
const crawler = new Builder({
|
|
82293
82377
|
filters: [debug$7 ? (p$2, isDirectory$2) => {
|
|
82294
|
-
const path$
|
|
82295
|
-
const matches = matcher(path$
|
|
82296
|
-
if (matches) log(`matched ${path$
|
|
82378
|
+
const path$1 = format$4(p$2, isDirectory$2);
|
|
82379
|
+
const matches = matcher(path$1) && !ignore$1(path$1);
|
|
82380
|
+
if (matches) log(`matched ${path$1}`);
|
|
82297
82381
|
return matches;
|
|
82298
82382
|
} : (p$2, isDirectory$2) => {
|
|
82299
|
-
const path$
|
|
82300
|
-
return matcher(path$
|
|
82383
|
+
const path$1 = format$4(p$2, isDirectory$2);
|
|
82384
|
+
return matcher(path$1) && !ignore$1(path$1);
|
|
82301
82385
|
}],
|
|
82302
82386
|
exclude: debug$7 ? (_, p$2) => {
|
|
82303
82387
|
const skipped = excludePredicate(_, p$2);
|
|
@@ -83553,13 +83637,13 @@ const wslDefaultBrowser = async () => {
|
|
|
83553
83637
|
const { stdout: stdout$2 } = await executePowerShell(String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`, { powerShellPath: psPath });
|
|
83554
83638
|
return stdout$2.trim();
|
|
83555
83639
|
};
|
|
83556
|
-
const convertWslPathToWindows = async (path$
|
|
83557
|
-
if (/^[a-z]+:\/\//i.test(path$
|
|
83640
|
+
const convertWslPathToWindows = async (path$1) => {
|
|
83641
|
+
if (/^[a-z]+:\/\//i.test(path$1)) return path$1;
|
|
83558
83642
|
try {
|
|
83559
|
-
const { stdout: stdout$2 } = await execFile$1("wslpath", ["-aw", path$
|
|
83643
|
+
const { stdout: stdout$2 } = await execFile$1("wslpath", ["-aw", path$1], { encoding: "utf8" });
|
|
83560
83644
|
return stdout$2.trim();
|
|
83561
83645
|
} catch {
|
|
83562
|
-
return path$
|
|
83646
|
+
return path$1;
|
|
83563
83647
|
}
|
|
83564
83648
|
};
|
|
83565
83649
|
|
|
@@ -83745,8 +83829,8 @@ var is_in_ssh_default = isInSsh;
|
|
|
83745
83829
|
//#endregion
|
|
83746
83830
|
//#region ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
|
|
83747
83831
|
const fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
83748
|
-
const __dirname = import.meta.url ?
|
|
83749
|
-
const localXdgOpenPath =
|
|
83832
|
+
const __dirname = import.meta.url ? path2__default.dirname(fileURLToPath(import.meta.url)) : "";
|
|
83833
|
+
const localXdgOpenPath = path2__default.join(__dirname, "xdg-open");
|
|
83750
83834
|
const { platform, arch: arch$1 } = process$1;
|
|
83751
83835
|
const tryEachApp = async (apps$1, opener) => {
|
|
83752
83836
|
if (apps$1.length === 0) return;
|