New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hapi

Package Overview
Dependencies
Maintainers
1
Versions
295
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi - npm Package Compare versions

Comparing version 16.6.5 to 16.7.0

0

lib/auth.js

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

25

lib/plugin.js

@@ -9,2 +9,3 @@ 'use strict';

const Podium = require('podium');
const Somever = require('somever');
const Connection = require('./connection');

@@ -227,2 +228,3 @@ const Ext = require('./ext');

connections: attributes.connections,
requirements: attributes.requirements,
options: {

@@ -257,2 +259,8 @@ once: attributes.once || (plugin.once !== undefined ? plugin.once : options.once),

// Validate requirements
const requirements = item.requirements;
Hoek.assert(!requirements.node || Somever.match(process.version, requirements.node), 'Plugin', item.name, 'requires node version', requirements.node, 'but found', process.version);
Hoek.assert(!requirements.hapi || Somever.match(this.version, requirements.hapi), 'Plugin', item.name, 'requires hapi version', requirements.hapi, 'but found', this.version);
// Protect against multiple registrations

@@ -414,7 +422,20 @@

dependencies = [].concat(dependencies);
// Normalize to { plugin: version }
if (typeof dependencies === 'string') {
dependencies = { [dependencies]: '*' };
}
else if (Array.isArray(dependencies)) {
const map = {};
for (const dependency of dependencies) {
map[dependency] = '*';
}
dependencies = map;
}
this.root._dependencies.push({ plugin: this.realm.plugin, connections: this.connections, deps: dependencies });
if (after) {
this.ext('onPreStart', after, { after: dependencies });
this.ext('onPreStart', after, { after: Object.keys(dependencies) });
}

@@ -421,0 +442,0 @@ };

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -333,2 +333,5 @@ 'use strict';

internals.semver = Joi.string();
internals.plugin = internals.register.keys({

@@ -349,5 +352,13 @@ register: Joi.func().keys({

multiple: Joi.boolean().default(false),
dependencies: Joi.array().items(Joi.string()).single(),
dependencies: [
Joi.array().items(Joi.string()).single(),
Joi.object().pattern(/.+/, internals.semver)
],
connections: Joi.boolean().allow('conditional').default(true),
once: Joi.boolean().valid(true)
once: Joi.boolean().valid(true),
requirements: Joi.object({
hapi: Joi.string(),
node: Joi.string()
})
.default()
})

@@ -354,0 +365,0 @@ .required()

@@ -0,0 +0,0 @@ 'use strict';

@@ -12,2 +12,3 @@ 'use strict';

const Podium = require('podium');
const Somever = require('somever');
const Connection = require('./connection');

@@ -300,7 +301,16 @@ const Defaults = require('./defaults');

const connection = dependency.connections[j];
for (let k = 0; k < dependency.deps.length; ++k) {
const dep = dependency.deps[k];
const deps = Object.keys(dependency.deps);
for (let k = 0; k < deps.length; ++k) {
const dep = deps[k];
const version = dependency.deps[dep];
if (!connection.registrations[dep]) {
return new Error('Plugin ' + dependency.plugin + ' missing dependency ' + dep + ' in connection: ' + connection.info.uri);
}
if (version !== '*' &&
!Somever.match(connection.registrations[dep].version, version)) {
return new Error('Plugin ' + dependency.plugin + ' requires ' + dep + ' version ' + version + ' but found ' + connection.registrations[dep].version + ' in connection: ' + connection.info.uri);
}
}

@@ -310,7 +320,16 @@ }

else {
for (let j = 0; j < dependency.deps.length; ++j) {
const dep = dependency.deps[j];
const deps = Object.keys(dependency.deps);
for (let j = 0; j < deps.length; ++j) {
const dep = deps[j];
const version = dependency.deps[dep];
if (!this._registrations[dep]) {
return new Error('Plugin ' + dependency.plugin + ' missing dependency ' + dep);
}
if (version !== '*' &&
!Somever.match(this._registrations[dep].version, version)) {
return new Error('Plugin ' + dependency.plugin + ' requires ' + dep + ' version ' + version + ' but found ' + this._registrations[dep].version);
}
}

@@ -317,0 +336,0 @@ }

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

3

package.json

@@ -5,3 +5,3 @@ {

"homepage": "http://hapijs.com",
"version": "16.6.5",
"version": "16.7.0",
"repository": {

@@ -34,2 +34,3 @@ "type": "git",

"shot": "3.x.x",
"somever": "1.x.x",
"statehood": "5.x.x",

@@ -36,0 +37,0 @@ "subtext": "5.x.x",

@@ -0,0 +0,0 @@ <img src="https://raw.github.com/hapijs/hapi/master/images/hapi.png" />

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