@vercel/client 13.1.8 → 13.1.9
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 +1 -0
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +15 -6
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
package/dist/utils/index.d.ts
CHANGED
|
@@ -9,11 +9,11 @@ export type DeploymentEventType = typeof EVENTS_ARRAY[number];
|
|
|
9
9
|
export declare const EVENTS: Set<"hashes-calculated" | "file-count" | "file-uploaded" | "all-files-uploaded" | "created" | "building" | "ready" | "alias-assigned" | "warning" | "error" | "notice" | "tip" | "canceled" | "checks-registered" | "checks-completed" | "checks-running" | "checks-conclusion-succeeded" | "checks-conclusion-failed" | "checks-conclusion-skipped" | "checks-conclusion-canceled">;
|
|
10
10
|
export declare function getApiDeploymentsUrl(metadata?: Pick<DeploymentOptions, 'builds' | 'functions'>): "/v10/deployments" | "/v13/deployments";
|
|
11
11
|
export declare function parseVercelConfig(filePath?: string): Promise<VercelConfig>;
|
|
12
|
-
export declare function buildFileTree(path: string | string[], { isDirectory, prebuilt, }: Pick<VercelClientOptions, 'isDirectory' | 'prebuilt'>, debug: Debug): Promise<{
|
|
12
|
+
export declare function buildFileTree(path: string | string[], { isDirectory, prebuilt, vercelOutputDir, }: Pick<VercelClientOptions, 'isDirectory' | 'prebuilt' | 'vercelOutputDir'>, debug: Debug): Promise<{
|
|
13
13
|
fileList: string[];
|
|
14
14
|
ignoreList: string[];
|
|
15
15
|
}>;
|
|
16
|
-
export declare function getVercelIgnore(cwd: string | string[], prebuilt?: boolean): Promise<{
|
|
16
|
+
export declare function getVercelIgnore(cwd: string | string[], prebuilt?: boolean, vercelOutputDir?: string): Promise<{
|
|
17
17
|
ig: Ignore;
|
|
18
18
|
ignores: string[];
|
|
19
19
|
}>;
|
package/dist/utils/index.js
CHANGED
|
@@ -103,11 +103,12 @@ const maybeRead = async function(path, default_) {
|
|
|
103
103
|
};
|
|
104
104
|
async function buildFileTree(path, {
|
|
105
105
|
isDirectory,
|
|
106
|
-
prebuilt
|
|
106
|
+
prebuilt,
|
|
107
|
+
vercelOutputDir
|
|
107
108
|
}, debug) {
|
|
108
109
|
const ignoreList = [];
|
|
109
110
|
let fileList;
|
|
110
|
-
let { ig, ignores } = await getVercelIgnore(path, prebuilt);
|
|
111
|
+
let { ig, ignores } = await getVercelIgnore(path, prebuilt, vercelOutputDir);
|
|
111
112
|
debug(`Found ${ignores.length} rules in .vercelignore`);
|
|
112
113
|
debug("Building file tree...");
|
|
113
114
|
if (isDirectory && !Array.isArray(path)) {
|
|
@@ -150,18 +151,26 @@ async function buildFileTree(path, {
|
|
|
150
151
|
}
|
|
151
152
|
return { fileList, ignoreList };
|
|
152
153
|
}
|
|
153
|
-
async function getVercelIgnore(cwd, prebuilt) {
|
|
154
|
+
async function getVercelIgnore(cwd, prebuilt, vercelOutputDir) {
|
|
154
155
|
const ig = (0, import_ignore.default)();
|
|
155
156
|
let ignores;
|
|
156
157
|
if (prebuilt) {
|
|
157
|
-
|
|
158
|
+
if (typeof vercelOutputDir !== "string") {
|
|
159
|
+
throw new Error(
|
|
160
|
+
`Missing required \`vercelOutputDir\` parameter when "prebuilt" is true`
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
if (typeof cwd !== "string") {
|
|
164
|
+
throw new Error(`\`cwd\` must be a "string"`);
|
|
165
|
+
}
|
|
166
|
+
const relOutputDir = (0, import_path.relative)(cwd, vercelOutputDir);
|
|
158
167
|
ignores = ["*"];
|
|
159
|
-
const parts =
|
|
168
|
+
const parts = relOutputDir.split(import_path.sep);
|
|
160
169
|
parts.forEach((_, i) => {
|
|
161
170
|
const level = parts.slice(0, i + 1).join("/");
|
|
162
171
|
ignores.push(`!${level}`);
|
|
163
172
|
});
|
|
164
|
-
ignores.push(`!${
|
|
173
|
+
ignores.push(`!${parts.join("/")}/**`);
|
|
165
174
|
ig.add(ignores.join("\n"));
|
|
166
175
|
} else {
|
|
167
176
|
ignores = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/client",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"homepage": "https://vercel.com",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"typescript": "4.9.5"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@vercel/build-utils": "7.
|
|
33
|
+
"@vercel/build-utils": "7.11.0",
|
|
34
34
|
"@vercel/error-utils": "2.0.2",
|
|
35
35
|
"@vercel/routing-utils": "3.1.0",
|
|
36
36
|
"@zeit/fetch": "5.2.0",
|