vercel 54.15.0 → 54.16.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-6XHROCMP.js → add-ODBKI7EV.js} +5 -5
- package/dist/chunks/{chunk-AWD3IGXU.js → chunk-3NR6OYDV.js} +1 -1
- package/dist/chunks/{chunk-OQD4G5FW.js → chunk-76QQSALN.js} +3 -3
- package/dist/chunks/{chunk-3RIVJWW5.js → chunk-7CTLNKAS.js} +48 -9
- package/dist/chunks/{chunk-OEYKL4IY.js → chunk-BGQPLZFA.js} +6 -6
- package/dist/chunks/{chunk-DCN3SOR6.js → chunk-BIHRICRM.js} +2 -2
- package/dist/chunks/{chunk-6SL223IW.js → chunk-FBYYZKN3.js} +4 -1
- package/dist/chunks/{chunk-TLVKY7WL.js → chunk-HL5ZRVF2.js} +6 -6
- package/dist/chunks/{chunk-WGH26RJV.js → chunk-HXAMK45D.js} +2 -2
- package/dist/chunks/{chunk-SFPJ3VR7.js → chunk-INFYZRHS.js} +286 -76
- package/dist/chunks/{chunk-PMUUPCDL.js → chunk-JFA4NUXP.js} +1 -1
- package/dist/chunks/{chunk-LABX5FSJ.js → chunk-KJMSI2CT.js} +1 -1
- package/dist/chunks/{chunk-EAEEBPMD.js → chunk-LJXYGWOY.js} +11 -3
- package/dist/chunks/{chunk-AG6TBL6C.js → chunk-MSWXRAHA.js} +1 -1
- package/dist/chunks/{chunk-HSXUEJ4T.js → chunk-NVITPK2U.js} +1 -1
- package/dist/chunks/{chunk-RHXSECUF.js → chunk-O6YJBWWC.js} +1 -1
- package/dist/chunks/{chunk-LOPPFUV3.js → chunk-Q4ZRBN2A.js} +1 -1
- package/dist/chunks/{chunk-HIYWSGI7.js → chunk-Q77ALSXR.js} +3 -0
- package/dist/chunks/{chunk-6TPH3ZBU.js → chunk-RCUMYP4L.js} +4 -4
- package/dist/chunks/{chunk-574PHXNT.js → chunk-U2NYO6GP.js} +1 -1
- package/dist/chunks/{chunk-6A62YUBE.js → chunk-UI2T3GI4.js} +2 -2
- package/dist/chunks/{chunk-UZD3DM6V.js → chunk-ULNWA6GY.js} +1 -1
- package/dist/chunks/{chunk-CENOYXK3.js → chunk-VLQBXXOQ.js} +2 -2
- package/dist/chunks/{compile-vercel-config-ATU3UBFK.js → compile-vercel-config-7THB6MTJ.js} +2 -2
- package/dist/chunks/{delete-WIN4UHQY.js → delete-USWDARFF.js} +3 -3
- package/dist/chunks/{disable-24KUO3TS.js → disable-K6B26MC2.js} +3 -3
- package/dist/chunks/{discard-B6ATZCPD.js → discard-2T7HZCGR.js} +3 -3
- package/dist/chunks/{edit-DIYIVLFQ.js → edit-2CC2WAO4.js} +5 -5
- package/dist/chunks/{enable-BF7NKTV7.js → enable-KEZA6F4T.js} +3 -3
- package/dist/chunks/{export-HHONDN7V.js → export-PE2T4HYP.js} +3 -3
- package/dist/chunks/{inspect-GSYKUMK5.js → inspect-TQSHD4MH.js} +4 -4
- package/dist/chunks/{list-OSJGB5AE.js → list-AU6URG3E.js} +4 -4
- package/dist/chunks/{list-PZ4DRWLO.js → list-IDTF5TWY.js} +3 -3
- package/dist/chunks/{ls-QBCHGSIC.js → ls-XOAWRTNQ.js} +5 -5
- package/dist/chunks/{publish-QYPZQ66O.js → publish-G42C77TP.js} +3 -3
- package/dist/chunks/{query-BDMX4CF6.js → query-YTBD7YLX.js} +3 -3
- package/dist/chunks/{reorder-YDTGTTJB.js → reorder-BDOOUURL.js} +3 -3
- package/dist/chunks/{restore-LXO2ZBAF.js → restore-ENUHC25O.js} +3 -3
- package/dist/chunks/{rm-3L7FVCDA.js → rm-ALWF3NBL.js} +5 -5
- package/dist/chunks/{routes-YEU33SON.js → routes-KUTLDFIF.js} +2 -2
- package/dist/chunks/{rule-inspect-T57QBYJR.js → rule-inspect-BV6MC7PG.js} +5 -5
- package/dist/chunks/{rules-E5DTNMFG.js → rules-IGG7M2AC.js} +6 -6
- package/dist/chunks/{schema-VYVJ4GYP.js → schema-ZYJOJIGL.js} +3 -3
- package/dist/chunks/{update-LT3LZVEZ.js → update-I3WE3IQJ.js} +5 -5
- package/dist/commands/build/index.js +18 -18
- package/dist/commands/deploy/index.js +12 -12
- package/dist/commands/dev/index.js +670 -100
- package/dist/commands/env/index.js +6 -6
- package/dist/commands/link/index.js +47 -13
- package/dist/commands/list/index.js +5 -5
- package/dist/commands-bulk.js +88 -45
- package/dist/index.js +46 -42
- package/dist/version.mjs +1 -1
- package/package.json +20 -19
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
handleRulesApiError,
|
|
10
10
|
parseRulesFlagsAndScope,
|
|
11
11
|
rulesCollectionPath
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-Q4ZRBN2A.js";
|
|
13
|
+
import "./chunk-UI2T3GI4.js";
|
|
14
14
|
import "./chunk-D7MGZH35.js";
|
|
15
15
|
import {
|
|
16
16
|
validateJsonOutput
|
|
@@ -21,9 +21,9 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
AGENT_REASON
|
|
23
23
|
} from "./chunk-QH7WYDEP.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-FBYYZKN3.js";
|
|
25
|
+
import "./chunk-INFYZRHS.js";
|
|
26
|
+
import "./chunk-Q77ALSXR.js";
|
|
27
27
|
import {
|
|
28
28
|
buildCommandWithGlobalFlags,
|
|
29
29
|
outputAgentError
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
} from "./chunk-QH7WYDEP.js";
|
|
11
11
|
import {
|
|
12
12
|
getLocalPathConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ULNWA6GY.js";
|
|
14
14
|
import {
|
|
15
15
|
getScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FBYYZKN3.js";
|
|
17
17
|
import {
|
|
18
18
|
VERCEL_DIR_PROJECT,
|
|
19
19
|
VERCEL_DIR_README,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
selectAndParseRemoteUrl,
|
|
49
49
|
selectOrg,
|
|
50
50
|
writeServicesConfig
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-INFYZRHS.js";
|
|
52
52
|
import {
|
|
53
53
|
buildCommandWithGlobalFlags,
|
|
54
54
|
outputAgentError,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
require_lib,
|
|
19
19
|
require_minimatch,
|
|
20
20
|
require_pluralize
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-INFYZRHS.js";
|
|
22
22
|
import {
|
|
23
23
|
CantParseJSONFile,
|
|
24
24
|
cmd,
|
|
@@ -11422,6 +11422,9 @@ async function writeBuildResult(args) {
|
|
|
11422
11422
|
function isEdgeFunction(v) {
|
|
11423
11423
|
return v?.type === "EdgeFunction";
|
|
11424
11424
|
}
|
|
11425
|
+
function isContainerImage(v) {
|
|
11426
|
+
return v?.runtime === "container";
|
|
11427
|
+
}
|
|
11425
11428
|
function isLambda(v) {
|
|
11426
11429
|
return v?.type === "Lambda";
|
|
11427
11430
|
}
|
|
@@ -11432,21 +11435,23 @@ function isFile(v) {
|
|
|
11432
11435
|
const type = v?.type;
|
|
11433
11436
|
return type === "FileRef" || type === "FileFsRef" || type === "FileBlob";
|
|
11434
11437
|
}
|
|
11435
|
-
function injectServiceEnvVars(
|
|
11438
|
+
function injectServiceEnvVars(fn, service, stripServiceRoutePrefix = false) {
|
|
11439
|
+
const target = fn.config ?? fn;
|
|
11440
|
+
target.environment ??= {};
|
|
11436
11441
|
if (service?.name) {
|
|
11437
|
-
|
|
11442
|
+
target.environment.VERCEL_SERVICE_NAME = service.name;
|
|
11438
11443
|
}
|
|
11439
11444
|
if (service?.type) {
|
|
11440
|
-
|
|
11445
|
+
target.environment.VERCEL_SERVICE_TYPE = service.type;
|
|
11441
11446
|
}
|
|
11442
11447
|
if (service?.trigger) {
|
|
11443
|
-
|
|
11448
|
+
target.environment.VERCEL_SERVICE_TRIGGER = service.trigger;
|
|
11444
11449
|
}
|
|
11445
11450
|
if (service?.routePrefix && service.routePrefix !== "/") {
|
|
11446
|
-
|
|
11451
|
+
target.environment.VERCEL_SERVICE_ROUTE_PREFIX = service.routePrefix;
|
|
11447
11452
|
}
|
|
11448
11453
|
if (stripServiceRoutePrefix) {
|
|
11449
|
-
|
|
11454
|
+
target.environment.VERCEL_SERVICE_ROUTE_PREFIX_STRIP = "1";
|
|
11450
11455
|
}
|
|
11451
11456
|
}
|
|
11452
11457
|
function stripDuplicateSlashes(path2) {
|
|
@@ -11483,7 +11488,14 @@ async function writeBuildResultV2(args) {
|
|
|
11483
11488
|
const overrides = {};
|
|
11484
11489
|
for (const [path2, output] of Object.entries(buildResult.output)) {
|
|
11485
11490
|
const normalizedPath = stripDuplicateSlashes(path2);
|
|
11486
|
-
if (
|
|
11491
|
+
if (isContainerImage(output)) {
|
|
11492
|
+
injectServiceEnvVars(
|
|
11493
|
+
output,
|
|
11494
|
+
service && isExperimentalService(service) ? service : void 0,
|
|
11495
|
+
stripServiceRoutePrefix
|
|
11496
|
+
);
|
|
11497
|
+
await writeContainerImage(outputDir, output, normalizedPath);
|
|
11498
|
+
} else if (isLambda(output)) {
|
|
11487
11499
|
injectServiceEnvVars(
|
|
11488
11500
|
output,
|
|
11489
11501
|
service && isExperimentalService(service) ? service : void 0,
|
|
@@ -11649,7 +11661,14 @@ async function writeBuildResultV3(args) {
|
|
|
11649
11661
|
const path2 = service && typeof service.runtime === "string" ? stripDuplicateSlashes((0, import_fs_detectors2.getInternalServiceFunctionPath)(service.name)) : stripDuplicateSlashes(
|
|
11650
11662
|
build2.config?.zeroConfig ? src.substring(0, src.length - ext.length) : src
|
|
11651
11663
|
);
|
|
11652
|
-
if (
|
|
11664
|
+
if (isContainerImage(output)) {
|
|
11665
|
+
injectServiceEnvVars(
|
|
11666
|
+
output,
|
|
11667
|
+
service && isExperimentalService(service) ? service : void 0,
|
|
11668
|
+
stripServiceRoutePrefix
|
|
11669
|
+
);
|
|
11670
|
+
await writeContainerImage(outputDir, output, path2);
|
|
11671
|
+
} else if (isLambda(output)) {
|
|
11653
11672
|
injectServiceEnvVars(
|
|
11654
11673
|
output,
|
|
11655
11674
|
service && isExperimentalService(service) ? service : void 0,
|
|
@@ -11726,6 +11745,26 @@ async function writeFunctionSymlink(outputDir, dest, fn, existingFunctions) {
|
|
|
11726
11745
|
await import_fs_extra5.default.symlink(target, dest);
|
|
11727
11746
|
return true;
|
|
11728
11747
|
}
|
|
11748
|
+
async function writeContainerImage(outputDir, containerImage, path2) {
|
|
11749
|
+
const dest = join4(outputDir, "functions", `${path2}.func`);
|
|
11750
|
+
const handler = containerImage.handler;
|
|
11751
|
+
if (typeof handler !== "string" || handler.length === 0) {
|
|
11752
|
+
throw new Error(
|
|
11753
|
+
`Container image output for "${path2}" is missing "handler".`
|
|
11754
|
+
);
|
|
11755
|
+
}
|
|
11756
|
+
await import_fs_extra5.default.mkdirp(dest);
|
|
11757
|
+
await import_fs_extra5.default.writeJSON(
|
|
11758
|
+
join4(dest, ".vc-config.json"),
|
|
11759
|
+
{
|
|
11760
|
+
handler,
|
|
11761
|
+
runtime: "container",
|
|
11762
|
+
environment: containerImage.environment ?? {},
|
|
11763
|
+
...containerImage.command ? { command: containerImage.command } : {}
|
|
11764
|
+
},
|
|
11765
|
+
{ spaces: 2 }
|
|
11766
|
+
);
|
|
11767
|
+
}
|
|
11729
11768
|
async function writeEdgeFunction(repoRootPath, outputDir, edgeFunction, path2, existingFunctions, standalone = false) {
|
|
11730
11769
|
const dest = join4(outputDir, "functions", `${path2}.func`);
|
|
11731
11770
|
if (existingFunctions) {
|
|
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
writeProjectSettings
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MSWXRAHA.js";
|
|
10
10
|
import {
|
|
11
11
|
autoInstallVercelPlugin
|
|
12
12
|
} from "./chunk-BRQ6PX3U.js";
|
|
@@ -15,23 +15,23 @@ import {
|
|
|
15
15
|
} from "./chunk-64IF634X.js";
|
|
16
16
|
import {
|
|
17
17
|
ensureLink
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-BIHRICRM.js";
|
|
19
19
|
import {
|
|
20
20
|
pullCommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-KJMSI2CT.js";
|
|
22
22
|
import {
|
|
23
23
|
help
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-3NR6OYDV.js";
|
|
25
25
|
import {
|
|
26
26
|
VERCEL_DIR,
|
|
27
27
|
VERCEL_DIR_PROJECT,
|
|
28
28
|
envPullCommandLogic,
|
|
29
29
|
humanizePath,
|
|
30
30
|
parseTarget
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-INFYZRHS.js";
|
|
32
32
|
import {
|
|
33
33
|
TelemetryClient
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-Q77ALSXR.js";
|
|
35
35
|
import {
|
|
36
36
|
getFlagsSpecification,
|
|
37
37
|
parseArguments,
|
|
@@ -7,12 +7,12 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
printProjectNotFoundError,
|
|
9
9
|
setupAndLink
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-76QQSALN.js";
|
|
11
11
|
import {
|
|
12
12
|
getLinkedProject,
|
|
13
13
|
param,
|
|
14
14
|
resolveProjectCwd
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-INFYZRHS.js";
|
|
16
16
|
import {
|
|
17
17
|
buildCommandWithYes,
|
|
18
18
|
outputActionRequired
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getTeamById,
|
|
12
12
|
getUser,
|
|
13
13
|
getVercelDirectory
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-INFYZRHS.js";
|
|
15
15
|
import {
|
|
16
16
|
TeamDeleted
|
|
17
17
|
} from "./chunk-LN6B7ZI3.js";
|
|
@@ -27,6 +27,9 @@ async function getScope(client, opts = {}) {
|
|
|
27
27
|
let team = null;
|
|
28
28
|
const defaultTeamId = user.version === "northstar" ? user.defaultTeamId : void 0;
|
|
29
29
|
const currentTeamOrDefaultTeamId = client.config.currentTeam || defaultTeamId;
|
|
30
|
+
if (!client.config.currentTeam && defaultTeamId) {
|
|
31
|
+
client.config.currentTeam = defaultTeamId;
|
|
32
|
+
}
|
|
30
33
|
if (currentTeamOrDefaultTeamId && opts.getTeam !== false) {
|
|
31
34
|
team = await getTeamById(client, currentTeamOrDefaultTeamId);
|
|
32
35
|
if (!team) {
|
|
@@ -7,30 +7,30 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getUpdateCommandInfo,
|
|
9
9
|
isGlobal
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HXAMK45D.js";
|
|
11
11
|
import {
|
|
12
12
|
getGlobalPathConfig,
|
|
13
13
|
progress,
|
|
14
14
|
writeToConfigFile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LJXYGWOY.js";
|
|
16
16
|
import {
|
|
17
17
|
apiCommand,
|
|
18
18
|
listSubcommand2 as listSubcommand,
|
|
19
19
|
loginCommand
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VLQBXXOQ.js";
|
|
21
21
|
import {
|
|
22
22
|
require_semver
|
|
23
23
|
} from "./chunk-IB5L4LKZ.js";
|
|
24
24
|
import {
|
|
25
25
|
help
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-3NR6OYDV.js";
|
|
27
27
|
import {
|
|
28
28
|
login
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-INFYZRHS.js";
|
|
30
30
|
import {
|
|
31
31
|
TelemetryClient,
|
|
32
32
|
isNativeBinaryInstall
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-Q77ALSXR.js";
|
|
34
34
|
import {
|
|
35
35
|
require_ms
|
|
36
36
|
} from "./chunk-GGP5R3FU.js";
|
|
@@ -6,10 +6,10 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
require_lib
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-INFYZRHS.js";
|
|
10
10
|
import {
|
|
11
11
|
isNativeBinaryInstall
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Q77ALSXR.js";
|
|
13
13
|
import {
|
|
14
14
|
packageName
|
|
15
15
|
} from "./chunk-LN6B7ZI3.js";
|