@vercel/build-utils
Advanced tools
Comparing version 2.12.3-canary.9 to 2.12.3-canary.10
@@ -14,2 +14,3 @@ /// <reference types="node" /> | ||
allowQuery?: string[]; | ||
regions?: string[]; | ||
} | ||
@@ -24,2 +25,3 @@ interface CreateLambdaOptions { | ||
allowQuery?: string[]; | ||
regions?: string[]; | ||
} | ||
@@ -39,7 +41,8 @@ interface GetLambdaOptionsFromFunctionOptions { | ||
allowQuery?: string[]; | ||
constructor({ zipBuffer, handler, runtime, maxDuration, memory, environment, allowQuery, }: LambdaOptions); | ||
regions?: string[]; | ||
constructor({ zipBuffer, handler, runtime, maxDuration, memory, environment, allowQuery, regions, }: LambdaOptions); | ||
} | ||
export declare function createLambda({ files, handler, runtime, memory, maxDuration, environment, allowQuery, }: CreateLambdaOptions): Promise<Lambda>; | ||
export declare function createLambda({ files, handler, runtime, memory, maxDuration, environment, allowQuery, regions, }: CreateLambdaOptions): Promise<Lambda>; | ||
export declare function createZip(files: Files): Promise<Buffer>; | ||
export declare function getLambdaOptionsFromFunction({ sourceFile, config, }: GetLambdaOptionsFromFunctionOptions): Promise<Pick<LambdaOptions, 'memory' | 'maxDuration'>>; | ||
export {}; |
@@ -15,3 +15,3 @@ "use strict"; | ||
class Lambda { | ||
constructor({ zipBuffer, handler, runtime, maxDuration, memory, environment, allowQuery, }) { | ||
constructor({ zipBuffer, handler, runtime, maxDuration, memory, environment, allowQuery, regions, }) { | ||
this.type = 'Lambda'; | ||
@@ -25,2 +25,3 @@ this.zipBuffer = zipBuffer; | ||
this.allowQuery = allowQuery; | ||
this.regions = regions; | ||
} | ||
@@ -31,3 +32,3 @@ } | ||
const mtime = new Date(1540000000000); | ||
async function createLambda({ files, handler, runtime, memory, maxDuration, environment = {}, allowQuery, }) { | ||
async function createLambda({ files, handler, runtime, memory, maxDuration, environment = {}, allowQuery, regions, }) { | ||
assert_1.default(typeof files === 'object', '"files" must be an object'); | ||
@@ -47,2 +48,6 @@ assert_1.default(typeof handler === 'string', '"handler" is not a string'); | ||
} | ||
if (regions !== undefined) { | ||
assert_1.default(Array.isArray(regions), '"regions" is not an Array'); | ||
assert_1.default(regions.every(r => typeof r === 'string'), '"regions" is not a string Array'); | ||
} | ||
await sema.acquire(); | ||
@@ -58,2 +63,3 @@ try { | ||
environment, | ||
regions, | ||
}); | ||
@@ -60,0 +66,0 @@ } |
{ | ||
"name": "@vercel/build-utils", | ||
"version": "2.12.3-canary.9", | ||
"version": "2.12.3-canary.10", | ||
"license": "MIT", | ||
@@ -52,3 +52,3 @@ "main": "./dist/index.js", | ||
}, | ||
"gitHead": "f682aefc9defee9e44773f9cf866a3e2cab0d012" | ||
"gitHead": "e6818dd3f9519ce17b396ef8d271faa79820daa6" | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1337643
32629