@vercel/build-utils 6.2.4 → 6.3.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/edge-function.d.ts +1 -3
- package/dist/edge-function.js +0 -1
- package/dist/index.js +1 -12
- package/dist/lambda.d.ts +2 -4
- package/dist/lambda.js +1 -6
- package/dist/schemas.d.ts +0 -5
- package/dist/schemas.js +0 -5
- package/dist/types.d.ts +6 -2
- package/package.json +2 -2
package/dist/edge-function.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
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'>);
|
package/dist/edge-function.js
CHANGED
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,
|
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,
|
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'
|
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,
|
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
package/dist/schemas.js
CHANGED
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 {
|
@@ -314,6 +313,7 @@ export interface BuilderV3 {
|
|
314
313
|
startDevServer?: StartDevServer;
|
315
314
|
}
|
316
315
|
declare type ImageFormat = 'image/avif' | 'image/webp';
|
316
|
+
declare type ImageContentDispositionType = 'inline' | 'attachment';
|
317
317
|
export declare type RemotePattern = {
|
318
318
|
/**
|
319
319
|
* Must be `http` or `https`.
|
@@ -345,6 +345,7 @@ export interface Images {
|
|
345
345
|
formats?: ImageFormat[];
|
346
346
|
dangerouslyAllowSVG?: boolean;
|
347
347
|
contentSecurityPolicy?: string;
|
348
|
+
contentDispositionType?: ImageContentDispositionType;
|
348
349
|
}
|
349
350
|
/**
|
350
351
|
* If a Builder ends up creating filesystem outputs conforming to
|
@@ -363,7 +364,10 @@ export interface BuildResultBuildOutput {
|
|
363
364
|
*/
|
364
365
|
buildOutputPath: string;
|
365
366
|
}
|
366
|
-
export
|
367
|
+
export interface Cron {
|
368
|
+
path: string;
|
369
|
+
schedule: string;
|
370
|
+
}
|
367
371
|
/** The framework which created the function */
|
368
372
|
export interface FunctionFramework {
|
369
373
|
slug: string;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/build-utils",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.3.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": "
|
54
|
+
"gitHead": "34d199bd4925fab1fb32b8dae507e2383d38493a"
|
55
55
|
}
|