vercel 54.21.0 → 55.0.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-KZSG7SVG.js → add-BQGGX36J.js} +8 -8
- package/dist/chunks/{add-UDJ45UVF.js → add-YRFK663I.js} +7 -7
- package/dist/chunks/{chunk-OGJB2GHI.js → chunk-22GUZ5KG.js} +1 -1
- package/dist/chunks/{chunk-DDS5Z2MB.js → chunk-2QBF3ZL3.js} +1 -0
- package/dist/chunks/{chunk-KGPSD6TA.js → chunk-2XTV2FM7.js} +100 -36
- package/dist/chunks/{chunk-ULKM3ZD4.js → chunk-4RGSUV5C.js} +2 -2
- package/dist/chunks/{chunk-UJ5UEAMC.js → chunk-5AJNUXWP.js} +1 -1
- package/dist/chunks/{chunk-KXGWAWRV.js → chunk-5OT26JZN.js} +35 -3
- package/dist/chunks/{chunk-JAUGUJR3.js → chunk-6CRRXESK.js} +1 -1
- package/dist/chunks/{chunk-RY3AVR6E.js → chunk-7C7MMT4J.js} +1 -1
- package/dist/chunks/chunk-7PZWVZN6.js +105 -0
- package/dist/chunks/{chunk-D2M77YVC.js → chunk-7S3QUMIG.js} +2 -2
- package/dist/chunks/{chunk-TYXSXFVM.js → chunk-A5QK4X3Z.js} +6 -6
- package/dist/chunks/{chunk-6SVPJXCO.js → chunk-AA3E7OLF.js} +30 -3
- package/dist/chunks/{chunk-VFXF4O4X.js → chunk-AW6V5LOC.js} +3 -3
- package/dist/chunks/{chunk-I3HGCZ4E.js → chunk-CMJMYVQM.js} +1 -0
- package/dist/chunks/{chunk-SCQAJO6E.js → chunk-D43MOSMZ.js} +425 -22
- package/dist/chunks/{chunk-EJ6GQI6F.js → chunk-EHTPDXTS.js} +1 -0
- package/dist/chunks/{chunk-JIX2UI23.js → chunk-EJV2KFOF.js} +3 -3
- package/dist/chunks/{chunk-FCYCUCLI.js → chunk-EUARKVCA.js} +83 -20
- package/dist/chunks/{chunk-HAZXLIKZ.js → chunk-GVZKC6PS.js} +1 -1
- package/dist/chunks/{chunk-FNRZFHFO.js → chunk-HA7C7SDO.js} +3 -1
- package/dist/chunks/{chunk-KS5FONWU.js → chunk-HOYOJUQZ.js} +70 -17
- package/dist/chunks/{chunk-DFEUWDGM.js → chunk-IDMKFYEA.js} +1 -1
- package/dist/chunks/{chunk-S2N7BLSM.js → chunk-IIUE7CDZ.js} +2 -2
- package/dist/chunks/{chunk-MAJWH2PD.js → chunk-JJWESW5Y.js} +1 -1
- package/dist/chunks/{chunk-DBA4N3OZ.js → chunk-LHY5EFII.js} +2 -2
- package/dist/chunks/{chunk-BEETD7P4.js → chunk-MGUQN3V3.js} +3 -3
- package/dist/chunks/{chunk-LVR7QUSG.js → chunk-OCEM4YAQ.js} +1 -1
- package/dist/chunks/{chunk-UDIFOPZL.js → chunk-OKWMOW2F.js} +354 -404
- package/dist/chunks/{chunk-VKBYAWTL.js → chunk-QEEGXNFK.js} +1 -1
- package/dist/chunks/{chunk-EFUR47FZ.js → chunk-QKR7GNAK.js} +1 -1
- package/dist/chunks/{chunk-YSIZGIDP.js → chunk-QY63UKTP.js} +2 -2
- package/dist/chunks/{chunk-AUECDTMX.js → chunk-RLJA2KI7.js} +1 -1
- package/dist/chunks/{chunk-DJ4JEVDI.js → chunk-SENGDDFO.js} +1 -1
- package/dist/chunks/{chunk-VDTSYCXY.js → chunk-VTA3KZUX.js} +3 -3
- package/dist/chunks/chunk-WGGABYO5.js +31 -0
- package/dist/chunks/{chunk-6W7I5IOO.js → chunk-X36ADWA5.js} +51 -9
- package/dist/chunks/{chunk-IR674PKY.js → chunk-XHC5YRFY.js} +451 -274
- package/dist/chunks/{chunk-BLWPQEED.js → chunk-ZQEZYHPJ.js} +8 -6
- package/dist/chunks/{compile-vercel-config-DY63NSZV.js → compile-vercel-config-3RYUGKGU.js} +3 -3
- package/dist/chunks/{delete-WVLC7FLA.js → delete-UQKVMHVV.js} +5 -5
- package/dist/chunks/{disable-VLYKCAM5.js → disable-GUK4VHQY.js} +5 -5
- package/dist/chunks/{discard-GGNJLKTH.js → discard-DTI36R2T.js} +5 -5
- package/dist/chunks/{edit-ZU5K7DM3.js → edit-ED4LM54G.js} +6 -6
- package/dist/chunks/{enable-G3MUGP3W.js → enable-RAWDG7GZ.js} +5 -5
- package/dist/chunks/{exec-UKMIYIF6.js → exec-G4AUF3KG.js} +4 -90
- package/dist/chunks/{export-QHSB2FON.js → export-U6OBSYVP.js} +5 -5
- package/dist/chunks/{image-CWHCW3N5.js → image-LIJI6QJY.js} +4 -4
- package/dist/chunks/{inspect-OVAC6PJK.js → inspect-25D5G5FX.js} +11 -11
- package/dist/chunks/{inspect-W6RHYESL.js → inspect-3SEYQNWT.js} +11 -11
- package/dist/chunks/{inspect-QJSREPM3.js → inspect-7LGTAPH3.js} +7 -7
- package/dist/chunks/{inspect-HFCKYQQ3.js → inspect-IQD2ULLP.js} +11 -11
- package/dist/chunks/{list-2XYQW3YA.js → list-2IJHE2AC.js} +8 -8
- package/dist/chunks/{list-R37YS5CX.js → list-I25HBKWF.js} +5 -5
- package/dist/chunks/login-N4DIZZWE.js +247 -0
- package/dist/chunks/{ls-HKVAT223.js → ls-2VXZPNMR.js} +12 -12
- package/dist/chunks/{ls-X7Y37IPT.js → ls-HN3SUOPA.js} +7 -7
- package/dist/chunks/{ls-7JNUKRV2.js → ls-S7YPR3OS.js} +11 -11
- package/dist/chunks/{ls-JJXUYZU7.js → ls-TFOKQKY3.js} +11 -11
- package/dist/chunks/{publish-MYVZ4UTW.js → publish-ZTGB4XE2.js} +5 -5
- package/dist/chunks/{query-ZH2YJPAC.js → query-2UK5BV4B.js} +6 -6
- package/dist/chunks/{reorder-VY53EYZJ.js → reorder-FM755TJK.js} +5 -5
- package/dist/chunks/{restore-F2AEG3WO.js → restore-NXQJMPMT.js} +5 -5
- package/dist/chunks/{rm-T6Z6WZZN.js → rm-III6VASE.js} +8 -8
- package/dist/chunks/{rm-VUL4FHMX.js → rm-MPC5DPOS.js} +7 -7
- package/dist/chunks/{rm-IDSOMXQR.js → rm-XJMPAJNP.js} +6 -6
- package/dist/chunks/{rule-inspect-ELB7P5YA.js → rule-inspect-BJGXMAO5.js} +7 -7
- package/dist/chunks/{rules-XR6U5U7F.js → rules-FSNWMWJH.js} +9 -9
- package/dist/chunks/{schema-WKPB25ZF.js → schema-NR6DGYCB.js} +7 -7
- package/dist/chunks/{tags-NSWTVGHE.js → tags-RVHMONZN.js} +3 -3
- package/dist/chunks/{types-EQD5UZOH.js → types-2TPA6J4G.js} +3 -3
- package/dist/chunks/{update-H4Q24DK4.js → update-55OM2454.js} +7 -7
- package/dist/commands/build/index.js +51 -13
- package/dist/commands/deploy/index.js +33 -55
- package/dist/commands/dev/index.js +205 -62
- package/dist/commands/env/index.js +19 -19
- package/dist/commands/link/index.js +42 -25
- package/dist/commands/list/index.js +29 -14
- package/dist/commands-bulk.js +3869 -2022
- package/dist/index.js +24 -24
- package/dist/version.mjs +1 -1
- package/package.json +21 -21
- package/dist/chunks/chunk-Y4JJYHUG.js +0 -16
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "../../chunks/chunk-2HSQ7YUK.js";
|
|
10
10
|
import {
|
|
11
11
|
getUpdateCommand
|
|
12
|
-
} from "../../chunks/chunk-
|
|
12
|
+
} from "../../chunks/chunk-X36ADWA5.js";
|
|
13
13
|
import {
|
|
14
14
|
highlight
|
|
15
15
|
} from "../../chunks/chunk-V5P25P7F.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "../../chunks/chunk-YPQSDAEW.js";
|
|
19
19
|
import {
|
|
20
20
|
devCommand
|
|
21
|
-
} from "../../chunks/chunk-
|
|
21
|
+
} from "../../chunks/chunk-IDMKFYEA.js";
|
|
22
22
|
import {
|
|
23
23
|
OUTPUT_DIR,
|
|
24
24
|
getStaticServiceSchedules,
|
|
@@ -26,27 +26,27 @@ import {
|
|
|
26
26
|
require_mime_types,
|
|
27
27
|
require_npa,
|
|
28
28
|
staticFiles
|
|
29
|
-
} from "../../chunks/chunk-
|
|
29
|
+
} from "../../chunks/chunk-2XTV2FM7.js";
|
|
30
30
|
import "../../chunks/chunk-IB5L4LKZ.js";
|
|
31
31
|
import {
|
|
32
32
|
pickOverrides
|
|
33
|
-
} from "../../chunks/chunk-
|
|
33
|
+
} from "../../chunks/chunk-6CRRXESK.js";
|
|
34
34
|
import "../../chunks/chunk-24FCBXI4.js";
|
|
35
35
|
import {
|
|
36
36
|
displayDetectedServices,
|
|
37
37
|
printProjectNotFoundError,
|
|
38
38
|
readConfig,
|
|
39
39
|
setupAndLink
|
|
40
|
-
} from "../../chunks/chunk-
|
|
40
|
+
} from "../../chunks/chunk-OKWMOW2F.js";
|
|
41
41
|
import "../../chunks/chunk-QH7WYDEP.js";
|
|
42
42
|
import {
|
|
43
43
|
getLocalPathConfig
|
|
44
|
-
} from "../../chunks/chunk-
|
|
45
|
-
import "../../chunks/chunk-
|
|
44
|
+
} from "../../chunks/chunk-AA3E7OLF.js";
|
|
45
|
+
import "../../chunks/chunk-OCEM4YAQ.js";
|
|
46
46
|
import {
|
|
47
47
|
help
|
|
48
|
-
} from "../../chunks/chunk-
|
|
49
|
-
import "../../chunks/chunk-
|
|
48
|
+
} from "../../chunks/chunk-QY63UKTP.js";
|
|
49
|
+
import "../../chunks/chunk-QEEGXNFK.js";
|
|
50
50
|
import {
|
|
51
51
|
VERCEL_DIR,
|
|
52
52
|
VERCEL_OIDC_TOKEN,
|
|
@@ -71,11 +71,11 @@ import {
|
|
|
71
71
|
resolveProjectCwd,
|
|
72
72
|
tryDetectServices,
|
|
73
73
|
validateConfig
|
|
74
|
-
} from "../../chunks/chunk-
|
|
74
|
+
} from "../../chunks/chunk-XHC5YRFY.js";
|
|
75
75
|
import {
|
|
76
76
|
buildCommandWithYes,
|
|
77
77
|
outputActionRequired
|
|
78
|
-
} from "../../chunks/chunk-
|
|
78
|
+
} from "../../chunks/chunk-2QBF3ZL3.js";
|
|
79
79
|
import {
|
|
80
80
|
TelemetryClient
|
|
81
81
|
} from "../../chunks/chunk-ECCWJHC6.js";
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
getFlagsSpecification,
|
|
84
84
|
parseArguments,
|
|
85
85
|
printError
|
|
86
|
-
} from "../../chunks/chunk-
|
|
86
|
+
} from "../../chunks/chunk-EHTPDXTS.js";
|
|
87
87
|
import {
|
|
88
88
|
CantParseJSONFile,
|
|
89
89
|
LambdaSizeExceededError,
|
|
@@ -18338,9 +18338,14 @@ var ServicesOrchestrator = class {
|
|
|
18338
18338
|
this.proxyOrigin = options.proxyOrigin;
|
|
18339
18339
|
this.envFilesValues = options.env;
|
|
18340
18340
|
this.useImplicitEnvInjection = options.useImplicitEnvInjection;
|
|
18341
|
-
this.
|
|
18342
|
-
|
|
18343
|
-
|
|
18341
|
+
this.preferServiceBuilder = options.preferServiceBuilder ?? false;
|
|
18342
|
+
const pythonWorkspaces = options.services.filter((service) => service.runtime === "python").map(
|
|
18343
|
+
(service) => path3.resolve(
|
|
18344
|
+
this.cwd,
|
|
18345
|
+
(0, import_fs_detectors2.isExperimentalServiceV2)(service) ? service.root || "." : service.workspace || "."
|
|
18346
|
+
)
|
|
18347
|
+
);
|
|
18348
|
+
this.pythonServiceCount = new Set(pythonWorkspaces).size;
|
|
18344
18349
|
this.hasQueueServices = options.services.filter(isExperimentalService).some(isQueueBackedService);
|
|
18345
18350
|
}
|
|
18346
18351
|
// Synchronously SIGKILL every tracked process group. Used from
|
|
@@ -18630,8 +18635,7 @@ var ServicesOrchestrator = class {
|
|
|
18630
18635
|
rootPath: path3.join(this.cwd, workspace),
|
|
18631
18636
|
rootLabel: workspace,
|
|
18632
18637
|
framework,
|
|
18633
|
-
|
|
18634
|
-
builderSpec: framework?.useRuntime?.use || service.builder?.use,
|
|
18638
|
+
builderSpec: this.preferServiceBuilder ? service.builder?.use || framework?.useRuntime?.use : framework?.useRuntime?.use || service.builder?.use,
|
|
18635
18639
|
entrypoint: getEntrypointForService(
|
|
18636
18640
|
service.builder?.src,
|
|
18637
18641
|
service.entrypoint,
|
|
@@ -19018,12 +19022,18 @@ var QueueBroker = class {
|
|
|
19018
19022
|
if (!isQueueBackedService2(service))
|
|
19019
19023
|
continue;
|
|
19020
19024
|
const topicConfigs = getServiceQueueTopicConfigs(service);
|
|
19025
|
+
const consumerGroup = service.consumer ?? service.name;
|
|
19021
19026
|
for (const topicConfig of topicConfigs) {
|
|
19022
19027
|
const topicPattern = topicConfig.topic;
|
|
19023
|
-
const id = `${
|
|
19028
|
+
const id = `${consumerGroup}::${topicPattern}`;
|
|
19029
|
+
if (this.deliveryState.has(id)) {
|
|
19030
|
+
throw new Error(
|
|
19031
|
+
`Queue consumer "${consumerGroup}" is configured more than once for topic "${topicPattern}"`
|
|
19032
|
+
);
|
|
19033
|
+
}
|
|
19024
19034
|
const group = {
|
|
19025
19035
|
id,
|
|
19026
|
-
name:
|
|
19036
|
+
name: consumerGroup,
|
|
19027
19037
|
topicPattern,
|
|
19028
19038
|
topicRegex: topicPatternToRegex(topicPattern),
|
|
19029
19039
|
serviceOriginFn: () => this.getServiceOrigin(service.name),
|
|
@@ -19134,7 +19144,9 @@ var QueueBroker = class {
|
|
|
19134
19144
|
};
|
|
19135
19145
|
}
|
|
19136
19146
|
receiveMessages(queueName, consumerGroup, options) {
|
|
19137
|
-
const group = this.consumerGroups.find(
|
|
19147
|
+
const group = this.consumerGroups.find(
|
|
19148
|
+
(g) => g.name === consumerGroup && g.topicRegex.test(queueName)
|
|
19149
|
+
);
|
|
19138
19150
|
if (!group)
|
|
19139
19151
|
return [];
|
|
19140
19152
|
const groupDeliveries = this.deliveryState.get(group.id);
|
|
@@ -19374,6 +19386,50 @@ var QueueBroker = class {
|
|
|
19374
19386
|
}
|
|
19375
19387
|
};
|
|
19376
19388
|
|
|
19389
|
+
// src/util/dev/dev-sidecars.ts
|
|
19390
|
+
function toOrchestratorService(sidecar) {
|
|
19391
|
+
const { type: _type, ...subscriber } = sidecar;
|
|
19392
|
+
return {
|
|
19393
|
+
...subscriber,
|
|
19394
|
+
schema: "experimentalServices",
|
|
19395
|
+
type: "worker",
|
|
19396
|
+
trigger: "queue"
|
|
19397
|
+
};
|
|
19398
|
+
}
|
|
19399
|
+
async function collectBuilderDevSidecars({
|
|
19400
|
+
builds,
|
|
19401
|
+
workPath
|
|
19402
|
+
}) {
|
|
19403
|
+
const builderSpecs = new Set(builds.map((build) => build.use));
|
|
19404
|
+
const buildersWithPkgs = await importBuilders(builderSpecs, workPath);
|
|
19405
|
+
const nestedSidecars = await Promise.all(
|
|
19406
|
+
builds.map((build) => {
|
|
19407
|
+
const builder = buildersWithPkgs.get(build.use)?.builder;
|
|
19408
|
+
if (!builder) {
|
|
19409
|
+
throw new Error(`Failed to load Builder "${build.use}"`);
|
|
19410
|
+
}
|
|
19411
|
+
return builder.getDevSidecars?.({ workPath, build }) ?? [];
|
|
19412
|
+
})
|
|
19413
|
+
);
|
|
19414
|
+
const sidecars = nestedSidecars.flat();
|
|
19415
|
+
const names = /* @__PURE__ */ new Set();
|
|
19416
|
+
for (const sidecar of sidecars) {
|
|
19417
|
+
const { name, type } = sidecar;
|
|
19418
|
+
if (type !== "subscriber") {
|
|
19419
|
+
throw new Error(
|
|
19420
|
+
`Development sidecar "${name}" has unsupported type "${type}"`
|
|
19421
|
+
);
|
|
19422
|
+
}
|
|
19423
|
+
if (names.has(name)) {
|
|
19424
|
+
throw new Error(
|
|
19425
|
+
`Multiple builders contributed a development sidecar named "${name}"`
|
|
19426
|
+
);
|
|
19427
|
+
}
|
|
19428
|
+
names.add(name);
|
|
19429
|
+
}
|
|
19430
|
+
return sidecars;
|
|
19431
|
+
}
|
|
19432
|
+
|
|
19377
19433
|
// src/util/dev/headers.ts
|
|
19378
19434
|
function nodeHeadersToFetchHeaders(nodeHeaders) {
|
|
19379
19435
|
const headers = new Headers();
|
|
@@ -19504,6 +19560,7 @@ var DevCommandExitError = class extends Error {
|
|
|
19504
19560
|
};
|
|
19505
19561
|
var DevServer = class {
|
|
19506
19562
|
constructor(cwd, options) {
|
|
19563
|
+
this.initialDevCommandStarted = false;
|
|
19507
19564
|
this.responseTransformsByReq = /* @__PURE__ */ new WeakMap();
|
|
19508
19565
|
this.clearVercelConfigPromise = () => {
|
|
19509
19566
|
this.getVercelConfigPromise = null;
|
|
@@ -19576,7 +19633,7 @@ var DevServer = class {
|
|
|
19576
19633
|
};
|
|
19577
19634
|
/**
|
|
19578
19635
|
* Handle /_svc/_queues/* routes for the dev queue broker, which mimics
|
|
19579
|
-
* the Vercel Queues v3 API so
|
|
19636
|
+
* the Vercel Queues v3 API so subscribers can be used in vc dev unchanged.
|
|
19580
19637
|
*/
|
|
19581
19638
|
this.handleQueuesRoute = async (req, res, pathname) => {
|
|
19582
19639
|
if (!this.queueBroker) {
|
|
@@ -19771,7 +19828,7 @@ ${partHeaders}\r
|
|
|
19771
19828
|
debug(`Rewriting URL from "${req.url}" to "${location}"`);
|
|
19772
19829
|
req.url = location;
|
|
19773
19830
|
}
|
|
19774
|
-
if (callLevel === 0 && this.
|
|
19831
|
+
if (callLevel === 0 && this.queueBroker) {
|
|
19775
19832
|
const pathname = parsed.pathname || "/";
|
|
19776
19833
|
if (pathname.startsWith("/_svc/_queues/")) {
|
|
19777
19834
|
await this.handleQueuesRoute(req, res, pathname);
|
|
@@ -20233,6 +20290,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20233
20290
|
isDev: true,
|
|
20234
20291
|
requestPath,
|
|
20235
20292
|
devCacheDir,
|
|
20293
|
+
...this.getSidecarDevMeta(match),
|
|
20236
20294
|
env: {
|
|
20237
20295
|
...envConfigs.runEnv,
|
|
20238
20296
|
VERCEL_DEBUG_PREFIX: output_manager_default.debugEnabled ? "[builder]" : void 0
|
|
@@ -20491,10 +20549,68 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20491
20549
|
return this._address;
|
|
20492
20550
|
}
|
|
20493
20551
|
shouldUseServicesOrchestrator() {
|
|
20494
|
-
|
|
20495
|
-
|
|
20552
|
+
return Boolean(this.services && this.services.length > 0);
|
|
20553
|
+
}
|
|
20554
|
+
hasSubscribers() {
|
|
20555
|
+
return Boolean(this.sidecars?.length);
|
|
20556
|
+
}
|
|
20557
|
+
getDevQueueEnv() {
|
|
20558
|
+
return {
|
|
20559
|
+
// Existing vercel-runtime compatibility contract.
|
|
20560
|
+
VERCEL_HAS_WORKER_SERVICES: "1",
|
|
20561
|
+
VERCEL_QUEUE_BASE_URL: `${this.address.origin}/_svc/_queues`,
|
|
20562
|
+
VERCEL_QUEUE_TOKEN: "vc-dev-token"
|
|
20563
|
+
};
|
|
20564
|
+
}
|
|
20565
|
+
getSidecarDevMeta(match) {
|
|
20566
|
+
const serviceCount = (this.sidecars ?? []).filter((sidecar) => {
|
|
20567
|
+
if (sidecar.builder.use !== match.use)
|
|
20568
|
+
return false;
|
|
20569
|
+
return !sidecar.workspace || sidecar.workspace === ".";
|
|
20570
|
+
}).length;
|
|
20571
|
+
return serviceCount > 0 ? { serviceCount } : {};
|
|
20572
|
+
}
|
|
20573
|
+
async setupBuilderDevSidecars() {
|
|
20574
|
+
if (this.shouldUseServicesOrchestrator()) {
|
|
20575
|
+
return;
|
|
20496
20576
|
}
|
|
20497
|
-
|
|
20577
|
+
const sidecars = this.sidecars ?? [];
|
|
20578
|
+
if (sidecars.length === 0) {
|
|
20579
|
+
return;
|
|
20580
|
+
}
|
|
20581
|
+
Object.assign(this.envConfigs.runEnv, this.getDevQueueEnv());
|
|
20582
|
+
const services = sidecars.map(toOrchestratorService);
|
|
20583
|
+
const orchestrator = new ServicesOrchestrator({
|
|
20584
|
+
services,
|
|
20585
|
+
cwd: this.cwd,
|
|
20586
|
+
repoRoot: this.repoRoot,
|
|
20587
|
+
env: this.envConfigs.allEnv,
|
|
20588
|
+
proxyOrigin: this.address.origin,
|
|
20589
|
+
useImplicitEnvInjection: false,
|
|
20590
|
+
preferServiceBuilder: true
|
|
20591
|
+
});
|
|
20592
|
+
const queueBroker = new QueueBroker(
|
|
20593
|
+
services,
|
|
20594
|
+
(name) => orchestrator.getServiceOrigin(name)
|
|
20595
|
+
);
|
|
20596
|
+
this.sidecarOrchestrator = orchestrator;
|
|
20597
|
+
this.queueBroker = queueBroker;
|
|
20598
|
+
try {
|
|
20599
|
+
await orchestrator.startAll();
|
|
20600
|
+
} catch (err) {
|
|
20601
|
+
queueBroker.stop();
|
|
20602
|
+
this.queueBroker = void 0;
|
|
20603
|
+
await orchestrator.stopAll();
|
|
20604
|
+
this.sidecarOrchestrator = void 0;
|
|
20605
|
+
this.sidecars = [];
|
|
20606
|
+
throw err;
|
|
20607
|
+
}
|
|
20608
|
+
output_manager_default.log(
|
|
20609
|
+
`Started ${sidecars.length} development ${(0, import_pluralize2.default)(
|
|
20610
|
+
"sidecar",
|
|
20611
|
+
sidecars.length
|
|
20612
|
+
)}`
|
|
20613
|
+
);
|
|
20498
20614
|
}
|
|
20499
20615
|
async exit(code = 1) {
|
|
20500
20616
|
await this.stop(code);
|
|
@@ -20758,7 +20874,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20758
20874
|
return void 0;
|
|
20759
20875
|
}
|
|
20760
20876
|
async _getVercelConfig() {
|
|
20761
|
-
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-
|
|
20877
|
+
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-3RYUGKGU.js");
|
|
20762
20878
|
await compileVercelConfig(this.cwd);
|
|
20763
20879
|
const configPath = getLocalPathConfig(this.cwd);
|
|
20764
20880
|
const [
|
|
@@ -20797,7 +20913,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20797
20913
|
trailingSlash,
|
|
20798
20914
|
workPath: this.cwd
|
|
20799
20915
|
});
|
|
20800
|
-
|
|
20916
|
+
const {
|
|
20801
20917
|
builders,
|
|
20802
20918
|
warnings,
|
|
20803
20919
|
errors,
|
|
@@ -20817,9 +20933,6 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20817
20933
|
);
|
|
20818
20934
|
}
|
|
20819
20935
|
if (builders) {
|
|
20820
|
-
if (this.devCommand || this.services && this.services.length > 0) {
|
|
20821
|
-
builders = builders.filter(filterFrontendBuilds);
|
|
20822
|
-
}
|
|
20823
20936
|
vercelConfig.builds = vercelConfig.builds || [];
|
|
20824
20937
|
vercelConfig.builds.push(...builders);
|
|
20825
20938
|
delete vercelConfig.functions;
|
|
@@ -20851,6 +20964,12 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20851
20964
|
routes.push(...defaultRoutes || []);
|
|
20852
20965
|
vercelConfig.routes = routes;
|
|
20853
20966
|
}
|
|
20967
|
+
if (this.sidecars === void 0) {
|
|
20968
|
+
this.sidecars = this.shouldUseServicesOrchestrator() ? [] : await collectBuilderDevSidecars({
|
|
20969
|
+
builds: vercelConfig.builds ?? [],
|
|
20970
|
+
workPath: this.cwd
|
|
20971
|
+
});
|
|
20972
|
+
}
|
|
20854
20973
|
if (Array.isArray(vercelConfig.builds)) {
|
|
20855
20974
|
if (this.devCommand || this.services && this.services.length > 0) {
|
|
20856
20975
|
vercelConfig.builds = vercelConfig.builds.filter(filterFrontendBuilds);
|
|
@@ -20911,8 +21030,13 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20911
21030
|
if (this.projectSettings?.autoExposeSystemEnvs) {
|
|
20912
21031
|
runEnv["VERCEL_REGION"] = "dev1";
|
|
20913
21032
|
}
|
|
21033
|
+
if (this.hasSubscribers()) {
|
|
21034
|
+
Object.assign(runEnv, this.getDevQueueEnv());
|
|
21035
|
+
}
|
|
20914
21036
|
this.envConfigs = { buildEnv, runEnv, allEnv };
|
|
20915
|
-
|
|
21037
|
+
if (this.initialDevCommandStarted) {
|
|
21038
|
+
await this.runDevCommand();
|
|
21039
|
+
}
|
|
20916
21040
|
return vercelConfig;
|
|
20917
21041
|
}
|
|
20918
21042
|
async readJsonFile(filePath) {
|
|
@@ -21058,6 +21182,12 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21058
21182
|
this._address = new URL(replaceLocalhost(address));
|
|
21059
21183
|
const vercelConfig = await this.getVercelConfig();
|
|
21060
21184
|
let devCommandPromise;
|
|
21185
|
+
const startDevCommand = () => {
|
|
21186
|
+
this.initialDevCommandStarted = true;
|
|
21187
|
+
devCommandPromise = this.runDevCommand();
|
|
21188
|
+
void devCommandPromise.catch(() => {
|
|
21189
|
+
});
|
|
21190
|
+
};
|
|
21061
21191
|
if (this.shouldUseServicesOrchestrator()) {
|
|
21062
21192
|
this.orchestrator = new ServicesOrchestrator({
|
|
21063
21193
|
services: this.services || [],
|
|
@@ -21094,8 +21224,8 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21094
21224
|
output_manager_default.print(` ${link_default(addressFormatted)}
|
|
21095
21225
|
`);
|
|
21096
21226
|
}
|
|
21097
|
-
} else {
|
|
21098
|
-
|
|
21227
|
+
} else if (!this.hasSubscribers()) {
|
|
21228
|
+
startDevCommand();
|
|
21099
21229
|
}
|
|
21100
21230
|
const files = await staticFiles(this.cwd, {});
|
|
21101
21231
|
this.files = {};
|
|
@@ -21109,6 +21239,10 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21109
21239
|
}
|
|
21110
21240
|
}
|
|
21111
21241
|
await this.updateBuildMatches(vercelConfig, true);
|
|
21242
|
+
await this.setupBuilderDevSidecars();
|
|
21243
|
+
if (!this.shouldUseServicesOrchestrator() && !devCommandPromise) {
|
|
21244
|
+
startDevCommand();
|
|
21245
|
+
}
|
|
21112
21246
|
const blockingBuilds = Array.from(this.buildMatches.values()).filter(
|
|
21113
21247
|
needsBlockingBuild
|
|
21114
21248
|
);
|
|
@@ -21141,9 +21275,9 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21141
21275
|
await (0, import_once.default)(this.watcher, "ready");
|
|
21142
21276
|
this.server.on("upgrade", async (req, socket, head) => {
|
|
21143
21277
|
await this.startPromise;
|
|
21144
|
-
if (this.orchestrator) {
|
|
21278
|
+
if (this.orchestrator || this.sidecarOrchestrator) {
|
|
21145
21279
|
const pathname2 = url3.parse(req.url || "/").pathname || "/";
|
|
21146
|
-
const service = this.orchestrator.getServiceForRoute(pathname2);
|
|
21280
|
+
const service = this.orchestrator?.getServiceForRoute(pathname2) || this.sidecarOrchestrator?.getServiceForRoute(pathname2);
|
|
21147
21281
|
if (service) {
|
|
21148
21282
|
const target = `http://${service.host}:${service.port}`;
|
|
21149
21283
|
output_manager_default.debug(
|
|
@@ -21152,32 +21286,34 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21152
21286
|
this.proxy.ws(req, socket, head, { target });
|
|
21153
21287
|
return;
|
|
21154
21288
|
}
|
|
21155
|
-
|
|
21156
|
-
|
|
21157
|
-
|
|
21158
|
-
|
|
21159
|
-
|
|
21160
|
-
|
|
21161
|
-
|
|
21162
|
-
|
|
21163
|
-
|
|
21164
|
-
|
|
21165
|
-
|
|
21166
|
-
|
|
21167
|
-
|
|
21168
|
-
|
|
21169
|
-
|
|
21170
|
-
|
|
21171
|
-
|
|
21172
|
-
|
|
21289
|
+
if (this.orchestrator) {
|
|
21290
|
+
const vercelConfig2 = await this.getVercelConfig();
|
|
21291
|
+
if (vercelConfig2.experimentalServicesV2 || vercelConfig2.services) {
|
|
21292
|
+
const routeResult = await devRouter(
|
|
21293
|
+
req.url || "/",
|
|
21294
|
+
req.method,
|
|
21295
|
+
vercelConfig2.routes,
|
|
21296
|
+
this,
|
|
21297
|
+
vercelConfig2
|
|
21298
|
+
);
|
|
21299
|
+
if (isServiceDestination(routeResult.matched_route)) {
|
|
21300
|
+
const { service: serviceName } = routeResult.matched_route.destination;
|
|
21301
|
+
const origin = this.orchestrator.getServiceOrigin(serviceName);
|
|
21302
|
+
if (origin) {
|
|
21303
|
+
output_manager_default.debug(
|
|
21304
|
+
`Detected "upgrade" event, proxying to service "${serviceName}" at ${origin}`
|
|
21305
|
+
);
|
|
21306
|
+
this.proxy.ws(req, socket, head, { target: origin });
|
|
21307
|
+
return;
|
|
21308
|
+
}
|
|
21173
21309
|
}
|
|
21174
21310
|
}
|
|
21311
|
+
output_manager_default.debug(
|
|
21312
|
+
`Detected "upgrade" event, but no matching service found for ${pathname2}`
|
|
21313
|
+
);
|
|
21314
|
+
socket.destroy();
|
|
21315
|
+
return;
|
|
21175
21316
|
}
|
|
21176
|
-
output_manager_default.debug(
|
|
21177
|
-
`Detected "upgrade" event, but no matching service found for ${pathname2}`
|
|
21178
|
-
);
|
|
21179
|
-
socket.destroy();
|
|
21180
|
-
return;
|
|
21181
21317
|
}
|
|
21182
21318
|
if (this.devProcessOrigin) {
|
|
21183
21319
|
const target = this.devProcessOrigin;
|
|
@@ -21188,7 +21324,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21188
21324
|
const pathname = url3.parse(req.url || "/").pathname || "/";
|
|
21189
21325
|
for (const match of this.buildMatches.values()) {
|
|
21190
21326
|
const { builder } = match.builderWithPkg;
|
|
21191
|
-
if (typeof builder.startDevServer === "function") {
|
|
21327
|
+
if ((builder.version === 3 || builder.version === -1) && typeof builder.startDevServer === "function") {
|
|
21192
21328
|
try {
|
|
21193
21329
|
const result = await builder.startDevServer({
|
|
21194
21330
|
files: this.files,
|
|
@@ -21200,6 +21336,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21200
21336
|
isDev: true,
|
|
21201
21337
|
requestPath: pathname,
|
|
21202
21338
|
devCacheDir: this.devCacheDir,
|
|
21339
|
+
...this.getSidecarDevMeta(match),
|
|
21203
21340
|
env: { ...this.envConfigs.runEnv },
|
|
21204
21341
|
buildEnv: { ...this.envConfigs.buildEnv }
|
|
21205
21342
|
}
|
|
@@ -21252,6 +21389,9 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21252
21389
|
if (this.orchestrator) {
|
|
21253
21390
|
ops.push(this.orchestrator.stopAll());
|
|
21254
21391
|
}
|
|
21392
|
+
if (this.sidecarOrchestrator) {
|
|
21393
|
+
ops.push(this.sidecarOrchestrator.stopAll());
|
|
21394
|
+
}
|
|
21255
21395
|
if (this.queueBroker) {
|
|
21256
21396
|
this.queueBroker.stop();
|
|
21257
21397
|
}
|
|
@@ -21673,11 +21813,13 @@ ${error_code}
|
|
|
21673
21813
|
return;
|
|
21674
21814
|
}
|
|
21675
21815
|
this.currentDevCommand = devCommand2;
|
|
21676
|
-
if (!devCommand2) {
|
|
21677
|
-
return;
|
|
21678
|
-
}
|
|
21679
21816
|
if (this.devProcess) {
|
|
21680
21817
|
await treeKill(this.devProcess.pid);
|
|
21818
|
+
this.devProcess = void 0;
|
|
21819
|
+
this.devProcessOrigin = void 0;
|
|
21820
|
+
}
|
|
21821
|
+
if (!devCommand2) {
|
|
21822
|
+
return;
|
|
21681
21823
|
}
|
|
21682
21824
|
output_manager_default.log(`Running Dev Command ${import_chalk2.default.cyan.bold(`\u201C${devCommand2}\u201D`)}`);
|
|
21683
21825
|
const port = await (0, import_get_port2.default)();
|
|
@@ -21693,6 +21835,7 @@ ${error_code}
|
|
|
21693
21835
|
},
|
|
21694
21836
|
process.env,
|
|
21695
21837
|
this.envConfigs.allEnv,
|
|
21838
|
+
this.hasSubscribers() ? this.getDevQueueEnv() : void 0,
|
|
21696
21839
|
{
|
|
21697
21840
|
PORT: `${port}`
|
|
21698
21841
|
}
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
} from "../../chunks/chunk-VGIMO3ZK.js";
|
|
16
16
|
import {
|
|
17
17
|
formatTable
|
|
18
|
-
} from "../../chunks/chunk-
|
|
18
|
+
} from "../../chunks/chunk-4RGSUV5C.js";
|
|
19
19
|
import {
|
|
20
20
|
suggestNextCommands
|
|
21
21
|
} from "../../chunks/chunk-XBN2O34P.js";
|
|
22
22
|
import {
|
|
23
23
|
formatEnvironment,
|
|
24
24
|
validateLsArgs
|
|
25
|
-
} from "../../chunks/chunk-
|
|
25
|
+
} from "../../chunks/chunk-GVZKC6PS.js";
|
|
26
26
|
import {
|
|
27
27
|
validateJsonOutput
|
|
28
28
|
} from "../../chunks/chunk-XPKWKPWA.js";
|
|
@@ -31,17 +31,17 @@ import {
|
|
|
31
31
|
} from "../../chunks/chunk-YPQSDAEW.js";
|
|
32
32
|
import {
|
|
33
33
|
getCommandAliases
|
|
34
|
-
} from "../../chunks/chunk-
|
|
35
|
-
import "../../chunks/chunk-
|
|
36
|
-
import "../../chunks/chunk-
|
|
37
|
-
import "../../chunks/chunk-
|
|
38
|
-
import "../../chunks/chunk-
|
|
39
|
-
import "../../chunks/chunk-
|
|
40
|
-
import "../../chunks/chunk-
|
|
41
|
-
import "../../chunks/chunk-
|
|
42
|
-
import "../../chunks/chunk-
|
|
43
|
-
import "../../chunks/chunk-
|
|
44
|
-
import "../../chunks/chunk-
|
|
34
|
+
} from "../../chunks/chunk-D43MOSMZ.js";
|
|
35
|
+
import "../../chunks/chunk-5OT26JZN.js";
|
|
36
|
+
import "../../chunks/chunk-7C7MMT4J.js";
|
|
37
|
+
import "../../chunks/chunk-RLJA2KI7.js";
|
|
38
|
+
import "../../chunks/chunk-JJWESW5Y.js";
|
|
39
|
+
import "../../chunks/chunk-QKR7GNAK.js";
|
|
40
|
+
import "../../chunks/chunk-5AJNUXWP.js";
|
|
41
|
+
import "../../chunks/chunk-7S3QUMIG.js";
|
|
42
|
+
import "../../chunks/chunk-22GUZ5KG.js";
|
|
43
|
+
import "../../chunks/chunk-IDMKFYEA.js";
|
|
44
|
+
import "../../chunks/chunk-HA7C7SDO.js";
|
|
45
45
|
import {
|
|
46
46
|
require_execa
|
|
47
47
|
} from "../../chunks/chunk-24FCBXI4.js";
|
|
@@ -52,11 +52,11 @@ import {
|
|
|
52
52
|
stamp_default
|
|
53
53
|
} from "../../chunks/chunk-64IF634X.js";
|
|
54
54
|
import "../../chunks/chunk-VXYGCOKL.js";
|
|
55
|
-
import "../../chunks/chunk-
|
|
55
|
+
import "../../chunks/chunk-IIUE7CDZ.js";
|
|
56
56
|
import {
|
|
57
57
|
help
|
|
58
|
-
} from "../../chunks/chunk-
|
|
59
|
-
import "../../chunks/chunk-
|
|
58
|
+
} from "../../chunks/chunk-QY63UKTP.js";
|
|
59
|
+
import "../../chunks/chunk-QEEGXNFK.js";
|
|
60
60
|
import {
|
|
61
61
|
STANDARD_ENVIRONMENTS,
|
|
62
62
|
addSubcommand,
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
require_frameworks,
|
|
79
79
|
runSubcommand,
|
|
80
80
|
updateSubcommand
|
|
81
|
-
} from "../../chunks/chunk-
|
|
81
|
+
} from "../../chunks/chunk-XHC5YRFY.js";
|
|
82
82
|
import {
|
|
83
83
|
buildCommandWithYes,
|
|
84
84
|
buildEnvAddCommandWithPreservedArgs,
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
getPreservedArgsForEnvUpdate,
|
|
90
90
|
outputActionRequired,
|
|
91
91
|
outputAgentError
|
|
92
|
-
} from "../../chunks/chunk-
|
|
92
|
+
} from "../../chunks/chunk-2QBF3ZL3.js";
|
|
93
93
|
import {
|
|
94
94
|
TelemetryClient,
|
|
95
95
|
require_dist as require_dist2
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
getFlagsSpecification,
|
|
99
99
|
parseArguments,
|
|
100
100
|
printError
|
|
101
|
-
} from "../../chunks/chunk-
|
|
101
|
+
} from "../../chunks/chunk-EHTPDXTS.js";
|
|
102
102
|
import {
|
|
103
103
|
getCommandName,
|
|
104
104
|
getCommandNamePlain,
|