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

architect

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

architect - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

57

architect.js

@@ -29,3 +29,3 @@ var dirname = require('path').dirname;

// The plugin is a package on the disk. We need to load it.
if (plugin.hasOwnProperty("packagePath")) {
if (plugin.hasOwnProperty("packagePath") && !plugin.hasOwnProperty("setup")) {
plugin.packagePath = resolvePackageSync(base, plugin.packagePath);

@@ -40,5 +40,5 @@ var packageConf = require(plugin.packagePath);

plugin.setup = require(dirname(plugin.packagePath));
plugin.consumes = plugin.consumes || [];
plugin.provides = plugin.provides || [];
}
plugin.consumes = plugin.consumes || [];
plugin.provides = plugin.provides || [];
});

@@ -185,2 +185,9 @@ return config;

Architect.prototype.getService = function(name) {
if (!this.services[name]) {
throw new Error("Service '" + name + "' not found in architect app!");
}
return this.services[name];
}
// Returns an event emitter that represents the app. It can emit events.

@@ -194,25 +201,33 @@ // event: ("service" name, service) emitted when a service is ready to be consumed.

function createApp(config, callback) {
var app = new Architect(config);
if (callback) {
app.on("error", onError);
app.once("ready", onReady);
try {
var app = new Architect(config);
if (callback) {
app.on("error", onError);
app.once("ready", onReady);
function onError(err) {
app.removeListener("ready", done);
app.destroy();
done(err, app);
}
function onError(err) {
app.removeListener("ready", done);
app.destroy();
done(err, app);
}
function onReady() {
done(null, app);
}
function onReady() {
done(null, app);
}
var called = false;
function done(err) {
if (called) return;
called = true;
callback(err, app);
var called = false;
function done(err) {
if (called) return;
called = true;
callback(err, app);
}
}
return app;
} catch(err) {
if (callback) {
callback(err);
} else {
throw err;
}
}
return app;
}

@@ -219,0 +234,0 @@

{
"name": "architect",
"description": "A Simple yet powerful plugin system for node applications",
"version": "0.1.3",
"author": "ajax.org B.V. <info@ajax.org>",
"contributors": [
{
"name": "Tim Caswell",
"email": "tim@c9.io"
"name": "architect",
"description": "A Simple yet powerful plugin system for node applications",
"version": "0.1.4",
"author": "ajax.org B.V. <info@ajax.org>",
"contributors": [
{
"name": "Tim Caswell",
"email": "tim@c9.io"
},
{
"name": "Fabian Jakobs",
"email": "fabian@c9.io"
},
{
"name": "Christoph Dorn",
"email": "christoph@christophdorn.com"
}
],
"main": "architect.js",
"repository": {
"type": "git",
"url": "http://github.com/c9/architect.git"
},
{
"name": "Fabian Jakobs",
"email": "fabian@c9.io"
},
{
"name": "Christoph Dorn",
"email": "christoph@christophdorn.com"
}
],
"main": "architect.js",
"repository": {
"type": "git",
"url": "http://github.com/c9/architect.git"
},
"dependencies": {},
"devDependencies": {},
"optionalDependencies": {},
"licenses": [
{
"type": "MIT",
"url": "http://github.com/c9/architect/raw/master/LICENSE"
}
]
}
"dependencies": {},
"devDependencies": {},
"optionalDependencies": {},
"licenses": [
{
"type": "MIT",
"url": "http://github.com/c9/architect/raw/master/LICENSE"
}
]
}
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