oak-domain 4.5.0 → 5.0.0
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/base-app-domain/ActionDefDict.d.ts +1 -1
- package/lib/base-app-domain/ActionDefDict.js +4 -4
- package/lib/base-app-domain/I18n/Storage.js +0 -1
- package/lib/base-app-domain/Modi/Action.d.ts +1 -1
- package/lib/base-app-domain/Modi/Action.js +2 -2
- package/lib/base-app-domain/Modi/Style.d.ts +3 -0
- package/lib/base-app-domain/Modi/Style.js +16 -0
- package/lib/base-app-domain/ModiEntity/Schema.d.ts +14 -0
- package/lib/base-app-domain/OperEntity/Schema.d.ts +14 -0
- package/lib/base-app-domain/StyleDict.d.ts +3 -0
- package/lib/base-app-domain/StyleDict.js +9 -0
- package/lib/base-app-domain/User/Action.d.ts +1 -1
- package/lib/base-app-domain/User/Action.js +2 -2
- package/lib/base-app-domain/User/Style.d.ts +3 -0
- package/lib/base-app-domain/User/Style.js +14 -0
- package/lib/base-app-domain/index.d.ts +1 -0
- package/lib/base-app-domain/index.js +1 -0
- package/lib/compiler/dependencyBuilder.d.ts +21 -0
- package/lib/compiler/dependencyBuilder.js +873 -0
- package/lib/compiler/env.d.ts +1 -1
- package/lib/compiler/env.js +2 -8
- package/lib/compiler/localeBuilder.js +13 -7
- package/lib/compiler/routerBuilder.js +29 -44
- package/lib/compiler/schemalBuilder.js +67 -8
- package/lib/entities/I18n.js +0 -3
- package/lib/entities/Modi.js +13 -0
- package/lib/entities/User.js +11 -0
- package/lib/store/IntrinsicCheckers.d.ts +2 -2
- package/lib/store/IntrinsicCheckers.js +83 -17
- package/lib/store/IntrinsicLogics.d.ts +2 -2
- package/lib/store/IntrinsicLogics.js +3 -3
- package/lib/store/filter.d.ts +47 -0
- package/lib/store/filter.js +49 -6
- package/lib/types/Action.d.ts +1 -1
- package/lib/types/Configuration.d.ts +42 -7
- package/lib/types/Configuration.js +0 -1
- package/lib/types/Connector.d.ts +3 -0
- package/lib/types/EntityDesc.d.ts +10 -3
- package/lib/types/Style.d.ts +35 -6
- package/lib/utils/SimpleConnector.d.ts +6 -10
- package/lib/utils/SimpleConnector.js +33 -20
- package/lib/utils/assert.d.ts +1 -0
- package/lib/utils/lodash.d.ts +10 -1
- package/lib/utils/lodash.js +27 -1
- package/lib/utils/module/combine.common.d.ts +15 -0
- package/lib/utils/module/combine.common.js +27 -0
- package/lib/utils/module/combine.d.ts +1 -0
- package/lib/utils/module/combine.dev.d.ts +17 -0
- package/lib/utils/module/combine.dev.js +55 -0
- package/lib/utils/module/combine.js +4 -0
- package/lib/utils/module/combine.prod.d.ts +8 -0
- package/lib/utils/module/combine.prod.js +8 -0
- package/lib/utils/module/combine.server.d.ts +17 -0
- package/lib/utils/module/combine.server.js +55 -0
- package/lib/utils/relationPath.js +1 -1
- package/package.json +1 -1
- package/src/entities/ActionAuth.ts +41 -41
- package/src/entities/I18n.ts +0 -3
- package/src/entities/Modi.ts +13 -0
- package/src/entities/ModiEntity.ts +26 -26
- package/src/entities/OperEntity.ts +27 -27
- package/src/entities/Path.ts +43 -43
- package/src/entities/Relation.ts +43 -43
- package/src/entities/RelationAuth.ts +44 -44
- package/src/entities/User.ts +12 -1
- package/src/entities/UserEntityClaim.ts +29 -29
- package/src/entities/UserEntityGrant.ts +24 -24
- package/src/entities/UserRelation.ts +50 -50
- package/lib/actions/relation.d.ts +0 -5
- package/lib/actions/relation.js +0 -25
- package/lib/base-app-domain/UserEntityGrant/Action.d.ts +0 -5
- package/lib/base-app-domain/UserEntityGrant/Action.js +0 -5
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.actionDefDict = void 0;
|
|
4
4
|
const Action_1 = require("./Modi/Action");
|
|
5
5
|
const Action_2 = require("./User/Action");
|
|
6
|
-
exports.
|
|
7
|
-
modi: Action_1.
|
|
8
|
-
user: Action_2.
|
|
6
|
+
exports.actionDefDict = {
|
|
7
|
+
modi: Action_1.actionDefDict,
|
|
8
|
+
user: Action_2.actionDefDict
|
|
9
9
|
};
|
|
@@ -5,6 +5,6 @@ export type IAction = 'apply' | 'abandon' | string;
|
|
|
5
5
|
export type ParticularAction = IAction;
|
|
6
6
|
export declare const actions: string[];
|
|
7
7
|
export type Action = GenericAction | ParticularAction | string;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const actionDefDict: {
|
|
9
9
|
iState: ActionDef<string, string>;
|
|
10
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.actionDefDict = exports.actions = void 0;
|
|
4
4
|
const IActionDef = {
|
|
5
5
|
stm: {
|
|
6
6
|
apply: ['active', 'applied'],
|
|
@@ -9,6 +9,6 @@ const IActionDef = {
|
|
|
9
9
|
is: 'active',
|
|
10
10
|
};
|
|
11
11
|
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "apply", "abandon"];
|
|
12
|
-
exports.
|
|
12
|
+
exports.actionDefDict = {
|
|
13
13
|
iState: IActionDef
|
|
14
14
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.style = void 0;
|
|
4
|
+
exports.style = {
|
|
5
|
+
icon: {
|
|
6
|
+
apply: '',
|
|
7
|
+
abandon: '',
|
|
8
|
+
},
|
|
9
|
+
color: {
|
|
10
|
+
iState: {
|
|
11
|
+
active: '#0000FF',
|
|
12
|
+
applied: '#008000',
|
|
13
|
+
abandoned: '#A9A9A9',
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
@@ -177,6 +177,14 @@ export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "enti
|
|
|
177
177
|
entity: "actionAuth";
|
|
178
178
|
entityId: ForeignKey<"ActionAuth">;
|
|
179
179
|
actionAuth?: never;
|
|
180
|
+
} | {
|
|
181
|
+
entity?: never;
|
|
182
|
+
entityId?: never;
|
|
183
|
+
i18n: I18n.CreateSingleOperation;
|
|
184
|
+
} | {
|
|
185
|
+
entity: "i18n";
|
|
186
|
+
entityId: ForeignKey<"I18n">;
|
|
187
|
+
i18n?: I18n.UpdateOperation;
|
|
180
188
|
} | {
|
|
181
189
|
entity: "i18n";
|
|
182
190
|
entityId: ForeignKey<"I18n">;
|
|
@@ -289,6 +297,10 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "enti
|
|
|
289
297
|
actionAuth?: ActionAuth.CreateSingleOperation | ActionAuth.UpdateOperation | ActionAuth.RemoveOperation;
|
|
290
298
|
entityId?: never;
|
|
291
299
|
entity?: never;
|
|
300
|
+
} | {
|
|
301
|
+
i18n?: I18n.CreateSingleOperation | I18n.UpdateOperation | I18n.RemoveOperation;
|
|
302
|
+
entityId?: never;
|
|
303
|
+
entity?: never;
|
|
292
304
|
} | {
|
|
293
305
|
path?: Path.CreateSingleOperation | Path.UpdateOperation | Path.RemoveOperation;
|
|
294
306
|
entityId?: never;
|
|
@@ -337,6 +349,8 @@ export type RemoveOperationData = {} & (({
|
|
|
337
349
|
modi?: Modi.UpdateOperation | Modi.RemoveOperation;
|
|
338
350
|
})) & ({
|
|
339
351
|
actionAuth?: ActionAuth.UpdateOperation | ActionAuth.RemoveOperation;
|
|
352
|
+
} | {
|
|
353
|
+
i18n?: I18n.UpdateOperation | I18n.RemoveOperation;
|
|
340
354
|
} | {
|
|
341
355
|
path?: Path.UpdateOperation | Path.RemoveOperation;
|
|
342
356
|
} | {
|
|
@@ -174,6 +174,14 @@ export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "enti
|
|
|
174
174
|
entity: "actionAuth";
|
|
175
175
|
entityId: ForeignKey<"ActionAuth">;
|
|
176
176
|
actionAuth?: never;
|
|
177
|
+
} | {
|
|
178
|
+
entity?: never;
|
|
179
|
+
entityId?: never;
|
|
180
|
+
i18n: I18n.CreateSingleOperation;
|
|
181
|
+
} | {
|
|
182
|
+
entity: "i18n";
|
|
183
|
+
entityId: ForeignKey<"I18n">;
|
|
184
|
+
i18n?: I18n.UpdateOperation;
|
|
177
185
|
} | {
|
|
178
186
|
entity: "i18n";
|
|
179
187
|
entityId: ForeignKey<"I18n">;
|
|
@@ -280,6 +288,10 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "enti
|
|
|
280
288
|
actionAuth?: ActionAuth.CreateSingleOperation | ActionAuth.UpdateOperation | ActionAuth.RemoveOperation;
|
|
281
289
|
entityId?: never;
|
|
282
290
|
entity?: never;
|
|
291
|
+
} | {
|
|
292
|
+
i18n?: I18n.CreateSingleOperation | I18n.UpdateOperation | I18n.RemoveOperation;
|
|
293
|
+
entityId?: never;
|
|
294
|
+
entity?: never;
|
|
283
295
|
} | {
|
|
284
296
|
path?: Path.CreateSingleOperation | Path.UpdateOperation | Path.RemoveOperation;
|
|
285
297
|
entityId?: never;
|
|
@@ -326,6 +338,8 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "enti
|
|
|
326
338
|
export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
|
327
339
|
export type RemoveOperationData = {} & ({
|
|
328
340
|
actionAuth?: ActionAuth.UpdateOperation | ActionAuth.RemoveOperation;
|
|
341
|
+
} | {
|
|
342
|
+
i18n?: I18n.UpdateOperation | I18n.RemoveOperation;
|
|
329
343
|
} | {
|
|
330
344
|
path?: Path.UpdateOperation | Path.RemoveOperation;
|
|
331
345
|
} | {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.styleDict = void 0;
|
|
4
|
+
const Style_1 = require("./Modi/Style");
|
|
5
|
+
const Style_2 = require("./User/Style");
|
|
6
|
+
exports.styleDict = {
|
|
7
|
+
modi: Style_1.style,
|
|
8
|
+
user: Style_2.style
|
|
9
|
+
};
|
|
@@ -6,6 +6,6 @@ export type ParticularAction = UserAction;
|
|
|
6
6
|
export declare const actions: string[];
|
|
7
7
|
export declare const UserActionDef: ActionDef<UserAction, UserState>;
|
|
8
8
|
export type Action = GenericAction | ParticularAction | RelationAction | string;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const actionDefDict: {
|
|
10
10
|
userState: ActionDef<string, string>;
|
|
11
11
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.actionDefDict = exports.UserActionDef = exports.actions = void 0;
|
|
4
4
|
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "grant", "revoke", "mergeTo"];
|
|
5
5
|
exports.UserActionDef = {
|
|
6
6
|
stm: {
|
|
7
7
|
mergeTo: ['normal', 'merged'],
|
|
8
8
|
},
|
|
9
9
|
};
|
|
10
|
-
exports.
|
|
10
|
+
exports.actionDefDict = {
|
|
11
11
|
userState: exports.UserActionDef
|
|
12
12
|
};
|
|
@@ -5,3 +5,4 @@ tslib_1.__exportStar(require("./EntityDict"), exports);
|
|
|
5
5
|
tslib_1.__exportStar(require("./Storage"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./ActionDefDict"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./Relation"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./StyleDict"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type DepNode = {
|
|
2
|
+
name: string;
|
|
3
|
+
parent?: DepNode;
|
|
4
|
+
};
|
|
5
|
+
type DepGraph = {
|
|
6
|
+
nodeDict: Record<string, DepNode>;
|
|
7
|
+
roots: DepNode[];
|
|
8
|
+
ascOrder: string[];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* 构建项目依赖关系图
|
|
12
|
+
* @param cwd
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare function analyzeDepedency(cwd: string): DepGraph;
|
|
16
|
+
/**
|
|
17
|
+
* 本函数用于构建src/initialize.dev, src/initialize.prod, src/initializeFeatures, src/context/FrontendContext, src/contextBackendContext
|
|
18
|
+
* 这些和dependency相关的项目文件
|
|
19
|
+
*/
|
|
20
|
+
export default function buildDependency(rebuild?: boolean): void;
|
|
21
|
+
export {};
|