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

@hapi/catbox

Package Overview
Dependencies
Maintainers
7
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapi/catbox - npm Package Compare versions

Comparing version 11.1.0 to 11.1.1

38

lib/policy.js

@@ -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": {

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