@vercel/client 10.4.1 → 10.4.2-canary.2
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/create-deployment.d.ts +2 -2
- package/dist/create-deployment.js +1 -22
- package/dist/index.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function buildCreateDeployment(): (clientOptions: VercelClientOptions, deploymentOptions?: DeploymentOptions
|
|
1
|
+
import { VercelClientOptions, DeploymentOptions, DeploymentEventType } from './types';
|
|
2
|
+
export default function buildCreateDeployment(): (clientOptions: VercelClientOptions, deploymentOptions?: DeploymentOptions) => AsyncIterableIterator<{
|
|
3
3
|
type: DeploymentEventType;
|
|
4
4
|
payload: any;
|
|
5
5
|
}>;
|
|
@@ -7,10 +7,9 @@ const upload_1 = require("./upload");
|
|
|
7
7
|
const utils_1 = require("./utils");
|
|
8
8
|
const errors_1 = require("./errors");
|
|
9
9
|
function buildCreateDeployment() {
|
|
10
|
-
return async function* createDeployment(clientOptions, deploymentOptions = {}
|
|
10
|
+
return async function* createDeployment(clientOptions, deploymentOptions = {}) {
|
|
11
11
|
const { path } = clientOptions;
|
|
12
12
|
const debug = utils_1.createDebug(clientOptions.debug);
|
|
13
|
-
const cwd = process.cwd();
|
|
14
13
|
debug('Creating deployment...');
|
|
15
14
|
if (typeof path !== 'string' && !Array.isArray(path)) {
|
|
16
15
|
debug(`Error: 'path' is expected to be a string or an array. Received ${typeof path}`);
|
|
@@ -54,26 +53,6 @@ function buildCreateDeployment() {
|
|
|
54
53
|
debug(`Provided 'path' is a single file`);
|
|
55
54
|
}
|
|
56
55
|
const { fileList } = await utils_1.buildFileTree(path, clientOptions, debug);
|
|
57
|
-
let configPath;
|
|
58
|
-
if (!nowConfig) {
|
|
59
|
-
// If the user did not provide a config file, use the one in the root directory.
|
|
60
|
-
const relativePaths = fileList.map(f => path_1.relative(cwd, f));
|
|
61
|
-
const hasVercelConfig = relativePaths.includes('vercel.json');
|
|
62
|
-
const hasNowConfig = relativePaths.includes('now.json');
|
|
63
|
-
if (hasVercelConfig) {
|
|
64
|
-
if (hasNowConfig) {
|
|
65
|
-
throw new errors_1.DeploymentError({
|
|
66
|
-
code: 'conflicting_config',
|
|
67
|
-
message: 'Cannot use both a `vercel.json` and `now.json` file. Please delete the `now.json` file.',
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
configPath = 'vercel.json';
|
|
71
|
-
}
|
|
72
|
-
else if (hasNowConfig) {
|
|
73
|
-
configPath = 'now.json';
|
|
74
|
-
}
|
|
75
|
-
nowConfig = await utils_1.parseVercelConfig(configPath);
|
|
76
|
-
}
|
|
77
56
|
// This is a useful warning because it prevents people
|
|
78
57
|
// from getting confused about a deployment that renders 404.
|
|
79
58
|
if (fileList.length === 0) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { getVercelIgnore, buildFileTree } from './utils/index';
|
|
2
|
-
export declare const createDeployment: (clientOptions: import("./types").VercelClientOptions, deploymentOptions?: import("./types").DeploymentOptions
|
|
2
|
+
export declare const createDeployment: (clientOptions: import("./types").VercelClientOptions, deploymentOptions?: import("./types").DeploymentOptions) => AsyncIterableIterator<{
|
|
3
3
|
type: "warning" | "error" | "hashes-calculated" | "file-count" | "file-uploaded" | "all-files-uploaded" | "created" | "building" | "ready" | "alias-assigned" | "notice" | "tip" | "canceled" | "checks-registered" | "checks-completed" | "checks-running" | "checks-conclusion-succeeded" | "checks-conclusion-failed" | "checks-conclusion-skipped" | "checks-conclusion-canceled";
|
|
4
4
|
payload: any;
|
|
5
5
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/client",
|
|
3
|
-
"version": "10.4.
|
|
3
|
+
"version": "10.4.2-canary.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"homepage": "https://vercel.com",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@vercel/build-utils": "2.15.
|
|
44
|
+
"@vercel/build-utils": "2.15.2-canary.2",
|
|
45
45
|
"@zeit/fetch": "5.2.0",
|
|
46
46
|
"async-retry": "1.2.3",
|
|
47
47
|
"async-sema": "3.0.0",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"querystring": "^0.2.0",
|
|
54
54
|
"sleep-promise": "8.0.1"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "b61f049f1186ccc804cea35bcf61d16583ed6ca2"
|
|
57
57
|
}
|