@vercel/client 13.1.9 → 13.2.1

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.
@@ -40,10 +40,7 @@ async function* checkDeploymentStatus(deployment, clientOptions) {
40
40
  const { token, teamId, apiUrl, userAgent } = clientOptions;
41
41
  const debug = (0, import_utils2.createDebug)(clientOptions.debug);
42
42
  let deploymentState = deployment;
43
- const apiDeployments = (0, import_utils.getApiDeploymentsUrl)({
44
- builds: deployment.builds,
45
- functions: deployment.functions
46
- });
43
+ const apiDeployments = (0, import_utils.getApiDeploymentsUrl)();
47
44
  if ((0, import_ready_state.isDone)(deploymentState) && (0, import_ready_state.isAliasAssigned)(deploymentState)) {
48
45
  debug(
49
46
  `Deployment is already READY and aliases are assigned. Not running status checks`
package/dist/deploy.js CHANGED
@@ -28,7 +28,10 @@ var import_utils = require("./utils");
28
28
  async function* postDeployment(files, clientOptions, deploymentOptions) {
29
29
  const debug = (0, import_utils.createDebug)(clientOptions.debug);
30
30
  const preparedFiles = (0, import_utils.prepareFiles)(files, clientOptions);
31
- const apiDeployments = (0, import_utils.getApiDeploymentsUrl)(deploymentOptions);
31
+ const apiDeployments = (0, import_utils.getApiDeploymentsUrl)();
32
+ if (deploymentOptions?.builds && !deploymentOptions.functions) {
33
+ clientOptions.skipAutoDetectionConfirmation = true;
34
+ }
32
35
  debug("Sending deployment creation API request");
33
36
  try {
34
37
  const response = await (0, import_utils.fetch)(
@@ -1,13 +1,13 @@
1
1
  import { FilesMap } from './hashes';
2
2
  import { FetchOptions } from '@zeit/fetch';
3
3
  import ignore from 'ignore';
4
- import { VercelClientOptions, DeploymentOptions, VercelConfig } from '../types';
4
+ import { VercelClientOptions, VercelConfig } from '../types';
5
5
  type Ignore = ReturnType<typeof ignore>;
6
6
  export declare const API_FILES = "/v2/files";
7
7
  declare const EVENTS_ARRAY: readonly ["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"];
8
8
  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
- export declare function getApiDeploymentsUrl(metadata?: Pick<DeploymentOptions, 'builds' | 'functions'>): "/v10/deployments" | "/v13/deployments";
10
+ export declare function getApiDeploymentsUrl(): string;
11
11
  export declare function parseVercelConfig(filePath?: string): Promise<VercelConfig>;
12
12
  export declare function buildFileTree(path: string | string[], { isDirectory, prebuilt, vercelOutputDir, }: Pick<VercelClientOptions, 'isDirectory' | 'prebuilt' | 'vercelOutputDir'>, debug: Debug): Promise<{
13
13
  fileList: string[];
@@ -76,10 +76,7 @@ const EVENTS_ARRAY = [
76
76
  "checks-conclusion-canceled"
77
77
  ];
78
78
  const EVENTS = new Set(EVENTS_ARRAY);
79
- function getApiDeploymentsUrl(metadata) {
80
- if (metadata && metadata.builds && !metadata.functions) {
81
- return "/v10/deployments";
82
- }
79
+ function getApiDeploymentsUrl() {
83
80
  return "/v13/deployments";
84
81
  }
85
82
  async function parseVercelConfig(filePath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/client",
3
- "version": "13.1.9",
3
+ "version": "13.2.1",
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.11.0",
33
+ "@vercel/build-utils": "7.12.0",
34
34
  "@vercel/error-utils": "2.0.2",
35
35
  "@vercel/routing-utils": "3.1.0",
36
36
  "@zeit/fetch": "5.2.0",