waibu-db 1.1.24 → 1.2.0

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.
package/index.js ADDED
@@ -0,0 +1,30 @@
1
+ async function factory (pkgName) {
2
+ const me = this
3
+
4
+ return class WaibuDb extends this.lib.BajoPlugin {
5
+ constructor () {
6
+ super(pkgName, me.app)
7
+ this.alias = 'wdb'
8
+ this.dependencies = ['dobo', 'waibu']
9
+ this.config = {
10
+ waibu: {
11
+ prefix: 'db',
12
+ title: 'dbModels'
13
+ },
14
+ waibuAdmin: {
15
+ menuCollapsible: true,
16
+ menuHandler: 'waibuDb:adminMenu'
17
+ },
18
+ waibuMpa: {
19
+ icon: 'database'
20
+ },
21
+ dbModel: {
22
+ count: false,
23
+ patchEnabled: false
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
29
+
30
+ export default factory
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-db",
3
- "version": "1.1.24",
3
+ "version": "1.2.0",
4
4
  "description": "DB Helper",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,4 +1,4 @@
1
- import prepCrud from '../../../lib/prep-crud.js'
1
+ import prepCrud from '../../lib/prep-crud.js'
2
2
 
3
3
  async function count ({ model, req, reply, options = {} }) {
4
4
  const { recordCount } = this.app.dobo
@@ -1,4 +1,4 @@
1
- import prepCrud from '../../../lib/prep-crud.js'
1
+ import prepCrud from '../../lib/prep-crud.js'
2
2
 
3
3
  async function create ({ model, req, reply, body, options = {} }) {
4
4
  const { recordCreate, attachmentFind } = this.app.dobo
@@ -1,4 +1,4 @@
1
- import prepCrud from '../../../lib/prep-crud.js'
1
+ import prepCrud from '../../lib/prep-crud.js'
2
2
 
3
3
  async function find ({ model, req, reply, options = {} }) {
4
4
  const { recordFindOne, attachmentFind } = this.app.dobo
@@ -1,4 +1,4 @@
1
- import prepCrud from '../../../lib/prep-crud.js'
1
+ import prepCrud from '../../lib/prep-crud.js'
2
2
 
3
3
  async function find ({ model, req, reply, options = {} }) {
4
4
  const { recordFind, attachmentFind } = this.app.dobo
@@ -1,4 +1,4 @@
1
- import prepCrud from '../../../lib/prep-crud.js'
1
+ import prepCrud from '../../lib/prep-crud.js'
2
2
 
3
3
  async function get ({ model, req, reply, id, options = {} }) {
4
4
  const { recordFindOne } = this.app.dobo
@@ -1,4 +1,4 @@
1
- import prepCrud from '../../../lib/prep-crud.js'
1
+ import prepCrud from '../../lib/prep-crud.js'
2
2
 
3
3
  async function remove ({ model, req, reply, id, options = {} }) {
4
4
  const { recordRemove } = this.app.dobo
@@ -1,4 +1,4 @@
1
- import prepCrud from '../../../lib/prep-crud.js'
1
+ import prepCrud from '../../lib/prep-crud.js'
2
2
 
3
3
  async function update ({ model, req, reply, id, body, options = {} }) {
4
4
  const { recordUpdate, attachmentFind } = this.app.dobo
@@ -1,4 +1,4 @@
1
- import prepCrud from '../../../lib/prep-crud.js'
1
+ import prepCrud from '../../lib/prep-crud.js'
2
2
 
3
3
  async function aggregate ({ model, req, reply, options = {} }) {
4
4
  const { statAggregate } = this.app.dobo
@@ -1,4 +1,4 @@
1
- import prepCrud from '../../../lib/prep-crud.js'
1
+ import prepCrud from '../../lib/prep-crud.js'
2
2
 
3
3
  async function histogram ({ model, req, reply, options = {} }) {
4
4
  const { statHistogram } = this.app.dobo
package/plugin/.alias DELETED
@@ -1 +0,0 @@
1
- wdb
@@ -1,2 +0,0 @@
1
- dobo
2
- waibu
@@ -1,17 +0,0 @@
1
- {
2
- "waibu": {
3
- "prefix": "db",
4
- "title": "dbModels"
5
- },
6
- "waibuAdmin": {
7
- "menuCollapsible": true,
8
- "menuHandler": "waibuDb:adminMenu"
9
- },
10
- "waibuMpa": {
11
- "icon": "database"
12
- },
13
- "dbModel": {
14
- "count": false,
15
- "patchEnabled": false
16
- }
17
- }
File without changes
File without changes
File without changes