@loopback/core
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -6,2 +6,10 @@ # Change Log | ||
<a name="0.2.4"></a> | ||
## [0.2.4](https://github.com/strongloop/loopback-next/compare/@loopback/core@0.2.3...@loopback/core@0.2.4) (2018-03-14) | ||
**Note:** Version bump only for package @loopback/core | ||
<a name="0.2.3"></a> | ||
@@ -8,0 +16,0 @@ ## [0.2.3](https://github.com/strongloop/loopback-next/compare/@loopback/core@0.2.2...@loopback/core@0.2.3) (2018-03-13) |
@@ -115,5 +115,5 @@ "use strict"; | ||
const ctor = target; | ||
key = `servers.${ctor.name}`; | ||
key = `${keys_1.CoreBindings.SERVERS}.${ctor.name}`; | ||
} | ||
return (await this.get(key)); | ||
return await this.get(key); | ||
} | ||
@@ -148,3 +148,3 @@ /** | ||
await Promise.all(bindings.map(async (binding) => { | ||
const server = (await this.get(binding.key)); | ||
const server = await this.get(binding.key); | ||
return await fn(server); | ||
@@ -151,0 +151,0 @@ })); |
{ | ||
"name": "@loopback/core", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "", | ||
@@ -24,7 +24,7 @@ "engines": { | ||
"dependencies": { | ||
"@loopback/context": "^0.2.3" | ||
"@loopback/context": "^0.2.4" | ||
}, | ||
"devDependencies": { | ||
"@loopback/build": "^0.3.1", | ||
"@loopback/testlab": "^0.3.2" | ||
"@loopback/build": "^0.3.2", | ||
"@loopback/testlab": "^0.3.3" | ||
}, | ||
@@ -31,0 +31,0 @@ "files": [ |
@@ -13,3 +13,2 @@ # @loopback/core | ||
## Installation | ||
@@ -33,3 +32,3 @@ | ||
Since `@loopback/core` is decoupled from the listening server implementation, | ||
LoopBack applications are now able to work with any components that provide | ||
LoopBack applications are now able to work with any component that provides | ||
this functionality. | ||
@@ -56,4 +55,4 @@ | ||
// Let's retrieve the bound instances of our servers. | ||
const rest = await app.getServer('RestServer'); | ||
const grpc = await app.getServer('GrpcServer'); | ||
const rest = await app.getServer<RestServer>('RestServer'); | ||
const grpc = await app.getServer<GrpcServer>('GrpcServer'); | ||
@@ -74,3 +73,3 @@ // Define all sorts of bindings here to pass configuration or data | ||
- [Guidelines](https://github.com/strongloop/loopback-next/wiki/Contributing#guidelines) | ||
- [Guidelines](https://github.com/strongloop/loopback-next/blob/master/docs/DEVELOPING.md) | ||
- [Join the team](https://github.com/strongloop/loopback-next/issues/110) | ||
@@ -77,0 +76,0 @@ |
@@ -123,5 +123,5 @@ // Copyright IBM Corp. 2017,2018. All Rights Reserved. | ||
const ctor = target as Constructor<T>; | ||
key = `servers.${ctor.name}`; | ||
key = `${CoreBindings.SERVERS}.${ctor.name}`; | ||
} | ||
return (await this.get(key)) as T; | ||
return await this.get<T>(key); | ||
} | ||
@@ -160,3 +160,3 @@ | ||
bindings.map(async binding => { | ||
const server = (await this.get(binding.key)) as Server; | ||
const server = await this.get<Server>(binding.key); | ||
return await fn(server); | ||
@@ -196,3 +196,3 @@ }), | ||
// Assuming components can be synchronously instantiated | ||
const instance = this.getSync(componentKey); | ||
const instance = this.getSync<Component>(componentKey); | ||
mountComponent(this, instance); | ||
@@ -199,0 +199,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
496722
84
Updated@loopback/context@^0.2.4