baja-lite 1.3.29 → 1.3.30
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/boot-remote.js +1 -2
- package/boot.js +1 -2
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/package.json +2 -2
- package/enum.d.ts +0 -2
- package/enum.js +0 -31
package/boot-remote.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { DBType, _Hump } from 'baja-lite-field';
|
|
2
|
-
import { getEnums } from './enum.js';
|
|
1
|
+
import { DBType, _Hump, getEnums } from 'baja-lite-field';
|
|
3
2
|
import { ColumnMode, SqlCache, SqliteRemote, _GlobalSqlOption, _dao, _defOption, _enums, _primaryDB, _sqlCache, logger } from './sql.js';
|
|
4
3
|
export const BootRomote = async function (options) {
|
|
5
4
|
globalThis[_GlobalSqlOption] = Object.assign({}, _defOption, options);
|
package/boot.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { _Hump, DBType } from 'baja-lite-field';
|
|
2
|
-
import { getEnums } from './enum.js';
|
|
1
|
+
import { _Hump, DBType, getEnums } from 'baja-lite-field';
|
|
3
2
|
import { _dao, _defOption, _enums, _EventBus, _fs, _GlobalSqlOption, _path, _primaryDB, _sqlCache, ColumnMode, logger, Mysql, Postgresql, SqlCache, Sqlite, SqliteRemote } from './sql.js';
|
|
4
3
|
export const Boot = async function (options) {
|
|
5
4
|
globalThis[_GlobalSqlOption] = Object.assign({}, _defOption, options);
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baja-lite",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.30",
|
|
4
4
|
"description": "some util for self",
|
|
5
5
|
"homepage": "https://github.com/void-soul/util-man",
|
|
6
6
|
"repository": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@msgpack/msgpack": "3.1.1",
|
|
39
39
|
"@types/request-promise": "4.1.51",
|
|
40
40
|
"axios": "1.8.4",
|
|
41
|
-
"baja-lite-field": "1.3.
|
|
41
|
+
"baja-lite-field": "1.3.30",
|
|
42
42
|
"decimal.js": "10.5.0",
|
|
43
43
|
"html-parse-stringify": "3.0.1",
|
|
44
44
|
"iterare": "1.2.1",
|
package/enum.d.ts
DELETED
package/enum.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { _enums } from "./sql.js";
|
|
2
|
-
let configData = null;
|
|
3
|
-
export const getEnums = (GlobalValues) => {
|
|
4
|
-
if (!GlobalValues) {
|
|
5
|
-
return globalThis[_enums];
|
|
6
|
-
}
|
|
7
|
-
if (configData) {
|
|
8
|
-
return configData;
|
|
9
|
-
}
|
|
10
|
-
const result = {
|
|
11
|
-
GlobalArray: {},
|
|
12
|
-
GlobalMap: {}
|
|
13
|
-
};
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
15
|
-
Object.keys(GlobalValues).forEach((item) => {
|
|
16
|
-
// const guess = /([\w\W]+)_([^_]+)$/.exec(item);
|
|
17
|
-
const guess = item.replace(new RegExp(`_${GlobalValues[item].value()}`, 'i'), '');
|
|
18
|
-
if (guess) {
|
|
19
|
-
if (!result.GlobalArray[guess]) {
|
|
20
|
-
result.GlobalArray[guess] = [];
|
|
21
|
-
}
|
|
22
|
-
result.GlobalArray[guess].push([GlobalValues[item].value(), GlobalValues[item].desc()]);
|
|
23
|
-
if (!result.GlobalMap[guess]) {
|
|
24
|
-
result.GlobalMap[guess] = {};
|
|
25
|
-
}
|
|
26
|
-
result.GlobalMap[guess][GlobalValues[item].value()] = GlobalValues[item].desc();
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
configData = result;
|
|
30
|
-
return result;
|
|
31
|
-
};
|