waibu-rest-api 1.1.8 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,8 @@ import serveRoute from './serve-route.js'
4
4
  async function routeByModelBuilder ({ file, ctx, dir, pathPrefix, ns, parent }) {
5
5
  const { getPlugin } = this.app.bajo
6
6
  getPlugin('dobo') // ensure dobo is loaded
7
- const { readConfig, parseObject, isSet } = this.app.bajo
7
+ const { readConfig, parseObject } = this.app.bajo
8
+ const { isSet } = this.lib.aneka
8
9
  const { methodMap, getParams } = this.app.waibuDb
9
10
  const { getInfo } = this.app.dobo
10
11
  const { camelCase, omit, merge, keys, filter } = this.lib._
@@ -2,7 +2,8 @@ import path from 'path'
2
2
  import serveRoute from './serve-route.js'
3
3
 
4
4
  async function routeByVerb ({ file, ctx, appCtx, dir, pathPrefix, ns, alias, parent }) {
5
- const { importModule, parseObject, isSet } = this.app.bajo
5
+ const { importModule, parseObject } = this.app.bajo
6
+ const { isSet } = this.lib.aneka
6
7
  const { methodMap, getParams } = this.app.waibuDb
7
8
  const { isFunction, merge } = this.lib._
8
9
  const me = this
@@ -1,5 +1,6 @@
1
1
  async function serveRoute ({ mod, ns, parent }) {
2
- const { defaultsDeep, importModule } = this.app.bajo
2
+ const { defaultsDeep } = this.lib.aneka
3
+ const { importModule } = this.app.bajo
3
4
  const { getPluginPrefix } = this.app.waibu
4
5
  const { pick } = this.lib._
5
6
  const mergeRouteHooks = await importModule('waibu:/lib/webapp-scope/merge-route-hooks.js')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-rest-api",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "REST API for Waibu",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/plugin/factory.js CHANGED
@@ -88,7 +88,7 @@ async function factory (pkgName) {
88
88
  }
89
89
 
90
90
  const returnError = ({ data, req, reply, options = {} }) => {
91
- const { pascalCase } = this.app.bajo
91
+ const { pascalCase } = this.lib.aneka
92
92
  const { last, map, kebabCase, upperFirst, keys, each, get, isEmpty } = this.lib._
93
93
  const cfg = this.config
94
94
  const cfgWdb = this.app.waibuDb.config
@@ -110,7 +110,7 @@ async function factory (pkgName) {
110
110
  }
111
111
 
112
112
  const returnSuccess = ({ data, req, reply, options = {} }) => {
113
- const { pascalCase } = this.app.bajo
113
+ const { pascalCase } = this.lib.aneka
114
114
  const { each, keys, omit, get } = this.lib._
115
115
  const cfg = this.config
116
116
  const cfgWdb = this.app.waibuDb.config