openxiangda-devkit-core 2.51.1 → 2.52.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/dist/application-services.d.ts.map +1 -1
- package/dist/compiler/application-model.d.ts +2 -1
- package/dist/compiler/application-model.d.ts.map +1 -1
- package/dist/compiler/application-model.js +2 -1
- package/dist/compiler/application-model.js.map +1 -1
- package/dist/compiler/bundle.d.ts.map +1 -1
- package/dist/compiler/bundle.js +4 -1
- package/dist/compiler/bundle.js.map +1 -1
- package/dist/compiler/config.d.ts +2 -0
- package/dist/compiler/config.d.ts.map +1 -1
- package/dist/compiler/config.js +11 -6
- package/dist/compiler/config.js.map +1 -1
- package/dist/compiler/permission-review.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/compiler/config.js
CHANGED
|
@@ -2,7 +2,7 @@ import { assertWorkflowNativeStagePolicy } from 'openxiangda-contracts';
|
|
|
2
2
|
import { validateAuthenticatedPublicRead, AuthenticatedPublicReadContractError } from 'openxiangda-contracts/native-compiler';
|
|
3
3
|
import { DATE_EVENT_RESERVED_DATA_FIELDS_V2, dateEventProjectionFieldsV2, dateEventProjectionEnvelopeSchemaV2 } from 'openxiangda-contracts/native-compiler';
|
|
4
4
|
import { validateUserCandidateReferences, validateWorkflowUserCandidateBindings, UserCandidateContractError } from 'openxiangda-contracts';
|
|
5
|
-
import { parseNativeUniqueKeys,
|
|
5
|
+
import { parseNativeUniqueKeys, DATA_SUBTABLE_DEFAULT_TOTAL_ROWS, dataOwnedRowLimit, isDataOwnedRowLimit } from 'openxiangda-contracts';
|
|
6
6
|
import { assertWorkflowOwnedSubjectCreate } from 'openxiangda-contracts';
|
|
7
7
|
export { workflowBusinessCommandInvocationSchema } from 'openxiangda-contracts';
|
|
8
8
|
import { validateManagedConcurrency } from 'openxiangda-contracts/native-compiler';
|
|
@@ -2450,8 +2450,8 @@ export function validateAppConfig(value) {
|
|
|
2450
2450
|
for (const error of validateWorkflowTaskPages(definition, new Map((Array.isArray(policyFields) ? policyFields : []).map(raw => {
|
|
2451
2451
|
const field = object(raw);
|
|
2452
2452
|
const surfaceField = object(object(policyResource.surface).fields)[string(field.code)];
|
|
2453
|
-
return [string(field.code), { ...object(surfaceField), type: string(field.type) }];
|
|
2454
|
-
}))))
|
|
2453
|
+
return [string(field.code), { ...object(surfaceField), ...field, type: string(field.type) }];
|
|
2454
|
+
})), undefined, dataOwnedRowLimit(object(policyResource.schema))))
|
|
2455
2455
|
diagnostics.push(diagnostic('APP_CONFIG_WORKFLOW_TASK_PAGE_INVALID', error, `${path}.definition.taskPages`));
|
|
2456
2456
|
for (const error of validateWorkflowInstanceCommandPolicies(definition, {
|
|
2457
2457
|
appCode,
|
|
@@ -4698,7 +4698,7 @@ export function materializeDataResource(appCode, declaration) {
|
|
|
4698
4698
|
appCode,
|
|
4699
4699
|
code: declaration.code,
|
|
4700
4700
|
name: declaration.name,
|
|
4701
|
-
schema: { fields },
|
|
4701
|
+
schema: { fields, ...(declaration.ownedRowLimit !== undefined ? { ownedRowLimit: declaration.ownedRowLimit } : {}) },
|
|
4702
4702
|
...(declaration.invariants ? { invariants: declaration.invariants } : {}),
|
|
4703
4703
|
...(declaration.decimalReservationLifecycle !== undefined ? { decimalReservationLifecycle: declaration.decimalReservationLifecycle } : {}),
|
|
4704
4704
|
...(uniqueKeys !== undefined ? { uniqueKeys } : {}),
|
|
@@ -4773,6 +4773,7 @@ export function validateAppDeclaration(value) {
|
|
|
4773
4773
|
'recordPrint',
|
|
4774
4774
|
'recordComments',
|
|
4775
4775
|
'recordDeletion',
|
|
4776
|
+
'ownedRowLimit',
|
|
4776
4777
|
]);
|
|
4777
4778
|
const fieldKeys = new Set([
|
|
4778
4779
|
'code',
|
|
@@ -5087,8 +5088,12 @@ export function validateAppDeclaration(value) {
|
|
|
5087
5088
|
const configured = Number(object(field.subtable).maxRows);
|
|
5088
5089
|
return total + (Number.isSafeInteger(configured) ? configured : 20);
|
|
5089
5090
|
}, 0);
|
|
5090
|
-
|
|
5091
|
-
|
|
5091
|
+
const declaredLimit = declaration.resource.ownedRowLimit;
|
|
5092
|
+
const limit = declaredLimit === undefined ? DATA_SUBTABLE_DEFAULT_TOTAL_ROWS : isDataOwnedRowLimit(declaredLimit) ? declaredLimit : 0;
|
|
5093
|
+
if (declaredLimit !== undefined && !isDataOwnedRowLimit(declaredLimit))
|
|
5094
|
+
diagnostics.push(diagnostic('NATIVE_DATA_OWNED_ROW_LIMIT_INVALID', 'ownedRowLimit 必须是1到1000的整数', `data.resources[${declaration.resourceIndex}].ownedRowLimit`));
|
|
5095
|
+
if (aggregateMaxRows > limit) {
|
|
5096
|
+
diagnostics.push(diagnostic('APP_CONFIG_DATA_SUBTABLE_AGGREGATE_MAX_ROWS_EXCEEDED', `同一父资源的所有子表 maxRows 总和不能超过 ${limit}`, `data.resources[${declaration.resourceIndex}].fields`));
|
|
5092
5097
|
}
|
|
5093
5098
|
fields.forEach((rawField, fieldIndex) => {
|
|
5094
5099
|
const field = object(rawField);
|