oak-domain 6.0.0 → 6.1.1
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/README.md +5 -1
- package/es/actions/action.d.ts +1 -1
- package/es/base-app-domain/EntityDict.d.ts +27 -0
- package/es/base-app-domain/LocalizedContent/Schema.d.ts +19 -0
- package/es/base-app-domain/LocalizedContent/Schema.js +1 -0
- package/es/base-app-domain/LocalizedContent/Storage.d.ts +3 -0
- package/es/base-app-domain/LocalizedContent/Storage.js +75 -0
- package/es/base-app-domain/LocalizedContent/Style.d.ts +3 -0
- package/es/base-app-domain/LocalizedContent/Style.js +12 -0
- package/es/base-app-domain/LocalizedContent/_baseSchema.d.ts +58 -0
- package/es/base-app-domain/Storage.js +2 -0
- package/es/base-app-domain/StyleDict.js +2 -0
- package/es/compiler/customChecks/i18n.js +4 -1
- package/es/compiler/customChecks/runner.d.ts +1 -1
- package/es/compiler/customChecks/runner.js +1 -1
- package/es/compiler/customChecks/types.d.ts +2 -1
- package/es/compiler/dependencyBuilder.d.ts +11 -2
- package/es/compiler/dependencyBuilder.js +256 -234
- package/es/compiler/entityDescEnum.d.ts +5 -0
- package/es/compiler/entityDescEnum.js +443 -0
- package/es/compiler/entitySource.d.ts +28 -0
- package/es/compiler/entitySource.js +521 -0
- package/es/compiler/localeBuilder.d.ts +7 -2
- package/es/compiler/localeBuilder.js +52 -56
- package/es/compiler/routerBuilder.d.ts +32 -3
- package/es/compiler/routerBuilder.js +157 -45
- package/es/compiler/schemaBuilder.d.ts +12 -2
- package/es/compiler/schemaBuilder.js +653 -148
- package/es/compiler/tscBuilder.d.ts +20 -2
- package/es/compiler/tscBuilder.js +231 -45
- package/es/context/BackendRuntimeContext.d.ts +6 -4
- package/es/context/BackendRuntimeContext.js +9 -1
- package/es/context/ContextComposer.d.ts +93 -0
- package/es/context/ContextComposer.js +353 -0
- package/es/context/SerializedData.d.ts +2 -1
- package/es/data/i18n.d.ts +1 -1
- package/es/data/i18n.js +1 -86
- package/es/data/i18n.json +86 -0
- package/es/entities/ActionAuth.d.ts +3 -3
- package/es/entities/I18n.d.ts +2 -2
- package/es/entities/LocalizedContent.d.ts +22 -0
- package/es/entities/LocalizedContent.js +101 -0
- package/es/entities/Log.d.ts +3 -3
- package/es/entities/Modi.d.ts +2 -2
- package/es/entities/ModiEntity.d.ts +3 -3
- package/es/entities/Oper.d.ts +5 -5
- package/es/entities/OperEntity.d.ts +3 -3
- package/es/entities/Path.d.ts +2 -2
- package/es/entities/Relation.d.ts +2 -2
- package/es/entities/RelationAuth.d.ts +3 -3
- package/es/entities/User.d.ts +4 -4
- package/es/entities/UserEntityClaim.d.ts +6 -6
- package/es/entities/UserEntityGrant.d.ts +2 -2
- package/es/entities/UserRelation.d.ts +4 -4
- package/es/store/AsyncRowStore.d.ts +2 -2
- package/es/store/AsyncRowStore.js +2 -2
- package/es/store/CascadeStore.d.ts +5 -3
- package/es/store/CascadeStore.js +56 -24
- package/es/store/IntrinsicCheckers.d.ts +1 -1
- package/es/store/IntrinsicCheckers.js +2 -2
- package/es/store/IntrinsicLogics.d.ts +1 -1
- package/es/store/RelationAuth.js +3 -3
- package/es/store/SyncRowStore.d.ts +1 -1
- package/es/store/SyncRowStore.js +1 -1
- package/es/store/TriggerExecutor.d.ts +6 -4
- package/es/store/TriggerExecutor.js +16 -4
- package/es/store/checker.d.ts +2 -2
- package/es/store/checker.js +45 -9
- package/es/store/filter.d.ts +3 -3
- package/es/store/filter.js +4 -4
- package/es/store/modi.d.ts +5 -5
- package/es/store/modi.js +4 -4
- package/es/store/projection.d.ts +1 -1
- package/es/store/relation.js +1 -1
- package/es/store/triggers.d.ts +4 -4
- package/es/store/triggers.js +2 -2
- package/es/timers/oper.d.ts +3 -3
- package/es/timers/oper.js +1 -1
- package/es/timers/vaccum.d.ts +3 -3
- package/es/types/Action.d.ts +1 -1
- package/es/types/AppLoader.d.ts +1 -1
- package/es/types/Aspect.d.ts +1 -1
- package/es/types/Auth.d.ts +2 -2
- package/es/types/Configuration.d.ts +7 -6
- package/es/types/Connector.d.ts +47 -1
- package/es/types/DataType.d.ts +2 -2
- package/es/types/Demand.d.ts +40 -6
- package/es/types/Endpoint.d.ts +17 -1
- package/es/types/Entity.d.ts +21 -4
- package/es/types/Entity.js +23 -0
- package/es/types/EntityDesc.d.ts +9 -8
- package/es/types/Environment.d.ts +17 -0
- package/es/types/Exception.d.ts +1 -1
- package/es/types/Exception.js +1 -1
- package/es/types/Expression.d.ts +13 -2
- package/es/types/Expression.js +36 -1
- package/es/types/Locale.d.ts +14 -1
- package/es/types/Locale.js +13 -1
- package/es/types/OakPackage.d.ts +29 -0
- package/es/types/OakPackage.js +30 -0
- package/es/types/Port.d.ts +1 -1
- package/es/types/RowStore.d.ts +9 -7
- package/es/types/Storage.d.ts +11 -3
- package/es/types/Storage.js +12 -1
- package/es/types/Style.d.ts +2 -2
- package/es/types/Sync.d.ts +3 -3
- package/es/types/Timer.d.ts +14 -2
- package/es/types/Trigger.d.ts +1 -1
- package/es/types/Watcher.d.ts +1 -1
- package/es/types/index.d.ts +1 -0
- package/es/types/index.js +1 -0
- package/es/utils/SimpleConnector.d.ts +30 -4
- package/es/utils/SimpleConnector.js +294 -21
- package/es/utils/concurrent.js +1 -1
- package/es/utils/decimal.d.ts +26 -0
- package/es/utils/decimal.js +87 -0
- package/es/utils/fetch/index.d.ts +1 -0
- package/es/utils/fetch/index.js +3 -0
- package/es/utils/fetch/index.mp.d.ts +3 -0
- package/es/utils/fetch/index.mp.js +280 -0
- package/es/utils/fetch/index.native.d.ts +1 -0
- package/es/utils/fetch/index.native.js +3 -0
- package/es/utils/fetch/index.web.d.ts +1 -0
- package/es/utils/fetch/index.web.js +3 -0
- package/es/utils/fetch/shared.d.ts +6 -0
- package/es/utils/fetch/shared.js +23 -0
- package/es/utils/localizedContent.d.ts +11 -0
- package/es/utils/localizedContent.js +346 -0
- package/es/utils/lodash.d.ts +1 -35
- package/es/utils/lodash.js +1 -52
- package/es/utils/module/combine.common.d.ts +3 -3
- package/es/utils/module/combine.common.js +2 -2
- package/es/utils/module/combine.dev.d.ts +2 -2
- package/es/utils/module/combine.dev.js +2 -2
- package/es/utils/module/combine.prod.d.ts +1 -1
- package/es/utils/module/combine.server.d.ts +2 -2
- package/es/utils/module/combine.server.js +2 -2
- package/es/utils/money.d.ts +2 -2
- package/es/utils/money.js +2 -2
- package/es/utils/operationResult.js +1 -1
- package/es/utils/projection.d.ts +3 -3
- package/es/utils/projection.js +1 -1
- package/es/utils/relationPath.d.ts +1 -1
- package/es/utils/relationPath.js +1 -1
- package/es/utils/row.d.ts +3 -3
- package/es/utils/row.js +2 -2
- package/es/utils/sseEndpoint.d.ts +41 -0
- package/es/utils/sseEndpoint.js +151 -0
- package/es/utils/toolkit.d.ts +28 -0
- package/es/utils/toolkit.js +220 -0
- package/es/utils/url/index.d.ts +1 -3
- package/es/utils/url/index.js +1 -1
- package/es/utils/url/index.mp.d.ts +16 -3
- package/es/utils/url/index.mp.js +2 -2
- package/es/utils/url/index.native.d.ts +13 -1
- package/es/utils/url/index.native.js +3 -1
- package/es/utils/url/index.web.d.ts +13 -1
- package/es/utils/url/index.web.js +3 -1
- package/es/utils/url/lightweight.d.ts +65 -0
- package/es/utils/url/lightweight.js +530 -0
- package/es/utils/url/urlObject.d.ts +16 -0
- package/es/utils/validate/id.d.ts +5 -0
- package/es/utils/validate/id.js +28 -0
- package/es/utils/validate/index.d.ts +4 -0
- package/es/utils/validate/index.js +4 -0
- package/es/utils/validate/mobile.d.ts +6 -0
- package/es/utils/validate/mobile.js +49 -0
- package/es/utils/validate/nationality.d.ts +14 -0
- package/es/utils/validate/nationality.data.d.ts +9 -0
- package/es/utils/validate/nationality.data.js +257 -0
- package/es/utils/validate/nationality.js +64 -0
- package/es/utils/validate/passport.d.ts +3 -0
- package/es/utils/validate/passport.js +19 -0
- package/es/utils/validator.d.ts +10 -8
- package/es/utils/validator.js +24 -40
- package/lib/actions/action.d.ts +1 -1
- package/lib/base-app-domain/EntityDict.d.ts +27 -0
- package/lib/base-app-domain/LocalizedContent/Schema.d.ts +19 -0
- package/lib/base-app-domain/LocalizedContent/Schema.js +4 -0
- package/lib/base-app-domain/LocalizedContent/Storage.d.ts +3 -0
- package/lib/base-app-domain/LocalizedContent/Storage.js +78 -0
- package/lib/base-app-domain/LocalizedContent/Style.d.ts +3 -0
- package/lib/base-app-domain/LocalizedContent/Style.js +15 -0
- package/lib/base-app-domain/LocalizedContent/_baseSchema.d.ts +58 -0
- package/lib/base-app-domain/Storage.js +26 -24
- package/lib/base-app-domain/StyleDict.js +10 -8
- package/lib/compiler/customChecks/i18n.js +5 -2
- package/lib/compiler/customChecks/runner.d.ts +1 -1
- package/lib/compiler/customChecks/types.d.ts +2 -1
- package/lib/compiler/dependencyBuilder.d.ts +11 -2
- package/lib/compiler/dependencyBuilder.js +304 -277
- package/lib/compiler/entityDescEnum.d.ts +5 -0
- package/lib/compiler/entityDescEnum.js +450 -0
- package/lib/compiler/entitySource.d.ts +28 -0
- package/lib/compiler/entitySource.js +529 -0
- package/lib/compiler/localeBuilder.d.ts +7 -2
- package/lib/compiler/localeBuilder.js +52 -56
- package/lib/compiler/routerBuilder.d.ts +32 -3
- package/lib/compiler/routerBuilder.js +160 -48
- package/lib/compiler/schemaBuilder.d.ts +12 -2
- package/lib/compiler/schemaBuilder.js +855 -350
- package/lib/compiler/tscBuilder.d.ts +20 -2
- package/lib/compiler/tscBuilder.js +217 -37
- package/lib/context/BackendRuntimeContext.d.ts +6 -4
- package/lib/context/BackendRuntimeContext.js +10 -3
- package/lib/context/ContextComposer.d.ts +93 -0
- package/lib/context/ContextComposer.js +361 -0
- package/lib/context/SerializedData.d.ts +2 -1
- package/lib/data/i18n.d.ts +1 -1
- package/lib/data/i18n.js +1 -86
- package/lib/data/i18n.json +86 -0
- package/lib/entities/ActionAuth.d.ts +3 -3
- package/lib/entities/I18n.d.ts +2 -2
- package/lib/entities/LocalizedContent.d.ts +22 -0
- package/lib/entities/LocalizedContent.js +104 -0
- package/lib/entities/Log.d.ts +3 -3
- package/lib/entities/Modi.d.ts +2 -2
- package/lib/entities/ModiEntity.d.ts +3 -3
- package/lib/entities/Oper.d.ts +5 -5
- package/lib/entities/OperEntity.d.ts +3 -3
- package/lib/entities/Path.d.ts +2 -2
- package/lib/entities/Relation.d.ts +2 -2
- package/lib/entities/RelationAuth.d.ts +3 -3
- package/lib/entities/User.d.ts +4 -4
- package/lib/entities/UserEntityClaim.d.ts +6 -6
- package/lib/entities/UserEntityGrant.d.ts +2 -2
- package/lib/entities/UserRelation.d.ts +4 -4
- package/lib/store/AsyncRowStore.d.ts +2 -2
- package/lib/store/AsyncRowStore.js +6 -7
- package/lib/store/CascadeStore.d.ts +5 -3
- package/lib/store/CascadeStore.js +101 -70
- package/lib/store/IntrinsicCheckers.d.ts +1 -1
- package/lib/store/IntrinsicCheckers.js +12 -13
- package/lib/store/IntrinsicLogics.d.ts +1 -1
- package/lib/store/RelationAuth.js +42 -43
- package/lib/store/SyncRowStore.d.ts +1 -1
- package/lib/store/SyncRowStore.js +4 -5
- package/lib/store/TriggerExecutor.d.ts +6 -4
- package/lib/store/TriggerExecutor.js +39 -28
- package/lib/store/checker.d.ts +2 -2
- package/lib/store/checker.js +55 -20
- package/lib/store/filter.d.ts +3 -3
- package/lib/store/filter.js +47 -48
- package/lib/store/modi.d.ts +5 -5
- package/lib/store/modi.js +5 -6
- package/lib/store/projection.d.ts +1 -1
- package/lib/store/relation.js +4 -5
- package/lib/store/triggers.d.ts +4 -4
- package/lib/store/triggers.js +13 -14
- package/lib/timers/oper.d.ts +3 -3
- package/lib/timers/vaccum.d.ts +3 -3
- package/lib/types/Action.d.ts +1 -1
- package/lib/types/AppLoader.d.ts +1 -1
- package/lib/types/Aspect.d.ts +1 -1
- package/lib/types/Auth.d.ts +2 -2
- package/lib/types/Configuration.d.ts +7 -6
- package/lib/types/Connector.d.ts +47 -1
- package/lib/types/DataType.d.ts +2 -2
- package/lib/types/Demand.d.ts +40 -6
- package/lib/types/Endpoint.d.ts +17 -1
- package/lib/types/Entity.d.ts +21 -4
- package/lib/types/Entity.js +27 -0
- package/lib/types/EntityDesc.d.ts +9 -8
- package/lib/types/Environment.d.ts +17 -0
- package/lib/types/Exception.d.ts +1 -1
- package/lib/types/Exception.js +2 -2
- package/lib/types/Expression.d.ts +13 -2
- package/lib/types/Expression.js +40 -5
- package/lib/types/Locale.d.ts +14 -1
- package/lib/types/Locale.js +14 -0
- package/lib/types/OakPackage.d.ts +29 -0
- package/lib/types/OakPackage.js +36 -0
- package/lib/types/Port.d.ts +1 -1
- package/lib/types/RowStore.d.ts +9 -7
- package/lib/types/Storage.d.ts +11 -3
- package/lib/types/Storage.js +13 -0
- package/lib/types/Style.d.ts +2 -2
- package/lib/types/Sync.d.ts +3 -3
- package/lib/types/Timer.d.ts +14 -2
- package/lib/types/Trigger.d.ts +1 -1
- package/lib/types/Watcher.d.ts +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/utils/SimpleConnector.d.ts +30 -4
- package/lib/utils/SimpleConnector.js +297 -24
- package/lib/utils/concurrent.js +4 -5
- package/lib/utils/decimal.d.ts +26 -0
- package/lib/utils/decimal.js +112 -0
- package/lib/utils/fetch/index.d.ts +1 -0
- package/lib/utils/fetch/index.js +6 -0
- package/lib/utils/fetch/index.mp.d.ts +3 -0
- package/lib/utils/fetch/index.mp.js +285 -0
- package/lib/utils/fetch/index.native.d.ts +1 -0
- package/lib/utils/fetch/index.native.js +6 -0
- package/lib/utils/fetch/index.web.d.ts +1 -0
- package/lib/utils/fetch/index.web.js +6 -0
- package/lib/utils/fetch/shared.d.ts +6 -0
- package/lib/utils/fetch/shared.js +28 -0
- package/lib/utils/localizedContent.d.ts +11 -0
- package/lib/utils/localizedContent.js +352 -0
- package/lib/utils/lodash.d.ts +1 -35
- package/lib/utils/lodash.js +1 -76
- package/lib/utils/module/combine.common.d.ts +3 -3
- package/lib/utils/module/combine.common.js +6 -7
- package/lib/utils/module/combine.dev.d.ts +2 -2
- package/lib/utils/module/combine.dev.js +19 -19
- package/lib/utils/module/combine.prod.d.ts +1 -1
- package/lib/utils/module/combine.server.d.ts +2 -2
- package/lib/utils/module/combine.server.js +19 -19
- package/lib/utils/money.d.ts +2 -2
- package/lib/utils/money.js +2 -2
- package/lib/utils/operationResult.js +4 -4
- package/lib/utils/projection.d.ts +3 -3
- package/lib/utils/relationPath.d.ts +1 -1
- package/lib/utils/relationPath.js +10 -11
- package/lib/utils/row.d.ts +3 -3
- package/lib/utils/row.js +4 -5
- package/lib/utils/sseEndpoint.d.ts +41 -0
- package/lib/utils/sseEndpoint.js +156 -0
- package/lib/utils/toolkit.d.ts +28 -0
- package/lib/utils/toolkit.js +253 -0
- package/lib/utils/url/index.d.ts +1 -3
- package/lib/utils/url/index.js +3 -1
- package/lib/utils/url/index.mp.d.ts +16 -3
- package/lib/utils/url/index.mp.js +6 -4
- package/lib/utils/url/index.native.d.ts +13 -1
- package/lib/utils/url/index.native.js +5 -1
- package/lib/utils/url/index.web.d.ts +13 -1
- package/lib/utils/url/index.web.js +5 -1
- package/lib/utils/url/lightweight.d.ts +65 -0
- package/lib/utils/url/lightweight.js +535 -0
- package/lib/utils/url/urlObject.d.ts +16 -0
- package/lib/utils/url/urlObject.js +2 -0
- package/lib/utils/url/whatwg-url/lib/URL-impl.d.ts +8 -15
- package/lib/utils/url/whatwg-url/lib/infra.js +5 -4
- package/lib/utils/url/whatwg-url/lib/urlencoded.d.ts +3 -1
- package/lib/utils/url/whatwg-url/lib/utils.d.ts +1 -1
- package/lib/utils/validate/id.d.ts +5 -0
- package/lib/utils/validate/id.js +35 -0
- package/lib/utils/validate/index.d.ts +4 -0
- package/lib/utils/validate/index.js +7 -0
- package/lib/utils/validate/mobile.d.ts +6 -0
- package/lib/utils/validate/mobile.js +57 -0
- package/lib/utils/validate/nationality.d.ts +14 -0
- package/lib/utils/validate/nationality.data.d.ts +9 -0
- package/lib/utils/validate/nationality.data.js +260 -0
- package/lib/utils/validate/nationality.js +76 -0
- package/lib/utils/validate/passport.d.ts +3 -0
- package/lib/utils/validate/passport.js +24 -0
- package/lib/utils/validator.d.ts +10 -8
- package/lib/utils/validator.js +38 -42
- package/package.json +21 -11
- package/es/utils/url/whatwg-url/index.d.ts +0 -3
- package/es/utils/url/whatwg-url/index.js +0 -12
- package/es/utils/url/whatwg-url/lib/URL-impl.d.ts +0 -27
- package/es/utils/url/whatwg-url/lib/URL-impl.js +0 -172
- package/es/utils/url/whatwg-url/lib/URL.js +0 -295
- package/es/utils/url/whatwg-url/lib/URLSearchParams-impl.d.ts +0 -19
- package/es/utils/url/whatwg-url/lib/URLSearchParams-impl.js +0 -123
- package/es/utils/url/whatwg-url/lib/URLSearchParams.js +0 -423
- package/es/utils/url/whatwg-url/lib/infra.d.ts +0 -12
- package/es/utils/url/whatwg-url/lib/infra.js +0 -19
- package/es/utils/url/whatwg-url/lib/url-state-machine.d.ts +0 -24
- package/es/utils/url/whatwg-url/lib/url-state-machine.js +0 -1228
- package/es/utils/url/whatwg-url/lib/urlencoded.d.ts +0 -14
- package/es/utils/url/whatwg-url/lib/urlencoded.js +0 -160
- package/es/utils/url/whatwg-url/lib/utils.d.ts +0 -37
- package/es/utils/url/whatwg-url/lib/utils.js +0 -99
- package/lib/store/diffSchema.d.ts +0 -1
- package/lib/utils/url/whatwg-url/index.d.ts +0 -3
- package/lib/utils/url/whatwg-url/index.js +0 -16
- package/lib/utils/url/whatwg-url/lib/URL-impl.js +0 -175
- package/lib/utils/url/whatwg-url/lib/URL.d.ts +0 -1
- package/lib/utils/url/whatwg-url/lib/URL.js +0 -298
- package/lib/utils/url/whatwg-url/lib/URLSearchParams-impl.d.ts +0 -19
- package/lib/utils/url/whatwg-url/lib/URLSearchParams-impl.js +0 -126
- package/lib/utils/url/whatwg-url/lib/URLSearchParams.d.ts +0 -1
- package/lib/utils/url/whatwg-url/lib/URLSearchParams.js +0 -426
- package/lib/utils/url/whatwg-url/lib/infra.d.ts +0 -12
- package/lib/utils/url/whatwg-url/lib/url-state-machine.d.ts +0 -24
- package/lib/utils/url/whatwg-url/lib/url-state-machine.js +0 -1238
- package/lib/utils/url/whatwg-url/lib/urlencoded.js +0 -162
- package/lib/utils/url/whatwg-url/lib/utils.js +0 -101
- package/src/entities/ActionAuth.ts +0 -50
- package/src/entities/I18n.ts +0 -53
- package/src/entities/Log.ts +0 -62
- package/src/entities/Modi.ts +0 -107
- package/src/entities/ModiEntity.ts +0 -35
- package/src/entities/Oper.ts +0 -115
- package/src/entities/OperEntity.ts +0 -36
- package/src/entities/Path.ts +0 -56
- package/src/entities/Relation.ts +0 -53
- package/src/entities/RelationAuth.ts +0 -53
- package/src/entities/User.ts +0 -85
- package/src/entities/UserEntityClaim.ts +0 -41
- package/src/entities/UserEntityGrant.ts +0 -33
- package/src/entities/UserRelation.ts +0 -60
- /package/es/{utils/url/whatwg-url/lib/URL.d.ts → base-app-domain/LocalizedContent/_baseSchema.js} +0 -0
- /package/es/utils/url/{whatwg-url/lib/URLSearchParams.d.ts → urlObject.js} +0 -0
- /package/lib/{store/diffSchema.js → base-app-domain/LocalizedContent/_baseSchema.js} +0 -0
package/README.md
CHANGED
package/es/actions/action.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionDef } from
|
|
1
|
+
import { ActionDef } from "../types/Action";
|
|
2
2
|
export type ReadOnlyAction = 'select' | 'count' | 'stat' | 'download' | 'aggregate';
|
|
3
3
|
export type AppendOnlyAction = ReadOnlyAction | 'create';
|
|
4
4
|
export type ExcludeUpdateAction = AppendOnlyAction | 'remove';
|
|
@@ -2,6 +2,7 @@ import { MakeFilter, SubQueryPredicateMetadata } from "../types/Demand";
|
|
|
2
2
|
import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, AggregationResult } from "../types/Entity";
|
|
3
3
|
import * as BaseActionAuth from "./ActionAuth/_baseSchema";
|
|
4
4
|
import * as BaseI18n from "./I18n/_baseSchema";
|
|
5
|
+
import * as BaseLocalizedContent from "./LocalizedContent/_baseSchema";
|
|
5
6
|
import * as BaseLog from "./Log/_baseSchema";
|
|
6
7
|
import * as BaseModi from "./Modi/_baseSchema";
|
|
7
8
|
import * as BaseModiEntity from "./ModiEntity/_baseSchema";
|
|
@@ -82,6 +83,31 @@ export type I18n = {
|
|
|
82
83
|
Remove: OakOperation<"remove", I18n["RemoveOperationData"], I18n["Filter"], I18n["Sorter"]>;
|
|
83
84
|
Operation: I18n["Create"] | I18n["Update"] | I18n["Remove"];
|
|
84
85
|
};
|
|
86
|
+
export type LocalizedContent = {
|
|
87
|
+
OpSchema: BaseLocalizedContent.OpSchema;
|
|
88
|
+
Action: BaseLocalizedContent.OpAction;
|
|
89
|
+
Schema: BaseLocalizedContent.OpSchema & {};
|
|
90
|
+
Projection: BaseLocalizedContent.OpProjection & {};
|
|
91
|
+
FilterUnit: BaseLocalizedContent.OpFilter & {};
|
|
92
|
+
Filter: MakeFilter<LocalizedContent["FilterUnit"]>;
|
|
93
|
+
SortAttr: Partial<BaseLocalizedContent.OpSortAttr | {}>;
|
|
94
|
+
SortNode: {
|
|
95
|
+
$attr: LocalizedContent["SortAttr"];
|
|
96
|
+
$direction?: "asc" | "desc";
|
|
97
|
+
};
|
|
98
|
+
Sorter: LocalizedContent["SortNode"][];
|
|
99
|
+
Selection: OakSelection<"select", LocalizedContent["Projection"], LocalizedContent["Filter"], LocalizedContent["Sorter"]>;
|
|
100
|
+
Aggregation: DeduceAggregation<LocalizedContent["Projection"], LocalizedContent["Filter"], LocalizedContent["Sorter"]>;
|
|
101
|
+
CreateOperationData: FormCreateData<BaseLocalizedContent.OpSchema>;
|
|
102
|
+
CreateSingle: OakOperation<"create", LocalizedContent["CreateOperationData"]>;
|
|
103
|
+
CreateMulti: OakOperation<"create", Array<LocalizedContent["CreateOperationData"]>>;
|
|
104
|
+
Create: LocalizedContent["CreateSingle"] | LocalizedContent["CreateMulti"];
|
|
105
|
+
UpdateOperationData: FormUpdateData<BaseLocalizedContent.OpSchema>;
|
|
106
|
+
Update: OakOperation<BaseLocalizedContent.OpUpdateAction, LocalizedContent["UpdateOperationData"], LocalizedContent["Filter"], LocalizedContent["Sorter"]>;
|
|
107
|
+
RemoveOperationData: {};
|
|
108
|
+
Remove: OakOperation<"remove", LocalizedContent["RemoveOperationData"], LocalizedContent["Filter"], LocalizedContent["Sorter"]>;
|
|
109
|
+
Operation: LocalizedContent["Create"] | LocalizedContent["Update"] | LocalizedContent["Remove"];
|
|
110
|
+
};
|
|
85
111
|
export type Log = {
|
|
86
112
|
OpSchema: BaseLog.OpSchema;
|
|
87
113
|
Action: BaseLog.OpAction;
|
|
@@ -712,6 +738,7 @@ export type UserRelation = {
|
|
|
712
738
|
export type EntityDict = {
|
|
713
739
|
actionAuth: ActionAuth;
|
|
714
740
|
i18n: I18n;
|
|
741
|
+
localizedContent: LocalizedContent;
|
|
715
742
|
log: Log;
|
|
716
743
|
modi: Modi;
|
|
717
744
|
modiEntity: ModiEntity;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from "./_baseSchema";
|
|
2
|
+
import { LocalizedContent } from "../EntityDict";
|
|
3
|
+
export type Schema = LocalizedContent["Schema"];
|
|
4
|
+
export type Action = LocalizedContent["Action"];
|
|
5
|
+
export type Projection = LocalizedContent["Projection"];
|
|
6
|
+
export type Filter = LocalizedContent["Filter"];
|
|
7
|
+
export type SortNode = LocalizedContent["SortNode"];
|
|
8
|
+
export type Sorter = LocalizedContent["Sorter"];
|
|
9
|
+
export type Selection = LocalizedContent["Selection"];
|
|
10
|
+
export type Aggregation = LocalizedContent["Aggregation"];
|
|
11
|
+
export type CreateOperationData = LocalizedContent["CreateOperationData"];
|
|
12
|
+
export type CreateSingle = LocalizedContent["CreateSingle"];
|
|
13
|
+
export type CreateMulti = LocalizedContent["CreateMulti"];
|
|
14
|
+
export type Create = LocalizedContent["Create"];
|
|
15
|
+
export type UpdateOperationData = LocalizedContent["UpdateOperationData"];
|
|
16
|
+
export type Update = LocalizedContent["Update"];
|
|
17
|
+
export type RemoveOperationData = LocalizedContent["RemoveOperationData"];
|
|
18
|
+
export type Remove = LocalizedContent["Remove"];
|
|
19
|
+
export type Operation = LocalizedContent["Operation"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./_baseSchema";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { genericActions as actions } from "../../actions/action";
|
|
2
|
+
export const desc = {
|
|
3
|
+
attributes: {
|
|
4
|
+
entity: {
|
|
5
|
+
notNull: true,
|
|
6
|
+
type: "varchar",
|
|
7
|
+
params: {
|
|
8
|
+
length: 32
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
entityId: {
|
|
12
|
+
notNull: true,
|
|
13
|
+
type: "varchar",
|
|
14
|
+
params: {
|
|
15
|
+
length: 64
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
language: {
|
|
19
|
+
notNull: true,
|
|
20
|
+
type: "enum",
|
|
21
|
+
enumeration: ["zh_CN", "en_US", "es_ES", "fr_FR", "ar_SA", "ru_RU"]
|
|
22
|
+
},
|
|
23
|
+
data: {
|
|
24
|
+
notNull: true,
|
|
25
|
+
type: "object"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
actionType: "crud",
|
|
29
|
+
actions,
|
|
30
|
+
indexes: [
|
|
31
|
+
{
|
|
32
|
+
name: "idx_localizedContent_entity_entityId_language",
|
|
33
|
+
attributes: [
|
|
34
|
+
{
|
|
35
|
+
name: "entity"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "entityId"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "language"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
config: {
|
|
45
|
+
unique: true,
|
|
46
|
+
type: "btree"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "idx_localizedContent_entity_entityId",
|
|
51
|
+
attributes: [
|
|
52
|
+
{
|
|
53
|
+
name: "entity"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "entityId"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
config: {
|
|
60
|
+
type: "btree"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "idx_localizedContent_language",
|
|
65
|
+
attributes: [
|
|
66
|
+
{
|
|
67
|
+
name: "language"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
config: {
|
|
71
|
+
type: "btree"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { JsonProjection } from "../../types/DataType";
|
|
2
|
+
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey, JsonFilter } from "../../types/Demand";
|
|
3
|
+
import { MakeAction as OakMakeAction, EntityShape } from "../../types/Entity";
|
|
4
|
+
import { GenericAction } from "../../actions/action";
|
|
5
|
+
import { String } from "../../types/DataType";
|
|
6
|
+
import { Language } from "../../types/Locale";
|
|
7
|
+
export type LocalizedContentItem = {
|
|
8
|
+
digest: string;
|
|
9
|
+
translation: string;
|
|
10
|
+
source?: 'machine' | 'manual';
|
|
11
|
+
updatedAt?: number;
|
|
12
|
+
updatedBy?: String<64>;
|
|
13
|
+
};
|
|
14
|
+
export type LocalizedContentData = Record<string, LocalizedContentItem>;
|
|
15
|
+
export type OpSchema = EntityShape & {
|
|
16
|
+
entity: String<32>;
|
|
17
|
+
entityId: String<64>;
|
|
18
|
+
language: Language;
|
|
19
|
+
data: LocalizedContentData;
|
|
20
|
+
} & {
|
|
21
|
+
[A in ExpressionKey]?: any;
|
|
22
|
+
};
|
|
23
|
+
export type OpAttr = keyof OpSchema;
|
|
24
|
+
export type OpFilter = {
|
|
25
|
+
id: Q_StringValue;
|
|
26
|
+
$$createAt$$: Q_DateValue;
|
|
27
|
+
$$seq$$: Q_NumberValue;
|
|
28
|
+
$$updateAt$$: Q_DateValue;
|
|
29
|
+
entity: Q_StringValue;
|
|
30
|
+
entityId: Q_StringValue;
|
|
31
|
+
language: Q_EnumValue<Language>;
|
|
32
|
+
data: JsonFilter<LocalizedContentData>;
|
|
33
|
+
} & ExprOp<OpAttr | string>;
|
|
34
|
+
export type OpProjection = {
|
|
35
|
+
"#id"?: NodeId;
|
|
36
|
+
[k: string]: any;
|
|
37
|
+
id?: number;
|
|
38
|
+
$$createAt$$?: number;
|
|
39
|
+
$$updateAt$$?: number;
|
|
40
|
+
$$seq$$?: number;
|
|
41
|
+
entity?: number;
|
|
42
|
+
entityId?: number;
|
|
43
|
+
language?: number;
|
|
44
|
+
data?: number | JsonProjection<LocalizedContentData>;
|
|
45
|
+
} & Partial<ExprOp<OpAttr | string>>;
|
|
46
|
+
export type OpSortAttr = Partial<{
|
|
47
|
+
id: number;
|
|
48
|
+
$$createAt$$: number;
|
|
49
|
+
$$seq$$: number;
|
|
50
|
+
$$updateAt$$: number;
|
|
51
|
+
entity: number;
|
|
52
|
+
entityId: number;
|
|
53
|
+
language: number;
|
|
54
|
+
data: number;
|
|
55
|
+
[k: string]: any;
|
|
56
|
+
} | ExprOp<OpAttr | string>>;
|
|
57
|
+
export type OpAction = OakMakeAction<GenericAction | string>;
|
|
58
|
+
export type OpUpdateAction = "update" | string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { desc as actionAuthDesc } from "./ActionAuth/Storage";
|
|
2
2
|
import { desc as i18nDesc } from "./I18n/Storage";
|
|
3
|
+
import { desc as localizedContentDesc } from "./LocalizedContent/Storage";
|
|
3
4
|
import { desc as logDesc } from "./Log/Storage";
|
|
4
5
|
import { desc as modiDesc } from "./Modi/Storage";
|
|
5
6
|
import { desc as modiEntityDesc } from "./ModiEntity/Storage";
|
|
@@ -15,6 +16,7 @@ import { desc as userRelationDesc } from "./UserRelation/Storage";
|
|
|
15
16
|
export const storageSchema = {
|
|
16
17
|
actionAuth: actionAuthDesc,
|
|
17
18
|
i18n: i18nDesc,
|
|
19
|
+
localizedContent: localizedContentDesc,
|
|
18
20
|
log: logDesc,
|
|
19
21
|
modi: modiDesc,
|
|
20
22
|
modiEntity: modiEntityDesc,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { style as localizedContent } from "./LocalizedContent/Style";
|
|
1
2
|
import { style as log } from "./Log/Style";
|
|
2
3
|
import { style as modi } from "./Modi/Style";
|
|
3
4
|
import { style as oper } from "./Oper/Style";
|
|
4
5
|
import { style as user } from "./User/Style";
|
|
5
6
|
export const styleDict = {
|
|
7
|
+
localizedContent,
|
|
6
8
|
log,
|
|
7
9
|
modi,
|
|
8
10
|
oper,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as fs from 'fs';
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
import * as ts from 'typescript';
|
|
4
|
-
import { upperFirst } from '
|
|
4
|
+
import { upperFirst } from '../../utils/toolkit';
|
|
5
5
|
import { IGNORED_I18N_KEY_PATTERNS, LOCALE_FILE_NAMES, analyzeExpressionType, isKeyExistsInI18nData, loadI18nData, } from './utils';
|
|
6
6
|
/**
|
|
7
7
|
* `t()` i18n key 静态检查器,负责 key 存在性与占位符参数校验。
|
|
@@ -103,6 +103,9 @@ export class I18nChecker {
|
|
|
103
103
|
this.checkPropertyAccessKey(firstArg, callNode, i18nData);
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
+
if (this.services.customConfig.locale?.ignoreComplaxExpressions ?? false) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
106
109
|
this.addDiagnostic(callNode, `i18n key 参数使用了复杂表达式 (${firstArg.getText(sourceFile)}),无法进行检查。`, 9206, {
|
|
107
110
|
reason: 'ComplexExpression',
|
|
108
111
|
reasonDetails: [`✘ 表达式 ${firstArg.getText(sourceFile)} 过于复杂,无法确定其值`],
|
|
@@ -4,7 +4,7 @@ import { AsyncContextChecker } from './asyncContext';
|
|
|
4
4
|
import { IgnoreCommentIndex } from './ignoreComments';
|
|
5
5
|
import { I18nChecker } from './i18n';
|
|
6
6
|
import { JsxLiteralChecker } from './jsxChecker';
|
|
7
|
-
import { CustomCheckState
|
|
7
|
+
import { CustomCheckState } from './types';
|
|
8
8
|
import { getSymbolOfDeclaration, isFileInCheckScope, isFunctionLikeDeclaration, } from './utils';
|
|
9
9
|
/**
|
|
10
10
|
* 自定义检查总控执行器,负责调度各检查器并提供共享分析能力。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as ts from
|
|
1
|
+
import * as ts from "typescript";
|
|
2
2
|
/**
|
|
3
3
|
* 自定义检查的忽略注释标签。
|
|
4
4
|
*/
|
|
@@ -19,6 +19,7 @@ export interface OakBuildChecksConfig {
|
|
|
19
19
|
warnStringKeys?: boolean;
|
|
20
20
|
checkJsxLiterals?: boolean;
|
|
21
21
|
jsxLiteralPattern?: string;
|
|
22
|
+
ignoreComplaxExpressions?: boolean;
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
@@ -4,20 +4,29 @@ type DepGraph = {
|
|
|
4
4
|
dependencies: Record<string, Record<string, 1>>;
|
|
5
5
|
ascOrder: string[];
|
|
6
6
|
};
|
|
7
|
-
export type
|
|
7
|
+
export type DependencyRootPlan = {
|
|
8
8
|
coveredDependencies: string[];
|
|
9
9
|
depLibGraph: Record<string, string[]>;
|
|
10
10
|
rootDependencies: string[];
|
|
11
11
|
};
|
|
12
|
-
export declare function
|
|
12
|
+
export declare function resolveDependencyRootPlan(cwd: string, dependencies: string[]): DependencyRootPlan;
|
|
13
|
+
export declare function resolveDeclaredDependencies(dir: string): string[];
|
|
13
14
|
/**
|
|
14
15
|
* 构建项目依赖关系图
|
|
15
16
|
* @param cwd
|
|
16
17
|
* @returns
|
|
17
18
|
*/
|
|
18
19
|
export declare function analyzeDepedency(cwd: string): DepGraph;
|
|
20
|
+
type ContextTarget = 'Backend' | 'Frontend';
|
|
21
|
+
export declare function resolveContextRootDependencies(cwd: string, target: ContextTarget): string[];
|
|
22
|
+
export declare function renderGeneratedContextSource(cwd: string, target: ContextTarget, isModule: boolean): string;
|
|
23
|
+
export declare function writeContextCompositionFiles(cwd: string, isModule: boolean, templates?: {
|
|
24
|
+
backendRuntimeContext: string;
|
|
25
|
+
frontendRuntimeContext: string;
|
|
26
|
+
}): void;
|
|
19
27
|
export declare function renderFeatureIndexSource(dependencies: string[], briefNames: string[], sourceFile: ts.SourceFile, isModule: boolean, printer?: ts.Printer): string;
|
|
20
28
|
export declare function renderInitializeFeaturesSource(cwd: string, dependencies: string[], briefNames: string[], sourceFile: ts.SourceFile, printer?: ts.Printer): string;
|
|
29
|
+
export declare function resolveDependencyTemplateFile(cwd: string, dependencies: string[], templateFileName: string, fallback: string): string;
|
|
21
30
|
export declare function initializeDependencyTemplates(cwd?: string, rebuild?: boolean): string[];
|
|
22
31
|
/**
|
|
23
32
|
* 本函数用于构建src/initialize.dev, src/initialize.prod, src/initializeFeatures, src/context/FrontendContext, src/contextBackendContext
|