@workflow/world-testing 4.1.30 → 4.1.31
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.
|
@@ -490,10 +490,10 @@ function mergeDefs(...defs) {
|
|
|
490
490
|
function cloneDef(schema) {
|
|
491
491
|
return mergeDefs(schema._zod.def);
|
|
492
492
|
}
|
|
493
|
-
function getElementAtPath(obj,
|
|
494
|
-
if (!
|
|
493
|
+
function getElementAtPath(obj, path13) {
|
|
494
|
+
if (!path13)
|
|
495
495
|
return obj;
|
|
496
|
-
return
|
|
496
|
+
return path13.reduce((acc, key) => acc?.[key], obj);
|
|
497
497
|
}
|
|
498
498
|
function promiseAllObject(promisesObj) {
|
|
499
499
|
const keys = Object.keys(promisesObj);
|
|
@@ -805,11 +805,11 @@ function aborted(x, startIndex = 0) {
|
|
|
805
805
|
}
|
|
806
806
|
return false;
|
|
807
807
|
}
|
|
808
|
-
function prefixIssues(
|
|
808
|
+
function prefixIssues(path13, issues) {
|
|
809
809
|
return issues.map((iss) => {
|
|
810
810
|
var _a3;
|
|
811
811
|
(_a3 = iss).path ?? (_a3.path = []);
|
|
812
|
-
iss.path.unshift(
|
|
812
|
+
iss.path.unshift(path13);
|
|
813
813
|
return iss;
|
|
814
814
|
});
|
|
815
815
|
}
|
|
@@ -1108,7 +1108,7 @@ function formatError(error48, mapper = (issue2) => issue2.message) {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
1110
1110
|
const result = { errors: [] };
|
|
1111
|
-
const processError = /* @__PURE__ */ __name((error49,
|
|
1111
|
+
const processError = /* @__PURE__ */ __name((error49, path13 = []) => {
|
|
1112
1112
|
var _a3, _b;
|
|
1113
1113
|
for (const issue2 of error49.issues) {
|
|
1114
1114
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
@@ -1118,7 +1118,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
1118
1118
|
} else if (issue2.code === "invalid_element") {
|
|
1119
1119
|
processError({ issues: issue2.issues }, issue2.path);
|
|
1120
1120
|
} else {
|
|
1121
|
-
const fullpath = [...
|
|
1121
|
+
const fullpath = [...path13, ...issue2.path];
|
|
1122
1122
|
if (fullpath.length === 0) {
|
|
1123
1123
|
result.errors.push(mapper(issue2));
|
|
1124
1124
|
continue;
|
|
@@ -1150,8 +1150,8 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
function toDotPath(_path) {
|
|
1152
1152
|
const segs = [];
|
|
1153
|
-
const
|
|
1154
|
-
for (const seg of
|
|
1153
|
+
const path13 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
1154
|
+
for (const seg of path13) {
|
|
1155
1155
|
if (typeof seg === "number")
|
|
1156
1156
|
segs.push(`[${seg}]`);
|
|
1157
1157
|
else if (typeof seg === "symbol")
|
|
@@ -14206,13 +14206,13 @@ function resolveRef(ref, ctx) {
|
|
|
14206
14206
|
if (!ref.startsWith("#")) {
|
|
14207
14207
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
14208
14208
|
}
|
|
14209
|
-
const
|
|
14210
|
-
if (
|
|
14209
|
+
const path13 = ref.slice(1).split("/").filter(Boolean);
|
|
14210
|
+
if (path13.length === 0) {
|
|
14211
14211
|
return ctx.rootSchema;
|
|
14212
14212
|
}
|
|
14213
14213
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
14214
|
-
if (
|
|
14215
|
-
const key =
|
|
14214
|
+
if (path13[0] === defsKey) {
|
|
14215
|
+
const key = path13[1];
|
|
14216
14216
|
if (!key || !ctx.defs[key]) {
|
|
14217
14217
|
throw new Error(`Reference not found: ${ref}`);
|
|
14218
14218
|
}
|
|
@@ -19707,14 +19707,14 @@ var require_util = __commonJS({
|
|
|
19707
19707
|
}
|
|
19708
19708
|
const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80;
|
|
19709
19709
|
let origin = url2.origin != null ? url2.origin : `${url2.protocol || ""}//${url2.hostname || ""}:${port}`;
|
|
19710
|
-
let
|
|
19710
|
+
let path13 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`;
|
|
19711
19711
|
if (origin[origin.length - 1] === "/") {
|
|
19712
19712
|
origin = origin.slice(0, origin.length - 1);
|
|
19713
19713
|
}
|
|
19714
|
-
if (
|
|
19715
|
-
|
|
19714
|
+
if (path13 && path13[0] !== "/") {
|
|
19715
|
+
path13 = `/${path13}`;
|
|
19716
19716
|
}
|
|
19717
|
-
return new URL(`${origin}${
|
|
19717
|
+
return new URL(`${origin}${path13}`);
|
|
19718
19718
|
}
|
|
19719
19719
|
if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) {
|
|
19720
19720
|
throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`.");
|
|
@@ -20574,9 +20574,9 @@ var require_diagnostics = __commonJS({
|
|
|
20574
20574
|
"undici:client:sendHeaders",
|
|
20575
20575
|
(evt) => {
|
|
20576
20576
|
const {
|
|
20577
|
-
request: { method, path:
|
|
20577
|
+
request: { method, path: path13, origin }
|
|
20578
20578
|
} = evt;
|
|
20579
|
-
debugLog("sending request to %s %s%s", method, origin,
|
|
20579
|
+
debugLog("sending request to %s %s%s", method, origin, path13);
|
|
20580
20580
|
}
|
|
20581
20581
|
);
|
|
20582
20582
|
}
|
|
@@ -20595,14 +20595,14 @@ var require_diagnostics = __commonJS({
|
|
|
20595
20595
|
"undici:request:headers",
|
|
20596
20596
|
(evt) => {
|
|
20597
20597
|
const {
|
|
20598
|
-
request: { method, path:
|
|
20598
|
+
request: { method, path: path13, origin },
|
|
20599
20599
|
response: { statusCode }
|
|
20600
20600
|
} = evt;
|
|
20601
20601
|
debugLog(
|
|
20602
20602
|
"received response to %s %s%s - HTTP %d",
|
|
20603
20603
|
method,
|
|
20604
20604
|
origin,
|
|
20605
|
-
|
|
20605
|
+
path13,
|
|
20606
20606
|
statusCode
|
|
20607
20607
|
);
|
|
20608
20608
|
}
|
|
@@ -20611,23 +20611,23 @@ var require_diagnostics = __commonJS({
|
|
|
20611
20611
|
"undici:request:trailers",
|
|
20612
20612
|
(evt) => {
|
|
20613
20613
|
const {
|
|
20614
|
-
request: { method, path:
|
|
20614
|
+
request: { method, path: path13, origin }
|
|
20615
20615
|
} = evt;
|
|
20616
|
-
debugLog("trailers received from %s %s%s", method, origin,
|
|
20616
|
+
debugLog("trailers received from %s %s%s", method, origin, path13);
|
|
20617
20617
|
}
|
|
20618
20618
|
);
|
|
20619
20619
|
diagnosticsChannel.subscribe(
|
|
20620
20620
|
"undici:request:error",
|
|
20621
20621
|
(evt) => {
|
|
20622
20622
|
const {
|
|
20623
|
-
request: { method, path:
|
|
20623
|
+
request: { method, path: path13, origin },
|
|
20624
20624
|
error: error48
|
|
20625
20625
|
} = evt;
|
|
20626
20626
|
debugLog(
|
|
20627
20627
|
"request to %s %s%s errored - %s",
|
|
20628
20628
|
method,
|
|
20629
20629
|
origin,
|
|
20630
|
-
|
|
20630
|
+
path13,
|
|
20631
20631
|
error48.message
|
|
20632
20632
|
);
|
|
20633
20633
|
}
|
|
@@ -20748,7 +20748,7 @@ var require_request = __commonJS({
|
|
|
20748
20748
|
__name(this, "Request");
|
|
20749
20749
|
}
|
|
20750
20750
|
constructor(origin, {
|
|
20751
|
-
path:
|
|
20751
|
+
path: path13,
|
|
20752
20752
|
method,
|
|
20753
20753
|
body,
|
|
20754
20754
|
headers,
|
|
@@ -20765,11 +20765,11 @@ var require_request = __commonJS({
|
|
|
20765
20765
|
maxRedirections,
|
|
20766
20766
|
typeOfService
|
|
20767
20767
|
}, handler) {
|
|
20768
|
-
if (typeof
|
|
20768
|
+
if (typeof path13 !== "string") {
|
|
20769
20769
|
throw new InvalidArgumentError("path must be a string");
|
|
20770
|
-
} else if (
|
|
20770
|
+
} else if (path13[0] !== "/" && !(path13.startsWith("http://") || path13.startsWith("https://")) && method !== "CONNECT") {
|
|
20771
20771
|
throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
|
|
20772
|
-
} else if (invalidPathRegex.test(
|
|
20772
|
+
} else if (invalidPathRegex.test(path13)) {
|
|
20773
20773
|
throw new InvalidArgumentError("invalid request path");
|
|
20774
20774
|
}
|
|
20775
20775
|
if (typeof method !== "string") {
|
|
@@ -20844,7 +20844,7 @@ var require_request = __commonJS({
|
|
|
20844
20844
|
this.completed = false;
|
|
20845
20845
|
this.aborted = false;
|
|
20846
20846
|
this.upgrade = upgrade || null;
|
|
20847
|
-
this.path = query ? serializePathWithQuery(
|
|
20847
|
+
this.path = query ? serializePathWithQuery(path13, query) : path13;
|
|
20848
20848
|
this.origin = origin;
|
|
20849
20849
|
this.protocol = getProtocolFromUrlString(origin);
|
|
20850
20850
|
this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
|
|
@@ -26205,7 +26205,7 @@ var require_client_h1 = __commonJS({
|
|
|
26205
26205
|
}
|
|
26206
26206
|
__name(shouldSendContentLength, "shouldSendContentLength");
|
|
26207
26207
|
function writeH1(client, request) {
|
|
26208
|
-
const { method, path:
|
|
26208
|
+
const { method, path: path13, host, upgrade, blocking, reset } = request;
|
|
26209
26209
|
let { body, headers, contentLength: contentLength2 } = request;
|
|
26210
26210
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
|
|
26211
26211
|
if (util.isFormDataLike(body)) {
|
|
@@ -26283,7 +26283,7 @@ var require_client_h1 = __commonJS({
|
|
|
26283
26283
|
if (socket.setTypeOfService) {
|
|
26284
26284
|
socket.setTypeOfService(request.typeOfService);
|
|
26285
26285
|
}
|
|
26286
|
-
let header = `${method} ${
|
|
26286
|
+
let header = `${method} ${path13} HTTP/1.1\r
|
|
26287
26287
|
`;
|
|
26288
26288
|
if (typeof host === "string") {
|
|
26289
26289
|
header += `host: ${host}\r
|
|
@@ -26989,7 +26989,7 @@ var require_client_h2 = __commonJS({
|
|
|
26989
26989
|
const headersTimeout = request.headersTimeout ?? client[kHeadersTimeout];
|
|
26990
26990
|
const bodyTimeout = request.bodyTimeout ?? client[kBodyTimeout];
|
|
26991
26991
|
const session = client[kHTTP2Session];
|
|
26992
|
-
const { method, path:
|
|
26992
|
+
const { method, path: path13, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request;
|
|
26993
26993
|
let { body } = request;
|
|
26994
26994
|
if (upgrade != null && upgrade !== "websocket") {
|
|
26995
26995
|
util.errorRequest(client, request, new InvalidArgumentError(`Custom upgrade "${upgrade}" not supported over HTTP/2`));
|
|
@@ -27058,7 +27058,7 @@ var require_client_h2 = __commonJS({
|
|
|
27058
27058
|
}
|
|
27059
27059
|
headers[HTTP2_HEADER_METHOD] = "CONNECT";
|
|
27060
27060
|
headers[HTTP2_HEADER_PROTOCOL] = "websocket";
|
|
27061
|
-
headers[HTTP2_HEADER_PATH] =
|
|
27061
|
+
headers[HTTP2_HEADER_PATH] = path13;
|
|
27062
27062
|
if (protocol === "ws:" || protocol === "wss:") {
|
|
27063
27063
|
headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https";
|
|
27064
27064
|
} else {
|
|
@@ -27110,7 +27110,7 @@ var require_client_h2 = __commonJS({
|
|
|
27110
27110
|
stream.setTimeout(headersTimeout);
|
|
27111
27111
|
return true;
|
|
27112
27112
|
}
|
|
27113
|
-
headers[HTTP2_HEADER_PATH] =
|
|
27113
|
+
headers[HTTP2_HEADER_PATH] = path13;
|
|
27114
27114
|
headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
|
|
27115
27115
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
|
|
27116
27116
|
if (body && typeof body.read === "function") {
|
|
@@ -29523,10 +29523,10 @@ var require_proxy_agent = __commonJS({
|
|
|
29523
29523
|
};
|
|
29524
29524
|
const {
|
|
29525
29525
|
origin,
|
|
29526
|
-
path:
|
|
29526
|
+
path: path13 = "/",
|
|
29527
29527
|
headers = {}
|
|
29528
29528
|
} = opts;
|
|
29529
|
-
opts.path = origin +
|
|
29529
|
+
opts.path = origin + path13;
|
|
29530
29530
|
if (!("host" in headers) && !("Host" in headers)) {
|
|
29531
29531
|
const { host } = new URL(origin);
|
|
29532
29532
|
headers.host = host;
|
|
@@ -31763,21 +31763,21 @@ var require_mock_utils = __commonJS({
|
|
|
31763
31763
|
return normalizedQp;
|
|
31764
31764
|
}
|
|
31765
31765
|
__name(normalizeSearchParams, "normalizeSearchParams");
|
|
31766
|
-
function safeUrl(
|
|
31767
|
-
if (typeof
|
|
31768
|
-
return
|
|
31766
|
+
function safeUrl(path13) {
|
|
31767
|
+
if (typeof path13 !== "string") {
|
|
31768
|
+
return path13;
|
|
31769
31769
|
}
|
|
31770
|
-
const pathSegments =
|
|
31770
|
+
const pathSegments = path13.split("?", 3);
|
|
31771
31771
|
if (pathSegments.length !== 2) {
|
|
31772
|
-
return
|
|
31772
|
+
return path13;
|
|
31773
31773
|
}
|
|
31774
31774
|
const qp = new URLSearchParams(pathSegments.pop());
|
|
31775
31775
|
qp.sort();
|
|
31776
31776
|
return [...pathSegments, qp.toString()].join("?");
|
|
31777
31777
|
}
|
|
31778
31778
|
__name(safeUrl, "safeUrl");
|
|
31779
|
-
function matchKey(mockDispatch2, { path:
|
|
31780
|
-
const pathMatch = matchValue(mockDispatch2.path,
|
|
31779
|
+
function matchKey(mockDispatch2, { path: path13, method, body, headers }) {
|
|
31780
|
+
const pathMatch = matchValue(mockDispatch2.path, path13);
|
|
31781
31781
|
const methodMatch = matchValue(mockDispatch2.method, method);
|
|
31782
31782
|
const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
|
|
31783
31783
|
const headersMatch = matchHeaders(mockDispatch2, headers);
|
|
@@ -31804,8 +31804,8 @@ var require_mock_utils = __commonJS({
|
|
|
31804
31804
|
const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path;
|
|
31805
31805
|
const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
|
|
31806
31806
|
const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath);
|
|
31807
|
-
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path:
|
|
31808
|
-
return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(
|
|
31807
|
+
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path13, ignoreTrailingSlash }) => {
|
|
31808
|
+
return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path13)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path13), resolvedPath);
|
|
31809
31809
|
});
|
|
31810
31810
|
if (matchedMockDispatches.length === 0) {
|
|
31811
31811
|
throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
|
|
@@ -31847,20 +31847,20 @@ var require_mock_utils = __commonJS({
|
|
|
31847
31847
|
}
|
|
31848
31848
|
}
|
|
31849
31849
|
__name(deleteMockDispatch, "deleteMockDispatch");
|
|
31850
|
-
function removeTrailingSlash(
|
|
31851
|
-
while (
|
|
31852
|
-
|
|
31850
|
+
function removeTrailingSlash(path13) {
|
|
31851
|
+
while (path13.endsWith("/")) {
|
|
31852
|
+
path13 = path13.slice(0, -1);
|
|
31853
31853
|
}
|
|
31854
|
-
if (
|
|
31855
|
-
|
|
31854
|
+
if (path13.length === 0) {
|
|
31855
|
+
path13 = "/";
|
|
31856
31856
|
}
|
|
31857
|
-
return
|
|
31857
|
+
return path13;
|
|
31858
31858
|
}
|
|
31859
31859
|
__name(removeTrailingSlash, "removeTrailingSlash");
|
|
31860
31860
|
function buildKey(opts) {
|
|
31861
|
-
const { path:
|
|
31861
|
+
const { path: path13, method, body, headers, query } = opts;
|
|
31862
31862
|
return {
|
|
31863
|
-
path:
|
|
31863
|
+
path: path13,
|
|
31864
31864
|
method,
|
|
31865
31865
|
body,
|
|
31866
31866
|
headers,
|
|
@@ -32587,10 +32587,10 @@ var require_pending_interceptors_formatter = __commonJS({
|
|
|
32587
32587
|
}
|
|
32588
32588
|
format(pendingInterceptors) {
|
|
32589
32589
|
const withPrettyHeaders = pendingInterceptors.map(
|
|
32590
|
-
({ method, path:
|
|
32590
|
+
({ method, path: path13, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
|
|
32591
32591
|
Method: method,
|
|
32592
32592
|
Origin: origin,
|
|
32593
|
-
Path:
|
|
32593
|
+
Path: path13,
|
|
32594
32594
|
"Status code": statusCode,
|
|
32595
32595
|
Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
|
|
32596
32596
|
Invocations: timesInvoked,
|
|
@@ -32675,9 +32675,9 @@ var require_mock_agent = __commonJS({
|
|
|
32675
32675
|
const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters];
|
|
32676
32676
|
const dispatchOpts = { ...opts };
|
|
32677
32677
|
if (acceptNonStandardSearchParameters && dispatchOpts.path) {
|
|
32678
|
-
const [
|
|
32678
|
+
const [path13, searchParams] = dispatchOpts.path.split("?");
|
|
32679
32679
|
const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters);
|
|
32680
|
-
dispatchOpts.path = `${
|
|
32680
|
+
dispatchOpts.path = `${path13}?${normalizedSearchParams}`;
|
|
32681
32681
|
}
|
|
32682
32682
|
return this[kAgent].dispatch(dispatchOpts, handler);
|
|
32683
32683
|
}
|
|
@@ -33090,12 +33090,12 @@ var require_snapshot_recorder = __commonJS({
|
|
|
33090
33090
|
* @return {Promise<void>} - Resolves when snapshots are loaded
|
|
33091
33091
|
*/
|
|
33092
33092
|
async loadSnapshots(filePath) {
|
|
33093
|
-
const
|
|
33094
|
-
if (!
|
|
33093
|
+
const path13 = filePath || this.#snapshotPath;
|
|
33094
|
+
if (!path13) {
|
|
33095
33095
|
throw new InvalidArgumentError("Snapshot path is required");
|
|
33096
33096
|
}
|
|
33097
33097
|
try {
|
|
33098
|
-
const data = await readFile3(resolve3(
|
|
33098
|
+
const data = await readFile3(resolve3(path13), "utf8");
|
|
33099
33099
|
const parsed = JSON.parse(data);
|
|
33100
33100
|
if (Array.isArray(parsed)) {
|
|
33101
33101
|
this.#snapshots.clear();
|
|
@@ -33109,7 +33109,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
33109
33109
|
if (error48.code === "ENOENT") {
|
|
33110
33110
|
this.#snapshots.clear();
|
|
33111
33111
|
} else {
|
|
33112
|
-
throw new UndiciError(`Failed to load snapshots from ${
|
|
33112
|
+
throw new UndiciError(`Failed to load snapshots from ${path13}`, { cause: error48 });
|
|
33113
33113
|
}
|
|
33114
33114
|
}
|
|
33115
33115
|
}
|
|
@@ -33120,11 +33120,11 @@ var require_snapshot_recorder = __commonJS({
|
|
|
33120
33120
|
* @returns {Promise<void>} - Resolves when snapshots are saved
|
|
33121
33121
|
*/
|
|
33122
33122
|
async saveSnapshots(filePath) {
|
|
33123
|
-
const
|
|
33124
|
-
if (!
|
|
33123
|
+
const path13 = filePath || this.#snapshotPath;
|
|
33124
|
+
if (!path13) {
|
|
33125
33125
|
throw new InvalidArgumentError("Snapshot path is required");
|
|
33126
33126
|
}
|
|
33127
|
-
const resolvedPath = resolve3(
|
|
33127
|
+
const resolvedPath = resolve3(path13);
|
|
33128
33128
|
await mkdir2(dirname2(resolvedPath), { recursive: true });
|
|
33129
33129
|
const data = Array.from(this.#snapshots.entries()).map(([hash2, snapshot]) => ({
|
|
33130
33130
|
hash: hash2,
|
|
@@ -33770,15 +33770,15 @@ var require_redirect_handler = __commonJS({
|
|
|
33770
33770
|
return;
|
|
33771
33771
|
}
|
|
33772
33772
|
const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
|
|
33773
|
-
const
|
|
33774
|
-
const redirectUrlString = `${origin}${
|
|
33773
|
+
const path13 = search ? `${pathname}${search}` : pathname;
|
|
33774
|
+
const redirectUrlString = `${origin}${path13}`;
|
|
33775
33775
|
for (const historyUrl of this.history) {
|
|
33776
33776
|
if (historyUrl.toString() === redirectUrlString) {
|
|
33777
33777
|
throw new InvalidArgumentError(`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.`);
|
|
33778
33778
|
}
|
|
33779
33779
|
}
|
|
33780
33780
|
this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
|
|
33781
|
-
this.opts.path =
|
|
33781
|
+
this.opts.path = path13;
|
|
33782
33782
|
this.opts.origin = origin;
|
|
33783
33783
|
this.opts.query = null;
|
|
33784
33784
|
}
|
|
@@ -35595,10 +35595,10 @@ var require_cache_handler = __commonJS({
|
|
|
35595
35595
|
return locationUrl.pathname + locationUrl.search;
|
|
35596
35596
|
}
|
|
35597
35597
|
__name(getSameOriginPath, "getSameOriginPath");
|
|
35598
|
-
function deleteCachedUri(store, cacheKey,
|
|
35598
|
+
function deleteCachedUri(store, cacheKey, path13) {
|
|
35599
35599
|
deleteCachedValue(store, {
|
|
35600
35600
|
...cacheKey,
|
|
35601
|
-
path:
|
|
35601
|
+
path: path13
|
|
35602
35602
|
});
|
|
35603
35603
|
for (let i = 0; i < util.safeHTTPMethods.length; i++) {
|
|
35604
35604
|
const method = util.safeHTTPMethods[i];
|
|
@@ -35606,7 +35606,7 @@ var require_cache_handler = __commonJS({
|
|
|
35606
35606
|
deleteCachedValue(store, {
|
|
35607
35607
|
...cacheKey,
|
|
35608
35608
|
method,
|
|
35609
|
-
path:
|
|
35609
|
+
path: path13
|
|
35610
35610
|
});
|
|
35611
35611
|
}
|
|
35612
35612
|
}
|
|
@@ -35618,9 +35618,9 @@ var require_cache_handler = __commonJS({
|
|
|
35618
35618
|
}
|
|
35619
35619
|
const values = Array.isArray(headerValue) ? headerValue : [headerValue];
|
|
35620
35620
|
for (let i = 0; i < values.length; i++) {
|
|
35621
|
-
const
|
|
35622
|
-
if (
|
|
35623
|
-
deleteCachedUri(store, cacheKey,
|
|
35621
|
+
const path13 = getSameOriginPath(cacheKey, values[i]);
|
|
35622
|
+
if (path13 !== void 0) {
|
|
35623
|
+
deleteCachedUri(store, cacheKey, path13);
|
|
35624
35624
|
}
|
|
35625
35625
|
}
|
|
35626
35626
|
}
|
|
@@ -40872,11 +40872,11 @@ var require_fetch = __commonJS({
|
|
|
40872
40872
|
function dispatch({ body }) {
|
|
40873
40873
|
const url2 = requestCurrentURL(request);
|
|
40874
40874
|
const agent = fetchParams.controller.dispatcher;
|
|
40875
|
-
const
|
|
40875
|
+
const path13 = url2.pathname + url2.search;
|
|
40876
40876
|
const hasTrailingQuestionMark = url2.search.length === 0 && url2.href[url2.href.length - url2.hash.length - 1] === "?";
|
|
40877
40877
|
return new Promise((resolve3, reject) => agent.dispatch(
|
|
40878
40878
|
{
|
|
40879
|
-
path: hasTrailingQuestionMark ? `${
|
|
40879
|
+
path: hasTrailingQuestionMark ? `${path13}?` : path13,
|
|
40880
40880
|
origin: url2.origin,
|
|
40881
40881
|
method: request.method,
|
|
40882
40882
|
body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body,
|
|
@@ -41836,9 +41836,9 @@ var require_util4 = __commonJS({
|
|
|
41836
41836
|
}
|
|
41837
41837
|
}
|
|
41838
41838
|
__name(validateCookieValue, "validateCookieValue");
|
|
41839
|
-
function validateCookiePath(
|
|
41840
|
-
for (let i = 0; i <
|
|
41841
|
-
const code =
|
|
41839
|
+
function validateCookiePath(path13) {
|
|
41840
|
+
for (let i = 0; i < path13.length; ++i) {
|
|
41841
|
+
const code = path13.charCodeAt(i);
|
|
41842
41842
|
if (code < 32 || // exclude CTLs (0-31)
|
|
41843
41843
|
code > 126 || // exclude DEL and non-ascii
|
|
41844
41844
|
code === 59) {
|
|
@@ -45275,11 +45275,11 @@ var require_undici = __commonJS({
|
|
|
45275
45275
|
if (typeof opts.path !== "string") {
|
|
45276
45276
|
throw new InvalidArgumentError("invalid opts.path");
|
|
45277
45277
|
}
|
|
45278
|
-
let
|
|
45278
|
+
let path13 = opts.path;
|
|
45279
45279
|
if (!opts.path.startsWith("/")) {
|
|
45280
|
-
|
|
45280
|
+
path13 = `/${path13}`;
|
|
45281
45281
|
}
|
|
45282
|
-
url2 = new URL(util.parseOrigin(url2).origin +
|
|
45282
|
+
url2 = new URL(util.parseOrigin(url2).origin + path13);
|
|
45283
45283
|
} else {
|
|
45284
45284
|
if (!opts) {
|
|
45285
45285
|
opts = typeof url2 === "object" ? url2 : {};
|
|
@@ -45417,54 +45417,54 @@ var require_polyfills = __commonJS({
|
|
|
45417
45417
|
}
|
|
45418
45418
|
var chdir;
|
|
45419
45419
|
module2.exports = patch;
|
|
45420
|
-
function patch(
|
|
45420
|
+
function patch(fs7) {
|
|
45421
45421
|
if (constants2.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
45422
|
-
patchLchmod(
|
|
45423
|
-
}
|
|
45424
|
-
if (!
|
|
45425
|
-
patchLutimes(
|
|
45426
|
-
}
|
|
45427
|
-
|
|
45428
|
-
|
|
45429
|
-
|
|
45430
|
-
|
|
45431
|
-
|
|
45432
|
-
|
|
45433
|
-
|
|
45434
|
-
|
|
45435
|
-
|
|
45436
|
-
|
|
45437
|
-
|
|
45438
|
-
|
|
45439
|
-
|
|
45440
|
-
|
|
45441
|
-
|
|
45442
|
-
|
|
45443
|
-
|
|
45444
|
-
|
|
45445
|
-
if (
|
|
45446
|
-
|
|
45422
|
+
patchLchmod(fs7);
|
|
45423
|
+
}
|
|
45424
|
+
if (!fs7.lutimes) {
|
|
45425
|
+
patchLutimes(fs7);
|
|
45426
|
+
}
|
|
45427
|
+
fs7.chown = chownFix(fs7.chown);
|
|
45428
|
+
fs7.fchown = chownFix(fs7.fchown);
|
|
45429
|
+
fs7.lchown = chownFix(fs7.lchown);
|
|
45430
|
+
fs7.chmod = chmodFix(fs7.chmod);
|
|
45431
|
+
fs7.fchmod = chmodFix(fs7.fchmod);
|
|
45432
|
+
fs7.lchmod = chmodFix(fs7.lchmod);
|
|
45433
|
+
fs7.chownSync = chownFixSync(fs7.chownSync);
|
|
45434
|
+
fs7.fchownSync = chownFixSync(fs7.fchownSync);
|
|
45435
|
+
fs7.lchownSync = chownFixSync(fs7.lchownSync);
|
|
45436
|
+
fs7.chmodSync = chmodFixSync(fs7.chmodSync);
|
|
45437
|
+
fs7.fchmodSync = chmodFixSync(fs7.fchmodSync);
|
|
45438
|
+
fs7.lchmodSync = chmodFixSync(fs7.lchmodSync);
|
|
45439
|
+
fs7.stat = statFix(fs7.stat);
|
|
45440
|
+
fs7.fstat = statFix(fs7.fstat);
|
|
45441
|
+
fs7.lstat = statFix(fs7.lstat);
|
|
45442
|
+
fs7.statSync = statFixSync(fs7.statSync);
|
|
45443
|
+
fs7.fstatSync = statFixSync(fs7.fstatSync);
|
|
45444
|
+
fs7.lstatSync = statFixSync(fs7.lstatSync);
|
|
45445
|
+
if (fs7.chmod && !fs7.lchmod) {
|
|
45446
|
+
fs7.lchmod = function(path13, mode, cb) {
|
|
45447
45447
|
if (cb) process.nextTick(cb);
|
|
45448
45448
|
};
|
|
45449
|
-
|
|
45449
|
+
fs7.lchmodSync = function() {
|
|
45450
45450
|
};
|
|
45451
45451
|
}
|
|
45452
|
-
if (
|
|
45453
|
-
|
|
45452
|
+
if (fs7.chown && !fs7.lchown) {
|
|
45453
|
+
fs7.lchown = function(path13, uid, gid, cb) {
|
|
45454
45454
|
if (cb) process.nextTick(cb);
|
|
45455
45455
|
};
|
|
45456
|
-
|
|
45456
|
+
fs7.lchownSync = function() {
|
|
45457
45457
|
};
|
|
45458
45458
|
}
|
|
45459
45459
|
if (platform === "win32") {
|
|
45460
|
-
|
|
45460
|
+
fs7.rename = typeof fs7.rename !== "function" ? fs7.rename : (function(fs$rename) {
|
|
45461
45461
|
function rename(from, to, cb) {
|
|
45462
45462
|
var start2 = Date.now();
|
|
45463
45463
|
var backoff = 0;
|
|
45464
45464
|
fs$rename(from, to, /* @__PURE__ */ __name(function CB(er) {
|
|
45465
45465
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start2 < 6e4) {
|
|
45466
45466
|
setTimeout(function() {
|
|
45467
|
-
|
|
45467
|
+
fs7.stat(to, function(stater, st) {
|
|
45468
45468
|
if (stater && stater.code === "ENOENT")
|
|
45469
45469
|
fs$rename(from, to, CB);
|
|
45470
45470
|
else
|
|
@@ -45481,9 +45481,9 @@ var require_polyfills = __commonJS({
|
|
|
45481
45481
|
__name(rename, "rename");
|
|
45482
45482
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
45483
45483
|
return rename;
|
|
45484
|
-
})(
|
|
45484
|
+
})(fs7.rename);
|
|
45485
45485
|
}
|
|
45486
|
-
|
|
45486
|
+
fs7.read = typeof fs7.read !== "function" ? fs7.read : (function(fs$read) {
|
|
45487
45487
|
function read2(fd, buffer2, offset, length, position3, callback_) {
|
|
45488
45488
|
var callback;
|
|
45489
45489
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -45491,23 +45491,23 @@ var require_polyfills = __commonJS({
|
|
|
45491
45491
|
callback = /* @__PURE__ */ __name(function(er, _, __) {
|
|
45492
45492
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
45493
45493
|
eagCounter++;
|
|
45494
|
-
return fs$read.call(
|
|
45494
|
+
return fs$read.call(fs7, fd, buffer2, offset, length, position3, callback);
|
|
45495
45495
|
}
|
|
45496
45496
|
callback_.apply(this, arguments);
|
|
45497
45497
|
}, "callback");
|
|
45498
45498
|
}
|
|
45499
|
-
return fs$read.call(
|
|
45499
|
+
return fs$read.call(fs7, fd, buffer2, offset, length, position3, callback);
|
|
45500
45500
|
}
|
|
45501
45501
|
__name(read2, "read");
|
|
45502
45502
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read2, fs$read);
|
|
45503
45503
|
return read2;
|
|
45504
|
-
})(
|
|
45505
|
-
|
|
45504
|
+
})(fs7.read);
|
|
45505
|
+
fs7.readSync = typeof fs7.readSync !== "function" ? fs7.readSync : /* @__PURE__ */ (function(fs$readSync) {
|
|
45506
45506
|
return function(fd, buffer2, offset, length, position3) {
|
|
45507
45507
|
var eagCounter = 0;
|
|
45508
45508
|
while (true) {
|
|
45509
45509
|
try {
|
|
45510
|
-
return fs$readSync.call(
|
|
45510
|
+
return fs$readSync.call(fs7, fd, buffer2, offset, length, position3);
|
|
45511
45511
|
} catch (er) {
|
|
45512
45512
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
45513
45513
|
eagCounter++;
|
|
@@ -45517,11 +45517,11 @@ var require_polyfills = __commonJS({
|
|
|
45517
45517
|
}
|
|
45518
45518
|
}
|
|
45519
45519
|
};
|
|
45520
|
-
})(
|
|
45521
|
-
function patchLchmod(
|
|
45522
|
-
|
|
45523
|
-
|
|
45524
|
-
|
|
45520
|
+
})(fs7.readSync);
|
|
45521
|
+
function patchLchmod(fs8) {
|
|
45522
|
+
fs8.lchmod = function(path13, mode, callback) {
|
|
45523
|
+
fs8.open(
|
|
45524
|
+
path13,
|
|
45525
45525
|
constants2.O_WRONLY | constants2.O_SYMLINK,
|
|
45526
45526
|
mode,
|
|
45527
45527
|
function(err, fd) {
|
|
@@ -45529,74 +45529,74 @@ var require_polyfills = __commonJS({
|
|
|
45529
45529
|
if (callback) callback(err);
|
|
45530
45530
|
return;
|
|
45531
45531
|
}
|
|
45532
|
-
|
|
45533
|
-
|
|
45532
|
+
fs8.fchmod(fd, mode, function(err2) {
|
|
45533
|
+
fs8.close(fd, function(err22) {
|
|
45534
45534
|
if (callback) callback(err2 || err22);
|
|
45535
45535
|
});
|
|
45536
45536
|
});
|
|
45537
45537
|
}
|
|
45538
45538
|
);
|
|
45539
45539
|
};
|
|
45540
|
-
|
|
45541
|
-
var fd =
|
|
45540
|
+
fs8.lchmodSync = function(path13, mode) {
|
|
45541
|
+
var fd = fs8.openSync(path13, constants2.O_WRONLY | constants2.O_SYMLINK, mode);
|
|
45542
45542
|
var threw = true;
|
|
45543
45543
|
var ret;
|
|
45544
45544
|
try {
|
|
45545
|
-
ret =
|
|
45545
|
+
ret = fs8.fchmodSync(fd, mode);
|
|
45546
45546
|
threw = false;
|
|
45547
45547
|
} finally {
|
|
45548
45548
|
if (threw) {
|
|
45549
45549
|
try {
|
|
45550
|
-
|
|
45550
|
+
fs8.closeSync(fd);
|
|
45551
45551
|
} catch (er) {
|
|
45552
45552
|
}
|
|
45553
45553
|
} else {
|
|
45554
|
-
|
|
45554
|
+
fs8.closeSync(fd);
|
|
45555
45555
|
}
|
|
45556
45556
|
}
|
|
45557
45557
|
return ret;
|
|
45558
45558
|
};
|
|
45559
45559
|
}
|
|
45560
45560
|
__name(patchLchmod, "patchLchmod");
|
|
45561
|
-
function patchLutimes(
|
|
45562
|
-
if (constants2.hasOwnProperty("O_SYMLINK") &&
|
|
45563
|
-
|
|
45564
|
-
|
|
45561
|
+
function patchLutimes(fs8) {
|
|
45562
|
+
if (constants2.hasOwnProperty("O_SYMLINK") && fs8.futimes) {
|
|
45563
|
+
fs8.lutimes = function(path13, at, mt, cb) {
|
|
45564
|
+
fs8.open(path13, constants2.O_SYMLINK, function(er, fd) {
|
|
45565
45565
|
if (er) {
|
|
45566
45566
|
if (cb) cb(er);
|
|
45567
45567
|
return;
|
|
45568
45568
|
}
|
|
45569
|
-
|
|
45570
|
-
|
|
45569
|
+
fs8.futimes(fd, at, mt, function(er2) {
|
|
45570
|
+
fs8.close(fd, function(er22) {
|
|
45571
45571
|
if (cb) cb(er2 || er22);
|
|
45572
45572
|
});
|
|
45573
45573
|
});
|
|
45574
45574
|
});
|
|
45575
45575
|
};
|
|
45576
|
-
|
|
45577
|
-
var fd =
|
|
45576
|
+
fs8.lutimesSync = function(path13, at, mt) {
|
|
45577
|
+
var fd = fs8.openSync(path13, constants2.O_SYMLINK);
|
|
45578
45578
|
var ret;
|
|
45579
45579
|
var threw = true;
|
|
45580
45580
|
try {
|
|
45581
|
-
ret =
|
|
45581
|
+
ret = fs8.futimesSync(fd, at, mt);
|
|
45582
45582
|
threw = false;
|
|
45583
45583
|
} finally {
|
|
45584
45584
|
if (threw) {
|
|
45585
45585
|
try {
|
|
45586
|
-
|
|
45586
|
+
fs8.closeSync(fd);
|
|
45587
45587
|
} catch (er) {
|
|
45588
45588
|
}
|
|
45589
45589
|
} else {
|
|
45590
|
-
|
|
45590
|
+
fs8.closeSync(fd);
|
|
45591
45591
|
}
|
|
45592
45592
|
}
|
|
45593
45593
|
return ret;
|
|
45594
45594
|
};
|
|
45595
|
-
} else if (
|
|
45596
|
-
|
|
45595
|
+
} else if (fs8.futimes) {
|
|
45596
|
+
fs8.lutimes = function(_a3, _b, _c, cb) {
|
|
45597
45597
|
if (cb) process.nextTick(cb);
|
|
45598
45598
|
};
|
|
45599
|
-
|
|
45599
|
+
fs8.lutimesSync = function() {
|
|
45600
45600
|
};
|
|
45601
45601
|
}
|
|
45602
45602
|
}
|
|
@@ -45604,7 +45604,7 @@ var require_polyfills = __commonJS({
|
|
|
45604
45604
|
function chmodFix(orig) {
|
|
45605
45605
|
if (!orig) return orig;
|
|
45606
45606
|
return function(target2, mode, cb) {
|
|
45607
|
-
return orig.call(
|
|
45607
|
+
return orig.call(fs7, target2, mode, function(er) {
|
|
45608
45608
|
if (chownErOk(er)) er = null;
|
|
45609
45609
|
if (cb) cb.apply(this, arguments);
|
|
45610
45610
|
});
|
|
@@ -45615,7 +45615,7 @@ var require_polyfills = __commonJS({
|
|
|
45615
45615
|
if (!orig) return orig;
|
|
45616
45616
|
return function(target2, mode) {
|
|
45617
45617
|
try {
|
|
45618
|
-
return orig.call(
|
|
45618
|
+
return orig.call(fs7, target2, mode);
|
|
45619
45619
|
} catch (er) {
|
|
45620
45620
|
if (!chownErOk(er)) throw er;
|
|
45621
45621
|
}
|
|
@@ -45625,7 +45625,7 @@ var require_polyfills = __commonJS({
|
|
|
45625
45625
|
function chownFix(orig) {
|
|
45626
45626
|
if (!orig) return orig;
|
|
45627
45627
|
return function(target2, uid, gid, cb) {
|
|
45628
|
-
return orig.call(
|
|
45628
|
+
return orig.call(fs7, target2, uid, gid, function(er) {
|
|
45629
45629
|
if (chownErOk(er)) er = null;
|
|
45630
45630
|
if (cb) cb.apply(this, arguments);
|
|
45631
45631
|
});
|
|
@@ -45636,7 +45636,7 @@ var require_polyfills = __commonJS({
|
|
|
45636
45636
|
if (!orig) return orig;
|
|
45637
45637
|
return function(target2, uid, gid) {
|
|
45638
45638
|
try {
|
|
45639
|
-
return orig.call(
|
|
45639
|
+
return orig.call(fs7, target2, uid, gid);
|
|
45640
45640
|
} catch (er) {
|
|
45641
45641
|
if (!chownErOk(er)) throw er;
|
|
45642
45642
|
}
|
|
@@ -45658,14 +45658,14 @@ var require_polyfills = __commonJS({
|
|
|
45658
45658
|
if (cb) cb.apply(this, arguments);
|
|
45659
45659
|
}
|
|
45660
45660
|
__name(callback, "callback");
|
|
45661
|
-
return options ? orig.call(
|
|
45661
|
+
return options ? orig.call(fs7, target2, options, callback) : orig.call(fs7, target2, callback);
|
|
45662
45662
|
};
|
|
45663
45663
|
}
|
|
45664
45664
|
__name(statFix, "statFix");
|
|
45665
45665
|
function statFixSync(orig) {
|
|
45666
45666
|
if (!orig) return orig;
|
|
45667
45667
|
return function(target2, options) {
|
|
45668
|
-
var stats = options ? orig.call(
|
|
45668
|
+
var stats = options ? orig.call(fs7, target2, options) : orig.call(fs7, target2);
|
|
45669
45669
|
if (stats) {
|
|
45670
45670
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
45671
45671
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -45697,16 +45697,16 @@ var require_legacy_streams = __commonJS({
|
|
|
45697
45697
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
45698
45698
|
var Stream = require("stream").Stream;
|
|
45699
45699
|
module2.exports = legacy;
|
|
45700
|
-
function legacy(
|
|
45700
|
+
function legacy(fs7) {
|
|
45701
45701
|
return {
|
|
45702
45702
|
ReadStream,
|
|
45703
45703
|
WriteStream
|
|
45704
45704
|
};
|
|
45705
|
-
function ReadStream(
|
|
45706
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
45705
|
+
function ReadStream(path13, options) {
|
|
45706
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path13, options);
|
|
45707
45707
|
Stream.call(this);
|
|
45708
45708
|
var self2 = this;
|
|
45709
|
-
this.path =
|
|
45709
|
+
this.path = path13;
|
|
45710
45710
|
this.fd = null;
|
|
45711
45711
|
this.readable = true;
|
|
45712
45712
|
this.paused = false;
|
|
@@ -45740,7 +45740,7 @@ var require_legacy_streams = __commonJS({
|
|
|
45740
45740
|
});
|
|
45741
45741
|
return;
|
|
45742
45742
|
}
|
|
45743
|
-
|
|
45743
|
+
fs7.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
45744
45744
|
if (err) {
|
|
45745
45745
|
self2.emit("error", err);
|
|
45746
45746
|
self2.readable = false;
|
|
@@ -45752,10 +45752,10 @@ var require_legacy_streams = __commonJS({
|
|
|
45752
45752
|
});
|
|
45753
45753
|
}
|
|
45754
45754
|
__name(ReadStream, "ReadStream");
|
|
45755
|
-
function WriteStream(
|
|
45756
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
45755
|
+
function WriteStream(path13, options) {
|
|
45756
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path13, options);
|
|
45757
45757
|
Stream.call(this);
|
|
45758
|
-
this.path =
|
|
45758
|
+
this.path = path13;
|
|
45759
45759
|
this.fd = null;
|
|
45760
45760
|
this.writable = true;
|
|
45761
45761
|
this.flags = "w";
|
|
@@ -45780,7 +45780,7 @@ var require_legacy_streams = __commonJS({
|
|
|
45780
45780
|
this.busy = false;
|
|
45781
45781
|
this._queue = [];
|
|
45782
45782
|
if (this.fd === null) {
|
|
45783
|
-
this._open =
|
|
45783
|
+
this._open = fs7.open;
|
|
45784
45784
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
45785
45785
|
this.flush();
|
|
45786
45786
|
}
|
|
@@ -45818,7 +45818,7 @@ var require_clone = __commonJS({
|
|
|
45818
45818
|
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
|
|
45819
45819
|
var require_graceful_fs = __commonJS({
|
|
45820
45820
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
45821
|
-
var
|
|
45821
|
+
var fs7 = require("fs");
|
|
45822
45822
|
var polyfills = require_polyfills();
|
|
45823
45823
|
var legacy = require_legacy_streams();
|
|
45824
45824
|
var clone2 = require_clone();
|
|
@@ -45852,12 +45852,12 @@ var require_graceful_fs = __commonJS({
|
|
|
45852
45852
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
45853
45853
|
console.error(m);
|
|
45854
45854
|
}, "debug");
|
|
45855
|
-
if (!
|
|
45855
|
+
if (!fs7[gracefulQueue]) {
|
|
45856
45856
|
queue = global[gracefulQueue] || [];
|
|
45857
|
-
publishQueue(
|
|
45858
|
-
|
|
45857
|
+
publishQueue(fs7, queue);
|
|
45858
|
+
fs7.close = (function(fs$close) {
|
|
45859
45859
|
function close(fd, cb) {
|
|
45860
|
-
return fs$close.call(
|
|
45860
|
+
return fs$close.call(fs7, fd, function(err) {
|
|
45861
45861
|
if (!err) {
|
|
45862
45862
|
resetQueue();
|
|
45863
45863
|
}
|
|
@@ -45870,10 +45870,10 @@ var require_graceful_fs = __commonJS({
|
|
|
45870
45870
|
value: fs$close
|
|
45871
45871
|
});
|
|
45872
45872
|
return close;
|
|
45873
|
-
})(
|
|
45874
|
-
|
|
45873
|
+
})(fs7.close);
|
|
45874
|
+
fs7.closeSync = (function(fs$closeSync) {
|
|
45875
45875
|
function closeSync(fd) {
|
|
45876
|
-
fs$closeSync.apply(
|
|
45876
|
+
fs$closeSync.apply(fs7, arguments);
|
|
45877
45877
|
resetQueue();
|
|
45878
45878
|
}
|
|
45879
45879
|
__name(closeSync, "closeSync");
|
|
@@ -45881,38 +45881,38 @@ var require_graceful_fs = __commonJS({
|
|
|
45881
45881
|
value: fs$closeSync
|
|
45882
45882
|
});
|
|
45883
45883
|
return closeSync;
|
|
45884
|
-
})(
|
|
45884
|
+
})(fs7.closeSync);
|
|
45885
45885
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
45886
45886
|
process.on("exit", function() {
|
|
45887
|
-
debug2(
|
|
45888
|
-
require("assert").equal(
|
|
45887
|
+
debug2(fs7[gracefulQueue]);
|
|
45888
|
+
require("assert").equal(fs7[gracefulQueue].length, 0);
|
|
45889
45889
|
});
|
|
45890
45890
|
}
|
|
45891
45891
|
}
|
|
45892
45892
|
var queue;
|
|
45893
45893
|
if (!global[gracefulQueue]) {
|
|
45894
|
-
publishQueue(global,
|
|
45895
|
-
}
|
|
45896
|
-
module2.exports = patch(clone2(
|
|
45897
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
45898
|
-
module2.exports = patch(
|
|
45899
|
-
|
|
45900
|
-
}
|
|
45901
|
-
function patch(
|
|
45902
|
-
polyfills(
|
|
45903
|
-
|
|
45904
|
-
|
|
45905
|
-
|
|
45906
|
-
var fs$readFile =
|
|
45907
|
-
|
|
45908
|
-
function readFile3(
|
|
45894
|
+
publishQueue(global, fs7[gracefulQueue]);
|
|
45895
|
+
}
|
|
45896
|
+
module2.exports = patch(clone2(fs7));
|
|
45897
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs7.__patched) {
|
|
45898
|
+
module2.exports = patch(fs7);
|
|
45899
|
+
fs7.__patched = true;
|
|
45900
|
+
}
|
|
45901
|
+
function patch(fs8) {
|
|
45902
|
+
polyfills(fs8);
|
|
45903
|
+
fs8.gracefulify = patch;
|
|
45904
|
+
fs8.createReadStream = createReadStream;
|
|
45905
|
+
fs8.createWriteStream = createWriteStream;
|
|
45906
|
+
var fs$readFile = fs8.readFile;
|
|
45907
|
+
fs8.readFile = readFile3;
|
|
45908
|
+
function readFile3(path13, options, cb) {
|
|
45909
45909
|
if (typeof options === "function")
|
|
45910
45910
|
cb = options, options = null;
|
|
45911
|
-
return go$readFile(
|
|
45912
|
-
function go$readFile(
|
|
45913
|
-
return fs$readFile(
|
|
45911
|
+
return go$readFile(path13, options, cb);
|
|
45912
|
+
function go$readFile(path14, options2, cb2, startTime) {
|
|
45913
|
+
return fs$readFile(path14, options2, function(err) {
|
|
45914
45914
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
45915
|
-
enqueue([go$readFile, [
|
|
45915
|
+
enqueue([go$readFile, [path14, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
45916
45916
|
else {
|
|
45917
45917
|
if (typeof cb2 === "function")
|
|
45918
45918
|
cb2.apply(this, arguments);
|
|
@@ -45922,16 +45922,16 @@ var require_graceful_fs = __commonJS({
|
|
|
45922
45922
|
__name(go$readFile, "go$readFile");
|
|
45923
45923
|
}
|
|
45924
45924
|
__name(readFile3, "readFile");
|
|
45925
|
-
var fs$writeFile =
|
|
45926
|
-
|
|
45927
|
-
function writeFile2(
|
|
45925
|
+
var fs$writeFile = fs8.writeFile;
|
|
45926
|
+
fs8.writeFile = writeFile2;
|
|
45927
|
+
function writeFile2(path13, data, options, cb) {
|
|
45928
45928
|
if (typeof options === "function")
|
|
45929
45929
|
cb = options, options = null;
|
|
45930
|
-
return go$writeFile(
|
|
45931
|
-
function go$writeFile(
|
|
45932
|
-
return fs$writeFile(
|
|
45930
|
+
return go$writeFile(path13, data, options, cb);
|
|
45931
|
+
function go$writeFile(path14, data2, options2, cb2, startTime) {
|
|
45932
|
+
return fs$writeFile(path14, data2, options2, function(err) {
|
|
45933
45933
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
45934
|
-
enqueue([go$writeFile, [
|
|
45934
|
+
enqueue([go$writeFile, [path14, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
45935
45935
|
else {
|
|
45936
45936
|
if (typeof cb2 === "function")
|
|
45937
45937
|
cb2.apply(this, arguments);
|
|
@@ -45941,17 +45941,17 @@ var require_graceful_fs = __commonJS({
|
|
|
45941
45941
|
__name(go$writeFile, "go$writeFile");
|
|
45942
45942
|
}
|
|
45943
45943
|
__name(writeFile2, "writeFile");
|
|
45944
|
-
var fs$appendFile =
|
|
45944
|
+
var fs$appendFile = fs8.appendFile;
|
|
45945
45945
|
if (fs$appendFile)
|
|
45946
|
-
|
|
45947
|
-
function appendFile(
|
|
45946
|
+
fs8.appendFile = appendFile;
|
|
45947
|
+
function appendFile(path13, data, options, cb) {
|
|
45948
45948
|
if (typeof options === "function")
|
|
45949
45949
|
cb = options, options = null;
|
|
45950
|
-
return go$appendFile(
|
|
45951
|
-
function go$appendFile(
|
|
45952
|
-
return fs$appendFile(
|
|
45950
|
+
return go$appendFile(path13, data, options, cb);
|
|
45951
|
+
function go$appendFile(path14, data2, options2, cb2, startTime) {
|
|
45952
|
+
return fs$appendFile(path14, data2, options2, function(err) {
|
|
45953
45953
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
45954
|
-
enqueue([go$appendFile, [
|
|
45954
|
+
enqueue([go$appendFile, [path14, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
45955
45955
|
else {
|
|
45956
45956
|
if (typeof cb2 === "function")
|
|
45957
45957
|
cb2.apply(this, arguments);
|
|
@@ -45961,9 +45961,9 @@ var require_graceful_fs = __commonJS({
|
|
|
45961
45961
|
__name(go$appendFile, "go$appendFile");
|
|
45962
45962
|
}
|
|
45963
45963
|
__name(appendFile, "appendFile");
|
|
45964
|
-
var fs$copyFile =
|
|
45964
|
+
var fs$copyFile = fs8.copyFile;
|
|
45965
45965
|
if (fs$copyFile)
|
|
45966
|
-
|
|
45966
|
+
fs8.copyFile = copyFile;
|
|
45967
45967
|
function copyFile(src2, dest, flags, cb) {
|
|
45968
45968
|
if (typeof flags === "function") {
|
|
45969
45969
|
cb = flags;
|
|
@@ -45983,34 +45983,34 @@ var require_graceful_fs = __commonJS({
|
|
|
45983
45983
|
__name(go$copyFile, "go$copyFile");
|
|
45984
45984
|
}
|
|
45985
45985
|
__name(copyFile, "copyFile");
|
|
45986
|
-
var fs$readdir =
|
|
45987
|
-
|
|
45986
|
+
var fs$readdir = fs8.readdir;
|
|
45987
|
+
fs8.readdir = readdir2;
|
|
45988
45988
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
45989
|
-
function readdir2(
|
|
45989
|
+
function readdir2(path13, options, cb) {
|
|
45990
45990
|
if (typeof options === "function")
|
|
45991
45991
|
cb = options, options = null;
|
|
45992
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? /* @__PURE__ */ __name(function go$readdir2(
|
|
45993
|
-
return fs$readdir(
|
|
45994
|
-
|
|
45992
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? /* @__PURE__ */ __name(function go$readdir2(path14, options2, cb2, startTime) {
|
|
45993
|
+
return fs$readdir(path14, fs$readdirCallback(
|
|
45994
|
+
path14,
|
|
45995
45995
|
options2,
|
|
45996
45996
|
cb2,
|
|
45997
45997
|
startTime
|
|
45998
45998
|
));
|
|
45999
|
-
}, "go$readdir") : /* @__PURE__ */ __name(function go$readdir2(
|
|
46000
|
-
return fs$readdir(
|
|
46001
|
-
|
|
45999
|
+
}, "go$readdir") : /* @__PURE__ */ __name(function go$readdir2(path14, options2, cb2, startTime) {
|
|
46000
|
+
return fs$readdir(path14, options2, fs$readdirCallback(
|
|
46001
|
+
path14,
|
|
46002
46002
|
options2,
|
|
46003
46003
|
cb2,
|
|
46004
46004
|
startTime
|
|
46005
46005
|
));
|
|
46006
46006
|
}, "go$readdir");
|
|
46007
|
-
return go$readdir(
|
|
46008
|
-
function fs$readdirCallback(
|
|
46007
|
+
return go$readdir(path13, options, cb);
|
|
46008
|
+
function fs$readdirCallback(path14, options2, cb2, startTime) {
|
|
46009
46009
|
return function(err, files) {
|
|
46010
46010
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
46011
46011
|
enqueue([
|
|
46012
46012
|
go$readdir,
|
|
46013
|
-
[
|
|
46013
|
+
[path14, options2, cb2],
|
|
46014
46014
|
err,
|
|
46015
46015
|
startTime || Date.now(),
|
|
46016
46016
|
Date.now()
|
|
@@ -46027,21 +46027,21 @@ var require_graceful_fs = __commonJS({
|
|
|
46027
46027
|
}
|
|
46028
46028
|
__name(readdir2, "readdir");
|
|
46029
46029
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
46030
|
-
var legStreams = legacy(
|
|
46030
|
+
var legStreams = legacy(fs8);
|
|
46031
46031
|
ReadStream = legStreams.ReadStream;
|
|
46032
46032
|
WriteStream = legStreams.WriteStream;
|
|
46033
46033
|
}
|
|
46034
|
-
var fs$ReadStream =
|
|
46034
|
+
var fs$ReadStream = fs8.ReadStream;
|
|
46035
46035
|
if (fs$ReadStream) {
|
|
46036
46036
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
46037
46037
|
ReadStream.prototype.open = ReadStream$open;
|
|
46038
46038
|
}
|
|
46039
|
-
var fs$WriteStream =
|
|
46039
|
+
var fs$WriteStream = fs8.WriteStream;
|
|
46040
46040
|
if (fs$WriteStream) {
|
|
46041
46041
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
46042
46042
|
WriteStream.prototype.open = WriteStream$open;
|
|
46043
46043
|
}
|
|
46044
|
-
Object.defineProperty(
|
|
46044
|
+
Object.defineProperty(fs8, "ReadStream", {
|
|
46045
46045
|
get: /* @__PURE__ */ __name(function() {
|
|
46046
46046
|
return ReadStream;
|
|
46047
46047
|
}, "get"),
|
|
@@ -46051,7 +46051,7 @@ var require_graceful_fs = __commonJS({
|
|
|
46051
46051
|
enumerable: true,
|
|
46052
46052
|
configurable: true
|
|
46053
46053
|
});
|
|
46054
|
-
Object.defineProperty(
|
|
46054
|
+
Object.defineProperty(fs8, "WriteStream", {
|
|
46055
46055
|
get: /* @__PURE__ */ __name(function() {
|
|
46056
46056
|
return WriteStream;
|
|
46057
46057
|
}, "get"),
|
|
@@ -46062,7 +46062,7 @@ var require_graceful_fs = __commonJS({
|
|
|
46062
46062
|
configurable: true
|
|
46063
46063
|
});
|
|
46064
46064
|
var FileReadStream = ReadStream;
|
|
46065
|
-
Object.defineProperty(
|
|
46065
|
+
Object.defineProperty(fs8, "FileReadStream", {
|
|
46066
46066
|
get: /* @__PURE__ */ __name(function() {
|
|
46067
46067
|
return FileReadStream;
|
|
46068
46068
|
}, "get"),
|
|
@@ -46073,7 +46073,7 @@ var require_graceful_fs = __commonJS({
|
|
|
46073
46073
|
configurable: true
|
|
46074
46074
|
});
|
|
46075
46075
|
var FileWriteStream = WriteStream;
|
|
46076
|
-
Object.defineProperty(
|
|
46076
|
+
Object.defineProperty(fs8, "FileWriteStream", {
|
|
46077
46077
|
get: /* @__PURE__ */ __name(function() {
|
|
46078
46078
|
return FileWriteStream;
|
|
46079
46079
|
}, "get"),
|
|
@@ -46083,7 +46083,7 @@ var require_graceful_fs = __commonJS({
|
|
|
46083
46083
|
enumerable: true,
|
|
46084
46084
|
configurable: true
|
|
46085
46085
|
});
|
|
46086
|
-
function ReadStream(
|
|
46086
|
+
function ReadStream(path13, options) {
|
|
46087
46087
|
if (this instanceof ReadStream)
|
|
46088
46088
|
return fs$ReadStream.apply(this, arguments), this;
|
|
46089
46089
|
else
|
|
@@ -46105,7 +46105,7 @@ var require_graceful_fs = __commonJS({
|
|
|
46105
46105
|
});
|
|
46106
46106
|
}
|
|
46107
46107
|
__name(ReadStream$open, "ReadStream$open");
|
|
46108
|
-
function WriteStream(
|
|
46108
|
+
function WriteStream(path13, options) {
|
|
46109
46109
|
if (this instanceof WriteStream)
|
|
46110
46110
|
return fs$WriteStream.apply(this, arguments), this;
|
|
46111
46111
|
else
|
|
@@ -46125,24 +46125,24 @@ var require_graceful_fs = __commonJS({
|
|
|
46125
46125
|
});
|
|
46126
46126
|
}
|
|
46127
46127
|
__name(WriteStream$open, "WriteStream$open");
|
|
46128
|
-
function createReadStream(
|
|
46129
|
-
return new
|
|
46128
|
+
function createReadStream(path13, options) {
|
|
46129
|
+
return new fs8.ReadStream(path13, options);
|
|
46130
46130
|
}
|
|
46131
46131
|
__name(createReadStream, "createReadStream");
|
|
46132
|
-
function createWriteStream(
|
|
46133
|
-
return new
|
|
46132
|
+
function createWriteStream(path13, options) {
|
|
46133
|
+
return new fs8.WriteStream(path13, options);
|
|
46134
46134
|
}
|
|
46135
46135
|
__name(createWriteStream, "createWriteStream");
|
|
46136
|
-
var fs$open =
|
|
46137
|
-
|
|
46138
|
-
function open(
|
|
46136
|
+
var fs$open = fs8.open;
|
|
46137
|
+
fs8.open = open;
|
|
46138
|
+
function open(path13, flags, mode, cb) {
|
|
46139
46139
|
if (typeof mode === "function")
|
|
46140
46140
|
cb = mode, mode = null;
|
|
46141
|
-
return go$open(
|
|
46142
|
-
function go$open(
|
|
46143
|
-
return fs$open(
|
|
46141
|
+
return go$open(path13, flags, mode, cb);
|
|
46142
|
+
function go$open(path14, flags2, mode2, cb2, startTime) {
|
|
46143
|
+
return fs$open(path14, flags2, mode2, function(err, fd) {
|
|
46144
46144
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
46145
|
-
enqueue([go$open, [
|
|
46145
|
+
enqueue([go$open, [path14, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
46146
46146
|
else {
|
|
46147
46147
|
if (typeof cb2 === "function")
|
|
46148
46148
|
cb2.apply(this, arguments);
|
|
@@ -46152,22 +46152,22 @@ var require_graceful_fs = __commonJS({
|
|
|
46152
46152
|
__name(go$open, "go$open");
|
|
46153
46153
|
}
|
|
46154
46154
|
__name(open, "open");
|
|
46155
|
-
return
|
|
46155
|
+
return fs8;
|
|
46156
46156
|
}
|
|
46157
46157
|
__name(patch, "patch");
|
|
46158
46158
|
function enqueue(elem) {
|
|
46159
46159
|
debug2("ENQUEUE", elem[0].name, elem[1]);
|
|
46160
|
-
|
|
46160
|
+
fs7[gracefulQueue].push(elem);
|
|
46161
46161
|
retry();
|
|
46162
46162
|
}
|
|
46163
46163
|
__name(enqueue, "enqueue");
|
|
46164
46164
|
var retryTimer;
|
|
46165
46165
|
function resetQueue() {
|
|
46166
46166
|
var now = Date.now();
|
|
46167
|
-
for (var i = 0; i <
|
|
46168
|
-
if (
|
|
46169
|
-
|
|
46170
|
-
|
|
46167
|
+
for (var i = 0; i < fs7[gracefulQueue].length; ++i) {
|
|
46168
|
+
if (fs7[gracefulQueue][i].length > 2) {
|
|
46169
|
+
fs7[gracefulQueue][i][3] = now;
|
|
46170
|
+
fs7[gracefulQueue][i][4] = now;
|
|
46171
46171
|
}
|
|
46172
46172
|
}
|
|
46173
46173
|
retry();
|
|
@@ -46176,9 +46176,9 @@ var require_graceful_fs = __commonJS({
|
|
|
46176
46176
|
function retry() {
|
|
46177
46177
|
clearTimeout(retryTimer);
|
|
46178
46178
|
retryTimer = void 0;
|
|
46179
|
-
if (
|
|
46179
|
+
if (fs7[gracefulQueue].length === 0)
|
|
46180
46180
|
return;
|
|
46181
|
-
var elem =
|
|
46181
|
+
var elem = fs7[gracefulQueue].shift();
|
|
46182
46182
|
var fn = elem[0];
|
|
46183
46183
|
var args = elem[1];
|
|
46184
46184
|
var err = elem[2];
|
|
@@ -46200,7 +46200,7 @@ var require_graceful_fs = __commonJS({
|
|
|
46200
46200
|
debug2("RETRY", fn.name, args);
|
|
46201
46201
|
fn.apply(null, args.concat([startTime]));
|
|
46202
46202
|
} else {
|
|
46203
|
-
|
|
46203
|
+
fs7[gracefulQueue].push(elem);
|
|
46204
46204
|
}
|
|
46205
46205
|
}
|
|
46206
46206
|
if (retryTimer === void 0) {
|
|
@@ -46637,10 +46637,10 @@ var require_mtime_precision = __commonJS({
|
|
|
46637
46637
|
"../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/mtime-precision.js"(exports2, module2) {
|
|
46638
46638
|
"use strict";
|
|
46639
46639
|
var cacheSymbol = /* @__PURE__ */ Symbol();
|
|
46640
|
-
function probe(file2,
|
|
46641
|
-
const cachedPrecision =
|
|
46640
|
+
function probe(file2, fs7, callback) {
|
|
46641
|
+
const cachedPrecision = fs7[cacheSymbol];
|
|
46642
46642
|
if (cachedPrecision) {
|
|
46643
|
-
return
|
|
46643
|
+
return fs7.stat(file2, (err, stat) => {
|
|
46644
46644
|
if (err) {
|
|
46645
46645
|
return callback(err);
|
|
46646
46646
|
}
|
|
@@ -46648,16 +46648,16 @@ var require_mtime_precision = __commonJS({
|
|
|
46648
46648
|
});
|
|
46649
46649
|
}
|
|
46650
46650
|
const mtime = new Date(Math.ceil(Date.now() / 1e3) * 1e3 + 5);
|
|
46651
|
-
|
|
46651
|
+
fs7.utimes(file2, mtime, mtime, (err) => {
|
|
46652
46652
|
if (err) {
|
|
46653
46653
|
return callback(err);
|
|
46654
46654
|
}
|
|
46655
|
-
|
|
46655
|
+
fs7.stat(file2, (err2, stat) => {
|
|
46656
46656
|
if (err2) {
|
|
46657
46657
|
return callback(err2);
|
|
46658
46658
|
}
|
|
46659
46659
|
const precision = stat.mtime.getTime() % 1e3 === 0 ? "s" : "ms";
|
|
46660
|
-
Object.defineProperty(
|
|
46660
|
+
Object.defineProperty(fs7, cacheSymbol, { value: precision });
|
|
46661
46661
|
callback(null, stat.mtime, precision);
|
|
46662
46662
|
});
|
|
46663
46663
|
});
|
|
@@ -46680,8 +46680,8 @@ var require_mtime_precision = __commonJS({
|
|
|
46680
46680
|
var require_lockfile = __commonJS({
|
|
46681
46681
|
"../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/lockfile.js"(exports2, module2) {
|
|
46682
46682
|
"use strict";
|
|
46683
|
-
var
|
|
46684
|
-
var
|
|
46683
|
+
var path13 = require("path");
|
|
46684
|
+
var fs7 = require_graceful_fs();
|
|
46685
46685
|
var retry = require_retry3();
|
|
46686
46686
|
var onExit = require_signal_exit();
|
|
46687
46687
|
var mtimePrecision = require_mtime_precision();
|
|
@@ -46692,7 +46692,7 @@ var require_lockfile = __commonJS({
|
|
|
46692
46692
|
__name(getLockFile, "getLockFile");
|
|
46693
46693
|
function resolveCanonicalPath(file2, options, callback) {
|
|
46694
46694
|
if (!options.realpath) {
|
|
46695
|
-
return callback(null,
|
|
46695
|
+
return callback(null, path13.resolve(file2));
|
|
46696
46696
|
}
|
|
46697
46697
|
options.fs.realpath(file2, callback);
|
|
46698
46698
|
}
|
|
@@ -46819,7 +46819,7 @@ var require_lockfile = __commonJS({
|
|
|
46819
46819
|
update: null,
|
|
46820
46820
|
realpath: true,
|
|
46821
46821
|
retries: 0,
|
|
46822
|
-
fs:
|
|
46822
|
+
fs: fs7,
|
|
46823
46823
|
onCompromised: /* @__PURE__ */ __name((err) => {
|
|
46824
46824
|
throw err;
|
|
46825
46825
|
}, "onCompromised"),
|
|
@@ -46864,7 +46864,7 @@ var require_lockfile = __commonJS({
|
|
|
46864
46864
|
__name(lock2, "lock");
|
|
46865
46865
|
function unlock(file2, options, callback) {
|
|
46866
46866
|
options = {
|
|
46867
|
-
fs:
|
|
46867
|
+
fs: fs7,
|
|
46868
46868
|
realpath: true,
|
|
46869
46869
|
...options
|
|
46870
46870
|
};
|
|
@@ -46887,7 +46887,7 @@ var require_lockfile = __commonJS({
|
|
|
46887
46887
|
options = {
|
|
46888
46888
|
stale: 1e4,
|
|
46889
46889
|
realpath: true,
|
|
46890
|
-
fs:
|
|
46890
|
+
fs: fs7,
|
|
46891
46891
|
...options
|
|
46892
46892
|
};
|
|
46893
46893
|
options.stale = Math.max(options.stale || 0, 2e3);
|
|
@@ -46928,16 +46928,16 @@ var require_lockfile = __commonJS({
|
|
|
46928
46928
|
var require_adapter = __commonJS({
|
|
46929
46929
|
"../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/adapter.js"(exports2, module2) {
|
|
46930
46930
|
"use strict";
|
|
46931
|
-
var
|
|
46932
|
-
function createSyncFs(
|
|
46931
|
+
var fs7 = require_graceful_fs();
|
|
46932
|
+
function createSyncFs(fs8) {
|
|
46933
46933
|
const methods = ["mkdir", "realpath", "stat", "rmdir", "utimes"];
|
|
46934
|
-
const newFs = { ...
|
|
46934
|
+
const newFs = { ...fs8 };
|
|
46935
46935
|
methods.forEach((method) => {
|
|
46936
46936
|
newFs[method] = (...args) => {
|
|
46937
46937
|
const callback = args.pop();
|
|
46938
46938
|
let ret;
|
|
46939
46939
|
try {
|
|
46940
|
-
ret =
|
|
46940
|
+
ret = fs8[`${method}Sync`](...args);
|
|
46941
46941
|
} catch (err) {
|
|
46942
46942
|
return callback(err);
|
|
46943
46943
|
}
|
|
@@ -46978,7 +46978,7 @@ var require_adapter = __commonJS({
|
|
|
46978
46978
|
__name(toSync, "toSync");
|
|
46979
46979
|
function toSyncOptions(options) {
|
|
46980
46980
|
options = { ...options };
|
|
46981
|
-
options.fs = createSyncFs(options.fs ||
|
|
46981
|
+
options.fs = createSyncFs(options.fs || fs7);
|
|
46982
46982
|
if (typeof options.retries === "number" && options.retries > 0 || options.retries && typeof options.retries.retries === "number" && options.retries.retries > 0) {
|
|
46983
46983
|
throw Object.assign(new Error("Cannot use retries with the sync api"), { code: "ESYNC" });
|
|
46984
46984
|
}
|
|
@@ -47235,8 +47235,8 @@ var require_auth_config = __commonJS({
|
|
|
47235
47235
|
writeAuthConfig: /* @__PURE__ */ __name(() => writeAuthConfig, "writeAuthConfig")
|
|
47236
47236
|
});
|
|
47237
47237
|
module2.exports = __toCommonJS2(auth_config_exports);
|
|
47238
|
-
var
|
|
47239
|
-
var
|
|
47238
|
+
var fs7 = __toESM2(require("fs"));
|
|
47239
|
+
var path13 = __toESM2(require("path"));
|
|
47240
47240
|
var import_token_util = require_token_util();
|
|
47241
47241
|
function getAuthConfigPath() {
|
|
47242
47242
|
const dataDir = (0, import_token_util.getVercelDataDir)();
|
|
@@ -47245,16 +47245,16 @@ var require_auth_config = __commonJS({
|
|
|
47245
47245
|
`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`
|
|
47246
47246
|
);
|
|
47247
47247
|
}
|
|
47248
|
-
return
|
|
47248
|
+
return path13.join(dataDir, "auth.json");
|
|
47249
47249
|
}
|
|
47250
47250
|
__name(getAuthConfigPath, "getAuthConfigPath");
|
|
47251
47251
|
function readAuthConfig() {
|
|
47252
47252
|
try {
|
|
47253
47253
|
const authPath = getAuthConfigPath();
|
|
47254
|
-
if (!
|
|
47254
|
+
if (!fs7.existsSync(authPath)) {
|
|
47255
47255
|
return null;
|
|
47256
47256
|
}
|
|
47257
|
-
const content =
|
|
47257
|
+
const content = fs7.readFileSync(authPath, "utf8");
|
|
47258
47258
|
if (!content) {
|
|
47259
47259
|
return null;
|
|
47260
47260
|
}
|
|
@@ -47266,11 +47266,11 @@ var require_auth_config = __commonJS({
|
|
|
47266
47266
|
__name(readAuthConfig, "readAuthConfig");
|
|
47267
47267
|
function writeAuthConfig(config3) {
|
|
47268
47268
|
const authPath = getAuthConfigPath();
|
|
47269
|
-
const authDir =
|
|
47270
|
-
if (!
|
|
47271
|
-
|
|
47269
|
+
const authDir = path13.dirname(authPath);
|
|
47270
|
+
if (!fs7.existsSync(authDir)) {
|
|
47271
|
+
fs7.mkdirSync(authDir, { mode: 504, recursive: true });
|
|
47272
47272
|
}
|
|
47273
|
-
|
|
47273
|
+
fs7.writeFileSync(authPath, JSON.stringify(config3, null, 2), { mode: 384 });
|
|
47274
47274
|
}
|
|
47275
47275
|
__name(writeAuthConfig, "writeAuthConfig");
|
|
47276
47276
|
function isValidAccessToken(authConfig, expirationBufferMs = 0) {
|
|
@@ -47472,8 +47472,8 @@ var require_token_util = __commonJS({
|
|
|
47472
47472
|
saveToken: /* @__PURE__ */ __name(() => saveToken, "saveToken")
|
|
47473
47473
|
});
|
|
47474
47474
|
module2.exports = __toCommonJS2(token_util_exports);
|
|
47475
|
-
var
|
|
47476
|
-
var
|
|
47475
|
+
var path13 = __toESM2(require("path"));
|
|
47476
|
+
var fs7 = __toESM2(require("fs"));
|
|
47477
47477
|
var import_token_error = require_token_error();
|
|
47478
47478
|
var import_token_io = require_token_io();
|
|
47479
47479
|
var import_auth_config = require_auth_config();
|
|
@@ -47485,7 +47485,7 @@ var require_token_util = __commonJS({
|
|
|
47485
47485
|
if (!dataDir) {
|
|
47486
47486
|
return null;
|
|
47487
47487
|
}
|
|
47488
|
-
return
|
|
47488
|
+
return path13.join(dataDir, vercelFolder);
|
|
47489
47489
|
}
|
|
47490
47490
|
__name(getVercelDataDir, "getVercelDataDir");
|
|
47491
47491
|
async function getVercelToken2(options) {
|
|
@@ -47565,13 +47565,13 @@ var require_token_util = __commonJS({
|
|
|
47565
47565
|
"Unable to find project root directory. Have you linked your project with `vc link?`"
|
|
47566
47566
|
);
|
|
47567
47567
|
}
|
|
47568
|
-
const prjPath =
|
|
47569
|
-
if (!
|
|
47568
|
+
const prjPath = path13.join(dir, ".vercel", "project.json");
|
|
47569
|
+
if (!fs7.existsSync(prjPath)) {
|
|
47570
47570
|
throw new import_token_error.VercelOidcTokenError(
|
|
47571
47571
|
"project.json not found, have you linked your project with `vc link?`"
|
|
47572
47572
|
);
|
|
47573
47573
|
}
|
|
47574
|
-
const prj = JSON.parse(
|
|
47574
|
+
const prj = JSON.parse(fs7.readFileSync(prjPath, "utf8"));
|
|
47575
47575
|
if (typeof prj.projectId !== "string" && typeof prj.orgId !== "string") {
|
|
47576
47576
|
throw new TypeError(
|
|
47577
47577
|
"Expected a string-valued projectId property. Try running `vc link` to re-link your project."
|
|
@@ -47587,11 +47587,11 @@ var require_token_util = __commonJS({
|
|
|
47587
47587
|
"Unable to find user data directory. Please reach out to Vercel support."
|
|
47588
47588
|
);
|
|
47589
47589
|
}
|
|
47590
|
-
const tokenPath =
|
|
47590
|
+
const tokenPath = path13.join(dir, "com.vercel.token", `${projectId}.json`);
|
|
47591
47591
|
const tokenJson = JSON.stringify(token);
|
|
47592
|
-
|
|
47593
|
-
|
|
47594
|
-
|
|
47592
|
+
fs7.mkdirSync(path13.dirname(tokenPath), { mode: 504, recursive: true });
|
|
47593
|
+
fs7.writeFileSync(tokenPath, tokenJson);
|
|
47594
|
+
fs7.chmodSync(tokenPath, 432);
|
|
47595
47595
|
return;
|
|
47596
47596
|
}
|
|
47597
47597
|
__name(saveToken, "saveToken");
|
|
@@ -47602,11 +47602,11 @@ var require_token_util = __commonJS({
|
|
|
47602
47602
|
"Unable to find user data directory. Please reach out to Vercel support."
|
|
47603
47603
|
);
|
|
47604
47604
|
}
|
|
47605
|
-
const tokenPath =
|
|
47606
|
-
if (!
|
|
47605
|
+
const tokenPath = path13.join(dir, "com.vercel.token", `${projectId}.json`);
|
|
47606
|
+
if (!fs7.existsSync(tokenPath)) {
|
|
47607
47607
|
return null;
|
|
47608
47608
|
}
|
|
47609
|
-
const token = JSON.parse(
|
|
47609
|
+
const token = JSON.parse(fs7.readFileSync(tokenPath, "utf8"));
|
|
47610
47610
|
assertVercelOidcTokenResponse(token);
|
|
47611
47611
|
return token;
|
|
47612
47612
|
}
|
|
@@ -47906,27 +47906,27 @@ var require_process = __commonJS({
|
|
|
47906
47906
|
var require_filesystem = __commonJS({
|
|
47907
47907
|
"../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js"(exports2, module2) {
|
|
47908
47908
|
"use strict";
|
|
47909
|
-
var
|
|
47909
|
+
var fs7 = require("fs");
|
|
47910
47910
|
var LDD_PATH = "/usr/bin/ldd";
|
|
47911
47911
|
var SELF_PATH = "/proc/self/exe";
|
|
47912
47912
|
var MAX_LENGTH = 2048;
|
|
47913
|
-
var readFileSync2 = /* @__PURE__ */ __name((
|
|
47914
|
-
const fd =
|
|
47913
|
+
var readFileSync2 = /* @__PURE__ */ __name((path13) => {
|
|
47914
|
+
const fd = fs7.openSync(path13, "r");
|
|
47915
47915
|
const buffer2 = Buffer.alloc(MAX_LENGTH);
|
|
47916
|
-
const bytesRead =
|
|
47917
|
-
|
|
47916
|
+
const bytesRead = fs7.readSync(fd, buffer2, 0, MAX_LENGTH, 0);
|
|
47917
|
+
fs7.close(fd, () => {
|
|
47918
47918
|
});
|
|
47919
47919
|
return buffer2.subarray(0, bytesRead);
|
|
47920
47920
|
}, "readFileSync");
|
|
47921
|
-
var readFile3 = /* @__PURE__ */ __name((
|
|
47922
|
-
|
|
47921
|
+
var readFile3 = /* @__PURE__ */ __name((path13) => new Promise((resolve3, reject) => {
|
|
47922
|
+
fs7.open(path13, "r", (err, fd) => {
|
|
47923
47923
|
if (err) {
|
|
47924
47924
|
reject(err);
|
|
47925
47925
|
} else {
|
|
47926
47926
|
const buffer2 = Buffer.alloc(MAX_LENGTH);
|
|
47927
|
-
|
|
47927
|
+
fs7.read(fd, buffer2, 0, MAX_LENGTH, 0, (_, bytesRead) => {
|
|
47928
47928
|
resolve3(buffer2.subarray(0, bytesRead));
|
|
47929
|
-
|
|
47929
|
+
fs7.close(fd, () => {
|
|
47930
47930
|
});
|
|
47931
47931
|
});
|
|
47932
47932
|
}
|
|
@@ -48038,11 +48038,11 @@ var require_detect_libc = __commonJS({
|
|
|
48038
48038
|
}
|
|
48039
48039
|
return null;
|
|
48040
48040
|
}, "familyFromCommand");
|
|
48041
|
-
var familyFromInterpreterPath = /* @__PURE__ */ __name((
|
|
48042
|
-
if (
|
|
48043
|
-
if (
|
|
48041
|
+
var familyFromInterpreterPath = /* @__PURE__ */ __name((path13) => {
|
|
48042
|
+
if (path13) {
|
|
48043
|
+
if (path13.includes("/ld-musl-")) {
|
|
48044
48044
|
return MUSL;
|
|
48045
|
-
} else if (
|
|
48045
|
+
} else if (path13.includes("/ld-linux-")) {
|
|
48046
48046
|
return GLIBC;
|
|
48047
48047
|
}
|
|
48048
48048
|
}
|
|
@@ -48089,8 +48089,8 @@ var require_detect_libc = __commonJS({
|
|
|
48089
48089
|
cachedFamilyInterpreter = null;
|
|
48090
48090
|
try {
|
|
48091
48091
|
const selfContent = await readFile3(SELF_PATH);
|
|
48092
|
-
const
|
|
48093
|
-
cachedFamilyInterpreter = familyFromInterpreterPath(
|
|
48092
|
+
const path13 = interpreterPath(selfContent);
|
|
48093
|
+
cachedFamilyInterpreter = familyFromInterpreterPath(path13);
|
|
48094
48094
|
} catch (e) {
|
|
48095
48095
|
}
|
|
48096
48096
|
return cachedFamilyInterpreter;
|
|
@@ -48102,8 +48102,8 @@ var require_detect_libc = __commonJS({
|
|
|
48102
48102
|
cachedFamilyInterpreter = null;
|
|
48103
48103
|
try {
|
|
48104
48104
|
const selfContent = readFileSync2(SELF_PATH);
|
|
48105
|
-
const
|
|
48106
|
-
cachedFamilyInterpreter = familyFromInterpreterPath(
|
|
48105
|
+
const path13 = interpreterPath(selfContent);
|
|
48106
|
+
cachedFamilyInterpreter = familyFromInterpreterPath(path13);
|
|
48107
48107
|
} catch (e) {
|
|
48108
48108
|
}
|
|
48109
48109
|
return cachedFamilyInterpreter;
|
|
@@ -48236,8 +48236,8 @@ var require_detect_libc = __commonJS({
|
|
|
48236
48236
|
// ../../node_modules/.pnpm/node-gyp-build-optional-packages@5.1.1/node_modules/node-gyp-build-optional-packages/index.js
|
|
48237
48237
|
var require_node_gyp_build_optional_packages = __commonJS({
|
|
48238
48238
|
"../../node_modules/.pnpm/node-gyp-build-optional-packages@5.1.1/node_modules/node-gyp-build-optional-packages/index.js"(exports2, module2) {
|
|
48239
|
-
var
|
|
48240
|
-
var
|
|
48239
|
+
var fs7 = require("fs");
|
|
48240
|
+
var path13 = require("path");
|
|
48241
48241
|
var url2 = require("url");
|
|
48242
48242
|
var vars = process.config && process.config.variables || {};
|
|
48243
48243
|
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
@@ -48261,30 +48261,30 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
48261
48261
|
}
|
|
48262
48262
|
__name(load, "load");
|
|
48263
48263
|
load.path = function(dir) {
|
|
48264
|
-
dir =
|
|
48264
|
+
dir = path13.resolve(dir || ".");
|
|
48265
48265
|
var packageName = "";
|
|
48266
48266
|
try {
|
|
48267
48267
|
if (typeof __webpack_require__ === "function")
|
|
48268
|
-
packageName = __non_webpack_require__(
|
|
48268
|
+
packageName = __non_webpack_require__(path13.join(dir, "package.json")).name;
|
|
48269
48269
|
else
|
|
48270
|
-
packageName = require(
|
|
48270
|
+
packageName = require(path13.join(dir, "package.json")).name;
|
|
48271
48271
|
var varName = packageName.toUpperCase().replace(/-/g, "_") + "_PREBUILD";
|
|
48272
48272
|
if (process.env[varName]) dir = process.env[varName];
|
|
48273
48273
|
} catch (err) {
|
|
48274
48274
|
}
|
|
48275
48275
|
if (!prebuildsOnly) {
|
|
48276
|
-
var release = getFirst(
|
|
48276
|
+
var release = getFirst(path13.join(dir, "build/Release"), matchBuild);
|
|
48277
48277
|
if (release) return release;
|
|
48278
|
-
var debug2 = getFirst(
|
|
48278
|
+
var debug2 = getFirst(path13.join(dir, "build/Debug"), matchBuild);
|
|
48279
48279
|
if (debug2) return debug2;
|
|
48280
48280
|
}
|
|
48281
48281
|
var prebuild = resolve3(dir);
|
|
48282
48282
|
if (prebuild) return prebuild;
|
|
48283
|
-
var nearby = resolve3(
|
|
48283
|
+
var nearby = resolve3(path13.dirname(process.execPath));
|
|
48284
48284
|
if (nearby) return nearby;
|
|
48285
48285
|
var platformPackage = (packageName[0] == "@" ? "" : "@" + packageName + "/") + packageName + "-" + platform + "-" + arch;
|
|
48286
48286
|
try {
|
|
48287
|
-
var prebuildPackage =
|
|
48287
|
+
var prebuildPackage = path13.dirname(require("module").createRequire(url2.pathToFileURL(path13.join(dir, "package.json"))).resolve(platformPackage));
|
|
48288
48288
|
return resolveFile(prebuildPackage);
|
|
48289
48289
|
} catch (error48) {
|
|
48290
48290
|
}
|
|
@@ -48303,23 +48303,23 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
48303
48303
|
].filter(Boolean).join(" ");
|
|
48304
48304
|
throw new Error("No native build was found for " + target2 + "\n attempted loading from: " + dir + " and package: " + platformPackage + "\n");
|
|
48305
48305
|
function resolve3(dir2) {
|
|
48306
|
-
var tuples = readdirSync(
|
|
48306
|
+
var tuples = readdirSync(path13.join(dir2, "prebuilds")).map(parseTuple);
|
|
48307
48307
|
var tuple2 = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0];
|
|
48308
48308
|
if (!tuple2) return;
|
|
48309
|
-
return resolveFile(
|
|
48309
|
+
return resolveFile(path13.join(dir2, "prebuilds", tuple2.name));
|
|
48310
48310
|
}
|
|
48311
48311
|
__name(resolve3, "resolve");
|
|
48312
48312
|
function resolveFile(prebuilds) {
|
|
48313
48313
|
var parsed = readdirSync(prebuilds).map(parseTags);
|
|
48314
48314
|
var candidates = parsed.filter(matchTags(runtime, abi));
|
|
48315
48315
|
var winner = candidates.sort(compareTags(runtime))[0];
|
|
48316
|
-
if (winner) return
|
|
48316
|
+
if (winner) return path13.join(prebuilds, winner.file);
|
|
48317
48317
|
}
|
|
48318
48318
|
__name(resolveFile, "resolveFile");
|
|
48319
48319
|
};
|
|
48320
48320
|
function readdirSync(dir) {
|
|
48321
48321
|
try {
|
|
48322
|
-
return
|
|
48322
|
+
return fs7.readdirSync(dir);
|
|
48323
48323
|
} catch (err) {
|
|
48324
48324
|
return [];
|
|
48325
48325
|
}
|
|
@@ -48327,7 +48327,7 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
48327
48327
|
__name(readdirSync, "readdirSync");
|
|
48328
48328
|
function getFirst(dir, filter2) {
|
|
48329
48329
|
var files = readdirSync(dir).filter(filter2);
|
|
48330
|
-
return files[0] &&
|
|
48330
|
+
return files[0] && path13.join(dir, files[0]);
|
|
48331
48331
|
}
|
|
48332
48332
|
__name(getFirst, "getFirst");
|
|
48333
48333
|
function matchBuild(name) {
|
|
@@ -53249,16 +53249,16 @@ init_dist();
|
|
|
53249
53249
|
init_node();
|
|
53250
53250
|
|
|
53251
53251
|
// ../core/dist/version.js
|
|
53252
|
-
var version2 = "4.8.
|
|
53252
|
+
var version2 = "4.8.16";
|
|
53253
53253
|
|
|
53254
53254
|
// ../core/dist/runtime/world.js
|
|
53255
53255
|
var import_node_module = require("node:module");
|
|
53256
|
-
var
|
|
53256
|
+
var import_node_path11 = require("node:path");
|
|
53257
53257
|
|
|
53258
53258
|
// ../world-local/dist/index.js
|
|
53259
53259
|
var import_node_fs2 = require("node:fs");
|
|
53260
|
-
var
|
|
53261
|
-
var
|
|
53260
|
+
var import_promises7 = require("node:fs/promises");
|
|
53261
|
+
var import_node_path10 = __toESM(require("node:path"), 1);
|
|
53262
53262
|
init_dist();
|
|
53263
53263
|
|
|
53264
53264
|
// ../utils/dist/get-port.js
|
|
@@ -53789,6 +53789,10 @@ async function write(filePath, data, opts) {
|
|
|
53789
53789
|
}
|
|
53790
53790
|
}
|
|
53791
53791
|
__name(write, "write");
|
|
53792
|
+
async function writeTempFile(filePath, data) {
|
|
53793
|
+
await withEnsuredDirectory(import_node_path.default.dirname(filePath), () => import_node_fs.promises.writeFile(filePath, data, { flag: "wx" }));
|
|
53794
|
+
}
|
|
53795
|
+
__name(writeTempFile, "writeTempFile");
|
|
53792
53796
|
async function readJSON(filePath, decoder2) {
|
|
53793
53797
|
try {
|
|
53794
53798
|
const content = await import_node_fs.promises.readFile(filePath, "utf-8");
|
|
@@ -56137,12 +56141,141 @@ __name(createStorage, "createStorage");
|
|
|
56137
56141
|
|
|
56138
56142
|
// ../world-local/dist/streamer.js
|
|
56139
56143
|
var import_node_events = require("node:events");
|
|
56140
|
-
var
|
|
56141
|
-
var
|
|
56144
|
+
var import_promises6 = __toESM(require("node:fs/promises"), 1);
|
|
56145
|
+
var import_node_path9 = __toESM(require("node:path"), 1);
|
|
56142
56146
|
var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
|
|
56143
|
-
init_node();
|
|
56144
56147
|
init_zod();
|
|
56145
|
-
|
|
56148
|
+
|
|
56149
|
+
// ../world-local/dist/stream-chunk-place.js
|
|
56150
|
+
var import_node_crypto3 = require("node:crypto");
|
|
56151
|
+
var import_promises5 = __toESM(require("node:fs/promises"), 1);
|
|
56152
|
+
var import_node_path8 = __toESM(require("node:path"), 1);
|
|
56153
|
+
var ALPHABET = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
56154
|
+
var CHUNK_FILE = /^chnk_([0-9A-HJKMNP-TV-Z]{26})(?![0-9A-Za-z])/;
|
|
56155
|
+
var FIRST_CHUNK_ID = `${"0".repeat(25)}1`;
|
|
56156
|
+
function chunkSuccessor(id) {
|
|
56157
|
+
const digits = id.split("");
|
|
56158
|
+
for (let at = digits.length - 1; at >= 0; at -= 1) {
|
|
56159
|
+
const value = ALPHABET.indexOf(digits[at]);
|
|
56160
|
+
if (value < 0)
|
|
56161
|
+
throw new Error(`not a chunk id: ${id}`);
|
|
56162
|
+
if (value < ALPHABET.length - 1) {
|
|
56163
|
+
digits[at] = ALPHABET[value + 1];
|
|
56164
|
+
return digits.join("");
|
|
56165
|
+
}
|
|
56166
|
+
digits[at] = ALPHABET[0];
|
|
56167
|
+
}
|
|
56168
|
+
throw new Error(`no chunk id follows ${id}`);
|
|
56169
|
+
}
|
|
56170
|
+
__name(chunkSuccessor, "chunkSuccessor");
|
|
56171
|
+
async function newestChunkId(dir, prefix = "") {
|
|
56172
|
+
let entries;
|
|
56173
|
+
try {
|
|
56174
|
+
entries = await import_promises5.default.readdir(dir);
|
|
56175
|
+
} catch (error48) {
|
|
56176
|
+
if (error48.code === "ENOENT")
|
|
56177
|
+
return null;
|
|
56178
|
+
throw error48;
|
|
56179
|
+
}
|
|
56180
|
+
let newest = null;
|
|
56181
|
+
for (const entry of entries) {
|
|
56182
|
+
if (!entry.startsWith(prefix))
|
|
56183
|
+
continue;
|
|
56184
|
+
const id = CHUNK_FILE.exec(entry.slice(prefix.length))?.[1];
|
|
56185
|
+
if (id !== void 0 && (newest === null || id > newest))
|
|
56186
|
+
newest = id;
|
|
56187
|
+
}
|
|
56188
|
+
return newest;
|
|
56189
|
+
}
|
|
56190
|
+
__name(newestChunkId, "newestChunkId");
|
|
56191
|
+
function createChunkPlacer({ tagSuffix, writeFile: writeFile2, retry }) {
|
|
56192
|
+
const turns = /* @__PURE__ */ new Map();
|
|
56193
|
+
const newest = /* @__PURE__ */ new Map();
|
|
56194
|
+
const keyOf = /* @__PURE__ */ __name((dir, prefix) => import_node_path8.default.join(dir, prefix), "keyOf");
|
|
56195
|
+
const fileOf = /* @__PURE__ */ __name((dir, prefix, id) => import_node_path8.default.join(dir, `${prefix}chnk_${id}${tagSuffix}.bin`), "fileOf");
|
|
56196
|
+
const linkInto = /* @__PURE__ */ __name((temp, target2) => retry(() => import_promises5.default.link(temp, target2)).then(() => null, (error48) => error48), "linkInto");
|
|
56197
|
+
const successorOf = /* @__PURE__ */ __name((id) => id === null ? FIRST_CHUNK_ID : chunkSuccessor(id), "successorOf");
|
|
56198
|
+
async function newestSince(dir, prefix, taken) {
|
|
56199
|
+
const listed = await newestChunkId(dir, prefix);
|
|
56200
|
+
return listed !== null && listed > taken ? listed : taken;
|
|
56201
|
+
}
|
|
56202
|
+
__name(newestSince, "newestSince");
|
|
56203
|
+
async function place(dir, prefix, temp, data) {
|
|
56204
|
+
const key = keyOf(dir, prefix);
|
|
56205
|
+
let id = newest.has(key) ? newest.get(key) : await newestChunkId(dir, prefix);
|
|
56206
|
+
let rewritten = false;
|
|
56207
|
+
for (; ; ) {
|
|
56208
|
+
const next2 = successorOf(id);
|
|
56209
|
+
const error48 = await linkInto(temp, fileOf(dir, prefix, next2));
|
|
56210
|
+
if (error48 === null) {
|
|
56211
|
+
newest.set(key, next2);
|
|
56212
|
+
return `chnk_${next2}`;
|
|
56213
|
+
}
|
|
56214
|
+
if (error48.code === "EEXIST") {
|
|
56215
|
+
id = await newestSince(dir, prefix, next2);
|
|
56216
|
+
} else if (error48.code === "ENOENT" && !rewritten) {
|
|
56217
|
+
rewritten = true;
|
|
56218
|
+
await writeFile2(temp, data);
|
|
56219
|
+
} else {
|
|
56220
|
+
throw error48;
|
|
56221
|
+
}
|
|
56222
|
+
}
|
|
56223
|
+
}
|
|
56224
|
+
__name(place, "place");
|
|
56225
|
+
async function land(before, dir, prefix, chunks, landed) {
|
|
56226
|
+
const temps = chunks.map(() => import_node_path8.default.join(dir, `.${(0, import_node_crypto3.randomUUID)()}.tmp`));
|
|
56227
|
+
const left = new Set(temps);
|
|
56228
|
+
try {
|
|
56229
|
+
const written = await Promise.allSettled(chunks.map((data, index) => writeFile2(temps[index], data)));
|
|
56230
|
+
const failed = written.find((result) => result.status === "rejected");
|
|
56231
|
+
if (failed)
|
|
56232
|
+
throw failed.reason;
|
|
56233
|
+
await before;
|
|
56234
|
+
const ids = [];
|
|
56235
|
+
for (const [index, temp] of temps.entries()) {
|
|
56236
|
+
const id = await place(dir, prefix, temp, chunks[index]);
|
|
56237
|
+
ids.push(id);
|
|
56238
|
+
left.delete(temp);
|
|
56239
|
+
await retry(() => import_promises5.default.unlink(temp)).catch(() => {
|
|
56240
|
+
});
|
|
56241
|
+
landed?.(id, index);
|
|
56242
|
+
}
|
|
56243
|
+
return ids;
|
|
56244
|
+
} finally {
|
|
56245
|
+
for (const temp of left) {
|
|
56246
|
+
await retry(() => import_promises5.default.unlink(temp)).catch(() => {
|
|
56247
|
+
});
|
|
56248
|
+
}
|
|
56249
|
+
}
|
|
56250
|
+
}
|
|
56251
|
+
__name(land, "land");
|
|
56252
|
+
return {
|
|
56253
|
+
turn(name) {
|
|
56254
|
+
const before = turns.get(name);
|
|
56255
|
+
let done;
|
|
56256
|
+
const ended = new Promise((resolve3) => {
|
|
56257
|
+
done = resolve3;
|
|
56258
|
+
});
|
|
56259
|
+
const mine = before ? Promise.all([ended, before]).then(() => {
|
|
56260
|
+
}) : ended;
|
|
56261
|
+
turns.set(name, mine);
|
|
56262
|
+
void mine.then(() => {
|
|
56263
|
+
if (turns.get(name) === mine)
|
|
56264
|
+
turns.delete(name);
|
|
56265
|
+
});
|
|
56266
|
+
return {
|
|
56267
|
+
land: /* @__PURE__ */ __name((dir, prefix, chunks, landed) => land(before, dir, prefix, chunks, landed), "land"),
|
|
56268
|
+
done
|
|
56269
|
+
};
|
|
56270
|
+
},
|
|
56271
|
+
forget(dir, prefix) {
|
|
56272
|
+
newest.delete(keyOf(dir, prefix));
|
|
56273
|
+
}
|
|
56274
|
+
};
|
|
56275
|
+
}
|
|
56276
|
+
__name(createChunkPlacer, "createChunkPlacer");
|
|
56277
|
+
|
|
56278
|
+
// ../world-local/dist/streamer.js
|
|
56146
56279
|
var RunStreamsSchema = external_exports.object({
|
|
56147
56280
|
streams: external_exports.array(external_exports.string())
|
|
56148
56281
|
});
|
|
@@ -56173,7 +56306,7 @@ function deserializeChunk(serialized) {
|
|
|
56173
56306
|
__name(deserializeChunk, "deserializeChunk");
|
|
56174
56307
|
async function listChunkEntries(chunksDir) {
|
|
56175
56308
|
try {
|
|
56176
|
-
return await
|
|
56309
|
+
return await import_promises6.default.readdir(chunksDir);
|
|
56177
56310
|
} catch (error48) {
|
|
56178
56311
|
if (error48.code === "ENOENT")
|
|
56179
56312
|
return [];
|
|
@@ -56239,7 +56372,7 @@ function createStreamer(basedir, tag) {
|
|
|
56239
56372
|
}
|
|
56240
56373
|
__name(registerStreamForRun, "registerStreamForRun");
|
|
56241
56374
|
async function addToRunStreams(runStreamsPath, runId, streamName) {
|
|
56242
|
-
await
|
|
56375
|
+
await import_promises6.default.mkdir(import_node_path9.default.dirname(runStreamsPath), { recursive: true });
|
|
56243
56376
|
let compromised = false;
|
|
56244
56377
|
let release;
|
|
56245
56378
|
try {
|
|
@@ -56282,64 +56415,67 @@ function createStreamer(basedir, tag) {
|
|
|
56282
56415
|
}
|
|
56283
56416
|
}
|
|
56284
56417
|
__name(toBuffer, "toBuffer");
|
|
56418
|
+
const placer = createChunkPlacer({
|
|
56419
|
+
tagSuffix,
|
|
56420
|
+
writeFile: writeTempFile,
|
|
56421
|
+
retry: /* @__PURE__ */ __name((fn) => withWindowsRetry(fn), "retry")
|
|
56422
|
+
});
|
|
56423
|
+
const chunksDir = import_node_path9.default.join(basedir, "streams", "chunks");
|
|
56424
|
+
const chunkPrefix = /* @__PURE__ */ __name((name) => `${name}-`, "chunkPrefix");
|
|
56285
56425
|
return {
|
|
56286
56426
|
clearCache() {
|
|
56287
56427
|
registeredStreams.clear();
|
|
56288
56428
|
},
|
|
56289
56429
|
async writeToStream(name, _runId, chunk) {
|
|
56290
|
-
const
|
|
56291
|
-
|
|
56292
|
-
|
|
56293
|
-
|
|
56294
|
-
|
|
56295
|
-
|
|
56296
|
-
|
|
56297
|
-
|
|
56298
|
-
|
|
56299
|
-
|
|
56300
|
-
|
|
56301
|
-
|
|
56302
|
-
|
|
56303
|
-
|
|
56304
|
-
|
|
56305
|
-
}
|
|
56430
|
+
const turn = placer.turn(name);
|
|
56431
|
+
try {
|
|
56432
|
+
await registerStreamForRun(await _runId, name);
|
|
56433
|
+
assertSafeEntityId("streamName", name);
|
|
56434
|
+
const chunkBuffer = toBuffer(chunk);
|
|
56435
|
+
const [chunkId] = await turn.land(chunksDir, chunkPrefix(name), [
|
|
56436
|
+
serializeChunk({ chunk: chunkBuffer, eof: false })
|
|
56437
|
+
]);
|
|
56438
|
+
streamEmitter.emit(`chunk:${name}`, {
|
|
56439
|
+
streamName: name,
|
|
56440
|
+
chunkData: Uint8Array.from(chunkBuffer),
|
|
56441
|
+
chunkId
|
|
56442
|
+
});
|
|
56443
|
+
} finally {
|
|
56444
|
+
turn.done();
|
|
56445
|
+
}
|
|
56306
56446
|
},
|
|
56307
56447
|
async writeToStreamMulti(name, _runId, chunks) {
|
|
56308
56448
|
if (chunks.length === 0)
|
|
56309
56449
|
return;
|
|
56310
|
-
const
|
|
56311
|
-
|
|
56312
|
-
|
|
56313
|
-
|
|
56314
|
-
|
|
56315
|
-
|
|
56316
|
-
|
|
56317
|
-
|
|
56318
|
-
|
|
56319
|
-
|
|
56320
|
-
|
|
56321
|
-
await write(chunkPath, serialized);
|
|
56322
|
-
return {
|
|
56323
|
-
chunkId,
|
|
56324
|
-
chunkData: Uint8Array.from(chunkBuffer)
|
|
56325
|
-
};
|
|
56326
|
-
});
|
|
56327
|
-
for (const writePromise of writePromises) {
|
|
56328
|
-
const { chunkId, chunkData } = await writePromise;
|
|
56329
|
-
streamEmitter.emit(`chunk:${name}`, {
|
|
56330
|
-
streamName: name,
|
|
56331
|
-
chunkData,
|
|
56332
|
-
chunkId
|
|
56450
|
+
const turn = placer.turn(name);
|
|
56451
|
+
try {
|
|
56452
|
+
await registerStreamForRun(await _runId, name);
|
|
56453
|
+
assertSafeEntityId("streamName", name);
|
|
56454
|
+
const chunkBuffers = chunks.map((chunk) => toBuffer(chunk));
|
|
56455
|
+
await turn.land(chunksDir, chunkPrefix(name), chunkBuffers.map((chunkBuffer) => serializeChunk({ chunk: chunkBuffer, eof: false })), (chunkId, index) => {
|
|
56456
|
+
streamEmitter.emit(`chunk:${name}`, {
|
|
56457
|
+
streamName: name,
|
|
56458
|
+
chunkData: Uint8Array.from(chunkBuffers[index]),
|
|
56459
|
+
chunkId
|
|
56460
|
+
});
|
|
56333
56461
|
});
|
|
56462
|
+
} finally {
|
|
56463
|
+
turn.done();
|
|
56334
56464
|
}
|
|
56335
56465
|
},
|
|
56336
56466
|
async closeStream(name, _runId) {
|
|
56337
|
-
const
|
|
56338
|
-
|
|
56339
|
-
|
|
56340
|
-
|
|
56341
|
-
|
|
56342
|
-
|
|
56467
|
+
const turn = placer.turn(name);
|
|
56468
|
+
try {
|
|
56469
|
+
await registerStreamForRun(await _runId, name, { verify: true });
|
|
56470
|
+
assertSafeEntityId("streamName", name);
|
|
56471
|
+
await turn.land(chunksDir, chunkPrefix(name), [
|
|
56472
|
+
serializeChunk({ chunk: Buffer.from([]), eof: true })
|
|
56473
|
+
]);
|
|
56474
|
+
placer.forget(chunksDir, chunkPrefix(name));
|
|
56475
|
+
streamEmitter.emit(`close:${name}`, { streamName: name });
|
|
56476
|
+
} finally {
|
|
56477
|
+
turn.done();
|
|
56478
|
+
}
|
|
56343
56479
|
},
|
|
56344
56480
|
async listStreamsByRunId(runId) {
|
|
56345
56481
|
assertSafeEntityId("runId", runId);
|
|
@@ -56347,7 +56483,6 @@ function createStreamer(basedir, tag) {
|
|
|
56347
56483
|
},
|
|
56348
56484
|
async getStreamChunks(name, _runId, options) {
|
|
56349
56485
|
const limit = options?.limit ?? 100;
|
|
56350
|
-
const chunksDir = import_node_path8.default.join(basedir, "streams", "chunks");
|
|
56351
56486
|
const { files: chunkFiles, extMap: fileExtMap } = await listChunkFilesForStream(chunksDir, name, tag);
|
|
56352
56487
|
let startIndex = 0;
|
|
56353
56488
|
if (options?.cursor) {
|
|
@@ -56363,7 +56498,7 @@ function createStreamer(basedir, tag) {
|
|
|
56363
56498
|
let dataIndex = 0;
|
|
56364
56499
|
for (const file2 of chunkFiles) {
|
|
56365
56500
|
const ext2 = fileExtMap.get(file2) ?? ".bin";
|
|
56366
|
-
const filePath =
|
|
56501
|
+
const filePath = import_node_path9.default.join(chunksDir, `${file2}${ext2}`);
|
|
56367
56502
|
if (dataIndex < startIndex) {
|
|
56368
56503
|
if (isEofByte(await readFirstByte(filePath))) {
|
|
56369
56504
|
streamDone = true;
|
|
@@ -56402,13 +56537,12 @@ function createStreamer(basedir, tag) {
|
|
|
56402
56537
|
};
|
|
56403
56538
|
},
|
|
56404
56539
|
async getStreamInfo(name, _runId) {
|
|
56405
|
-
const chunksDir = import_node_path8.default.join(basedir, "streams", "chunks");
|
|
56406
56540
|
const { files: chunkFiles, extMap: fileExtMap } = await listChunkFilesForStream(chunksDir, name, tag);
|
|
56407
56541
|
let streamDone = false;
|
|
56408
56542
|
let dataCount = 0;
|
|
56409
56543
|
for (const file2 of chunkFiles) {
|
|
56410
56544
|
const ext2 = fileExtMap.get(file2) ?? ".bin";
|
|
56411
|
-
if (isEofByte(await readFirstByte(
|
|
56545
|
+
if (isEofByte(await readFirstByte(import_node_path9.default.join(chunksDir, `${file2}${ext2}`)))) {
|
|
56412
56546
|
streamDone = true;
|
|
56413
56547
|
break;
|
|
56414
56548
|
}
|
|
@@ -56417,38 +56551,29 @@ function createStreamer(basedir, tag) {
|
|
|
56417
56551
|
return { tailIndex: dataCount - 1, done: streamDone };
|
|
56418
56552
|
},
|
|
56419
56553
|
async readFromStream(name, startIndex = 0) {
|
|
56420
|
-
const chunksDir = import_node_path8.default.join(basedir, "streams", "chunks");
|
|
56421
56554
|
let removeListeners = /* @__PURE__ */ __name(() => {
|
|
56422
56555
|
}, "removeListeners");
|
|
56423
56556
|
let pollInterval = null;
|
|
56424
56557
|
return new ReadableStream({
|
|
56425
56558
|
async start(controller) {
|
|
56426
56559
|
const deliveredChunkIds = /* @__PURE__ */ new Set();
|
|
56427
|
-
const bufferedEventChunks =
|
|
56560
|
+
const bufferedEventChunks = /* @__PURE__ */ new Map();
|
|
56428
56561
|
let isReadingFromDisk = true;
|
|
56429
56562
|
let pendingClose = false;
|
|
56430
56563
|
let streamClosed = false;
|
|
56431
|
-
const
|
|
56432
|
-
|
|
56433
|
-
|
|
56434
|
-
|
|
56435
|
-
|
|
56436
|
-
if (
|
|
56437
|
-
deliveredChunkIds.add(event.chunkId);
|
|
56438
|
-
bufferedEventChunks.push({
|
|
56439
|
-
chunkId: event.chunkId,
|
|
56440
|
-
chunkData: Uint8Array.from(event.chunkData)
|
|
56441
|
-
});
|
|
56442
|
-
} else if (!deliveredChunkIds.has(event.chunkId)) {
|
|
56443
|
-
deliveredChunkIds.add(event.chunkId);
|
|
56444
|
-
controller.enqueue(Uint8Array.from(event.chunkData));
|
|
56445
|
-
}
|
|
56446
|
-
}, "chunkListener");
|
|
56447
|
-
const closeListener = /* @__PURE__ */ __name(() => {
|
|
56448
|
-
if (isReadingFromDisk) {
|
|
56449
|
-
pendingClose = true;
|
|
56564
|
+
const chunkIdForFile = /* @__PURE__ */ __name((file2) => {
|
|
56565
|
+
const rawChunkId = file2.substring(name.length + 1);
|
|
56566
|
+
return tag ? rawChunkId.replace(`.${tag}`, "") : rawChunkId;
|
|
56567
|
+
}, "chunkIdForFile");
|
|
56568
|
+
const deliver = /* @__PURE__ */ __name((chunkId, chunkData) => {
|
|
56569
|
+
if (streamClosed || deliveredChunkIds.has(chunkId))
|
|
56450
56570
|
return;
|
|
56571
|
+
deliveredChunkIds.add(chunkId);
|
|
56572
|
+
if (chunkData.byteLength) {
|
|
56573
|
+
controller.enqueue(Uint8Array.from(chunkData));
|
|
56451
56574
|
}
|
|
56575
|
+
}, "deliver");
|
|
56576
|
+
const closeStream = /* @__PURE__ */ __name(() => {
|
|
56452
56577
|
streamClosed = true;
|
|
56453
56578
|
streamEmitter.off(`chunk:${name}`, chunkListener);
|
|
56454
56579
|
streamEmitter.off(`close:${name}`, closeListener);
|
|
@@ -56460,8 +56585,47 @@ function createStreamer(basedir, tag) {
|
|
|
56460
56585
|
controller.close();
|
|
56461
56586
|
} catch {
|
|
56462
56587
|
}
|
|
56588
|
+
}, "closeStream");
|
|
56589
|
+
const finishDiskRead = /* @__PURE__ */ __name(() => {
|
|
56590
|
+
isReadingFromDisk = false;
|
|
56591
|
+
const held = [...bufferedEventChunks].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
|
|
56592
|
+
bufferedEventChunks.clear();
|
|
56593
|
+
for (const [chunkId, chunkData] of held) {
|
|
56594
|
+
deliver(chunkId, chunkData);
|
|
56595
|
+
}
|
|
56596
|
+
if (pendingClose)
|
|
56597
|
+
closeStream();
|
|
56598
|
+
}, "finishDiskRead");
|
|
56599
|
+
const deliverFile = /* @__PURE__ */ __name(async (file2, ext2) => {
|
|
56600
|
+
const chunkId = chunkIdForFile(file2);
|
|
56601
|
+
if (deliveredChunkIds.has(chunkId))
|
|
56602
|
+
return false;
|
|
56603
|
+
const live = bufferedEventChunks.get(chunkId);
|
|
56604
|
+
if (live !== void 0) {
|
|
56605
|
+
deliver(chunkId, live);
|
|
56606
|
+
return false;
|
|
56607
|
+
}
|
|
56608
|
+
const chunk = deserializeChunk(await readBuffer(import_node_path9.default.join(chunksDir, `${file2}${ext2}`)));
|
|
56609
|
+
if (chunk?.eof === true)
|
|
56610
|
+
return true;
|
|
56611
|
+
deliver(chunkId, chunk.chunk);
|
|
56612
|
+
return false;
|
|
56613
|
+
}, "deliverFile");
|
|
56614
|
+
const chunkListener = /* @__PURE__ */ __name((event) => {
|
|
56615
|
+
if (isReadingFromDisk) {
|
|
56616
|
+
bufferedEventChunks.set(event.chunkId, Uint8Array.from(event.chunkData));
|
|
56617
|
+
return;
|
|
56618
|
+
}
|
|
56619
|
+
deliver(event.chunkId, event.chunkData);
|
|
56620
|
+
}, "chunkListener");
|
|
56621
|
+
const closeListener = /* @__PURE__ */ __name(() => {
|
|
56622
|
+
if (isReadingFromDisk) {
|
|
56623
|
+
pendingClose = true;
|
|
56624
|
+
return;
|
|
56625
|
+
}
|
|
56626
|
+
closeStream();
|
|
56463
56627
|
}, "closeListener");
|
|
56464
|
-
removeListeners =
|
|
56628
|
+
removeListeners = closeStream;
|
|
56465
56629
|
streamEmitter.on(`chunk:${name}`, chunkListener);
|
|
56466
56630
|
streamEmitter.on(`close:${name}`, closeListener);
|
|
56467
56631
|
const { files: chunkFiles, extMap: fileExtMap } = await listChunkFilesForStream(chunksDir, name, tag);
|
|
@@ -56469,99 +56633,56 @@ function createStreamer(basedir, tag) {
|
|
|
56469
56633
|
if (typeof startIndex === "number" && startIndex < 0 && chunkFiles.length > 0) {
|
|
56470
56634
|
const lastFile = chunkFiles[chunkFiles.length - 1];
|
|
56471
56635
|
const lastExt = fileExtMap.get(lastFile) ?? ".bin";
|
|
56472
|
-
if (isEofByte(await readFirstByte(
|
|
56636
|
+
if (isEofByte(await readFirstByte(import_node_path9.default.join(chunksDir, `${lastFile}${lastExt}`)))) {
|
|
56473
56637
|
dataChunkCount--;
|
|
56474
56638
|
}
|
|
56475
56639
|
}
|
|
56476
56640
|
const resolvedStartIndex = typeof startIndex === "number" && startIndex < 0 ? Math.max(0, dataChunkCount + startIndex) : startIndex;
|
|
56641
|
+
for (let i = 0; i < resolvedStartIndex && i < chunkFiles.length; i++) {
|
|
56642
|
+
deliveredChunkIds.add(chunkIdForFile(chunkFiles[i]));
|
|
56643
|
+
}
|
|
56477
56644
|
let isComplete = false;
|
|
56478
56645
|
for (let i = resolvedStartIndex; i < chunkFiles.length; i++) {
|
|
56479
56646
|
const file2 = chunkFiles[i];
|
|
56480
|
-
|
|
56481
|
-
const chunkId = tag ? rawChunkId.replace(`.${tag}`, "") : rawChunkId;
|
|
56482
|
-
if (deliveredChunkIds.has(chunkId)) {
|
|
56483
|
-
continue;
|
|
56484
|
-
}
|
|
56485
|
-
const ext2 = fileExtMap.get(file2) ?? ".bin";
|
|
56486
|
-
const chunk = deserializeChunk(await readBuffer(import_node_path8.default.join(chunksDir, `${file2}${ext2}`)));
|
|
56487
|
-
if (chunk?.eof === true) {
|
|
56647
|
+
if (await deliverFile(file2, fileExtMap.get(file2) ?? ".bin")) {
|
|
56488
56648
|
isComplete = true;
|
|
56489
56649
|
break;
|
|
56490
56650
|
}
|
|
56491
|
-
deliveredChunkIds.add(chunkId);
|
|
56492
|
-
if (chunk.chunk.byteLength) {
|
|
56493
|
-
controller.enqueue(Uint8Array.from(chunk.chunk));
|
|
56494
|
-
}
|
|
56495
|
-
}
|
|
56496
|
-
isReadingFromDisk = false;
|
|
56497
|
-
bufferedEventChunks.sort((a, b) => a.chunkId.localeCompare(b.chunkId));
|
|
56498
|
-
for (const buffered of bufferedEventChunks) {
|
|
56499
|
-
controller.enqueue(Uint8Array.from(buffered.chunkData));
|
|
56500
56651
|
}
|
|
56652
|
+
finishDiskRead();
|
|
56501
56653
|
if (isComplete) {
|
|
56502
|
-
|
|
56503
|
-
try {
|
|
56504
|
-
controller.close();
|
|
56505
|
-
} catch {
|
|
56506
|
-
}
|
|
56654
|
+
closeStream();
|
|
56507
56655
|
return;
|
|
56508
56656
|
}
|
|
56509
|
-
if (
|
|
56510
|
-
streamEmitter.off(`chunk:${name}`, chunkListener);
|
|
56511
|
-
streamEmitter.off(`close:${name}`, closeListener);
|
|
56512
|
-
try {
|
|
56513
|
-
controller.close();
|
|
56514
|
-
} catch {
|
|
56515
|
-
}
|
|
56657
|
+
if (streamClosed)
|
|
56516
56658
|
return;
|
|
56517
|
-
}
|
|
56518
|
-
for (let i = 0; i < resolvedStartIndex && i < chunkFiles.length; i++) {
|
|
56519
|
-
const file2 = chunkFiles[i];
|
|
56520
|
-
const rawChunkId = file2.substring(name.length + 1);
|
|
56521
|
-
const chunkId = tag ? rawChunkId.replace(`.${tag}`, "") : rawChunkId;
|
|
56522
|
-
deliveredChunkIds.add(chunkId);
|
|
56523
|
-
}
|
|
56524
56659
|
let isPolling = false;
|
|
56525
56660
|
pollInterval = setInterval(async () => {
|
|
56526
|
-
if (isPolling)
|
|
56661
|
+
if (isPolling || streamClosed)
|
|
56527
56662
|
return;
|
|
56528
56663
|
isPolling = true;
|
|
56664
|
+
isReadingFromDisk = true;
|
|
56665
|
+
let readEveryListedFile = false;
|
|
56529
56666
|
try {
|
|
56530
56667
|
const { files: currentFiles, extMap: currentExtMap } = await listChunkFilesForStream(chunksDir, name, tag);
|
|
56531
56668
|
for (const file2 of currentFiles) {
|
|
56532
|
-
|
|
56533
|
-
|
|
56534
|
-
|
|
56535
|
-
continue;
|
|
56536
|
-
deliveredChunkIds.add(chunkId);
|
|
56537
|
-
const ext2 = currentExtMap.get(file2) ?? ".bin";
|
|
56538
|
-
const chunk = deserializeChunk(await readBuffer(import_node_path8.default.join(chunksDir, `${file2}${ext2}`)));
|
|
56539
|
-
if (chunk?.eof === true) {
|
|
56540
|
-
streamClosed = true;
|
|
56541
|
-
if (pollInterval) {
|
|
56542
|
-
clearInterval(pollInterval);
|
|
56543
|
-
pollInterval = null;
|
|
56544
|
-
}
|
|
56545
|
-
streamEmitter.off(`chunk:${name}`, chunkListener);
|
|
56546
|
-
streamEmitter.off(`close:${name}`, closeListener);
|
|
56547
|
-
try {
|
|
56548
|
-
controller.close();
|
|
56549
|
-
} catch {
|
|
56550
|
-
}
|
|
56669
|
+
if (await deliverFile(file2, currentExtMap.get(file2) ?? ".bin")) {
|
|
56670
|
+
finishDiskRead();
|
|
56671
|
+
closeStream();
|
|
56551
56672
|
return;
|
|
56552
56673
|
}
|
|
56553
56674
|
if (streamClosed)
|
|
56554
56675
|
return;
|
|
56555
|
-
if (chunk.chunk.byteLength) {
|
|
56556
|
-
controller.enqueue(Uint8Array.from(chunk.chunk));
|
|
56557
|
-
}
|
|
56558
56676
|
}
|
|
56677
|
+
readEveryListedFile = true;
|
|
56559
56678
|
} catch (err) {
|
|
56560
56679
|
if (!(err instanceof Error && "code" in err)) {
|
|
56561
56680
|
console.error("[world-local] Unexpected polling error:", err);
|
|
56562
56681
|
}
|
|
56563
56682
|
} finally {
|
|
56564
56683
|
isPolling = false;
|
|
56684
|
+
if (readEveryListedFile && !streamClosed)
|
|
56685
|
+
finishDiskRead();
|
|
56565
56686
|
}
|
|
56566
56687
|
}, 100);
|
|
56567
56688
|
},
|
|
@@ -56580,7 +56701,7 @@ __name(createStreamer, "createStreamer");
|
|
|
56580
56701
|
|
|
56581
56702
|
// ../world-local/dist/index.js
|
|
56582
56703
|
async function clearTaggedLocks(basedir, tag) {
|
|
56583
|
-
const locksDir =
|
|
56704
|
+
const locksDir = import_node_path10.default.join(basedir, ".locks");
|
|
56584
56705
|
let lockKindEntries;
|
|
56585
56706
|
try {
|
|
56586
56707
|
lockKindEntries = await import_node_fs2.promises.readdir(locksDir, { withFileTypes: true });
|
|
@@ -56588,11 +56709,11 @@ async function clearTaggedLocks(basedir, tag) {
|
|
|
56588
56709
|
lockKindEntries = [];
|
|
56589
56710
|
}
|
|
56590
56711
|
await Promise.all(lockKindEntries.filter((entry) => entry.isDirectory()).map(async (entry) => {
|
|
56591
|
-
const lockKindDir =
|
|
56712
|
+
const lockKindDir = import_node_path10.default.join(locksDir, entry.name);
|
|
56592
56713
|
const lockNames = await import_node_fs2.promises.readdir(lockKindDir).catch(() => []);
|
|
56593
56714
|
await Promise.all(lockNames.filter((name) => name.endsWith(`.${tag}`)).map((name) => (
|
|
56594
56715
|
// Recursive: a run's staged hook events are a directory.
|
|
56595
|
-
import_node_fs2.promises.rm(
|
|
56716
|
+
import_node_fs2.promises.rm(import_node_path10.default.join(lockKindDir, name), {
|
|
56596
56717
|
recursive: true,
|
|
56597
56718
|
force: true
|
|
56598
56719
|
})
|
|
@@ -56641,13 +56762,13 @@ function createLocalWorld(args) {
|
|
|
56641
56762
|
clearStorageCache();
|
|
56642
56763
|
if (tag) {
|
|
56643
56764
|
const basedir = mergedConfig.dataDir;
|
|
56644
|
-
const hooksDir =
|
|
56765
|
+
const hooksDir = import_node_path10.default.join(basedir, "hooks");
|
|
56645
56766
|
const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
|
|
56646
56767
|
const { HookSchema: HookSchema2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
|
56647
56768
|
await Promise.all(taggedHookFiles.map(async (hookFile) => {
|
|
56648
|
-
const hook = await readJSON(
|
|
56769
|
+
const hook = await readJSON(import_node_path10.default.join(hooksDir, hookFile), HookSchema2);
|
|
56649
56770
|
if (hook?.token) {
|
|
56650
|
-
await deleteJSON(
|
|
56771
|
+
await deleteJSON(import_node_path10.default.join(hooksDir, "tokens", `${hashToken(hook.token)}.json`));
|
|
56651
56772
|
await deleteJSON(hookRecoveryMarkerPath(basedir, hook.token, hook.runId, hook.hookId));
|
|
56652
56773
|
}
|
|
56653
56774
|
}));
|
|
@@ -56660,19 +56781,19 @@ function createLocalWorld(args) {
|
|
|
56660
56781
|
"streams/runs"
|
|
56661
56782
|
];
|
|
56662
56783
|
await Promise.all(entityDirs.map(async (dir) => {
|
|
56663
|
-
const fullDir =
|
|
56784
|
+
const fullDir = import_node_path10.default.join(basedir, dir);
|
|
56664
56785
|
const files = await listTaggedFiles(fullDir, tag);
|
|
56665
|
-
await Promise.all(files.map((f) => deleteJSON(
|
|
56786
|
+
await Promise.all(files.map((f) => deleteJSON(import_node_path10.default.join(fullDir, f))));
|
|
56666
56787
|
}));
|
|
56667
56788
|
await clearTaggedLocks(basedir, tag);
|
|
56668
|
-
const chunksDir =
|
|
56789
|
+
const chunksDir = import_node_path10.default.join(basedir, "streams", "chunks");
|
|
56669
56790
|
const taggedBinFiles = await listTaggedFilesByExtension(chunksDir, tag, ".bin");
|
|
56670
|
-
await Promise.all(taggedBinFiles.map((f) => import_node_fs2.promises.unlink(
|
|
56791
|
+
await Promise.all(taggedBinFiles.map((f) => import_node_fs2.promises.unlink(import_node_path10.default.join(chunksDir, f)).catch(() => {
|
|
56671
56792
|
})));
|
|
56672
56793
|
clearCreatedFilesCache();
|
|
56673
56794
|
} else {
|
|
56674
56795
|
clearCreatedFilesCache();
|
|
56675
|
-
await (0,
|
|
56796
|
+
await (0, import_promises7.rm)(mergedConfig.dataDir, { recursive: true, force: true });
|
|
56676
56797
|
await initDataDir(mergedConfig.dataDir);
|
|
56677
56798
|
}
|
|
56678
56799
|
clearStreamerCache();
|
|
@@ -56685,7 +56806,7 @@ __name(createLocalWorld, "createLocalWorld");
|
|
|
56685
56806
|
init_dist();
|
|
56686
56807
|
|
|
56687
56808
|
// ../world-vercel/dist/encryption.js
|
|
56688
|
-
var
|
|
56809
|
+
var import_node_crypto4 = require("node:crypto");
|
|
56689
56810
|
init_zod();
|
|
56690
56811
|
|
|
56691
56812
|
// ../world-vercel/dist/http-client.js
|
|
@@ -57543,9 +57664,9 @@ async function deriveRunKey(deploymentKey, projectId, runId) {
|
|
|
57543
57664
|
if (!projectId || typeof projectId !== "string") {
|
|
57544
57665
|
throw new Error("projectId must be a non-empty string");
|
|
57545
57666
|
}
|
|
57546
|
-
const baseKey = await
|
|
57667
|
+
const baseKey = await import_node_crypto4.webcrypto.subtle.importKey("raw", deploymentKey, "HKDF", false, ["deriveBits"]);
|
|
57547
57668
|
const info = new TextEncoder().encode(`${projectId}|${runId}`);
|
|
57548
|
-
const derivedBits = await
|
|
57669
|
+
const derivedBits = await import_node_crypto4.webcrypto.subtle.deriveBits(
|
|
57549
57670
|
{
|
|
57550
57671
|
name: "HKDF",
|
|
57551
57672
|
hash: "SHA-256",
|
|
@@ -58216,9 +58337,9 @@ var StreamingMultipartParser = class {
|
|
|
58216
58337
|
};
|
|
58217
58338
|
|
|
58218
58339
|
// ../../node_modules/.pnpm/@vercel+queue@0.3.1/node_modules/@vercel/queue/dist/index.mjs
|
|
58219
|
-
var
|
|
58340
|
+
var fs6 = __toESM(require("fs"), 1);
|
|
58220
58341
|
var net = __toESM(require("net"), 1);
|
|
58221
|
-
var
|
|
58342
|
+
var path12 = __toESM(require("path"), 1);
|
|
58222
58343
|
|
|
58223
58344
|
// ../../node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js
|
|
58224
58345
|
var balanced = /* @__PURE__ */ __name((a, b, str) => {
|
|
@@ -59285,11 +59406,11 @@ var qmarksTestNoExtDot = /* @__PURE__ */ __name(([$0]) => {
|
|
|
59285
59406
|
return (f) => f.length === len && f !== "." && f !== "..";
|
|
59286
59407
|
}, "qmarksTestNoExtDot");
|
|
59287
59408
|
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
59288
|
-
var
|
|
59409
|
+
var path11 = {
|
|
59289
59410
|
win32: { sep: "\\" },
|
|
59290
59411
|
posix: { sep: "/" }
|
|
59291
59412
|
};
|
|
59292
|
-
var sep = defaultPlatform === "win32" ?
|
|
59413
|
+
var sep = defaultPlatform === "win32" ? path11.win32.sep : path11.posix.sep;
|
|
59293
59414
|
minimatch.sep = sep;
|
|
59294
59415
|
var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **");
|
|
59295
59416
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
@@ -60847,12 +60968,12 @@ function getDevRouteMappings() {
|
|
|
60847
60968
|
return g[ROUTE_MAPPINGS_KEY] ?? null;
|
|
60848
60969
|
}
|
|
60849
60970
|
try {
|
|
60850
|
-
const vercelJsonPath =
|
|
60851
|
-
if (!
|
|
60971
|
+
const vercelJsonPath = path12.join(process.cwd(), "vercel.json");
|
|
60972
|
+
if (!fs6.existsSync(vercelJsonPath)) {
|
|
60852
60973
|
g[ROUTE_MAPPINGS_KEY] = null;
|
|
60853
60974
|
return null;
|
|
60854
60975
|
}
|
|
60855
|
-
const vercelJson = JSON.parse(
|
|
60976
|
+
const vercelJson = JSON.parse(fs6.readFileSync(vercelJsonPath, "utf-8"));
|
|
60856
60977
|
if (!vercelJson.functions) {
|
|
60857
60978
|
g[ROUTE_MAPPINGS_KEY] = null;
|
|
60858
60979
|
return null;
|
|
@@ -60919,7 +61040,7 @@ function findMappingsForFile(absolutePath) {
|
|
|
60919
61040
|
const cwd = process.cwd();
|
|
60920
61041
|
let relative2;
|
|
60921
61042
|
try {
|
|
60922
|
-
relative2 =
|
|
61043
|
+
relative2 = path12.relative(cwd, absolutePath);
|
|
60923
61044
|
} catch {
|
|
60924
61045
|
return [];
|
|
60925
61046
|
}
|
|
@@ -60958,8 +61079,8 @@ var _sdkPackageDir;
|
|
|
60958
61079
|
function getSdkPackageDir() {
|
|
60959
61080
|
if (_sdkPackageDir) return _sdkPackageDir;
|
|
60960
61081
|
try {
|
|
60961
|
-
const thisDir = typeof __dirname !== "undefined" ? __dirname :
|
|
60962
|
-
_sdkPackageDir =
|
|
61082
|
+
const thisDir = typeof __dirname !== "undefined" ? __dirname : path12.dirname(new URL(import_meta2.url).pathname);
|
|
61083
|
+
_sdkPackageDir = path12.resolve(thisDir, "..");
|
|
60963
61084
|
} catch {
|
|
60964
61085
|
_sdkPackageDir = "";
|
|
60965
61086
|
}
|
|
@@ -60974,10 +61095,10 @@ function extractCallerFilePath() {
|
|
|
60974
61095
|
for (const line of lines) {
|
|
60975
61096
|
const fp = parseFrameFilePath(line);
|
|
60976
61097
|
if (!fp) continue;
|
|
60977
|
-
const absolute =
|
|
61098
|
+
const absolute = path12.isAbsolute(fp) ? fp : path12.resolve(process.cwd(), fp);
|
|
60978
61099
|
let realFp;
|
|
60979
61100
|
try {
|
|
60980
|
-
realFp =
|
|
61101
|
+
realFp = fs6.realpathSync(absolute);
|
|
60981
61102
|
} catch {
|
|
60982
61103
|
realFp = absolute;
|
|
60983
61104
|
}
|
|
@@ -60997,7 +61118,7 @@ function getHandlerRegistry() {
|
|
|
60997
61118
|
}
|
|
60998
61119
|
__name(getHandlerRegistry, "getHandlerRegistry");
|
|
60999
61120
|
function registerHandlerForFile(filePath, handler, client, options) {
|
|
61000
|
-
const absolutePath =
|
|
61121
|
+
const absolutePath = path12.isAbsolute(filePath) ? filePath : path12.resolve(process.cwd(), filePath);
|
|
61001
61122
|
const fileMappings = findMappingsForFile(absolutePath);
|
|
61002
61123
|
if (fileMappings.length === 0) return false;
|
|
61003
61124
|
const registry2 = getHandlerRegistry();
|
|
@@ -61045,7 +61166,7 @@ function registerDevHandler(handler, client, options, _testCallerPath) {
|
|
|
61045
61166
|
const cwd = process.cwd();
|
|
61046
61167
|
let relative2;
|
|
61047
61168
|
try {
|
|
61048
|
-
relative2 =
|
|
61169
|
+
relative2 = path12.relative(cwd, callerPath).replace(/\\/g, "/");
|
|
61049
61170
|
} catch {
|
|
61050
61171
|
relative2 = callerPath;
|
|
61051
61172
|
}
|
|
@@ -61214,7 +61335,7 @@ async function ensureHandlersLoaded(topicName, options = {}) {
|
|
|
61214
61335
|
continue;
|
|
61215
61336
|
}
|
|
61216
61337
|
if (!alreadyRegistered) {
|
|
61217
|
-
const absolutePath =
|
|
61338
|
+
const absolutePath = path12.resolve(process.cwd(), route.filePath);
|
|
61218
61339
|
try {
|
|
61219
61340
|
await import(absolutePath);
|
|
61220
61341
|
} catch (error48) {
|
|
@@ -66551,7 +66672,7 @@ function createVercelWorld(config3) {
|
|
|
66551
66672
|
__name(createVercelWorld, "createVercelWorld");
|
|
66552
66673
|
|
|
66553
66674
|
// ../core/dist/runtime/world.js
|
|
66554
|
-
var require2 = (0, import_node_module.createRequire)((0,
|
|
66675
|
+
var require2 = (0, import_node_module.createRequire)((0, import_node_path11.join)(process.cwd(), "index.js"));
|
|
66555
66676
|
var WorldCache = /* @__PURE__ */ Symbol.for("@workflow/world//cache");
|
|
66556
66677
|
var StubbedWorldCache = /* @__PURE__ */ Symbol.for("@workflow/world//stubbedCache");
|
|
66557
66678
|
var globalSymbols = globalThis;
|
|
@@ -69633,17 +69754,17 @@ function parseAbsoluteUrl(input) {
|
|
|
69633
69754
|
__name(parseAbsoluteUrl, "parseAbsoluteUrl");
|
|
69634
69755
|
function parseFileUrl(input) {
|
|
69635
69756
|
const match2 = fileRegex.exec(input);
|
|
69636
|
-
const
|
|
69637
|
-
return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(
|
|
69757
|
+
const path13 = match2[2];
|
|
69758
|
+
return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path13) ? path13 : "/" + path13, match2[3] || "", match2[4] || "");
|
|
69638
69759
|
}
|
|
69639
69760
|
__name(parseFileUrl, "parseFileUrl");
|
|
69640
|
-
function makeUrl(scheme, user, host, port,
|
|
69761
|
+
function makeUrl(scheme, user, host, port, path13, query, hash2) {
|
|
69641
69762
|
return {
|
|
69642
69763
|
scheme,
|
|
69643
69764
|
user,
|
|
69644
69765
|
host,
|
|
69645
69766
|
port,
|
|
69646
|
-
path:
|
|
69767
|
+
path: path13,
|
|
69647
69768
|
query,
|
|
69648
69769
|
hash: hash2,
|
|
69649
69770
|
type: 7
|
|
@@ -69675,11 +69796,11 @@ function parseUrl(input) {
|
|
|
69675
69796
|
return url2;
|
|
69676
69797
|
}
|
|
69677
69798
|
__name(parseUrl, "parseUrl");
|
|
69678
|
-
function stripPathFilename(
|
|
69679
|
-
if (
|
|
69680
|
-
return
|
|
69681
|
-
const index =
|
|
69682
|
-
return
|
|
69799
|
+
function stripPathFilename(path13) {
|
|
69800
|
+
if (path13.endsWith("/.."))
|
|
69801
|
+
return path13;
|
|
69802
|
+
const index = path13.lastIndexOf("/");
|
|
69803
|
+
return path13.slice(0, index + 1);
|
|
69683
69804
|
}
|
|
69684
69805
|
__name(stripPathFilename, "stripPathFilename");
|
|
69685
69806
|
function mergePaths(url2, base) {
|
|
@@ -69719,14 +69840,14 @@ function normalizePath(url2, type) {
|
|
|
69719
69840
|
pieces[pointer++] = piece;
|
|
69720
69841
|
positive++;
|
|
69721
69842
|
}
|
|
69722
|
-
let
|
|
69843
|
+
let path13 = "";
|
|
69723
69844
|
for (let i = 1; i < pointer; i++) {
|
|
69724
|
-
|
|
69845
|
+
path13 += "/" + pieces[i];
|
|
69725
69846
|
}
|
|
69726
|
-
if (!
|
|
69727
|
-
|
|
69847
|
+
if (!path13 || addTrailingSlash && !path13.endsWith("/..")) {
|
|
69848
|
+
path13 += "/";
|
|
69728
69849
|
}
|
|
69729
|
-
url2.path =
|
|
69850
|
+
url2.path = path13;
|
|
69730
69851
|
}
|
|
69731
69852
|
__name(normalizePath, "normalizePath");
|
|
69732
69853
|
function resolve2(input, base) {
|
|
@@ -69768,13 +69889,13 @@ function resolve2(input, base) {
|
|
|
69768
69889
|
case 3:
|
|
69769
69890
|
return queryHash;
|
|
69770
69891
|
case 4: {
|
|
69771
|
-
const
|
|
69772
|
-
if (!
|
|
69892
|
+
const path13 = url2.path.slice(1);
|
|
69893
|
+
if (!path13)
|
|
69773
69894
|
return queryHash || ".";
|
|
69774
|
-
if (isRelative(base || input) && !isRelative(
|
|
69775
|
-
return "./" +
|
|
69895
|
+
if (isRelative(base || input) && !isRelative(path13)) {
|
|
69896
|
+
return "./" + path13 + queryHash;
|
|
69776
69897
|
}
|
|
69777
|
-
return
|
|
69898
|
+
return path13 + queryHash;
|
|
69778
69899
|
}
|
|
69779
69900
|
case 5:
|
|
69780
69901
|
return url2.path + queryHash;
|
|
@@ -69785,10 +69906,10 @@ function resolve2(input, base) {
|
|
|
69785
69906
|
__name(resolve2, "resolve");
|
|
69786
69907
|
|
|
69787
69908
|
// ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
|
|
69788
|
-
function stripFilename(
|
|
69789
|
-
if (!
|
|
69790
|
-
const index =
|
|
69791
|
-
return
|
|
69909
|
+
function stripFilename(path13) {
|
|
69910
|
+
if (!path13) return "";
|
|
69911
|
+
const index = path13.lastIndexOf("/");
|
|
69912
|
+
return path13.slice(0, index + 1);
|
|
69792
69913
|
}
|
|
69793
69914
|
__name(stripFilename, "stripFilename");
|
|
69794
69915
|
function resolver(mapUrl, sourceRoot) {
|
|
@@ -71021,7 +71142,7 @@ __name(installUint8ArrayBase64, "installUint8ArrayBase64");
|
|
|
71021
71142
|
|
|
71022
71143
|
// ../core/dist/vm/uuid.js
|
|
71023
71144
|
function createRandomUUID(rng) {
|
|
71024
|
-
return /* @__PURE__ */ __name(function
|
|
71145
|
+
return /* @__PURE__ */ __name(function randomUUID2() {
|
|
71025
71146
|
const chars2 = "0123456789abcdef";
|
|
71026
71147
|
let uuid3 = "";
|
|
71027
71148
|
for (let i = 0; i < 36; i++) {
|
|
@@ -71067,7 +71188,7 @@ function createContext(options) {
|
|
|
71067
71188
|
return array2;
|
|
71068
71189
|
}
|
|
71069
71190
|
__name(getRandomValues, "getRandomValues");
|
|
71070
|
-
const
|
|
71191
|
+
const randomUUID2 = createRandomUUID(rng);
|
|
71071
71192
|
const boundDigest = originalSubtle.digest.bind(originalSubtle);
|
|
71072
71193
|
g.crypto = new Proxy(originalCrypto, {
|
|
71073
71194
|
get(target2, prop) {
|
|
@@ -71075,7 +71196,7 @@ function createContext(options) {
|
|
|
71075
71196
|
return getRandomValues;
|
|
71076
71197
|
}
|
|
71077
71198
|
if (prop === "randomUUID") {
|
|
71078
|
-
return
|
|
71199
|
+
return randomUUID2;
|
|
71079
71200
|
}
|
|
71080
71201
|
if (prop === "subtle") {
|
|
71081
71202
|
return new Proxy(originalSubtle, {
|