vercel 56.3.2 → 56.4.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-2ITAPI7M.js → add-L3Z6PL54.js} +3 -3
- package/dist/chunks/{add-DVEAUH7N.js → add-RFEJCIBM.js} +2 -2
- package/dist/chunks/{chunk-BFFE4FAO.js → chunk-43B3LNUF.js} +1 -1
- package/dist/chunks/{chunk-FPMWXL3R.js → chunk-4M3ZQCYN.js} +63 -6
- package/dist/chunks/{chunk-TVLLFY7M.js → chunk-5EXIJBLL.js} +5 -5
- package/dist/chunks/{chunk-4Z5LC2CI.js → chunk-6RTK6BWX.js} +4 -96
- package/dist/chunks/{chunk-AVJRWFTM.js → chunk-A4XB42AB.js} +1 -1
- package/dist/chunks/{chunk-3OZQ7KHZ.js → chunk-CHZBEMLF.js} +2 -2
- package/dist/chunks/{chunk-O3UHQI3T.js → chunk-DXFSBJTA.js} +1 -1
- package/dist/chunks/{chunk-QW4XUBC3.js → chunk-F32B76CK.js} +1 -1
- package/dist/chunks/{query-K2TJKOAL.js → chunk-F5OMERHI.js} +65 -411
- package/dist/chunks/{chunk-5POUHPEH.js → chunk-GKVAAY2A.js} +1 -1
- package/dist/chunks/{chunk-HZAINEXG.js → chunk-GLAHGVBS.js} +6 -2
- package/dist/chunks/{chunk-573XYQ3D.js → chunk-HZKJMZEQ.js} +2 -2
- package/dist/chunks/{chunk-2CEGMXO6.js → chunk-IHQ7DPQI.js} +76 -2
- package/dist/chunks/{chunk-JQBH4QTB.js → chunk-J6KTUJHV.js} +1 -1
- package/dist/chunks/{chunk-WQN52QMS.js → chunk-MQRHJEBS.js} +2 -2
- package/dist/chunks/{chunk-GB3QQGZU.js → chunk-NLRIKNPX.js} +1 -1
- package/dist/chunks/{chunk-ZKKJEOQT.js → chunk-OOD67FAL.js} +1 -1
- package/dist/chunks/{chunk-5FF4WXVM.js → chunk-UHGAPG7O.js} +4 -4
- package/dist/chunks/{chunk-BZXHF66T.js → chunk-VLTQJKP6.js} +1 -1
- package/dist/chunks/{chunk-OK6EYKRX.js → chunk-XFGY3JAX.js} +1 -1
- package/dist/chunks/{chunk-SRIA62TV.js → chunk-Y7TVKRRJ.js} +3 -3
- package/dist/chunks/chunk-Z7NPYIZ6.js +116 -0
- package/dist/chunks/{compile-vercel-config-P3KRRAC6.js → compile-vercel-config-J2X5OV6K.js} +1 -1
- package/dist/chunks/{delete-OXEMVOQE.js → delete-57A44RN7.js} +2 -2
- package/dist/chunks/{disable-DZA53CJA.js → disable-DNZ52MEO.js} +2 -2
- package/dist/chunks/{discard-3E7Z7CKD.js → discard-HACSIZ74.js} +2 -2
- package/dist/chunks/{edit-UM6TWX2Z.js → edit-HJ47TQU3.js} +3 -3
- package/dist/chunks/{enable-3SH6X23Z.js → enable-BVLRVRYM.js} +2 -2
- package/dist/chunks/{export-TLQERLQP.js → export-7MJFGMG7.js} +2 -2
- package/dist/chunks/{image-YKGEEC2A.js → image-4UMD7UZP.js} +3 -3
- package/dist/chunks/{inspect-652QJ33O.js → inspect-4JD2QN67.js} +2 -2
- package/dist/chunks/{inspect-S6X6PCGS.js → inspect-5YZP7IWI.js} +2 -2
- package/dist/chunks/{inspect-34OE66PO.js → inspect-WBHUZC3R.js} +2 -2
- package/dist/chunks/{inspect-QW6RSV7Z.js → inspect-XX3OXSHC.js} +2 -2
- package/dist/chunks/{list-OVWTXBSN.js → list-5H57NTM4.js} +1 -1
- package/dist/chunks/{list-IWXFZBH7.js → list-AM6K2JCW.js} +2 -2
- package/dist/chunks/{login-S77F2DLW.js → login-YO34E4V5.js} +2 -2
- package/dist/chunks/{ls-SAY4VQIT.js → ls-44NPIO2N.js} +2 -2
- package/dist/chunks/{ls-J4HHGSFU.js → ls-MB74DIQV.js} +3 -3
- package/dist/chunks/{ls-FQIWFI4K.js → ls-P7ZLBWW2.js} +2 -2
- package/dist/chunks/{ls-PQPRURTJ.js → ls-YDUYTLXW.js} +2 -2
- package/dist/chunks/{publish-LWCEDLGX.js → publish-RXFUYSW3.js} +2 -2
- package/dist/chunks/query-ILJJL3BZ.js +391 -0
- package/dist/chunks/{reorder-J6OONT76.js → reorder-GBCOPZT4.js} +2 -2
- package/dist/chunks/{restore-3ME4ZHFW.js → restore-YK5DGGRX.js} +2 -2
- package/dist/chunks/{rm-XOUHC6CU.js → rm-FRZMXB2W.js} +3 -3
- package/dist/chunks/{rm-63AGQFIQ.js → rm-LK6P7XTA.js} +2 -2
- package/dist/chunks/{rm-EHEJRXQJ.js → rm-O474MI5C.js} +2 -2
- package/dist/chunks/{rule-inspect-3PRCEXIB.js → rule-inspect-YEZGYINZ.js} +3 -3
- package/dist/chunks/{rules-UBSIW5ZQ.js → rules-MZ2MP6KJ.js} +6 -6
- package/dist/chunks/{schema-I4SXEWLS.js → schema-FR6CCQIZ.js} +5 -5
- package/dist/chunks/{tags-HF2YOQ4V.js → tags-AKRTKFRV.js} +2 -2
- package/dist/chunks/{update-RRMAOQDP.js → update-W3CWQB2F.js} +3 -3
- package/dist/commands/build/index.js +9 -9
- package/dist/commands/deploy/index.js +9 -9
- package/dist/commands/dev/index.js +7 -7
- package/dist/commands/env/index.js +4 -4
- package/dist/commands/link/index.js +6 -6
- package/dist/commands/list/index.js +2 -2
- package/dist/commands-bulk.js +411 -48
- package/dist/index.js +7 -7
- package/dist/vc.js +6 -1
- package/dist/version.mjs +1 -1
- package/package.json +86 -6
- package/dist/chunks/chunk-A3NYPUKZ.js +0 -17
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
handleRulesApiError,
|
|
10
10
|
parseRulesFlagsAndScope,
|
|
11
11
|
rulesCollectionPath
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-A4XB42AB.js";
|
|
13
|
+
import "./chunk-XFGY3JAX.js";
|
|
14
14
|
import "./chunk-BUZRVER7.js";
|
|
15
15
|
import {
|
|
16
16
|
validateJsonOutput
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
rulesAddSubcommand
|
|
20
20
|
} from "./chunk-STJJ3DFO.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-GLAHGVBS.js";
|
|
22
22
|
import {
|
|
23
23
|
AGENT_REASON,
|
|
24
24
|
buildCommandWithGlobalFlags,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
handleVcrApiError,
|
|
10
10
|
resolveVcrScope,
|
|
11
11
|
validateVcrJsonOutput
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NLRIKNPX.js";
|
|
13
13
|
import {
|
|
14
14
|
outputError
|
|
15
15
|
} from "./chunk-BUZRVER7.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-3VS4DTAU.js";
|
|
20
20
|
import "./chunk-GIL3VAUR.js";
|
|
21
21
|
import "./chunk-FYQPTH5C.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-GLAHGVBS.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENT_REASON,
|
|
25
25
|
buildCommandWithGlobalFlags,
|
|
@@ -19,12 +19,15 @@ import {
|
|
|
19
19
|
require_lib,
|
|
20
20
|
require_minimatch,
|
|
21
21
|
require_pluralize
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GLAHGVBS.js";
|
|
23
23
|
import {
|
|
24
24
|
CantParseJSONFile,
|
|
25
25
|
cmd,
|
|
26
26
|
code
|
|
27
27
|
} from "./chunk-KSSNLCL4.js";
|
|
28
|
+
import {
|
|
29
|
+
pkg_default
|
|
30
|
+
} from "./chunk-P4QNYOFB.js";
|
|
28
31
|
import {
|
|
29
32
|
output_manager_default,
|
|
30
33
|
require_dist
|
|
@@ -10903,7 +10906,7 @@ function notNull(value) {
|
|
|
10903
10906
|
|
|
10904
10907
|
// src/util/build/import-builders.ts
|
|
10905
10908
|
var import_npm_package_arg = __toESM(require_npa(), 1);
|
|
10906
|
-
var
|
|
10909
|
+
var import_semver2 = __toESM(require_semver(), 1);
|
|
10907
10910
|
var import_fs_extra3 = __toESM(require_lib(), 1);
|
|
10908
10911
|
var import_fs_detectors = __toESM(require_dist3(), 1);
|
|
10909
10912
|
import { dirname, join as join2 } from "path";
|
|
@@ -10975,6 +10978,7 @@ var import_error_utils2 = __toESM(require_dist(), 1);
|
|
|
10975
10978
|
|
|
10976
10979
|
// src/util/build/install-builders.ts
|
|
10977
10980
|
var import_pluralize = __toESM(require_pluralize(), 1);
|
|
10981
|
+
var import_semver = __toESM(require_semver(), 1);
|
|
10978
10982
|
var import_fs_extra2 = __toESM(require_lib(), 1);
|
|
10979
10983
|
var import_execa = __toESM(require_execa(), 1);
|
|
10980
10984
|
import { URL } from "url";
|
|
@@ -11009,10 +11013,12 @@ async function untracedInstallBuilders(buildersDir, buildersToAdd) {
|
|
|
11009
11013
|
buildersToAdd
|
|
11010
11014
|
).join(", ")}`
|
|
11011
11015
|
);
|
|
11016
|
+
const buildUtilsVersion = pkg_default.dependencies?.["@vercel/build-utils"];
|
|
11017
|
+
const buildUtilsSpec = buildUtilsVersion && (0, import_semver.validRange)(buildUtilsVersion) ? `@vercel/build-utils@${buildUtilsVersion}` : "@vercel/build-utils";
|
|
11012
11018
|
try {
|
|
11013
11019
|
const { stderr } = await (0, import_execa.default)(
|
|
11014
11020
|
"npm",
|
|
11015
|
-
["install",
|
|
11021
|
+
["install", buildUtilsSpec, ...buildersToAdd],
|
|
11016
11022
|
{
|
|
11017
11023
|
cwd: buildersDir,
|
|
11018
11024
|
stdio: "pipe",
|
|
@@ -11095,14 +11101,45 @@ async function installBuilders(buildersDir, buildersToAdd, span, installReasons)
|
|
|
11095
11101
|
|
|
11096
11102
|
// src/util/build/import-builders.ts
|
|
11097
11103
|
var require_ = createRequire(__filename);
|
|
11104
|
+
var builderPins;
|
|
11105
|
+
function getBuilderPins() {
|
|
11106
|
+
if (!builderPins) {
|
|
11107
|
+
builderPins = /* @__PURE__ */ new Map();
|
|
11108
|
+
const peerDependencies = pkg_default.peerDependencies ?? {};
|
|
11109
|
+
for (const [name, version2] of Object.entries(peerDependencies)) {
|
|
11110
|
+
if ((0, import_semver2.validRange)(version2)) {
|
|
11111
|
+
builderPins.set(name, version2);
|
|
11112
|
+
}
|
|
11113
|
+
}
|
|
11114
|
+
}
|
|
11115
|
+
return builderPins;
|
|
11116
|
+
}
|
|
11117
|
+
function isBareSpec(parsed) {
|
|
11118
|
+
return parsed.type === "tag" && parsed.rawSpec === "";
|
|
11119
|
+
}
|
|
11120
|
+
function pinBuilderSpecs(specs) {
|
|
11121
|
+
const pins = getBuilderPins();
|
|
11122
|
+
const pinnedSpecs = /* @__PURE__ */ new Map();
|
|
11123
|
+
for (const spec of specs) {
|
|
11124
|
+
const parsed = (0, import_npm_package_arg.default)(spec);
|
|
11125
|
+
if (parsed.name && isBareSpec(parsed)) {
|
|
11126
|
+
const version2 = pins.get(parsed.name);
|
|
11127
|
+
if (version2) {
|
|
11128
|
+
pinnedSpecs.set(spec, `${parsed.name}@${version2}`);
|
|
11129
|
+
}
|
|
11130
|
+
}
|
|
11131
|
+
}
|
|
11132
|
+
return pinnedSpecs;
|
|
11133
|
+
}
|
|
11098
11134
|
async function importBuilders(builderSpecs, cwd, span) {
|
|
11099
11135
|
const buildersDir = join2(cwd, VERCEL_DIR, "builders");
|
|
11100
11136
|
let importResult = await resolveBuilders(buildersDir, builderSpecs);
|
|
11101
11137
|
if ("buildersToAdd" in importResult) {
|
|
11102
11138
|
const { buildersToAdd, installReasons } = importResult;
|
|
11139
|
+
const pinnedSpecs = pinBuilderSpecs(buildersToAdd);
|
|
11103
11140
|
const installResult = await installBuilders(
|
|
11104
11141
|
buildersDir,
|
|
11105
|
-
buildersToAdd,
|
|
11142
|
+
new Set(Array.from(buildersToAdd, (spec) => pinnedSpecs.get(spec) ?? spec)),
|
|
11106
11143
|
span,
|
|
11107
11144
|
installReasons
|
|
11108
11145
|
);
|
|
@@ -11112,7 +11149,18 @@ async function importBuilders(builderSpecs, cwd, span) {
|
|
|
11112
11149
|
installResult
|
|
11113
11150
|
);
|
|
11114
11151
|
if ("buildersToAdd" in importResult) {
|
|
11115
|
-
|
|
11152
|
+
const { buildersToAdd: failed, installReasons: reasons } = importResult;
|
|
11153
|
+
const failures = Array.from(failed, (spec) => {
|
|
11154
|
+
const reason = reasons.get(spec);
|
|
11155
|
+
return reason ? `${spec} (${reason})` : spec;
|
|
11156
|
+
});
|
|
11157
|
+
const err = new Error(
|
|
11158
|
+
`Failed to load Builders after installing them: ${failures.join(
|
|
11159
|
+
", "
|
|
11160
|
+
)}. Retry the build. If the failure persists, contact Vercel Support.`
|
|
11161
|
+
);
|
|
11162
|
+
err.link = "https://vercel.link/builder-dependencies-install-failed";
|
|
11163
|
+
throw err;
|
|
11116
11164
|
}
|
|
11117
11165
|
}
|
|
11118
11166
|
const resolvedBuildersDebug = [];
|
|
@@ -11183,6 +11231,15 @@ async function resolveBuilders(buildersDir, builderSpecs, resolvedSpecs) {
|
|
|
11183
11231
|
`\`package.json\` for "${name}" does not contain a "version" field`
|
|
11184
11232
|
);
|
|
11185
11233
|
}
|
|
11234
|
+
const peerVersion = getBuilderPins().get(name);
|
|
11235
|
+
if (isBareSpec(parsed) && peerVersion && pkgPath.startsWith(buildersDir) && !(0, import_semver2.satisfies)(builderPkg.version, peerVersion)) {
|
|
11236
|
+
output_manager_default.debug(
|
|
11237
|
+
`Cached "${name}@${builderPkg.version}" does not satisfy "${peerVersion}"`
|
|
11238
|
+
);
|
|
11239
|
+
buildersToAdd.add(spec);
|
|
11240
|
+
installReasons.set(spec, "peer-version-mismatch");
|
|
11241
|
+
continue;
|
|
11242
|
+
}
|
|
11186
11243
|
if (parsed.type === "version" && parsed.rawSpec !== builderPkg.version) {
|
|
11187
11244
|
output_manager_default.debug(
|
|
11188
11245
|
`Installed version "${name}@${builderPkg.version}" does not match "${parsed.rawSpec}"`
|
|
@@ -11191,7 +11248,7 @@ async function resolveBuilders(buildersDir, builderSpecs, resolvedSpecs) {
|
|
|
11191
11248
|
installReasons.set(spec, "version-mismatch");
|
|
11192
11249
|
continue;
|
|
11193
11250
|
}
|
|
11194
|
-
if (parsed.type === "range" && !(0,
|
|
11251
|
+
if (parsed.type === "range" && !(0, import_semver2.satisfies)(builderPkg.version, parsed.rawSpec)) {
|
|
11195
11252
|
output_manager_default.debug(
|
|
11196
11253
|
`Installed version "${name}@${builderPkg.version}" is not compatible with "${parsed.rawSpec}"`
|
|
11197
11254
|
);
|
|
@@ -7,17 +7,17 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getUpdateCommandInfo,
|
|
9
9
|
isGlobal
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-43B3LNUF.js";
|
|
11
11
|
import {
|
|
12
12
|
getGlobalPathConfig,
|
|
13
13
|
progress,
|
|
14
14
|
writeToConfigFile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CHZBEMLF.js";
|
|
16
16
|
import {
|
|
17
17
|
apiCommand,
|
|
18
18
|
listSubcommand3 as listSubcommand,
|
|
19
19
|
loginCommand
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IHQ7DPQI.js";
|
|
21
21
|
import {
|
|
22
22
|
require_semver
|
|
23
23
|
} from "./chunk-IB5L4LKZ.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./chunk-DMSLNAVH.js";
|
|
27
27
|
import {
|
|
28
28
|
login
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-GLAHGVBS.js";
|
|
30
30
|
import {
|
|
31
31
|
TelemetryClient,
|
|
32
32
|
isNativeBinaryInstall
|
|
@@ -1278,7 +1278,7 @@ function generateCurlCommand(config, baseUrl) {
|
|
|
1278
1278
|
for (const [key, value] of Object.entries(config.headers)) {
|
|
1279
1279
|
parts.push(`-H '${key}: ${escapeShellArg(value)}'`);
|
|
1280
1280
|
}
|
|
1281
|
-
if (config.body) {
|
|
1281
|
+
if (config.method !== "GET" && config.body) {
|
|
1282
1282
|
const bodyStr = typeof config.body === "string" ? config.body : JSON.stringify(config.body);
|
|
1283
1283
|
parts.push(`-H 'Content-Type: application/json'`);
|
|
1284
1284
|
parts.push(`-d '${escapeShellArg(bodyStr)}'`);
|
|
@@ -4,6 +4,10 @@ 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
|
+
formatErrorJson,
|
|
9
|
+
handleApiError
|
|
10
|
+
} from "./chunk-Z7NPYIZ6.js";
|
|
7
11
|
import {
|
|
8
12
|
isAPIError
|
|
9
13
|
} from "./chunk-KSSNLCL4.js";
|
|
@@ -11,97 +15,6 @@ import {
|
|
|
11
15
|
output_manager_default
|
|
12
16
|
} from "./chunk-OX7KI3LF.js";
|
|
13
17
|
|
|
14
|
-
// src/commands/metrics/output.ts
|
|
15
|
-
function getRollupColumnName(metric, aggregation) {
|
|
16
|
-
return `${metric}_${aggregation}`.replace(/[./]/g, "_");
|
|
17
|
-
}
|
|
18
|
-
function getResolvedOrderMetadata(query, response) {
|
|
19
|
-
const orderBy = query.orderBy ?? (response.orderBy ? "count" : void 0);
|
|
20
|
-
const orderDirection = response.orderDirection ?? query.orderDirection;
|
|
21
|
-
return {
|
|
22
|
-
...orderBy ? { orderBy } : {},
|
|
23
|
-
...orderDirection ? { orderDirection } : {}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
function formatQueryJson(query, response) {
|
|
27
|
-
const orderMetadata = getResolvedOrderMetadata(query, response);
|
|
28
|
-
const queryWithResponseMetadata = {
|
|
29
|
-
...query,
|
|
30
|
-
...orderMetadata
|
|
31
|
-
};
|
|
32
|
-
return JSON.stringify(
|
|
33
|
-
{
|
|
34
|
-
query: queryWithResponseMetadata,
|
|
35
|
-
summary: response.summary ?? [],
|
|
36
|
-
data: response.data ?? [],
|
|
37
|
-
statistics: response.statistics ?? {},
|
|
38
|
-
...orderMetadata
|
|
39
|
-
},
|
|
40
|
-
null,
|
|
41
|
-
2
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
function formatErrorJson(code, message, allowedValues) {
|
|
45
|
-
const error = {
|
|
46
|
-
code,
|
|
47
|
-
message
|
|
48
|
-
};
|
|
49
|
-
if (allowedValues && allowedValues.length > 0) {
|
|
50
|
-
error.allowedValues = allowedValues;
|
|
51
|
-
}
|
|
52
|
-
return JSON.stringify({ error }, null, 2);
|
|
53
|
-
}
|
|
54
|
-
function handleApiError(err, jsonOutput, client, overrides = {}) {
|
|
55
|
-
let code;
|
|
56
|
-
let message;
|
|
57
|
-
const override = overrides[err.status];
|
|
58
|
-
if (override) {
|
|
59
|
-
code = override.code || err.code || "BAD_REQUEST";
|
|
60
|
-
message = override.message;
|
|
61
|
-
} else {
|
|
62
|
-
switch (err.status) {
|
|
63
|
-
case 402:
|
|
64
|
-
code = err.code || "PAYMENT_REQUIRED";
|
|
65
|
-
message = err.serverMessage || "This feature requires an Observability Plus subscription. Upgrade at https://vercel.com/dashboard/settings/billing";
|
|
66
|
-
break;
|
|
67
|
-
case 429:
|
|
68
|
-
code = err.code || "RATE_LIMITED";
|
|
69
|
-
message = err.serverMessage || "You have reached the metrics query rate limit. Please wait and try again. If you need a higher limit, request one from your Vercel account team.";
|
|
70
|
-
break;
|
|
71
|
-
case 403:
|
|
72
|
-
code = "FORBIDDEN";
|
|
73
|
-
message = "You do not have permission to query metrics for this project/team.";
|
|
74
|
-
break;
|
|
75
|
-
case 500:
|
|
76
|
-
code = "INTERNAL_ERROR";
|
|
77
|
-
message = "An internal error occurred. Please try again later.";
|
|
78
|
-
break;
|
|
79
|
-
case 504:
|
|
80
|
-
code = "TIMEOUT";
|
|
81
|
-
message = "The query timed out. Try a shorter time range or fewer groups.";
|
|
82
|
-
break;
|
|
83
|
-
case 400:
|
|
84
|
-
code = err.code || "BAD_REQUEST";
|
|
85
|
-
message = err.serverMessage || `API error (${err.status})`;
|
|
86
|
-
break;
|
|
87
|
-
default:
|
|
88
|
-
code = err.code || "BAD_REQUEST";
|
|
89
|
-
message = err.serverMessage || `API error (${err.status})`;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
if (jsonOutput) {
|
|
93
|
-
client.stdout.write(formatErrorJson(code, message, err.allowedValues));
|
|
94
|
-
} else {
|
|
95
|
-
output_manager_default.error(message);
|
|
96
|
-
if (err.allowedValues && err.allowedValues.length > 0) {
|
|
97
|
-
output_manager_default.print(`
|
|
98
|
-
Available values: ${err.allowedValues.join(", ")}
|
|
99
|
-
`);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return 1;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
18
|
// src/commands/metrics/schema-api.ts
|
|
106
19
|
function toMetricDetail(metric) {
|
|
107
20
|
return {
|
|
@@ -182,11 +95,6 @@ async function fetchMetricDetailOrExit(client, accountId, metricId, jsonOutput)
|
|
|
182
95
|
}
|
|
183
96
|
|
|
184
97
|
export {
|
|
185
|
-
getRollupColumnName,
|
|
186
|
-
getResolvedOrderMetadata,
|
|
187
|
-
formatQueryJson,
|
|
188
|
-
formatErrorJson,
|
|
189
|
-
handleApiError,
|
|
190
98
|
getDefaultAggregation,
|
|
191
99
|
fetchMetricListOrExit,
|
|
192
100
|
fetchMetricDetailOrExit
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
PromptBackError,
|
|
12
12
|
PromptCanceledError,
|
|
13
13
|
getLocalPathConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-F32B76CK.js";
|
|
15
15
|
import {
|
|
16
16
|
DEFAULT_VERCEL_CONFIG_FILENAME,
|
|
17
17
|
VERCEL_CONFIG_EXTENSIONS,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
useKeypress,
|
|
39
39
|
usePrefix,
|
|
40
40
|
useState
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-GLAHGVBS.js";
|
|
42
42
|
import {
|
|
43
43
|
require_load_json_file
|
|
44
44
|
} from "./chunk-ECCWJHC6.js";
|