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

deep-core

Package Overview
Dependencies
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-core - npm Package Compare versions

Comparing version 1.9.12 to 1.9.13

82

lib.compiled/AWS/Lambda/Runtime.js

@@ -107,3 +107,3 @@ /**

this._resolver.registerSucceedCallback(() => {
let db = this._kernel.get('db');
let db = this.dbService;
let vogelsDynamoDriver = db.vogelsDynamoDriver;

@@ -129,15 +129,17 @@

new _Sandbox.Sandbox(() => {
this._fillUserContext();
this._fillUserContext().then(() => {
if (!this._loggedUserId && this._forceUserIdentity) {
throw new _MissingUserContextException.MissingUserContextException();
}
if (!this._loggedUserId && this._forceUserIdentity) {
throw new _MissingUserContextException.MissingUserContextException();
}
this._initDBPartitionKey();
let validationSchema = this.validationSchema;
let validationSchema = this.validationSchema;
if (validationSchema) {
this._runValidate(validationSchema);
} else {
this.handle(this._request);
}
if (validationSchema) {
this._runValidate(validationSchema);
} else {
this.handle(this._request);
}
}).catch(e => this.createError(e).send());
}).fail(error => {

@@ -251,5 +253,31 @@ this.createError(error).send();

/**
* @returns {Runtime}
* @private
*/
}, {
key: '_initDBPartitionKey',
value: function _initDBPartitionKey() {
if (!this.kernel.accountMicroservice) {
return this;
}
let db = this.dbService;
let user = this.securityService.token.user;
let partitionKey = Runtime.DB_ANONYMOUS_PARTITION;
if (user && user.ActiveAccount) {
partitionKey = user.ActiveAccount.Id;
}
db.setDynamoDBPartitionKey(partitionKey);
return this;
}
/**
* Retrieves logged user id from lambda context
*
* @private
* @returns {Promise}
*/

@@ -264,11 +292,13 @@

if (this.securityService.identityPoolId !== identityPoolId) {
throw new _InvalidCognitoIdentityException.InvalidCognitoIdentityException(identityPoolId);
return Promise.reject(new _InvalidCognitoIdentityException.InvalidCognitoIdentityException(identityPoolId));
}
// inject lambda context into security service
// and instantiate security token without loading credentials
this.securityService.warmupBackendLogin(this._context);
// and instantiate security token without loading user credentials
return this.securityService.warmupBackendLogin(this._context).then(() => {
this._loggedUserId = this._context.identity.cognitoIdentityId;
});
}
this._loggedUserId = this._context.identity.cognitoIdentityId;
}
return Promise.resolve(null);
}

@@ -410,2 +440,12 @@

/**
* @returns {DB}
*/
}, {
key: 'dbService',
get: function get() {
return this.kernel.get('db');
}
/**
* @returns {Object}

@@ -420,2 +460,12 @@ */

}], [{
key: 'DB_ANONYMOUS_PARTITION',
get: function get() {
return 'anonymous';
}
/**
* @returns {String}
*/
}, {
key: 'VALIDATION_SCHEMAS_DIR',

@@ -422,0 +472,0 @@ get: function get() {

2

package.json
{
"name": "deep-core",
"version": "1.9.12",
"version": "1.9.13",
"description": "DEEP Core Library",

@@ -5,0 +5,0 @@ "keywords": [

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