@vercel/build-utils 6.2.4 → 6.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.
@@ -1,4 +1,4 @@
1
- import type { Cron, Files, FunctionFramework } from './types';
1
+ import type { Files, FunctionFramework } from './types';
2
2
  /**
3
3
  * An Edge Functions output
4
4
  */
@@ -35,8 +35,6 @@ export declare class EdgeFunction {
35
35
  }[];
36
36
  /** The regions where the edge function will be executed on */
37
37
  regions?: string | string[];
38
- /** Cronjob definition for the edge function */
39
- cron?: Cron;
40
38
  /** The framework */
41
39
  framework?: FunctionFramework;
42
40
  constructor(params: Omit<EdgeFunction, 'type'>);
@@ -14,7 +14,6 @@ class EdgeFunction {
14
14
  this.envVarsInUse = params.envVarsInUse;
15
15
  this.assets = params.assets;
16
16
  this.regions = params.regions;
17
- this.cron = params.cron;
18
17
  this.framework = params.framework;
19
18
  }
20
19
  }
package/dist/index.js CHANGED
@@ -30253,7 +30253,6 @@ class EdgeFunction {
30253
30253
  this.envVarsInUse = params.envVarsInUse;
30254
30254
  this.assets = params.assets;
30255
30255
  this.regions = params.regions;
30256
- this.cron = params.cron;
30257
30256
  this.framework = params.framework;
30258
30257
  }
30259
30258
  }
@@ -31743,7 +31742,7 @@ const download_1 = __webpack_require__(3166);
31743
31742
  const stream_to_buffer_1 = __importDefault(__webpack_require__(9688));
31744
31743
  class Lambda {
31745
31744
  constructor(opts) {
31746
- const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, cron, supportsMultiPayloads, supportsWrapper, experimentalResponseStreaming, operationType, framework, } = opts;
31745
+ const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, supportsMultiPayloads, supportsWrapper, experimentalResponseStreaming, operationType, framework, } = opts;
31747
31746
  if ('files' in opts) {
31748
31747
  assert_1.default(typeof opts.files === 'object', '"files" must be an object');
31749
31748
  }
@@ -31773,9 +31772,6 @@ class Lambda {
31773
31772
  assert_1.default(Array.isArray(regions), '"regions" is not an Array');
31774
31773
  assert_1.default(regions.every(r => typeof r === 'string'), '"regions" is not a string Array');
31775
31774
  }
31776
- if (cron !== undefined) {
31777
- assert_1.default(typeof cron === 'string', '"cron" is not a string');
31778
- }
31779
31775
  if (framework !== undefined) {
31780
31776
  assert_1.default(typeof framework === 'object', '"framework" is not an object');
31781
31777
  assert_1.default(typeof framework.slug === 'string', '"framework.slug" is not a string');
@@ -31793,7 +31789,6 @@ class Lambda {
31793
31789
  this.environment = environment;
31794
31790
  this.allowQuery = allowQuery;
31795
31791
  this.regions = regions;
31796
- this.cron = cron;
31797
31792
  this.zipBuffer = 'zipBuffer' in opts ? opts.zipBuffer : undefined;
31798
31793
  this.supportsMultiPayloads = supportsMultiPayloads;
31799
31794
  this.supportsWrapper = supportsWrapper;
@@ -31871,7 +31866,6 @@ async function getLambdaOptionsFromFunction({ sourceFile, config, }) {
31871
31866
  return {
31872
31867
  memory: fn.memory,
31873
31868
  maxDuration: fn.maxDuration,
31874
- cron: fn.cron,
31875
31869
  };
31876
31870
  }
31877
31871
  }
@@ -32018,11 +32012,6 @@ exports.functionsSchema = {
32018
32012
  type: 'string',
32019
32013
  maxLength: 256,
32020
32014
  },
32021
- cron: {
32022
- type: 'string',
32023
- minLength: 9,
32024
- maxLength: 256,
32025
- },
32026
32015
  },
32027
32016
  },
32028
32017
  },
package/dist/lambda.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import type { Files, Config, Cron, FunctionFramework } from './types';
2
+ import type { Files, Config, FunctionFramework } from './types';
3
3
  interface Environment {
4
4
  [key: string]: string;
5
5
  }
@@ -16,7 +16,6 @@ export interface LambdaOptionsBase {
16
16
  supportsWrapper?: boolean;
17
17
  experimentalResponseStreaming?: boolean;
18
18
  operationType?: string;
19
- cron?: Cron;
20
19
  framework?: FunctionFramework;
21
20
  }
