oak-domain 1.0.4 → 1.1.2
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/lib/actions/action.d.ts +9 -1
- package/lib/actions/action.js +6 -2
- package/lib/base-app-domain/ActionDefDict.d.ts +5 -0
- package/lib/base-app-domain/ActionDefDict.js +7 -0
- package/lib/base-app-domain/EntityDict.d.ts +12 -0
- package/lib/base-app-domain/EntityDict.js +2 -0
- package/lib/base-app-domain/Modi/Action.d.ts +10 -0
- package/lib/base-app-domain/Modi/Action.js +14 -0
- package/lib/base-app-domain/Modi/Schema.d.ts +164 -0
- package/lib/base-app-domain/Modi/Schema.js +2 -0
- package/lib/base-app-domain/Modi/Storage.d.ts +3 -0
- package/lib/base-app-domain/Modi/Storage.js +60 -0
- package/lib/base-app-domain/ModiEntity/Schema.d.ts +179 -0
- package/lib/base-app-domain/ModiEntity/Schema.js +2 -0
- package/lib/base-app-domain/ModiEntity/Storage.d.ts +3 -0
- package/lib/base-app-domain/ModiEntity/Storage.js +26 -0
- package/lib/base-app-domain/Oper/Schema.d.ts +161 -0
- package/lib/base-app-domain/Oper/Schema.js +2 -0
- package/lib/base-app-domain/Oper/Storage.d.ts +3 -0
- package/lib/base-app-domain/Oper/Storage.js +29 -0
- package/lib/base-app-domain/OperEntity/Schema.d.ts +196 -0
- package/lib/base-app-domain/OperEntity/Schema.js +2 -0
- package/lib/base-app-domain/OperEntity/Storage.d.ts +3 -0
- package/lib/base-app-domain/OperEntity/Storage.js +26 -0
- package/lib/base-app-domain/Storage.d.ts +3 -0
- package/lib/base-app-domain/Storage.js +15 -0
- package/lib/base-app-domain/User/Schema.d.ts +140 -0
- package/lib/base-app-domain/User/Schema.js +2 -0
- package/lib/base-app-domain/User/Storage.d.ts +3 -0
- package/lib/base-app-domain/User/Storage.js +25 -0
- package/lib/base-app-domain/_SubQuery.d.ts +36 -0
- package/lib/base-app-domain/_SubQuery.js +2 -0
- package/lib/base-app-domain/index.d.ts +3 -0
- package/lib/base-app-domain/index.js +6 -0
- package/lib/checkers/index.d.ts +3 -0
- package/lib/checkers/index.js +8 -0
- package/lib/compiler/env.d.ts +4 -3
- package/lib/compiler/env.js +22 -9
- package/lib/compiler/schemalBuilder.js +631 -230
- package/lib/entities/Action.d.ts +12 -0
- package/lib/entities/Action.js +17 -0
- package/lib/entities/Modi.d.ts +11 -0
- package/lib/entities/Modi.js +46 -0
- package/lib/entities/ModiEntity.d.ts +8 -0
- package/lib/entities/ModiEntity.js +15 -0
- package/lib/entities/Ooperation.d.ts +12 -0
- package/lib/entities/Ooperation.js +17 -0
- package/lib/entities/Oper.d.ts +10 -0
- package/lib/entities/Oper.js +17 -0
- package/lib/entities/OperEntity.d.ts +8 -0
- package/lib/entities/OperEntity.js +15 -0
- package/lib/entities/Update.d.ts +9 -0
- package/lib/entities/Update.js +44 -0
- package/lib/entities/User.d.ts +7 -0
- package/lib/entities/User.js +12 -0
- package/lib/entities/Uupdate.d.ts +9 -0
- package/lib/entities/Uupdate.js +44 -0
- package/lib/store/CascadeStore.d.ts +31 -6
- package/lib/store/CascadeStore.js +1043 -151
- package/lib/store/TriggerExecutor.d.ts +4 -3
- package/lib/store/TriggerExecutor.js +7 -4
- package/lib/store/UniversalContext.d.ts +1 -0
- package/lib/store/action.d.ts +6 -0
- package/lib/store/action.js +14 -0
- package/lib/store/actionDef.js +23 -5
- package/lib/store/filter.d.ts +6 -0
- package/lib/store/filter.js +56 -1
- package/lib/store/modi.d.ts +12 -0
- package/lib/store/modi.js +190 -0
- package/lib/store/projection.d.ts +7 -0
- package/lib/store/projection.js +211 -0
- package/lib/store/selection.d.ts +7 -0
- package/lib/store/selection.js +227 -0
- package/lib/triggers/index.d.ts +5 -0
- package/lib/triggers/index.js +11 -0
- package/lib/triggers/modi.d.ts +5 -0
- package/lib/triggers/modi.js +72 -0
- package/lib/types/Context.d.ts +1 -0
- package/lib/types/DataType.d.ts +1 -1
- package/lib/types/Entity.d.ts +29 -16
- package/lib/types/Exception.d.ts +28 -0
- package/lib/types/Exception.js +67 -1
- package/lib/types/Expression.d.ts +9 -0
- package/lib/types/Expression.js +39 -1
- package/lib/types/RowStore.d.ts +3 -3
- package/lib/types/Storage.d.ts +6 -0
- package/lib/types/Trigger.d.ts +5 -5
- package/lib/utils/lodash.d.ts +4 -1
- package/lib/utils/lodash.js +7 -1
- package/package.json +7 -3
- package/src/entities/Modi.ts +68 -0
- package/src/entities/ModiEntity.ts +24 -0
- package/src/entities/Oper.ts +28 -0
- package/src/entities/OperEntity.ts +24 -0
- package/src/entities/User.ts +20 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { EntityDict } from '../base-app-domain';
|
|
2
|
+
import { StorageSchema, EntityDict as BaseEntityDict, Context } from '../types';
|
|
3
|
+
export declare function createCheckers<ED extends EntityDict & BaseEntityDict, Cxt extends Context<ED>>(schema: StorageSchema<ED>): import("../types").Checker<ED, keyof ED, Cxt>[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createCheckers = void 0;
|
|
4
|
+
var modi_1 = require("../store/modi");
|
|
5
|
+
function createCheckers(schema) {
|
|
6
|
+
return (0, modi_1.createModiRelatedCheckers)(schema);
|
|
7
|
+
}
|
|
8
|
+
exports.createCheckers = createCheckers;
|
package/lib/compiler/env.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export declare const LIB_OAK_DOMAIN = "oak-domain";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const LIB_PATH: () => string;
|
|
3
3
|
export declare const ENTITY_PATH_IN_OAK_GENERAL_BUSINESS: () => string;
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
4
|
+
export declare const ENTITY_PATH_IN_OAK_DOMAIN: () => string;
|
|
5
|
+
export declare const TYPE_PATH_IN_OAK_DOMAIN: (level?: number) => string;
|
|
6
|
+
export declare const ACTION_CONSTANT_IN_OAK_DOMAIN: (level?: number) => string;
|
|
6
7
|
export declare const RESERVED_ENTITIES: string[];
|
|
7
8
|
export declare const STRING_LITERAL_MAX_LENGTH = 16;
|
|
8
9
|
export declare const NUMERICAL_LITERL_DEFAULT_PRECISION = 8;
|
package/lib/compiler/env.js
CHANGED
|
@@ -1,25 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.INT_LITERL_DEFAULT_WIDTH = exports.NUMERICAL_LITERL_DEFAULT_SCALE = exports.NUMERICAL_LITERL_DEFAULT_PRECISION = exports.STRING_LITERAL_MAX_LENGTH = exports.RESERVED_ENTITIES = exports.ACTION_CONSTANT_IN_OAK_DOMAIN = exports.TYPE_PATH_IN_OAK_DOMAIN = exports.ENTITY_PATH_IN_OAK_GENERAL_BUSINESS = exports.
|
|
3
|
+
exports.INT_LITERL_DEFAULT_WIDTH = exports.NUMERICAL_LITERL_DEFAULT_SCALE = exports.NUMERICAL_LITERL_DEFAULT_PRECISION = exports.STRING_LITERAL_MAX_LENGTH = exports.RESERVED_ENTITIES = exports.ACTION_CONSTANT_IN_OAK_DOMAIN = exports.TYPE_PATH_IN_OAK_DOMAIN = exports.ENTITY_PATH_IN_OAK_DOMAIN = exports.ENTITY_PATH_IN_OAK_GENERAL_BUSINESS = exports.LIB_PATH = exports.LIB_OAK_DOMAIN = void 0;
|
|
4
4
|
exports.LIB_OAK_DOMAIN = 'oak-domain';
|
|
5
5
|
var LIB_OAK_GENERAL_BUSINESS = 'oak-general-business';
|
|
6
|
-
var
|
|
7
|
-
exports.
|
|
6
|
+
var LIB_PATH = function () { return 'lib'; };
|
|
7
|
+
exports.LIB_PATH = LIB_PATH;
|
|
8
8
|
var LEVEL_PREFIX = ['.', '..', '../..', '../../..', '../../../..'];
|
|
9
9
|
var ENTITY_PATH_IN_OAK_GENERAL_BUSINESS = function () {
|
|
10
|
-
return "".concat(LIB_OAK_GENERAL_BUSINESS, "/").concat((0, exports.
|
|
10
|
+
return "".concat(LIB_OAK_GENERAL_BUSINESS, "/").concat((0, exports.LIB_PATH)(), "/entities/");
|
|
11
11
|
};
|
|
12
12
|
exports.ENTITY_PATH_IN_OAK_GENERAL_BUSINESS = ENTITY_PATH_IN_OAK_GENERAL_BUSINESS;
|
|
13
|
-
var
|
|
14
|
-
return "".concat(exports.LIB_OAK_DOMAIN, "/").concat((0, exports.
|
|
13
|
+
var ENTITY_PATH_IN_OAK_DOMAIN = function () {
|
|
14
|
+
return "".concat(exports.LIB_OAK_DOMAIN, "/").concat((0, exports.LIB_PATH)(), "/entities/");
|
|
15
|
+
};
|
|
16
|
+
exports.ENTITY_PATH_IN_OAK_DOMAIN = ENTITY_PATH_IN_OAK_DOMAIN;
|
|
17
|
+
var TYPE_PATH_IN_OAK_DOMAIN = function (level) {
|
|
18
|
+
if (level === void 0) { level = 2; }
|
|
19
|
+
if (process.env.COMPLING_IN_DOMAIN) {
|
|
20
|
+
return "".concat(LEVEL_PREFIX[level], "/types/");
|
|
21
|
+
}
|
|
22
|
+
return "".concat(exports.LIB_OAK_DOMAIN, "/").concat((0, exports.LIB_PATH)(), "/types/");
|
|
15
23
|
};
|
|
16
24
|
exports.TYPE_PATH_IN_OAK_DOMAIN = TYPE_PATH_IN_OAK_DOMAIN;
|
|
17
|
-
var ACTION_CONSTANT_IN_OAK_DOMAIN = function () {
|
|
18
|
-
|
|
25
|
+
var ACTION_CONSTANT_IN_OAK_DOMAIN = function (level) {
|
|
26
|
+
if (level === void 0) { level = 2; }
|
|
27
|
+
if (process.env.COMPLING_IN_DOMAIN) {
|
|
28
|
+
return "".concat(LEVEL_PREFIX[level], "/actions/action");
|
|
29
|
+
}
|
|
30
|
+
return "".concat(exports.LIB_OAK_DOMAIN, "/").concat((0, exports.LIB_PATH)(), "/actions/action");
|
|
19
31
|
};
|
|
20
32
|
exports.ACTION_CONSTANT_IN_OAK_DOMAIN = ACTION_CONSTANT_IN_OAK_DOMAIN;
|
|
21
33
|
// export const OUTPUT_PATH = 'app-domain/entities';
|
|
22
|
-
exports.RESERVED_ENTITIES = ['Schema', 'Filter', 'Query', 'SubQuery', 'Entity', 'Selection', 'Operation', 'File', 'Common',
|
|
34
|
+
exports.RESERVED_ENTITIES = ['Schema', 'Filter', 'Query', 'SubQuery', 'Entity', 'Selection', 'Operation', 'File', 'Common',
|
|
35
|
+
'Locale', 'Projection', 'Data'];
|
|
23
36
|
exports.STRING_LITERAL_MAX_LENGTH = 16;
|
|
24
37
|
exports.NUMERICAL_LITERL_DEFAULT_PRECISION = 8;
|
|
25
38
|
exports.NUMERICAL_LITERL_DEFAULT_SCALE = 2;
|