UNPKG

1.74 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.buildsSchema = exports.functionsSchema = void 0;
4exports.functionsSchema = {
5 type: 'object',
6 minProperties: 1,
7 maxProperties: 50,
8 additionalProperties: false,
9 patternProperties: {
10 '^.{1,256}$': {
11 type: 'object',
12 additionalProperties: false,
13 properties: {
14 runtime: {
15 type: 'string',
16 maxLength: 256,
17 },
18 memory: {
19 // Number between 128 and 3008 in steps of 64
20 enum: Object.keys(Array.from({ length: 50 }))
21 .slice(2, 48)
22 .map(x => Number(x) * 64),
23 },
24 maxDuration: {
25 type: 'number',
26 minimum: 1,
27 maximum: 900,
28 },
29 includeFiles: {
30 type: 'string',
31 maxLength: 256,
32 },
33 excludeFiles: {
34 type: 'string',
35 maxLength: 256,
36 },
37 },
38 },
39 },
40};
41exports.buildsSchema = {
42 type: 'array',
43 minItems: 0,
44 maxItems: 128,
45 items: {
46 type: 'object',
47 additionalProperties: false,
48 required: ['use'],
49 properties: {
50 src: {
51 type: 'string',
52 minLength: 1,
53 maxLength: 4096,
54 },
55 use: {
56 type: 'string',
57 minLength: 3,
58 maxLength: 256,
59 },
60 config: { type: 'object' },
61 },
62 },
63};