@cloudflare/vite-plugin 1.43.0 → 1.43.2
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
CHANGED
|
@@ -3,7 +3,7 @@ import assert from "node:assert";
|
|
|
3
3
|
import { CoreHeaders, CorePaths, Log, LogLevel, Miniflare, Request as Request$1, Response as Response$1, buildPublicUrl, coupleWebSocket, getDefaultDevRegistryPath, getNodeCompat, getWorkerRegistry, kUnsafeEphemeralUniqueKey, parseModuleFallbackRequest } from "miniflare";
|
|
4
4
|
import * as wrangler from "wrangler";
|
|
5
5
|
import * as nodePath from "node:path";
|
|
6
|
-
import
|
|
6
|
+
import path2, { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
7
7
|
import * as util$1 from "node:util";
|
|
8
8
|
import { format, inspect, promisify } from "node:util";
|
|
9
9
|
import * as vite from "vite";
|
|
@@ -1506,7 +1506,7 @@ async function assertWranglerVersion() {
|
|
|
1506
1506
|
* The default compatibility date to use when the user omits one.
|
|
1507
1507
|
* This value is injected at build time and remains fixed for each release.
|
|
1508
1508
|
*/
|
|
1509
|
-
const DEFAULT_COMPAT_DATE = "2026-07-
|
|
1509
|
+
const DEFAULT_COMPAT_DATE = "2026-07-07";
|
|
1510
1510
|
|
|
1511
1511
|
//#endregion
|
|
1512
1512
|
//#region src/build-output-env.ts
|
|
@@ -1595,7 +1595,7 @@ const PROXY_SHARED_SECRET = randomUUID();
|
|
|
1595
1595
|
const kRequestType = Symbol("kRequestType");
|
|
1596
1596
|
|
|
1597
1597
|
//#endregion
|
|
1598
|
-
//#region ../workers-utils/dist/chunk-
|
|
1598
|
+
//#region ../workers-utils/dist/chunk-DDRU76YD.mjs
|
|
1599
1599
|
var __create = Object.create;
|
|
1600
1600
|
var __defProp$1 = Object.defineProperty;
|
|
1601
1601
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1613,12 +1613,6 @@ var __require$1 = /* @__PURE__ */ ((x) => typeof __require$2 !== "undefined" ? _
|
|
|
1613
1613
|
var __commonJS$1 = (cb, mod$1) => function __require2() {
|
|
1614
1614
|
return mod$1 || (0, cb[__getOwnPropNames$1(cb)[0]])((mod$1 = { exports: {} }).exports, mod$1), mod$1.exports;
|
|
1615
1615
|
};
|
|
1616
|
-
var __export = (target$1, all$1) => {
|
|
1617
|
-
for (var name in all$1) __defProp$1(target$1, name, {
|
|
1618
|
-
get: all$1[name],
|
|
1619
|
-
enumerable: true
|
|
1620
|
-
});
|
|
1621
|
-
};
|
|
1622
1616
|
var __copyProps = (to, from, except, desc) => {
|
|
1623
1617
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1624
1618
|
for (let key of __getOwnPropNames$1(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp$1(to, key, {
|
|
@@ -1628,14 +1622,171 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
1628
1622
|
}
|
|
1629
1623
|
return to;
|
|
1630
1624
|
};
|
|
1631
|
-
var __reExport = (target$1, mod$1, secondTarget) => (__copyProps(target$1, mod$1, "default"), secondTarget && __copyProps(secondTarget, mod$1, "default"));
|
|
1632
1625
|
var __toESM = (mod$1, isNodeMode, target$1) => (target$1 = mod$1 != null ? __create(__getProtoOf(mod$1)) : {}, __copyProps(isNodeMode || !mod$1 || !mod$1.__esModule ? __defProp$1(target$1, "default", {
|
|
1633
1626
|
value: mod$1,
|
|
1634
1627
|
enumerable: true
|
|
1635
1628
|
}) : target$1, mod$1));
|
|
1636
1629
|
|
|
1637
1630
|
//#endregion
|
|
1638
|
-
//#region ../workers-utils/dist/chunk-
|
|
1631
|
+
//#region ../workers-utils/dist/chunk-OC543JY3.mjs
|
|
1632
|
+
function isDirectory$1(path) {
|
|
1633
|
+
return fs2.statSync(path, { throwIfNoEntry: false })?.isDirectory() ?? false;
|
|
1634
|
+
}
|
|
1635
|
+
__name$1(isDirectory$1, "isDirectory");
|
|
1636
|
+
function removeDir$1(dirPath, { fireAndForget = false } = {}) {
|
|
1637
|
+
const result = fs2.promises.rm(dirPath, {
|
|
1638
|
+
recursive: true,
|
|
1639
|
+
force: true,
|
|
1640
|
+
maxRetries: 5,
|
|
1641
|
+
retryDelay: 100
|
|
1642
|
+
});
|
|
1643
|
+
if (fireAndForget) result.catch(() => {});
|
|
1644
|
+
else return result;
|
|
1645
|
+
}
|
|
1646
|
+
__name$1(removeDir$1, "removeDir");
|
|
1647
|
+
function removeDirSync$1(dirPath) {
|
|
1648
|
+
fs2.rmSync(dirPath, {
|
|
1649
|
+
recursive: true,
|
|
1650
|
+
force: true,
|
|
1651
|
+
maxRetries: 5,
|
|
1652
|
+
retryDelay: 100
|
|
1653
|
+
});
|
|
1654
|
+
}
|
|
1655
|
+
__name$1(removeDirSync$1, "removeDirSync");
|
|
1656
|
+
|
|
1657
|
+
//#endregion
|
|
1658
|
+
//#region ../workers-utils/dist/chunk-OTBYAUQ6.mjs
|
|
1659
|
+
function isWindows() {
|
|
1660
|
+
return /^win/i.test(process.platform);
|
|
1661
|
+
}
|
|
1662
|
+
__name$1(isWindows, "isWindows");
|
|
1663
|
+
function isMacOS() {
|
|
1664
|
+
return /^darwin$/i.test(process.platform);
|
|
1665
|
+
}
|
|
1666
|
+
__name$1(isMacOS, "isMacOS");
|
|
1667
|
+
function isNonEmpty(value) {
|
|
1668
|
+
return !!value;
|
|
1669
|
+
}
|
|
1670
|
+
__name$1(isNonEmpty, "isNonEmpty");
|
|
1671
|
+
function getEnv(name) {
|
|
1672
|
+
return process.env[name];
|
|
1673
|
+
}
|
|
1674
|
+
__name$1(getEnv, "getEnv");
|
|
1675
|
+
function normalizePath$2(p$1) {
|
|
1676
|
+
return p$1 ? path2.normalize(path2.join(p$1, ".")) : void 0;
|
|
1677
|
+
}
|
|
1678
|
+
__name$1(normalizePath$2, "normalizePath");
|
|
1679
|
+
function homeDir() {
|
|
1680
|
+
if (isWindows()) return normalizePath$2([
|
|
1681
|
+
os.homedir(),
|
|
1682
|
+
getEnv("USERPROFILE"),
|
|
1683
|
+
getEnv("HOME"),
|
|
1684
|
+
getEnv("HOMEDRIVE") || getEnv("HOMEPATH") ? path2.join(getEnv("HOMEDRIVE") ?? "", getEnv("HOMEPATH") ?? "") : void 0
|
|
1685
|
+
].find(isNonEmpty));
|
|
1686
|
+
return normalizePath$2(os.homedir() || getEnv("HOME"));
|
|
1687
|
+
}
|
|
1688
|
+
__name$1(homeDir, "homeDir");
|
|
1689
|
+
function joinToBase(base, segments) {
|
|
1690
|
+
return base ? path2.join(base, ...segments) : void 0;
|
|
1691
|
+
}
|
|
1692
|
+
__name$1(joinToBase, "joinToBase");
|
|
1693
|
+
function tempDir() {
|
|
1694
|
+
if (isWindows()) {
|
|
1695
|
+
const fallback2 = "C:\\Temp";
|
|
1696
|
+
const found = [
|
|
1697
|
+
() => os.tmpdir(),
|
|
1698
|
+
() => getEnv("TEMP"),
|
|
1699
|
+
() => getEnv("TMP"),
|
|
1700
|
+
() => joinToBase(getEnv("LOCALAPPDATA"), ["Temp"]),
|
|
1701
|
+
() => joinToBase(homeDir(), [
|
|
1702
|
+
"AppData",
|
|
1703
|
+
"Local",
|
|
1704
|
+
"Temp"
|
|
1705
|
+
]),
|
|
1706
|
+
() => joinToBase(getEnv("ALLUSERSPROFILE"), ["Temp"]),
|
|
1707
|
+
() => joinToBase(getEnv("SystemRoot"), ["Temp"]),
|
|
1708
|
+
() => joinToBase(getEnv("windir"), ["Temp"]),
|
|
1709
|
+
() => joinToBase(getEnv("SystemDrive"), ["\\", "Temp"])
|
|
1710
|
+
].find((fn) => isNonEmpty(fn()));
|
|
1711
|
+
return found && normalizePath$2(found()) || fallback2;
|
|
1712
|
+
}
|
|
1713
|
+
return normalizePath$2([
|
|
1714
|
+
os.tmpdir(),
|
|
1715
|
+
getEnv("TMPDIR"),
|
|
1716
|
+
getEnv("TEMP"),
|
|
1717
|
+
getEnv("TMP")
|
|
1718
|
+
].find(isNonEmpty)) || "/tmp";
|
|
1719
|
+
}
|
|
1720
|
+
__name$1(tempDir, "tempDir");
|
|
1721
|
+
function baseDir() {
|
|
1722
|
+
return homeDir() || tempDir();
|
|
1723
|
+
}
|
|
1724
|
+
__name$1(baseDir, "baseDir");
|
|
1725
|
+
function valOrPath(value, segments) {
|
|
1726
|
+
return value || path2.join(...segments);
|
|
1727
|
+
}
|
|
1728
|
+
__name$1(valOrPath, "valOrPath");
|
|
1729
|
+
function windowsAppData() {
|
|
1730
|
+
return valOrPath(getEnv("APPDATA"), [
|
|
1731
|
+
baseDir(),
|
|
1732
|
+
"AppData",
|
|
1733
|
+
"Roaming"
|
|
1734
|
+
]);
|
|
1735
|
+
}
|
|
1736
|
+
__name$1(windowsAppData, "windowsAppData");
|
|
1737
|
+
function windowsLocalAppData() {
|
|
1738
|
+
return valOrPath(getEnv("LOCALAPPDATA"), [
|
|
1739
|
+
baseDir(),
|
|
1740
|
+
"AppData",
|
|
1741
|
+
"Local"
|
|
1742
|
+
]);
|
|
1743
|
+
}
|
|
1744
|
+
__name$1(windowsLocalAppData, "windowsLocalAppData");
|
|
1745
|
+
function xdgConfig() {
|
|
1746
|
+
if (isMacOS()) return valOrPath(getEnv("XDG_CONFIG_HOME"), [
|
|
1747
|
+
baseDir(),
|
|
1748
|
+
"Library",
|
|
1749
|
+
"Preferences"
|
|
1750
|
+
]);
|
|
1751
|
+
if (isWindows()) return valOrPath(getEnv("XDG_CONFIG_HOME"), [windowsAppData(), "xdg.config"]);
|
|
1752
|
+
return valOrPath(getEnv("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
|
|
1753
|
+
}
|
|
1754
|
+
__name$1(xdgConfig, "xdgConfig");
|
|
1755
|
+
function xdgCache() {
|
|
1756
|
+
if (isMacOS()) return valOrPath(getEnv("XDG_CACHE_HOME"), [
|
|
1757
|
+
baseDir(),
|
|
1758
|
+
"Library",
|
|
1759
|
+
"Caches"
|
|
1760
|
+
]);
|
|
1761
|
+
if (isWindows()) return valOrPath(getEnv("XDG_CACHE_HOME"), [windowsLocalAppData(), "xdg.cache"]);
|
|
1762
|
+
return valOrPath(getEnv("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
|
|
1763
|
+
}
|
|
1764
|
+
__name$1(xdgCache, "xdgCache");
|
|
1765
|
+
function xdgAppPaths(name) {
|
|
1766
|
+
const segment = path2.parse(name).name;
|
|
1767
|
+
return {
|
|
1768
|
+
config: /* @__PURE__ */ __name$1(() => path2.join(xdgConfig(), segment), "config"),
|
|
1769
|
+
cache: /* @__PURE__ */ __name$1(() => path2.join(xdgCache(), segment), "cache")
|
|
1770
|
+
};
|
|
1771
|
+
}
|
|
1772
|
+
__name$1(xdgAppPaths, "xdgAppPaths");
|
|
1773
|
+
function getGlobalConfigPath({ appName = "wrangler", leadingDot = true, useLegacyHomeDir = true } = {}) {
|
|
1774
|
+
const dirName = `${leadingDot ? "." : ""}${appName}`;
|
|
1775
|
+
const configDir = xdgAppPaths(dirName).config();
|
|
1776
|
+
if (useLegacyHomeDir) {
|
|
1777
|
+
const legacyConfigDir = path2.join(os.homedir(), dirName);
|
|
1778
|
+
if (isDirectory$1(legacyConfigDir)) return legacyConfigDir;
|
|
1779
|
+
}
|
|
1780
|
+
return configDir;
|
|
1781
|
+
}
|
|
1782
|
+
__name$1(getGlobalConfigPath, "getGlobalConfigPath");
|
|
1783
|
+
function getGlobalWranglerCachePath() {
|
|
1784
|
+
return xdgAppPaths(".wrangler").cache();
|
|
1785
|
+
}
|
|
1786
|
+
__name$1(getGlobalWranglerCachePath, "getGlobalWranglerCachePath");
|
|
1787
|
+
|
|
1788
|
+
//#endregion
|
|
1789
|
+
//#region ../workers-utils/dist/chunk-27EBTAT2.mjs
|
|
1639
1790
|
function partitionExports$1(exports$2) {
|
|
1640
1791
|
const partitioned = {
|
|
1641
1792
|
"durable-object": {},
|
|
@@ -2398,10 +2549,10 @@ function parseTree$1(text, errors$1 = [], options = ParseOptions$1.DEFAULT) {
|
|
|
2398
2549
|
return result;
|
|
2399
2550
|
}
|
|
2400
2551
|
__name$1(parseTree$1, "parseTree");
|
|
2401
|
-
function findNodeAtLocation$1(root, path2) {
|
|
2552
|
+
function findNodeAtLocation$1(root, path2$1) {
|
|
2402
2553
|
if (!root) return;
|
|
2403
2554
|
let node = root;
|
|
2404
|
-
for (let segment of path2) if (typeof segment === "string") {
|
|
2555
|
+
for (let segment of path2$1) if (typeof segment === "string") {
|
|
2405
2556
|
if (node.type !== "object" || !Array.isArray(node.children)) return;
|
|
2406
2557
|
let found = false;
|
|
2407
2558
|
for (const propertyNode of node.children) if (Array.isArray(propertyNode.children) && propertyNode.children[0].value === segment && propertyNode.children.length === 2) {
|
|
@@ -2628,13 +2779,13 @@ function getNodeType$1(value) {
|
|
|
2628
2779
|
}
|
|
2629
2780
|
__name$1(getNodeType$1, "getNodeType");
|
|
2630
2781
|
function setProperty$1(text, originalPath, value, options) {
|
|
2631
|
-
const path2 = originalPath.slice();
|
|
2782
|
+
const path2$1 = originalPath.slice();
|
|
2632
2783
|
const root = parseTree$1(text, []);
|
|
2633
2784
|
let parent = void 0;
|
|
2634
2785
|
let lastSegment = void 0;
|
|
2635
|
-
while (path2.length > 0) {
|
|
2636
|
-
lastSegment = path2.pop();
|
|
2637
|
-
parent = findNodeAtLocation$1(root, path2);
|
|
2786
|
+
while (path2$1.length > 0) {
|
|
2787
|
+
lastSegment = path2$1.pop();
|
|
2788
|
+
parent = findNodeAtLocation$1(root, path2$1);
|
|
2638
2789
|
if (parent === void 0 && value !== void 0) if (typeof lastSegment === "string") value = { [lastSegment]: value };
|
|
2639
2790
|
else value = [value];
|
|
2640
2791
|
else break;
|
|
@@ -2876,8 +3027,8 @@ function format2$1(documentText, range, options) {
|
|
|
2876
3027
|
return format$2(documentText, range, options);
|
|
2877
3028
|
}
|
|
2878
3029
|
__name$1(format2$1, "format");
|
|
2879
|
-
function modify$1(text, path2, value, options) {
|
|
2880
|
-
return setProperty$1(text, path2, value, options);
|
|
3030
|
+
function modify$1(text, path2$1, value, options) {
|
|
3031
|
+
return setProperty$1(text, path2$1, value, options);
|
|
2881
3032
|
}
|
|
2882
3033
|
__name$1(modify$1, "modify");
|
|
2883
3034
|
function applyEdits$1(text, edits) {
|
|
@@ -3986,7 +4137,7 @@ function resolveWranglerConfigPath$1({ config: config$1, script }, options) {
|
|
|
3986
4137
|
deployConfigPath: void 0,
|
|
3987
4138
|
redirected: false
|
|
3988
4139
|
};
|
|
3989
|
-
return findWranglerConfig$2(script !== void 0 ?
|
|
4140
|
+
return findWranglerConfig$2(script !== void 0 ? path2.dirname(script) : process.cwd(), options);
|
|
3990
4141
|
}
|
|
3991
4142
|
__name$1(resolveWranglerConfigPath$1, "resolveWranglerConfigPath");
|
|
3992
4143
|
function findWranglerConfig$2(referencePath = process.cwd(), { useRedirectIfAvailable = false } = {}) {
|
|
@@ -4017,15 +4168,15 @@ function findRedirectedWranglerConfig$1(cwd, userConfigPath) {
|
|
|
4017
4168
|
const deployConfigFile = readFileSync$2(deployConfigPath);
|
|
4018
4169
|
try {
|
|
4019
4170
|
const deployConfig = parseJSONC$1(deployConfigFile, deployConfigPath);
|
|
4020
|
-
redirectedConfigPath = deployConfig.configPath &&
|
|
4171
|
+
redirectedConfigPath = deployConfig.configPath && path2.resolve(path2.dirname(deployConfigPath), deployConfig.configPath);
|
|
4021
4172
|
} catch (e) {
|
|
4022
|
-
throw new UserError(`Failed to parse the deploy configuration file at ${
|
|
4173
|
+
throw new UserError(`Failed to parse the deploy configuration file at ${path2.relative(".", deployConfigPath)}`, {
|
|
4023
4174
|
cause: e,
|
|
4024
4175
|
telemetryMessage: false
|
|
4025
4176
|
});
|
|
4026
4177
|
}
|
|
4027
4178
|
if (!redirectedConfigPath) throw new UserError(esm_default$1`
|
|
4028
|
-
A deploy configuration file was found at "${
|
|
4179
|
+
A deploy configuration file was found at "${path2.relative(".", deployConfigPath)}".
|
|
4029
4180
|
But this is not valid - the required "configPath" property was not found.
|
|
4030
4181
|
Instead this file contains:
|
|
4031
4182
|
\`\`\`
|
|
@@ -4033,13 +4184,13 @@ function findRedirectedWranglerConfig$1(cwd, userConfigPath) {
|
|
|
4033
4184
|
\`\`\`
|
|
4034
4185
|
`, { telemetryMessage: false });
|
|
4035
4186
|
if (!existsSync(redirectedConfigPath)) throw new UserError(esm_default$1`
|
|
4036
|
-
There is a deploy configuration at "${
|
|
4037
|
-
But the redirected configuration path it points to, "${
|
|
4187
|
+
There is a deploy configuration at "${path2.relative(".", deployConfigPath)}".
|
|
4188
|
+
But the redirected configuration path it points to, "${path2.relative(".", redirectedConfigPath)}", does not exist.
|
|
4038
4189
|
`, { telemetryMessage: false });
|
|
4039
4190
|
if (userConfigPath) {
|
|
4040
|
-
if (
|
|
4041
|
-
Found both a user configuration file at "${
|
|
4042
|
-
and a deploy configuration file at "${
|
|
4191
|
+
if (path2.join(path2.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG$1) !== deployConfigPath) throw new UserError(esm_default$1`
|
|
4192
|
+
Found both a user configuration file at "${path2.relative(".", userConfigPath)}"
|
|
4193
|
+
and a deploy configuration file at "${path2.relative(".", deployConfigPath)}".
|
|
4043
4194
|
But these do not share the same base path so it is not clear which should be used.
|
|
4044
4195
|
`, { telemetryMessage: false });
|
|
4045
4196
|
}
|
|
@@ -4082,30 +4233,6 @@ function formatConfigSnippet$1(snippet, configPath, formatted = true) {
|
|
|
4082
4233
|
else return formatted ? JSON.stringify(snippet, null, 2) : JSON.stringify(snippet);
|
|
4083
4234
|
}
|
|
4084
4235
|
__name$1(formatConfigSnippet$1, "formatConfigSnippet");
|
|
4085
|
-
function isDirectory$1(path2) {
|
|
4086
|
-
return fs2.statSync(path2, { throwIfNoEntry: false })?.isDirectory() ?? false;
|
|
4087
|
-
}
|
|
4088
|
-
__name$1(isDirectory$1, "isDirectory");
|
|
4089
|
-
function removeDir$1(dirPath, { fireAndForget = false } = {}) {
|
|
4090
|
-
const result = fs2.promises.rm(dirPath, {
|
|
4091
|
-
recursive: true,
|
|
4092
|
-
force: true,
|
|
4093
|
-
maxRetries: 5,
|
|
4094
|
-
retryDelay: 100
|
|
4095
|
-
});
|
|
4096
|
-
if (fireAndForget) result.catch(() => {});
|
|
4097
|
-
else return result;
|
|
4098
|
-
}
|
|
4099
|
-
__name$1(removeDir$1, "removeDir");
|
|
4100
|
-
function removeDirSync$1(dirPath) {
|
|
4101
|
-
fs2.rmSync(dirPath, {
|
|
4102
|
-
recursive: true,
|
|
4103
|
-
force: true,
|
|
4104
|
-
maxRetries: 5,
|
|
4105
|
-
retryDelay: 100
|
|
4106
|
-
});
|
|
4107
|
-
}
|
|
4108
|
-
__name$1(removeDirSync$1, "removeDirSync");
|
|
4109
4236
|
|
|
4110
4237
|
//#endregion
|
|
4111
4238
|
//#region ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/core/symbols.js
|
|
@@ -5255,10 +5382,10 @@ var require_util$5 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/un
|
|
|
5255
5382
|
if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError$36("Invalid URL protocol: the URL must start with `http:` or `https:`.");
|
|
5256
5383
|
const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80;
|
|
5257
5384
|
let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`;
|
|
5258
|
-
let path
|
|
5385
|
+
let path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`;
|
|
5259
5386
|
if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1);
|
|
5260
|
-
if (path
|
|
5261
|
-
return new URL(`${origin}${path
|
|
5387
|
+
if (path && path[0] !== "/") path = `/${path}`;
|
|
5388
|
+
return new URL(`${origin}${path}`);
|
|
5262
5389
|
}
|
|
5263
5390
|
if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError$36("Invalid URL protocol: the URL must start with `http:` or `https:`.");
|
|
5264
5391
|
return url;
|
|
@@ -6133,8 +6260,8 @@ var require_diagnostics = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
6133
6260
|
debugLog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version$3, error.message);
|
|
6134
6261
|
});
|
|
6135
6262
|
diagnosticsChannel$1.subscribe("undici:client:sendHeaders", (evt) => {
|
|
6136
|
-
const { request: { method, path
|
|
6137
|
-
debugLog("sending request to %s %s%s", method, origin, path
|
|
6263
|
+
const { request: { method, path, origin } } = evt;
|
|
6264
|
+
debugLog("sending request to %s %s%s", method, origin, path);
|
|
6138
6265
|
});
|
|
6139
6266
|
}
|
|
6140
6267
|
let isTrackingRequestEvents = false;
|
|
@@ -6146,16 +6273,16 @@ var require_diagnostics = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
6146
6273
|
}
|
|
6147
6274
|
isTrackingRequestEvents = true;
|
|
6148
6275
|
diagnosticsChannel$1.subscribe("undici:request:headers", (evt) => {
|
|
6149
|
-
const { request: { method, path
|
|
6150
|
-
debugLog("received response to %s %s%s - HTTP %d", method, origin, path
|
|
6276
|
+
const { request: { method, path, origin }, response: { statusCode } } = evt;
|
|
6277
|
+
debugLog("received response to %s %s%s - HTTP %d", method, origin, path, statusCode);
|
|
6151
6278
|
});
|
|
6152
6279
|
diagnosticsChannel$1.subscribe("undici:request:trailers", (evt) => {
|
|
6153
|
-
const { request: { method, path
|
|
6154
|
-
debugLog("trailers received from %s %s%s", method, origin, path
|
|
6280
|
+
const { request: { method, path, origin } } = evt;
|
|
6281
|
+
debugLog("trailers received from %s %s%s", method, origin, path);
|
|
6155
6282
|
});
|
|
6156
6283
|
diagnosticsChannel$1.subscribe("undici:request:error", (evt) => {
|
|
6157
|
-
const { request: { method, path
|
|
6158
|
-
debugLog("request to %s %s%s errored - %s", method, origin, path
|
|
6284
|
+
const { request: { method, path, origin }, error } = evt;
|
|
6285
|
+
debugLog("request to %s %s%s errored - %s", method, origin, path, error.message);
|
|
6159
6286
|
});
|
|
6160
6287
|
}
|
|
6161
6288
|
let isTrackingWebSocketEvents = false;
|
|
@@ -6216,10 +6343,10 @@ var require_request$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
6216
6343
|
}
|
|
6217
6344
|
const kHandler = Symbol("handler");
|
|
6218
6345
|
var Request$6 = class {
|
|
6219
|
-
constructor(origin, { path
|
|
6220
|
-
if (typeof path
|
|
6221
|
-
else if (path
|
|
6222
|
-
else if (invalidPathRegex.test(path
|
|
6346
|
+
constructor(origin, { path, method, body, headers, query, idempotent, blocking, upgrade: upgrade$1, headersTimeout, bodyTimeout, reset, expectContinue, servername, throwOnError, maxRedirections, typeOfService }, handler) {
|
|
6347
|
+
if (typeof path !== "string") throw new InvalidArgumentError$35("path must be a string");
|
|
6348
|
+
else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError$35("path must be an absolute URL or start with a slash");
|
|
6349
|
+
else if (invalidPathRegex.test(path)) throw new InvalidArgumentError$35("invalid request path");
|
|
6223
6350
|
if (typeof method !== "string") throw new InvalidArgumentError$35("method must be a string");
|
|
6224
6351
|
else if (normalizedMethodRecords$1[method] === void 0 && !isValidHTTPToken$2(method)) throw new InvalidArgumentError$35("invalid request method");
|
|
6225
6352
|
if (upgrade$1 && typeof upgrade$1 !== "string") throw new InvalidArgumentError$35("upgrade must be a string");
|
|
@@ -6260,7 +6387,7 @@ var require_request$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
6260
6387
|
this.completed = false;
|
|
6261
6388
|
this.aborted = false;
|
|
6262
6389
|
this.upgrade = upgrade$1 || null;
|
|
6263
|
-
this.path = query ? serializePathWithQuery$3(path
|
|
6390
|
+
this.path = query ? serializePathWithQuery$3(path, query) : path;
|
|
6264
6391
|
this.origin = origin;
|
|
6265
6392
|
this.protocol = getProtocolFromUrlString(origin);
|
|
6266
6393
|
this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
|
|
@@ -10859,7 +10986,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
10859
10986
|
* @returns
|
|
10860
10987
|
*/
|
|
10861
10988
|
function writeH1(client, request$2) {
|
|
10862
|
-
const { method, path
|
|
10989
|
+
const { method, path, host, upgrade: upgrade$1, blocking, reset } = request$2;
|
|
10863
10990
|
let { body, headers, contentLength } = request$2;
|
|
10864
10991
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
|
|
10865
10992
|
if (util$23.isFormDataLike(body)) {
|
|
@@ -10905,7 +11032,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
10905
11032
|
if (client[kMaxRequests$1] && socket[kCounter$1]++ >= client[kMaxRequests$1]) socket[kReset$1] = true;
|
|
10906
11033
|
if (blocking) socket[kBlocking] = true;
|
|
10907
11034
|
if (socket.setTypeOfService) socket.setTypeOfService(request$2.typeOfService);
|
|
10908
|
-
let header = `${method} ${path
|
|
11035
|
+
let header = `${method} ${path} HTTP/1.1\r\n`;
|
|
10909
11036
|
if (typeof host === "string") header += `host: ${host}\r\n`;
|
|
10910
11037
|
else header += client[kHostHeader$1];
|
|
10911
11038
|
if (upgrade$1) header += `connection: upgrade\r\nupgrade: ${upgrade$1}\r\n`;
|
|
@@ -11441,7 +11568,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
11441
11568
|
function writeH2(client, request$2) {
|
|
11442
11569
|
const requestTimeout = request$2.bodyTimeout ?? client[kBodyTimeout$1];
|
|
11443
11570
|
const session = client[kHTTP2Session];
|
|
11444
|
-
const { method, path
|
|
11571
|
+
const { method, path, host, upgrade: upgrade$1, expectContinue, signal, protocol, headers: reqHeaders } = request$2;
|
|
11445
11572
|
let { body } = request$2;
|
|
11446
11573
|
if (upgrade$1 != null && upgrade$1 !== "websocket") {
|
|
11447
11574
|
util$22.errorRequest(client, request$2, new InvalidArgumentError$30(`Custom upgrade "${upgrade$1}" not supported over HTTP/2`));
|
|
@@ -11494,7 +11621,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
11494
11621
|
}
|
|
11495
11622
|
headers[HTTP2_HEADER_METHOD] = "CONNECT";
|
|
11496
11623
|
headers[HTTP2_HEADER_PROTOCOL] = "websocket";
|
|
11497
|
-
headers[HTTP2_HEADER_PATH] = path
|
|
11624
|
+
headers[HTTP2_HEADER_PATH] = path;
|
|
11498
11625
|
if (protocol === "ws:" || protocol === "wss:") headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https";
|
|
11499
11626
|
else headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
|
|
11500
11627
|
stream$2 = session.request(headers, {
|
|
@@ -11536,7 +11663,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
|
|
|
11536
11663
|
stream$2.setTimeout(requestTimeout);
|
|
11537
11664
|
return true;
|
|
11538
11665
|
}
|
|
11539
|
-
headers[HTTP2_HEADER_PATH] = path
|
|
11666
|
+
headers[HTTP2_HEADER_PATH] = path;
|
|
11540
11667
|
headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
|
|
11541
11668
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
|
|
11542
11669
|
if (body && typeof body.read === "function") body.read(0);
|
|
@@ -13401,8 +13528,8 @@ var require_proxy_agent = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
|
|
|
13401
13528
|
}
|
|
13402
13529
|
if (onHeaders) onHeaders.call(this, statusCode, data$1, resume$1);
|
|
13403
13530
|
};
|
|
13404
|
-
const { origin, path
|
|
13405
|
-
opts.path = origin + path
|
|
13531
|
+
const { origin, path = "/", headers = {} } = opts;
|
|
13532
|
+
opts.path = origin + path;
|
|
13406
13533
|
if (!("host" in headers) && !("Host" in headers)) {
|
|
13407
13534
|
const { host } = new URL(origin);
|
|
13408
13535
|
headers.host = host;
|
|
@@ -15187,16 +15314,16 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnp
|
|
|
15187
15314
|
}
|
|
15188
15315
|
return normalizedQp;
|
|
15189
15316
|
}
|
|
15190
|
-
function safeUrl(path
|
|
15191
|
-
if (typeof path
|
|
15192
|
-
const pathSegments = path
|
|
15193
|
-
if (pathSegments.length !== 2) return path
|
|
15317
|
+
function safeUrl(path) {
|
|
15318
|
+
if (typeof path !== "string") return path;
|
|
15319
|
+
const pathSegments = path.split("?", 3);
|
|
15320
|
+
if (pathSegments.length !== 2) return path;
|
|
15194
15321
|
const qp = new URLSearchParams(pathSegments.pop());
|
|
15195
15322
|
qp.sort();
|
|
15196
15323
|
return [...pathSegments, qp.toString()].join("?");
|
|
15197
15324
|
}
|
|
15198
|
-
function matchKey(mockDispatch$1, { path
|
|
15199
|
-
const pathMatch = matchValue$1(mockDispatch$1.path, path
|
|
15325
|
+
function matchKey(mockDispatch$1, { path, method, body, headers }) {
|
|
15326
|
+
const pathMatch = matchValue$1(mockDispatch$1.path, path);
|
|
15200
15327
|
const methodMatch = matchValue$1(mockDispatch$1.method, method);
|
|
15201
15328
|
const bodyMatch = typeof mockDispatch$1.body !== "undefined" ? matchValue$1(mockDispatch$1.body, body) : true;
|
|
15202
15329
|
const headersMatch = matchHeaders(mockDispatch$1, headers);
|
|
@@ -15214,8 +15341,8 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnp
|
|
|
15214
15341
|
const basePath = key.query ? serializePathWithQuery$2(key.path, key.query) : key.path;
|
|
15215
15342
|
const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
|
|
15216
15343
|
const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath);
|
|
15217
|
-
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path
|
|
15218
|
-
return ignoreTrailingSlash ? matchValue$1(removeTrailingSlash(safeUrl(path
|
|
15344
|
+
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path, ignoreTrailingSlash }) => {
|
|
15345
|
+
return ignoreTrailingSlash ? matchValue$1(removeTrailingSlash(safeUrl(path)), resolvedPathWithoutTrailingSlash) : matchValue$1(safeUrl(path), resolvedPath);
|
|
15219
15346
|
});
|
|
15220
15347
|
if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
|
|
15221
15348
|
matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue$1(method, key.method));
|
|
@@ -15258,15 +15385,15 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnp
|
|
|
15258
15385
|
/**
|
|
15259
15386
|
* @param {string} path Path to remove trailing slash from
|
|
15260
15387
|
*/
|
|
15261
|
-
function removeTrailingSlash(path
|
|
15262
|
-
while (path
|
|
15263
|
-
if (path
|
|
15264
|
-
return path
|
|
15388
|
+
function removeTrailingSlash(path) {
|
|
15389
|
+
while (path.endsWith("/")) path = path.slice(0, -1);
|
|
15390
|
+
if (path.length === 0) path = "/";
|
|
15391
|
+
return path;
|
|
15265
15392
|
}
|
|
15266
15393
|
function buildKey$1(opts) {
|
|
15267
|
-
const { path
|
|
15394
|
+
const { path, method, body, headers, query } = opts;
|
|
15268
15395
|
return {
|
|
15269
|
-
path
|
|
15396
|
+
path,
|
|
15270
15397
|
method,
|
|
15271
15398
|
body,
|
|
15272
15399
|
headers,
|
|
@@ -15833,10 +15960,10 @@ var require_pending_interceptors_formatter = /* @__PURE__ */ __commonJS$2({ "../
|
|
|
15833
15960
|
});
|
|
15834
15961
|
}
|
|
15835
15962
|
format(pendingInterceptors) {
|
|
15836
|
-
const withPrettyHeaders = pendingInterceptors.map(({ method, path
|
|
15963
|
+
const withPrettyHeaders = pendingInterceptors.map(({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
|
|
15837
15964
|
Method: method,
|
|
15838
15965
|
Origin: origin,
|
|
15839
|
-
Path: path
|
|
15966
|
+
Path: path,
|
|
15840
15967
|
"Status code": statusCode,
|
|
15841
15968
|
Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
|
|
15842
15969
|
Invocations: timesInvoked,
|
|
@@ -15894,8 +16021,8 @@ var require_mock_agent = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnp
|
|
|
15894
16021
|
const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters];
|
|
15895
16022
|
const dispatchOpts = { ...opts };
|
|
15896
16023
|
if (acceptNonStandardSearchParameters && dispatchOpts.path) {
|
|
15897
|
-
const [path
|
|
15898
|
-
dispatchOpts.path = `${path
|
|
16024
|
+
const [path, searchParams] = dispatchOpts.path.split("?");
|
|
16025
|
+
dispatchOpts.path = `${path}?${normalizeSearchParams(searchParams, acceptNonStandardSearchParameters)}`;
|
|
15899
16026
|
}
|
|
15900
16027
|
return this[kAgent].dispatch(dispatchOpts, handler);
|
|
15901
16028
|
}
|
|
@@ -16372,10 +16499,10 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$2({ "../../node_modul
|
|
|
16372
16499
|
* @return {Promise<void>} - Resolves when snapshots are loaded
|
|
16373
16500
|
*/
|
|
16374
16501
|
async loadSnapshots(filePath) {
|
|
16375
|
-
const path
|
|
16376
|
-
if (!path
|
|
16502
|
+
const path = filePath || this.#snapshotPath;
|
|
16503
|
+
if (!path) throw new InvalidArgumentError$6("Snapshot path is required");
|
|
16377
16504
|
try {
|
|
16378
|
-
const data$1 = await readFile(resolve$3(path
|
|
16505
|
+
const data$1 = await readFile(resolve$3(path), "utf8");
|
|
16379
16506
|
const parsed = JSON.parse(data$1);
|
|
16380
16507
|
if (Array.isArray(parsed)) {
|
|
16381
16508
|
this.#snapshots.clear();
|
|
@@ -16383,7 +16510,7 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$2({ "../../node_modul
|
|
|
16383
16510
|
} else this.#snapshots = new Map(Object.entries(parsed));
|
|
16384
16511
|
} catch (error) {
|
|
16385
16512
|
if (error.code === "ENOENT") this.#snapshots.clear();
|
|
16386
|
-
else throw new UndiciError$1(`Failed to load snapshots from ${path
|
|
16513
|
+
else throw new UndiciError$1(`Failed to load snapshots from ${path}`, { cause: error });
|
|
16387
16514
|
}
|
|
16388
16515
|
}
|
|
16389
16516
|
/**
|
|
@@ -16393,9 +16520,9 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$2({ "../../node_modul
|
|
|
16393
16520
|
* @returns {Promise<void>} - Resolves when snapshots are saved
|
|
16394
16521
|
*/
|
|
16395
16522
|
async saveSnapshots(filePath) {
|
|
16396
|
-
const path
|
|
16397
|
-
if (!path
|
|
16398
|
-
const resolvedPath = resolve$3(path
|
|
16523
|
+
const path = filePath || this.#snapshotPath;
|
|
16524
|
+
if (!path) throw new InvalidArgumentError$6("Snapshot path is required");
|
|
16525
|
+
const resolvedPath = resolve$3(path);
|
|
16399
16526
|
await mkdir(dirname$2(resolvedPath), { recursive: true });
|
|
16400
16527
|
const data$1 = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
|
|
16401
16528
|
hash,
|
|
@@ -16969,11 +17096,11 @@ var require_redirect_handler = /* @__PURE__ */ __commonJS$2({ "../../node_module
|
|
|
16969
17096
|
return;
|
|
16970
17097
|
}
|
|
16971
17098
|
const { origin, pathname, search } = util$10.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
|
|
16972
|
-
const path
|
|
16973
|
-
const redirectUrlString = `${origin}${path
|
|
17099
|
+
const path = search ? `${pathname}${search}` : pathname;
|
|
17100
|
+
const redirectUrlString = `${origin}${path}`;
|
|
16974
17101
|
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.`);
|
|
16975
17102
|
this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
|
|
16976
|
-
this.opts.path = path
|
|
17103
|
+
this.opts.path = path;
|
|
16977
17104
|
this.opts.origin = origin;
|
|
16978
17105
|
this.opts.query = null;
|
|
16979
17106
|
}
|
|
@@ -21939,10 +22066,10 @@ var require_fetch = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/und
|
|
|
21939
22066
|
const url = requestCurrentURL(request$2);
|
|
21940
22067
|
/** @type {import('../../..').Agent} */
|
|
21941
22068
|
const agent = fetchParams.controller.dispatcher;
|
|
21942
|
-
const path
|
|
22069
|
+
const path = url.pathname + url.search;
|
|
21943
22070
|
const hasTrailingQuestionMark = url.search.length === 0 && url.href[url.href.length - url.hash.length - 1] === "?";
|
|
21944
22071
|
return new Promise((resolve$4, reject) => agent.dispatch({
|
|
21945
|
-
path: hasTrailingQuestionMark ? `${path
|
|
22072
|
+
path: hasTrailingQuestionMark ? `${path}?` : path,
|
|
21946
22073
|
origin: url.origin,
|
|
21947
22074
|
method: request$2.method,
|
|
21948
22075
|
body: agent.isMockActive ? request$2.body && (request$2.body.source || request$2.body.stream) : body,
|
|
@@ -22724,9 +22851,9 @@ var require_util$2 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/un
|
|
|
22724
22851
|
* path-value = <any CHAR except CTLs or ";">
|
|
22725
22852
|
* @param {string} path
|
|
22726
22853
|
*/
|
|
22727
|
-
function validateCookiePath(path
|
|
22728
|
-
for (let i$1 = 0; i$1 < path
|
|
22729
|
-
const code = path
|
|
22854
|
+
function validateCookiePath(path) {
|
|
22855
|
+
for (let i$1 = 0; i$1 < path.length; ++i$1) {
|
|
22856
|
+
const code = path.charCodeAt(i$1);
|
|
22730
22857
|
if (code < 32 || code === 127 || code === 59) throw new Error("Invalid cookie path");
|
|
22731
22858
|
}
|
|
22732
22859
|
}
|
|
@@ -25854,9 +25981,9 @@ var require_undici = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/un
|
|
|
25854
25981
|
if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts");
|
|
25855
25982
|
if (opts && opts.path != null) {
|
|
25856
25983
|
if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path");
|
|
25857
|
-
let path
|
|
25858
|
-
if (!opts.path.startsWith("/")) path
|
|
25859
|
-
url = new URL(util$3.parseOrigin(url).origin + path
|
|
25984
|
+
let path = opts.path;
|
|
25985
|
+
if (!opts.path.startsWith("/")) path = `/${path}`;
|
|
25986
|
+
url = new URL(util$3.parseOrigin(url).origin + path);
|
|
25860
25987
|
} else {
|
|
25861
25988
|
if (!opts) opts = typeof url === "object" ? url : {};
|
|
25862
25989
|
url = util$3.parseURL(url);
|
|
@@ -25953,649 +26080,11 @@ var require_undici = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/un
|
|
|
25953
26080
|
//#endregion
|
|
25954
26081
|
//#region ../workers-utils/dist/index.mjs
|
|
25955
26082
|
var import_undici = require_undici();
|
|
25956
|
-
var require_XDGAppPaths = __commonJS$1({ "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js"(exports$2) {
|
|
25957
|
-
exports$2.__esModule = true;
|
|
25958
|
-
exports$2.Adapt = void 0;
|
|
25959
|
-
function isBoolean2(t2) {
|
|
25960
|
-
return typeOf(t2) === "boolean";
|
|
25961
|
-
}
|
|
25962
|
-
__name$1(isBoolean2, "isBoolean");
|
|
25963
|
-
function isObject$3(t2) {
|
|
25964
|
-
return typeOf(t2) === "object";
|
|
25965
|
-
}
|
|
25966
|
-
__name$1(isObject$3, "isObject");
|
|
25967
|
-
function isString2(t2) {
|
|
25968
|
-
return typeOf(t2) === "string";
|
|
25969
|
-
}
|
|
25970
|
-
__name$1(isString2, "isString");
|
|
25971
|
-
function typeOf(t2) {
|
|
25972
|
-
return typeof t2;
|
|
25973
|
-
}
|
|
25974
|
-
__name$1(typeOf, "typeOf");
|
|
25975
|
-
function Adapt(adapter_) {
|
|
25976
|
-
var meta$2 = adapter_.meta, path5 = adapter_.path, xdg = adapter_.xdg;
|
|
25977
|
-
return { XDGAppPaths: new (/* @__PURE__ */ function() {
|
|
25978
|
-
function XDGAppPaths_2(options_) {
|
|
25979
|
-
if (options_ === void 0) options_ = {};
|
|
25980
|
-
var _a$2, _b, _c;
|
|
25981
|
-
function XDGAppPaths(options2) {
|
|
25982
|
-
if (options2 === void 0) options2 = {};
|
|
25983
|
-
return new XDGAppPaths_2(options2);
|
|
25984
|
-
}
|
|
25985
|
-
__name$1(XDGAppPaths, "XDGAppPaths");
|
|
25986
|
-
var options = isObject$3(options_) ? options_ : { name: options_ };
|
|
25987
|
-
var suffix = (_a$2 = options.suffix) !== null && _a$2 !== void 0 ? _a$2 : "";
|
|
25988
|
-
var isolated_ = (_b = options.isolated) !== null && _b !== void 0 ? _b : true;
|
|
25989
|
-
var namePriorityList = [
|
|
25990
|
-
options.name,
|
|
25991
|
-
meta$2.pkgMainFilename(),
|
|
25992
|
-
meta$2.mainFilename()
|
|
25993
|
-
];
|
|
25994
|
-
var name = path5.parse(((_c = namePriorityList.find(function(e2) {
|
|
25995
|
-
return isString2(e2);
|
|
25996
|
-
})) !== null && _c !== void 0 ? _c : "$eval") + suffix).name;
|
|
25997
|
-
XDGAppPaths.$name = /* @__PURE__ */ __name$1(function $name() {
|
|
25998
|
-
return name;
|
|
25999
|
-
}, "$name");
|
|
26000
|
-
XDGAppPaths.$isolated = /* @__PURE__ */ __name$1(function $isolated() {
|
|
26001
|
-
return isolated_;
|
|
26002
|
-
}, "$isolated");
|
|
26003
|
-
function isIsolated(dirOptions) {
|
|
26004
|
-
var _a2;
|
|
26005
|
-
dirOptions = dirOptions !== null && dirOptions !== void 0 ? dirOptions : { isolated: isolated_ };
|
|
26006
|
-
return isBoolean2(dirOptions) ? dirOptions : (_a2 = dirOptions.isolated) !== null && _a2 !== void 0 ? _a2 : isolated_;
|
|
26007
|
-
}
|
|
26008
|
-
__name$1(isIsolated, "isIsolated");
|
|
26009
|
-
function finalPathSegment(dirOptions) {
|
|
26010
|
-
return isIsolated(dirOptions) ? name : "";
|
|
26011
|
-
}
|
|
26012
|
-
__name$1(finalPathSegment, "finalPathSegment");
|
|
26013
|
-
XDGAppPaths.cache = /* @__PURE__ */ __name$1(function cache$2(dirOptions) {
|
|
26014
|
-
return path5.join(xdg.cache(), finalPathSegment(dirOptions));
|
|
26015
|
-
}, "cache");
|
|
26016
|
-
XDGAppPaths.config = /* @__PURE__ */ __name$1(function config$1(dirOptions) {
|
|
26017
|
-
return path5.join(xdg.config(), finalPathSegment(dirOptions));
|
|
26018
|
-
}, "config");
|
|
26019
|
-
XDGAppPaths.data = /* @__PURE__ */ __name$1(function data$1(dirOptions) {
|
|
26020
|
-
return path5.join(xdg.data(), finalPathSegment(dirOptions));
|
|
26021
|
-
}, "data");
|
|
26022
|
-
XDGAppPaths.runtime = /* @__PURE__ */ __name$1(function runtime(dirOptions) {
|
|
26023
|
-
return xdg.runtime() ? path5.join(xdg.runtime(), finalPathSegment(dirOptions)) : void 0;
|
|
26024
|
-
}, "runtime");
|
|
26025
|
-
XDGAppPaths.state = /* @__PURE__ */ __name$1(function state(dirOptions) {
|
|
26026
|
-
return path5.join(xdg.state(), finalPathSegment(dirOptions));
|
|
26027
|
-
}, "state");
|
|
26028
|
-
XDGAppPaths.configDirs = /* @__PURE__ */ __name$1(function configDirs(dirOptions) {
|
|
26029
|
-
return xdg.configDirs().map(function(s) {
|
|
26030
|
-
return path5.join(s, finalPathSegment(dirOptions));
|
|
26031
|
-
});
|
|
26032
|
-
}, "configDirs");
|
|
26033
|
-
XDGAppPaths.dataDirs = /* @__PURE__ */ __name$1(function dataDirs(dirOptions) {
|
|
26034
|
-
return xdg.dataDirs().map(function(s) {
|
|
26035
|
-
return path5.join(s, finalPathSegment(dirOptions));
|
|
26036
|
-
});
|
|
26037
|
-
}, "dataDirs");
|
|
26038
|
-
return XDGAppPaths;
|
|
26039
|
-
}
|
|
26040
|
-
__name$1(XDGAppPaths_2, "XDGAppPaths_");
|
|
26041
|
-
return XDGAppPaths_2;
|
|
26042
|
-
}())() };
|
|
26043
|
-
}
|
|
26044
|
-
__name$1(Adapt, "Adapt");
|
|
26045
|
-
exports$2.Adapt = Adapt;
|
|
26046
|
-
} });
|
|
26047
|
-
var require_XDG = __commonJS$1({ "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js"(exports$2) {
|
|
26048
|
-
var __spreadArray = exports$2 && exports$2.__spreadArray || function(to, from) {
|
|
26049
|
-
for (var i$1 = 0, il = from.length, j = to.length; i$1 < il; i$1++, j++) to[j] = from[i$1];
|
|
26050
|
-
return to;
|
|
26051
|
-
};
|
|
26052
|
-
exports$2.__esModule = true;
|
|
26053
|
-
exports$2.Adapt = void 0;
|
|
26054
|
-
function Adapt(adapter_) {
|
|
26055
|
-
var env$1 = adapter_.env, osPaths = adapter_.osPaths, path5 = adapter_.path;
|
|
26056
|
-
var isMacOS = /^darwin$/i.test(adapter_.process.platform);
|
|
26057
|
-
var isWinOS = /^win/i.test(adapter_.process.platform);
|
|
26058
|
-
function baseDir() {
|
|
26059
|
-
return osPaths.home() || osPaths.temp();
|
|
26060
|
-
}
|
|
26061
|
-
__name$1(baseDir, "baseDir");
|
|
26062
|
-
function valOrPath(val, pathSegments) {
|
|
26063
|
-
return val || path5.join.apply(path5, pathSegments);
|
|
26064
|
-
}
|
|
26065
|
-
__name$1(valOrPath, "valOrPath");
|
|
26066
|
-
var linux = /* @__PURE__ */ __name$1(function() {
|
|
26067
|
-
return {
|
|
26068
|
-
cache: /* @__PURE__ */ __name$1(function() {
|
|
26069
|
-
return valOrPath(env$1.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
|
|
26070
|
-
}, "cache"),
|
|
26071
|
-
config: /* @__PURE__ */ __name$1(function() {
|
|
26072
|
-
return valOrPath(env$1.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
|
|
26073
|
-
}, "config"),
|
|
26074
|
-
data: /* @__PURE__ */ __name$1(function() {
|
|
26075
|
-
return valOrPath(env$1.get("XDG_DATA_HOME"), [
|
|
26076
|
-
baseDir(),
|
|
26077
|
-
".local",
|
|
26078
|
-
"share"
|
|
26079
|
-
]);
|
|
26080
|
-
}, "data"),
|
|
26081
|
-
runtime: /* @__PURE__ */ __name$1(function() {
|
|
26082
|
-
return env$1.get("XDG_RUNTIME_DIR") || void 0;
|
|
26083
|
-
}, "runtime"),
|
|
26084
|
-
state: /* @__PURE__ */ __name$1(function() {
|
|
26085
|
-
return valOrPath(env$1.get("XDG_STATE_HOME"), [
|
|
26086
|
-
baseDir(),
|
|
26087
|
-
".local",
|
|
26088
|
-
"state"
|
|
26089
|
-
]);
|
|
26090
|
-
}, "state")
|
|
26091
|
-
};
|
|
26092
|
-
}, "linux");
|
|
26093
|
-
var macos = /* @__PURE__ */ __name$1(function() {
|
|
26094
|
-
return {
|
|
26095
|
-
cache: /* @__PURE__ */ __name$1(function() {
|
|
26096
|
-
return valOrPath(env$1.get("XDG_CACHE_HOME"), [
|
|
26097
|
-
baseDir(),
|
|
26098
|
-
"Library",
|
|
26099
|
-
"Caches"
|
|
26100
|
-
]);
|
|
26101
|
-
}, "cache"),
|
|
26102
|
-
config: /* @__PURE__ */ __name$1(function() {
|
|
26103
|
-
return valOrPath(env$1.get("XDG_CONFIG_HOME"), [
|
|
26104
|
-
baseDir(),
|
|
26105
|
-
"Library",
|
|
26106
|
-
"Preferences"
|
|
26107
|
-
]);
|
|
26108
|
-
}, "config"),
|
|
26109
|
-
data: /* @__PURE__ */ __name$1(function() {
|
|
26110
|
-
return valOrPath(env$1.get("XDG_DATA_HOME"), [
|
|
26111
|
-
baseDir(),
|
|
26112
|
-
"Library",
|
|
26113
|
-
"Application Support"
|
|
26114
|
-
]);
|
|
26115
|
-
}, "data"),
|
|
26116
|
-
runtime: /* @__PURE__ */ __name$1(function() {
|
|
26117
|
-
return env$1.get("XDG_RUNTIME_DIR") || void 0;
|
|
26118
|
-
}, "runtime"),
|
|
26119
|
-
state: /* @__PURE__ */ __name$1(function() {
|
|
26120
|
-
return valOrPath(env$1.get("XDG_STATE_HOME"), [
|
|
26121
|
-
baseDir(),
|
|
26122
|
-
"Library",
|
|
26123
|
-
"State"
|
|
26124
|
-
]);
|
|
26125
|
-
}, "state")
|
|
26126
|
-
};
|
|
26127
|
-
}, "macos");
|
|
26128
|
-
var windows = /* @__PURE__ */ __name$1(function() {
|
|
26129
|
-
function appData() {
|
|
26130
|
-
return valOrPath(env$1.get("APPDATA"), [
|
|
26131
|
-
baseDir(),
|
|
26132
|
-
"AppData",
|
|
26133
|
-
"Roaming"
|
|
26134
|
-
]);
|
|
26135
|
-
}
|
|
26136
|
-
__name$1(appData, "appData");
|
|
26137
|
-
function localAppData() {
|
|
26138
|
-
return valOrPath(env$1.get("LOCALAPPDATA"), [
|
|
26139
|
-
baseDir(),
|
|
26140
|
-
"AppData",
|
|
26141
|
-
"Local"
|
|
26142
|
-
]);
|
|
26143
|
-
}
|
|
26144
|
-
__name$1(localAppData, "localAppData");
|
|
26145
|
-
return {
|
|
26146
|
-
cache: /* @__PURE__ */ __name$1(function() {
|
|
26147
|
-
return valOrPath(env$1.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
|
|
26148
|
-
}, "cache"),
|
|
26149
|
-
config: /* @__PURE__ */ __name$1(function() {
|
|
26150
|
-
return valOrPath(env$1.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
|
|
26151
|
-
}, "config"),
|
|
26152
|
-
data: /* @__PURE__ */ __name$1(function() {
|
|
26153
|
-
return valOrPath(env$1.get("XDG_DATA_HOME"), [appData(), "xdg.data"]);
|
|
26154
|
-
}, "data"),
|
|
26155
|
-
runtime: /* @__PURE__ */ __name$1(function() {
|
|
26156
|
-
return env$1.get("XDG_RUNTIME_DIR") || void 0;
|
|
26157
|
-
}, "runtime"),
|
|
26158
|
-
state: /* @__PURE__ */ __name$1(function() {
|
|
26159
|
-
return valOrPath(env$1.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
|
|
26160
|
-
}, "state")
|
|
26161
|
-
};
|
|
26162
|
-
}, "windows");
|
|
26163
|
-
return { XDG: new (/* @__PURE__ */ function() {
|
|
26164
|
-
function XDG_2() {
|
|
26165
|
-
function XDG() {
|
|
26166
|
-
return new XDG_2();
|
|
26167
|
-
}
|
|
26168
|
-
__name$1(XDG, "XDG");
|
|
26169
|
-
var extension = isMacOS ? macos() : isWinOS ? windows() : linux();
|
|
26170
|
-
XDG.cache = extension.cache;
|
|
26171
|
-
XDG.config = extension.config;
|
|
26172
|
-
XDG.data = extension.data;
|
|
26173
|
-
XDG.runtime = extension.runtime;
|
|
26174
|
-
XDG.state = extension.state;
|
|
26175
|
-
XDG.configDirs = /* @__PURE__ */ __name$1(function configDirs() {
|
|
26176
|
-
var pathList = env$1.get("XDG_CONFIG_DIRS");
|
|
26177
|
-
return __spreadArray([extension.config()], pathList ? pathList.split(path5.delimiter) : []);
|
|
26178
|
-
}, "configDirs");
|
|
26179
|
-
XDG.dataDirs = /* @__PURE__ */ __name$1(function dataDirs() {
|
|
26180
|
-
var pathList = env$1.get("XDG_DATA_DIRS");
|
|
26181
|
-
return __spreadArray([extension.data()], pathList ? pathList.split(path5.delimiter) : []);
|
|
26182
|
-
}, "dataDirs");
|
|
26183
|
-
return XDG;
|
|
26184
|
-
}
|
|
26185
|
-
__name$1(XDG_2, "XDG_");
|
|
26186
|
-
return XDG_2;
|
|
26187
|
-
}())() };
|
|
26188
|
-
}
|
|
26189
|
-
__name$1(Adapt, "Adapt");
|
|
26190
|
-
exports$2.Adapt = Adapt;
|
|
26191
|
-
} });
|
|
26192
|
-
var require_OSPaths = __commonJS$1({ "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js"(exports$2) {
|
|
26193
|
-
var __spreadArray = exports$2 && exports$2.__spreadArray || function(to, from) {
|
|
26194
|
-
for (var i$1 = 0, il = from.length, j = to.length; i$1 < il; i$1++, j++) to[j] = from[i$1];
|
|
26195
|
-
return to;
|
|
26196
|
-
};
|
|
26197
|
-
exports$2.__esModule = true;
|
|
26198
|
-
exports$2.Adapt = void 0;
|
|
26199
|
-
function isEmpty(s) {
|
|
26200
|
-
return !s;
|
|
26201
|
-
}
|
|
26202
|
-
__name$1(isEmpty, "isEmpty");
|
|
26203
|
-
function Adapt(adapter_) {
|
|
26204
|
-
var env$1 = adapter_.env, os2 = adapter_.os, path5 = adapter_.path;
|
|
26205
|
-
var isWinOS = /^win/i.test(adapter_.process.platform);
|
|
26206
|
-
function normalizePath$2(path_) {
|
|
26207
|
-
return path_ ? adapter_.path.normalize(adapter_.path.join(path_, ".")) : void 0;
|
|
26208
|
-
}
|
|
26209
|
-
__name$1(normalizePath$2, "normalizePath");
|
|
26210
|
-
function home() {
|
|
26211
|
-
return isWinOS ? (/* @__PURE__ */ __name$1(function() {
|
|
26212
|
-
return normalizePath$2([
|
|
26213
|
-
typeof os2.homedir === "function" ? os2.homedir() : void 0,
|
|
26214
|
-
env$1.get("USERPROFILE"),
|
|
26215
|
-
env$1.get("HOME"),
|
|
26216
|
-
env$1.get("HOMEDRIVE") || env$1.get("HOMEPATH") ? path5.join(env$1.get("HOMEDRIVE") || "", env$1.get("HOMEPATH") || "") : void 0
|
|
26217
|
-
].find(function(v) {
|
|
26218
|
-
return !isEmpty(v);
|
|
26219
|
-
}));
|
|
26220
|
-
}, "windows"))() : (/* @__PURE__ */ __name$1(function() {
|
|
26221
|
-
return normalizePath$2((typeof os2.homedir === "function" ? os2.homedir() : void 0) || env$1.get("HOME"));
|
|
26222
|
-
}, "posix"))();
|
|
26223
|
-
}
|
|
26224
|
-
__name$1(home, "home");
|
|
26225
|
-
function temp() {
|
|
26226
|
-
function joinPathToBase(base, segments) {
|
|
26227
|
-
return base ? path5.join.apply(path5, __spreadArray([base], segments)) : void 0;
|
|
26228
|
-
}
|
|
26229
|
-
__name$1(joinPathToBase, "joinPathToBase");
|
|
26230
|
-
function posix$1() {
|
|
26231
|
-
return normalizePath$2([
|
|
26232
|
-
typeof os2.tmpdir === "function" ? os2.tmpdir() : void 0,
|
|
26233
|
-
env$1.get("TMPDIR"),
|
|
26234
|
-
env$1.get("TEMP"),
|
|
26235
|
-
env$1.get("TMP")
|
|
26236
|
-
].find(function(v) {
|
|
26237
|
-
return !isEmpty(v);
|
|
26238
|
-
})) || "/tmp";
|
|
26239
|
-
}
|
|
26240
|
-
__name$1(posix$1, "posix");
|
|
26241
|
-
function windows() {
|
|
26242
|
-
var fallback = "C:\\Temp";
|
|
26243
|
-
var v = [
|
|
26244
|
-
typeof os2.tmpdir === "function" ? os2.tmpdir : function() {},
|
|
26245
|
-
function() {
|
|
26246
|
-
return env$1.get("TEMP");
|
|
26247
|
-
},
|
|
26248
|
-
function() {
|
|
26249
|
-
return env$1.get("TMP");
|
|
26250
|
-
},
|
|
26251
|
-
function() {
|
|
26252
|
-
return joinPathToBase(env$1.get("LOCALAPPDATA"), ["Temp"]);
|
|
26253
|
-
},
|
|
26254
|
-
function() {
|
|
26255
|
-
return joinPathToBase(home(), [
|
|
26256
|
-
"AppData",
|
|
26257
|
-
"Local",
|
|
26258
|
-
"Temp"
|
|
26259
|
-
]);
|
|
26260
|
-
},
|
|
26261
|
-
function() {
|
|
26262
|
-
return joinPathToBase(env$1.get("ALLUSERSPROFILE"), ["Temp"]);
|
|
26263
|
-
},
|
|
26264
|
-
function() {
|
|
26265
|
-
return joinPathToBase(env$1.get("SystemRoot"), ["Temp"]);
|
|
26266
|
-
},
|
|
26267
|
-
function() {
|
|
26268
|
-
return joinPathToBase(env$1.get("windir"), ["Temp"]);
|
|
26269
|
-
},
|
|
26270
|
-
function() {
|
|
26271
|
-
return joinPathToBase(env$1.get("SystemDrive"), ["\\", "Temp"]);
|
|
26272
|
-
}
|
|
26273
|
-
].find(function(v2) {
|
|
26274
|
-
return v2 && !isEmpty(v2());
|
|
26275
|
-
});
|
|
26276
|
-
return v && normalizePath$2(v()) || fallback;
|
|
26277
|
-
}
|
|
26278
|
-
__name$1(windows, "windows");
|
|
26279
|
-
return isWinOS ? windows() : posix$1();
|
|
26280
|
-
}
|
|
26281
|
-
__name$1(temp, "temp");
|
|
26282
|
-
return { OSPaths: new (/* @__PURE__ */ function() {
|
|
26283
|
-
function OSPaths_2() {
|
|
26284
|
-
function OSPaths() {
|
|
26285
|
-
return new OSPaths_2();
|
|
26286
|
-
}
|
|
26287
|
-
__name$1(OSPaths, "OSPaths");
|
|
26288
|
-
OSPaths.home = home;
|
|
26289
|
-
OSPaths.temp = temp;
|
|
26290
|
-
return OSPaths;
|
|
26291
|
-
}
|
|
26292
|
-
__name$1(OSPaths_2, "OSPaths_");
|
|
26293
|
-
return OSPaths_2;
|
|
26294
|
-
}())() };
|
|
26295
|
-
}
|
|
26296
|
-
__name$1(Adapt, "Adapt");
|
|
26297
|
-
exports$2.Adapt = Adapt;
|
|
26298
|
-
} });
|
|
26299
|
-
var require_node = __commonJS$1({ "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js"(exports$2) {
|
|
26300
|
-
var __createBinding = exports$2 && exports$2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
26301
|
-
if (k2 === void 0) k2 = k;
|
|
26302
|
-
Object.defineProperty(o, k2, {
|
|
26303
|
-
enumerable: true,
|
|
26304
|
-
get: /* @__PURE__ */ __name$1(function() {
|
|
26305
|
-
return m[k];
|
|
26306
|
-
}, "get")
|
|
26307
|
-
});
|
|
26308
|
-
} : function(o, m, k, k2) {
|
|
26309
|
-
if (k2 === void 0) k2 = k;
|
|
26310
|
-
o[k2] = m[k];
|
|
26311
|
-
});
|
|
26312
|
-
var __setModuleDefault = exports$2 && exports$2.__setModuleDefault || (Object.create ? function(o, v) {
|
|
26313
|
-
Object.defineProperty(o, "default", {
|
|
26314
|
-
enumerable: true,
|
|
26315
|
-
value: v
|
|
26316
|
-
});
|
|
26317
|
-
} : function(o, v) {
|
|
26318
|
-
o["default"] = v;
|
|
26319
|
-
});
|
|
26320
|
-
var __importStar = exports$2 && exports$2.__importStar || function(mod$1) {
|
|
26321
|
-
if (mod$1 && mod$1.__esModule) return mod$1;
|
|
26322
|
-
var result = {};
|
|
26323
|
-
if (mod$1 != null) {
|
|
26324
|
-
for (var k in mod$1) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod$1, k)) __createBinding(result, mod$1, k);
|
|
26325
|
-
}
|
|
26326
|
-
__setModuleDefault(result, mod$1);
|
|
26327
|
-
return result;
|
|
26328
|
-
};
|
|
26329
|
-
exports$2.__esModule = true;
|
|
26330
|
-
exports$2.adapter = void 0;
|
|
26331
|
-
var os2 = __importStar(__require$1("os"));
|
|
26332
|
-
var path5 = __importStar(__require$1("path"));
|
|
26333
|
-
exports$2.adapter = {
|
|
26334
|
-
atImportPermissions: { env: true },
|
|
26335
|
-
env: { get: /* @__PURE__ */ __name$1(function(s) {
|
|
26336
|
-
return process.env[s];
|
|
26337
|
-
}, "get") },
|
|
26338
|
-
os: os2,
|
|
26339
|
-
path: path5,
|
|
26340
|
-
process
|
|
26341
|
-
};
|
|
26342
|
-
} });
|
|
26343
|
-
var require_mod_cjs = __commonJS$1({ "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js"(exports$2, module$1) {
|
|
26344
|
-
var OSPaths_js_1 = require_OSPaths();
|
|
26345
|
-
var node_js_1 = require_node();
|
|
26346
|
-
module$1.exports = OSPaths_js_1.Adapt(node_js_1.adapter).OSPaths;
|
|
26347
|
-
} });
|
|
26348
|
-
var require_node2 = __commonJS$1({ "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js"(exports$2) {
|
|
26349
|
-
var __createBinding = exports$2 && exports$2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
26350
|
-
if (k2 === void 0) k2 = k;
|
|
26351
|
-
Object.defineProperty(o, k2, {
|
|
26352
|
-
enumerable: true,
|
|
26353
|
-
get: /* @__PURE__ */ __name$1(function() {
|
|
26354
|
-
return m[k];
|
|
26355
|
-
}, "get")
|
|
26356
|
-
});
|
|
26357
|
-
} : function(o, m, k, k2) {
|
|
26358
|
-
if (k2 === void 0) k2 = k;
|
|
26359
|
-
o[k2] = m[k];
|
|
26360
|
-
});
|
|
26361
|
-
var __setModuleDefault = exports$2 && exports$2.__setModuleDefault || (Object.create ? function(o, v) {
|
|
26362
|
-
Object.defineProperty(o, "default", {
|
|
26363
|
-
enumerable: true,
|
|
26364
|
-
value: v
|
|
26365
|
-
});
|
|
26366
|
-
} : function(o, v) {
|
|
26367
|
-
o["default"] = v;
|
|
26368
|
-
});
|
|
26369
|
-
var __importStar = exports$2 && exports$2.__importStar || function(mod$1) {
|
|
26370
|
-
if (mod$1 && mod$1.__esModule) return mod$1;
|
|
26371
|
-
var result = {};
|
|
26372
|
-
if (mod$1 != null) {
|
|
26373
|
-
for (var k in mod$1) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod$1, k)) __createBinding(result, mod$1, k);
|
|
26374
|
-
}
|
|
26375
|
-
__setModuleDefault(result, mod$1);
|
|
26376
|
-
return result;
|
|
26377
|
-
};
|
|
26378
|
-
var __importDefault = exports$2 && exports$2.__importDefault || function(mod$1) {
|
|
26379
|
-
return mod$1 && mod$1.__esModule ? mod$1 : { "default": mod$1 };
|
|
26380
|
-
};
|
|
26381
|
-
exports$2.__esModule = true;
|
|
26382
|
-
exports$2.adapter = void 0;
|
|
26383
|
-
var path5 = __importStar(__require$1("path"));
|
|
26384
|
-
var os_paths_1 = __importDefault(require_mod_cjs());
|
|
26385
|
-
exports$2.adapter = {
|
|
26386
|
-
atImportPermissions: { env: true },
|
|
26387
|
-
env: { get: /* @__PURE__ */ __name$1(function(s) {
|
|
26388
|
-
return process.env[s];
|
|
26389
|
-
}, "get") },
|
|
26390
|
-
osPaths: os_paths_1["default"],
|
|
26391
|
-
path: path5,
|
|
26392
|
-
process
|
|
26393
|
-
};
|
|
26394
|
-
} });
|
|
26395
|
-
var require_mod_cjs2 = __commonJS$1({ "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js"(exports$2, module$1) {
|
|
26396
|
-
var XDG_js_1 = require_XDG();
|
|
26397
|
-
var node_js_1 = require_node2();
|
|
26398
|
-
module$1.exports = XDG_js_1.Adapt(node_js_1.adapter).XDG;
|
|
26399
|
-
} });
|
|
26400
|
-
var require_node3 = __commonJS$1({ "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js"(exports$2) {
|
|
26401
|
-
var __createBinding = exports$2 && exports$2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
26402
|
-
if (k2 === void 0) k2 = k;
|
|
26403
|
-
Object.defineProperty(o, k2, {
|
|
26404
|
-
enumerable: true,
|
|
26405
|
-
get: /* @__PURE__ */ __name$1(function() {
|
|
26406
|
-
return m[k];
|
|
26407
|
-
}, "get")
|
|
26408
|
-
});
|
|
26409
|
-
} : function(o, m, k, k2) {
|
|
26410
|
-
if (k2 === void 0) k2 = k;
|
|
26411
|
-
o[k2] = m[k];
|
|
26412
|
-
});
|
|
26413
|
-
var __setModuleDefault = exports$2 && exports$2.__setModuleDefault || (Object.create ? function(o, v) {
|
|
26414
|
-
Object.defineProperty(o, "default", {
|
|
26415
|
-
enumerable: true,
|
|
26416
|
-
value: v
|
|
26417
|
-
});
|
|
26418
|
-
} : function(o, v) {
|
|
26419
|
-
o["default"] = v;
|
|
26420
|
-
});
|
|
26421
|
-
var __importStar = exports$2 && exports$2.__importStar || function(mod$1) {
|
|
26422
|
-
if (mod$1 && mod$1.__esModule) return mod$1;
|
|
26423
|
-
var result = {};
|
|
26424
|
-
if (mod$1 != null) {
|
|
26425
|
-
for (var k in mod$1) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod$1, k)) __createBinding(result, mod$1, k);
|
|
26426
|
-
}
|
|
26427
|
-
__setModuleDefault(result, mod$1);
|
|
26428
|
-
return result;
|
|
26429
|
-
};
|
|
26430
|
-
var __importDefault = exports$2 && exports$2.__importDefault || function(mod$1) {
|
|
26431
|
-
return mod$1 && mod$1.__esModule ? mod$1 : { "default": mod$1 };
|
|
26432
|
-
};
|
|
26433
|
-
exports$2.__esModule = true;
|
|
26434
|
-
exports$2.adapter = void 0;
|
|
26435
|
-
var path5 = __importStar(__require$1("path"));
|
|
26436
|
-
var xdg_portable_1 = __importDefault(require_mod_cjs2());
|
|
26437
|
-
exports$2.adapter = {
|
|
26438
|
-
atImportPermissions: {
|
|
26439
|
-
env: true,
|
|
26440
|
-
read: true
|
|
26441
|
-
},
|
|
26442
|
-
meta: {
|
|
26443
|
-
mainFilename: /* @__PURE__ */ __name$1(function() {
|
|
26444
|
-
var requireMainFilename = (typeof __require$1 !== "undefined" && __require$1 !== null && __require$1.main ? __require$1.main : { filename: void 0 }).filename;
|
|
26445
|
-
return (requireMainFilename !== process.execArgv[0] ? requireMainFilename : void 0) || (typeof process._eval === "undefined" ? process.argv[1] : void 0);
|
|
26446
|
-
}, "mainFilename"),
|
|
26447
|
-
pkgMainFilename: /* @__PURE__ */ __name$1(function() {
|
|
26448
|
-
return process.pkg ? process.execPath : void 0;
|
|
26449
|
-
}, "pkgMainFilename")
|
|
26450
|
-
},
|
|
26451
|
-
path: path5,
|
|
26452
|
-
process,
|
|
26453
|
-
xdg: xdg_portable_1["default"]
|
|
26454
|
-
};
|
|
26455
|
-
} });
|
|
26456
|
-
var require_mod_cjs3 = __commonJS$1({ "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js"(exports$2, module$1) {
|
|
26457
|
-
var XDGAppPaths_js_1 = require_XDGAppPaths();
|
|
26458
|
-
var node_js_1 = require_node3();
|
|
26459
|
-
module$1.exports = XDGAppPaths_js_1.Adapt(node_js_1.adapter).XDGAppPaths;
|
|
26460
|
-
} });
|
|
26461
|
-
var require_signals = __commonJS$1({ "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports$2, module$1) {
|
|
26462
|
-
module$1.exports = [
|
|
26463
|
-
"SIGABRT",
|
|
26464
|
-
"SIGALRM",
|
|
26465
|
-
"SIGHUP",
|
|
26466
|
-
"SIGINT",
|
|
26467
|
-
"SIGTERM"
|
|
26468
|
-
];
|
|
26469
|
-
if (process.platform !== "win32") module$1.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
26470
|
-
if (process.platform === "linux") module$1.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED");
|
|
26471
|
-
} });
|
|
26472
|
-
var require_signal_exit = __commonJS$1({ "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports$2, module$1) {
|
|
26473
|
-
var process2 = global.process;
|
|
26474
|
-
var processOk = /* @__PURE__ */ __name$1(function(process3) {
|
|
26475
|
-
return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
|
|
26476
|
-
}, "processOk");
|
|
26477
|
-
if (!processOk(process2)) module$1.exports = function() {
|
|
26478
|
-
return function() {};
|
|
26479
|
-
};
|
|
26480
|
-
else {
|
|
26481
|
-
assert3 = __require$1("assert");
|
|
26482
|
-
signals = require_signals();
|
|
26483
|
-
isWin$1 = /^win/i.test(process2.platform);
|
|
26484
|
-
EE$3 = __require$1("events");
|
|
26485
|
-
if (typeof EE$3 !== "function") EE$3 = EE$3.EventEmitter;
|
|
26486
|
-
if (process2.__signal_exit_emitter__) emitter = process2.__signal_exit_emitter__;
|
|
26487
|
-
else {
|
|
26488
|
-
emitter = process2.__signal_exit_emitter__ = new EE$3();
|
|
26489
|
-
emitter.count = 0;
|
|
26490
|
-
emitter.emitted = {};
|
|
26491
|
-
}
|
|
26492
|
-
if (!emitter.infinite) {
|
|
26493
|
-
emitter.setMaxListeners(Infinity);
|
|
26494
|
-
emitter.infinite = true;
|
|
26495
|
-
}
|
|
26496
|
-
module$1.exports = function(cb, opts) {
|
|
26497
|
-
if (!processOk(global.process)) return function() {};
|
|
26498
|
-
assert3.equal(typeof cb, "function", "a callback must be provided for exit handler");
|
|
26499
|
-
if (loaded === false) load();
|
|
26500
|
-
var ev = "exit";
|
|
26501
|
-
if (opts && opts.alwaysLast) ev = "afterexit";
|
|
26502
|
-
var remove = /* @__PURE__ */ __name$1(function() {
|
|
26503
|
-
emitter.removeListener(ev, cb);
|
|
26504
|
-
if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) unload();
|
|
26505
|
-
}, "remove");
|
|
26506
|
-
emitter.on(ev, cb);
|
|
26507
|
-
return remove;
|
|
26508
|
-
};
|
|
26509
|
-
unload = /* @__PURE__ */ __name$1(function unload2() {
|
|
26510
|
-
if (!loaded || !processOk(global.process)) return;
|
|
26511
|
-
loaded = false;
|
|
26512
|
-
signals.forEach(function(sig) {
|
|
26513
|
-
try {
|
|
26514
|
-
process2.removeListener(sig, sigListeners[sig]);
|
|
26515
|
-
} catch (er) {}
|
|
26516
|
-
});
|
|
26517
|
-
process2.emit = originalProcessEmit;
|
|
26518
|
-
process2.reallyExit = originalProcessReallyExit;
|
|
26519
|
-
emitter.count -= 1;
|
|
26520
|
-
}, "unload");
|
|
26521
|
-
module$1.exports.unload = unload;
|
|
26522
|
-
emit = /* @__PURE__ */ __name$1(function emit2(event, code, signal) {
|
|
26523
|
-
if (emitter.emitted[event]) return;
|
|
26524
|
-
emitter.emitted[event] = true;
|
|
26525
|
-
emitter.emit(event, code, signal);
|
|
26526
|
-
}, "emit");
|
|
26527
|
-
sigListeners = {};
|
|
26528
|
-
signals.forEach(function(sig) {
|
|
26529
|
-
sigListeners[sig] = /* @__PURE__ */ __name$1(function listener() {
|
|
26530
|
-
if (!processOk(global.process)) return;
|
|
26531
|
-
if (process2.listeners(sig).length === emitter.count) {
|
|
26532
|
-
unload();
|
|
26533
|
-
emit("exit", null, sig);
|
|
26534
|
-
emit("afterexit", null, sig);
|
|
26535
|
-
if (isWin$1 && sig === "SIGHUP") sig = "SIGINT";
|
|
26536
|
-
process2.kill(process2.pid, sig);
|
|
26537
|
-
}
|
|
26538
|
-
}, "listener");
|
|
26539
|
-
});
|
|
26540
|
-
module$1.exports.signals = function() {
|
|
26541
|
-
return signals;
|
|
26542
|
-
};
|
|
26543
|
-
loaded = false;
|
|
26544
|
-
load = /* @__PURE__ */ __name$1(function load2() {
|
|
26545
|
-
if (loaded || !processOk(global.process)) return;
|
|
26546
|
-
loaded = true;
|
|
26547
|
-
emitter.count += 1;
|
|
26548
|
-
signals = signals.filter(function(sig) {
|
|
26549
|
-
try {
|
|
26550
|
-
process2.on(sig, sigListeners[sig]);
|
|
26551
|
-
return true;
|
|
26552
|
-
} catch (er) {
|
|
26553
|
-
return false;
|
|
26554
|
-
}
|
|
26555
|
-
});
|
|
26556
|
-
process2.emit = processEmit;
|
|
26557
|
-
process2.reallyExit = processReallyExit;
|
|
26558
|
-
}, "load");
|
|
26559
|
-
module$1.exports.load = load;
|
|
26560
|
-
originalProcessReallyExit = process2.reallyExit;
|
|
26561
|
-
processReallyExit = /* @__PURE__ */ __name$1(function processReallyExit2(code) {
|
|
26562
|
-
if (!processOk(global.process)) return;
|
|
26563
|
-
process2.exitCode = code || 0;
|
|
26564
|
-
emit("exit", process2.exitCode, null);
|
|
26565
|
-
emit("afterexit", process2.exitCode, null);
|
|
26566
|
-
originalProcessReallyExit.call(process2, process2.exitCode);
|
|
26567
|
-
}, "processReallyExit");
|
|
26568
|
-
originalProcessEmit = process2.emit;
|
|
26569
|
-
processEmit = /* @__PURE__ */ __name$1(function processEmit2(ev, arg) {
|
|
26570
|
-
if (ev === "exit" && processOk(global.process)) {
|
|
26571
|
-
if (arg !== void 0) process2.exitCode = arg;
|
|
26572
|
-
var ret = originalProcessEmit.apply(this, arguments);
|
|
26573
|
-
emit("exit", process2.exitCode, null);
|
|
26574
|
-
emit("afterexit", process2.exitCode, null);
|
|
26575
|
-
return ret;
|
|
26576
|
-
} else return originalProcessEmit.apply(this, arguments);
|
|
26577
|
-
}, "processEmit");
|
|
26578
|
-
}
|
|
26579
|
-
var assert3;
|
|
26580
|
-
var signals;
|
|
26581
|
-
var isWin$1;
|
|
26582
|
-
var EE$3;
|
|
26583
|
-
var emitter;
|
|
26584
|
-
var unload;
|
|
26585
|
-
var emit;
|
|
26586
|
-
var sigListeners;
|
|
26587
|
-
var loaded;
|
|
26588
|
-
var load;
|
|
26589
|
-
var originalProcessReallyExit;
|
|
26590
|
-
var processReallyExit;
|
|
26591
|
-
var originalProcessEmit;
|
|
26592
|
-
var processEmit;
|
|
26593
|
-
} });
|
|
26594
26083
|
var require_command_exists = __commonJS$1({ "../../node_modules/.pnpm/command-exists@1.2.9/node_modules/command-exists/lib/command-exists.js"(exports$2, module$1) {
|
|
26595
26084
|
var exec = __require$1("child_process").exec;
|
|
26596
26085
|
var execSync = __require$1("child_process").execSync;
|
|
26597
26086
|
var fs3 = __require$1("fs");
|
|
26598
|
-
var
|
|
26087
|
+
var path4 = __require$1("path");
|
|
26599
26088
|
var access = fs3.access;
|
|
26600
26089
|
var accessSync2 = fs3.accessSync;
|
|
26601
26090
|
var constants2 = fs3.constants || fs3;
|
|
@@ -26672,8 +26161,8 @@ var require_command_exists = __commonJS$1({ "../../node_modules/.pnpm/command-ex
|
|
|
26672
26161
|
}, "cleanInput");
|
|
26673
26162
|
if (isUsingWindows) cleanInput = /* @__PURE__ */ __name$1(function(s) {
|
|
26674
26163
|
if (/[\\]/.test(s)) {
|
|
26675
|
-
var dirname2 = "\"" +
|
|
26676
|
-
var basename2 = "\"" +
|
|
26164
|
+
var dirname2 = "\"" + path4.dirname(s) + "\"";
|
|
26165
|
+
var basename2 = "\"" + path4.basename(s) + "\"";
|
|
26677
26166
|
return dirname2 + ":" + basename2;
|
|
26678
26167
|
}
|
|
26679
26168
|
return "\"" + s + "\"";
|
|
@@ -26716,7 +26205,7 @@ var require_ini = __commonJS$1({ "../../node_modules/.pnpm/ini@1.3.8/node_module
|
|
|
26716
26205
|
opt.whitespace = opt.whitespace === true;
|
|
26717
26206
|
}
|
|
26718
26207
|
var separator = opt.whitespace ? " = " : "=";
|
|
26719
|
-
Object.keys(obj).forEach(function(k,
|
|
26208
|
+
Object.keys(obj).forEach(function(k, _, __) {
|
|
26720
26209
|
var val = obj[k];
|
|
26721
26210
|
if (val && Array.isArray(val)) val.forEach(function(item) {
|
|
26722
26211
|
out += safe(k + "[]") + separator + safe(item) + "\n";
|
|
@@ -26725,7 +26214,7 @@ var require_ini = __commonJS$1({ "../../node_modules/.pnpm/ini@1.3.8/node_module
|
|
|
26725
26214
|
else out += safe(k) + separator + safe(val) + eol;
|
|
26726
26215
|
});
|
|
26727
26216
|
if (opt.section && out.length) out = "[" + safe(opt.section) + "]" + eol + out;
|
|
26728
|
-
children.forEach(function(k,
|
|
26217
|
+
children.forEach(function(k, _, __) {
|
|
26729
26218
|
var nk = dotSplit(k).join("\\.");
|
|
26730
26219
|
var section = (opt.section ? opt.section + "." : "") + nk;
|
|
26731
26220
|
var child = encode$4(obj[k], {
|
|
@@ -26749,7 +26238,7 @@ var require_ini = __commonJS$1({ "../../node_modules/.pnpm/ini@1.3.8/node_module
|
|
|
26749
26238
|
var p$1 = out;
|
|
26750
26239
|
var section = null;
|
|
26751
26240
|
var re$5 = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;
|
|
26752
|
-
str.split(/[\r\n]+/g).forEach(function(line,
|
|
26241
|
+
str.split(/[\r\n]+/g).forEach(function(line, _, __) {
|
|
26753
26242
|
if (!line || line.match(/^\s*[;#]/)) return;
|
|
26754
26243
|
var match = line.match(re$5);
|
|
26755
26244
|
if (!match) return;
|
|
@@ -26779,13 +26268,13 @@ var require_ini = __commonJS$1({ "../../node_modules/.pnpm/ini@1.3.8/node_module
|
|
|
26779
26268
|
if (Array.isArray(p$1[key])) p$1[key].push(value);
|
|
26780
26269
|
else p$1[key] = value;
|
|
26781
26270
|
});
|
|
26782
|
-
Object.keys(out).filter(function(k,
|
|
26271
|
+
Object.keys(out).filter(function(k, _, __) {
|
|
26783
26272
|
if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k])) return false;
|
|
26784
26273
|
var parts = dotSplit(k);
|
|
26785
26274
|
var p2 = out;
|
|
26786
26275
|
var l = parts.pop();
|
|
26787
26276
|
var nl = l.replace(/\\\./g, ".");
|
|
26788
|
-
parts.forEach(function(part,
|
|
26277
|
+
parts.forEach(function(part, _2, __2) {
|
|
26789
26278
|
if (part === "__proto__") return;
|
|
26790
26279
|
if (!p2[part] || typeof p2[part] !== "object") p2[part] = {};
|
|
26791
26280
|
p2 = p2[part];
|
|
@@ -26793,7 +26282,7 @@ var require_ini = __commonJS$1({ "../../node_modules/.pnpm/ini@1.3.8/node_module
|
|
|
26793
26282
|
if (p2 === out && nl === l) return false;
|
|
26794
26283
|
p2[nl] = out[k];
|
|
26795
26284
|
return true;
|
|
26796
|
-
}).forEach(function(del,
|
|
26285
|
+
}).forEach(function(del, _, __) {
|
|
26797
26286
|
delete out[del];
|
|
26798
26287
|
});
|
|
26799
26288
|
return out;
|
|
@@ -26813,7 +26302,7 @@ var require_ini = __commonJS$1({ "../../node_modules/.pnpm/ini@1.3.8/node_module
|
|
|
26813
26302
|
if (val.charAt(0) === "'") val = val.substr(1, val.length - 2);
|
|
26814
26303
|
try {
|
|
26815
26304
|
val = JSON.parse(val);
|
|
26816
|
-
} catch (
|
|
26305
|
+
} catch (_) {}
|
|
26817
26306
|
} else {
|
|
26818
26307
|
var esc$1 = false;
|
|
26819
26308
|
var unesc = "";
|
|
@@ -26896,7 +26385,7 @@ var require_strip_json_comments = __commonJS$1({ "../../node_modules/.pnpm/strip
|
|
|
26896
26385
|
var require_utils$1 = __commonJS$1({ "../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/lib/utils.js"(exports$2) {
|
|
26897
26386
|
var fs3 = __require$1("fs");
|
|
26898
26387
|
var ini = require_ini();
|
|
26899
|
-
var
|
|
26388
|
+
var path4 = __require$1("path");
|
|
26900
26389
|
var stripJsonComments = require_strip_json_comments();
|
|
26901
26390
|
var parse$13 = exports$2.parse = function(content) {
|
|
26902
26391
|
if (/^\s*{/.test(content)) return JSON.parse(stripJsonComments(content));
|
|
@@ -26907,7 +26396,7 @@ var require_utils$1 = __commonJS$1({ "../../node_modules/.pnpm/rc@1.2.8/node_mod
|
|
|
26907
26396
|
return arg != null;
|
|
26908
26397
|
});
|
|
26909
26398
|
for (var i$1 in args) if ("string" !== typeof args[i$1]) return;
|
|
26910
|
-
var file2 =
|
|
26399
|
+
var file2 = path4.join.apply(null, args);
|
|
26911
26400
|
try {
|
|
26912
26401
|
return fs3.readFileSync(file2, "utf-8");
|
|
26913
26402
|
} catch (err) {
|
|
@@ -26937,14 +26426,14 @@ var require_utils$1 = __commonJS$1({ "../../node_modules/.pnpm/rc@1.2.8/node_mod
|
|
|
26937
26426
|
return obj;
|
|
26938
26427
|
};
|
|
26939
26428
|
exports$2.find = function() {
|
|
26940
|
-
var rel =
|
|
26429
|
+
var rel = path4.join.apply(null, [].slice.call(arguments));
|
|
26941
26430
|
function find2(start, rel2) {
|
|
26942
|
-
var file2 =
|
|
26431
|
+
var file2 = path4.join(start, rel2);
|
|
26943
26432
|
try {
|
|
26944
26433
|
fs3.statSync(file2);
|
|
26945
26434
|
return file2;
|
|
26946
26435
|
} catch (err) {
|
|
26947
|
-
if (
|
|
26436
|
+
if (path4.dirname(start) !== start) return find2(path4.dirname(start), rel2);
|
|
26948
26437
|
}
|
|
26949
26438
|
}
|
|
26950
26439
|
__name$1(find2, "find");
|
|
@@ -27323,7 +26812,7 @@ var require_registry_auth_token = __commonJS$1({ "../../node_modules/.pnpm/regis
|
|
|
27323
26812
|
var authInfo = getAuthInfoForUrl("//" + parsed.host + pathname.replace(/\/$/, ""), options.npmrc);
|
|
27324
26813
|
if (authInfo) return authInfo;
|
|
27325
26814
|
if (!options.recursive) return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(url.resolve(checkUrl, "."), options);
|
|
27326
|
-
parsed.pathname = url.resolve(normalizePath$
|
|
26815
|
+
parsed.pathname = url.resolve(normalizePath$3(pathname), "..") || "/";
|
|
27327
26816
|
}
|
|
27328
26817
|
}
|
|
27329
26818
|
__name$1(getRegistryAuthInfo, "getRegistryAuthInfo");
|
|
@@ -27334,10 +26823,10 @@ var require_registry_auth_token = __commonJS$1({ "../../node_modules/.pnpm/regis
|
|
|
27334
26823
|
};
|
|
27335
26824
|
}
|
|
27336
26825
|
__name$1(getLegacyAuthInfo, "getLegacyAuthInfo");
|
|
27337
|
-
function normalizePath$
|
|
27338
|
-
return
|
|
26826
|
+
function normalizePath$3(path4) {
|
|
26827
|
+
return path4[path4.length - 1] === "/" ? path4 : path4 + "/";
|
|
27339
26828
|
}
|
|
27340
|
-
__name$1(normalizePath$
|
|
26829
|
+
__name$1(normalizePath$3, "normalizePath");
|
|
27341
26830
|
function getAuthInfoForUrl(regUrl, npmrc) {
|
|
27342
26831
|
var bearerAuth = getBearerToken(npmrc[regUrl + tokenKey] || npmrc[regUrl + "/" + tokenKey]);
|
|
27343
26832
|
if (bearerAuth) return bearerAuth;
|
|
@@ -27654,7 +27143,7 @@ var util$2;
|
|
|
27654
27143
|
}
|
|
27655
27144
|
__name$1(joinValues, "joinValues");
|
|
27656
27145
|
util2.joinValues = joinValues;
|
|
27657
|
-
util2.jsonStringifyReplacer = (
|
|
27146
|
+
util2.jsonStringifyReplacer = (_, value) => {
|
|
27658
27147
|
if (typeof value === "bigint") return value.toString();
|
|
27659
27148
|
return value;
|
|
27660
27149
|
};
|
|
@@ -27893,8 +27382,8 @@ function getErrorMap$1() {
|
|
|
27893
27382
|
}
|
|
27894
27383
|
__name$1(getErrorMap$1, "getErrorMap");
|
|
27895
27384
|
var makeIssue$1 = /* @__PURE__ */ __name$1((params) => {
|
|
27896
|
-
const { data: data$1, path:
|
|
27897
|
-
const fullPath = [...
|
|
27385
|
+
const { data: data$1, path: path4, errorMaps, issueData } = params;
|
|
27386
|
+
const fullPath = [...path4, ...issueData.path || []];
|
|
27898
27387
|
const fullIssue = {
|
|
27899
27388
|
...issueData,
|
|
27900
27389
|
path: fullPath
|
|
@@ -27998,11 +27487,11 @@ var ParseInputLazyPath$1 = class {
|
|
|
27998
27487
|
static {
|
|
27999
27488
|
__name$1(this, "ParseInputLazyPath");
|
|
28000
27489
|
}
|
|
28001
|
-
constructor(parent, value,
|
|
27490
|
+
constructor(parent, value, path4, key) {
|
|
28002
27491
|
this._cachedPath = [];
|
|
28003
27492
|
this.parent = parent;
|
|
28004
27493
|
this.data = value;
|
|
28005
|
-
this._path =
|
|
27494
|
+
this._path = path4;
|
|
28006
27495
|
this._key = key;
|
|
28007
27496
|
}
|
|
28008
27497
|
get path() {
|
|
@@ -31162,25 +30651,6 @@ z.object({
|
|
|
31162
30651
|
}).strict().optional(),
|
|
31163
30652
|
timeout: z.number().gte(0).or(z.string()).optional()
|
|
31164
30653
|
}).strict();
|
|
31165
|
-
var mod_esm_exports = {};
|
|
31166
|
-
__export(mod_esm_exports, { default: () => mod_esm_default });
|
|
31167
|
-
var import_mod_cjs = __toESM(require_mod_cjs3(), 1);
|
|
31168
|
-
__reExport(mod_esm_exports, __toESM(require_mod_cjs3(), 1));
|
|
31169
|
-
var mod_esm_default = import_mod_cjs.default;
|
|
31170
|
-
function getGlobalConfigPath({ appName = "wrangler", leadingDot = true, useLegacyHomeDir = true } = {}) {
|
|
31171
|
-
const dirName = `${leadingDot ? "." : ""}${appName}`;
|
|
31172
|
-
const configDir = mod_esm_default(dirName).config();
|
|
31173
|
-
if (useLegacyHomeDir) {
|
|
31174
|
-
const legacyConfigDir = path.join(os.homedir(), dirName);
|
|
31175
|
-
if (isDirectory$1(legacyConfigDir)) return legacyConfigDir;
|
|
31176
|
-
}
|
|
31177
|
-
return configDir;
|
|
31178
|
-
}
|
|
31179
|
-
__name$1(getGlobalConfigPath, "getGlobalConfigPath");
|
|
31180
|
-
function getGlobalWranglerConfigPath() {
|
|
31181
|
-
return getGlobalConfigPath();
|
|
31182
|
-
}
|
|
31183
|
-
__name$1(getGlobalWranglerConfigPath, "getGlobalWranglerConfigPath");
|
|
31184
30654
|
function getBooleanEnvironmentVariableFactory(options) {
|
|
31185
30655
|
return () => {
|
|
31186
30656
|
if (!(options.variableName in process.env) || process.env[options.variableName] === void 0) return typeof options.defaultValue === "function" ? options.defaultValue() : options.defaultValue;
|
|
@@ -31276,7 +30746,7 @@ var getBuildPlatformFromEnv = getEnvironmentVariableFactory({ variableName: "WRA
|
|
|
31276
30746
|
var getRegistryPath = getEnvironmentVariableFactory({
|
|
31277
30747
|
variableName: "WRANGLER_REGISTRY_PATH",
|
|
31278
30748
|
defaultValue() {
|
|
31279
|
-
return
|
|
30749
|
+
return path2.join(getGlobalConfigPath(), "registry");
|
|
31280
30750
|
}
|
|
31281
30751
|
});
|
|
31282
30752
|
var getD1ExtraLocationChoices = getEnvironmentVariableFactory({ variableName: "WRANGLER_D1_EXTRA_LOCATION_CHOICES" });
|
|
@@ -31418,9 +30888,9 @@ Please add "${field}" to "env.${envName}".`);
|
|
|
31418
30888
|
return rawEnv[field] ?? defaultValue;
|
|
31419
30889
|
}
|
|
31420
30890
|
__name$1(notInheritable, "notInheritable");
|
|
31421
|
-
function unwindPropertyPath(root,
|
|
30891
|
+
function unwindPropertyPath(root, path4) {
|
|
31422
30892
|
let container = root;
|
|
31423
|
-
const parts =
|
|
30893
|
+
const parts = path4.split(".");
|
|
31424
30894
|
for (let i$1 = 0; i$1 < parts.length - 1; i$1++) {
|
|
31425
30895
|
if (!hasProperty(container, parts[i$1])) return;
|
|
31426
30896
|
container = container[parts[i$1]];
|
|
@@ -31568,10 +31038,10 @@ var isRecord = /* @__PURE__ */ __name$1((value) => typeof value === "object" &&
|
|
|
31568
31038
|
var validateUniqueNameProperty = /* @__PURE__ */ __name$1((diagnostics, field, value) => {
|
|
31569
31039
|
if (Array.isArray(value)) {
|
|
31570
31040
|
const nameCount = /* @__PURE__ */ new Map();
|
|
31571
|
-
Object.entries(value).forEach(([
|
|
31041
|
+
Object.entries(value).forEach(([_, entry]) => {
|
|
31572
31042
|
nameCount.set(entry.name, (nameCount.get(entry.name) ?? 0) + 1);
|
|
31573
31043
|
});
|
|
31574
|
-
const duplicates = Array.from(nameCount.entries()).filter(([
|
|
31044
|
+
const duplicates = Array.from(nameCount.entries()).filter(([_, count]) => count > 1).map(([name]) => name);
|
|
31575
31045
|
if (duplicates.length > 0) {
|
|
31576
31046
|
const list$1 = duplicates.join("\", \"");
|
|
31577
31047
|
diagnostics.errors.push(`"${field}" bindings must have unique "name" values; duplicate(s) found: "${list$1}"`);
|
|
@@ -31692,7 +31162,7 @@ function isPagesConfig(rawConfig) {
|
|
|
31692
31162
|
}
|
|
31693
31163
|
__name$1(isPagesConfig, "isPagesConfig");
|
|
31694
31164
|
function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args, preserveOriginalMain = false) {
|
|
31695
|
-
const diagnostics = new Diagnostics(`Processing ${configPath ?
|
|
31165
|
+
const diagnostics = new Diagnostics(`Processing ${configPath ? path2.relative(process.cwd(), configPath) : "wrangler"} configuration:`);
|
|
31696
31166
|
validateOptionalProperty(diagnostics, "", "legacy_env", rawConfig.legacy_env, "boolean");
|
|
31697
31167
|
validateOptionalProperty(diagnostics, "", "send_metrics", rawConfig.send_metrics, "boolean");
|
|
31698
31168
|
validateOptionalProperty(diagnostics, "", "keep_vars", rawConfig.keep_vars, "boolean");
|
|
@@ -31796,34 +31266,34 @@ function normalizeAndValidateBuild(diagnostics, rawEnv, rawBuild, configPath) {
|
|
|
31796
31266
|
else validateOptionalProperty(diagnostics, "build", "watch_dir", watch_dir, "string");
|
|
31797
31267
|
return {
|
|
31798
31268
|
command,
|
|
31799
|
-
watch_dir: command && configPath ? Array.isArray(watch_dir) ? watch_dir.map((dir) =>
|
|
31269
|
+
watch_dir: command && configPath ? Array.isArray(watch_dir) ? watch_dir.map((dir) => path2.relative(process.cwd(), path2.join(path2.dirname(configPath), `${dir}`))) : path2.relative(process.cwd(), path2.join(path2.dirname(configPath), `${watch_dir}`)) : watch_dir,
|
|
31800
31270
|
cwd
|
|
31801
31271
|
};
|
|
31802
31272
|
}
|
|
31803
31273
|
__name$1(normalizeAndValidateBuild, "normalizeAndValidateBuild");
|
|
31804
31274
|
function normalizeAndValidateMainField(configPath, rawMain) {
|
|
31805
|
-
const configDir =
|
|
31275
|
+
const configDir = path2.dirname(configPath ?? "wrangler.toml");
|
|
31806
31276
|
if (rawMain !== void 0) if (typeof rawMain === "string") {
|
|
31807
|
-
const directory =
|
|
31808
|
-
return
|
|
31277
|
+
const directory = path2.resolve(configDir);
|
|
31278
|
+
return path2.resolve(directory, rawMain);
|
|
31809
31279
|
} else return rawMain;
|
|
31810
31280
|
else return;
|
|
31811
31281
|
}
|
|
31812
31282
|
__name$1(normalizeAndValidateMainField, "normalizeAndValidateMainField");
|
|
31813
31283
|
function normalizeAndValidateBaseDirField(configPath, rawDir) {
|
|
31814
|
-
const configDir =
|
|
31284
|
+
const configDir = path2.dirname(configPath ?? "wrangler.toml");
|
|
31815
31285
|
if (rawDir !== void 0) if (typeof rawDir === "string") {
|
|
31816
|
-
const directory =
|
|
31817
|
-
return
|
|
31286
|
+
const directory = path2.resolve(configDir);
|
|
31287
|
+
return path2.resolve(directory, rawDir);
|
|
31818
31288
|
} else return rawDir;
|
|
31819
31289
|
else return;
|
|
31820
31290
|
}
|
|
31821
31291
|
__name$1(normalizeAndValidateBaseDirField, "normalizeAndValidateBaseDirField");
|
|
31822
31292
|
function normalizeAndValidatePagesBuildOutputDir(configPath, rawPagesDir) {
|
|
31823
|
-
const configDir =
|
|
31293
|
+
const configDir = path2.dirname(configPath ?? "wrangler.toml");
|
|
31824
31294
|
if (rawPagesDir !== void 0) if (typeof rawPagesDir === "string") {
|
|
31825
|
-
const directory =
|
|
31826
|
-
return
|
|
31295
|
+
const directory = path2.resolve(configDir);
|
|
31296
|
+
return path2.resolve(directory, rawPagesDir);
|
|
31827
31297
|
} else return rawPagesDir;
|
|
31828
31298
|
else return;
|
|
31829
31299
|
}
|
|
@@ -31877,7 +31347,7 @@ function normalizeAndValidateSite(diagnostics, configPath, rawConfig, mainEntryP
|
|
|
31877
31347
|
validateOptionalProperty(diagnostics, "site", "entry-point", legacySiteEntryPoint, "string");
|
|
31878
31348
|
deprecated(diagnostics, rawConfig, `site.entry-point`, `Delete the \`site.entry-point\` field, then add the top level \`main\` field to your configuration file:
|
|
31879
31349
|
\`\`\`
|
|
31880
|
-
main = "${
|
|
31350
|
+
main = "${path2.join(String(legacySiteEntryPoint) || "workers-site", path2.extname(String(legacySiteEntryPoint) || "workers-site") ? "" : "index.js")}"
|
|
31881
31351
|
\`\`\``, false, void 0, "warning");
|
|
31882
31352
|
let siteEntryPoint = legacySiteEntryPoint;
|
|
31883
31353
|
if (!mainEntryPoint && !siteEntryPoint) {
|
|
@@ -31890,7 +31360,7 @@ main = "workers-site/index.js"
|
|
|
31890
31360
|
} else if (mainEntryPoint && siteEntryPoint) diagnostics.errors.push(`Don't define both the \`main\` and \`site.entry-point\` fields in your configuration.
|
|
31891
31361
|
They serve the same purpose: to point to the entry-point of your worker.
|
|
31892
31362
|
Delete the deprecated \`site.entry-point\` field from your config.`);
|
|
31893
|
-
if (configPath && siteEntryPoint) siteEntryPoint =
|
|
31363
|
+
if (configPath && siteEntryPoint) siteEntryPoint = path2.relative(process.cwd(), path2.join(path2.dirname(configPath), siteEntryPoint));
|
|
31894
31364
|
return {
|
|
31895
31365
|
bucket,
|
|
31896
31366
|
"entry-point": siteEntryPoint,
|
|
@@ -31922,7 +31392,7 @@ function normalizeAndValidateModulePaths(diagnostics, configPath, field, rawMapp
|
|
|
31922
31392
|
if (rawMapping === void 0) return;
|
|
31923
31393
|
const mapping = {};
|
|
31924
31394
|
for (const [name, filePath] of Object.entries(rawMapping)) if (isString$2(diagnostics, `${field}['${name}']`, filePath, void 0)) {
|
|
31925
|
-
if (configPath) mapping[name] = configPath ?
|
|
31395
|
+
if (configPath) mapping[name] = configPath ? path2.relative(process.cwd(), path2.join(path2.dirname(configPath), filePath)) : filePath;
|
|
31926
31396
|
}
|
|
31927
31397
|
return mapping;
|
|
31928
31398
|
}
|
|
@@ -32182,7 +31652,7 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
|
|
|
32182
31652
|
__name$1(normalizeAndValidateEnvironment, "normalizeAndValidateEnvironment");
|
|
32183
31653
|
function validateAndNormalizeTsconfig(diagnostics, topLevelEnv, rawEnv, configPath) {
|
|
32184
31654
|
const tsconfig = inheritable(diagnostics, topLevelEnv, rawEnv, "tsconfig", isString$2, void 0);
|
|
32185
|
-
return configPath && tsconfig ?
|
|
31655
|
+
return configPath && tsconfig ? path2.relative(process.cwd(), path2.join(path2.dirname(configPath), tsconfig)) : tsconfig;
|
|
32186
31656
|
}
|
|
32187
31657
|
__name$1(validateAndNormalizeTsconfig, "validateAndNormalizeTsconfig");
|
|
32188
31658
|
var validateAndNormalizeRules = /* @__PURE__ */ __name$1((diagnostics, topLevelEnv, rawEnv, envName) => {
|
|
@@ -32682,9 +32152,9 @@ function validateContainerApp(envName, topLevelName, configPath) {
|
|
|
32682
32152
|
let resolvedBuildContextPath = void 0;
|
|
32683
32153
|
try {
|
|
32684
32154
|
if (isDockerfile(resolvedImage, configPath)) {
|
|
32685
|
-
const baseDir = configPath ?
|
|
32686
|
-
resolvedImage =
|
|
32687
|
-
resolvedBuildContextPath = containerAppOptional.image_build_context ?
|
|
32155
|
+
const baseDir$1 = configPath ? path2.dirname(configPath) : process.cwd();
|
|
32156
|
+
resolvedImage = path2.resolve(baseDir$1, resolvedImage);
|
|
32157
|
+
resolvedBuildContextPath = containerAppOptional.image_build_context ? path2.resolve(baseDir$1, containerAppOptional.image_build_context) : path2.dirname(resolvedImage);
|
|
32688
32158
|
}
|
|
32689
32159
|
} catch (err) {
|
|
32690
32160
|
if (err instanceof Error && err.message) diagnostics.errors.push(err.message);
|
|
@@ -33042,6 +32512,22 @@ var validateD1Binding = /* @__PURE__ */ __name$1((diagnostics, field, value) =>
|
|
|
33042
32512
|
diagnostics.errors.push(`"${field}" bindings should, optionally, have a string "migrations_pattern" field but got ${JSON.stringify(value)}.`);
|
|
33043
32513
|
isValid2 = false;
|
|
33044
32514
|
}
|
|
32515
|
+
if (!isOptionalProperty(value, "database_name", "string")) {
|
|
32516
|
+
diagnostics.errors.push(`"${field}" bindings should, optionally, have a string "database_name" field but got ${JSON.stringify(value)}.`);
|
|
32517
|
+
isValid2 = false;
|
|
32518
|
+
}
|
|
32519
|
+
if (!isOptionalProperty(value, "migrations_dir", "string")) {
|
|
32520
|
+
diagnostics.errors.push(`"${field}" bindings should, optionally, have a string "migrations_dir" field but got ${JSON.stringify(value)}.`);
|
|
32521
|
+
isValid2 = false;
|
|
32522
|
+
}
|
|
32523
|
+
if (!isOptionalProperty(value, "migrations_table", "string")) {
|
|
32524
|
+
diagnostics.errors.push(`"${field}" bindings should, optionally, have a string "migrations_table" field but got ${JSON.stringify(value)}.`);
|
|
32525
|
+
isValid2 = false;
|
|
32526
|
+
}
|
|
32527
|
+
if (!isOptionalProperty(value, "database_internal_env", "string")) {
|
|
32528
|
+
diagnostics.errors.push(`"${field}" bindings should, optionally, have a string "database_internal_env" field but got ${JSON.stringify(value)}.`);
|
|
32529
|
+
isValid2 = false;
|
|
32530
|
+
}
|
|
33045
32531
|
validateAdditionalProperties(diagnostics, field, Object.keys(value), [
|
|
33046
32532
|
"binding",
|
|
33047
32533
|
"database_id",
|
|
@@ -34022,8 +33508,8 @@ function isRemoteValid(targetObject, fieldPath, diagnostics) {
|
|
|
34022
33508
|
}
|
|
34023
33509
|
__name$1(isRemoteValid, "isRemoteValid");
|
|
34024
33510
|
function isDockerfile(imagePath, configPath) {
|
|
34025
|
-
const baseDir = configPath ?
|
|
34026
|
-
const maybeDockerfile =
|
|
33511
|
+
const baseDir$1 = configPath ? path2.dirname(configPath) : process.cwd();
|
|
33512
|
+
const maybeDockerfile = path2.resolve(baseDir$1, imagePath);
|
|
34027
33513
|
if (fs2.existsSync(maybeDockerfile)) {
|
|
34028
33514
|
if (isDirectory$1(maybeDockerfile)) throw new UserError(`${imagePath} is a directory, you should specify a path to the Dockerfile`, { telemetryMessage: false });
|
|
34029
33515
|
return true;
|
|
@@ -34172,10 +33658,176 @@ Pages requires Durable Object bindings to specify the name of the Worker where t
|
|
|
34172
33658
|
}
|
|
34173
33659
|
}
|
|
34174
33660
|
__name$1(validateDurableObjectBinding2, "validateDurableObjectBinding");
|
|
34175
|
-
var
|
|
33661
|
+
var signals = [];
|
|
33662
|
+
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
33663
|
+
if (process.platform !== "win32") signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
33664
|
+
if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
33665
|
+
var processOk = /* @__PURE__ */ __name$1((process3) => !!process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function", "processOk");
|
|
33666
|
+
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
33667
|
+
var global = globalThis;
|
|
33668
|
+
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
33669
|
+
var Emitter = class {
|
|
33670
|
+
static {
|
|
33671
|
+
__name$1(this, "Emitter");
|
|
33672
|
+
}
|
|
33673
|
+
emitted = {
|
|
33674
|
+
afterExit: false,
|
|
33675
|
+
exit: false
|
|
33676
|
+
};
|
|
33677
|
+
listeners = {
|
|
33678
|
+
afterExit: [],
|
|
33679
|
+
exit: []
|
|
33680
|
+
};
|
|
33681
|
+
count = 0;
|
|
33682
|
+
id = Math.random();
|
|
33683
|
+
constructor() {
|
|
33684
|
+
if (global[kExitEmitter]) return global[kExitEmitter];
|
|
33685
|
+
ObjectDefineProperty(global, kExitEmitter, {
|
|
33686
|
+
value: this,
|
|
33687
|
+
writable: false,
|
|
33688
|
+
enumerable: false,
|
|
33689
|
+
configurable: false
|
|
33690
|
+
});
|
|
33691
|
+
}
|
|
33692
|
+
on(ev, fn) {
|
|
33693
|
+
this.listeners[ev].push(fn);
|
|
33694
|
+
}
|
|
33695
|
+
removeListener(ev, fn) {
|
|
33696
|
+
const list$1 = this.listeners[ev];
|
|
33697
|
+
const i$1 = list$1.indexOf(fn);
|
|
33698
|
+
if (i$1 === -1) return;
|
|
33699
|
+
if (i$1 === 0 && list$1.length === 1) list$1.length = 0;
|
|
33700
|
+
else list$1.splice(i$1, 1);
|
|
33701
|
+
}
|
|
33702
|
+
emit(ev, code, signal) {
|
|
33703
|
+
if (this.emitted[ev]) return false;
|
|
33704
|
+
this.emitted[ev] = true;
|
|
33705
|
+
let ret = false;
|
|
33706
|
+
for (const fn of this.listeners[ev]) ret = fn(code, signal) === true || ret;
|
|
33707
|
+
if (ev === "exit") ret = this.emit("afterExit", code, signal) || ret;
|
|
33708
|
+
return ret;
|
|
33709
|
+
}
|
|
33710
|
+
};
|
|
33711
|
+
var SignalExitBase = class {
|
|
33712
|
+
static {
|
|
33713
|
+
__name$1(this, "SignalExitBase");
|
|
33714
|
+
}
|
|
33715
|
+
};
|
|
33716
|
+
var signalExitWrap = /* @__PURE__ */ __name$1((handler) => {
|
|
33717
|
+
return {
|
|
33718
|
+
onExit(cb, opts) {
|
|
33719
|
+
return handler.onExit(cb, opts);
|
|
33720
|
+
},
|
|
33721
|
+
load() {
|
|
33722
|
+
return handler.load();
|
|
33723
|
+
},
|
|
33724
|
+
unload() {
|
|
33725
|
+
return handler.unload();
|
|
33726
|
+
}
|
|
33727
|
+
};
|
|
33728
|
+
}, "signalExitWrap");
|
|
33729
|
+
var SignalExitFallback = class extends SignalExitBase {
|
|
33730
|
+
static {
|
|
33731
|
+
__name$1(this, "SignalExitFallback");
|
|
33732
|
+
}
|
|
33733
|
+
onExit() {
|
|
33734
|
+
return () => {};
|
|
33735
|
+
}
|
|
33736
|
+
load() {}
|
|
33737
|
+
unload() {}
|
|
33738
|
+
};
|
|
33739
|
+
var SignalExit = class extends SignalExitBase {
|
|
33740
|
+
static {
|
|
33741
|
+
__name$1(this, "SignalExit");
|
|
33742
|
+
}
|
|
33743
|
+
/* c8 ignore start */
|
|
33744
|
+
#hupSig = process2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
33745
|
+
/* c8 ignore stop */
|
|
33746
|
+
#emitter = new Emitter();
|
|
33747
|
+
#process;
|
|
33748
|
+
#originalProcessEmit;
|
|
33749
|
+
#originalProcessReallyExit;
|
|
33750
|
+
#sigListeners = {};
|
|
33751
|
+
#loaded = false;
|
|
33752
|
+
constructor(process3) {
|
|
33753
|
+
super();
|
|
33754
|
+
this.#process = process3;
|
|
33755
|
+
this.#sigListeners = {};
|
|
33756
|
+
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
33757
|
+
const listeners = this.#process.listeners(sig);
|
|
33758
|
+
let { count } = this.#emitter;
|
|
33759
|
+
const p$1 = process3;
|
|
33760
|
+
if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count += p$1.__signal_exit_emitter__.count;
|
|
33761
|
+
if (listeners.length === count) {
|
|
33762
|
+
this.unload();
|
|
33763
|
+
const ret = this.#emitter.emit("exit", null, sig);
|
|
33764
|
+
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
33765
|
+
if (!ret) process3.kill(process3.pid, s);
|
|
33766
|
+
}
|
|
33767
|
+
};
|
|
33768
|
+
this.#originalProcessReallyExit = process3.reallyExit;
|
|
33769
|
+
this.#originalProcessEmit = process3.emit;
|
|
33770
|
+
}
|
|
33771
|
+
onExit(cb, opts) {
|
|
33772
|
+
if (!processOk(this.#process)) return () => {};
|
|
33773
|
+
if (this.#loaded === false) this.load();
|
|
33774
|
+
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
33775
|
+
this.#emitter.on(ev, cb);
|
|
33776
|
+
return () => {
|
|
33777
|
+
this.#emitter.removeListener(ev, cb);
|
|
33778
|
+
if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) this.unload();
|
|
33779
|
+
};
|
|
33780
|
+
}
|
|
33781
|
+
load() {
|
|
33782
|
+
if (this.#loaded) return;
|
|
33783
|
+
this.#loaded = true;
|
|
33784
|
+
this.#emitter.count += 1;
|
|
33785
|
+
for (const sig of signals) try {
|
|
33786
|
+
const fn = this.#sigListeners[sig];
|
|
33787
|
+
if (fn) this.#process.on(sig, fn);
|
|
33788
|
+
} catch (_) {}
|
|
33789
|
+
this.#process.emit = (ev, ...a) => {
|
|
33790
|
+
return this.#processEmit(ev, ...a);
|
|
33791
|
+
};
|
|
33792
|
+
this.#process.reallyExit = (code) => {
|
|
33793
|
+
return this.#processReallyExit(code);
|
|
33794
|
+
};
|
|
33795
|
+
}
|
|
33796
|
+
unload() {
|
|
33797
|
+
if (!this.#loaded) return;
|
|
33798
|
+
this.#loaded = false;
|
|
33799
|
+
signals.forEach((sig) => {
|
|
33800
|
+
const listener = this.#sigListeners[sig];
|
|
33801
|
+
if (!listener) throw new Error("Listener not defined for signal: " + sig);
|
|
33802
|
+
try {
|
|
33803
|
+
this.#process.removeListener(sig, listener);
|
|
33804
|
+
} catch (_) {}
|
|
33805
|
+
});
|
|
33806
|
+
this.#process.emit = this.#originalProcessEmit;
|
|
33807
|
+
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
33808
|
+
this.#emitter.count -= 1;
|
|
33809
|
+
}
|
|
33810
|
+
#processReallyExit(code) {
|
|
33811
|
+
if (!processOk(this.#process)) return 0;
|
|
33812
|
+
this.#process.exitCode = code || 0;
|
|
33813
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
33814
|
+
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
33815
|
+
}
|
|
33816
|
+
#processEmit(ev, ...args) {
|
|
33817
|
+
const og = this.#originalProcessEmit;
|
|
33818
|
+
if (ev === "exit" && processOk(this.#process)) {
|
|
33819
|
+
if (typeof args[0] === "number") this.#process.exitCode = args[0];
|
|
33820
|
+
const ret = og.call(this.#process, ev, ...args);
|
|
33821
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
33822
|
+
return ret;
|
|
33823
|
+
} else return og.call(this.#process, ev, ...args);
|
|
33824
|
+
}
|
|
33825
|
+
};
|
|
33826
|
+
var process2 = globalThis.process;
|
|
33827
|
+
var { onExit, load, unload } = signalExitWrap(processOk(process2) ? new SignalExit(process2) : new SignalExitFallback());
|
|
34176
33828
|
function getWranglerHiddenDirPath(projectRoot) {
|
|
34177
33829
|
projectRoot ??= process.cwd();
|
|
34178
|
-
return
|
|
33830
|
+
return path2.join(projectRoot, ".wrangler");
|
|
34179
33831
|
}
|
|
34180
33832
|
__name$1(getWranglerHiddenDirPath, "getWranglerHiddenDirPath");
|
|
34181
33833
|
var STALE_WRANGLER_TMP_DIR_MS = 1440 * 60 * 1e3;
|
|
@@ -34192,7 +33844,7 @@ function sweepStaleWranglerTmpDirs(tmpRoot) {
|
|
|
34192
33844
|
const cutoff = Date.now() - STALE_WRANGLER_TMP_DIR_MS;
|
|
34193
33845
|
for (const entry of entries) {
|
|
34194
33846
|
if (!entry.isDirectory()) continue;
|
|
34195
|
-
const entryPath =
|
|
33847
|
+
const entryPath = path2.join(tmpRoot, entry.name);
|
|
34196
33848
|
try {
|
|
34197
33849
|
if (fs2.statSync(entryPath).mtimeMs < cutoff) removeDirSync$1(entryPath);
|
|
34198
33850
|
} catch {}
|
|
@@ -34200,17 +33852,17 @@ function sweepStaleWranglerTmpDirs(tmpRoot) {
|
|
|
34200
33852
|
}
|
|
34201
33853
|
__name$1(sweepStaleWranglerTmpDirs, "sweepStaleWranglerTmpDirs");
|
|
34202
33854
|
function getWranglerTmpDir(projectRoot, prefix, cleanup = true) {
|
|
34203
|
-
const tmpRoot =
|
|
33855
|
+
const tmpRoot = path2.join(getWranglerHiddenDirPath(projectRoot), "tmp");
|
|
34204
33856
|
fs2.mkdirSync(tmpRoot, { recursive: true });
|
|
34205
33857
|
sweepStaleWranglerTmpDirs(tmpRoot);
|
|
34206
|
-
const tmpPrefix =
|
|
33858
|
+
const tmpPrefix = path2.join(tmpRoot, `${prefix}-`);
|
|
34207
33859
|
const tmpDir = fs2.realpathSync(fs2.mkdtempSync(tmpPrefix));
|
|
34208
33860
|
const cleanupDir = /* @__PURE__ */ __name$1(() => {
|
|
34209
33861
|
if (cleanup) try {
|
|
34210
33862
|
removeDirSync$1(tmpDir);
|
|
34211
33863
|
} catch {}
|
|
34212
33864
|
}, "cleanupDir");
|
|
34213
|
-
const removeExitListener = (
|
|
33865
|
+
const removeExitListener = onExit(cleanupDir);
|
|
34214
33866
|
return {
|
|
34215
33867
|
path: tmpDir,
|
|
34216
33868
|
remove() {
|
|
@@ -34641,13 +34293,13 @@ function startTunnel(options) {
|
|
|
34641
34293
|
env: options.token ? { TUNNEL_TOKEN: options.token } : void 0,
|
|
34642
34294
|
skipVersionCheck: true,
|
|
34643
34295
|
logger
|
|
34644
|
-
}).then((
|
|
34645
|
-
cloudflaredProcess =
|
|
34646
|
-
if (disposed) terminateCloudflared(
|
|
34647
|
-
return
|
|
34648
|
-
}).then((
|
|
34296
|
+
}).then((process3) => {
|
|
34297
|
+
cloudflaredProcess = process3;
|
|
34298
|
+
if (disposed) terminateCloudflared(process3);
|
|
34299
|
+
return process3;
|
|
34300
|
+
}).then((process3) => {
|
|
34649
34301
|
if (isNamedTunnel) return { mode: "named" };
|
|
34650
|
-
return waitForQuickTunnelReady(
|
|
34302
|
+
return waitForQuickTunnelReady(process3, timeoutMs, {
|
|
34651
34303
|
logger,
|
|
34652
34304
|
origin: options.origin
|
|
34653
34305
|
});
|
|
@@ -37378,8 +37030,8 @@ const postfixRE = /[?#].*$/;
|
|
|
37378
37030
|
function cleanUrl(url) {
|
|
37379
37031
|
return url.replace(postfixRE, "");
|
|
37380
37032
|
}
|
|
37381
|
-
function withTrailingSlash(path
|
|
37382
|
-
return path
|
|
37033
|
+
function withTrailingSlash(path) {
|
|
37034
|
+
return path.endsWith("/") ? path : `${path}/`;
|
|
37383
37035
|
}
|
|
37384
37036
|
function createRequestHandler(handler) {
|
|
37385
37037
|
return async (req, res, next) => {
|
|
@@ -37997,11 +37649,11 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
37997
37649
|
for (let i$1 = startIndex; i$1 < x.issues.length; i$1++) if (x.issues[i$1]?.continue === false) return true;
|
|
37998
37650
|
return false;
|
|
37999
37651
|
}
|
|
38000
|
-
function prefixIssues(path
|
|
37652
|
+
function prefixIssues(path, issues) {
|
|
38001
37653
|
return issues.map((iss) => {
|
|
38002
37654
|
var _a$2;
|
|
38003
37655
|
(_a$2 = iss).path ?? (_a$2.path = []);
|
|
38004
|
-
iss.path.unshift(path
|
|
37656
|
+
iss.path.unshift(path);
|
|
38005
37657
|
return iss;
|
|
38006
37658
|
});
|
|
38007
37659
|
}
|
|
@@ -38066,12 +37718,12 @@ function flattenError(error, mapper = (issue$1) => issue$1.message) {
|
|
|
38066
37718
|
}
|
|
38067
37719
|
function formatError(error, mapper = (issue$1) => issue$1.message) {
|
|
38068
37720
|
const fieldErrors = { _errors: [] };
|
|
38069
|
-
const processError = (error$1, path
|
|
38070
|
-
for (const issue$1 of error$1.issues) if (issue$1.code === "invalid_union" && issue$1.errors.length) issue$1.errors.map((issues) => processError({ issues }, [...path
|
|
38071
|
-
else if (issue$1.code === "invalid_key") processError({ issues: issue$1.issues }, [...path
|
|
38072
|
-
else if (issue$1.code === "invalid_element") processError({ issues: issue$1.issues }, [...path
|
|
37721
|
+
const processError = (error$1, path = []) => {
|
|
37722
|
+
for (const issue$1 of error$1.issues) if (issue$1.code === "invalid_union" && issue$1.errors.length) issue$1.errors.map((issues) => processError({ issues }, [...path, ...issue$1.path]));
|
|
37723
|
+
else if (issue$1.code === "invalid_key") processError({ issues: issue$1.issues }, [...path, ...issue$1.path]);
|
|
37724
|
+
else if (issue$1.code === "invalid_element") processError({ issues: issue$1.issues }, [...path, ...issue$1.path]);
|
|
38073
37725
|
else {
|
|
38074
|
-
const fullpath = [...path
|
|
37726
|
+
const fullpath = [...path, ...issue$1.path];
|
|
38075
37727
|
if (fullpath.length === 0) fieldErrors._errors.push(mapper(issue$1));
|
|
38076
37728
|
else {
|
|
38077
37729
|
let curr = fieldErrors;
|
|
@@ -42146,6 +41798,30 @@ var __name = (target$1, value) => __defProp(target$1, "name", {
|
|
|
42146
41798
|
value,
|
|
42147
41799
|
configurable: true
|
|
42148
41800
|
});
|
|
41801
|
+
function isDirectory(path$1) {
|
|
41802
|
+
return fs2.statSync(path$1, { throwIfNoEntry: false })?.isDirectory() ?? false;
|
|
41803
|
+
}
|
|
41804
|
+
__name(isDirectory, "isDirectory");
|
|
41805
|
+
function removeDir(dirPath, { fireAndForget = false } = {}) {
|
|
41806
|
+
const result = fs2.promises.rm(dirPath, {
|
|
41807
|
+
recursive: true,
|
|
41808
|
+
force: true,
|
|
41809
|
+
maxRetries: 5,
|
|
41810
|
+
retryDelay: 100
|
|
41811
|
+
});
|
|
41812
|
+
if (fireAndForget) result.catch(() => {});
|
|
41813
|
+
else return result;
|
|
41814
|
+
}
|
|
41815
|
+
__name(removeDir, "removeDir");
|
|
41816
|
+
function removeDirSync(dirPath) {
|
|
41817
|
+
fs2.rmSync(dirPath, {
|
|
41818
|
+
recursive: true,
|
|
41819
|
+
force: true,
|
|
41820
|
+
maxRetries: 5,
|
|
41821
|
+
retryDelay: 100
|
|
41822
|
+
});
|
|
41823
|
+
}
|
|
41824
|
+
__name(removeDirSync, "removeDirSync");
|
|
42149
41825
|
function partitionExports(exports$2) {
|
|
42150
41826
|
const partitioned = {
|
|
42151
41827
|
"durable-object": {},
|
|
@@ -42908,10 +42584,10 @@ function parseTree(text, errors$1 = [], options = ParseOptions.DEFAULT) {
|
|
|
42908
42584
|
return result;
|
|
42909
42585
|
}
|
|
42910
42586
|
__name(parseTree, "parseTree");
|
|
42911
|
-
function findNodeAtLocation(root, path2) {
|
|
42587
|
+
function findNodeAtLocation(root, path2$1) {
|
|
42912
42588
|
if (!root) return;
|
|
42913
42589
|
let node = root;
|
|
42914
|
-
for (let segment of path2) if (typeof segment === "string") {
|
|
42590
|
+
for (let segment of path2$1) if (typeof segment === "string") {
|
|
42915
42591
|
if (node.type !== "object" || !Array.isArray(node.children)) return;
|
|
42916
42592
|
let found = false;
|
|
42917
42593
|
for (const propertyNode of node.children) if (Array.isArray(propertyNode.children) && propertyNode.children[0].value === segment && propertyNode.children.length === 2) {
|
|
@@ -43138,13 +42814,13 @@ function getNodeType(value) {
|
|
|
43138
42814
|
}
|
|
43139
42815
|
__name(getNodeType, "getNodeType");
|
|
43140
42816
|
function setProperty(text, originalPath, value, options) {
|
|
43141
|
-
const path2 = originalPath.slice();
|
|
42817
|
+
const path2$1 = originalPath.slice();
|
|
43142
42818
|
const root = parseTree(text, []);
|
|
43143
42819
|
let parent = void 0;
|
|
43144
42820
|
let lastSegment = void 0;
|
|
43145
|
-
while (path2.length > 0) {
|
|
43146
|
-
lastSegment = path2.pop();
|
|
43147
|
-
parent = findNodeAtLocation(root, path2);
|
|
42821
|
+
while (path2$1.length > 0) {
|
|
42822
|
+
lastSegment = path2$1.pop();
|
|
42823
|
+
parent = findNodeAtLocation(root, path2$1);
|
|
43148
42824
|
if (parent === void 0 && value !== void 0) if (typeof lastSegment === "string") value = { [lastSegment]: value };
|
|
43149
42825
|
else value = [value];
|
|
43150
42826
|
else break;
|
|
@@ -43386,8 +43062,8 @@ function format2(documentText, range, options) {
|
|
|
43386
43062
|
return format$1(documentText, range, options);
|
|
43387
43063
|
}
|
|
43388
43064
|
__name(format2, "format");
|
|
43389
|
-
function modify(text, path2, value, options) {
|
|
43390
|
-
return setProperty(text, path2, value, options);
|
|
43065
|
+
function modify(text, path2$1, value, options) {
|
|
43066
|
+
return setProperty(text, path2$1, value, options);
|
|
43391
43067
|
}
|
|
43392
43068
|
__name(modify, "modify");
|
|
43393
43069
|
function applyEdits(text, edits) {
|
|
@@ -44495,7 +44171,7 @@ function resolveWranglerConfigPath({ config: config$1, script }, options) {
|
|
|
44495
44171
|
deployConfigPath: void 0,
|
|
44496
44172
|
redirected: false
|
|
44497
44173
|
};
|
|
44498
|
-
return findWranglerConfig$1(script !== void 0 ?
|
|
44174
|
+
return findWranglerConfig$1(script !== void 0 ? path2.dirname(script) : process.cwd(), options);
|
|
44499
44175
|
}
|
|
44500
44176
|
__name(resolveWranglerConfigPath, "resolveWranglerConfigPath");
|
|
44501
44177
|
function findWranglerConfig$1(referencePath = process.cwd(), { useRedirectIfAvailable = false } = {}) {
|
|
@@ -44526,15 +44202,15 @@ function findRedirectedWranglerConfig(cwd, userConfigPath) {
|
|
|
44526
44202
|
const deployConfigFile = readFileSync$1(deployConfigPath);
|
|
44527
44203
|
try {
|
|
44528
44204
|
const deployConfig = parseJSONC(deployConfigFile, deployConfigPath);
|
|
44529
|
-
redirectedConfigPath = deployConfig.configPath &&
|
|
44205
|
+
redirectedConfigPath = deployConfig.configPath && path2.resolve(path2.dirname(deployConfigPath), deployConfig.configPath);
|
|
44530
44206
|
} catch (e) {
|
|
44531
|
-
throw new UserError$1(`Failed to parse the deploy configuration file at ${
|
|
44207
|
+
throw new UserError$1(`Failed to parse the deploy configuration file at ${path2.relative(".", deployConfigPath)}`, {
|
|
44532
44208
|
cause: e,
|
|
44533
44209
|
telemetryMessage: false
|
|
44534
44210
|
});
|
|
44535
44211
|
}
|
|
44536
44212
|
if (!redirectedConfigPath) throw new UserError$1(esm_default`
|
|
44537
|
-
A deploy configuration file was found at "${
|
|
44213
|
+
A deploy configuration file was found at "${path2.relative(".", deployConfigPath)}".
|
|
44538
44214
|
But this is not valid - the required "configPath" property was not found.
|
|
44539
44215
|
Instead this file contains:
|
|
44540
44216
|
\`\`\`
|
|
@@ -44542,13 +44218,13 @@ function findRedirectedWranglerConfig(cwd, userConfigPath) {
|
|
|
44542
44218
|
\`\`\`
|
|
44543
44219
|
`, { telemetryMessage: false });
|
|
44544
44220
|
if (!existsSync(redirectedConfigPath)) throw new UserError$1(esm_default`
|
|
44545
|
-
There is a deploy configuration at "${
|
|
44546
|
-
But the redirected configuration path it points to, "${
|
|
44221
|
+
There is a deploy configuration at "${path2.relative(".", deployConfigPath)}".
|
|
44222
|
+
But the redirected configuration path it points to, "${path2.relative(".", redirectedConfigPath)}", does not exist.
|
|
44547
44223
|
`, { telemetryMessage: false });
|
|
44548
44224
|
if (userConfigPath) {
|
|
44549
|
-
if (
|
|
44550
|
-
Found both a user configuration file at "${
|
|
44551
|
-
and a deploy configuration file at "${
|
|
44225
|
+
if (path2.join(path2.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG) !== deployConfigPath) throw new UserError$1(esm_default`
|
|
44226
|
+
Found both a user configuration file at "${path2.relative(".", userConfigPath)}"
|
|
44227
|
+
and a deploy configuration file at "${path2.relative(".", deployConfigPath)}".
|
|
44552
44228
|
But these do not share the same base path so it is not clear which should be used.
|
|
44553
44229
|
`, { telemetryMessage: false });
|
|
44554
44230
|
}
|
|
@@ -44591,30 +44267,6 @@ function formatConfigSnippet(snippet, configPath, formatted = true) {
|
|
|
44591
44267
|
else return formatted ? JSON.stringify(snippet, null, 2) : JSON.stringify(snippet);
|
|
44592
44268
|
}
|
|
44593
44269
|
__name(formatConfigSnippet, "formatConfigSnippet");
|
|
44594
|
-
function isDirectory(path2) {
|
|
44595
|
-
return fs2.statSync(path2, { throwIfNoEntry: false })?.isDirectory() ?? false;
|
|
44596
|
-
}
|
|
44597
|
-
__name(isDirectory, "isDirectory");
|
|
44598
|
-
function removeDir(dirPath, { fireAndForget = false } = {}) {
|
|
44599
|
-
const result = fs2.promises.rm(dirPath, {
|
|
44600
|
-
recursive: true,
|
|
44601
|
-
force: true,
|
|
44602
|
-
maxRetries: 5,
|
|
44603
|
-
retryDelay: 100
|
|
44604
|
-
});
|
|
44605
|
-
if (fireAndForget) result.catch(() => {});
|
|
44606
|
-
else return result;
|
|
44607
|
-
}
|
|
44608
|
-
__name(removeDir, "removeDir");
|
|
44609
|
-
function removeDirSync(dirPath) {
|
|
44610
|
-
fs2.rmSync(dirPath, {
|
|
44611
|
-
recursive: true,
|
|
44612
|
-
force: true,
|
|
44613
|
-
maxRetries: 5,
|
|
44614
|
-
retryDelay: 100
|
|
44615
|
-
});
|
|
44616
|
-
}
|
|
44617
|
-
__name(removeDirSync, "removeDirSync");
|
|
44618
44270
|
/**
|
|
44619
44271
|
* Initial draft version of the Build Output API.
|
|
44620
44272
|
*
|
|
@@ -51084,15 +50736,15 @@ function hasTrailingSlash(input = "", respectQueryAndFragment) {
|
|
|
51084
50736
|
function withTrailingSlash$1(input = "", respectQueryAndFragment) {
|
|
51085
50737
|
if (!respectQueryAndFragment) return input.endsWith("/") ? input : input + "/";
|
|
51086
50738
|
if (hasTrailingSlash(input, true)) return input || "/";
|
|
51087
|
-
let path
|
|
50739
|
+
let path = input;
|
|
51088
50740
|
let fragment = "";
|
|
51089
50741
|
const fragmentIndex = input.indexOf("#");
|
|
51090
50742
|
if (fragmentIndex >= 0) {
|
|
51091
|
-
path
|
|
50743
|
+
path = input.slice(0, fragmentIndex);
|
|
51092
50744
|
fragment = input.slice(fragmentIndex);
|
|
51093
|
-
if (!path
|
|
50745
|
+
if (!path) return fragment;
|
|
51094
50746
|
}
|
|
51095
|
-
const [s0, ...s] = path
|
|
50747
|
+
const [s0, ...s] = path.split("?");
|
|
51096
50748
|
return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
|
|
51097
50749
|
}
|
|
51098
50750
|
function isNonEmptyURL(url) {
|
|
@@ -51118,8 +50770,8 @@ const isAbsolute$2 = function(p$1) {
|
|
|
51118
50770
|
//#endregion
|
|
51119
50771
|
//#region ../../node_modules/.pnpm/mlly@1.7.4/node_modules/mlly/dist/index.mjs
|
|
51120
50772
|
const BUILTIN_MODULES = new Set(builtinModules);
|
|
51121
|
-
function normalizeSlash(path
|
|
51122
|
-
return path
|
|
50773
|
+
function normalizeSlash(path) {
|
|
50774
|
+
return path.replace(/\\/g, "/");
|
|
51123
50775
|
}
|
|
51124
50776
|
/**
|
|
51125
50777
|
* @typedef ErrnoExceptionFields
|
|
@@ -51239,8 +50891,8 @@ codes.ERR_INVALID_PACKAGE_CONFIG = createError(
|
|
|
51239
50891
|
* @param {string} [base]
|
|
51240
50892
|
* @param {string} [message]
|
|
51241
50893
|
*/
|
|
51242
|
-
(path
|
|
51243
|
-
return `Invalid package config ${path
|
|
50894
|
+
(path, base, message) => {
|
|
50895
|
+
return `Invalid package config ${path}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
|
|
51244
50896
|
},
|
|
51245
50897
|
Error
|
|
51246
50898
|
);
|
|
@@ -51270,8 +50922,8 @@ codes.ERR_MODULE_NOT_FOUND = createError(
|
|
|
51270
50922
|
* @param {string} base
|
|
51271
50923
|
* @param {boolean} [exactUrl]
|
|
51272
50924
|
*/
|
|
51273
|
-
(path
|
|
51274
|
-
return `Cannot find ${exactUrl ? "module" : "package"} '${path
|
|
50925
|
+
(path, base, exactUrl = false) => {
|
|
50926
|
+
return `Cannot find ${exactUrl ? "module" : "package"} '${path}' imported from ${base}`;
|
|
51275
50927
|
},
|
|
51276
50928
|
Error
|
|
51277
50929
|
);
|
|
@@ -51309,8 +50961,8 @@ codes.ERR_UNKNOWN_FILE_EXTENSION = createError(
|
|
|
51309
50961
|
* @param {string} extension
|
|
51310
50962
|
* @param {string} path
|
|
51311
50963
|
*/
|
|
51312
|
-
(extension, path
|
|
51313
|
-
return `Unknown file extension "${extension}" for ${path
|
|
50964
|
+
(extension, path) => {
|
|
50965
|
+
return `Unknown file extension "${extension}" for ${path}`;
|
|
51314
50966
|
},
|
|
51315
50967
|
TypeError
|
|
51316
50968
|
);
|
|
@@ -51467,7 +51119,7 @@ function read(jsonPath, { base, specifier }) {
|
|
|
51467
51119
|
/** @type {string | undefined} */
|
|
51468
51120
|
let string$2;
|
|
51469
51121
|
try {
|
|
51470
|
-
string$2 = fs2.readFileSync(
|
|
51122
|
+
string$2 = fs2.readFileSync(path2.toNamespacedPath(jsonPath), "utf8");
|
|
51471
51123
|
} catch (error) {
|
|
51472
51124
|
const exception = error;
|
|
51473
51125
|
if (exception.code !== "ENOENT") throw exception;
|
|
@@ -51673,15 +51325,15 @@ function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
|
|
|
51673
51325
|
const packagePath = fileURLToPath(new URL$1(".", packageJsonUrl));
|
|
51674
51326
|
const basePath = fileURLToPath(base);
|
|
51675
51327
|
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");
|
|
51676
|
-
else if (
|
|
51328
|
+
else if (path2.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");
|
|
51677
51329
|
}
|
|
51678
51330
|
/**
|
|
51679
51331
|
* @param {string} path
|
|
51680
51332
|
* @returns {Stats | undefined}
|
|
51681
51333
|
*/
|
|
51682
|
-
function tryStatSync(path
|
|
51334
|
+
function tryStatSync(path) {
|
|
51683
51335
|
try {
|
|
51684
|
-
return statSync(path
|
|
51336
|
+
return statSync(path);
|
|
51685
51337
|
} catch {}
|
|
51686
51338
|
}
|
|
51687
51339
|
/**
|
|
@@ -51780,7 +51432,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
|
51780
51432
|
{
|
|
51781
51433
|
const real = realpathSync(filePath);
|
|
51782
51434
|
const { search, hash } = resolved;
|
|
51783
|
-
resolved = pathToFileURL(real + (filePath.endsWith(
|
|
51435
|
+
resolved = pathToFileURL(real + (filePath.endsWith(path2.sep) ? "/" : ""));
|
|
51784
51436
|
resolved.search = search;
|
|
51785
51437
|
resolved.hash = hash;
|
|
51786
51438
|
}
|
|
@@ -52790,9 +52442,9 @@ const ENTRY_MODULE_EXTENSIONS = [
|
|
|
52790
52442
|
*/
|
|
52791
52443
|
function maybeResolveMain(main, configPath, root) {
|
|
52792
52444
|
if (!ENTRY_MODULE_EXTENSIONS.some((extension) => main.endsWith(extension))) return main;
|
|
52793
|
-
const baseDir = configPath ? nodePath.dirname(configPath) : root;
|
|
52794
|
-
if (!baseDir) return main;
|
|
52795
|
-
const resolvedMain = nodePath.resolve(baseDir, main);
|
|
52445
|
+
const baseDir$1 = configPath ? nodePath.dirname(configPath) : root;
|
|
52446
|
+
if (!baseDir$1) return main;
|
|
52447
|
+
const resolvedMain = nodePath.resolve(baseDir$1, main);
|
|
52796
52448
|
if (!fs$1.existsSync(resolvedMain)) throw new Error(`The provided Wrangler config main field (${resolvedMain}) doesn't point to an existing file`);
|
|
52797
52449
|
return resolvedMain;
|
|
52798
52450
|
}
|
|
@@ -54570,9 +54222,9 @@ function constructHeaders({ headers, headersFile, logger }) {
|
|
|
54570
54222
|
|
|
54571
54223
|
//#endregion
|
|
54572
54224
|
//#region ../workers-shared/utils/configuration/validateURL.ts
|
|
54573
|
-
const extractPathname = (path
|
|
54574
|
-
if (!path
|
|
54575
|
-
const url = new URL(`//${path
|
|
54225
|
+
const extractPathname = (path = "/", includeSearch, includeHash) => {
|
|
54226
|
+
if (!path.startsWith("/")) path = `/${path}`;
|
|
54227
|
+
const url = new URL(`//${path}`, "relative://");
|
|
54576
54228
|
return `${url.pathname}${includeSearch ? url.search : ""}${includeHash ? url.hash : ""}`;
|
|
54577
54229
|
};
|
|
54578
54230
|
const URL_REGEX = /^https:\/\/+(?<host>[^/]+)\/?(?<path>.*)/;
|
|
@@ -54631,7 +54283,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
|
|
|
54631
54283
|
lineNumber: i$1 + 1,
|
|
54632
54284
|
message: "No headers specified"
|
|
54633
54285
|
});
|
|
54634
|
-
const [path
|
|
54286
|
+
const [path, pathError] = validateUrl(line, false, true);
|
|
54635
54287
|
if (pathError) {
|
|
54636
54288
|
invalid.push({
|
|
54637
54289
|
line,
|
|
@@ -54642,7 +54294,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
|
|
|
54642
54294
|
skipUntilNextPath = true;
|
|
54643
54295
|
continue;
|
|
54644
54296
|
}
|
|
54645
|
-
const wildcardError = validateNoMultipleWildcards(path
|
|
54297
|
+
const wildcardError = validateNoMultipleWildcards(path);
|
|
54646
54298
|
if (wildcardError) {
|
|
54647
54299
|
invalid.push({
|
|
54648
54300
|
line,
|
|
@@ -54654,7 +54306,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
|
|
|
54654
54306
|
continue;
|
|
54655
54307
|
}
|
|
54656
54308
|
rule = {
|
|
54657
|
-
path
|
|
54309
|
+
path,
|
|
54658
54310
|
line,
|
|
54659
54311
|
headers: {},
|
|
54660
54312
|
unsetHeaders: []
|
|
@@ -54737,11 +54389,11 @@ function isValidRule(rule) {
|
|
|
54737
54389
|
* `:splat` placeholder, would result in duplicate `:splat` parameters which is
|
|
54738
54390
|
* unsupported.
|
|
54739
54391
|
*/
|
|
54740
|
-
function validateNoMultipleWildcards(path
|
|
54741
|
-
const wildcardCount = (path
|
|
54742
|
-
const hasSplatPlaceholder = /:splat(?!\w)/.test(path
|
|
54743
|
-
if (wildcardCount > 1) return `Only one wildcard is allowed per rule. Use a named placeholder (e.g. :project) instead. Skipping ${path
|
|
54744
|
-
if (wildcardCount > 0 && hasSplatPlaceholder) return `Cannot combine a wildcard * with a :splat placeholder because wildcards are converted to :splat at runtime. Skipping ${path
|
|
54392
|
+
function validateNoMultipleWildcards(path) {
|
|
54393
|
+
const wildcardCount = (path.match(SPLAT_REGEX) ?? []).length;
|
|
54394
|
+
const hasSplatPlaceholder = /:splat(?!\w)/.test(path);
|
|
54395
|
+
if (wildcardCount > 1) return `Only one wildcard is allowed per rule. Use a named placeholder (e.g. :project) instead. Skipping ${path}.`;
|
|
54396
|
+
if (wildcardCount > 0 && hasSplatPlaceholder) return `Cannot combine a wildcard * with a :splat placeholder because wildcards are converted to :splat at runtime. Skipping ${path}.`;
|
|
54745
54397
|
}
|
|
54746
54398
|
|
|
54747
54399
|
//#endregion
|
|
@@ -54958,13 +54610,13 @@ var require_ignore = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/ig
|
|
|
54958
54610
|
const throwError = (message, Ctor) => {
|
|
54959
54611
|
throw new Ctor(message);
|
|
54960
54612
|
};
|
|
54961
|
-
const checkPath = (path
|
|
54962
|
-
if (!isString$1(path
|
|
54963
|
-
if (!path
|
|
54964
|
-
if (checkPath.isNotRelative(path
|
|
54613
|
+
const checkPath = (path, originalPath, doThrow) => {
|
|
54614
|
+
if (!isString$1(path)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
|
|
54615
|
+
if (!path) return doThrow(`path must not be empty`, TypeError);
|
|
54616
|
+
if (checkPath.isNotRelative(path)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
|
|
54965
54617
|
return true;
|
|
54966
54618
|
};
|
|
54967
|
-
const isNotRelative = (path
|
|
54619
|
+
const isNotRelative = (path) => REGEX_TEST_INVALID_PATH.test(path);
|
|
54968
54620
|
checkPath.isNotRelative = isNotRelative;
|
|
54969
54621
|
checkPath.convert = (p$1) => p$1;
|
|
54970
54622
|
var Ignore = class {
|
|
@@ -55000,13 +54652,13 @@ var require_ignore = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/ig
|
|
|
55000
54652
|
addPattern(pattern) {
|
|
55001
54653
|
return this.add(pattern);
|
|
55002
54654
|
}
|
|
55003
|
-
_testOne(path
|
|
54655
|
+
_testOne(path, checkUnignored) {
|
|
55004
54656
|
let ignored = false;
|
|
55005
54657
|
let unignored = false;
|
|
55006
54658
|
this._rules.forEach((rule) => {
|
|
55007
54659
|
const { negative } = rule;
|
|
55008
54660
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) return;
|
|
55009
|
-
if (rule.regex.test(path
|
|
54661
|
+
if (rule.regex.test(path)) {
|
|
55010
54662
|
ignored = !negative;
|
|
55011
54663
|
unignored = negative;
|
|
55012
54664
|
}
|
|
@@ -55017,33 +54669,33 @@ var require_ignore = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/ig
|
|
|
55017
54669
|
};
|
|
55018
54670
|
}
|
|
55019
54671
|
_test(originalPath, cache$2, checkUnignored, slices) {
|
|
55020
|
-
const path
|
|
55021
|
-
checkPath(path
|
|
55022
|
-
return this._t(path
|
|
54672
|
+
const path = originalPath && checkPath.convert(originalPath);
|
|
54673
|
+
checkPath(path, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError);
|
|
54674
|
+
return this._t(path, cache$2, checkUnignored, slices);
|
|
55023
54675
|
}
|
|
55024
|
-
_t(path
|
|
55025
|
-
if (path
|
|
55026
|
-
if (!slices) slices = path
|
|
54676
|
+
_t(path, cache$2, checkUnignored, slices) {
|
|
54677
|
+
if (path in cache$2) return cache$2[path];
|
|
54678
|
+
if (!slices) slices = path.split(SLASH);
|
|
55027
54679
|
slices.pop();
|
|
55028
|
-
if (!slices.length) return cache$2[path
|
|
54680
|
+
if (!slices.length) return cache$2[path] = this._testOne(path, checkUnignored);
|
|
55029
54681
|
const parent = this._t(slices.join(SLASH) + SLASH, cache$2, checkUnignored, slices);
|
|
55030
|
-
return cache$2[path
|
|
54682
|
+
return cache$2[path] = parent.ignored ? parent : this._testOne(path, checkUnignored);
|
|
55031
54683
|
}
|
|
55032
|
-
ignores(path
|
|
55033
|
-
return this._test(path
|
|
54684
|
+
ignores(path) {
|
|
54685
|
+
return this._test(path, this._ignoreCache, false).ignored;
|
|
55034
54686
|
}
|
|
55035
54687
|
createFilter() {
|
|
55036
|
-
return (path
|
|
54688
|
+
return (path) => !this.ignores(path);
|
|
55037
54689
|
}
|
|
55038
54690
|
filter(paths) {
|
|
55039
54691
|
return makeArray(paths).filter(this.createFilter());
|
|
55040
54692
|
}
|
|
55041
|
-
test(path
|
|
55042
|
-
return this._test(path
|
|
54693
|
+
test(path) {
|
|
54694
|
+
return this._test(path, this._testCache, true);
|
|
55043
54695
|
}
|
|
55044
54696
|
};
|
|
55045
54697
|
const factory = (options) => new Ignore(options);
|
|
55046
|
-
const isPathValid = (path
|
|
54698
|
+
const isPathValid = (path) => checkPath(path && checkPath.convert(path), path, RETURN_FALSE);
|
|
55047
54699
|
factory.isPathValid = isPathValid;
|
|
55048
54700
|
factory.default = factory;
|
|
55049
54701
|
module.exports = factory;
|
|
@@ -55052,7 +54704,7 @@ var require_ignore = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/ig
|
|
|
55052
54704
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
55053
54705
|
checkPath.convert = makePosix;
|
|
55054
54706
|
const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
55055
|
-
checkPath.isNotRelative = (path
|
|
54707
|
+
checkPath.isNotRelative = (path) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path);
|
|
55056
54708
|
}
|
|
55057
54709
|
}) });
|
|
55058
54710
|
|
|
@@ -56407,11 +56059,11 @@ var Mime = class {
|
|
|
56407
56059
|
}
|
|
56408
56060
|
return this;
|
|
56409
56061
|
}
|
|
56410
|
-
getType(path
|
|
56411
|
-
if (typeof path
|
|
56412
|
-
const last = path
|
|
56062
|
+
getType(path) {
|
|
56063
|
+
if (typeof path !== "string") return null;
|
|
56064
|
+
const last = path.replace(/^.*[/\\]/s, "").toLowerCase();
|
|
56413
56065
|
const ext = last.replace(/^.*\./s, "").toLowerCase();
|
|
56414
|
-
const hasPath = last.length < path
|
|
56066
|
+
const hasPath = last.length < path.length;
|
|
56415
56067
|
if (!(ext.length < last.length - 1) && hasPath) return null;
|
|
56416
56068
|
return __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(ext) ?? null;
|
|
56417
56069
|
}
|
|
@@ -56745,8 +56397,8 @@ function getErrorMap() {
|
|
|
56745
56397
|
//#endregion
|
|
56746
56398
|
//#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
56747
56399
|
const makeIssue = (params) => {
|
|
56748
|
-
const { data: data$1, path
|
|
56749
|
-
const fullPath = [...path
|
|
56400
|
+
const { data: data$1, path, errorMaps, issueData } = params;
|
|
56401
|
+
const fullPath = [...path, ...issueData.path || []];
|
|
56750
56402
|
const fullIssue = {
|
|
56751
56403
|
...issueData,
|
|
56752
56404
|
path: fullPath
|
|
@@ -56858,11 +56510,11 @@ var errorUtil;
|
|
|
56858
56510
|
//#endregion
|
|
56859
56511
|
//#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
|
|
56860
56512
|
var ParseInputLazyPath = class {
|
|
56861
|
-
constructor(parent, value, path
|
|
56513
|
+
constructor(parent, value, path, key) {
|
|
56862
56514
|
this._cachedPath = [];
|
|
56863
56515
|
this.parent = parent;
|
|
56864
56516
|
this.data = value;
|
|
56865
|
-
this._path = path
|
|
56517
|
+
this._path = path;
|
|
56866
56518
|
this._key = key;
|
|
56867
56519
|
}
|
|
56868
56520
|
get path() {
|
|
@@ -60737,11 +60389,11 @@ const getQueryString = (params) => {
|
|
|
60737
60389
|
};
|
|
60738
60390
|
const getUrl = (config$1, options) => {
|
|
60739
60391
|
const encoder$1 = config$1.ENCODE_PATH || encodeURI;
|
|
60740
|
-
const path
|
|
60392
|
+
const path = options.url.replace("{api-version}", config$1.VERSION).replace(/{(.*?)}/g, (substring, group) => {
|
|
60741
60393
|
if (options.path?.hasOwnProperty(group)) return encoder$1(String(options.path[group]));
|
|
60742
60394
|
return substring;
|
|
60743
60395
|
});
|
|
60744
|
-
const url = `${config$1.BASE}${path
|
|
60396
|
+
const url = `${config$1.BASE}${path}`;
|
|
60745
60397
|
if (options.query) return `${url}${getQueryString(options.query)}`;
|
|
60746
60398
|
return url;
|
|
60747
60399
|
};
|
|
@@ -61839,7 +61491,7 @@ function getContainerOptions(options) {
|
|
|
61839
61491
|
return containersConfig.map((container) => {
|
|
61840
61492
|
if (isDockerfile(container.image, configPath)) return {
|
|
61841
61493
|
dockerfile: container.image,
|
|
61842
|
-
image_build_context: container.image_build_context ??
|
|
61494
|
+
image_build_context: container.image_build_context ?? path2.dirname(container.image),
|
|
61843
61495
|
image_vars: container.image_vars,
|
|
61844
61496
|
class_name: container.class_name,
|
|
61845
61497
|
image_tag: getDevContainerImageName(container.class_name, containerBuildId)
|
|
@@ -61855,26 +61507,26 @@ function getContainerOptions(options) {
|
|
|
61855
61507
|
//#endregion
|
|
61856
61508
|
//#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.4/node_modules/fdir/dist/index.mjs
|
|
61857
61509
|
var __require = /* @__PURE__ */ createRequire$1(import.meta.url);
|
|
61858
|
-
function cleanPath(path
|
|
61859
|
-
let normalized = normalize(path
|
|
61510
|
+
function cleanPath(path) {
|
|
61511
|
+
let normalized = normalize(path);
|
|
61860
61512
|
if (normalized.length > 1 && normalized[normalized.length - 1] === sep) normalized = normalized.substring(0, normalized.length - 1);
|
|
61861
61513
|
return normalized;
|
|
61862
61514
|
}
|
|
61863
61515
|
const SLASHES_REGEX = /[\\/]/g;
|
|
61864
|
-
function convertSlashes(path
|
|
61865
|
-
return path
|
|
61516
|
+
function convertSlashes(path, separator) {
|
|
61517
|
+
return path.replace(SLASHES_REGEX, separator);
|
|
61866
61518
|
}
|
|
61867
61519
|
const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
|
|
61868
|
-
function isRootDirectory(path
|
|
61869
|
-
return path
|
|
61520
|
+
function isRootDirectory(path) {
|
|
61521
|
+
return path === "/" || WINDOWS_ROOT_DIR_REGEX.test(path);
|
|
61870
61522
|
}
|
|
61871
|
-
function normalizePath$1(path
|
|
61523
|
+
function normalizePath$1(path, options) {
|
|
61872
61524
|
const { resolvePaths, normalizePath: normalizePath$1$1, pathSeparator } = options;
|
|
61873
|
-
const pathNeedsCleaning = process.platform === "win32" && path
|
|
61874
|
-
if (resolvePaths) path
|
|
61875
|
-
if (normalizePath$1$1 || pathNeedsCleaning) path
|
|
61876
|
-
if (path
|
|
61877
|
-
return convertSlashes(path
|
|
61525
|
+
const pathNeedsCleaning = process.platform === "win32" && path.includes("/") || path.startsWith(".");
|
|
61526
|
+
if (resolvePaths) path = resolve$1(path);
|
|
61527
|
+
if (normalizePath$1$1 || pathNeedsCleaning) path = cleanPath(path);
|
|
61528
|
+
if (path === ".") return "";
|
|
61529
|
+
return convertSlashes(path[path.length - 1] !== pathSeparator ? path + pathSeparator : path, pathSeparator);
|
|
61878
61530
|
}
|
|
61879
61531
|
function joinPathWithBasePath(filename, directoryPath) {
|
|
61880
61532
|
return directoryPath + filename;
|
|
@@ -61910,8 +61562,8 @@ const pushDirectory = (directoryPath, paths) => {
|
|
|
61910
61562
|
paths.push(directoryPath || ".");
|
|
61911
61563
|
};
|
|
61912
61564
|
const pushDirectoryFilter = (directoryPath, paths, filters) => {
|
|
61913
|
-
const path
|
|
61914
|
-
if (filters.every((filter) => filter(path
|
|
61565
|
+
const path = directoryPath || ".";
|
|
61566
|
+
if (filters.every((filter) => filter(path, true))) paths.push(path);
|
|
61915
61567
|
};
|
|
61916
61568
|
const empty$2 = () => {};
|
|
61917
61569
|
function build$6(root, options) {
|
|
@@ -61960,26 +61612,26 @@ const empty = () => {};
|
|
|
61960
61612
|
function build$3(options) {
|
|
61961
61613
|
return options.group ? groupFiles : empty;
|
|
61962
61614
|
}
|
|
61963
|
-
const resolveSymlinksAsync = function(path
|
|
61615
|
+
const resolveSymlinksAsync = function(path, state, callback$1) {
|
|
61964
61616
|
const { queue, fs: fs$2, options: { suppressErrors } } = state;
|
|
61965
61617
|
queue.enqueue();
|
|
61966
|
-
fs$2.realpath(path
|
|
61618
|
+
fs$2.realpath(path, (error, resolvedPath) => {
|
|
61967
61619
|
if (error) return queue.dequeue(suppressErrors ? null : error, state);
|
|
61968
61620
|
fs$2.stat(resolvedPath, (error$1, stat$1) => {
|
|
61969
61621
|
if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
|
|
61970
|
-
if (stat$1.isDirectory() && isRecursive(path
|
|
61622
|
+
if (stat$1.isDirectory() && isRecursive(path, resolvedPath, state)) return queue.dequeue(null, state);
|
|
61971
61623
|
callback$1(stat$1, resolvedPath);
|
|
61972
61624
|
queue.dequeue(null, state);
|
|
61973
61625
|
});
|
|
61974
61626
|
});
|
|
61975
61627
|
};
|
|
61976
|
-
const resolveSymlinks = function(path
|
|
61628
|
+
const resolveSymlinks = function(path, state, callback$1) {
|
|
61977
61629
|
const { queue, fs: fs$2, options: { suppressErrors } } = state;
|
|
61978
61630
|
queue.enqueue();
|
|
61979
61631
|
try {
|
|
61980
|
-
const resolvedPath = fs$2.realpathSync(path
|
|
61632
|
+
const resolvedPath = fs$2.realpathSync(path);
|
|
61981
61633
|
const stat$1 = fs$2.statSync(resolvedPath);
|
|
61982
|
-
if (stat$1.isDirectory() && isRecursive(path
|
|
61634
|
+
if (stat$1.isDirectory() && isRecursive(path, resolvedPath, state)) return;
|
|
61983
61635
|
callback$1(stat$1, resolvedPath);
|
|
61984
61636
|
} catch (e) {
|
|
61985
61637
|
if (!suppressErrors) throw e;
|
|
@@ -61989,16 +61641,16 @@ function build$2(options, isSynchronous) {
|
|
|
61989
61641
|
if (!options.resolveSymlinks || options.excludeSymlinks) return null;
|
|
61990
61642
|
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
|
|
61991
61643
|
}
|
|
61992
|
-
function isRecursive(path
|
|
61644
|
+
function isRecursive(path, resolved, state) {
|
|
61993
61645
|
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
|
|
61994
|
-
let parent = dirname$1(path
|
|
61646
|
+
let parent = dirname$1(path);
|
|
61995
61647
|
let depth$1 = 1;
|
|
61996
61648
|
while (parent !== state.root && depth$1 < 2) {
|
|
61997
61649
|
const resolvedPath = state.symlinks.get(parent);
|
|
61998
61650
|
if (!!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath))) depth$1++;
|
|
61999
61651
|
else parent = dirname$1(parent);
|
|
62000
61652
|
}
|
|
62001
|
-
state.symlinks.set(path
|
|
61653
|
+
state.symlinks.set(path, resolved);
|
|
62002
61654
|
return depth$1 > 1;
|
|
62003
61655
|
}
|
|
62004
61656
|
function isRecursiveUsingRealPaths(resolved, state) {
|
|
@@ -62179,19 +61831,19 @@ var Walker = class {
|
|
|
62179
61831
|
const filename = this.joinPath(entry.name, directoryPath);
|
|
62180
61832
|
this.pushFile(filename, files, this.state.counts, filters);
|
|
62181
61833
|
} else if (entry.isDirectory()) {
|
|
62182
|
-
let path
|
|
62183
|
-
if (exclude && exclude(entry.name, path
|
|
62184
|
-
this.pushDirectory(path
|
|
62185
|
-
this.walkDirectory(this.state, path
|
|
61834
|
+
let path = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
|
|
61835
|
+
if (exclude && exclude(entry.name, path)) continue;
|
|
61836
|
+
this.pushDirectory(path, paths, filters);
|
|
61837
|
+
this.walkDirectory(this.state, path, path, depth$1 - 1, this.walk);
|
|
62186
61838
|
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
|
62187
|
-
let path
|
|
62188
|
-
this.resolveSymlink(path
|
|
61839
|
+
let path = joinPathWithBasePath(entry.name, directoryPath);
|
|
61840
|
+
this.resolveSymlink(path, this.state, (stat$1, resolvedPath) => {
|
|
62189
61841
|
if (stat$1.isDirectory()) {
|
|
62190
61842
|
resolvedPath = normalizePath$1(resolvedPath, this.state.options);
|
|
62191
|
-
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path
|
|
62192
|
-
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path
|
|
61843
|
+
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator)) return;
|
|
61844
|
+
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth$1 - 1, this.walk);
|
|
62193
61845
|
} else {
|
|
62194
|
-
resolvedPath = useRealPaths ? resolvedPath : path
|
|
61846
|
+
resolvedPath = useRealPaths ? resolvedPath : path;
|
|
62195
61847
|
const filename = basename$1(resolvedPath);
|
|
62196
61848
|
const directoryPath$1 = normalizePath$1(dirname$1(resolvedPath), this.state.options);
|
|
62197
61849
|
resolvedPath = this.joinPath(filename, directoryPath$1);
|
|
@@ -62356,7 +62008,7 @@ var Builder = class {
|
|
|
62356
62008
|
isMatch = globFn(patterns, ...options);
|
|
62357
62009
|
this.globCache[patterns.join("\0")] = isMatch;
|
|
62358
62010
|
}
|
|
62359
|
-
this.options.filters.push((path
|
|
62011
|
+
this.options.filters.push((path) => isMatch(path));
|
|
62360
62012
|
return this;
|
|
62361
62013
|
}
|
|
62362
62014
|
};
|
|
@@ -62570,8 +62222,8 @@ var require_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/pic
|
|
|
62570
62222
|
if (state.negated === true) output = `(?:^(?!${output}).*$)`;
|
|
62571
62223
|
return output;
|
|
62572
62224
|
};
|
|
62573
|
-
exports.basename = (path
|
|
62574
|
-
const segs = path
|
|
62225
|
+
exports.basename = (path, { windows } = {}) => {
|
|
62226
|
+
const segs = path.split(windows ? /[\\/]/ : "/");
|
|
62575
62227
|
const last = segs[segs.length - 1];
|
|
62576
62228
|
if (last === "") return segs[segs.length - 2];
|
|
62577
62229
|
return last;
|
|
@@ -64311,15 +63963,15 @@ function buildRelative(cwd, root) {
|
|
|
64311
63963
|
};
|
|
64312
63964
|
}
|
|
64313
63965
|
const splitPatternOptions = { parts: true };
|
|
64314
|
-
function splitPattern(path
|
|
63966
|
+
function splitPattern(path) {
|
|
64315
63967
|
var _result$parts;
|
|
64316
|
-
const result = import_picomatch.default.scan(path
|
|
64317
|
-
return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path
|
|
63968
|
+
const result = import_picomatch.default.scan(path, splitPatternOptions);
|
|
63969
|
+
return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path];
|
|
64318
63970
|
}
|
|
64319
63971
|
const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
|
|
64320
63972
|
const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
|
|
64321
|
-
const escapePosixPath = (path
|
|
64322
|
-
const escapeWin32Path = (path
|
|
63973
|
+
const escapePosixPath = (path) => path.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
63974
|
+
const escapeWin32Path = (path) => path.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
64323
63975
|
/**
|
|
64324
63976
|
* Escapes a path's special characters depending on the platform.
|
|
64325
63977
|
* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
|
|
@@ -64443,13 +64095,13 @@ function buildCrawler(options, patterns) {
|
|
|
64443
64095
|
if (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);
|
|
64444
64096
|
const crawler = new Builder({
|
|
64445
64097
|
filters: [debug$7 ? (p$1, isDirectory$2) => {
|
|
64446
|
-
const path
|
|
64447
|
-
const matches = matcher(path
|
|
64448
|
-
if (matches) log(`matched ${path
|
|
64098
|
+
const path = format$3(p$1, isDirectory$2);
|
|
64099
|
+
const matches = matcher(path) && !ignore$1(path);
|
|
64100
|
+
if (matches) log(`matched ${path}`);
|
|
64449
64101
|
return matches;
|
|
64450
64102
|
} : (p$1, isDirectory$2) => {
|
|
64451
|
-
const path
|
|
64452
|
-
return matcher(path
|
|
64103
|
+
const path = format$3(p$1, isDirectory$2);
|
|
64104
|
+
return matcher(path) && !ignore$1(path);
|
|
64453
64105
|
}],
|
|
64454
64106
|
exclude: debug$7 ? (_, p$1) => {
|
|
64455
64107
|
const skipped = excludePredicate(_, p$1);
|
|
@@ -65594,13 +65246,13 @@ const wslDefaultBrowser = async () => {
|
|
|
65594
65246
|
const { stdout } = await executePowerShell(String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`, { powerShellPath: psPath });
|
|
65595
65247
|
return stdout.trim();
|
|
65596
65248
|
};
|
|
65597
|
-
const convertWslPathToWindows = async (path
|
|
65598
|
-
if (/^[a-z]+:\/\//i.test(path
|
|
65249
|
+
const convertWslPathToWindows = async (path) => {
|
|
65250
|
+
if (/^[a-z]+:\/\//i.test(path)) return path;
|
|
65599
65251
|
try {
|
|
65600
|
-
const { stdout } = await execFile$1("wslpath", ["-aw", path
|
|
65252
|
+
const { stdout } = await execFile$1("wslpath", ["-aw", path], { encoding: "utf8" });
|
|
65601
65253
|
return stdout.trim();
|
|
65602
65254
|
} catch {
|
|
65603
|
-
return path
|
|
65255
|
+
return path;
|
|
65604
65256
|
}
|
|
65605
65257
|
};
|
|
65606
65258
|
|
|
@@ -65786,8 +65438,8 @@ var is_in_ssh_default = isInSsh;
|
|
|
65786
65438
|
//#endregion
|
|
65787
65439
|
//#region ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
|
|
65788
65440
|
const fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
65789
|
-
const __dirname = import.meta.url ?
|
|
65790
|
-
const localXdgOpenPath =
|
|
65441
|
+
const __dirname = import.meta.url ? path2.dirname(fileURLToPath(import.meta.url)) : "";
|
|
65442
|
+
const localXdgOpenPath = path2.join(__dirname, "xdg-open");
|
|
65791
65443
|
const { platform, arch: arch$1 } = process$1;
|
|
65792
65444
|
const tryEachApp = async (apps$1, opener) => {
|
|
65793
65445
|
if (apps$1.length === 0) return;
|