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 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
@@ -1,5 +1,4 @@
1
1
  import 'reflect-metadata';
2
- export * from './enum.js';
3
2
  export * from './error.js';
4
3
  export * from './fn.js';
5
4
  export * from './list.js';
package/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import 'reflect-metadata';
2
- export * from './enum.js';
3
2
  export * from './error.js';
4
3
  export * from './fn.js';
5
4
  export * from './list.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baja-lite",
3
- "version": "1.3.29",
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.28",
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
@@ -1,2 +0,0 @@
1
- import { EnmuJson, EnumMap } from "baja-lite-field";
2
- export declare const getEnums: (GlobalValues?: EnumMap) => EnmuJson;
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
- };