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

@evosphere/legato

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evosphere/legato - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

2

package.json
{
"name": "@evosphere/legato",
"version": "0.0.7",
"version": "0.0.8",
"description": "Service management system",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -19,3 +19,3 @@ // @flow

export const Application : LegatoType = {
const Application : LegatoType = {
/**

@@ -57,3 +57,3 @@ * Shortcut for Bundle.create

function resolveDependency(id : string) : mixed {
if(id[0] === "%") {
if (id[0] === "%") {
return parameters[id.substr(1)] || null;

@@ -67,3 +67,3 @@ } else {

bundles.forEach((bundle : BundleType) => {
if(typeof bundle.afterSetup === "function") {
if (typeof bundle.afterSetup === "function") {
bundle.afterSetup(app);

@@ -81,7 +81,7 @@ }

register(name : string, service : ServiceType) : void {
if(typeof definitions !== "object" || definitions === null) {
if (typeof definitions !== "object" || definitions === null) {
throw new Error("Can't register any more services because the application has already been initialized");
}
if(definitions[name] !== undefined) {
if (definitions[name] !== undefined) {
throw new Error("Can't register service with reference " + name + ". Such a service is already registered.");

@@ -97,7 +97,7 @@ }

initialize() : void {
if(initialized === true) {
if (initialized === true) {
throw new Error("The application has already been initialized");
}
if(Object.keys(definitions).length === 0) {
if (Object.keys(definitions).length === 0) {
initialized = true;

@@ -113,9 +113,9 @@ callAfterSetup(this);

let serviceInitializedThisTurn = 0;
for(let ref in definitions) {
for (let ref in definitions) {
if(!definitions.hasOwnProperty(ref))
if (!definitions.hasOwnProperty(ref))
continue;
currentDef = definitions[ref];
if(currentDef.dependencies) {
if (currentDef.dependencies) {
let resolvedDependencies = currentDef.dependencies.map(resolveDependency);

@@ -133,7 +133,7 @@ if(resolvedDependencies.indexOf(null) < 0) {

// $FlowFixMe
if(Object.keys(definitions).length === Object.keys(services).length) {
if (Object.keys(definitions).length === Object.keys(services).length) {
keepGoing = false;
}
if(serviceInitializedThisTurn === 0) {
if (serviceInitializedThisTurn === 0) {
throw new Error(

@@ -168,3 +168,3 @@ "Some services could not be resolved. This is " +

const bundleDefs = bundle.getDefinitions(parameters);
for(let ref in bundleDefs) {
for (let ref in bundleDefs) {
if(bundleDefs.hasOwnProperty(ref)) {

@@ -171,0 +171,0 @@ this.register(ref, bundleDefs[ref]);

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