@vercel/client 15.2.0 → 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/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, rootDirectory, }: Pick<VercelClientOptions, 'isDirectory' | 'prebuilt' | 'vercelOutputDir' | 'rootDirectory'>, 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 = [
@@ -102,7 +103,8 @@ async function buildFileTree(path, {
102
103
  isDirectory,
103
104
  prebuilt,
104
105
  vercelOutputDir,
105
- rootDirectory
106
+ rootDirectory,
107
+ projectName
106
108
  }, debug) {
107
109
  const ignoreList = [];
108
110
  let fileList;
@@ -135,13 +137,23 @@ async function buildFileTree(path, {
135
137
  }
136
138
  })
137
139
  );
138
- const microfrontendConfigPath = (0, import_path.join)(
139
- path,
140
- rootDirectory || "",
141
- "microfrontends.json"
142
- );
143
- if (await (0, import_fs_extra.pathExists)(microfrontendConfigPath)) {
144
- refs.add(microfrontendConfigPath);
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}`);
145
157
  }
146
158
  if (refs.size > 0) {
147
159
  fileList = fileList.concat(Array.from(refs));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/client",
3
- "version": "15.2.0",
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",