vercel 59.11.7 → 59.13.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-WU2QYHYL.js → add-7OX6PBFD.js} +3 -3
- package/dist/chunks/add-7RYUFBZ3.js +221 -0
- package/dist/chunks/{add-KSJQYR5C.js → add-FX5WWUXU.js} +3 -3
- package/dist/chunks/{build-F3J6FLPD.js → build-Q3TR46K4.js} +3 -3
- package/dist/chunks/{chunk-N4QHMXOO.js → chunk-2GXA4NGG.js} +3 -2
- package/dist/chunks/{chunk-CNDPIHY5.js → chunk-2QFYCMKN.js} +24 -19
- package/dist/chunks/{chunk-7KROIXQM.js → chunk-3FIEWWMM.js} +3 -3
- package/dist/chunks/{chunk-OIH6FP5Y.js → chunk-4TUMNBEE.js} +2 -2
- package/dist/chunks/{chunk-FVT74RZ5.js → chunk-5JDX6XOS.js} +11 -11
- package/dist/chunks/{chunk-WL6QYSGD.js → chunk-5ORMFNXL.js} +586 -41
- package/dist/chunks/{chunk-C762AAVU.js → chunk-66LPM47Z.js} +4 -4
- package/dist/chunks/{chunk-4IVSM24H.js → chunk-76CB3CF2.js} +1 -1
- package/dist/chunks/{chunk-2TSBB22D.js → chunk-7F5RNOTP.js} +2 -2
- package/dist/chunks/{chunk-UARGTFCT.js → chunk-7NRNFV77.js} +1 -1
- package/dist/chunks/chunk-DQ23J2KG.js +305 -0
- package/dist/chunks/{chunk-XM3LOQIX.js → chunk-EDMW7SBH.js} +76 -92
- package/dist/chunks/{chunk-Z7JWYFOY.js → chunk-EEV2LKFC.js} +1 -1
- package/dist/chunks/{chunk-DSTNNQVV.js → chunk-EIBH6FCR.js} +3 -3
- package/dist/chunks/chunk-F4S6Q4OY.js +79 -0
- package/dist/chunks/chunk-GDOUDU6O.js +74 -0
- package/dist/chunks/{chunk-DBYHS3CK.js → chunk-GQRG7VFK.js} +2 -2
- package/dist/chunks/{chunk-GCVXKRR5.js → chunk-HD4DR3DA.js} +1 -0
- package/dist/chunks/{chunk-DWIC7MRV.js → chunk-HKHXKSXQ.js} +1 -1
- package/dist/chunks/{chunk-ZBEECGFD.js → chunk-HM24ZWQL.js} +1 -1
- package/dist/chunks/{chunk-GHKJAK5V.js → chunk-IK6PC2JA.js} +4 -4
- package/dist/chunks/{chunk-A5JZS6ZN.js → chunk-IUC3TR3S.js} +1 -1
- package/dist/chunks/{chunk-VYC45Q4Z.js → chunk-JIK2FUMT.js} +1 -1
- package/dist/chunks/{chunk-TGNEG57M.js → chunk-KU2WCB6G.js} +110 -14
- package/dist/chunks/{chunk-FVNJTRCE.js → chunk-KXTXGYG7.js} +2 -2
- package/dist/chunks/{chunk-QOPTXV4G.js → chunk-L4H3DP65.js} +1 -1
- package/dist/chunks/{chunk-FL4JLNT2.js → chunk-LE5V7G2U.js} +2 -2
- package/dist/chunks/chunk-LVCCV2YJ.js +324 -0
- package/dist/chunks/{chunk-SHFNEZVI.js → chunk-MUGF3SGQ.js} +1 -1
- package/dist/chunks/{chunk-G3PXSXIB.js → chunk-N6HP5BLI.js} +5 -3
- package/dist/chunks/{chunk-EZQDYIVB.js → chunk-NSGRICJ2.js} +1 -1
- package/dist/chunks/{chunk-KJBZ5ZST.js → chunk-PIMIVJYK.js} +1 -0
- package/dist/chunks/{chunk-X7DBBZQD.js → chunk-QRFRS2JH.js} +1 -1
- package/dist/chunks/{chunk-PFM75KY3.js → chunk-QSJ6Q5QP.js} +3 -3
- package/dist/chunks/{chunk-XD4DCYMX.js → chunk-S3HYE6ZE.js} +2 -2
- package/dist/chunks/{chunk-QHS645AZ.js → chunk-SPRQ4IBQ.js} +3 -3
- package/dist/chunks/{chunk-NSOYO6JQ.js → chunk-T3NB7VQG.js} +6 -6
- package/dist/chunks/{chunk-PJXMXMCO.js → chunk-TLPHZ7M4.js} +2 -2
- package/dist/chunks/{chunk-EPOLDWRA.js → chunk-TOXZAP5I.js} +1 -1
- package/dist/chunks/{chunk-XIFATBH5.js → chunk-U4ZLWJQD.js} +4 -4
- package/dist/chunks/{chunk-CEDN47PH.js → chunk-UXKNSAP2.js} +1 -1
- package/dist/chunks/{chunk-GUU4Z2AQ.js → chunk-XEVKGAVI.js} +6 -6
- package/dist/chunks/{chunk-VT3Z7HF6.js → chunk-Z6YZMXVN.js} +4 -4
- package/dist/chunks/{clear-XUQO4ZTK.js → clear-GIAFWC5X.js} +3 -3
- package/dist/chunks/{compile-vercel-config-D3ARNHTN.js → compile-vercel-config-QJGEQKK4.js} +2 -2
- package/dist/chunks/{config-MEDLXUVM.js → config-AOA2HS4R.js} +3 -3
- package/dist/chunks/{config-37OAE7QJ.js → config-HYBSW733.js} +7 -7
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{delete-VSWDZ2SW.js → delete-BBFI75A2.js} +5 -5
- package/dist/chunks/{delete-3N3YZZOF.js → delete-DJ7RI2NX.js} +5 -5
- package/dist/chunks/{detect-services-TESZCQWG.js → detect-services-Q2DVXVMH.js} +6 -6
- package/dist/chunks/{disable-A4FLFMC7.js → disable-P7X2V5LS.js} +5 -5
- package/dist/chunks/{discard-CHGFULBZ.js → discard-JNQBH4XU.js} +5 -5
- package/dist/chunks/{edit-JZ63AJYQ.js → edit-AXQEMBQC.js} +5 -5
- package/dist/chunks/{edit-MHSYAPDR.js → edit-BO3GXEKA.js} +6 -6
- package/dist/chunks/{enable-KD46SEC5.js → enable-NC4BN7EQ.js} +5 -5
- package/dist/chunks/{export-42QZLBSN.js → export-HQ42UNYD.js} +5 -5
- package/dist/chunks/{image-GP4H73A2.js → image-UM4FQYOA.js} +3 -3
- package/dist/chunks/{import-builders-6TBLMPL2.js → import-builders-F6SWNCHK.js} +4 -4
- package/dist/chunks/{inspect-MUVK6MMT.js → inspect-EXEA57MP.js} +3 -3
- package/dist/chunks/{inspect-5FMWMY3C.js → inspect-H3M3XJNB.js} +10 -10
- package/dist/chunks/{inspect-QFXAOUL4.js → inspect-MTNQOLNM.js} +3 -3
- package/dist/chunks/{inspect-RNTSYM6O.js → inspect-PYFF2K4X.js} +3 -3
- package/dist/chunks/{inspect-Q3DWW7MC.js → inspect-XF324IQ2.js} +9 -9
- package/dist/chunks/{list-JRNWLSO5.js → list-4JHZJUBS.js} +2 -2
- package/dist/chunks/{list-IHHIPXEC.js → list-YEN54SGY.js} +6 -6
- package/dist/chunks/{list-XHD5DLEX.js → list-ZKD2O4D2.js} +7 -7
- package/dist/chunks/{login-PCT6KFWY.js → login-56KGZQI2.js} +3 -3
- package/dist/chunks/{ls-SVOHC3XW.js → ls-ELYVF6EU.js} +4 -4
- package/dist/chunks/{ls-PQZ2RIDX.js → ls-HZEMZY2R.js} +4 -4
- package/dist/chunks/{ls-TGHCCARZ.js → ls-IJW74NG3.js} +4 -4
- package/dist/chunks/{ls-GPEHEFCF.js → ls-OAGYLILX.js} +4 -4
- package/dist/chunks/{ls-VRIH5WA3.js → ls-QNTHMTIH.js} +7 -7
- package/dist/chunks/ls-WW5UFH5B.js +204 -0
- package/dist/chunks/{open-E7DEKYDU.js → open-D2E5TEKN.js} +5 -5
- package/dist/chunks/{permissions-JKOONWVL.js → permissions-CFUXWXSK.js} +4 -4
- package/dist/chunks/{publish-EDDELDE5.js → publish-BP4IUYNM.js} +5 -5
- package/dist/chunks/{pull-646WEVDE.js → pull-DL72B6RW.js} +7 -7
- package/dist/chunks/{push-LTNW5OVD.js → push-6YCS4YQW.js} +3 -3
- package/dist/chunks/{query-LU4N6KPO.js → query-7N3YB4LE.js} +7 -7
- package/dist/chunks/{reorder-22PKJMZP.js → reorder-YJN36TPT.js} +5 -5
- package/dist/chunks/{reply-SF2EZMVZ.js → reply-3U3O7LNG.js} +5 -5
- package/dist/chunks/{resolve-ZCZGXTOT.js → resolve-TT75WCWT.js} +5 -5
- package/dist/chunks/{restore-VJAWZXB4.js → restore-6UF6W23A.js} +5 -5
- package/dist/chunks/rm-3QIDFPVA.js +162 -0
- package/dist/chunks/{rm-WNPGTUBH.js → rm-6MJ7ZPXQ.js} +3 -3
- package/dist/chunks/{rm-KVEAJPRE.js → rm-JZRS2NBH.js} +3 -3
- package/dist/chunks/{rm-OSZ5FZUM.js → rm-KI4W2HYP.js} +7 -7
- package/dist/chunks/{rm-KN2QFCKO.js → rm-QCQXVB54.js} +3 -3
- package/dist/chunks/rule-inspect-PX73J52Q.js +123 -0
- package/dist/chunks/{rules-65LKAQ35.js → rules-Q334NBUC.js} +7 -7
- package/dist/chunks/schema-GRTOHAZO.js +381 -0
- package/dist/chunks/{schema-NXCW4M75.js → schema-YV3XYL3A.js} +6 -6
- package/dist/chunks/{set-FYJVKMPV.js → set-J3AQKL6V.js} +7 -7
- package/dist/chunks/{setup-and-link-KXPZE32P.js → setup-and-link-R5N7WJ46.js} +16 -16
- package/dist/chunks/{tags-ANIRP5E3.js → tags-2VLJ4VIH.js} +2 -2
- package/dist/chunks/update-VMS45VF2.js +224 -0
- package/dist/chunks/vlt-builder-importer-USCFHWPL.js +322 -0
- package/dist/commands/build/index.js +19 -19
- package/dist/commands/deploy/index.js +19 -19
- package/dist/commands/dev/index.js +25 -25
- package/dist/commands/env/index.js +12 -12
- package/dist/commands/link/index.js +12 -12
- package/dist/commands/list/index.js +5 -5
- package/dist/commands-bulk.js +11343 -4386
- package/dist/help.js +1 -1
- package/dist/index.js +28 -18
- package/dist/runtime-assets/node-preloads/next-dev-websocket.cjs +6 -0
- package/dist/version.mjs +1 -1
- package/package.json +52 -48
- package/dist/chunks/add-PERLOALD.js +0 -233
- package/dist/chunks/chunk-5GGUB4EO.js +0 -31
- package/dist/chunks/chunk-ARU7VBKR.js +0 -144
- package/dist/chunks/chunk-KEKR7OCB.js +0 -140
- package/dist/chunks/chunk-MXLA3VQS.js +0 -20
- package/dist/chunks/chunk-QKX7WKIN.js +0 -98
- package/dist/chunks/ls-PF7F4PP4.js +0 -197
- package/dist/chunks/rm-W722Q2AO.js +0 -173
- package/dist/chunks/rule-inspect-25Z6SNX3.js +0 -285
- package/dist/chunks/schema-7D6IGJEJ.js +0 -429
- package/dist/chunks/update-UT6CTKVG.js +0 -246
|
@@ -6,20 +6,20 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
MISSING_BOTH_MESSAGE
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-F4S6Q4OY.js";
|
|
10
10
|
import {
|
|
11
11
|
RULE_ENVIRONMENTS
|
|
12
12
|
} from "./chunk-GY5I4AYD.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveProjectContext
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3FIEWWMM.js";
|
|
16
16
|
import {
|
|
17
17
|
AGENT_REASON,
|
|
18
18
|
AGENT_STATUS
|
|
19
19
|
} from "./chunk-VUS2JQB2.js";
|
|
20
20
|
import {
|
|
21
21
|
detectExplicitScope
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-76CB3CF2.js";
|
|
23
23
|
import {
|
|
24
24
|
printError
|
|
25
25
|
} from "./chunk-3VM7HWF6.js";
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
} from "./chunk-VUS2JQB2.js";
|
|
10
|
+
import {
|
|
11
|
+
getProjectByNameOrId
|
|
12
|
+
} from "./chunk-7F5RNOTP.js";
|
|
13
|
+
import {
|
|
14
|
+
ProjectNotFound
|
|
15
|
+
} from "./chunk-CV5YC2EN.js";
|
|
16
|
+
|
|
17
|
+
// src/commands/traces/scope-resolver.ts
|
|
18
|
+
var MISSING_BOTH_MESSAGE = "No linked project found. Run `vercel link`, pass --cwd to a linked dir, or use --scope <team> and --project <name>.";
|
|
19
|
+
async function resolveScope({
|
|
20
|
+
client,
|
|
21
|
+
flags = {},
|
|
22
|
+
linkedProject
|
|
23
|
+
}) {
|
|
24
|
+
const flagScope = flags.scope?.trim() || void 0;
|
|
25
|
+
const flagProject = flags.project?.trim() || void 0;
|
|
26
|
+
if (linkedProject.status === "linked") {
|
|
27
|
+
if (!flagScope && !flagProject) {
|
|
28
|
+
return {
|
|
29
|
+
teamId: linkedProject.org.id,
|
|
30
|
+
projectId: linkedProject.project.id
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const teamId = flagScope ? client.config.currentTeam : linkedProject.org.id;
|
|
34
|
+
if (!teamId) {
|
|
35
|
+
return {
|
|
36
|
+
reason: AGENT_REASON.NOT_FOUND,
|
|
37
|
+
message: `Team not found: ${flagScope}`
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const project = await getProjectByNameOrId(
|
|
41
|
+
client,
|
|
42
|
+
flagProject ?? linkedProject.project.id,
|
|
43
|
+
teamId
|
|
44
|
+
);
|
|
45
|
+
if (project instanceof ProjectNotFound) {
|
|
46
|
+
return {
|
|
47
|
+
reason: AGENT_REASON.NOT_FOUND,
|
|
48
|
+
message: `Project not found: ${flagProject}`
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
teamId,
|
|
53
|
+
projectId: project.id
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (flagScope && flagProject) {
|
|
57
|
+
const teamId = client.config.currentTeam;
|
|
58
|
+
if (!teamId) {
|
|
59
|
+
return {
|
|
60
|
+
reason: AGENT_REASON.NOT_FOUND,
|
|
61
|
+
message: `Team not found: ${flagScope}`
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const project = await getProjectByNameOrId(client, flagProject, teamId);
|
|
65
|
+
if (project instanceof ProjectNotFound) {
|
|
66
|
+
return {
|
|
67
|
+
reason: AGENT_REASON.NOT_FOUND,
|
|
68
|
+
message: `Project not found: ${flagProject}`
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return { teamId, projectId: project.id };
|
|
72
|
+
}
|
|
73
|
+
return { reason: AGENT_REASON.NOT_LINKED, message: MISSING_BOTH_MESSAGE };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
MISSING_BOTH_MESSAGE,
|
|
78
|
+
resolveScope
|
|
79
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
indent_default
|
|
9
|
+
} from "./chunk-A3NYPUKZ.js";
|
|
10
|
+
import {
|
|
11
|
+
humanizeIdentifier
|
|
12
|
+
} from "./chunk-FGDKMNEN.js";
|
|
13
|
+
import {
|
|
14
|
+
table
|
|
15
|
+
} from "./chunk-NW34PW6V.js";
|
|
16
|
+
|
|
17
|
+
// src/commands/alerts/format.ts
|
|
18
|
+
function renderAlertTable(rows, hsep = 3) {
|
|
19
|
+
return indent_default(
|
|
20
|
+
table(rows, { hsep }).split("\n").map((line) => line.trimEnd()).join("\n"),
|
|
21
|
+
2
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
function normalizeTimestamp(value) {
|
|
25
|
+
if (value === void 0 || !Number.isFinite(value)) {
|
|
26
|
+
return void 0;
|
|
27
|
+
}
|
|
28
|
+
return Math.abs(value) < 1e12 ? value * 1e3 : value;
|
|
29
|
+
}
|
|
30
|
+
function getPrimaryAlert(group) {
|
|
31
|
+
return group.alerts?.[0];
|
|
32
|
+
}
|
|
33
|
+
function getGroupTitle(group) {
|
|
34
|
+
return group.ai?.title || group.title || getPrimaryAlert(group)?.title || "Alert group";
|
|
35
|
+
}
|
|
36
|
+
function getGroupType(group) {
|
|
37
|
+
return group.type || getPrimaryAlert(group)?.type || "-";
|
|
38
|
+
}
|
|
39
|
+
function getGroupStartedAt(group) {
|
|
40
|
+
const primaryAlert = getPrimaryAlert(group);
|
|
41
|
+
return normalizeTimestamp(
|
|
42
|
+
group.recordedStartedAt ?? primaryAlert?.recordedStartedAt ?? primaryAlert?.startedAt
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
function formatTriggerOperator(value) {
|
|
46
|
+
switch (value) {
|
|
47
|
+
case "gt":
|
|
48
|
+
return ">";
|
|
49
|
+
case "gte":
|
|
50
|
+
return ">=";
|
|
51
|
+
case "lt":
|
|
52
|
+
return "<";
|
|
53
|
+
case "lte":
|
|
54
|
+
return "<=";
|
|
55
|
+
default:
|
|
56
|
+
return void 0;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function humanizeReference(value, opts = {}) {
|
|
60
|
+
return value.split("/").map((part) => {
|
|
61
|
+
const label = humanizeIdentifier(part);
|
|
62
|
+
return opts.case === "title" ? label : label.toLowerCase();
|
|
63
|
+
}).join(" / ");
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
renderAlertTable,
|
|
68
|
+
normalizeTimestamp,
|
|
69
|
+
getGroupTitle,
|
|
70
|
+
getGroupType,
|
|
71
|
+
getGroupStartedAt,
|
|
72
|
+
formatTriggerOperator,
|
|
73
|
+
humanizeReference
|
|
74
|
+
};
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isOAuthError,
|
|
14
14
|
processDeviceAuthorizationResponse,
|
|
15
15
|
processTokenResponse
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-76CB3CF2.js";
|
|
17
17
|
import {
|
|
18
18
|
printError
|
|
19
19
|
} from "./chunk-3VM7HWF6.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
getTeams,
|
|
22
22
|
getUser,
|
|
23
23
|
humanizePath
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7F5RNOTP.js";
|
|
25
25
|
import {
|
|
26
26
|
getCommandName
|
|
27
27
|
} from "./chunk-Q2DGFCO7.js";
|
|
@@ -57,7 +57,7 @@ async function fetchMetricCatalog(client, accountId, kind, search, activeSince)
|
|
|
57
57
|
}
|
|
58
58
|
const response = await client.fetch(
|
|
59
59
|
`${OBSERVABILITY_METRICS_PATH}?${searchParams}`,
|
|
60
|
-
{ accountId }
|
|
60
|
+
{ accountId, bailOn429: true }
|
|
61
61
|
);
|
|
62
62
|
metrics.push(
|
|
63
63
|
...response.metrics.map((metric) => ({
|
|
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveProjectContext
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3FIEWWMM.js";
|
|
10
10
|
import {
|
|
11
11
|
require_frameworks
|
|
12
12
|
} from "./chunk-FRVG4OW3.js";
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
ensureLink,
|
|
18
18
|
parseEnv
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-66LPM47Z.js";
|
|
20
20
|
import {
|
|
21
21
|
pullSubcommand
|
|
22
22
|
} from "./chunk-XUAWTW4W.js";
|
|
23
23
|
import {
|
|
24
24
|
performDeviceCodeFlow
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-GQRG7VFK.js";
|
|
26
26
|
import {
|
|
27
27
|
STANDARD_ENVIRONMENTS,
|
|
28
28
|
formatProject
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
param,
|
|
46
46
|
printAlignedLabel,
|
|
47
47
|
require_lib
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-7F5RNOTP.js";
|
|
49
49
|
import {
|
|
50
50
|
buildCommandWithYes,
|
|
51
51
|
getPreservedArgsForEnvPull,
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
} from "./chunk-IB5L4LKZ.js";
|
|
14
14
|
import {
|
|
15
15
|
readJSONFile
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MUGF3SGQ.js";
|
|
17
17
|
import {
|
|
18
18
|
VERCEL_CONFIG_EXTENSIONS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-L4H3DP65.js";
|
|
20
20
|
import {
|
|
21
21
|
require_execa
|
|
22
22
|
} from "./chunk-5NF5HOBJ.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
VERCEL_DIR,
|
|
28
28
|
require_lib,
|
|
29
29
|
require_pluralize
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-7F5RNOTP.js";
|
|
31
31
|
import {
|
|
32
32
|
CantParseJSONFile,
|
|
33
33
|
code
|
|
@@ -639,7 +639,7 @@ var require_osenv = __commonJS({
|
|
|
639
639
|
var require_npa = __commonJS({
|
|
640
640
|
"../../node_modules/.pnpm/npm-package-arg@6.1.0/node_modules/npm-package-arg/npa.js"(exports, module) {
|
|
641
641
|
"use strict";
|
|
642
|
-
module.exports =
|
|
642
|
+
module.exports = npa2;
|
|
643
643
|
module.exports.resolve = resolve;
|
|
644
644
|
module.exports.Result = Result;
|
|
645
645
|
var url;
|
|
@@ -652,16 +652,16 @@ var require_npa = __commonJS({
|
|
|
652
652
|
var hasSlashes = isWindows ? /\\|[/]/ : /[/]/;
|
|
653
653
|
var isURL = /^(?:git[+])?[a-z]+:/i;
|
|
654
654
|
var isFilename = /[.](?:tgz|tar.gz|tar)$/i;
|
|
655
|
-
function
|
|
655
|
+
function npa2(arg, where) {
|
|
656
656
|
let name;
|
|
657
657
|
let spec;
|
|
658
658
|
if (typeof arg === "object") {
|
|
659
659
|
if (arg instanceof Result && (!where || where === arg.where)) {
|
|
660
660
|
return arg;
|
|
661
661
|
} else if (arg.name && arg.rawSpec) {
|
|
662
|
-
return
|
|
662
|
+
return npa2.resolve(arg.name, arg.rawSpec, where || arg.where);
|
|
663
663
|
} else {
|
|
664
|
-
return
|
|
664
|
+
return npa2(arg.raw, where || arg.where);
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
const nameEndsAt = arg[0] === "@" ? arg.slice(1).indexOf("@") + 1 : arg.indexOf("@");
|
|
@@ -873,7 +873,7 @@ var require_npa = __commonJS({
|
|
|
873
873
|
return res;
|
|
874
874
|
}
|
|
875
875
|
function fromAlias(res, where) {
|
|
876
|
-
const subSpec =
|
|
876
|
+
const subSpec = npa2(res.rawSpec.substr(4), where);
|
|
877
877
|
if (subSpec.type === "alias") {
|
|
878
878
|
throw new Error("nested aliases not supported");
|
|
879
879
|
}
|
|
@@ -949,7 +949,7 @@ var require_import_builders = __commonJS({
|
|
|
949
949
|
getBuildersDir: () => getBuildersDir2
|
|
950
950
|
});
|
|
951
951
|
module.exports = __toCommonJS(import_builders_exports);
|
|
952
|
-
var
|
|
952
|
+
var import_npm_package_arg2 = __toESM2(require_npa());
|
|
953
953
|
var import_semver = require_semver();
|
|
954
954
|
var import_path = __require("path");
|
|
955
955
|
var import_fs_extra = require_lib();
|
|
@@ -970,7 +970,7 @@ var require_import_builders = __commonJS({
|
|
|
970
970
|
function pinBuilderSpecs(specs, pins) {
|
|
971
971
|
const pinnedSpecs = /* @__PURE__ */ new Map();
|
|
972
972
|
for (const spec of specs) {
|
|
973
|
-
const parsed = (0,
|
|
973
|
+
const parsed = (0, import_npm_package_arg2.default)(spec);
|
|
974
974
|
if (parsed.name && isBareSpec(parsed)) {
|
|
975
975
|
const version2 = pins.get(parsed.name);
|
|
976
976
|
if (version2) {
|
|
@@ -1083,7 +1083,7 @@ var require_import_builders = __commonJS({
|
|
|
1083
1083
|
const installReasons = /* @__PURE__ */ new Map();
|
|
1084
1084
|
for (const spec of builderSpecs) {
|
|
1085
1085
|
const resolvedSpec = resolvedSpecs?.get(spec) || spec;
|
|
1086
|
-
const parsed = (0,
|
|
1086
|
+
const parsed = (0, import_npm_package_arg2.default)(resolvedSpec);
|
|
1087
1087
|
const { name } = parsed;
|
|
1088
1088
|
if (!name) {
|
|
1089
1089
|
buildersToAdd.add(spec);
|
|
@@ -1384,7 +1384,7 @@ var require_install_builders = __commonJS({
|
|
|
1384
1384
|
var import_url = __require("url");
|
|
1385
1385
|
var import_pluralize = __toESM2(require_pluralize());
|
|
1386
1386
|
var import_path = __require("path");
|
|
1387
|
-
var
|
|
1387
|
+
var import_npm_package_arg2 = __toESM2(require_npa());
|
|
1388
1388
|
var import_semver = require_semver();
|
|
1389
1389
|
var import_fs_extra = require_lib();
|
|
1390
1390
|
var import_error_utils = require_dist();
|
|
@@ -1395,7 +1395,7 @@ var require_install_builders = __commonJS({
|
|
|
1395
1395
|
return `@vercel/build-utils@${buildUtilsVersion}`;
|
|
1396
1396
|
}
|
|
1397
1397
|
try {
|
|
1398
|
-
if ((0,
|
|
1398
|
+
if ((0, import_npm_package_arg2.default)(buildUtilsVersion).type === "remote") {
|
|
1399
1399
|
return `@vercel/build-utils@${buildUtilsVersion}`;
|
|
1400
1400
|
}
|
|
1401
1401
|
} catch {
|
|
@@ -1594,8 +1594,74 @@ var installBuilders = (0, import_install_builders.createInstallBuilders)({
|
|
|
1594
1594
|
|
|
1595
1595
|
// src/builders/import-builders.ts
|
|
1596
1596
|
import { createRequire } from "module";
|
|
1597
|
+
|
|
1598
|
+
// src/builders/vlt-builder-graph.ts
|
|
1599
|
+
import { brotliDecompress } from "zlib";
|
|
1600
|
+
import { promisify } from "util";
|
|
1601
|
+
import { readFile } from "fs/promises";
|
|
1602
|
+
import { join } from "path";
|
|
1603
|
+
var decompress = promisify(brotliDecompress);
|
|
1604
|
+
var embeddedGraphs;
|
|
1605
|
+
function defaultGraphPaths() {
|
|
1606
|
+
return [
|
|
1607
|
+
join(__dirname, "builder-graph.json.br"),
|
|
1608
|
+
join(__dirname, "..", "builders", "builder-graph.json.br")
|
|
1609
|
+
];
|
|
1610
|
+
}
|
|
1611
|
+
async function readDefaultGraph() {
|
|
1612
|
+
let lastError;
|
|
1613
|
+
for (const path of defaultGraphPaths()) {
|
|
1614
|
+
try {
|
|
1615
|
+
return await readFile(path);
|
|
1616
|
+
} catch (error) {
|
|
1617
|
+
lastError = error;
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
throw lastError;
|
|
1621
|
+
}
|
|
1622
|
+
function loadEmbeddedBuilderGraphs(readGraph = readDefaultGraph) {
|
|
1623
|
+
embeddedGraphs ??= (async () => {
|
|
1624
|
+
try {
|
|
1625
|
+
const compressed = await readGraph();
|
|
1626
|
+
const graphs = JSON.parse(
|
|
1627
|
+
(await decompress(new Uint8Array(compressed))).toString("utf8")
|
|
1628
|
+
);
|
|
1629
|
+
if (graphs.schemaVersion !== 1 || !graphs.builders || typeof graphs.builders !== "object") {
|
|
1630
|
+
throw new Error("invalid schema");
|
|
1631
|
+
}
|
|
1632
|
+
return graphs;
|
|
1633
|
+
} catch (error) {
|
|
1634
|
+
embeddedGraphs = void 0;
|
|
1635
|
+
throw new Error("Could not load the embedded vlt Builder graphs.", {
|
|
1636
|
+
cause: error
|
|
1637
|
+
});
|
|
1638
|
+
}
|
|
1639
|
+
})();
|
|
1640
|
+
return embeddedGraphs;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
// src/builders/vlt-builder-routing.ts
|
|
1644
|
+
var import_npm_package_arg = __toESM(require_npa(), 1);
|
|
1645
|
+
function isManagedSpec(spec, managedNames) {
|
|
1646
|
+
const parsed = (0, import_npm_package_arg.default)(spec);
|
|
1647
|
+
return !!parsed.name && managedNames.has(parsed.name) && parsed.type === "tag" && (parsed.rawSpec === "" || parsed.rawSpec === "latest");
|
|
1648
|
+
}
|
|
1649
|
+
function partitionBuilderSpecs(specs, managedNames) {
|
|
1650
|
+
const managed = /* @__PURE__ */ new Map();
|
|
1651
|
+
const legacy = /* @__PURE__ */ new Set();
|
|
1652
|
+
for (const spec of specs) {
|
|
1653
|
+
if (isManagedSpec(spec, managedNames)) {
|
|
1654
|
+
managed.set(spec, (0, import_npm_package_arg.default)(spec).name);
|
|
1655
|
+
} else {
|
|
1656
|
+
legacy.add(spec);
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
return { managed, legacy };
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
// src/builders/import-builders.ts
|
|
1597
1663
|
var require_ = createRequire(__filename);
|
|
1598
|
-
var
|
|
1664
|
+
var legacyImportBuilders = (0, import_import_builders.createImportBuilders)({
|
|
1599
1665
|
builderPins: pkg_default.builders ?? {},
|
|
1600
1666
|
debug: (message) => output_manager_default.debug(message),
|
|
1601
1667
|
installBuilders,
|
|
@@ -1604,6 +1670,36 @@ var importBuilders = (0, import_import_builders.createImportBuilders)({
|
|
|
1604
1670
|
staticBuilder: static_builder_exports,
|
|
1605
1671
|
vercelDir: VERCEL_DIR
|
|
1606
1672
|
});
|
|
1673
|
+
var managedBuilderNames = new Set(Object.keys(pkg_default.builders ?? {}));
|
|
1674
|
+
async function importBuilders(builderSpecs, cwd, span) {
|
|
1675
|
+
if (!isNativeBinaryInstall() || process.env.VERCEL_EXPERIMENTAL_VLT_BUILDERS !== "1") {
|
|
1676
|
+
return legacyImportBuilders(builderSpecs, cwd, span);
|
|
1677
|
+
}
|
|
1678
|
+
const { managed, legacy } = partitionBuilderSpecs(
|
|
1679
|
+
builderSpecs,
|
|
1680
|
+
managedBuilderNames
|
|
1681
|
+
);
|
|
1682
|
+
output_manager_default.debug(
|
|
1683
|
+
`Builder import routing: vlt=[${[...managed].map(([spec]) => spec).join(", ")}], legacy=[${[...legacy].join(", ")}]`
|
|
1684
|
+
);
|
|
1685
|
+
if (managed.size === 0) {
|
|
1686
|
+
return legacyImportBuilders(legacy, cwd, span);
|
|
1687
|
+
}
|
|
1688
|
+
const [{ createVltBuilderImporter }, graphs] = await Promise.all([
|
|
1689
|
+
import("./vlt-builder-importer-USCFHWPL.js"),
|
|
1690
|
+
loadEmbeddedBuilderGraphs()
|
|
1691
|
+
]);
|
|
1692
|
+
const vltImportBuilders = createVltBuilderImporter({
|
|
1693
|
+
loadGraphs: async () => graphs,
|
|
1694
|
+
require: require_,
|
|
1695
|
+
debug: (message) => output_manager_default.debug(message)
|
|
1696
|
+
});
|
|
1697
|
+
const [vltBuilders, legacyBuilders] = await Promise.all([
|
|
1698
|
+
vltImportBuilders(managed),
|
|
1699
|
+
legacy.size ? legacyImportBuilders(legacy, cwd, span) : Promise.resolve(/* @__PURE__ */ new Map())
|
|
1700
|
+
]);
|
|
1701
|
+
return new Map([...vltBuilders, ...legacyBuilders]);
|
|
1702
|
+
}
|
|
1607
1703
|
|
|
1608
1704
|
export {
|
|
1609
1705
|
require_npa,
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
} from "./chunk-VUS2JQB2.js";
|
|
25
25
|
import {
|
|
26
26
|
getScope
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-76CB3CF2.js";
|
|
28
28
|
import {
|
|
29
29
|
getLinkedProject,
|
|
30
30
|
getProjectByNameOrId
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7F5RNOTP.js";
|
|
32
32
|
import {
|
|
33
33
|
buildCommandWithGlobalFlags,
|
|
34
34
|
outputAgentError
|
|
@@ -6,10 +6,10 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
loginCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5ORMFNXL.js";
|
|
10
10
|
import {
|
|
11
11
|
login
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GQRG7VFK.js";
|
|
13
13
|
import {
|
|
14
14
|
help
|
|
15
15
|
} from "./chunk-YS76T533.js";
|