@vercel/build-utils 6.1.0 → 6.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.
package/dist/index.js CHANGED
@@ -31851,6 +31851,7 @@ async function getLambdaOptionsFromFunction({ sourceFile, config, }) {
31851
31851
  return {
31852
31852
  memory: fn.memory,
31853
31853
  maxDuration: fn.maxDuration,
31854
+ cron: fn.cron,
31854
31855
  };
31855
31856
  }
31856
31857
  }
@@ -31892,7 +31893,7 @@ exports.NodejsLambda = NodejsLambda;
31892
31893
  Object.defineProperty(exports, "__esModule", ({ value: true }));
31893
31894
  exports.Prerender = void 0;
31894
31895
  class Prerender {
31895
- constructor({ expiration, lambda, fallback, group, bypassToken, allowQuery, initialHeaders, initialStatus, }) {
31896
+ constructor({ expiration, lambda, fallback, group, bypassToken, allowQuery, initialHeaders, initialStatus, passQuery, }) {
31896
31897
  this.type = 'Prerender';
31897
31898
  this.expiration = expiration;
31898
31899
  this.lambda = lambda;
@@ -31905,6 +31906,13 @@ class Prerender {
31905
31906
  throw new Error('The `group` argument for `Prerender` needs to be a natural number.');
31906
31907
  }
31907
31908
  this.group = group;
31909
+ if (passQuery === true) {
31910
+ this.passQuery = true;
31911
+ }
31912
+ else if (typeof passQuery !== 'boolean' &&
31913
+ typeof passQuery !== 'undefined') {
31914
+ throw new Error(`The \`passQuery\` argument for \`Prerender\` must be a boolean.`);
31915
+ }
31908
31916
  if (bypassToken == null) {
31909
31917
  this.bypassToken = null;
31910
31918
  }
@@ -31992,6 +32000,11 @@ exports.functionsSchema = {
31992
32000
  type: 'string',
31993
32001
  maxLength: 256,
31994
32002
  },
32003
+ cron: {
32004
+ type: 'string',
32005
+ minLength: 9,
32006
+ maxLength: 256,
32007
+ },
31995
32008
  },
31996
32009
  },
31997
32010
  },
package/dist/lambda.d.ts CHANGED
@@ -66,5 +66,5 @@ export declare class Lambda {
66
66
  */
67
67
  export declare function createLambda(opts: LambdaOptions): Promise<Lambda>;
68
68
  export declare function createZip(files: Files): Promise<Buffer>;
69
- export declare function getLambdaOptionsFromFunction({ sourceFile, config, }: GetLambdaOptionsFromFunctionOptions): Promise<Pick<LambdaOptions, 'memory' | 'maxDuration'>>;
69
+ export declare function getLambdaOptionsFromFunction({ sourceFile, config, }: GetLambdaOptionsFromFunctionOptions): Promise<Pick<LambdaOptions, 'memory' | 'maxDuration' | 'cron'>>;
70
70
  export {};
package/dist/lambda.js CHANGED
@@ -133,6 +133,7 @@ async function getLambdaOptionsFromFunction({ sourceFile, config, }) {
133
133
  return {
134
134
  memory: fn.memory,
135
135
  maxDuration: fn.maxDuration,
136
+ cron: fn.cron,
136
137
  };
137
138
  }
138
139
  }
@@ -9,6 +9,7 @@ interface PrerenderOptions {
9
9
  allowQuery?: string[];
10
10
  initialHeaders?: Record<string, string>;
11
11
  initialStatus?: number;
12
+ passQuery?: boolean;
12
13
  }
13
14
  export declare class Prerender {
14
15
  type: 'Prerender';
@@ -20,6 +21,7 @@ export declare class Prerender {
20
21
  allowQuery?: string[];
21
22
  initialHeaders?: Record<string, string>;
22
23
  initialStatus?: number;
23
- constructor({ expiration, lambda, fallback, group, bypassToken, allowQuery, initialHeaders, initialStatus, }: PrerenderOptions);
24
+ passQuery?: boolean;
25
+ constructor({ expiration, lambda, fallback, group, bypassToken, allowQuery, initialHeaders, initialStatus, passQuery, }: PrerenderOptions);
24
26
  }
25
27
  export {};
package/dist/prerender.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Prerender = void 0;
4
4
  class Prerender {
5
- constructor({ expiration, lambda, fallback, group, bypassToken, allowQuery, initialHeaders, initialStatus, }) {
5
+ constructor({ expiration, lambda, fallback, group, bypassToken, allowQuery, initialHeaders, initialStatus, passQuery, }) {
6
6
  this.type = 'Prerender';
7
7
  this.expiration = expiration;
8
8
  this.lambda = lambda;
@@ -15,6 +15,13 @@ class Prerender {
15
15
  throw new Error('The `group` argument for `Prerender` needs to be a natural number.');
16
16
  }
17
17
  this.group = group;
18
+ if (passQuery === true) {
19
+ this.passQuery = true;
20
+ }
21
+ else if (typeof passQuery !== 'boolean' &&
22
+ typeof passQuery !== 'undefined') {
23
+ throw new Error(`The \`passQuery\` argument for \`Prerender\` must be a boolean.`);
24
+ }
18
25
  if (bypassToken == null) {
19
26
  this.bypassToken = null;
20
27
  }
package/dist/schemas.d.ts CHANGED
@@ -28,6 +28,11 @@ export declare const functionsSchema: {
28
28
  type: string;
29
29
  maxLength: number;
30
30
  };
31
+ cron: {
32
+ type: string;
33
+ minLength: number;
34
+ maxLength: number;
35
+ };
31
36
  };
32
37
  };
33
38
  };
package/dist/schemas.js CHANGED
@@ -34,6 +34,11 @@ exports.functionsSchema = {
34
34
  type: 'string',
35
35
  maxLength: 256,
36
36
  },
37
+ cron: {
38
+ type: 'string',
39
+ minLength: 9,
40
+ maxLength: 256,
41
+ },
37
42
  },
38
43
  },
39
44
  },
package/dist/types.d.ts CHANGED
@@ -282,6 +282,7 @@ export interface BuilderFunctions {
282
282
  runtime?: string;
283
283
  includeFiles?: string;
284
284
  excludeFiles?: string;
285
+ cron?: Cron;
285
286
  };
286
287
  }
287
288
  export interface ProjectSettings {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "6.1.0",
3
+ "version": "6.2.1",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -51,5 +51,5 @@
51
51
  "typescript": "4.3.4",
52
52
  "yazl": "2.5.1"
53
53
  },
54
- "gitHead": "a4d16c681a7e85f64a2d78432d499c599b398bde"
54
+ "gitHead": "c1c8b454cc29de4bd306b87078f36d6416ceb90f"
55
55
  }