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.5 to 0.0.6

5

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

@@ -23,6 +23,3 @@ "main": "src/index.js",

"jest": "^20.0.4"
},
"dependencies": {
"shaara-core": "^0.1.0"
}
}

3

src/bundle.js

@@ -16,5 +16,6 @@ /**

*/
export default function Bundle(params : { name: string, definitions: () => ServiceMap }) {
export default function Bundle(params : { name: string, getDefinitions: () => ServiceMap }) {
this.name = params.name;
this.getDefinitions = params.getDefinitions.bind(this);
this.afterSetup = typeof params.afterSetup === "function" ? params.afterSetup.bind(this) : undefined;
}

@@ -21,0 +22,0 @@

@@ -23,3 +23,3 @@ /**

export type KernelType = {
export type ApplicationType = {
register: (name : string, service : ServiceType) => void,

@@ -30,6 +30,6 @@ initialize: Function,

export type ApplicationType = {
export type LegatoType = {
createBundle: (params : Object) => BundleType,
createService: (definition : ServiceType) => ServiceType,
create: (params : Object) => KernelType,
create: (params : Object) => ApplicationType,
}

@@ -41,2 +41,3 @@

getDefinitions: () => ServiceMap,
afterSetup?: (app : ApplicationType) => void,
}

@@ -11,5 +11,5 @@ // @flow

import type {
LegatoType,
BundleType,
ApplicationType,
BundleType,
KernelType,
ServiceDefinitionMap, ServiceDefinitionType,

@@ -20,3 +20,3 @@ ServiceMap,

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

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

*/
create(params : Object) : KernelType {
create(params : Object) : ApplicationType {
let definitions : ?ServiceDefinitionMap = {};

@@ -66,2 +66,10 @@ let services : ServiceMap = {};

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

@@ -95,2 +103,3 @@ /**

initialized = true;
callAfterSetup(this);
return;

@@ -137,2 +146,4 @@ }

initialized = true;
callAfterSetup(this);
},

@@ -139,0 +150,0 @@

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