sumba 0.3.2 → 0.3.4

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.
@@ -1,7 +1,6 @@
1
1
  const bajoDbOnBeforeRecordCreate = {
2
2
  level: 1000,
3
3
  handler: async function (coll, body, options) {
4
- const { importPkg } = this.bajo.helper
5
4
  const { get } = this.bajo.helper._
6
5
  const { hasColumn } = this.sumba.helper
7
6
  const item = { siteId: 'req.site.id', userId: 'req.user.id' }
@@ -4,6 +4,7 @@ const bajoDbOnBeforeRecordFind = {
4
4
  const { isSet } = this.bajo.helper
5
5
  const { isEmpty, cloneDeep, get, set } = this.bajo.helper._
6
6
  const { hasColumn } = this.sumba.helper
7
+ if (options.noAutoFilter) return
7
8
  const item = { siteId: 'req.site.id', userId: 'req.user.id' }
8
9
  for (const i in item) {
9
10
  const rec = get(options, item[i])
@@ -6,7 +6,6 @@ export async function checker (coll, id, req) {
6
6
  const item = { siteId: 'site.id', userId: 'user.id' }
7
7
  for (const i in item) {
8
8
  const rec = get(req, item[i])
9
- console.log(rec)
10
9
  if (rec && await hasColumn(i, coll)) {
11
10
  const filter = { query: { id }, limit: 1 }
12
11
  filter.query[i] = rec
package/bajo/init.js ADDED
@@ -0,0 +1,11 @@
1
+ async function init () {
2
+ /*
3
+ const { eachPlugins } = this.bajo.helper
4
+ const pattern = 'auto-detect.*'
5
+ await eachPlugins(async function ({ file, plugin, alias }) {
6
+ console.log(file, plugin, alias)
7
+ }, pattern)
8
+ */
9
+ }
10
+
11
+ export default init
@@ -51,6 +51,7 @@
51
51
  }]
52
52
  },
53
53
  "edit": {
54
+ "shown": ["password"],
54
55
  "layouts": [{
55
56
  "title": "Meta Info",
56
57
  "fields": [
@@ -65,6 +66,7 @@
65
66
  "fields": [
66
67
  "username;small:6,medium:6",
67
68
  "email;small:6,medium:6",
69
+ "password;small:12,medium:12",
68
70
  "firstName;small:6,medium:6",
69
71
  "lastName;small:6,medium:6"
70
72
  ]
@@ -1,7 +1,6 @@
1
1
  async function checker (req, container) {
2
- const { importPkg, getConfig } = this.bajo.helper
2
+ const { getConfig, outmatch } = this.bajo.helper
3
3
  const { get } = this.bajo.helper._
4
- const outmatch = await importPkg('outmatch')
5
4
  let match
6
5
  for (const item of container) {
7
6
  let path = item.path
@@ -2,7 +2,7 @@ const indexes = []
2
2
  const invIndexes = []
3
3
 
4
4
  async function collect (type, { file, plugin, dir }) {
5
- const { readConfig, importPkg } = this.bajo.helper
5
+ const { readConfig } = this.bajo.helper
6
6
  const { routeDir } = this.bajoWeb.helper
7
7
  const { trim } = this.bajo.helper._
8
8
  const { hash } = this.bajoExtra.helper
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumba",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Bajo Framework's Biz Suite",
5
5
  "main": "index.js",
6
6
  "scripts": {