Socket
Socket
Sign inDemoInstall

@loopback/context

Package Overview
Dependencies
14
Maintainers
7
Versions
191
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.9.4 to 3.10.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [3.10.0](https://github.com/strongloop/loopback-next/compare/@loopback/context@3.9.4...@loopback/context@3.10.0) (2020-08-19)
### Features
* **context:** propagate resolution session to dynamic value factory ([60929f1](https://github.com/strongloop/loopback-next/commit/60929f1193b3ac0eadc3b70e3e3efc8206e40bab))
## [3.9.4](https://github.com/strongloop/loopback-next/compare/@loopback/context@3.9.3...@loopback/context@3.9.4) (2020-08-05)

@@ -8,0 +19,0 @@

1

dist/binding.js

@@ -124,2 +124,3 @@ "use strict";

skipInterceptors: true,
session: resolutionCtx.options.session,
});

@@ -126,0 +127,0 @@ }

import { Context } from './context';
import { ResolutionSession } from './resolution-session';
import { ValueOrPromise } from './value-promise';

@@ -85,2 +86,6 @@ /**

source?: InvocationSource;
/**
* Resolution session
*/
session?: ResolutionSession;
};

@@ -87,0 +92,0 @@ /**

8

dist/invocation.js

@@ -83,3 +83,3 @@ "use strict";

if (!options.skipParameterInjection) {
return invokeTargetMethodWithInjection(this, targetWithMethods, this.methodName, this.args);
return invokeTargetMethodWithInjection(this, targetWithMethods, this.methodName, this.args, options.session);
}

@@ -107,3 +107,3 @@ return invokeTargetMethod(this, targetWithMethods, this.methodName, this.args);

else {
return invokeTargetMethodWithInjection(ctx, target, method, nonInjectedArgs);
return invokeTargetMethodWithInjection(ctx, target, method, nonInjectedArgs, options.session);
}

@@ -123,3 +123,3 @@ }

*/
function invokeTargetMethodWithInjection(ctx, target, method, nonInjectedArgs) {
function invokeTargetMethodWithInjection(ctx, target, method, nonInjectedArgs, session) {
const methodName = getTargetName(target, method);

@@ -133,3 +133,3 @@ /* istanbul ignore if */

}
const argsOrPromise = resolver_1.resolveInjectedArguments(target, method, ctx, undefined, nonInjectedArgs);
const argsOrPromise = resolver_1.resolveInjectedArguments(target, method, ctx, session, nonInjectedArgs);
const targetWithMethods = target;

@@ -136,0 +136,0 @@ assert_1.default(typeof targetWithMethods[method] === 'function', `Method ${method} not found`);

{
"name": "@loopback/context",
"version": "3.9.4",
"version": "3.10.0",
"description": "Facilities to manage artifacts and their dependencies in your Node.js applications. The module exposes TypeScript/JavaScript APIs and decorators to register artifacts, declare dependencies, and resolve artifacts by keys. It also serves as an IoC container to support dependency injection",

@@ -26,3 +26,3 @@ "main": "dist/index.js",

"dependencies": {
"@loopback/metadata": "^2.2.4",
"@loopback/metadata": "^2.2.5",
"@types/debug": "^4.1.5",

@@ -32,12 +32,12 @@ "debug": "^4.1.1",

"p-event": "^4.2.0",
"tslib": "^2.0.0",
"tslib": "^2.0.1",
"uuid": "^8.3.0"
},
"devDependencies": {
"@loopback/build": "^6.2.0",
"@loopback/eslint-config": "^9.0.0",
"@loopback/testlab": "^3.2.2",
"@loopback/build": "^6.2.1",
"@loopback/eslint-config": "^9.0.1",
"@loopback/testlab": "^3.2.3",
"@types/bluebird": "^3.5.32",
"@types/node": "^10.17.28",
"@types/uuid": "^8.0.0",
"@types/uuid": "^8.3.0",
"bluebird": "^3.7.2"

@@ -65,3 +65,3 @@ },

},
"gitHead": "1619bf0c29aa03853a7977212e60028664fca640"
"gitHead": "a056555744367da9caccb6be64095e27d2fe2e28"
}

@@ -264,2 +264,3 @@ // Copyright IBM Corp. 2017,2020. All Rights Reserved.

skipInterceptors: true,
session: resolutionCtx.options.session,
});

@@ -266,0 +267,0 @@ }

@@ -11,2 +11,3 @@ // Copyright IBM Corp. 2019,2020. All Rights Reserved.

import {invokeMethodWithInterceptors} from './interceptor';
import {ResolutionSession} from './resolution-session';
import {resolveInjectedArguments} from './resolver';

@@ -124,2 +125,3 @@ import {transformValueOrPromise, ValueOrPromise} from './value-promise';

this.args,
options.session,
);

@@ -153,2 +155,6 @@ }

source?: InvocationSource;
/**
* Resolution session
*/
session?: ResolutionSession;
};

@@ -183,2 +189,3 @@

nonInjectedArgs,
options.session,
);

@@ -210,2 +217,3 @@ }

nonInjectedArgs?: InvocationArgs,
session?: ResolutionSession,
): ValueOrPromise<InvocationResult> {

@@ -224,3 +232,3 @@ const methodName = getTargetName(target, method);

ctx,
undefined,
session,
nonInjectedArgs,

@@ -227,0 +235,0 @@ );

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc