@hapi/statehood
Advanced tools
Comparing version 7.0.2 to 7.0.3
@@ -11,3 +11,3 @@ 'use strict'; | ||
const Iron = require('@hapi/iron'); | ||
const Joi = require('@hapi/joi'); | ||
const Validate = require('@hapi/validate'); | ||
@@ -20,25 +20,25 @@ | ||
internals.schema = Joi.object({ | ||
strictHeader: Joi.boolean(), | ||
ignoreErrors: Joi.boolean(), | ||
isSecure: Joi.boolean(), | ||
isHttpOnly: Joi.boolean(), | ||
isSameSite: Joi.valid('Strict', 'Lax', 'None', false), | ||
path: Joi.string().allow(null), | ||
domain: Joi.string().allow(null), | ||
ttl: Joi.number().allow(null), | ||
encoding: Joi.string().valid('base64json', 'base64', 'form', 'iron', 'none'), | ||
sign: Joi.object({ | ||
password: [Joi.string(), Joi.binary(), Joi.object()], | ||
integrity: Joi.object() | ||
internals.schema = Validate.object({ | ||
strictHeader: Validate.boolean(), | ||
ignoreErrors: Validate.boolean(), | ||
isSecure: Validate.boolean(), | ||
isHttpOnly: Validate.boolean(), | ||
isSameSite: Validate.valid('Strict', 'Lax', 'None', false), | ||
path: Validate.string().allow(null), | ||
domain: Validate.string().allow(null), | ||
ttl: Validate.number().allow(null), | ||
encoding: Validate.string().valid('base64json', 'base64', 'form', 'iron', 'none'), | ||
sign: Validate.object({ | ||
password: [Validate.string(), Validate.binary(), Validate.object()], | ||
integrity: Validate.object() | ||
}), | ||
iron: Joi.object(), | ||
password: [Joi.string(), Joi.binary(), Joi.object()], | ||
contextualize: Joi.function(), | ||
iron: Validate.object(), | ||
password: [Validate.string(), Validate.binary(), Validate.object()], | ||
contextualize: Validate.function(), | ||
// Used by hapi | ||
clearInvalid: Joi.boolean(), | ||
autoValue: Joi.any(), | ||
passThrough: Joi.boolean() | ||
clearInvalid: Validate.boolean(), | ||
autoValue: Validate.any(), | ||
passThrough: Validate.boolean() | ||
}); | ||
@@ -88,3 +88,3 @@ | ||
this.settings = Hoek.applyToDefaults(internals.defaults, options || {}); | ||
Joi.assert(this.settings, internals.schema, 'Invalid state definition defaults'); | ||
Validate.assert(this.settings, internals.schema, 'Invalid state definition defaults'); | ||
@@ -101,3 +101,3 @@ this.cookies = {}; | ||
const settings = Hoek.applyToDefaults(this.settings, options || {}, { nullOverride: true }); | ||
Joi.assert(settings, internals.schema, 'Invalid state definition: ' + name); | ||
Validate.assert(settings, internals.schema, 'Invalid state definition: ' + name); | ||
@@ -104,0 +104,0 @@ this.cookies[name] = settings; |
{ | ||
"name": "@hapi/statehood", | ||
"description": "HTTP State Management Utilities", | ||
"version": "7.0.2", | ||
"version": "7.0.3", | ||
"repository": "git://github.com/hapijs/statehood", | ||
@@ -23,7 +23,7 @@ "main": "lib/index.js", | ||
"@hapi/iron": "6.x.x", | ||
"@hapi/joi": "17.x.x" | ||
"@hapi/validate": "1.x.x" | ||
}, | ||
"devDependencies": { | ||
"@hapi/code": "8.x.x", | ||
"@hapi/lab": "22.x.x" | ||
"@hapi/lab": "23.x.x" | ||
}, | ||
@@ -30,0 +30,0 @@ "scripts": { |
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
17496
1
+ Added@hapi/validate@1.x.x
+ Added@hapi/validate@1.1.3(transitive)
- Removed@hapi/joi@17.x.x
- Removed@hapi/address@4.1.0(transitive)
- Removed@hapi/formula@2.0.0(transitive)
- Removed@hapi/joi@17.1.1(transitive)
- Removed@hapi/pinpoint@2.0.1(transitive)