w-web-api 1.0.51 → 1.0.53
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/_gh-pages-deploy/.nojekyll +0 -0
- package/_gh-pages-deploy/WWebApi.html +898 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/_gh-pages-deploy/index.html +84 -0
- package/_gh-pages-deploy/scripts/collapse.js +39 -0
- package/_gh-pages-deploy/scripts/commonNav.js +28 -0
- package/_gh-pages-deploy/scripts/linenumber.js +25 -0
- package/_gh-pages-deploy/scripts/nav.js +12 -0
- package/_gh-pages-deploy/scripts/polyfill.js +4 -0
- package/_gh-pages-deploy/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/_gh-pages-deploy/scripts/prettify/lang-css.js +2 -0
- package/_gh-pages-deploy/scripts/prettify/prettify.js +28 -0
- package/_gh-pages-deploy/scripts/search.js +99 -0
- package/{docs/WWebApi.mjs.html → _gh-pages-deploy/server_WWebApi.mjs.html} +118 -41
- package/_gh-pages-deploy/src_components_Common_CheckYesNo.vue.html +187 -0
- package/_gh-pages-deploy/styles/jsdoc.css +776 -0
- package/_gh-pages-deploy/styles/prettify.css +80 -0
- package/dist/css/app.fe69497a.css +1 -0
- package/dist/index.tmp +4 -2
- package/dist/js/app-legacy.15819aa7.js +1 -0
- package/dist/js/app.15819aa7.js +1 -0
- package/dist/js/chunk-vendors-legacy.c1a32dd1.js +15 -0
- package/dist/js/chunk-vendors.c1a32dd1.js +15 -0
- package/dist/w-web-api.umd.js +2 -2
- package/dist/w-web-api.umd.js.map +1 -1
- package/docs/WWebApi.html +2 -2
- package/docs/index.html +1 -1
- package/docs/server_WWebApi.mjs.html +1012 -0
- package/docs/src_components_Common_CheckYesNo.vue.html +187 -0
- package/g.getSettings.mjs +3 -0
- package/package.json +15 -11
- package/public/index.html +9 -2
- package/server/WWebApi.mjs +115 -38
- package/server/procApis.mjs +62 -0
- package/server/procLang.mjs +724 -0
- package/server/procProxy.mjs +120 -0
- package/server/srLog.mjs +30 -0
- package/server/staLogs/staEvent.mjs +129 -0
- package/server/staLogs/test_staEvent.mjs +132 -0
- package/settings.json +14 -0
- package/src/App.vue +11 -7
- package/src/assets/scalar-ui.css +113 -0
- package/src/components/Common/CheckYes.vue +102 -0
- package/src/components/Common/CheckYesNo.vue +115 -0
- package/src/components/Common/LoadingWinBar.vue +114 -0
- package/src/components/Layout.vue +33 -7
- package/src/components/LayoutContent.vue +308 -333
- package/src/components/LayoutContentEdit.vue +577 -0
- package/src/components/LayoutContentStats.vue +485 -0
- package/src/components/LayoutContentTest.vue +799 -0
- package/src/components/MdPanel.vue +80 -58
- package/src/main.js +8 -0
- package/src/plugins/mUI.mjs +58 -71
- package/src/schema/tables/apis.mjs +30 -0
- package/src/store/mutations.mjs +1 -1
- package/srv.mjs +47 -19
- package/tableTags.json +1 -1
- package/.github/workflows/ci-test.yml +0 -24
- package/.vscode/launch.json +0 -18
- package/db/wapis/apis/data.mdb +0 -0
- package/db/wapis/apis/lock.mdb +0 -0
- package/dist/css/app.b5cf2ef5.css +0 -1
- package/dist/js/app-legacy.fbfba810.js +0 -1
- package/dist/js/app.fbfba810.js +0 -1
- package/dist/js/chunk-vendors-legacy.735ec7d6.js +0 -13
- package/dist/js/chunk-vendors.735ec7d6.js +0 -13
- package/src/plugins/mLang.mjs +0 -250
- package/tableTags-web-api.json +0 -1
- package/test/all.test.mjs +0 -10
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import iseobj from 'wsemi/src/iseobj.mjs'
|
|
2
|
+
import isestr from 'wsemi/src/isestr.mjs'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
function procApis(deps = {}) {
|
|
6
|
+
|
|
7
|
+
//deps
|
|
8
|
+
let { woItems, procOrm, ds } = deps
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
let getApisList = async (userId) => {
|
|
12
|
+
return await woItems.apis.select({})
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
let saveApi = async (userId, row) => {
|
|
17
|
+
|
|
18
|
+
//check(reject err-key,由前端依 lang 反查顯示;邊界 kpFunExt 會 srLog 此 key)
|
|
19
|
+
if (!iseobj(row)) {
|
|
20
|
+
return Promise.reject('errApiRowInvalid')
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//正規化:funNew 配 id/時間/預設並過濾欄位
|
|
24
|
+
let o = ds.apis.funNew(row)
|
|
25
|
+
|
|
26
|
+
//保留原 id 與創建時間(既有筆)
|
|
27
|
+
if (isestr(row.id)) {
|
|
28
|
+
o.id = row.id
|
|
29
|
+
if (isestr(row.timeCreate)) {
|
|
30
|
+
o.timeCreate = row.timeCreate
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//save
|
|
35
|
+
let r = await procOrm(userId, 'apis', 'save', [o])
|
|
36
|
+
|
|
37
|
+
return r
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
let deleteApi = async (userId, id) => {
|
|
42
|
+
|
|
43
|
+
//check(reject err-key,由前端依 lang 反查顯示)
|
|
44
|
+
if (!isestr(id)) {
|
|
45
|
+
return Promise.reject('errApiIdInvalid')
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
let r = await procOrm(userId, 'apis', 'del', { id })
|
|
49
|
+
|
|
50
|
+
return r
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
getApisList,
|
|
56
|
+
saveApi,
|
|
57
|
+
deleteApi,
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
export default procApis
|