@cosmicdrift/kumiko-framework 0.406.0 → 0.409.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/agents/api/framework-db.md +1 -0
- package/agents/api/framework-engine.md +15 -2
- package/agents/api/framework-ui-types.md +15 -0
- package/agents/api/renderer-web.md +156 -2
- package/agents/api/types.md +113 -71
- package/agents/api.md +4 -4
- package/agents/boot-rules.md +743 -0
- package/agents/examples/contact.md +167 -0
- package/agents/examples/delivery-notifications.md +34 -1
- package/agents/examples/record-detail-layout.md +13 -2
- package/agents/examples/search.md +65 -3
- package/agents/examples/secrets-demo.md +96 -2
- package/agents/examples/tenant-inactivity.md +138 -0
- package/agents/examples.md +2 -0
- package/agents/features-index.md +4 -0
- package/agents/features.md +24 -1
- package/agents/widgets.md +12 -1
- package/dist/api/export/export-rows.js +1 -0
- package/dist/compliance/index.d.ts +1 -1
- package/dist/db/event-store-executor-read-where.js +15 -5
- package/dist/db/index.d.ts +1 -1
- package/dist/db/index.js +1 -1
- package/dist/db/migrate-generator.js +3 -1
- package/dist/db/queries/event-consumer.js +11 -7
- package/dist/db/queries/event-store.d.ts +2 -1
- package/dist/db/queries/event-store.js +25 -6
- package/dist/db/queries/rls-boot-catalog.js +3 -1
- package/dist/db/queries/session-advisory-lock.d.ts +7 -0
- package/dist/db/queries/session-advisory-lock.js +23 -0
- package/dist/db/query.js +7 -10
- package/dist/db/row-level-security-connection.js +4 -2
- package/dist/engine/active-membership.js +1 -0
- package/dist/engine/boot-validator/access-declarations.js +57 -33
- package/dist/engine/boot-validator/action-wiring.js +8 -6
- package/dist/engine/boot-validator/agent-effect-rules.d.ts +12 -0
- package/dist/engine/boot-validator/agent-effect-rules.js +12 -0
- package/dist/engine/boot-validator/agent-effect.d.ts +2 -0
- package/dist/engine/boot-validator/agent-effect.js +20 -0
- package/dist/engine/boot-validator/boot-context.js +5 -1
- package/dist/engine/boot-validator/boot-environment-rules.d.ts +12 -0
- package/dist/engine/boot-validator/boot-environment-rules.js +12 -0
- package/dist/engine/boot-validator/boot-phases-app.js +5 -1
- package/dist/engine/boot-validator/boot-phases.js +3 -1
- package/dist/engine/boot-validator/boot-rules.d.ts +2619 -0
- package/dist/engine/boot-validator/boot-rules.js +58 -0
- package/dist/engine/boot-validator/bundled-lists-table.js +23 -9
- package/dist/engine/boot-validator/config-deps.js +71 -23
- package/dist/engine/boot-validator/config-edit-action-rules.d.ts +17 -0
- package/dist/engine/boot-validator/config-edit-action-rules.js +17 -0
- package/dist/engine/boot-validator/config-key-rules.d.ts +117 -0
- package/dist/engine/boot-validator/config-key-rules.js +117 -0
- package/dist/engine/boot-validator/custom-screen-write-qns.js +6 -2
- package/dist/engine/boot-validator/derived-sql-fields-rules.d.ts +77 -0
- package/dist/engine/boot-validator/derived-sql-fields-rules.js +77 -0
- package/dist/engine/boot-validator/derived-sql-fields.js +53 -17
- package/dist/engine/boot-validator/detail-screens.js +10 -4
- package/dist/engine/boot-validator/entity-declaration-rules.d.ts +92 -0
- package/dist/engine/boot-validator/entity-declaration-rules.js +92 -0
- package/dist/engine/boot-validator/entity-handler-access-rules.d.ts +102 -0
- package/dist/engine/boot-validator/entity-handler-access-rules.js +102 -0
- package/dist/engine/boot-validator/entity-handler.d.ts +0 -7
- package/dist/engine/boot-validator/entity-handler.js +259 -355
- package/dist/engine/boot-validator/entity-image-variants.d.ts +2 -0
- package/dist/engine/boot-validator/entity-image-variants.js +91 -0
- package/dist/engine/boot-validator/entity-list-aggregate-options.js +8 -2
- package/dist/engine/boot-validator/entity-reference-embedded-rules.d.ts +117 -0
- package/dist/engine/boot-validator/entity-reference-embedded-rules.js +117 -0
- package/dist/engine/boot-validator/entity-select-image-rules.d.ts +122 -0
- package/dist/engine/boot-validator/entity-select-image-rules.js +122 -0
- package/dist/engine/boot-validator/entity-select.d.ts +8 -0
- package/dist/engine/boot-validator/entity-select.js +197 -0
- package/dist/engine/boot-validator/entity-structure-rules.d.ts +107 -0
- package/dist/engine/boot-validator/entity-structure-rules.js +107 -0
- package/dist/engine/boot-validator/field-conditions-rules.d.ts +92 -0
- package/dist/engine/boot-validator/field-conditions-rules.js +92 -0
- package/dist/engine/boot-validator/field-conditions.js +67 -22
- package/dist/engine/boot-validator/form-derivations-rules.d.ts +77 -0
- package/dist/engine/boot-validator/form-derivations-rules.js +77 -0
- package/dist/engine/boot-validator/form-derivations.js +52 -18
- package/dist/engine/boot-validator/global-tenancy.js +13 -7
- package/dist/engine/boot-validator/handler-declaration-rules.d.ts +72 -0
- package/dist/engine/boot-validator/handler-declaration-rules.js +72 -0
- package/dist/engine/boot-validator/handler-field-references-rules.d.ts +22 -0
- package/dist/engine/boot-validator/handler-field-references-rules.js +22 -0
- package/dist/engine/boot-validator/handler-field-references.js +14 -6
- package/dist/engine/boot-validator/list-bulk-actions-rules.d.ts +42 -0
- package/dist/engine/boot-validator/list-bulk-actions-rules.js +42 -0
- package/dist/engine/boot-validator/list-bulk-actions.js +29 -11
- package/dist/engine/boot-validator/list-column-layout.js +22 -10
- package/dist/engine/boot-validator/list-query-rules.d.ts +107 -0
- package/dist/engine/boot-validator/list-query-rules.js +107 -0
- package/dist/engine/boot-validator/list-table-aggregate-options.js +43 -15
- package/dist/engine/boot-validator/list-table-aggregate-query.js +7 -3
- package/dist/engine/boot-validator/list-table-aggregate-rules.d.ts +82 -0
- package/dist/engine/boot-validator/list-table-aggregate-rules.js +82 -0
- package/dist/engine/boot-validator/list-table-export-options.js +19 -7
- package/dist/engine/boot-validator/list-table-options.js +33 -13
- package/dist/engine/boot-validator/list-table-reject-unknown-keys.js +6 -2
- package/dist/engine/boot-validator/list-table-rules.d.ts +132 -0
- package/dist/engine/boot-validator/list-table-rules.js +132 -0
- package/dist/engine/boot-validator/nav-rules.d.ts +42 -0
- package/dist/engine/boot-validator/nav-rules.js +42 -0
- package/dist/engine/boot-validator/nav.js +29 -15
- package/dist/engine/boot-validator/ownership-rules.d.ts +27 -0
- package/dist/engine/boot-validator/ownership-rules.js +27 -0
- package/dist/engine/boot-validator/ownership.js +28 -12
- package/dist/engine/boot-validator/parent-ref.js +32 -20
- package/dist/engine/boot-validator/projection-list-screens.js +76 -35
- package/dist/engine/boot-validator/query-output-columns.js +9 -3
- package/dist/engine/boot-validator/query-refs.js +20 -10
- package/dist/engine/boot-validator/query-rules.d.ts +37 -0
- package/dist/engine/boot-validator/query-rules.js +37 -0
- package/dist/engine/boot-validator/read-gate.js +14 -10
- package/dist/engine/boot-validator/record-owned.js +5 -1
- package/dist/engine/boot-validator/related-list-table-rules.js +17 -7
- package/dist/engine/boot-validator/screens-actions-rules.d.ts +185 -0
- package/dist/engine/boot-validator/screens-actions-rules.js +185 -0
- package/dist/engine/boot-validator/screens-actions.js +169 -93
- package/dist/engine/boot-validator/screens-dashboard-chart-rules.d.ts +87 -0
- package/dist/engine/boot-validator/screens-dashboard-chart-rules.js +87 -0
- package/dist/engine/boot-validator/screens-dashboard-rules.d.ts +227 -0
- package/dist/engine/boot-validator/screens-dashboard-rules.js +227 -0
- package/dist/engine/boot-validator/screens-dashboard.js +222 -85
- package/dist/engine/boot-validator/screens-forms-layout-rules.d.ts +122 -0
- package/dist/engine/boot-validator/screens-forms-layout-rules.js +122 -0
- package/dist/engine/boot-validator/screens-forms-rules.d.ts +152 -0
- package/dist/engine/boot-validator/screens-forms-rules.js +152 -0
- package/dist/engine/boot-validator/screens-forms.js +240 -112
- package/dist/engine/boot-validator/screens-kind-config-edit.js +72 -16
- package/dist/engine/boot-validator/screens-kind-entity-edit.js +15 -7
- package/dist/engine/boot-validator/screens-kind-entity-list.js +57 -32
- package/dist/engine/boot-validator/screens-kind-projection-detail-rules.d.ts +92 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail-rules.js +92 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail.js +85 -47
- package/dist/engine/boot-validator/screens-kind-rules.d.ts +137 -0
- package/dist/engine/boot-validator/screens-kind-rules.js +137 -0
- package/dist/engine/boot-validator/screens-kind-secret-mint.js +18 -8
- package/dist/engine/boot-validator/screens-kind-shared.js +40 -22
- package/dist/engine/boot-validator/screens-lists-rules.d.ts +82 -0
- package/dist/engine/boot-validator/screens-lists-rules.js +82 -0
- package/dist/engine/boot-validator/screens-lists.js +90 -45
- package/dist/engine/boot-validator/screens-rules.d.ts +57 -0
- package/dist/engine/boot-validator/screens-rules.js +57 -0
- package/dist/engine/boot-validator/screens.js +17 -12
- package/dist/engine/boot-validator/transaction-phases.js +12 -4
- package/dist/engine/boot-validator/transfer-graph.js +17 -11
- package/dist/engine/boot-validator/url-prefill-fields.js +9 -5
- package/dist/engine/boot-validator/workspaces.js +11 -5
- package/dist/engine/boot-validator/zod-shape.js +6 -2
- package/dist/engine/entity-handlers.d.ts +1 -0
- package/dist/engine/entity-handlers.js +3 -0
- package/dist/engine/entity-list-runtime-options.js +23 -29
- package/dist/engine/extensions/tenant-data.d.ts +3 -0
- package/dist/engine/factories.d.ts +1 -1
- package/dist/engine/factories.js +4 -3
- package/dist/engine/index.d.ts +4 -2
- package/dist/engine/index.js +2 -0
- package/dist/engine/project-app-schema-for-roles.js +29 -14
- package/dist/engine/registry-facade.js +7 -8
- package/dist/engine/registry-validate.js +5 -1
- package/dist/engine/soft-delete-cleanup.d.ts +1 -0
- package/dist/engine/soft-delete-cleanup.js +5 -0
- package/dist/engine/steps/describe-workflow-step-error.js +1 -0
- package/dist/es-ops/operations-schema.d.ts +1 -1
- package/dist/event-store/ensure-dead-letter-table.d.ts +2 -0
- package/dist/event-store/ensure-dead-letter-table.js +10 -0
- package/dist/event-store/rebuild-dead-letter.js +2 -8
- package/dist/event-store/upcaster-dead-letter.js +2 -8
- package/dist/files/copy-pending-file-refs-to-tenant.d.ts +28 -0
- package/dist/files/copy-pending-file-refs-to-tenant.js +87 -0
- package/dist/files/file-routes.d.ts +1 -1
- package/dist/files/file-routes.js +21 -6
- package/dist/files/index.d.ts +2 -0
- package/dist/files/index.js +1 -0
- package/dist/i18n/required-surface-keys.js +1 -0
- package/dist/jobs/job-runner-helpers.js +1 -0
- package/dist/jobs/job-runner.js +7 -12
- package/dist/logging/utils.js +30 -60
- package/dist/observability/metrics-handle.js +10 -21
- package/dist/pipeline/cascade-handler.js +7 -6
- package/dist/pipeline/dispatch-query.js +18 -5
- package/dist/pipeline/dispatch-shared.d.ts +1 -0
- package/dist/pipeline/dispatch-shared.js +3 -1
- package/dist/pipeline/dispatch-write.js +10 -12
- package/dist/pipeline/dispatcher.js +12 -14
- package/dist/pipeline/event-dispatcher-admin.js +9 -8
- package/dist/pipeline/event-dispatcher-delivery.d.ts +19 -1
- package/dist/pipeline/event-dispatcher-delivery.js +121 -29
- package/dist/pipeline/event-dispatcher.d.ts +5 -1
- package/dist/pipeline/event-dispatcher.js +28 -21
- package/dist/pipeline/handler-context-phase-denials.js +2 -0
- package/dist/pipeline/multi-stream-apply-context.js +12 -20
- package/dist/pipeline/system-hooks.d.ts +4 -1
- package/dist/pipeline/system-hooks.js +79 -6
- package/dist/pipeline/system-identity-switch.js +10 -7
- package/dist/search/build-search-snippet.d.ts +9 -0
- package/dist/search/build-search-snippet.js +40 -0
- package/dist/search/index.d.ts +1 -0
- package/dist/search/index.js +1 -0
- package/dist/search/meilisearch-adapter.d.ts +32 -0
- package/dist/search/meilisearch-adapter.js +153 -56
- package/dist/search/meilisearch-chunking.d.ts +21 -0
- package/dist/search/meilisearch-chunking.js +96 -0
- package/dist/search/reindex-entity.d.ts +1 -0
- package/dist/search/reindex-entity.js +97 -52
- package/dist/ui-types/index.d.ts +1 -1
- package/dist/upgrade-cli.js +3 -14
- package/package.json +3 -3
- package/src/changes.json +73 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { VARIANT_NAME_PATTERN } from "../../derivatives/variant-key.js";
|
|
2
|
+
import { bootRuleError } from "./boot-rule.js";
|
|
3
|
+
import { ENTITY_SELECT_IMAGE_RULES } from "./entity-select-image-rules.js";
|
|
4
|
+
// --- Image variant validation ---
|
|
5
|
+
function isPositiveInt(value) {
|
|
6
|
+
return Number.isInteger(value) && value > 0;
|
|
7
|
+
}
|
|
8
|
+
// Renderers cap dimensions in practice (sharp refuses output above 0x1000000
|
|
9
|
+
// pixels); 8192 per edge is generously above any real thumbnail/preview use
|
|
10
|
+
// and keeps a boot-declared spec from becoming a memory-exhaustion vector.
|
|
11
|
+
const MAX_VARIANT_EDGE_PX = 8192;
|
|
12
|
+
// sharp's blur() accepts a sigma of 0.3..1000; anything above that throws at
|
|
13
|
+
// render time, months after boot, on the first request for that variant.
|
|
14
|
+
const MAX_BLUR_SIGMA = 1000;
|
|
15
|
+
function isValidBlurRegion(region) {
|
|
16
|
+
const { x, y, width, height } = region;
|
|
17
|
+
return (Number.isFinite(x) &&
|
|
18
|
+
Number.isFinite(y) &&
|
|
19
|
+
Number.isFinite(width) &&
|
|
20
|
+
Number.isFinite(height) &&
|
|
21
|
+
x >= 0 &&
|
|
22
|
+
y >= 0 &&
|
|
23
|
+
width >= 0 &&
|
|
24
|
+
height >= 0 &&
|
|
25
|
+
x + width <= 1 &&
|
|
26
|
+
y + height <= 1);
|
|
27
|
+
}
|
|
28
|
+
// kumiko-lint-ignore complexity-budget blur/size bounds added for boot-time DoS guard
|
|
29
|
+
function assertValidVariantSpec(name, spec, where) {
|
|
30
|
+
if (!VARIANT_NAME_PATTERN.test(name)) {
|
|
31
|
+
throw bootRuleError(ENTITY_SELECT_IMAGE_RULES.imageVariantName, {
|
|
32
|
+
message: `Image variant "${name}" ${where} must match ${VARIANT_NAME_PATTERN.source} — the name becomes part of a storage key and a URL segment.`,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
if (spec.size !== undefined && spec.maxEdge !== undefined) {
|
|
36
|
+
throw bootRuleError(ENTITY_SELECT_IMAGE_RULES.imageVariantSizeAndMaxEdge, {
|
|
37
|
+
message: `Image variant "${name}" ${where} sets both "size" and "maxEdge" — pick one.`,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if (spec.size !== undefined &&
|
|
41
|
+
!(isPositiveInt(spec.size.width) &&
|
|
42
|
+
isPositiveInt(spec.size.height) &&
|
|
43
|
+
spec.size.width <= MAX_VARIANT_EDGE_PX &&
|
|
44
|
+
spec.size.height <= MAX_VARIANT_EDGE_PX)) {
|
|
45
|
+
throw bootRuleError(ENTITY_SELECT_IMAGE_RULES.imageVariantSizeInvalid, {
|
|
46
|
+
message: `Image variant "${name}" ${where} has an invalid "size" (${spec.size.width}x${spec.size.height}) — must be a positive integer up to ${MAX_VARIANT_EDGE_PX}px per edge.`,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (spec.maxEdge !== undefined &&
|
|
50
|
+
!(isPositiveInt(spec.maxEdge) && spec.maxEdge <= MAX_VARIANT_EDGE_PX)) {
|
|
51
|
+
throw bootRuleError(ENTITY_SELECT_IMAGE_RULES.imageVariantMaxEdgeInvalid, {
|
|
52
|
+
message: `Image variant "${name}" ${where} has an invalid "maxEdge" (${spec.maxEdge}) — must be a positive integer up to ${MAX_VARIANT_EDGE_PX}px.`,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if (spec.quality !== undefined && !(isPositiveInt(spec.quality) && spec.quality <= 100)) {
|
|
56
|
+
throw bootRuleError(ENTITY_SELECT_IMAGE_RULES.imageVariantQualityInvalid, {
|
|
57
|
+
message: `Image variant "${name}" ${where} has "quality" ${spec.quality} — must be an integer in 1..100.`,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if (spec.blur !== undefined &&
|
|
61
|
+
!(Number.isFinite(spec.blur) && spec.blur > 0 && spec.blur <= MAX_BLUR_SIGMA)) {
|
|
62
|
+
throw bootRuleError(ENTITY_SELECT_IMAGE_RULES.imageVariantBlurInvalid, {
|
|
63
|
+
message: `Image variant "${name}" ${where} has "blur" ${spec.blur} — must be a finite number in (0, ${MAX_BLUR_SIGMA}].`,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (spec.blurRegions !== undefined) {
|
|
67
|
+
for (const region of spec.blurRegions) {
|
|
68
|
+
if (!isValidBlurRegion(region)) {
|
|
69
|
+
throw bootRuleError(ENTITY_SELECT_IMAGE_RULES.imageVariantBlurRegionInvalid, {
|
|
70
|
+
message: `Image variant "${name}" ${where} has an invalid "blurRegions" entry ${JSON.stringify(region)} — x/y/width/height must be within 0..1 and x+width/y+height must not exceed 1.`,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// A bad spec is only visible when someone finally requests that variant —
|
|
77
|
+
// possibly months later, in production. Catch it at boot instead.
|
|
78
|
+
export function validateImageVariants(feature) {
|
|
79
|
+
for (const [entityName, entity] of Object.entries(feature.entities ?? {})) {
|
|
80
|
+
for (const [fieldName, field] of Object.entries(entity.fields)) {
|
|
81
|
+
if (field.type !== "image" && field.type !== "images")
|
|
82
|
+
continue;
|
|
83
|
+
if (field.variants === undefined)
|
|
84
|
+
continue;
|
|
85
|
+
const where = `on "${entityName}.${fieldName}" in feature "${feature.name}"`;
|
|
86
|
+
for (const [name, spec] of Object.entries(field.variants)) {
|
|
87
|
+
assertValidVariantSpec(name, spec, where);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { isListFilterAllowed } from "../../db/entity-field-encryption.js";
|
|
2
2
|
import { isFieldFilterable } from "../screen-filter-ops.js";
|
|
3
|
+
import { bootRuleError } from "./boot-rule.js";
|
|
3
4
|
import { entityAggregateFieldLookup, validateListTableAggregateFieldTypes, } from "./list-table-aggregate-options.js";
|
|
5
|
+
import { LIST_TABLE_AGGREGATE_RULES } from "./list-table-aggregate-rules.js";
|
|
4
6
|
const RANGE_FACET_TYPES = ["number", "decimal", "money", "bigInt"];
|
|
5
7
|
function validateRangeFacets(where, facets, entity) {
|
|
6
8
|
for (const [field, config] of Object.entries(facets ?? {})) {
|
|
@@ -8,10 +10,14 @@ function validateRangeFacets(where, facets, entity) {
|
|
|
8
10
|
continue;
|
|
9
11
|
const def = Object.hasOwn(entity.fields, field) ? entity.fields[field] : undefined;
|
|
10
12
|
if (def === undefined || !RANGE_FACET_TYPES.includes(def.type)) {
|
|
11
|
-
throw
|
|
13
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.rangeFacetFieldType, {
|
|
14
|
+
message: `${where} facets.${field}: display "range" needs a number, decimal, money or bigInt field.`,
|
|
15
|
+
});
|
|
12
16
|
}
|
|
13
17
|
if (!isFieldFilterable(def) || !isListFilterAllowed(entity, field, { op: "gte", value: 0 })) {
|
|
14
|
-
throw
|
|
18
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.rangeFacetNotFilterable, {
|
|
19
|
+
message: `${where} facets.${field}: display "range" needs filterable: true on a field that is not encrypted, personal or secret.`,
|
|
20
|
+
});
|
|
15
21
|
}
|
|
16
22
|
}
|
|
17
23
|
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
export declare const ENTITY_REFERENCE_EMBEDDED_RULES: {
|
|
2
|
+
readonly referenceUnknownFeature: {
|
|
3
|
+
readonly id: "reference/unknown-feature";
|
|
4
|
+
readonly summary: "A reference field targets a registered feature.";
|
|
5
|
+
readonly fix: "Fix the feature prefix of the reference target.";
|
|
6
|
+
};
|
|
7
|
+
readonly referenceUnknownEntity: {
|
|
8
|
+
readonly id: "reference/unknown-entity";
|
|
9
|
+
readonly summary: "A reference field targets an entity of the target feature.";
|
|
10
|
+
readonly fix: "Fix the entity name of the reference target.";
|
|
11
|
+
};
|
|
12
|
+
readonly referenceUnknownLabelField: {
|
|
13
|
+
readonly id: "reference/unknown-label-field";
|
|
14
|
+
readonly summary: "A reference labelField is a field of the referenced entity.";
|
|
15
|
+
readonly fix: "Name an existing field of the referenced entity.";
|
|
16
|
+
};
|
|
17
|
+
readonly referenceTargetWithoutListHandler: {
|
|
18
|
+
readonly id: "reference/target-without-list-handler";
|
|
19
|
+
readonly summary: "The referenced entity has a registered list query handler.";
|
|
20
|
+
readonly fix: "Register r.queryHandler(defineEntityListHandler(...)) in the target feature.";
|
|
21
|
+
};
|
|
22
|
+
readonly referenceOptionsQueryEmpty: {
|
|
23
|
+
readonly id: "reference/options-query-empty";
|
|
24
|
+
readonly summary: "A reference optionsQuery is not empty.";
|
|
25
|
+
readonly fix: "Drop the property or name a query handler.";
|
|
26
|
+
};
|
|
27
|
+
readonly referenceOptionsQueryUnregistered: {
|
|
28
|
+
readonly id: "reference/options-query-unregistered";
|
|
29
|
+
readonly summary: "A reference optionsQuery names a registered query handler.";
|
|
30
|
+
readonly fix: "Check the QN spelling and register the handler via r.queryHandler(...).";
|
|
31
|
+
};
|
|
32
|
+
readonly embeddedSchemaEmpty: {
|
|
33
|
+
readonly id: "embedded-field/schema-empty";
|
|
34
|
+
readonly summary: "An embedded field declares at least one sub-field.";
|
|
35
|
+
readonly fix: "Declare a sub-field in the embedded schema.";
|
|
36
|
+
};
|
|
37
|
+
readonly embeddedSubFieldTypeInvalid: {
|
|
38
|
+
readonly id: "embedded-field/sub-field-type-invalid";
|
|
39
|
+
readonly summary: "An embedded sub-field uses an allowed sub-field type.";
|
|
40
|
+
readonly fix: "Use one of the allowed embedded sub-field types.";
|
|
41
|
+
};
|
|
42
|
+
readonly embeddedDecimalScaleInvalid: {
|
|
43
|
+
readonly id: "embedded-field/decimal-scale-invalid";
|
|
44
|
+
readonly summary: "A decimal sub-field scale is an integer between 0 and 15.";
|
|
45
|
+
readonly fix: "Set scale to an integer between 0 and 15.";
|
|
46
|
+
};
|
|
47
|
+
readonly embeddedSelectOptionsEmpty: {
|
|
48
|
+
readonly id: "embedded-field/select-options-empty";
|
|
49
|
+
readonly summary: "A select sub-field has at least one option.";
|
|
50
|
+
readonly fix: "Add an option.";
|
|
51
|
+
};
|
|
52
|
+
readonly embeddedMinItemsNegative: {
|
|
53
|
+
readonly id: "embedded-field/min-items-negative";
|
|
54
|
+
readonly summary: "An embedded list minItems is at least 0.";
|
|
55
|
+
readonly fix: "Set minItems to 0 or more.";
|
|
56
|
+
};
|
|
57
|
+
readonly embeddedMaxItemsTooSmall: {
|
|
58
|
+
readonly id: "embedded-field/max-items-too-small";
|
|
59
|
+
readonly summary: "An embedded list maxItems is at least 1.";
|
|
60
|
+
readonly fix: "Set maxItems to 1 or more.";
|
|
61
|
+
};
|
|
62
|
+
readonly embeddedMinItemsAboveMax: {
|
|
63
|
+
readonly id: "embedded-field/min-items-above-max";
|
|
64
|
+
readonly summary: "An embedded list minItems is not greater than maxItems.";
|
|
65
|
+
readonly fix: "Set minItems at or below maxItems.";
|
|
66
|
+
};
|
|
67
|
+
readonly embeddedRequiredMinItemsZero: {
|
|
68
|
+
readonly id: "embedded-field/required-min-items-zero";
|
|
69
|
+
readonly summary: "A required embedded list does not set minItems: 0.";
|
|
70
|
+
readonly fix: "Drop minItems or set required: false.";
|
|
71
|
+
};
|
|
72
|
+
readonly embeddedDerivedCellNotInSchema: {
|
|
73
|
+
readonly id: "embedded-field/derived-cell-not-in-schema";
|
|
74
|
+
readonly summary: "Every derived cell is a sub-field in the embedded schema.";
|
|
75
|
+
readonly fix: "Add the sub-field to the schema or remove the derived cell.";
|
|
76
|
+
};
|
|
77
|
+
readonly embeddedPercentNeedsTwoSources: {
|
|
78
|
+
readonly id: "embedded-field/percent-needs-two-sources";
|
|
79
|
+
readonly summary: 'A derived cell with op "percent" has exactly two sources (base, rate).';
|
|
80
|
+
readonly fix: "List base and rate in from.";
|
|
81
|
+
};
|
|
82
|
+
readonly embeddedDerivedSourceUnknown: {
|
|
83
|
+
readonly id: "embedded-field/derived-source-unknown";
|
|
84
|
+
readonly summary: "A derived cell reads only sub-fields that exist in the schema.";
|
|
85
|
+
readonly fix: "Read an existing sub-field.";
|
|
86
|
+
};
|
|
87
|
+
readonly embeddedDerivedSourceIsDerived: {
|
|
88
|
+
readonly id: "embedded-field/derived-source-is-derived";
|
|
89
|
+
readonly summary: "A derived cell reads stored sub-fields, not other derived cells.";
|
|
90
|
+
readonly fix: "Read only stored sub-fields.";
|
|
91
|
+
};
|
|
92
|
+
readonly embeddedTotalsFromEmpty: {
|
|
93
|
+
readonly id: "embedded-field/totals-from-empty";
|
|
94
|
+
readonly summary: "A totals entry lists at least one source in from.";
|
|
95
|
+
readonly fix: "List a number, money or decimal sub-field.";
|
|
96
|
+
};
|
|
97
|
+
readonly embeddedTotalsNotNumeric: {
|
|
98
|
+
readonly id: "embedded-field/totals-not-numeric";
|
|
99
|
+
readonly summary: "Totals list only number, money or decimal sub-fields.";
|
|
100
|
+
readonly fix: "List only number, money or decimal sub-fields.";
|
|
101
|
+
};
|
|
102
|
+
readonly embeddedTotalsMatchKeyNotMoney: {
|
|
103
|
+
readonly id: "embedded-field/totals-match-key-not-money";
|
|
104
|
+
readonly summary: "A totalsMatch key is a money sub-field of the schema.";
|
|
105
|
+
readonly fix: "Use a money sub-field as the totalsMatch key.";
|
|
106
|
+
};
|
|
107
|
+
readonly embeddedTotalsMatchSiblingNotMoney: {
|
|
108
|
+
readonly id: "embedded-field/totals-match-sibling-not-money";
|
|
109
|
+
readonly summary: "A totalsMatch value maps to a money field of the entity.";
|
|
110
|
+
readonly fix: "Map it to a money field of the entity.";
|
|
111
|
+
};
|
|
112
|
+
readonly embeddedListOptionsOnNonList: {
|
|
113
|
+
readonly id: "embedded-field/list-options-on-non-list";
|
|
114
|
+
readonly summary: "minItems, maxItems, derived, totals and totalsMatch are set only on embedded lists.";
|
|
115
|
+
readonly fix: "Set multiple: true or remove the options.";
|
|
116
|
+
};
|
|
117
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
export const ENTITY_REFERENCE_EMBEDDED_RULES = {
|
|
2
|
+
referenceUnknownFeature: {
|
|
3
|
+
id: "reference/unknown-feature",
|
|
4
|
+
summary: "A reference field targets a registered feature.",
|
|
5
|
+
fix: "Fix the feature prefix of the reference target.",
|
|
6
|
+
},
|
|
7
|
+
referenceUnknownEntity: {
|
|
8
|
+
id: "reference/unknown-entity",
|
|
9
|
+
summary: "A reference field targets an entity of the target feature.",
|
|
10
|
+
fix: "Fix the entity name of the reference target.",
|
|
11
|
+
},
|
|
12
|
+
referenceUnknownLabelField: {
|
|
13
|
+
id: "reference/unknown-label-field",
|
|
14
|
+
summary: "A reference labelField is a field of the referenced entity.",
|
|
15
|
+
fix: "Name an existing field of the referenced entity.",
|
|
16
|
+
},
|
|
17
|
+
referenceTargetWithoutListHandler: {
|
|
18
|
+
id: "reference/target-without-list-handler",
|
|
19
|
+
summary: "The referenced entity has a registered list query handler.",
|
|
20
|
+
fix: "Register r.queryHandler(defineEntityListHandler(...)) in the target feature.",
|
|
21
|
+
},
|
|
22
|
+
referenceOptionsQueryEmpty: {
|
|
23
|
+
id: "reference/options-query-empty",
|
|
24
|
+
summary: "A reference optionsQuery is not empty.",
|
|
25
|
+
fix: "Drop the property or name a query handler.",
|
|
26
|
+
},
|
|
27
|
+
referenceOptionsQueryUnregistered: {
|
|
28
|
+
id: "reference/options-query-unregistered",
|
|
29
|
+
summary: "A reference optionsQuery names a registered query handler.",
|
|
30
|
+
fix: "Check the QN spelling and register the handler via r.queryHandler(...).",
|
|
31
|
+
},
|
|
32
|
+
embeddedSchemaEmpty: {
|
|
33
|
+
id: "embedded-field/schema-empty",
|
|
34
|
+
summary: "An embedded field declares at least one sub-field.",
|
|
35
|
+
fix: "Declare a sub-field in the embedded schema.",
|
|
36
|
+
},
|
|
37
|
+
embeddedSubFieldTypeInvalid: {
|
|
38
|
+
id: "embedded-field/sub-field-type-invalid",
|
|
39
|
+
summary: "An embedded sub-field uses an allowed sub-field type.",
|
|
40
|
+
fix: "Use one of the allowed embedded sub-field types.",
|
|
41
|
+
},
|
|
42
|
+
embeddedDecimalScaleInvalid: {
|
|
43
|
+
id: "embedded-field/decimal-scale-invalid",
|
|
44
|
+
summary: "A decimal sub-field scale is an integer between 0 and 15.",
|
|
45
|
+
fix: "Set scale to an integer between 0 and 15.",
|
|
46
|
+
},
|
|
47
|
+
embeddedSelectOptionsEmpty: {
|
|
48
|
+
id: "embedded-field/select-options-empty",
|
|
49
|
+
summary: "A select sub-field has at least one option.",
|
|
50
|
+
fix: "Add an option.",
|
|
51
|
+
},
|
|
52
|
+
embeddedMinItemsNegative: {
|
|
53
|
+
id: "embedded-field/min-items-negative",
|
|
54
|
+
summary: "An embedded list minItems is at least 0.",
|
|
55
|
+
fix: "Set minItems to 0 or more.",
|
|
56
|
+
},
|
|
57
|
+
embeddedMaxItemsTooSmall: {
|
|
58
|
+
id: "embedded-field/max-items-too-small",
|
|
59
|
+
summary: "An embedded list maxItems is at least 1.",
|
|
60
|
+
fix: "Set maxItems to 1 or more.",
|
|
61
|
+
},
|
|
62
|
+
embeddedMinItemsAboveMax: {
|
|
63
|
+
id: "embedded-field/min-items-above-max",
|
|
64
|
+
summary: "An embedded list minItems is not greater than maxItems.",
|
|
65
|
+
fix: "Set minItems at or below maxItems.",
|
|
66
|
+
},
|
|
67
|
+
embeddedRequiredMinItemsZero: {
|
|
68
|
+
id: "embedded-field/required-min-items-zero",
|
|
69
|
+
summary: "A required embedded list does not set minItems: 0.",
|
|
70
|
+
fix: "Drop minItems or set required: false.",
|
|
71
|
+
},
|
|
72
|
+
embeddedDerivedCellNotInSchema: {
|
|
73
|
+
id: "embedded-field/derived-cell-not-in-schema",
|
|
74
|
+
summary: "Every derived cell is a sub-field in the embedded schema.",
|
|
75
|
+
fix: "Add the sub-field to the schema or remove the derived cell.",
|
|
76
|
+
},
|
|
77
|
+
embeddedPercentNeedsTwoSources: {
|
|
78
|
+
id: "embedded-field/percent-needs-two-sources",
|
|
79
|
+
summary: 'A derived cell with op "percent" has exactly two sources (base, rate).',
|
|
80
|
+
fix: "List base and rate in from.",
|
|
81
|
+
},
|
|
82
|
+
embeddedDerivedSourceUnknown: {
|
|
83
|
+
id: "embedded-field/derived-source-unknown",
|
|
84
|
+
summary: "A derived cell reads only sub-fields that exist in the schema.",
|
|
85
|
+
fix: "Read an existing sub-field.",
|
|
86
|
+
},
|
|
87
|
+
embeddedDerivedSourceIsDerived: {
|
|
88
|
+
id: "embedded-field/derived-source-is-derived",
|
|
89
|
+
summary: "A derived cell reads stored sub-fields, not other derived cells.",
|
|
90
|
+
fix: "Read only stored sub-fields.",
|
|
91
|
+
},
|
|
92
|
+
embeddedTotalsFromEmpty: {
|
|
93
|
+
id: "embedded-field/totals-from-empty",
|
|
94
|
+
summary: "A totals entry lists at least one source in from.",
|
|
95
|
+
fix: "List a number, money or decimal sub-field.",
|
|
96
|
+
},
|
|
97
|
+
embeddedTotalsNotNumeric: {
|
|
98
|
+
id: "embedded-field/totals-not-numeric",
|
|
99
|
+
summary: "Totals list only number, money or decimal sub-fields.",
|
|
100
|
+
fix: "List only number, money or decimal sub-fields.",
|
|
101
|
+
},
|
|
102
|
+
embeddedTotalsMatchKeyNotMoney: {
|
|
103
|
+
id: "embedded-field/totals-match-key-not-money",
|
|
104
|
+
summary: "A totalsMatch key is a money sub-field of the schema.",
|
|
105
|
+
fix: "Use a money sub-field as the totalsMatch key.",
|
|
106
|
+
},
|
|
107
|
+
embeddedTotalsMatchSiblingNotMoney: {
|
|
108
|
+
id: "embedded-field/totals-match-sibling-not-money",
|
|
109
|
+
summary: "A totalsMatch value maps to a money field of the entity.",
|
|
110
|
+
fix: "Map it to a money field of the entity.",
|
|
111
|
+
},
|
|
112
|
+
embeddedListOptionsOnNonList: {
|
|
113
|
+
id: "embedded-field/list-options-on-non-list",
|
|
114
|
+
summary: "minItems, maxItems, derived, totals and totalsMatch are set only on embedded lists.",
|
|
115
|
+
fix: "Set multiple: true or remove the options.",
|
|
116
|
+
},
|
|
117
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
export declare const ENTITY_SELECT_IMAGE_RULES: {
|
|
2
|
+
readonly multiSelectColumnsInvalid: {
|
|
3
|
+
readonly id: "multi-select/columns-invalid";
|
|
4
|
+
readonly summary: "Checkbox columns is 1, 2, 3 or 4.";
|
|
5
|
+
readonly fix: "Use a supported columns value.";
|
|
6
|
+
};
|
|
7
|
+
readonly multiSelectMaxRowsInvalid: {
|
|
8
|
+
readonly id: "multi-select/max-rows-invalid";
|
|
9
|
+
readonly summary: "Checkbox maxRows is a positive integer.";
|
|
10
|
+
readonly fix: "Set maxRows to a positive integer.";
|
|
11
|
+
};
|
|
12
|
+
readonly multiSelectColumnsWithoutCheckboxes: {
|
|
13
|
+
readonly id: "multi-select/columns-without-checkboxes";
|
|
14
|
+
readonly summary: 'columns is set only with display: "checkboxes".';
|
|
15
|
+
readonly fix: 'Set display: "checkboxes" or drop columns.';
|
|
16
|
+
};
|
|
17
|
+
readonly multiSelectMaxRowsWithoutCheckboxes: {
|
|
18
|
+
readonly id: "multi-select/max-rows-without-checkboxes";
|
|
19
|
+
readonly summary: 'maxRows is set only with display: "checkboxes".';
|
|
20
|
+
readonly fix: 'Set display: "checkboxes" or drop maxRows.';
|
|
21
|
+
};
|
|
22
|
+
readonly selectOptionToneInvalid: {
|
|
23
|
+
readonly id: "select/option-tone-invalid";
|
|
24
|
+
readonly summary: "Every select optionTones value is a known tone.";
|
|
25
|
+
readonly fix: "Use one of the listed tones.";
|
|
26
|
+
};
|
|
27
|
+
readonly selectOptionsQueryUnsupported: {
|
|
28
|
+
readonly id: "select/options-query-unsupported";
|
|
29
|
+
readonly summary: "An entity select field has static options, no optionsQuery.";
|
|
30
|
+
readonly fix: "Use static options, or a reference field.";
|
|
31
|
+
};
|
|
32
|
+
readonly selectAvailabilityQueryUnregistered: {
|
|
33
|
+
readonly id: "select/availability-query-unregistered";
|
|
34
|
+
readonly summary: "optionsAvailabilityQuery names a registered query handler.";
|
|
35
|
+
readonly fix: "Check the QN spelling and register the handler via r.queryHandler(...).";
|
|
36
|
+
};
|
|
37
|
+
readonly conditionalOptionsWithOptionsQuery: {
|
|
38
|
+
readonly id: "select/conditional-options-with-options-query";
|
|
39
|
+
readonly summary: "A select field does not combine conditionalOptions with optionsQuery.";
|
|
40
|
+
readonly fix: "Remove either conditionalOptions or optionsQuery.";
|
|
41
|
+
};
|
|
42
|
+
readonly conditionalOptionsRuleEmpty: {
|
|
43
|
+
readonly id: "select/conditional-options-rule-empty";
|
|
44
|
+
readonly summary: "Every conditionalOptions rule lists at least one option.";
|
|
45
|
+
readonly fix: "Drop the rule or add options.";
|
|
46
|
+
};
|
|
47
|
+
readonly conditionalOptionUnknown: {
|
|
48
|
+
readonly id: "select/conditional-option-unknown";
|
|
49
|
+
readonly summary: "conditionalOptions list only options of the select field.";
|
|
50
|
+
readonly fix: "List an option that exists in options.";
|
|
51
|
+
};
|
|
52
|
+
readonly conditionalOptionDuplicate: {
|
|
53
|
+
readonly id: "select/conditional-option-duplicate";
|
|
54
|
+
readonly summary: "An option belongs to one conditionalOptions rule only.";
|
|
55
|
+
readonly fix: "Remove the option from one of the rules.";
|
|
56
|
+
};
|
|
57
|
+
readonly conditionalOptionDefault: {
|
|
58
|
+
readonly id: "select/conditional-option-default";
|
|
59
|
+
readonly summary: "The default option is not inside a conditionalOptions rule.";
|
|
60
|
+
readonly fix: "Move the default out of the rule.";
|
|
61
|
+
};
|
|
62
|
+
readonly conditionalWhenOwnField: {
|
|
63
|
+
readonly id: "select/conditional-when-own-field";
|
|
64
|
+
readonly summary: "A conditionalOptions when depends on a different field.";
|
|
65
|
+
readonly fix: "Make the condition depend on another field.";
|
|
66
|
+
};
|
|
67
|
+
readonly conditionalWhenUnknownField: {
|
|
68
|
+
readonly id: "select/conditional-when-unknown-field";
|
|
69
|
+
readonly summary: "A conditionalOptions when.field is a field of the entity.";
|
|
70
|
+
readonly fix: "Use an existing field of the entity.";
|
|
71
|
+
};
|
|
72
|
+
readonly conditionalWhenValueNotOption: {
|
|
73
|
+
readonly id: "select/conditional-when-value-not-option";
|
|
74
|
+
readonly summary: "A conditionalOptions when compares only against options of the condition field.";
|
|
75
|
+
readonly fix: "Compare against an option of the condition field.";
|
|
76
|
+
};
|
|
77
|
+
readonly multiSelectOptionsEmpty: {
|
|
78
|
+
readonly id: "multi-select/options-empty";
|
|
79
|
+
readonly summary: "A multiSelect field has at least one option.";
|
|
80
|
+
readonly fix: "Add an option.";
|
|
81
|
+
};
|
|
82
|
+
readonly multiSelectDefaultNotOption: {
|
|
83
|
+
readonly id: "multi-select/default-not-option";
|
|
84
|
+
readonly summary: "Every multiSelect default value is one of its options.";
|
|
85
|
+
readonly fix: "Use options only in default.";
|
|
86
|
+
};
|
|
87
|
+
readonly imageVariantName: {
|
|
88
|
+
readonly id: "image-variant/name-invalid";
|
|
89
|
+
readonly summary: "An image variant name matches the variant name pattern.";
|
|
90
|
+
readonly fix: "Rename the variant.";
|
|
91
|
+
};
|
|
92
|
+
readonly imageVariantSizeAndMaxEdge: {
|
|
93
|
+
readonly id: "image-variant/size-and-max-edge";
|
|
94
|
+
readonly summary: "An image variant sets size or maxEdge, not both.";
|
|
95
|
+
readonly fix: "Pick one.";
|
|
96
|
+
};
|
|
97
|
+
readonly imageVariantSizeInvalid: {
|
|
98
|
+
readonly id: "image-variant/size-invalid";
|
|
99
|
+
readonly summary: "An image variant size is a positive integer up to the edge limit.";
|
|
100
|
+
readonly fix: "Fix width and height.";
|
|
101
|
+
};
|
|
102
|
+
readonly imageVariantMaxEdgeInvalid: {
|
|
103
|
+
readonly id: "image-variant/max-edge-invalid";
|
|
104
|
+
readonly summary: "An image variant maxEdge is a positive integer up to the edge limit.";
|
|
105
|
+
readonly fix: "Fix maxEdge.";
|
|
106
|
+
};
|
|
107
|
+
readonly imageVariantQualityInvalid: {
|
|
108
|
+
readonly id: "image-variant/quality-invalid";
|
|
109
|
+
readonly summary: "An image variant quality is an integer in 1..100.";
|
|
110
|
+
readonly fix: "Fix quality.";
|
|
111
|
+
};
|
|
112
|
+
readonly imageVariantBlurInvalid: {
|
|
113
|
+
readonly id: "image-variant/blur-invalid";
|
|
114
|
+
readonly summary: "An image variant blur is a finite number in (0, max].";
|
|
115
|
+
readonly fix: "Fix blur.";
|
|
116
|
+
};
|
|
117
|
+
readonly imageVariantBlurRegionInvalid: {
|
|
118
|
+
readonly id: "image-variant/blur-region-invalid";
|
|
119
|
+
readonly summary: "Image variant blurRegions lie within the unit square.";
|
|
120
|
+
readonly fix: "Keep x/y/width/height within 0..1.";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
export const ENTITY_SELECT_IMAGE_RULES = {
|
|
2
|
+
multiSelectColumnsInvalid: {
|
|
3
|
+
id: "multi-select/columns-invalid",
|
|
4
|
+
summary: "Checkbox columns is 1, 2, 3 or 4.",
|
|
5
|
+
fix: "Use a supported columns value.",
|
|
6
|
+
},
|
|
7
|
+
multiSelectMaxRowsInvalid: {
|
|
8
|
+
id: "multi-select/max-rows-invalid",
|
|
9
|
+
summary: "Checkbox maxRows is a positive integer.",
|
|
10
|
+
fix: "Set maxRows to a positive integer.",
|
|
11
|
+
},
|
|
12
|
+
multiSelectColumnsWithoutCheckboxes: {
|
|
13
|
+
id: "multi-select/columns-without-checkboxes",
|
|
14
|
+
summary: 'columns is set only with display: "checkboxes".',
|
|
15
|
+
fix: 'Set display: "checkboxes" or drop columns.',
|
|
16
|
+
},
|
|
17
|
+
multiSelectMaxRowsWithoutCheckboxes: {
|
|
18
|
+
id: "multi-select/max-rows-without-checkboxes",
|
|
19
|
+
summary: 'maxRows is set only with display: "checkboxes".',
|
|
20
|
+
fix: 'Set display: "checkboxes" or drop maxRows.',
|
|
21
|
+
},
|
|
22
|
+
selectOptionToneInvalid: {
|
|
23
|
+
id: "select/option-tone-invalid",
|
|
24
|
+
summary: "Every select optionTones value is a known tone.",
|
|
25
|
+
fix: "Use one of the listed tones.",
|
|
26
|
+
},
|
|
27
|
+
selectOptionsQueryUnsupported: {
|
|
28
|
+
id: "select/options-query-unsupported",
|
|
29
|
+
summary: "An entity select field has static options, no optionsQuery.",
|
|
30
|
+
fix: "Use static options, or a reference field.",
|
|
31
|
+
},
|
|
32
|
+
selectAvailabilityQueryUnregistered: {
|
|
33
|
+
id: "select/availability-query-unregistered",
|
|
34
|
+
summary: "optionsAvailabilityQuery names a registered query handler.",
|
|
35
|
+
fix: "Check the QN spelling and register the handler via r.queryHandler(...).",
|
|
36
|
+
},
|
|
37
|
+
conditionalOptionsWithOptionsQuery: {
|
|
38
|
+
id: "select/conditional-options-with-options-query",
|
|
39
|
+
summary: "A select field does not combine conditionalOptions with optionsQuery.",
|
|
40
|
+
fix: "Remove either conditionalOptions or optionsQuery.",
|
|
41
|
+
},
|
|
42
|
+
conditionalOptionsRuleEmpty: {
|
|
43
|
+
id: "select/conditional-options-rule-empty",
|
|
44
|
+
summary: "Every conditionalOptions rule lists at least one option.",
|
|
45
|
+
fix: "Drop the rule or add options.",
|
|
46
|
+
},
|
|
47
|
+
conditionalOptionUnknown: {
|
|
48
|
+
id: "select/conditional-option-unknown",
|
|
49
|
+
summary: "conditionalOptions list only options of the select field.",
|
|
50
|
+
fix: "List an option that exists in options.",
|
|
51
|
+
},
|
|
52
|
+
conditionalOptionDuplicate: {
|
|
53
|
+
id: "select/conditional-option-duplicate",
|
|
54
|
+
summary: "An option belongs to one conditionalOptions rule only.",
|
|
55
|
+
fix: "Remove the option from one of the rules.",
|
|
56
|
+
},
|
|
57
|
+
conditionalOptionDefault: {
|
|
58
|
+
id: "select/conditional-option-default",
|
|
59
|
+
summary: "The default option is not inside a conditionalOptions rule.",
|
|
60
|
+
fix: "Move the default out of the rule.",
|
|
61
|
+
},
|
|
62
|
+
conditionalWhenOwnField: {
|
|
63
|
+
id: "select/conditional-when-own-field",
|
|
64
|
+
summary: "A conditionalOptions when depends on a different field.",
|
|
65
|
+
fix: "Make the condition depend on another field.",
|
|
66
|
+
},
|
|
67
|
+
conditionalWhenUnknownField: {
|
|
68
|
+
id: "select/conditional-when-unknown-field",
|
|
69
|
+
summary: "A conditionalOptions when.field is a field of the entity.",
|
|
70
|
+
fix: "Use an existing field of the entity.",
|
|
71
|
+
},
|
|
72
|
+
conditionalWhenValueNotOption: {
|
|
73
|
+
id: "select/conditional-when-value-not-option",
|
|
74
|
+
summary: "A conditionalOptions when compares only against options of the condition field.",
|
|
75
|
+
fix: "Compare against an option of the condition field.",
|
|
76
|
+
},
|
|
77
|
+
multiSelectOptionsEmpty: {
|
|
78
|
+
id: "multi-select/options-empty",
|
|
79
|
+
summary: "A multiSelect field has at least one option.",
|
|
80
|
+
fix: "Add an option.",
|
|
81
|
+
},
|
|
82
|
+
multiSelectDefaultNotOption: {
|
|
83
|
+
id: "multi-select/default-not-option",
|
|
84
|
+
summary: "Every multiSelect default value is one of its options.",
|
|
85
|
+
fix: "Use options only in default.",
|
|
86
|
+
},
|
|
87
|
+
imageVariantName: {
|
|
88
|
+
id: "image-variant/name-invalid",
|
|
89
|
+
summary: "An image variant name matches the variant name pattern.",
|
|
90
|
+
fix: "Rename the variant.",
|
|
91
|
+
},
|
|
92
|
+
imageVariantSizeAndMaxEdge: {
|
|
93
|
+
id: "image-variant/size-and-max-edge",
|
|
94
|
+
summary: "An image variant sets size or maxEdge, not both.",
|
|
95
|
+
fix: "Pick one.",
|
|
96
|
+
},
|
|
97
|
+
imageVariantSizeInvalid: {
|
|
98
|
+
id: "image-variant/size-invalid",
|
|
99
|
+
summary: "An image variant size is a positive integer up to the edge limit.",
|
|
100
|
+
fix: "Fix width and height.",
|
|
101
|
+
},
|
|
102
|
+
imageVariantMaxEdgeInvalid: {
|
|
103
|
+
id: "image-variant/max-edge-invalid",
|
|
104
|
+
summary: "An image variant maxEdge is a positive integer up to the edge limit.",
|
|
105
|
+
fix: "Fix maxEdge.",
|
|
106
|
+
},
|
|
107
|
+
imageVariantQualityInvalid: {
|
|
108
|
+
id: "image-variant/quality-invalid",
|
|
109
|
+
summary: "An image variant quality is an integer in 1..100.",
|
|
110
|
+
fix: "Fix quality.",
|
|
111
|
+
},
|
|
112
|
+
imageVariantBlurInvalid: {
|
|
113
|
+
id: "image-variant/blur-invalid",
|
|
114
|
+
summary: "An image variant blur is a finite number in (0, max].",
|
|
115
|
+
fix: "Fix blur.",
|
|
116
|
+
},
|
|
117
|
+
imageVariantBlurRegionInvalid: {
|
|
118
|
+
id: "image-variant/blur-region-invalid",
|
|
119
|
+
summary: "Image variant blurRegions lie within the unit square.",
|
|
120
|
+
fix: "Keep x/y/width/height within 0..1.",
|
|
121
|
+
},
|
|
122
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { QueryHandlerDef } from "@cosmicdrift/kumiko-types/handlers";
|
|
2
|
+
import type { FieldCondition } from "@cosmicdrift/kumiko-types/screen";
|
|
3
|
+
import type { FeatureDefinition } from "../types/index.ts";
|
|
4
|
+
export declare function validateEntitySelectOptionsQuery(feature: FeatureDefinition): void;
|
|
5
|
+
export declare function validateEntitySelectAvailabilityQuery(feature: FeatureDefinition, queryHandlers: ReadonlyMap<string, QueryHandlerDef>): void;
|
|
6
|
+
export declare function conditionComparisonValues(when: Exclude<FieldCondition, boolean>): readonly unknown[];
|
|
7
|
+
export declare function validateEntitySelectConditionalOptions(feature: FeatureDefinition): void;
|
|
8
|
+
export declare function validateMultiSelectFields(feature: FeatureDefinition): void;
|