@vercel/client 15.1.6 → 15.3.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @vercel/client
2
2
 
3
- [Join the Vercel Community](https://vercel.community/)
3
+ [Join the Vercel Community](https://community.vercel.com/)
4
4
 
5
5
  The official Node.js client for deploying to [Vercel](https://vercel.com).
6
6
 
package/dist/types.d.ts CHANGED
@@ -25,6 +25,7 @@ export interface VercelClientOptions {
25
25
  skipAutoDetectionConfirmation?: boolean;
26
26
  archive?: ArchiveFormat;
27
27
  agent?: Agent;
28
+ projectName?: string;
28
29
  }
29
30
  /** @deprecated Use VercelClientOptions instead. */
30
31
  export type NowClientOptions = VercelClientOptions;
@@ -9,7 +9,7 @@ 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(): string;
11
11
  export declare function parseVercelConfig(filePath?: string): Promise<VercelConfig>;
12
- export declare function buildFileTree(path: string | string[], { isDirectory, prebuilt, vercelOutputDir, }: Pick<VercelClientOptions, 'isDirectory' | 'prebuilt' | 'vercelOutputDir'>, debug: Debug): Promise<{
12
+ export declare function buildFileTree(path: string | string[], { isDirectory, prebuilt, vercelOutputDir, rootDirectory, projectName, }: Pick<VercelClientOptions, 'isDirectory' | 'prebuilt' | 'vercelOutputDir' | 'rootDirectory' | 'projectName'>, debug: Debug): Promise<{
13
13
  fileList: string[];
14
14
  ignoreList: string[];
15
15
  }>;
@@ -48,6 +48,7 @@ var import_build_utils = require("@vercel/build-utils");
48
48
  var import_async_sema = require("async-sema");
49
49
  var import_fs_extra = require("fs-extra");
50
50
  var import_readdir_recursive = __toESM(require("./readdir-recursive"));
51
+ var import_utils = require("@vercel/microfrontends/microfrontends/utils");
51
52
  const semaphore = new import_async_sema.Sema(10);
52
53
  const API_FILES = "/v2/files";
53
54
  const EVENTS_ARRAY = [
@@ -101,7 +102,9 @@ const maybeRead = async function(path, default_) {
101
102
  async function buildFileTree(path, {
102
103
  isDirectory,
103
104
  prebuilt,
104
- vercelOutputDir
105
+ vercelOutputDir,
106
+ rootDirectory,
107
+ projectName
105
108
  }, debug) {
106
109
  const ignoreList = [];
107
110
  let fileList;
@@ -134,6 +137,24 @@ async function buildFileTree(path, {
134
137
  }
135
138
  })
136
139
  );
140
+ try {
141
+ let microfrontendConfigPath = (0, import_utils.findConfig)({
142
+ dir: (0, import_path.join)(path, rootDirectory || "")
143
+ });
144
+ if (!microfrontendConfigPath && !rootDirectory && projectName) {
145
+ microfrontendConfigPath = (0, import_utils.findConfig)({
146
+ dir: (0, import_utils.inferMicrofrontendsLocation)({
147
+ repositoryRoot: path,
148
+ applicationName: projectName
149
+ })
150
+ });
151
+ }
152
+ if (microfrontendConfigPath) {
153
+ refs.add(microfrontendConfigPath);
154
+ }
155
+ } catch (e) {
156
+ debug(`Error detecting microfrontend config: ${e}`);
157
+ }
137
158
  if (refs.size > 0) {
138
159
  fileList = fileList.concat(Array.from(refs));
139
160
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/client",
3
- "version": "15.1.6",
3
+ "version": "15.3.0",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "homepage": "https://vercel.com",
@@ -27,12 +27,13 @@
27
27
  "@types/recursive-readdir": "2.2.0",
28
28
  "@types/tar-fs": "1.16.1",
29
29
  "jest-junit": "16.0.0",
30
- "vitest": "2.0.1",
31
- "typescript": "4.9.5"
30
+ "typescript": "4.9.5",
31
+ "vitest": "2.0.1"
32
32
  },
33
33
  "dependencies": {
34
34
  "@vercel/build-utils": "10.5.1",
35
35
  "@vercel/error-utils": "2.0.3",
36
+ "@vercel/microfrontends": "1.2.2",
36
37
  "@vercel/routing-utils": "5.0.4",
37
38
  "async-retry": "1.2.3",
38
39
  "async-sema": "3.0.0",