vona 5.0.7 → 5.0.8
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/LICENSE +2 -15
- package/README.en-US.md +63 -0
- package/README.md +63 -1
- package/package.json +6 -77
- package/README.zh-CN.md +0 -1
- package/dist/app/extend/context.d.ts +0 -4
- package/dist/app/extend/context.js +0 -152
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -35
- package/dist/lib/base/dbTransaction.d.ts +0 -12
- package/dist/lib/base/dbTransaction.js +0 -55
- package/dist/lib/base/error.d.ts +0 -18
- package/dist/lib/base/error.js +0 -70
- package/dist/lib/base/model.d.ts +0 -22
- package/dist/lib/base/model.js +0 -253
- package/dist/lib/bean/_beanLocal_.d.ts +0 -6
- package/dist/lib/bean/_beanLocal_.js +0 -16
- package/dist/lib/bean/beanBase.d.ts +0 -11
- package/dist/lib/bean/beanBase.js +0 -34
- package/dist/lib/bean/beanBaseSimple.d.ts +0 -8
- package/dist/lib/bean/beanBaseSimple.js +0 -31
- package/dist/lib/bean/beanContainer.d.ts +0 -39
- package/dist/lib/bean/beanContainer.js +0 -516
- package/dist/lib/bean/beanLocal.d.ts +0 -6
- package/dist/lib/bean/beanLocal.js +0 -16
- package/dist/lib/bean/beanModuleScopeBase.d.ts +0 -10
- package/dist/lib/bean/beanModuleScopeBase.js +0 -28
- package/dist/lib/bean/beanScopeBase.d.ts +0 -6
- package/dist/lib/bean/beanScopeBase.js +0 -19
- package/dist/lib/bean/beanScopeScene.d.ts +0 -12
- package/dist/lib/bean/beanScopeScene.js +0 -23
- package/dist/lib/bean/beanSimple.d.ts +0 -7
- package/dist/lib/bean/beanSimple.js +0 -24
- package/dist/lib/bean/index.d.ts +0 -8
- package/dist/lib/bean/index.js +0 -24
- package/dist/lib/bean/resource/config/broadcast.d.ts +0 -7
- package/dist/lib/bean/resource/config/broadcast.js +0 -3
- package/dist/lib/bean/resource/config/index.d.ts +0 -2
- package/dist/lib/bean/resource/config/index.js +0 -18
- package/dist/lib/bean/resource/config/middleware.d.ts +0 -9
- package/dist/lib/bean/resource/config/middleware.js +0 -3
- package/dist/lib/bean/resource/config/startup.d.ts +0 -9
- package/dist/lib/bean/resource/config/startup.js +0 -3
- package/dist/lib/bean/resource/config/type.d.ts +0 -43
- package/dist/lib/bean/resource/config/type.js +0 -3
- package/dist/lib/bean/resource/constant/index.d.ts +0 -2
- package/dist/lib/bean/resource/constant/index.js +0 -18
- package/dist/lib/bean/resource/constant/type.d.ts +0 -2
- package/dist/lib/bean/resource/constant/type.js +0 -3
- package/dist/lib/bean/resource/entity/entityBase.d.ts +0 -18
- package/dist/lib/bean/resource/entity/entityBase.js +0 -20
- package/dist/lib/bean/resource/entity/index.d.ts +0 -2
- package/dist/lib/bean/resource/entity/index.js +0 -18
- package/dist/lib/bean/resource/entity/type.d.ts +0 -4
- package/dist/lib/bean/resource/entity/type.js +0 -3
- package/dist/lib/bean/resource/error/beanScopeError.d.ts +0 -11
- package/dist/lib/bean/resource/error/beanScopeError.js +0 -34
- package/dist/lib/bean/resource/error/beanScopeErrorImpl.d.ts +0 -14
- package/dist/lib/bean/resource/error/beanScopeErrorImpl.js +0 -35
- package/dist/lib/bean/resource/error/errorClass.d.ts +0 -18
- package/dist/lib/bean/resource/error/errorClass.js +0 -78
- package/dist/lib/bean/resource/error/errorContext.d.ts +0 -38
- package/dist/lib/bean/resource/error/errorContext.js +0 -3
- package/dist/lib/bean/resource/error/errorGlobal.d.ts +0 -8
- package/dist/lib/bean/resource/error/errorGlobal.js +0 -3
- package/dist/lib/bean/resource/error/errorInternal.d.ts +0 -67
- package/dist/lib/bean/resource/error/errorInternal.js +0 -70
- package/dist/lib/bean/resource/error/errorObject.d.ts +0 -5
- package/dist/lib/bean/resource/error/errorObject.js +0 -3
- package/dist/lib/bean/resource/error/index.d.ts +0 -9
- package/dist/lib/bean/resource/error/index.js +0 -25
- package/dist/lib/bean/resource/error/type.d.ts +0 -9
- package/dist/lib/bean/resource/error/type.js +0 -3
- package/dist/lib/bean/resource/index.d.ts +0 -8
- package/dist/lib/bean/resource/index.js +0 -24
- package/dist/lib/bean/resource/locale/beanScopeLocale.d.ts +0 -11
- package/dist/lib/bean/resource/locale/beanScopeLocale.js +0 -33
- package/dist/lib/bean/resource/locale/beanScopeLocaleImpl.d.ts +0 -3
- package/dist/lib/bean/resource/locale/beanScopeLocaleImpl.js +0 -14
- package/dist/lib/bean/resource/locale/index.d.ts +0 -4
- package/dist/lib/bean/resource/locale/index.js +0 -20
- package/dist/lib/bean/resource/locale/localeCtx.d.ts +0 -8
- package/dist/lib/bean/resource/locale/localeCtx.js +0 -63
- package/dist/lib/bean/resource/locale/type.d.ts +0 -19
- package/dist/lib/bean/resource/locale/type.js +0 -3
- package/dist/lib/bean/resource/model/beanModelBase.d.ts +0 -24
- package/dist/lib/bean/resource/model/beanModelBase.js +0 -165
- package/dist/lib/bean/resource/model/beanModelBaseInner.d.ts +0 -29
- package/dist/lib/bean/resource/model/beanModelBaseInner.js +0 -86
- package/dist/lib/bean/resource/model/index.d.ts +0 -2
- package/dist/lib/bean/resource/model/index.js +0 -18
- package/dist/lib/bean/resource/model/type.d.ts +0 -14
- package/dist/lib/bean/resource/model/type.js +0 -3
- package/dist/lib/bean/resource/route/index.d.ts +0 -2
- package/dist/lib/bean/resource/route/index.js +0 -18
- package/dist/lib/bean/resource/route/type.d.ts +0 -60
- package/dist/lib/bean/resource/route/type.js +0 -3
- package/dist/lib/bean/scope/beanScopeBase.d.ts +0 -19
- package/dist/lib/bean/scope/beanScopeBase.js +0 -104
- package/dist/lib/bean/scope/beanScopeBean.d.ts +0 -10
- package/dist/lib/bean/scope/beanScopeBean.js +0 -34
- package/dist/lib/bean/scope/beanScopeError.d.ts +0 -11
- package/dist/lib/bean/scope/beanScopeError.js +0 -21
- package/dist/lib/bean/scope/beanScopeErrorImpl.d.ts +0 -14
- package/dist/lib/bean/scope/beanScopeErrorImpl.js +0 -21
- package/dist/lib/bean/scope/beanScopeScene.d.ts +0 -12
- package/dist/lib/bean/scope/beanScopeScene.js +0 -42
- package/dist/lib/bean/scope/index.d.ts +0 -5
- package/dist/lib/bean/scope/index.js +0 -21
- package/dist/lib/bean/scope/type.d.ts +0 -21
- package/dist/lib/bean/scope/type.js +0 -3
- package/dist/lib/bean/type.d.ts +0 -17
- package/dist/lib/bean/type.js +0 -4
- package/dist/lib/core/index.d.ts +0 -5
- package/dist/lib/core/index.js +0 -21
- package/dist/lib/core/meta.d.ts +0 -68
- package/dist/lib/core/meta.js +0 -345
- package/dist/lib/core/metaCtx.d.ts +0 -16
- package/dist/lib/core/metaCtx.js +0 -71
- package/dist/lib/core/metadata.d.ts +0 -12
- package/dist/lib/core/metadata.js +0 -52
- package/dist/lib/core/resource.d.ts +0 -29
- package/dist/lib/core/resource.js +0 -173
- package/dist/lib/decorator/class/aop.d.ts +0 -3
- package/dist/lib/decorator/class/aop.js +0 -22
- package/dist/lib/decorator/class/atom.d.ts +0 -2
- package/dist/lib/decorator/class/atom.js +0 -20
- package/dist/lib/decorator/class/bean.d.ts +0 -3
- package/dist/lib/decorator/class/bean.js +0 -23
- package/dist/lib/decorator/class/controller.d.ts +0 -2
- package/dist/lib/decorator/class/controller.js +0 -20
- package/dist/lib/decorator/class/entity.d.ts +0 -4
- package/dist/lib/decorator/class/entity.js +0 -33
- package/dist/lib/decorator/class/index.d.ts +0 -11
- package/dist/lib/decorator/class/index.js +0 -27
- package/dist/lib/decorator/class/local.d.ts +0 -3
- package/dist/lib/decorator/class/local.js +0 -23
- package/dist/lib/decorator/class/model.d.ts +0 -3
- package/dist/lib/decorator/class/model.js +0 -21
- package/dist/lib/decorator/class/scope.d.ts +0 -2
- package/dist/lib/decorator/class/scope.js +0 -20
- package/dist/lib/decorator/class/service.d.ts +0 -2
- package/dist/lib/decorator/class/service.js +0 -20
- package/dist/lib/decorator/class/use.d.ts +0 -5
- package/dist/lib/decorator/class/use.js +0 -43
- package/dist/lib/decorator/class/util.d.ts +0 -3
- package/dist/lib/decorator/class/util.js +0 -10
- package/dist/lib/decorator/class/virtual.d.ts +0 -3
- package/dist/lib/decorator/class/virtual.js +0 -24
- package/dist/lib/decorator/index.d.ts +0 -7
- package/dist/lib/decorator/index.js +0 -23
- package/dist/lib/decorator/interface/beanOptions.d.ts +0 -44
- package/dist/lib/decorator/interface/beanOptions.js +0 -8
- package/dist/lib/decorator/interface/useOptions.d.ts +0 -14
- package/dist/lib/decorator/interface/useOptions.js +0 -3
- package/dist/lib/decorator/type/constructable.d.ts +0 -2
- package/dist/lib/decorator/type/constructable.js +0 -3
- package/dist/lib/decorator/type/containerScope.d.ts +0 -2
- package/dist/lib/decorator/type/containerScope.js +0 -3
- package/dist/lib/decorator/type/injectionScope.d.ts +0 -2
- package/dist/lib/decorator/type/injectionScope.js +0 -3
- package/dist/lib/error/error.d.ts +0 -18
- package/dist/lib/error/error.js +0 -71
- package/dist/lib/error/errorClass.d.ts +0 -18
- package/dist/lib/error/errorClass.js +0 -72
- package/dist/lib/error/errorContext.d.ts +0 -38
- package/dist/lib/error/errorContext.js +0 -3
- package/dist/lib/error/errorGlobal.d.ts +0 -8
- package/dist/lib/error/errorGlobal.js +0 -3
- package/dist/lib/error/errorInternal.d.ts +0 -67
- package/dist/lib/error/errorInternal.js +0 -70
- package/dist/lib/error/errorObject.d.ts +0 -5
- package/dist/lib/error/errorObject.js +0 -3
- package/dist/lib/error/index.d.ts +0 -5
- package/dist/lib/error/index.js +0 -21
- package/dist/lib/framework/bootstrap.d.ts +0 -9
- package/dist/lib/framework/bootstrap.js +0 -35
- package/dist/lib/framework/framework.d.ts +0 -11
- package/dist/lib/framework/framework.js +0 -28
- package/dist/lib/framework/loader.d.ts +0 -24
- package/dist/lib/framework/loader.js +0 -69
- package/dist/lib/framework/meta.d.ts +0 -2
- package/dist/lib/framework/meta.js +0 -23
- package/dist/lib/framework/metaClass.d.ts +0 -2
- package/dist/lib/framework/metaClass.js +0 -26
- package/dist/lib/framework/moduleInfo.d.ts +0 -3
- package/dist/lib/framework/moduleInfo.js +0 -67
- package/dist/lib/framework/util.d.ts +0 -4
- package/dist/lib/framework/util.js +0 -15
- package/dist/lib/module/asset/errors.d.ts +0 -68
- package/dist/lib/module/asset/errors.js +0 -69
- package/dist/lib/module/bean/index.d.ts +0 -4
- package/dist/lib/module/bean/index.js +0 -24
- package/dist/lib/module/broadcast/broadcast.d.ts +0 -3
- package/dist/lib/module/broadcast/broadcast.js +0 -49
- package/dist/lib/module/broadcast/broadcastClient.d.ts +0 -24
- package/dist/lib/module/broadcast/broadcastClient.js +0 -91
- package/dist/lib/module/cluster/agent.d.ts +0 -3
- package/dist/lib/module/cluster/agent.js +0 -22
- package/dist/lib/module/cluster/app.d.ts +0 -3
- package/dist/lib/module/cluster/app.js +0 -26
- package/dist/lib/module/config.d.ts +0 -3
- package/dist/lib/module/config.js +0 -67
- package/dist/lib/module/constant.d.ts +0 -3
- package/dist/lib/module/constant.js +0 -46
- package/dist/lib/module/contextPatch.d.ts +0 -3
- package/dist/lib/module/contextPatch.js +0 -16
- package/dist/lib/module/errors.d.ts +0 -3
- package/dist/lib/module/errors.js +0 -49
- package/dist/lib/module/index.d.ts +0 -2
- package/dist/lib/module/index.js +0 -3
- package/dist/lib/module/loader.d.ts +0 -5
- package/dist/lib/module/loader.js +0 -73
- package/dist/lib/module/locales.d.ts +0 -3
- package/dist/lib/module/locales.js +0 -132
- package/dist/lib/module/messenger.d.ts +0 -25
- package/dist/lib/module/messenger.js +0 -128
- package/dist/lib/module/middleware.d.ts +0 -3
- package/dist/lib/module/middleware.js +0 -113
- package/dist/lib/module/model.d.ts +0 -3
- package/dist/lib/module/model.js +0 -47
- package/dist/lib/module/module.d.ts +0 -12
- package/dist/lib/module/module.js +0 -135
- package/dist/lib/module/moduleMeta.d.ts +0 -3
- package/dist/lib/module/moduleMeta.js +0 -23
- package/dist/lib/module/queue/queue.d.ts +0 -3
- package/dist/lib/module/queue/queue.js +0 -59
- package/dist/lib/module/queue/queueClient.d.ts +0 -26
- package/dist/lib/module/queue/queueClient.js +0 -262
- package/dist/lib/module/redis.d.ts +0 -11
- package/dist/lib/module/redis.js +0 -46
- package/dist/lib/module/reload/development.d.ts +0 -3
- package/dist/lib/module/reload/development.js +0 -98
- package/dist/lib/module/reload/reload.d.ts +0 -16
- package/dist/lib/module/reload/reload.js +0 -113
- package/dist/lib/module/reload.d.ts +0 -7
- package/dist/lib/module/reload.js +0 -17
- package/dist/lib/module/route.d.ts +0 -10
- package/dist/lib/module/route.js +0 -239
- package/dist/lib/module/schedule.d.ts +0 -3
- package/dist/lib/module/schedule.js +0 -129
- package/dist/lib/module/service.d.ts +0 -3
- package/dist/lib/module/service.js +0 -35
- package/dist/lib/module/socketio.d.ts +0 -5
- package/dist/lib/module/socketio.js +0 -47
- package/dist/lib/module/startup.d.ts +0 -2
- package/dist/lib/module/startup.js +0 -134
- package/dist/lib/module/version/clear.d.ts +0 -2
- package/dist/lib/module/version/clear.js +0 -42
- package/dist/lib/module/version/ready.d.ts +0 -6
- package/dist/lib/module/version/ready.js +0 -106
- package/dist/lib/resource/error/errorClass.d.ts +0 -18
- package/dist/lib/resource/error/errorClass.js +0 -72
- package/dist/lib/resource/error/errorContext.d.ts +0 -38
- package/dist/lib/resource/error/errorContext.js +0 -3
- package/dist/lib/resource/error/errorGlobal.d.ts +0 -8
- package/dist/lib/resource/error/errorGlobal.js +0 -3
- package/dist/lib/resource/error/errorInternal.d.ts +0 -67
- package/dist/lib/resource/error/errorInternal.js +0 -70
- package/dist/lib/resource/error/errorObject.d.ts +0 -5
- package/dist/lib/resource/error/errorObject.js +0 -3
- package/dist/lib/resource/error/index.d.ts +0 -5
- package/dist/lib/resource/error/index.js +0 -21
- package/dist/lib/utils/index.d.ts +0 -2
- package/dist/lib/utils/index.js +0 -18
- package/dist/lib/utils/isClass.d.ts +0 -2
- package/dist/lib/utils/isClass.js +0 -20
- package/dist/lib/utils/mockUtil.d.ts +0 -11
- package/dist/lib/utils/mockUtil.js +0 -34
- package/dist/lib/utils/mockUtilCtx.d.ts +0 -10
- package/dist/lib/utils/mockUtilCtx.js +0 -35
- package/dist/lib/utils/performAction.d.ts +0 -19
- package/dist/lib/utils/performAction.js +0 -137
- package/dist/lib/utils/util.d.ts +0 -63
- package/dist/lib/utils/util.js +0 -445
- package/dist/lib/utils/utilCtx.d.ts +0 -34
- package/dist/lib/utils/utilCtx.js +0 -137
- package/dist/types/application/app.d.ts +0 -21
- package/dist/types/application/app.js +0 -28
- package/dist/types/application/index.d.ts +0 -2
- package/dist/types/application/index.js +0 -18
- package/dist/types/config/appInfo.d.ts +0 -4
- package/dist/types/config/appInfo.js +0 -3
- package/dist/types/config/config.d.ts +0 -10
- package/dist/types/config/config.js +0 -3
- package/dist/types/config/development.d.ts +0 -4
- package/dist/types/config/development.js +0 -3
- package/dist/types/config/index.d.ts +0 -4
- package/dist/types/config/index.js +0 -20
- package/dist/types/config/locale.d.ts +0 -10
- package/dist/types/config/locale.js +0 -7
- package/dist/types/context/contextBase.d.ts +0 -21
- package/dist/types/context/contextBase.js +0 -3
- package/dist/types/context/contextConfig.d.ts +0 -4
- package/dist/types/context/contextConfig.js +0 -3
- package/dist/types/context/contextError.d.ts +0 -25
- package/dist/types/context/contextError.js +0 -3
- package/dist/types/context/contextLocale.d.ts +0 -9
- package/dist/types/context/contextLocale.js +0 -3
- package/dist/types/context/contextOthers.d.ts +0 -4
- package/dist/types/context/contextOthers.js +0 -3
- package/dist/types/context/contextState.d.ts +0 -8
- package/dist/types/context/contextState.js +0 -3
- package/dist/types/context/index.d.ts +0 -18
- package/dist/types/context/index.js +0 -18
- package/dist/types/enum/appEvent.d.ts +0 -5
- package/dist/types/enum/appEvent.js +0 -9
- package/dist/types/enum/index.d.ts +0 -2
- package/dist/types/enum/index.js +0 -18
- package/dist/types/index.d.ts +0 -7
- package/dist/types/index.js +0 -23
- package/dist/types/interface/broadcast.d.ts +0 -5
- package/dist/types/interface/broadcast.js +0 -3
- package/dist/types/interface/error.d.ts +0 -8
- package/dist/types/interface/error.js +0 -3
- package/dist/types/interface/index.d.ts +0 -6
- package/dist/types/interface/index.js +0 -22
- package/dist/types/interface/module.d.ts +0 -32
- package/dist/types/interface/module.js +0 -18
- package/dist/types/interface/monkey.d.ts +0 -22
- package/dist/types/interface/monkey.js +0 -3
- package/dist/types/interface/queue.d.ts +0 -29
- package/dist/types/interface/queue.js +0 -3
- package/dist/types/interface/schedule.d.ts +0 -11
- package/dist/types/interface/schedule.js +0 -3
- package/dist/types/utils/cast.d.ts +0 -6
- package/dist/types/utils/cast.js +0 -8
- package/dist/types/utils/index.d.ts +0 -4
- package/dist/types/utils/index.js +0 -20
- package/dist/types/utils/powerPartial.d.ts +0 -4
- package/dist/types/utils/powerPartial.js +0 -3
- package/dist/types/utils/type.d.ts +0 -4
- package/dist/types/utils/type.js +0 -3
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './beanScopeError.js';
|
|
2
|
-
export * from './beanScopeErrorImpl.js';
|
|
3
|
-
export * from './errorClass.js';
|
|
4
|
-
export * from './errorContext.js';
|
|
5
|
-
export * from './errorGlobal.js';
|
|
6
|
-
export * from './errorInternal.js';
|
|
7
|
-
export * from './errorObject.js';
|
|
8
|
-
export * from './type.js';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./beanScopeError.js"), exports);
|
|
18
|
-
__exportStar(require("./beanScopeErrorImpl.js"), exports);
|
|
19
|
-
__exportStar(require("./errorClass.js"), exports);
|
|
20
|
-
__exportStar(require("./errorContext.js"), exports);
|
|
21
|
-
__exportStar(require("./errorGlobal.js"), exports);
|
|
22
|
-
__exportStar(require("./errorInternal.js"), exports);
|
|
23
|
-
__exportStar(require("./errorObject.js"), exports);
|
|
24
|
-
__exportStar(require("./type.js"), exports);
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IErrorObject } from './errorObject.js';
|
|
2
|
-
export interface IModuleError {
|
|
3
|
-
throw(...args: any[]): never;
|
|
4
|
-
parseFail(...args: any[]): IErrorObject;
|
|
5
|
-
}
|
|
6
|
-
export type TypeModuleErrors<T> = {
|
|
7
|
-
[prop in string & keyof T]: IModuleError;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './config/index.js';
|
|
2
|
-
export * from './constant/index.js';
|
|
3
|
-
export * from './entity/index.js';
|
|
4
|
-
export * from './error/index.js';
|
|
5
|
-
export * from './locale/index.js';
|
|
6
|
-
export * from './model/index.js';
|
|
7
|
-
export * from './route/index.js';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./config/index.js"), exports);
|
|
18
|
-
__exportStar(require("./constant/index.js"), exports);
|
|
19
|
-
__exportStar(require("./entity/index.js"), exports);
|
|
20
|
-
__exportStar(require("./error/index.js"), exports);
|
|
21
|
-
__exportStar(require("./locale/index.js"), exports);
|
|
22
|
-
__exportStar(require("./model/index.js"), exports);
|
|
23
|
-
__exportStar(require("./route/index.js"), exports);
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IModuleLocale } from './type.js';
|
|
2
|
-
import { BeanSimple } from '../../beanSimple.js';
|
|
3
|
-
declare const BeanModuleScope: unique symbol;
|
|
4
|
-
export declare class BeanScopeLocale extends BeanSimple {
|
|
5
|
-
private [BeanModuleScope];
|
|
6
|
-
private __instances;
|
|
7
|
-
constructor(moduleScope: any);
|
|
8
|
-
protected __get__(prop: string): IModuleLocale;
|
|
9
|
-
}
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=beanScopeLocale.d.ts.map
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.BeanScopeLocale = void 0;
|
|
5
|
-
const beanSimple_js_1 = require("../../beanSimple.js");
|
|
6
|
-
const BeanModuleScope = Symbol('BeanScopeLocale#ModuleScope');
|
|
7
|
-
class BeanScopeLocale extends beanSimple_js_1.BeanSimple {
|
|
8
|
-
constructor(moduleScope) {
|
|
9
|
-
super();
|
|
10
|
-
Object.defineProperty(this, _a, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
configurable: true,
|
|
13
|
-
writable: true,
|
|
14
|
-
value: void 0
|
|
15
|
-
});
|
|
16
|
-
Object.defineProperty(this, "__instances", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: {}
|
|
21
|
-
});
|
|
22
|
-
this[BeanModuleScope] = moduleScope;
|
|
23
|
-
}
|
|
24
|
-
__get__(prop) {
|
|
25
|
-
if (!this.__instances[prop]) {
|
|
26
|
-
this.__instances[prop] = this.ctx.meta.locale.createScopeLocaleText(this[BeanModuleScope], prop);
|
|
27
|
-
}
|
|
28
|
-
return this.__instances[prop];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.BeanScopeLocale = BeanScopeLocale;
|
|
32
|
-
_a = BeanModuleScope;
|
|
33
|
-
//# sourceMappingURL=beanScopeLocale.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BeanScopeLocaleImpl = void 0;
|
|
4
|
-
function BeanScopeLocaleImpl(ctx, moduleScope, text) {
|
|
5
|
-
const getText = function (...args) {
|
|
6
|
-
return ctx.textModule(moduleScope, text, ...args);
|
|
7
|
-
};
|
|
8
|
-
getText.locale = function (locale, ...args) {
|
|
9
|
-
return ctx.textModule.locale(moduleScope, locale, text, ...args);
|
|
10
|
-
};
|
|
11
|
-
return getText;
|
|
12
|
-
}
|
|
13
|
-
exports.BeanScopeLocaleImpl = BeanScopeLocaleImpl;
|
|
14
|
-
//# sourceMappingURL=beanScopeLocaleImpl.js.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./beanScopeLocale.js"), exports);
|
|
18
|
-
__exportStar(require("./localeCtx.js"), exports);
|
|
19
|
-
__exportStar(require("./type.js"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BeanSimple } from '../../beanSimple.js';
|
|
2
|
-
import { ILocalInfos } from './type.js';
|
|
3
|
-
export declare class CtxLocale extends BeanSimple {
|
|
4
|
-
get locale(): string;
|
|
5
|
-
set locale(value: string);
|
|
6
|
-
getText<T extends keyof ILocalInfos>(moduleScope: string | undefined, locale: T | undefined, key: string, ...args: any[]): string;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=localeCtx.d.ts.map
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.CtxLocale = void 0;
|
|
27
|
-
const localeutil = __importStar(require("@cabloy/localeutil"));
|
|
28
|
-
const beanSimple_js_1 = require("../../beanSimple.js");
|
|
29
|
-
class CtxLocale extends beanSimple_js_1.BeanSimple {
|
|
30
|
-
get locale() {
|
|
31
|
-
return this.ctx.locale || this.app.config.i18n.defaultLocale;
|
|
32
|
-
}
|
|
33
|
-
set locale(value) {
|
|
34
|
-
this.ctx.locale = value;
|
|
35
|
-
}
|
|
36
|
-
/** @internal */
|
|
37
|
-
createLocaleText(moduleScope) {
|
|
38
|
-
const self = this;
|
|
39
|
-
const getText = function (text, ...args) {
|
|
40
|
-
return self.getText(moduleScope, undefined, text, ...args);
|
|
41
|
-
};
|
|
42
|
-
getText.locale = function (locale, text, ...args) {
|
|
43
|
-
return self.getText(moduleScope, locale, text, ...args);
|
|
44
|
-
};
|
|
45
|
-
return getText;
|
|
46
|
-
}
|
|
47
|
-
/** @internal */
|
|
48
|
-
createScopeLocaleText(moduleScope, text) {
|
|
49
|
-
const self = this;
|
|
50
|
-
const getText = function (...args) {
|
|
51
|
-
return self.getText(moduleScope, undefined, text, ...args);
|
|
52
|
-
};
|
|
53
|
-
getText.locale = function (locale, ...args) {
|
|
54
|
-
return self.getText(moduleScope, locale, text, ...args);
|
|
55
|
-
};
|
|
56
|
-
return getText;
|
|
57
|
-
}
|
|
58
|
-
getText(moduleScope, locale, key, ...args) {
|
|
59
|
-
return localeutil.getLocaleText(moduleScope ? this.app.meta.localeModules[moduleScope] : undefined, this.app.meta.locales, locale || this.locale, key, ...args);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.CtxLocale = CtxLocale;
|
|
63
|
-
//# sourceMappingURL=localeCtx.js.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface IModuleLocale {
|
|
2
|
-
(...args: any[]): string;
|
|
3
|
-
locale: <T extends keyof ILocalInfos>(locale: T, ...args: any[]) => string;
|
|
4
|
-
}
|
|
5
|
-
export interface IModuleLocaleText {
|
|
6
|
-
(text: string, ...args: any[]): string;
|
|
7
|
-
locale: <T extends keyof ILocalInfos>(locale: T, text: string, ...args: any[]) => string;
|
|
8
|
-
}
|
|
9
|
-
export type TypeModuleLocales<T> = {
|
|
10
|
-
[prop in string & keyof T]: IModuleLocale;
|
|
11
|
-
};
|
|
12
|
-
export type TypeLocaleBase = 'en-us';
|
|
13
|
-
export interface ILocalInfo {
|
|
14
|
-
}
|
|
15
|
-
export interface ILocalInfos {
|
|
16
|
-
'en-us': ILocalInfo;
|
|
17
|
-
'zh-cn': ILocalInfo;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { BeanModelBaseInner } from './beanModelBaseInner.js';
|
|
2
|
-
export declare class BeanModelBase extends BeanModelBaseInner {
|
|
3
|
-
get __cacheName(): {
|
|
4
|
-
module: string;
|
|
5
|
-
name: string;
|
|
6
|
-
};
|
|
7
|
-
get __cacheKeyAux(): string | undefined;
|
|
8
|
-
get __cacheNotKey(): boolean;
|
|
9
|
-
mget(ids: any): Promise<any>;
|
|
10
|
-
get(where: any, ...args: any[]): Promise<any>;
|
|
11
|
-
update(where: any, ...args: any[]): Promise<void>;
|
|
12
|
-
delete(where: any, ...args: any[]): Promise<void>;
|
|
13
|
-
__mget_select(keys: any): Promise<any[]>;
|
|
14
|
-
__get_notkey(where: any, ...args: any[]): any;
|
|
15
|
-
__get_key(where: any, ...args: any[]): Promise<any>;
|
|
16
|
-
__checkCacheKeyValid(where: any): boolean;
|
|
17
|
-
__checkCacheNotKeyDataValid(where: any, data: any): boolean;
|
|
18
|
-
__deleteCache_key(where: any): Promise<void>;
|
|
19
|
-
__deleteCache_notkey(where: any): Promise<void>;
|
|
20
|
-
__getCacheInstance(): any;
|
|
21
|
-
clearCache(): Promise<void>;
|
|
22
|
-
__cacheExists(): boolean;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=beanModelBase.d.ts.map
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BeanModelBase = void 0;
|
|
4
|
-
const beanModelBaseInner_js_1 = require("./beanModelBaseInner.js");
|
|
5
|
-
class BeanModelBase extends beanModelBaseInner_js_1.BeanModelBaseInner {
|
|
6
|
-
get __cacheName() {
|
|
7
|
-
const cache = this.options.cache || { module: '', name: '' };
|
|
8
|
-
const moduleName = cache.module || this.moduleBelong;
|
|
9
|
-
const cacheName = cache.name || this.__beanOptions?.name;
|
|
10
|
-
return { module: moduleName, name: `model:${cacheName}` };
|
|
11
|
-
}
|
|
12
|
-
get __cacheKeyAux() {
|
|
13
|
-
return this.options.cacheKeyAux;
|
|
14
|
-
}
|
|
15
|
-
get __cacheNotKey() {
|
|
16
|
-
return this.options.cacheNotKey !== false;
|
|
17
|
-
}
|
|
18
|
-
async mget(ids) {
|
|
19
|
-
if (!this.__cacheExists()) {
|
|
20
|
-
return await this.__mget_select(ids);
|
|
21
|
-
}
|
|
22
|
-
// cache
|
|
23
|
-
const cache = this.__getCacheInstance();
|
|
24
|
-
return await cache.mget(ids, {
|
|
25
|
-
fn_mget: async (keys) => {
|
|
26
|
-
return await this.__mget_select(keys);
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
async get(where, ...args) {
|
|
31
|
-
if (!this.__cacheExists()) {
|
|
32
|
-
return await super.get(where, ...args);
|
|
33
|
-
}
|
|
34
|
-
if (where.id && typeof where.id === 'object') {
|
|
35
|
-
// for example: id: { op: '<', val: flowNodeId },
|
|
36
|
-
return await super.get(where, ...args);
|
|
37
|
-
}
|
|
38
|
-
if (!this.__checkCacheKeyValid(where)) {
|
|
39
|
-
if (this.__cacheNotKey) {
|
|
40
|
-
return await this.__get_notkey(where, ...args);
|
|
41
|
-
}
|
|
42
|
-
return await super.get(where, ...args);
|
|
43
|
-
}
|
|
44
|
-
return await this.__get_key(where, ...args);
|
|
45
|
-
}
|
|
46
|
-
async update(where, ...args) {
|
|
47
|
-
if (!this.__cacheExists()) {
|
|
48
|
-
return await super.update(where, ...args);
|
|
49
|
-
}
|
|
50
|
-
const res = await super.update(where, ...args);
|
|
51
|
-
await this.__deleteCache_key(where);
|
|
52
|
-
return res;
|
|
53
|
-
}
|
|
54
|
-
async delete(where, ...args) {
|
|
55
|
-
if (!this.__cacheExists()) {
|
|
56
|
-
return await super.delete(where, ...args);
|
|
57
|
-
}
|
|
58
|
-
const res = await super.delete(where, ...args);
|
|
59
|
-
await this.__deleteCache_key(where);
|
|
60
|
-
return res;
|
|
61
|
-
}
|
|
62
|
-
async __mget_select(keys) {
|
|
63
|
-
const items = await this.select({
|
|
64
|
-
where: {
|
|
65
|
-
id: keys,
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
items.sort((a, b) => {
|
|
69
|
-
const indexA = keys.indexOf(a.id);
|
|
70
|
-
const indexB = keys.indexOf(b.id);
|
|
71
|
-
return indexA - indexB;
|
|
72
|
-
});
|
|
73
|
-
return items;
|
|
74
|
-
}
|
|
75
|
-
async __get_notkey(where, ...args) {
|
|
76
|
-
// cache
|
|
77
|
-
const cache = this.__getCacheInstance();
|
|
78
|
-
const data = await cache.get(where, {
|
|
79
|
-
fn_get: async () => {
|
|
80
|
-
return await super.get(where, { columns: ['id'] });
|
|
81
|
-
},
|
|
82
|
-
ignoreNull: true,
|
|
83
|
-
});
|
|
84
|
-
if (!data)
|
|
85
|
-
return data;
|
|
86
|
-
// check if exists and valid
|
|
87
|
-
const data2 = await this.__get_key({ id: data.id }, ...args);
|
|
88
|
-
if (data2 && this.__checkCacheNotKeyDataValid(where, data2)) {
|
|
89
|
-
return data2;
|
|
90
|
-
}
|
|
91
|
-
// delete cache
|
|
92
|
-
await this.__deleteCache_notkey(where);
|
|
93
|
-
// get again
|
|
94
|
-
return await this.__get_notkey(where, ...args);
|
|
95
|
-
}
|
|
96
|
-
async __get_key(where, ...args) {
|
|
97
|
-
// cache
|
|
98
|
-
const cache = this.__getCacheInstance();
|
|
99
|
-
return await cache.get(where.id, {
|
|
100
|
-
fn_get: async () => {
|
|
101
|
-
// where: maybe contain aux key
|
|
102
|
-
return await super.get(where, ...args);
|
|
103
|
-
},
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
__checkCacheKeyValid(where) {
|
|
107
|
-
let keys = Object.keys(where);
|
|
108
|
-
if (this.__cacheKeyAux) {
|
|
109
|
-
keys = keys.filter(item => item !== this.__cacheKeyAux);
|
|
110
|
-
}
|
|
111
|
-
return keys.length === 1 && keys[0] === 'id';
|
|
112
|
-
}
|
|
113
|
-
__checkCacheNotKeyDataValid(where, data) {
|
|
114
|
-
for (const key in where) {
|
|
115
|
-
const a = where[key];
|
|
116
|
-
const b = data[key];
|
|
117
|
-
if (typeof a === 'string' || typeof b === 'string') {
|
|
118
|
-
if (String(a).toLowerCase() !== String(b).toLowerCase())
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
|
-
else if (typeof a === 'boolean' || typeof b === 'boolean') {
|
|
122
|
-
if (Boolean(a) !== Boolean(b))
|
|
123
|
-
return false;
|
|
124
|
-
}
|
|
125
|
-
else if (a === null || a === undefined || b === null || b === undefined) {
|
|
126
|
-
if ((a || null) !== (b || null))
|
|
127
|
-
return false;
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
if (a !== b)
|
|
131
|
-
return false;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
return true;
|
|
135
|
-
}
|
|
136
|
-
async __deleteCache_key(where) {
|
|
137
|
-
if (!where.id)
|
|
138
|
-
return;
|
|
139
|
-
const cache = this.__getCacheInstance();
|
|
140
|
-
await cache.del(where.id);
|
|
141
|
-
}
|
|
142
|
-
async __deleteCache_notkey(where) {
|
|
143
|
-
const cache = this.__getCacheInstance();
|
|
144
|
-
await cache.del(where);
|
|
145
|
-
}
|
|
146
|
-
__getCacheInstance() {
|
|
147
|
-
return this.ctx.bean.summer.getCache(this.__cacheName);
|
|
148
|
-
}
|
|
149
|
-
async clearCache() {
|
|
150
|
-
if (!this.__cacheExists())
|
|
151
|
-
return;
|
|
152
|
-
await this.ctx.bean.summer.clear(this.__cacheName);
|
|
153
|
-
}
|
|
154
|
-
__cacheExists() {
|
|
155
|
-
if (!this.__cacheName)
|
|
156
|
-
return false;
|
|
157
|
-
const cachaBase = this.ctx.bean.summer._findCacheBase({
|
|
158
|
-
module: this.__cacheName.module,
|
|
159
|
-
name: this.__cacheName.name,
|
|
160
|
-
});
|
|
161
|
-
return !!cachaBase && cachaBase.enable !== false;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
exports.BeanModelBase = BeanModelBase;
|
|
165
|
-
//# sourceMappingURL=beanModelBase.js.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { BeanBase } from '../../beanBase.js';
|
|
2
|
-
import { IModelOptions } from './type.js';
|
|
3
|
-
import { IDecoratorModelOptions } from '../../../decorator/index.js';
|
|
4
|
-
export declare class BeanModelBaseInner extends BeanBase {
|
|
5
|
-
protected get __beanOptions(): import("../../../decorator/index.js").IDecoratorBeanOptionsBase<unknown> | undefined;
|
|
6
|
-
protected get __modelOptions(): IDecoratorModelOptions;
|
|
7
|
-
get table(): string;
|
|
8
|
-
get options(): IModelOptions;
|
|
9
|
-
get disableDeleted(): any;
|
|
10
|
-
get disableInstance(): any;
|
|
11
|
-
columns(_tableName?: string): Promise<any>;
|
|
12
|
-
columnsClear(_tableName: any): void;
|
|
13
|
-
columnsClearAll(): void;
|
|
14
|
-
prepareData(_item: any): Promise<void>;
|
|
15
|
-
default<T = any>(_data?: T): Promise<T>;
|
|
16
|
-
create(_data: any, ..._args: any[]): Promise<number>;
|
|
17
|
-
write(_data: any, ..._args: any[]): Promise<void>;
|
|
18
|
-
query(..._args: any[]): Promise<void>;
|
|
19
|
-
queryOne(..._args: any[]): Promise<any>;
|
|
20
|
-
select(..._args: any[]): Promise<any[]>;
|
|
21
|
-
count(..._args: any[]): Promise<number>;
|
|
22
|
-
get(..._args: any[]): Promise<void>;
|
|
23
|
-
insert(..._args: any[]): Promise<{
|
|
24
|
-
insertId: number;
|
|
25
|
-
}>;
|
|
26
|
-
update(..._args: any[]): Promise<void>;
|
|
27
|
-
delete(..._args: any[]): Promise<void>;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=beanModelBaseInner.d.ts.map
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BeanModelBaseInner = void 0;
|
|
4
|
-
const beanBase_js_1 = require("../../beanBase.js");
|
|
5
|
-
const resource_js_1 = require("../../../core/resource.js");
|
|
6
|
-
class BeanModelBaseInner extends beanBase_js_1.BeanBase {
|
|
7
|
-
get __beanOptions() {
|
|
8
|
-
return resource_js_1.appResource.getBean(this.__beanFullName__);
|
|
9
|
-
}
|
|
10
|
-
get __modelOptions() {
|
|
11
|
-
const beanOptions = this.__beanOptions;
|
|
12
|
-
return beanOptions?.options;
|
|
13
|
-
}
|
|
14
|
-
get table() {
|
|
15
|
-
return this.__modelOptions.table;
|
|
16
|
-
}
|
|
17
|
-
get options() {
|
|
18
|
-
return this.__modelOptions.options;
|
|
19
|
-
}
|
|
20
|
-
get disableDeleted() {
|
|
21
|
-
return this.options.disableDeleted === undefined
|
|
22
|
-
? this.app.config.model.disableDeleted
|
|
23
|
-
: this.options.disableDeleted;
|
|
24
|
-
}
|
|
25
|
-
get disableInstance() {
|
|
26
|
-
return this.options.disableInstance === undefined
|
|
27
|
-
? this.app.config.model.disableInstance
|
|
28
|
-
: this.options.disableInstance;
|
|
29
|
-
}
|
|
30
|
-
async columns(_tableName) {
|
|
31
|
-
// xx
|
|
32
|
-
}
|
|
33
|
-
columnsClear(_tableName) {
|
|
34
|
-
// xx
|
|
35
|
-
}
|
|
36
|
-
columnsClearAll() {
|
|
37
|
-
// xx
|
|
38
|
-
}
|
|
39
|
-
async prepareData(_item) {
|
|
40
|
-
// xx
|
|
41
|
-
}
|
|
42
|
-
async default(_data) {
|
|
43
|
-
return _data;
|
|
44
|
-
// xx
|
|
45
|
-
}
|
|
46
|
-
async create(_data, ..._args) {
|
|
47
|
-
return 0;
|
|
48
|
-
// xx
|
|
49
|
-
}
|
|
50
|
-
async write(_data, ..._args) {
|
|
51
|
-
// xx
|
|
52
|
-
}
|
|
53
|
-
// ///////////
|
|
54
|
-
async query(..._args) {
|
|
55
|
-
throw new Error('------------ model.query');
|
|
56
|
-
// xx
|
|
57
|
-
}
|
|
58
|
-
async queryOne(..._args) {
|
|
59
|
-
return {};
|
|
60
|
-
throw new Error('------------ model.queryOne');
|
|
61
|
-
// xx
|
|
62
|
-
}
|
|
63
|
-
async select(..._args) {
|
|
64
|
-
return [];
|
|
65
|
-
// xx
|
|
66
|
-
}
|
|
67
|
-
async count(..._args) {
|
|
68
|
-
return 0;
|
|
69
|
-
// xx
|
|
70
|
-
}
|
|
71
|
-
async get(..._args) {
|
|
72
|
-
// xx
|
|
73
|
-
}
|
|
74
|
-
async insert(..._args) {
|
|
75
|
-
return { insertId: 0 };
|
|
76
|
-
// xx
|
|
77
|
-
}
|
|
78
|
-
async update(..._args) {
|
|
79
|
-
// xx
|
|
80
|
-
}
|
|
81
|
-
async delete(..._args) {
|
|
82
|
-
// xx
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
exports.BeanModelBaseInner = BeanModelBaseInner;
|
|
86
|
-
//# sourceMappingURL=beanModelBaseInner.js.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./type.js"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface IDecoratorModelOptions<T extends object = {}> {
|
|
2
|
-
entity?: T;
|
|
3
|
-
table?: string;
|
|
4
|
-
disableDeleted?: boolean;
|
|
5
|
-
disableInstance?: boolean;
|
|
6
|
-
disableUpdateTime?: boolean;
|
|
7
|
-
cache?: {
|
|
8
|
-
module?: string;
|
|
9
|
-
name: string;
|
|
10
|
-
};
|
|
11
|
-
cacheKeyAux?: string;
|
|
12
|
-
cacheNotKey?: boolean;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./type.js"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|