Socket
Socket
Sign inDemoInstall

@contrast/agentify

Package Overview
Dependencies
Maintainers
17
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrast/agentify - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

3

lib/contrast-methods.js

@@ -31,2 +31,5 @@ /*

},
Function(args) {
return Function(args);
}
},

@@ -33,0 +36,0 @@ installed: false,

26

lib/sources.js

@@ -23,16 +23,24 @@ /*

sources.install = function install() {
depHooks.resolve({ name: 'http' }, http => patchCreateServer({ serverSource: http, patchName: 'httpServer' }));
depHooks.resolve({ name: 'https' }, https => patchCreateServer({ serverSource: https, patchName: 'httpsServer' }));
depHooks.resolve({ name: 'http' }, http => patchServerEmit(http, 'httpServer'));
depHooks.resolve({ name: 'https' }, https => patchServerEmit(https, 'httpsServer'));
depHooks.resolve({ name: 'http2' }, http2 => {
patchCreateServer({ serverSource: http2, patchName: 'http2Server' });
patchCreateServer({ serverSource: http2, patchName: 'http2SecureServer', constructorName: 'createSecureServer' });
patchCreateServer(http2, 'http2Server');
patchCreateServer(http2, 'http2SecureServer', 'createSecureServer');
});
depHooks.resolve({ name: 'spdy' }, spdy => patchCreateServer({ serverSource: spdy, patchName: 'spdyServer' }));
depHooks.resolve({ name: 'spdy' }, spdy => patchServerEmit(spdy, 'spdyServer'));
};
function patchCreateServer({ serverSource, patchName, constructorName = 'createServer' }) {
function patchServerEmit(serverSource, sourceName) {
serverSource.Server.prototype = patcher.patch(serverSource.Server.prototype, 'emit', {
name: `${sourceName}.Server.prototype.emit`,
patchType: 'http-sources',
around: emitAroundHook(sourceName)
});
}
function patchCreateServer(serverSource, sourceName, constructorName = 'createServer') {
patcher.patch(serverSource, constructorName, {
name: patchName,
name: sourceName,
patchType: 'http-sources',
post: createServerPostHook(patchName)
post: createServerPostHook(sourceName)
});

@@ -52,3 +60,3 @@ }

patcher.patch(serverPrototype, 'emit', {
name: 'server.emit',
name: 'Server.prototype.emit',
patchType: 'req-async-storage',

@@ -55,0 +63,0 @@ around: emitAroundHook(serverType)

{
"name": "@contrast/agentify",
"version": "1.0.5",
"version": "1.1.0",
"description": "Configures Contrast agent services and instrumentation within an application",

@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE",

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