Skip to content

Commit 52712f9

Browse files
Tom KirkpatrickTom Kirkpatrick
authored andcommitted
feat: add support for loopback 3.x
1 parent 20da249 commit 52712f9

File tree

8 files changed

+40
-52
lines changed

8 files changed

+40
-52
lines changed

package.json

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,33 +41,32 @@
4141
"chai": "3.5.0",
4242
"compression": "1.6.2",
4343
"condition-circle": "1.5.0",
44-
"cors": "2.8.1",
45-
"coveralls": "2.11.15",
44+
"cors": "2.8.3",
45+
"coveralls": "2.13.1",
4646
"eslint": "2.13.1",
4747
"eslint-config-fullcube": "latest",
48-
"eslint-plugin-mocha": "4.7.0",
49-
"helmet": "3.1.0",
48+
"eslint-plugin-mocha": "4.11.0",
49+
"helmet": "3.6.1",
5050
"loglevel": "1.4.1",
51-
"loopback": "2.36.0",
52-
"loopback-boot": "2.23.0",
53-
"loopback-component-explorer": "2.7.0",
54-
"loopback-component-fixtures": "1.0.2",
55-
"loopback-datasource-juggler": "2.53.0",
56-
"mocha": "3.2.0",
51+
"loopback": "3.8.0",
52+
"loopback-boot": "2.25.0",
53+
"loopback-component-explorer": "4.2.0",
54+
"loopback-component-fixtures": "1.1.0",
55+
"loopback-datasource-juggler": "3.9.2",
56+
"mocha": "3.4.2",
5757
"nodemon": "1.11.0",
58-
"nyc": "10.0.0",
59-
"semantic-release": "6.3.2",
60-
"serve-favicon": "2.3.2",
61-
"sinon": "1.17.6",
62-
"sinon-as-promised": "4.0.2",
63-
"sinon-chai": "2.8.0"
64-
58+
"nyc": "10.3.2",
59+
"semantic-release": "6.3.6",
60+
"serve-favicon": "2.4.3",
61+
"sinon": "2.3.5",
62+
"sinon-chai": "2.11.0",
63+
"strong-error-handler": "2.1.0"
6564
},
6665
"dependencies": {
67-
"bluebird": "3.4.6",
68-
"debug": "2.4.1",
69-
"fsm-as-promised": "0.14.2",
70-
"lodash": "4.17.2"
66+
"bluebird": "3.5.0",
67+
"debug": "2.6.8",
68+
"fsm-as-promised": "0.14.4",
69+
"lodash": "4.17.4"
7170
},
7271
"release": {
7372
"verifyConditions": "condition-circle"

test/fullcube-state-machine/common/models/order.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
"relations": {},
1717
"acls": [],
1818
"methods": {
19-
"cancel": {
20-
"isStatic": false,
19+
"prototype.cancel": {
2120
"accepts": [],
2221
"returns": {
2322
"arg": "order",
@@ -33,8 +32,7 @@
3332
}
3433
]
3534
},
36-
"deliver": {
37-
"isStatic": false,
35+
"prototype.deliver": {
3836
"accepts": [],
3937
"returns": {
4038
"arg": "order",
@@ -50,8 +48,7 @@
5048
}
5149
]
5250
},
53-
"prepare": {
54-
"isStatic": false,
51+
"prototype.prepare": {
5552
"accepts": [{
5653
"arg": "params",
5754
"type": "Object",

test/fullcube-state-machine/common/models/subscription.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
"relations": {},
1616
"acls": [],
1717
"methods": {
18-
"cancel": {
19-
"isStatic": false,
18+
"prototype.cancel": {
2019
"accepts": [],
2120
"returns": {
2221
"arg": "subscription",
@@ -32,8 +31,7 @@
3231
}
3332
]
3433
},
35-
"reactivate": {
36-
"isStatic": false,
34+
"prototype.reactivate": {
3735
"accepts": [],
3836
"returns": {
3937
"arg": "subscription",
@@ -49,8 +47,7 @@
4947
}
5048
]
5149
},
52-
"expire": {
53-
"isStatic": false,
50+
"prototype.expire": {
5451
"accepts": [],
5552
"returns": {
5653
"arg": "subscription",

test/fullcube-state-machine/server/config.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"host": "0.0.0.0",
44
"port": 3000,
55
"remoting": {
6-
"context": {
7-
"enableHttpContext": false
8-
},
6+
"context": false,
97
"rest": {
108
"normalizeHttpPath": false,
119
"xml": false
@@ -19,9 +17,7 @@
1917
"limit": "100kb"
2018
},
2119
"cors": false,
22-
"errorHandler": {
23-
"disableStackTrace": false
24-
}
20+
"handleErrors": false
2521
},
2622
"legacyExplorer": false
2723
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"final:after": {
3+
"strong-error-handler": {
4+
"params": {
5+
"debug": true,
6+
"log": true
7+
}
8+
}
9+
}
10+
}

test/fullcube-state-machine/server/middleware.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@
4545
"loopback#urlNotFound": {}
4646
},
4747
"final:after": {
48-
"loopback#errorHandler": {}
48+
"strong-error-handler": {}
4949
}
5050
}

test/fullcube-state-machine/server/middleware.production.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

test/test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ const sinon = require('sinon')
77

88
chai.use(require('sinon-chai'))
99

10-
require('sinon-as-promised')(Promise)
11-
1210
const expect = chai.expect
1311

1412
const TEST_APP = path.join(__dirname, 'fullcube-state-machine')
@@ -269,7 +267,7 @@ describe('Cache', function() {
269267
Promise.delay(50).then(() => this.subscription.cancel())
270268
.then(() => Promise.reject(new Error('Should not get this far')))
271269
.catch(err => {
272-
expect(err).to.have.property('message', 'Previous transition pending')
270+
expect(err).to.have.property('message', 'Previous inter-state transition started')
273271
})
274272
})
275273
})

0 commit comments

Comments
 (0)