@zeit/schemas
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -76,2 +76,23 @@ const staticSchema = require('./config-static'); | ||
'static': staticSchema, | ||
'limits': { | ||
type: 'object', | ||
properties: { | ||
duration: { | ||
type: 'number', | ||
minimum: 60000, | ||
maximum: 60000 * 15 // max 15m runtime | ||
}, | ||
maxConcurrentReqs: { | ||
type: 'number', | ||
minimum: 1, | ||
maximum: 1024 | ||
}, | ||
timeout: { | ||
type: 'number', | ||
minimum: 60000, | ||
maximum: 60000 * 15 // max duration | ||
} | ||
}, | ||
additionalProperties: false | ||
}, | ||
'features': { | ||
@@ -78,0 +99,0 @@ type: 'object', |
{ | ||
"name": "@zeit/schemas", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "All schemas used for validation that are shared between our projects", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -38,2 +38,22 @@ /* eslint camelcase: 0 */ | ||
}); | ||
assert.equal(isValid, false); | ||
}; | ||
exports.test_features_object = () => { | ||
const isValid = ajv.validate(deploymentConfigSchema, { | ||
limits: { | ||
duration: 60000, | ||
maxConcurrentReqs: 2, | ||
timeout: 60000 * 2 | ||
} | ||
}); | ||
assert.equal(isValid, true); | ||
}; | ||
exports.test_invalid_limits_object = () => { | ||
const isValid = ajv.validate(deploymentConfigSchema, { | ||
limits: { | ||
foo: [] | ||
} | ||
}); | ||
assert.equal(!isValid, true); | ||
@@ -48,3 +68,3 @@ }; | ||
}); | ||
assert.equal(!isValid, true); | ||
assert.equal(isValid, false); | ||
}; | ||
@@ -67,3 +87,3 @@ | ||
}); | ||
assert.equal(!isValid, true); | ||
assert.equal(isValid, false); | ||
}; |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
65297
373
0