@hapi/catbox
Advanced tools
Comparing version 11.1.0 to 11.1.1
@@ -5,4 +5,4 @@ 'use strict'; | ||
const Hoek = require('@hapi/hoek'); | ||
const Joi = require('@hapi/joi'); | ||
const Podium = require('@hapi/podium'); | ||
const Validate = require('@hapi/validate'); | ||
@@ -20,24 +20,24 @@ const Pending = require('./pending'); | ||
internals.schema = Joi.object({ | ||
expiresIn: Joi.number().integer().min(1), | ||
expiresAt: Joi.string().regex(/^\d\d?\:\d\d$/), | ||
internals.schema = Validate.object({ | ||
expiresIn: Validate.number().integer().min(1), | ||
expiresAt: Validate.string().regex(/^\d\d?\:\d\d$/), | ||
staleIn: [ | ||
Joi.number().integer().min(1).when('expiresAt', { is: Joi.required(), then: Joi.number().max(86400000 - 1) }), // One day - 1 (max is inclusive) | ||
Joi.func() | ||
Validate.number().integer().min(1).when('expiresAt', { is: Validate.required(), then: Validate.number().max(86400000 - 1) }), // One day - 1 (max is inclusive) | ||
Validate.func() | ||
], | ||
staleTimeout: Joi.number().integer().min(1), | ||
generateFunc: Joi.func(), | ||
generateTimeout: Joi.number().integer().min(1).allow(false), | ||
generateOnReadError: Joi.boolean(), | ||
generateIgnoreWriteError: Joi.boolean(), | ||
dropOnError: Joi.boolean(), | ||
pendingGenerateTimeout: Joi.number().integer().min(1), | ||
getDecoratedValue: Joi.boolean().default(false), | ||
staleTimeout: Validate.number().integer().min(1), | ||
generateFunc: Validate.func(), | ||
generateTimeout: Validate.number().integer().min(1).allow(false), | ||
generateOnReadError: Validate.boolean(), | ||
generateIgnoreWriteError: Validate.boolean(), | ||
dropOnError: Validate.boolean(), | ||
pendingGenerateTimeout: Validate.number().integer().min(1), | ||
getDecoratedValue: Validate.boolean().default(false), | ||
// Ignored external keys (hapi) | ||
privacy: Joi.any(), | ||
cache: Joi.any(), | ||
segment: Joi.any(), | ||
shared: Joi.any() | ||
privacy: Validate.any(), | ||
cache: Validate.any(), | ||
segment: Validate.any(), | ||
shared: Validate.any() | ||
}) | ||
@@ -378,3 +378,3 @@ .without('expiresIn', 'expiresAt') | ||
options = Joi.attempt(options, internals.schema, 'Invalid cache policy configuration'); | ||
options = Validate.attempt(options, internals.schema, 'Invalid cache policy configuration'); | ||
@@ -381,0 +381,0 @@ const hasExpiresIn = options.expiresIn !== undefined && options.expiresIn !== null; |
{ | ||
"name": "@hapi/catbox", | ||
"description": "Multi-strategy object caching service", | ||
"version": "11.1.0", | ||
"version": "11.1.1", | ||
"repository": "git://github.com/hapijs/catbox", | ||
@@ -18,8 +18,8 @@ "main": "lib/index.js", | ||
"@hapi/hoek": "9.x.x", | ||
"@hapi/joi": "17.x.x", | ||
"@hapi/podium": "4.x.x" | ||
"@hapi/podium": "4.x.x", | ||
"@hapi/validate": "1.x.x" | ||
}, | ||
"devDependencies": { | ||
"@hapi/code": "8.x.x", | ||
"@hapi/lab": "22.x.x" | ||
"@hapi/lab": "23.x.x" | ||
}, | ||
@@ -26,0 +26,0 @@ "scripts": { |
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
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
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
21709
1
+ Added@hapi/validate@1.x.x
- 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)