vercel 32.0.1 → 32.0.2
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 +490 -302
- package/package.json +6 -8
package/dist/index.js
CHANGED
@@ -858,7 +858,329 @@ module['exports'] = colors;
|
|
858
858
|
|
859
859
|
/***/ }),
|
860
860
|
|
861
|
-
/***/
|
861
|
+
/***/ 37768:
|
862
|
+
/***/ ((module) => {
|
863
|
+
|
864
|
+
"use strict";
|
865
|
+
|
866
|
+
var __defProp = Object.defineProperty;
|
867
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
868
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
869
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
870
|
+
var __export = (target, all) => {
|
871
|
+
for (var name in all)
|
872
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
873
|
+
};
|
874
|
+
var __copyProps = (to, from, except, desc) => {
|
875
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
876
|
+
for (let key of __getOwnPropNames(from))
|
877
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
878
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
879
|
+
}
|
880
|
+
return to;
|
881
|
+
};
|
882
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
883
|
+
|
884
|
+
// src/index.ts
|
885
|
+
var src_exports = {};
|
886
|
+
__export(src_exports, {
|
887
|
+
RequestCookies: () => RequestCookies,
|
888
|
+
ResponseCookies: () => ResponseCookies,
|
889
|
+
parseCookie: () => parseCookie,
|
890
|
+
parseSetCookie: () => parseSetCookie,
|
891
|
+
splitCookiesString: () => splitCookiesString,
|
892
|
+
stringifyCookie: () => stringifyCookie
|
893
|
+
});
|
894
|
+
module.exports = __toCommonJS(src_exports);
|
895
|
+
|
896
|
+
// src/serialize.ts
|
897
|
+
function stringifyCookie(c) {
|
898
|
+
var _a;
|
899
|
+
const attrs = [
|
900
|
+
"path" in c && c.path && `Path=${c.path}`,
|
901
|
+
"expires" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === "number" ? new Date(c.expires) : c.expires).toUTCString()}`,
|
902
|
+
"maxAge" in c && typeof c.maxAge === "number" && `Max-Age=${c.maxAge}`,
|
903
|
+
"domain" in c && c.domain && `Domain=${c.domain}`,
|
904
|
+
"secure" in c && c.secure && "Secure",
|
905
|
+
"httpOnly" in c && c.httpOnly && "HttpOnly",
|
906
|
+
"sameSite" in c && c.sameSite && `SameSite=${c.sameSite}`
|
907
|
+
].filter(Boolean);
|
908
|
+
return `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : "")}; ${attrs.join("; ")}`;
|
909
|
+
}
|
910
|
+
function parseCookie(cookie) {
|
911
|
+
const map = /* @__PURE__ */ new Map();
|
912
|
+
for (const pair of cookie.split(/; */)) {
|
913
|
+
if (!pair)
|
914
|
+
continue;
|
915
|
+
const splitAt = pair.indexOf("=");
|
916
|
+
if (splitAt === -1) {
|
917
|
+
map.set(pair, "true");
|
918
|
+
continue;
|
919
|
+
}
|
920
|
+
const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)];
|
921
|
+
try {
|
922
|
+
map.set(key, decodeURIComponent(value != null ? value : "true"));
|
923
|
+
} catch {
|
924
|
+
}
|
925
|
+
}
|
926
|
+
return map;
|
927
|
+
}
|
928
|
+
function parseSetCookie(setCookie) {
|
929
|
+
if (!setCookie) {
|
930
|
+
return void 0;
|
931
|
+
}
|
932
|
+
const [[name, value], ...attributes] = parseCookie(setCookie);
|
933
|
+
const { domain, expires, httponly, maxage, path, samesite, secure } = Object.fromEntries(
|
934
|
+
attributes.map(([key, value2]) => [key.toLowerCase(), value2])
|
935
|
+
);
|
936
|
+
const cookie = {
|
937
|
+
name,
|
938
|
+
value: decodeURIComponent(value),
|
939
|
+
domain,
|
940
|
+
...expires && { expires: new Date(expires) },
|
941
|
+
...httponly && { httpOnly: true },
|
942
|
+
...typeof maxage === "string" && { maxAge: Number(maxage) },
|
943
|
+
path,
|
944
|
+
...samesite && { sameSite: parseSameSite(samesite) },
|
945
|
+
...secure && { secure: true }
|
946
|
+
};
|
947
|
+
return compact(cookie);
|
948
|
+
}
|
949
|
+
function compact(t) {
|
950
|
+
const newT = {};
|
951
|
+
for (const key in t) {
|
952
|
+
if (t[key]) {
|
953
|
+
newT[key] = t[key];
|
954
|
+
}
|
955
|
+
}
|
956
|
+
return newT;
|
957
|
+
}
|
958
|
+
var SAME_SITE = ["strict", "lax", "none"];
|
959
|
+
function parseSameSite(string) {
|
960
|
+
string = string.toLowerCase();
|
961
|
+
return SAME_SITE.includes(string) ? string : void 0;
|
962
|
+
}
|
963
|
+
function splitCookiesString(cookiesString) {
|
964
|
+
if (!cookiesString)
|
965
|
+
return [];
|
966
|
+
var cookiesStrings = [];
|
967
|
+
var pos = 0;
|
968
|
+
var start;
|
969
|
+
var ch;
|
970
|
+
var lastComma;
|
971
|
+
var nextStart;
|
972
|
+
var cookiesSeparatorFound;
|
973
|
+
function skipWhitespace() {
|
974
|
+
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
|
975
|
+
pos += 1;
|
976
|
+
}
|
977
|
+
return pos < cookiesString.length;
|
978
|
+
}
|
979
|
+
function notSpecialChar() {
|
980
|
+
ch = cookiesString.charAt(pos);
|
981
|
+
return ch !== "=" && ch !== ";" && ch !== ",";
|
982
|
+
}
|
983
|
+
while (pos < cookiesString.length) {
|
984
|
+
start = pos;
|
985
|
+
cookiesSeparatorFound = false;
|
986
|
+
while (skipWhitespace()) {
|
987
|
+
ch = cookiesString.charAt(pos);
|
988
|
+
if (ch === ",") {
|
989
|
+
lastComma = pos;
|
990
|
+
pos += 1;
|
991
|
+
skipWhitespace();
|
992
|
+
nextStart = pos;
|
993
|
+
while (pos < cookiesString.length && notSpecialChar()) {
|
994
|
+
pos += 1;
|
995
|
+
}
|
996
|
+
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
997
|
+
cookiesSeparatorFound = true;
|
998
|
+
pos = nextStart;
|
999
|
+
cookiesStrings.push(cookiesString.substring(start, lastComma));
|
1000
|
+
start = pos;
|
1001
|
+
} else {
|
1002
|
+
pos = lastComma + 1;
|
1003
|
+
}
|
1004
|
+
} else {
|
1005
|
+
pos += 1;
|
1006
|
+
}
|
1007
|
+
}
|
1008
|
+
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
1009
|
+
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
|
1010
|
+
}
|
1011
|
+
}
|
1012
|
+
return cookiesStrings;
|
1013
|
+
}
|
1014
|
+
|
1015
|
+
// src/request-cookies.ts
|
1016
|
+
var RequestCookies = class {
|
1017
|
+
constructor(requestHeaders) {
|
1018
|
+
/** @internal */
|
1019
|
+
this._parsed = /* @__PURE__ */ new Map();
|
1020
|
+
this._headers = requestHeaders;
|
1021
|
+
const header = requestHeaders.get("cookie");
|
1022
|
+
if (header) {
|
1023
|
+
const parsed = parseCookie(header);
|
1024
|
+
for (const [name, value] of parsed) {
|
1025
|
+
this._parsed.set(name, { name, value });
|
1026
|
+
}
|
1027
|
+
}
|
1028
|
+
}
|
1029
|
+
[Symbol.iterator]() {
|
1030
|
+
return this._parsed[Symbol.iterator]();
|
1031
|
+
}
|
1032
|
+
/**
|
1033
|
+
* The amount of cookies received from the client
|
1034
|
+
*/
|
1035
|
+
get size() {
|
1036
|
+
return this._parsed.size;
|
1037
|
+
}
|
1038
|
+
get(...args) {
|
1039
|
+
const name = typeof args[0] === "string" ? args[0] : args[0].name;
|
1040
|
+
return this._parsed.get(name);
|
1041
|
+
}
|
1042
|
+
getAll(...args) {
|
1043
|
+
var _a;
|
1044
|
+
const all = Array.from(this._parsed);
|
1045
|
+
if (!args.length) {
|
1046
|
+
return all.map(([_, value]) => value);
|
1047
|
+
}
|
1048
|
+
const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;
|
1049
|
+
return all.filter(([n]) => n === name).map(([_, value]) => value);
|
1050
|
+
}
|
1051
|
+
has(name) {
|
1052
|
+
return this._parsed.has(name);
|
1053
|
+
}
|
1054
|
+
set(...args) {
|
1055
|
+
const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args;
|
1056
|
+
const map = this._parsed;
|
1057
|
+
map.set(name, { name, value });
|
1058
|
+
this._headers.set(
|
1059
|
+
"cookie",
|
1060
|
+
Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join("; ")
|
1061
|
+
);
|
1062
|
+
return this;
|
1063
|
+
}
|
1064
|
+
/**
|
1065
|
+
* Delete the cookies matching the passed name or names in the request.
|
1066
|
+
*/
|
1067
|
+
delete(names) {
|
1068
|
+
const map = this._parsed;
|
1069
|
+
const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name));
|
1070
|
+
this._headers.set(
|
1071
|
+
"cookie",
|
1072
|
+
Array.from(map).map(([_, value]) => stringifyCookie(value)).join("; ")
|
1073
|
+
);
|
1074
|
+
return result;
|
1075
|
+
}
|
1076
|
+
/**
|
1077
|
+
* Delete all the cookies in the cookies in the request.
|
1078
|
+
*/
|
1079
|
+
clear() {
|
1080
|
+
this.delete(Array.from(this._parsed.keys()));
|
1081
|
+
return this;
|
1082
|
+
}
|
1083
|
+
/**
|
1084
|
+
* Format the cookies in the request as a string for logging
|
1085
|
+
*/
|
1086
|
+
[Symbol.for("edge-runtime.inspect.custom")]() {
|
1087
|
+
return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;
|
1088
|
+
}
|
1089
|
+
toString() {
|
1090
|
+
return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join("; ");
|
1091
|
+
}
|
1092
|
+
};
|
1093
|
+
|
1094
|
+
// src/response-cookies.ts
|
1095
|
+
var ResponseCookies = class {
|
1096
|
+
constructor(responseHeaders) {
|
1097
|
+
/** @internal */
|
1098
|
+
this._parsed = /* @__PURE__ */ new Map();
|
1099
|
+
var _a, _b, _c;
|
1100
|
+
this._headers = responseHeaders;
|
1101
|
+
const setCookie = (
|
1102
|
+
// @ts-expect-error See https://github.com/whatwg/fetch/issues/973
|
1103
|
+
(_c = (_b = (_a = responseHeaders.getAll) == null ? void 0 : _a.call(responseHeaders, "set-cookie")) != null ? _b : responseHeaders.get("set-cookie")) != null ? _c : []
|
1104
|
+
);
|
1105
|
+
const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie);
|
1106
|
+
for (const cookieString of cookieStrings) {
|
1107
|
+
const parsed = parseSetCookie(cookieString);
|
1108
|
+
if (parsed)
|
1109
|
+
this._parsed.set(parsed.name, parsed);
|
1110
|
+
}
|
1111
|
+
}
|
1112
|
+
/**
|
1113
|
+
* {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.
|
1114
|
+
*/
|
1115
|
+
get(...args) {
|
1116
|
+
const key = typeof args[0] === "string" ? args[0] : args[0].name;
|
1117
|
+
return this._parsed.get(key);
|
1118
|
+
}
|
1119
|
+
/**
|
1120
|
+
* {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.
|
1121
|
+
*/
|
1122
|
+
getAll(...args) {
|
1123
|
+
var _a;
|
1124
|
+
const all = Array.from(this._parsed.values());
|
1125
|
+
if (!args.length) {
|
1126
|
+
return all;
|
1127
|
+
}
|
1128
|
+
const key = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;
|
1129
|
+
return all.filter((c) => c.name === key);
|
1130
|
+
}
|
1131
|
+
has(name) {
|
1132
|
+
return this._parsed.has(name);
|
1133
|
+
}
|
1134
|
+
/**
|
1135
|
+
* {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.
|
1136
|
+
*/
|
1137
|
+
set(...args) {
|
1138
|
+
const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args;
|
1139
|
+
const map = this._parsed;
|
1140
|
+
map.set(name, normalizeCookie({ name, value, ...cookie }));
|
1141
|
+
replace(map, this._headers);
|
1142
|
+
return this;
|
1143
|
+
}
|
1144
|
+
/**
|
1145
|
+
* {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.
|
1146
|
+
*/
|
1147
|
+
delete(...args) {
|
1148
|
+
const [name, path, domain] = typeof args[0] === "string" ? [args[0]] : [args[0].name, args[0].path, args[0].domain];
|
1149
|
+
return this.set({ name, path, domain, value: "", expires: /* @__PURE__ */ new Date(0) });
|
1150
|
+
}
|
1151
|
+
[Symbol.for("edge-runtime.inspect.custom")]() {
|
1152
|
+
return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;
|
1153
|
+
}
|
1154
|
+
toString() {
|
1155
|
+
return [...this._parsed.values()].map(stringifyCookie).join("; ");
|
1156
|
+
}
|
1157
|
+
};
|
1158
|
+
function replace(bag, headers) {
|
1159
|
+
headers.delete("set-cookie");
|
1160
|
+
for (const [, value] of bag) {
|
1161
|
+
const serialized = stringifyCookie(value);
|
1162
|
+
headers.append("set-cookie", serialized);
|
1163
|
+
}
|
1164
|
+
}
|
1165
|
+
function normalizeCookie(cookie = { name: "", value: "" }) {
|
1166
|
+
if (typeof cookie.expires === "number") {
|
1167
|
+
cookie.expires = new Date(cookie.expires);
|
1168
|
+
}
|
1169
|
+
if (cookie.maxAge) {
|
1170
|
+
cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3);
|
1171
|
+
}
|
1172
|
+
if (cookie.path === null || cookie.path === void 0) {
|
1173
|
+
cookie.path = "/";
|
1174
|
+
}
|
1175
|
+
return cookie;
|
1176
|
+
}
|
1177
|
+
// Annotate the CommonJS export names for ESM import in node:
|
1178
|
+
0 && (0);
|
1179
|
+
|
1180
|
+
|
1181
|
+
/***/ }),
|
1182
|
+
|
1183
|
+
/***/ 95549:
|
862
1184
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
863
1185
|
|
864
1186
|
"use strict";
|
@@ -978,6 +1300,7 @@ function computeOrigin({ headers }, defaultOrigin) {
|
|
978
1300
|
}
|
979
1301
|
|
980
1302
|
// src/edge-to-node/headers.ts
|
1303
|
+
var import_cookies = __webpack_require__(37768);
|
981
1304
|
function toOutgoingHeaders(headers) {
|
982
1305
|
var _a, _b;
|
983
1306
|
const outputHeaders = {};
|
@@ -985,7 +1308,7 @@ function toOutgoingHeaders(headers) {
|
|
985
1308
|
for (const [name, value] of typeof headers.raw !== "undefined" ? Object.entries(headers.raw()) : headers.entries()) {
|
986
1309
|
outputHeaders[name] = value;
|
987
1310
|
if (name.toLowerCase() === "set-cookie") {
|
988
|
-
outputHeaders[name] = (_b = (_a = headers.getAll) == null ? void 0 : _a.call(headers, "set-cookie")) != null ? _b : splitCookiesString(value);
|
1311
|
+
outputHeaders[name] = (_b = (_a = headers.getAll) == null ? void 0 : _a.call(headers, "set-cookie")) != null ? _b : (0, import_cookies.splitCookiesString)(value);
|
989
1312
|
}
|
990
1313
|
}
|
991
1314
|
}
|
@@ -998,55 +1321,6 @@ function mergeIntoServerResponse(headers, serverResponse) {
|
|
998
1321
|
}
|
999
1322
|
}
|
1000
1323
|
}
|
1001
|
-
function splitCookiesString(cookiesString) {
|
1002
|
-
var cookiesStrings = [];
|
1003
|
-
var pos = 0;
|
1004
|
-
var start;
|
1005
|
-
var ch;
|
1006
|
-
var lastComma;
|
1007
|
-
var nextStart;
|
1008
|
-
var cookiesSeparatorFound;
|
1009
|
-
function skipWhitespace() {
|
1010
|
-
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
|
1011
|
-
pos += 1;
|
1012
|
-
}
|
1013
|
-
return pos < cookiesString.length;
|
1014
|
-
}
|
1015
|
-
function notSpecialChar() {
|
1016
|
-
ch = cookiesString.charAt(pos);
|
1017
|
-
return ch !== "=" && ch !== ";" && ch !== ",";
|
1018
|
-
}
|
1019
|
-
while (pos < cookiesString.length) {
|
1020
|
-
start = pos;
|
1021
|
-
cookiesSeparatorFound = false;
|
1022
|
-
while (skipWhitespace()) {
|
1023
|
-
ch = cookiesString.charAt(pos);
|
1024
|
-
if (ch === ",") {
|
1025
|
-
lastComma = pos;
|
1026
|
-
pos += 1;
|
1027
|
-
skipWhitespace();
|
1028
|
-
nextStart = pos;
|
1029
|
-
while (pos < cookiesString.length && notSpecialChar()) {
|
1030
|
-
pos += 1;
|
1031
|
-
}
|
1032
|
-
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
1033
|
-
cookiesSeparatorFound = true;
|
1034
|
-
pos = nextStart;
|
1035
|
-
cookiesStrings.push(cookiesString.substring(start, lastComma));
|
1036
|
-
start = pos;
|
1037
|
-
} else {
|
1038
|
-
pos = lastComma + 1;
|
1039
|
-
}
|
1040
|
-
} else {
|
1041
|
-
pos += 1;
|
1042
|
-
}
|
1043
|
-
}
|
1044
|
-
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
1045
|
-
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
|
1046
|
-
}
|
1047
|
-
}
|
1048
|
-
return cookiesStrings;
|
1049
|
-
}
|
1050
1324
|
|
1051
1325
|
// src/edge-to-node/stream.ts
|
1052
1326
|
var import_node_stream = __webpack_require__(92413);
|
@@ -138376,132 +138650,6 @@ mkdirP.sync = function sync (p, opts, made) {
|
|
138376
138650
|
};
|
138377
138651
|
|
138378
138652
|
|
138379
|
-
/***/ }),
|
138380
|
-
|
138381
|
-
/***/ 14362:
|
138382
|
-
/***/ ((module) => {
|
138383
|
-
|
138384
|
-
function toArr(any) {
|
138385
|
-
return any == null ? [] : Array.isArray(any) ? any : [any];
|
138386
|
-
}
|
138387
|
-
|
138388
|
-
function toVal(out, key, val, opts) {
|
138389
|
-
var x, old=out[key], nxt=(
|
138390
|
-
!!~opts.string.indexOf(key) ? (val == null || val === true ? '' : String(val))
|
138391
|
-
: typeof val === 'boolean' ? val
|
138392
|
-
: !!~opts.boolean.indexOf(key) ? (val === 'false' ? false : val === 'true' || (out._.push((x = +val,x * 0 === 0) ? x : val),!!val))
|
138393
|
-
: (x = +val,x * 0 === 0) ? x : val
|
138394
|
-
);
|
138395
|
-
out[key] = old == null ? nxt : (Array.isArray(old) ? old.concat(nxt) : [old, nxt]);
|
138396
|
-
}
|
138397
|
-
|
138398
|
-
module.exports = function (args, opts) {
|
138399
|
-
args = args || [];
|
138400
|
-
opts = opts || {};
|
138401
|
-
|
138402
|
-
var k, arr, arg, name, val, out={ _:[] };
|
138403
|
-
var i=0, j=0, idx=0, len=args.length;
|
138404
|
-
|
138405
|
-
const alibi = opts.alias !== void 0;
|
138406
|
-
const strict = opts.unknown !== void 0;
|
138407
|
-
const defaults = opts.default !== void 0;
|
138408
|
-
|
138409
|
-
opts.alias = opts.alias || {};
|
138410
|
-
opts.string = toArr(opts.string);
|
138411
|
-
opts.boolean = toArr(opts.boolean);
|
138412
|
-
|
138413
|
-
if (alibi) {
|
138414
|
-
for (k in opts.alias) {
|
138415
|
-
arr = opts.alias[k] = toArr(opts.alias[k]);
|
138416
|
-
for (i=0; i < arr.length; i++) {
|
138417
|
-
(opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);
|
138418
|
-
}
|
138419
|
-
}
|
138420
|
-
}
|
138421
|
-
|
138422
|
-
for (i=opts.boolean.length; i-- > 0;) {
|
138423
|
-
arr = opts.alias[opts.boolean[i]] || [];
|
138424
|
-
for (j=arr.length; j-- > 0;) opts.boolean.push(arr[j]);
|
138425
|
-
}
|
138426
|
-
|
138427
|
-
for (i=opts.string.length; i-- > 0;) {
|
138428
|
-
arr = opts.alias[opts.string[i]] || [];
|
138429
|
-
for (j=arr.length; j-- > 0;) opts.string.push(arr[j]);
|
138430
|
-
}
|
138431
|
-
|
138432
|
-
if (defaults) {
|
138433
|
-
for (k in opts.default) {
|
138434
|
-
name = typeof opts.default[k];
|
138435
|
-
arr = opts.alias[k] = opts.alias[k] || [];
|
138436
|
-
if (opts[name] !== void 0) {
|
138437
|
-
opts[name].push(k);
|
138438
|
-
for (i=0; i < arr.length; i++) {
|
138439
|
-
opts[name].push(arr[i]);
|
138440
|
-
}
|
138441
|
-
}
|
138442
|
-
}
|
138443
|
-
}
|
138444
|
-
|
138445
|
-
const keys = strict ? Object.keys(opts.alias) : [];
|
138446
|
-
|
138447
|
-
for (i=0; i < len; i++) {
|
138448
|
-
arg = args[i];
|
138449
|
-
|
138450
|
-
if (arg === '--') {
|
138451
|
-
out._ = out._.concat(args.slice(++i));
|
138452
|
-
break;
|
138453
|
-
}
|
138454
|
-
|
138455
|
-
for (j=0; j < arg.length; j++) {
|
138456
|
-
if (arg.charCodeAt(j) !== 45) break; // "-"
|
138457
|
-
}
|
138458
|
-
|
138459
|
-
if (j === 0) {
|
138460
|
-
out._.push(arg);
|
138461
|
-
} else if (arg.substring(j, j + 3) === 'no-') {
|
138462
|
-
name = arg.substring(j + 3);
|
138463
|
-
if (strict && !~keys.indexOf(name)) {
|
138464
|
-
return opts.unknown(arg);
|
138465
|
-
}
|
138466
|
-
out[name] = false;
|
138467
|
-
} else {
|
138468
|
-
for (idx=j+1; idx < arg.length; idx++) {
|
138469
|
-
if (arg.charCodeAt(idx) === 61) break; // "="
|
138470
|
-
}
|
138471
|
-
|
138472
|
-
name = arg.substring(j, idx);
|
138473
|
-
val = arg.substring(++idx) || (i+1 === len || (''+args[i+1]).charCodeAt(0) === 45 || args[++i]);
|
138474
|
-
arr = (j === 2 ? [name] : name);
|
138475
|
-
|
138476
|
-
for (idx=0; idx < arr.length; idx++) {
|
138477
|
-
name = arr[idx];
|
138478
|
-
if (strict && !~keys.indexOf(name)) return opts.unknown('-'.repeat(j) + name);
|
138479
|
-
toVal(out, name, (idx + 1 < arr.length) || val, opts);
|
138480
|
-
}
|
138481
|
-
}
|
138482
|
-
}
|
138483
|
-
|
138484
|
-
if (defaults) {
|
138485
|
-
for (k in opts.default) {
|
138486
|
-
if (out[k] === void 0) {
|
138487
|
-
out[k] = opts.default[k];
|
138488
|
-
}
|
138489
|
-
}
|
138490
|
-
}
|
138491
|
-
|
138492
|
-
if (alibi) {
|
138493
|
-
for (k in out) {
|
138494
|
-
arr = opts.alias[k] || [];
|
138495
|
-
while (arr.length > 0) {
|
138496
|
-
out[arr.shift()] = out[k];
|
138497
|
-
}
|
138498
|
-
}
|
138499
|
-
}
|
138500
|
-
|
138501
|
-
return out;
|
138502
|
-
}
|
138503
|
-
|
138504
|
-
|
138505
138653
|
/***/ }),
|
138506
138654
|
|
138507
138655
|
/***/ 88150:
|
@@ -212408,10 +212556,6 @@ var source_default = /*#__PURE__*/__webpack_require__.n(source);
|
|
212408
212556
|
var text_table = __webpack_require__(43362);
|
212409
212557
|
var text_table_default = /*#__PURE__*/__webpack_require__.n(text_table);
|
212410
212558
|
|
212411
|
-
// EXTERNAL MODULE: ../../node_modules/.pnpm/mri@1.1.5/node_modules/mri/lib/index.js
|
212412
|
-
var lib = __webpack_require__(14362);
|
212413
|
-
var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
|
212414
|
-
|
212415
212559
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
|
212416
212560
|
var ms = __webpack_require__(21378);
|
212417
212561
|
var ms_default = /*#__PURE__*/__webpack_require__.n(ms);
|
@@ -212571,14 +212715,14 @@ var input_confirm = __webpack_require__(59320);
|
|
212571
212715
|
// EXTERNAL MODULE: ./src/util/get-command-flags.ts
|
212572
212716
|
var get_command_flags = __webpack_require__(98395);
|
212573
212717
|
|
212574
|
-
// EXTERNAL MODULE: ./src/util/get-prefixed-flags.ts
|
212575
|
-
var get_prefixed_flags = __webpack_require__(31354);
|
212576
|
-
|
212577
212718
|
// EXTERNAL MODULE: ./src/util/pkg-name.ts
|
212578
212719
|
var pkg_name = __webpack_require__(79000);
|
212579
212720
|
|
212580
|
-
//
|
212721
|
+
// EXTERNAL MODULE: ./src/util/get-args.ts
|
212722
|
+
var get_args = __webpack_require__(2505);
|
212723
|
+
var get_args_default = /*#__PURE__*/__webpack_require__.n(get_args);
|
212581
212724
|
|
212725
|
+
// CONCATENATED MODULE: ./src/commands/secrets.js
|
212582
212726
|
|
212583
212727
|
|
212584
212728
|
|
@@ -212661,14 +212805,12 @@ let subcommand;
|
|
212661
212805
|
let nextTimestamp;
|
212662
212806
|
|
212663
212807
|
const main = async client => {
|
212664
|
-
argv = (0,
|
212665
|
-
|
212666
|
-
|
212667
|
-
|
212668
|
-
|
212669
|
-
|
212670
|
-
next: 'N',
|
212671
|
-
},
|
212808
|
+
argv = (0,get_args_default())(client.argv.slice(2), {
|
212809
|
+
'--yes': Boolean,
|
212810
|
+
'--next': Number,
|
212811
|
+
'--test-warning': Boolean,
|
212812
|
+
'-y': '--yes',
|
212813
|
+
'-N': '--next',
|
212672
212814
|
});
|
212673
212815
|
|
212674
212816
|
argv._ = argv._.slice(1);
|
@@ -212714,7 +212856,8 @@ async function run({ output, contextName, currentTeam, client }) {
|
|
212714
212856
|
const secrets = new Secrets({ client, currentTeam });
|
212715
212857
|
const args = argv._.slice(1);
|
212716
212858
|
const start = Date.now();
|
212717
|
-
const { 'test-warning': testWarningFlag } = argv;
|
212859
|
+
const { '--test-warning': testWarningFlag } = argv;
|
212860
|
+
|
212718
212861
|
const commandName = (0,pkg_name.getCommandName)('secret ' + subcommand);
|
212719
212862
|
|
212720
212863
|
if (subcommand === 'ls' || subcommand === 'list') {
|
@@ -212770,14 +212913,7 @@ async function run({ output, contextName, currentTeam, client }) {
|
|
212770
212913
|
}
|
212771
212914
|
|
212772
212915
|
if (pagination && pagination.count === 20) {
|
212773
|
-
const
|
212774
|
-
const flags = (0,get_command_flags.default)(prefixedArgs, [
|
212775
|
-
'_',
|
212776
|
-
'--next',
|
212777
|
-
'-N',
|
212778
|
-
'-d',
|
212779
|
-
'-y',
|
212780
|
-
]);
|
212916
|
+
const flags = (0,get_command_flags.default)(argv, ['_', '--next', '-N', '-d', '-y']);
|
212781
212917
|
const nextCmd = `secrets ${subcommand}${flags} --next ${pagination.next}`;
|
212782
212918
|
output.log(`To display the next page run ${(0,pkg_name.getCommandName)(nextCmd)}`);
|
212783
212919
|
}
|
@@ -212805,7 +212941,7 @@ async function run({ output, contextName, currentTeam, client }) {
|
|
212805
212941
|
|
212806
212942
|
if (theSecret) {
|
212807
212943
|
const yes =
|
212808
|
-
argv
|
212944
|
+
argv['--yes'] ||
|
212809
212945
|
(await readConfirmation(client, output, theSecret, contextName));
|
212810
212946
|
if (!yes) {
|
212811
212947
|
output.print(`Canceled. Secret not deleted.\n`);
|
@@ -222889,6 +223025,150 @@ async function add(client, opts, args) {
|
|
222889
223025
|
exports.default = add;
|
222890
223026
|
|
222891
223027
|
|
223028
|
+
/***/ }),
|
223029
|
+
|
223030
|
+
/***/ 5155:
|
223031
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
223032
|
+
|
223033
|
+
"use strict";
|
223034
|
+
|
223035
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
223036
|
+
exports.dnsCommand = void 0;
|
223037
|
+
const pkg_name_1 = __webpack_require__(79000);
|
223038
|
+
exports.dnsCommand = {
|
223039
|
+
name: 'dns',
|
223040
|
+
description: 'Interact with DNS entries for a project.',
|
223041
|
+
arguments: [
|
223042
|
+
{
|
223043
|
+
name: 'command',
|
223044
|
+
required: true,
|
223045
|
+
},
|
223046
|
+
],
|
223047
|
+
subcommands: [
|
223048
|
+
{
|
223049
|
+
name: 'import',
|
223050
|
+
description: 'Import a DNS zone file (see below for examples)',
|
223051
|
+
arguments: [
|
223052
|
+
{
|
223053
|
+
name: 'domain',
|
223054
|
+
required: true,
|
223055
|
+
},
|
223056
|
+
{
|
223057
|
+
name: 'zonefile',
|
223058
|
+
required: true,
|
223059
|
+
},
|
223060
|
+
],
|
223061
|
+
options: [],
|
223062
|
+
examples: [],
|
223063
|
+
},
|
223064
|
+
{
|
223065
|
+
name: 'ls',
|
223066
|
+
description: 'List all DNS entries for a domain',
|
223067
|
+
arguments: [
|
223068
|
+
{
|
223069
|
+
name: 'domain',
|
223070
|
+
required: true,
|
223071
|
+
},
|
223072
|
+
],
|
223073
|
+
options: [],
|
223074
|
+
examples: [],
|
223075
|
+
},
|
223076
|
+
{
|
223077
|
+
name: 'add',
|
223078
|
+
description: 'Add a new DNS entry (see below for examples)',
|
223079
|
+
arguments: [
|
223080
|
+
{
|
223081
|
+
name: 'details',
|
223082
|
+
required: true,
|
223083
|
+
},
|
223084
|
+
{
|
223085
|
+
name: 'alias',
|
223086
|
+
required: true,
|
223087
|
+
},
|
223088
|
+
],
|
223089
|
+
options: [],
|
223090
|
+
examples: [],
|
223091
|
+
},
|
223092
|
+
{
|
223093
|
+
name: 'rm',
|
223094
|
+
description: 'Remove a DNS entry using its ID',
|
223095
|
+
arguments: [
|
223096
|
+
{
|
223097
|
+
name: 'id',
|
223098
|
+
required: true,
|
223099
|
+
},
|
223100
|
+
],
|
223101
|
+
options: [],
|
223102
|
+
examples: [],
|
223103
|
+
},
|
223104
|
+
],
|
223105
|
+
options: [
|
223106
|
+
{
|
223107
|
+
name: 'next',
|
223108
|
+
description: 'Show next page of results',
|
223109
|
+
argument: 'MS',
|
223110
|
+
shorthand: 'n',
|
223111
|
+
type: 'string',
|
223112
|
+
deprecated: false,
|
223113
|
+
multi: false,
|
223114
|
+
},
|
223115
|
+
{
|
223116
|
+
name: 'limit',
|
223117
|
+
shorthand: 'n',
|
223118
|
+
description: 'Number of results to return per page (default: 20, max: 100)',
|
223119
|
+
argument: 'NUMBER',
|
223120
|
+
type: 'string',
|
223121
|
+
deprecated: false,
|
223122
|
+
multi: false,
|
223123
|
+
},
|
223124
|
+
],
|
223125
|
+
examples: [
|
223126
|
+
{
|
223127
|
+
name: 'Add an A record for a subdomain',
|
223128
|
+
value: [
|
223129
|
+
`${pkg_name_1.packageName} dns add <DOMAIN> <SUBDOMAIN> <A | AAAA | ALIAS | CNAME | TXT> <VALUE>`,
|
223130
|
+
`${pkg_name_1.packageName} dns add zeit.rocks api A 198.51.100.100`,
|
223131
|
+
],
|
223132
|
+
},
|
223133
|
+
{
|
223134
|
+
name: 'Add an MX record (@ as a name refers to the domain)',
|
223135
|
+
value: [
|
223136
|
+
`${pkg_name_1.packageName} dns add <DOMAIN> '@' MX <RECORD VALUE> <PRIORITY>`,
|
223137
|
+
`${pkg_name_1.packageName} dns add zeit.rocks '@' MX mail.zeit.rocks 10`,
|
223138
|
+
],
|
223139
|
+
},
|
223140
|
+
{
|
223141
|
+
name: 'Add an SRV record',
|
223142
|
+
value: [
|
223143
|
+
`${pkg_name_1.packageName} dns add <DOMAIN> <NAME> SRV <PRIORITY> <WEIGHT> <PORT> <TARGET>`,
|
223144
|
+
`${pkg_name_1.packageName} dns add zeit.rocks '@' SRV 10 0 389 zeit.party`,
|
223145
|
+
],
|
223146
|
+
},
|
223147
|
+
{
|
223148
|
+
name: 'Add a CAA record',
|
223149
|
+
value: [
|
223150
|
+
`${pkg_name_1.packageName} dns add <DOMAIN> <NAME> CAA '<FLAGS> <TAG> "<VALUE>"'`,
|
223151
|
+
`${pkg_name_1.packageName} dns add zeit.rocks '@' CAA '0 issue "example.com"'`,
|
223152
|
+
],
|
223153
|
+
},
|
223154
|
+
{
|
223155
|
+
name: 'Import a Zone file',
|
223156
|
+
value: [
|
223157
|
+
`${pkg_name_1.packageName} dns import <DOMAIN> <FILE>`,
|
223158
|
+
`${pkg_name_1.packageName} dns import zeit.rocks ./zonefile.txt`,
|
223159
|
+
],
|
223160
|
+
},
|
223161
|
+
{
|
223162
|
+
name: 'Paginate results, where `1584722256178` is the time in milliseconds since the UNIX epoch.',
|
223163
|
+
value: [
|
223164
|
+
`${pkg_name_1.packageName} dns ls --next 1584722256178`,
|
223165
|
+
`${pkg_name_1.packageName} dns ls zeit.rocks --next 1584722256178`,
|
223166
|
+
],
|
223167
|
+
},
|
223168
|
+
],
|
223169
|
+
};
|
223170
|
+
|
223171
|
+
|
222892
223172
|
/***/ }),
|
222893
223173
|
|
222894
223174
|
/***/ 47626:
|
@@ -222941,78 +223221,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
222941
223221
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
222942
223222
|
};
|
222943
223223
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
222944
|
-
const chalk_1 = __importDefault(__webpack_require__(90877));
|
222945
223224
|
const get_args_1 = __importDefault(__webpack_require__(2505));
|
222946
223225
|
const get_subcommand_1 = __importDefault(__webpack_require__(66167));
|
222947
223226
|
const handle_error_1 = __importDefault(__webpack_require__(64377));
|
222948
|
-
const pkg_name_1 = __webpack_require__(79000);
|
222949
223227
|
const add_1 = __importDefault(__webpack_require__(25169));
|
222950
223228
|
const import_1 = __importDefault(__webpack_require__(47626));
|
222951
223229
|
const ls_1 = __importDefault(__webpack_require__(35789));
|
222952
223230
|
const rm_1 = __importDefault(__webpack_require__(42206));
|
222953
|
-
const
|
222954
|
-
|
222955
|
-
${chalk_1.default.bold(`${pkg_name_1.logo} ${pkg_name_1.packageName} dns`)} [options] <command>
|
222956
|
-
|
222957
|
-
${chalk_1.default.dim('Commands:')}
|
222958
|
-
|
222959
|
-
add [details] Add a new DNS entry (see below for examples)
|
222960
|
-
import [domain] [zonefile] Import a DNS zone file (see below for examples)
|
222961
|
-
rm [id] Remove a DNS entry using its ID
|
222962
|
-
ls [domain] List all DNS entries for a domain
|
222963
|
-
|
222964
|
-
${chalk_1.default.dim('Options:')}
|
222965
|
-
|
222966
|
-
-h, --help Output usage information
|
222967
|
-
-A ${chalk_1.default.bold.underline('FILE')}, --local-config=${chalk_1.default.bold.underline('FILE')} Path to the local ${'`vercel.json`'} file
|
222968
|
-
-Q ${chalk_1.default.bold.underline('DIR')}, --global-config=${chalk_1.default.bold.underline('DIR')} Path to the global ${'`.vercel`'} directory
|
222969
|
-
-d, --debug Debug mode [off]
|
222970
|
-
--no-color No color mode [off]
|
222971
|
-
-t ${chalk_1.default.bold.underline('TOKEN')}, --token=${chalk_1.default.bold.underline('TOKEN')} Login token
|
222972
|
-
-S, --scope Set a custom scope
|
222973
|
-
-N, --next Show next page of results
|
222974
|
-
--limit=${chalk_1.default.bold.underline('VALUE')} Number of results to return per page (default: 20, max: 100)
|
222975
|
-
|
222976
|
-
${chalk_1.default.dim('Examples:')}
|
222977
|
-
|
222978
|
-
${chalk_1.default.gray('–')} Add an A record for a subdomain
|
222979
|
-
|
222980
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add <DOMAIN> <SUBDOMAIN> <A | AAAA | ALIAS | CNAME | TXT> <VALUE>`)}
|
222981
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add zeit.rocks api A 198.51.100.100`)}
|
222982
|
-
|
222983
|
-
${chalk_1.default.gray('–')} Add an MX record (@ as a name refers to the domain)
|
222984
|
-
|
222985
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add <DOMAIN> '@' MX <RECORD VALUE> <PRIORITY>`)}
|
222986
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add zeit.rocks '@' MX mail.zeit.rocks 10`)}
|
222987
|
-
|
222988
|
-
${chalk_1.default.gray('–')} Add an SRV record
|
222989
|
-
|
222990
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add <DOMAIN> <NAME> SRV <PRIORITY> <WEIGHT> <PORT> <TARGET>`)}
|
222991
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add zeit.rocks '@' SRV 10 0 389 zeit.party`)}
|
222992
|
-
|
222993
|
-
${chalk_1.default.gray('–')} Add a CAA record
|
222994
|
-
|
222995
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add <DOMAIN> <NAME> CAA '<FLAGS> <TAG> "<VALUE>"'`)}
|
222996
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add zeit.rocks '@' CAA '0 issue "example.com"'`)}
|
222997
|
-
|
222998
|
-
${chalk_1.default.gray('–')} Import a Zone file
|
222999
|
-
|
223000
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns import <DOMAIN> <FILE>`)}
|
223001
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns import zeit.rocks ./zonefile.txt`)}
|
223002
|
-
|
223003
|
-
${chalk_1.default.gray('–')} Paginate results, where ${chalk_1.default.dim('`1584722256178`')} is the time in milliseconds since the UNIX epoch.
|
223004
|
-
|
223005
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns ls --next 1584722256178`)}
|
223006
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns ls zeit.rocks --next 1584722256178`)}
|
223007
|
-
`);
|
223008
|
-
};
|
223231
|
+
const command_1 = __webpack_require__(5155);
|
223232
|
+
const help_1 = __webpack_require__(58219);
|
223009
223233
|
const COMMAND_CONFIG = {
|
223010
223234
|
add: ['add'],
|
223011
223235
|
import: ['import'],
|
223012
223236
|
ls: ['ls', 'list'],
|
223013
223237
|
rm: ['rm', 'remove'],
|
223014
223238
|
};
|
223015
|
-
async function
|
223239
|
+
async function dns(client) {
|
223016
223240
|
let argv;
|
223017
223241
|
try {
|
223018
223242
|
argv = (0, get_args_1.default)(client.argv.slice(2), {
|
@@ -223026,7 +223250,7 @@ async function main(client) {
|
|
223026
223250
|
return 1;
|
223027
223251
|
}
|
223028
223252
|
if (argv['--help']) {
|
223029
|
-
help();
|
223253
|
+
client.output.print((0, help_1.help)(command_1.dnsCommand, { columns: client.stderr.columns }));
|
223030
223254
|
return 2;
|
223031
223255
|
}
|
223032
223256
|
const { subcommand, args } = (0, get_subcommand_1.default)(argv._.slice(1), COMMAND_CONFIG);
|
@@ -223041,7 +223265,7 @@ async function main(client) {
|
|
223041
223265
|
return (0, ls_1.default)(client, argv, args);
|
223042
223266
|
}
|
223043
223267
|
}
|
223044
|
-
exports.default =
|
223268
|
+
exports.default = dns;
|
223045
223269
|
|
223046
223270
|
|
223047
223271
|
/***/ }),
|
@@ -229095,7 +229319,6 @@ const chars_1 = __importDefault(__webpack_require__(87280));
|
|
229095
229319
|
const table_1 = __importDefault(__webpack_require__(27474));
|
229096
229320
|
const get_user_1 = __importDefault(__webpack_require__(78871));
|
229097
229321
|
const get_teams_1 = __importDefault(__webpack_require__(15854));
|
229098
|
-
const get_prefixed_flags_1 = __importDefault(__webpack_require__(31354));
|
229099
229322
|
const pkg_name_1 = __webpack_require__(79000);
|
229100
229323
|
const get_command_flags_1 = __importDefault(__webpack_require__(98395));
|
229101
229324
|
const cmd_1 = __importDefault(__webpack_require__(62422));
|
@@ -229155,8 +229378,7 @@ async function list(client) {
|
|
229155
229378
|
console.log(); // empty line
|
229156
229379
|
(0, table_1.default)(['', 'id', 'email / name'], teamList.map(team => [team.current, team.value, team.name]), [1, 5]);
|
229157
229380
|
if (pagination?.count === 20) {
|
229158
|
-
const
|
229159
|
-
const flags = (0, get_command_flags_1.default)(prefixedArgs, ['_', '--next', '-N', '-d']);
|
229381
|
+
const flags = (0, get_command_flags_1.default)(argv, ['_', '--next', '-N', '-d']);
|
229160
229382
|
const nextCmd = `${pkg_name_1.packageName} teams ls${flags} --next ${pagination.next}`;
|
229161
229383
|
console.log(); // empty line
|
229162
229384
|
output.log(`To display the next page run ${(0, cmd_1.default)(nextCmd)}`);
|
@@ -239116,7 +239338,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
239116
239338
|
exports.createProxy = void 0;
|
239117
239339
|
const http_1 = __webpack_require__(98605);
|
239118
239340
|
const node_fetch_1 = __webpack_require__(91596);
|
239119
|
-
const node_utils_1 = __webpack_require__(
|
239341
|
+
const node_utils_1 = __webpack_require__(95549);
|
239120
239342
|
const toHeaders = (0, node_utils_1.buildToHeaders)({ Headers: node_fetch_1.Headers });
|
239121
239343
|
function createProxy(client) {
|
239122
239344
|
return (0, http_1.createServer)(async (req, res) => {
|
@@ -239803,40 +240025,6 @@ function getPaginationOpts(opts) {
|
|
239803
240025
|
exports.getPaginationOpts = getPaginationOpts;
|
239804
240026
|
|
239805
240027
|
|
239806
|
-
/***/ }),
|
239807
|
-
|
239808
|
-
/***/ 31354:
|
239809
|
-
/***/ ((__unused_webpack_module, exports) => {
|
239810
|
-
|
239811
|
-
"use strict";
|
239812
|
-
|
239813
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
239814
|
-
/**
|
239815
|
-
* This function adds a prefix `-` or `--` to the flags
|
239816
|
-
* passed from the command line, because the package `mri`
|
239817
|
-
* used to extract the args removes them for some reason.
|
239818
|
-
*/
|
239819
|
-
function getPrefixedFlags(args) {
|
239820
|
-
const prefixedArgs = {};
|
239821
|
-
for (const arg in args) {
|
239822
|
-
if (arg === '_') {
|
239823
|
-
prefixedArgs[arg] = args[arg];
|
239824
|
-
}
|
239825
|
-
else {
|
239826
|
-
let prefix = '-';
|
239827
|
-
// Full form flags need two dashes, whereas one letter
|
239828
|
-
// flags need only one.
|
239829
|
-
if (arg.length > 1) {
|
239830
|
-
prefix = '--';
|
239831
|
-
}
|
239832
|
-
prefixedArgs[`${prefix}${arg}`] = args[arg];
|
239833
|
-
}
|
239834
|
-
}
|
239835
|
-
return prefixedArgs;
|
239836
|
-
}
|
239837
|
-
exports.default = getPrefixedFlags;
|
239838
|
-
|
239839
|
-
|
239840
240028
|
/***/ }),
|
239841
240029
|
|
239842
240030
|
/***/ 960:
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vercel",
|
3
|
-
"version": "32.0.
|
3
|
+
"version": "32.0.2",
|
4
4
|
"preferGlobal": true,
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"description": "The command-line interface for Vercel",
|
@@ -25,17 +25,17 @@
|
|
25
25
|
"@vercel/build-utils": "7.0.0",
|
26
26
|
"@vercel/go": "3.0.0",
|
27
27
|
"@vercel/hydrogen": "1.0.0",
|
28
|
-
"@vercel/next": "4.0.
|
29
|
-
"@vercel/node": "3.0.
|
28
|
+
"@vercel/next": "4.0.1",
|
29
|
+
"@vercel/node": "3.0.2",
|
30
30
|
"@vercel/python": "4.0.0",
|
31
31
|
"@vercel/redwood": "2.0.0",
|
32
|
-
"@vercel/remix-builder": "2.0.
|
32
|
+
"@vercel/remix-builder": "2.0.1",
|
33
33
|
"@vercel/ruby": "2.0.0",
|
34
|
-
"@vercel/static-build": "2.0.
|
34
|
+
"@vercel/static-build": "2.0.2"
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
37
|
"@alex_neo/jest-expect-message": "1.0.5",
|
38
|
-
"@edge-runtime/node-utils": "2.
|
38
|
+
"@edge-runtime/node-utils": "2.2.0",
|
39
39
|
"@next/env": "11.1.2",
|
40
40
|
"@sentry/node": "5.5.0",
|
41
41
|
"@sindresorhus/slugify": "0.11.0",
|
@@ -58,7 +58,6 @@
|
|
58
58
|
"@types/load-json-file": "2.0.7",
|
59
59
|
"@types/mime-types": "2.1.0",
|
60
60
|
"@types/minimatch": "3.0.3",
|
61
|
-
"@types/mri": "1.1.0",
|
62
61
|
"@types/ms": "0.7.30",
|
63
62
|
"@types/node": "14.18.33",
|
64
63
|
"@types/node-fetch": "2.5.10",
|
@@ -132,7 +131,6 @@
|
|
132
131
|
"load-json-file": "3.0.0",
|
133
132
|
"mime-types": "2.1.24",
|
134
133
|
"minimatch": "3.1.2",
|
135
|
-
"mri": "1.1.5",
|
136
134
|
"ms": "2.1.2",
|
137
135
|
"node-fetch": "2.6.7",
|
138
136
|
"npm-package-arg": "6.1.0",
|