Skip to content

Commit e941d28

Browse files
author
Tom Kirkpatrick
committed
feat: update to loopback 3.x
BREAKING CHANGE: update to loopback 3.x
1 parent a187050 commit e941d28

18 files changed

+84
-57
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"lodash": "^4.17.4"
3939
},
4040
"peerDependencies": {
41-
"loopback": "^2.25.0",
41+
"loopback": "^3.4.0",
4242
"loopback-context": "^3.1.0",
4343
"cls-hooked": "^4.1.5"
4444
},
@@ -54,7 +54,7 @@
5454
"dirty-chai": "1.2.2",
5555
"eslint": "^3.19.0",
5656
"eslint-config-fullcube": "^2.0.2",
57-
"loopback": "^2.25.0",
57+
"loopback": "^3.4.0",
5858
"loopback-boot": "^2.24.0",
5959
"loopback-context": "^3.1.0",
6060
"cls-hooked": "^4.1.5",
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "accessToken",
3+
"plural": "accessTokens",
4+
"base": "AccessToken",
5+
"relations": {
6+
"user": {
7+
"type": "belongsTo",
8+
"model": "user",
9+
"foreignKey": "userId"
10+
}
11+
}
12+
}

test/fixtures/simple-app/common/models/invoice.js

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

test/fixtures/simple-app/common/models/invoice.json

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"name": "Invoice",
33
"base": "PersistedModel",
4-
"idInjection": true,
54
"options": {
6-
"validateUpsert": true
5+
"idInjection": true,
6+
"validateUpsert": true,
7+
"forceId": false,
8+
"replaceOnPUT": false
79
},
810
"properties": {
911
"storeId": {
@@ -59,14 +61,7 @@
5961
"principalType": "ROLE",
6062
"principalId": "$group:manager",
6163
"permission": "ALLOW",
62-
"property": "updateAttributes"
63-
},
64-
{
65-
"accessType": "WRITE",
66-
"principalType": "ROLE",
67-
"principalId": "$group:manager",
68-
"permission": "ALLOW",
69-
"property": "upsert"
64+
"property": ["patchOrCreate", "replaceOrCreate", "replaceById", "updateOrCreate", "updateAttributes", "patchAttributes"]
7065
},
7166
{
7267
"accessType": "*",

test/fixtures/simple-app/common/models/store.js

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

test/fixtures/simple-app/common/models/store.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"name": "Store",
33
"base": "PersistedModel",
4-
"idInjection": true,
54
"options": {
6-
"validateUpsert": true
5+
"idInjection": true,
6+
"validateUpsert": true,
7+
"forceId": false,
8+
"replaceOnPUT": false
79
},
810
"properties": {
911
"id": {

test/fixtures/simple-app/common/models/team.js

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

test/fixtures/simple-app/common/models/team.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"name": "Team",
33
"base": "PersistedModel",
4-
"idInjection": true,
54
"options": {
6-
"validateUpsert": true
5+
"idInjection": true,
6+
"validateUpsert": true,
7+
"forceId": false,
8+
"replaceOnPUT": false
79
},
810
"properties": {
911
"storeId": {

test/fixtures/simple-app/common/models/transaction.js

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

test/fixtures/simple-app/common/models/transaction.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"name": "Transaction",
33
"base": "PersistedModel",
4-
"idInjection": true,
54
"options": {
6-
"validateUpsert": true
5+
"idInjection": true,
6+
"validateUpsert": true,
7+
"forceId": false,
8+
"replaceOnPUT": false
79
},
810
"properties": {
911
"storeId": {

0 commit comments

Comments
 (0)