w-web-perm 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.
- package/README.md +14 -4
- package/dist/index.tmp +1 -1
- package/dist/js/app-legacy.ecb7ce08.js +1 -0
- package/dist/js/app.ecb7ce08.js +1 -0
- package/dist/js/{chunk-vendors-legacy.00f159e8.js → chunk-vendors-legacy.da785a99.js} +3 -3
- package/dist/js/{chunk-vendors.00f159e8.js → chunk-vendors.da785a99.js} +3 -3
- package/dist/w-web-perm.umd.js +2 -2
- package/dist/w-web-perm.umd.js.map +1 -1
- package/docs/WWebPerm.html +78 -128
- package/docs/global.html +1280 -39
- package/docs/index.html +2 -2
- package/docs/server_WWebPerm.mjs.html +1247 -1196
- package/docs/server_dataChannel.mjs.html +131 -0
- package/docs/server_lockSave.mjs.html +2 -2
- package/docs/server_maskLog.mjs.html +2 -2
- package/docs/server_procCore.mjs.html +53 -11
- package/docs/server_staLogs_resolveShellWorker.mjs.html +180 -0
- package/docs/server_validateRows.mjs.html +184 -0
- package/docs/server_wrapInjected.mjs.html +2 -2
- package/docs/src_fetchJson.mjs.html +2 -2
- package/docs/src_js_legendFit.mjs.html +2 -2
- package/docs/src_plugins_reuseDeletedIds.mjs.html +2 -2
- package/docs/src_plugins_submitGuard.mjs.html +2 -2
- package/g_backupDb.mjs +4 -0
- package/g_initialData.mjs +1 -0
- package/g_initialTestData.mjs +1 -0
- package/g_mOrm.mjs +2 -7
- package/g_provideGrups.mjs +1 -0
- package/g_providePemis.mjs +1 -0
- package/g_provideTargets.mjs +1 -0
- package/g_provideUsers.mjs +1 -0
- package/package.json +10 -10
- package/server/WWebPerm.mjs +1245 -1194
- package/server/dataChannel.mjs +59 -0
- package/server/procCore.mjs +51 -9
- package/server/procLang.mjs +13 -3
- package/server/staLogs/resolveShellWorker.mjs +108 -0
- package/server/staLogs/staLogsCore.callWorker.mjs +29 -9
- package/server/validateRows.mjs +112 -0
- package/src/components/LayoutContentGrups.vue +8 -8
- package/src/components/LayoutContentPemis.vue +8 -8
- package/src/components/LayoutContentTargets.vue +2 -2
- package/src/components/LayoutContentUsers.vue +4 -4
- package/src/components/VeCgrups.vue +3 -3
- package/src/components/VeCpemis.vue +3 -3
- package/src/components/VeCrules.vue +3 -3
- package/src/components/VeGrupBlngUsers.vue +6 -6
- package/src/components/VePemiBlngGrups.vue +6 -6
- package/srv.mjs +0 -4
- package/dist/js/app-legacy.6f82d8bd.js +0 -1
- package/dist/js/app.6f82d8bd.js +0 -1
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<title>server/validateRows.mjs - Documentation</title>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<script src="scripts/prettify/prettify.js"></script>
|
|
10
|
+
<script src="scripts/prettify/lang-css.js"></script>
|
|
11
|
+
<!--[if lt IE 9]>
|
|
12
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
13
|
+
<![endif]-->
|
|
14
|
+
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
|
|
15
|
+
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
|
|
16
|
+
<script src="scripts/nav.js" defer></script>
|
|
17
|
+
|
|
18
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
|
|
22
|
+
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
|
23
|
+
<label for="nav-trigger" class="navicon-button x">
|
|
24
|
+
<div class="navicon"></div>
|
|
25
|
+
</label>
|
|
26
|
+
|
|
27
|
+
<label for="nav-trigger" class="overlay"></label>
|
|
28
|
+
|
|
29
|
+
<nav >
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createAuthorizeExec">createAuthorizeExec</a></li><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#resolveShellWorker">resolveShellWorker</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#validateRowsBeforeWrite">validateRowsBeforeWrite</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li><li><a href="global.html#wrapOperOrm">wrapOperOrm</a></li></ul>
|
|
33
|
+
|
|
34
|
+
</nav>
|
|
35
|
+
|
|
36
|
+
<div id="main">
|
|
37
|
+
|
|
38
|
+
<h1 class="page-title">server/validateRows.mjs</h1>
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<section>
|
|
47
|
+
<article>
|
|
48
|
+
<pre class="prettyprint source linenums"><code>import get from 'lodash-es/get.js'
|
|
49
|
+
import each from 'lodash-es/each.js'
|
|
50
|
+
import isestr from 'wsemi/src/isestr.mjs'
|
|
51
|
+
import isarr from 'wsemi/src/isarr.mjs'
|
|
52
|
+
import iseobj from 'wsemi/src/iseobj.mjs'
|
|
53
|
+
import clearXSS from 'wsemi/src/clearXSS.mjs'
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
//LMDB 之主鍵上限(lmdb 之 DEFAULT_MAX_KEY_SIZE): 主鍵 UTF-8 位元組數 1978 可寫, 1979 即被 ORM 整批拒絕(2026-10-14 實測)
|
|
57
|
+
let maxIdBytes = 1978
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 寫入前驗證可預判之 ORM 寫入失敗(ADR-026, 規則帳本 R-ORM-01)
|
|
62
|
+
*
|
|
63
|
+
* 寫入路徑皆「先破壞後寫入」(整表儲存為 del → insert → save, 外部同步為 delAll → insert), 而 ORM(w-serv-orm 1.1.8 起)對下列輸入整批拒絕,
|
|
64
|
+
* 於第一個破壞步驟之後才被拒會造成部分寫入或資料遺失, 故須於任何寫入之前判定:
|
|
65
|
+
* 1. 主鍵 id 有給時須為非空字串或有限數字(NaN、±Infinity 視為未給, 同 w-serv-orm 1.1.11 之補值), 字串之 UTF-8 位元組數不得超過 1978(LMDB 鍵長上限),
|
|
66
|
+
* 且批內不得重複(以 String(id) 比對: w-serv-orm 1.1.11 起數字主鍵存為其字串形式, 數字與其字串形式為同一主鍵).
|
|
67
|
+
* 2. 任一字串欄位之值會被 wsemi 之 clearXSS 改寫者(含 HTML 標記, 如「<」後接英文字母)即拒絕——與 w-serv-orm 寫入前之 adjustData 同一函數,
|
|
68
|
+
* 主鍵被改寫時 ORM 拒絕整批, 其他欄位則會被靜默改寫(存值與送入值不同), 兩者皆於此擋下, 使送入值即儲存值.
|
|
69
|
+
* 本函數為純函數: 不修改輸入、不呼叫 ORM; 主鍵是否必填由呼叫端以 opt.idRequired 指定(未給主鍵之列由 ORM 自動補主鍵者可不要求).
|
|
70
|
+
*
|
|
71
|
+
* @param {Array} rows 輸入待寫入之列陣列, 各列為物件
|
|
72
|
+
* @param {Object} [opt={}] 輸入設定物件
|
|
73
|
+
* @param {Boolean} [opt.idRequired=false] 輸入主鍵是否必填, 預設false
|
|
74
|
+
* @param {Array} [opt.rowsIdOnly=[]] 輸入只參與主鍵檢查(重複、長度)而不檢查欄位標記之列陣列(如整表儲存中不會被寫入之既有列), 預設[]
|
|
75
|
+
* @returns {Object|null} 回傳第一個違規 { reason, k, field }, reason 為 'idInvalid'、'idTooLong'、'idDuplicate'、'htmlMarkup' 之一, k 為該列於 rows 之位置(rowsIdOnly 之列為 -1), field 為欄位名; 皆通過回傳 null
|
|
76
|
+
*/
|
|
77
|
+
function validateRowsBeforeWrite(rows, opt = {}) {
|
|
78
|
+
|
|
79
|
+
//check
|
|
80
|
+
if (!isarr(rows)) {
|
|
81
|
+
return { reason: 'rowsInvalid', k: -1, field: '' }
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
//idRequired
|
|
85
|
+
let idRequired = get(opt, 'idRequired', false) === true
|
|
86
|
+
|
|
87
|
+
//rowsIdOnly
|
|
88
|
+
let rowsIdOnly = get(opt, 'rowsIdOnly', [])
|
|
89
|
+
if (!isarr(rowsIdOnly)) {
|
|
90
|
+
rowsIdOnly = []
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
//kpId, 無原型之查表容器: 主鍵為使用者資料, 一般物件之原型鍵(constructor、toString、__proto__)會被誤判為已存在(規則帳本 R-KEY-01)
|
|
94
|
+
let kpId = Object.create(null)
|
|
95
|
+
let checkId = (v, k) => {
|
|
96
|
+
let id = get(v, 'id')
|
|
97
|
+
//有給: 非空字串或有限數字; undefined、null、''、NaN、±Infinity 視為未給(w-serv-orm 1.1.11 對之補值, 2026-10-14 run05); 其他型別(布林、物件)為無效
|
|
98
|
+
let isNumId = typeof id === 'number'
|
|
99
|
+
let hasId = !(id === undefined || id === null || id === '' || (isNumId && !Number.isFinite(id)))
|
|
100
|
+
if (!hasId) {
|
|
101
|
+
return idRequired ? { reason: 'idInvalid', k, field: 'id' } : null
|
|
102
|
+
}
|
|
103
|
+
if (!isestr(id) && !isNumId) {
|
|
104
|
+
return { reason: 'idInvalid', k, field: 'id' }
|
|
105
|
+
}
|
|
106
|
+
let sid = String(id)
|
|
107
|
+
if (isestr(id) && Buffer.byteLength(id, 'utf8') > maxIdBytes) {
|
|
108
|
+
return { reason: 'idTooLong', k, field: 'id' }
|
|
109
|
+
}
|
|
110
|
+
if (kpId[sid] === true) {
|
|
111
|
+
return { reason: 'idDuplicate', k, field: 'id' }
|
|
112
|
+
}
|
|
113
|
+
kpId[sid] = true
|
|
114
|
+
return null
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
//主鍵: 待寫入之列與只參與主鍵檢查之列
|
|
118
|
+
let err = null
|
|
119
|
+
each(rows, (v, k) => {
|
|
120
|
+
err = checkId(v, k)
|
|
121
|
+
if (err !== null) {
|
|
122
|
+
return false //跳出
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
if (err !== null) {
|
|
126
|
+
return err
|
|
127
|
+
}
|
|
128
|
+
each(rowsIdOnly, (v) => {
|
|
129
|
+
err = checkId(v, -1)
|
|
130
|
+
if (err !== null) {
|
|
131
|
+
return false //跳出
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
if (err !== null) {
|
|
135
|
+
return err
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//欄位標記: 只檢查待寫入之列之字串欄位
|
|
139
|
+
each(rows, (v, k) => {
|
|
140
|
+
if (!iseobj(v)) {
|
|
141
|
+
return true //跳出換下一個
|
|
142
|
+
}
|
|
143
|
+
each(v, (vv, kk) => {
|
|
144
|
+
if (isestr(vv) && clearXSS(vv) !== vv) {
|
|
145
|
+
err = { reason: 'htmlMarkup', k, field: kk }
|
|
146
|
+
return false //跳出
|
|
147
|
+
}
|
|
148
|
+
})
|
|
149
|
+
if (err !== null) {
|
|
150
|
+
return false //跳出
|
|
151
|
+
}
|
|
152
|
+
})
|
|
153
|
+
|
|
154
|
+
return err
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
export { maxIdBytes }
|
|
159
|
+
export default validateRowsBeforeWrite
|
|
160
|
+
</code></pre>
|
|
161
|
+
</article>
|
|
162
|
+
</section>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
<br class="clear">
|
|
172
|
+
|
|
173
|
+
<footer>
|
|
174
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 13:07:24 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
175
|
+
</footer>
|
|
176
|
+
|
|
177
|
+
<script>prettyPrint();</script>
|
|
178
|
+
<script src="scripts/polyfill.js"></script>
|
|
179
|
+
<script src="scripts/linenumber.js"></script>
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
</body>
|
|
184
|
+
</html>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createAuthorizeExec">createAuthorizeExec</a></li><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#resolveShellWorker">resolveShellWorker</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#validateRowsBeforeWrite">validateRowsBeforeWrite</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li><li><a href="global.html#wrapOperOrm">wrapOperOrm</a></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -150,7 +150,7 @@ export default wrapInjected
|
|
|
150
150
|
<br class="clear">
|
|
151
151
|
|
|
152
152
|
<footer>
|
|
153
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on
|
|
153
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 13:07:24 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
154
154
|
</footer>
|
|
155
155
|
|
|
156
156
|
<script>prettyPrint();</script>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createAuthorizeExec">createAuthorizeExec</a></li><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#resolveShellWorker">resolveShellWorker</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#validateRowsBeforeWrite">validateRowsBeforeWrite</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li><li><a href="global.html#wrapOperOrm">wrapOperOrm</a></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -126,7 +126,7 @@ export default fetchJson
|
|
|
126
126
|
<br class="clear">
|
|
127
127
|
|
|
128
128
|
<footer>
|
|
129
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on
|
|
129
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 13:07:24 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
130
130
|
</footer>
|
|
131
131
|
|
|
132
132
|
<script>prettyPrint();</script>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createAuthorizeExec">createAuthorizeExec</a></li><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#resolveShellWorker">resolveShellWorker</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#validateRowsBeforeWrite">validateRowsBeforeWrite</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li><li><a href="global.html#wrapOperOrm">wrapOperOrm</a></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -212,7 +212,7 @@ export {
|
|
|
212
212
|
<br class="clear">
|
|
213
213
|
|
|
214
214
|
<footer>
|
|
215
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on
|
|
215
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 13:07:24 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
216
216
|
</footer>
|
|
217
217
|
|
|
218
218
|
<script>prettyPrint();</script>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createAuthorizeExec">createAuthorizeExec</a></li><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#resolveShellWorker">resolveShellWorker</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#validateRowsBeforeWrite">validateRowsBeforeWrite</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li><li><a href="global.html#wrapOperOrm">wrapOperOrm</a></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -123,7 +123,7 @@ export default reuseDeletedIds
|
|
|
123
123
|
<br class="clear">
|
|
124
124
|
|
|
125
125
|
<footer>
|
|
126
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on
|
|
126
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 13:07:24 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
127
127
|
</footer>
|
|
128
128
|
|
|
129
129
|
<script>prettyPrint();</script>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createAuthorizeExec">createAuthorizeExec</a></li><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#resolveShellWorker">resolveShellWorker</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#validateRowsBeforeWrite">validateRowsBeforeWrite</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li><li><a href="global.html#wrapOperOrm">wrapOperOrm</a></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -150,7 +150,7 @@ export default submitGuard
|
|
|
150
150
|
<br class="clear">
|
|
151
151
|
|
|
152
152
|
<footer>
|
|
153
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on
|
|
153
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 13:07:24 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
154
154
|
</footer>
|
|
155
155
|
|
|
156
156
|
<script>prettyPrint();</script>
|
package/g_backupDb.mjs
CHANGED
|
@@ -3,6 +3,10 @@ import getDb from 'w-serv-orm/src/getDb.mjs'
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
getDb.backup(woItems)
|
|
6
|
+
.catch((err) => {
|
|
7
|
+
console.log('backupDb catch', err)
|
|
8
|
+
process.exitCode = 1 //失敗以非 0 離開碼表達(規則帳本 R-SEED-01、R-ERR-01: 未 await 之 promise 於源頭 catch)
|
|
9
|
+
})
|
|
6
10
|
// getDb.recover(woItems, './ooo.json')
|
|
7
11
|
|
|
8
12
|
|
package/g_initialData.mjs
CHANGED
package/g_initialTestData.mjs
CHANGED
package/g_mOrm.mjs
CHANGED
|
@@ -11,13 +11,8 @@ let st = getSettings()
|
|
|
11
11
|
let url = st.dbUrl
|
|
12
12
|
let db = st.dbName
|
|
13
13
|
|
|
14
|
-
//WServOrm
|
|
15
|
-
let
|
|
16
|
-
getUserById: null,
|
|
17
|
-
useCheckUser: false,
|
|
18
|
-
useExcludeWhenNotAdmin: false,
|
|
19
|
-
}
|
|
20
|
-
let r = WServOrm(ds, WOrm, url, db, opt)
|
|
14
|
+
//WServOrm, w-serv-orm 1.1.10 起無設定鍵(原 getUserById / useCheckUser / useExcludeWhenNotAdmin 已移除, 給值即拋錯; ADR-026)
|
|
15
|
+
let r = WServOrm(ds, WOrm, url, db)
|
|
21
16
|
let { woItems, procOrm } = r
|
|
22
17
|
|
|
23
18
|
|
package/g_provideGrups.mjs
CHANGED
package/g_providePemis.mjs
CHANGED
package/g_provideTargets.mjs
CHANGED
package/g_provideUsers.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "w-web-perm",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"main": "dist/w-web-perm.umd.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"json5": "^2.2.3",
|
|
7
7
|
"w-aggrid-vue": "^2.1.8",
|
|
8
|
-
"w-component-vue": "^2.5.
|
|
9
|
-
"w-data-collector": "^1.0.
|
|
8
|
+
"w-component-vue": "^2.5.29",
|
|
9
|
+
"w-data-collector": "^1.0.46",
|
|
10
10
|
"w-echarts-vue": "^1.0.18",
|
|
11
|
-
"w-serv-hapi": "^1.1.
|
|
12
|
-
"w-serv-orm": "^1.1.
|
|
13
|
-
"w-syslog": "^1.0.
|
|
14
|
-
"w-ui-loginout": "^1.0.
|
|
15
|
-
"wsemi": "^1.9.
|
|
11
|
+
"w-serv-hapi": "^1.1.6",
|
|
12
|
+
"w-serv-orm": "^1.1.11",
|
|
13
|
+
"w-syslog": "^1.0.33",
|
|
14
|
+
"w-ui-loginout": "^1.0.32",
|
|
15
|
+
"wsemi": "^1.9.16"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@vue/cli-plugin-babel": "^5.0.8",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"eslint-plugin-vue": "^9.10.0",
|
|
28
28
|
"vue": "^2.7.16",
|
|
29
29
|
"vuex": "^3.6.2",
|
|
30
|
-
"w-orm-lmdb": "^1.0.
|
|
31
|
-
"w-package-tools": "^1.1.
|
|
30
|
+
"w-orm-lmdb": "^1.0.39",
|
|
31
|
+
"w-package-tools": "^1.1.18",
|
|
32
32
|
"w-package-tools-e2e": "^1.0.6",
|
|
33
33
|
"w-screenctl": "^1.0.25"
|
|
34
34
|
},
|