@eggjs/tegg-types 3.37.3
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 +21 -0
- package/README.md +15 -0
- package/aop/Advice.d.ts +37 -0
- package/aop/Advice.js +3 -0
- package/aop/Aspect.d.ts +13 -0
- package/aop/Aspect.js +5 -0
- package/aop/Crosscut.d.ts +28 -0
- package/aop/Crosscut.js +6 -0
- package/aop/Pointcut.d.ts +25 -0
- package/aop/Pointcut.js +20 -0
- package/aop/index.d.ts +4 -0
- package/aop/index.js +21 -0
- package/common/Graph.d.ts +3 -0
- package/common/Graph.js +3 -0
- package/common/Logger.d.ts +7 -0
- package/common/Logger.js +3 -0
- package/common/ModuleConfig.d.ts +26 -0
- package/common/ModuleConfig.js +3 -0
- package/common/RuntimeConfig.d.ts +15 -0
- package/common/RuntimeConfig.js +3 -0
- package/common/index.d.ts +4 -0
- package/common/index.js +21 -0
- package/controller-decorator/HTTPController.d.ts +5 -0
- package/controller-decorator/HTTPController.js +3 -0
- package/controller-decorator/HTTPMethod.d.ts +6 -0
- package/controller-decorator/HTTPMethod.js +3 -0
- package/controller-decorator/HTTPParam.d.ts +9 -0
- package/controller-decorator/HTTPParam.js +3 -0
- package/controller-decorator/MetadataKey.d.ts +17 -0
- package/controller-decorator/MetadataKey.js +21 -0
- package/controller-decorator/builder.d.ts +6 -0
- package/controller-decorator/builder.js +3 -0
- package/controller-decorator/index.d.ts +8 -0
- package/controller-decorator/index.js +25 -0
- package/controller-decorator/model/ControllerMetadata.d.ts +11 -0
- package/controller-decorator/model/ControllerMetadata.js +3 -0
- package/controller-decorator/model/MethodMeta.d.ts +6 -0
- package/controller-decorator/model/MethodMeta.js +3 -0
- package/controller-decorator/model/types.d.ts +41 -0
- package/controller-decorator/model/types.js +40 -0
- package/core-decorator/ContextProto.d.ts +6 -0
- package/core-decorator/ContextProto.js +3 -0
- package/core-decorator/Inject.d.ts +3 -0
- package/core-decorator/Inject.js +3 -0
- package/core-decorator/Metadata.d.ts +1 -0
- package/core-decorator/Metadata.js +3 -0
- package/core-decorator/MultiInstanceProto.d.ts +27 -0
- package/core-decorator/MultiInstanceProto.js +3 -0
- package/core-decorator/Prototype.d.ts +9 -0
- package/core-decorator/Prototype.js +5 -0
- package/core-decorator/SingletonProto.d.ts +6 -0
- package/core-decorator/SingletonProto.js +3 -0
- package/core-decorator/enum/AccessLevel.d.ts +4 -0
- package/core-decorator/enum/AccessLevel.js +11 -0
- package/core-decorator/enum/EggType.d.ts +4 -0
- package/core-decorator/enum/EggType.js +9 -0
- package/core-decorator/enum/ObjectInitType.d.ts +7 -0
- package/core-decorator/enum/ObjectInitType.js +18 -0
- package/core-decorator/enum/Qualifier.d.ts +6 -0
- package/core-decorator/enum/Qualifier.js +10 -0
- package/core-decorator/index.d.ts +14 -0
- package/core-decorator/index.js +31 -0
- package/core-decorator/model/EggMultiInstancePrototypeInfo.d.ts +57 -0
- package/core-decorator/model/EggMultiInstancePrototypeInfo.js +3 -0
- package/core-decorator/model/EggPrototypeInfo.d.ts +31 -0
- package/core-decorator/model/EggPrototypeInfo.js +3 -0
- package/core-decorator/model/InjectObjectInfo.d.ts +11 -0
- package/core-decorator/model/InjectObjectInfo.js +3 -0
- package/core-decorator/model/QualifierInfo.d.ts +38 -0
- package/core-decorator/model/QualifierInfo.js +3 -0
- package/dal/Qualifier.d.ts +5 -0
- package/dal/Qualifier.js +9 -0
- package/dal/decorator/Column.d.ts +179 -0
- package/dal/decorator/Column.js +3 -0
- package/dal/decorator/DataSourceQualifier.d.ts +2 -0
- package/dal/decorator/DataSourceQualifier.js +6 -0
- package/dal/decorator/Index.d.ts +12 -0
- package/dal/decorator/Index.js +3 -0
- package/dal/decorator/Table.d.ts +23 -0
- package/dal/decorator/Table.js +3 -0
- package/dal/enum/ColumnFormat.d.ts +5 -0
- package/dal/enum/ColumnFormat.js +10 -0
- package/dal/enum/ColumnType.d.ts +40 -0
- package/dal/enum/ColumnType.js +51 -0
- package/dal/enum/CompressionType.d.ts +5 -0
- package/dal/enum/CompressionType.js +10 -0
- package/dal/enum/IndexStoreType.d.ts +4 -0
- package/dal/enum/IndexStoreType.js +9 -0
- package/dal/enum/IndexType.d.ts +7 -0
- package/dal/enum/IndexType.js +12 -0
- package/dal/enum/InsertMethod.d.ts +5 -0
- package/dal/enum/InsertMethod.js +10 -0
- package/dal/enum/RowFormat.d.ts +8 -0
- package/dal/enum/RowFormat.js +13 -0
- package/dal/enum/SqlType.d.ts +7 -0
- package/dal/enum/SqlType.js +12 -0
- package/dal/enum/Templates.d.ts +5 -0
- package/dal/enum/Templates.js +10 -0
- package/dal/index.d.ts +19 -0
- package/dal/index.js +36 -0
- package/dal/type/CodeGenerator.d.ts +6 -0
- package/dal/type/CodeGenerator.js +3 -0
- package/dal/type/ColumnTsType.d.ts +42 -0
- package/dal/type/ColumnTsType.js +3 -0
- package/dal/type/DateSource.d.ts +13 -0
- package/dal/type/DateSource.js +3 -0
- package/dal/type/Spatial.d.ts +11 -0
- package/dal/type/Spatial.js +3 -0
- package/dal/type/SqlMap.d.ts +18 -0
- package/dal/type/SqlMap.js +3 -0
- package/dynamic-inject.d.ts +13 -0
- package/dynamic-inject.js +5 -0
- package/index.d.ts +12 -0
- package/index.js +29 -0
- package/lib/aop/Advice.d.ts +37 -0
- package/lib/aop/Advice.js +3 -0
- package/lib/aop/Aspect.d.ts +13 -0
- package/lib/aop/Aspect.js +5 -0
- package/lib/aop/Crosscut.d.ts +28 -0
- package/lib/aop/Crosscut.js +6 -0
- package/lib/aop/Pointcut.d.ts +25 -0
- package/lib/aop/Pointcut.js +20 -0
- package/lib/aop/index.d.ts +4 -0
- package/lib/aop/index.js +21 -0
- package/lib/common/Graph.d.ts +3 -0
- package/lib/common/Graph.js +3 -0
- package/lib/common/Logger.d.ts +7 -0
- package/lib/common/Logger.js +3 -0
- package/lib/common/ModuleConfig.d.ts +26 -0
- package/lib/common/ModuleConfig.js +3 -0
- package/lib/common/RuntimeConfig.d.ts +15 -0
- package/lib/common/RuntimeConfig.js +3 -0
- package/lib/common/index.d.ts +4 -0
- package/lib/common/index.js +21 -0
- package/lib/controller-decorator/HTTPController.d.ts +5 -0
- package/lib/controller-decorator/HTTPController.js +3 -0
- package/lib/controller-decorator/HTTPMethod.d.ts +6 -0
- package/lib/controller-decorator/HTTPMethod.js +3 -0
- package/lib/controller-decorator/HTTPParam.d.ts +9 -0
- package/lib/controller-decorator/HTTPParam.js +3 -0
- package/lib/controller-decorator/MetadataKey.d.ts +17 -0
- package/lib/controller-decorator/MetadataKey.js +21 -0
- package/lib/controller-decorator/builder.d.ts +6 -0
- package/lib/controller-decorator/builder.js +3 -0
- package/lib/controller-decorator/index.d.ts +8 -0
- package/lib/controller-decorator/index.js +25 -0
- package/lib/controller-decorator/model/ControllerMetadata.d.ts +11 -0
- package/lib/controller-decorator/model/ControllerMetadata.js +3 -0
- package/lib/controller-decorator/model/MethodMeta.d.ts +6 -0
- package/lib/controller-decorator/model/MethodMeta.js +3 -0
- package/lib/controller-decorator/model/types.d.ts +41 -0
- package/lib/controller-decorator/model/types.js +40 -0
- package/lib/core-decorator/ContextProto.d.ts +6 -0
- package/lib/core-decorator/ContextProto.js +3 -0
- package/lib/core-decorator/Inject.d.ts +3 -0
- package/lib/core-decorator/Inject.js +3 -0
- package/lib/core-decorator/Metadata.d.ts +1 -0
- package/lib/core-decorator/Metadata.js +3 -0
- package/lib/core-decorator/MultiInstanceProto.d.ts +27 -0
- package/lib/core-decorator/MultiInstanceProto.js +3 -0
- package/lib/core-decorator/Prototype.d.ts +9 -0
- package/lib/core-decorator/Prototype.js +5 -0
- package/lib/core-decorator/SingletonProto.d.ts +6 -0
- package/lib/core-decorator/SingletonProto.js +3 -0
- package/lib/core-decorator/enum/AccessLevel.d.ts +4 -0
- package/lib/core-decorator/enum/AccessLevel.js +11 -0
- package/lib/core-decorator/enum/EggType.d.ts +4 -0
- package/lib/core-decorator/enum/EggType.js +9 -0
- package/lib/core-decorator/enum/ObjectInitType.d.ts +7 -0
- package/lib/core-decorator/enum/ObjectInitType.js +18 -0
- package/lib/core-decorator/enum/Qualifier.d.ts +6 -0
- package/lib/core-decorator/enum/Qualifier.js +10 -0
- package/lib/core-decorator/index.d.ts +14 -0
- package/lib/core-decorator/index.js +31 -0
- package/lib/core-decorator/model/EggMultiInstancePrototypeInfo.d.ts +57 -0
- package/lib/core-decorator/model/EggMultiInstancePrototypeInfo.js +3 -0
- package/lib/core-decorator/model/EggPrototypeInfo.d.ts +31 -0
- package/lib/core-decorator/model/EggPrototypeInfo.js +3 -0
- package/lib/core-decorator/model/InjectObjectInfo.d.ts +11 -0
- package/lib/core-decorator/model/InjectObjectInfo.js +3 -0
- package/lib/core-decorator/model/QualifierInfo.d.ts +38 -0
- package/lib/core-decorator/model/QualifierInfo.js +3 -0
- package/lib/dal/Qualifier.d.ts +5 -0
- package/lib/dal/Qualifier.js +9 -0
- package/lib/dal/decorator/Column.d.ts +179 -0
- package/lib/dal/decorator/Column.js +3 -0
- package/lib/dal/decorator/DataSourceQualifier.d.ts +2 -0
- package/lib/dal/decorator/DataSourceQualifier.js +6 -0
- package/lib/dal/decorator/Index.d.ts +12 -0
- package/lib/dal/decorator/Index.js +3 -0
- package/lib/dal/decorator/Table.d.ts +23 -0
- package/lib/dal/decorator/Table.js +3 -0
- package/lib/dal/enum/ColumnFormat.d.ts +5 -0
- package/lib/dal/enum/ColumnFormat.js +10 -0
- package/lib/dal/enum/ColumnType.d.ts +40 -0
- package/lib/dal/enum/ColumnType.js +51 -0
- package/lib/dal/enum/CompressionType.d.ts +5 -0
- package/lib/dal/enum/CompressionType.js +10 -0
- package/lib/dal/enum/IndexStoreType.d.ts +4 -0
- package/lib/dal/enum/IndexStoreType.js +9 -0
- package/lib/dal/enum/IndexType.d.ts +7 -0
- package/lib/dal/enum/IndexType.js +12 -0
- package/lib/dal/enum/InsertMethod.d.ts +5 -0
- package/lib/dal/enum/InsertMethod.js +10 -0
- package/lib/dal/enum/RowFormat.d.ts +8 -0
- package/lib/dal/enum/RowFormat.js +13 -0
- package/lib/dal/enum/SqlType.d.ts +7 -0
- package/lib/dal/enum/SqlType.js +12 -0
- package/lib/dal/enum/Templates.d.ts +5 -0
- package/lib/dal/enum/Templates.js +10 -0
- package/lib/dal/index.d.ts +19 -0
- package/lib/dal/index.js +36 -0
- package/lib/dal/type/CodeGenerator.d.ts +6 -0
- package/lib/dal/type/CodeGenerator.js +3 -0
- package/lib/dal/type/ColumnTsType.d.ts +42 -0
- package/lib/dal/type/ColumnTsType.js +3 -0
- package/lib/dal/type/DateSource.d.ts +13 -0
- package/lib/dal/type/DateSource.js +3 -0
- package/lib/dal/type/Spatial.d.ts +11 -0
- package/lib/dal/type/Spatial.js +3 -0
- package/lib/dal/type/SqlMap.d.ts +18 -0
- package/lib/dal/type/SqlMap.js +3 -0
- package/lib/dynamic-inject.d.ts +13 -0
- package/lib/dynamic-inject.js +5 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +29 -0
- package/lib/lifecycle/EggObjectLifecycle.d.ts +31 -0
- package/lib/lifecycle/EggObjectLifecycle.js +3 -0
- package/lib/lifecycle/IdenticalObject.d.ts +4 -0
- package/lib/lifecycle/IdenticalObject.js +3 -0
- package/lib/lifecycle/LifecycleHook.d.ts +12 -0
- package/lib/lifecycle/LifecycleHook.js +3 -0
- package/lib/lifecycle/index.d.ts +3 -0
- package/lib/lifecycle/index.js +20 -0
- package/lib/metadata/errors.d.ts +5 -0
- package/lib/metadata/errors.js +10 -0
- package/lib/metadata/index.d.ts +4 -0
- package/lib/metadata/index.js +21 -0
- package/lib/metadata/model/EggPrototype.d.ts +75 -0
- package/lib/metadata/model/EggPrototype.js +3 -0
- package/lib/metadata/model/LoadUnit.d.ts +29 -0
- package/lib/metadata/model/LoadUnit.js +10 -0
- package/lib/metadata/model/Loader.d.ts +7 -0
- package/lib/metadata/model/Loader.js +3 -0
- package/lib/orm.d.ts +30 -0
- package/lib/orm.js +10 -0
- package/lib/runtime/Factory.d.ts +7 -0
- package/lib/runtime/Factory.js +3 -0
- package/lib/runtime/index.d.ts +5 -0
- package/lib/runtime/index.js +22 -0
- package/lib/runtime/model/EggContainer.d.ts +11 -0
- package/lib/runtime/model/EggContainer.js +3 -0
- package/lib/runtime/model/EggContext.d.ts +7 -0
- package/lib/runtime/model/EggContext.js +3 -0
- package/lib/runtime/model/EggObject.d.ts +24 -0
- package/lib/runtime/model/EggObject.js +12 -0
- package/lib/runtime/model/LoadUnitInstance.d.ts +9 -0
- package/lib/runtime/model/LoadUnitInstance.js +3 -0
- package/lib/schedule.d.ts +30 -0
- package/lib/schedule.js +13 -0
- package/lib/transaction.d.ts +23 -0
- package/lib/transaction.js +13 -0
- package/lifecycle/EggObjectLifecycle.d.ts +31 -0
- package/lifecycle/EggObjectLifecycle.js +3 -0
- package/lifecycle/IdenticalObject.d.ts +4 -0
- package/lifecycle/IdenticalObject.js +3 -0
- package/lifecycle/LifecycleHook.d.ts +12 -0
- package/lifecycle/LifecycleHook.js +3 -0
- package/lifecycle/index.d.ts +3 -0
- package/lifecycle/index.js +20 -0
- package/metadata/errors.d.ts +5 -0
- package/metadata/errors.js +10 -0
- package/metadata/index.d.ts +4 -0
- package/metadata/index.js +21 -0
- package/metadata/model/EggPrototype.d.ts +75 -0
- package/metadata/model/EggPrototype.js +3 -0
- package/metadata/model/LoadUnit.d.ts +29 -0
- package/metadata/model/LoadUnit.js +10 -0
- package/metadata/model/Loader.d.ts +7 -0
- package/metadata/model/Loader.js +3 -0
- package/orm.d.ts +30 -0
- package/orm.js +10 -0
- package/package.json +48 -0
- package/runtime/Factory.d.ts +7 -0
- package/runtime/Factory.js +3 -0
- package/runtime/index.d.ts +5 -0
- package/runtime/index.js +22 -0
- package/runtime/model/EggContainer.d.ts +11 -0
- package/runtime/model/EggContainer.js +3 -0
- package/runtime/model/EggContext.d.ts +7 -0
- package/runtime/model/EggContext.js +3 -0
- package/runtime/model/EggObject.d.ts +24 -0
- package/runtime/model/EggObject.js +12 -0
- package/runtime/model/LoadUnitInstance.d.ts +9 -0
- package/runtime/model/LoadUnitInstance.js +3 -0
- package/schedule.d.ts +30 -0
- package/schedule.js +13 -0
- package/transaction.d.ts +23 -0
- package/transaction.js +13 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SqlType = void 0;
|
|
4
|
+
var SqlType;
|
|
5
|
+
(function (SqlType) {
|
|
6
|
+
SqlType["BLOCK"] = "BLOCK";
|
|
7
|
+
SqlType["INSERT"] = "INSERT";
|
|
8
|
+
SqlType["SELECT"] = "SELECT";
|
|
9
|
+
SqlType["UPDATE"] = "UPDATE";
|
|
10
|
+
SqlType["DELETE"] = "DELETE";
|
|
11
|
+
})(SqlType || (exports.SqlType = SqlType = {}));
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU3FsVHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2RhbC9lbnVtL1NxbFR5cGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsSUFBWSxPQU1YO0FBTkQsV0FBWSxPQUFPO0lBQ2pCLDBCQUFlLENBQUE7SUFDZiw0QkFBaUIsQ0FBQTtJQUNqQiw0QkFBaUIsQ0FBQTtJQUNqQiw0QkFBaUIsQ0FBQTtJQUNqQiw0QkFBaUIsQ0FBQTtBQUNuQixDQUFDLEVBTlcsT0FBTyx1QkFBUCxPQUFPLFFBTWxCIn0=
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Templates = void 0;
|
|
4
|
+
var Templates;
|
|
5
|
+
(function (Templates) {
|
|
6
|
+
Templates["BASE_DAO"] = "base_dao";
|
|
7
|
+
Templates["DAO"] = "dao";
|
|
8
|
+
Templates["EXTENSION"] = "extension";
|
|
9
|
+
})(Templates || (exports.Templates = Templates = {}));
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGVtcGxhdGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vZGFsL2VudW0vVGVtcGxhdGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLElBQVksU0FJWDtBQUpELFdBQVksU0FBUztJQUNuQixrQ0FBcUIsQ0FBQTtJQUNyQix3QkFBVyxDQUFBO0lBQ1gsb0NBQXVCLENBQUE7QUFDekIsQ0FBQyxFQUpXLFNBQVMseUJBQVQsU0FBUyxRQUlwQiJ9
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './enum/ColumnFormat';
|
|
2
|
+
export * from './enum/ColumnType';
|
|
3
|
+
export * from './enum/CompressionType';
|
|
4
|
+
export * from './enum/IndexStoreType';
|
|
5
|
+
export * from './enum/IndexType';
|
|
6
|
+
export * from './enum/InsertMethod';
|
|
7
|
+
export * from './enum/RowFormat';
|
|
8
|
+
export * from './enum/SqlType';
|
|
9
|
+
export * from './enum/Templates';
|
|
10
|
+
export * from './type/CodeGenerator';
|
|
11
|
+
export * from './type/ColumnTsType';
|
|
12
|
+
export * from './type/DateSource';
|
|
13
|
+
export * from './type/Spatial';
|
|
14
|
+
export * from './type/SqlMap';
|
|
15
|
+
export * from './decorator/Column';
|
|
16
|
+
export * from './decorator/DataSourceQualifier';
|
|
17
|
+
export * from './decorator/Index';
|
|
18
|
+
export * from './decorator/Table';
|
|
19
|
+
export * from './Qualifier';
|
package/lib/dal/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
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("./enum/ColumnFormat"), exports);
|
|
18
|
+
__exportStar(require("./enum/ColumnType"), exports);
|
|
19
|
+
__exportStar(require("./enum/CompressionType"), exports);
|
|
20
|
+
__exportStar(require("./enum/IndexStoreType"), exports);
|
|
21
|
+
__exportStar(require("./enum/IndexType"), exports);
|
|
22
|
+
__exportStar(require("./enum/InsertMethod"), exports);
|
|
23
|
+
__exportStar(require("./enum/RowFormat"), exports);
|
|
24
|
+
__exportStar(require("./enum/SqlType"), exports);
|
|
25
|
+
__exportStar(require("./enum/Templates"), exports);
|
|
26
|
+
__exportStar(require("./type/CodeGenerator"), exports);
|
|
27
|
+
__exportStar(require("./type/ColumnTsType"), exports);
|
|
28
|
+
__exportStar(require("./type/DateSource"), exports);
|
|
29
|
+
__exportStar(require("./type/Spatial"), exports);
|
|
30
|
+
__exportStar(require("./type/SqlMap"), exports);
|
|
31
|
+
__exportStar(require("./decorator/Column"), exports);
|
|
32
|
+
__exportStar(require("./decorator/DataSourceQualifier"), exports);
|
|
33
|
+
__exportStar(require("./decorator/Index"), exports);
|
|
34
|
+
__exportStar(require("./decorator/Table"), exports);
|
|
35
|
+
__exportStar(require("./Qualifier"), exports);
|
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9kYWwvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLHNEQUFvQztBQUNwQyxvREFBa0M7QUFDbEMseURBQXVDO0FBQ3ZDLHdEQUFzQztBQUN0QyxtREFBaUM7QUFDakMsc0RBQW9DO0FBQ3BDLG1EQUFpQztBQUNqQyxpREFBK0I7QUFDL0IsbURBQWlDO0FBRWpDLHVEQUFxQztBQUNyQyxzREFBb0M7QUFDcEMsb0RBQWtDO0FBQ2xDLGlEQUErQjtBQUMvQixnREFBOEI7QUFFOUIscURBQW1DO0FBQ25DLGtFQUFnRDtBQUNoRCxvREFBa0M7QUFDbEMsb0RBQWtDO0FBQ2xDLDhDQUE0QiJ9
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29kZUdlbmVyYXRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2RhbC90eXBlL0NvZGVHZW5lcmF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Geometry, GeometryCollection, Line, MultiLine, MultiPoint, MultiPolygon, Point, Polygon } from './Spatial';
|
|
3
|
+
export interface ColumnTsType {
|
|
4
|
+
BIT: Buffer;
|
|
5
|
+
TINYINT: number;
|
|
6
|
+
BOOL: 0 | 1;
|
|
7
|
+
SMALLINT: number;
|
|
8
|
+
MEDIUMINT: number;
|
|
9
|
+
INT: number;
|
|
10
|
+
BIGINT: string;
|
|
11
|
+
DECIMAL: string;
|
|
12
|
+
FLOAT: number;
|
|
13
|
+
DOUBLE: number;
|
|
14
|
+
DATE: Date;
|
|
15
|
+
DATETIME: Date;
|
|
16
|
+
TIMESTAMP: Date;
|
|
17
|
+
TIME: string;
|
|
18
|
+
YEAR: number;
|
|
19
|
+
CHAR: string;
|
|
20
|
+
VARCHAR: string;
|
|
21
|
+
BINARY: Buffer;
|
|
22
|
+
VARBINARY: Buffer;
|
|
23
|
+
TINYBLOB: Buffer;
|
|
24
|
+
TINYTEXT: string;
|
|
25
|
+
BLOB: Buffer;
|
|
26
|
+
TEXT: string;
|
|
27
|
+
MEDIUMBLOB: Buffer;
|
|
28
|
+
MEDIUMTEXT: string;
|
|
29
|
+
LONGBLOB: Buffer;
|
|
30
|
+
LONGTEXT: string;
|
|
31
|
+
ENUM: string;
|
|
32
|
+
SET: string;
|
|
33
|
+
JSON: object;
|
|
34
|
+
GEOMETRY: Geometry;
|
|
35
|
+
POINT: Point;
|
|
36
|
+
LINESTRING: Line;
|
|
37
|
+
POLYGON: Polygon;
|
|
38
|
+
MULTIPOINT: MultiPoint;
|
|
39
|
+
MULTILINESTRING: MultiLine;
|
|
40
|
+
MULTIPOLYGON: MultiPolygon;
|
|
41
|
+
GEOMETRYCOLLECTION: GeometryCollection;
|
|
42
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29sdW1uVHNUeXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vZGFsL3R5cGUvQ29sdW1uVHNUeXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PaginateData<T> {
|
|
2
|
+
total: number;
|
|
3
|
+
pageNum: number;
|
|
4
|
+
rows: Array<T>;
|
|
5
|
+
}
|
|
6
|
+
export interface DataSource<T> {
|
|
7
|
+
execute(sqlName: string, data?: any): Promise<Array<T>>;
|
|
8
|
+
executeScalar(sqlName: string, data?: any): Promise<T | null>;
|
|
9
|
+
executeRaw(sqlName: string, data?: any): Promise<Array<any>>;
|
|
10
|
+
executeRawScalar(sqlName: string, data?: any): Promise<any | null>;
|
|
11
|
+
paginate(sqlName: string, data: any, currentPage: number, perPageCount: number): Promise<PaginateData<T>>;
|
|
12
|
+
count(sqlName: string, data?: any): Promise<number>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGF0ZVNvdXJjZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2RhbC90eXBlL0RhdGVTb3VyY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface Point {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
export type Line = Array<Point>;
|
|
6
|
+
export type Polygon = Array<Line>;
|
|
7
|
+
export type Geometry = Point | Line | Polygon;
|
|
8
|
+
export type MultiPoint = Array<Point>;
|
|
9
|
+
export type MultiLine = Array<Line>;
|
|
10
|
+
export type MultiPolygon = Array<Polygon>;
|
|
11
|
+
export type GeometryCollection = Array<Point | Line | Polygon>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU3BhdGlhbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2RhbC90eXBlL1NwYXRpYWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SqlType } from '../enum/SqlType';
|
|
2
|
+
export interface BaseSqlMap {
|
|
3
|
+
type?: SqlType;
|
|
4
|
+
}
|
|
5
|
+
export interface FullSqlMap extends BaseSqlMap {
|
|
6
|
+
type: SqlType.DELETE | SqlType.INSERT | SqlType.UPDATE | SqlType.SELECT;
|
|
7
|
+
sql: string;
|
|
8
|
+
}
|
|
9
|
+
export interface BlockSqlMap extends BaseSqlMap {
|
|
10
|
+
type: SqlType.BLOCK;
|
|
11
|
+
content: string;
|
|
12
|
+
}
|
|
13
|
+
export type SqlMap = FullSqlMap | BlockSqlMap;
|
|
14
|
+
export interface GenerateSqlMap {
|
|
15
|
+
name: string;
|
|
16
|
+
type: SqlType.DELETE | SqlType.UPDATE | SqlType.INSERT | SqlType.SELECT;
|
|
17
|
+
sql: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU3FsTWFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vZGFsL3R5cGUvU3FsTWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EggProtoImplClass, QualifierValue } from './core-decorator';
|
|
2
|
+
export type EggAbstractClazz<T extends object = object> = Function & {
|
|
3
|
+
prototype: T;
|
|
4
|
+
};
|
|
5
|
+
export type ImplTypeEnum = {
|
|
6
|
+
[id: string]: QualifierValue;
|
|
7
|
+
};
|
|
8
|
+
export type ImplDecorator<T extends object, Enum extends ImplTypeEnum> = (type: Enum[keyof Enum]) => ((clazz: EggProtoImplClass<T>) => void);
|
|
9
|
+
export interface EggObjectFactory {
|
|
10
|
+
getEggObject<T extends object>(abstractClazz: EggAbstractClazz<T>, qualifierValue: QualifierValue): Promise<T>;
|
|
11
|
+
getEggObjects<T extends object>(abstractClazz: EggAbstractClazz<T>): Promise<AsyncIterable<T>>;
|
|
12
|
+
}
|
|
13
|
+
export declare const QUALIFIER_IMPL_MAP: unique symbol;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QUALIFIER_IMPL_MAP = void 0;
|
|
4
|
+
exports.QUALIFIER_IMPL_MAP = Symbol.for('EggPrototype#qualifierImplMap');
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHluYW1pYy1pbmplY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9keW5hbWljLWluamVjdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFjYSxRQUFBLGtCQUFrQixHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsK0JBQStCLENBQUMsQ0FBQyJ9
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './aop';
|
|
2
|
+
export * from './common';
|
|
3
|
+
export * from './controller-decorator';
|
|
4
|
+
export * from './core-decorator';
|
|
5
|
+
export * from './dal';
|
|
6
|
+
export * from './dynamic-inject';
|
|
7
|
+
export * from './lifecycle';
|
|
8
|
+
export * from './metadata';
|
|
9
|
+
export * from './orm';
|
|
10
|
+
export * from './runtime';
|
|
11
|
+
export * from './schedule';
|
|
12
|
+
export * from './transaction';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
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("./aop"), exports);
|
|
18
|
+
__exportStar(require("./common"), exports);
|
|
19
|
+
__exportStar(require("./controller-decorator"), exports);
|
|
20
|
+
__exportStar(require("./core-decorator"), exports);
|
|
21
|
+
__exportStar(require("./dal"), exports);
|
|
22
|
+
__exportStar(require("./dynamic-inject"), exports);
|
|
23
|
+
__exportStar(require("./lifecycle"), exports);
|
|
24
|
+
__exportStar(require("./metadata"), exports);
|
|
25
|
+
__exportStar(require("./orm"), exports);
|
|
26
|
+
__exportStar(require("./runtime"), exports);
|
|
27
|
+
__exportStar(require("./schedule"), exports);
|
|
28
|
+
__exportStar(require("./transaction"), exports);
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsd0NBQXNCO0FBQ3RCLDJDQUF5QjtBQUN6Qix5REFBdUM7QUFDdkMsbURBQWlDO0FBQ2pDLHdDQUFzQjtBQUN0QixtREFBaUM7QUFDakMsOENBQTRCO0FBQzVCLDZDQUEyQjtBQUMzQix3Q0FBc0I7QUFDdEIsNENBQTBCO0FBQzFCLDZDQUEyQjtBQUMzQixnREFBOEIifQ==
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { EggObject, EggObjectLifeCycleContext } from '@eggjs/tegg-runtime';
|
|
2
|
+
/**
|
|
3
|
+
* lifecycle hook interface for egg object
|
|
4
|
+
*/
|
|
5
|
+
export interface EggObjectLifecycle {
|
|
6
|
+
/**
|
|
7
|
+
* call after construct
|
|
8
|
+
*/
|
|
9
|
+
postConstruct?(ctx: EggObjectLifeCycleContext, eggObj: EggObject): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* call before inject deps
|
|
12
|
+
*/
|
|
13
|
+
preInject?(ctx: EggObjectLifeCycleContext, eggObj: EggObject): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* call after inject deps
|
|
16
|
+
*/
|
|
17
|
+
postInject?(ctx: EggObjectLifeCycleContext, eggObj: EggObject): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* before object is ready
|
|
20
|
+
*/
|
|
21
|
+
init?(ctx: EggObjectLifeCycleContext, eggObj: EggObject): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* call before destroy
|
|
24
|
+
*/
|
|
25
|
+
preDestroy?(ctx: EggObjectLifeCycleContext, eggObj: EggObject): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* destroy the object
|
|
28
|
+
*/
|
|
29
|
+
destroy?(ctx: EggObjectLifeCycleContext, eggObj: EggObject): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
export type LifecycleHookName = keyof EggObjectLifecycle;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRWdnT2JqZWN0TGlmZWN5Y2xlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vbGlmZWN5Y2xlL0VnZ09iamVjdExpZmVjeWNsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSWRlbnRpY2FsT2JqZWN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vbGlmZWN5Y2xlL0lkZW50aWNhbE9iamVjdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IdenticalObject } from './IdenticalObject';
|
|
2
|
+
export interface LifecycleContext {
|
|
3
|
+
}
|
|
4
|
+
export interface LifecycleObject<T extends LifecycleContext> extends IdenticalObject {
|
|
5
|
+
init?(ctx: T): Promise<void>;
|
|
6
|
+
destroy?(ctx: T): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export interface LifecycleHook<T extends LifecycleContext, R extends LifecycleObject<T>> {
|
|
9
|
+
preCreate?(ctx: T, obj: R): Promise<void>;
|
|
10
|
+
postCreate?(ctx: T, obj: R): Promise<void>;
|
|
11
|
+
preDestroy?(ctx: T, obj: R): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTGlmZWN5Y2xlSG9vay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2xpZmVjeWNsZS9MaWZlY3ljbGVIb29rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./EggObjectLifecycle"), exports);
|
|
18
|
+
__exportStar(require("./IdenticalObject"), exports);
|
|
19
|
+
__exportStar(require("./LifecycleHook"), exports);
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWZlY3ljbGUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLHVEQUFxQztBQUNyQyxvREFBa0M7QUFDbEMsa0RBQWdDIn0=
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorCodes = void 0;
|
|
4
|
+
var ErrorCodes;
|
|
5
|
+
(function (ErrorCodes) {
|
|
6
|
+
ErrorCodes["EGG_PROTO_NOT_FOUND"] = "EGG_PROTO_NOT_FOUND";
|
|
7
|
+
ErrorCodes["MULTI_PROTO_FOUND"] = "MULTI_PROTO_FOUND";
|
|
8
|
+
ErrorCodes["INCOMPATIBLE_PROTO_INJECT"] = "INCOMPATIBLE_PROTO_INJECT";
|
|
9
|
+
})(ErrorCodes || (exports.ErrorCodes = ErrorCodes = {}));
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vbWV0YWRhdGEvZXJyb3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLElBQVksVUFJWDtBQUpELFdBQVksVUFBVTtJQUNwQix5REFBMkMsQ0FBQTtJQUMzQyxxREFBdUMsQ0FBQTtJQUN2QyxxRUFBdUQsQ0FBQTtBQUN6RCxDQUFDLEVBSlcsVUFBVSwwQkFBVixVQUFVLFFBSXJCIn0=
|
|
@@ -0,0 +1,21 @@
|
|
|
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("./model/EggPrototype"), exports);
|
|
18
|
+
__exportStar(require("./model/Loader"), exports);
|
|
19
|
+
__exportStar(require("./model/LoadUnit"), exports);
|
|
20
|
+
__exportStar(require("./errors"), exports);
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9tZXRhZGF0YS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsdURBQXFDO0FBQ3JDLGlEQUErQjtBQUMvQixtREFBaUM7QUFDakMsMkNBQXlCIn0=
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { AccessLevel, EggProtoImplClass, EggPrototypeInfo, EggPrototypeName, MetaDataKey, ObjectInitTypeLike, QualifierAttribute, QualifierInfo, QualifierValue } from '../../core-decorator';
|
|
2
|
+
import { LifecycleContext, LifecycleObject } from '../../lifecycle';
|
|
3
|
+
import { LoadUnit } from './LoadUnit';
|
|
4
|
+
export interface InjectObjectProto {
|
|
5
|
+
/**
|
|
6
|
+
* property name obj inject to
|
|
7
|
+
*/
|
|
8
|
+
refName: PropertyKey;
|
|
9
|
+
/**
|
|
10
|
+
* obj's name will be injected
|
|
11
|
+
*/
|
|
12
|
+
objName: PropertyKey;
|
|
13
|
+
/**
|
|
14
|
+
* inject qualifiers
|
|
15
|
+
*/
|
|
16
|
+
qualifiers: QualifierInfo[];
|
|
17
|
+
/**
|
|
18
|
+
* inject prototype
|
|
19
|
+
*/
|
|
20
|
+
proto: EggPrototype;
|
|
21
|
+
}
|
|
22
|
+
export interface InjectObject {
|
|
23
|
+
/**
|
|
24
|
+
* property name obj inject to
|
|
25
|
+
*/
|
|
26
|
+
refName: PropertyKey;
|
|
27
|
+
/**
|
|
28
|
+
* obj's name will be injected
|
|
29
|
+
*/
|
|
30
|
+
objName: PropertyKey;
|
|
31
|
+
/**
|
|
32
|
+
* obj's initType will be injected
|
|
33
|
+
* if null same as current obj
|
|
34
|
+
*/
|
|
35
|
+
initType?: ObjectInitTypeLike;
|
|
36
|
+
}
|
|
37
|
+
export type EggPrototypeClass = new (...args: any[]) => EggPrototype;
|
|
38
|
+
export interface EggPrototypeLifecycleContext extends LifecycleContext {
|
|
39
|
+
clazz: EggProtoImplClass;
|
|
40
|
+
prototypeInfo: EggPrototypeInfo;
|
|
41
|
+
loadUnit: LoadUnit;
|
|
42
|
+
}
|
|
43
|
+
export interface EggPrototype extends LifecycleObject<EggPrototypeLifecycleContext> {
|
|
44
|
+
readonly name: EggPrototypeName;
|
|
45
|
+
readonly initType: ObjectInitTypeLike;
|
|
46
|
+
readonly accessLevel: AccessLevel;
|
|
47
|
+
readonly loadUnitId: string;
|
|
48
|
+
readonly injectObjects: InjectObjectProto[];
|
|
49
|
+
readonly className?: string;
|
|
50
|
+
/**
|
|
51
|
+
* get metedata for key
|
|
52
|
+
* @param {MetaDataKey} metadataKey
|
|
53
|
+
*/
|
|
54
|
+
getMetaData<T>(metadataKey: MetaDataKey): T | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* verify proto is satisfied with qualifier
|
|
57
|
+
*
|
|
58
|
+
* default qualifier:
|
|
59
|
+
* - load unit name
|
|
60
|
+
* - init type
|
|
61
|
+
*
|
|
62
|
+
* @param qualifier
|
|
63
|
+
*/
|
|
64
|
+
verifyQualifier(qualifier: QualifierInfo): boolean;
|
|
65
|
+
verifyQualifiers(qualifiers: QualifierInfo[]): boolean;
|
|
66
|
+
getQualifier(attribute: QualifierAttribute): QualifierValue | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* construct egg object, not trigger lifecycle method/hook
|
|
69
|
+
*/
|
|
70
|
+
constructEggObject(): object;
|
|
71
|
+
}
|
|
72
|
+
export interface EggPrototypeWithClazz extends EggPrototype {
|
|
73
|
+
clazz?: EggProtoImplClass;
|
|
74
|
+
}
|
|
75
|
+
export type EggPrototypeCreator = (ctx: EggPrototypeLifecycleContext) => EggPrototype;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRWdnUHJvdG90eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbWV0YWRhdGEvbW9kZWwvRWdnUHJvdG90eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EggPrototypeName, QualifierInfo } from '../../core-decorator';
|
|
2
|
+
import { LifecycleContext, LifecycleObject } from '../../lifecycle';
|
|
3
|
+
import { EggPrototype } from './EggPrototype';
|
|
4
|
+
import { Loader } from './Loader';
|
|
5
|
+
export declare enum EggLoadUnitType {
|
|
6
|
+
MODULE = "MODULE",
|
|
7
|
+
PLUGIN = "PLUGIN",
|
|
8
|
+
APP = "APP"
|
|
9
|
+
}
|
|
10
|
+
export type EggLoadUnitTypeLike = EggLoadUnitType | string;
|
|
11
|
+
export interface LoadUnitLifecycleContext extends LifecycleContext {
|
|
12
|
+
unitPath: string;
|
|
13
|
+
loader: Loader;
|
|
14
|
+
}
|
|
15
|
+
export interface LoadUnit extends LifecycleObject<LoadUnitLifecycleContext> {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly unitPath: string;
|
|
18
|
+
readonly type: EggLoadUnitTypeLike;
|
|
19
|
+
iterateEggPrototype(): IterableIterator<EggPrototype>;
|
|
20
|
+
registerEggPrototype(proto: EggPrototype): void;
|
|
21
|
+
deletePrototype(proto: EggPrototype): any;
|
|
22
|
+
getEggPrototype(name: EggPrototypeName, qualifiers: QualifierInfo[]): EggPrototype[];
|
|
23
|
+
containPrototype(proto: EggPrototype): boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface LoadUnitPair {
|
|
26
|
+
loadUnit: LoadUnit;
|
|
27
|
+
ctx: LoadUnitLifecycleContext;
|
|
28
|
+
}
|
|
29
|
+
export type LoadUnitCreator = (ctx: LoadUnitLifecycleContext) => LoadUnit;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EggLoadUnitType = void 0;
|
|
4
|
+
var EggLoadUnitType;
|
|
5
|
+
(function (EggLoadUnitType) {
|
|
6
|
+
EggLoadUnitType["MODULE"] = "MODULE";
|
|
7
|
+
EggLoadUnitType["PLUGIN"] = "PLUGIN";
|
|
8
|
+
EggLoadUnitType["APP"] = "APP";
|
|
9
|
+
})(EggLoadUnitType || (exports.EggLoadUnitType = EggLoadUnitType = {}));
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9hZFVuaXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9tZXRhZGF0YS9tb2RlbC9Mb2FkVW5pdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFLQSxJQUFZLGVBSVg7QUFKRCxXQUFZLGVBQWU7SUFDekIsb0NBQWlCLENBQUE7SUFDakIsb0NBQWlCLENBQUE7SUFDakIsOEJBQVcsQ0FBQTtBQUNiLENBQUMsRUFKVyxlQUFlLCtCQUFmLGVBQWUsUUFJMUIifQ==
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9hZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbWV0YWRhdGEvbW9kZWwvTG9hZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
package/lib/orm.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface AttributeOptions {
|
|
2
|
+
name?: string;
|
|
3
|
+
allowNull?: boolean;
|
|
4
|
+
autoIncrement?: boolean;
|
|
5
|
+
primary?: boolean;
|
|
6
|
+
unique?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface IndexOptions {
|
|
9
|
+
unique?: boolean;
|
|
10
|
+
primary?: boolean;
|
|
11
|
+
name?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ModelParams {
|
|
14
|
+
tableName?: string;
|
|
15
|
+
dataSource?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ModelIndexInfo {
|
|
18
|
+
fields: string[];
|
|
19
|
+
options?: IndexOptions;
|
|
20
|
+
}
|
|
21
|
+
export interface ModelAttributeInfo {
|
|
22
|
+
dataType: string;
|
|
23
|
+
options?: AttributeOptions;
|
|
24
|
+
}
|
|
25
|
+
export declare const MODEL_PROTO_IMPL_TYPE = "MODEL_PROTO";
|
|
26
|
+
export declare const IS_MODEL: unique symbol;
|
|
27
|
+
export declare const MODEL_DATA_SOURCE: unique symbol;
|
|
28
|
+
export declare const MODEL_DATA_TABLE_NAME: unique symbol;
|
|
29
|
+
export declare const MODEL_DATA_INDICES: unique symbol;
|
|
30
|
+
export declare const MODEL_DATA_ATTRIBUTES: unique symbol;
|
package/lib/orm.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MODEL_DATA_ATTRIBUTES = exports.MODEL_DATA_INDICES = exports.MODEL_DATA_TABLE_NAME = exports.MODEL_DATA_SOURCE = exports.IS_MODEL = exports.MODEL_PROTO_IMPL_TYPE = void 0;
|
|
4
|
+
exports.MODEL_PROTO_IMPL_TYPE = 'MODEL_PROTO';
|
|
5
|
+
exports.IS_MODEL = Symbol.for('EggPrototype#model#isModel');
|
|
6
|
+
exports.MODEL_DATA_SOURCE = Symbol.for('EggPrototype#model#dataSource');
|
|
7
|
+
exports.MODEL_DATA_TABLE_NAME = Symbol.for('EggPrototype#model#tableName');
|
|
8
|
+
exports.MODEL_DATA_INDICES = Symbol.for('EggPrototype#model#indices');
|
|
9
|
+
exports.MODEL_DATA_ATTRIBUTES = Symbol.for('EggPrototype#model#attributes');
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vb3JtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQWtDYSxRQUFBLHFCQUFxQixHQUFHLGFBQWEsQ0FBQztBQUV0QyxRQUFBLFFBQVEsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLDRCQUE0QixDQUFDLENBQUM7QUFDcEQsUUFBQSxpQkFBaUIsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLCtCQUErQixDQUFDLENBQUM7QUFDaEUsUUFBQSxxQkFBcUIsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLDhCQUE4QixDQUFDLENBQUM7QUFDbkUsUUFBQSxrQkFBa0IsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLDRCQUE0QixDQUFDLENBQUM7QUFDOUQsUUFBQSxxQkFBcUIsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLCtCQUErQixDQUFDLENBQUMifQ==
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EggObjectName } from '../core-decorator';
|
|
2
|
+
import type { LifecycleContext } from '../lifecycle';
|
|
3
|
+
import type { EggPrototype } from '../metadata';
|
|
4
|
+
import type { EggContainer } from './model/EggContainer';
|
|
5
|
+
import type { EggObject, EggObjectLifeCycleContext } from './model/EggObject';
|
|
6
|
+
export type ContainerGetMethod = (proto: EggPrototype) => EggContainer<LifecycleContext>;
|
|
7
|
+
export type CreateObjectMethod = (name: EggObjectName, proto: EggPrototype, lifecycleContext: EggObjectLifeCycleContext) => Promise<EggObject>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmFjdG9yeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3J1bnRpbWUvRmFjdG9yeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|