vercel 32.0.0 → 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 +782 -393
- package/package.json +9 -11
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`);
|
@@ -219688,6 +219824,107 @@ const help = () => `
|
|
219688
219824
|
exports.help = help;
|
219689
219825
|
|
219690
219826
|
|
219827
|
+
/***/ }),
|
219828
|
+
|
219829
|
+
/***/ 92455:
|
219830
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
219831
|
+
|
219832
|
+
"use strict";
|
219833
|
+
|
219834
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
219835
|
+
exports.aliasCommand = void 0;
|
219836
|
+
const pkg_name_1 = __webpack_require__(79000);
|
219837
|
+
exports.aliasCommand = {
|
219838
|
+
name: 'alias',
|
219839
|
+
description: 'Interact with deployment aliases.',
|
219840
|
+
arguments: [
|
219841
|
+
{
|
219842
|
+
name: 'command',
|
219843
|
+
required: false,
|
219844
|
+
},
|
219845
|
+
],
|
219846
|
+
subcommands: [
|
219847
|
+
{
|
219848
|
+
name: 'ls',
|
219849
|
+
description: 'Show all aliases.',
|
219850
|
+
arguments: [],
|
219851
|
+
options: [],
|
219852
|
+
examples: [],
|
219853
|
+
},
|
219854
|
+
{
|
219855
|
+
name: 'set',
|
219856
|
+
description: 'Create a new alias',
|
219857
|
+
arguments: [
|
219858
|
+
{
|
219859
|
+
name: 'deployment',
|
219860
|
+
required: true,
|
219861
|
+
},
|
219862
|
+
{
|
219863
|
+
name: 'alias',
|
219864
|
+
required: true,
|
219865
|
+
},
|
219866
|
+
],
|
219867
|
+
options: [],
|
219868
|
+
examples: [],
|
219869
|
+
},
|
219870
|
+
{
|
219871
|
+
name: 'rm',
|
219872
|
+
description: 'Remove an alias using its hostname.',
|
219873
|
+
arguments: [
|
219874
|
+
{
|
219875
|
+
name: 'alias',
|
219876
|
+
required: true,
|
219877
|
+
},
|
219878
|
+
],
|
219879
|
+
options: [],
|
219880
|
+
examples: [],
|
219881
|
+
},
|
219882
|
+
],
|
219883
|
+
options: [
|
219884
|
+
{
|
219885
|
+
name: 'next',
|
219886
|
+
description: 'Show next page of results',
|
219887
|
+
argument: 'MS',
|
219888
|
+
shorthand: 'n',
|
219889
|
+
type: 'string',
|
219890
|
+
deprecated: false,
|
219891
|
+
multi: false,
|
219892
|
+
},
|
219893
|
+
{
|
219894
|
+
name: 'yes',
|
219895
|
+
description: 'Skip the confirmation prompt when removing an alias',
|
219896
|
+
shorthand: 'y',
|
219897
|
+
type: 'boolean',
|
219898
|
+
deprecated: false,
|
219899
|
+
multi: false,
|
219900
|
+
},
|
219901
|
+
{
|
219902
|
+
name: 'limit',
|
219903
|
+
shorthand: 'n',
|
219904
|
+
description: 'Number of results to return per page (default: 20, max: 100)',
|
219905
|
+
argument: 'NUMBER',
|
219906
|
+
type: 'string',
|
219907
|
+
deprecated: false,
|
219908
|
+
multi: false,
|
219909
|
+
},
|
219910
|
+
],
|
219911
|
+
examples: [
|
219912
|
+
{
|
219913
|
+
name: 'Add a new alias to `my-api.vercel.app`',
|
219914
|
+
value: `${pkg_name_1.packageName} alias set api-ownv3nc9f8.vercel.app my-api.vercel.app`,
|
219915
|
+
},
|
219916
|
+
{
|
219917
|
+
name: 'Custom domains work as alias targets',
|
219918
|
+
value: `${pkg_name_1.packageName} alias set api-ownv3nc9f8.vercel.app my-api.com`,
|
219919
|
+
},
|
219920
|
+
{
|
219921
|
+
name: 'The subcommand `set` is the default and can be skipped. Protocols in the URLs are unneeded and ignored',
|
219922
|
+
value: `${pkg_name_1.packageName} alias api-ownv3nc9f8.vercel.app my-api.com`,
|
219923
|
+
},
|
219924
|
+
],
|
219925
|
+
};
|
219926
|
+
|
219927
|
+
|
219691
219928
|
/***/ }),
|
219692
219929
|
|
219693
219930
|
/***/ 57725:
|
@@ -219699,58 +219936,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
219699
219936
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
219700
219937
|
};
|
219701
219938
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
219702
|
-
const chalk_1 = __importDefault(__webpack_require__(90877));
|
219703
219939
|
const error_1 = __webpack_require__(4400);
|
219704
219940
|
const get_args_1 = __importDefault(__webpack_require__(2505));
|
219705
219941
|
const get_subcommand_1 = __importDefault(__webpack_require__(66167));
|
219706
|
-
const
|
219942
|
+
const help_1 = __webpack_require__(58219);
|
219707
219943
|
const ls_1 = __importDefault(__webpack_require__(74021));
|
219708
219944
|
const rm_1 = __importDefault(__webpack_require__(48863));
|
219709
219945
|
const set_1 = __importDefault(__webpack_require__(80734));
|
219710
|
-
const
|
219711
|
-
console.log(`
|
219712
|
-
${chalk_1.default.bold(`${pkg_name_1.logo} ${pkg_name_1.packageName} alias`)} [options] <command>
|
219713
|
-
|
219714
|
-
${chalk_1.default.dim('Commands:')}
|
219715
|
-
|
219716
|
-
ls Show all aliases
|
219717
|
-
set <deployment> <alias> Create a new alias
|
219718
|
-
rm <alias> Remove an alias using its hostname
|
219719
|
-
|
219720
|
-
${chalk_1.default.dim('Options:')}
|
219721
|
-
|
219722
|
-
-h, --help Output usage information
|
219723
|
-
-A ${chalk_1.default.bold.underline('FILE')}, --local-config=${chalk_1.default.bold.underline('FILE')} Path to the local ${'`vercel.json`'} file
|
219724
|
-
-Q ${chalk_1.default.bold.underline('DIR')}, --global-config=${chalk_1.default.bold.underline('DIR')} Path to the global ${'`.vercel`'} directory
|
219725
|
-
-d, --debug Debug mode [off]
|
219726
|
-
--no-color No color mode [off]
|
219727
|
-
-t ${chalk_1.default.bold.underline('TOKEN')}, --token=${chalk_1.default.bold.underline('TOKEN')} Login token
|
219728
|
-
-S, --scope Set a custom scope
|
219729
|
-
-N, --next Show next page of results
|
219730
|
-
-y, --yes Skip the confirmation prompt when removing an alias
|
219731
|
-
--limit=${chalk_1.default.bold.underline('VALUE')} Number of results to return per page (default: 20, max: 100)
|
219732
|
-
|
219733
|
-
${chalk_1.default.dim('Examples:')}
|
219734
|
-
|
219735
|
-
${chalk_1.default.gray('–')} Add a new alias to ${chalk_1.default.underline('my-api.vercel.app')}
|
219736
|
-
|
219737
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} alias set ${chalk_1.default.underline('api-ownv3nc9f8.vercel.app')} ${chalk_1.default.underline('my-api.vercel.app')}`)}
|
219738
|
-
|
219739
|
-
Custom domains work as alias targets
|
219740
|
-
|
219741
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} alias set ${chalk_1.default.underline('api-ownv3nc9f8.vercel.app')} ${chalk_1.default.underline('my-api.com')}`)}
|
219742
|
-
|
219743
|
-
${chalk_1.default.dim('–')} The subcommand ${chalk_1.default.dim('`set`')} is the default and can be skipped.
|
219744
|
-
${chalk_1.default.dim('–')} ${chalk_1.default.dim('Protocols')} in the URLs are unneeded and ignored.
|
219745
|
-
`);
|
219746
|
-
};
|
219946
|
+
const command_1 = __webpack_require__(92455);
|
219747
219947
|
const COMMAND_CONFIG = {
|
219748
219948
|
default: ['set'],
|
219749
219949
|
ls: ['ls', 'list'],
|
219750
219950
|
rm: ['rm', 'remove'],
|
219751
219951
|
set: ['set'],
|
219752
219952
|
};
|
219753
|
-
async function
|
219953
|
+
async function alias(client) {
|
219754
219954
|
let argv;
|
219755
219955
|
try {
|
219756
219956
|
argv = (0, get_args_1.default)(client.argv.slice(2), {
|
@@ -219767,7 +219967,7 @@ async function main(client) {
|
|
219767
219967
|
return 1;
|
219768
219968
|
}
|
219769
219969
|
if (argv['--help']) {
|
219770
|
-
help();
|
219970
|
+
client.output.print((0, help_1.help)(command_1.aliasCommand, { columns: client.stderr.columns }));
|
219771
219971
|
return 2;
|
219772
219972
|
}
|
219773
219973
|
const { subcommand, args } = (0, get_subcommand_1.default)(argv._.slice(1), COMMAND_CONFIG);
|
@@ -219780,7 +219980,7 @@ async function main(client) {
|
|
219780
219980
|
return (0, set_1.default)(client, argv, args);
|
219781
219981
|
}
|
219782
219982
|
}
|
219783
|
-
exports.default =
|
219983
|
+
exports.default = alias;
|
219784
219984
|
|
219785
219985
|
|
219786
219986
|
/***/ }),
|
@@ -221226,6 +221426,129 @@ async function add(client, opts, args) {
|
|
221226
221426
|
exports.default = add;
|
221227
221427
|
|
221228
221428
|
|
221429
|
+
/***/ }),
|
221430
|
+
|
221431
|
+
/***/ 19219:
|
221432
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
221433
|
+
|
221434
|
+
"use strict";
|
221435
|
+
|
221436
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
221437
|
+
exports.certsCommand = void 0;
|
221438
|
+
const pkg_name_1 = __webpack_require__(79000);
|
221439
|
+
exports.certsCommand = {
|
221440
|
+
name: 'certs',
|
221441
|
+
description: 'Interact with SSL certificates. This command is intended for advanced use only. By default, Vercel manages your certificates automatically.',
|
221442
|
+
arguments: [
|
221443
|
+
{
|
221444
|
+
name: 'command',
|
221445
|
+
required: false,
|
221446
|
+
},
|
221447
|
+
],
|
221448
|
+
subcommands: [
|
221449
|
+
{
|
221450
|
+
name: 'ls',
|
221451
|
+
description: 'Show all available certificates',
|
221452
|
+
arguments: [],
|
221453
|
+
options: [],
|
221454
|
+
examples: [],
|
221455
|
+
},
|
221456
|
+
{
|
221457
|
+
name: 'issue',
|
221458
|
+
description: ' Issue a new certificate for a domain',
|
221459
|
+
arguments: [
|
221460
|
+
{
|
221461
|
+
name: 'cn',
|
221462
|
+
required: true,
|
221463
|
+
},
|
221464
|
+
],
|
221465
|
+
options: [],
|
221466
|
+
examples: [],
|
221467
|
+
},
|
221468
|
+
{
|
221469
|
+
name: 'rm',
|
221470
|
+
description: 'Remove a certificate by id',
|
221471
|
+
arguments: [
|
221472
|
+
{
|
221473
|
+
name: 'id',
|
221474
|
+
required: true,
|
221475
|
+
},
|
221476
|
+
],
|
221477
|
+
options: [],
|
221478
|
+
examples: [],
|
221479
|
+
},
|
221480
|
+
],
|
221481
|
+
options: [
|
221482
|
+
{
|
221483
|
+
name: 'challenge-only',
|
221484
|
+
description: 'Only show challenges needed to issue a cert',
|
221485
|
+
shorthand: null,
|
221486
|
+
type: 'string',
|
221487
|
+
deprecated: false,
|
221488
|
+
multi: false,
|
221489
|
+
},
|
221490
|
+
{
|
221491
|
+
name: 'crt',
|
221492
|
+
description: 'Certificate file',
|
221493
|
+
argument: 'FILE',
|
221494
|
+
shorthand: null,
|
221495
|
+
type: 'string',
|
221496
|
+
deprecated: false,
|
221497
|
+
multi: false,
|
221498
|
+
},
|
221499
|
+
{
|
221500
|
+
name: 'key',
|
221501
|
+
description: 'Certificate key file',
|
221502
|
+
argument: 'FILE',
|
221503
|
+
shorthand: null,
|
221504
|
+
type: 'string',
|
221505
|
+
deprecated: false,
|
221506
|
+
multi: false,
|
221507
|
+
},
|
221508
|
+
{
|
221509
|
+
name: 'ca',
|
221510
|
+
description: 'CA certificate chain file',
|
221511
|
+
argument: 'FILE',
|
221512
|
+
shorthand: null,
|
221513
|
+
type: 'string',
|
221514
|
+
deprecated: false,
|
221515
|
+
multi: false,
|
221516
|
+
},
|
221517
|
+
{
|
221518
|
+
name: 'limit',
|
221519
|
+
description: 'Number of results to return per page (default: 20, max: 100)',
|
221520
|
+
argument: 'VALUE',
|
221521
|
+
shorthand: null,
|
221522
|
+
type: 'string',
|
221523
|
+
deprecated: false,
|
221524
|
+
multi: false,
|
221525
|
+
},
|
221526
|
+
{
|
221527
|
+
name: 'next',
|
221528
|
+
description: 'Show next page of results',
|
221529
|
+
shorthand: 'n',
|
221530
|
+
type: 'string',
|
221531
|
+
deprecated: false,
|
221532
|
+
multi: false,
|
221533
|
+
},
|
221534
|
+
],
|
221535
|
+
examples: [
|
221536
|
+
{
|
221537
|
+
name: 'Generate a certificate with the cnames "acme.com" and "www.acme.com"`',
|
221538
|
+
value: `${pkg_name_1.packageName} certs issue acme.com www.acme.com`,
|
221539
|
+
},
|
221540
|
+
{
|
221541
|
+
name: 'Remove a certificate',
|
221542
|
+
value: `${pkg_name_1.packageName} certs rm id`,
|
221543
|
+
},
|
221544
|
+
{
|
221545
|
+
name: 'Paginate results, where `1584722256178` is the time in milliseconds since the UNIX epoch.',
|
221546
|
+
value: `${pkg_name_1.packageName} certs ls --next 1584722256178`,
|
221547
|
+
},
|
221548
|
+
],
|
221549
|
+
};
|
221550
|
+
|
221551
|
+
|
221229
221552
|
/***/ }),
|
221230
221553
|
|
221231
221554
|
/***/ 1165:
|
@@ -221237,7 +221560,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
221237
221560
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
221238
221561
|
};
|
221239
221562
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
221240
|
-
const chalk_1 = __importDefault(__webpack_require__(90877));
|
221241
221563
|
// @ts-ignore
|
221242
221564
|
const error_1 = __webpack_require__(4400);
|
221243
221565
|
const get_args_1 = __importDefault(__webpack_require__(2505));
|
@@ -221246,51 +221568,8 @@ const add_1 = __importDefault(__webpack_require__(30033));
|
|
221246
221568
|
const issue_1 = __importDefault(__webpack_require__(14008));
|
221247
221569
|
const ls_1 = __importDefault(__webpack_require__(15922));
|
221248
221570
|
const rm_1 = __importDefault(__webpack_require__(55667));
|
221249
|
-
const
|
221250
|
-
const
|
221251
|
-
console.log(`
|
221252
|
-
${chalk_1.default.bold(`${pkg_name_1.logo} ${pkg_name_1.packageName} certs`)} [options] <command>
|
221253
|
-
|
221254
|
-
${chalk_1.default.yellow('NOTE:')} This command is intended for advanced use only.
|
221255
|
-
By default, Vercel manages your certificates automatically.
|
221256
|
-
|
221257
|
-
${chalk_1.default.dim('Commands:')}
|
221258
|
-
|
221259
|
-
ls Show all available certificates
|
221260
|
-
issue <cn> [<cn>] Issue a new certificate for a domain
|
221261
|
-
rm <id> Remove a certificate by id
|
221262
|
-
|
221263
|
-
${chalk_1.default.dim('Options:')}
|
221264
|
-
|
221265
|
-
-h, --help Output usage information
|
221266
|
-
-A ${chalk_1.default.bold.underline('FILE')}, --local-config=${chalk_1.default.bold.underline('FILE')} Path to the local ${'`vercel.json`'} file
|
221267
|
-
-Q ${chalk_1.default.bold.underline('DIR')}, --global-config=${chalk_1.default.bold.underline('DIR')} Path to the global ${'`.vercel`'} directory
|
221268
|
-
-d, --debug Debug mode [off]
|
221269
|
-
--no-color No color mode [off]
|
221270
|
-
-t ${chalk_1.default.bold.underline('TOKEN')}, --token=${chalk_1.default.bold.underline('TOKEN')} Login token
|
221271
|
-
-S, --scope Set a custom scope
|
221272
|
-
--challenge-only Only show challenges needed to issue a cert
|
221273
|
-
--crt ${chalk_1.default.bold.underline('FILE')} Certificate file
|
221274
|
-
--key ${chalk_1.default.bold.underline('FILE')} Certificate key file
|
221275
|
-
--ca ${chalk_1.default.bold.underline('FILE')} CA certificate chain file
|
221276
|
-
-N, --next Show next page of results
|
221277
|
-
--limit=${chalk_1.default.bold.underline('VALUE')} Number of results to return per page (default: 20, max: 100)
|
221278
|
-
|
221279
|
-
${chalk_1.default.dim('Examples:')}
|
221280
|
-
|
221281
|
-
${chalk_1.default.gray('–')} Generate a certificate with the cnames "acme.com" and "www.acme.com"
|
221282
|
-
|
221283
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} certs issue acme.com www.acme.com`)}
|
221284
|
-
|
221285
|
-
${chalk_1.default.gray('–')} Remove a certificate
|
221286
|
-
|
221287
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} certs rm id`)}
|
221288
|
-
|
221289
|
-
${chalk_1.default.gray('–')} Paginate results, where ${chalk_1.default.dim('`1584722256178`')} is the time in milliseconds since the UNIX epoch.
|
221290
|
-
|
221291
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} certs ls --next 1584722256178`)}
|
221292
|
-
`);
|
221293
|
-
};
|
221571
|
+
const command_1 = __webpack_require__(19219);
|
221572
|
+
const help_1 = __webpack_require__(58219);
|
221294
221573
|
const COMMAND_CONFIG = {
|
221295
221574
|
add: ['add'],
|
221296
221575
|
issue: ['issue'],
|
@@ -221318,7 +221597,7 @@ async function main(client) {
|
|
221318
221597
|
return 1;
|
221319
221598
|
}
|
221320
221599
|
if (argv['--help']) {
|
221321
|
-
help();
|
221600
|
+
client.output.print((0, help_1.help)(command_1.certsCommand, { columns: client.stderr.columns }));
|
221322
221601
|
return 2;
|
221323
221602
|
}
|
221324
221603
|
const { output } = client;
|
@@ -221337,7 +221616,7 @@ async function main(client) {
|
|
221337
221616
|
return 1;
|
221338
221617
|
default:
|
221339
221618
|
output.error('Please specify a valid subcommand: ls | issue | rm');
|
221340
|
-
help();
|
221619
|
+
client.output.print((0, help_1.help)(command_1.certsCommand, { columns: client.stderr.columns }));
|
221341
221620
|
return 2;
|
221342
221621
|
}
|
221343
221622
|
}
|
@@ -222746,6 +223025,150 @@ async function add(client, opts, args) {
|
|
222746
223025
|
exports.default = add;
|
222747
223026
|
|
222748
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
|
+
|
222749
223172
|
/***/ }),
|
222750
223173
|
|
222751
223174
|
/***/ 47626:
|
@@ -222798,78 +223221,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
222798
223221
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
222799
223222
|
};
|
222800
223223
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
222801
|
-
const chalk_1 = __importDefault(__webpack_require__(90877));
|
222802
223224
|
const get_args_1 = __importDefault(__webpack_require__(2505));
|
222803
223225
|
const get_subcommand_1 = __importDefault(__webpack_require__(66167));
|
222804
223226
|
const handle_error_1 = __importDefault(__webpack_require__(64377));
|
222805
|
-
const pkg_name_1 = __webpack_require__(79000);
|
222806
223227
|
const add_1 = __importDefault(__webpack_require__(25169));
|
222807
223228
|
const import_1 = __importDefault(__webpack_require__(47626));
|
222808
223229
|
const ls_1 = __importDefault(__webpack_require__(35789));
|
222809
223230
|
const rm_1 = __importDefault(__webpack_require__(42206));
|
222810
|
-
const
|
222811
|
-
|
222812
|
-
${chalk_1.default.bold(`${pkg_name_1.logo} ${pkg_name_1.packageName} dns`)} [options] <command>
|
222813
|
-
|
222814
|
-
${chalk_1.default.dim('Commands:')}
|
222815
|
-
|
222816
|
-
add [details] Add a new DNS entry (see below for examples)
|
222817
|
-
import [domain] [zonefile] Import a DNS zone file (see below for examples)
|
222818
|
-
rm [id] Remove a DNS entry using its ID
|
222819
|
-
ls [domain] List all DNS entries for a domain
|
222820
|
-
|
222821
|
-
${chalk_1.default.dim('Options:')}
|
222822
|
-
|
222823
|
-
-h, --help Output usage information
|
222824
|
-
-A ${chalk_1.default.bold.underline('FILE')}, --local-config=${chalk_1.default.bold.underline('FILE')} Path to the local ${'`vercel.json`'} file
|
222825
|
-
-Q ${chalk_1.default.bold.underline('DIR')}, --global-config=${chalk_1.default.bold.underline('DIR')} Path to the global ${'`.vercel`'} directory
|
222826
|
-
-d, --debug Debug mode [off]
|
222827
|
-
--no-color No color mode [off]
|
222828
|
-
-t ${chalk_1.default.bold.underline('TOKEN')}, --token=${chalk_1.default.bold.underline('TOKEN')} Login token
|
222829
|
-
-S, --scope Set a custom scope
|
222830
|
-
-N, --next Show next page of results
|
222831
|
-
--limit=${chalk_1.default.bold.underline('VALUE')} Number of results to return per page (default: 20, max: 100)
|
222832
|
-
|
222833
|
-
${chalk_1.default.dim('Examples:')}
|
222834
|
-
|
222835
|
-
${chalk_1.default.gray('–')} Add an A record for a subdomain
|
222836
|
-
|
222837
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add <DOMAIN> <SUBDOMAIN> <A | AAAA | ALIAS | CNAME | TXT> <VALUE>`)}
|
222838
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add zeit.rocks api A 198.51.100.100`)}
|
222839
|
-
|
222840
|
-
${chalk_1.default.gray('–')} Add an MX record (@ as a name refers to the domain)
|
222841
|
-
|
222842
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add <DOMAIN> '@' MX <RECORD VALUE> <PRIORITY>`)}
|
222843
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add zeit.rocks '@' MX mail.zeit.rocks 10`)}
|
222844
|
-
|
222845
|
-
${chalk_1.default.gray('–')} Add an SRV record
|
222846
|
-
|
222847
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add <DOMAIN> <NAME> SRV <PRIORITY> <WEIGHT> <PORT> <TARGET>`)}
|
222848
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add zeit.rocks '@' SRV 10 0 389 zeit.party`)}
|
222849
|
-
|
222850
|
-
${chalk_1.default.gray('–')} Add a CAA record
|
222851
|
-
|
222852
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add <DOMAIN> <NAME> CAA '<FLAGS> <TAG> "<VALUE>"'`)}
|
222853
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns add zeit.rocks '@' CAA '0 issue "example.com"'`)}
|
222854
|
-
|
222855
|
-
${chalk_1.default.gray('–')} Import a Zone file
|
222856
|
-
|
222857
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns import <DOMAIN> <FILE>`)}
|
222858
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns import zeit.rocks ./zonefile.txt`)}
|
222859
|
-
|
222860
|
-
${chalk_1.default.gray('–')} Paginate results, where ${chalk_1.default.dim('`1584722256178`')} is the time in milliseconds since the UNIX epoch.
|
222861
|
-
|
222862
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns ls --next 1584722256178`)}
|
222863
|
-
${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} dns ls zeit.rocks --next 1584722256178`)}
|
222864
|
-
`);
|
222865
|
-
};
|
223231
|
+
const command_1 = __webpack_require__(5155);
|
223232
|
+
const help_1 = __webpack_require__(58219);
|
222866
223233
|
const COMMAND_CONFIG = {
|
222867
223234
|
add: ['add'],
|
222868
223235
|
import: ['import'],
|
222869
223236
|
ls: ['ls', 'list'],
|
222870
223237
|
rm: ['rm', 'remove'],
|
222871
223238
|
};
|
222872
|
-
async function
|
223239
|
+
async function dns(client) {
|
222873
223240
|
let argv;
|
222874
223241
|
try {
|
222875
223242
|
argv = (0, get_args_1.default)(client.argv.slice(2), {
|
@@ -222883,7 +223250,7 @@ async function main(client) {
|
|
222883
223250
|
return 1;
|
222884
223251
|
}
|
222885
223252
|
if (argv['--help']) {
|
222886
|
-
help();
|
223253
|
+
client.output.print((0, help_1.help)(command_1.dnsCommand, { columns: client.stderr.columns }));
|
222887
223254
|
return 2;
|
222888
223255
|
}
|
222889
223256
|
const { subcommand, args } = (0, get_subcommand_1.default)(argv._.slice(1), COMMAND_CONFIG);
|
@@ -222898,7 +223265,7 @@ async function main(client) {
|
|
222898
223265
|
return (0, ls_1.default)(client, argv, args);
|
222899
223266
|
}
|
222900
223267
|
}
|
222901
|
-
exports.default =
|
223268
|
+
exports.default = dns;
|
222902
223269
|
|
222903
223270
|
|
222904
223271
|
/***/ }),
|
@@ -225068,7 +225435,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
225068
225435
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
225069
225436
|
};
|
225070
225437
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
225071
|
-
exports.help = exports.buildHelpOutput = exports.buildCommandExampleLines = exports.buildCommandOptionLines = exports.buildCommandSynopsisLine = exports.outputArrayToString = exports.lineToString = void 0;
|
225438
|
+
exports.help = exports.buildHelpOutput = exports.buildCommandExampleLines = exports.buildSubcommandLines = exports.buildCommandOptionLines = exports.buildCommandSynopsisLine = exports.outputArrayToString = exports.lineToString = void 0;
|
225072
225439
|
const chalk_1 = __importDefault(__webpack_require__(90877));
|
225073
225440
|
const constants_1 = __webpack_require__(98551);
|
225074
225441
|
const cli_table3_1 = __importDefault(__webpack_require__(47579));
|
@@ -225290,6 +225657,50 @@ function buildCommandOptionLines(commandOptions, options, sectionTitle) {
|
|
225290
225657
|
].join('');
|
225291
225658
|
}
|
225292
225659
|
exports.buildCommandOptionLines = buildCommandOptionLines;
|
225660
|
+
function buildSubcommandLines(subcommands, options) {
|
225661
|
+
if (!subcommands) {
|
225662
|
+
return null;
|
225663
|
+
}
|
225664
|
+
// word wrapping requires the wrapped cell to have a fixed width.
|
225665
|
+
// We need to track cell sizes to ensure the final column of cells is
|
225666
|
+
// equal to the remainder of unused horizontal space.
|
225667
|
+
let maxWidthOfUnwrappedColumns = 0;
|
225668
|
+
const rows = [];
|
225669
|
+
for (const command of subcommands) {
|
225670
|
+
const nameCell = `${INDENT}${command.name}`;
|
225671
|
+
let argsCell = INDENT;
|
225672
|
+
argsCell += command.arguments
|
225673
|
+
.map(arg => {
|
225674
|
+
return arg.required ? arg.name : `[${arg.name}]`;
|
225675
|
+
})
|
225676
|
+
.join(' ');
|
225677
|
+
argsCell += INDENT;
|
225678
|
+
const widthOfUnwrappedColumns = nameCell.length + argsCell.length;
|
225679
|
+
maxWidthOfUnwrappedColumns = Math.max(widthOfUnwrappedColumns, maxWidthOfUnwrappedColumns);
|
225680
|
+
rows.push([
|
225681
|
+
nameCell,
|
225682
|
+
argsCell,
|
225683
|
+
{
|
225684
|
+
content: command.description,
|
225685
|
+
wordWrap: true,
|
225686
|
+
},
|
225687
|
+
]);
|
225688
|
+
}
|
225689
|
+
const finalColumnWidth = options.columns - maxWidthOfUnwrappedColumns;
|
225690
|
+
const table = new cli_table3_1.default(Object.assign({}, tableOptions, {
|
225691
|
+
colWidths: [null, null, finalColumnWidth],
|
225692
|
+
}));
|
225693
|
+
table.push(...rows);
|
225694
|
+
return [
|
225695
|
+
`${INDENT}${chalk_1.default.dim('Commands')}:`,
|
225696
|
+
NEWLINE,
|
225697
|
+
NEWLINE,
|
225698
|
+
table.toString(),
|
225699
|
+
NEWLINE,
|
225700
|
+
NEWLINE,
|
225701
|
+
].join('');
|
225702
|
+
}
|
225703
|
+
exports.buildSubcommandLines = buildSubcommandLines;
|
225293
225704
|
function buildCommandExampleLines(command) {
|
225294
225705
|
const outputArray = [`${INDENT}${chalk_1.default.dim('Examples:')}`, ''];
|
225295
225706
|
for (const example of command.examples) {
|
@@ -225323,6 +225734,7 @@ function buildHelpOutput(command, options) {
|
|
225323
225734
|
'',
|
225324
225735
|
buildCommandSynopsisLine(command),
|
225325
225736
|
buildDescriptionLine(command, options),
|
225737
|
+
buildSubcommandLines(command.subcommands, options),
|
225326
225738
|
buildCommandOptionLines(command.options, options, 'Options'),
|
225327
225739
|
buildCommandOptionLines(globalCommandOptions, options, 'Global Options'),
|
225328
225740
|
buildCommandExampleLines(command),
|
@@ -227569,6 +227981,15 @@ exports.pullCommand = {
|
|
227569
227981
|
deprecated: false,
|
227570
227982
|
multi: false,
|
227571
227983
|
},
|
227984
|
+
{
|
227985
|
+
name: 'git-branch',
|
227986
|
+
description: 'Specify the Git branch to pull specific Environment Variables for',
|
227987
|
+
argument: 'branch',
|
227988
|
+
shorthand: null,
|
227989
|
+
type: 'string',
|
227990
|
+
deprecated: false,
|
227991
|
+
multi: false,
|
227992
|
+
},
|
227572
227993
|
{
|
227573
227994
|
name: 'yes',
|
227574
227995
|
description: 'Skip questions when setting up new project using default scope and settings',
|
@@ -227591,6 +228012,10 @@ exports.pullCommand = {
|
|
227591
228012
|
name: 'Pull for a specific environment',
|
227592
228013
|
value: `${pkg_name_1.packageName} pull --environment=${(0, env_target_1.getEnvTargetPlaceholder)()}`,
|
227593
228014
|
},
|
228015
|
+
{
|
228016
|
+
name: 'Pull for a preview feature branch',
|
228017
|
+
value: `${pkg_name_1.packageName} pull --environment=preview --git-branch=feature-branch`,
|
228018
|
+
},
|
227594
228019
|
{
|
227595
228020
|
name: 'If you want to download environment variables to a specific file, use `vercel env pull` instead',
|
227596
228021
|
value: `${pkg_name_1.packageName} env pull`,
|
@@ -228894,7 +229319,6 @@ const chars_1 = __importDefault(__webpack_require__(87280));
|
|
228894
229319
|
const table_1 = __importDefault(__webpack_require__(27474));
|
228895
229320
|
const get_user_1 = __importDefault(__webpack_require__(78871));
|
228896
229321
|
const get_teams_1 = __importDefault(__webpack_require__(15854));
|
228897
|
-
const get_prefixed_flags_1 = __importDefault(__webpack_require__(31354));
|
228898
229322
|
const pkg_name_1 = __webpack_require__(79000);
|
228899
229323
|
const get_command_flags_1 = __importDefault(__webpack_require__(98395));
|
228900
229324
|
const cmd_1 = __importDefault(__webpack_require__(62422));
|
@@ -228954,8 +229378,7 @@ async function list(client) {
|
|
228954
229378
|
console.log(); // empty line
|
228955
229379
|
(0, table_1.default)(['', 'id', 'email / name'], teamList.map(team => [team.current, team.value, team.name]), [1, 5]);
|
228956
229380
|
if (pagination?.count === 20) {
|
228957
|
-
const
|
228958
|
-
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']);
|
228959
229382
|
const nextCmd = `${pkg_name_1.packageName} teams ls${flags} --next ${pagination.next}`;
|
228960
229383
|
console.log(); // empty line
|
228961
229384
|
output.log(`To display the next page run ${(0, cmd_1.default)(nextCmd)}`);
|
@@ -238915,7 +239338,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
238915
239338
|
exports.createProxy = void 0;
|
238916
239339
|
const http_1 = __webpack_require__(98605);
|
238917
239340
|
const node_fetch_1 = __webpack_require__(91596);
|
238918
|
-
const node_utils_1 = __webpack_require__(
|
239341
|
+
const node_utils_1 = __webpack_require__(95549);
|
238919
239342
|
const toHeaders = (0, node_utils_1.buildToHeaders)({ Headers: node_fetch_1.Headers });
|
238920
239343
|
function createProxy(client) {
|
238921
239344
|
return (0, http_1.createServer)(async (req, res) => {
|
@@ -239602,40 +240025,6 @@ function getPaginationOpts(opts) {
|
|
239602
240025
|
exports.getPaginationOpts = getPaginationOpts;
|
239603
240026
|
|
239604
240027
|
|
239605
|
-
/***/ }),
|
239606
|
-
|
239607
|
-
/***/ 31354:
|
239608
|
-
/***/ ((__unused_webpack_module, exports) => {
|
239609
|
-
|
239610
|
-
"use strict";
|
239611
|
-
|
239612
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
239613
|
-
/**
|
239614
|
-
* This function adds a prefix `-` or `--` to the flags
|
239615
|
-
* passed from the command line, because the package `mri`
|
239616
|
-
* used to extract the args removes them for some reason.
|
239617
|
-
*/
|
239618
|
-
function getPrefixedFlags(args) {
|
239619
|
-
const prefixedArgs = {};
|
239620
|
-
for (const arg in args) {
|
239621
|
-
if (arg === '_') {
|
239622
|
-
prefixedArgs[arg] = args[arg];
|
239623
|
-
}
|
239624
|
-
else {
|
239625
|
-
let prefix = '-';
|
239626
|
-
// Full form flags need two dashes, whereas one letter
|
239627
|
-
// flags need only one.
|
239628
|
-
if (arg.length > 1) {
|
239629
|
-
prefix = '--';
|
239630
|
-
}
|
239631
|
-
prefixedArgs[`${prefix}${arg}`] = args[arg];
|
239632
|
-
}
|
239633
|
-
}
|
239634
|
-
return prefixedArgs;
|
239635
|
-
}
|
239636
|
-
exports.default = getPrefixedFlags;
|
239637
|
-
|
239638
|
-
|
239639
240028
|
/***/ }),
|
239640
240029
|
|
239641
240030
|
/***/ 960:
|