vercel 59.1.4 → 59.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-PP3PJPJV.js → add-4L46WVRT.js} +5 -5
- package/dist/chunks/{add-CUGPQYFW.js → add-BBWVXE2R.js} +5 -5
- package/dist/chunks/{add-PRG4KKYH.js → add-KOD24LEM.js} +8 -8
- package/dist/chunks/{build-T22GMLY6.js → build-2SX3XIRI.js} +5 -5
- package/dist/chunks/{chunk-XZLI27ES.js → chunk-6GWLC2IP.js} +3 -3
- package/dist/chunks/{chunk-SOKQBFF7.js → chunk-7GE2K2WR.js} +239 -41
- package/dist/chunks/{chunk-7NQLRE5V.js → chunk-7PEQVFHI.js} +1 -1
- package/dist/chunks/{chunk-QD5NX7RG.js → chunk-AAMJ4ZU4.js} +1 -1
- package/dist/chunks/{chunk-M34ZRNDQ.js → chunk-ANIKVXGZ.js} +2 -2
- package/dist/chunks/{chunk-DEB45ND4.js → chunk-CURHMEJX.js} +2 -2
- package/dist/chunks/{chunk-NM43FFV6.js → chunk-CV4S27SS.js} +0 -1
- package/dist/chunks/{chunk-ECCWJHC6.js → chunk-CYNB6LL4.js} +43 -36
- package/dist/chunks/{chunk-SQGMTRZD.js → chunk-D35JUCTC.js} +641 -461
- package/dist/chunks/{chunk-5DVMXOFT.js → chunk-DAA5RXUK.js} +32 -30
- package/dist/chunks/{chunk-CSJBZKC5.js → chunk-EG5BSAXD.js} +69 -57
- package/dist/chunks/{chunk-BCZFZETZ.js → chunk-G55RLNFE.js} +5 -5
- package/dist/chunks/{chunk-TJLBCLEX.js → chunk-J5ZEHLFM.js} +1 -0
- package/dist/chunks/{chunk-QCVKGY2A.js → chunk-KAYSW4CJ.js} +35 -12
- package/dist/chunks/{chunk-DOMLWKKZ.js → chunk-KBUCAAG6.js} +17 -20
- package/dist/chunks/{chunk-VE545BR3.js → chunk-KDL2L4KL.js} +42 -39
- package/dist/chunks/{chunk-P65EEFTR.js → chunk-KQRVZWJU.js} +1 -0
- package/dist/chunks/{chunk-JYEO6OJS.js → chunk-MWYQ24FO.js} +4 -3
- package/dist/chunks/{chunk-4JKZ7SRX.js → chunk-NN2W7WFC.js} +4 -4
- package/dist/chunks/{chunk-KTLFN5FV.js → chunk-OISTYQGR.js} +1 -1
- package/dist/chunks/{chunk-ZUVJISHS.js → chunk-P3BFTZXW.js} +2 -2
- package/dist/chunks/{chunk-3BU2UCGV.js → chunk-PIMIKY4X.js} +1 -1
- package/dist/chunks/{chunk-57G6HBJ4.js → chunk-Q6QCRFTC.js} +3 -3
- package/dist/chunks/{chunk-IKKUCZE7.js → chunk-QKO2DGWR.js} +3 -3
- package/dist/chunks/{chunk-QQ6PH4RY.js → chunk-STPH4Y62.js} +10 -0
- package/dist/chunks/{chunk-P2QZZ6MR.js → chunk-TVXCXIRO.js} +1 -1
- package/dist/chunks/{chunk-43DD2KNM.js → chunk-VTP6WIQA.js} +1114 -943
- package/dist/chunks/{chunk-DOAYLTBJ.js → chunk-WNS53IOA.js} +1 -1
- package/dist/chunks/{chunk-DAWJOQF6.js → chunk-WODLA275.js} +2 -2
- package/dist/chunks/{chunk-SJQEGGH7.js → chunk-XI6NJLI4.js} +1 -1
- package/dist/chunks/{chunk-LNVZ3T7X.js → chunk-YPPWGI3F.js} +5 -5
- package/dist/chunks/{chunk-TM3F7PLR.js → chunk-Z2G6SO5B.js} +3 -3
- package/dist/chunks/{chunk-4HI7G6KG.js → chunk-ZHRZMQGN.js} +1 -1
- package/dist/chunks/{clear-Z4IKUIN7.js → clear-2DMDKLWZ.js} +5 -5
- package/dist/chunks/{compile-vercel-config-PSVXFAZW.js → compile-vercel-config-7HZ4UN6R.js} +3 -3
- package/dist/chunks/{config-M5GMZ2X5.js → config-CVZ25C54.js} +5 -5
- package/dist/chunks/{delete-P4XIBY7T.js → delete-4LQKP5DG.js} +5 -5
- package/dist/chunks/{delete-5GRRDJSF.js → delete-QNAGJM6C.js} +4 -4
- package/dist/chunks/{disable-NT5NYVO7.js → disable-2RBFIZUB.js} +4 -4
- package/dist/chunks/{discard-TBNIEAJZ.js → discard-UCOSPSUU.js} +4 -4
- package/dist/chunks/{edit-DJ6MT6HA.js → edit-JX73BG3V.js} +6 -6
- package/dist/chunks/{edit-UF3D2CCH.js → edit-QSAO74S4.js} +6 -6
- package/dist/chunks/{enable-JTQBQMBO.js → enable-NDSB4T26.js} +4 -4
- package/dist/chunks/{export-OKMRGRVM.js → export-DB6BIYQJ.js} +4 -4
- package/dist/chunks/{image-ARUJH4H5.js → image-MKB6II6L.js} +4 -4
- package/dist/chunks/{import-builders-3NTMZM64.js → import-builders-FIQ7QTVG.js} +10 -9
- package/dist/chunks/{inspect-CHFKZKKP.js → inspect-IYRKEWTM.js} +5 -5
- package/dist/chunks/{inspect-PTXIBSYW.js → inspect-NY6QRX5W.js} +5 -5
- package/dist/chunks/{inspect-RI4K77NG.js → inspect-QWTWAYLS.js} +6 -6
- package/dist/chunks/{inspect-UXP2HDES.js → inspect-REJXLWLL.js} +5 -5
- package/dist/chunks/{inspect-5NETOGAI.js → inspect-XS2TC7TC.js} +5 -5
- package/dist/chunks/{list-DYCZA2VX.js → list-CDCITV4K.js} +4 -4
- package/dist/chunks/{list-G7LGVDAJ.js → list-PXKVKXHG.js} +6 -6
- package/dist/chunks/{list-ADI55WKW.js → list-VQHBVY3Q.js} +5 -5
- package/dist/chunks/{login-YCSIQG6B.js → login-PE4JK7A2.js} +5 -5
- package/dist/chunks/{ls-VIOMDUGW.js → ls-3GRHYFDM.js} +5 -5
- package/dist/chunks/{ls-PQFDGOJL.js → ls-DL2POAY2.js} +6 -6
- package/dist/chunks/{ls-EOMIQLRH.js → ls-S67TNMEG.js} +5 -5
- package/dist/chunks/{ls-2TKUIUK4.js → ls-SKOQOPK4.js} +5 -5
- package/dist/chunks/{ls-RZVTIP5U.js → ls-YHS5IEBJ.js} +5 -5
- package/dist/chunks/{open-JYPWOXQD.js → open-DUN3BTDH.js} +5 -5
- package/dist/chunks/{permissions-SGJWGEVD.js → permissions-VLIZYINB.js} +5 -5
- package/dist/chunks/{publish-ZUQHJAXL.js → publish-36BIJPLN.js} +4 -4
- package/dist/chunks/{push-XMVKG5A5.js → push-5NTQV3EC.js} +5 -5
- package/dist/chunks/{query-ZLJZEGZB.js → query-ONR2W7HS.js} +218 -81
- package/dist/chunks/{reorder-NVHDWMRU.js → reorder-YKAT4XG3.js} +4 -4
- package/dist/chunks/{reply-PUUPUQ3V.js → reply-DH4ZPEXT.js} +6 -6
- package/dist/chunks/{resolve-5U2LJVE6.js → resolve-446IVH6V.js} +5 -5
- package/dist/chunks/{restore-OXIUY2UI.js → restore-HA6TSOOE.js} +4 -4
- package/dist/chunks/{rm-BZNKJRXU.js → rm-BCPJUK2C.js} +5 -5
- package/dist/chunks/{rm-3IOCBNPE.js → rm-COV73VE4.js} +6 -6
- package/dist/chunks/{rm-Z2KYJ7XT.js → rm-EG35766L.js} +5 -5
- package/dist/chunks/{rm-OUI4ZB5R.js → rm-IKYJI7MP.js} +5 -5
- package/dist/chunks/{routes-JP2CNQ5J.js → routes-SZI2G4SE.js} +2 -2
- package/dist/chunks/{rule-inspect-ZBJJCDQV.js → rule-inspect-FQ2635LY.js} +6 -6
- package/dist/chunks/{rules-HEGAXXUN.js → rules-PBOQISWV.js} +8 -8
- package/dist/chunks/{schema-7GVL3BNP.js → schema-4CDJVH7T.js} +22 -12
- package/dist/chunks/{schema-ZYIJYA2E.js → schema-LUVFYPWN.js} +1 -1
- package/dist/chunks/{tags-3SCWCMNQ.js → tags-HNOL4JXL.js} +3 -3
- package/dist/chunks/{update-YR2GCCJN.js → update-ZIGVLUYG.js} +8 -8
- package/dist/commands/build/index.js +3095 -2519
- package/dist/commands/deploy/index.js +12 -12
- package/dist/commands/dev/index.js +22 -15
- package/dist/commands/env/index.js +8 -8
- package/dist/commands/link/index.js +7 -7
- package/dist/commands/list/index.js +5 -5
- package/dist/commands-bulk.js +2548 -1829
- package/dist/help.js +1 -1
- package/dist/index.js +27 -15
- package/dist/runtime-assets/node-preloads/next-dev-websocket.cjs +5 -1
- package/dist/version.mjs +1 -1
- package/package.json +42 -40
|
@@ -5,18 +5,19 @@ const require = __createRequire(import.meta.url);
|
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
|
-
outputError
|
|
9
|
-
|
|
8
|
+
outputError,
|
|
9
|
+
writeJsonError
|
|
10
|
+
} from "./chunk-KQRVZWJU.js";
|
|
10
11
|
import {
|
|
12
|
+
detectExplicitScope,
|
|
11
13
|
getLinkedProject,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
getScope,
|
|
15
|
+
resolveProjectContext
|
|
16
|
+
} from "./chunk-KDL2L4KL.js";
|
|
15
17
|
import {
|
|
16
18
|
printError
|
|
17
19
|
} from "./chunk-VAFU7DXZ.js";
|
|
18
20
|
import {
|
|
19
|
-
ProjectNotFound,
|
|
20
21
|
getCommandName,
|
|
21
22
|
isAPIError
|
|
22
23
|
} from "./chunk-SOFC4MLS.js";
|
|
@@ -111,28 +112,18 @@ function toApiErrorParts(err) {
|
|
|
111
112
|
|
|
112
113
|
// src/commands/comments/scope.ts
|
|
113
114
|
import { spawnSync } from "child_process";
|
|
114
|
-
function scopeIsExplicit(client) {
|
|
115
|
-
return client.argv.some(
|
|
116
|
-
(arg) => arg === "--scope" || arg === "-S" || arg.startsWith("--scope=") || arg === "--team" || arg.startsWith("--team=") || arg === "-T"
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
115
|
async function resolveCommentsScope(client, opts) {
|
|
120
|
-
if (opts.urlTeamSlug && !opts.project && !
|
|
116
|
+
if (opts.urlTeamSlug && !opts.project && !detectExplicitScope(client)) {
|
|
121
117
|
return { teamId: opts.urlTeamSlug, teamSlug: opts.urlTeamSlug };
|
|
122
118
|
}
|
|
123
119
|
if (opts.project) {
|
|
124
|
-
|
|
125
|
-
if (!team2) {
|
|
126
|
-
return outputError(
|
|
127
|
-
client,
|
|
128
|
-
opts.jsonOutput,
|
|
129
|
-
"NO_TEAM",
|
|
130
|
-
"No team context found. Run `vercel switch` to select a team, or run `vercel link` in a project directory."
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
let project;
|
|
120
|
+
let context;
|
|
134
121
|
try {
|
|
135
|
-
|
|
122
|
+
context = await resolveProjectContext({
|
|
123
|
+
client,
|
|
124
|
+
projectNameOrId: opts.project,
|
|
125
|
+
projectNotFoundHandling: opts.jsonOutput ? "return" : "report"
|
|
126
|
+
});
|
|
136
127
|
} catch (err) {
|
|
137
128
|
if (isAPIError(err)) {
|
|
138
129
|
return outputError(
|
|
@@ -144,19 +135,30 @@ async function resolveCommentsScope(client, opts) {
|
|
|
144
135
|
}
|
|
145
136
|
throw err;
|
|
146
137
|
}
|
|
147
|
-
if (
|
|
138
|
+
if (context.status === "error") {
|
|
139
|
+
if (opts.jsonOutput) {
|
|
140
|
+
writeJsonError(
|
|
141
|
+
client,
|
|
142
|
+
"PROJECT_CONTEXT_ERROR",
|
|
143
|
+
"Could not resolve the project context."
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
return context.exitCode;
|
|
147
|
+
}
|
|
148
|
+
if (context.status === "not_linked") {
|
|
148
149
|
return outputError(
|
|
149
150
|
client,
|
|
150
151
|
opts.jsonOutput,
|
|
151
152
|
"PROJECT_NOT_FOUND",
|
|
152
|
-
`Project "${opts.project}" was not found in
|
|
153
|
+
`Project "${opts.project}" was not found in the current scope.`
|
|
153
154
|
);
|
|
154
155
|
}
|
|
155
156
|
return {
|
|
156
|
-
teamId:
|
|
157
|
-
teamSlug:
|
|
158
|
-
projectId: project.id,
|
|
159
|
-
projectName: project.name
|
|
157
|
+
teamId: context.org.id,
|
|
158
|
+
teamSlug: context.org.slug,
|
|
159
|
+
projectId: context.project.id,
|
|
160
|
+
projectName: context.project.name,
|
|
161
|
+
linked: Boolean(context.repoRoot)
|
|
160
162
|
};
|
|
161
163
|
}
|
|
162
164
|
const linked = await getLinkedProject(client);
|
|
@@ -164,7 +166,7 @@ async function resolveCommentsScope(client, opts) {
|
|
|
164
166
|
return linked.exitCode;
|
|
165
167
|
}
|
|
166
168
|
if (linked.status === "linked") {
|
|
167
|
-
if (
|
|
169
|
+
if (detectExplicitScope(client)) {
|
|
168
170
|
const { team: team2 } = await getScope(client);
|
|
169
171
|
if (!team2) {
|
|
170
172
|
return outputError(
|
|
@@ -83,7 +83,7 @@ var metricsCommand = {
|
|
|
83
83
|
shorthand: null,
|
|
84
84
|
type: String,
|
|
85
85
|
deprecated: false,
|
|
86
|
-
description: "Order grouped results by value or count (default: count)",
|
|
86
|
+
description: "Order grouped results by value or count (default: count, or value when count is unsupported)",
|
|
87
87
|
argument: "value|count"
|
|
88
88
|
},
|
|
89
89
|
{
|
|
@@ -99,7 +99,9 @@ var metricsCommand = {
|
|
|
99
99
|
shorthand: "f",
|
|
100
100
|
type: [String],
|
|
101
101
|
deprecated: false,
|
|
102
|
-
description
|
|
102
|
+
get description() {
|
|
103
|
+
return process.env.FF_METRICS ? "KQL filter expression (repeatable, ANDed together)" : "OData filter expression (repeatable, ANDed together)";
|
|
104
|
+
},
|
|
103
105
|
argument: "EXPR"
|
|
104
106
|
},
|
|
105
107
|
{
|
|
@@ -107,7 +109,7 @@ var metricsCommand = {
|
|
|
107
109
|
shorthand: null,
|
|
108
110
|
type: Boolean,
|
|
109
111
|
deprecated: false,
|
|
110
|
-
description:
|
|
112
|
+
description: "Limit query to the production environment"
|
|
111
113
|
},
|
|
112
114
|
{
|
|
113
115
|
name: "since",
|
|
@@ -155,60 +157,70 @@ var metricsCommand = {
|
|
|
155
157
|
formatOption,
|
|
156
158
|
jsonOption
|
|
157
159
|
],
|
|
158
|
-
examples
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
160
|
+
get examples() {
|
|
161
|
+
const canonical = Boolean(process.env.FF_METRICS);
|
|
162
|
+
const httpStatus = canonical ? "httpStatus" : "http_status";
|
|
163
|
+
const errorCode = canonical ? "errorCode" : "error_code";
|
|
164
|
+
const aiProvider = canonical ? "aiProvider" : "ai_provider";
|
|
165
|
+
const visitorId = canonical ? "visitorId" : "visitor_id";
|
|
166
|
+
const projectId = canonical ? "projectId" : "project_id";
|
|
167
|
+
const statusFilter = canonical ? "httpStatus >= 500" : "http_status ge 500";
|
|
168
|
+
const routeFilter = canonical ? `'route:"/api"'` : `"contains(request_path, '/api')"`;
|
|
169
|
+
return [
|
|
170
|
+
{
|
|
171
|
+
name: "5xx errors by error code in the last hour",
|
|
172
|
+
value: `${packageName} metrics vercel.function_invocation.count -f "${statusFilter}" --group-by ${errorCode} --since 1h`
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: "Function invocations by HTTP status code",
|
|
176
|
+
value: `${packageName} metrics vercel.function_invocation.count --group-by ${httpStatus} --since 6h`
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: "Function duration by route",
|
|
180
|
+
value: `${packageName} metrics vercel.function_invocation.function_duration_ms -a avg --group-by route --since 1h`
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: "AI Gateway costs by provider",
|
|
184
|
+
value: `${packageName} metrics vercel.ai_gateway_request.cost -a sum --group-by ${aiProvider} --since 7d`
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: "Core Web Vitals (LCP) by route",
|
|
188
|
+
value: `${packageName} metrics vercel.speed_insights.lcp_ms -a p75 --prod --group-by route --since 7d`
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: "Routes with the lowest p75 LCP",
|
|
192
|
+
value: `${packageName} metrics vercel.speed_insights.lcp_ms -a p75 --prod --group-by route --since 7d --order-by value --order asc`
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: canonical ? "Daily pageviews" : "Daily pageviews with a Paris-aligned bucket",
|
|
196
|
+
value: canonical ? `${packageName} metrics vercel.analytics_pageview.count --since 2026-05-28 --until 2026-05-29 --granularity 1d` : `${packageName} metrics vercel.analytics_pageview.count --since 2026-05-28 --until 2026-05-29 --granularity 1d --bucket-timezone Europe/Paris`
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: "Visitors time series from the top 5 countries",
|
|
200
|
+
value: `${packageName} metrics vercel.analytics_pageview.count -a unique/${visitorId} --group-by country --since 1d --granularity 1h --limit 5`
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: "List available metrics",
|
|
204
|
+
value: `${packageName} metrics schema`
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: "Function executions matching an API route",
|
|
208
|
+
value: `${packageName} metrics vercel.function_invocation.count -f ${routeFilter} --group-by route --since 1h`
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "Function executions matching multiple filters",
|
|
212
|
+
value: `${packageName} metrics vercel.function_invocation.count -f "${statusFilter}" -f ${routeFilter} --since 1h`
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: "Show schema for a metric prefix",
|
|
216
|
+
value: `${packageName} metrics schema vercel.request`
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: "Team-wide function executions by project",
|
|
220
|
+
value: `${packageName} metrics --all vercel.function_invocation.count --group-by ${projectId} --since 24h`
|
|
221
|
+
}
|
|
222
|
+
];
|
|
223
|
+
}
|
|
212
224
|
};
|
|
213
225
|
|
|
214
226
|
export {
|
|
@@ -9,19 +9,19 @@ import {
|
|
|
9
9
|
} from "./chunk-PRWJUY5U.js";
|
|
10
10
|
import {
|
|
11
11
|
progress
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NN2W7WFC.js";
|
|
13
13
|
import {
|
|
14
14
|
isJSONObject,
|
|
15
15
|
printIndications,
|
|
16
16
|
require_dist as require_dist2,
|
|
17
17
|
sleep
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WODLA275.js";
|
|
19
19
|
import {
|
|
20
20
|
suggestNextCommands
|
|
21
21
|
} from "./chunk-XBN2O34P.js";
|
|
22
22
|
import {
|
|
23
23
|
CommandTimeout
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7GE2K2WR.js";
|
|
25
25
|
import {
|
|
26
26
|
showPluginTipIfNeeded
|
|
27
27
|
} from "./chunk-HT2XWSAJ.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
require_dist as require_dist3,
|
|
39
39
|
require_pluralize,
|
|
40
40
|
ua_default
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-KDL2L4KL.js";
|
|
42
42
|
import {
|
|
43
43
|
require_ms
|
|
44
44
|
} from "./chunk-GGP5R3FU.js";
|
|
@@ -1888,7 +1888,7 @@ async function purchaseDomain(client, name, expectedPrice, years, autoRenew = tr
|
|
|
1888
1888
|
return domain2;
|
|
1889
1889
|
}
|
|
1890
1890
|
}
|
|
1891
|
-
if (order.error?.code === "
|
|
1891
|
+
if (order.error?.code === "payment-failed") {
|
|
1892
1892
|
return new DomainPaymentError();
|
|
1893
1893
|
}
|
|
1894
1894
|
return new UnexpectedDomainPurchaseError(name);
|
|
@@ -556,6 +556,7 @@ var AGENT_REASON = {
|
|
|
556
556
|
MISSING_ARGUMENTS: "missing_arguments",
|
|
557
557
|
INVALID_ARGUMENTS: "invalid_arguments",
|
|
558
558
|
CONFIRMATION_REQUIRED: "confirmation_required",
|
|
559
|
+
INTERACTIVE_CONFIRMATION_REQUIRED: "interactive_confirmation_required",
|
|
559
560
|
LOGIN_REQUIRED: "login_required",
|
|
560
561
|
PROJECT_SETTINGS_REQUIRED: "project_settings_required",
|
|
561
562
|
NOT_LINKED: "not_linked",
|
|
@@ -7,7 +7,7 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
formatErrorJson,
|
|
9
9
|
handleApiError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CV4S27SS.js";
|
|
11
11
|
import {
|
|
12
12
|
isAPIError
|
|
13
13
|
} from "./chunk-SOFC4MLS.js";
|
|
@@ -38,13 +38,13 @@ async function fetchMetricList(client, accountId) {
|
|
|
38
38
|
);
|
|
39
39
|
return metrics;
|
|
40
40
|
}
|
|
41
|
-
async function
|
|
41
|
+
async function fetchMetricCatalog(client, accountId, kind, search, activeSince) {
|
|
42
42
|
const metrics = [];
|
|
43
43
|
let cursor = null;
|
|
44
44
|
do {
|
|
45
45
|
const searchParams = new URLSearchParams({
|
|
46
46
|
limit: String(METRIC_CATALOG_PAGE_SIZE),
|
|
47
|
-
kind
|
|
47
|
+
kind
|
|
48
48
|
});
|
|
49
49
|
if (search) {
|
|
50
50
|
searchParams.set("search", search);
|
|
@@ -71,16 +71,22 @@ async function fetchCustomMetricCatalog(client, accountId, search, activeSince)
|
|
|
71
71
|
cursor = response.pagination.hasMore ? response.pagination.nextCursor : null;
|
|
72
72
|
} while (cursor);
|
|
73
73
|
return metrics.filter(
|
|
74
|
-
(metric) => !metric.id.startsWith("vercel.") && (!search || metric.id.startsWith(search))
|
|
74
|
+
(metric) => (kind === "all" || (kind === "system" ? metric.id.startsWith("vercel.") : !metric.id.startsWith("vercel."))) && (!search || metric.id.startsWith(search))
|
|
75
75
|
).sort((left, right) => left.id.localeCompare(right.id));
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
function fetchCustomMetricCatalog(client, accountId, search, activeSince) {
|
|
78
|
+
return fetchMetricCatalog(client, accountId, "custom", search, activeSince);
|
|
79
|
+
}
|
|
80
|
+
async function fetchCatalogMetricDetail(client, accountId, metricId, kind, activeSince) {
|
|
81
|
+
const metrics = await fetchMetricCatalog(
|
|
82
|
+
client,
|
|
83
|
+
accountId,
|
|
84
|
+
kind,
|
|
85
|
+
metricId,
|
|
86
|
+
activeSince
|
|
87
|
+
);
|
|
79
88
|
const exactMetric = metrics.find((metric) => metric.id === metricId);
|
|
80
|
-
|
|
81
|
-
return metrics;
|
|
82
|
-
}
|
|
83
|
-
return [exactMetric];
|
|
89
|
+
return exactMetric ? [exactMetric] : metrics;
|
|
84
90
|
}
|
|
85
91
|
async function fetchMetricDetail(client, accountId, metricId) {
|
|
86
92
|
const detail = await client.fetch(
|
|
@@ -118,7 +124,23 @@ function fetchCustomMetricDetailOrExit(client, accountId, jsonOutput, metricId)
|
|
|
118
124
|
return fetchSchemaOrExit(
|
|
119
125
|
client,
|
|
120
126
|
jsonOutput,
|
|
121
|
-
() =>
|
|
127
|
+
() => fetchCatalogMetricDetail(client, accountId, metricId, "custom")
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
function fetchCatalogMetricDetailOrExit(client, accountId, jsonOutput, metricId, kind, activeSince) {
|
|
131
|
+
return fetchSchemaOrExit(
|
|
132
|
+
client,
|
|
133
|
+
jsonOutput,
|
|
134
|
+
() => fetchCatalogMetricDetail(client, accountId, metricId, kind, activeSince)
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
function fetchMetricCatalogListOrExit(client, accountId, jsonOutput) {
|
|
138
|
+
return fetchSchemaOrExit(
|
|
139
|
+
client,
|
|
140
|
+
jsonOutput,
|
|
141
|
+
() => fetchMetricCatalog(client, accountId, "all").then(
|
|
142
|
+
(metrics) => metrics.map(({ id, description }) => ({ id, description }))
|
|
143
|
+
)
|
|
122
144
|
);
|
|
123
145
|
}
|
|
124
146
|
function fetchCombinedMetricListOrExit(client, accountId, jsonOutput) {
|
|
@@ -144,8 +166,9 @@ async function fetchMetricDetailOrExit(client, accountId, metricId, jsonOutput)
|
|
|
144
166
|
export {
|
|
145
167
|
OBSERVABILITY_METRICS_PATH,
|
|
146
168
|
getDefaultAggregation,
|
|
147
|
-
fetchCustomMetricCatalog,
|
|
148
169
|
fetchCustomMetricDetailOrExit,
|
|
170
|
+
fetchCatalogMetricDetailOrExit,
|
|
171
|
+
fetchMetricCatalogListOrExit,
|
|
149
172
|
fetchCombinedMetricListOrExit,
|
|
150
173
|
fetchMetricDetailOrExit
|
|
151
174
|
};
|
|
@@ -7,14 +7,14 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getUpdateCommandInfo,
|
|
9
9
|
isGlobal
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ANIKVXGZ.js";
|
|
11
11
|
import {
|
|
12
12
|
progress,
|
|
13
13
|
require_ci_info
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NN2W7WFC.js";
|
|
15
15
|
import {
|
|
16
16
|
writeToConfigFile
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WODLA275.js";
|
|
18
18
|
import {
|
|
19
19
|
getGlobalPathConfig
|
|
20
20
|
} from "./chunk-JKQWQA2T.js";
|
|
@@ -24,23 +24,24 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
apiCommand,
|
|
26
26
|
listSubcommand4 as listSubcommand
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-7GE2K2WR.js";
|
|
28
28
|
import {
|
|
29
29
|
require_semver
|
|
30
30
|
} from "./chunk-IB5L4LKZ.js";
|
|
31
31
|
import {
|
|
32
32
|
help
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-XI6NJLI4.js";
|
|
34
34
|
import {
|
|
35
35
|
require_chownr,
|
|
36
36
|
require_mkdirp,
|
|
37
37
|
require_pump,
|
|
38
38
|
require_tar_stream
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-KDL2L4KL.js";
|
|
40
40
|
import {
|
|
41
41
|
TelemetryClient,
|
|
42
|
+
getInstallRoot,
|
|
42
43
|
isNativeBinaryInstall
|
|
43
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-CYNB6LL4.js";
|
|
44
45
|
import {
|
|
45
46
|
require_ms
|
|
46
47
|
} from "./chunk-GGP5R3FU.js";
|
|
@@ -2804,7 +2805,7 @@ function renderUpgradeProgress(current, total, phase) {
|
|
|
2804
2805
|
);
|
|
2805
2806
|
}
|
|
2806
2807
|
function execFileStdout(command, args) {
|
|
2807
|
-
return new Promise((
|
|
2808
|
+
return new Promise((resolve3, reject) => {
|
|
2808
2809
|
execFile(
|
|
2809
2810
|
command,
|
|
2810
2811
|
args,
|
|
@@ -2814,7 +2815,7 @@ function execFileStdout(command, args) {
|
|
|
2814
2815
|
reject(error);
|
|
2815
2816
|
return;
|
|
2816
2817
|
}
|
|
2817
|
-
|
|
2818
|
+
resolve3(stdout.toString());
|
|
2818
2819
|
}
|
|
2819
2820
|
);
|
|
2820
2821
|
});
|
|
@@ -2882,7 +2883,7 @@ async function executeUpgrade(targetVersion) {
|
|
|
2882
2883
|
}
|
|
2883
2884
|
output_manager_default.debug(`Executing: ${updateCommand} (cwd: ${cwd})`);
|
|
2884
2885
|
renderUpgradeProgress(targetVersion ? 1 : 2, totalSteps, "Installing\u2026");
|
|
2885
|
-
return new Promise((
|
|
2886
|
+
return new Promise((resolve3) => {
|
|
2886
2887
|
const stdout = [];
|
|
2887
2888
|
const stderr = [];
|
|
2888
2889
|
const upgradeProcess = spawn(command, args, {
|
|
@@ -2902,7 +2903,7 @@ async function executeUpgrade(targetVersion) {
|
|
|
2902
2903
|
output_manager_default.stopSpinner();
|
|
2903
2904
|
output_manager_default.error(`Failed to execute upgrade command: ${err.message}`);
|
|
2904
2905
|
output_manager_default.log(`You can try running the command manually: ${updateCommand}`);
|
|
2905
|
-
|
|
2906
|
+
resolve3(1);
|
|
2906
2907
|
});
|
|
2907
2908
|
upgradeProcess.on("close", (code) => {
|
|
2908
2909
|
if (code !== 0) {
|
|
@@ -2919,7 +2920,7 @@ async function executeUpgrade(targetVersion) {
|
|
|
2919
2920
|
output_manager_default.log(
|
|
2920
2921
|
`You can try running the command manually: ${updateCommand}`
|
|
2921
2922
|
);
|
|
2922
|
-
|
|
2923
|
+
resolve3(code ?? 1);
|
|
2923
2924
|
return;
|
|
2924
2925
|
}
|
|
2925
2926
|
renderUpgradeProgress(totalSteps, totalSteps);
|
|
@@ -2928,11 +2929,11 @@ async function executeUpgrade(targetVersion) {
|
|
|
2928
2929
|
output_manager_default.success(
|
|
2929
2930
|
`Vercel CLI has been upgraded to v${resolvedTargetVersion} successfully!`
|
|
2930
2931
|
);
|
|
2931
|
-
|
|
2932
|
+
resolve3(0);
|
|
2932
2933
|
return;
|
|
2933
2934
|
}
|
|
2934
2935
|
output_manager_default.success("Vercel CLI has been upgraded successfully!");
|
|
2935
|
-
|
|
2936
|
+
resolve3(0);
|
|
2936
2937
|
});
|
|
2937
2938
|
});
|
|
2938
2939
|
}
|
|
@@ -2946,8 +2947,8 @@ var import_semver2 = __toESM(require_semver(), 1);
|
|
|
2946
2947
|
import { createGunzip } from "zlib";
|
|
2947
2948
|
import { createHash as createHash2 } from "crypto";
|
|
2948
2949
|
import { createWriteStream } from "fs";
|
|
2949
|
-
import {
|
|
2950
|
-
import { join as join2,
|
|
2950
|
+
import { tmpdir as tmpdir2 } from "os";
|
|
2951
|
+
import { join as join2, sep } from "path";
|
|
2951
2952
|
import { pipeline } from "stream/promises";
|
|
2952
2953
|
import {
|
|
2953
2954
|
chmod,
|
|
@@ -2984,10 +2985,6 @@ var SUPPORTED_PLATFORMS = /* @__PURE__ */ new Set([
|
|
|
2984
2985
|
"linux-arm64",
|
|
2985
2986
|
"linux-x64"
|
|
2986
2987
|
]);
|
|
2987
|
-
function getInstallRoot() {
|
|
2988
|
-
const root = process.env.VERCEL_INSTALL_DIR;
|
|
2989
|
-
return root ? resolve3(root) : join2(homedir(), ".vercel");
|
|
2990
|
-
}
|
|
2991
2988
|
function platformTarget() {
|
|
2992
2989
|
return `${process.platform}-${process.arch}`;
|
|
2993
2990
|
}
|