create-nextly-app 0.0.2-alpha.62 → 0.0.2-alpha.64
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/{chunk-CTBK76CF.mjs → chunk-I2U7KBH6.mjs} +421 -132
- package/dist/chunk-I2U7KBH6.mjs.map +1 -0
- package/dist/cli.cjs +420 -131
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +419 -130
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +5 -5
- package/templates/base/.env.example +7 -1
- package/templates/base/src/app/layout.tsx +2 -3
- package/templates/base/src/lib/site-url.ts +55 -0
- package/templates/blank/src/app/(frontend)/page.tsx +2 -2
- package/templates/blank/src/app/layout.tsx +2 -3
- package/dist/chunk-CTBK76CF.mjs.map +0 -1
package/dist/cli.cjs
CHANGED
|
@@ -6259,7 +6259,7 @@ var require_package = __commonJS({
|
|
|
6259
6259
|
"package.json"(exports$1, module) {
|
|
6260
6260
|
module.exports = {
|
|
6261
6261
|
name: "create-nextly-app",
|
|
6262
|
-
version: "0.0.2-alpha.
|
|
6262
|
+
version: "0.0.2-alpha.64",
|
|
6263
6263
|
description: "CLI to scaffold Nextly in your Next.js project",
|
|
6264
6264
|
license: "MIT",
|
|
6265
6265
|
type: "module",
|
|
@@ -9450,12 +9450,31 @@ var require_data = __commonJS2({
|
|
|
9450
9450
|
}
|
|
9451
9451
|
});
|
|
9452
9452
|
var require_utils = __commonJS2({
|
|
9453
|
-
"../../node_modules/.pnpm/fast-uri@3.1.
|
|
9453
|
+
"../../node_modules/.pnpm/fast-uri@3.1.7/node_modules/fast-uri/lib/utils.js"(exports$1, module) {
|
|
9454
9454
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
9455
9455
|
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);
|
|
9456
|
+
var isPort = RegExp.prototype.test.bind(/^\d*$/u);
|
|
9456
9457
|
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
9457
9458
|
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
9458
|
-
var isPathCharacter = RegExp.prototype.test.bind(/^[
|
|
9459
|
+
var isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u);
|
|
9460
|
+
var isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u);
|
|
9461
|
+
var isUserinfoCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u);
|
|
9462
|
+
var BYTE_HEX = new Array(256);
|
|
9463
|
+
{
|
|
9464
|
+
const HEX_DIGITS = "0123456789ABCDEF";
|
|
9465
|
+
for (let i2 = 0; i2 < 256; i2++) {
|
|
9466
|
+
BYTE_HEX[i2] = "%" + HEX_DIGITS[i2 >> 4] + HEX_DIGITS[i2 & 15];
|
|
9467
|
+
}
|
|
9468
|
+
}
|
|
9469
|
+
function percentEncodeNonAscii(cp) {
|
|
9470
|
+
if (cp < 2048) {
|
|
9471
|
+
return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
|
|
9472
|
+
}
|
|
9473
|
+
if (cp < 65536) {
|
|
9474
|
+
return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
9475
|
+
}
|
|
9476
|
+
return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
9477
|
+
}
|
|
9459
9478
|
function stringArrayToHexStripped(input) {
|
|
9460
9479
|
let acc = "";
|
|
9461
9480
|
let code = 0;
|
|
@@ -9480,91 +9499,105 @@ var require_utils = __commonJS2({
|
|
|
9480
9499
|
}
|
|
9481
9500
|
return acc;
|
|
9482
9501
|
}
|
|
9502
|
+
var isHextet = RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/);
|
|
9503
|
+
var isIPvFuture = RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/);
|
|
9504
|
+
var isZoneCharacter = RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/);
|
|
9483
9505
|
var nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
|
|
9484
|
-
function
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9491
|
-
if (hex !== "") {
|
|
9492
|
-
address.push(hex);
|
|
9493
|
-
} else {
|
|
9494
|
-
output.error = true;
|
|
9495
|
-
return false;
|
|
9506
|
+
function isZoneIdentifier(zone) {
|
|
9507
|
+
if (zone.length === 0) return false;
|
|
9508
|
+
for (let i2 = 0; i2 < zone.length; i2++) {
|
|
9509
|
+
if (isZoneCharacter(zone[i2])) continue;
|
|
9510
|
+
if (zone[i2] === "%" && i2 + 2 < zone.length && isHexPair(zone.slice(i2 + 1, i2 + 3))) {
|
|
9511
|
+
i2 += 2;
|
|
9512
|
+
continue;
|
|
9496
9513
|
}
|
|
9497
|
-
|
|
9514
|
+
return false;
|
|
9498
9515
|
}
|
|
9499
9516
|
return true;
|
|
9500
9517
|
}
|
|
9501
|
-
function
|
|
9502
|
-
let
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
let
|
|
9507
|
-
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
}
|
|
9514
|
-
if (cursor === ":") {
|
|
9515
|
-
if (endipv6Encountered === true) {
|
|
9516
|
-
endIpv6 = true;
|
|
9517
|
-
}
|
|
9518
|
-
if (!consume(buffer, address, output)) {
|
|
9519
|
-
break;
|
|
9520
|
-
}
|
|
9521
|
-
if (++tokenCount > 7) {
|
|
9522
|
-
output.error = true;
|
|
9523
|
-
break;
|
|
9524
|
-
}
|
|
9525
|
-
if (i2 > 0 && input[i2 - 1] === ":") {
|
|
9526
|
-
endipv6Encountered = true;
|
|
9527
|
-
}
|
|
9528
|
-
address.push(":");
|
|
9529
|
-
continue;
|
|
9530
|
-
} else if (cursor === "%") {
|
|
9531
|
-
if (!consume(buffer, address, output)) {
|
|
9532
|
-
break;
|
|
9518
|
+
function compressIPv6ZeroRun(hextets) {
|
|
9519
|
+
let bestStart = -1;
|
|
9520
|
+
let bestLength = 0;
|
|
9521
|
+
let runStart = -1;
|
|
9522
|
+
let runLength = 0;
|
|
9523
|
+
for (let i2 = 0; i2 < hextets.length; i2++) {
|
|
9524
|
+
if (hextets[i2] === "0") {
|
|
9525
|
+
if (runStart === -1) runStart = i2;
|
|
9526
|
+
runLength++;
|
|
9527
|
+
if (runLength > bestLength) {
|
|
9528
|
+
bestLength = runLength;
|
|
9529
|
+
bestStart = runStart;
|
|
9533
9530
|
}
|
|
9534
|
-
consume = consumeIsZone;
|
|
9535
9531
|
} else {
|
|
9536
|
-
|
|
9532
|
+
runStart = -1;
|
|
9533
|
+
runLength = 0;
|
|
9534
|
+
}
|
|
9535
|
+
}
|
|
9536
|
+
if (bestLength < 2) return hextets.join(":");
|
|
9537
|
+
const head = hextets.slice(0, bestStart).join(":");
|
|
9538
|
+
const tail = hextets.slice(bestStart + bestLength).join(":");
|
|
9539
|
+
return head + "::" + tail;
|
|
9540
|
+
}
|
|
9541
|
+
function normalizeIPv6Address(input) {
|
|
9542
|
+
const compression = input.indexOf("::");
|
|
9543
|
+
if (compression !== -1 && input.indexOf("::", compression + 1) !== -1) return void 0;
|
|
9544
|
+
const left = compression === -1 ? input.split(":") : input.slice(0, compression).split(":");
|
|
9545
|
+
const right = compression === -1 ? [] : input.slice(compression + 2).split(":");
|
|
9546
|
+
if (compression !== -1) {
|
|
9547
|
+
if (left.length === 1 && left[0] === "") left.length = 0;
|
|
9548
|
+
if (right.length === 1 && right[0] === "") right.length = 0;
|
|
9549
|
+
}
|
|
9550
|
+
const parts = left.concat(right);
|
|
9551
|
+
let hextetCount = 0;
|
|
9552
|
+
for (let i2 = 0; i2 < parts.length; i2++) {
|
|
9553
|
+
const part = parts[i2];
|
|
9554
|
+
if (part === "") return void 0;
|
|
9555
|
+
if (part.indexOf(".") !== -1) {
|
|
9556
|
+
if (i2 !== parts.length - 1 || compression !== -1 && right.length === 0 || !isIPv4(part)) return void 0;
|
|
9557
|
+
hextetCount += 2;
|
|
9537
9558
|
continue;
|
|
9538
9559
|
}
|
|
9560
|
+
if (!isHextet(part)) return void 0;
|
|
9561
|
+
parts[i2] = parseInt(part, 16).toString(16);
|
|
9562
|
+
hextetCount++;
|
|
9539
9563
|
}
|
|
9540
|
-
if (
|
|
9541
|
-
if (
|
|
9542
|
-
|
|
9543
|
-
} else if (endIpv6) {
|
|
9544
|
-
address.push(buffer.join(""));
|
|
9545
|
-
} else {
|
|
9546
|
-
address.push(stringArrayToHexStripped(buffer));
|
|
9547
|
-
}
|
|
9564
|
+
if (compression === -1) {
|
|
9565
|
+
if (hextetCount !== 8) return void 0;
|
|
9566
|
+
return compressIPv6ZeroRun(parts);
|
|
9548
9567
|
}
|
|
9549
|
-
|
|
9550
|
-
|
|
9568
|
+
if (hextetCount >= 8) return void 0;
|
|
9569
|
+
const expanded = parts.slice(0, left.length);
|
|
9570
|
+
for (let i2 = hextetCount; i2 < 8; i2++) expanded.push("0");
|
|
9571
|
+
for (let i2 = left.length; i2 < parts.length; i2++) expanded.push(parts[i2]);
|
|
9572
|
+
return compressIPv6ZeroRun(expanded);
|
|
9551
9573
|
}
|
|
9552
9574
|
function normalizeIPv6(host) {
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
}
|
|
9556
|
-
|
|
9557
|
-
if (
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9562
|
-
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9575
|
+
const bracketed = host[0] === "[" && host[host.length - 1] === "]";
|
|
9576
|
+
const hasBracket = host[0] === "[" || host[host.length - 1] === "]";
|
|
9577
|
+
if (hasBracket && !bracketed) return { host, isIPV6: false, error: true };
|
|
9578
|
+
let input = bracketed ? host.slice(1, -1) : host;
|
|
9579
|
+
if (bracketed && isIPvFuture(input)) {
|
|
9580
|
+
input = input.toLowerCase();
|
|
9581
|
+
return { host: `[${input}]`, escapedHost: input, isIPV6: false, isIPVFuture: true };
|
|
9582
|
+
}
|
|
9583
|
+
if (findToken(input, ":") < 2) {
|
|
9584
|
+
return { host, isIPV6: false, error: bracketed };
|
|
9585
|
+
}
|
|
9586
|
+
let zoneIdentifier = "";
|
|
9587
|
+
const zoneSeparator = input.indexOf("%");
|
|
9588
|
+
if (zoneSeparator !== -1) {
|
|
9589
|
+
const separatorLength = input.slice(zoneSeparator, zoneSeparator + 3).toLowerCase() === "%25" ? 3 : 1;
|
|
9590
|
+
zoneIdentifier = input.slice(zoneSeparator + separatorLength);
|
|
9591
|
+
if (!isZoneIdentifier(zoneIdentifier)) return { host, isIPV6: false, error: true };
|
|
9592
|
+
input = input.slice(0, zoneSeparator);
|
|
9593
|
+
}
|
|
9594
|
+
const address = normalizeIPv6Address(input);
|
|
9595
|
+
if (address === void 0) return { host, isIPV6: false, error: true };
|
|
9596
|
+
return {
|
|
9597
|
+
host: address + (zoneIdentifier ? "%" + zoneIdentifier : ""),
|
|
9598
|
+
escapedHost: address + (zoneIdentifier ? "%25" + zoneIdentifier : ""),
|
|
9599
|
+
isIPV6: true
|
|
9600
|
+
};
|
|
9568
9601
|
}
|
|
9569
9602
|
function findToken(str, token) {
|
|
9570
9603
|
let ind = 0;
|
|
@@ -9683,7 +9716,8 @@ var require_utils = __commonJS2({
|
|
|
9683
9716
|
function normalizePathEncoding(input) {
|
|
9684
9717
|
let output = "";
|
|
9685
9718
|
for (let i2 = 0; i2 < input.length; i2++) {
|
|
9686
|
-
|
|
9719
|
+
const ch = input[i2];
|
|
9720
|
+
if (ch === "%" && i2 + 2 < input.length) {
|
|
9687
9721
|
const hex = input.slice(i2 + 1, i2 + 3);
|
|
9688
9722
|
if (isHexPair(hex)) {
|
|
9689
9723
|
const normalizedHex = hex.toUpperCase();
|
|
@@ -9697,10 +9731,152 @@ var require_utils = __commonJS2({
|
|
|
9697
9731
|
continue;
|
|
9698
9732
|
}
|
|
9699
9733
|
}
|
|
9700
|
-
if (isPathCharacter(
|
|
9701
|
-
output +=
|
|
9734
|
+
if (isPathCharacter(ch)) {
|
|
9735
|
+
output += ch;
|
|
9736
|
+
} else {
|
|
9737
|
+
const code = input.charCodeAt(i2);
|
|
9738
|
+
if (code < 128) {
|
|
9739
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
9740
|
+
} else if (code < 55296 || code > 57343) {
|
|
9741
|
+
output += percentEncodeNonAscii(code);
|
|
9742
|
+
} else if (code <= 56319 && i2 + 1 < input.length) {
|
|
9743
|
+
const low = input.charCodeAt(i2 + 1);
|
|
9744
|
+
if (low >= 56320 && low <= 57343) {
|
|
9745
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
9746
|
+
i2++;
|
|
9747
|
+
} else {
|
|
9748
|
+
output += percentEncodeNonAscii(65533);
|
|
9749
|
+
}
|
|
9750
|
+
} else {
|
|
9751
|
+
output += percentEncodeNonAscii(65533);
|
|
9752
|
+
}
|
|
9753
|
+
}
|
|
9754
|
+
}
|
|
9755
|
+
return output;
|
|
9756
|
+
}
|
|
9757
|
+
function serializePathEncoding(input, pathNoScheme = false) {
|
|
9758
|
+
let output = "";
|
|
9759
|
+
let firstSegment = pathNoScheme && input[0] !== "/";
|
|
9760
|
+
for (let i2 = 0; i2 < input.length; i2++) {
|
|
9761
|
+
const ch = input[i2];
|
|
9762
|
+
if (ch === "%" && i2 + 2 < input.length) {
|
|
9763
|
+
const hex = input.slice(i2 + 1, i2 + 3);
|
|
9764
|
+
if (isHexPair(hex)) {
|
|
9765
|
+
output += "%" + hex.toUpperCase();
|
|
9766
|
+
i2 += 2;
|
|
9767
|
+
continue;
|
|
9768
|
+
}
|
|
9769
|
+
}
|
|
9770
|
+
if (ch === "/") {
|
|
9771
|
+
firstSegment = false;
|
|
9772
|
+
}
|
|
9773
|
+
if (isPathCharacter(ch) && (ch !== ":" || !firstSegment)) {
|
|
9774
|
+
output += ch;
|
|
9775
|
+
} else {
|
|
9776
|
+
const code = input.charCodeAt(i2);
|
|
9777
|
+
if (code < 128) {
|
|
9778
|
+
output += BYTE_HEX[code];
|
|
9779
|
+
} else if (code < 55296 || code > 57343) {
|
|
9780
|
+
output += percentEncodeNonAscii(code);
|
|
9781
|
+
} else if (code <= 56319 && i2 + 1 < input.length) {
|
|
9782
|
+
const low = input.charCodeAt(i2 + 1);
|
|
9783
|
+
if (low >= 56320 && low <= 57343) {
|
|
9784
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
9785
|
+
i2++;
|
|
9786
|
+
} else {
|
|
9787
|
+
output += percentEncodeNonAscii(65533);
|
|
9788
|
+
}
|
|
9789
|
+
} else {
|
|
9790
|
+
output += percentEncodeNonAscii(65533);
|
|
9791
|
+
}
|
|
9792
|
+
}
|
|
9793
|
+
}
|
|
9794
|
+
return output;
|
|
9795
|
+
}
|
|
9796
|
+
function encodeComponent(input, isAllowed) {
|
|
9797
|
+
let output = "";
|
|
9798
|
+
for (let i2 = 0; i2 < input.length; i2++) {
|
|
9799
|
+
const ch = input[i2];
|
|
9800
|
+
if (ch === "%" && i2 + 2 < input.length) {
|
|
9801
|
+
const hex = input.slice(i2 + 1, i2 + 3);
|
|
9802
|
+
if (isHexPair(hex)) {
|
|
9803
|
+
output += "%" + hex.toUpperCase();
|
|
9804
|
+
i2 += 2;
|
|
9805
|
+
continue;
|
|
9806
|
+
}
|
|
9807
|
+
}
|
|
9808
|
+
if (isAllowed(ch)) {
|
|
9809
|
+
output += ch;
|
|
9810
|
+
} else {
|
|
9811
|
+
const code = input.charCodeAt(i2);
|
|
9812
|
+
if (code < 128) {
|
|
9813
|
+
output += BYTE_HEX[code];
|
|
9814
|
+
} else if (code < 55296 || code > 57343) {
|
|
9815
|
+
output += percentEncodeNonAscii(code);
|
|
9816
|
+
} else if (code <= 56319 && i2 + 1 < input.length) {
|
|
9817
|
+
const low = input.charCodeAt(i2 + 1);
|
|
9818
|
+
if (low >= 56320 && low <= 57343) {
|
|
9819
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
9820
|
+
i2++;
|
|
9821
|
+
} else {
|
|
9822
|
+
output += percentEncodeNonAscii(65533);
|
|
9823
|
+
}
|
|
9824
|
+
} else {
|
|
9825
|
+
output += percentEncodeNonAscii(65533);
|
|
9826
|
+
}
|
|
9827
|
+
}
|
|
9828
|
+
}
|
|
9829
|
+
return output;
|
|
9830
|
+
}
|
|
9831
|
+
function encodeUserinfo(input) {
|
|
9832
|
+
return encodeComponent(input, isUserinfoCharacter);
|
|
9833
|
+
}
|
|
9834
|
+
function encodeQuery(input) {
|
|
9835
|
+
return encodeComponent(input, isQueryFragmentCharacter);
|
|
9836
|
+
}
|
|
9837
|
+
function encodeFragment(input) {
|
|
9838
|
+
return encodeComponent(input, isQueryFragmentCharacter);
|
|
9839
|
+
}
|
|
9840
|
+
function isEscapeSafe(cp) {
|
|
9841
|
+
return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
|
|
9842
|
+
}
|
|
9843
|
+
function normalizeQueryFragmentEncoding(input) {
|
|
9844
|
+
let output = "";
|
|
9845
|
+
for (let i2 = 0; i2 < input.length; i2++) {
|
|
9846
|
+
const ch = input[i2];
|
|
9847
|
+
if (ch === "%" && i2 + 2 < input.length) {
|
|
9848
|
+
const hex = input.slice(i2 + 1, i2 + 3);
|
|
9849
|
+
if (isHexPair(hex)) {
|
|
9850
|
+
const normalizedHex = hex.toUpperCase();
|
|
9851
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
9852
|
+
if (isUnreserved(decoded)) {
|
|
9853
|
+
output += decoded;
|
|
9854
|
+
} else {
|
|
9855
|
+
output += "%" + normalizedHex;
|
|
9856
|
+
}
|
|
9857
|
+
i2 += 2;
|
|
9858
|
+
continue;
|
|
9859
|
+
}
|
|
9860
|
+
}
|
|
9861
|
+
if (isQueryFragmentCharacter(ch)) {
|
|
9862
|
+
output += ch;
|
|
9702
9863
|
} else {
|
|
9703
|
-
|
|
9864
|
+
const code = input.charCodeAt(i2);
|
|
9865
|
+
if (code < 128) {
|
|
9866
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
9867
|
+
} else if (code < 55296 || code > 57343) {
|
|
9868
|
+
output += percentEncodeNonAscii(code);
|
|
9869
|
+
} else if (code <= 56319 && i2 + 1 < input.length) {
|
|
9870
|
+
const low = input.charCodeAt(i2 + 1);
|
|
9871
|
+
if (low >= 56320 && low <= 57343) {
|
|
9872
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
9873
|
+
i2++;
|
|
9874
|
+
} else {
|
|
9875
|
+
output += percentEncodeNonAscii(65533);
|
|
9876
|
+
}
|
|
9877
|
+
} else {
|
|
9878
|
+
output += percentEncodeNonAscii(65533);
|
|
9879
|
+
}
|
|
9704
9880
|
}
|
|
9705
9881
|
}
|
|
9706
9882
|
return output;
|
|
@@ -9723,14 +9899,18 @@ var require_utils = __commonJS2({
|
|
|
9723
9899
|
function recomposeAuthority(component) {
|
|
9724
9900
|
const uriTokens = [];
|
|
9725
9901
|
if (component.userinfo !== void 0) {
|
|
9726
|
-
uriTokens.push(component.userinfo);
|
|
9902
|
+
uriTokens.push(encodeUserinfo(component.userinfo));
|
|
9727
9903
|
uriTokens.push("@");
|
|
9728
9904
|
}
|
|
9729
9905
|
if (component.host !== void 0) {
|
|
9730
|
-
let host =
|
|
9906
|
+
let host = component.host;
|
|
9731
9907
|
if (!isIPv4(host)) {
|
|
9732
|
-
|
|
9733
|
-
if (ipV6res.isIPV6
|
|
9908
|
+
let ipV6res = normalizeIPv6(host);
|
|
9909
|
+
if (ipV6res.isIPV6 !== true && ipV6res.isIPVFuture !== true) {
|
|
9910
|
+
host = normalizePercentEncoding(host, true);
|
|
9911
|
+
ipV6res = normalizeIPv6(host);
|
|
9912
|
+
}
|
|
9913
|
+
if (ipV6res.isIPV6 === true || ipV6res.isIPVFuture === true) {
|
|
9734
9914
|
host = `[${ipV6res.escapedHost}]`;
|
|
9735
9915
|
} else {
|
|
9736
9916
|
host = reescapeHostDelimiters(host, false);
|
|
@@ -9739,8 +9919,12 @@ var require_utils = __commonJS2({
|
|
|
9739
9919
|
uriTokens.push(host);
|
|
9740
9920
|
}
|
|
9741
9921
|
if (typeof component.port === "number" || typeof component.port === "string") {
|
|
9922
|
+
const port = String(component.port);
|
|
9923
|
+
if (!isPort(port)) {
|
|
9924
|
+
throw new TypeError("URI port is malformed.");
|
|
9925
|
+
}
|
|
9742
9926
|
uriTokens.push(":");
|
|
9743
|
-
uriTokens.push(
|
|
9927
|
+
uriTokens.push(port);
|
|
9744
9928
|
}
|
|
9745
9929
|
return uriTokens.length ? uriTokens.join("") : void 0;
|
|
9746
9930
|
}
|
|
@@ -9750,6 +9934,11 @@ var require_utils = __commonJS2({
|
|
|
9750
9934
|
reescapeHostDelimiters,
|
|
9751
9935
|
normalizePercentEncoding,
|
|
9752
9936
|
normalizePathEncoding,
|
|
9937
|
+
serializePathEncoding,
|
|
9938
|
+
normalizeQueryFragmentEncoding,
|
|
9939
|
+
encodeUserinfo,
|
|
9940
|
+
encodeQuery,
|
|
9941
|
+
encodeFragment,
|
|
9753
9942
|
escapePreservingEscapes,
|
|
9754
9943
|
removeDotSegments,
|
|
9755
9944
|
isIPv4,
|
|
@@ -9760,9 +9949,9 @@ var require_utils = __commonJS2({
|
|
|
9760
9949
|
}
|
|
9761
9950
|
});
|
|
9762
9951
|
var require_schemes = __commonJS2({
|
|
9763
|
-
"../../node_modules/.pnpm/fast-uri@3.1.
|
|
9952
|
+
"../../node_modules/.pnpm/fast-uri@3.1.7/node_modules/fast-uri/lib/schemes.js"(exports$1, module) {
|
|
9764
9953
|
var { isUUID } = require_utils();
|
|
9765
|
-
var URN_REG =
|
|
9954
|
+
var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
|
|
9766
9955
|
var supportedSchemeNames = (
|
|
9767
9956
|
/** @type {const} */
|
|
9768
9957
|
[
|
|
@@ -9823,9 +10012,10 @@ var require_schemes = __commonJS2({
|
|
|
9823
10012
|
wsComponent.secure = void 0;
|
|
9824
10013
|
}
|
|
9825
10014
|
if (wsComponent.resourceName) {
|
|
9826
|
-
const
|
|
10015
|
+
const queryIndex = wsComponent.resourceName.indexOf("?");
|
|
10016
|
+
const path52 = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
|
|
9827
10017
|
wsComponent.path = path52 && path52 !== "/" ? path52 : void 0;
|
|
9828
|
-
wsComponent.query =
|
|
10018
|
+
wsComponent.query = queryIndex === -1 ? void 0 : wsComponent.resourceName.slice(queryIndex + 1);
|
|
9829
10019
|
wsComponent.resourceName = void 0;
|
|
9830
10020
|
}
|
|
9831
10021
|
wsComponent.fragment = void 0;
|
|
@@ -9837,7 +10027,7 @@ var require_schemes = __commonJS2({
|
|
|
9837
10027
|
return urnComponent;
|
|
9838
10028
|
}
|
|
9839
10029
|
const matches = urnComponent.path.match(URN_REG);
|
|
9840
|
-
if (matches) {
|
|
10030
|
+
if (matches && matches[0] === urnComponent.path) {
|
|
9841
10031
|
const scheme = options.scheme || urnComponent.scheme || "urn";
|
|
9842
10032
|
urnComponent.nid = matches[1].toLowerCase();
|
|
9843
10033
|
urnComponent.nss = matches[2];
|
|
@@ -9967,9 +10157,18 @@ var require_schemes = __commonJS2({
|
|
|
9967
10157
|
}
|
|
9968
10158
|
});
|
|
9969
10159
|
var require_fast_uri = __commonJS2({
|
|
9970
|
-
"../../node_modules/.pnpm/fast-uri@3.1.
|
|
9971
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding,
|
|
10160
|
+
"../../node_modules/.pnpm/fast-uri@3.1.7/node_modules/fast-uri/index.js"(exports$1, module) {
|
|
10161
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
9972
10162
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
10163
|
+
var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
|
|
10164
|
+
var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
|
|
10165
|
+
function decodeValidScheme(scheme) {
|
|
10166
|
+
const decodedScheme = unescape(String(scheme));
|
|
10167
|
+
if (!VALID_SCHEME.test(decodedScheme)) {
|
|
10168
|
+
throw new TypeError(MALFORMED_SCHEME_ERROR);
|
|
10169
|
+
}
|
|
10170
|
+
return decodedScheme;
|
|
10171
|
+
}
|
|
9973
10172
|
function normalize(uri, options) {
|
|
9974
10173
|
if (typeof uri === "string") {
|
|
9975
10174
|
uri = /** @type {T} */
|
|
@@ -9982,12 +10181,34 @@ var require_fast_uri = __commonJS2({
|
|
|
9982
10181
|
}
|
|
9983
10182
|
function resolve(baseURI, relativeURI, options) {
|
|
9984
10183
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
9985
|
-
const {
|
|
9986
|
-
|
|
9987
|
-
|
|
10184
|
+
const {
|
|
10185
|
+
parsed: baseParsed,
|
|
10186
|
+
malformedAuthorityOrPort: baseMalformed,
|
|
10187
|
+
malformedPercentEncoding: baseMalformedPercentEncoding,
|
|
10188
|
+
malformedSchemeSpecific: baseMalformedSchemeSpecific,
|
|
10189
|
+
malformedHost: baseMalformedHost,
|
|
10190
|
+
malformedScheme: baseMalformedScheme
|
|
10191
|
+
} = parseWithStatus(baseURI, schemelessOptions);
|
|
10192
|
+
const {
|
|
10193
|
+
parsed: relativeParsed,
|
|
10194
|
+
malformedAuthorityOrPort: relativeMalformed,
|
|
10195
|
+
malformedPercentEncoding: relativeMalformedPercentEncoding,
|
|
10196
|
+
malformedSchemeSpecific: relativeMalformedSchemeSpecific,
|
|
10197
|
+
malformedHost: relativeMalformedHost,
|
|
10198
|
+
malformedScheme: relativeMalformedScheme
|
|
10199
|
+
} = parseWithStatus(relativeURI, schemelessOptions);
|
|
10200
|
+
if (baseMalformed || relativeMalformed || baseMalformedPercentEncoding || relativeMalformedPercentEncoding || baseMalformedSchemeSpecific || relativeMalformedSchemeSpecific || baseMalformedHost || relativeMalformedHost || baseMalformedScheme || relativeMalformedScheme) {
|
|
9988
10201
|
throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
|
|
9989
10202
|
}
|
|
9990
10203
|
const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
|
|
10204
|
+
const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
|
|
10205
|
+
const resolvedHost = resolved.host;
|
|
10206
|
+
const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
|
|
10207
|
+
canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
|
|
10208
|
+
const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !new RegExp("\\P{ASCII}", "u").test(resolvedHost);
|
|
10209
|
+
if (resolved.error && !encodedASCIIHost) {
|
|
10210
|
+
throw new Error(resolved.error);
|
|
10211
|
+
}
|
|
9991
10212
|
schemelessOptions.skipEscape = true;
|
|
9992
10213
|
return serialize2(resolved, schemelessOptions);
|
|
9993
10214
|
}
|
|
@@ -10047,7 +10268,7 @@ var require_fast_uri = __commonJS2({
|
|
|
10047
10268
|
function equal(uriA, uriB, options) {
|
|
10048
10269
|
const normalizedA = normalizeComparableURI(uriA, options);
|
|
10049
10270
|
const normalizedB = normalizeComparableURI(uriB, options);
|
|
10050
|
-
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA
|
|
10271
|
+
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA === normalizedB;
|
|
10051
10272
|
}
|
|
10052
10273
|
function serialize2(cmpts, opts) {
|
|
10053
10274
|
const component = {
|
|
@@ -10068,19 +10289,22 @@ var require_fast_uri = __commonJS2({
|
|
|
10068
10289
|
};
|
|
10069
10290
|
const options = Object.assign({}, opts);
|
|
10070
10291
|
const uriTokens = [];
|
|
10292
|
+
if (component.scheme) {
|
|
10293
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
10294
|
+
}
|
|
10071
10295
|
const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
|
|
10072
10296
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
10297
|
+
const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
|
|
10298
|
+
const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
|
|
10073
10299
|
if (component.path !== void 0) {
|
|
10074
10300
|
if (!options.skipEscape) {
|
|
10075
|
-
component.path =
|
|
10076
|
-
if (component.scheme !== void 0) {
|
|
10077
|
-
component.path = component.path.split("%3A").join(":");
|
|
10078
|
-
}
|
|
10301
|
+
component.path = serializePathEncoding(component.path, pathNoScheme);
|
|
10079
10302
|
} else {
|
|
10080
10303
|
component.path = normalizePercentEncoding(component.path);
|
|
10081
10304
|
}
|
|
10082
10305
|
}
|
|
10083
10306
|
if (options.reference !== "suffix" && component.scheme) {
|
|
10307
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
10084
10308
|
uriTokens.push(component.scheme, ":");
|
|
10085
10309
|
}
|
|
10086
10310
|
const authority = recomposeAuthority(component);
|
|
@@ -10098,16 +10322,19 @@ var require_fast_uri = __commonJS2({
|
|
|
10098
10322
|
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
10099
10323
|
s3 = removeDotSegments(s3);
|
|
10100
10324
|
}
|
|
10325
|
+
if (pathNoScheme) {
|
|
10326
|
+
s3 = serializePathEncoding(s3, true);
|
|
10327
|
+
}
|
|
10101
10328
|
if (authority === void 0 && s3[0] === "/" && s3[1] === "/") {
|
|
10102
10329
|
s3 = "/%2F" + s3.slice(2);
|
|
10103
10330
|
}
|
|
10104
10331
|
uriTokens.push(s3);
|
|
10105
10332
|
}
|
|
10106
10333
|
if (component.query !== void 0) {
|
|
10107
|
-
uriTokens.push("?", component.query);
|
|
10334
|
+
uriTokens.push("?", encodeQuery(component.query));
|
|
10108
10335
|
}
|
|
10109
10336
|
if (component.fragment !== void 0) {
|
|
10110
|
-
uriTokens.push("#", component.fragment);
|
|
10337
|
+
uriTokens.push("#", encodeFragment(component.fragment));
|
|
10111
10338
|
}
|
|
10112
10339
|
return uriTokens.join("");
|
|
10113
10340
|
}
|
|
@@ -10123,6 +10350,35 @@ var require_fast_uri = __commonJS2({
|
|
|
10123
10350
|
}
|
|
10124
10351
|
return void 0;
|
|
10125
10352
|
}
|
|
10353
|
+
function hasMalformedPercentEncoding(component) {
|
|
10354
|
+
if (component === void 0) return false;
|
|
10355
|
+
let percent = component.indexOf("%");
|
|
10356
|
+
while (percent !== -1) {
|
|
10357
|
+
if (percent + 2 >= component.length || !/^[\da-f]{2}$/iu.test(component.slice(percent + 1, percent + 3))) {
|
|
10358
|
+
return true;
|
|
10359
|
+
}
|
|
10360
|
+
percent = component.indexOf("%", percent + 3);
|
|
10361
|
+
}
|
|
10362
|
+
return false;
|
|
10363
|
+
}
|
|
10364
|
+
function isIPLiteral(host) {
|
|
10365
|
+
return host[0] === "[" && host[host.length - 1] === "]";
|
|
10366
|
+
}
|
|
10367
|
+
function hasMalformedComponentPercentEncoding(matches) {
|
|
10368
|
+
const host = matches[4];
|
|
10369
|
+
return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
|
|
10370
|
+
}
|
|
10371
|
+
function canonicalizeHost(parsed, options, schemeHandler, isIP) {
|
|
10372
|
+
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
10373
|
+
try {
|
|
10374
|
+
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
10375
|
+
} catch (e) {
|
|
10376
|
+
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
10377
|
+
return true;
|
|
10378
|
+
}
|
|
10379
|
+
}
|
|
10380
|
+
return false;
|
|
10381
|
+
}
|
|
10126
10382
|
function parseWithStatus(uri, opts) {
|
|
10127
10383
|
const options = Object.assign({}, opts);
|
|
10128
10384
|
const parsed = {
|
|
@@ -10135,6 +10391,11 @@ var require_fast_uri = __commonJS2({
|
|
|
10135
10391
|
fragment: void 0
|
|
10136
10392
|
};
|
|
10137
10393
|
let malformedAuthorityOrPort = false;
|
|
10394
|
+
let malformedPercentEncoding = false;
|
|
10395
|
+
let malformedSchemeSpecific = false;
|
|
10396
|
+
let malformedHost = false;
|
|
10397
|
+
let malformedIPLiteral = false;
|
|
10398
|
+
let malformedScheme = false;
|
|
10138
10399
|
let isIP = false;
|
|
10139
10400
|
if (options.reference === "suffix") {
|
|
10140
10401
|
if (options.scheme) {
|
|
@@ -10171,6 +10432,19 @@ var require_fast_uri = __commonJS2({
|
|
|
10171
10432
|
parsed.path = matches[6] || "";
|
|
10172
10433
|
parsed.query = matches[7];
|
|
10173
10434
|
parsed.fragment = matches[8];
|
|
10435
|
+
if (parsed.scheme !== void 0) {
|
|
10436
|
+
const decodedScheme = unescape(parsed.scheme);
|
|
10437
|
+
if (VALID_SCHEME.test(decodedScheme)) {
|
|
10438
|
+
parsed.scheme = decodedScheme.toLowerCase();
|
|
10439
|
+
} else {
|
|
10440
|
+
parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
|
|
10441
|
+
malformedScheme = true;
|
|
10442
|
+
}
|
|
10443
|
+
}
|
|
10444
|
+
malformedPercentEncoding = hasMalformedComponentPercentEncoding(matches);
|
|
10445
|
+
if (malformedPercentEncoding) {
|
|
10446
|
+
parsed.error = parsed.error || "URI contains malformed percent-encoding.";
|
|
10447
|
+
}
|
|
10174
10448
|
if (isNaN(parsed.port)) {
|
|
10175
10449
|
parsed.port = matches[5];
|
|
10176
10450
|
}
|
|
@@ -10182,9 +10456,16 @@ var require_fast_uri = __commonJS2({
|
|
|
10182
10456
|
if (parsed.host) {
|
|
10183
10457
|
const ipv4result = isIPv4(parsed.host);
|
|
10184
10458
|
if (ipv4result === false) {
|
|
10459
|
+
const bracketedIPLiteral = isIPLiteral(parsed.host);
|
|
10460
|
+
const hasIPLiteralBracket = parsed.host.indexOf("[") !== -1 || parsed.host.indexOf("]") !== -1;
|
|
10185
10461
|
const ipv6result = normalizeIPv6(parsed.host);
|
|
10186
|
-
|
|
10187
|
-
|
|
10462
|
+
isIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
|
|
10463
|
+
malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
|
|
10464
|
+
parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
|
|
10465
|
+
if (malformedIPLiteral) {
|
|
10466
|
+
parsed.error = parsed.error || "URI host is malformed.";
|
|
10467
|
+
malformedAuthorityOrPort = true;
|
|
10468
|
+
}
|
|
10188
10469
|
} else {
|
|
10189
10470
|
isIP = true;
|
|
10190
10471
|
}
|
|
@@ -10202,42 +10483,36 @@ var require_fast_uri = __commonJS2({
|
|
|
10202
10483
|
parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
|
|
10203
10484
|
}
|
|
10204
10485
|
const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
|
|
10205
|
-
if (!
|
|
10206
|
-
|
|
10207
|
-
try {
|
|
10208
|
-
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
10209
|
-
} catch (e) {
|
|
10210
|
-
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
10211
|
-
}
|
|
10212
|
-
}
|
|
10486
|
+
if (!malformedIPLiteral) {
|
|
10487
|
+
malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
|
|
10213
10488
|
}
|
|
10214
10489
|
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
10215
10490
|
if (uri.indexOf("%") !== -1) {
|
|
10216
|
-
if (parsed.
|
|
10217
|
-
parsed.
|
|
10218
|
-
|
|
10219
|
-
if (parsed.host !== void 0) {
|
|
10220
|
-
parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
|
|
10491
|
+
if (parsed.host !== void 0 && !malformedIPLiteral) {
|
|
10492
|
+
const host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
|
|
10493
|
+
parsed.host = reescapeHostDelimiters(host, isIP);
|
|
10221
10494
|
}
|
|
10222
10495
|
}
|
|
10223
10496
|
if (parsed.path) {
|
|
10224
10497
|
parsed.path = normalizePathEncoding(parsed.path);
|
|
10225
10498
|
}
|
|
10499
|
+
if (parsed.query) {
|
|
10500
|
+
parsed.query = normalizeQueryFragmentEncoding(parsed.query);
|
|
10501
|
+
}
|
|
10226
10502
|
if (parsed.fragment) {
|
|
10227
|
-
|
|
10228
|
-
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
10229
|
-
} catch {
|
|
10230
|
-
parsed.error = parsed.error || "URI malformed";
|
|
10231
|
-
}
|
|
10503
|
+
parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
|
|
10232
10504
|
}
|
|
10233
10505
|
}
|
|
10234
10506
|
if (schemeHandler && schemeHandler.parse) {
|
|
10235
10507
|
schemeHandler.parse(parsed, options);
|
|
10508
|
+
if (schemeHandler === SCHEMES.urn && parsed.nid === void 0) {
|
|
10509
|
+
malformedSchemeSpecific = true;
|
|
10510
|
+
}
|
|
10236
10511
|
}
|
|
10237
10512
|
} else {
|
|
10238
10513
|
parsed.error = parsed.error || "URI can not be parsed.";
|
|
10239
10514
|
}
|
|
10240
|
-
return { parsed, malformedAuthorityOrPort };
|
|
10515
|
+
return { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme };
|
|
10241
10516
|
}
|
|
10242
10517
|
function parse(uri, opts) {
|
|
10243
10518
|
return parseWithStatus(uri, opts).parsed;
|
|
@@ -10246,20 +10521,28 @@ var require_fast_uri = __commonJS2({
|
|
|
10246
10521
|
return normalizeStringWithStatus(uri, opts).normalized;
|
|
10247
10522
|
}
|
|
10248
10523
|
function normalizeStringWithStatus(uri, opts) {
|
|
10249
|
-
const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
|
|
10524
|
+
const { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = parseWithStatus(uri, opts);
|
|
10250
10525
|
return {
|
|
10251
|
-
normalized: malformedAuthorityOrPort ? uri : serialize2(parsed, opts),
|
|
10252
|
-
malformedAuthorityOrPort
|
|
10526
|
+
normalized: malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? uri : serialize2(parsed, opts),
|
|
10527
|
+
malformedAuthorityOrPort,
|
|
10528
|
+
malformedPercentEncoding,
|
|
10529
|
+
malformedSchemeSpecific,
|
|
10530
|
+
malformedHost,
|
|
10531
|
+
malformedScheme
|
|
10253
10532
|
};
|
|
10254
10533
|
}
|
|
10255
10534
|
function normalizeComparableURI(uri, opts) {
|
|
10256
|
-
if (typeof uri
|
|
10257
|
-
|
|
10258
|
-
return malformedAuthorityOrPort ? void 0 : normalized;
|
|
10535
|
+
if (typeof uri !== "string" && typeof uri !== "object") {
|
|
10536
|
+
return void 0;
|
|
10259
10537
|
}
|
|
10260
|
-
|
|
10261
|
-
|
|
10538
|
+
let value;
|
|
10539
|
+
try {
|
|
10540
|
+
value = typeof uri === "string" ? uri : serialize2(uri, opts);
|
|
10541
|
+
} catch {
|
|
10542
|
+
return void 0;
|
|
10262
10543
|
}
|
|
10544
|
+
const { normalized, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = normalizeStringWithStatus(value, opts);
|
|
10545
|
+
return malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? void 0 : normalized;
|
|
10263
10546
|
}
|
|
10264
10547
|
var fastUri = {
|
|
10265
10548
|
SCHEMES,
|
|
@@ -21930,9 +22213,15 @@ DATABASE_URL=${database.envExample}
|
|
|
21930
22213
|
# Authentication (auto-generated, change if needed)
|
|
21931
22214
|
NEXTLY_SECRET=${generateNextlySecret()}
|
|
21932
22215
|
|
|
21933
|
-
#
|
|
22216
|
+
# Where the Nextly app itself lives: the admin, the API, and the origin its
|
|
22217
|
+
# emails and preview links point at.
|
|
21934
22218
|
NEXT_PUBLIC_APP_URL=http://localhost:3000
|
|
21935
22219
|
|
|
22220
|
+
# Where READERS find the public site. Used for canonical links, Open Graph
|
|
22221
|
+
# tags, the sitemap and RSS. Set it when the public site is served from a
|
|
22222
|
+
# different origin than the app above; otherwise the app's origin is used.
|
|
22223
|
+
# NEXT_PUBLIC_SITE_URL=https://example.com
|
|
22224
|
+
|
|
21936
22225
|
${DIAGNOSTICS_BLOCK}`;
|
|
21937
22226
|
}
|
|
21938
22227
|
async function generateEnv(cwd, database) {
|