@thecolvinco/nodejs-messenger
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -392,3 +392,4 @@ import { v4 } from 'uuid'; | ||
commandsPath.forEach(async commandPath => { | ||
const resolvedModule = await import(resolve(commandPath.trim())); | ||
const absoluteCommandPath = `${process.cwd()}/${commandPath.trim()}`; | ||
const resolvedModule = await import(resolve(absoluteCommandPath)); | ||
const Command = resolvedModule['default']; | ||
@@ -413,4 +414,5 @@ emitter.on(eventName, message => { | ||
}) { | ||
const resolvedHandlerModule = await import(resolve(handlerPath.trim())); | ||
const resolvedCommandModule = await import(resolve(handlerPath.replace('Handler', '').trim())); | ||
const absoluteHandlerPath = `${process.cwd()}/${handlerPath.trim()}`; | ||
const resolvedHandlerModule = await import(resolve(absoluteHandlerPath)); | ||
const resolvedCommandModule = await import(resolve(absoluteHandlerPath.replace('Handler', ''))); | ||
const Handler = resolvedHandlerModule['default']; | ||
@@ -417,0 +419,0 @@ const Command = resolvedCommandModule['default']; |
@@ -411,3 +411,4 @@ function _interopNamespace(e) { | ||
commandsPath.forEach(async commandPath => { | ||
const resolvedModule = await new Promise(function (resolve) { resolve(_interopNamespace(require(path.resolve(commandPath.trim())))); }); | ||
const absoluteCommandPath = `${process.cwd()}/${commandPath.trim()}`; | ||
const resolvedModule = await new Promise(function (resolve) { resolve(_interopNamespace(require(path.resolve(absoluteCommandPath)))); }); | ||
const Command = resolvedModule['default']; | ||
@@ -432,4 +433,5 @@ emitter.on(eventName, message => { | ||
}) { | ||
const resolvedHandlerModule = await new Promise(function (resolve) { resolve(_interopNamespace(require(path.resolve(handlerPath.trim())))); }); | ||
const resolvedCommandModule = await new Promise(function (resolve) { resolve(_interopNamespace(require(path.resolve(handlerPath.replace('Handler', '').trim())))); }); | ||
const absoluteHandlerPath = `${process.cwd()}/${handlerPath.trim()}`; | ||
const resolvedHandlerModule = await new Promise(function (resolve) { resolve(_interopNamespace(require(path.resolve(absoluteHandlerPath)))); }); | ||
const resolvedCommandModule = await new Promise(function (resolve) { resolve(_interopNamespace(require(path.resolve(absoluteHandlerPath.replace('Handler', ''))))); }); | ||
const Handler = resolvedHandlerModule['default']; | ||
@@ -436,0 +438,0 @@ const Command = resolvedCommandModule['default']; |
@@ -394,3 +394,4 @@ import { v4 } from 'uuid'; | ||
commandsPath.forEach(async commandPath => { | ||
const resolvedModule = await import(resolve(commandPath.trim())); | ||
const absoluteCommandPath = `${process.cwd()}/${commandPath.trim()}`; | ||
const resolvedModule = await import(resolve(absoluteCommandPath)); | ||
const Command = resolvedModule['default']; | ||
@@ -415,4 +416,5 @@ emitter.on(eventName, message => { | ||
}) { | ||
const resolvedHandlerModule = await import(resolve(handlerPath.trim())); | ||
const resolvedCommandModule = await import(resolve(handlerPath.replace('Handler', '').trim())); | ||
const absoluteHandlerPath = `${process.cwd()}/${handlerPath.trim()}`; | ||
const resolvedHandlerModule = await import(resolve(absoluteHandlerPath)); | ||
const resolvedCommandModule = await import(resolve(absoluteHandlerPath.replace('Handler', ''))); | ||
const Handler = resolvedHandlerModule['default']; | ||
@@ -419,0 +421,0 @@ const Command = resolvedCommandModule['default']; |
@@ -392,3 +392,4 @@ (function (global, factory) { | ||
commandsPath.forEach(async commandPath => { | ||
const resolvedModule = await import(path.resolve(commandPath.trim())); | ||
const absoluteCommandPath = `${process.cwd()}/${commandPath.trim()}`; | ||
const resolvedModule = await import(path.resolve(absoluteCommandPath)); | ||
const Command = resolvedModule['default']; | ||
@@ -413,4 +414,5 @@ emitter.on(eventName, message => { | ||
}) { | ||
const resolvedHandlerModule = await import(path.resolve(handlerPath.trim())); | ||
const resolvedCommandModule = await import(path.resolve(handlerPath.replace('Handler', '').trim())); | ||
const absoluteHandlerPath = `${process.cwd()}/${handlerPath.trim()}`; | ||
const resolvedHandlerModule = await import(path.resolve(absoluteHandlerPath)); | ||
const resolvedCommandModule = await import(path.resolve(absoluteHandlerPath.replace('Handler', ''))); | ||
const Handler = resolvedHandlerModule['default']; | ||
@@ -417,0 +419,0 @@ const Command = resolvedCommandModule['default']; |
{ | ||
"name": "@thecolvinco/nodejs-messenger", | ||
"description": "Message library for nodejs applications", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"source": "src/main.ts", | ||
@@ -6,0 +6,0 @@ "main": "dist/main.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
234149
2875