Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zeit/schemas

Package Overview
Dependencies
Maintainers
19
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zeit/schemas - npm Package Compare versions

Comparing version 1.6.2 to 1.6.3

22

deployment/config.js
const {EnvKeys, EnvObject} = require('./env');
const staticSchema = require('./config-static');
module.exports = {
type: 'object',
additionalProperties: false,
dependencies: {
slot: {
type: 'object',
required: ['features'],
properties: {
features: {
type: 'object',
required: ['cloud'],
properties: {
cloud: {
'const': 'v2'
}
}
}
}
}
},
properties: {

@@ -107,4 +125,8 @@ 'name': {

}
},
'slot': {
type: 'string',
pattern: 'c.125-m512|staging-*'
}
}
};

2

package.json
{
"name": "@zeit/schemas",
"version": "1.6.2",
"version": "1.6.3",
"description": "All schemas used for validation that are shared between our projects",

@@ -5,0 +5,0 @@ "scripts": {

@@ -32,2 +32,39 @@ /* eslint camelcase: 0 */

exports.test_slot_key = () => {
const isValid = ajv.validate(deploymentConfigSchema, {
features: {
cloud: 'v2'
},
slot: 'c.125-m512'
});
assert.equal(isValid, true);
};
exports.test_staging_slot_key = () => {
const isValid = ajv.validate(deploymentConfigSchema, {
features: {
cloud: 'v2'
},
slot: 'staging-c.5-t1-w-m1024'
});
assert.equal(isValid, true);
};
exports.test_invalid_slot_key = () => {
const isValid = ajv.validate(deploymentConfigSchema, {
features: {
cloud: 'v2'
},
slot: 'invalid-key'
});
assert.equal(isValid, false);
};
exports.test_slot_key_without_cloud_v2 = () => {
const isValid = ajv.validate(deploymentConfigSchema, {
slot: 'c.125-m512'
});
assert.equal(isValid, false);
};
exports.test_invalid_features_object = () => {

@@ -34,0 +71,0 @@ const isValid = ajv.validate(deploymentConfigSchema, {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc