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

@dits/dits

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dits/dits - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

6

lib/dispatch/handlers.js

@@ -29,4 +29,2 @@ "use strict";

const originalFn = descriptor.value;
// const injectParamsIdx: number[] = getInjectables(target, propertyKey) || []
// const dependencies = injectParamsIdx.map(idx => paramTypes[idx])
const dependencies = paramTypes;

@@ -40,5 +38,3 @@ const metadata = Metadata_1.default.retrieveMetadata(target, propertyKey) || {};

predicates,
// paramTypes,
// injectParamsIdx,
dependencies: dependencies.reverse(),
dependencies,
target,

@@ -45,0 +41,0 @@ propertyKey,

7

lib/dispatch/invoker.js

@@ -44,7 +44,6 @@ "use strict";

const results = [...args];
const container = container_1.default.fromZone();
declaration.dependencies
.forEach((diType, idxOffByOne) => {
const idx = idxOffByOne + 1;
.forEach((diType, idx) => {
if (results[idx] === null || results[idx] === undefined) {
const container = container_1.default.fromZone();
const lookup = container.get(diType);

@@ -61,3 +60,3 @@ // const lookup = REGISTRY.get(diType)

else {
log.info('no inject on ', idx, declaration.dependencies[idxOffByOne], results[idx]);
process.env.DITS_DEBUG && log.info('no inject on ', idx, declaration.dependencies[idx], results[idx]);
}

@@ -64,0 +63,0 @@ });

@@ -6,2 +6,20 @@ "use strict";

const container_1 = (0, tslib_1.__importDefault)(require("../di/container"));
const http_1 = (0, tslib_1.__importDefault)(require("http"));
class DummyService {
doTheThing() {
return new Promise((resolve, reject) => {
const options = {
host: 'www.everra.com',
path: '/integers/?num=1&min=1&max=10&col=1&base=10&format=plain&rnd=new'
};
const data = [];
http_1.default.request(options, res => {
res.on('data', chunk => data.push(chunk));
res.on('end', () => resolve(data));
res.on('error', reject);
}).end();
});
}
}
const dummy = new DummyService();
const simulateTest = async (parent) => {

@@ -14,3 +32,4 @@ const app = parent.fork({

before = Zone.current.name;
await Promise.resolve();
// await Promise.resolve()
await dummy.doTheThing();
after = Zone.current.name;

@@ -17,0 +36,0 @@ });

{
"name": "@dits/dits",
"version": "0.1.6",
"version": "0.1.7",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "types": "lib/index.d.ts",

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

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