@vercel/client 12.4.12 → 12.5.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/check-deployment-status.js +1 -1
- package/dist/deploy.js +1 -0
- package/dist/types.d.ts +3 -0
- package/dist/upload.js +2 -2
- package/package.json +2 -2
|
@@ -29,7 +29,7 @@ async function* checkDeploymentStatus(deployment, clientOptions) {
|
|
|
29
29
|
const startTime = Date.now();
|
|
30
30
|
while (true) {
|
|
31
31
|
// Deployment polling
|
|
32
|
-
const deploymentData = await (0, utils_1.fetch)(`${apiDeployments}/${deployment.id || deployment.deploymentId}${teamId ? `?teamId=${teamId}` : ''}`, token, { apiUrl, userAgent });
|
|
32
|
+
const deploymentData = await (0, utils_1.fetch)(`${apiDeployments}/${deployment.id || deployment.deploymentId}${teamId ? `?teamId=${teamId}` : ''}`, token, { apiUrl, userAgent, agent: clientOptions.agent });
|
|
33
33
|
const deploymentUpdate = await deploymentData.json();
|
|
34
34
|
if (deploymentUpdate.error) {
|
|
35
35
|
debug('Deployment status check has errorred');
|
package/dist/deploy.js
CHANGED
|
@@ -23,6 +23,7 @@ async function* postDeployment(files, clientOptions, deploymentOptions) {
|
|
|
23
23
|
}),
|
|
24
24
|
apiUrl: clientOptions.apiUrl,
|
|
25
25
|
userAgent: clientOptions.userAgent,
|
|
26
|
+
agent: clientOptions.agent,
|
|
26
27
|
});
|
|
27
28
|
const deployment = await response.json();
|
|
28
29
|
if (clientOptions.debug) {
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Agent } from 'http';
|
|
1
3
|
import type { Builder, BuilderFunctions, Images, ProjectSettings, Cron } from '@vercel/build-utils';
|
|
2
4
|
import type { Header, Route, Redirect, Rewrite } from '@vercel/routing-utils';
|
|
3
5
|
export { DeploymentEventType } from './utils';
|
|
@@ -21,6 +23,7 @@ export interface VercelClientOptions {
|
|
|
21
23
|
isDirectory?: boolean;
|
|
22
24
|
skipAutoDetectionConfirmation?: boolean;
|
|
23
25
|
archive?: ArchiveFormat;
|
|
26
|
+
agent?: Agent;
|
|
24
27
|
}
|
|
25
28
|
/** @deprecated Use VercelClientOptions instead. */
|
|
26
29
|
export type NowClientOptions = VercelClientOptions;
|
package/dist/upload.js
CHANGED
|
@@ -64,7 +64,7 @@ async function* upload(files, clientOptions, deploymentOptions) {
|
|
|
64
64
|
const uploadList = {};
|
|
65
65
|
debug('Building an upload list...');
|
|
66
66
|
const semaphore = new async_sema_1.Sema(50, { capacity: 50 });
|
|
67
|
-
const
|
|
67
|
+
const defaultAgent = apiUrl?.startsWith('https://')
|
|
68
68
|
? new https_1.default.Agent({ keepAlive: true })
|
|
69
69
|
: new http_1.default.Agent({ keepAlive: true });
|
|
70
70
|
shas.forEach((sha, index) => {
|
|
@@ -103,7 +103,7 @@ async function* upload(files, clientOptions, deploymentOptions) {
|
|
|
103
103
|
let result;
|
|
104
104
|
try {
|
|
105
105
|
const res = await (0, utils_1.fetch)(utils_1.API_FILES, token, {
|
|
106
|
-
agent,
|
|
106
|
+
agent: clientOptions.agent || defaultAgent,
|
|
107
107
|
method: 'POST',
|
|
108
108
|
headers: {
|
|
109
109
|
'Content-Type': 'application/octet-stream',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/client",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.5.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"homepage": "https://vercel.com",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"sleep-promise": "8.0.1",
|
|
50
50
|
"tar-fs": "1.16.3"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "d1d3e9384d139a06acca521348f8f9209bb3d214"
|
|
53
53
|
}
|