Socket
Socket
Sign inDemoInstall

@worldsibu/convector-core-model

Package Overview
Dependencies
Maintainers
1
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@worldsibu/convector-core-model - npm Package Compare versions

Comparing version 1.0.3-0-alpha.098ed8b3 to 1.0.3-0-alpha.8f2191a3

31

dist/src/convector-model.js

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

var required_decorator_1 = require("../src/required.decorator");
var ConvectorModel = /** @class */ (function () {
var ConvectorModel = (function () {
function ConvectorModel(content) {

@@ -30,6 +30,6 @@ if (!content) {

type = type || this;
return [4 /*yield*/, convector_core_storage_1.BaseStorage.current.get(id)];
return [4, convector_core_storage_1.BaseStorage.current.get(id)];
case 1:
content = _a.sent();
return [2 /*return*/, new type(content)];
return [2, new type(content)];
}

@@ -50,10 +50,9 @@ });

type = this;
// Stupid horrible hack to find the current implementation's parent type
if (args[0] && args[0].prototype.__proto__.constructor === ConvectorModel) {
type = args.shift();
}
return [4 /*yield*/, (_a = convector_core_storage_1.BaseStorage.current).query.apply(_a, args)];
return [4, (_a = convector_core_storage_1.BaseStorage.current).query.apply(_a, args)];
case 1:
content = _b.sent();
return [2 /*return*/, Array.isArray(content) ? content.map(function (c) { return new type(c); }) : new type(content)];
return [2, Array.isArray(content) ? content.map(function (c) { return new type(c); }) : new type(content)];
}

@@ -69,4 +68,4 @@ });

type = type || new this('').type;
return [4 /*yield*/, ConvectorModel.query(this, { selector: { type: type } })];
case 1: return [2 /*return*/, _a.sent()];
return [4, ConvectorModel.query(this, { selector: { type: type } })];
case 1: return [2, _a.sent()];
}

@@ -82,6 +81,6 @@ });

this.assign(content);
return [4 /*yield*/, this.save()];
return [4, this.save()];
case 1:
_a.sent();
return [2 /*return*/];
return [2];
}

@@ -96,3 +95,3 @@ });

switch (_a.label) {
case 0: return [4 /*yield*/, convector_core_storage_1.BaseStorage.current.get(this.id)];
case 0: return [4, convector_core_storage_1.BaseStorage.current.get(this.id)];
case 1:

@@ -104,3 +103,3 @@ content = _a.sent();

this.assign(content);
return [2 /*return*/];
return [2];
}

@@ -120,6 +119,6 @@ });

convector_core_errors_1.InvalidIdError.test(this.id);
return [4 /*yield*/, convector_core_storage_1.BaseStorage.current.set(this.id, this)];
return [4, convector_core_storage_1.BaseStorage.current.set(this.id, this)];
case 1:
_a.sent();
return [2 /*return*/];
return [2];
}

@@ -160,6 +159,6 @@ });

switch (_a.label) {
case 0: return [4 /*yield*/, convector_core_storage_1.BaseStorage.current.delete(this.id)];
case 0: return [4, convector_core_storage_1.BaseStorage.current.delete(this.id)];
case 1:
_a.sent();
return [2 /*return*/];
return [2];
}

@@ -166,0 +165,0 @@ });

"use strict";
// tslint:disable:no-invalid-this
Object.defineProperty(exports, "__esModule", { value: true });

@@ -4,0 +3,0 @@ function ReadOnly() {

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

catch (e) {
// empty
}

@@ -23,0 +22,0 @@ return Object.keys(required)

"use strict";
// tslint:disable:no-invalid-this
Object.defineProperty(exports, "__esModule", { value: true });

@@ -34,3 +33,2 @@ var tslib_1 = require("tslib");

catch (e) {
// empty
}

@@ -37,0 +35,0 @@ return Object.keys(validated);

{
"name": "@worldsibu/convector-core-model",
"version": "1.0.3-0-alpha.098ed8b3",
"version": "1.0.3-0-alpha.8f2191a3",
"description": "Convector Model base class",

@@ -20,3 +20,3 @@ "license": "ISC",

"predocs:generate": "npm run clean:docs",
"docs:generate": "typedoc src --out docs --target ES6 --excludePrivate",
"docs:generate": "typedoc src --mode file --out docs --target ES6 --excludePrivate",
"docs:serve": "http-server docs"

@@ -34,4 +34,4 @@ },

"@theledger/fabric-chaincode-utils": "^2.0.9",
"@worldsibu/convector-core-errors": "^1.0.3-0-alpha.098ed8b3",
"@worldsibu/convector-core-storage": "^1.0.3-0-alpha.098ed8b3",
"@worldsibu/convector-core-errors": "^1.0.3-0-alpha.8f2191a3",
"@worldsibu/convector-core-storage": "^1.0.3-0-alpha.8f2191a3",
"tslib": "^1.9.0",

@@ -41,2 +41,3 @@ "yup": "^0.24.1"

"devDependencies": {
"http-server": "^0.11.1",
"mocha": "^5.0.3",

@@ -48,4 +49,5 @@ "npm-scripts-watcher": "^1.0.2",

"tslint": "^5.9.1",
"typedoc": "^0.11.1",
"typescript": "2.8.3"
}
}

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

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