w-serv-orm 1.0.21 → 1.0.23

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,5 +1,5 @@
1
1
  /*!
2
- * w-serv-orm v1.0.21
2
+ * w-serv-orm v1.0.23
3
3
  * (c) 2018-2021 yuda-lyu(semisphere)
4
4
  * Released under the MIT License.
5
5
  */
@@ -573,7 +573,7 @@
573
573
  <br class="clear">
574
574
 
575
575
  <footer>
576
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Apr 13 2025 11:31:57 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
576
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun May 11 2025 14:49:33 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
577
577
  </footer>
578
578
 
579
579
  <script>prettyPrint();</script>
@@ -161,7 +161,7 @@ export default WServOrm
161
161
  <br class="clear">
162
162
 
163
163
  <footer>
164
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Apr 13 2025 11:31:57 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
164
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun May 11 2025 14:49:33 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
165
165
  </footer>
166
166
 
167
167
  <script>prettyPrint();</script>
package/docs/index.html CHANGED
@@ -71,7 +71,7 @@
71
71
  <br class="clear">
72
72
 
73
73
  <footer>
74
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Apr 13 2025 11:31:57 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
74
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun May 11 2025 14:49:33 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
75
75
  </footer>
76
76
 
77
77
  <script>prettyPrint();</script>
package/g-mOrm.mjs CHANGED
@@ -56,4 +56,4 @@ console.log(r) //回傳server用orm相關函數
56
56
  // export default r
57
57
 
58
58
 
59
- //node --experimental-modules g-mOrm.mjs
59
+ //node g-mOrm.mjs
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "w-serv-orm",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "main": "dist/w-serv-orm.umd.js",
5
5
  "dependencies": {
6
6
  "json5": "^2.2.3",
7
7
  "lodash-es": "^4.17.21",
8
- "wsemi": "^1.7.88"
8
+ "wsemi": "^1.7.90"
9
9
  },
10
10
  "devDependencies": {
11
11
  "w-data-collector": "^1.0.22",
12
- "w-orm-lowdb": "^1.0.1",
13
- "w-package-tools": "^1.0.87"
12
+ "w-orm-lowdb": "^1.0.5",
13
+ "w-package-tools": "^1.0.90"
14
14
  },
15
15
  "scripts": {
16
- "test": "mocha --parallel --timeout 60000 --experimental-modules",
16
+ "test": "mocha --parallel --timeout 60000",
17
17
  "deploy": "gh-pages -d docs"
18
18
  },
19
19
  "repository": {
package/schema/gi.mjs CHANGED
@@ -5,4 +5,4 @@ import genIndex from 'w-data-collector/src/genIndex.mjs'
5
5
  genIndex('./schema/tables', './schema')
6
6
 
7
7
 
8
- //node --experimental-modules ./schema/gi.mjs
8
+ //node schema/gi.mjs
package/script.txt CHANGED
@@ -1,10 +1,10 @@
1
- #node --experimental-modules toolg/addVersion.mjs
2
- node --experimental-modules toolg/modifyReadme.mjs
1
+ #node toolg/addVersion.mjs
2
+ node toolg/modifyReadme.mjs
3
3
 
4
- node --experimental-modules toolg/cleanFolder.mjs
4
+ node toolg/cleanFolder.mjs
5
5
  ./node_modules/.bin/jsdoc -c .jsdoc
6
6
 
7
- node --experimental-modules toolg/gDistRollup.mjs
7
+ node toolg/gDistRollup.mjs
8
8
 
9
9
  git add . -A
10
10
  git commit -m 'modify: '
@@ -1,7 +1,7 @@
1
1
  import path from 'path'
2
2
  import fs from 'fs'
3
3
  import JSON5 from 'json5'
4
- import get from 'lodash-es/get.js'
4
+ import get from 'lodash-es/get.js'
5
5
  import isnum from 'wsemi/src/isnum.mjs'
6
6
  import isestr from 'wsemi/src/isestr.mjs'
7
7
 
@@ -30,31 +30,40 @@ function getSettings(opt = {}) {
30
30
  //parse
31
31
  st = JSON5.parse(j)
32
32
 
33
- //check
34
- if (!isestr(get(st, 'dbType'))) {
35
- console.log('invalid st.dbType', st.dbType)
33
+ //url
34
+ let url = ''
35
+ if (isestr(get(st, 'dbUrl'))) {
36
+ url = st.dbUrl
36
37
  }
37
- if (!isestr(get(st, 'dbUsername'))) {
38
- console.log('invalid st.dbUsername', st.dbUsername)
39
- }
40
- if (!isestr(get(st, 'dbPassword'))) {
41
- console.log('invalid st.dbPassword', st.dbPassword)
42
- }
43
- if (!isestr(get(st, 'dbIP'))) {
44
- console.log('invalid st.dbIP', st.dbIP)
45
- }
46
- if (!isnum(get(st, 'dbPort'))) {
47
- console.log('invalid st.dbPort', st.dbPort)
48
- }
49
- if (!isestr(get(st, 'dbType'))) {
50
- console.log('invalid st.dbType', st.dbType)
38
+ else {
39
+ if (!isestr(get(st, 'dbType'))) {
40
+ console.log('st', st)
41
+ throw new Error(`invalid st.dbType`)
42
+ }
43
+ if (!isestr(get(st, 'dbUsername'))) {
44
+ console.log('st', st)
45
+ throw new Error(`invalid st.dbUsername`)
46
+ }
47
+ if (!isestr(get(st, 'dbPassword'))) {
48
+ console.log('st', st)
49
+ throw new Error(`invalid st.dbPassword`)
50
+ }
51
+ if (!isestr(get(st, 'dbIP'))) {
52
+ console.log('st', st)
53
+ throw new Error(`invalid st.dbIP`)
54
+ }
55
+ if (!isnum(get(st, 'dbPort'))) {
56
+ console.log('st', st)
57
+ throw new Error(`invalid st.dbPort`)
58
+ }
59
+ url = `${st.dbType}://${st.dbUsername}:${st.dbPassword}@${st.dbIP}:${st.dbPort}`
51
60
  }
61
+
62
+ //db
52
63
  if (!isestr(get(st, 'dbName'))) {
53
- console.log('invalid st.dbName', st.dbName)
64
+ console.log('st', st)
65
+ throw new Error(`invalid st.dbName`)
54
66
  }
55
-
56
- //url, db
57
- let url = `${st.dbType}://${st.dbUsername}:${st.dbPassword}@${st.dbIP}:${st.dbPort}`
58
67
  let db = st.dbName
59
68
 
60
69
  //merge