@vercel/client 13.4.9 → 13.4.11
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/upload.js +1 -2
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +3 -3
- package/package.json +2 -3
- package/dist/utils/fetch.d.ts +0 -3
- package/dist/utils/fetch.js +0 -42
package/dist/upload.js
CHANGED
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilesMap } from './hashes';
|
|
2
|
-
import {
|
|
2
|
+
import { RequestInit } from 'node-fetch';
|
|
3
3
|
import ignore from 'ignore';
|
|
4
4
|
import { VercelClientOptions, VercelConfig } from '../types';
|
|
5
5
|
type Ignore = ReturnType<typeof ignore>;
|
|
@@ -17,7 +17,7 @@ export declare function getVercelIgnore(cwd: string | string[], prebuilt?: boole
|
|
|
17
17
|
ig: Ignore;
|
|
18
18
|
ignores: string[];
|
|
19
19
|
}>;
|
|
20
|
-
interface FetchOpts extends
|
|
20
|
+
interface FetchOpts extends RequestInit {
|
|
21
21
|
apiUrl?: string;
|
|
22
22
|
method?: string;
|
|
23
23
|
teamId?: string;
|
|
@@ -26,7 +26,7 @@ interface FetchOpts extends FetchOptions {
|
|
|
26
26
|
};
|
|
27
27
|
userAgent?: string;
|
|
28
28
|
}
|
|
29
|
-
export declare const fetch: (url: string, token: string, opts?: FetchOpts, debugEnabled?: boolean
|
|
29
|
+
export declare const fetch: (url: string, token: string, opts?: FetchOpts, debugEnabled?: boolean) => Promise<any>;
|
|
30
30
|
export interface PreparedFile {
|
|
31
31
|
file: string;
|
|
32
32
|
sha?: string;
|
package/dist/utils/index.js
CHANGED
|
@@ -39,7 +39,7 @@ __export(utils_exports, {
|
|
|
39
39
|
prepareFiles: () => prepareFiles
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(utils_exports);
|
|
42
|
-
var
|
|
42
|
+
var import_node_fetch = __toESM(require("node-fetch"));
|
|
43
43
|
var import_path = require("path");
|
|
44
44
|
var import_url = require("url");
|
|
45
45
|
var import_ignore = __toESM(require("ignore"));
|
|
@@ -222,7 +222,7 @@ ${clearRelative(ignoreFile)}`);
|
|
|
222
222
|
function clearRelative(str) {
|
|
223
223
|
return str.replace(/(\n|^)\.\//g, "$1");
|
|
224
224
|
}
|
|
225
|
-
const fetch = async (url, token, opts = {}, debugEnabled
|
|
225
|
+
const fetch = async (url, token, opts = {}, debugEnabled) => {
|
|
226
226
|
semaphore.acquire();
|
|
227
227
|
const debug = createDebug(debugEnabled);
|
|
228
228
|
let time;
|
|
@@ -248,7 +248,7 @@ const fetch = async (url, token, opts = {}, debugEnabled, useNodeFetch) => {
|
|
|
248
248
|
};
|
|
249
249
|
debug(`${opts.method || "GET"} ${url}`);
|
|
250
250
|
time = Date.now();
|
|
251
|
-
const res =
|
|
251
|
+
const res = await (0, import_node_fetch.default)(url, opts);
|
|
252
252
|
debug(`DONE in ${Date.now() - time}ms: ${opts.method || "GET"} ${url}`);
|
|
253
253
|
semaphore.release();
|
|
254
254
|
return res;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/client",
|
|
3
|
-
"version": "13.4.
|
|
3
|
+
"version": "13.4.11",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"homepage": "https://vercel.com",
|
|
@@ -30,10 +30,9 @@
|
|
|
30
30
|
"typescript": "4.9.5"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@vercel/build-utils": "8.4.
|
|
33
|
+
"@vercel/build-utils": "8.4.7",
|
|
34
34
|
"@vercel/error-utils": "2.0.2",
|
|
35
35
|
"@vercel/routing-utils": "3.1.0",
|
|
36
|
-
"@zeit/fetch": "5.2.0",
|
|
37
36
|
"async-retry": "1.2.3",
|
|
38
37
|
"async-sema": "3.0.0",
|
|
39
38
|
"fs-extra": "8.0.1",
|
package/dist/utils/fetch.d.ts
DELETED
package/dist/utils/fetch.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var fetch_exports = {};
|
|
30
|
-
__export(fetch_exports, {
|
|
31
|
-
nodeFetch: () => import_node_fetch.default,
|
|
32
|
-
zeitFetch: () => zeitFetch
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(fetch_exports);
|
|
35
|
-
var import_node_fetch = __toESM(require("node-fetch"));
|
|
36
|
-
var import_fetch = __toESM(require("@zeit/fetch"));
|
|
37
|
-
const zeitFetch = (0, import_fetch.default)(import_node_fetch.default);
|
|
38
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
-
0 && (module.exports = {
|
|
40
|
-
nodeFetch,
|
|
41
|
-
zeitFetch
|
|
42
|
-
});
|