@vercel/client 18.6.2 → 18.8.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
@@ -1,4 +1,4 @@
1
- import type { Builder, BuilderFunctions, Images, ProjectSettings, Cron, Schedule, ExperimentalServices, ExperimentalServiceGroups, ExperimentalServicesV2, Services, Daemons } from '@vercel/build-utils';
1
+ import type { Builder, BuilderFunctions, Images, ProjectSettings, Cron, VercelJsonSchedule, ExperimentalServices, ExperimentalServiceGroups, ExperimentalServicesV2, Services, Daemons } from '@vercel/build-utils';
2
2
  import type { Header, Route, Redirect, Rewrite } from '@vercel/routing-utils';
3
3
  export type { DeploymentEventType } from './utils';
4
4
  /**
@@ -133,29 +133,7 @@ export interface DeploymentGithubData {
133
133
  silent: boolean;
134
134
  autoJobCancelation: boolean;
135
135
  }
136
- export type VercelConfigSchedule = Omit<Schedule, 'target'> & {
137
- target: Schedule['target'] | {
138
- entrypoint: string;
139
- };
140
- };
141
- /**
142
- * Flat `vercel.json` schedule. Config validation normalizes it to
143
- * `VercelConfigSchedule`.
144
- */
145
- export type VercelConfigFlatSchedule = {
146
- name?: string;
147
- schedule: string;
148
- timezone?: string;
149
- jitter?: number;
150
- } & ({
151
- path: string;
152
- } | {
153
- function: string;
154
- } | {
155
- topic: string;
156
- } | {
157
- entrypoint: string;
158
- });
136
+ export type VercelConfigSchedule = VercelJsonSchedule;
159
137
  export declare const fileNameSymbol: unique symbol;
160
138
  export interface VercelConfig {
161
139
  [fileNameSymbol]?: string;
@@ -188,7 +166,7 @@ export interface VercelConfig {
188
166
  outputDirectory?: string | null;
189
167
  images?: Images;
190
168
  crons?: Cron[];
191
- schedules?: (VercelConfigSchedule | VercelConfigFlatSchedule)[];
169
+ schedules?: VercelConfigSchedule[];
192
170
  bunVersion?: string;
193
171
  proxy?: ProxyConfig;
194
172
  /**
@@ -123,6 +123,8 @@ async function getUserIgnore(cwd) {
123
123
  ignoreFileName: vercelignore ? ".vercelignore" : ".nowignore"
124
124
  };
125
125
  }
126
+ const VCS_DEFAULTS = [".hg", ".git", ".gitmodules", ".svn", "CVS"];
127
+ const filePathMapVcsDefaults = (0, import_ignore.default)().add(VCS_DEFAULTS);
126
128
  const FILEPATHMAP_VERCELIGNORE_EXCEPTIONS = [
127
129
  "node_modules",
128
130
  ".next",
@@ -226,6 +228,12 @@ async function buildFileTree(path, {
226
228
  );
227
229
  continue;
228
230
  }
231
+ if (filePathMapVcsDefaults.ignores(posixRel)) {
232
+ throw new import_build_utils.NowBuildError({
233
+ code: "PREBUILT_FILEPATHMAP_VCS",
234
+ message: "Prebuilt functions reference version-control files that cannot be uploaded. Exclude version-control files from tracing and rebuild the prebuilt output."
235
+ });
236
+ }
229
237
  if (userIg && userIg.ig.ignores(posixRel)) {
230
238
  if (isFilePathMapIgnoreException(posixRel)) {
231
239
  debug(
@@ -371,10 +379,7 @@ async function getVercelIgnore(cwd, prebuilt, vercelOutputDir) {
371
379
  ig.add(ignores.join("\n"));
372
380
  } else {
373
381
  ignores = [
374
- ".hg",
375
- ".git",
376
- ".gitmodules",
377
- ".svn",
382
+ ...VCS_DEFAULTS,
378
383
  ".cache",
379
384
  ".next",
380
385
  ".now",
@@ -395,8 +400,7 @@ async function getVercelIgnore(cwd, prebuilt, vercelOutputDir) {
395
400
  "config.gypi",
396
401
  "node_modules",
397
402
  "__pycache__",
398
- "venv",
399
- "CVS"
403
+ "venv"
400
404
  ];
401
405
  const cwds = Array.isArray(cwd) ? cwd : [cwd];
402
406
  const files = await Promise.all(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/client",
3
- "version": "18.6.2",
3
+ "version": "18.8.0",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "homepage": "https://vercel.com",
@@ -37,9 +37,9 @@
37
37
  "querystring": "^0.2.0",
38
38
  "sleep-promise": "8.0.1",
39
39
  "tar-fs": "1.16.3",
40
- "@vercel/build-utils": "14.17.0",
41
40
  "@vercel/error-utils": "2.2.1",
42
- "@vercel/routing-utils": "6.6.0"
41
+ "@vercel/routing-utils": "6.6.0",
42
+ "@vercel/build-utils": "14.19.0"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "node ../../utils/build.mjs",