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
package/dist/index.js
CHANGED
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
require_ci_info,
|
|
19
19
|
setAutoUpdate,
|
|
20
20
|
tryOpenApiFallback
|
|
21
|
-
} from "./chunks/chunk-
|
|
21
|
+
} from "./chunks/chunk-IAEXF3FY.js";
|
|
22
22
|
import {
|
|
23
23
|
getUpdateCommand
|
|
24
|
-
} from "./chunks/chunk-
|
|
24
|
+
} from "./chunks/chunk-26VWIAO5.js";
|
|
25
25
|
import {
|
|
26
26
|
Client,
|
|
27
27
|
getAuthConfigFilePath,
|
|
@@ -30,36 +30,34 @@ import {
|
|
|
30
30
|
readAuthConfigFile,
|
|
31
31
|
readConfigFile,
|
|
32
32
|
writeToConfigFile
|
|
33
|
-
} from "./chunks/chunk-
|
|
33
|
+
} from "./chunks/chunk-SAEAR237.js";
|
|
34
34
|
import {
|
|
35
35
|
highlight
|
|
36
36
|
} from "./chunks/chunk-V5P25P7F.js";
|
|
37
37
|
import {
|
|
38
38
|
commandNames,
|
|
39
39
|
commands
|
|
40
|
-
} from "./chunks/chunk-
|
|
41
|
-
import "./chunks/chunk-
|
|
42
|
-
import "./chunks/chunk-
|
|
43
|
-
import "./chunks/chunk-
|
|
44
|
-
import "./chunks/chunk-
|
|
45
|
-
import "./chunks/chunk-
|
|
46
|
-
import "./chunks/chunk-
|
|
47
|
-
import "./chunks/chunk-
|
|
48
|
-
import "./chunks/chunk-
|
|
49
|
-
import "./chunks/chunk-
|
|
50
|
-
import "./chunks/chunk-
|
|
40
|
+
} from "./chunks/chunk-7ZECC3BE.js";
|
|
41
|
+
import "./chunks/chunk-3VS4DTAU.js";
|
|
42
|
+
import "./chunks/chunk-GIL3VAUR.js";
|
|
43
|
+
import "./chunks/chunk-FYQPTH5C.js";
|
|
44
|
+
import "./chunks/chunk-4G6QZSBL.js";
|
|
45
|
+
import "./chunks/chunk-VZSZBD4V.js";
|
|
46
|
+
import "./chunks/chunk-3PKFXNJZ.js";
|
|
47
|
+
import "./chunks/chunk-YS6EDZHB.js";
|
|
48
|
+
import "./chunks/chunk-STJJ3DFO.js";
|
|
49
|
+
import "./chunks/chunk-OGG6UBXK.js";
|
|
50
|
+
import "./chunks/chunk-LHFNIZ2P.js";
|
|
51
51
|
import {
|
|
52
52
|
require_semver
|
|
53
53
|
} from "./chunks/chunk-IB5L4LKZ.js";
|
|
54
|
-
import "./chunks/chunk-
|
|
55
|
-
import "./chunks/chunk-
|
|
56
|
-
import "./chunks/chunk-
|
|
57
|
-
import "./chunks/chunk-
|
|
58
|
-
import {
|
|
59
|
-
getScope
|
|
60
|
-
} from "./chunks/chunk-DWU7JOO6.js";
|
|
54
|
+
import "./chunks/chunk-XOED7Y6Z.js";
|
|
55
|
+
import "./chunks/chunk-M5LOXLMK.js";
|
|
56
|
+
import "./chunks/chunk-DMSLNAVH.js";
|
|
57
|
+
import "./chunks/chunk-NZRWTCRM.js";
|
|
61
58
|
import {
|
|
62
59
|
getLinkFromDir,
|
|
60
|
+
getScope,
|
|
63
61
|
getTeams,
|
|
64
62
|
getUser,
|
|
65
63
|
getVercelDirectory,
|
|
@@ -68,8 +66,8 @@ import {
|
|
|
68
66
|
readJSONFile,
|
|
69
67
|
require_dist as require_dist2,
|
|
70
68
|
require_lib
|
|
71
|
-
} from "./chunks/chunk-
|
|
72
|
-
import "./chunks/chunk-
|
|
69
|
+
} from "./chunks/chunk-RGOP4OYL.js";
|
|
70
|
+
import "./chunks/chunk-UDWRZXIT.js";
|
|
73
71
|
import {
|
|
74
72
|
TelemetryClient,
|
|
75
73
|
TelemetryEventStore,
|
|
@@ -79,7 +77,7 @@ import {
|
|
|
79
77
|
getArgs,
|
|
80
78
|
parseArguments,
|
|
81
79
|
printError
|
|
82
|
-
} from "./chunks/chunk-
|
|
80
|
+
} from "./chunks/chunk-SZXT3PDQ.js";
|
|
83
81
|
import {
|
|
84
82
|
APIError,
|
|
85
83
|
CantFindConfig,
|
|
@@ -89,7 +87,7 @@ import {
|
|
|
89
87
|
cmd,
|
|
90
88
|
getCommandName,
|
|
91
89
|
getTitleName
|
|
92
|
-
} from "./chunks/chunk-
|
|
90
|
+
} from "./chunks/chunk-KSSNLCL4.js";
|
|
93
91
|
import {
|
|
94
92
|
pkg_default
|
|
95
93
|
} from "./chunks/chunk-P4QNYOFB.js";
|
package/dist/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "56.
|
|
1
|
+
export const version = "56.3.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vercel",
|
|
3
|
-
"version": "56.
|
|
3
|
+
"version": "56.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"preferGlobal": true,
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,29 +34,29 @@
|
|
|
34
34
|
"smol-toml": "1.5.2",
|
|
35
35
|
"undici": "5.29.0",
|
|
36
36
|
"zod": "4.1.11",
|
|
37
|
-
"@vercel/backends": "0.8.
|
|
38
|
-
"@vercel/build-utils": "13.
|
|
39
|
-
"@vercel/cli-config": "0.2.0",
|
|
37
|
+
"@vercel/backends": "0.8.25",
|
|
38
|
+
"@vercel/build-utils": "13.34.0",
|
|
40
39
|
"@vercel/cli-auth": "0.3.0",
|
|
41
|
-
"@vercel/
|
|
40
|
+
"@vercel/cli-config": "0.2.0",
|
|
42
41
|
"@vercel/detect-agent": "1.2.3",
|
|
43
|
-
"@vercel/
|
|
44
|
-
"@vercel/
|
|
42
|
+
"@vercel/container": "0.0.5",
|
|
43
|
+
"@vercel/elysia": "0.1.102",
|
|
44
|
+
"@vercel/express": "0.1.116",
|
|
45
|
+
"@vercel/fastify": "0.1.105",
|
|
45
46
|
"@vercel/go": "3.10.2",
|
|
46
|
-
"@vercel/
|
|
47
|
-
"@vercel/
|
|
47
|
+
"@vercel/hono": "0.2.105",
|
|
48
|
+
"@vercel/h3": "0.1.111",
|
|
48
49
|
"@vercel/hydrogen": "1.4.0",
|
|
49
|
-
"@vercel/
|
|
50
|
-
"@vercel/
|
|
51
|
-
"@vercel/koa": "0.1.84",
|
|
50
|
+
"@vercel/koa": "0.1.85",
|
|
51
|
+
"@vercel/node": "5.8.26",
|
|
52
52
|
"@vercel/next": "4.20.4",
|
|
53
|
-
"@vercel/
|
|
54
|
-
"@vercel/python": "6.50.0",
|
|
53
|
+
"@vercel/python": "6.51.0",
|
|
55
54
|
"@vercel/redwood": "2.5.0",
|
|
56
55
|
"@vercel/ruby": "2.5.1",
|
|
57
|
-
"@vercel/
|
|
58
|
-
"@vercel/static-build": "2.11.
|
|
59
|
-
"@vercel/
|
|
56
|
+
"@vercel/remix-builder": "5.9.1",
|
|
57
|
+
"@vercel/static-build": "2.11.8",
|
|
58
|
+
"@vercel/nestjs": "0.2.106",
|
|
59
|
+
"@vercel/rust": "1.4.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@edge-runtime/node-utils": "2.3.0",
|
|
@@ -181,12 +181,12 @@
|
|
|
181
181
|
"yauzl-promise": "2.1.3",
|
|
182
182
|
"@vercel-internals/constants": "1.0.4",
|
|
183
183
|
"@vercel-internals/get-package-json": "1.0.0",
|
|
184
|
-
"@vercel/
|
|
185
|
-
"@vercel/
|
|
186
|
-
"@vercel/fs-detectors": "6.13.1",
|
|
184
|
+
"@vercel-internals/types": "3.0.6",
|
|
185
|
+
"@vercel/client": "18.1.0",
|
|
187
186
|
"@vercel/frameworks": "3.30.7",
|
|
187
|
+
"@vercel/error-utils": "2.2.0",
|
|
188
188
|
"@vercel/routing-utils": "6.4.0",
|
|
189
|
-
"@vercel-
|
|
189
|
+
"@vercel/fs-detectors": "6.13.2"
|
|
190
190
|
},
|
|
191
191
|
"scripts": {
|
|
192
192
|
"test": "vitest run --config ./vitest.config.mts",
|
|
@@ -1,158 +0,0 @@
|
|
|
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
|
-
findProjectsFromPath,
|
|
9
|
-
getLinkFromDir,
|
|
10
|
-
getRepoLink,
|
|
11
|
-
getTeamById,
|
|
12
|
-
getUser,
|
|
13
|
-
getVercelDirectory
|
|
14
|
-
} from "./chunk-DDEPCAGE.js";
|
|
15
|
-
import {
|
|
16
|
-
TeamDeleted
|
|
17
|
-
} from "./chunk-P6AK7SVK.js";
|
|
18
|
-
import {
|
|
19
|
-
output_manager_default
|
|
20
|
-
} from "./chunk-OX7KI3LF.js";
|
|
21
|
-
|
|
22
|
-
// src/util/get-scope.ts
|
|
23
|
-
import { relative } from "path";
|
|
24
|
-
async function getScope(client, opts = {}) {
|
|
25
|
-
const user = await getUser(client);
|
|
26
|
-
let contextName = user.username || user.email;
|
|
27
|
-
let team = null;
|
|
28
|
-
const defaultTeamId = user.version === "northstar" ? user.defaultTeamId : void 0;
|
|
29
|
-
const currentTeamOrDefaultTeamId = client.config.currentTeam || defaultTeamId;
|
|
30
|
-
if (!client.config.currentTeam && defaultTeamId) {
|
|
31
|
-
client.config.currentTeam = defaultTeamId;
|
|
32
|
-
}
|
|
33
|
-
if (currentTeamOrDefaultTeamId && opts.getTeam !== false) {
|
|
34
|
-
team = await getTeamById(client, currentTeamOrDefaultTeamId);
|
|
35
|
-
if (!team) {
|
|
36
|
-
throw new TeamDeleted();
|
|
37
|
-
}
|
|
38
|
-
contextName = team.slug;
|
|
39
|
-
}
|
|
40
|
-
if (!opts.resolveLocalScope) {
|
|
41
|
-
return { contextName, team, user };
|
|
42
|
-
}
|
|
43
|
-
const explicitScopeProvided = detectExplicitScope(client);
|
|
44
|
-
const globalTeamId = client.config.currentTeam;
|
|
45
|
-
const globalTeam = team;
|
|
46
|
-
const cwd = client.cwd;
|
|
47
|
-
let projectLink = null;
|
|
48
|
-
try {
|
|
49
|
-
projectLink = await getLinkFromDir(getVercelDirectory(cwd));
|
|
50
|
-
} catch (_error) {
|
|
51
|
-
projectLink = null;
|
|
52
|
-
}
|
|
53
|
-
let repoLink = null;
|
|
54
|
-
try {
|
|
55
|
-
repoLink = await getRepoLink(client, cwd);
|
|
56
|
-
} catch (_error) {
|
|
57
|
-
repoLink = null;
|
|
58
|
-
}
|
|
59
|
-
let localOrgId;
|
|
60
|
-
if (projectLink) {
|
|
61
|
-
localOrgId = projectLink.orgId;
|
|
62
|
-
} else if (repoLink?.repoConfig) {
|
|
63
|
-
const repoConfig = repoLink.repoConfig;
|
|
64
|
-
const projects = findProjectsFromPath(
|
|
65
|
-
repoConfig.projects,
|
|
66
|
-
relative(repoLink.rootPath, cwd)
|
|
67
|
-
);
|
|
68
|
-
if (projects.length === 1) {
|
|
69
|
-
localOrgId = projects[0].orgId ?? repoLink.repoConfig.orgId ?? void 0;
|
|
70
|
-
} else if (projects.length > 1) {
|
|
71
|
-
const orgIds = new Set(
|
|
72
|
-
projects.map((p) => p.orgId ?? repoConfig.orgId ?? "")
|
|
73
|
-
);
|
|
74
|
-
if (orgIds.size === 1) {
|
|
75
|
-
const [singleOrgId] = orgIds;
|
|
76
|
-
if (singleOrgId) {
|
|
77
|
-
localOrgId = singleOrgId;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const isCrossTeamRepo = detectCrossTeamRepo(repoLink?.repoConfig);
|
|
83
|
-
const scopeMismatch = Boolean(
|
|
84
|
-
localOrgId && globalTeamId && globalTeamId !== localOrgId
|
|
85
|
-
);
|
|
86
|
-
let resolvedOrg;
|
|
87
|
-
let resolvedContextName = contextName;
|
|
88
|
-
let resolvedTeam = team;
|
|
89
|
-
let linkedRepoResult = null;
|
|
90
|
-
if (repoLink?.repoConfig) {
|
|
91
|
-
linkedRepoResult = {
|
|
92
|
-
repoConfig: repoLink.repoConfig,
|
|
93
|
-
rootPath: repoLink.rootPath
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
if (explicitScopeProvided) {
|
|
97
|
-
resolvedOrg = team ? { type: "team", id: team.id, slug: team.slug } : { type: "user", id: user.id, slug: user.username };
|
|
98
|
-
} else if (localOrgId) {
|
|
99
|
-
client.config.currentTeam = localOrgId.startsWith("team_") ? localOrgId : void 0;
|
|
100
|
-
const correctedTeam = client.config.currentTeam ? await getTeamById(client, client.config.currentTeam) : null;
|
|
101
|
-
const correctedUser = await getUser(client);
|
|
102
|
-
resolvedOrg = correctedTeam ? { type: "team", id: correctedTeam.id, slug: correctedTeam.slug } : {
|
|
103
|
-
type: "user",
|
|
104
|
-
id: correctedUser.id,
|
|
105
|
-
slug: correctedUser.username
|
|
106
|
-
};
|
|
107
|
-
resolvedContextName = correctedTeam ? correctedTeam.slug : correctedUser.username || correctedUser.email;
|
|
108
|
-
resolvedTeam = correctedTeam;
|
|
109
|
-
} else {
|
|
110
|
-
if (isCrossTeamRepo) {
|
|
111
|
-
output_manager_default.warn(
|
|
112
|
-
`This repository has projects across multiple teams. Use \`--scope\` to specify which team, or \`cd\` into a project directory.`
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
resolvedOrg = team ? { type: "team", id: team.id, slug: team.slug } : { type: "user", id: user.id, slug: user.username };
|
|
116
|
-
}
|
|
117
|
-
return {
|
|
118
|
-
org: resolvedOrg,
|
|
119
|
-
contextName: resolvedContextName,
|
|
120
|
-
user,
|
|
121
|
-
team: resolvedTeam,
|
|
122
|
-
globalTeam,
|
|
123
|
-
linkedRepo: linkedRepoResult,
|
|
124
|
-
isCrossTeamRepo,
|
|
125
|
-
scopeMismatch,
|
|
126
|
-
explicitScopeProvided
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
function detectExplicitScope(client) {
|
|
130
|
-
const argv = client.argv;
|
|
131
|
-
for (const arg of argv) {
|
|
132
|
-
if (arg === "--scope" || arg === "--team" || arg.startsWith("--scope=") || arg.startsWith("--team=") || arg === "-S" || arg === "-T") {
|
|
133
|
-
return true;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
if (client.localConfig?.scope) {
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
return false;
|
|
140
|
-
}
|
|
141
|
-
function detectCrossTeamRepo(repoConfig) {
|
|
142
|
-
if (!repoConfig?.projects || repoConfig.projects.length < 2) {
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
const orgIds = /* @__PURE__ */ new Set();
|
|
146
|
-
for (const project of repoConfig.projects) {
|
|
147
|
-
const orgId = project.orgId ?? repoConfig.orgId;
|
|
148
|
-
if (orgId) {
|
|
149
|
-
orgIds.add(orgId);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return orgIds.size > 1;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export {
|
|
156
|
-
getScope,
|
|
157
|
-
detectExplicitScope
|
|
158
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
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
|
-
|
|
8
|
-
// src/util/agent-output-constants.ts
|
|
9
|
-
var AGENT_STATUS = {
|
|
10
|
-
ERROR: "error",
|
|
11
|
-
ACTION_REQUIRED: "action_required",
|
|
12
|
-
OK: "ok"
|
|
13
|
-
};
|
|
14
|
-
var AGENT_REASON = {
|
|
15
|
-
// Common (use across dns, flags, routes, env, domains, link)
|
|
16
|
-
MISSING_ARGUMENTS: "missing_arguments",
|
|
17
|
-
INVALID_ARGUMENTS: "invalid_arguments",
|
|
18
|
-
CONFIRMATION_REQUIRED: "confirmation_required",
|
|
19
|
-
LOGIN_REQUIRED: "login_required",
|
|
20
|
-
PROJECT_SETTINGS_REQUIRED: "project_settings_required",
|
|
21
|
-
NOT_LINKED: "not_linked",
|
|
22
|
-
NOT_FOUND: "not_found",
|
|
23
|
-
PROJECT_NOT_FOUND: "project_not_found",
|
|
24
|
-
MISSING_SCOPE: "missing_scope",
|
|
25
|
-
SCOPE_NOT_ACCESSIBLE: "scope_not_accessible",
|
|
26
|
-
API_ERROR: "api_error",
|
|
27
|
-
// Flags
|
|
28
|
-
SEGMENT_IN_USE: "segment_in_use",
|
|
29
|
-
// Env
|
|
30
|
-
MISSING_REQUIREMENTS: "missing_requirements",
|
|
31
|
-
MISSING_NAME: "missing_name",
|
|
32
|
-
MISSING_VALUE: "missing_value",
|
|
33
|
-
MISSING_ENVIRONMENT: "missing_environment",
|
|
34
|
-
ENV_NOT_FOUND: "env_not_found",
|
|
35
|
-
MULTIPLE_ENVS: "multiple_envs",
|
|
36
|
-
ENV_FILE_EXISTS: "env_file_exists",
|
|
37
|
-
GIT_BRANCH_REQUIRED: "git_branch_required",
|
|
38
|
-
ENV_KEY_SENSITIVE: "env_key_sensitive",
|
|
39
|
-
// Routes
|
|
40
|
-
AMBIGUOUS_ROUTE: "ambiguous_route",
|
|
41
|
-
ROUTE_CREATE_FAILED: "route_create_failed",
|
|
42
|
-
ROUTE_GENERATION_FAILED: "route_generation_failed",
|
|
43
|
-
// DNS
|
|
44
|
-
DOMAIN_NOT_FOUND: "domain_not_found",
|
|
45
|
-
DNS_RECORD_NOT_FOUND: "dns_record_not_found",
|
|
46
|
-
INCOMPLETE_RECORD: "incomplete_record",
|
|
47
|
-
PERMISSION_DENIED: "permission_denied",
|
|
48
|
-
INVALID_PORT: "invalid_port",
|
|
49
|
-
INVALID_DNS_TYPE: "invalid_dns_type",
|
|
50
|
-
DNS_ADD_FAILED: "dns_add_failed",
|
|
51
|
-
INVALID_DOMAIN: "invalid_domain",
|
|
52
|
-
CONFIGURED_CORRECTLY: "configured_correctly",
|
|
53
|
-
VERIFICATION_NEEDED: "verification_needed",
|
|
54
|
-
INVALID_CONFIGURATION: "invalid_configuration",
|
|
55
|
-
DNS_CHANGE_REQUIRED: "dns_change_required",
|
|
56
|
-
DNS_CHANGE_RECOMMENDED: "dns_change_recommended",
|
|
57
|
-
DNSSEC_NEEDS_TO_BE_DISABLED: "dnssec_needs_to_be_disabled",
|
|
58
|
-
PROJECT_ATTACHMENT_RECOMMENDED: "project_attachment_recommended",
|
|
59
|
-
PROJECT_DOMAIN_MISSING: "project_domain_missing",
|
|
60
|
-
/** User must accept marketplace integration terms in the browser before install can continue. */
|
|
61
|
-
INTEGRATION_TERMS_ACCEPTANCE_REQUIRED: "integration_terms_acceptance_required",
|
|
62
|
-
/** Integration uninstall blocked because team-scoped resources still exist. */
|
|
63
|
-
HAS_RESOURCES: "has_resources",
|
|
64
|
-
/** User must claim a sandbox marketplace resource (e.g. Stripe, Shopify) in the browser. */
|
|
65
|
-
INTEGRATION_SANDBOX_CLAIM_REQUIRED: "integration_sandbox_claim_required",
|
|
66
|
-
// Tokens
|
|
67
|
-
CLASSIC_TOKEN_REQUIRED: "classic_token_required",
|
|
68
|
-
/** Classic token lacks full user/account scope (e.g. team- or product-scoped token). */
|
|
69
|
-
TOKEN_USER_SCOPE_REQUIRED: "token_user_scope_required",
|
|
70
|
-
// Webhooks
|
|
71
|
-
MISSING_URL: "missing_url",
|
|
72
|
-
MISSING_EVENTS: "missing_events",
|
|
73
|
-
INVALID_URL: "invalid_url",
|
|
74
|
-
INVALID_EVENT: "invalid_event",
|
|
75
|
-
// AI Gateway
|
|
76
|
-
INVALID_BUDGET: "invalid_budget",
|
|
77
|
-
INVALID_REFRESH_PERIOD: "invalid_refresh_period",
|
|
78
|
-
INVALID_EXPIRATION: "invalid_expiration",
|
|
79
|
-
/**
|
|
80
|
-
* Every selected agent needs explicit `--agent`/`--all` consent (see the
|
|
81
|
-
* payload's skipped[]). `--yes` does not grant it, so this is deliberately
|
|
82
|
-
* not `confirmation_required` — re-running with --yes would loop forever.
|
|
83
|
-
*/
|
|
84
|
-
REQUIRES_CONSENT: "requires_consent",
|
|
85
|
-
// Redirects
|
|
86
|
-
REDIRECT_NOT_FOUND: "redirect_not_found",
|
|
87
|
-
VERSION_NOT_FOUND: "version_not_found",
|
|
88
|
-
VERSION_ALREADY_LIVE: "version_already_live",
|
|
89
|
-
VERSION_IS_STAGING: "version_is_staging"
|
|
90
|
-
};
|
|
91
|
-
var AGENT_ACTION = {
|
|
92
|
-
MISSING_ARGUMENTS: "missing_arguments",
|
|
93
|
-
CONFIRMATION_REQUIRED: "confirmation_required",
|
|
94
|
-
LOGIN_REQUIRED: "login_required"
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export {
|
|
98
|
-
AGENT_STATUS,
|
|
99
|
-
AGENT_REASON,
|
|
100
|
-
AGENT_ACTION
|
|
101
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
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
|
-
AGENT_REASON,
|
|
9
|
-
AGENT_STATUS
|
|
10
|
-
} from "./chunk-IC4YEIGW.js";
|
|
11
|
-
import {
|
|
12
|
-
getScope
|
|
13
|
-
} from "./chunk-DWU7JOO6.js";
|
|
14
|
-
import {
|
|
15
|
-
getOrgById
|
|
16
|
-
} from "./chunk-DDEPCAGE.js";
|
|
17
|
-
import {
|
|
18
|
-
buildCommandWithGlobalFlags,
|
|
19
|
-
outputAgentError,
|
|
20
|
-
shouldEmitNonInteractiveCommandError
|
|
21
|
-
} from "./chunk-CB3I3QIT.js";
|
|
22
|
-
import {
|
|
23
|
-
output_manager_default
|
|
24
|
-
} from "./chunk-OX7KI3LF.js";
|
|
25
|
-
|
|
26
|
-
// src/util/projects/project-not-found-error.ts
|
|
27
|
-
async function printProjectNotFoundError(client, projectNameOrId, commandName, orgId) {
|
|
28
|
-
let contextName;
|
|
29
|
-
try {
|
|
30
|
-
if (orgId) {
|
|
31
|
-
const org = await getOrgById(client, orgId);
|
|
32
|
-
contextName = org?.slug ?? orgId;
|
|
33
|
-
} else {
|
|
34
|
-
const scope = await getScope(client);
|
|
35
|
-
contextName = scope.contextName;
|
|
36
|
-
}
|
|
37
|
-
} catch (err) {
|
|
38
|
-
contextName = orgId;
|
|
39
|
-
output_manager_default.debug(`Scope lookup failed during error reporting: ${err}`);
|
|
40
|
-
}
|
|
41
|
-
const scopeClause = contextName ? ` (${contextName})` : "";
|
|
42
|
-
const headline = `Project "${projectNameOrId}" was not found in the current scope${scopeClause}.`;
|
|
43
|
-
output_manager_default.error(
|
|
44
|
-
`${headline}
|
|
45
|
-
|
|
46
|
-
If it lives in a different team or account:
|
|
47
|
-
\u2022 Retry with \`--scope <team-slug|your-username>\`, or
|
|
48
|
-
\u2022 Run \`vercel switch <team-slug|your-username>\` to change scope.
|
|
49
|
-
|
|
50
|
-
List accessible teams with \`vercel teams ls\`.`
|
|
51
|
-
);
|
|
52
|
-
if (!shouldEmitNonInteractiveCommandError(client)) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const retryWithScope = buildCommandWithGlobalFlags(
|
|
56
|
-
client.argv,
|
|
57
|
-
`${commandName} --project ${projectNameOrId} --scope <team-slug>`
|
|
58
|
-
);
|
|
59
|
-
outputAgentError(
|
|
60
|
-
client,
|
|
61
|
-
{
|
|
62
|
-
status: AGENT_STATUS.ERROR,
|
|
63
|
-
reason: AGENT_REASON.PROJECT_NOT_FOUND,
|
|
64
|
-
message: `${headline} If it lives in a different team or account, retry with --scope <team-slug|your-username> or run \`vercel switch <team-slug|your-username>\` to change scope.`,
|
|
65
|
-
...contextName ? { scope: contextName } : {},
|
|
66
|
-
next: [
|
|
67
|
-
{ command: "vercel teams ls", when: "list accessible teams" },
|
|
68
|
-
{ command: retryWithScope, when: "retry with a specific team" },
|
|
69
|
-
{
|
|
70
|
-
command: "vercel switch <team-slug>",
|
|
71
|
-
when: "change the default scope"
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
|
-
1
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export {
|
|
80
|
-
printProjectNotFoundError
|
|
81
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
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
|
-
CertConfigurationError,
|
|
9
|
-
CertError,
|
|
10
|
-
DeploymentNotFound,
|
|
11
|
-
DeploymentPermissionDenied,
|
|
12
|
-
DomainNotFound,
|
|
13
|
-
InvalidDeploymentId,
|
|
14
|
-
TooManyRequests,
|
|
15
|
-
isAPIError
|
|
16
|
-
} from "./chunk-P6AK7SVK.js";
|
|
17
|
-
|
|
18
|
-
// src/util/to-host.ts
|
|
19
|
-
function toHost(url) {
|
|
20
|
-
return url.replace(/^(?:.*?\/\/)?([^/]+).*/, "$1");
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// src/util/certs/map-cert-error.ts
|
|
24
|
-
function mapCertError(error, cns) {
|
|
25
|
-
const errorCode = error.code;
|
|
26
|
-
if (errorCode === "too_many_requests") {
|
|
27
|
-
const retryAfter = typeof error.retryAfterMs === "number" ? error.retryAfterMs : 0;
|
|
28
|
-
return new TooManyRequests("certificates", retryAfter);
|
|
29
|
-
}
|
|
30
|
-
if (errorCode === "not_found") {
|
|
31
|
-
return new DomainNotFound(error.domain);
|
|
32
|
-
}
|
|
33
|
-
if (errorCode === "configuration_error") {
|
|
34
|
-
return new CertConfigurationError({
|
|
35
|
-
cns: cns || error.cns || [],
|
|
36
|
-
message: error.message,
|
|
37
|
-
external: error.external,
|
|
38
|
-
helpUrl: error.helpUrl,
|
|
39
|
-
type: error.statusCode === 449 ? "http-01" : "dns-01"
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
if (errorCode === "bad_domains" || errorCode === "challenge_still_pending" || errorCode === "common_name_domain_name_mismatch" || errorCode === "conflicting_caa_record" || errorCode === "domain_not_verified" || errorCode === "invalid_cn" || errorCode === "invalid_domain" || errorCode === "rate_limited" || errorCode === "should_share_root_domain" || errorCode === "unauthorized_request_error" || errorCode === "unsupported_challenge_priority" || errorCode === "wildcard_not_allowed" || errorCode === "validation_running" || errorCode === "dns_error" || errorCode === "challenge_error" || errorCode === "txt_record_not_found") {
|
|
43
|
-
return new CertError({
|
|
44
|
-
cns: cns || error.cns || [],
|
|
45
|
-
code: errorCode,
|
|
46
|
-
message: error.message,
|
|
47
|
-
helpUrl: error.helpUrl
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// src/util/get-deployment.ts
|
|
54
|
-
async function getDeployment(client, contextName, hostOrId) {
|
|
55
|
-
if (hostOrId.includes(".")) {
|
|
56
|
-
hostOrId = toHost(hostOrId);
|
|
57
|
-
}
|
|
58
|
-
try {
|
|
59
|
-
return await client.fetch(
|
|
60
|
-
`/v13/deployments/${encodeURIComponent(hostOrId)}`
|
|
61
|
-
);
|
|
62
|
-
} catch (err) {
|
|
63
|
-
if (isAPIError(err)) {
|
|
64
|
-
if (err.status === 404) {
|
|
65
|
-
throw new DeploymentNotFound({ id: hostOrId, context: contextName });
|
|
66
|
-
}
|
|
67
|
-
if (err.status === 403) {
|
|
68
|
-
throw new DeploymentPermissionDenied(hostOrId, contextName);
|
|
69
|
-
}
|
|
70
|
-
if (err.status === 400 && err.message.includes("`id`")) {
|
|
71
|
-
throw new InvalidDeploymentId(hostOrId);
|
|
72
|
-
}
|
|
73
|
-
const certError = mapCertError(err);
|
|
74
|
-
if (certError) {
|
|
75
|
-
throw certError;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
throw err;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export {
|
|
83
|
-
mapCertError,
|
|
84
|
-
toHost,
|
|
85
|
-
getDeployment
|
|
86
|
-
};
|