vercel 56.2.1 → 56.3.1
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-YIAPBLSF.js → add-ANWCBEDB.js} +10 -13
- package/dist/chunks/{add-ZAQLTF5W.js → add-FWXAFWCU.js} +9 -12
- package/dist/chunks/{chunk-52V5NDUN.js → chunk-26VWIAO5.js} +2 -2
- package/dist/chunks/{chunk-2I34TRQZ.js → chunk-2E3ZC3JA.js} +2 -2
- package/dist/chunks/{chunk-5AJNUXWP.js → chunk-3PKFXNJZ.js} +2 -4
- package/dist/chunks/{chunk-5OT26JZN.js → chunk-3VS4DTAU.js} +4 -6
- package/dist/chunks/{chunk-JJWESW5Y.js → chunk-4G6QZSBL.js} +2 -4
- package/dist/chunks/{chunk-GXBDQRHJ.js → chunk-4Z5LC2CI.js} +1 -1
- package/dist/chunks/{chunk-5HNYJHOB.js → chunk-5R5FS7WB.js} +1 -1
- package/dist/chunks/{chunk-CMJMYVQM.js → chunk-6OMC3HOW.js} +1 -1
- package/dist/chunks/{chunk-HIO4M75R.js → chunk-74TJ5D35.js} +8 -11
- package/dist/chunks/{chunk-EPBUWIAO.js → chunk-7ZECC3BE.js} +48 -24
- package/dist/chunks/{chunk-JF7LPEBD.js → chunk-AHSE4X6V.js} +1 -1
- package/dist/chunks/{chunk-7OJJKCSW.js → chunk-D7SLHLED.js} +6 -10
- package/dist/chunks/{chunk-QY63UKTP.js → chunk-DMSLNAVH.js} +2 -2
- package/dist/chunks/{chunk-75PKWYOS.js → chunk-ETWY3HX7.js} +99 -74
- package/dist/chunks/{chunk-MYD7N6MH.js → chunk-F3B65VPT.js} +13 -3
- package/dist/chunks/{chunk-RLJA2KI7.js → chunk-FYQPTH5C.js} +2 -4
- package/dist/chunks/{chunk-7C7MMT4J.js → chunk-GIL3VAUR.js} +2 -4
- package/dist/chunks/{chunk-6ZVIC6FL.js → chunk-IAEXF3FY.js} +8 -8
- package/dist/chunks/{chunk-DD6D5J7E.js → chunk-JAY74MG2.js} +9 -13
- package/dist/chunks/{chunk-KXVQEPTA.js → chunk-JEWA7HG3.js} +3 -5
- package/dist/chunks/{chunk-P6AK7SVK.js → chunk-KSSNLCL4.js} +360 -25
- package/dist/chunks/{chunk-HA7C7SDO.js → chunk-LHFNIZ2P.js} +2 -4
- package/dist/chunks/{chunk-YKJA5TVC.js → chunk-M5LOXLMK.js} +3 -5
- package/dist/chunks/{chunk-GPVU6JRS.js → chunk-NMAHBCNK.js} +9 -7
- package/dist/chunks/{chunk-QEEGXNFK.js → chunk-NZRWTCRM.js} +1 -1
- package/dist/chunks/{chunk-IDMKFYEA.js → chunk-OGG6UBXK.js} +2 -4
- package/dist/chunks/{chunk-DDEPCAGE.js → chunk-RGOP4OYL.js} +558 -164
- package/dist/chunks/{chunk-NULWLKT7.js → chunk-SAEAR237.js} +4 -4
- package/dist/chunks/{chunk-22GUZ5KG.js → chunk-STJJ3DFO.js} +2 -4
- package/dist/chunks/{chunk-EHTPDXTS.js → chunk-SZXT3PDQ.js} +3 -294
- package/dist/chunks/{chunk-CB3I3QIT.js → chunk-UDWRZXIT.js} +193 -85
- package/dist/chunks/{chunk-PASZMRTZ.js → chunk-UOB64NBX.js} +5 -5
- package/dist/chunks/{chunk-7TJLLZPN.js → chunk-VO6PK3ZA.js} +6 -10
- package/dist/chunks/{chunk-DREO3DFB.js → chunk-VZSZBD4V.js} +16 -6
- package/dist/chunks/{chunk-VOBBH2SB.js → chunk-W346YNDN.js} +0 -49
- package/dist/chunks/{chunk-UESEGACQ.js → chunk-XOED7Y6Z.js} +3 -3
- package/dist/chunks/{chunk-7S3QUMIG.js → chunk-YS6EDZHB.js} +3 -5
- package/dist/chunks/{chunk-4RGSUV5C.js → chunk-ZVLPUREX.js} +2 -2
- package/dist/chunks/{compile-vercel-config-4NKPN3EG.js → compile-vercel-config-ELXMKFUY.js} +4 -4
- package/dist/chunks/{delete-NCMDC3IU.js → delete-BO3RQ3F6.js} +14 -14
- package/dist/chunks/{disable-Z7DXY4AY.js → disable-WRXXRGYR.js} +14 -13
- package/dist/chunks/{discard-4ILK3ULP.js → discard-5XOTKSVP.js} +13 -12
- package/dist/chunks/{edit-ROJQCTWR.js → edit-ML2P3MKK.js} +17 -18
- package/dist/chunks/{enable-TAVCLAEC.js → enable-E5YCEICZ.js} +14 -13
- package/dist/chunks/{export-YTSIGJFX.js → export-EUFPKG5T.js} +15 -14
- package/dist/chunks/{image-LORSHERP.js → image-5WOBJQFO.js} +6 -8
- package/dist/chunks/{inspect-OHDU2SVS.js → inspect-7PJE37AJ.js} +8 -10
- package/dist/chunks/{inspect-L4UIWOXO.js → inspect-BX26XAK2.js} +11 -15
- package/dist/chunks/{inspect-A2X7RTP4.js → inspect-I3ZNL35B.js} +8 -10
- package/dist/chunks/{inspect-5C4UHSCT.js → inspect-W4SOI7QI.js} +10 -12
- package/dist/chunks/{list-FGVDMSFN.js → list-44G7AUFR.js} +8 -10
- package/dist/chunks/{list-P2B5MHON.js → list-VLFAOPR5.js} +10 -13
- package/dist/chunks/{login-4BK3VGII.js → login-CL57KXDR.js} +11 -14
- package/dist/chunks/{ls-WDRFGE2J.js → ls-42JFBIDV.js} +12 -15
- package/dist/chunks/{ls-YXKRRYTL.js → ls-EZRL6SGP.js} +10 -13
- package/dist/chunks/{ls-NU4D6TLG.js → ls-KIAXSLDB.js} +10 -13
- package/dist/chunks/{ls-RAC5LMTR.js → ls-VD2DNABR.js} +9 -12
- package/dist/chunks/{publish-DGF2TQCQ.js → publish-C3QAGQJ7.js} +13 -12
- package/dist/chunks/{query-NWW6RDHK.js → query-XC3Y3EBD.js} +10 -12
- package/dist/chunks/{reorder-TTZBKCEB.js → reorder-L56M5KP3.js} +17 -16
- package/dist/chunks/{restore-DG3LZMHQ.js → restore-E5LGXKS3.js} +19 -18
- package/dist/chunks/{rm-7WXXLTXF.js → rm-AG3FDPTQ.js} +10 -13
- package/dist/chunks/{rm-2VBE4C2V.js → rm-EF4HUVO2.js} +9 -12
- package/dist/chunks/{rm-U2DFRDKE.js → rm-KGRSF2OY.js} +8 -11
- package/dist/chunks/{rule-inspect-4NL3GGDB.js → rule-inspect-FRDI2PJF.js} +9 -12
- package/dist/chunks/{rules-DABNOUNG.js → rules-OEOYTZ6U.js} +9 -11
- package/dist/chunks/{schema-4RRRUUOO.js → schema-OEWP27BI.js} +11 -12
- package/dist/chunks/{tags-MLX3AHHK.js → tags-RUHWH6XO.js} +5 -7
- package/dist/chunks/{types-2TPA6J4G.js → types-QKLIFDDP.js} +5 -5
- package/dist/chunks/{update-YXH7WWTN.js → update-BEXGZY7H.js} +9 -12
- package/dist/commands/build/index.js +26 -31
- package/dist/commands/deploy/index.js +61 -77
- package/dist/commands/dev/index.js +193 -159
- package/dist/commands/env/index.js +70 -47
- package/dist/commands/link/index.js +25 -29
- package/dist/commands/list/index.js +13 -17
- package/dist/commands-bulk.js +637 -620
- package/dist/index.js +23 -25
- package/dist/version.mjs +1 -1
- package/package.json +21 -21
- package/dist/chunks/chunk-DWU7JOO6.js +0 -158
- package/dist/chunks/chunk-IC4YEIGW.js +0 -101
- package/dist/chunks/chunk-IMUF5MGV.js +0 -81
- package/dist/chunks/chunk-SGL3NMOP.js +0 -86
|
@@ -7,10 +7,12 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
LinkRequiredError,
|
|
9
9
|
ProjectNotFound,
|
|
10
|
+
getGlobalFlagsFromArgs,
|
|
10
11
|
isAPIError,
|
|
11
12
|
packageName,
|
|
12
|
-
stripSensitiveAuthArgs
|
|
13
|
-
|
|
13
|
+
stripSensitiveAuthArgs,
|
|
14
|
+
suggestionFlagTakesSeparateValue
|
|
15
|
+
} from "./chunk-KSSNLCL4.js";
|
|
14
16
|
import {
|
|
15
17
|
require_dist
|
|
16
18
|
} from "./chunk-OX7KI3LF.js";
|
|
@@ -38,7 +40,6 @@ var GLOBAL_FLAG_NAMES = /* @__PURE__ */ new Set([
|
|
|
38
40
|
"-T"
|
|
39
41
|
// --token/-t are intentionally excluded and stripped via stripSensitiveAuthArgs.
|
|
40
42
|
]);
|
|
41
|
-
var GLOBAL_FLAGS_BOOLEAN = /* @__PURE__ */ new Set(["--yes", "-y", "--non-interactive"]);
|
|
42
43
|
var GLOBAL_FLAG_SHORTHANDS = {
|
|
43
44
|
"-y": "--yes",
|
|
44
45
|
"-S": "--scope",
|
|
@@ -48,14 +49,17 @@ function canonicalGlobalFlagName(name) {
|
|
|
48
49
|
return GLOBAL_FLAG_SHORTHANDS[name] ?? name;
|
|
49
50
|
}
|
|
50
51
|
function getGlobalFlagsFromArgv(argv) {
|
|
51
|
-
const args =
|
|
52
|
+
const args = getGlobalFlagsFromArgs(argv.slice(2), {
|
|
53
|
+
preserveConfig: true,
|
|
54
|
+
preserveYes: true
|
|
55
|
+
});
|
|
52
56
|
const out = [];
|
|
53
57
|
for (let i = 0; i < args.length; i++) {
|
|
54
58
|
const arg = args[i];
|
|
55
59
|
const name = arg.startsWith("--") ? arg.split("=")[0] : arg;
|
|
56
60
|
if (GLOBAL_FLAG_NAMES.has(name)) {
|
|
57
61
|
out.push(arg);
|
|
58
|
-
const takesSeparateValue =
|
|
62
|
+
const takesSeparateValue = suggestionFlagTakesSeparateValue(name) && !arg.includes("=") && i + 1 < args.length && !args[i + 1].startsWith("-");
|
|
59
63
|
if (takesSeparateValue) {
|
|
60
64
|
out.push(args[i + 1]);
|
|
61
65
|
i++;
|
|
@@ -71,7 +75,7 @@ function omitGlobalFlagsFromArgs(args) {
|
|
|
71
75
|
const arg = safeArgs[i];
|
|
72
76
|
const name = arg.startsWith("--") ? arg.split("=")[0] : arg;
|
|
73
77
|
if (GLOBAL_FLAG_NAMES.has(name)) {
|
|
74
|
-
const skipSeparateValue =
|
|
78
|
+
const skipSeparateValue = suggestionFlagTakesSeparateValue(name) && !arg.includes("=") && i + 1 < safeArgs.length && !safeArgs[i + 1].startsWith("-");
|
|
75
79
|
if (skipSeparateValue) {
|
|
76
80
|
i++;
|
|
77
81
|
}
|
|
@@ -90,7 +94,16 @@ function buildIntegrationCommandTailFromArgv(argv) {
|
|
|
90
94
|
return omitGlobalFlagsFromArgs(args.slice(idx)).join(" ");
|
|
91
95
|
}
|
|
92
96
|
function buildCommandWithGlobalFlags(argv, commandTemplate, pkgName = packageName, options) {
|
|
93
|
-
let preserved =
|
|
97
|
+
let preserved = options?.globalFlags === "all" ? getGlobalFlagsFromArgs(argv.slice(2), {
|
|
98
|
+
preserveProject: options.preserveProject
|
|
99
|
+
}) : getGlobalFlagsFromArgv(argv);
|
|
100
|
+
if (options?.globalFlags !== "all" && options?.preserveProject) {
|
|
101
|
+
const globalArgs = getGlobalFlagsFromArgs(argv.slice(2));
|
|
102
|
+
const contextArgs = getGlobalFlagsFromArgs(argv.slice(2), {
|
|
103
|
+
preserveProject: true
|
|
104
|
+
});
|
|
105
|
+
preserved.push(...contextArgs.slice(globalArgs.length));
|
|
106
|
+
}
|
|
94
107
|
const exclude = new Set(
|
|
95
108
|
commandTemplate.split(/\s+/).filter((token) => token.startsWith("-")).map((token) => canonicalGlobalFlagName(token.split("=")[0]))
|
|
96
109
|
);
|
|
@@ -121,106 +134,108 @@ function buildCommandWithGlobalFlags(argv, commandTemplate, pkgName = packageNam
|
|
|
121
134
|
}
|
|
122
135
|
return `${base} ${preserved.join(" ")}`;
|
|
123
136
|
}
|
|
124
|
-
function
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
return stripSensitiveAuthArgs(args.slice(i));
|
|
137
|
+
function withGlobalFlags(client, commandTemplate, options = {}) {
|
|
138
|
+
return buildCommandWithGlobalFlags(
|
|
139
|
+
client.argv,
|
|
140
|
+
commandTemplate,
|
|
141
|
+
packageName,
|
|
142
|
+
{
|
|
143
|
+
globalFlags: "all",
|
|
144
|
+
preserveProject: options.preserveProject
|
|
145
|
+
}
|
|
146
|
+
);
|
|
136
147
|
}
|
|
137
|
-
function
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
148
|
+
function getPreservedArgsAfterEnvSubcommand(argv, subcommands, positionalCount) {
|
|
149
|
+
const args = stripSensitiveAuthArgs(argv.slice(2));
|
|
150
|
+
const envIdx = args.findIndex(
|
|
151
|
+
(arg, index) => arg === "env" && subcommands.includes(args[index + 1])
|
|
152
|
+
);
|
|
153
|
+
const subcommandIdx = envIdx + 1;
|
|
154
|
+
if (envIdx === -1) {
|
|
155
|
+
return args;
|
|
141
156
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
157
|
+
const preserved = [];
|
|
158
|
+
let positionals = 0;
|
|
159
|
+
let optionsEnded = false;
|
|
160
|
+
for (let i = subcommandIdx + 1; i < args.length; i++) {
|
|
161
|
+
const arg = args[i];
|
|
162
|
+
if (arg === "--" && !optionsEnded) {
|
|
163
|
+
optionsEnded = true;
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
if (!optionsEnded && arg.startsWith("-")) {
|
|
167
|
+
preserved.push(arg);
|
|
168
|
+
if (!arg.includes("=") && suggestionFlagTakesSeparateValue(arg) && i + 1 < args.length && !args[i + 1].startsWith("-")) {
|
|
169
|
+
preserved.push(args[++i]);
|
|
148
170
|
}
|
|
149
|
-
|
|
150
|
-
continue;
|
|
151
|
-
out.push(preserved[j]);
|
|
171
|
+
continue;
|
|
152
172
|
}
|
|
153
|
-
|
|
173
|
+
if (positionals < positionalCount) {
|
|
174
|
+
positionals++;
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
if (optionsEnded && !preserved.includes("--")) {
|
|
178
|
+
preserved.push("--");
|
|
179
|
+
}
|
|
180
|
+
preserved.push(arg);
|
|
154
181
|
}
|
|
182
|
+
return preserved;
|
|
183
|
+
}
|
|
184
|
+
function omitPreservedFlagsAlreadyInTemplate(args, commandTemplate) {
|
|
185
|
+
const templateFlags = new Set(
|
|
186
|
+
commandTemplate.split(/\s+/).filter((token) => token.startsWith("-")).map((token) => canonicalGlobalFlagName(token.split("=")[0]))
|
|
187
|
+
);
|
|
188
|
+
const out = [];
|
|
189
|
+
for (let i = 0; i < args.length; i++) {
|
|
190
|
+
const arg = args[i];
|
|
191
|
+
const name = arg.startsWith("-") ? arg.split("=")[0] : arg;
|
|
192
|
+
if (!templateFlags.has(canonicalGlobalFlagName(name))) {
|
|
193
|
+
out.push(arg);
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
if (!arg.includes("=") && suggestionFlagTakesSeparateValue(name) && i + 1 < args.length && !args[i + 1].startsWith("-")) {
|
|
197
|
+
i++;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return out;
|
|
201
|
+
}
|
|
202
|
+
function getPreservedArgsForEnvAdd(argv) {
|
|
203
|
+
return getPreservedArgsAfterEnvSubcommand(argv, ["add"], 3);
|
|
204
|
+
}
|
|
205
|
+
function buildEnvAddCommandWithPreservedArgs(argv, commandTemplate, pkgName = packageName) {
|
|
206
|
+
const preserved = omitPreservedFlagsAlreadyInTemplate(
|
|
207
|
+
getPreservedArgsForEnvAdd(argv),
|
|
208
|
+
commandTemplate
|
|
209
|
+
);
|
|
155
210
|
const base = `${pkgName} ${commandTemplate}`;
|
|
156
211
|
if (preserved.length === 0)
|
|
157
212
|
return base;
|
|
158
213
|
return `${base} ${preserved.join(" ")}`;
|
|
159
214
|
}
|
|
160
215
|
function getPreservedArgsForEnvPull(argv) {
|
|
161
|
-
|
|
162
|
-
const pullIdx = args.indexOf("pull");
|
|
163
|
-
if (pullIdx === -1 || args[pullIdx - 1] !== "env")
|
|
164
|
-
return stripSensitiveAuthArgs(args);
|
|
165
|
-
let i = pullIdx + 1;
|
|
166
|
-
if (i < args.length && !args[i].startsWith("-"))
|
|
167
|
-
i++;
|
|
168
|
-
return stripSensitiveAuthArgs(args.slice(i));
|
|
216
|
+
return getPreservedArgsAfterEnvSubcommand(argv, ["pull"], 1);
|
|
169
217
|
}
|
|
170
218
|
function getPreservedArgsForEnvRm(argv) {
|
|
171
|
-
|
|
172
|
-
const rmIdx = args.indexOf("rm");
|
|
173
|
-
if (rmIdx === -1 || args[rmIdx - 1] !== "env")
|
|
174
|
-
return stripSensitiveAuthArgs(args);
|
|
175
|
-
let i = rmIdx + 1;
|
|
176
|
-
let positionals = 0;
|
|
177
|
-
while (i < args.length && positionals < 3 && !args[i].startsWith("-")) {
|
|
178
|
-
positionals++;
|
|
179
|
-
i++;
|
|
180
|
-
}
|
|
181
|
-
return stripSensitiveAuthArgs(args.slice(i));
|
|
219
|
+
return getPreservedArgsAfterEnvSubcommand(argv, ["rm", "remove"], 3);
|
|
182
220
|
}
|
|
183
221
|
function buildEnvRmCommandWithPreservedArgs(argv, commandTemplate, pkgName = packageName) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
222
|
+
const preserved = omitPreservedFlagsAlreadyInTemplate(
|
|
223
|
+
getPreservedArgsForEnvRm(argv),
|
|
224
|
+
commandTemplate
|
|
225
|
+
);
|
|
188
226
|
const base = `${pkgName} ${commandTemplate}`;
|
|
189
227
|
if (preserved.length === 0)
|
|
190
228
|
return base;
|
|
191
229
|
return `${base} ${preserved.join(" ")}`;
|
|
192
230
|
}
|
|
193
231
|
function getPreservedArgsForEnvUpdate(argv) {
|
|
194
|
-
|
|
195
|
-
const updateIdx = args.indexOf("update");
|
|
196
|
-
if (updateIdx === -1 || args[updateIdx - 1] !== "env")
|
|
197
|
-
return stripSensitiveAuthArgs(args);
|
|
198
|
-
let i = updateIdx + 1;
|
|
199
|
-
let positionals = 0;
|
|
200
|
-
while (i < args.length && positionals < 3 && !args[i].startsWith("-")) {
|
|
201
|
-
positionals++;
|
|
202
|
-
i++;
|
|
203
|
-
}
|
|
204
|
-
return stripSensitiveAuthArgs(args.slice(i));
|
|
232
|
+
return getPreservedArgsAfterEnvSubcommand(argv, ["update"], 3);
|
|
205
233
|
}
|
|
206
234
|
function buildEnvUpdateCommandWithPreservedArgs(argv, commandTemplate, pkgName = packageName) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
if (commandTemplate.includes("--value")) {
|
|
212
|
-
const out = [];
|
|
213
|
-
for (let i = 0; i < preserved.length; i++) {
|
|
214
|
-
if (preserved[i] === "--value" && i + 1 < preserved.length) {
|
|
215
|
-
i++;
|
|
216
|
-
continue;
|
|
217
|
-
}
|
|
218
|
-
if (preserved[i].startsWith("--value="))
|
|
219
|
-
continue;
|
|
220
|
-
out.push(preserved[i]);
|
|
221
|
-
}
|
|
222
|
-
preserved = out;
|
|
223
|
-
}
|
|
235
|
+
const preserved = omitPreservedFlagsAlreadyInTemplate(
|
|
236
|
+
getPreservedArgsForEnvUpdate(argv),
|
|
237
|
+
commandTemplate
|
|
238
|
+
);
|
|
224
239
|
const base = `${pkgName} ${commandTemplate}`;
|
|
225
240
|
if (preserved.length === 0)
|
|
226
241
|
return base;
|
|
@@ -527,11 +542,101 @@ function openUrlInBrowserCommand(url) {
|
|
|
527
542
|
return `xdg-open '${url}'`;
|
|
528
543
|
}
|
|
529
544
|
|
|
545
|
+
// src/util/agent-output-constants.ts
|
|
546
|
+
var AGENT_STATUS = {
|
|
547
|
+
ERROR: "error",
|
|
548
|
+
ACTION_REQUIRED: "action_required",
|
|
549
|
+
OK: "ok"
|
|
550
|
+
};
|
|
551
|
+
var AGENT_REASON = {
|
|
552
|
+
// Common (use across dns, flags, routes, env, domains, link)
|
|
553
|
+
MISSING_ARGUMENTS: "missing_arguments",
|
|
554
|
+
INVALID_ARGUMENTS: "invalid_arguments",
|
|
555
|
+
CONFIRMATION_REQUIRED: "confirmation_required",
|
|
556
|
+
LOGIN_REQUIRED: "login_required",
|
|
557
|
+
PROJECT_SETTINGS_REQUIRED: "project_settings_required",
|
|
558
|
+
NOT_LINKED: "not_linked",
|
|
559
|
+
NOT_FOUND: "not_found",
|
|
560
|
+
PROJECT_NOT_FOUND: "project_not_found",
|
|
561
|
+
MISSING_SCOPE: "missing_scope",
|
|
562
|
+
SCOPE_NOT_ACCESSIBLE: "scope_not_accessible",
|
|
563
|
+
API_ERROR: "api_error",
|
|
564
|
+
// Flags
|
|
565
|
+
SEGMENT_IN_USE: "segment_in_use",
|
|
566
|
+
// Env
|
|
567
|
+
MISSING_REQUIREMENTS: "missing_requirements",
|
|
568
|
+
MISSING_NAME: "missing_name",
|
|
569
|
+
MISSING_VALUE: "missing_value",
|
|
570
|
+
MISSING_ENVIRONMENT: "missing_environment",
|
|
571
|
+
ENV_NOT_FOUND: "env_not_found",
|
|
572
|
+
MULTIPLE_ENVS: "multiple_envs",
|
|
573
|
+
ENV_FILE_EXISTS: "env_file_exists",
|
|
574
|
+
GIT_BRANCH_REQUIRED: "git_branch_required",
|
|
575
|
+
ENV_KEY_SENSITIVE: "env_key_sensitive",
|
|
576
|
+
// Routes
|
|
577
|
+
AMBIGUOUS_ROUTE: "ambiguous_route",
|
|
578
|
+
ROUTE_CREATE_FAILED: "route_create_failed",
|
|
579
|
+
ROUTE_GENERATION_FAILED: "route_generation_failed",
|
|
580
|
+
// DNS
|
|
581
|
+
DOMAIN_NOT_FOUND: "domain_not_found",
|
|
582
|
+
DNS_RECORD_NOT_FOUND: "dns_record_not_found",
|
|
583
|
+
INCOMPLETE_RECORD: "incomplete_record",
|
|
584
|
+
PERMISSION_DENIED: "permission_denied",
|
|
585
|
+
INVALID_PORT: "invalid_port",
|
|
586
|
+
INVALID_DNS_TYPE: "invalid_dns_type",
|
|
587
|
+
DNS_ADD_FAILED: "dns_add_failed",
|
|
588
|
+
INVALID_DOMAIN: "invalid_domain",
|
|
589
|
+
CONFIGURED_CORRECTLY: "configured_correctly",
|
|
590
|
+
VERIFICATION_NEEDED: "verification_needed",
|
|
591
|
+
INVALID_CONFIGURATION: "invalid_configuration",
|
|
592
|
+
DNS_CHANGE_REQUIRED: "dns_change_required",
|
|
593
|
+
DNS_CHANGE_RECOMMENDED: "dns_change_recommended",
|
|
594
|
+
DNSSEC_NEEDS_TO_BE_DISABLED: "dnssec_needs_to_be_disabled",
|
|
595
|
+
PROJECT_ATTACHMENT_RECOMMENDED: "project_attachment_recommended",
|
|
596
|
+
PROJECT_DOMAIN_MISSING: "project_domain_missing",
|
|
597
|
+
/** User must accept marketplace integration terms in the browser before install can continue. */
|
|
598
|
+
INTEGRATION_TERMS_ACCEPTANCE_REQUIRED: "integration_terms_acceptance_required",
|
|
599
|
+
/** Integration uninstall blocked because team-scoped resources still exist. */
|
|
600
|
+
HAS_RESOURCES: "has_resources",
|
|
601
|
+
/** User must claim a sandbox marketplace resource (e.g. Stripe, Shopify) in the browser. */
|
|
602
|
+
INTEGRATION_SANDBOX_CLAIM_REQUIRED: "integration_sandbox_claim_required",
|
|
603
|
+
// Tokens
|
|
604
|
+
CLASSIC_TOKEN_REQUIRED: "classic_token_required",
|
|
605
|
+
/** Classic token lacks full user/account scope (e.g. team- or product-scoped token). */
|
|
606
|
+
TOKEN_USER_SCOPE_REQUIRED: "token_user_scope_required",
|
|
607
|
+
// Webhooks
|
|
608
|
+
MISSING_URL: "missing_url",
|
|
609
|
+
MISSING_EVENTS: "missing_events",
|
|
610
|
+
INVALID_URL: "invalid_url",
|
|
611
|
+
INVALID_EVENT: "invalid_event",
|
|
612
|
+
// AI Gateway
|
|
613
|
+
INVALID_BUDGET: "invalid_budget",
|
|
614
|
+
INVALID_REFRESH_PERIOD: "invalid_refresh_period",
|
|
615
|
+
INVALID_EXPIRATION: "invalid_expiration",
|
|
616
|
+
/**
|
|
617
|
+
* Every selected agent needs explicit `--agent`/`--all` consent (see the
|
|
618
|
+
* payload's skipped[]). `--yes` does not grant it, so this is deliberately
|
|
619
|
+
* not `confirmation_required` — re-running with --yes would loop forever.
|
|
620
|
+
*/
|
|
621
|
+
REQUIRES_CONSENT: "requires_consent",
|
|
622
|
+
// Redirects
|
|
623
|
+
REDIRECT_NOT_FOUND: "redirect_not_found",
|
|
624
|
+
VERSION_NOT_FOUND: "version_not_found",
|
|
625
|
+
VERSION_ALREADY_LIVE: "version_already_live",
|
|
626
|
+
VERSION_IS_STAGING: "version_is_staging"
|
|
627
|
+
};
|
|
628
|
+
var AGENT_ACTION = {
|
|
629
|
+
MISSING_ARGUMENTS: "missing_arguments",
|
|
630
|
+
CONFIRMATION_REQUIRED: "confirmation_required",
|
|
631
|
+
LOGIN_REQUIRED: "login_required"
|
|
632
|
+
};
|
|
633
|
+
|
|
530
634
|
export {
|
|
531
635
|
buildCommandWithYes,
|
|
532
636
|
omitGlobalFlagsFromArgs,
|
|
533
637
|
buildIntegrationCommandTailFromArgv,
|
|
534
638
|
buildCommandWithGlobalFlags,
|
|
639
|
+
withGlobalFlags,
|
|
535
640
|
getPreservedArgsForEnvAdd,
|
|
536
641
|
buildEnvAddCommandWithPreservedArgs,
|
|
537
642
|
getPreservedArgsForEnvPull,
|
|
@@ -545,5 +650,8 @@ export {
|
|
|
545
650
|
outputAgentError,
|
|
546
651
|
outputAgentSuccess,
|
|
547
652
|
exitWithNonInteractiveError,
|
|
548
|
-
openUrlInBrowserCommand
|
|
653
|
+
openUrlInBrowserCommand,
|
|
654
|
+
AGENT_STATUS,
|
|
655
|
+
AGENT_REASON,
|
|
656
|
+
AGENT_ACTION
|
|
549
657
|
};
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
getLocalPathConfig,
|
|
9
9
|
isPromptBackError,
|
|
10
10
|
isPromptCanceledError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XOED7Y6Z.js";
|
|
12
12
|
import {
|
|
13
13
|
table
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NZRWTCRM.js";
|
|
15
15
|
import {
|
|
16
16
|
Separator,
|
|
17
17
|
VERCEL_DIR_PROJECT,
|
|
@@ -46,15 +46,15 @@ import {
|
|
|
46
46
|
selectAndParseRemoteUrl,
|
|
47
47
|
selectOrg,
|
|
48
48
|
writeServicesConfig
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-RGOP4OYL.js";
|
|
50
50
|
import {
|
|
51
51
|
printError
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-SZXT3PDQ.js";
|
|
53
53
|
import {
|
|
54
54
|
CantParseJSONFile,
|
|
55
55
|
ProjectNotFound,
|
|
56
56
|
isAPIError
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-KSSNLCL4.js";
|
|
58
58
|
import {
|
|
59
59
|
output_manager_default
|
|
60
60
|
} from "./chunk-OX7KI3LF.js";
|
|
@@ -10,25 +10,21 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
validateJsonOutput
|
|
12
12
|
} from "./chunk-XPKWKPWA.js";
|
|
13
|
-
import {
|
|
14
|
-
AGENT_REASON
|
|
15
|
-
} from "./chunk-IC4YEIGW.js";
|
|
16
|
-
import {
|
|
17
|
-
getScope
|
|
18
|
-
} from "./chunk-DWU7JOO6.js";
|
|
19
13
|
import {
|
|
20
14
|
getLinkedProject,
|
|
21
|
-
getProjectByNameOrId
|
|
22
|
-
|
|
15
|
+
getProjectByNameOrId,
|
|
16
|
+
getScope
|
|
17
|
+
} from "./chunk-RGOP4OYL.js";
|
|
23
18
|
import {
|
|
19
|
+
AGENT_REASON,
|
|
24
20
|
buildCommandWithGlobalFlags,
|
|
25
21
|
outputAgentError
|
|
26
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-UDWRZXIT.js";
|
|
27
23
|
import {
|
|
28
24
|
ProjectNotFound,
|
|
29
25
|
isAPIError,
|
|
30
26
|
packageName
|
|
31
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-KSSNLCL4.js";
|
|
32
28
|
import {
|
|
33
29
|
output_manager_default
|
|
34
30
|
} from "./chunk-OX7KI3LF.js";
|
|
@@ -5,11 +5,10 @@ const require = __createRequire(import.meta.url);
|
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
|
+
packageName,
|
|
9
|
+
projectOption,
|
|
8
10
|
yesOption
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
packageName
|
|
12
|
-
} from "./chunk-P6AK7SVK.js";
|
|
11
|
+
} from "./chunk-KSSNLCL4.js";
|
|
13
12
|
|
|
14
13
|
// src/commands/routes/command.ts
|
|
15
14
|
var listSubcommand = {
|
|
@@ -18,6 +17,7 @@ var listSubcommand = {
|
|
|
18
17
|
description: "List all routing rules for the current project. These routes apply to all deployments and environments.",
|
|
19
18
|
arguments: [],
|
|
20
19
|
options: [
|
|
20
|
+
projectOption,
|
|
21
21
|
{
|
|
22
22
|
name: "search",
|
|
23
23
|
description: "Search by name, description, source, or destination",
|
|
@@ -97,6 +97,7 @@ var listVersionsSubcommand = {
|
|
|
97
97
|
description: "List all versions of routing rules",
|
|
98
98
|
arguments: [],
|
|
99
99
|
options: [
|
|
100
|
+
projectOption,
|
|
100
101
|
{
|
|
101
102
|
name: "count",
|
|
102
103
|
description: "Number of versions to fetch (default: 20, max: 100)",
|
|
@@ -128,6 +129,7 @@ var inspectSubcommand = {
|
|
|
128
129
|
}
|
|
129
130
|
],
|
|
130
131
|
options: [
|
|
132
|
+
projectOption,
|
|
131
133
|
{
|
|
132
134
|
name: "diff",
|
|
133
135
|
description: "Compare staged changes against production for this route",
|
|
@@ -162,6 +164,7 @@ var addSubcommand = {
|
|
|
162
164
|
}
|
|
163
165
|
],
|
|
164
166
|
options: [
|
|
167
|
+
projectOption,
|
|
165
168
|
// Path & Matching
|
|
166
169
|
{
|
|
167
170
|
name: "src",
|
|
@@ -381,6 +384,7 @@ var publishSubcommand = {
|
|
|
381
384
|
description: "Publish staged routing changes to production",
|
|
382
385
|
arguments: [],
|
|
383
386
|
options: [
|
|
387
|
+
projectOption,
|
|
384
388
|
{
|
|
385
389
|
...yesOption,
|
|
386
390
|
description: "Skip the confirmation prompt when publishing"
|
|
@@ -408,6 +412,7 @@ var restoreSubcommand = {
|
|
|
408
412
|
}
|
|
409
413
|
],
|
|
410
414
|
options: [
|
|
415
|
+
projectOption,
|
|
411
416
|
{
|
|
412
417
|
...yesOption,
|
|
413
418
|
description: "Skip the confirmation prompt when restoring"
|
|
@@ -430,6 +435,7 @@ var discardSubcommand = {
|
|
|
430
435
|
description: "Discard staged routing changes",
|
|
431
436
|
arguments: [],
|
|
432
437
|
options: [
|
|
438
|
+
projectOption,
|
|
433
439
|
{
|
|
434
440
|
...yesOption,
|
|
435
441
|
description: "Skip the confirmation prompt when discarding"
|
|
@@ -458,6 +464,7 @@ var deleteSubcommand = {
|
|
|
458
464
|
}
|
|
459
465
|
],
|
|
460
466
|
options: [
|
|
467
|
+
projectOption,
|
|
461
468
|
{
|
|
462
469
|
...yesOption,
|
|
463
470
|
description: "Skip the confirmation prompt when deleting"
|
|
@@ -492,7 +499,7 @@ var enableSubcommand = {
|
|
|
492
499
|
required: true
|
|
493
500
|
}
|
|
494
501
|
],
|
|
495
|
-
options: [],
|
|
502
|
+
options: [projectOption],
|
|
496
503
|
examples: [
|
|
497
504
|
{
|
|
498
505
|
name: "Enable a route by name",
|
|
@@ -514,7 +521,7 @@ var disableSubcommand = {
|
|
|
514
521
|
required: true
|
|
515
522
|
}
|
|
516
523
|
],
|
|
517
|
-
options: [],
|
|
524
|
+
options: [projectOption],
|
|
518
525
|
examples: [
|
|
519
526
|
{
|
|
520
527
|
name: "Disable a route by name",
|
|
@@ -537,6 +544,7 @@ var reorderSubcommand = {
|
|
|
537
544
|
}
|
|
538
545
|
],
|
|
539
546
|
options: [
|
|
547
|
+
projectOption,
|
|
540
548
|
{
|
|
541
549
|
name: "position",
|
|
542
550
|
description: "Target position: start, end, a number (1-based), before:<id>, after:<id>",
|
|
@@ -598,6 +606,7 @@ var editSubcommand = {
|
|
|
598
606
|
}
|
|
599
607
|
],
|
|
600
608
|
options: [
|
|
609
|
+
projectOption,
|
|
601
610
|
// Metadata
|
|
602
611
|
{
|
|
603
612
|
name: "name",
|
|
@@ -836,6 +845,7 @@ var exportSubcommand = {
|
|
|
836
845
|
}
|
|
837
846
|
],
|
|
838
847
|
options: [
|
|
848
|
+
projectOption,
|
|
839
849
|
{
|
|
840
850
|
name: "output",
|
|
841
851
|
description: "Output file format: .json (default) or .ts",
|
|
@@ -4,18 +4,6 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import {
|
|
8
|
-
printProjectNotFoundError
|
|
9
|
-
} from "./chunk-IMUF5MGV.js";
|
|
10
|
-
import {
|
|
11
|
-
detectExplicitScope
|
|
12
|
-
} from "./chunk-DWU7JOO6.js";
|
|
13
|
-
import {
|
|
14
|
-
getLinkedProject
|
|
15
|
-
} from "./chunk-DDEPCAGE.js";
|
|
16
|
-
import {
|
|
17
|
-
omitGlobalFlagsFromArgs
|
|
18
|
-
} from "./chunk-CB3I3QIT.js";
|
|
19
7
|
import {
|
|
20
8
|
require_dist
|
|
21
9
|
} from "./chunk-OX7KI3LF.js";
|
|
@@ -311,48 +299,11 @@ function ellipsis(str, length) {
|
|
|
311
299
|
return str.length > length ? `${str.slice(0, length - 1)}\u2026` : str;
|
|
312
300
|
}
|
|
313
301
|
|
|
314
|
-
// src/util/projects/resolve-project-context.ts
|
|
315
|
-
function getInvokingCommandFromArgv(argv) {
|
|
316
|
-
const args = omitGlobalFlagsFromArgs(argv.slice(2));
|
|
317
|
-
const positionals = [];
|
|
318
|
-
for (const arg of args) {
|
|
319
|
-
if (arg.startsWith("-")) {
|
|
320
|
-
break;
|
|
321
|
-
}
|
|
322
|
-
positionals.push(arg);
|
|
323
|
-
}
|
|
324
|
-
return positionals.join(" ");
|
|
325
|
-
}
|
|
326
|
-
async function resolveProjectContext({
|
|
327
|
-
client,
|
|
328
|
-
cwd = client.cwd,
|
|
329
|
-
projectNameOrId,
|
|
330
|
-
commandName = ""
|
|
331
|
-
}) {
|
|
332
|
-
const context = await getLinkedProject(client, {
|
|
333
|
-
cwd,
|
|
334
|
-
projectName: projectNameOrId,
|
|
335
|
-
projectNameIsExplicit: Boolean(projectNameOrId),
|
|
336
|
-
scopeIsExplicit: detectExplicitScope(client)
|
|
337
|
-
});
|
|
338
|
-
if (context.status === "not_linked" && projectNameOrId) {
|
|
339
|
-
await printProjectNotFoundError(
|
|
340
|
-
client,
|
|
341
|
-
projectNameOrId,
|
|
342
|
-
commandName || getInvokingCommandFromArgv(client.argv),
|
|
343
|
-
context.orgId
|
|
344
|
-
);
|
|
345
|
-
return { status: "error", exitCode: 1, orgId: context.orgId };
|
|
346
|
-
}
|
|
347
|
-
return context;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
302
|
export {
|
|
351
303
|
readStandardInput,
|
|
352
304
|
CHECKBOX_INSTRUCTIONS,
|
|
353
305
|
getCustomEnvironments,
|
|
354
306
|
pickCustomEnvironment,
|
|
355
307
|
ellipsis,
|
|
356
|
-
resolveProjectContext,
|
|
357
308
|
require_dist2 as require_dist
|
|
358
309
|
};
|
|
@@ -7,15 +7,15 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
VERCEL_DIR,
|
|
9
9
|
isVercelTomlEnabled
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RGOP4OYL.js";
|
|
11
11
|
import {
|
|
12
12
|
parseArguments
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SZXT3PDQ.js";
|
|
14
14
|
import {
|
|
15
15
|
ConflictingConfigFiles,
|
|
16
16
|
DeprecatedNowJson,
|
|
17
17
|
InvalidLocalConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-KSSNLCL4.js";
|
|
19
19
|
|
|
20
20
|
// src/util/input/prompt-cancellation.ts
|
|
21
21
|
var PromptCanceledError = class extends Error {
|
|
@@ -6,15 +6,13 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
rulesAggregateCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-STJJ3DFO.js";
|
|
10
10
|
import {
|
|
11
11
|
formatOption,
|
|
12
12
|
limitOption,
|
|
13
|
+
packageName,
|
|
13
14
|
projectOption
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import {
|
|
16
|
-
packageName
|
|
17
|
-
} from "./chunk-P6AK7SVK.js";
|
|
15
|
+
} from "./chunk-KSSNLCL4.js";
|
|
18
16
|
|
|
19
17
|
// src/commands/alerts/command.ts
|
|
20
18
|
var listSubcommand = {
|
|
@@ -6,10 +6,10 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
table
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NZRWTCRM.js";
|
|
10
10
|
import {
|
|
11
11
|
require_strip_ansi
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SZXT3PDQ.js";
|
|
13
13
|
import {
|
|
14
14
|
require_source
|
|
15
15
|
} from "./chunk-S7KYDPEM.js";
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
findSourceVercelConfigFile,
|
|
12
12
|
getVercelConfigPath,
|
|
13
13
|
normalizeConfig
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-RGOP4OYL.js";
|
|
15
|
+
import "./chunk-UDWRZXIT.js";
|
|
16
16
|
import "./chunk-ECCWJHC6.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-SZXT3PDQ.js";
|
|
18
|
+
import "./chunk-KSSNLCL4.js";
|
|
19
19
|
import "./chunk-P4QNYOFB.js";
|
|
20
20
|
import "./chunk-52QYYTM5.js";
|
|
21
21
|
import "./chunk-OX7KI3LF.js";
|