vercel 58.1.0 → 58.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{add-QKP6ZCHQ.js → add-IOYS5JE4.js} +10 -8
- package/dist/chunks/{add-WKV7KU4Y.js → add-JTIGJQ75.js} +12 -9
- package/dist/chunks/add-QKKUAXFL.js +187 -0
- package/dist/chunks/{build-ZXEK6YEA.js → build-ZHZDIIS5.js} +12 -9
- package/dist/chunks/{chunk-3YARBN7P.js → chunk-27FZN5LR.js} +4 -4
- package/dist/chunks/{chunk-4LSERVQQ.js → chunk-2ILCTO6A.js} +7 -5
- package/dist/chunks/{chunk-E4LXCO7U.js → chunk-2SFMOCWR.js} +1 -1
- package/dist/chunks/{chunk-NYURBHZJ.js → chunk-3KNPVXJ3.js} +1 -1
- package/dist/chunks/chunk-3ZE5CFVM.js +346 -0
- package/dist/chunks/{chunk-AX3N4MO2.js → chunk-4LDQIDRM.js} +1 -1
- package/dist/chunks/{chunk-LXA2GZ7U.js → chunk-4N7XLXM2.js} +1 -1
- package/dist/chunks/{chunk-75MDJ6TK.js → chunk-4UYKSYKQ.js} +1 -1
- package/dist/chunks/{chunk-JA3QX2H6.js → chunk-56QCZ4RL.js} +2 -2
- package/dist/chunks/{chunk-VSMCQSGH.js → chunk-7QVJTI5H.js} +1 -1
- package/dist/chunks/{chunk-TCBOCSWF.js → chunk-A5KP5HAI.js} +1 -1
- package/dist/chunks/{chunk-V6WHZAPP.js → chunk-AW5YINX6.js} +8 -4
- package/dist/chunks/{chunk-JNP3FQR3.js → chunk-AZS5CLCN.js} +1 -1
- package/dist/chunks/{chunk-NGYOR3MN.js → chunk-B3JTF4CF.js} +1 -1
- package/dist/chunks/{chunk-4QVAYRYH.js → chunk-BEQV3X2L.js} +16 -1
- package/dist/chunks/{chunk-552YY6QY.js → chunk-CAWBO7SQ.js} +10 -8
- package/dist/chunks/{chunk-TPB4F5XN.js → chunk-CSJBZKC5.js} +1 -1
- package/dist/chunks/{chunk-2D22CMQ7.js → chunk-DI54DSTV.js} +6 -4
- package/dist/chunks/{chunk-CXICXWXJ.js → chunk-DXS2X7KK.js} +3 -3
- package/dist/chunks/{chunk-XAWGGWSG.js → chunk-EBLH23AQ.js} +2 -2
- package/dist/chunks/{chunk-OVW5WUCR.js → chunk-G47QOVJ7.js} +1 -1
- package/dist/chunks/{chunk-32IPC6RB.js → chunk-GFG6QDIE.js} +1 -1
- package/dist/chunks/{chunk-C267R2FA.js → chunk-GJ5DKYDQ.js} +5 -5
- package/dist/chunks/{chunk-OG7DIS52.js → chunk-IBSUQT6H.js} +1 -1
- package/dist/chunks/chunk-J6LK45HT.js +163 -0
- package/dist/chunks/{chunk-5AG7MR7W.js → chunk-JHIWAM64.js} +3 -3
- package/dist/chunks/{chunk-FBPCJV72.js → chunk-JLWQWYKO.js} +2 -2
- package/dist/chunks/{chunk-RL7X7JGK.js → chunk-KBEX5MYS.js} +1 -136
- package/dist/chunks/{chunk-LA3BQQQK.js → chunk-KT4XXKJK.js} +1 -1
- package/dist/chunks/{chunk-YITWM37U.js → chunk-KWOWGI7Z.js} +2 -2
- package/dist/chunks/{chunk-FR352QKR.js → chunk-M22O6CYY.js} +1 -1
- package/dist/chunks/{chunk-XTLNPNWY.js → chunk-MAHXF73X.js} +2 -2
- package/dist/chunks/{chunk-KY3ZOYJW.js → chunk-O5GNPPTU.js} +1 -1
- package/dist/chunks/{chunk-CSI7GEDD.js → chunk-OWY3MF3E.js} +2 -2
- package/dist/chunks/{chunk-DKS4XDVC.js → chunk-PVWXPWLQ.js} +7 -5
- package/dist/chunks/{chunk-XTQADJ6S.js → chunk-QTXQOWOJ.js} +3 -3
- package/dist/chunks/{chunk-TF627KEI.js → chunk-RQ7H43CJ.js} +1 -1
- package/dist/chunks/{chunk-U6PPDPR5.js → chunk-SOFC4MLS.js} +1 -0
- package/dist/chunks/{chunk-QCB22TQG.js → chunk-SWHPI3G7.js} +2 -2
- package/dist/chunks/{chunk-BAUVB2VF.js → chunk-U5E5J56I.js} +4 -4
- package/dist/chunks/{chunk-HXTQVMJZ.js → chunk-U7Y5DZXS.js} +2 -2
- package/dist/chunks/{chunk-6QUKJKFX.js → chunk-WUMURQKS.js} +393 -291
- package/dist/chunks/{chunk-4I7DTZAJ.js → chunk-XIG4GH62.js} +2 -2
- package/dist/chunks/chunk-XLKFJPMT.js +150 -0
- package/dist/chunks/{chunk-S7LXRKLD.js → chunk-Z5ZQJ5VJ.js} +14 -14
- package/dist/chunks/{chunk-KLNWR2JI.js → chunk-ZQR5RIAX.js} +10 -8
- package/dist/chunks/{chunk-P7IO46BQ.js → chunk-ZX2FSPWV.js} +2 -2
- package/dist/chunks/clear-R3DI3AA6.js +132 -0
- package/dist/chunks/{compile-vercel-config-AFGCQEYG.js → compile-vercel-config-NEC63GCN.js} +5 -4
- package/dist/chunks/{delete-UGSJQBE7.js → delete-BYB66ET3.js} +7 -6
- package/dist/chunks/{delete-Y5LNEZXI.js → delete-DIZK7FRU.js} +7 -6
- package/dist/chunks/{disable-IF3AHKJD.js → disable-HW6CHEVD.js} +7 -6
- package/dist/chunks/{discard-Y6GZBIHJ.js → discard-3UG4K6G2.js} +7 -6
- package/dist/chunks/{edit-HNMKZ3YT.js → edit-EY7LRITZ.js} +7 -6
- package/dist/chunks/{edit-6TGJKUI5.js → edit-LD5G6GL3.js} +8 -7
- package/dist/chunks/{enable-SE4QM4X3.js → enable-MDNLCSAW.js} +7 -6
- package/dist/chunks/{export-5AYL7HCJ.js → export-25X6M77L.js} +7 -6
- package/dist/chunks/{image-6BYNQVGW.js → image-YQWZLM6Z.js} +5 -5
- package/dist/chunks/{inspect-FGYXO4K5.js → inspect-73FISCNZ.js} +13 -11
- package/dist/chunks/{inspect-DPTRYDFH.js → inspect-H7GEYNIF.js} +8 -7
- package/dist/chunks/{inspect-LTHZUXA2.js → inspect-KYAB4F3P.js} +10 -8
- package/dist/chunks/{inspect-3KCFHDWA.js → inspect-QVI6UVBJ.js} +13 -10
- package/dist/chunks/{inspect-MA36GG73.js → inspect-R6ADYTPB.js} +10 -8
- package/dist/chunks/{list-OCW34SRV.js → list-FTNOS4FT.js} +8 -7
- package/dist/chunks/{list-VTQZSIIT.js → list-SDNYJJ4M.js} +8 -6
- package/dist/chunks/{list-BTOXZBQK.js → list-SRKON4E4.js} +13 -11
- package/dist/chunks/{login-VSXLK5ZU.js → login-7NR7N4ZF.js} +12 -9
- package/dist/chunks/{ls-DRI2AOFB.js → ls-BDLEGFY3.js} +14 -11
- package/dist/chunks/ls-NIEZW5O3.js +178 -0
- package/dist/chunks/{ls-3UA57DZZ.js → ls-PZHHHKZ7.js} +13 -11
- package/dist/chunks/{ls-ZBLTJ5RE.js → ls-T276Z2QR.js} +11 -9
- package/dist/chunks/{ls-76YTWNKD.js → ls-TWHG22W7.js} +11 -9
- package/dist/chunks/{open-DVKAE5HP.js → open-TNEPXGZK.js} +7 -6
- package/dist/chunks/permissions-KI2JGJSN.js +95 -0
- package/dist/chunks/{publish-F5C4ZA7M.js → publish-NBGFOHLV.js} +7 -6
- package/dist/chunks/{push-PKJFQTLO.js → push-SPPWXOAJ.js} +12 -9
- package/dist/chunks/{query-GT5LCT45.js → query-LS4PEYHG.js} +12 -10
- package/dist/chunks/{reorder-AQW4XFDS.js → reorder-UTQ632H5.js} +7 -6
- package/dist/chunks/{reply-FI7SADGU.js → reply-QFGX5YBV.js} +7 -6
- package/dist/chunks/{resolve-C5G7JJZJ.js → resolve-ZDO5BCI7.js} +7 -6
- package/dist/chunks/{restore-5TLSHQOS.js → restore-T77AKNZ2.js} +7 -6
- package/dist/chunks/{rm-L7OQPCIE.js → rm-3RTVWGWR.js} +13 -10
- package/dist/chunks/{rm-C37BHGQI.js → rm-D24FHFMF.js} +10 -8
- package/dist/chunks/{rm-2EN66OYO.js → rm-IQPLVKJR.js} +10 -8
- package/dist/chunks/rm-JTOFOKOZ.js +186 -0
- package/dist/chunks/{rule-inspect-V5DRHOTZ.js → rule-inspect-VVHTVTRD.js} +13 -11
- package/dist/chunks/{rules-5XEMLN5G.js → rules-EEWMLKRI.js} +8 -8
- package/dist/chunks/{schema-UEOZVBY5.js → schema-XLJLZ4OE.js} +11 -9
- package/dist/chunks/{tags-ZGANV4YD.js → tags-5DZYPJDP.js} +4 -4
- package/dist/chunks/{types-IKWGLSDF.js → types-QTOA2BTQ.js} +7 -5
- package/dist/chunks/{update-DHWSMSMS.js → update-YFXZDNIV.js} +10 -8
- package/dist/commands/build/index.js +15 -15
- package/dist/commands/deploy/index.js +28 -25
- package/dist/commands/dev/index.js +85 -17
- package/dist/commands/env/index.js +27 -24
- package/dist/commands/link/index.js +25 -22
- package/dist/commands/list/index.js +11 -9
- package/dist/commands-bulk.js +2980 -2156
- package/dist/help.js +1 -1
- package/dist/index.js +37 -34
- package/dist/version.mjs +1 -1
- package/package.json +41 -34
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
} from "./chunk-A3NYPUKZ.js";
|
|
17
17
|
import {
|
|
18
18
|
ellipsizeMiddle
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RQ7H43CJ.js";
|
|
20
20
|
import {
|
|
21
21
|
elapsed
|
|
22
22
|
} from "./chunk-VXYGCOKL.js";
|
|
23
23
|
import {
|
|
24
24
|
table
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KT4XXKJK.js";
|
|
26
26
|
import {
|
|
27
27
|
require_ms
|
|
28
28
|
} from "./chunk-GGP5R3FU.js";
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import {
|
|
8
|
+
arg_common_default
|
|
9
|
+
} from "./chunk-SOFC4MLS.js";
|
|
10
|
+
import {
|
|
11
|
+
__commonJS,
|
|
12
|
+
__toESM
|
|
13
|
+
} from "./chunk-TZ2YI2VH.js";
|
|
14
|
+
|
|
15
|
+
// ../../node_modules/.pnpm/arg@5.0.0/node_modules/arg/index.js
|
|
16
|
+
var require_arg = __commonJS({
|
|
17
|
+
"../../node_modules/.pnpm/arg@5.0.0/node_modules/arg/index.js"(exports, module) {
|
|
18
|
+
var flagSymbol = Symbol("arg flag");
|
|
19
|
+
var ArgError = class _ArgError extends Error {
|
|
20
|
+
constructor(msg, code) {
|
|
21
|
+
super(msg);
|
|
22
|
+
this.name = "ArgError";
|
|
23
|
+
this.code = code;
|
|
24
|
+
Object.setPrototypeOf(this, _ArgError.prototype);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
function arg2(opts, { argv = process.argv.slice(2), permissive = false, stopAtPositional = false } = {}) {
|
|
28
|
+
if (!opts) {
|
|
29
|
+
throw new ArgError("argument specification object is required", "ARG_CONFIG_NO_SPEC");
|
|
30
|
+
}
|
|
31
|
+
const result = { _: [] };
|
|
32
|
+
const aliases = {};
|
|
33
|
+
const handlers = {};
|
|
34
|
+
for (const key of Object.keys(opts)) {
|
|
35
|
+
if (!key) {
|
|
36
|
+
throw new ArgError("argument key cannot be an empty string", "ARG_CONFIG_EMPTY_KEY");
|
|
37
|
+
}
|
|
38
|
+
if (key[0] !== "-") {
|
|
39
|
+
throw new ArgError(`argument key must start with '-' but found: '${key}'`, "ARG_CONFIG_NONOPT_KEY");
|
|
40
|
+
}
|
|
41
|
+
if (key.length === 1) {
|
|
42
|
+
throw new ArgError(`argument key must have a name; singular '-' keys are not allowed: ${key}`, "ARG_CONFIG_NONAME_KEY");
|
|
43
|
+
}
|
|
44
|
+
if (typeof opts[key] === "string") {
|
|
45
|
+
aliases[key] = opts[key];
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
let type = opts[key];
|
|
49
|
+
let isFlag = false;
|
|
50
|
+
if (Array.isArray(type) && type.length === 1 && typeof type[0] === "function") {
|
|
51
|
+
const [fn] = type;
|
|
52
|
+
type = (value, name, prev = []) => {
|
|
53
|
+
prev.push(fn(value, name, prev[prev.length - 1]));
|
|
54
|
+
return prev;
|
|
55
|
+
};
|
|
56
|
+
isFlag = fn === Boolean || fn[flagSymbol] === true;
|
|
57
|
+
} else if (typeof type === "function") {
|
|
58
|
+
isFlag = type === Boolean || type[flagSymbol] === true;
|
|
59
|
+
} else {
|
|
60
|
+
throw new ArgError(`type missing or not a function or valid array type: ${key}`, "ARG_CONFIG_VAD_TYPE");
|
|
61
|
+
}
|
|
62
|
+
if (key[1] !== "-" && key.length > 2) {
|
|
63
|
+
throw new ArgError(`short argument keys (with a single hyphen) must have only one character: ${key}`, "ARG_CONFIG_SHORTOPT_TOOLONG");
|
|
64
|
+
}
|
|
65
|
+
handlers[key] = [type, isFlag];
|
|
66
|
+
}
|
|
67
|
+
for (let i = 0, len = argv.length; i < len; i++) {
|
|
68
|
+
const wholeArg = argv[i];
|
|
69
|
+
if (stopAtPositional && result._.length > 0) {
|
|
70
|
+
result._ = result._.concat(argv.slice(i));
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
if (wholeArg === "--") {
|
|
74
|
+
result._ = result._.concat(argv.slice(i + 1));
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
if (wholeArg.length > 1 && wholeArg[0] === "-") {
|
|
78
|
+
const separatedArguments = wholeArg[1] === "-" || wholeArg.length === 2 ? [wholeArg] : wholeArg.slice(1).split("").map((a) => `-${a}`);
|
|
79
|
+
for (let j = 0; j < separatedArguments.length; j++) {
|
|
80
|
+
const arg3 = separatedArguments[j];
|
|
81
|
+
const [originalArgName, argStr] = arg3[1] === "-" ? arg3.split(/=(.*)/, 2) : [arg3, void 0];
|
|
82
|
+
let argName = originalArgName;
|
|
83
|
+
while (argName in aliases) {
|
|
84
|
+
argName = aliases[argName];
|
|
85
|
+
}
|
|
86
|
+
if (!(argName in handlers)) {
|
|
87
|
+
if (permissive) {
|
|
88
|
+
result._.push(arg3);
|
|
89
|
+
continue;
|
|
90
|
+
} else {
|
|
91
|
+
throw new ArgError(`unknown or unexpected option: ${originalArgName}`, "ARG_UNKNOWN_OPTION");
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const [type, isFlag] = handlers[argName];
|
|
95
|
+
if (!isFlag && j + 1 < separatedArguments.length) {
|
|
96
|
+
throw new ArgError(`option requires argument (but was followed by another short argument): ${originalArgName}`, "ARG_MISSING_REQUIRED_SHORTARG");
|
|
97
|
+
}
|
|
98
|
+
if (isFlag) {
|
|
99
|
+
result[argName] = type(true, argName, result[argName]);
|
|
100
|
+
} else if (argStr === void 0) {
|
|
101
|
+
if (argv.length < i + 2 || argv[i + 1].length > 1 && argv[i + 1][0] === "-" && !(argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) && (type === Number || // eslint-disable-next-line no-undef
|
|
102
|
+
typeof BigInt !== "undefined" && type === BigInt))) {
|
|
103
|
+
const extended = originalArgName === argName ? "" : ` (alias for ${argName})`;
|
|
104
|
+
throw new ArgError(`option requires argument: ${originalArgName}${extended}`, "ARG_MISSING_REQUIRED_LONGARG");
|
|
105
|
+
}
|
|
106
|
+
result[argName] = type(argv[i + 1], argName, result[argName]);
|
|
107
|
+
++i;
|
|
108
|
+
} else {
|
|
109
|
+
result[argName] = type(argStr, argName, result[argName]);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
} else {
|
|
113
|
+
result._.push(wholeArg);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return result;
|
|
117
|
+
}
|
|
118
|
+
arg2.flag = (fn) => {
|
|
119
|
+
fn[flagSymbol] = true;
|
|
120
|
+
return fn;
|
|
121
|
+
};
|
|
122
|
+
arg2.COUNT = arg2.flag((v, name, existingCount) => (existingCount || 0) + 1);
|
|
123
|
+
arg2.ArgError = ArgError;
|
|
124
|
+
module.exports = arg2;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// src/util/get-args.ts
|
|
129
|
+
var import_arg = __toESM(require_arg(), 1);
|
|
130
|
+
function getArgs(argv, argsOptions, argOptions = {}) {
|
|
131
|
+
return (0, import_arg.default)(Object.assign({}, arg_common_default(), argsOptions), {
|
|
132
|
+
...argOptions,
|
|
133
|
+
argv
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function parseArguments(args, flagsSpecification, parserOptions = {}) {
|
|
137
|
+
const { _: positional, ...rest } = (0, import_arg.default)(
|
|
138
|
+
Object.assign({}, arg_common_default(), flagsSpecification),
|
|
139
|
+
{
|
|
140
|
+
...parserOptions,
|
|
141
|
+
argv: args
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
return { args: positional, flags: rest };
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export {
|
|
148
|
+
getArgs,
|
|
149
|
+
parseArguments
|
|
150
|
+
};
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
packageName,
|
|
13
13
|
stripSensitiveAuthArgs,
|
|
14
14
|
suggestionFlagTakesSeparateValue
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SOFC4MLS.js";
|
|
16
16
|
import {
|
|
17
17
|
require_dist
|
|
18
18
|
} from "./chunk-OX7KI3LF.js";
|
|
@@ -328,15 +328,15 @@ function outputAgentSuccess(client, payload, exitCode = 0) {
|
|
|
328
328
|
`);
|
|
329
329
|
process.exit(exitCode);
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function buildNextStepsForGlobalConfig(client) {
|
|
332
332
|
return [
|
|
333
333
|
{
|
|
334
|
-
command: buildCommandWithGlobalFlags(client.argv, "
|
|
335
|
-
when: "List
|
|
334
|
+
command: buildCommandWithGlobalFlags(client.argv, "global-config list"),
|
|
335
|
+
when: "List Global Config stores in the current team scope"
|
|
336
336
|
},
|
|
337
337
|
{
|
|
338
338
|
command: buildCommandWithGlobalFlags(client.argv, "teams switch"),
|
|
339
|
-
when: "Switch to the team that owns the
|
|
339
|
+
when: "Switch to the team that owns the Global Config"
|
|
340
340
|
},
|
|
341
341
|
{
|
|
342
342
|
command: buildCommandWithGlobalFlags(client.argv, "whoami"),
|
|
@@ -344,7 +344,7 @@ function buildNextStepsForEdgeConfig(client) {
|
|
|
344
344
|
}
|
|
345
345
|
];
|
|
346
346
|
}
|
|
347
|
-
var
|
|
347
|
+
var GLOBAL_CONFIG_NON_INTERACTIVE_HINT = "Global Config commands use your current team scope. Pass --scope or run `vercel teams switch` if the store is missing.";
|
|
348
348
|
var LIST_ERROR_HINT = "Project names are team-scoped. Use --scope when the project belongs to another team, or `list --all` to list deployments across all projects.";
|
|
349
349
|
function buildNextStepsForList(client, projectName) {
|
|
350
350
|
return [
|
|
@@ -414,10 +414,10 @@ function buildNextStepsForProjectSubcommands(client, variant) {
|
|
|
414
414
|
}
|
|
415
415
|
var PROJECT_SUBCOMMAND_ERROR_HINT = "If you use --cwd, ensure that folder is linked to the right project, or pass an explicit project name. Use --scope when the project belongs to another team.";
|
|
416
416
|
function resolveNonInteractiveDefaults(client, variant) {
|
|
417
|
-
if (variant === "
|
|
417
|
+
if (variant === "global-config") {
|
|
418
418
|
return {
|
|
419
|
-
next:
|
|
420
|
-
hint:
|
|
419
|
+
next: buildNextStepsForGlobalConfig(client),
|
|
420
|
+
hint: GLOBAL_CONFIG_NON_INTERACTIVE_HINT
|
|
421
421
|
};
|
|
422
422
|
}
|
|
423
423
|
if (variant === "list") {
|
|
@@ -465,18 +465,18 @@ function exitWithNonInteractiveError(client, err, exitCode = 1, options = {
|
|
|
465
465
|
}
|
|
466
466
|
const { variant } = options;
|
|
467
467
|
if (isLinkRequiredLike(err)) {
|
|
468
|
-
if (variant === "
|
|
468
|
+
if (variant === "global-config") {
|
|
469
469
|
writeAgentErrorPayloadAndExit(
|
|
470
470
|
client,
|
|
471
471
|
{
|
|
472
472
|
status: "error",
|
|
473
473
|
reason: "link_required",
|
|
474
474
|
message: err instanceof Error ? err.message : String(err),
|
|
475
|
-
next:
|
|
476
|
-
hint:
|
|
475
|
+
next: buildNextStepsForGlobalConfig(client),
|
|
476
|
+
hint: GLOBAL_CONFIG_NON_INTERACTIVE_HINT
|
|
477
477
|
},
|
|
478
478
|
exitCode,
|
|
479
|
-
"
|
|
479
|
+
"global-config"
|
|
480
480
|
);
|
|
481
481
|
return;
|
|
482
482
|
}
|
|
@@ -509,7 +509,7 @@ function exitWithNonInteractiveError(client, err, exitCode = 1, options = {
|
|
|
509
509
|
if (isAPIError(err)) {
|
|
510
510
|
const rawMessage = err.serverMessage || err.message;
|
|
511
511
|
const message = normalizeApiErrorText(rawMessage);
|
|
512
|
-
const reason = err.status === 403 ? "forbidden" : err.status === 401 ? "not_authorized" : err.status === 404 ? variant === "
|
|
512
|
+
const reason = err.status === 403 ? "forbidden" : err.status === 401 ? "not_authorized" : err.status === 404 ? variant === "global-config" ? "not_found" : "project_not_found" : err.status === 429 ? "rate_limited" : "api_error";
|
|
513
513
|
writeAgentErrorPayloadAndExit(
|
|
514
514
|
client,
|
|
515
515
|
{
|
|
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
writeProjectSettings
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-G47QOVJ7.js";
|
|
10
10
|
import {
|
|
11
11
|
autoInstallVercelPlugin
|
|
12
12
|
} from "./chunk-NJUPUGOE.js";
|
|
@@ -15,30 +15,32 @@ import {
|
|
|
15
15
|
} from "./chunk-64IF634X.js";
|
|
16
16
|
import {
|
|
17
17
|
ensureLink
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-27FZN5LR.js";
|
|
19
19
|
import {
|
|
20
20
|
pullCommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-56QCZ4RL.js";
|
|
22
22
|
import {
|
|
23
23
|
help
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ZX2FSPWV.js";
|
|
25
25
|
import {
|
|
26
26
|
VERCEL_DIR,
|
|
27
27
|
VERCEL_DIR_PROJECT,
|
|
28
28
|
envPullCommandLogic,
|
|
29
29
|
humanizePath,
|
|
30
30
|
parseTarget
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-PVWXPWLQ.js";
|
|
32
32
|
import {
|
|
33
33
|
TelemetryClient
|
|
34
34
|
} from "./chunk-ECCWJHC6.js";
|
|
35
35
|
import {
|
|
36
|
-
parseArguments,
|
|
37
36
|
printError
|
|
38
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-KBEX5MYS.js";
|
|
38
|
+
import {
|
|
39
|
+
parseArguments
|
|
40
|
+
} from "./chunk-XLKFJPMT.js";
|
|
39
41
|
import {
|
|
40
42
|
getFlagsSpecification
|
|
41
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-SOFC4MLS.js";
|
|
42
44
|
import {
|
|
43
45
|
emoji,
|
|
44
46
|
output_manager_default,
|
|
@@ -7,13 +7,13 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
noBorderChars,
|
|
9
9
|
require_cli_table3
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KT4XXKJK.js";
|
|
11
11
|
import {
|
|
12
12
|
require_dist
|
|
13
13
|
} from "./chunk-ECCWJHC6.js";
|
|
14
14
|
import {
|
|
15
15
|
globalCommandOptions
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SOFC4MLS.js";
|
|
17
17
|
import {
|
|
18
18
|
require_source
|
|
19
19
|
} from "./chunk-S7KYDPEM.js";
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import {
|
|
8
|
+
repositoryPermissionsClearPath
|
|
9
|
+
} from "./chunk-BEQV3X2L.js";
|
|
10
|
+
import {
|
|
11
|
+
emitVcrArgParseError,
|
|
12
|
+
handleVcrApiError,
|
|
13
|
+
requireVcrRepository,
|
|
14
|
+
resolveVcrScope,
|
|
15
|
+
validateVcrJsonOutput
|
|
16
|
+
} from "./chunk-QTXQOWOJ.js";
|
|
17
|
+
import "./chunk-G75NFPIT.js";
|
|
18
|
+
import "./chunk-BUZRVER7.js";
|
|
19
|
+
import "./chunk-XPKWKPWA.js";
|
|
20
|
+
import {
|
|
21
|
+
permissionsClearSubcommand
|
|
22
|
+
} from "./chunk-J6LK45HT.js";
|
|
23
|
+
import "./chunk-R6IGDGX3.js";
|
|
24
|
+
import "./chunk-PVWXPWLQ.js";
|
|
25
|
+
import "./chunk-ECCWJHC6.js";
|
|
26
|
+
import {
|
|
27
|
+
AGENT_REASON,
|
|
28
|
+
buildCommandWithYes,
|
|
29
|
+
outputAgentError
|
|
30
|
+
} from "./chunk-Z5ZQJ5VJ.js";
|
|
31
|
+
import {
|
|
32
|
+
printError
|
|
33
|
+
} from "./chunk-KBEX5MYS.js";
|
|
34
|
+
import {
|
|
35
|
+
parseArguments
|
|
36
|
+
} from "./chunk-XLKFJPMT.js";
|
|
37
|
+
import {
|
|
38
|
+
getFlagsSpecification,
|
|
39
|
+
isAPIError
|
|
40
|
+
} from "./chunk-SOFC4MLS.js";
|
|
41
|
+
import "./chunk-P4QNYOFB.js";
|
|
42
|
+
import "./chunk-52QYYTM5.js";
|
|
43
|
+
import {
|
|
44
|
+
output_manager_default
|
|
45
|
+
} from "./chunk-OX7KI3LF.js";
|
|
46
|
+
import "./chunk-GGP5R3FU.js";
|
|
47
|
+
import "./chunk-S7KYDPEM.js";
|
|
48
|
+
import "./chunk-TZ2YI2VH.js";
|
|
49
|
+
|
|
50
|
+
// src/commands/vcr/permissions/clear.ts
|
|
51
|
+
async function clear(client, argv, telemetry) {
|
|
52
|
+
let parsedArgs;
|
|
53
|
+
try {
|
|
54
|
+
parsedArgs = parseArguments(
|
|
55
|
+
argv,
|
|
56
|
+
getFlagsSpecification(permissionsClearSubcommand.options)
|
|
57
|
+
);
|
|
58
|
+
} catch (err) {
|
|
59
|
+
emitVcrArgParseError(client, err, "vcr permissions <repository> clear");
|
|
60
|
+
printError(err);
|
|
61
|
+
return 1;
|
|
62
|
+
}
|
|
63
|
+
const fr = validateVcrJsonOutput(client, parsedArgs.flags);
|
|
64
|
+
if (typeof fr === "number") {
|
|
65
|
+
return fr;
|
|
66
|
+
}
|
|
67
|
+
const repository = parsedArgs.args[0];
|
|
68
|
+
const project = parsedArgs.flags["--project"];
|
|
69
|
+
const skipConfirmation = Boolean(parsedArgs.flags["--yes"]);
|
|
70
|
+
telemetry.trackCliOptionProject(project);
|
|
71
|
+
telemetry.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
|
72
|
+
telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);
|
|
73
|
+
const missingRepository = requireVcrRepository(
|
|
74
|
+
client,
|
|
75
|
+
repository,
|
|
76
|
+
fr.jsonOutput,
|
|
77
|
+
"vcr permissions <repository> clear"
|
|
78
|
+
);
|
|
79
|
+
if (typeof missingRepository === "number") {
|
|
80
|
+
return missingRepository;
|
|
81
|
+
}
|
|
82
|
+
const scope = await resolveVcrScope(client, {
|
|
83
|
+
project,
|
|
84
|
+
jsonOutput: fr.jsonOutput
|
|
85
|
+
});
|
|
86
|
+
if (typeof scope === "number") {
|
|
87
|
+
return scope;
|
|
88
|
+
}
|
|
89
|
+
if (!skipConfirmation) {
|
|
90
|
+
outputAgentError(
|
|
91
|
+
client,
|
|
92
|
+
{
|
|
93
|
+
status: "error",
|
|
94
|
+
reason: AGENT_REASON.CONFIRMATION_REQUIRED,
|
|
95
|
+
message: "Clearing repository permissions removes access for every team. Re-run with --yes.",
|
|
96
|
+
next: [{ command: buildCommandWithYes(client.argv) }]
|
|
97
|
+
},
|
|
98
|
+
1
|
|
99
|
+
);
|
|
100
|
+
if (!await client.input.confirm(
|
|
101
|
+
`Remove access to ${repository} for all teams? They will no longer be able to pull its images.`,
|
|
102
|
+
false
|
|
103
|
+
)) {
|
|
104
|
+
output_manager_default.log("Canceled");
|
|
105
|
+
return 0;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const path = repositoryPermissionsClearPath(scope, repository);
|
|
109
|
+
output_manager_default.spinner("Clearing repository permissions...");
|
|
110
|
+
try {
|
|
111
|
+
await client.fetch(path, { method: "DELETE" });
|
|
112
|
+
if (fr.jsonOutput) {
|
|
113
|
+
client.stdout.write(
|
|
114
|
+
`${JSON.stringify({ repository, cleared: true }, null, 2)}
|
|
115
|
+
`
|
|
116
|
+
);
|
|
117
|
+
} else {
|
|
118
|
+
output_manager_default.success(`Cleared repository permissions for ${repository}`);
|
|
119
|
+
}
|
|
120
|
+
return 0;
|
|
121
|
+
} catch (err) {
|
|
122
|
+
if (isAPIError(err)) {
|
|
123
|
+
return handleVcrApiError(client, err, fr.jsonOutput);
|
|
124
|
+
}
|
|
125
|
+
throw err;
|
|
126
|
+
} finally {
|
|
127
|
+
output_manager_default.stopSpinner();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
export {
|
|
131
|
+
clear as default
|
|
132
|
+
};
|
|
@@ -11,11 +11,12 @@ import {
|
|
|
11
11
|
findSourceVercelConfigFile,
|
|
12
12
|
getVercelConfigPath,
|
|
13
13
|
normalizeConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PVWXPWLQ.js";
|
|
15
15
|
import "./chunk-ECCWJHC6.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-Z5ZQJ5VJ.js";
|
|
17
|
+
import "./chunk-KBEX5MYS.js";
|
|
18
|
+
import "./chunk-XLKFJPMT.js";
|
|
19
|
+
import "./chunk-SOFC4MLS.js";
|
|
19
20
|
import "./chunk-P4QNYOFB.js";
|
|
20
21
|
import "./chunk-52QYYTM5.js";
|
|
21
22
|
import "./chunk-OX7KI3LF.js";
|
|
@@ -15,23 +15,24 @@ import {
|
|
|
15
15
|
requireProjectContext,
|
|
16
16
|
resolveRoutes,
|
|
17
17
|
withGlobalFlags
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2ILCTO6A.js";
|
|
19
19
|
import {
|
|
20
20
|
deleteSubcommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-M22O6CYY.js";
|
|
22
22
|
import {
|
|
23
23
|
stamp_default
|
|
24
24
|
} from "./chunk-64IF634X.js";
|
|
25
25
|
import "./chunk-VXYGCOKL.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-PVWXPWLQ.js";
|
|
27
27
|
import "./chunk-ECCWJHC6.js";
|
|
28
28
|
import {
|
|
29
29
|
AGENT_REASON,
|
|
30
30
|
AGENT_STATUS,
|
|
31
31
|
outputAgentError
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-Z5ZQJ5VJ.js";
|
|
33
|
+
import "./chunk-KBEX5MYS.js";
|
|
34
|
+
import "./chunk-XLKFJPMT.js";
|
|
35
|
+
import "./chunk-SOFC4MLS.js";
|
|
35
36
|
import "./chunk-P4QNYOFB.js";
|
|
36
37
|
import "./chunk-52QYYTM5.js";
|
|
37
38
|
import {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
resolveCommentsScope,
|
|
14
14
|
threadNotFoundMessage,
|
|
15
15
|
toApiErrorParts
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JHIWAM64.js";
|
|
17
17
|
import {
|
|
18
18
|
canPrompt
|
|
19
19
|
} from "./chunk-2473DUBR.js";
|
|
@@ -25,17 +25,18 @@ import {
|
|
|
25
25
|
} from "./chunk-XPKWKPWA.js";
|
|
26
26
|
import {
|
|
27
27
|
deleteSubcommand
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-4LDQIDRM.js";
|
|
29
|
+
import "./chunk-PVWXPWLQ.js";
|
|
30
30
|
import "./chunk-ECCWJHC6.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-Z5ZQJ5VJ.js";
|
|
32
|
+
import "./chunk-KBEX5MYS.js";
|
|
32
33
|
import {
|
|
33
34
|
parseArguments
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-XLKFJPMT.js";
|
|
35
36
|
import {
|
|
36
37
|
getFlagsSpecification,
|
|
37
38
|
isAPIError
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-SOFC4MLS.js";
|
|
39
40
|
import "./chunk-P4QNYOFB.js";
|
|
40
41
|
import "./chunk-52QYYTM5.js";
|
|
41
42
|
import {
|
|
@@ -17,21 +17,22 @@ import {
|
|
|
17
17
|
requireProjectContext,
|
|
18
18
|
resolveRoute,
|
|
19
19
|
withGlobalFlags
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2ILCTO6A.js";
|
|
21
21
|
import {
|
|
22
22
|
disableSubcommand
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-M22O6CYY.js";
|
|
24
24
|
import {
|
|
25
25
|
stamp_default
|
|
26
26
|
} from "./chunk-64IF634X.js";
|
|
27
27
|
import "./chunk-VXYGCOKL.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-PVWXPWLQ.js";
|
|
29
29
|
import "./chunk-ECCWJHC6.js";
|
|
30
30
|
import {
|
|
31
31
|
outputAgentError
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-Z5ZQJ5VJ.js";
|
|
33
|
+
import "./chunk-KBEX5MYS.js";
|
|
34
|
+
import "./chunk-XLKFJPMT.js";
|
|
35
|
+
import "./chunk-SOFC4MLS.js";
|
|
35
36
|
import "./chunk-P4QNYOFB.js";
|
|
36
37
|
import "./chunk-52QYYTM5.js";
|
|
37
38
|
import {
|
|
@@ -17,21 +17,22 @@ import {
|
|
|
17
17
|
printDiffSummary,
|
|
18
18
|
requireProjectContext,
|
|
19
19
|
withGlobalFlags
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2ILCTO6A.js";
|
|
21
21
|
import {
|
|
22
22
|
discardSubcommand
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-M22O6CYY.js";
|
|
24
24
|
import {
|
|
25
25
|
stamp_default
|
|
26
26
|
} from "./chunk-64IF634X.js";
|
|
27
27
|
import "./chunk-VXYGCOKL.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-PVWXPWLQ.js";
|
|
29
29
|
import "./chunk-ECCWJHC6.js";
|
|
30
30
|
import {
|
|
31
31
|
outputAgentError
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-Z5ZQJ5VJ.js";
|
|
33
|
+
import "./chunk-KBEX5MYS.js";
|
|
34
|
+
import "./chunk-XLKFJPMT.js";
|
|
35
|
+
import "./chunk-SOFC4MLS.js";
|
|
35
36
|
import "./chunk-P4QNYOFB.js";
|
|
36
37
|
import "./chunk-52QYYTM5.js";
|
|
37
38
|
import {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
threadNotFoundMessage,
|
|
17
17
|
toApiErrorParts,
|
|
18
18
|
updateMessage
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JHIWAM64.js";
|
|
20
20
|
import "./chunk-2473DUBR.js";
|
|
21
21
|
import {
|
|
22
22
|
outputError
|
|
@@ -26,17 +26,18 @@ import {
|
|
|
26
26
|
} from "./chunk-XPKWKPWA.js";
|
|
27
27
|
import {
|
|
28
28
|
editSubcommand
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-4LDQIDRM.js";
|
|
30
|
+
import "./chunk-PVWXPWLQ.js";
|
|
31
31
|
import "./chunk-ECCWJHC6.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-Z5ZQJ5VJ.js";
|
|
33
|
+
import "./chunk-KBEX5MYS.js";
|
|
33
34
|
import {
|
|
34
35
|
parseArguments
|
|
35
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-XLKFJPMT.js";
|
|
36
37
|
import {
|
|
37
38
|
getFlagsSpecification,
|
|
38
39
|
isAPIError
|
|
39
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-SOFC4MLS.js";
|
|
40
41
|
import "./chunk-P4QNYOFB.js";
|
|
41
42
|
import "./chunk-52QYYTM5.js";
|
|
42
43
|
import {
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
printRouteConfig,
|
|
20
20
|
routingRuleToCurrentRoute,
|
|
21
21
|
runInteractiveEditLoop
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-AZS5CLCN.js";
|
|
23
23
|
import {
|
|
24
24
|
getRouteVersions
|
|
25
25
|
} from "./chunk-AHU7WNL2.js";
|
|
@@ -31,21 +31,22 @@ import {
|
|
|
31
31
|
resolveRoute,
|
|
32
32
|
shellQuoteRouteIdentifierForSuggestion,
|
|
33
33
|
withGlobalFlags
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-2ILCTO6A.js";
|
|
35
35
|
import {
|
|
36
36
|
editSubcommand
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-M22O6CYY.js";
|
|
38
38
|
import {
|
|
39
39
|
stamp_default
|
|
40
40
|
} from "./chunk-64IF634X.js";
|
|
41
41
|
import "./chunk-VXYGCOKL.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-PVWXPWLQ.js";
|
|
43
43
|
import "./chunk-ECCWJHC6.js";
|
|
44
44
|
import {
|
|
45
45
|
outputAgentError
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
46
|
+
} from "./chunk-Z5ZQJ5VJ.js";
|
|
47
|
+
import "./chunk-KBEX5MYS.js";
|
|
48
|
+
import "./chunk-XLKFJPMT.js";
|
|
49
|
+
import "./chunk-SOFC4MLS.js";
|
|
49
50
|
import "./chunk-P4QNYOFB.js";
|
|
50
51
|
import "./chunk-52QYYTM5.js";
|
|
51
52
|
import {
|