vercel 51.2.1 → 51.3.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-3MIOUOZC.js +180 -0
- package/dist/chunks/{chunk-W6FW7CCT.js → chunk-2JQVASXJ.js} +13 -8
- package/dist/chunks/{chunk-Q6BEDVOU.js → chunk-4PQA6H63.js} +1 -1
- package/dist/chunks/{chunk-IS2HEMF4.js → chunk-4RBF6ZDU.js} +4 -2
- package/dist/chunks/{chunk-7S7GE4BN.js → chunk-4VP55L4V.js} +208 -500
- package/dist/chunks/{chunk-5YQCJTZI.js → chunk-4WRHMYCG.js} +6 -6
- package/dist/chunks/chunk-4ZWTYJSP.js +139 -0
- package/dist/chunks/{chunk-3FMFPD7F.js → chunk-APGVHLAW.js} +2 -2
- package/dist/chunks/{chunk-5WHDQH2U.js → chunk-BAUYQ7AR.js} +1 -1
- package/dist/chunks/{chunk-BUBUVE23.js → chunk-BJQTGP42.js} +4 -2
- package/dist/chunks/{chunk-G6MVEB4W.js → chunk-BU3JMDDH.js} +3 -3
- package/dist/chunks/chunk-CGTXAXZ4.js +484 -0
- package/dist/chunks/{chunk-BQUQ5F7R.js → chunk-CRZM5WM2.js} +4 -2
- package/dist/chunks/{chunk-XRR5HDB3.js → chunk-CZXW3DJH.js} +2 -2
- package/dist/chunks/chunk-DVQ4SIWF.js +183 -0
- package/dist/chunks/{chunk-A4NVECX5.js → chunk-ECRBC4HL.js} +4 -581
- package/dist/chunks/{chunk-RK4TKB3D.js → chunk-FNFZO3WQ.js} +7 -5
- package/dist/chunks/{chunk-L2BKVTHL.js → chunk-G6RXZLQ2.js} +2 -2
- package/dist/chunks/{chunk-4YZKA4FN.js → chunk-GE6G37P4.js} +1 -1
- package/dist/chunks/{chunk-NELCIT4M.js → chunk-GLDQ23LD.js} +1 -1
- package/dist/chunks/{chunk-5DLMAFQU.js → chunk-GYBFQLYR.js} +6 -4
- package/dist/chunks/{chunk-XAVGWINL.js → chunk-JEON5XEH.js} +44 -13
- package/dist/chunks/{chunk-Y5YCSB6X.js → chunk-LDXYSGPZ.js} +2 -2
- package/dist/chunks/{chunk-U5J73OA3.js → chunk-N45K6NXC.js} +1 -1
- package/dist/chunks/{chunk-SSOWPEZT.js → chunk-NCQBQGI6.js} +2 -2
- package/dist/chunks/chunk-NE34PEHL.js +167 -0
- package/dist/chunks/{chunk-QQTF2FEY.js → chunk-OFUQPP26.js} +9 -5
- package/dist/chunks/{chunk-FSOFFJDV.js → chunk-R2BVH5SQ.js} +1 -1
- package/dist/chunks/chunk-RFMC2QXQ.js +602 -0
- package/dist/chunks/{chunk-VTQNSCUG.js → chunk-RHXEHBO3.js} +8 -6
- package/dist/chunks/{chunk-K5XJCQQO.js → chunk-RRYVGOVK.js} +1 -1
- package/dist/chunks/{chunk-EHZKWVK2.js → chunk-T7CL42FK.js} +5 -5
- package/dist/chunks/{chunk-WXNT7WJO.js → chunk-TAOVG4PS.js} +49 -4
- package/dist/chunks/{chunk-57RLFBKC.js → chunk-UB325PS7.js} +1 -1
- package/dist/chunks/{chunk-2IAZZEVQ.js → chunk-UWKTUK3W.js} +4 -2
- package/dist/chunks/{chunk-VE7MY76H.js → chunk-VGWGLBUC.js} +4 -2
- package/dist/chunks/{chunk-4EGCWWSR.js → chunk-VMTOBGCO.js} +50 -16
- package/dist/chunks/{chunk-W5K4YCTI.js → chunk-ZS5VKEZL.js} +5 -3
- package/dist/chunks/{compile-vercel-config-2GV46IDP.js → compile-vercel-config-A2SLMCWK.js} +4 -2
- package/dist/chunks/{delete-PXMYSQGR.js → delete-SEQBCYWT.js} +7 -5
- package/dist/chunks/{disable-2ZQ4OG4A.js → disable-GRM5DJGU.js} +7 -5
- package/dist/chunks/{discard-FQZTZ5HK.js → discard-IVQWWSPI.js} +7 -5
- package/dist/chunks/{edit-F3J7Q5SZ.js → edit-YTMZBT4Y.js} +8 -6
- package/dist/chunks/{enable-ZW4W33H5.js → enable-SSU3MG6J.js} +7 -5
- package/dist/chunks/{export-ZZV6ESIW.js → export-INCDZTYW.js} +7 -5
- package/dist/chunks/inspect-QMY2ZE6J.js +353 -0
- package/dist/chunks/{list-VFPV4TUW.js → list-FF4VGSZ2.js} +115 -85
- package/dist/chunks/{list-SSIMVNNN.js → list-MMIBPSB3.js} +10 -7
- package/dist/chunks/ls-TYEDISJD.js +114 -0
- package/dist/chunks/{publish-3K76MNS3.js → publish-OJQCVDL5.js} +7 -5
- package/dist/chunks/{query-CY7JJSSX.js → query-LACPOOBL.js} +15 -12
- package/dist/chunks/{reorder-6L7MENN5.js → reorder-TBFWHFQZ.js} +7 -5
- package/dist/chunks/{restore-XUYXOJQ2.js → restore-5LUZRUME.js} +7 -5
- package/dist/chunks/rm-LDXY2G45.js +164 -0
- package/dist/chunks/rule-inspect-THIN6POX.js +142 -0
- package/dist/chunks/rules-4ZH7VTGC.js +83 -0
- package/dist/chunks/{schema-G5FSLZVA.js → schema-OK4OOI2N.js} +9 -7
- package/dist/chunks/{types-A4EAQ6F6.js → types-QNN5CDCB.js} +6 -4
- package/dist/chunks/update-EXPUPEH6.js +196 -0
- package/dist/commands/build/index.js +27 -23
- package/dist/commands/deploy/index.js +171 -32
- package/dist/commands/dev/index.js +21 -17
- package/dist/commands/env/index.js +32 -27
- package/dist/commands/link/index.js +21 -17
- package/dist/commands/list/index.js +14 -11
- package/dist/commands-bulk.js +322 -128
- package/dist/index.js +28 -24
- package/dist/version.mjs +1 -1
- package/package.json +19 -19
|
@@ -9,16 +9,18 @@ import {
|
|
|
9
9
|
} from "./chunk-XPKWKPWA.js";
|
|
10
10
|
import {
|
|
11
11
|
typesSubcommand
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UWKTUK3W.js";
|
|
13
13
|
import {
|
|
14
14
|
table
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GE6G37P4.js";
|
|
16
16
|
import {
|
|
17
17
|
getFlagsSpecification,
|
|
18
|
-
isAPIError,
|
|
19
18
|
parseArguments,
|
|
20
19
|
printError
|
|
21
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RFMC2QXQ.js";
|
|
21
|
+
import {
|
|
22
|
+
isAPIError
|
|
23
|
+
} from "./chunk-ECRBC4HL.js";
|
|
22
24
|
import {
|
|
23
25
|
output_manager_default
|
|
24
26
|
} from "./chunk-ZQKJVHXY.js";
|
|
@@ -0,0 +1,196 @@
|
|
|
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
|
+
emitRulesArgParseError,
|
|
9
|
+
handleRulesApiError,
|
|
10
|
+
parseRulesFlagsAndScope,
|
|
11
|
+
rulesItemPath
|
|
12
|
+
} from "./chunk-4ZWTYJSP.js";
|
|
13
|
+
import "./chunk-NE34PEHL.js";
|
|
14
|
+
import "./chunk-HTOH3MSD.js";
|
|
15
|
+
import "./chunk-APGVHLAW.js";
|
|
16
|
+
import {
|
|
17
|
+
validateJsonOutput
|
|
18
|
+
} from "./chunk-XPKWKPWA.js";
|
|
19
|
+
import {
|
|
20
|
+
rulesUpdateSubcommand
|
|
21
|
+
} from "./chunk-DVQ4SIWF.js";
|
|
22
|
+
import {
|
|
23
|
+
AGENT_REASON
|
|
24
|
+
} from "./chunk-E3NE4SKN.js";
|
|
25
|
+
import "./chunk-4VP55L4V.js";
|
|
26
|
+
import "./chunk-U3WLEFHU.js";
|
|
27
|
+
import {
|
|
28
|
+
buildCommandWithGlobalFlags,
|
|
29
|
+
outputAgentError
|
|
30
|
+
} from "./chunk-CGTXAXZ4.js";
|
|
31
|
+
import "./chunk-CO5D46AG.js";
|
|
32
|
+
import {
|
|
33
|
+
getFlagsSpecification,
|
|
34
|
+
parseArguments,
|
|
35
|
+
printError
|
|
36
|
+
} from "./chunk-RFMC2QXQ.js";
|
|
37
|
+
import {
|
|
38
|
+
isAPIError,
|
|
39
|
+
packageName
|
|
40
|
+
} from "./chunk-ECRBC4HL.js";
|
|
41
|
+
import {
|
|
42
|
+
output_manager_default
|
|
43
|
+
} from "./chunk-ZQKJVHXY.js";
|
|
44
|
+
import "./chunk-S7KYDPEM.js";
|
|
45
|
+
import "./chunk-TZ2YI2VH.js";
|
|
46
|
+
|
|
47
|
+
// src/commands/alerts/rules/update.ts
|
|
48
|
+
import { readFileSync } from "fs";
|
|
49
|
+
import { resolve } from "path";
|
|
50
|
+
async function update(client, argv) {
|
|
51
|
+
let parsedArgs;
|
|
52
|
+
try {
|
|
53
|
+
parsedArgs = parseArguments(
|
|
54
|
+
argv,
|
|
55
|
+
getFlagsSpecification(rulesUpdateSubcommand.options)
|
|
56
|
+
);
|
|
57
|
+
} catch (e) {
|
|
58
|
+
emitRulesArgParseError(
|
|
59
|
+
client,
|
|
60
|
+
e,
|
|
61
|
+
"alerts rules update <ruleId> --project <name-or-id> --body <path>"
|
|
62
|
+
);
|
|
63
|
+
printError(e);
|
|
64
|
+
return 1;
|
|
65
|
+
}
|
|
66
|
+
const ruleId = parsedArgs.args[0];
|
|
67
|
+
const fr = validateJsonOutput(parsedArgs.flags);
|
|
68
|
+
if (!fr.valid) {
|
|
69
|
+
outputAgentError(
|
|
70
|
+
client,
|
|
71
|
+
{
|
|
72
|
+
status: "error",
|
|
73
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
74
|
+
message: fr.error
|
|
75
|
+
},
|
|
76
|
+
1
|
|
77
|
+
);
|
|
78
|
+
output_manager_default.error(fr.error);
|
|
79
|
+
return 1;
|
|
80
|
+
}
|
|
81
|
+
if (!ruleId) {
|
|
82
|
+
outputAgentError(
|
|
83
|
+
client,
|
|
84
|
+
{
|
|
85
|
+
status: "error",
|
|
86
|
+
reason: AGENT_REASON.MISSING_ARGUMENTS,
|
|
87
|
+
message: `Missing rule id. Example: ${packageName} alerts rules update <ruleId> --body <file>`,
|
|
88
|
+
next: [
|
|
89
|
+
{
|
|
90
|
+
command: buildCommandWithGlobalFlags(
|
|
91
|
+
client.argv,
|
|
92
|
+
"alerts rules update <ruleId> --body <file>"
|
|
93
|
+
),
|
|
94
|
+
when: "Replace <ruleId> and <file> with id and JSON patch path"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
1
|
|
99
|
+
);
|
|
100
|
+
output_manager_default.error("Usage: `vercel alerts rules update <ruleId> --body <PATH>`");
|
|
101
|
+
return 1;
|
|
102
|
+
}
|
|
103
|
+
const bodyPath = parsedArgs.flags["--body"];
|
|
104
|
+
if (!bodyPath) {
|
|
105
|
+
outputAgentError(
|
|
106
|
+
client,
|
|
107
|
+
{
|
|
108
|
+
status: "error",
|
|
109
|
+
reason: AGENT_REASON.MISSING_ARGUMENTS,
|
|
110
|
+
message: `Missing required flag --body. Example: ${packageName} alerts rules update ${ruleId} --body <file>`,
|
|
111
|
+
next: [
|
|
112
|
+
{
|
|
113
|
+
command: buildCommandWithGlobalFlags(
|
|
114
|
+
client.argv,
|
|
115
|
+
`alerts rules update ${ruleId} --body <file>`
|
|
116
|
+
),
|
|
117
|
+
when: "Replace <file> with a path to JSON patch payload"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
1
|
|
122
|
+
);
|
|
123
|
+
output_manager_default.error("Missing required flag: --body <PATH> (JSON patch payload).");
|
|
124
|
+
return 1;
|
|
125
|
+
}
|
|
126
|
+
const scope = await parseRulesFlagsAndScope(
|
|
127
|
+
client,
|
|
128
|
+
{
|
|
129
|
+
"--project": parsedArgs.flags["--project"],
|
|
130
|
+
"--all": parsedArgs.flags["--all"]
|
|
131
|
+
},
|
|
132
|
+
fr.jsonOutput
|
|
133
|
+
);
|
|
134
|
+
if (typeof scope === "number") {
|
|
135
|
+
return scope;
|
|
136
|
+
}
|
|
137
|
+
let raw;
|
|
138
|
+
try {
|
|
139
|
+
raw = readFileSync(resolve(client.cwd, bodyPath), "utf8");
|
|
140
|
+
} catch {
|
|
141
|
+
outputAgentError(
|
|
142
|
+
client,
|
|
143
|
+
{
|
|
144
|
+
status: "error",
|
|
145
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
146
|
+
message: `Could not read --body file: ${bodyPath}`
|
|
147
|
+
},
|
|
148
|
+
1
|
|
149
|
+
);
|
|
150
|
+
output_manager_default.error(`Could not read --body file: ${bodyPath}`);
|
|
151
|
+
return 1;
|
|
152
|
+
}
|
|
153
|
+
let body;
|
|
154
|
+
try {
|
|
155
|
+
body = JSON.parse(raw);
|
|
156
|
+
} catch {
|
|
157
|
+
outputAgentError(
|
|
158
|
+
client,
|
|
159
|
+
{
|
|
160
|
+
status: "error",
|
|
161
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
162
|
+
message: "Invalid JSON in --body file."
|
|
163
|
+
},
|
|
164
|
+
1
|
|
165
|
+
);
|
|
166
|
+
output_manager_default.error("Invalid JSON in --body file.");
|
|
167
|
+
return 1;
|
|
168
|
+
}
|
|
169
|
+
delete body.id;
|
|
170
|
+
delete body.teamId;
|
|
171
|
+
const path = rulesItemPath(scope, ruleId);
|
|
172
|
+
output_manager_default.spinner("Updating alert rule...");
|
|
173
|
+
try {
|
|
174
|
+
const updated = await client.fetch(path, {
|
|
175
|
+
method: "PATCH",
|
|
176
|
+
body
|
|
177
|
+
});
|
|
178
|
+
if (fr.jsonOutput) {
|
|
179
|
+
client.stdout.write(`${JSON.stringify({ rule: updated }, null, 2)}
|
|
180
|
+
`);
|
|
181
|
+
} else {
|
|
182
|
+
output_manager_default.success(`Updated alert rule ${ruleId}`);
|
|
183
|
+
}
|
|
184
|
+
return 0;
|
|
185
|
+
} catch (err) {
|
|
186
|
+
if (isAPIError(err)) {
|
|
187
|
+
return handleRulesApiError(client, err, fr.jsonOutput);
|
|
188
|
+
}
|
|
189
|
+
throw err;
|
|
190
|
+
} finally {
|
|
191
|
+
output_manager_default.stopSpinner();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
export {
|
|
195
|
+
update as default
|
|
196
|
+
};
|
|
@@ -10,42 +10,41 @@ import {
|
|
|
10
10
|
isLambda,
|
|
11
11
|
staticFiles,
|
|
12
12
|
writeBuildResult
|
|
13
|
-
} from "../../chunks/chunk-
|
|
13
|
+
} from "../../chunks/chunk-BU3JMDDH.js";
|
|
14
14
|
import {
|
|
15
15
|
require_semver
|
|
16
16
|
} from "../../chunks/chunk-IB5L4LKZ.js";
|
|
17
17
|
import {
|
|
18
18
|
pullCommandLogic
|
|
19
|
-
} from "../../chunks/chunk-
|
|
19
|
+
} from "../../chunks/chunk-4WRHMYCG.js";
|
|
20
|
+
import {
|
|
21
|
+
pickOverrides,
|
|
22
|
+
readProjectSettings
|
|
23
|
+
} from "../../chunks/chunk-UB325PS7.js";
|
|
20
24
|
import {
|
|
21
25
|
AGENT_REASON,
|
|
22
26
|
AGENT_STATUS
|
|
23
27
|
} from "../../chunks/chunk-E3NE4SKN.js";
|
|
24
|
-
import {
|
|
25
|
-
pickOverrides,
|
|
26
|
-
readProjectSettings
|
|
27
|
-
} from "../../chunks/chunk-57RLFBKC.js";
|
|
28
28
|
import {
|
|
29
29
|
ua_default
|
|
30
|
-
} from "../../chunks/chunk-
|
|
31
|
-
import "../../chunks/chunk-
|
|
32
|
-
import "../../chunks/chunk-
|
|
33
|
-
import "../../chunks/chunk-
|
|
34
|
-
import "../../chunks/chunk-
|
|
30
|
+
} from "../../chunks/chunk-4PQA6H63.js";
|
|
31
|
+
import "../../chunks/chunk-BAUYQ7AR.js";
|
|
32
|
+
import "../../chunks/chunk-FNFZO3WQ.js";
|
|
33
|
+
import "../../chunks/chunk-RHXEHBO3.js";
|
|
34
|
+
import "../../chunks/chunk-GYBFQLYR.js";
|
|
35
35
|
import {
|
|
36
36
|
buildCommand
|
|
37
|
-
} from "../../chunks/chunk-
|
|
37
|
+
} from "../../chunks/chunk-ZS5VKEZL.js";
|
|
38
38
|
import {
|
|
39
39
|
help
|
|
40
|
-
} from "../../chunks/chunk-
|
|
41
|
-
import "../../chunks/chunk-
|
|
40
|
+
} from "../../chunks/chunk-LDXYSGPZ.js";
|
|
41
|
+
import "../../chunks/chunk-GE6G37P4.js";
|
|
42
42
|
import {
|
|
43
43
|
DEFAULT_VERCEL_CONFIG_FILENAME,
|
|
44
44
|
VERCEL_DIR,
|
|
45
45
|
compileVercelConfig,
|
|
46
46
|
findSourceVercelConfigFile,
|
|
47
47
|
getProjectLink,
|
|
48
|
-
outputAgentError,
|
|
49
48
|
parseTarget,
|
|
50
49
|
pullEnvRecords,
|
|
51
50
|
readJSONFile,
|
|
@@ -59,28 +58,33 @@ import {
|
|
|
59
58
|
require_minimatch,
|
|
60
59
|
resolveProjectCwd,
|
|
61
60
|
validateConfig
|
|
62
|
-
} from "../../chunks/chunk-
|
|
61
|
+
} from "../../chunks/chunk-4VP55L4V.js";
|
|
63
62
|
import {
|
|
64
63
|
TelemetryClient
|
|
65
64
|
} from "../../chunks/chunk-U3WLEFHU.js";
|
|
65
|
+
import {
|
|
66
|
+
outputAgentError
|
|
67
|
+
} from "../../chunks/chunk-CGTXAXZ4.js";
|
|
66
68
|
import {
|
|
67
69
|
stamp_default
|
|
68
70
|
} from "../../chunks/chunk-CO5D46AG.js";
|
|
71
|
+
import {
|
|
72
|
+
getFlagsSpecification,
|
|
73
|
+
getGlobalFlagsOnlyFromArgs,
|
|
74
|
+
parseArguments,
|
|
75
|
+
printError,
|
|
76
|
+
toEnumerableError
|
|
77
|
+
} from "../../chunks/chunk-RFMC2QXQ.js";
|
|
69
78
|
import {
|
|
70
79
|
CantParseJSONFile,
|
|
71
80
|
cmd,
|
|
72
81
|
getCommandName,
|
|
73
82
|
getCommandNamePlain,
|
|
74
|
-
getFlagsSpecification,
|
|
75
|
-
getGlobalFlagsOnlyFromArgs,
|
|
76
83
|
init_pkg,
|
|
77
84
|
packageName,
|
|
78
|
-
parseArguments,
|
|
79
85
|
pkg_default,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
toEnumerableError
|
|
83
|
-
} from "../../chunks/chunk-A4NVECX5.js";
|
|
86
|
+
require_lib as require_lib2
|
|
87
|
+
} from "../../chunks/chunk-ECRBC4HL.js";
|
|
84
88
|
import {
|
|
85
89
|
emoji,
|
|
86
90
|
output_manager_default,
|
|
@@ -5,6 +5,7 @@ const require = __createRequire(import.meta.url);
|
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
|
+
FunctionsSizeLimitError,
|
|
8
9
|
Now,
|
|
9
10
|
UploadErrorMissingArchive,
|
|
10
11
|
createCertForCns,
|
|
@@ -13,10 +14,10 @@ import {
|
|
|
13
14
|
purchaseDomainIfAvailable,
|
|
14
15
|
require_cjs,
|
|
15
16
|
setupDomain
|
|
16
|
-
} from "../../chunks/chunk-
|
|
17
|
+
} from "../../chunks/chunk-JEON5XEH.js";
|
|
17
18
|
import {
|
|
18
19
|
readLocalConfig
|
|
19
|
-
} from "../../chunks/chunk-
|
|
20
|
+
} from "../../chunks/chunk-2JQVASXJ.js";
|
|
20
21
|
import {
|
|
21
22
|
highlight
|
|
22
23
|
} from "../../chunks/chunk-V5P25P7F.js";
|
|
@@ -27,12 +28,12 @@ import {
|
|
|
27
28
|
import {
|
|
28
29
|
getDeployment,
|
|
29
30
|
mapCertError
|
|
30
|
-
} from "../../chunks/chunk-
|
|
31
|
-
import "../../chunks/chunk-
|
|
31
|
+
} from "../../chunks/chunk-N45K6NXC.js";
|
|
32
|
+
import "../../chunks/chunk-APGVHLAW.js";
|
|
32
33
|
import {
|
|
33
34
|
validateJsonOutput
|
|
34
35
|
} from "../../chunks/chunk-XPKWKPWA.js";
|
|
35
|
-
import "../../chunks/chunk-
|
|
36
|
+
import "../../chunks/chunk-R2BVH5SQ.js";
|
|
36
37
|
import {
|
|
37
38
|
getSubcommand
|
|
38
39
|
} from "../../chunks/chunk-YPQSDAEW.js";
|
|
@@ -42,50 +43,59 @@ import {
|
|
|
42
43
|
deprecatedArchiveSplitTgz,
|
|
43
44
|
getCommandAliases,
|
|
44
45
|
initSubcommand
|
|
45
|
-
} from "../../chunks/chunk-
|
|
46
|
-
import "../../chunks/chunk-
|
|
47
|
-
import "../../chunks/chunk-
|
|
48
|
-
import "../../chunks/chunk-
|
|
49
|
-
import "../../chunks/chunk-
|
|
50
|
-
import "../../chunks/chunk-
|
|
51
|
-
import "../../chunks/chunk-
|
|
46
|
+
} from "../../chunks/chunk-VMTOBGCO.js";
|
|
47
|
+
import "../../chunks/chunk-CRZM5WM2.js";
|
|
48
|
+
import "../../chunks/chunk-4RBF6ZDU.js";
|
|
49
|
+
import "../../chunks/chunk-BJQTGP42.js";
|
|
50
|
+
import "../../chunks/chunk-UWKTUK3W.js";
|
|
51
|
+
import "../../chunks/chunk-TAOVG4PS.js";
|
|
52
|
+
import "../../chunks/chunk-DVQ4SIWF.js";
|
|
53
|
+
import "../../chunks/chunk-VGWGLBUC.js";
|
|
54
|
+
import {
|
|
55
|
+
pickOverrides
|
|
56
|
+
} from "../../chunks/chunk-UB325PS7.js";
|
|
52
57
|
import {
|
|
53
58
|
AGENT_STATUS
|
|
54
59
|
} from "../../chunks/chunk-E3NE4SKN.js";
|
|
55
|
-
import
|
|
56
|
-
pickOverrides
|
|
57
|
-
} from "../../chunks/chunk-57RLFBKC.js";
|
|
58
|
-
import "../../chunks/chunk-Q6BEDVOU.js";
|
|
60
|
+
import "../../chunks/chunk-4PQA6H63.js";
|
|
59
61
|
import {
|
|
60
62
|
ensureLink
|
|
61
|
-
} from "../../chunks/chunk-
|
|
63
|
+
} from "../../chunks/chunk-FNFZO3WQ.js";
|
|
62
64
|
import {
|
|
63
65
|
validatePaths,
|
|
64
66
|
validateRootDirectory
|
|
65
|
-
} from "../../chunks/chunk-
|
|
66
|
-
import "../../chunks/chunk-
|
|
67
|
-
import "../../chunks/chunk-
|
|
67
|
+
} from "../../chunks/chunk-RHXEHBO3.js";
|
|
68
|
+
import "../../chunks/chunk-GYBFQLYR.js";
|
|
69
|
+
import "../../chunks/chunk-ZS5VKEZL.js";
|
|
68
70
|
import {
|
|
69
71
|
help
|
|
70
|
-
} from "../../chunks/chunk-
|
|
71
|
-
import "../../chunks/chunk-
|
|
72
|
+
} from "../../chunks/chunk-LDXYSGPZ.js";
|
|
73
|
+
import "../../chunks/chunk-GE6G37P4.js";
|
|
72
74
|
import {
|
|
73
75
|
compileVercelConfig,
|
|
74
76
|
createGitMeta,
|
|
75
|
-
outputAgentError,
|
|
76
77
|
param,
|
|
77
78
|
parseEnv,
|
|
78
79
|
parseTarget,
|
|
79
80
|
require_dist as require_dist2,
|
|
80
81
|
require_lib
|
|
81
|
-
} from "../../chunks/chunk-
|
|
82
|
+
} from "../../chunks/chunk-4VP55L4V.js";
|
|
82
83
|
import {
|
|
83
84
|
TelemetryClient
|
|
84
85
|
} from "../../chunks/chunk-U3WLEFHU.js";
|
|
86
|
+
import {
|
|
87
|
+
outputAgentError
|
|
88
|
+
} from "../../chunks/chunk-CGTXAXZ4.js";
|
|
85
89
|
import {
|
|
86
90
|
require_ms,
|
|
87
91
|
stamp_default
|
|
88
92
|
} from "../../chunks/chunk-CO5D46AG.js";
|
|
93
|
+
import {
|
|
94
|
+
getCommandNameWithGlobalFlags,
|
|
95
|
+
getFlagsSpecification,
|
|
96
|
+
parseArguments,
|
|
97
|
+
printError
|
|
98
|
+
} from "../../chunks/chunk-RFMC2QXQ.js";
|
|
89
99
|
import {
|
|
90
100
|
AliasDomainConfigured,
|
|
91
101
|
BuildError,
|
|
@@ -108,13 +118,9 @@ import {
|
|
|
108
118
|
UserAborted,
|
|
109
119
|
code,
|
|
110
120
|
getCommandName,
|
|
111
|
-
getCommandNameWithGlobalFlags,
|
|
112
|
-
getFlagsSpecification,
|
|
113
121
|
isAPIError,
|
|
114
|
-
parseArguments,
|
|
115
|
-
printError,
|
|
116
122
|
require_bytes
|
|
117
|
-
} from "../../chunks/chunk-
|
|
123
|
+
} from "../../chunks/chunk-ECRBC4HL.js";
|
|
118
124
|
import {
|
|
119
125
|
emoji,
|
|
120
126
|
output_manager_default,
|
|
@@ -138,7 +144,8 @@ var import_ms = __toESM(require_ms(), 1);
|
|
|
138
144
|
import {
|
|
139
145
|
getPrettyError,
|
|
140
146
|
getSupportedNodeVersion,
|
|
141
|
-
scanParentDirs
|
|
147
|
+
scanParentDirs,
|
|
148
|
+
PYTHON_FRAMEWORKS
|
|
142
149
|
} from "@vercel/build-utils";
|
|
143
150
|
import { join as join2, resolve } from "path";
|
|
144
151
|
|
|
@@ -497,6 +504,16 @@ var DeployTelemetryClient = class extends TelemetryClient {
|
|
|
497
504
|
});
|
|
498
505
|
}
|
|
499
506
|
}
|
|
507
|
+
trackCliFlagFunctionsBeta(flag) {
|
|
508
|
+
if (flag) {
|
|
509
|
+
this.trackCliFlag("functions-beta");
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
trackCliFlagNoFunctionsBeta(flag) {
|
|
513
|
+
if (flag) {
|
|
514
|
+
this.trackCliFlag("no-functions-beta");
|
|
515
|
+
}
|
|
516
|
+
}
|
|
500
517
|
trackDeploymentId(id) {
|
|
501
518
|
if (id) {
|
|
502
519
|
this.trackCommandOutput({
|
|
@@ -576,6 +593,20 @@ async function handleInitDeployment(client, telemetryClient) {
|
|
|
576
593
|
}
|
|
577
594
|
telemetryClient.trackCliFlagJson(parsedArguments.flags["--json"]);
|
|
578
595
|
telemetryClient.trackCliOptionFormat(parsedArguments.flags["--format"]);
|
|
596
|
+
telemetryClient.trackCliFlagFunctionsBeta(
|
|
597
|
+
parsedArguments.flags["--functions-beta"]
|
|
598
|
+
);
|
|
599
|
+
telemetryClient.trackCliFlagNoFunctionsBeta(
|
|
600
|
+
parsedArguments.flags["--no-functions-beta"]
|
|
601
|
+
);
|
|
602
|
+
const functionsBeta = parsedArguments.flags["--functions-beta"];
|
|
603
|
+
const noFunctionsBeta = parsedArguments.flags["--no-functions-beta"];
|
|
604
|
+
if (functionsBeta && noFunctionsBeta) {
|
|
605
|
+
output_manager_default.error(
|
|
606
|
+
"Cannot use --functions-beta and --no-functions-beta together"
|
|
607
|
+
);
|
|
608
|
+
return 1;
|
|
609
|
+
}
|
|
579
610
|
const formatResult = validateJsonOutput(parsedArguments.flags);
|
|
580
611
|
if (!formatResult.valid) {
|
|
581
612
|
output_manager_default.error(formatResult.error);
|
|
@@ -667,6 +698,17 @@ async function handleInitDeployment(client, telemetryClient) {
|
|
|
667
698
|
if (link.repoRoot) {
|
|
668
699
|
cwd = link.repoRoot;
|
|
669
700
|
}
|
|
701
|
+
if (functionsBeta || noFunctionsBeta) {
|
|
702
|
+
const toggleResult = await applyFunctionsBetaToggle(
|
|
703
|
+
client,
|
|
704
|
+
project,
|
|
705
|
+
functionsBeta,
|
|
706
|
+
noFunctionsBeta
|
|
707
|
+
);
|
|
708
|
+
if (toggleResult.error) {
|
|
709
|
+
return toggleResult.exitCode;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
670
712
|
const contextName = org.slug;
|
|
671
713
|
client.config.currentTeam = org.type === "team" ? org.id : void 0;
|
|
672
714
|
if (rootDirectory && await validateRootDirectory(
|
|
@@ -798,7 +840,8 @@ async function handleInitDeployment(client, telemetryClient) {
|
|
|
798
840
|
withFullLogs: false,
|
|
799
841
|
autoAssignCustomDomains,
|
|
800
842
|
manual: true,
|
|
801
|
-
jsonOutput: asJson
|
|
843
|
+
jsonOutput: asJson,
|
|
844
|
+
functionsBeta: functionsBeta || void 0
|
|
802
845
|
};
|
|
803
846
|
if (!localConfig.builds || localConfig.builds.length === 0) {
|
|
804
847
|
createArgs.projectSettings = {
|
|
@@ -1026,6 +1069,14 @@ async function handleInitDeployment(client, telemetryClient) {
|
|
|
1026
1069
|
debug(`Error: ${err}
|
|
1027
1070
|
${err.stack}`);
|
|
1028
1071
|
}
|
|
1072
|
+
if (err instanceof FunctionsSizeLimitError) {
|
|
1073
|
+
output_manager_default.prettyError(err);
|
|
1074
|
+
output_manager_default.log(
|
|
1075
|
+
'Run "vercel deploy --functions-beta" to retry with extended function limits.'
|
|
1076
|
+
);
|
|
1077
|
+
output_manager_default.log(`Learn More: ${err.link}`);
|
|
1078
|
+
return 1;
|
|
1079
|
+
}
|
|
1029
1080
|
if (err instanceof UploadErrorMissingArchive) {
|
|
1030
1081
|
output_manager_default.prettyError(err);
|
|
1031
1082
|
return 1;
|
|
@@ -1201,6 +1252,20 @@ async function handleDefaultDeploy(client, telemetryClient) {
|
|
|
1201
1252
|
telemetryClient.trackCliFlagWithCache(parsedArguments.flags["--with-cache"]);
|
|
1202
1253
|
telemetryClient.trackCliFlagJson(parsedArguments.flags["--json"]);
|
|
1203
1254
|
telemetryClient.trackCliOptionFormat(parsedArguments.flags["--format"]);
|
|
1255
|
+
telemetryClient.trackCliFlagFunctionsBeta(
|
|
1256
|
+
parsedArguments.flags["--functions-beta"]
|
|
1257
|
+
);
|
|
1258
|
+
telemetryClient.trackCliFlagNoFunctionsBeta(
|
|
1259
|
+
parsedArguments.flags["--no-functions-beta"]
|
|
1260
|
+
);
|
|
1261
|
+
const functionsBeta = parsedArguments.flags["--functions-beta"];
|
|
1262
|
+
const noFunctionsBeta = parsedArguments.flags["--no-functions-beta"];
|
|
1263
|
+
if (functionsBeta && noFunctionsBeta) {
|
|
1264
|
+
output_manager_default.error(
|
|
1265
|
+
"Cannot use --functions-beta and --no-functions-beta together"
|
|
1266
|
+
);
|
|
1267
|
+
return 1;
|
|
1268
|
+
}
|
|
1204
1269
|
const formatResult = validateJsonOutput(parsedArguments.flags);
|
|
1205
1270
|
if (!formatResult.valid) {
|
|
1206
1271
|
output_manager_default.error(formatResult.error);
|
|
@@ -1329,6 +1394,17 @@ async function handleDefaultDeploy(client, telemetryClient) {
|
|
|
1329
1394
|
if (link.repoRoot) {
|
|
1330
1395
|
cwd = link.repoRoot;
|
|
1331
1396
|
}
|
|
1397
|
+
if (functionsBeta || noFunctionsBeta) {
|
|
1398
|
+
const toggleResult = await applyFunctionsBetaToggle(
|
|
1399
|
+
client,
|
|
1400
|
+
project,
|
|
1401
|
+
functionsBeta,
|
|
1402
|
+
noFunctionsBeta
|
|
1403
|
+
);
|
|
1404
|
+
if (toggleResult.error) {
|
|
1405
|
+
return toggleResult.exitCode;
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1332
1408
|
let vercelOutputDir;
|
|
1333
1409
|
if (parsedArguments.flags["--prebuilt"]) {
|
|
1334
1410
|
vercelOutputDir = join2(cwd, ".vercel/output");
|
|
@@ -1506,7 +1582,8 @@ async function handleDefaultDeploy(client, telemetryClient) {
|
|
|
1506
1582
|
withFullLogs,
|
|
1507
1583
|
autoAssignCustomDomains,
|
|
1508
1584
|
agentName: client.agentName,
|
|
1509
|
-
jsonOutput: asJson
|
|
1585
|
+
jsonOutput: asJson,
|
|
1586
|
+
functionsBeta: functionsBeta || void 0
|
|
1510
1587
|
};
|
|
1511
1588
|
if (!localConfig.builds || localConfig.builds.length === 0) {
|
|
1512
1589
|
createArgs.projectSettings = {
|
|
@@ -1711,6 +1788,37 @@ async function handleDefaultDeploy(client, telemetryClient) {
|
|
|
1711
1788
|
debug(`Error: ${err}
|
|
1712
1789
|
${err.stack}`);
|
|
1713
1790
|
}
|
|
1791
|
+
if (err instanceof FunctionsSizeLimitError) {
|
|
1792
|
+
if (client.nonInteractive) {
|
|
1793
|
+
client.stdout.write(
|
|
1794
|
+
`${JSON.stringify(
|
|
1795
|
+
{
|
|
1796
|
+
status: AGENT_STATUS.ERROR,
|
|
1797
|
+
reason: "function_size_exceeded",
|
|
1798
|
+
message: err.message,
|
|
1799
|
+
next: [
|
|
1800
|
+
{
|
|
1801
|
+
command: getCommandNameWithGlobalFlags(
|
|
1802
|
+
"deploy --functions-beta",
|
|
1803
|
+
client.argv
|
|
1804
|
+
),
|
|
1805
|
+
when: "retry deploy with extended function limits"
|
|
1806
|
+
}
|
|
1807
|
+
]
|
|
1808
|
+
},
|
|
1809
|
+
null,
|
|
1810
|
+
2
|
|
1811
|
+
)}
|
|
1812
|
+
`
|
|
1813
|
+
);
|
|
1814
|
+
}
|
|
1815
|
+
output_manager_default.prettyError(err);
|
|
1816
|
+
log(
|
|
1817
|
+
'Run "vercel deploy --functions-beta" to retry with extended function limits.'
|
|
1818
|
+
);
|
|
1819
|
+
log(`Learn More: ${err.link}`);
|
|
1820
|
+
return 1;
|
|
1821
|
+
}
|
|
1714
1822
|
if (err instanceof UploadErrorMissingArchive) {
|
|
1715
1823
|
if (client.nonInteractive) {
|
|
1716
1824
|
client.stdout.write(
|
|
@@ -2244,6 +2352,37 @@ async function handleFailedCheckRuns(client, deployment, asJson) {
|
|
|
2244
2352
|
}
|
|
2245
2353
|
return 1;
|
|
2246
2354
|
}
|
|
2355
|
+
async function applyFunctionsBetaToggle(client, project, functionsBeta, noFunctionsBeta) {
|
|
2356
|
+
if (functionsBeta) {
|
|
2357
|
+
if (project.framework && !PYTHON_FRAMEWORKS.includes(
|
|
2358
|
+
project.framework
|
|
2359
|
+
)) {
|
|
2360
|
+
output_manager_default.error(
|
|
2361
|
+
`Extended function limits are only available for Python projects. This project uses "${project.framework}".`
|
|
2362
|
+
);
|
|
2363
|
+
return { error: true, exitCode: 1 };
|
|
2364
|
+
}
|
|
2365
|
+
if (!project.framework) {
|
|
2366
|
+
output_manager_default.warn(
|
|
2367
|
+
"Project framework is not set. Extended function limits are designed for Python projects."
|
|
2368
|
+
);
|
|
2369
|
+
}
|
|
2370
|
+
}
|
|
2371
|
+
await client.fetch(`/v9/projects/${encodeURIComponent(project.id)}`, {
|
|
2372
|
+
method: "PATCH",
|
|
2373
|
+
body: {
|
|
2374
|
+
resourceConfig: {
|
|
2375
|
+
enableFunctionsBeta: !!functionsBeta
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2378
|
+
});
|
|
2379
|
+
if (functionsBeta) {
|
|
2380
|
+
output_manager_default.log("Extended function limits (Beta) enabled for this project.");
|
|
2381
|
+
} else {
|
|
2382
|
+
output_manager_default.log("Extended function limits (Beta) disabled for this project.");
|
|
2383
|
+
}
|
|
2384
|
+
return { error: false };
|
|
2385
|
+
}
|
|
2247
2386
|
export {
|
|
2248
2387
|
deploy_default as default
|
|
2249
2388
|
};
|