vercel 32.4.0 → 32.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +148 -88
- package/package.json +12 -12
package/dist/index.js
CHANGED
@@ -52619,8 +52619,8 @@ var GA_TRACKING_ID, SENTRY_DSN;
|
|
52619
52619
|
var init_constants = __esm({
|
52620
52620
|
"src/util/constants.ts"() {
|
52621
52621
|
"use strict";
|
52622
|
-
GA_TRACKING_ID =
|
52623
|
-
SENTRY_DSN =
|
52622
|
+
GA_TRACKING_ID = void 0;
|
52623
|
+
SENTRY_DSN = void 0;
|
52624
52624
|
}
|
52625
52625
|
});
|
52626
52626
|
|
@@ -62511,7 +62511,7 @@ var require_package = __commonJS({
|
|
62511
62511
|
"../client/package.json"(exports2, module2) {
|
62512
62512
|
module2.exports = {
|
62513
62513
|
name: "@vercel/client",
|
62514
|
-
version: "13.0.
|
62514
|
+
version: "13.0.6",
|
62515
62515
|
main: "dist/index.js",
|
62516
62516
|
typings: "dist/index.d.ts",
|
62517
62517
|
homepage: "https://vercel.com",
|
@@ -62528,7 +62528,8 @@ var require_package = __commonJS({
|
|
62528
62528
|
build: "node ../../utils/build.mjs",
|
62529
62529
|
"test-e2e": "pnpm test tests/create-deployment.test.ts tests/create-legacy-deployment.test.ts tests/paths.test.ts",
|
62530
62530
|
test: "jest --reporters=default --reporters=jest-junit --env node --verbose --runInBand --bail",
|
62531
|
-
"test-unit": "pnpm test tests/unit.*test.*"
|
62531
|
+
"test-unit": "pnpm test tests/unit.*test.*",
|
62532
|
+
"type-check": "tsc --noEmit"
|
62532
62533
|
},
|
62533
62534
|
engines: {
|
62534
62535
|
node: ">= 16"
|
@@ -62548,7 +62549,7 @@ var require_package = __commonJS({
|
|
62548
62549
|
},
|
62549
62550
|
dependencies: {
|
62550
62551
|
"@vercel/build-utils": "7.2.2",
|
62551
|
-
"@vercel/routing-utils": "3.
|
62552
|
+
"@vercel/routing-utils": "3.1.0",
|
62552
62553
|
"@zeit/fetch": "5.2.0",
|
62553
62554
|
"async-retry": "1.2.3",
|
62554
62555
|
"async-sema": "3.0.0",
|
@@ -155112,6 +155113,9 @@ var require_superstatic = __commonJS({
|
|
155112
155113
|
if (r.missing) {
|
155113
155114
|
route.missing = r.missing;
|
155114
155115
|
}
|
155116
|
+
if (r.statusCode) {
|
155117
|
+
route.status = r.statusCode;
|
155118
|
+
}
|
155115
155119
|
return route;
|
155116
155120
|
} catch (e2) {
|
155117
155121
|
throw new Error(`Failed to parse rewrite: ${JSON.stringify(r)}`);
|
@@ -155759,7 +155763,13 @@ var require_schemas = __commonJS({
|
|
155759
155763
|
maxLength: 4096
|
155760
155764
|
},
|
155761
155765
|
has: hasSchema,
|
155762
|
-
missing: hasSchema
|
155766
|
+
missing: hasSchema,
|
155767
|
+
statusCode: {
|
155768
|
+
description: "An optional integer to override the status code of the response.",
|
155769
|
+
type: "integer",
|
155770
|
+
minimum: 100,
|
155771
|
+
maximum: 999
|
155772
|
+
}
|
155763
155773
|
}
|
155764
155774
|
}
|
155765
155775
|
};
|
@@ -155788,6 +155798,7 @@ var require_schemas = __commonJS({
|
|
155788
155798
|
type: "boolean"
|
155789
155799
|
},
|
155790
155800
|
statusCode: {
|
155801
|
+
description: "An optional integer to define the status code of the redirect.",
|
155791
155802
|
private: true,
|
155792
155803
|
type: "integer",
|
155793
155804
|
minimum: 100,
|
@@ -169885,18 +169896,26 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir) {
|
|
169885
169896
|
const buildStamp = stamp_default();
|
169886
169897
|
await import_fs_extra18.default.mkdirp(outputDir);
|
169887
169898
|
const ops = [];
|
169888
|
-
const
|
169889
|
-
|
169890
|
-
|
169891
|
-
|
169892
|
-
|
169893
|
-
|
169894
|
-
|
169895
|
-
|
169896
|
-
|
169897
|
-
|
169898
|
-
|
169899
|
-
|
169899
|
+
const dependencyMap = makeDepencyMap(pkg);
|
169900
|
+
const speedInsighsVersion = dependencyMap.get("@vercel/speed-insights");
|
169901
|
+
if (speedInsighsVersion) {
|
169902
|
+
if (process.env.VERCEL_ANALYTICS_ID) {
|
169903
|
+
output2.warn(
|
169904
|
+
`The \`VERCEL_ANALYTICS_ID\` environment variable is deprecated and will be removed in a future release. Please remove it from your environment variables`
|
169905
|
+
);
|
169906
|
+
delete process.env.VERCEL_ANALYTICS_ID;
|
169907
|
+
}
|
169908
|
+
buildsJson.features = {
|
169909
|
+
...buildsJson.features ?? {},
|
169910
|
+
speedInsightsVersion: speedInsighsVersion
|
169911
|
+
};
|
169912
|
+
}
|
169913
|
+
const webAnalyticsVersion = dependencyMap.get("@vercel/analytics");
|
169914
|
+
if (webAnalyticsVersion) {
|
169915
|
+
buildsJson.features = {
|
169916
|
+
...buildsJson.features ?? {},
|
169917
|
+
webAnalyticsVersion
|
169918
|
+
};
|
169900
169919
|
}
|
169901
169920
|
const buildsJsonBuilds = new Map(
|
169902
169921
|
builds.map((build2) => {
|
@@ -170177,6 +170196,12 @@ function mergeFlags(buildResults) {
|
|
170177
170196
|
return [];
|
170178
170197
|
});
|
170179
170198
|
}
|
170199
|
+
function makeDepencyMap(pkg) {
|
170200
|
+
return new Map([
|
170201
|
+
...Object.entries(pkg?.devDependencies ?? {}),
|
170202
|
+
...Object.entries(pkg?.dependencies ?? {})
|
170203
|
+
]);
|
170204
|
+
}
|
170180
170205
|
var import_fs_extra18, import_chalk45, import_dotenv, import_semver3, import_minimatch2, import_path28, import_frameworks4, import_build_utils13, import_fs_detectors4, import_routing_utils2, import_client8;
|
170181
170206
|
var init_build = __esm({
|
170182
170207
|
"src/commands/build/index.ts"() {
|
@@ -183531,7 +183556,7 @@ var require_directory = __commonJS({
|
|
183531
183556
|
"../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/directory.js"(exports2, module2) {
|
183532
183557
|
(function() {
|
183533
183558
|
function directory(it) {
|
183534
|
-
var
|
183559
|
+
var encodeHTML6 = typeof _encodeHTML !== "undefined" ? _encodeHTML : function(doNotSkipEncoded) {
|
183535
183560
|
var encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
|
183536
183561
|
return function(code2) {
|
183537
183562
|
return code2 ? code2.toString().replace(matchHTML, function(m) {
|
@@ -183539,13 +183564,13 @@ var require_directory = __commonJS({
|
|
183539
183564
|
}) : "";
|
183540
183565
|
};
|
183541
183566
|
}();
|
183542
|
-
var out = '<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Files within ' +
|
183567
|
+
var out = '<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Files within ' + encodeHTML6(it.directory) + `</title> <style>body { margin: 0; padding: 30px; background: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased;}main { max-width: 920px;}header { display: flex; justify-content: space-between; flex-wrap: wrap;}h1 { font-size: 18px; font-weight: 500; margin-top: 0; color: #000;}header h1 a { font-size: 18px; font-weight: 500; margin-top: 0; color: #000;}h1 i { font-style: normal;}ul { margin: 0 0 0 -2px; padding: 20px 0 0 0;}ul li { list-style: none; font-size: 14px; display: flex; justify-content: space-between;}a { text-decoration: none;}ul a { color: #000; padding: 10px 5px; margin: 0 -5px; white-space: nowrap; overflow: hidden; display: block; width: 100%; text-overflow: ellipsis;}header a { color: #0076FF; font-size: 11px; font-weight: 400; display: inline-block; line-height: 20px;}svg { height: 13px; vertical-align: text-bottom;}ul a::before { display: inline-block; vertical-align: middle; margin-right: 10px; width: 24px; text-align: center; line-height: 12px;}ul a.file::before { content: url("data:image/svg+xml;utf8,<svg width='15' height='19' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M10 8C8.34 8 7 6.66 7 5V1H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V8h-4zM8 5c0 1.1.9 2 2 2h3.59L8 1.41V5zM3 0h5l7 7v9c0 1.66-1.34 3-3 3H3c-1.66 0-3-1.34-3-3V3c0-1.66 1.34-3 3-3z' fill='black'/></svg>");}ul a:hover { text-decoration: underline;}ul a.folder::before { content: url("data:image/svg+xml;utf8,<svg width='20' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M18.784 3.87a1.565 1.565 0 0 0-.565-.356V2.426c0-.648-.523-1.171-1.15-1.171H8.996L7.908.25A.89.89 0 0 0 7.302 0H2.094C1.445 0 .944.523.944 1.171v2.3c-.21.085-.398.21-.565.356a1.348 1.348 0 0 0-.377 1.004l.398 9.83C.42 15.393 1.048 16 1.8 16h15.583c.753 0 1.36-.586 1.4-1.339l.398-9.83c.021-.313-.125-.69-.397-.962zM1.843 3.41V1.191c0-.146.104-.272.25-.272H7.26l1.234 1.088c.083.042.167.104.293.104h8.282c.125 0 .25.126.25.272V3.41H1.844zm15.54 11.712H1.78a.47.47 0 0 1-.481-.46l-.397-9.83c0-.147.041-.252.125-.356a.504.504 0 0 1 .377-.147H17.78c.125 0 .272.063.377.147.083.083.125.209.125.334l-.418 9.83c-.021.272-.23.482-.481.482z' fill='black'/></svg>");}ul a.lambda::before { content: url("data:image/svg+xml; utf8,<svg width='15' height='19' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M3.5 14.4354H5.31622L7.30541 9.81311H7.43514L8.65315 13.0797C9.05676 14.1643 9.55405 14.5 10.7 14.5C11.0171 14.5 11.291 14.4677 11.5 14.4032V13.1572C11.3847 13.1766 11.2622 13.2024 11.1541 13.2024C10.6351 13.2024 10.3829 13.0281 10.1595 12.4664L8.02613 7.07586C7.21171 5.01646 6.54865 4.5 5.11441 4.5C4.83333 4.5 4.62432 4.53228 4.37207 4.59038V5.83635C4.56667 5.81052 4.66036 5.79761 4.77568 5.79761C5.64775 5.79761 5.9 6.0042 6.4045 7.19852L6.64234 7.77954L3.5 14.4354Z' fill='black'/><rect x='0.5' y='0.5' width='14' height='18' rx='2.5' stroke='black'/></svg>");}ul a.file.gif::before,ul a.file.jpg::before,ul a.file.png::before,ul a.file.svg::before { content: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'><rect x='6' y='6' width='68' height='68' rx='5' ry='5'/><circle cx='24' cy='24' r='8'/><path d='M73 49L59 34 37 52m16 20L27 42 7 58'/></svg>");}::selection { background-color: #79FFE1; color: #000;}::-moz-selection { background-color: #79FFE1; color: #000;}@media (min-width: 768px) { ul {display: flex;flex-wrap: wrap; } ul li {width: 230px;padding-right: 20px; }}@media (min-width: 992px) { body {padding: 45px; } h1, header h1 a {font-size: 15px; } ul li {font-size: 13px;box-sizing: border-box;justify-content: flex-start; }}</style> </head> <body> <main> <header> <h1> <i>Index of </i> `;
|
183543
183568
|
var arr1 = it.paths;
|
183544
183569
|
if (arr1) {
|
183545
183570
|
var value, index = -1, l1 = arr1.length - 1;
|
183546
183571
|
while (index < l1) {
|
183547
183572
|
value = arr1[index += 1];
|
183548
|
-
out += ' <a href="/' +
|
183573
|
+
out += ' <a href="/' + encodeHTML6(value.url) + '">' + encodeHTML6(value.name) + "</a> ";
|
183549
183574
|
}
|
183550
183575
|
}
|
183551
183576
|
out += ' </h1> </header> <ul id="files"> ';
|
@@ -183554,13 +183579,13 @@ var require_directory = __commonJS({
|
|
183554
183579
|
var value, index = -1, l2 = arr2.length - 1;
|
183555
183580
|
while (index < l2) {
|
183556
183581
|
value = arr2[index += 1];
|
183557
|
-
out += ' <li> <a href="' +
|
183582
|
+
out += ' <li> <a href="' + encodeHTML6(value.relative) + '" title="' + encodeHTML6(value.title) + '" class="' + encodeHTML6(value.type) + " " + encodeHTML6(value.ext) + '">' + encodeHTML6(value.base) + "</a> </li> ";
|
183558
183583
|
}
|
183559
183584
|
}
|
183560
183585
|
out += " </ul></main> </body></html>";
|
183561
183586
|
return out;
|
183562
183587
|
}
|
183563
|
-
var itself = directory,
|
183588
|
+
var itself = directory, _encodeHTML = function(doNotSkipEncoded) {
|
183564
183589
|
var encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
|
183565
183590
|
return function(code2) {
|
183566
183591
|
return code2 ? code2.toString().replace(matchHTML, function(m) {
|
@@ -183590,7 +183615,7 @@ var require_error4 = __commonJS({
|
|
183590
183615
|
var out = '<!DOCTYPE html><head> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/> <style> body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; } main, aside, section { display: flex; justify-content: center; align-items: center; flex-direction: column; } main { height: 100%; } aside { background: #000; flex-shrink: 1; padding: 30px 20px; } aside p { margin: 0; color: #999999; font-size: 14px; line-height: 24px; } aside a { color: #fff; text-decoration: none; } section span { font-size: 24px; font-weight: 500; display: block; border-bottom: 1px solid #EAEAEA; text-align: center; padding-bottom: 20px; width: 100px; } section p { font-size: 14px; font-weight: 400; } section span + p { margin: 20px 0 0 0; } @media (min-width: 768px) { section { height: 40px; flex-direction: row; } section span, section p { height: 100%; line-height: 40px; } section span { border-bottom: 0; border-right: 1px solid #EAEAEA; padding: 0 20px 0 0; width: auto; } section span + p { margin: 0; padding-left: 20px; } aside { padding: 50px 0; } aside p { max-width: 520px; text-align: center; } } </style></head><body> <main> <section> <span>' + it.statusCode + "</span> <p>" + it.message + "</p> </section> </main></body>";
|
183591
183616
|
return out;
|
183592
183617
|
}
|
183593
|
-
var itself = error4,
|
183618
|
+
var itself = error4, _encodeHTML = function(doNotSkipEncoded) {
|
183594
183619
|
var encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
|
183595
183620
|
return function(code2) {
|
183596
183621
|
return code2 ? code2.toString().replace(matchHTML, function(m) {
|
@@ -185248,16 +185273,55 @@ var init_errors2 = __esm({
|
|
185248
185273
|
}
|
185249
185274
|
});
|
185250
185275
|
|
185276
|
+
// ../../node_modules/.pnpm/escape-html@1.0.3/node_modules/escape-html/index.js
|
185277
|
+
var require_escape_html = __commonJS({
|
185278
|
+
"../../node_modules/.pnpm/escape-html@1.0.3/node_modules/escape-html/index.js"(exports2, module2) {
|
185279
|
+
"use strict";
|
185280
|
+
var matchHtmlRegExp = /["'&<>]/;
|
185281
|
+
module2.exports = escapeHtml;
|
185282
|
+
function escapeHtml(string) {
|
185283
|
+
var str = "" + string;
|
185284
|
+
var match = matchHtmlRegExp.exec(str);
|
185285
|
+
if (!match) {
|
185286
|
+
return str;
|
185287
|
+
}
|
185288
|
+
var escape2;
|
185289
|
+
var html = "";
|
185290
|
+
var index = 0;
|
185291
|
+
var lastIndex = 0;
|
185292
|
+
for (index = match.index; index < str.length; index++) {
|
185293
|
+
switch (str.charCodeAt(index)) {
|
185294
|
+
case 34:
|
185295
|
+
escape2 = """;
|
185296
|
+
break;
|
185297
|
+
case 38:
|
185298
|
+
escape2 = "&";
|
185299
|
+
break;
|
185300
|
+
case 39:
|
185301
|
+
escape2 = "'";
|
185302
|
+
break;
|
185303
|
+
case 60:
|
185304
|
+
escape2 = "<";
|
185305
|
+
break;
|
185306
|
+
case 62:
|
185307
|
+
escape2 = ">";
|
185308
|
+
break;
|
185309
|
+
default:
|
185310
|
+
continue;
|
185311
|
+
}
|
185312
|
+
if (lastIndex !== index) {
|
185313
|
+
html += str.substring(lastIndex, index);
|
185314
|
+
}
|
185315
|
+
lastIndex = index + 1;
|
185316
|
+
html += escape2;
|
185317
|
+
}
|
185318
|
+
return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
|
185319
|
+
}
|
185320
|
+
}
|
185321
|
+
});
|
185322
|
+
|
185251
185323
|
// src/util/dev/templates/error.ts
|
185252
185324
|
function error3(it) {
|
185253
|
-
let encodeHTML = typeof _encodeHTML !== "undefined" ? _encodeHTML : function(doNotSkipEncoded) {
|
185254
|
-
let encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
|
185255
|
-
return function(code2) {
|
185256
|
-
return code2 ? code2.toString().replace(matchHTML, function(m) {
|
185257
|
-
return encodeHTMLRules[m] || m;
|
185258
|
-
}) : "";
|
185259
|
-
};
|
185260
|
-
}();
|
185261
185325
|
let out = "<main> ";
|
185262
185326
|
if (it.error_code == "EDGE_FUNCTION_INVOCATION_FAILED") {
|
185263
185327
|
out += ' <p class="error-title error-title-guilty"> <strong>This Edge Function</strong><span> has crashed.</span> </p> ';
|
@@ -185266,100 +185330,78 @@ function error3(it) {
|
|
185266
185330
|
if (it.error_code == "FUNCTION_INVOCATION_FAILED") {
|
185267
185331
|
out += ' <p class="error-title error-title-guilty"> <strong>This Serverless Function</strong><span> has crashed.</span> </p> ';
|
185268
185332
|
}
|
185269
|
-
out += ' <p class="devinfo-container"> <span class="error-code"><strong>' + it.http_status_code + "</strong>: " +
|
185333
|
+
out += ' <p class="devinfo-container"> <span class="error-code"><strong>' + it.http_status_code + "</strong>: " + (0, import_escape_html.default)(it.http_status_description) + "</span> ";
|
185270
185334
|
if (it.error_code) {
|
185271
|
-
out += ' <span class="devinfo-line">Code: <code>' +
|
185335
|
+
out += ' <span class="devinfo-line">Code: <code>' + (0, import_escape_html.default)(it.error_code) + "</code></span> ";
|
185272
185336
|
}
|
185273
|
-
out += ' <span class="devinfo-line">ID: <code>' +
|
185337
|
+
out += ' <span class="devinfo-line">ID: <code>' + (0, import_escape_html.default)(it.request_id) + "</code> </p> <p> <ul> <li> Check the logs in your terminal window to see the application error. </li> </ul> </p></main>";
|
185274
185338
|
return out;
|
185275
185339
|
}
|
185340
|
+
var import_escape_html;
|
185276
185341
|
var init_error3 = __esm({
|
185277
185342
|
"src/util/dev/templates/error.ts"() {
|
185278
185343
|
"use strict";
|
185344
|
+
import_escape_html = __toESM(require_escape_html());
|
185279
185345
|
}
|
185280
185346
|
});
|
185281
185347
|
|
185282
185348
|
// src/util/dev/templates/error_base.ts
|
185283
185349
|
function error_base(it) {
|
185284
|
-
let
|
185285
|
-
let encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
|
185286
|
-
return function(code2) {
|
185287
|
-
return code2 ? code2.toString().replace(matchHTML, function(m) {
|
185288
|
-
return encodeHTMLRules[m] || m;
|
185289
|
-
}) : "";
|
185290
|
-
};
|
185291
|
-
}();
|
185292
|
-
let out = '<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#000"> <title>' + it.http_status_code + ": " + encodeHTML(it.http_status_description) + `</title> <style> html { font-size: 62.5%; box-sizing: border-box; height: -webkit-fill-available } *, ::after, ::before { box-sizing: inherit } body { font-family: "SF Pro Text", "SF Pro Icons", "Helvetica Neue", "Helvetica", "Arial", sans-serif; font-size: 1.6rem; line-height: 1.65; word-break: break-word; font-kerning: auto; font-variant: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; hyphens: auto; height: 100vh; height: -webkit-fill-available; max-height: 100vh; max-height: -webkit-fill-available; margin: 0 } ::selection { background: #79FFE1; } ::-moz-selection { background: #79FFE1; } a { cursor: pointer; color: #0070f3; text-decoration: none; transition: all .2s ease; border-bottom: 1px solid transparent } a:hover { border-bottom: 1px solid #0070f3 } ul { padding: 0; margin-left: 1.5em; list-style-type: none } li { margin-bottom: 10px } ul li:before { content: '\\02013' } li:before { display: inline-block; color: #ccc; position: absolute; margin-left: -18px; transition: color .2s ease } code { font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif; font-size: .92em } code:after, code:before { content: '\`' } .container { display: flex; justify-content: center; flex-direction: column; min-height: 100% } main { max-width: 80rem; padding: 4rem 6rem; margin: auto } ul { margin-bottom: 32px } .error-title { font-size: 2rem; padding-left: 22px; line-height: 1.5; margin-bottom: 24px; } .error-title-guilty { border-left: 2px solid #ED367F; } .error-title-innocent { border-left: 2px solid #59B89C; } main p { color: #333 } .devinfo-container { border: 1px solid #ddd; border-radius: 4px; padding: 2rem; display: flex; flex-direction: column; margin-bottom: 32px } .error-code { margin: 0; font-size: 1.6rem; color: #000; margin-bottom: 1.6rem } .devinfo-line { color: #333 } .devinfo-line code, code, li { color: #000 } .devinfo-line:not(:last-child) { margin-bottom: 8px } .docs-link, .contact-link { font-weight: 500 } header, footer, footer a { display: flex; justify-content: center; align-items: center } header, footer { min-height: 100px; height: 100px; } header { border-bottom: 1px solid #eaeaea; } header h1 { font-size: 1.8rem; margin: 0; font-weight: 500; } header p { font-size: 1.3rem; margin: 0; font-weight: 500; } .header-item { display: flex; padding: 0 2rem; margin: 2rem 0; text-decoration: line-through; color: #999; } .header-item.active { color: #ff0080; text-decoration: none; } .header-item.first { border-right: 1px solid #eaeaea; } .header-item-content { display: flex; flex-direction: column; } .header-item-icon { margin-right: 1rem; margin-top: 0.6rem; } footer { border-top: 1px solid #eaeaea; } footer a { color: #000 } footer a:hover { border-bottom-color: transparent } footer svg { margin-left: .8rem } .note { padding: 8pt 16pt; border-radius: 5px; border: 1px solid #0070f3; font-size: 14px; line-height: 1.8; color: #0070f3; } @media (max-width:500px) { .devinfo-container .devinfo-line code { margin-top: .4rem } .devinfo-container .devinfo-line:not(:last-child) { margin-bottom: 1.6rem } .devinfo-container { margin-bottom: 0; } header { flex-direction: column; height: auto; min-height: auto; align-items: flex-start; } .header-item.first { border-right: none; margin-bottom: 0; } main { padding: 1rem 2rem; } body { font-size: 1.4rem; line-height: 1.55; } footer { display: none; } .note { margin-top: 16px; } } </style> </head> <body> <div class="container"> ` + it.view + " </div> </body></html>";
|
185350
|
+
let out = '<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#000"> <title>' + it.http_status_code + ": " + (0, import_escape_html2.default)(it.http_status_description) + `</title> <style> html { font-size: 62.5%; box-sizing: border-box; height: -webkit-fill-available } *, ::after, ::before { box-sizing: inherit } body { font-family: "SF Pro Text", "SF Pro Icons", "Helvetica Neue", "Helvetica", "Arial", sans-serif; font-size: 1.6rem; line-height: 1.65; word-break: break-word; font-kerning: auto; font-variant: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; hyphens: auto; height: 100vh; height: -webkit-fill-available; max-height: 100vh; max-height: -webkit-fill-available; margin: 0 } ::selection { background: #79FFE1; } ::-moz-selection { background: #79FFE1; } a { cursor: pointer; color: #0070f3; text-decoration: none; transition: all .2s ease; border-bottom: 1px solid transparent } a:hover { border-bottom: 1px solid #0070f3 } ul { padding: 0; margin-left: 1.5em; list-style-type: none } li { margin-bottom: 10px } ul li:before { content: '\\02013' } li:before { display: inline-block; color: #ccc; position: absolute; margin-left: -18px; transition: color .2s ease } code { font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif; font-size: .92em } code:after, code:before { content: '\`' } .container { display: flex; justify-content: center; flex-direction: column; min-height: 100% } main { max-width: 80rem; padding: 4rem 6rem; margin: auto } ul { margin-bottom: 32px } .error-title { font-size: 2rem; padding-left: 22px; line-height: 1.5; margin-bottom: 24px; } .error-title-guilty { border-left: 2px solid #ED367F; } .error-title-innocent { border-left: 2px solid #59B89C; } main p { color: #333 } .devinfo-container { border: 1px solid #ddd; border-radius: 4px; padding: 2rem; display: flex; flex-direction: column; margin-bottom: 32px } .error-code { margin: 0; font-size: 1.6rem; color: #000; margin-bottom: 1.6rem } .devinfo-line { color: #333 } .devinfo-line code, code, li { color: #000 } .devinfo-line:not(:last-child) { margin-bottom: 8px } .docs-link, .contact-link { font-weight: 500 } header, footer, footer a { display: flex; justify-content: center; align-items: center } header, footer { min-height: 100px; height: 100px; } header { border-bottom: 1px solid #eaeaea; } header h1 { font-size: 1.8rem; margin: 0; font-weight: 500; } header p { font-size: 1.3rem; margin: 0; font-weight: 500; } .header-item { display: flex; padding: 0 2rem; margin: 2rem 0; text-decoration: line-through; color: #999; } .header-item.active { color: #ff0080; text-decoration: none; } .header-item.first { border-right: 1px solid #eaeaea; } .header-item-content { display: flex; flex-direction: column; } .header-item-icon { margin-right: 1rem; margin-top: 0.6rem; } footer { border-top: 1px solid #eaeaea; } footer a { color: #000 } footer a:hover { border-bottom-color: transparent } footer svg { margin-left: .8rem } .note { padding: 8pt 16pt; border-radius: 5px; border: 1px solid #0070f3; font-size: 14px; line-height: 1.8; color: #0070f3; } @media (max-width:500px) { .devinfo-container .devinfo-line code { margin-top: .4rem } .devinfo-container .devinfo-line:not(:last-child) { margin-bottom: 1.6rem } .devinfo-container { margin-bottom: 0; } header { flex-direction: column; height: auto; min-height: auto; align-items: flex-start; } .header-item.first { border-right: none; margin-bottom: 0; } main { padding: 1rem 2rem; } body { font-size: 1.4rem; line-height: 1.55; } footer { display: none; } .note { margin-top: 16px; } } </style> </head> <body> <div class="container"> ` + it.view + " </div> </body></html>";
|
185293
185351
|
return out;
|
185294
185352
|
}
|
185353
|
+
var import_escape_html2;
|
185295
185354
|
var init_error_base = __esm({
|
185296
185355
|
"src/util/dev/templates/error_base.ts"() {
|
185297
185356
|
"use strict";
|
185357
|
+
import_escape_html2 = __toESM(require_escape_html());
|
185298
185358
|
}
|
185299
185359
|
});
|
185300
185360
|
|
185301
185361
|
// src/util/dev/templates/error_404.ts
|
185302
185362
|
function error_404(it) {
|
185303
|
-
let
|
185304
|
-
let encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
|
185305
|
-
return function(code2) {
|
185306
|
-
return code2 ? code2.toString().replace(matchHTML, function(m) {
|
185307
|
-
return encodeHTMLRules[m] || m;
|
185308
|
-
}) : "";
|
185309
|
-
};
|
185310
|
-
}();
|
185311
|
-
let out = '<main> <p class="devinfo-container"> <span class="error-code"><strong>' + it.http_status_code + "</strong>: " + encodeHTML(it.http_status_description) + "</span> ";
|
185363
|
+
let out = '<main> <p class="devinfo-container"> <span class="error-code"><strong>' + it.http_status_code + "</strong>: " + (0, import_escape_html3.default)(it.http_status_description) + "</span> ";
|
185312
185364
|
if (it.error_code) {
|
185313
|
-
out += ' <span class="devinfo-line">Code: <code>' +
|
185365
|
+
out += ' <span class="devinfo-line">Code: <code>' + (0, import_escape_html3.default)(it.error_code) + "</code></span> ";
|
185314
185366
|
}
|
185315
|
-
out += ' <span class="devinfo-line">ID: <code>' +
|
185367
|
+
out += ' <span class="devinfo-line">ID: <code>' + (0, import_escape_html3.default)(it.request_id) + "</code> </p></main>";
|
185316
185368
|
return out;
|
185317
185369
|
}
|
185370
|
+
var import_escape_html3;
|
185318
185371
|
var init_error_404 = __esm({
|
185319
185372
|
"src/util/dev/templates/error_404.ts"() {
|
185320
185373
|
"use strict";
|
185374
|
+
import_escape_html3 = __toESM(require_escape_html());
|
185321
185375
|
}
|
185322
185376
|
});
|
185323
185377
|
|
185324
185378
|
// src/util/dev/templates/error_502.ts
|
185325
185379
|
function error_502(it) {
|
185326
|
-
let
|
185327
|
-
let encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
|
185328
|
-
return function(code2) {
|
185329
|
-
return code2 ? code2.toString().replace(matchHTML, function(m) {
|
185330
|
-
return encodeHTMLRules[m] || m;
|
185331
|
-
}) : "";
|
185332
|
-
};
|
185333
|
-
}();
|
185334
|
-
let out = '<main> <p class="devinfo-container"> <span class="error-code"><strong>' + it.http_status_code + "</strong>: " + encodeHTML(it.http_status_description) + "</span> ";
|
185380
|
+
let out = '<main> <p class="devinfo-container"> <span class="error-code"><strong>' + it.http_status_code + "</strong>: " + (0, import_escape_html4.default)(it.http_status_description) + "</span> ";
|
185335
185381
|
if (it.error_code) {
|
185336
|
-
out += ' <span class="devinfo-line">Code: <code>' +
|
185382
|
+
out += ' <span class="devinfo-line">Code: <code>' + (0, import_escape_html4.default)(it.error_code) + "</code></span> ";
|
185337
185383
|
}
|
185338
|
-
out += ' <span class="devinfo-line">ID: <code>' +
|
185384
|
+
out += ' <span class="devinfo-line">ID: <code>' + (0, import_escape_html4.default)(it.request_id) + "</code> </p> <p> <ul> <li> Check the logs in your terminal window to see the application error. </li> </ul> </p></main>";
|
185339
185385
|
return out;
|
185340
185386
|
}
|
185387
|
+
var import_escape_html4;
|
185341
185388
|
var init_error_502 = __esm({
|
185342
185389
|
"src/util/dev/templates/error_502.ts"() {
|
185343
185390
|
"use strict";
|
185391
|
+
import_escape_html4 = __toESM(require_escape_html());
|
185344
185392
|
}
|
185345
185393
|
});
|
185346
185394
|
|
185347
185395
|
// src/util/dev/templates/redirect.ts
|
185348
185396
|
function redirect(it) {
|
185349
|
-
let
|
185350
|
-
let encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
|
185351
|
-
return function(code2) {
|
185352
|
-
return code2 ? code2.toString().replace(matchHTML, function(m) {
|
185353
|
-
return encodeHTMLRules[m] || m;
|
185354
|
-
}) : "";
|
185355
|
-
};
|
185356
|
-
}();
|
185357
|
-
let out = "<!doctype html><!-- https://now.sh --><h1>Redirecting (" + it.statusCode + ")</h1><a>" + encodeHTML(it.location) + "</a>";
|
185397
|
+
let out = "<!doctype html><!-- https://now.sh --><h1>Redirecting (" + it.statusCode + ")</h1><a>" + (0, import_escape_html5.default)(it.location) + "</a>";
|
185358
185398
|
return out;
|
185359
185399
|
}
|
185400
|
+
var import_escape_html5;
|
185360
185401
|
var init_redirect = __esm({
|
185361
185402
|
"src/util/dev/templates/redirect.ts"() {
|
185362
185403
|
"use strict";
|
185404
|
+
import_escape_html5 = __toESM(require_escape_html());
|
185363
185405
|
}
|
185364
185406
|
});
|
185365
185407
|
|
@@ -185811,6 +185853,9 @@ var init_server = __esm({
|
|
185811
185853
|
return true;
|
185812
185854
|
}
|
185813
185855
|
if (!match && status && phase !== "miss") {
|
185856
|
+
if (routeResult.userDest) {
|
185857
|
+
return false;
|
185858
|
+
}
|
185814
185859
|
this.output.debug(`Route found with with status code ${status}`);
|
185815
185860
|
await this.sendError(req, res, requestId, "", status, headers);
|
185816
185861
|
return true;
|
@@ -186893,7 +186938,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
186893
186938
|
const merged = { ...env, ...localEnv };
|
186894
186939
|
let hasInvalidName = false;
|
186895
186940
|
for (const key of Object.keys(merged)) {
|
186896
|
-
if (!/^[a-zA-
|
186941
|
+
if (!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(key)) {
|
186897
186942
|
this.output.warn(
|
186898
186943
|
`Ignoring ${type.split(".").slice(1).reverse().join(" ")} var ${JSON.stringify(key)} because name is invalid`
|
186899
186944
|
);
|
@@ -186903,7 +186948,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
186903
186948
|
}
|
186904
186949
|
if (hasInvalidName) {
|
186905
186950
|
this.output.log(
|
186906
|
-
"
|
186951
|
+
"The name contains invalid characters. Only letters, digits, and underscores are allowed. Furthermore, the name should not start with a digit"
|
186907
186952
|
);
|
186908
186953
|
}
|
186909
186954
|
return merged;
|
@@ -189164,6 +189209,7 @@ var init_add3 = __esm({
|
|
189164
189209
|
async function buy(client2, opts, args2) {
|
189165
189210
|
const { output: output2 } = client2;
|
189166
189211
|
const { contextName } = await getScope(client2);
|
189212
|
+
const skipConfirmation = !!process.env.CI;
|
189167
189213
|
const [domainName] = args2;
|
189168
189214
|
if (!domainName) {
|
189169
189215
|
output2.error(
|
@@ -189212,18 +189258,23 @@ async function buy(client2, opts, args2) {
|
|
189212
189258
|
"available"
|
189213
189259
|
)} to buy under ${import_chalk70.default.bold(contextName)}! ${availableStamp()}`
|
189214
189260
|
);
|
189215
|
-
|
189216
|
-
|
189217
|
-
|
189218
|
-
|
189219
|
-
|
189261
|
+
let autoRenew;
|
189262
|
+
if (skipConfirmation) {
|
189263
|
+
autoRenew = true;
|
189264
|
+
} else {
|
189265
|
+
if (!await promptBool(
|
189266
|
+
`Buy now for ${import_chalk70.default.bold(`$${price}`)} (${`${period}yr${period > 1 ? "s" : ""}`})?`,
|
189267
|
+
client2
|
189268
|
+
)) {
|
189269
|
+
return 0;
|
189270
|
+
}
|
189271
|
+
autoRenew = await promptBool(
|
189272
|
+
renewalPrice.period === 1 ? `Auto renew yearly for ${import_chalk70.default.bold(`$${price}`)}?` : `Auto renew every ${renewalPrice.period} years for ${import_chalk70.default.bold(
|
189273
|
+
`$${price}`
|
189274
|
+
)}?`,
|
189275
|
+
{ ...client2, defaultValue: true }
|
189276
|
+
);
|
189220
189277
|
}
|
189221
|
-
const autoRenew = await promptBool(
|
189222
|
-
renewalPrice.period === 1 ? `Auto renew yearly for ${import_chalk70.default.bold(`$${price}`)}?` : `Auto renew every ${renewalPrice.period} years for ${import_chalk70.default.bold(
|
189223
|
-
`$${price}`
|
189224
|
-
)}?`,
|
189225
|
-
{ ...client2, defaultValue: true }
|
189226
|
-
);
|
189227
189278
|
let buyResult;
|
189228
189279
|
const purchaseStamp = stamp_default();
|
189229
189280
|
output2.spinner("Purchasing");
|
@@ -198948,4 +198999,13 @@ range-parser/index.js:
|
|
198948
198999
|
* Copyright(c) 2015-2016 Douglas Christopher Wilson
|
198949
199000
|
* MIT Licensed
|
198950
199001
|
*)
|
199002
|
+
|
199003
|
+
escape-html/index.js:
|
199004
|
+
(*!
|
199005
|
+
* escape-html
|
199006
|
+
* Copyright(c) 2012-2013 TJ Holowaychuk
|
199007
|
+
* Copyright(c) 2015 Andreas Lubbe
|
199008
|
+
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
199009
|
+
* MIT Licensed
|
199010
|
+
*)
|
198951
199011
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vercel",
|
3
|
-
"version": "32.
|
3
|
+
"version": "32.5.0",
|
4
4
|
"preferGlobal": true,
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"description": "The command-line interface for Vercel",
|
@@ -25,13 +25,13 @@
|
|
25
25
|
"@vercel/fun": "1.1.0",
|
26
26
|
"@vercel/go": "3.0.3",
|
27
27
|
"@vercel/hydrogen": "1.0.1",
|
28
|
-
"@vercel/next": "4.0.
|
28
|
+
"@vercel/next": "4.0.11",
|
29
29
|
"@vercel/node": "3.0.7",
|
30
|
-
"@vercel/python": "4.0
|
31
|
-
"@vercel/redwood": "2.0.
|
32
|
-
"@vercel/remix-builder": "2.0.
|
30
|
+
"@vercel/python": "4.1.0",
|
31
|
+
"@vercel/redwood": "2.0.5",
|
32
|
+
"@vercel/remix-builder": "2.0.10",
|
33
33
|
"@vercel/ruby": "2.0.2",
|
34
|
-
"@vercel/static-build": "2.0.
|
34
|
+
"@vercel/static-build": "2.0.9",
|
35
35
|
"chokidar": "3.3.1"
|
36
36
|
},
|
37
37
|
"devDependencies": {
|
@@ -78,12 +78,12 @@
|
|
78
78
|
"@types/yauzl-promise": "2.1.0",
|
79
79
|
"@vercel-internals/constants": "1.0.4",
|
80
80
|
"@vercel-internals/get-package-json": "1.0.0",
|
81
|
-
"@vercel-internals/types": "1.0.
|
82
|
-
"@vercel/client": "13.0.
|
81
|
+
"@vercel-internals/types": "1.0.13",
|
82
|
+
"@vercel/client": "13.0.6",
|
83
83
|
"@vercel/error-utils": "2.0.1",
|
84
84
|
"@vercel/frameworks": "2.0.2",
|
85
|
-
"@vercel/fs-detectors": "5.1.
|
86
|
-
"@vercel/routing-utils": "3.
|
85
|
+
"@vercel/fs-detectors": "5.1.2",
|
86
|
+
"@vercel/routing-utils": "3.1.0",
|
87
87
|
"ajv": "6.12.2",
|
88
88
|
"alpha-sort": "2.0.1",
|
89
89
|
"ansi-escapes": "4.3.2",
|
@@ -148,7 +148,6 @@
|
|
148
148
|
"strip-ansi": "6.0.1",
|
149
149
|
"supports-hyperlinks": "3.0.0",
|
150
150
|
"tar-fs": "1.16.3",
|
151
|
-
"test-listen": "1.1.0",
|
152
151
|
"text-table": "0.2.0",
|
153
152
|
"title": "3.4.1",
|
154
153
|
"tmp-promise": "1.0.3",
|
@@ -168,6 +167,7 @@
|
|
168
167
|
"test-dev": "pnpm test test/dev/",
|
169
168
|
"coverage": "codecov",
|
170
169
|
"build": "node scripts/build.mjs",
|
171
|
-
"dev": "ts-node ./src/index.ts"
|
170
|
+
"dev": "ts-node ./src/index.ts",
|
171
|
+
"type-check": "tsc --noEmit"
|
172
172
|
}
|
173
173
|
}
|