22
21
  export interface LambdaOptionsWithFiles extends LambdaOptionsBase {
@@ -51,7 +50,6 @@ export declare class Lambda {
51
50
  environment: Environment;
52
51
  allowQuery?: string[];
53
52
  regions?: string[];
54
- cron?: Cron;
55
53
  /**
56
54
  * @deprecated Use `await lambda.createZip()` instead.
57
55
  */
@@ -68,5 +66,5 @@ export declare class Lambda {
68
66
  */
69
67
  export declare function createLambda(opts: LambdaOptions): Promise<Lambda>;
70
68
  export declare function createZip(files: Files): Promise<Buffer>;
71
- export declare function getLambdaOptionsFromFunction({ sourceFile, config, }: GetLambdaOptionsFromFunctionOptions): Promise<Pick<LambdaOptions, 'memory' | 'maxDuration' | 'cron'>>;
69
+ export declare function getLambdaOptionsFromFunction({ sourceFile, config, }: GetLambdaOptionsFromFunctionOptions): Promise<Pick<LambdaOptions, 'memory' | 'maxDuration'>>;
72
70
  export {};
package/dist/lambda.js CHANGED
@@ -13,7 +13,7 @@ const download_1 = require("./fs/download");
13
13
  const stream_to_buffer_1 = __importDefault(require("./fs/stream-to-buffer"));
14
14
  class Lambda {
15
15
  constructor(opts) {
16
- const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, cron, supportsMultiPayloads, supportsWrapper, experimentalResponseStreaming, operationType, framework, } = opts;
16
+ const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, supportsMultiPayloads, supportsWrapper, experimentalResponseStreaming, operationType, framework, } = opts;
17
17
  if ('files' in opts) {
18
18
  assert_1.default(typeof opts.files === 'object', '"files" must be an object');
19
19
  }
@@ -43,9 +43,6 @@ class Lambda {
43
43
  assert_1.default(Array.isArray(regions), '"regions" is not an Array');
44
44
  assert_1.default(regions.every(r => typeof r === 'string'), '"regions" is not a string Array');
45
45
  }
46
- if (cron !== undefined) {
47
- assert_1.default(typeof cron === 'string', '"cron" is not a string');
48
- }
49
46
  if (framework !== undefined) {
50
47
  assert_1.default(typeof framework === 'object', '"framework" is not an object');
51
48
  assert_1.default(typeof framework.slug === 'string', '"framework.slug" is not a string');
@@ -63,7 +60,6 @@ class Lambda {
63
60
  this.environment = environment;
64
61
  this.allowQuery = allowQuery;
65
62
  this.regions = regions;
66
- this.cron = cron;
67
63
  this.zipBuffer = 'zipBuffer' in opts ? opts.zipBuffer : undefined;
68
64
  this.supportsMultiPayloads = supportsMultiPayloads;
69
65
  this.supportsWrapper = supportsWrapper;
@@ -141,7 +137,6 @@ async function getLambdaOptionsFromFunction({ sourceFile, config, }) {
141
137
  return {
142
138
  memory: fn.memory,
143
139
  maxDuration: fn.maxDuration,
144
- cron: fn.cron,
145
140
  };
146
141
  }
147
142
  }
package/dist/schemas.d.ts CHANGED
@@ -29,11 +29,6 @@ export declare const functionsSchema: {
29
29
  type: string;
30
30
  maxLength: number;
31
31
  };
32
- cron: {
33
- type: string;
34
- minLength: number;
35
- maxLength: number;
36
- };
37
32
  };
38
33
  };
39
34
  };
package/dist/schemas.js CHANGED
@@ -32,11 +32,6 @@ exports.functionsSchema = {
32
32
  type: 'string',
33
33
  maxLength: 256,
34
34
  },
35
- cron: {
36
- type: 'string',
37
- minLength: 9,
38
- maxLength: 256,
39
- },
40
35
  },
41
36
  },
42
37
  },
package/dist/types.d.ts CHANGED
@@ -282,7 +282,6 @@ export interface BuilderFunctions {
282
282
  runtime?: string;
283
283
  includeFiles?: string;
284
284
  excludeFiles?: string;
285
- cron?: Cron;
286
285
  };
287
286
  }
288
287
  export interface ProjectSettings {
@@ -363,7 +362,10 @@ export interface BuildResultBuildOutput {
363
362
  */
364
363
  buildOutputPath: string;
365
364
  }
366
- export declare type Cron = string;
365
+ export interface Cron {
366
+ path: string;
367
+ schedule: string;
368
+ }
367
369
  /** The framework which created the function */
368
370
  export interface FunctionFramework {
369
371
  slug: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "6.2.4",
3
+ "version": "6.3.0",
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": "9308a0fda5e14ee8a07b9a3506e4480f5f67d212"
54
+ "gitHead": "3d98d1cdea151b7125deb082c2c8469c865027d0"
55
55
  }