@vercel/container 8.2.0 → 8.2.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/index.js +16 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2470,12 +2470,26 @@ async function startContainer(options, reuseKey) {
|
|
|
2470
2470
|
mergedEnv[key] = value;
|
|
2471
2471
|
}
|
|
2472
2472
|
}
|
|
2473
|
+
const devResourceEndpoints = meta?.devResourceEndpoints;
|
|
2473
2474
|
const runtimeCacheEndpoint = mergedEnv.RUNTIME_CACHE_ENDPOINT;
|
|
2474
|
-
const
|
|
2475
|
-
const
|
|
2475
|
+
const runtimeCacheProxy = devResourceEndpoints?.runtimeCache;
|
|
2476
|
+
const usesRuntimeCacheProxy = runtimeCacheEndpoint === runtimeCacheProxy?.direct;
|
|
2477
|
+
const containerRuntimeCacheEndpoint = runtimeCacheEndpoint ? useContainerHost(
|
|
2478
|
+
usesRuntimeCacheProxy && runtimeCacheProxy ? runtimeCacheProxy.proxy : runtimeCacheEndpoint
|
|
2479
|
+
) : void 0;
|
|
2480
|
+
const queueBaseUrl = mergedEnv.VERCEL_QUEUE_BASE_URL;
|
|
2481
|
+
const queueProxy = devResourceEndpoints?.queues;
|
|
2482
|
+
const usesQueueProxy = queueBaseUrl === queueProxy?.direct;
|
|
2483
|
+
const containerQueueBaseUrl = queueBaseUrl ? useContainerHost(
|
|
2484
|
+
usesQueueProxy && queueProxy ? queueProxy.proxy : queueBaseUrl
|
|
2485
|
+
) : void 0;
|
|
2486
|
+
const needsHostGateway = containerRuntimeCacheEndpoint !== void 0 && containerRuntimeCacheEndpoint !== runtimeCacheEndpoint || containerQueueBaseUrl !== void 0 && containerQueueBaseUrl !== queueBaseUrl;
|
|
2476
2487
|
if (containerRuntimeCacheEndpoint) {
|
|
2477
2488
|
mergedEnv.RUNTIME_CACHE_ENDPOINT = containerRuntimeCacheEndpoint;
|
|
2478
2489
|
}
|
|
2490
|
+
if (containerQueueBaseUrl) {
|
|
2491
|
+
mergedEnv.VERCEL_QUEUE_BASE_URL = containerQueueBaseUrl;
|
|
2492
|
+
}
|
|
2479
2493
|
mergedEnv.PORT = String(containerPort);
|
|
2480
2494
|
const envFilePath = writeEnvFile(mergedEnv);
|
|
2481
2495
|
const rawCommand = config.command;
|