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

@equinor/echo-base

Package Overview
Dependencies
Maintainers
12
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/echo-base - npm Package Compare versions

Comparing version 0.6.4 to 0.6.5

2

esm/errors/BaseError.js

@@ -17,4 +17,4 @@ import { __extends } from "tslib";

function BaseError(_a) {
var name = _a.name, message = _a.message, innerError = _a.innerError;
var _newTarget = this.constructor;
var name = _a.name, message = _a.message, innerError = _a.innerError;
var _this = _super.call(this, message) || this;

@@ -21,0 +21,0 @@ _this.hasBeenLogged = false;

@@ -75,3 +75,9 @@ import { __awaiter, __generator } from "tslib";

script.onerror = function () { return reject('could not load'); };
document.head.appendChild(script);
try {
document.head.appendChild(script);
}
catch (e) {
console.error(e);
reject('Could not add script tag');
}
})];

@@ -78,0 +84,0 @@ });

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

var ArgumentError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(ArgumentError, _super);
tslib_1.__extends(ArgumentError, _super);
function ArgumentError(_a) {

@@ -10,0 +10,0 @@ var argumentName = _a.argumentName;

@@ -18,6 +18,6 @@ "use strict";

var BaseError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(BaseError, _super);
tslib_1.__extends(BaseError, _super);
function BaseError(_a) {
var name = _a.name, message = _a.message, innerError = _a.innerError;
var _newTarget = this.constructor;
var name = _a.name, message = _a.message, innerError = _a.innerError;
var _this = _super.call(this, message) || this;

@@ -24,0 +24,0 @@ _this.hasBeenLogged = false;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./ArgumentError"), exports);
(0, tslib_1.__exportStar)(require("./BaseError"), exports);
(0, tslib_1.__exportStar)(require("./errorHandlers"), exports);
(0, tslib_1.__exportStar)(require("./NetworkError"), exports);
(0, tslib_1.__exportStar)(require("./toError"), exports);
tslib_1.__exportStar(require("./ArgumentError"), exports);
tslib_1.__exportStar(require("./BaseError"), exports);
tslib_1.__exportStar(require("./errorHandlers"), exports);
tslib_1.__exportStar(require("./NetworkError"), exports);
tslib_1.__exportStar(require("./toError"), exports);
//# sourceMappingURL=index.js.map

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

var NetworkError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(NetworkError, _super);
tslib_1.__extends(NetworkError, _super);
function NetworkError(_a) {

@@ -34,6 +34,6 @@ var name = _a.name, message = _a.message, httpStatusCode = _a.httpStatusCode, url = _a.url, exception = _a.exception;

var BadRequestError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(BadRequestError, _super);
tslib_1.__extends(BadRequestError, _super);
function BadRequestError(args) {
var _a;
return _super.call(this, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { name: (_a = args.name) !== null && _a !== void 0 ? _a : 'BadRequestError' })) || this;
return _super.call(this, tslib_1.__assign(tslib_1.__assign({}, args), { name: (_a = args.name) !== null && _a !== void 0 ? _a : 'BadRequestError' })) || this;
}

@@ -44,6 +44,6 @@ return BadRequestError;

var BackendError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(BackendError, _super);
tslib_1.__extends(BackendError, _super);
function BackendError(args) {
var _a;
return _super.call(this, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { name: (_a = args.name) !== null && _a !== void 0 ? _a : 'BackendError' })) || this;
return _super.call(this, tslib_1.__assign(tslib_1.__assign({}, args), { name: (_a = args.name) !== null && _a !== void 0 ? _a : 'BackendError' })) || this;
}

@@ -54,6 +54,6 @@ return BackendError;

var ForbiddenError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(ForbiddenError, _super);
tslib_1.__extends(ForbiddenError, _super);
function ForbiddenError(args) {
var _a;
return _super.call(this, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { name: (_a = args.name) !== null && _a !== void 0 ? _a : 'ForbiddenError' })) || this;
return _super.call(this, tslib_1.__assign(tslib_1.__assign({}, args), { name: (_a = args.name) !== null && _a !== void 0 ? _a : 'ForbiddenError' })) || this;
}

@@ -64,6 +64,6 @@ return ForbiddenError;

var UnauthorizedError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(UnauthorizedError, _super);
tslib_1.__extends(UnauthorizedError, _super);
function UnauthorizedError(args) {
var _a;
return _super.call(this, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { name: (_a = args.name) !== null && _a !== void 0 ? _a : 'UnauthorizedError' })) || this;
return _super.call(this, tslib_1.__assign(tslib_1.__assign({}, args), { name: (_a = args.name) !== null && _a !== void 0 ? _a : 'UnauthorizedError' })) || this;
}

@@ -74,6 +74,6 @@ return UnauthorizedError;

var NotFoundError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(NotFoundError, _super);
tslib_1.__extends(NotFoundError, _super);
function NotFoundError(args) {
var _a;
return _super.call(this, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { name: (_a = args.name) !== null && _a !== void 0 ? _a : 'NotFoundError' })) || this;
return _super.call(this, tslib_1.__assign(tslib_1.__assign({}, args), { name: (_a = args.name) !== null && _a !== void 0 ? _a : 'NotFoundError' })) || this;
}

@@ -84,6 +84,6 @@ return NotFoundError;

var ValidationError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(ValidationError, _super);
tslib_1.__extends(ValidationError, _super);
function ValidationError(args) {
var _a;
return _super.call(this, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { name: (_a = args.name) !== null && _a !== void 0 ? _a : 'ValidationError' })) || this;
return _super.call(this, tslib_1.__assign(tslib_1.__assign({}, args), { name: (_a = args.name) !== null && _a !== void 0 ? _a : 'ValidationError' })) || this;
}

@@ -90,0 +90,0 @@ return ValidationError;

@@ -7,5 +7,5 @@ "use strict";

var ImproperErrorObject = /** @class */ (function (_super) {
(0, tslib_1.__extends)(ImproperErrorObject, _super);
tslib_1.__extends(ImproperErrorObject, _super);
function ImproperErrorObject(args) {
return _super.call(this, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { name: 'ImproperErrorObject' })) || this;
return _super.call(this, tslib_1.__assign(tslib_1.__assign({}, args), { name: 'ImproperErrorObject' })) || this;
}

@@ -60,3 +60,3 @@ return ImproperErrorObject;

var errorAsObject = error;
var properties = (0, tslib_1.__assign)({}, errorAsObject);
var properties = tslib_1.__assign({}, errorAsObject);
var maybeName = (_a = properties['name']) !== null && _a !== void 0 ? _a : '';

@@ -67,3 +67,3 @@ var maybeMessage = (_b = properties['message']) !== null && _b !== void 0 ? _b : '';

message: message.length > 0 ? message : 'unknown',
innerError: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, properties), { argumentType: errorType })
innerError: tslib_1.__assign(tslib_1.__assign({}, properties), { argumentType: errorType })
});

@@ -70,0 +70,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./errors"), exports);
(0, tslib_1.__exportStar)(require("./module"), exports);
(0, tslib_1.__exportStar)(require("./types"), exports);
(0, tslib_1.__exportStar)(require("./utils"), exports);
tslib_1.__exportStar(require("./errors"), exports);
tslib_1.__exportStar(require("./module"), exports);
tslib_1.__exportStar(require("./types"), exports);
tslib_1.__exportStar(require("./utils"), exports);
//# sourceMappingURL=index.js.map

@@ -16,5 +16,5 @@ "use strict";

function createModules(createModuleApi, modules) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var promises, _i, modules_1, module_1;
return (0, tslib_1.__generator)(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -44,4 +44,4 @@ case 0:

function createModule(createModuleApi, module) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
return (0, tslib_1.__generator)(this, function (_a) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -48,0 +48,0 @@ case 0:

@@ -61,4 +61,4 @@ "use strict";

function appendScriptTagToDom(name, fileUri, depName, dependencies, crossOrigin, integrity) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
return (0, tslib_1.__generator)(this, function (_a) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, new Promise(function (resolve, reject) {

@@ -79,3 +79,9 @@ var script = document.createElement('script');

script.onerror = function () { return reject('could not load'); };
document.head.appendChild(script);
try {
document.head.appendChild(script);
}
catch (e) {
console.error(e);
reject('Could not add script tag');
}
})];

@@ -95,5 +101,5 @@ });

function verifyAppWithModule(name, module) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var resolvedModule;
return (0, tslib_1.__generator)(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -132,4 +138,4 @@ case 0: return [4 /*yield*/, Promise.resolve(module)];

var name = _a.name, link = _a.fileUri, requireRef = _a.requireRef, integrity = _a.integrity;
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
return (0, tslib_1.__generator)(this, function (_b) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {

@@ -136,0 +142,0 @@ case 0: return [4 /*yield*/, appendScriptTagToDom(name, link, requireRef, dependencies, crossOrigin, integrity)];

@@ -7,5 +7,5 @@ "use strict";

var ModulesMetaError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(ModulesMetaError, _super);
tslib_1.__extends(ModulesMetaError, _super);
function ModulesMetaError(args) {
return _super.call(this, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { name: 'ModulesMetaError' })) || this;
return _super.call(this, tslib_1.__assign(tslib_1.__assign({}, args), { name: 'ModulesMetaError' })) || this;
}

@@ -16,5 +16,5 @@ return ModulesMetaError;

var ModuleLoadingError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(ModuleLoadingError, _super);
tslib_1.__extends(ModuleLoadingError, _super);
function ModuleLoadingError(args) {
return _super.call(this, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { name: 'ModuleLoadingError' })) || this;
return _super.call(this, tslib_1.__assign(tslib_1.__assign({}, args), { name: 'ModuleLoadingError' })) || this;
}

@@ -25,5 +25,5 @@ return ModuleLoadingError;

var ModulesEvaluationError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(ModulesEvaluationError, _super);
tslib_1.__extends(ModulesEvaluationError, _super);
function ModulesEvaluationError(args) {
return _super.call(this, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { name: 'ModulesEvaluationError' })) || this;
return _super.call(this, tslib_1.__assign(tslib_1.__assign({}, args), { name: 'ModulesEvaluationError' })) || this;
}

@@ -30,0 +30,0 @@ return ModulesEvaluationError;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./aggregate"), exports);
(0, tslib_1.__exportStar)(require("./create"), exports);
(0, tslib_1.__exportStar)(require("./dependency"), exports);
(0, tslib_1.__exportStar)(require("./errors"), exports);
(0, tslib_1.__exportStar)(require("./load"), exports);
(0, tslib_1.__exportStar)(require("./loader"), exports);
(0, tslib_1.__exportStar)(require("./persist"), exports);
(0, tslib_1.__exportStar)(require("./setup"), exports);
(0, tslib_1.__exportStar)(require("./strategies"), exports);
(0, tslib_1.__exportStar)(require("./utils"), exports);
(0, tslib_1.__exportStar)(require("./verify"), exports);
tslib_1.__exportStar(require("./aggregate"), exports);
tslib_1.__exportStar(require("./create"), exports);
tslib_1.__exportStar(require("./dependency"), exports);
tslib_1.__exportStar(require("./errors"), exports);
tslib_1.__exportStar(require("./load"), exports);
tslib_1.__exportStar(require("./loader"), exports);
tslib_1.__exportStar(require("./persist"), exports);
tslib_1.__exportStar(require("./setup"), exports);
tslib_1.__exportStar(require("./strategies"), exports);
tslib_1.__exportStar(require("./utils"), exports);
tslib_1.__exportStar(require("./verify"), exports);
//# sourceMappingURL=index.js.map

@@ -17,5 +17,5 @@ "use strict";

function loadMetaData(fetchModules) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var _a, innerError_1;
return (0, tslib_1.__generator)(this, function (_b) {
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {

@@ -51,5 +51,5 @@ case 0:

function loadModules(loader, fetchModules) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var modules;
return (0, tslib_1.__generator)(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -56,0 +56,0 @@ case 0: return [4 /*yield*/, loadMetaData(fetchModules)];

@@ -55,12 +55,12 @@ "use strict";

function loadModule(meta, getDependencies, loader) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var dependencies, app;
return (0, tslib_1.__generator)(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
dependencies = (0, tslib_1.__assign)({}, (getDependencies(meta) || {}));
dependencies = tslib_1.__assign({}, (getDependencies(meta) || {}));
return [4 /*yield*/, loader(dependencies)];
case 1:
app = _a.sent();
return [2 /*return*/, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, app), meta)];
return [2 /*return*/, tslib_1.__assign(tslib_1.__assign({}, app), meta)];
}

@@ -67,0 +67,0 @@ });

@@ -25,5 +25,5 @@ "use strict";

if (oldModules === void 0) { oldModules = []; }
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var _loop_1, _i, oldModules_1, oldModule;
return (0, tslib_1.__generator)(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
try {

@@ -40,3 +40,3 @@ _loop_1 = function (oldModule) {

}
return [2 /*return*/, (0, aggregate_1.createModules)(createApi, (0, utils_1.filterExcludePrivateModulesInProduction)((0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], oldModules, true), newModules, true), isProduction))];
return [2 /*return*/, (0, aggregate_1.createModules)(createApi, (0, utils_1.filterExcludePrivateModulesInProduction)(tslib_1.__spreadArray(tslib_1.__spreadArray([], oldModules, true), newModules, true), isProduction))];
}

@@ -60,5 +60,5 @@ catch (innerError) {

function standardStrategy(options, callback) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var loader, fetchedModules, allModules, error_1;
return (0, tslib_1.__generator)(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -65,0 +65,0 @@ case 0:

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

function createEmptyModule(meta) {
return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, meta), { setup: function () {
return tslib_1.__assign(tslib_1.__assign({}, meta), { setup: function () {
// Empty module

@@ -54,0 +54,0 @@ } });

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./common"), exports);
(0, tslib_1.__exportStar)(require("./creators"), exports);
(0, tslib_1.__exportStar)(require("./error"), exports);
(0, tslib_1.__exportStar)(require("./event"), exports);
(0, tslib_1.__exportStar)(require("./loader"), exports);
(0, tslib_1.__exportStar)(require("./module"), exports);
(0, tslib_1.__exportStar)(require("./options"), exports);
(0, tslib_1.__exportStar)(require("./storage"), exports);
tslib_1.__exportStar(require("./common"), exports);
tslib_1.__exportStar(require("./creators"), exports);
tslib_1.__exportStar(require("./error"), exports);
tslib_1.__exportStar(require("./event"), exports);
tslib_1.__exportStar(require("./loader"), exports);
tslib_1.__exportStar(require("./module"), exports);
tslib_1.__exportStar(require("./options"), exports);
tslib_1.__exportStar(require("./storage"), exports);
//# sourceMappingURL=index.js.map

@@ -7,5 +7,5 @@ "use strict";

var ModuleAppError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(ModuleAppError, _super);
tslib_1.__extends(ModuleAppError, _super);
function ModuleAppError(args) {
return _super.call(this, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { name: 'ModuleAppError' })) || this;
return _super.call(this, tslib_1.__assign(tslib_1.__assign({}, args), { name: 'ModuleAppError' })) || this;
}

@@ -12,0 +12,0 @@ return ModuleAppError;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./eventHub"), exports);
(0, tslib_1.__exportStar)(require("./getDependencyResolver"), exports);
(0, tslib_1.__exportStar)(require("./storage"), exports);
tslib_1.__exportStar(require("./eventHub"), exports);
tslib_1.__exportStar(require("./getDependencyResolver"), exports);
tslib_1.__exportStar(require("./storage"), exports);
//# sourceMappingURL=index.js.map
{
"name": "@equinor/echo-base",
"version": "0.6.4",
"version": "0.6.5",
"module": "esm/index.js",

@@ -34,5 +34,5 @@ "main": "lib/index.js",

"devDependencies": {
"@types/node": "^17.0.20",
"typedoc": "^0.22.12",
"typescript": "^4.5.5"
"@types/node": "^17.0.21",
"typedoc": "^0.22.13",
"typescript": "^4.6.2"
},

@@ -39,0 +39,0 @@ "files": [

@@ -90,3 +90,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

document.head.appendChild(script);
try {
document.head.appendChild(script);
} catch (e) {
console.error(e);
reject('Could not add script tag');
}
});

@@ -93,0 +98,0 @@ }

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

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

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