oak-domain 4.0.1 → 4.0.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/lib/actions/action.d.ts +16 -16
- package/lib/actions/action.js +17 -17
- package/lib/actions/relation.d.ts +5 -5
- package/lib/actions/relation.js +25 -25
- package/lib/base-app-domain/ActionAuth/Schema.d.ts +186 -186
- package/lib/base-app-domain/ActionAuth/Storage.js +39 -39
- package/lib/base-app-domain/ActionDefDict.d.ts +8 -8
- package/lib/base-app-domain/ActionDefDict.js +9 -9
- package/lib/base-app-domain/EntityDict.d.ts +28 -28
- package/lib/base-app-domain/I18n/Schema.d.ts +129 -129
- package/lib/base-app-domain/I18n/Schema.js +2 -2
- package/lib/base-app-domain/I18n/Storage.d.ts +3 -3
- package/lib/base-app-domain/I18n/Storage.js +59 -59
- package/lib/base-app-domain/Modi/Action.d.ts +10 -10
- package/lib/base-app-domain/Modi/Action.js +14 -14
- package/lib/base-app-domain/Modi/Schema.d.ts +136 -136
- package/lib/base-app-domain/Modi/Storage.js +63 -63
- package/lib/base-app-domain/ModiEntity/Schema.d.ts +384 -384
- package/lib/base-app-domain/ModiEntity/Storage.js +30 -30
- package/lib/base-app-domain/Oper/Schema.d.ts +153 -153
- package/lib/base-app-domain/Oper/Storage.js +38 -38
- package/lib/base-app-domain/OperEntity/Schema.d.ts +373 -373
- package/lib/base-app-domain/OperEntity/Storage.js +30 -30
- package/lib/base-app-domain/Path/Schema.d.ts +149 -149
- package/lib/base-app-domain/Path/Schema.js +2 -2
- package/lib/base-app-domain/Path/Storage.d.ts +3 -3
- package/lib/base-app-domain/Path/Storage.js +54 -54
- package/lib/base-app-domain/Relation/Schema.d.ts +188 -188
- package/lib/base-app-domain/Relation/Storage.js +54 -54
- package/lib/base-app-domain/Relation.d.ts +2 -2
- package/lib/base-app-domain/Relation.js +4 -4
- package/lib/base-app-domain/RelationAuth/Schema.d.ts +214 -214
- package/lib/base-app-domain/RelationAuth/Storage.js +44 -44
- package/lib/base-app-domain/Storage.js +31 -31
- package/lib/base-app-domain/User/Action.d.ts +10 -10
- package/lib/base-app-domain/User/Action.js +12 -12
- package/lib/base-app-domain/User/Schema.d.ts +210 -210
- package/lib/base-app-domain/User/Storage.js +33 -33
- package/lib/base-app-domain/UserEntityClaim/Schema.d.ts +264 -264
- package/lib/base-app-domain/UserEntityClaim/Schema.js +2 -2
- package/lib/base-app-domain/UserEntityClaim/Storage.d.ts +3 -3
- package/lib/base-app-domain/UserEntityClaim/Storage.js +37 -37
- package/lib/base-app-domain/UserEntityGrant/Schema.d.ts +131 -131
- package/lib/base-app-domain/UserEntityGrant/Storage.js +25 -25
- package/lib/base-app-domain/UserRelation/Schema.d.ts +208 -208
- package/lib/base-app-domain/UserRelation/Storage.js +56 -56
- package/lib/base-app-domain/_SubQuery.d.ts +142 -142
- package/lib/base-app-domain/index.d.ts +4 -4
- package/lib/base-app-domain/index.js +7 -7
- package/lib/checkers/index.d.ts +5 -5
- package/lib/checkers/index.js +13 -13
- package/lib/compiler/entities.d.ts +2 -2
- package/lib/compiler/entities.js +7 -7
- package/lib/compiler/env.d.ts +13 -13
- package/lib/compiler/env.js +45 -45
- package/lib/compiler/localeBuilder.d.ts +1 -1
- package/lib/compiler/localeBuilder.js +49 -18
- package/lib/compiler/routerBuilder.d.ts +1 -0
- package/lib/compiler/routerBuilder.js +263 -0
- package/lib/compiler/schemalBuilder.d.ts +27 -27
- package/lib/compiler/schemalBuilder.js +3565 -3565
- package/lib/entities/ActionAuth.d.ts +10 -10
- package/lib/entities/ActionAuth.js +31 -31
- package/lib/entities/I18n.d.ts +9 -9
- package/lib/entities/I18n.js +36 -36
- package/lib/entities/Modi.js +49 -49
- package/lib/entities/ModiEntity.js +18 -18
- package/lib/entities/Oper.js +21 -21
- package/lib/entities/OperEntity.js +18 -18
- package/lib/entities/Path.d.ts +8 -8
- package/lib/entities/Path.js +35 -35
- package/lib/entities/Relation.d.ts +8 -8
- package/lib/entities/Relation.js +35 -35
- package/lib/entities/RelationAuth.d.ts +8 -8
- package/lib/entities/RelationAuth.js +34 -34
- package/lib/entities/User.js +31 -31
- package/lib/entities/UserEntityClaim.d.ts +13 -13
- package/lib/entities/UserEntityClaim.js +17 -17
- package/lib/entities/UserEntityGrant.d.ts +9 -9
- package/lib/entities/UserEntityGrant.js +15 -15
- package/lib/entities/UserRelation.d.ts +10 -10
- package/lib/entities/UserRelation.js +38 -38
- package/lib/index.d.ts +23 -23
- package/lib/index.js +37 -37
- package/lib/store/AsyncRowStore.d.ts +65 -65
- package/lib/store/AsyncRowStore.js +9 -5
- package/lib/store/CascadeStore.d.ts +109 -106
- package/lib/store/CascadeStore.js +1748 -1740
- package/lib/store/RelationAuth.d.ts +7 -0
- package/lib/store/RelationAuth.js +11 -4
- package/lib/store/SyncRowStore.d.ts +29 -29
- package/lib/store/SyncRowStore.js +50 -50
- package/lib/store/TriggerExecutor.d.ts +41 -41
- package/lib/store/TriggerExecutor.js +468 -468
- package/lib/store/actionAuth.d.ts +4 -4
- package/lib/store/actionAuth.js +25 -25
- package/lib/store/actionDef.d.ts +10 -10
- package/lib/store/actionDef.js +278 -278
- package/lib/store/checker.d.ts +26 -26
- package/lib/store/checker.js +2 -2
- package/lib/store/filter.d.ts +85 -85
- package/lib/store/filter.js +1652 -1652
- package/lib/store/modi.d.ts +13 -13
- package/lib/store/modi.js +254 -254
- package/lib/store/relation.d.ts +12 -12
- package/lib/store/relation.js +67 -67
- package/lib/timers/oper.d.ts +18 -18
- package/lib/timers/oper.js +57 -57
- package/lib/timers/vaccum.d.ts +20 -20
- package/lib/timers/vaccum.js +111 -111
- package/lib/triggers/index.d.ts +5 -5
- package/lib/triggers/index.js +8 -8
- package/lib/types/Action.d.ts +20 -20
- package/lib/types/AppLoader.d.ts +17 -17
- package/lib/types/AppLoader.js +10 -10
- package/lib/types/Auth.d.ts +70 -70
- package/lib/types/Cluster.d.ts +5 -5
- package/lib/types/Cluster.js +2 -2
- package/lib/types/Connector.d.ts +38 -38
- package/lib/types/Connector.js +2 -2
- package/lib/types/DataType.d.ts +25 -25
- package/lib/types/DataType.js +6 -6
- package/lib/types/Demand.d.ts +89 -89
- package/lib/types/Demand.js +10 -10
- package/lib/types/Endpoint.d.ts +11 -11
- package/lib/types/Entity.d.ts +209 -209
- package/lib/types/Entity.js +15 -15
- package/lib/types/EntityDesc.d.ts +9 -9
- package/lib/types/EntityDesc.js +2 -2
- package/lib/types/Environment.d.ts +90 -90
- package/lib/types/Environment.js +2 -2
- package/lib/types/Exception.d.ts +10 -2
- package/lib/types/Exception.js +32 -2
- package/lib/types/Expression.d.ts +163 -163
- package/lib/types/Expression.js +397 -397
- package/lib/types/Geo.d.ts +18 -18
- package/lib/types/Locale.d.ts +25 -25
- package/lib/types/Logger.d.ts +6 -6
- package/lib/types/Polyfill.d.ts +24 -24
- package/lib/types/Port.d.ts +18 -18
- package/lib/types/RowStore.d.ts +19 -19
- package/lib/types/RowStore.js +33 -33
- package/lib/types/Storage.d.ts +58 -58
- package/lib/types/Style.d.ts +11 -11
- package/lib/types/Timer.d.ts +20 -20
- package/lib/types/Trigger.d.ts +118 -118
- package/lib/types/Trigger.js +35 -35
- package/lib/types/Watcher.d.ts +19 -19
- package/lib/types/index.d.ts +26 -26
- package/lib/types/index.js +29 -29
- package/lib/types/schema/DataTypes.d.ts +34 -34
- package/lib/utils/SimpleConnector.d.ts +64 -64
- package/lib/utils/SimpleConnector.js +206 -206
- package/lib/utils/assert.d.ts +6 -5
- package/lib/utils/assert.js +9 -9
- package/lib/utils/concurrent.d.ts +15 -15
- package/lib/utils/concurrent.js +63 -63
- package/lib/utils/date.js +18 -18
- package/lib/utils/domain.d.ts +1 -1
- package/lib/utils/domain.js +11 -11
- package/lib/utils/geo.js +24 -24
- package/lib/utils/lodash.d.ts +24 -24
- package/lib/utils/lodash.js +46 -46
- package/lib/utils/mask.js +34 -34
- package/lib/utils/money.d.ts +6 -6
- package/lib/utils/money.js +51 -51
- package/lib/utils/projection.d.ts +4 -4
- package/lib/utils/projection.js +15 -15
- package/lib/utils/random/random.js +19 -19
- package/lib/utils/random/random.mp.js +14 -14
- package/lib/utils/random/random.native.d.ts +1 -1
- package/lib/utils/random/random.native.js +14 -14
- package/lib/utils/random/random.web.js +11 -11
- package/lib/utils/string.d.ts +28 -28
- package/lib/utils/string.js +69 -69
- package/lib/utils/url/index.d.ts +7 -7
- package/lib/utils/url/index.js +8 -8
- package/lib/utils/url/index.mp.d.ts +3 -3
- package/lib/utils/url/index.mp.js +8 -8
- package/lib/utils/url/index.native.d.ts +12 -12
- package/lib/utils/url/index.native.js +7 -7
- package/lib/utils/url/index.web.d.ts +12 -12
- package/lib/utils/url/index.web.js +7 -7
- package/lib/utils/url/whatwg-url/index.d.ts +3 -3
- package/lib/utils/url/whatwg-url/index.js +16 -16
- package/lib/utils/url/whatwg-url/lib/URL-impl.d.ts +20 -20
- package/lib/utils/url/whatwg-url/lib/URL-impl.js +175 -175
- package/lib/utils/url/whatwg-url/lib/URL.d.ts +1 -1
- package/lib/utils/url/whatwg-url/lib/URL.js +298 -298
- package/lib/utils/url/whatwg-url/lib/URLSearchParams-impl.d.ts +19 -19
- package/lib/utils/url/whatwg-url/lib/URLSearchParams-impl.js +126 -126
- package/lib/utils/url/whatwg-url/lib/URLSearchParams.d.ts +1 -1
- package/lib/utils/url/whatwg-url/lib/URLSearchParams.js +426 -426
- package/lib/utils/url/whatwg-url/lib/infra.d.ts +12 -12
- package/lib/utils/url/whatwg-url/lib/infra.js +25 -25
- package/lib/utils/url/whatwg-url/lib/url-state-machine.d.ts +24 -24
- package/lib/utils/url/whatwg-url/lib/url-state-machine.js +1238 -1238
- package/lib/utils/url/whatwg-url/lib/urlencoded.d.ts +15 -15
- package/lib/utils/url/whatwg-url/lib/urlencoded.js +162 -162
- package/lib/utils/url/whatwg-url/lib/utils.d.ts +37 -37
- package/lib/utils/url/whatwg-url/lib/utils.js +101 -101
- package/lib/utils/uuid.d.ts +17 -17
- package/lib/utils/uuid.js +218 -218
- package/lib/utils/validator.d.ts +26 -26
- package/lib/utils/validator.js +131 -131
- package/lib/utils/version.js +21 -21
- package/package.json +2 -1
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
import * as ActionAuth from "./ActionAuth/Schema";
|
|
2
|
-
import * as I18n from "./I18n/Schema";
|
|
3
|
-
import * as Modi from "./Modi/Schema";
|
|
4
|
-
import * as ModiEntity from "./ModiEntity/Schema";
|
|
5
|
-
import * as Oper from "./Oper/Schema";
|
|
6
|
-
import * as OperEntity from "./OperEntity/Schema";
|
|
7
|
-
import * as Path from "./Path/Schema";
|
|
8
|
-
import * as Relation from "./Relation/Schema";
|
|
9
|
-
import * as RelationAuth from "./RelationAuth/Schema";
|
|
10
|
-
import * as User from "./User/Schema";
|
|
11
|
-
import * as UserEntityClaim from "./UserEntityClaim/Schema";
|
|
12
|
-
import * as UserEntityGrant from "./UserEntityGrant/Schema";
|
|
13
|
-
import * as UserRelation from "./UserRelation/Schema";
|
|
14
|
-
export type ActionAuthIdSubQuery = {
|
|
15
|
-
[K in "$in" | "$nin"]?: (ModiEntity.ActionAuthIdSubQuery & {
|
|
16
|
-
entity: "modiEntity";
|
|
17
|
-
}) | (OperEntity.ActionAuthIdSubQuery & {
|
|
18
|
-
entity: "operEntity";
|
|
19
|
-
}) | (ActionAuth.ActionAuthIdSubQuery & {
|
|
20
|
-
entity: "actionAuth";
|
|
21
|
-
}) | any;
|
|
22
|
-
};
|
|
23
|
-
export type I18nIdSubQuery = {
|
|
24
|
-
[K in "$in" | "$nin"]?: (ModiEntity.I18nIdSubQuery & {
|
|
25
|
-
entity: "modiEntity";
|
|
26
|
-
}) | (OperEntity.I18nIdSubQuery & {
|
|
27
|
-
entity: "operEntity";
|
|
28
|
-
}) | (I18n.I18nIdSubQuery & {
|
|
29
|
-
entity: "i18n";
|
|
30
|
-
}) | any;
|
|
31
|
-
};
|
|
32
|
-
export type ModiIdSubQuery = {
|
|
33
|
-
[K in "$in" | "$nin"]?: (ModiEntity.ModiIdSubQuery & {
|
|
34
|
-
entity: "modiEntity";
|
|
35
|
-
}) | (Modi.ModiIdSubQuery & {
|
|
36
|
-
entity: "modi";
|
|
37
|
-
}) | any;
|
|
38
|
-
};
|
|
39
|
-
export type ModiEntityIdSubQuery = {
|
|
40
|
-
[K in "$in" | "$nin"]?: (ModiEntity.ModiEntityIdSubQuery & {
|
|
41
|
-
entity: "modiEntity";
|
|
42
|
-
}) | any;
|
|
43
|
-
};
|
|
44
|
-
export type OperIdSubQuery = {
|
|
45
|
-
[K in "$in" | "$nin"]?: (OperEntity.OperIdSubQuery & {
|
|
46
|
-
entity: "operEntity";
|
|
47
|
-
}) | (Oper.OperIdSubQuery & {
|
|
48
|
-
entity: "oper";
|
|
49
|
-
}) | any;
|
|
50
|
-
};
|
|
51
|
-
export type OperEntityIdSubQuery = {
|
|
52
|
-
[K in "$in" | "$nin"]?: (OperEntity.OperEntityIdSubQuery & {
|
|
53
|
-
entity: "operEntity";
|
|
54
|
-
}) | any;
|
|
55
|
-
};
|
|
56
|
-
export type PathIdSubQuery = {
|
|
57
|
-
[K in "$in" | "$nin"]?: (ActionAuth.PathIdSubQuery & {
|
|
58
|
-
entity: "actionAuth";
|
|
59
|
-
}) | (RelationAuth.PathIdSubQuery & {
|
|
60
|
-
entity: "relationAuth";
|
|
61
|
-
}) | (ModiEntity.PathIdSubQuery & {
|
|
62
|
-
entity: "modiEntity";
|
|
63
|
-
}) | (OperEntity.PathIdSubQuery & {
|
|
64
|
-
entity: "operEntity";
|
|
65
|
-
}) | (Path.PathIdSubQuery & {
|
|
66
|
-
entity: "path";
|
|
67
|
-
}) | any;
|
|
68
|
-
};
|
|
69
|
-
export type RelationIdSubQuery = {
|
|
70
|
-
[K in "$in" | "$nin"]?: (ActionAuth.RelationIdSubQuery & {
|
|
71
|
-
entity: "actionAuth";
|
|
72
|
-
}) | (RelationAuth.RelationIdSubQuery & {
|
|
73
|
-
entity: "relationAuth";
|
|
74
|
-
}) | (UserEntityClaim.RelationIdSubQuery & {
|
|
75
|
-
entity: "userEntityClaim";
|
|
76
|
-
}) | (UserRelation.RelationIdSubQuery & {
|
|
77
|
-
entity: "userRelation";
|
|
78
|
-
}) | (ModiEntity.RelationIdSubQuery & {
|
|
79
|
-
entity: "modiEntity";
|
|
80
|
-
}) | (OperEntity.RelationIdSubQuery & {
|
|
81
|
-
entity: "operEntity";
|
|
82
|
-
}) | (Relation.RelationIdSubQuery & {
|
|
83
|
-
entity: "relation";
|
|
84
|
-
}) | any;
|
|
85
|
-
};
|
|
86
|
-
export type RelationAuthIdSubQuery = {
|
|
87
|
-
[K in "$in" | "$nin"]?: (ModiEntity.RelationAuthIdSubQuery & {
|
|
88
|
-
entity: "modiEntity";
|
|
89
|
-
}) | (OperEntity.RelationAuthIdSubQuery & {
|
|
90
|
-
entity: "operEntity";
|
|
91
|
-
}) | (RelationAuth.RelationAuthIdSubQuery & {
|
|
92
|
-
entity: "relationAuth";
|
|
93
|
-
}) | any;
|
|
94
|
-
};
|
|
95
|
-
export type UserIdSubQuery = {
|
|
96
|
-
[K in "$in" | "$nin"]?: (Oper.UserIdSubQuery & {
|
|
97
|
-
entity: "oper";
|
|
98
|
-
}) | (User.UserIdSubQuery & {
|
|
99
|
-
entity: "user";
|
|
100
|
-
}) | (UserEntityClaim.UserIdSubQuery & {
|
|
101
|
-
entity: "userEntityClaim";
|
|
102
|
-
}) | (UserRelation.UserIdSubQuery & {
|
|
103
|
-
entity: "userRelation";
|
|
104
|
-
}) | (ModiEntity.UserIdSubQuery & {
|
|
105
|
-
entity: "modiEntity";
|
|
106
|
-
}) | (OperEntity.UserIdSubQuery & {
|
|
107
|
-
entity: "operEntity";
|
|
108
|
-
}) | (User.UserIdSubQuery & {
|
|
109
|
-
entity: "user";
|
|
110
|
-
}) | any;
|
|
111
|
-
};
|
|
112
|
-
export type UserEntityClaimIdSubQuery = {
|
|
113
|
-
[K in "$in" | "$nin"]?: (ModiEntity.UserEntityClaimIdSubQuery & {
|
|
114
|
-
entity: "modiEntity";
|
|
115
|
-
}) | (OperEntity.UserEntityClaimIdSubQuery & {
|
|
116
|
-
entity: "operEntity";
|
|
117
|
-
}) | (UserEntityClaim.UserEntityClaimIdSubQuery & {
|
|
118
|
-
entity: "userEntityClaim";
|
|
119
|
-
}) | any;
|
|
120
|
-
};
|
|
121
|
-
export type UserEntityGrantIdSubQuery = {
|
|
122
|
-
[K in "$in" | "$nin"]?: (UserEntityClaim.UserEntityGrantIdSubQuery & {
|
|
123
|
-
entity: "userEntityClaim";
|
|
124
|
-
}) | (ModiEntity.UserEntityGrantIdSubQuery & {
|
|
125
|
-
entity: "modiEntity";
|
|
126
|
-
}) | (OperEntity.UserEntityGrantIdSubQuery & {
|
|
127
|
-
entity: "operEntity";
|
|
128
|
-
}) | (UserEntityGrant.UserEntityGrantIdSubQuery & {
|
|
129
|
-
entity: "userEntityGrant";
|
|
130
|
-
}) | any;
|
|
131
|
-
};
|
|
132
|
-
export type UserRelationIdSubQuery = {
|
|
133
|
-
[K in "$in" | "$nin"]?: (UserEntityClaim.UserRelationIdSubQuery & {
|
|
134
|
-
entity: "userEntityClaim";
|
|
135
|
-
}) | (ModiEntity.UserRelationIdSubQuery & {
|
|
136
|
-
entity: "modiEntity";
|
|
137
|
-
}) | (OperEntity.UserRelationIdSubQuery & {
|
|
138
|
-
entity: "operEntity";
|
|
139
|
-
}) | (UserRelation.UserRelationIdSubQuery & {
|
|
140
|
-
entity: "userRelation";
|
|
141
|
-
}) | any;
|
|
142
|
-
};
|
|
1
|
+
import * as ActionAuth from "./ActionAuth/Schema";
|
|
2
|
+
import * as I18n from "./I18n/Schema";
|
|
3
|
+
import * as Modi from "./Modi/Schema";
|
|
4
|
+
import * as ModiEntity from "./ModiEntity/Schema";
|
|
5
|
+
import * as Oper from "./Oper/Schema";
|
|
6
|
+
import * as OperEntity from "./OperEntity/Schema";
|
|
7
|
+
import * as Path from "./Path/Schema";
|
|
8
|
+
import * as Relation from "./Relation/Schema";
|
|
9
|
+
import * as RelationAuth from "./RelationAuth/Schema";
|
|
10
|
+
import * as User from "./User/Schema";
|
|
11
|
+
import * as UserEntityClaim from "./UserEntityClaim/Schema";
|
|
12
|
+
import * as UserEntityGrant from "./UserEntityGrant/Schema";
|
|
13
|
+
import * as UserRelation from "./UserRelation/Schema";
|
|
14
|
+
export type ActionAuthIdSubQuery = {
|
|
15
|
+
[K in "$in" | "$nin"]?: (ModiEntity.ActionAuthIdSubQuery & {
|
|
16
|
+
entity: "modiEntity";
|
|
17
|
+
}) | (OperEntity.ActionAuthIdSubQuery & {
|
|
18
|
+
entity: "operEntity";
|
|
19
|
+
}) | (ActionAuth.ActionAuthIdSubQuery & {
|
|
20
|
+
entity: "actionAuth";
|
|
21
|
+
}) | any;
|
|
22
|
+
};
|
|
23
|
+
export type I18nIdSubQuery = {
|
|
24
|
+
[K in "$in" | "$nin"]?: (ModiEntity.I18nIdSubQuery & {
|
|
25
|
+
entity: "modiEntity";
|
|
26
|
+
}) | (OperEntity.I18nIdSubQuery & {
|
|
27
|
+
entity: "operEntity";
|
|
28
|
+
}) | (I18n.I18nIdSubQuery & {
|
|
29
|
+
entity: "i18n";
|
|
30
|
+
}) | any;
|
|
31
|
+
};
|
|
32
|
+
export type ModiIdSubQuery = {
|
|
33
|
+
[K in "$in" | "$nin"]?: (ModiEntity.ModiIdSubQuery & {
|
|
34
|
+
entity: "modiEntity";
|
|
35
|
+
}) | (Modi.ModiIdSubQuery & {
|
|
36
|
+
entity: "modi";
|
|
37
|
+
}) | any;
|
|
38
|
+
};
|
|
39
|
+
export type ModiEntityIdSubQuery = {
|
|
40
|
+
[K in "$in" | "$nin"]?: (ModiEntity.ModiEntityIdSubQuery & {
|
|
41
|
+
entity: "modiEntity";
|
|
42
|
+
}) | any;
|
|
43
|
+
};
|
|
44
|
+
export type OperIdSubQuery = {
|
|
45
|
+
[K in "$in" | "$nin"]?: (OperEntity.OperIdSubQuery & {
|
|
46
|
+
entity: "operEntity";
|
|
47
|
+
}) | (Oper.OperIdSubQuery & {
|
|
48
|
+
entity: "oper";
|
|
49
|
+
}) | any;
|
|
50
|
+
};
|
|
51
|
+
export type OperEntityIdSubQuery = {
|
|
52
|
+
[K in "$in" | "$nin"]?: (OperEntity.OperEntityIdSubQuery & {
|
|
53
|
+
entity: "operEntity";
|
|
54
|
+
}) | any;
|
|
55
|
+
};
|
|
56
|
+
export type PathIdSubQuery = {
|
|
57
|
+
[K in "$in" | "$nin"]?: (ActionAuth.PathIdSubQuery & {
|
|
58
|
+
entity: "actionAuth";
|
|
59
|
+
}) | (RelationAuth.PathIdSubQuery & {
|
|
60
|
+
entity: "relationAuth";
|
|
61
|
+
}) | (ModiEntity.PathIdSubQuery & {
|
|
62
|
+
entity: "modiEntity";
|
|
63
|
+
}) | (OperEntity.PathIdSubQuery & {
|
|
64
|
+
entity: "operEntity";
|
|
65
|
+
}) | (Path.PathIdSubQuery & {
|
|
66
|
+
entity: "path";
|
|
67
|
+
}) | any;
|
|
68
|
+
};
|
|
69
|
+
export type RelationIdSubQuery = {
|
|
70
|
+
[K in "$in" | "$nin"]?: (ActionAuth.RelationIdSubQuery & {
|
|
71
|
+
entity: "actionAuth";
|
|
72
|
+
}) | (RelationAuth.RelationIdSubQuery & {
|
|
73
|
+
entity: "relationAuth";
|
|
74
|
+
}) | (UserEntityClaim.RelationIdSubQuery & {
|
|
75
|
+
entity: "userEntityClaim";
|
|
76
|
+
}) | (UserRelation.RelationIdSubQuery & {
|
|
77
|
+
entity: "userRelation";
|
|
78
|
+
}) | (ModiEntity.RelationIdSubQuery & {
|
|
79
|
+
entity: "modiEntity";
|
|
80
|
+
}) | (OperEntity.RelationIdSubQuery & {
|
|
81
|
+
entity: "operEntity";
|
|
82
|
+
}) | (Relation.RelationIdSubQuery & {
|
|
83
|
+
entity: "relation";
|
|
84
|
+
}) | any;
|
|
85
|
+
};
|
|
86
|
+
export type RelationAuthIdSubQuery = {
|
|
87
|
+
[K in "$in" | "$nin"]?: (ModiEntity.RelationAuthIdSubQuery & {
|
|
88
|
+
entity: "modiEntity";
|
|
89
|
+
}) | (OperEntity.RelationAuthIdSubQuery & {
|
|
90
|
+
entity: "operEntity";
|
|
91
|
+
}) | (RelationAuth.RelationAuthIdSubQuery & {
|
|
92
|
+
entity: "relationAuth";
|
|
93
|
+
}) | any;
|
|
94
|
+
};
|
|
95
|
+
export type UserIdSubQuery = {
|
|
96
|
+
[K in "$in" | "$nin"]?: (Oper.UserIdSubQuery & {
|
|
97
|
+
entity: "oper";
|
|
98
|
+
}) | (User.UserIdSubQuery & {
|
|
99
|
+
entity: "user";
|
|
100
|
+
}) | (UserEntityClaim.UserIdSubQuery & {
|
|
101
|
+
entity: "userEntityClaim";
|
|
102
|
+
}) | (UserRelation.UserIdSubQuery & {
|
|
103
|
+
entity: "userRelation";
|
|
104
|
+
}) | (ModiEntity.UserIdSubQuery & {
|
|
105
|
+
entity: "modiEntity";
|
|
106
|
+
}) | (OperEntity.UserIdSubQuery & {
|
|
107
|
+
entity: "operEntity";
|
|
108
|
+
}) | (User.UserIdSubQuery & {
|
|
109
|
+
entity: "user";
|
|
110
|
+
}) | any;
|
|
111
|
+
};
|
|
112
|
+
export type UserEntityClaimIdSubQuery = {
|
|
113
|
+
[K in "$in" | "$nin"]?: (ModiEntity.UserEntityClaimIdSubQuery & {
|
|
114
|
+
entity: "modiEntity";
|
|
115
|
+
}) | (OperEntity.UserEntityClaimIdSubQuery & {
|
|
116
|
+
entity: "operEntity";
|
|
117
|
+
}) | (UserEntityClaim.UserEntityClaimIdSubQuery & {
|
|
118
|
+
entity: "userEntityClaim";
|
|
119
|
+
}) | any;
|
|
120
|
+
};
|
|
121
|
+
export type UserEntityGrantIdSubQuery = {
|
|
122
|
+
[K in "$in" | "$nin"]?: (UserEntityClaim.UserEntityGrantIdSubQuery & {
|
|
123
|
+
entity: "userEntityClaim";
|
|
124
|
+
}) | (ModiEntity.UserEntityGrantIdSubQuery & {
|
|
125
|
+
entity: "modiEntity";
|
|
126
|
+
}) | (OperEntity.UserEntityGrantIdSubQuery & {
|
|
127
|
+
entity: "operEntity";
|
|
128
|
+
}) | (UserEntityGrant.UserEntityGrantIdSubQuery & {
|
|
129
|
+
entity: "userEntityGrant";
|
|
130
|
+
}) | any;
|
|
131
|
+
};
|
|
132
|
+
export type UserRelationIdSubQuery = {
|
|
133
|
+
[K in "$in" | "$nin"]?: (UserEntityClaim.UserRelationIdSubQuery & {
|
|
134
|
+
entity: "userEntityClaim";
|
|
135
|
+
}) | (ModiEntity.UserRelationIdSubQuery & {
|
|
136
|
+
entity: "modiEntity";
|
|
137
|
+
}) | (OperEntity.UserRelationIdSubQuery & {
|
|
138
|
+
entity: "operEntity";
|
|
139
|
+
}) | (UserRelation.UserRelationIdSubQuery & {
|
|
140
|
+
entity: "userRelation";
|
|
141
|
+
}) | any;
|
|
142
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './EntityDict';
|
|
2
|
-
export * from './Storage';
|
|
3
|
-
export * from './ActionDefDict';
|
|
4
|
-
export * from './Relation';
|
|
1
|
+
export * from './EntityDict';
|
|
2
|
+
export * from './Storage';
|
|
3
|
+
export * from './ActionDefDict';
|
|
4
|
+
export * from './Relation';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./EntityDict"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./Storage"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./ActionDefDict"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./Relation"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./EntityDict"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./Storage"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./ActionDefDict"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./Relation"), exports);
|
package/lib/checkers/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EntityDict } from '../base-app-domain';
|
|
2
|
-
import { AsyncContext } from '../store/AsyncRowStore';
|
|
3
|
-
import { SyncContext } from '../store/SyncRowStore';
|
|
4
|
-
import { StorageSchema, EntityDict as BaseEntityDict, Checker } from '../types';
|
|
5
|
-
export declare function createDynamicCheckers<ED extends EntityDict & BaseEntityDict, Cxt extends AsyncContext<ED> | SyncContext<ED>>(schema: StorageSchema<ED>): Checker<ED, keyof ED, Cxt>[];
|
|
1
|
+
import { EntityDict } from '../base-app-domain';
|
|
2
|
+
import { AsyncContext } from '../store/AsyncRowStore';
|
|
3
|
+
import { SyncContext } from '../store/SyncRowStore';
|
|
4
|
+
import { StorageSchema, EntityDict as BaseEntityDict, Checker } from '../types';
|
|
5
|
+
export declare function createDynamicCheckers<ED extends EntityDict & BaseEntityDict, Cxt extends AsyncContext<ED> | SyncContext<ED>>(schema: StorageSchema<ED>): Checker<ED, keyof ED, Cxt>[];
|
package/lib/checkers/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createDynamicCheckers = void 0;
|
|
4
|
-
const checker_1 = require("../store/checker");
|
|
5
|
-
const modi_1 = require("../store/modi");
|
|
6
|
-
function createDynamicCheckers(schema) {
|
|
7
|
-
const checkers = [];
|
|
8
|
-
checkers.push(...(0, modi_1.createModiRelatedCheckers)(schema));
|
|
9
|
-
checkers.push(...(0, checker_1.createRemoveCheckers)(schema));
|
|
10
|
-
checkers.push(...(0, checker_1.createCreateCheckers)(schema));
|
|
11
|
-
return checkers;
|
|
12
|
-
}
|
|
13
|
-
exports.createDynamicCheckers = createDynamicCheckers;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDynamicCheckers = void 0;
|
|
4
|
+
const checker_1 = require("../store/checker");
|
|
5
|
+
const modi_1 = require("../store/modi");
|
|
6
|
+
function createDynamicCheckers(schema) {
|
|
7
|
+
const checkers = [];
|
|
8
|
+
checkers.push(...(0, modi_1.createModiRelatedCheckers)(schema));
|
|
9
|
+
checkers.push(...(0, checker_1.createRemoveCheckers)(schema));
|
|
10
|
+
checkers.push(...(0, checker_1.createCreateCheckers)(schema));
|
|
11
|
+
return checkers;
|
|
12
|
+
}
|
|
13
|
+
exports.createDynamicCheckers = createDynamicCheckers;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const RESERVED_ENTITY_NAMES: string[];
|
|
2
|
-
export declare const SYSTEM_RESERVE_ENTITIES: string[];
|
|
1
|
+
export declare const RESERVED_ENTITY_NAMES: string[];
|
|
2
|
+
export declare const SYSTEM_RESERVE_ENTITIES: string[];
|
package/lib/compiler/entities.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SYSTEM_RESERVE_ENTITIES = exports.RESERVED_ENTITY_NAMES = void 0;
|
|
4
|
-
exports.RESERVED_ENTITY_NAMES = ['Schema', 'Filter', 'Query', 'SubQuery', 'Entity', 'Selection', 'Operation', 'File', 'Common', 'Config', 'Configuration',
|
|
5
|
-
'Locale', 'Projection', 'Data'];
|
|
6
|
-
exports.SYSTEM_RESERVE_ENTITIES = ['user', 'relation', 'oper', 'operEntity', 'modi', 'modiEntity',
|
|
7
|
-
'userRelation', 'actionAuth', 'relationAuth', 'relation', 'userEntityGrant', 'i18n'];
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SYSTEM_RESERVE_ENTITIES = exports.RESERVED_ENTITY_NAMES = void 0;
|
|
4
|
+
exports.RESERVED_ENTITY_NAMES = ['Schema', 'Filter', 'Query', 'SubQuery', 'Entity', 'Selection', 'Operation', 'File', 'Common', 'Config', 'Configuration',
|
|
5
|
+
'Locale', 'Projection', 'Data'];
|
|
6
|
+
exports.SYSTEM_RESERVE_ENTITIES = ['user', 'relation', 'oper', 'operEntity', 'modi', 'modiEntity',
|
|
7
|
+
'userRelation', 'actionAuth', 'relationAuth', 'relation', 'userEntityGrant', 'i18n'];
|
package/lib/compiler/env.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export declare const LIB_OAK_DOMAIN = "oak-domain";
|
|
2
|
-
export declare const LIB_PATH: () => string;
|
|
3
|
-
export declare const ENTITY_PATH_IN_OAK_GENERAL_BUSINESS: () => string;
|
|
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;
|
|
7
|
-
export declare const ENTITY_NAME_MAX_LENGTH = 32;
|
|
8
|
-
export declare const STRING_LITERAL_MAX_LENGTH = 24;
|
|
9
|
-
export declare const NUMERICAL_LITERL_DEFAULT_PRECISION = 8;
|
|
10
|
-
export declare const NUMERICAL_LITERL_DEFAULT_SCALE = 2;
|
|
11
|
-
export declare const INT_LITERL_DEFAULT_WIDTH = 4;
|
|
12
|
-
export declare const OAK_EXTERNAL_LIBS_FILEPATH: (path: string) => string;
|
|
13
|
-
export * from './entities';
|
|
1
|
+
export declare const LIB_OAK_DOMAIN = "oak-domain";
|
|
2
|
+
export declare const LIB_PATH: () => string;
|
|
3
|
+
export declare const ENTITY_PATH_IN_OAK_GENERAL_BUSINESS: () => string;
|
|
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;
|
|
7
|
+
export declare const ENTITY_NAME_MAX_LENGTH = 32;
|
|
8
|
+
export declare const STRING_LITERAL_MAX_LENGTH = 24;
|
|
9
|
+
export declare const NUMERICAL_LITERL_DEFAULT_PRECISION = 8;
|
|
10
|
+
export declare const NUMERICAL_LITERL_DEFAULT_SCALE = 2;
|
|
11
|
+
export declare const INT_LITERL_DEFAULT_WIDTH = 4;
|
|
12
|
+
export declare const OAK_EXTERNAL_LIBS_FILEPATH: (path: string) => string;
|
|
13
|
+
export * from './entities';
|
package/lib/compiler/env.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OAK_EXTERNAL_LIBS_FILEPATH = exports.INT_LITERL_DEFAULT_WIDTH = exports.NUMERICAL_LITERL_DEFAULT_SCALE = exports.NUMERICAL_LITERL_DEFAULT_PRECISION = exports.STRING_LITERAL_MAX_LENGTH = exports.ENTITY_NAME_MAX_LENGTH = 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
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
-
exports.LIB_OAK_DOMAIN = 'oak-domain';
|
|
7
|
-
const LIB_OAK_GENERAL_BUSINESS = 'oak-general-business';
|
|
8
|
-
const LIB_PATH = () => 'lib';
|
|
9
|
-
exports.LIB_PATH = LIB_PATH;
|
|
10
|
-
const LEVEL_PREFIX = ['.', '..', '../..', '../../..', '../../../..'];
|
|
11
|
-
const ENTITY_PATH_IN_OAK_GENERAL_BUSINESS = () => {
|
|
12
|
-
return `${LIB_OAK_GENERAL_BUSINESS}/${(0, exports.LIB_PATH)()}/entities/`;
|
|
13
|
-
};
|
|
14
|
-
exports.ENTITY_PATH_IN_OAK_GENERAL_BUSINESS = ENTITY_PATH_IN_OAK_GENERAL_BUSINESS;
|
|
15
|
-
const ENTITY_PATH_IN_OAK_DOMAIN = () => {
|
|
16
|
-
return `${exports.LIB_OAK_DOMAIN}/${(0, exports.LIB_PATH)()}/entities/`;
|
|
17
|
-
};
|
|
18
|
-
exports.ENTITY_PATH_IN_OAK_DOMAIN = ENTITY_PATH_IN_OAK_DOMAIN;
|
|
19
|
-
const TYPE_PATH_IN_OAK_DOMAIN = (level = 2) => {
|
|
20
|
-
if (process.env.COMPLING_IN_DOMAIN) {
|
|
21
|
-
return `${LEVEL_PREFIX[level]}/types/`;
|
|
22
|
-
}
|
|
23
|
-
return `${exports.LIB_OAK_DOMAIN}/${(0, exports.LIB_PATH)()}/types/`;
|
|
24
|
-
};
|
|
25
|
-
exports.TYPE_PATH_IN_OAK_DOMAIN = TYPE_PATH_IN_OAK_DOMAIN;
|
|
26
|
-
const ACTION_CONSTANT_IN_OAK_DOMAIN = (level = 2) => {
|
|
27
|
-
if (process.env.COMPLING_IN_DOMAIN) {
|
|
28
|
-
return `${LEVEL_PREFIX[level]}/actions/action`;
|
|
29
|
-
}
|
|
30
|
-
return `${exports.LIB_OAK_DOMAIN}/${(0, exports.LIB_PATH)()}/actions/action`;
|
|
31
|
-
};
|
|
32
|
-
exports.ACTION_CONSTANT_IN_OAK_DOMAIN = ACTION_CONSTANT_IN_OAK_DOMAIN;
|
|
33
|
-
// export const OUTPUT_PATH = 'app-domain/entities';
|
|
34
|
-
exports.ENTITY_NAME_MAX_LENGTH = 32;
|
|
35
|
-
exports.STRING_LITERAL_MAX_LENGTH = 24;
|
|
36
|
-
exports.NUMERICAL_LITERL_DEFAULT_PRECISION = 8;
|
|
37
|
-
exports.NUMERICAL_LITERL_DEFAULT_SCALE = 2;
|
|
38
|
-
exports.INT_LITERL_DEFAULT_WIDTH = 4;
|
|
39
|
-
// 暂放在这儿
|
|
40
|
-
// 项目依赖的第三方oak lib配置文件所在的固定路径
|
|
41
|
-
const OAK_EXTERNAL_LIBS_FILEPATH = (path) => {
|
|
42
|
-
return path_1.default.join(path, 'config/oakExternalLib.json');
|
|
43
|
-
};
|
|
44
|
-
exports.OAK_EXTERNAL_LIBS_FILEPATH = OAK_EXTERNAL_LIBS_FILEPATH;
|
|
45
|
-
tslib_1.__exportStar(require("./entities"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAK_EXTERNAL_LIBS_FILEPATH = exports.INT_LITERL_DEFAULT_WIDTH = exports.NUMERICAL_LITERL_DEFAULT_SCALE = exports.NUMERICAL_LITERL_DEFAULT_PRECISION = exports.STRING_LITERAL_MAX_LENGTH = exports.ENTITY_NAME_MAX_LENGTH = 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
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
+
exports.LIB_OAK_DOMAIN = 'oak-domain';
|
|
7
|
+
const LIB_OAK_GENERAL_BUSINESS = 'oak-general-business';
|
|
8
|
+
const LIB_PATH = () => 'lib';
|
|
9
|
+
exports.LIB_PATH = LIB_PATH;
|
|
10
|
+
const LEVEL_PREFIX = ['.', '..', '../..', '../../..', '../../../..'];
|
|
11
|
+
const ENTITY_PATH_IN_OAK_GENERAL_BUSINESS = () => {
|
|
12
|
+
return `${LIB_OAK_GENERAL_BUSINESS}/${(0, exports.LIB_PATH)()}/entities/`;
|
|
13
|
+
};
|
|
14
|
+
exports.ENTITY_PATH_IN_OAK_GENERAL_BUSINESS = ENTITY_PATH_IN_OAK_GENERAL_BUSINESS;
|
|
15
|
+
const ENTITY_PATH_IN_OAK_DOMAIN = () => {
|
|
16
|
+
return `${exports.LIB_OAK_DOMAIN}/${(0, exports.LIB_PATH)()}/entities/`;
|
|
17
|
+
};
|
|
18
|
+
exports.ENTITY_PATH_IN_OAK_DOMAIN = ENTITY_PATH_IN_OAK_DOMAIN;
|
|
19
|
+
const TYPE_PATH_IN_OAK_DOMAIN = (level = 2) => {
|
|
20
|
+
if (process.env.COMPLING_IN_DOMAIN) {
|
|
21
|
+
return `${LEVEL_PREFIX[level]}/types/`;
|
|
22
|
+
}
|
|
23
|
+
return `${exports.LIB_OAK_DOMAIN}/${(0, exports.LIB_PATH)()}/types/`;
|
|
24
|
+
};
|
|
25
|
+
exports.TYPE_PATH_IN_OAK_DOMAIN = TYPE_PATH_IN_OAK_DOMAIN;
|
|
26
|
+
const ACTION_CONSTANT_IN_OAK_DOMAIN = (level = 2) => {
|
|
27
|
+
if (process.env.COMPLING_IN_DOMAIN) {
|
|
28
|
+
return `${LEVEL_PREFIX[level]}/actions/action`;
|
|
29
|
+
}
|
|
30
|
+
return `${exports.LIB_OAK_DOMAIN}/${(0, exports.LIB_PATH)()}/actions/action`;
|
|
31
|
+
};
|
|
32
|
+
exports.ACTION_CONSTANT_IN_OAK_DOMAIN = ACTION_CONSTANT_IN_OAK_DOMAIN;
|
|
33
|
+
// export const OUTPUT_PATH = 'app-domain/entities';
|
|
34
|
+
exports.ENTITY_NAME_MAX_LENGTH = 32;
|
|
35
|
+
exports.STRING_LITERAL_MAX_LENGTH = 24;
|
|
36
|
+
exports.NUMERICAL_LITERL_DEFAULT_PRECISION = 8;
|
|
37
|
+
exports.NUMERICAL_LITERL_DEFAULT_SCALE = 2;
|
|
38
|
+
exports.INT_LITERL_DEFAULT_WIDTH = 4;
|
|
39
|
+
// 暂放在这儿
|
|
40
|
+
// 项目依赖的第三方oak lib配置文件所在的固定路径
|
|
41
|
+
const OAK_EXTERNAL_LIBS_FILEPATH = (path) => {
|
|
42
|
+
return path_1.default.join(path, 'config/oakExternalLib.json');
|
|
43
|
+
};
|
|
44
|
+
exports.OAK_EXTERNAL_LIBS_FILEPATH = OAK_EXTERNAL_LIBS_FILEPATH;
|
|
45
|
+
tslib_1.__exportStar(require("./entities"), exports);
|
|
@@ -54,9 +54,23 @@ class LocaleBuilder {
|
|
|
54
54
|
const statements = [
|
|
55
55
|
factory.createImportDeclaration(undefined, factory.createImportClause(false, undefined, factory.createNamedImports([factory.createImportSpecifier(false, factory.createIdentifier("CreateOperationData"), factory.createIdentifier("I18n"))])), factory.createStringLiteral("../oak-app-domain/I18n/Schema"), undefined)
|
|
56
56
|
];
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
// 改为在初始化时合并
|
|
58
|
+
/* if (this.dependencies) {
|
|
59
|
+
this.dependencies.forEach(
|
|
60
|
+
(ele, idx) => statements.push(
|
|
61
|
+
factory.createImportDeclaration(
|
|
62
|
+
undefined,
|
|
63
|
+
factory.createImportClause(
|
|
64
|
+
false,
|
|
65
|
+
factory.createIdentifier(`i18ns${idx}`),
|
|
66
|
+
undefined
|
|
67
|
+
),
|
|
68
|
+
factory.createStringLiteral(`${ele}/lib/data/i18n`),
|
|
69
|
+
undefined
|
|
70
|
+
)
|
|
71
|
+
)
|
|
72
|
+
)
|
|
73
|
+
} */
|
|
60
74
|
statements.push(factory.createVariableStatement(undefined, factory.createVariableDeclarationList([factory.createVariableDeclaration(factory.createIdentifier("i18ns"), undefined, factory.createArrayTypeNode(factory.createTypeReferenceNode(factory.createIdentifier("I18n"), undefined)), factory.createArrayLiteralExpression(Object.keys(this.locales).map((k) => {
|
|
61
75
|
const [module, position, language, data] = this.locales[k];
|
|
62
76
|
// 用哈希计算来保证id唯一性
|
|
@@ -73,12 +87,27 @@ class LocaleBuilder {
|
|
|
73
87
|
factory.createPropertyAssignment(factory.createIdentifier("data"), transferObjectToObjectLiteral(data))
|
|
74
88
|
], true);
|
|
75
89
|
}), true))], ts.NodeFlags.Const)));
|
|
76
|
-
if (this.dependencies.length > 0) {
|
|
77
|
-
statements.push(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
90
|
+
/* if (this.dependencies.length > 0) {
|
|
91
|
+
statements.push(
|
|
92
|
+
factory.createExportAssignment(
|
|
93
|
+
undefined,
|
|
94
|
+
undefined,
|
|
95
|
+
factory.createCallExpression(
|
|
96
|
+
factory.createPropertyAccessExpression(
|
|
97
|
+
factory.createIdentifier("i18ns"),
|
|
98
|
+
factory.createIdentifier("concat")
|
|
99
|
+
),
|
|
100
|
+
undefined,
|
|
101
|
+
this.dependencies.map(
|
|
102
|
+
(ele, idx) => factory.createIdentifier(`i18ns${idx}`)
|
|
103
|
+
)
|
|
104
|
+
)
|
|
105
|
+
)
|
|
106
|
+
);
|
|
81
107
|
}
|
|
108
|
+
else { */
|
|
109
|
+
statements.push(factory.createExportAssignment(undefined, undefined, factory.createIdentifier("i18ns")));
|
|
110
|
+
/* } */
|
|
82
111
|
const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });
|
|
83
112
|
const result = printer.printList(ts.ListFormat.SourceFileStatements, factory.createNodeArray(statements), ts.createSourceFile("someFileName.ts", "", ts.ScriptTarget.Latest, false, ts.ScriptKind.TS));
|
|
84
113
|
const filename = (0, path_1.join)(this.pwd, 'src', 'data', 'i18n.ts');
|
|
@@ -124,18 +153,20 @@ class LocaleBuilder {
|
|
|
124
153
|
}
|
|
125
154
|
});
|
|
126
155
|
}
|
|
127
|
-
|
|
156
|
+
buildProject(root, src, watch) {
|
|
128
157
|
const packageJson = (0, path_1.join)(root, 'package.json');
|
|
129
158
|
const { name } = require(packageJson);
|
|
130
|
-
const pagePath = (0, path_1.join)(src ? 'src' : '
|
|
131
|
-
|
|
132
|
-
|
|
159
|
+
const pagePath = (0, path_1.join)(src ? 'src' : 'es', 'pages');
|
|
160
|
+
const pageAbsolutePath = (0, path_1.join)(root, pagePath); //编译i18时font中的componentPath缺少根目录导致编译不出
|
|
161
|
+
if (fs_1.default.existsSync(pageAbsolutePath)) {
|
|
162
|
+
this.traverse(name, 'p', pagePath, pageAbsolutePath, false, 'locales', watch);
|
|
133
163
|
}
|
|
134
|
-
const componentPath = (0, path_1.join)(src ? 'src' : '
|
|
135
|
-
|
|
136
|
-
|
|
164
|
+
const componentPath = (0, path_1.join)(src ? 'src' : 'es', 'components');
|
|
165
|
+
const componentAbsolutePath = (0, path_1.join)(root, componentPath);
|
|
166
|
+
if (fs_1.default.existsSync(componentAbsolutePath)) {
|
|
167
|
+
this.traverse(name, 'c', componentPath, componentAbsolutePath, false, 'locales', watch);
|
|
137
168
|
}
|
|
138
|
-
const localePath = (0, path_1.join)(root, src ? 'src' : '
|
|
169
|
+
const localePath = (0, path_1.join)(root, src ? 'src' : 'es', 'locales');
|
|
139
170
|
if (fs_1.default.existsSync(localePath)) {
|
|
140
171
|
const files = fs_1.default.readdirSync(localePath);
|
|
141
172
|
files.forEach((file) => {
|
|
@@ -172,11 +203,11 @@ class LocaleBuilder {
|
|
|
172
203
|
}
|
|
173
204
|
}
|
|
174
205
|
build(watch) {
|
|
175
|
-
this.
|
|
206
|
+
this.buildProject(this.pwd, true, watch);
|
|
176
207
|
if (!this.asLib) {
|
|
177
208
|
// 如果不是lib,把front里的数据也处理掉
|
|
178
209
|
const fbPath = (0, path_1.join)(this.pwd, 'node_modules', 'oak-frontend-base');
|
|
179
|
-
this.
|
|
210
|
+
this.buildProject(fbPath, false, watch);
|
|
180
211
|
}
|
|
181
212
|
this.outputDataFile();
|
|
182
213
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function buildRouter(projectDir: string, startupDir: string, watch?: boolean): void;
|