@inerrata-corporation/errata 2.0.22-dev.4355 → 2.0.22-dev.4430
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +2 -2
- package/consolidate-worker.mjs +9 -5
- package/errata.mjs +167 -132
- package/package.json +1 -1
- package/resources/context-plugin/.codex-plugin/plugin.json +1 -1
- package/resources/context-plugin/SHA256SUMS +3 -3
- package/resources/context-plugin/THIRD-PARTY-NOTICES.md +5 -7
- package/resources/context-plugin/dist/mcp-server.mjs +545 -148
package/errata.mjs
CHANGED
|
@@ -1084,9 +1084,13 @@ function predicateIsTheEntity(text, entityId, entityCount) {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
function canonicalClaimId(text, scope) {
|
|
1086
1086
|
const s = claimStructure(text, scope);
|
|
1087
|
-
return digest(
|
|
1088
|
-
|
|
1089
|
-
|
|
1087
|
+
return s.raw !== void 0 ? conceptDigest(s.raw, s.scope, s.stance) : digest({ entities: s.entities, predicate: s.predicate, stance: s.stance, scope: s.scope });
|
|
1088
|
+
}
|
|
1089
|
+
function conceptClaimId(text, scope) {
|
|
1090
|
+
return conceptDigest(conceptBag(text), scope ?? {}, detectStance(text));
|
|
1091
|
+
}
|
|
1092
|
+
function conceptDigest(raw2, scope, stance) {
|
|
1093
|
+
return digest({ raw: raw2, scope, stance });
|
|
1090
1094
|
}
|
|
1091
1095
|
var init_claim_id = __esm({
|
|
1092
1096
|
"../../packages/shared/src/nlp/claim-id.ts"() {
|
|
@@ -1114,14 +1118,14 @@ function identityId(input) {
|
|
|
1114
1118
|
statement: canonicalClaimId(input.statement.trim())
|
|
1115
1119
|
});
|
|
1116
1120
|
case "DesignProblem":
|
|
1117
|
-
return `${DESIGN_PROBLEM_PREFIX}${
|
|
1121
|
+
return `${DESIGN_PROBLEM_PREFIX}${conceptClaimId(input.statement.trim())}`.slice(
|
|
1118
1122
|
0,
|
|
1119
1123
|
DESIGN_PROBLEM_ID_LENGTH
|
|
1120
1124
|
);
|
|
1121
1125
|
case "DiagnosticProblem":
|
|
1122
1126
|
return `${DIAGNOSTIC_PROBLEM_PREFIX}${digest({ key: input.key }).slice(0, DIAGNOSTIC_HASH_LENGTH)}`;
|
|
1123
1127
|
case "Triage":
|
|
1124
|
-
return `${TRIAGE_PREFIX}${
|
|
1128
|
+
return `${TRIAGE_PREFIX}${conceptClaimId(input.statement.trim())}`.slice(
|
|
1125
1129
|
0,
|
|
1126
1130
|
TRIAGE_ID_LENGTH
|
|
1127
1131
|
);
|
|
@@ -17667,6 +17671,7 @@ __export(src_exports, {
|
|
|
17667
17671
|
claimStructure: () => claimStructure,
|
|
17668
17672
|
compactHistoryQuality: () => compactHistoryQuality,
|
|
17669
17673
|
conceptBag: () => conceptBag,
|
|
17674
|
+
conceptClaimId: () => conceptClaimId,
|
|
17670
17675
|
conceptTokens: () => conceptTokens,
|
|
17671
17676
|
depLanguage: () => depLanguage,
|
|
17672
17677
|
depPurl: () => depPurl,
|
|
@@ -29938,31 +29943,9 @@ var init_config = __esm({
|
|
|
29938
29943
|
});
|
|
29939
29944
|
|
|
29940
29945
|
// src/cloud-endpoint-policy.ts
|
|
29941
|
-
function warnDirectV1OverrideOnce() {
|
|
29942
|
-
if (warnedDirectV1Override) return;
|
|
29943
|
-
warnedDirectV1Override = true;
|
|
29944
|
-
console.error(
|
|
29945
|
-
[
|
|
29946
|
-
"",
|
|
29947
|
-
"!!! DIRECT V1 OVERRIDE ACTIVE !!!",
|
|
29948
|
-
`${DIRECT_V1_OVERRIDE_ENV} + ${DIRECT_V1_ACK_ENV} are set: this daemon is talking`,
|
|
29949
|
-
"straight to the legacy v1 data plane, BYPASSING the Console Gateway \u2014",
|
|
29950
|
-
"no metering, no signed context enforcement, no write-target binding.",
|
|
29951
|
-
"Staff testing only. This escape hatch is removed at v1 EOL.",
|
|
29952
|
-
""
|
|
29953
|
-
].join("\n")
|
|
29954
|
-
);
|
|
29955
|
-
}
|
|
29956
|
-
function isDirectV1OverrideRequested() {
|
|
29957
|
-
const raw2 = process.env[DIRECT_V1_OVERRIDE_ENV]?.trim().toLowerCase();
|
|
29958
|
-
return raw2 === "1" || raw2 === "true" || raw2 === "yes" || raw2 === "on";
|
|
29959
|
-
}
|
|
29960
29946
|
function normalizeCloudUrl(url2) {
|
|
29961
29947
|
return url2.replace(/\/+$/, "");
|
|
29962
29948
|
}
|
|
29963
|
-
function isDirectV1OverrideEnabled() {
|
|
29964
|
-
return isDirectV1OverrideRequested() && process.env[DIRECT_V1_ACK_ENV]?.trim() === DIRECT_V1_ACK_VALUE;
|
|
29965
|
-
}
|
|
29966
29949
|
function isLocalCloudUrl(url2) {
|
|
29967
29950
|
try {
|
|
29968
29951
|
const host = new URL(url2).hostname.toLowerCase();
|
|
@@ -29992,21 +29975,12 @@ function evaluateCloudEndpoint(url2, inspection) {
|
|
|
29992
29975
|
if (looksLikeGatewayCloudUrl(url2)) {
|
|
29993
29976
|
return { allowed: true, label: "gateway-configured" };
|
|
29994
29977
|
}
|
|
29995
|
-
if (isDirectV1OverrideEnabled()) {
|
|
29996
|
-
warnDirectV1OverrideOnce();
|
|
29997
|
-
return {
|
|
29998
|
-
allowed: true,
|
|
29999
|
-
label: "legacy-direct (override)",
|
|
30000
|
-
reason: `${DIRECT_V1_OVERRIDE_ENV} acknowledged via ${DIRECT_V1_ACK_ENV}`
|
|
30001
|
-
};
|
|
30002
|
-
}
|
|
30003
29978
|
const service = inspection?.service ? ` (${inspection.service})` : "";
|
|
30004
|
-
const unacked = isDirectV1OverrideRequested() ? ` ${DIRECT_V1_OVERRIDE_ENV} is set but unacknowledged \u2014 staff testing additionally requires ${DIRECT_V1_ACK_ENV}=${DIRECT_V1_ACK_VALUE}.` : "";
|
|
30005
29979
|
return {
|
|
30006
29980
|
allowed: false,
|
|
30007
29981
|
label: "legacy-direct blocked",
|
|
30008
29982
|
reason: `non-local cloud endpoint is not the Console Gateway${service}`,
|
|
30009
|
-
guidance:
|
|
29983
|
+
guidance: "Point ERRATA_CLOUD_URL at the Console Gateway."
|
|
30010
29984
|
};
|
|
30011
29985
|
}
|
|
30012
29986
|
function formatCloudEndpointBlock(url2, decision) {
|
|
@@ -30148,16 +30122,12 @@ async function fetchHealthJson(fetchFn, url2, timeoutMs) {
|
|
|
30148
30122
|
clearTimeout(tid);
|
|
30149
30123
|
}
|
|
30150
30124
|
}
|
|
30151
|
-
var
|
|
30125
|
+
var GATEWAY_SERVICE, PROBE_TIMEOUT_MS, CloudEndpointPolicyError, BLOCKED_RECHECK_MS;
|
|
30152
30126
|
var init_cloud_endpoint_policy = __esm({
|
|
30153
30127
|
"src/cloud-endpoint-policy.ts"() {
|
|
30154
30128
|
"use strict";
|
|
30155
|
-
DIRECT_V1_OVERRIDE_ENV = "ERRATA_ALLOW_DIRECT_V1_CLOUD";
|
|
30156
|
-
DIRECT_V1_ACK_ENV = "ERRATA_DIRECT_V1_ACK";
|
|
30157
|
-
DIRECT_V1_ACK_VALUE = "I_ACCEPT_UNMETERED_DIRECT_V1";
|
|
30158
30129
|
GATEWAY_SERVICE = "console-gateway";
|
|
30159
30130
|
PROBE_TIMEOUT_MS = 2e3;
|
|
30160
|
-
warnedDirectV1Override = false;
|
|
30161
30131
|
CloudEndpointPolicyError = class extends Error {
|
|
30162
30132
|
decision;
|
|
30163
30133
|
constructor(message2, decision) {
|
|
@@ -30324,10 +30294,10 @@ var init_cloud_auth = __esm({
|
|
|
30324
30294
|
}
|
|
30325
30295
|
});
|
|
30326
30296
|
|
|
30327
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
30297
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/compose.js
|
|
30328
30298
|
var compose;
|
|
30329
30299
|
var init_compose = __esm({
|
|
30330
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
30300
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/compose.js"() {
|
|
30331
30301
|
compose = (middleware, onError, onNotFound) => {
|
|
30332
30302
|
return (context, next) => {
|
|
30333
30303
|
let index = -1;
|
|
@@ -30373,23 +30343,58 @@ var init_compose = __esm({
|
|
|
30373
30343
|
}
|
|
30374
30344
|
});
|
|
30375
30345
|
|
|
30376
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
30346
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/http-exception.js
|
|
30377
30347
|
var init_http_exception = __esm({
|
|
30378
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
30348
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/http-exception.js"() {
|
|
30379
30349
|
}
|
|
30380
30350
|
});
|
|
30381
30351
|
|
|
30382
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
30352
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/request/constants.js
|
|
30383
30353
|
var GET_MATCH_RESULT;
|
|
30384
30354
|
var init_constants2 = __esm({
|
|
30385
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
30355
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/request/constants.js"() {
|
|
30386
30356
|
GET_MATCH_RESULT = /* @__PURE__ */ Symbol();
|
|
30387
30357
|
}
|
|
30388
30358
|
});
|
|
30389
30359
|
|
|
30390
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
30360
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/utils/crypto.js
|
|
30361
|
+
var init_crypto = __esm({
|
|
30362
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/utils/crypto.js"() {
|
|
30363
|
+
}
|
|
30364
|
+
});
|
|
30365
|
+
|
|
30366
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/utils/buffer.js
|
|
30367
|
+
var bufferToFormData;
|
|
30368
|
+
var init_buffer = __esm({
|
|
30369
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/utils/buffer.js"() {
|
|
30370
|
+
init_crypto();
|
|
30371
|
+
bufferToFormData = (arrayBuffer, contentType) => {
|
|
30372
|
+
const response = new Response(arrayBuffer, {
|
|
30373
|
+
headers: {
|
|
30374
|
+
// Normalize the media type (case-insensitive) while keeping parameters like the boundary
|
|
30375
|
+
"Content-Type": contentType.replace(/^[^;]+/, (mediaType) => mediaType.toLowerCase())
|
|
30376
|
+
}
|
|
30377
|
+
});
|
|
30378
|
+
return response.formData();
|
|
30379
|
+
};
|
|
30380
|
+
}
|
|
30381
|
+
});
|
|
30382
|
+
|
|
30383
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/utils/body.js
|
|
30391
30384
|
async function parseFormData(request, options) {
|
|
30392
|
-
|
|
30385
|
+
if (!isRawRequest(request) && request.bodyCache.formData) {
|
|
30386
|
+
return convertFormDataToBodyData(
|
|
30387
|
+
await request.bodyCache.formData,
|
|
30388
|
+
options
|
|
30389
|
+
);
|
|
30390
|
+
}
|
|
30391
|
+
const headers = isRawRequest(request) ? request.headers : request.raw.headers;
|
|
30392
|
+
const arrayBuffer = await request.arrayBuffer();
|
|
30393
|
+
const formDataPromise = bufferToFormData(arrayBuffer, headers.get("Content-Type") || "");
|
|
30394
|
+
if (!isRawRequest(request)) {
|
|
30395
|
+
request.bodyCache.formData = formDataPromise;
|
|
30396
|
+
}
|
|
30397
|
+
const formData = await formDataPromise;
|
|
30393
30398
|
if (formData) {
|
|
30394
30399
|
return convertFormDataToBodyData(formData, options);
|
|
30395
30400
|
}
|
|
@@ -30416,15 +30421,17 @@ function convertFormDataToBodyData(formData, options) {
|
|
|
30416
30421
|
}
|
|
30417
30422
|
return form;
|
|
30418
30423
|
}
|
|
30419
|
-
var parseBody, handleParsingAllValues, handleParsingNestedValues;
|
|
30424
|
+
var isRawRequest, parseBody, handleParsingAllValues, handleParsingNestedValues;
|
|
30420
30425
|
var init_body = __esm({
|
|
30421
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
30422
|
-
|
|
30426
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/utils/body.js"() {
|
|
30427
|
+
init_buffer();
|
|
30428
|
+
isRawRequest = (request) => "headers" in request;
|
|
30423
30429
|
parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => {
|
|
30424
30430
|
const { all = false, dot = false } = options;
|
|
30425
|
-
const headers = request
|
|
30431
|
+
const headers = isRawRequest(request) ? request.headers : request.raw.headers;
|
|
30426
30432
|
const contentType = headers.get("Content-Type");
|
|
30427
|
-
|
|
30433
|
+
const mediaType = contentType?.split(";")[0].trim().toLowerCase();
|
|
30434
|
+
if (mediaType === "multipart/form-data" || mediaType === "application/x-www-form-urlencoded") {
|
|
30428
30435
|
return parseFormData(request, { all, dot });
|
|
30429
30436
|
}
|
|
30430
30437
|
return {};
|
|
@@ -30465,10 +30472,10 @@ var init_body = __esm({
|
|
|
30465
30472
|
}
|
|
30466
30473
|
});
|
|
30467
30474
|
|
|
30468
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
30475
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/utils/url.js
|
|
30469
30476
|
var splitPath, splitRoutingPath, extractGroupsFromPath, replaceGroupMarks, patternCache, getPattern, tryDecode, tryDecodeURI, getPath, getPathNoStrict, mergePath, checkOptionalParameter, _decodeURI, _getQueryParam, getQueryParam, getQueryParams, decodeURIComponent_;
|
|
30470
30477
|
var init_url = __esm({
|
|
30471
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
30478
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/utils/url.js"() {
|
|
30472
30479
|
splitPath = (path3) => {
|
|
30473
30480
|
const paths = path3.split("/");
|
|
30474
30481
|
if (paths[0] === "") {
|
|
@@ -30625,7 +30632,7 @@ var init_url = __esm({
|
|
|
30625
30632
|
return void 0;
|
|
30626
30633
|
}
|
|
30627
30634
|
}
|
|
30628
|
-
const results =
|
|
30635
|
+
const results = /* @__PURE__ */ Object.create(null);
|
|
30629
30636
|
encoded ??= /[%+]/.test(url2);
|
|
30630
30637
|
let keyIndex = url2.indexOf("?", 8);
|
|
30631
30638
|
while (keyIndex !== -1) {
|
|
@@ -30674,10 +30681,10 @@ var init_url = __esm({
|
|
|
30674
30681
|
}
|
|
30675
30682
|
});
|
|
30676
30683
|
|
|
30677
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
30684
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/request.js
|
|
30678
30685
|
var tryDecodeURIComponent, HonoRequest;
|
|
30679
30686
|
var init_request = __esm({
|
|
30680
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
30687
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/request.js"() {
|
|
30681
30688
|
init_http_exception();
|
|
30682
30689
|
init_constants2();
|
|
30683
30690
|
init_body();
|
|
@@ -30755,14 +30762,14 @@ var init_request = __esm({
|
|
|
30755
30762
|
if (name2) {
|
|
30756
30763
|
return this.raw.headers.get(name2) ?? void 0;
|
|
30757
30764
|
}
|
|
30758
|
-
const headerData =
|
|
30765
|
+
const headerData = /* @__PURE__ */ Object.create(null);
|
|
30759
30766
|
this.raw.headers.forEach((value, key) => {
|
|
30760
30767
|
headerData[key] = value;
|
|
30761
30768
|
});
|
|
30762
30769
|
return headerData;
|
|
30763
30770
|
}
|
|
30764
30771
|
async parseBody(options) {
|
|
30765
|
-
return
|
|
30772
|
+
return parseBody(this, options);
|
|
30766
30773
|
}
|
|
30767
30774
|
#cachedBody = (key) => {
|
|
30768
30775
|
const { bodyCache, raw: raw2 } = this;
|
|
@@ -30826,6 +30833,21 @@ var init_request = __esm({
|
|
|
30826
30833
|
arrayBuffer() {
|
|
30827
30834
|
return this.#cachedBody("arrayBuffer");
|
|
30828
30835
|
}
|
|
30836
|
+
/**
|
|
30837
|
+
* `.bytes()` parses the request body as a `Uint8Array`.
|
|
30838
|
+
*
|
|
30839
|
+
* @see {@link https://hono.dev/docs/api/request#bytes}
|
|
30840
|
+
*
|
|
30841
|
+
* @example
|
|
30842
|
+
* ```ts
|
|
30843
|
+
* app.post('/entry', async (c) => {
|
|
30844
|
+
* const body = await c.req.bytes()
|
|
30845
|
+
* })
|
|
30846
|
+
* ```
|
|
30847
|
+
*/
|
|
30848
|
+
bytes() {
|
|
30849
|
+
return this.#cachedBody("arrayBuffer").then((buffer) => new Uint8Array(buffer));
|
|
30850
|
+
}
|
|
30829
30851
|
/**
|
|
30830
30852
|
* Parses the request body as a `Blob`.
|
|
30831
30853
|
* @example
|
|
@@ -30951,10 +30973,10 @@ var init_request = __esm({
|
|
|
30951
30973
|
}
|
|
30952
30974
|
});
|
|
30953
30975
|
|
|
30954
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
30976
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/utils/html.js
|
|
30955
30977
|
var HtmlEscapedCallbackPhase, raw, resolveCallback;
|
|
30956
30978
|
var init_html = __esm({
|
|
30957
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
30979
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/utils/html.js"() {
|
|
30958
30980
|
HtmlEscapedCallbackPhase = {
|
|
30959
30981
|
Stringify: 1,
|
|
30960
30982
|
BeforeStream: 2,
|
|
@@ -30998,10 +31020,10 @@ var init_html = __esm({
|
|
|
30998
31020
|
}
|
|
30999
31021
|
});
|
|
31000
31022
|
|
|
31001
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
31023
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/context.js
|
|
31002
31024
|
var TEXT_PLAIN, setDefaultContentType, createResponseInstance, Context;
|
|
31003
31025
|
var init_context = __esm({
|
|
31004
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
31026
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/context.js"() {
|
|
31005
31027
|
init_request();
|
|
31006
31028
|
init_html();
|
|
31007
31029
|
TEXT_PLAIN = "text/plain; charset=UTF-8";
|
|
@@ -31412,10 +31434,10 @@ var init_context = __esm({
|
|
|
31412
31434
|
}
|
|
31413
31435
|
});
|
|
31414
31436
|
|
|
31415
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
31437
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router.js
|
|
31416
31438
|
var METHOD_NAME_ALL, METHOD_NAME_ALL_LOWERCASE, METHODS, MESSAGE_MATCHER_IS_ALREADY_BUILT, UnsupportedPathError;
|
|
31417
31439
|
var init_router = __esm({
|
|
31418
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
31440
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router.js"() {
|
|
31419
31441
|
METHOD_NAME_ALL = "ALL";
|
|
31420
31442
|
METHOD_NAME_ALL_LOWERCASE = "all";
|
|
31421
31443
|
METHODS = ["get", "post", "put", "delete", "options", "patch"];
|
|
@@ -31425,18 +31447,18 @@ var init_router = __esm({
|
|
|
31425
31447
|
}
|
|
31426
31448
|
});
|
|
31427
31449
|
|
|
31428
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
31450
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/utils/constants.js
|
|
31429
31451
|
var COMPOSED_HANDLER;
|
|
31430
31452
|
var init_constants3 = __esm({
|
|
31431
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
31453
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/utils/constants.js"() {
|
|
31432
31454
|
COMPOSED_HANDLER = "__COMPOSED_HANDLER";
|
|
31433
31455
|
}
|
|
31434
31456
|
});
|
|
31435
31457
|
|
|
31436
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
31458
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/hono-base.js
|
|
31437
31459
|
var notFoundHandler, errorHandler, Hono;
|
|
31438
31460
|
var init_hono_base = __esm({
|
|
31439
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
31461
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/hono-base.js"() {
|
|
31440
31462
|
init_compose();
|
|
31441
31463
|
init_context();
|
|
31442
31464
|
init_router();
|
|
@@ -31556,7 +31578,7 @@ var init_hono_base = __esm({
|
|
|
31556
31578
|
handler = async (c, next) => (await compose([], app.errorHandler)(c, () => r.handler(c, next))).res;
|
|
31557
31579
|
handler[COMPOSED_HANDLER] = r.handler;
|
|
31558
31580
|
}
|
|
31559
|
-
subApp.#addRoute(r.method, r.path, handler);
|
|
31581
|
+
subApp.#addRoute(r.method, r.path, handler, r.basePath);
|
|
31560
31582
|
});
|
|
31561
31583
|
return this;
|
|
31562
31584
|
}
|
|
@@ -31680,7 +31702,7 @@ var init_hono_base = __esm({
|
|
|
31680
31702
|
const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length;
|
|
31681
31703
|
return (request) => {
|
|
31682
31704
|
const url2 = new URL(request.url);
|
|
31683
|
-
url2.pathname =
|
|
31705
|
+
url2.pathname = this.getPath(request).slice(pathPrefixLength) || "/";
|
|
31684
31706
|
return new Request(url2, request);
|
|
31685
31707
|
};
|
|
31686
31708
|
})();
|
|
@@ -31694,10 +31716,15 @@ var init_hono_base = __esm({
|
|
|
31694
31716
|
this.#addRoute(METHOD_NAME_ALL, mergePath(path3, "*"), handler);
|
|
31695
31717
|
return this;
|
|
31696
31718
|
}
|
|
31697
|
-
#addRoute(method, path3, handler) {
|
|
31719
|
+
#addRoute(method, path3, handler, baseRoutePath) {
|
|
31698
31720
|
method = method.toUpperCase();
|
|
31699
31721
|
path3 = mergePath(this._basePath, path3);
|
|
31700
|
-
const r = {
|
|
31722
|
+
const r = {
|
|
31723
|
+
basePath: baseRoutePath !== void 0 ? mergePath(this._basePath, baseRoutePath) : this._basePath,
|
|
31724
|
+
path: path3,
|
|
31725
|
+
method,
|
|
31726
|
+
handler
|
|
31727
|
+
};
|
|
31701
31728
|
this.router.add(method, path3, [handler, r]);
|
|
31702
31729
|
this.routes.push(r);
|
|
31703
31730
|
}
|
|
@@ -31814,7 +31841,7 @@ var init_hono_base = __esm({
|
|
|
31814
31841
|
}
|
|
31815
31842
|
});
|
|
31816
31843
|
|
|
31817
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
31844
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/reg-exp-router/matcher.js
|
|
31818
31845
|
function match(method, path3) {
|
|
31819
31846
|
const matchers = this.buildAllMatchers();
|
|
31820
31847
|
const match2 = ((method2, path22) => {
|
|
@@ -31835,13 +31862,13 @@ function match(method, path3) {
|
|
|
31835
31862
|
}
|
|
31836
31863
|
var emptyParam;
|
|
31837
31864
|
var init_matcher = __esm({
|
|
31838
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
31865
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/reg-exp-router/matcher.js"() {
|
|
31839
31866
|
init_router();
|
|
31840
31867
|
emptyParam = [];
|
|
31841
31868
|
}
|
|
31842
31869
|
});
|
|
31843
31870
|
|
|
31844
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
31871
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/reg-exp-router/node.js
|
|
31845
31872
|
function compareKey(a, b) {
|
|
31846
31873
|
if (a.length === 1) {
|
|
31847
31874
|
return b.length === 1 ? a < b ? -1 : 1 : -1;
|
|
@@ -31863,7 +31890,7 @@ function compareKey(a, b) {
|
|
|
31863
31890
|
}
|
|
31864
31891
|
var LABEL_REG_EXP_STR, ONLY_WILDCARD_REG_EXP_STR, TAIL_WILDCARD_REG_EXP_STR, PATH_ERROR, regExpMetaChars, Node;
|
|
31865
31892
|
var init_node = __esm({
|
|
31866
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
31893
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/reg-exp-router/node.js"() {
|
|
31867
31894
|
LABEL_REG_EXP_STR = "[^/]+";
|
|
31868
31895
|
ONLY_WILDCARD_REG_EXP_STR = ".*";
|
|
31869
31896
|
TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)";
|
|
@@ -31954,10 +31981,10 @@ var init_node = __esm({
|
|
|
31954
31981
|
}
|
|
31955
31982
|
});
|
|
31956
31983
|
|
|
31957
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
31984
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/reg-exp-router/trie.js
|
|
31958
31985
|
var Trie;
|
|
31959
31986
|
var init_trie = __esm({
|
|
31960
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
31987
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/reg-exp-router/trie.js"() {
|
|
31961
31988
|
init_node();
|
|
31962
31989
|
Trie = class {
|
|
31963
31990
|
#context = { varIndex: 0 };
|
|
@@ -32016,7 +32043,7 @@ var init_trie = __esm({
|
|
|
32016
32043
|
}
|
|
32017
32044
|
});
|
|
32018
32045
|
|
|
32019
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
32046
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/reg-exp-router/router.js
|
|
32020
32047
|
function buildWildcardRegExp(path3) {
|
|
32021
32048
|
return wildcardRegExpCache[path3] ??= new RegExp(
|
|
32022
32049
|
path3 === "*" ? "" : `^${path3.replace(
|
|
@@ -32098,7 +32125,7 @@ function findMiddleware(middleware, path3) {
|
|
|
32098
32125
|
}
|
|
32099
32126
|
var nullMatcher, wildcardRegExpCache, RegExpRouter;
|
|
32100
32127
|
var init_router2 = __esm({
|
|
32101
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
32128
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/reg-exp-router/router.js"() {
|
|
32102
32129
|
init_router();
|
|
32103
32130
|
init_url();
|
|
32104
32131
|
init_matcher();
|
|
@@ -32205,27 +32232,27 @@ var init_router2 = __esm({
|
|
|
32205
32232
|
}
|
|
32206
32233
|
});
|
|
32207
32234
|
|
|
32208
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
32235
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/reg-exp-router/prepared-router.js
|
|
32209
32236
|
var init_prepared_router = __esm({
|
|
32210
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
32237
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/reg-exp-router/prepared-router.js"() {
|
|
32211
32238
|
init_router();
|
|
32212
32239
|
init_matcher();
|
|
32213
32240
|
init_router2();
|
|
32214
32241
|
}
|
|
32215
32242
|
});
|
|
32216
32243
|
|
|
32217
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
32244
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/reg-exp-router/index.js
|
|
32218
32245
|
var init_reg_exp_router = __esm({
|
|
32219
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
32246
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/reg-exp-router/index.js"() {
|
|
32220
32247
|
init_router2();
|
|
32221
32248
|
init_prepared_router();
|
|
32222
32249
|
}
|
|
32223
32250
|
});
|
|
32224
32251
|
|
|
32225
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
32252
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/smart-router/router.js
|
|
32226
32253
|
var SmartRouter;
|
|
32227
32254
|
var init_router3 = __esm({
|
|
32228
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
32255
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/smart-router/router.js"() {
|
|
32229
32256
|
init_router();
|
|
32230
32257
|
SmartRouter = class {
|
|
32231
32258
|
name = "SmartRouter";
|
|
@@ -32283,17 +32310,17 @@ var init_router3 = __esm({
|
|
|
32283
32310
|
}
|
|
32284
32311
|
});
|
|
32285
32312
|
|
|
32286
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
32313
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/smart-router/index.js
|
|
32287
32314
|
var init_smart_router = __esm({
|
|
32288
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
32315
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/smart-router/index.js"() {
|
|
32289
32316
|
init_router3();
|
|
32290
32317
|
}
|
|
32291
32318
|
});
|
|
32292
32319
|
|
|
32293
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
32320
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/trie-router/node.js
|
|
32294
32321
|
var emptyParams, hasChildren, Node2;
|
|
32295
32322
|
var init_node2 = __esm({
|
|
32296
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
32323
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/trie-router/node.js"() {
|
|
32297
32324
|
init_router();
|
|
32298
32325
|
init_url();
|
|
32299
32326
|
emptyParams = /* @__PURE__ */ Object.create(null);
|
|
@@ -32429,6 +32456,15 @@ var init_node2 = __esm({
|
|
|
32429
32456
|
if (m) {
|
|
32430
32457
|
params[name2] = m[0];
|
|
32431
32458
|
this.#pushHandlerSets(handlerSets, child, method, node2.#params, params);
|
|
32459
|
+
if (m[0].length === restPathString.length && child.#children["*"]) {
|
|
32460
|
+
this.#pushHandlerSets(
|
|
32461
|
+
handlerSets,
|
|
32462
|
+
child.#children["*"],
|
|
32463
|
+
method,
|
|
32464
|
+
node2.#params,
|
|
32465
|
+
params
|
|
32466
|
+
);
|
|
32467
|
+
}
|
|
32432
32468
|
if (hasChildren(child.#children)) {
|
|
32433
32469
|
child.#params = params;
|
|
32434
32470
|
const componentCount = m[0].match(/\//)?.length ?? 0;
|
|
@@ -32472,10 +32508,10 @@ var init_node2 = __esm({
|
|
|
32472
32508
|
}
|
|
32473
32509
|
});
|
|
32474
32510
|
|
|
32475
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
32511
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/trie-router/router.js
|
|
32476
32512
|
var TrieRouter;
|
|
32477
32513
|
var init_router4 = __esm({
|
|
32478
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
32514
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/trie-router/router.js"() {
|
|
32479
32515
|
init_url();
|
|
32480
32516
|
init_node2();
|
|
32481
32517
|
TrieRouter = class {
|
|
@@ -32501,17 +32537,17 @@ var init_router4 = __esm({
|
|
|
32501
32537
|
}
|
|
32502
32538
|
});
|
|
32503
32539
|
|
|
32504
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
32540
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/trie-router/index.js
|
|
32505
32541
|
var init_trie_router = __esm({
|
|
32506
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
32542
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/router/trie-router/index.js"() {
|
|
32507
32543
|
init_router4();
|
|
32508
32544
|
}
|
|
32509
32545
|
});
|
|
32510
32546
|
|
|
32511
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
32547
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/hono.js
|
|
32512
32548
|
var Hono2;
|
|
32513
32549
|
var init_hono = __esm({
|
|
32514
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
32550
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/hono.js"() {
|
|
32515
32551
|
init_hono_base();
|
|
32516
32552
|
init_reg_exp_router();
|
|
32517
32553
|
init_smart_router();
|
|
@@ -32532,10 +32568,11 @@ var init_hono = __esm({
|
|
|
32532
32568
|
}
|
|
32533
32569
|
});
|
|
32534
32570
|
|
|
32535
|
-
// ../../node_modules/.pnpm/hono@4.12.
|
|
32571
|
+
// ../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/index.js
|
|
32536
32572
|
var init_dist = __esm({
|
|
32537
|
-
"../../node_modules/.pnpm/hono@4.12.
|
|
32573
|
+
"../../node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/index.js"() {
|
|
32538
32574
|
init_hono();
|
|
32575
|
+
init_context();
|
|
32539
32576
|
}
|
|
32540
32577
|
});
|
|
32541
32578
|
|
|
@@ -61841,11 +61878,11 @@ var require_util2 = __commonJS({
|
|
|
61841
61878
|
var { isUint8Array } = __require("node:util/types");
|
|
61842
61879
|
var { webidl } = require_webidl();
|
|
61843
61880
|
var supportedHashes = [];
|
|
61844
|
-
var
|
|
61881
|
+
var crypto3;
|
|
61845
61882
|
try {
|
|
61846
|
-
|
|
61883
|
+
crypto3 = __require("node:crypto");
|
|
61847
61884
|
const possibleRelevantHashes = ["sha256", "sha384", "sha512"];
|
|
61848
|
-
supportedHashes =
|
|
61885
|
+
supportedHashes = crypto3.getHashes().filter((hash2) => possibleRelevantHashes.includes(hash2));
|
|
61849
61886
|
} catch {
|
|
61850
61887
|
}
|
|
61851
61888
|
function responseURL(response) {
|
|
@@ -62118,7 +62155,7 @@ var require_util2 = __commonJS({
|
|
|
62118
62155
|
}
|
|
62119
62156
|
}
|
|
62120
62157
|
function bytesMatch(bytes, metadataList) {
|
|
62121
|
-
if (
|
|
62158
|
+
if (crypto3 === void 0) {
|
|
62122
62159
|
return true;
|
|
62123
62160
|
}
|
|
62124
62161
|
const parsedMetadata = parseMetadata(metadataList);
|
|
@@ -62133,7 +62170,7 @@ var require_util2 = __commonJS({
|
|
|
62133
62170
|
for (const item2 of metadata2) {
|
|
62134
62171
|
const algorithm = item2.algo;
|
|
62135
62172
|
const expectedValue = item2.hash;
|
|
62136
|
-
let actualValue =
|
|
62173
|
+
let actualValue = crypto3.createHash(algorithm).update(bytes).digest("base64");
|
|
62137
62174
|
if (actualValue[actualValue.length - 1] === "=") {
|
|
62138
62175
|
if (actualValue[actualValue.length - 2] === "=") {
|
|
62139
62176
|
actualValue = actualValue.slice(0, -2);
|
|
@@ -62785,7 +62822,7 @@ var require_formdata = __commonJS({
|
|
|
62785
62822
|
var { File: NativeFile } = __require("node:buffer");
|
|
62786
62823
|
var nodeUtil = __require("node:util");
|
|
62787
62824
|
var File2 = globalThis.File ?? NativeFile;
|
|
62788
|
-
var
|
|
62825
|
+
var FormData2 = class _FormData {
|
|
62789
62826
|
constructor(form) {
|
|
62790
62827
|
webidl.util.markAsUncloneable(this);
|
|
62791
62828
|
if (form !== void 0) {
|
|
@@ -62887,8 +62924,8 @@ var require_formdata = __commonJS({
|
|
|
62887
62924
|
return `FormData ${output.slice(output.indexOf("]") + 2)}`;
|
|
62888
62925
|
}
|
|
62889
62926
|
};
|
|
62890
|
-
iteratorMixin("FormData",
|
|
62891
|
-
Object.defineProperties(
|
|
62927
|
+
iteratorMixin("FormData", FormData2, kState, "name", "value");
|
|
62928
|
+
Object.defineProperties(FormData2.prototype, {
|
|
62892
62929
|
append: kEnumerableProperty,
|
|
62893
62930
|
delete: kEnumerableProperty,
|
|
62894
62931
|
get: kEnumerableProperty,
|
|
@@ -62916,7 +62953,7 @@ var require_formdata = __commonJS({
|
|
|
62916
62953
|
}
|
|
62917
62954
|
return { name: name2, value };
|
|
62918
62955
|
}
|
|
62919
|
-
module2.exports = { FormData, makeEntry };
|
|
62956
|
+
module2.exports = { FormData: FormData2, makeEntry };
|
|
62920
62957
|
}
|
|
62921
62958
|
});
|
|
62922
62959
|
|
|
@@ -63186,7 +63223,7 @@ var require_body = __commonJS({
|
|
|
63186
63223
|
extractMimeType,
|
|
63187
63224
|
utf8DecodeBytes
|
|
63188
63225
|
} = require_util2();
|
|
63189
|
-
var { FormData } = require_formdata();
|
|
63226
|
+
var { FormData: FormData2 } = require_formdata();
|
|
63190
63227
|
var { kState } = require_symbols2();
|
|
63191
63228
|
var { webidl } = require_webidl();
|
|
63192
63229
|
var { Blob: Blob2 } = __require("node:buffer");
|
|
@@ -63197,8 +63234,8 @@ var require_body = __commonJS({
|
|
|
63197
63234
|
var { multipartFormDataParser } = require_formdata_parser();
|
|
63198
63235
|
var random;
|
|
63199
63236
|
try {
|
|
63200
|
-
const
|
|
63201
|
-
random = (max) =>
|
|
63237
|
+
const crypto3 = __require("node:crypto");
|
|
63238
|
+
random = (max) => crypto3.randomInt(0, max);
|
|
63202
63239
|
} catch {
|
|
63203
63240
|
random = (max) => Math.floor(Math.random(max));
|
|
63204
63241
|
}
|
|
@@ -63406,13 +63443,13 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
|
|
63406
63443
|
if (parsed === "failure") {
|
|
63407
63444
|
throw new TypeError("Failed to parse body as FormData.");
|
|
63408
63445
|
}
|
|
63409
|
-
const fd = new
|
|
63446
|
+
const fd = new FormData2();
|
|
63410
63447
|
fd[kState] = parsed;
|
|
63411
63448
|
return fd;
|
|
63412
63449
|
}
|
|
63413
63450
|
case "application/x-www-form-urlencoded": {
|
|
63414
63451
|
const entries = new URLSearchParams(value.toString());
|
|
63415
|
-
const fd = new
|
|
63452
|
+
const fd = new FormData2();
|
|
63416
63453
|
for (const [name2, value2] of entries) {
|
|
63417
63454
|
fd.append(name2, value2);
|
|
63418
63455
|
}
|
|
@@ -69949,7 +69986,7 @@ var require_response = __commonJS({
|
|
|
69949
69986
|
} = require_constants3();
|
|
69950
69987
|
var { kState, kHeaders } = require_symbols2();
|
|
69951
69988
|
var { webidl } = require_webidl();
|
|
69952
|
-
var { FormData } = require_formdata();
|
|
69989
|
+
var { FormData: FormData2 } = require_formdata();
|
|
69953
69990
|
var { URLSerializer } = require_data_url();
|
|
69954
69991
|
var { kConstruct } = require_symbols();
|
|
69955
69992
|
var assert2 = __require("node:assert");
|
|
@@ -70262,7 +70299,7 @@ var require_response = __commonJS({
|
|
|
70262
70299
|
ReadableStream
|
|
70263
70300
|
);
|
|
70264
70301
|
webidl.converters.FormData = webidl.interfaceConverter(
|
|
70265
|
-
|
|
70302
|
+
FormData2
|
|
70266
70303
|
);
|
|
70267
70304
|
webidl.converters.URLSearchParams = webidl.interfaceConverter(
|
|
70268
70305
|
URLSearchParams
|
|
@@ -74606,13 +74643,13 @@ var require_frame = __commonJS({
|
|
|
74606
74643
|
"use strict";
|
|
74607
74644
|
var { maxUnsigned16Bit } = require_constants5();
|
|
74608
74645
|
var BUFFER_SIZE = 16386;
|
|
74609
|
-
var
|
|
74646
|
+
var crypto3;
|
|
74610
74647
|
var buffer = null;
|
|
74611
74648
|
var bufIdx = BUFFER_SIZE;
|
|
74612
74649
|
try {
|
|
74613
|
-
|
|
74650
|
+
crypto3 = __require("node:crypto");
|
|
74614
74651
|
} catch {
|
|
74615
|
-
|
|
74652
|
+
crypto3 = {
|
|
74616
74653
|
// not full compatibility, but minimum.
|
|
74617
74654
|
randomFillSync: function randomFillSync(buffer2, _offset, _size2) {
|
|
74618
74655
|
for (let i2 = 0; i2 < buffer2.length; ++i2) {
|
|
@@ -74625,7 +74662,7 @@ var require_frame = __commonJS({
|
|
|
74625
74662
|
function generateMask() {
|
|
74626
74663
|
if (bufIdx === BUFFER_SIZE) {
|
|
74627
74664
|
bufIdx = 0;
|
|
74628
|
-
|
|
74665
|
+
crypto3.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE);
|
|
74629
74666
|
}
|
|
74630
74667
|
return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]];
|
|
74631
74668
|
}
|
|
@@ -74697,9 +74734,9 @@ var require_connection = __commonJS({
|
|
|
74697
74734
|
var { Headers: Headers2, getHeadersList } = require_headers();
|
|
74698
74735
|
var { getDecodeSplit } = require_util2();
|
|
74699
74736
|
var { WebsocketFrameSend } = require_frame();
|
|
74700
|
-
var
|
|
74737
|
+
var crypto3;
|
|
74701
74738
|
try {
|
|
74702
|
-
|
|
74739
|
+
crypto3 = __require("node:crypto");
|
|
74703
74740
|
} catch {
|
|
74704
74741
|
}
|
|
74705
74742
|
function establishWebSocketConnection(url2, protocols, client, ws, onEstablish, options) {
|
|
@@ -74719,7 +74756,7 @@ var require_connection = __commonJS({
|
|
|
74719
74756
|
const headersList = getHeadersList(new Headers2(options.headers));
|
|
74720
74757
|
request.headersList = headersList;
|
|
74721
74758
|
}
|
|
74722
|
-
const keyValue =
|
|
74759
|
+
const keyValue = crypto3.randomBytes(16).toString("base64");
|
|
74723
74760
|
request.headersList.append("sec-websocket-key", keyValue);
|
|
74724
74761
|
request.headersList.append("sec-websocket-version", "13");
|
|
74725
74762
|
for (const protocol of protocols) {
|
|
@@ -74749,7 +74786,7 @@ var require_connection = __commonJS({
|
|
|
74749
74786
|
return;
|
|
74750
74787
|
}
|
|
74751
74788
|
const secWSAccept = response.headersList.get("Sec-WebSocket-Accept");
|
|
74752
|
-
const digest2 =
|
|
74789
|
+
const digest2 = crypto3.createHash("sha1").update(keyValue + uid).digest("base64");
|
|
74753
74790
|
if (secWSAccept !== digest2) {
|
|
74754
74791
|
failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header.");
|
|
74755
74792
|
return;
|
|
@@ -76900,12 +76937,12 @@ import { spawn as spawn5 } from "node:child_process";
|
|
|
76900
76937
|
// src/daemon.ts
|
|
76901
76938
|
import { existsSync as existsSync29, writeFileSync as writeFileSync24 } from "node:fs";
|
|
76902
76939
|
|
|
76903
|
-
// ../../node_modules/.pnpm/@hono+node-server@1.19.11_hono@4.12.
|
|
76940
|
+
// ../../node_modules/.pnpm/@hono+node-server@1.19.11_hono@4.12.34/node_modules/@hono/node-server/dist/index.mjs
|
|
76904
76941
|
import { createServer as createServerHTTP } from "http";
|
|
76905
76942
|
import { Http2ServerRequest as Http2ServerRequest2 } from "http2";
|
|
76906
76943
|
import { Http2ServerRequest } from "http2";
|
|
76907
76944
|
import { Readable } from "stream";
|
|
76908
|
-
import
|
|
76945
|
+
import crypto2 from "crypto";
|
|
76909
76946
|
var RequestError = class extends Error {
|
|
76910
76947
|
constructor(message2, options) {
|
|
76911
76948
|
super(message2, options);
|
|
@@ -77222,7 +77259,7 @@ var buildOutgoingHttpHeaders = (headers) => {
|
|
|
77222
77259
|
};
|
|
77223
77260
|
var X_ALREADY_SENT = "x-hono-already-sent";
|
|
77224
77261
|
if (typeof global.crypto === "undefined") {
|
|
77225
|
-
global.crypto =
|
|
77262
|
+
global.crypto = crypto2;
|
|
77226
77263
|
}
|
|
77227
77264
|
var outgoingEnded = Symbol("outgoingEnded");
|
|
77228
77265
|
var handleRequestError = () => new Response(null, {
|
|
@@ -86302,7 +86339,7 @@ function createWatchBreaker(deps) {
|
|
|
86302
86339
|
}
|
|
86303
86340
|
|
|
86304
86341
|
// src/engine.ts
|
|
86305
|
-
var DAEMON_VERSION = true ? "2.0.22-dev.
|
|
86342
|
+
var DAEMON_VERSION = true ? "2.0.22-dev.4430" : "2.0.0-alpha.0";
|
|
86306
86343
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
86307
86344
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
86308
86345
|
var GIT_OP_MUTE_MS = 4e3;
|
|
@@ -98373,8 +98410,6 @@ Commands:
|
|
|
98373
98410
|
|
|
98374
98411
|
Environment:
|
|
98375
98412
|
ERRATA_CLOUD_URL Cloud base URL (default ${DEFAULT_CLOUD_URL})
|
|
98376
|
-
ERRATA_ALLOW_DIRECT_V1_CLOUD=1 Staff-only: request direct legacy v1 (bypasses the gateway;
|
|
98377
|
-
also requires ERRATA_DIRECT_V1_ACK=I_ACCEPT_UNMETERED_DIRECT_V1)
|
|
98378
98413
|
${OAUTH_DEFAULT_ENV}=0 Test/dev escape hatch: plain \`errata login\` uses legacy device-code
|
|
98379
98414
|
`);
|
|
98380
98415
|
}
|