Skip to content

Commit 4f2fee6

Browse files
committed
1 parent 998bf58 commit 4f2fee6

17 files changed

+34
-314
lines changed

apps/api/bus/db/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ function _wrapBus20(bus) {
2828
return co(function*() {
2929
return yield wp(bus, operation);
3030
});
31-
}
32-
}
31+
};
32+
}

apps/api/bus/db/mock.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ module.exports = function(app) {
1313
return bus;
1414
};
1515

16-
1716
function createId() {
1817
var buffer = [];
1918
for (var i = 24; i--;) {
2019
buffer.push(Math.round(Math.random() * 9));
2120
}
2221
return buffer.join("");
23-
}
22+
}

apps/api/bus/db/mock2.js

-65
This file was deleted.

apps/api/bus/public-commands/account.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import PasswordKey from "api/data/models/password-key";
1414
import httperr from "httperr";
1515
import mu from "mustache";
1616
import fs from "fs";
17-
import templates from "./templates"
17+
import templates from "./templates";
1818
import _command from "api/bus/drivers/command";
1919

2020
export default function(app, bus) {

apps/api/bus/public-commands/invitees.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import sift from "sift";
22
import mesh from "common/mesh";
33
import httperr from "httperr";
4-
import templates from "./templates"
54
import _command from "api/bus/drivers/command";
65
import Invitee from "api/data/models/invitee";
76
import User from "api/data/models/user";

apps/api/bus/public-commands/organizations.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ import mesh from "common/mesh";
44
import httperr from "httperr";
55
import mu from "mustache";
66
import fs from "fs";
7-
import templates from "./templates"
87
import _command from "api/bus/drivers/command";
9-
import cstripe from "stripe"
10-
import Organization from "api/data/models/organization"
8+
import cstripe from "stripe";
9+
import Organization from "api/data/models/organization";
1110

1211
export default function(app, bus) {
1312

apps/api/bus/public-commands/payments.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import mesh from "common/mesh";
44
import httperr from "httperr";
55
import mu from "mustache";
66
import fs from "fs";
7-
import templates from "./templates"
7+
import templates from "./templates";
88
import _command from "api/bus/drivers/command";
99
import cstripe from "stripe"
1010
import StripeCustomer from "api/data/models/stripe-customer"

apps/api/http/index.js

+2-15
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import http from "http";
2-
import socket from "./socket";
32
import mesh from "mesh";
43
import routes from "./routes";
5-
import koa from "koa"
4+
import koa from "koa";
65
import bodyparser from "koa-bodyparser";
76
import cors from "koa-cors"
87
import redisStore from "koa-redis";
9-
import session from "koa-generic-session"
8+
import session from "koa-generic-session";
109
import serve from "koa-static";
1110

1211
/**
@@ -34,16 +33,4 @@ module.exports = function(app) {
3433

3534
var server = app.http = http.createServer(k.callback());
3635
app.http.listen(port);
37-
38-
// app.bus({
39-
// name: "intercept",
40-
// max: 1,
41-
// query: { name: "dispose" },
42-
// bus: mesh.wrap(function(operation, next) {
43-
// server.close();
44-
// next();
45-
// })
46-
// });
47-
48-
socket(app);
4936
};

apps/api/http/routes/index.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
var createRouter = require("koa-router");
1+
import createRouter from "koa-router";
2+
23
/**
34
*/
45

5-
module.exports = function(server, app) {
6+
export default function(server, app) {
67

78
var router = createRouter();
89

@@ -12,7 +13,7 @@ module.exports = function(server, app) {
1213

1314
try {
1415
this.body = yield app.bus(Object.assign({}, this.request.body, { app: app, session: session, public: true }));
15-
} catch(e) {
16+
} catch (e) {
1617
var statusCode = e.statusCode || 500;
1718
this.status = statusCode;
1819
this.body = {
@@ -26,6 +27,4 @@ module.exports = function(server, app) {
2627
});
2728

2829
server.use(router.routes()).use(router.allowedMethods());
29-
30-
}
31-
30+
};

apps/api/http/socket/index.js

-43
This file was deleted.

apps/api/npm-debug.log

+15-13
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
11
0 info it worked if it ends with ok
22
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
3-
2 info using npm@2.11.3
4-
3 info using node@v0.12.7
3+
2 info using npm@2.14.2
4+
3 info using node@v4.0.0
55
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
66
5 info prestart [email protected]
77
6 info start [email protected]
88
7 verbose unsafe-perm in lifecycle true
99
8 info [email protected] Failed to exec start script
10-
9 verbose stack Error: [email protected] start: `node --harmony .`
10+
9 verbose stack Error: [email protected] start: `node .`
1111
9 verbose stack Exit status 1
12-
9 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
13-
9 verbose stack at EventEmitter.emit (events.js:110:17)
12+
9 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
13+
9 verbose stack at emitTwo (events.js:87:13)
14+
9 verbose stack at EventEmitter.emit (events.js:172:7)
1415
9 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
15-
9 verbose stack at ChildProcess.emit (events.js:110:17)
16-
9 verbose stack at maybeClose (child_process.js:1015:16)
17-
9 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
16+
9 verbose stack at emitTwo (events.js:87:13)
17+
9 verbose stack at ChildProcess.emit (events.js:172:7)
18+
9 verbose stack at maybeClose (internal/child_process.js:817:16)
19+
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
1820
10 verbose pkgid [email protected]
1921
11 verbose cwd /Users/crcn/Developer/jobs/browsertap/apps/api
2022
12 error Darwin 14.5.0
2123
13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
22-
14 error node v0.12.7
23-
15 error npm v2.11.3
24+
14 error node v4.0.0
25+
15 error npm v2.14.2
2426
16 error code ELIFECYCLE
25-
17 error [email protected] start: `node --harmony .`
27+
17 error [email protected] start: `node .`
2628
17 error Exit status 1
27-
18 error Failed at the [email protected] start script 'node --harmony .'.
29+
18 error Failed at the [email protected] start script 'node .'.
2830
18 error This is most likely a problem with the api package,
2931
18 error not with npm itself.
3032
18 error Tell the author that this fails on your system:
31-
18 error node --harmony .
33+
18 error node .
3234
18 error You can get their info via:
3335
18 error npm owner ls api
3436
18 error There is likely additional logging output above.

apps/api/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"start": "node --harmony .",
7+
"start": "node .",
88
"test": "gulp lint test --only=api"
99
},
1010
"author": "",

apps/common/bus/drivers/intercept-test.js

-101
This file was deleted.

0 commit comments

Comments
 (0)