@vercel/client 10.2.3-canary.43 → 10.2.3-canary.47
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/types.d.ts +3 -12
- package/dist/utils/hashes.js +3 -1
- package/dist/utils/index.js +4 -6
- package/package.json +3 -3
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Builder, BuilderFunctions } from '@vercel/build-utils';
|
|
1
|
+
import { Builder, BuilderFunctions, ProjectSettings } from '@vercel/build-utils';
|
|
2
2
|
import { Header, Route, Redirect, Rewrite } from '@vercel/routing-utils';
|
|
3
3
|
export { DeploymentEventType } from './utils';
|
|
4
4
|
export interface Dictionary<T> {
|
|
@@ -90,12 +90,7 @@ export interface VercelConfig {
|
|
|
90
90
|
scope?: string;
|
|
91
91
|
alias?: string | string[];
|
|
92
92
|
regions?: string[];
|
|
93
|
-
projectSettings?:
|
|
94
|
-
devCommand?: string | null;
|
|
95
|
-
buildCommand?: string | null;
|
|
96
|
-
outputDirectory?: string | null;
|
|
97
|
-
framework?: string | null;
|
|
98
|
-
};
|
|
93
|
+
projectSettings?: ProjectSettings;
|
|
99
94
|
}
|
|
100
95
|
/**
|
|
101
96
|
* Options that will be sent to the API.
|
|
@@ -120,9 +115,5 @@ export interface DeploymentOptions {
|
|
|
120
115
|
name?: string;
|
|
121
116
|
public?: boolean;
|
|
122
117
|
meta?: Dictionary<string>;
|
|
123
|
-
projectSettings?:
|
|
124
|
-
devCommand?: string | null;
|
|
125
|
-
buildCommand?: string | null;
|
|
126
|
-
outputDirectory?: string | null;
|
|
127
|
-
};
|
|
118
|
+
projectSettings?: ProjectSettings;
|
|
128
119
|
}
|
package/dist/utils/hashes.js
CHANGED
|
@@ -46,7 +46,9 @@ async function hashes(files, map = new Map()) {
|
|
|
46
46
|
const h = hash(data);
|
|
47
47
|
const entry = map.get(h);
|
|
48
48
|
if (entry) {
|
|
49
|
-
entry.names
|
|
49
|
+
const names = new Set(entry.names);
|
|
50
|
+
names.add(name);
|
|
51
|
+
entry.names = [...names];
|
|
50
52
|
}
|
|
51
53
|
else {
|
|
52
54
|
map.set(h, { names: [name], data, mode });
|
package/dist/utils/index.js
CHANGED
|
@@ -203,9 +203,8 @@ const fetch = async (url, token, opts = {}, debugEnabled, useNodeFetch) => {
|
|
|
203
203
|
exports.fetch = fetch;
|
|
204
204
|
const isWin = process.platform.includes('win');
|
|
205
205
|
const prepareFiles = (files, clientOptions) => {
|
|
206
|
-
const preparedFiles = [
|
|
207
|
-
|
|
208
|
-
const file = files.get(sha);
|
|
206
|
+
const preparedFiles = [];
|
|
207
|
+
for (const [sha, file] of files) {
|
|
209
208
|
for (const name of file.names) {
|
|
210
209
|
let fileName;
|
|
211
210
|
if (clientOptions.isDirectory) {
|
|
@@ -220,15 +219,14 @@ const prepareFiles = (files, clientOptions) => {
|
|
|
220
219
|
const segments = name.split(path_1.sep);
|
|
221
220
|
fileName = segments[segments.length - 1];
|
|
222
221
|
}
|
|
223
|
-
|
|
222
|
+
preparedFiles.push({
|
|
224
223
|
file: isWin ? fileName.replace(/\\/g, '/') : fileName,
|
|
225
224
|
size: file.data.byteLength || file.data.length,
|
|
226
225
|
mode: file.mode,
|
|
227
226
|
sha,
|
|
228
227
|
});
|
|
229
228
|
}
|
|
230
|
-
|
|
231
|
-
}, []);
|
|
229
|
+
}
|
|
232
230
|
return preparedFiles;
|
|
233
231
|
};
|
|
234
232
|
exports.prepareFiles = prepareFiles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/client",
|
|
3
|
-
"version": "10.2.3-canary.
|
|
3
|
+
"version": "10.2.3-canary.47",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"homepage": "https://vercel.com",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@vercel/build-utils": "2.12.3-canary.
|
|
43
|
+
"@vercel/build-utils": "2.12.3-canary.44",
|
|
44
44
|
"@zeit/fetch": "5.2.0",
|
|
45
45
|
"async-retry": "1.2.3",
|
|
46
46
|
"async-sema": "3.0.0",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"recursive-readdir": "2.2.2",
|
|
53
53
|
"sleep-promise": "8.0.1"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "ecb44812263a03803157ad258c2f0f3cd0fc83ef"
|
|
56
56
|
}
|