@opendatalabs/personal-server-ts-server 1.28.0 → 1.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +2 -2
- package/dist/ui/ps-lite-debug.js +436 -126
- package/package.json +5 -5
package/dist/package.json
CHANGED
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"dev": "node --watch dist/index.js"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@hono/node-server": "^1.19.
|
|
53
|
+
"@hono/node-server": "^1.19.17",
|
|
54
54
|
"@opendatalabs/personal-server-ts-core": "*",
|
|
55
55
|
"@opendatalabs/personal-server-ts-lite": "*",
|
|
56
56
|
"@opendatalabs/vana-sdk": "3.23.0-pr.211.36da1d8",
|
|
57
57
|
"better-sqlite3": "^12.11.1",
|
|
58
|
-
"hono": "^4.12
|
|
58
|
+
"hono": "^4.13.12",
|
|
59
59
|
"pino": "^10.3.1",
|
|
60
60
|
"pino-pretty": "^13.0.0",
|
|
61
61
|
"viem": "^2.54.2"
|
package/dist/ui/ps-lite-debug.js
CHANGED
|
@@ -60009,9 +60009,28 @@ var require_utils = __commonJS({
|
|
|
60009
60009
|
"use strict";
|
|
60010
60010
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
60011
60011
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
60012
|
+
var isPort = RegExp.prototype.test.bind(/^\d*$/u);
|
|
60012
60013
|
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
60013
60014
|
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
60014
|
-
var isPathCharacter = RegExp.prototype.test.bind(/^[
|
|
60015
|
+
var isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u);
|
|
60016
|
+
var isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u);
|
|
60017
|
+
var isUserinfoCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u);
|
|
60018
|
+
var BYTE_HEX = new Array(256);
|
|
60019
|
+
{
|
|
60020
|
+
const HEX_DIGITS = "0123456789ABCDEF";
|
|
60021
|
+
for (let i10 = 0; i10 < 256; i10++) {
|
|
60022
|
+
BYTE_HEX[i10] = "%" + HEX_DIGITS[i10 >> 4] + HEX_DIGITS[i10 & 15];
|
|
60023
|
+
}
|
|
60024
|
+
}
|
|
60025
|
+
function percentEncodeNonAscii(cp2) {
|
|
60026
|
+
if (cp2 < 2048) {
|
|
60027
|
+
return BYTE_HEX[192 | cp2 >> 6] + BYTE_HEX[128 | cp2 & 63];
|
|
60028
|
+
}
|
|
60029
|
+
if (cp2 < 65536) {
|
|
60030
|
+
return BYTE_HEX[224 | cp2 >> 12] + BYTE_HEX[128 | cp2 >> 6 & 63] + BYTE_HEX[128 | cp2 & 63];
|
|
60031
|
+
}
|
|
60032
|
+
return BYTE_HEX[240 | cp2 >> 18] + BYTE_HEX[128 | cp2 >> 12 & 63] + BYTE_HEX[128 | cp2 >> 6 & 63] + BYTE_HEX[128 | cp2 & 63];
|
|
60033
|
+
}
|
|
60015
60034
|
function stringArrayToHexStripped(input) {
|
|
60016
60035
|
let acc = "";
|
|
60017
60036
|
let code = 0;
|
|
@@ -60036,91 +60055,105 @@ var require_utils = __commonJS({
|
|
|
60036
60055
|
}
|
|
60037
60056
|
return acc;
|
|
60038
60057
|
}
|
|
60058
|
+
var isHextet = RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/);
|
|
60059
|
+
var isIPvFuture = RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/);
|
|
60060
|
+
var isZoneCharacter = RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/);
|
|
60039
60061
|
var nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
|
|
60040
|
-
function
|
|
60041
|
-
|
|
60042
|
-
|
|
60043
|
-
|
|
60044
|
-
|
|
60045
|
-
|
|
60046
|
-
|
|
60047
|
-
if (hex3 !== "") {
|
|
60048
|
-
address.push(hex3);
|
|
60049
|
-
} else {
|
|
60050
|
-
output.error = true;
|
|
60051
|
-
return false;
|
|
60062
|
+
function isZoneIdentifier(zone) {
|
|
60063
|
+
if (zone.length === 0) return false;
|
|
60064
|
+
for (let i10 = 0; i10 < zone.length; i10++) {
|
|
60065
|
+
if (isZoneCharacter(zone[i10])) continue;
|
|
60066
|
+
if (zone[i10] === "%" && i10 + 2 < zone.length && isHexPair(zone.slice(i10 + 1, i10 + 3))) {
|
|
60067
|
+
i10 += 2;
|
|
60068
|
+
continue;
|
|
60052
60069
|
}
|
|
60053
|
-
|
|
60070
|
+
return false;
|
|
60054
60071
|
}
|
|
60055
60072
|
return true;
|
|
60056
60073
|
}
|
|
60057
|
-
function
|
|
60058
|
-
let
|
|
60059
|
-
|
|
60060
|
-
|
|
60061
|
-
|
|
60062
|
-
let
|
|
60063
|
-
|
|
60064
|
-
|
|
60065
|
-
|
|
60066
|
-
|
|
60067
|
-
|
|
60068
|
-
|
|
60069
|
-
}
|
|
60070
|
-
if (cursor === ":") {
|
|
60071
|
-
if (endipv6Encountered === true) {
|
|
60072
|
-
endIpv6 = true;
|
|
60073
|
-
}
|
|
60074
|
-
if (!consume(buffer, address, output)) {
|
|
60075
|
-
break;
|
|
60076
|
-
}
|
|
60077
|
-
if (++tokenCount > 7) {
|
|
60078
|
-
output.error = true;
|
|
60079
|
-
break;
|
|
60074
|
+
function compressIPv6ZeroRun(hextets) {
|
|
60075
|
+
let bestStart = -1;
|
|
60076
|
+
let bestLength = 0;
|
|
60077
|
+
let runStart = -1;
|
|
60078
|
+
let runLength = 0;
|
|
60079
|
+
for (let i10 = 0; i10 < hextets.length; i10++) {
|
|
60080
|
+
if (hextets[i10] === "0") {
|
|
60081
|
+
if (runStart === -1) runStart = i10;
|
|
60082
|
+
runLength++;
|
|
60083
|
+
if (runLength > bestLength) {
|
|
60084
|
+
bestLength = runLength;
|
|
60085
|
+
bestStart = runStart;
|
|
60080
60086
|
}
|
|
60081
|
-
if (i10 > 0 && input[i10 - 1] === ":") {
|
|
60082
|
-
endipv6Encountered = true;
|
|
60083
|
-
}
|
|
60084
|
-
address.push(":");
|
|
60085
|
-
continue;
|
|
60086
|
-
} else if (cursor === "%") {
|
|
60087
|
-
if (!consume(buffer, address, output)) {
|
|
60088
|
-
break;
|
|
60089
|
-
}
|
|
60090
|
-
consume = consumeIsZone;
|
|
60091
60087
|
} else {
|
|
60092
|
-
|
|
60088
|
+
runStart = -1;
|
|
60089
|
+
runLength = 0;
|
|
60090
|
+
}
|
|
60091
|
+
}
|
|
60092
|
+
if (bestLength < 2) return hextets.join(":");
|
|
60093
|
+
const head = hextets.slice(0, bestStart).join(":");
|
|
60094
|
+
const tail = hextets.slice(bestStart + bestLength).join(":");
|
|
60095
|
+
return head + "::" + tail;
|
|
60096
|
+
}
|
|
60097
|
+
function normalizeIPv6Address(input) {
|
|
60098
|
+
const compression = input.indexOf("::");
|
|
60099
|
+
if (compression !== -1 && input.indexOf("::", compression + 1) !== -1) return void 0;
|
|
60100
|
+
const left = compression === -1 ? input.split(":") : input.slice(0, compression).split(":");
|
|
60101
|
+
const right = compression === -1 ? [] : input.slice(compression + 2).split(":");
|
|
60102
|
+
if (compression !== -1) {
|
|
60103
|
+
if (left.length === 1 && left[0] === "") left.length = 0;
|
|
60104
|
+
if (right.length === 1 && right[0] === "") right.length = 0;
|
|
60105
|
+
}
|
|
60106
|
+
const parts = left.concat(right);
|
|
60107
|
+
let hextetCount = 0;
|
|
60108
|
+
for (let i10 = 0; i10 < parts.length; i10++) {
|
|
60109
|
+
const part = parts[i10];
|
|
60110
|
+
if (part === "") return void 0;
|
|
60111
|
+
if (part.indexOf(".") !== -1) {
|
|
60112
|
+
if (i10 !== parts.length - 1 || compression !== -1 && right.length === 0 || !isIPv4(part)) return void 0;
|
|
60113
|
+
hextetCount += 2;
|
|
60093
60114
|
continue;
|
|
60094
60115
|
}
|
|
60116
|
+
if (!isHextet(part)) return void 0;
|
|
60117
|
+
parts[i10] = parseInt(part, 16).toString(16);
|
|
60118
|
+
hextetCount++;
|
|
60095
60119
|
}
|
|
60096
|
-
if (
|
|
60097
|
-
if (
|
|
60098
|
-
|
|
60099
|
-
} else if (endIpv6) {
|
|
60100
|
-
address.push(buffer.join(""));
|
|
60101
|
-
} else {
|
|
60102
|
-
address.push(stringArrayToHexStripped(buffer));
|
|
60103
|
-
}
|
|
60120
|
+
if (compression === -1) {
|
|
60121
|
+
if (hextetCount !== 8) return void 0;
|
|
60122
|
+
return compressIPv6ZeroRun(parts);
|
|
60104
60123
|
}
|
|
60105
|
-
|
|
60106
|
-
|
|
60124
|
+
if (hextetCount >= 8) return void 0;
|
|
60125
|
+
const expanded = parts.slice(0, left.length);
|
|
60126
|
+
for (let i10 = hextetCount; i10 < 8; i10++) expanded.push("0");
|
|
60127
|
+
for (let i10 = left.length; i10 < parts.length; i10++) expanded.push(parts[i10]);
|
|
60128
|
+
return compressIPv6ZeroRun(expanded);
|
|
60107
60129
|
}
|
|
60108
60130
|
function normalizeIPv6(host) {
|
|
60109
|
-
|
|
60110
|
-
|
|
60111
|
-
}
|
|
60112
|
-
|
|
60113
|
-
if (
|
|
60114
|
-
|
|
60115
|
-
|
|
60116
|
-
|
|
60117
|
-
|
|
60118
|
-
|
|
60119
|
-
|
|
60120
|
-
|
|
60121
|
-
|
|
60122
|
-
|
|
60123
|
-
|
|
60131
|
+
const bracketed = host[0] === "[" && host[host.length - 1] === "]";
|
|
60132
|
+
const hasBracket = host[0] === "[" || host[host.length - 1] === "]";
|
|
60133
|
+
if (hasBracket && !bracketed) return { host, isIPV6: false, error: true };
|
|
60134
|
+
let input = bracketed ? host.slice(1, -1) : host;
|
|
60135
|
+
if (bracketed && isIPvFuture(input)) {
|
|
60136
|
+
input = input.toLowerCase();
|
|
60137
|
+
return { host: `[${input}]`, escapedHost: input, isIPV6: false, isIPVFuture: true };
|
|
60138
|
+
}
|
|
60139
|
+
if (findToken(input, ":") < 2) {
|
|
60140
|
+
return { host, isIPV6: false, error: bracketed };
|
|
60141
|
+
}
|
|
60142
|
+
let zoneIdentifier = "";
|
|
60143
|
+
const zoneSeparator = input.indexOf("%");
|
|
60144
|
+
if (zoneSeparator !== -1) {
|
|
60145
|
+
const separatorLength = input.slice(zoneSeparator, zoneSeparator + 3).toLowerCase() === "%25" ? 3 : 1;
|
|
60146
|
+
zoneIdentifier = input.slice(zoneSeparator + separatorLength);
|
|
60147
|
+
if (!isZoneIdentifier(zoneIdentifier)) return { host, isIPV6: false, error: true };
|
|
60148
|
+
input = input.slice(0, zoneSeparator);
|
|
60149
|
+
}
|
|
60150
|
+
const address = normalizeIPv6Address(input);
|
|
60151
|
+
if (address === void 0) return { host, isIPV6: false, error: true };
|
|
60152
|
+
return {
|
|
60153
|
+
host: address + (zoneIdentifier ? "%" + zoneIdentifier : ""),
|
|
60154
|
+
escapedHost: address + (zoneIdentifier ? "%25" + zoneIdentifier : ""),
|
|
60155
|
+
isIPV6: true
|
|
60156
|
+
};
|
|
60124
60157
|
}
|
|
60125
60158
|
function findToken(str, token) {
|
|
60126
60159
|
let ind = 0;
|
|
@@ -60239,7 +60272,8 @@ var require_utils = __commonJS({
|
|
|
60239
60272
|
function normalizePathEncoding(input) {
|
|
60240
60273
|
let output = "";
|
|
60241
60274
|
for (let i10 = 0; i10 < input.length; i10++) {
|
|
60242
|
-
|
|
60275
|
+
const ch3 = input[i10];
|
|
60276
|
+
if (ch3 === "%" && i10 + 2 < input.length) {
|
|
60243
60277
|
const hex3 = input.slice(i10 + 1, i10 + 3);
|
|
60244
60278
|
if (isHexPair(hex3)) {
|
|
60245
60279
|
const normalizedHex = hex3.toUpperCase();
|
|
@@ -60253,10 +60287,152 @@ var require_utils = __commonJS({
|
|
|
60253
60287
|
continue;
|
|
60254
60288
|
}
|
|
60255
60289
|
}
|
|
60256
|
-
if (isPathCharacter(
|
|
60257
|
-
output +=
|
|
60290
|
+
if (isPathCharacter(ch3)) {
|
|
60291
|
+
output += ch3;
|
|
60258
60292
|
} else {
|
|
60259
|
-
|
|
60293
|
+
const code = input.charCodeAt(i10);
|
|
60294
|
+
if (code < 128) {
|
|
60295
|
+
output += isEscapeSafe(code) ? ch3 : BYTE_HEX[code];
|
|
60296
|
+
} else if (code < 55296 || code > 57343) {
|
|
60297
|
+
output += percentEncodeNonAscii(code);
|
|
60298
|
+
} else if (code <= 56319 && i10 + 1 < input.length) {
|
|
60299
|
+
const low = input.charCodeAt(i10 + 1);
|
|
60300
|
+
if (low >= 56320 && low <= 57343) {
|
|
60301
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
60302
|
+
i10++;
|
|
60303
|
+
} else {
|
|
60304
|
+
output += percentEncodeNonAscii(65533);
|
|
60305
|
+
}
|
|
60306
|
+
} else {
|
|
60307
|
+
output += percentEncodeNonAscii(65533);
|
|
60308
|
+
}
|
|
60309
|
+
}
|
|
60310
|
+
}
|
|
60311
|
+
return output;
|
|
60312
|
+
}
|
|
60313
|
+
function serializePathEncoding(input, pathNoScheme = false) {
|
|
60314
|
+
let output = "";
|
|
60315
|
+
let firstSegment = pathNoScheme && input[0] !== "/";
|
|
60316
|
+
for (let i10 = 0; i10 < input.length; i10++) {
|
|
60317
|
+
const ch3 = input[i10];
|
|
60318
|
+
if (ch3 === "%" && i10 + 2 < input.length) {
|
|
60319
|
+
const hex3 = input.slice(i10 + 1, i10 + 3);
|
|
60320
|
+
if (isHexPair(hex3)) {
|
|
60321
|
+
output += "%" + hex3.toUpperCase();
|
|
60322
|
+
i10 += 2;
|
|
60323
|
+
continue;
|
|
60324
|
+
}
|
|
60325
|
+
}
|
|
60326
|
+
if (ch3 === "/") {
|
|
60327
|
+
firstSegment = false;
|
|
60328
|
+
}
|
|
60329
|
+
if (isPathCharacter(ch3) && (ch3 !== ":" || !firstSegment)) {
|
|
60330
|
+
output += ch3;
|
|
60331
|
+
} else {
|
|
60332
|
+
const code = input.charCodeAt(i10);
|
|
60333
|
+
if (code < 128) {
|
|
60334
|
+
output += BYTE_HEX[code];
|
|
60335
|
+
} else if (code < 55296 || code > 57343) {
|
|
60336
|
+
output += percentEncodeNonAscii(code);
|
|
60337
|
+
} else if (code <= 56319 && i10 + 1 < input.length) {
|
|
60338
|
+
const low = input.charCodeAt(i10 + 1);
|
|
60339
|
+
if (low >= 56320 && low <= 57343) {
|
|
60340
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
60341
|
+
i10++;
|
|
60342
|
+
} else {
|
|
60343
|
+
output += percentEncodeNonAscii(65533);
|
|
60344
|
+
}
|
|
60345
|
+
} else {
|
|
60346
|
+
output += percentEncodeNonAscii(65533);
|
|
60347
|
+
}
|
|
60348
|
+
}
|
|
60349
|
+
}
|
|
60350
|
+
return output;
|
|
60351
|
+
}
|
|
60352
|
+
function encodeComponent(input, isAllowed) {
|
|
60353
|
+
let output = "";
|
|
60354
|
+
for (let i10 = 0; i10 < input.length; i10++) {
|
|
60355
|
+
const ch3 = input[i10];
|
|
60356
|
+
if (ch3 === "%" && i10 + 2 < input.length) {
|
|
60357
|
+
const hex3 = input.slice(i10 + 1, i10 + 3);
|
|
60358
|
+
if (isHexPair(hex3)) {
|
|
60359
|
+
output += "%" + hex3.toUpperCase();
|
|
60360
|
+
i10 += 2;
|
|
60361
|
+
continue;
|
|
60362
|
+
}
|
|
60363
|
+
}
|
|
60364
|
+
if (isAllowed(ch3)) {
|
|
60365
|
+
output += ch3;
|
|
60366
|
+
} else {
|
|
60367
|
+
const code = input.charCodeAt(i10);
|
|
60368
|
+
if (code < 128) {
|
|
60369
|
+
output += BYTE_HEX[code];
|
|
60370
|
+
} else if (code < 55296 || code > 57343) {
|
|
60371
|
+
output += percentEncodeNonAscii(code);
|
|
60372
|
+
} else if (code <= 56319 && i10 + 1 < input.length) {
|
|
60373
|
+
const low = input.charCodeAt(i10 + 1);
|
|
60374
|
+
if (low >= 56320 && low <= 57343) {
|
|
60375
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
60376
|
+
i10++;
|
|
60377
|
+
} else {
|
|
60378
|
+
output += percentEncodeNonAscii(65533);
|
|
60379
|
+
}
|
|
60380
|
+
} else {
|
|
60381
|
+
output += percentEncodeNonAscii(65533);
|
|
60382
|
+
}
|
|
60383
|
+
}
|
|
60384
|
+
}
|
|
60385
|
+
return output;
|
|
60386
|
+
}
|
|
60387
|
+
function encodeUserinfo(input) {
|
|
60388
|
+
return encodeComponent(input, isUserinfoCharacter);
|
|
60389
|
+
}
|
|
60390
|
+
function encodeQuery(input) {
|
|
60391
|
+
return encodeComponent(input, isQueryFragmentCharacter);
|
|
60392
|
+
}
|
|
60393
|
+
function encodeFragment(input) {
|
|
60394
|
+
return encodeComponent(input, isQueryFragmentCharacter);
|
|
60395
|
+
}
|
|
60396
|
+
function isEscapeSafe(cp2) {
|
|
60397
|
+
return cp2 >= 48 && cp2 <= 57 || cp2 >= 65 && cp2 <= 90 || cp2 >= 97 && cp2 <= 122 || cp2 === 42 || cp2 === 43 || cp2 === 45 || cp2 === 46 || cp2 === 47 || cp2 === 64 || cp2 === 95;
|
|
60398
|
+
}
|
|
60399
|
+
function normalizeQueryFragmentEncoding(input) {
|
|
60400
|
+
let output = "";
|
|
60401
|
+
for (let i10 = 0; i10 < input.length; i10++) {
|
|
60402
|
+
const ch3 = input[i10];
|
|
60403
|
+
if (ch3 === "%" && i10 + 2 < input.length) {
|
|
60404
|
+
const hex3 = input.slice(i10 + 1, i10 + 3);
|
|
60405
|
+
if (isHexPair(hex3)) {
|
|
60406
|
+
const normalizedHex = hex3.toUpperCase();
|
|
60407
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
60408
|
+
if (isUnreserved(decoded)) {
|
|
60409
|
+
output += decoded;
|
|
60410
|
+
} else {
|
|
60411
|
+
output += "%" + normalizedHex;
|
|
60412
|
+
}
|
|
60413
|
+
i10 += 2;
|
|
60414
|
+
continue;
|
|
60415
|
+
}
|
|
60416
|
+
}
|
|
60417
|
+
if (isQueryFragmentCharacter(ch3)) {
|
|
60418
|
+
output += ch3;
|
|
60419
|
+
} else {
|
|
60420
|
+
const code = input.charCodeAt(i10);
|
|
60421
|
+
if (code < 128) {
|
|
60422
|
+
output += isEscapeSafe(code) ? ch3 : BYTE_HEX[code];
|
|
60423
|
+
} else if (code < 55296 || code > 57343) {
|
|
60424
|
+
output += percentEncodeNonAscii(code);
|
|
60425
|
+
} else if (code <= 56319 && i10 + 1 < input.length) {
|
|
60426
|
+
const low = input.charCodeAt(i10 + 1);
|
|
60427
|
+
if (low >= 56320 && low <= 57343) {
|
|
60428
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
60429
|
+
i10++;
|
|
60430
|
+
} else {
|
|
60431
|
+
output += percentEncodeNonAscii(65533);
|
|
60432
|
+
}
|
|
60433
|
+
} else {
|
|
60434
|
+
output += percentEncodeNonAscii(65533);
|
|
60435
|
+
}
|
|
60260
60436
|
}
|
|
60261
60437
|
}
|
|
60262
60438
|
return output;
|
|
@@ -60279,14 +60455,18 @@ var require_utils = __commonJS({
|
|
|
60279
60455
|
function recomposeAuthority(component) {
|
|
60280
60456
|
const uriTokens = [];
|
|
60281
60457
|
if (component.userinfo !== void 0) {
|
|
60282
|
-
uriTokens.push(component.userinfo);
|
|
60458
|
+
uriTokens.push(encodeUserinfo(component.userinfo));
|
|
60283
60459
|
uriTokens.push("@");
|
|
60284
60460
|
}
|
|
60285
60461
|
if (component.host !== void 0) {
|
|
60286
|
-
let host =
|
|
60462
|
+
let host = component.host;
|
|
60287
60463
|
if (!isIPv4(host)) {
|
|
60288
|
-
|
|
60289
|
-
if (ipV6res.isIPV6
|
|
60464
|
+
let ipV6res = normalizeIPv6(host);
|
|
60465
|
+
if (ipV6res.isIPV6 !== true && ipV6res.isIPVFuture !== true) {
|
|
60466
|
+
host = normalizePercentEncoding(host, true);
|
|
60467
|
+
ipV6res = normalizeIPv6(host);
|
|
60468
|
+
}
|
|
60469
|
+
if (ipV6res.isIPV6 === true || ipV6res.isIPVFuture === true) {
|
|
60290
60470
|
host = `[${ipV6res.escapedHost}]`;
|
|
60291
60471
|
} else {
|
|
60292
60472
|
host = reescapeHostDelimiters(host, false);
|
|
@@ -60295,8 +60475,12 @@ var require_utils = __commonJS({
|
|
|
60295
60475
|
uriTokens.push(host);
|
|
60296
60476
|
}
|
|
60297
60477
|
if (typeof component.port === "number" || typeof component.port === "string") {
|
|
60478
|
+
const port = String(component.port);
|
|
60479
|
+
if (!isPort(port)) {
|
|
60480
|
+
throw new TypeError("URI port is malformed.");
|
|
60481
|
+
}
|
|
60298
60482
|
uriTokens.push(":");
|
|
60299
|
-
uriTokens.push(
|
|
60483
|
+
uriTokens.push(port);
|
|
60300
60484
|
}
|
|
60301
60485
|
return uriTokens.length ? uriTokens.join("") : void 0;
|
|
60302
60486
|
}
|
|
@@ -60306,6 +60490,11 @@ var require_utils = __commonJS({
|
|
|
60306
60490
|
reescapeHostDelimiters,
|
|
60307
60491
|
normalizePercentEncoding,
|
|
60308
60492
|
normalizePathEncoding,
|
|
60493
|
+
serializePathEncoding,
|
|
60494
|
+
normalizeQueryFragmentEncoding,
|
|
60495
|
+
encodeUserinfo,
|
|
60496
|
+
encodeQuery,
|
|
60497
|
+
encodeFragment,
|
|
60309
60498
|
escapePreservingEscapes,
|
|
60310
60499
|
removeDotSegments,
|
|
60311
60500
|
isIPv4,
|
|
@@ -60321,7 +60510,7 @@ var require_schemes = __commonJS({
|
|
|
60321
60510
|
"../../node_modules/fast-uri/lib/schemes.js"(exports, module2) {
|
|
60322
60511
|
"use strict";
|
|
60323
60512
|
var { isUUID } = require_utils();
|
|
60324
|
-
var URN_REG =
|
|
60513
|
+
var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
|
|
60325
60514
|
var supportedSchemeNames = (
|
|
60326
60515
|
/** @type {const} */
|
|
60327
60516
|
[
|
|
@@ -60382,9 +60571,10 @@ var require_schemes = __commonJS({
|
|
|
60382
60571
|
wsComponent.secure = void 0;
|
|
60383
60572
|
}
|
|
60384
60573
|
if (wsComponent.resourceName) {
|
|
60385
|
-
const
|
|
60574
|
+
const queryIndex = wsComponent.resourceName.indexOf("?");
|
|
60575
|
+
const path = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
|
|
60386
60576
|
wsComponent.path = path && path !== "/" ? path : void 0;
|
|
60387
|
-
wsComponent.query =
|
|
60577
|
+
wsComponent.query = queryIndex === -1 ? void 0 : wsComponent.resourceName.slice(queryIndex + 1);
|
|
60388
60578
|
wsComponent.resourceName = void 0;
|
|
60389
60579
|
}
|
|
60390
60580
|
wsComponent.fragment = void 0;
|
|
@@ -60396,7 +60586,7 @@ var require_schemes = __commonJS({
|
|
|
60396
60586
|
return urnComponent;
|
|
60397
60587
|
}
|
|
60398
60588
|
const matches = urnComponent.path.match(URN_REG);
|
|
60399
|
-
if (matches) {
|
|
60589
|
+
if (matches && matches[0] === urnComponent.path) {
|
|
60400
60590
|
const scheme = options.scheme || urnComponent.scheme || "urn";
|
|
60401
60591
|
urnComponent.nid = matches[1].toLowerCase();
|
|
60402
60592
|
urnComponent.nss = matches[2];
|
|
@@ -60530,8 +60720,17 @@ var require_schemes = __commonJS({
|
|
|
60530
60720
|
var require_fast_uri = __commonJS({
|
|
60531
60721
|
"../../node_modules/fast-uri/index.js"(exports, module2) {
|
|
60532
60722
|
"use strict";
|
|
60533
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding,
|
|
60723
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
60534
60724
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
60725
|
+
var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
|
|
60726
|
+
var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
|
|
60727
|
+
function decodeValidScheme(scheme) {
|
|
60728
|
+
const decodedScheme = unescape(String(scheme));
|
|
60729
|
+
if (!VALID_SCHEME.test(decodedScheme)) {
|
|
60730
|
+
throw new TypeError(MALFORMED_SCHEME_ERROR);
|
|
60731
|
+
}
|
|
60732
|
+
return decodedScheme;
|
|
60733
|
+
}
|
|
60535
60734
|
function normalize(uri, options) {
|
|
60536
60735
|
if (typeof uri === "string") {
|
|
60537
60736
|
uri = /** @type {T} */
|
|
@@ -60544,7 +60743,34 @@ var require_fast_uri = __commonJS({
|
|
|
60544
60743
|
}
|
|
60545
60744
|
function resolve(baseURI, relativeURI, options) {
|
|
60546
60745
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
60547
|
-
const
|
|
60746
|
+
const {
|
|
60747
|
+
parsed: baseParsed,
|
|
60748
|
+
malformedAuthorityOrPort: baseMalformed,
|
|
60749
|
+
malformedPercentEncoding: baseMalformedPercentEncoding,
|
|
60750
|
+
malformedSchemeSpecific: baseMalformedSchemeSpecific,
|
|
60751
|
+
malformedHost: baseMalformedHost,
|
|
60752
|
+
malformedScheme: baseMalformedScheme
|
|
60753
|
+
} = parseWithStatus(baseURI, schemelessOptions);
|
|
60754
|
+
const {
|
|
60755
|
+
parsed: relativeParsed,
|
|
60756
|
+
malformedAuthorityOrPort: relativeMalformed,
|
|
60757
|
+
malformedPercentEncoding: relativeMalformedPercentEncoding,
|
|
60758
|
+
malformedSchemeSpecific: relativeMalformedSchemeSpecific,
|
|
60759
|
+
malformedHost: relativeMalformedHost,
|
|
60760
|
+
malformedScheme: relativeMalformedScheme
|
|
60761
|
+
} = parseWithStatus(relativeURI, schemelessOptions);
|
|
60762
|
+
if (baseMalformed || relativeMalformed || baseMalformedPercentEncoding || relativeMalformedPercentEncoding || baseMalformedSchemeSpecific || relativeMalformedSchemeSpecific || baseMalformedHost || relativeMalformedHost || baseMalformedScheme || relativeMalformedScheme) {
|
|
60763
|
+
throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
|
|
60764
|
+
}
|
|
60765
|
+
const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
|
|
60766
|
+
const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
|
|
60767
|
+
const resolvedHost = resolved.host;
|
|
60768
|
+
const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
|
|
60769
|
+
canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
|
|
60770
|
+
const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !/\P{ASCII}/u.test(resolvedHost);
|
|
60771
|
+
if (resolved.error && !encodedASCIIHost) {
|
|
60772
|
+
throw new Error(resolved.error);
|
|
60773
|
+
}
|
|
60548
60774
|
schemelessOptions.skipEscape = true;
|
|
60549
60775
|
return serialize(resolved, schemelessOptions);
|
|
60550
60776
|
}
|
|
@@ -60604,7 +60830,7 @@ var require_fast_uri = __commonJS({
|
|
|
60604
60830
|
function equal(uriA, uriB, options) {
|
|
60605
60831
|
const normalizedA = normalizeComparableURI(uriA, options);
|
|
60606
60832
|
const normalizedB = normalizeComparableURI(uriB, options);
|
|
60607
|
-
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA
|
|
60833
|
+
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA === normalizedB;
|
|
60608
60834
|
}
|
|
60609
60835
|
function serialize(cmpts, opts) {
|
|
60610
60836
|
const component = {
|
|
@@ -60625,19 +60851,22 @@ var require_fast_uri = __commonJS({
|
|
|
60625
60851
|
};
|
|
60626
60852
|
const options = Object.assign({}, opts);
|
|
60627
60853
|
const uriTokens = [];
|
|
60854
|
+
if (component.scheme) {
|
|
60855
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
60856
|
+
}
|
|
60628
60857
|
const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
|
|
60629
60858
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
60859
|
+
const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
|
|
60860
|
+
const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
|
|
60630
60861
|
if (component.path !== void 0) {
|
|
60631
60862
|
if (!options.skipEscape) {
|
|
60632
|
-
component.path =
|
|
60633
|
-
if (component.scheme !== void 0) {
|
|
60634
|
-
component.path = component.path.split("%3A").join(":");
|
|
60635
|
-
}
|
|
60863
|
+
component.path = serializePathEncoding(component.path, pathNoScheme);
|
|
60636
60864
|
} else {
|
|
60637
60865
|
component.path = normalizePercentEncoding(component.path);
|
|
60638
60866
|
}
|
|
60639
60867
|
}
|
|
60640
60868
|
if (options.reference !== "suffix" && component.scheme) {
|
|
60869
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
60641
60870
|
uriTokens.push(component.scheme, ":");
|
|
60642
60871
|
}
|
|
60643
60872
|
const authority = recomposeAuthority(component);
|
|
@@ -60655,20 +60884,25 @@ var require_fast_uri = __commonJS({
|
|
|
60655
60884
|
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
60656
60885
|
s10 = removeDotSegments(s10);
|
|
60657
60886
|
}
|
|
60887
|
+
if (pathNoScheme) {
|
|
60888
|
+
s10 = serializePathEncoding(s10, true);
|
|
60889
|
+
}
|
|
60658
60890
|
if (authority === void 0 && s10[0] === "/" && s10[1] === "/") {
|
|
60659
60891
|
s10 = "/%2F" + s10.slice(2);
|
|
60660
60892
|
}
|
|
60661
60893
|
uriTokens.push(s10);
|
|
60662
60894
|
}
|
|
60663
60895
|
if (component.query !== void 0) {
|
|
60664
|
-
uriTokens.push("?", component.query);
|
|
60896
|
+
uriTokens.push("?", encodeQuery(component.query));
|
|
60665
60897
|
}
|
|
60666
60898
|
if (component.fragment !== void 0) {
|
|
60667
|
-
uriTokens.push("#", component.fragment);
|
|
60899
|
+
uriTokens.push("#", encodeFragment(component.fragment));
|
|
60668
60900
|
}
|
|
60669
60901
|
return uriTokens.join("");
|
|
60670
60902
|
}
|
|
60671
60903
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
60904
|
+
var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
|
|
60905
|
+
var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
|
|
60672
60906
|
function getParseError(parsed, matches) {
|
|
60673
60907
|
if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
|
|
60674
60908
|
return 'URI path must start with "/" when authority is present.';
|
|
@@ -60678,6 +60912,35 @@ var require_fast_uri = __commonJS({
|
|
|
60678
60912
|
}
|
|
60679
60913
|
return void 0;
|
|
60680
60914
|
}
|
|
60915
|
+
function hasMalformedPercentEncoding(component) {
|
|
60916
|
+
if (component === void 0) return false;
|
|
60917
|
+
let percent = component.indexOf("%");
|
|
60918
|
+
while (percent !== -1) {
|
|
60919
|
+
if (percent + 2 >= component.length || !/^[\da-f]{2}$/iu.test(component.slice(percent + 1, percent + 3))) {
|
|
60920
|
+
return true;
|
|
60921
|
+
}
|
|
60922
|
+
percent = component.indexOf("%", percent + 3);
|
|
60923
|
+
}
|
|
60924
|
+
return false;
|
|
60925
|
+
}
|
|
60926
|
+
function isIPLiteral(host) {
|
|
60927
|
+
return host[0] === "[" && host[host.length - 1] === "]";
|
|
60928
|
+
}
|
|
60929
|
+
function hasMalformedComponentPercentEncoding(matches) {
|
|
60930
|
+
const host = matches[4];
|
|
60931
|
+
return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
|
|
60932
|
+
}
|
|
60933
|
+
function canonicalizeHost(parsed, options, schemeHandler, isIP) {
|
|
60934
|
+
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
60935
|
+
try {
|
|
60936
|
+
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
60937
|
+
} catch (e10) {
|
|
60938
|
+
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e10;
|
|
60939
|
+
return true;
|
|
60940
|
+
}
|
|
60941
|
+
}
|
|
60942
|
+
return false;
|
|
60943
|
+
}
|
|
60681
60944
|
function parseWithStatus(uri, opts) {
|
|
60682
60945
|
const options = Object.assign({}, opts);
|
|
60683
60946
|
const parsed = {
|
|
@@ -60690,6 +60953,11 @@ var require_fast_uri = __commonJS({
|
|
|
60690
60953
|
fragment: void 0
|
|
60691
60954
|
};
|
|
60692
60955
|
let malformedAuthorityOrPort = false;
|
|
60956
|
+
let malformedPercentEncoding = false;
|
|
60957
|
+
let malformedSchemeSpecific = false;
|
|
60958
|
+
let malformedHost = false;
|
|
60959
|
+
let malformedIPLiteral = false;
|
|
60960
|
+
let malformedScheme = false;
|
|
60693
60961
|
let isIP = false;
|
|
60694
60962
|
if (options.reference === "suffix") {
|
|
60695
60963
|
if (options.scheme) {
|
|
@@ -60698,6 +60966,25 @@ var require_fast_uri = __commonJS({
|
|
|
60698
60966
|
uri = "//" + uri;
|
|
60699
60967
|
}
|
|
60700
60968
|
}
|
|
60969
|
+
const authorityMatch = uri.match(AUTHORITY_PREFIX);
|
|
60970
|
+
if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
|
|
60971
|
+
parsed.error = "URI authority must not contain a literal backslash.";
|
|
60972
|
+
malformedAuthorityOrPort = true;
|
|
60973
|
+
}
|
|
60974
|
+
const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
|
|
60975
|
+
if (introducerMatch !== null) {
|
|
60976
|
+
const region = introducerMatch[1];
|
|
60977
|
+
const normalizedRegion = region.replace(/[\t\n\r]/g, "");
|
|
60978
|
+
if (normalizedRegion.length >= 2) {
|
|
60979
|
+
if (normalizedRegion.slice(0, 2) !== "//") {
|
|
60980
|
+
parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
|
|
60981
|
+
malformedAuthorityOrPort = true;
|
|
60982
|
+
} else if (region.length !== normalizedRegion.length) {
|
|
60983
|
+
parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
|
|
60984
|
+
malformedAuthorityOrPort = true;
|
|
60985
|
+
}
|
|
60986
|
+
}
|
|
60987
|
+
}
|
|
60701
60988
|
const matches = uri.match(URI_PARSE);
|
|
60702
60989
|
if (matches) {
|
|
60703
60990
|
parsed.scheme = matches[1];
|
|
@@ -60707,6 +60994,19 @@ var require_fast_uri = __commonJS({
|
|
|
60707
60994
|
parsed.path = matches[6] || "";
|
|
60708
60995
|
parsed.query = matches[7];
|
|
60709
60996
|
parsed.fragment = matches[8];
|
|
60997
|
+
if (parsed.scheme !== void 0) {
|
|
60998
|
+
const decodedScheme = unescape(parsed.scheme);
|
|
60999
|
+
if (VALID_SCHEME.test(decodedScheme)) {
|
|
61000
|
+
parsed.scheme = decodedScheme.toLowerCase();
|
|
61001
|
+
} else {
|
|
61002
|
+
parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
|
|
61003
|
+
malformedScheme = true;
|
|
61004
|
+
}
|
|
61005
|
+
}
|
|
61006
|
+
malformedPercentEncoding = hasMalformedComponentPercentEncoding(matches);
|
|
61007
|
+
if (malformedPercentEncoding) {
|
|
61008
|
+
parsed.error = parsed.error || "URI contains malformed percent-encoding.";
|
|
61009
|
+
}
|
|
60710
61010
|
if (isNaN(parsed.port)) {
|
|
60711
61011
|
parsed.port = matches[5];
|
|
60712
61012
|
}
|
|
@@ -60718,9 +61018,16 @@ var require_fast_uri = __commonJS({
|
|
|
60718
61018
|
if (parsed.host) {
|
|
60719
61019
|
const ipv4result = isIPv4(parsed.host);
|
|
60720
61020
|
if (ipv4result === false) {
|
|
61021
|
+
const bracketedIPLiteral = isIPLiteral(parsed.host);
|
|
61022
|
+
const hasIPLiteralBracket = parsed.host.indexOf("[") !== -1 || parsed.host.indexOf("]") !== -1;
|
|
60721
61023
|
const ipv6result = normalizeIPv6(parsed.host);
|
|
60722
|
-
|
|
60723
|
-
|
|
61024
|
+
isIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
|
|
61025
|
+
malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
|
|
61026
|
+
parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
|
|
61027
|
+
if (malformedIPLiteral) {
|
|
61028
|
+
parsed.error = parsed.error || "URI host is malformed.";
|
|
61029
|
+
malformedAuthorityOrPort = true;
|
|
61030
|
+
}
|
|
60724
61031
|
} else {
|
|
60725
61032
|
isIP = true;
|
|
60726
61033
|
}
|
|
@@ -60738,42 +61045,37 @@ var require_fast_uri = __commonJS({
|
|
|
60738
61045
|
parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
|
|
60739
61046
|
}
|
|
60740
61047
|
const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
|
|
60741
|
-
if (!
|
|
60742
|
-
|
|
60743
|
-
|
|
60744
|
-
|
|
60745
|
-
|
|
60746
|
-
|
|
60747
|
-
|
|
61048
|
+
if (!malformedIPLiteral) {
|
|
61049
|
+
malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
|
|
61050
|
+
}
|
|
61051
|
+
if (uri.indexOf("%") !== -1 && parsed.host !== void 0 && !malformedIPLiteral) {
|
|
61052
|
+
let host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
|
|
61053
|
+
if (!isIP) {
|
|
61054
|
+
host = normalizePercentEncoding(host.toLowerCase());
|
|
60748
61055
|
}
|
|
61056
|
+
parsed.host = reescapeHostDelimiters(host, isIP);
|
|
60749
61057
|
}
|
|
60750
61058
|
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
60751
|
-
if (uri.indexOf("%") !== -1) {
|
|
60752
|
-
if (parsed.scheme !== void 0) {
|
|
60753
|
-
parsed.scheme = unescape(parsed.scheme);
|
|
60754
|
-
}
|
|
60755
|
-
if (parsed.host !== void 0) {
|
|
60756
|
-
parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
|
|
60757
|
-
}
|
|
60758
|
-
}
|
|
60759
61059
|
if (parsed.path) {
|
|
60760
61060
|
parsed.path = normalizePathEncoding(parsed.path);
|
|
60761
61061
|
}
|
|
61062
|
+
if (parsed.query) {
|
|
61063
|
+
parsed.query = normalizeQueryFragmentEncoding(parsed.query);
|
|
61064
|
+
}
|
|
60762
61065
|
if (parsed.fragment) {
|
|
60763
|
-
|
|
60764
|
-
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
60765
|
-
} catch {
|
|
60766
|
-
parsed.error = parsed.error || "URI malformed";
|
|
60767
|
-
}
|
|
61066
|
+
parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
|
|
60768
61067
|
}
|
|
60769
61068
|
}
|
|
60770
61069
|
if (schemeHandler && schemeHandler.parse) {
|
|
60771
61070
|
schemeHandler.parse(parsed, options);
|
|
61071
|
+
if (schemeHandler === SCHEMES.urn && parsed.nid === void 0) {
|
|
61072
|
+
malformedSchemeSpecific = true;
|
|
61073
|
+
}
|
|
60772
61074
|
}
|
|
60773
61075
|
} else {
|
|
60774
61076
|
parsed.error = parsed.error || "URI can not be parsed.";
|
|
60775
61077
|
}
|
|
60776
|
-
return { parsed, malformedAuthorityOrPort };
|
|
61078
|
+
return { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme };
|
|
60777
61079
|
}
|
|
60778
61080
|
function parse3(uri, opts) {
|
|
60779
61081
|
return parseWithStatus(uri, opts).parsed;
|
|
@@ -60782,20 +61084,28 @@ var require_fast_uri = __commonJS({
|
|
|
60782
61084
|
return normalizeStringWithStatus(uri, opts).normalized;
|
|
60783
61085
|
}
|
|
60784
61086
|
function normalizeStringWithStatus(uri, opts) {
|
|
60785
|
-
const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
|
|
61087
|
+
const { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = parseWithStatus(uri, opts);
|
|
60786
61088
|
return {
|
|
60787
|
-
normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
|
|
60788
|
-
malformedAuthorityOrPort
|
|
61089
|
+
normalized: malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? uri : serialize(parsed, opts),
|
|
61090
|
+
malformedAuthorityOrPort,
|
|
61091
|
+
malformedPercentEncoding,
|
|
61092
|
+
malformedSchemeSpecific,
|
|
61093
|
+
malformedHost,
|
|
61094
|
+
malformedScheme
|
|
60789
61095
|
};
|
|
60790
61096
|
}
|
|
60791
61097
|
function normalizeComparableURI(uri, opts) {
|
|
60792
|
-
if (typeof uri
|
|
60793
|
-
|
|
60794
|
-
return malformedAuthorityOrPort ? void 0 : normalized;
|
|
61098
|
+
if (typeof uri !== "string" && typeof uri !== "object") {
|
|
61099
|
+
return void 0;
|
|
60795
61100
|
}
|
|
60796
|
-
|
|
60797
|
-
|
|
61101
|
+
let value;
|
|
61102
|
+
try {
|
|
61103
|
+
value = typeof uri === "string" ? uri : serialize(uri, opts);
|
|
61104
|
+
} catch {
|
|
61105
|
+
return void 0;
|
|
60798
61106
|
}
|
|
61107
|
+
const { normalized, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = normalizeStringWithStatus(value, opts);
|
|
61108
|
+
return malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? void 0 : normalized;
|
|
60799
61109
|
}
|
|
60800
61110
|
var fastUri = {
|
|
60801
61111
|
SCHEMES,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendatalabs/personal-server-ts-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.29.1",
|
|
4
4
|
"description": "Hono HTTP server for the Vana Personal Server — routes, middleware, composition root",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"dev": "node --watch dist/index.js"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@hono/node-server": "^1.19.
|
|
54
|
-
"@opendatalabs/personal-server-ts-core": "1.
|
|
55
|
-
"@opendatalabs/personal-server-ts-lite": "1.
|
|
53
|
+
"@hono/node-server": "^1.19.17",
|
|
54
|
+
"@opendatalabs/personal-server-ts-core": "1.29.1",
|
|
55
|
+
"@opendatalabs/personal-server-ts-lite": "1.29.1",
|
|
56
56
|
"@opendatalabs/vana-sdk": "3.23.0-pr.211.36da1d8",
|
|
57
57
|
"better-sqlite3": "^12.11.1",
|
|
58
|
-
"hono": "^4.12
|
|
58
|
+
"hono": "^4.13.12",
|
|
59
59
|
"pino": "^10.3.1",
|
|
60
60
|
"pino-pretty": "^13.0.0",
|
|
61
61
|
"viem": "^2.54.2"
|