w-orm-reladb 1.0.38 → 1.0.40
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/.eslintrc.js +18 -17
- package/.github/workflows/ci-test.yml +1 -1
- package/README.md +1 -0
- package/babel.config.js +1 -0
- package/dist/w-orm-reladb.umd.js +2 -2
- package/dist/w-orm-reladb.umd.js.map +1 -1
- package/docs/WOrmReladb.html +147 -108
- package/docs/WOrmReladb.mjs.html +10 -7
- package/docs/index.html +4 -1
- package/docs/scripts/collapse.js +19 -0
- package/docs/scripts/commonNav.js +28 -0
- package/docs/scripts/search.js +16 -0
- package/docs/styles/jsdoc.css +13 -2
- package/docs/styles/prettify.css +1 -0
- package/package.json +9 -9
- package/src/WOrmReladb.mjs +6 -6
- package/src/genModelsByTabs.mjs +2 -2
- package/src/importModels.mjs +3 -3
- package/src/modifyModel.mjs +4 -4
- package/worm.sqlite +0 -0
package/docs/WOrmReladb.mjs.html
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
|
|
15
15
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
|
|
16
16
|
<script src="scripts/nav.js" defer></script>
|
|
17
|
+
|
|
17
18
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
18
19
|
</head>
|
|
19
20
|
<body>
|
|
@@ -27,7 +28,9 @@
|
|
|
27
28
|
|
|
28
29
|
<nav >
|
|
29
30
|
|
|
31
|
+
|
|
30
32
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WOrmReladb.html">WOrmReladb</a><ul class='methods'><li data-type='method'><a href="WOrmReladb.html#.closeSequelize">closeSequelize</a></li><li data-type='method'><a href="WOrmReladb.html#.createStorage">createStorage</a></li><li data-type='method'><a href="WOrmReladb.html#.del">del</a></li><li data-type='method'><a href="WOrmReladb.html#.delAll">delAll</a></li><li data-type='method'><a href="WOrmReladb.html#.genModelsByDB">genModelsByDB</a></li><li data-type='method'><a href="WOrmReladb.html#.genModelsByTabs">genModelsByTabs</a></li><li data-type='method'><a href="WOrmReladb.html#.genTransaction">genTransaction</a></li><li data-type='method'><a href="WOrmReladb.html#.initSequelize">initSequelize</a></li><li data-type='method'><a href="WOrmReladb.html#.insert">insert</a></li><li data-type='method'><a href="WOrmReladb.html#.save">save</a></li><li data-type='method'><a href="WOrmReladb.html#.select">select</a></li></ul></li></ul>
|
|
33
|
+
|
|
31
34
|
</nav>
|
|
32
35
|
|
|
33
36
|
<div id="main">
|
|
@@ -45,12 +48,12 @@
|
|
|
45
48
|
<pre class="prettyprint source linenums"><code>import path from 'path'
|
|
46
49
|
import events from 'events'
|
|
47
50
|
import Sequelize from 'sequelize'
|
|
48
|
-
import cloneDeep from 'lodash/cloneDeep'
|
|
49
|
-
import get from 'lodash/get'
|
|
50
|
-
import map from 'lodash/map'
|
|
51
|
-
import each from 'lodash/each'
|
|
52
|
-
import size from 'lodash/size'
|
|
53
|
-
import split from 'lodash/split'
|
|
51
|
+
import cloneDeep from 'lodash-es/cloneDeep'
|
|
52
|
+
import get from 'lodash-es/get'
|
|
53
|
+
import map from 'lodash-es/map'
|
|
54
|
+
import each from 'lodash-es/each'
|
|
55
|
+
import size from 'lodash-es/size'
|
|
56
|
+
import split from 'lodash-es/split'
|
|
54
57
|
import genPm from 'wsemi/src/genPm.mjs'
|
|
55
58
|
import genID from 'wsemi/src/genID.mjs'
|
|
56
59
|
import isarr from 'wsemi/src/isarr.mjs'
|
|
@@ -1108,7 +1111,7 @@ export default WOrmReladb
|
|
|
1108
1111
|
<br class="clear">
|
|
1109
1112
|
|
|
1110
1113
|
<footer>
|
|
1111
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc
|
|
1114
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Mar 20 2024 17:46:53 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
1112
1115
|
</footer>
|
|
1113
1116
|
|
|
1114
1117
|
<script>prettyPrint();</script>
|
package/docs/index.html
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
|
|
15
15
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
|
|
16
16
|
<script src="scripts/nav.js" defer></script>
|
|
17
|
+
|
|
17
18
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
18
19
|
</head>
|
|
19
20
|
<body>
|
|
@@ -27,7 +28,9 @@
|
|
|
27
28
|
|
|
28
29
|
<nav >
|
|
29
30
|
|
|
31
|
+
|
|
30
32
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WOrmReladb.html">WOrmReladb</a><ul class='methods'><li data-type='method'><a href="WOrmReladb.html#.closeSequelize">closeSequelize</a></li><li data-type='method'><a href="WOrmReladb.html#.createStorage">createStorage</a></li><li data-type='method'><a href="WOrmReladb.html#.del">del</a></li><li data-type='method'><a href="WOrmReladb.html#.delAll">delAll</a></li><li data-type='method'><a href="WOrmReladb.html#.genModelsByDB">genModelsByDB</a></li><li data-type='method'><a href="WOrmReladb.html#.genModelsByTabs">genModelsByTabs</a></li><li data-type='method'><a href="WOrmReladb.html#.genTransaction">genTransaction</a></li><li data-type='method'><a href="WOrmReladb.html#.initSequelize">initSequelize</a></li><li data-type='method'><a href="WOrmReladb.html#.insert">insert</a></li><li data-type='method'><a href="WOrmReladb.html#.save">save</a></li><li data-type='method'><a href="WOrmReladb.html#.select">select</a></li></ul></li></ul>
|
|
33
|
+
|
|
31
34
|
</nav>
|
|
32
35
|
|
|
33
36
|
<div id="main">
|
|
@@ -68,7 +71,7 @@
|
|
|
68
71
|
<br class="clear">
|
|
69
72
|
|
|
70
73
|
<footer>
|
|
71
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc
|
|
74
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Mar 20 2024 17:46:53 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
72
75
|
</footer>
|
|
73
76
|
|
|
74
77
|
<script>prettyPrint();</script>
|
package/docs/scripts/collapse.js
CHANGED
|
@@ -1,15 +1,34 @@
|
|
|
1
1
|
function hideAllButCurrent(){
|
|
2
2
|
//by default all submenut items are hidden
|
|
3
3
|
//but we need to rehide them for search
|
|
4
|
+
document.querySelectorAll("nav > ul").forEach(function(parent) {
|
|
5
|
+
if (parent.className.indexOf("collapse_top") !== -1) {
|
|
6
|
+
parent.style.display = "none";
|
|
7
|
+
}
|
|
8
|
+
});
|
|
4
9
|
document.querySelectorAll("nav > ul > li > ul li").forEach(function(parent) {
|
|
5
10
|
parent.style.display = "none";
|
|
6
11
|
});
|
|
12
|
+
document.querySelectorAll("nav > h3").forEach(function(section) {
|
|
13
|
+
if (section.className.indexOf("collapsed_header") !== -1) {
|
|
14
|
+
section.addEventListener("click", function(){
|
|
15
|
+
if (section.nextSibling.style.display === "none") {
|
|
16
|
+
section.nextSibling.style.display = "block";
|
|
17
|
+
} else {
|
|
18
|
+
section.nextSibling.style.display = "none";
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
7
23
|
|
|
8
24
|
//only current page (if it exists) should be opened
|
|
9
25
|
var file = window.location.pathname.split("/").pop().replace(/\.html/, '');
|
|
10
26
|
document.querySelectorAll("nav > ul > li > a").forEach(function(parent) {
|
|
11
27
|
var href = parent.attributes.href.value.replace(/\.html/, '');
|
|
12
28
|
if (file === href) {
|
|
29
|
+
if (parent.parentNode.parentNode.className.indexOf("collapse_top") !== -1) {
|
|
30
|
+
parent.parentNode.parentNode.style.display = "block";
|
|
31
|
+
}
|
|
13
32
|
parent.parentNode.querySelectorAll("ul li").forEach(function(elem) {
|
|
14
33
|
elem.style.display = "block";
|
|
15
34
|
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
if (typeof fetch === 'function') {
|
|
2
|
+
const init = () => {
|
|
3
|
+
if (typeof scrollToNavItem !== 'function') return false
|
|
4
|
+
scrollToNavItem()
|
|
5
|
+
// hideAllButCurrent not always loaded
|
|
6
|
+
if (typeof hideAllButCurrent === 'function') hideAllButCurrent()
|
|
7
|
+
return true
|
|
8
|
+
}
|
|
9
|
+
fetch('./nav.inc.html')
|
|
10
|
+
.then(response => response.ok ? response.text() : `${response.url} => ${response.status} ${response.statusText}`)
|
|
11
|
+
.then(body => {
|
|
12
|
+
document.querySelector('nav').innerHTML += body
|
|
13
|
+
// nav.js should be quicker to load than nav.inc.html, a fallback just in case
|
|
14
|
+
return init()
|
|
15
|
+
})
|
|
16
|
+
.then(done => {
|
|
17
|
+
if (done) return
|
|
18
|
+
let i = 0
|
|
19
|
+
;(function waitUntilNavJs () {
|
|
20
|
+
if (init()) return
|
|
21
|
+
if (i++ < 100) return setTimeout(waitUntilNavJs, 300)
|
|
22
|
+
console.error(Error('nav.js not loaded after 30s waiting for it'))
|
|
23
|
+
})()
|
|
24
|
+
})
|
|
25
|
+
.catch(error => console.error(error))
|
|
26
|
+
} else {
|
|
27
|
+
console.error(Error('Browser too old to display commonNav (remove commonNav docdash option)'))
|
|
28
|
+
}
|
package/docs/scripts/search.js
CHANGED
|
@@ -33,6 +33,9 @@ document.getElementById("nav-search").addEventListener("keyup", function(event)
|
|
|
33
33
|
document.querySelectorAll("nav > ul > li").forEach(function(elem) {
|
|
34
34
|
elem.style.display = "block";
|
|
35
35
|
});
|
|
36
|
+
document.querySelectorAll("nav > ul").forEach(function(elem) {
|
|
37
|
+
elem.style.display = "block";
|
|
38
|
+
});
|
|
36
39
|
//hide all results
|
|
37
40
|
document.querySelectorAll("nav > ul > li > ul li").forEach(function(elem) {
|
|
38
41
|
elem.style.display = "none";
|
|
@@ -79,5 +82,18 @@ document.getElementById("nav-search").addEventListener("keyup", function(event)
|
|
|
79
82
|
parent.style.display = "none";
|
|
80
83
|
}
|
|
81
84
|
});
|
|
85
|
+
document.querySelectorAll("nav > ul.collapse_top").forEach(function(parent) {
|
|
86
|
+
var countVisible = 0;
|
|
87
|
+
parent.querySelectorAll("li").forEach(function(elem) {
|
|
88
|
+
if (elem.style.display !== "none") {
|
|
89
|
+
countVisible++;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
if (countVisible == 0) {
|
|
94
|
+
//has no child at all and does not contain text
|
|
95
|
+
parent.style.display = "none";
|
|
96
|
+
}
|
|
97
|
+
});
|
|
82
98
|
}
|
|
83
99
|
});
|
package/docs/styles/jsdoc.css
CHANGED
|
@@ -162,12 +162,19 @@ h6 {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
|
|
165
|
-
tt, code, kbd, samp {
|
|
165
|
+
tt, code, kbd, samp, pre {
|
|
166
166
|
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
|
167
167
|
background: #f4f4f4;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
tt, code, kbd, samp{
|
|
168
171
|
padding: 1px 5px;
|
|
169
172
|
}
|
|
170
173
|
|
|
174
|
+
pre {
|
|
175
|
+
padding-bottom: 1em;
|
|
176
|
+
}
|
|
177
|
+
|
|
171
178
|
.class-description {
|
|
172
179
|
font-size: 130%;
|
|
173
180
|
line-height: 140%;
|
|
@@ -242,6 +249,10 @@ nav h3 {
|
|
|
242
249
|
color: #000;
|
|
243
250
|
}
|
|
244
251
|
|
|
252
|
+
nav h3.collapsed_header {
|
|
253
|
+
cursor: pointer;
|
|
254
|
+
}
|
|
255
|
+
|
|
245
256
|
nav ul {
|
|
246
257
|
font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif;
|
|
247
258
|
font-size: 100%;
|
|
@@ -762,4 +773,4 @@ html[data-search-mode] .level-hide {
|
|
|
762
773
|
font-weight: 300;
|
|
763
774
|
font-style: normal;
|
|
764
775
|
|
|
765
|
-
}
|
|
776
|
+
}
|
package/docs/styles/prettify.css
CHANGED
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "w-orm-reladb",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"main": "dist/w-orm-reladb.umd.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"json5": "^2.2.3",
|
|
7
|
-
"lodash": "^4.17.21",
|
|
8
|
-
"mssql": "^
|
|
9
|
-
"sqlite3": "^5.
|
|
10
|
-
"w-auto-sequelize": "^1.0.
|
|
11
|
-
"wsemi": "^1.
|
|
7
|
+
"lodash-es": "^4.17.21",
|
|
8
|
+
"mssql": "^10.0.2",
|
|
9
|
+
"sqlite3": "^5.1.7",
|
|
10
|
+
"w-auto-sequelize": "^1.0.25",
|
|
11
|
+
"wsemi": "^1.7.47"
|
|
12
12
|
},
|
|
13
13
|
"dependenciesTemp": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"@journeyapps/sqlcipher": "^5.3.1",
|
|
15
|
+
"msg": "install sqlcipher fo the protection when db=sqlite"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"w-package-tools": "^1.0.
|
|
18
|
+
"w-package-tools": "^1.0.73"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"test": "mocha --parallel --timeout 60000 --experimental-modules --es-module-specifier-resolution=node",
|
package/src/WOrmReladb.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import path from 'path'
|
|
2
2
|
import events from 'events'
|
|
3
3
|
import Sequelize from 'sequelize'
|
|
4
|
-
import cloneDeep from 'lodash/cloneDeep'
|
|
5
|
-
import get from 'lodash/get'
|
|
6
|
-
import map from 'lodash/map'
|
|
7
|
-
import each from 'lodash/each'
|
|
8
|
-
import size from 'lodash/size'
|
|
9
|
-
import split from 'lodash/split'
|
|
4
|
+
import cloneDeep from 'lodash-es/cloneDeep'
|
|
5
|
+
import get from 'lodash-es/get'
|
|
6
|
+
import map from 'lodash-es/map'
|
|
7
|
+
import each from 'lodash-es/each'
|
|
8
|
+
import size from 'lodash-es/size'
|
|
9
|
+
import split from 'lodash-es/split'
|
|
10
10
|
import genPm from 'wsemi/src/genPm.mjs'
|
|
11
11
|
import genID from 'wsemi/src/genID.mjs'
|
|
12
12
|
import isarr from 'wsemi/src/isarr.mjs'
|
package/src/genModelsByTabs.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs'
|
|
2
2
|
import JSON5 from 'json5'
|
|
3
|
-
import each from 'lodash/each'
|
|
4
|
-
import get from 'lodash/get'
|
|
3
|
+
import each from 'lodash-es/each'
|
|
4
|
+
import get from 'lodash-es/get'
|
|
5
5
|
import replace from 'wsemi/src/replace.mjs'
|
|
6
6
|
import strright from 'wsemi/src/strright.mjs'
|
|
7
7
|
import iseobj from 'wsemi/src/iseobj.mjs'
|
package/src/importModels.mjs
CHANGED
|
@@ -2,9 +2,9 @@ import fs from 'fs'
|
|
|
2
2
|
import path from 'path'
|
|
3
3
|
import JSON5 from 'json5'
|
|
4
4
|
import Sequelize from 'sequelize'
|
|
5
|
-
import each from 'lodash/each'
|
|
6
|
-
import get from 'lodash/get'
|
|
7
|
-
import isBoolean from 'lodash/isBoolean'
|
|
5
|
+
import each from 'lodash-es/each'
|
|
6
|
+
import get from 'lodash-es/get'
|
|
7
|
+
import isBoolean from 'lodash-es/isBoolean'
|
|
8
8
|
import genPm from 'wsemi/src/genPm.mjs'
|
|
9
9
|
import modifyModel from './modifyModel.mjs'
|
|
10
10
|
import requireModel from './requireModel.js'
|
package/src/modifyModel.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from 'fs'
|
|
2
2
|
import JSON5 from 'json5'
|
|
3
|
-
import get from 'lodash/get'
|
|
4
|
-
import each from 'lodash/each'
|
|
5
|
-
import trim from 'lodash/trim'
|
|
6
|
-
import join from 'lodash/join'
|
|
3
|
+
import get from 'lodash-es/get'
|
|
4
|
+
import each from 'lodash-es/each'
|
|
5
|
+
import trim from 'lodash-es/trim'
|
|
6
|
+
import join from 'lodash-es/join'
|
|
7
7
|
import iseobj from 'wsemi/src/iseobj.mjs'
|
|
8
8
|
import sep from 'wsemi/src/sep.mjs'
|
|
9
9
|
|
package/worm.sqlite
CHANGED
|
Binary file
|