Skip to content

Commit

Permalink
Merge pull request #3 from fabrix-app/v1.5
Browse files Browse the repository at this point in the history
[chore] LTS
  • Loading branch information
scott-wyatt committed Sep 16, 2018
2 parents d028e66 + 9dea619 commit ba0f006
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 27 deletions.
8 changes: 6 additions & 2 deletions lib/TapestriesSpool.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Spool } from '@fabrix/fabrix/dist/common'
import { union } from 'lodash'

import { Utils } from './utils'
import { validateConfig } from './validator'
Expand Down Expand Up @@ -38,6 +37,9 @@ export class TapestriesSpool extends Spool {
return Promise.all([
validateConfig.validateConfig(this.app.config.get('tapestries'))
])
.catch(err => {
return Promise.reject(err)
})
}

/**
Expand All @@ -64,7 +66,7 @@ export class TapestriesSpool extends Spool {
* Delete | DELETE | /{model}/{id?} | TapestryController.destroy
* Delete | DELETE | /{model}/{id}/{child}/{id?}| TapestryController.destroyAssociation
*/
configure () {
async configure () {
const controllerTapestries = Utils.getControllerTapestries(this.app) || {}
const modelTapestries = this.modelTapestries ? Utils.getModelTapestries(this.app) : {}
const tapestryRoutes = {...controllerTapestries, ...modelTapestries}
Expand All @@ -74,6 +76,8 @@ export class TapestriesSpool extends Spool {
...tapestryRoutes,
...configRoutes
})

return Promise.resolve()
}
}

6 changes: 6 additions & 0 deletions lib/api/controllers/TapestryController.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { FabrixController } from '@fabrix/fabrix/dist/common'
import { TapestryControllerNotInstalledError } from '../../errors'

export class TapestryController extends FabrixController {

}
1 change: 1 addition & 0 deletions lib/api/controllers/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {}
2 changes: 2 additions & 0 deletions lib/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import * as controllers from './controllers'
import * as services from './services'

export {
controllers,
services
}
56 changes: 36 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fabrix/spool-tapestries",
"version": "1.1.3",
"version": "1.5.0",
"description": "Spool - Tapestries, Easy RESTful Services",
"scripts": {
"build": "tsc -p ./lib/tsconfig.release.json",
Expand Down Expand Up @@ -49,8 +49,8 @@
"lodash": "^4.17.10"
},
"devDependencies": {
"@fabrix/fabrix": "^1.1.2",
"@fabrix/spool-router": "^1.1.3",
"@fabrix/fabrix": "^1.5.0",
"@fabrix/spool-router": "^1.5.0",
"@fabrix/lint": "^1.0.0-alpha.3",
"@types/lodash": "^4.14.109",
"@types/node": "~10.3.4",
Expand All @@ -64,8 +64,8 @@
"typescript": "~2.8.1"
},
"peerDependencies": {
"@fabrix/fabrix": "^1.1.2",
"@fabrix/spool-router": "^1.1.3"
"@fabrix/fabrix": "^1.5.0",
"@fabrix/spool-router": "^1.5.0"
},
"license": "MIT",
"bugs": {
Expand Down

0 comments on commit ba0f006

Please sign in to comment.