@cosmicdrift/kumiko-framework 0.413.0 → 0.414.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.md +5 -2
- package/agents/api/framework-db.md +14 -3
- package/agents/api/framework-engine.md +64 -13
- package/agents/api/framework-event-store.md +14 -0
- package/agents/api/framework-ui-types.md +149 -21
- package/agents/api/renderer-web.md +93 -9
- package/agents/api/testing-helpers.md +3 -2
- package/agents/api/testing-stack.md +3 -0
- package/agents/api/types.md +205 -14
- package/agents/api.md +7 -7
- package/agents/boot-rules.md +63 -9
- package/agents/examples/api-docs.md +2 -6
- package/agents/examples/auth-mfa.md +57 -10
- package/agents/examples/chat-channels.md +2 -0
- package/agents/examples/currencies-global.md +1 -0
- package/agents/examples/env-composition.md +7 -11
- package/agents/examples/helpdesk.md +15 -8
- package/agents/examples/managed-pages.md +90 -1
- package/agents/examples/pwa-shell.md +210 -0
- package/agents/examples/rate-limiting.md +3 -3
- package/agents/examples/record-detail-layout.md +1537 -67
- package/agents/examples/workflow-engine.md +16 -12
- package/agents/examples.md +1 -0
- package/agents/features-index.md +4 -2
- package/agents/features.md +22 -7
- package/agents/widgets.md +19 -1
- package/dist/api/api-constants.d.ts +1 -0
- package/dist/api/api-constants.js +4 -0
- package/dist/api/auth-middleware.js +4 -3
- package/dist/api/auth-routes-shared.js +2 -1
- package/dist/api/entity-read-access.d.ts +1 -0
- package/dist/api/entity-read-access.js +18 -0
- package/dist/api/export/export-route.d.ts +6 -1
- package/dist/api/export/export-route.js +27 -1
- package/dist/api/export/export-rows.js +19 -3
- package/dist/api/routes.d.ts +2 -0
- package/dist/api/routes.js +9 -1
- package/dist/api/server-extra-routes.js +2 -1
- package/dist/api/server-feature-http-routes.d.ts +9 -0
- package/dist/api/server-feature-http-routes.js +109 -0
- package/dist/api/server-middleware.js +2 -19
- package/dist/api/server-pat-rate-limit-guard.d.ts +3 -0
- package/dist/api/server-pat-rate-limit-guard.js +19 -0
- package/dist/api/server-rate-limit-wiring.d.ts +10 -0
- package/dist/api/server-rate-limit-wiring.js +37 -0
- package/dist/api/server-routes.d.ts +4 -12
- package/dist/api/server-routes.js +12 -171
- package/dist/api/server-schema-route.d.ts +3 -0
- package/dist/api/server-schema-route.js +58 -0
- package/dist/api/server-wiring.js +2 -37
- package/dist/api/server.js +3 -1
- package/dist/compliance/override-schema.js +5 -5
- package/dist/compliance/sub-processors.js +10 -1
- package/dist/crypto/index.d.ts +1 -1
- package/dist/crypto/index.js +1 -1
- package/dist/crypto/pii-field-encryption.d.ts +2 -0
- package/dist/crypto/pii-field-encryption.js +16 -1
- package/dist/db/apply-entity-event.js +4 -0
- package/dist/db/bun-sql-connection-codes.d.ts +1 -0
- package/dist/db/bun-sql-connection-codes.js +7 -0
- package/dist/db/collect-table-metas.js +4 -1
- package/dist/db/config-seed.js +1 -1
- package/dist/db/derived-field-sql.js +15 -13
- package/dist/db/derived-related-sql.d.ts +2 -2
- package/dist/db/derived-related-sql.js +4 -2
- package/dist/db/dialect.d.ts +3 -0
- package/dist/db/dialect.js +1 -3
- package/dist/db/driver-row-coercion.js +2 -2
- package/dist/db/driver-value-preparation.js +1 -1
- package/dist/db/eagerload.js +15 -12
- package/dist/db/entity-table-meta.d.ts +2 -0
- package/dist/db/entity-table-meta.js +7 -0
- package/dist/db/event-store-executor-context.js +13 -8
- package/dist/db/event-store-executor-read-aggregate-currencies.js +2 -2
- package/dist/db/event-store-executor-read-aggregate.js +2 -2
- package/dist/db/event-store-executor-read-filter.d.ts +4 -0
- package/dist/db/event-store-executor-read-filter.js +28 -11
- package/dist/db/event-store-executor-read-search.d.ts +1 -0
- package/dist/db/event-store-executor-read-search.js +6 -6
- package/dist/db/event-store-executor-read-sort.js +3 -3
- package/dist/db/event-store-executor-read-where.js +14 -5
- package/dist/db/event-store-executor-read.js +7 -7
- package/dist/db/event-store-executor-write.js +50 -95
- package/dist/db/executor-managed-tables.js +4 -1
- package/dist/db/index.d.ts +4 -2
- package/dist/db/index.js +4 -2
- package/dist/db/known-table-names.d.ts +1 -0
- package/dist/db/known-table-names.js +7 -5
- package/dist/db/list-aggregate-labels.d.ts +1 -0
- package/dist/db/list-aggregate-labels.js +9 -1
- package/dist/db/migrate-generator.js +23 -4
- package/dist/db/migrate-rls-diff.d.ts +1 -0
- package/dist/db/migrate-rls-diff.js +15 -1
- package/dist/db/migrate-runner.js +2 -2
- package/dist/db/money.d.ts +1 -1
- package/dist/db/money.js +1 -4
- package/dist/db/parent-ref-clause.d.ts +6 -2
- package/dist/db/parent-ref-clause.js +76 -23
- package/dist/db/parent-ref-global-hosts.d.ts +20 -0
- package/dist/db/parent-ref-global-hosts.js +47 -0
- package/dist/db/production-schema-command-hint.d.ts +1 -0
- package/dist/db/production-schema-command-hint.js +3 -0
- package/dist/db/queries/backfill-pii.js +55 -29
- package/dist/db/queries/ddl.js +13 -2
- package/dist/db/queries/event-store-open-streams.d.ts +15 -0
- package/dist/db/queries/event-store-open-streams.js +33 -0
- package/dist/db/queries/event-store-payload-scrub.d.ts +5 -0
- package/dist/db/queries/event-store-payload-scrub.js +11 -0
- package/dist/db/queries/event-store.js +0 -1
- package/dist/db/queries/raw-sql.js +0 -1
- package/dist/db/queries/rebuild-rls-guard.d.ts +2 -1
- package/dist/db/queries/rebuild-rls-guard.js +24 -11
- package/dist/db/queries/rls-boot-catalog.d.ts +1 -0
- package/dist/db/queries/rls-boot-catalog.js +13 -8
- package/dist/db/queries/rls-shape.d.ts +2 -1
- package/dist/db/queries/rls-shape.js +10 -0
- package/dist/db/queries/session-advisory-lock.js +2 -1
- package/dist/db/queries/test-stack.js +7 -7
- package/dist/db/query.js +16 -11
- package/dist/db/rebuild-marker.js +11 -2
- package/dist/db/render-rls-ddl.d.ts +2 -0
- package/dist/db/render-rls-ddl.js +16 -11
- package/dist/db/replay-migration-sql.js +1 -1
- package/dist/db/row-level-security-boot-check.js +18 -5
- package/dist/db/row-level-security-connection.js +25 -12
- package/dist/db/row-level-security-scope.d.ts +2 -1
- package/dist/db/row-level-security-scope.js +9 -5
- package/dist/db/sql-identifier.d.ts +1 -0
- package/dist/db/sql-identifier.js +3 -0
- package/dist/db/system-tenant-read-db.d.ts +5 -0
- package/dist/db/system-tenant-read-db.js +28 -0
- package/dist/db/table-builder.d.ts +3 -1
- package/dist/db/table-builder.js +18 -8
- package/dist/db/table-info.d.ts +1 -2
- package/dist/db/table-introspection.d.ts +3 -0
- package/dist/db/table-introspection.js +6 -0
- package/dist/db/table-push.d.ts +1 -0
- package/dist/db/table-push.js +7 -1
- package/dist/db/tenant-db-runner.d.ts +3 -0
- package/dist/db/tenant-db-runner.js +19 -1
- package/dist/db/transaction-serialization.d.ts +1 -0
- package/dist/db/transaction-serialization.js +20 -3
- package/dist/db/where-clause.js +11 -2
- package/dist/db/write-ownership-failures.d.ts +25 -0
- package/dist/db/write-ownership-failures.js +82 -0
- package/dist/engine/boot-validator/boot-check.js +7 -1
- package/dist/engine/boot-validator/boot-phases-app.js +5 -5
- package/dist/engine/boot-validator/boot-phases.js +3 -2
- package/dist/engine/boot-validator/boot-rules.d.ts +293 -26
- package/dist/engine/boot-validator/boot-rules.js +4 -0
- package/dist/engine/boot-validator/bundled-lists-table.js +2 -2
- package/dist/engine/boot-validator/card-meta-overflow.js +1 -0
- package/dist/engine/boot-validator/config-deps.d.ts +0 -1
- package/dist/engine/boot-validator/config-deps.js +0 -28
- package/dist/engine/boot-validator/config-key-rules.d.ts +0 -15
- package/dist/engine/boot-validator/config-key-rules.js +0 -15
- package/dist/engine/boot-validator/dashboard-screen-target.d.ts +22 -0
- package/dist/engine/boot-validator/dashboard-screen-target.js +20 -0
- package/dist/engine/boot-validator/dashboard-stat-navigate.d.ts +1 -0
- package/dist/engine/boot-validator/dashboard-stat-navigate.js +25 -17
- package/dist/engine/boot-validator/definition-webhook-events-rules.d.ts +5 -0
- package/dist/engine/boot-validator/definition-webhook-events-rules.js +5 -0
- package/dist/engine/boot-validator/derived-sql-fields.js +1 -2
- package/dist/engine/boot-validator/entity-declaration-rules.d.ts +5 -0
- package/dist/engine/boot-validator/entity-declaration-rules.js +5 -0
- package/dist/engine/boot-validator/entity-list-screens.d.ts +1 -0
- package/dist/engine/boot-validator/entity-list-screens.js +33 -6
- package/dist/engine/boot-validator/entity-structure-rules.d.ts +5 -0
- package/dist/engine/boot-validator/entity-structure-rules.js +5 -0
- package/dist/engine/boot-validator/list-column-layout.js +10 -6
- package/dist/engine/boot-validator/list-row-guidance-rules.d.ts +67 -0
- package/dist/engine/boot-validator/list-row-guidance-rules.js +67 -0
- package/dist/engine/boot-validator/list-row-guidance.d.ts +20 -0
- package/dist/engine/boot-validator/list-row-guidance.js +129 -0
- package/dist/engine/boot-validator/list-sort-summary-rules.d.ts +42 -0
- package/dist/engine/boot-validator/list-sort-summary-rules.js +42 -0
- package/dist/engine/boot-validator/list-sort-summary.d.ts +5 -0
- package/dist/engine/boot-validator/list-sort-summary.js +149 -0
- package/dist/engine/boot-validator/list-table-options.js +15 -1
- package/dist/engine/boot-validator/list-table-rules.d.ts +10 -5
- package/dist/engine/boot-validator/list-table-rules.js +10 -5
- package/dist/engine/boot-validator/list-toolbar-options.d.ts +10 -0
- package/dist/engine/boot-validator/list-toolbar-options.js +31 -0
- package/dist/engine/boot-validator/named-filter-rules.d.ts +32 -2
- package/dist/engine/boot-validator/named-filter-rules.js +32 -2
- package/dist/engine/boot-validator/ownership.js +10 -1
- package/dist/engine/boot-validator/parent-ref.js +87 -50
- package/dist/engine/boot-validator/projection-list-screens.d.ts +1 -0
- package/dist/engine/boot-validator/projection-list-screens.js +31 -1
- package/dist/engine/boot-validator/query-output-columns.js +62 -9
- package/dist/engine/boot-validator/query-output-guidance.d.ts +7 -0
- package/dist/engine/boot-validator/query-output-guidance.js +39 -0
- package/dist/engine/boot-validator/query-refs.js +24 -1
- package/dist/engine/boot-validator/row-decoration.d.ts +11 -0
- package/dist/engine/boot-validator/row-decoration.js +16 -0
- package/dist/engine/boot-validator/screens-dashboard-links.d.ts +10 -0
- package/dist/engine/boot-validator/screens-dashboard-links.js +36 -0
- package/dist/engine/boot-validator/screens-dashboard-narrow.d.ts +4 -0
- package/dist/engine/boot-validator/screens-dashboard-narrow.js +211 -0
- package/dist/engine/boot-validator/screens-dashboard-rules.d.ts +84 -4
- package/dist/engine/boot-validator/screens-dashboard-rules.js +84 -4
- package/dist/engine/boot-validator/screens-dashboard.js +29 -7
- package/dist/engine/boot-validator/screens-kind-entity-list.js +32 -27
- package/dist/engine/boot-validator/screens-kind-projection-detail-guidance.d.ts +3 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail-guidance.js +46 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail-rules.d.ts +20 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail-rules.js +20 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail.js +2 -0
- package/dist/engine/boot-validator/screens-kind-projection-list.js +4 -0
- package/dist/engine/boot-validator/screens-kind-rules.d.ts +25 -0
- package/dist/engine/boot-validator/screens-kind-rules.js +25 -0
- package/dist/engine/boot-validator/screens-lists.d.ts +8 -2
- package/dist/engine/boot-validator/screens-lists.js +19 -3
- package/dist/engine/boot-validator/screens.js +1 -1
- package/dist/engine/boot-validator/sort-nulls.d.ts +2 -0
- package/dist/engine/boot-validator/sort-nulls.js +15 -0
- package/dist/engine/boot-validator/zod-shape.d.ts +2 -1
- package/dist/engine/boot-validator/zod-shape.js +19 -1
- package/dist/engine/build-app-schema.js +4 -0
- package/dist/engine/config-helpers.d.ts +1 -2
- package/dist/engine/config-helpers.js +6 -7
- package/dist/engine/define-feature.js +1 -0
- package/dist/engine/define-handler.d.ts +1 -0
- package/dist/engine/define-handler.js +4 -2
- package/dist/engine/definition-violations.js +2 -2
- package/dist/engine/entity-handlers.js +3 -8
- package/dist/engine/entity-list-runtime-options.js +9 -8
- package/dist/engine/factories.d.ts +2 -0
- package/dist/engine/feature-config-events-jobs.js +1 -0
- package/dist/engine/feature-entity-handlers.js +5 -2
- package/dist/engine/field-access.d.ts +1 -1
- package/dist/engine/field-access.js +7 -10
- package/dist/engine/find-entity.js +3 -3
- package/dist/engine/form-derivations.js +3 -3
- package/dist/engine/index.d.ts +3 -3
- package/dist/engine/index.js +2 -2
- package/dist/engine/named-filter-roles.d.ts +3 -0
- package/dist/engine/named-filter-roles.js +23 -0
- package/dist/engine/pipeline.js +0 -1
- package/dist/engine/project-app-schema-for-roles.js +17 -2
- package/dist/engine/qualified-name.js +0 -1
- package/dist/engine/registry-facade.js +1 -2
- package/dist/engine/registry-state.d.ts +1 -1
- package/dist/engine/registry-state.js +5 -2
- package/dist/engine/registry-validate.d.ts +1 -0
- package/dist/engine/registry-validate.js +9 -1
- package/dist/engine/registry.js +2 -1
- package/dist/engine/resolve-named-list-filters.js +5 -2
- package/dist/engine/schema-builder.js +6 -10
- package/dist/engine/screen-helpers.d.ts +12 -0
- package/dist/engine/screen-helpers.js +17 -1
- package/dist/engine/soft-delete-cleanup.js +5 -8
- package/dist/engine/state-machine.js +0 -1
- package/dist/engine/steps/_database-clock.d.ts +2 -0
- package/dist/engine/steps/_database-clock.js +6 -0
- package/dist/engine/steps/compute.js +1 -1
- package/dist/engine/steps/retry.js +5 -1
- package/dist/engine/steps/return.js +0 -1
- package/dist/engine/steps/wait-for-event.js +2 -1
- package/dist/engine/steps/wait.js +2 -1
- package/dist/engine/system-user.d.ts +2 -2
- package/dist/engine/system-user.js +2 -2
- package/dist/engine/types/handlers.d.ts +1 -1
- package/dist/engine/types/handlers.js +1 -1
- package/dist/engine/types/screen.d.ts +1 -1
- package/dist/engine/types/screen.js +1 -1
- package/dist/engine/webhook-contracts.d.ts +2 -3
- package/dist/engine/webhook-contracts.js +2 -25
- package/dist/engine/webhook-events.js +48 -29
- package/dist/engine/webhook-payload-strictness.d.ts +7 -0
- package/dist/engine/webhook-payload-strictness.js +53 -0
- package/dist/env/_zod-introspect.d.ts +1 -0
- package/dist/env/dry-run.d.ts +1 -1
- package/dist/env/dry-run.js +1 -1
- package/dist/env/field-meta.d.ts +4 -0
- package/dist/env/field-meta.js +67 -0
- package/dist/env/field-rules.d.ts +9 -0
- package/dist/env/field-rules.js +46 -0
- package/dist/env/index.d.ts +3 -3
- package/dist/env/index.js +16 -71
- package/dist/env/internals.d.ts +3 -0
- package/dist/env/internals.js +1 -2
- package/dist/env/required-env.d.ts +3 -1
- package/dist/env/required-env.js +5 -2
- package/dist/errors/serialize.js +2 -2
- package/dist/errors/write-error-info.js +0 -2
- package/dist/es-ops/operations-schema.js +18 -7
- package/dist/event-store/admin-api.js +3 -3
- package/dist/event-store/event-store.js +0 -3
- package/dist/event-store/index.d.ts +1 -0
- package/dist/event-store/index.js +1 -0
- package/dist/event-store/transfer.js +1 -1
- package/dist/files/assert-file-refs-belong-to-tenant.d.ts +2 -1
- package/dist/files/assert-file-refs-belong-to-tenant.js +15 -13
- package/dist/files/bind-pending-file-refs.d.ts +3 -1
- package/dist/files/bind-pending-file-refs.js +54 -27
- package/dist/files/copy-pending-file-refs-to-tenant.js +7 -3
- package/dist/files/create-file-ref.d.ts +4 -1
- package/dist/files/create-file-ref.js +14 -3
- package/dist/files/default-file-guard.js +4 -1
- package/dist/files/feature.js +1 -0
- package/dist/files/file-claim.d.ts +6 -0
- package/dist/files/file-claim.js +17 -0
- package/dist/files/file-field-slots.d.ts +2 -0
- package/dist/files/file-field-slots.js +28 -0
- package/dist/files/file-ref-entity.d.ts +3 -0
- package/dist/files/file-ref-entity.js +2 -0
- package/dist/files/file-ref-table.d.ts +3 -0
- package/dist/files/file-routes.d.ts +4 -1
- package/dist/files/file-routes.js +80 -16
- package/dist/files/in-memory-provider.d.ts +1 -1
- package/dist/files/in-memory-provider.js +2 -1
- package/dist/files/index.d.ts +1 -1
- package/dist/files/index.js +1 -1
- package/dist/files/invalid-file-ref-error.d.ts +2 -0
- package/dist/files/invalid-file-ref-error.js +15 -0
- package/dist/files/local-provider.js +9 -2
- package/dist/files/provider-resolver.js +1 -1
- package/dist/files/rebind-file-ref.d.ts +3 -2
- package/dist/files/rebind-file-ref.js +24 -18
- package/dist/files/resolve-file-handles.d.ts +13 -0
- package/dist/files/resolve-file-handles.js +57 -0
- package/dist/files/storage-tracking.d.ts +1 -1
- package/dist/files/storage-tracking.js +5 -2
- package/dist/files/sweep-stale-pending-file-refs.js +10 -4
- package/dist/files/types.d.ts +4 -0
- package/dist/files/types.js +10 -0
- package/dist/files/upload-field-resolution.d.ts +1 -0
- package/dist/files/upload-field-resolution.js +16 -2
- package/dist/files/upload-ledger.js +1 -1
- package/dist/i18n/required-surface-guidance-keys.d.ts +3 -0
- package/dist/i18n/required-surface-guidance-keys.js +9 -0
- package/dist/i18n/required-surface-keys.js +19 -4
- package/dist/internal/boot-rule-table-expectations.d.ts +2 -0
- package/dist/internal/boot-rule-table-expectations.js +29 -0
- package/dist/internal/row-level-security.d.ts +1 -0
- package/dist/internal/row-level-security.js +1 -0
- package/dist/internal/testing.d.ts +1 -0
- package/dist/internal/testing.js +1 -0
- package/dist/jobs/index.d.ts +1 -0
- package/dist/jobs/index.js +1 -0
- package/dist/jobs/job-load-events.d.ts +10 -0
- package/dist/jobs/job-load-events.js +12 -0
- package/dist/jobs/job-runner-context.js +6 -158
- package/dist/jobs/job-runner-dispatch.d.ts +7 -0
- package/dist/jobs/job-runner-dispatch.js +57 -0
- package/dist/jobs/job-runner-event-triggers.js +18 -9
- package/dist/jobs/job-runner-execution.js +2 -2
- package/dist/jobs/job-runner-facets.d.ts +48 -0
- package/dist/jobs/job-runner-facets.js +156 -0
- package/dist/jobs/job-runner-gates.js +24 -12
- package/dist/jobs/job-runner-helpers.d.ts +5 -1
- package/dist/jobs/job-runner-helpers.js +18 -3
- package/dist/jobs/job-runner-scope.d.ts +1 -0
- package/dist/jobs/job-runner-scope.js +2 -0
- package/dist/jobs/job-runner-tenant-cap-lock.d.ts +2 -0
- package/dist/jobs/job-runner-tenant-cap-lock.js +30 -0
- package/dist/jobs/job-runner.js +31 -70
- package/dist/jobs/obliterate-job-queues.d.ts +6 -0
- package/dist/jobs/obliterate-job-queues.js +23 -0
- package/dist/lifecycle/lifecycle.js +1 -1
- package/dist/migrations/event-header-scrub.d.ts +11 -0
- package/dist/migrations/event-header-scrub.js +33 -0
- package/dist/migrations/event-payload-scrub.d.ts +1 -1
- package/dist/migrations/event-payload-scrub.js +36 -4
- package/dist/migrations/index.d.ts +1 -0
- package/dist/migrations/index.js +2 -0
- package/dist/migrations/kumiko-drift.d.ts +5 -2
- package/dist/migrations/kumiko-drift.js +51 -14
- package/dist/migrations/pending-rebuilds.js +4 -5
- package/dist/observability/sensitive-filter.js +0 -12
- package/dist/pipeline/aggregate-type-removal.js +17 -4
- package/dist/pipeline/context-services.d.ts +2 -0
- package/dist/pipeline/context-services.js +5 -2
- package/dist/pipeline/dispatch-batch.js +4 -3
- package/dist/pipeline/dispatch-context-helpers.d.ts +11 -0
- package/dist/pipeline/dispatch-context-helpers.js +58 -0
- package/dist/pipeline/dispatch-nested-write.d.ts +7 -0
- package/dist/pipeline/dispatch-nested-write.js +119 -0
- package/dist/pipeline/dispatch-query.js +10 -3
- package/dist/pipeline/dispatch-scope.js +4 -3
- package/dist/pipeline/dispatch-shared.d.ts +2 -6
- package/dist/pipeline/dispatch-shared.js +6 -38
- package/dist/pipeline/dispatch-write.d.ts +0 -1
- package/dist/pipeline/dispatch-write.js +3 -302
- package/dist/pipeline/dispatcher-utils.js +6 -0
- package/dist/pipeline/effective-system-scope.d.ts +3 -0
- package/dist/pipeline/effective-system-scope.js +22 -0
- package/dist/pipeline/event-dispatcher-delivery.d.ts +1 -0
- package/dist/pipeline/event-dispatcher-delivery.js +17 -9
- package/dist/pipeline/event-dispatcher.d.ts +4 -1
- package/dist/pipeline/event-dispatcher.js +6 -7
- package/dist/pipeline/handler-context-auth.d.ts +3 -2
- package/dist/pipeline/handler-context-auth.js +3 -4
- package/dist/pipeline/handler-context-db.js +11 -4
- package/dist/pipeline/handler-context-dispatch.js +2 -2
- package/dist/pipeline/handler-context-events.d.ts +8 -3
- package/dist/pipeline/handler-context-events.js +20 -65
- package/dist/pipeline/handler-context-member-resolution.js +16 -8
- package/dist/pipeline/handler-context-notify.d.ts +1 -0
- package/dist/pipeline/handler-context-notify.js +2 -0
- package/dist/pipeline/handler-context-phase-denials.js +3 -2
- package/dist/pipeline/handler-context-projection.d.ts +3 -0
- package/dist/pipeline/handler-context-projection.js +39 -0
- package/dist/pipeline/handler-context-scope.d.ts +1 -1
- package/dist/pipeline/handler-context-scope.js +14 -2
- package/dist/pipeline/index.d.ts +1 -1
- package/dist/pipeline/index.js +1 -1
- package/dist/pipeline/lifecycle-pipeline.d.ts +1 -0
- package/dist/pipeline/lifecycle-pipeline.js +7 -4
- package/dist/pipeline/member-reader.js +4 -2
- package/dist/pipeline/msp-rebuild.js +1 -1
- package/dist/pipeline/nested-write-parent-guard.d.ts +5 -0
- package/dist/pipeline/nested-write-parent-guard.js +81 -0
- package/dist/pipeline/projection-rebuild.d.ts +2 -0
- package/dist/pipeline/projection-rebuild.js +16 -7
- package/dist/pipeline/projection-state.js +4 -6
- package/dist/pipeline/system-hooks.js +36 -6
- package/dist/pipeline/write-result-masking.js +31 -3
- package/dist/pipeline/write-transition-guard.d.ts +7 -0
- package/dist/pipeline/write-transition-guard.js +95 -0
- package/dist/schema-cli/shared.d.ts +2 -0
- package/dist/schema-cli/shared.js +4 -2
- package/dist/schema-cli/validate-command.js +43 -28
- package/dist/search/meilisearch-adapter.js +14 -9
- package/dist/search/reindex-entity.d.ts +2 -0
- package/dist/search/reindex-entity.js +32 -4
- package/dist/search/reindex-tenants-search.js +20 -4
- package/dist/time/tz-context.js +1 -1
- package/dist/ui-types/card-column-roles.d.ts +4 -0
- package/dist/ui-types/card-column-roles.js +6 -3
- package/dist/ui-types/index.d.ts +2 -2
- package/dist/ui-types/index.js +1 -1
- package/dist/utils/ids.js +0 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/return-path-limit.d.ts +1 -0
- package/dist/utils/return-path-limit.js +1 -0
- package/package.json +5 -3
- package/presets/biome-app.json +39 -21
- package/presets/biome-plugins/admin-api.grit +10 -0
- package/presets/biome-plugins/error-reasons.grit +53 -0
- package/presets/biome-plugins/es-literal-writes-tests.grit +18 -0
- package/presets/biome-plugins/es-literal-writes.grit +22 -0
- package/presets/biome-plugins/i18n-locale-terminology-de.grit +15 -0
- package/presets/biome-plugins/i18n-locale-terminology-romance.grit +10 -0
- package/presets/biome-plugins/no-create-test-dispatcher.grit +5 -0
- package/presets/biome-plugins/no-css-properties-type.grit +7 -0
- package/presets/biome-plugins/no-date-api.grit +9 -0
- package/presets/biome-plugins/no-direct-fetch.grit +16 -0
- package/presets/biome-plugins/no-direct-fs.grit +16 -0
- package/presets/biome-plugins/no-external-font-cdn-css.grit +9 -0
- package/presets/biome-plugins/no-external-font-cdn.grit +12 -0
- package/presets/biome-plugins/no-raw-hooks.grit +10 -0
- package/presets/biome-plugins/no-same-folder-barrel-import.grit +11 -0
- package/presets/biome-plugins/no-screen-container-classes.grit +7 -0
- package/presets/biome-plugins/no-skipped-or-retried-tests.grit +34 -0
- package/presets/biome-plugins/no-temporal-polyfill-require.grit +10 -0
- package/presets/biome-plugins/raw-html-in-web.grit +40 -0
- package/presets/biome-plugins/raw-ui-in-app.grit +142 -0
- package/presets/biome-plugins/restricted-event-store-symbols.grit +18 -0
- package/presets/biome-plugins/test-title.grit +20 -0
- package/presets/biome-plugins/unsafe-json-parse.grit +6 -0
- package/presets/biome-rules.json +465 -0
- package/src/changes.json +309 -0
- package/dist/engine/minor-units.d.ts +0 -2
- package/dist/engine/minor-units.js +0 -8
|
@@ -147,10 +147,40 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
147
147
|
readonly summary: "A projectionList with namedFilters binds a query whose schema has a namedFilter key.";
|
|
148
148
|
readonly fix: "Add namedFilter: z.string().optional() to the query schema, resolve it with resolveNamedListFilters and pass the conditions into executor.list filters, the only path that applies field-read and PII guards.";
|
|
149
149
|
};
|
|
150
|
+
readonly projectionQueryAcceptsCount: {
|
|
151
|
+
readonly id: "named-filter/projection-query-accepts-count";
|
|
152
|
+
readonly summary: "A projectionList with namedFilterFacet.showCounts binds a query whose schema has limit and totalCount keys.";
|
|
153
|
+
readonly fix: "Add limit and totalCount: z.boolean().optional() to the query schema and return the total, or drop showCounts.";
|
|
154
|
+
};
|
|
155
|
+
readonly projectionQueryAcceptsSort: {
|
|
156
|
+
readonly id: "named-filter/projection-query-accepts-sort";
|
|
157
|
+
readonly summary: "A projectionList whose namedFilter sets a sort binds a query whose schema has sort and sortDirection keys.";
|
|
158
|
+
readonly fix: "Add sort: z.enum([...sortable fields]) and sortDirection to the query schema and order by them, or remove sort from the named filter.";
|
|
159
|
+
};
|
|
160
|
+
readonly filterSortNotListed: {
|
|
161
|
+
readonly id: "list/named-filter-sort-not-listed";
|
|
162
|
+
readonly summary: "A named filter's sort.field is one of the listed columns.";
|
|
163
|
+
readonly fix: "Pick a field from columns or add it there.";
|
|
164
|
+
};
|
|
165
|
+
readonly filterSortNotSortable: {
|
|
166
|
+
readonly id: "list/named-filter-sort-not-sortable";
|
|
167
|
+
readonly summary: "A named filter's sort column is sortable.";
|
|
168
|
+
readonly fix: "Mark the field sortable or pick another sort field.";
|
|
169
|
+
};
|
|
170
|
+
readonly facetWithoutFilters: {
|
|
171
|
+
readonly id: "list/named-filter-facet-without-filters";
|
|
172
|
+
readonly summary: "namedFilterFacet only presents the screen's namedFilters.";
|
|
173
|
+
readonly fix: "Declare namedFilters on the screen or remove namedFilterFacet.";
|
|
174
|
+
};
|
|
175
|
+
readonly emptyStateTitleEmpty: {
|
|
176
|
+
readonly id: "list/named-filter-empty-state-title-empty";
|
|
177
|
+
readonly summary: "A named filter's emptyState.title is a non-empty i18n key.";
|
|
178
|
+
readonly fix: "Name the title key or remove emptyState from the filter.";
|
|
179
|
+
};
|
|
150
180
|
readonly statNavigateTarget: {
|
|
151
181
|
readonly id: "named-filter/stat-navigate-target";
|
|
152
|
-
readonly summary: "A stat navigate.screen resolves to an entityList or
|
|
153
|
-
readonly fix: "Point navigate.screen at a registered list screen.";
|
|
182
|
+
readonly summary: "A stat navigate.screen resolves to an entityList, projectionList or custom screen.";
|
|
183
|
+
readonly fix: "Point navigate.screen at a registered list or custom screen.";
|
|
154
184
|
};
|
|
155
185
|
readonly statNavigateFilterDeclared: {
|
|
156
186
|
readonly id: "named-filter/stat-navigate-filter-declared";
|
|
@@ -581,14 +611,94 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
581
611
|
};
|
|
582
612
|
readonly textPanelEmpty: {
|
|
583
613
|
readonly id: "dashboard/text-panel-empty";
|
|
584
|
-
readonly summary: "A text panel declares at least one block.";
|
|
585
|
-
readonly fix: "Add at least one block.";
|
|
614
|
+
readonly summary: "A text panel declares at least one block or a query.";
|
|
615
|
+
readonly fix: "Add at least one block or set query.";
|
|
616
|
+
};
|
|
617
|
+
readonly statNavigateParamsInvalid: {
|
|
618
|
+
readonly id: "dashboard/stat-navigate-params-invalid";
|
|
619
|
+
readonly summary: "A stat's navigate.params has non-empty keys and string values.";
|
|
620
|
+
readonly fix: "Use { key: 'value' } with non-empty keys and string values, or remove params.";
|
|
586
621
|
};
|
|
587
622
|
readonly textListBlockEmpty: {
|
|
588
623
|
readonly id: "dashboard/text-list-block-empty";
|
|
589
624
|
readonly summary: "A text list block has items.";
|
|
590
625
|
readonly fix: "Add items or remove the block.";
|
|
591
626
|
};
|
|
627
|
+
readonly statNavigateCustomWithFilter: {
|
|
628
|
+
readonly id: "dashboard/stat-navigate-custom-with-filter";
|
|
629
|
+
readonly summary: "A stat navigating to a custom screen does not set namedFilter.";
|
|
630
|
+
readonly fix: "Remove navigate.namedFilter; a custom screen has no namedFilters.";
|
|
631
|
+
};
|
|
632
|
+
readonly panelLinkTarget: {
|
|
633
|
+
readonly id: "dashboard/panel-link-target";
|
|
634
|
+
readonly summary: "A list panel footerLink or stat-group link targets a registered screen, sets string-valued params, and uses namedFilter only on a list screen that declares it.";
|
|
635
|
+
readonly fix: "Point screen at a registered screen, give params string values, and drop namedFilter unless the target list declares it.";
|
|
636
|
+
};
|
|
637
|
+
readonly listNarrowInvalid: {
|
|
638
|
+
readonly id: "dashboard/list-narrow-invalid";
|
|
639
|
+
readonly summary: 'A list panel\'s narrow.limit is a positive integer, narrow.layout is "cards" or "line", and narrow.moreText and icon appear only with the "line" layout.';
|
|
640
|
+
readonly fix: 'Set narrow.limit to a whole number of at least 1 and narrow.layout to "cards" or "line"; use narrow.moreText and icon only with "line".';
|
|
641
|
+
};
|
|
642
|
+
readonly listNarrowLineWithoutFooterLink: {
|
|
643
|
+
readonly id: "dashboard/list-narrow-line-without-footer-link";
|
|
644
|
+
readonly summary: 'A list panel with narrow.layout "line" declares footerLink, the target of the line.';
|
|
645
|
+
readonly fix: 'Add footerLink or use narrow.layout "cards".';
|
|
646
|
+
};
|
|
647
|
+
readonly listRowLinkInvalid: {
|
|
648
|
+
readonly id: "dashboard/list-row-link-invalid";
|
|
649
|
+
readonly summary: 'A list panel rowLink names exactly one target (a registered screen, or the row field screenField holding it), takes the matching params field (paramField with screen, paramsField with screenField), non-empty field names and an icon of "arrow" or "chevron".';
|
|
650
|
+
readonly fix: 'Set either rowLink.screen to a registered screen (params from paramField) or rowLink.screenField to the row field holding the screen name (params from paramsField), and icon to "arrow" or "chevron".';
|
|
651
|
+
};
|
|
652
|
+
readonly listRowToneMarkerInvalid: {
|
|
653
|
+
readonly id: "dashboard/list-row-tone-marker-invalid";
|
|
654
|
+
readonly summary: 'A list panel rowToneMarker is "bar" or "dot".';
|
|
655
|
+
readonly fix: 'Set rowToneMarker to "bar" or "dot", or remove it.';
|
|
656
|
+
};
|
|
657
|
+
readonly statGroupColumnsInvalid: {
|
|
658
|
+
readonly id: "dashboard/stat-group-columns-invalid";
|
|
659
|
+
readonly summary: 'A stat-group\'s columns is 2, 3 or 4 and needs layout "cards".';
|
|
660
|
+
readonly fix: 'Set columns to 2, 3 or 4 and give the group a label or layout: "cards", or remove columns.';
|
|
661
|
+
};
|
|
662
|
+
readonly statGroupChildHideOnNarrow: {
|
|
663
|
+
readonly id: "dashboard/stat-group-child-hide-on-narrow";
|
|
664
|
+
readonly summary: "Stat-group children do not set hideOnNarrow.";
|
|
665
|
+
readonly fix: "Set hideOnNarrow on the whole group instead.";
|
|
666
|
+
};
|
|
667
|
+
readonly listNarrowFieldUnknown: {
|
|
668
|
+
readonly id: "dashboard/list-narrow-field-unknown";
|
|
669
|
+
readonly summary: 'A list panel\'s narrow.field is set only with narrow.layout "line" and names a non-empty query output field; narrow.titleField needs the cards layout and a hint column.';
|
|
670
|
+
readonly fix: 'Set narrow.layout "line" and name a field of the query output, or remove narrow.field. For narrow.titleField keep the cards layout and a hint column.';
|
|
671
|
+
};
|
|
672
|
+
readonly narrowOrderInvalid: {
|
|
673
|
+
readonly id: "dashboard/narrow-order-invalid";
|
|
674
|
+
readonly summary: "A panel's narrowOrder is an integer of at least 0 and is not set on a stat-group child.";
|
|
675
|
+
readonly fix: "Set narrowOrder to a whole number from 0 up on the panel (or the whole stat-group).";
|
|
676
|
+
};
|
|
677
|
+
readonly statNarrowLabelOutsideGroup: {
|
|
678
|
+
readonly id: "dashboard/stat-narrow-label-outside-group";
|
|
679
|
+
readonly summary: "A stat's narrowLabel is non-empty and only set on a stat-group child (the one-line phone strip is the only place it is drawn).";
|
|
680
|
+
readonly fix: "Move the stat into a titled stat-group or remove narrowLabel.";
|
|
681
|
+
};
|
|
682
|
+
readonly statGroupNarrowWithoutTitledStrip: {
|
|
683
|
+
readonly id: "dashboard/stat-group-narrow-without-titled-strip";
|
|
684
|
+
readonly summary: 'A stat-group\'s narrow.tone needs a label and layout "strip" (it tints the one-line phone strip).';
|
|
685
|
+
readonly fix: 'Give the group a label and layout "strip", or remove narrow.';
|
|
686
|
+
};
|
|
687
|
+
readonly statGroupNarrowToneInvalid: {
|
|
688
|
+
readonly id: "dashboard/stat-group-narrow-tone-invalid";
|
|
689
|
+
readonly summary: "A stat-group's narrow.tone must be one of the select option tones.";
|
|
690
|
+
readonly fix: "Use accent, ok, warn, bad, critical or neutral.";
|
|
691
|
+
};
|
|
692
|
+
readonly statGroupIconWithoutTitledStrip: {
|
|
693
|
+
readonly id: "dashboard/stat-group-icon-without-titled-strip";
|
|
694
|
+
readonly summary: 'A stat-group\'s icon needs a label and layout "strip" (the icon stands in the one-line phone strip).';
|
|
695
|
+
readonly fix: 'Give the group a label and layout "strip", or remove icon.';
|
|
696
|
+
};
|
|
697
|
+
readonly textNarrowBlocksWithoutBlocks: {
|
|
698
|
+
readonly id: "dashboard/text-narrow-blocks-without-blocks";
|
|
699
|
+
readonly summary: "A text panel with narrowBlocks also declares blocks, and narrowBlocks is non-empty.";
|
|
700
|
+
readonly fix: "Add blocks (the wide variant) or remove narrowBlocks.";
|
|
701
|
+
};
|
|
592
702
|
readonly textLinkUnresolved: {
|
|
593
703
|
readonly id: "dashboard/text-link-unresolved";
|
|
594
704
|
readonly summary: "A text link block's screen resolves to a registered screen.";
|
|
@@ -606,8 +716,8 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
606
716
|
};
|
|
607
717
|
readonly panelSpanInvalid: {
|
|
608
718
|
readonly id: "dashboard/panel-span-invalid";
|
|
609
|
-
readonly summary: 'A panel\'s span is "half" or "
|
|
610
|
-
readonly fix: 'Set span to "half" or "
|
|
719
|
+
readonly summary: 'A panel\'s span is "half", "full", "third" or "two-thirds".';
|
|
720
|
+
readonly fix: 'Set span to "half", "full", "third" or "two-thirds".';
|
|
611
721
|
};
|
|
612
722
|
readonly statGroupEmpty: {
|
|
613
723
|
readonly id: "dashboard/stat-group-empty";
|
|
@@ -1042,6 +1152,72 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
1042
1152
|
readonly summary: "A confirm.carry entry does not share a name with a confirm.fields entry.";
|
|
1043
1153
|
readonly fix: "Rename the carry entry or the field.";
|
|
1044
1154
|
};
|
|
1155
|
+
}, {
|
|
1156
|
+
readonly hintColumnRenderer: {
|
|
1157
|
+
readonly id: "list/hint-column-renderer";
|
|
1158
|
+
readonly summary: "A hint column owns its cell rendering and sets no renderer.";
|
|
1159
|
+
readonly fix: "Remove renderer or hint from the column.";
|
|
1160
|
+
};
|
|
1161
|
+
readonly hintColumnDisplay: {
|
|
1162
|
+
readonly id: "list/hint-column-display";
|
|
1163
|
+
readonly summary: "A hint column owns its cell rendering and sets no display.";
|
|
1164
|
+
readonly fix: "Remove display or hint from the column.";
|
|
1165
|
+
};
|
|
1166
|
+
readonly hintColumnLink: {
|
|
1167
|
+
readonly id: "list/hint-column-link";
|
|
1168
|
+
readonly summary: "A hint column owns its cell rendering and sets no linkScreenField, linkParamsField, refEntity or badgeToneField.";
|
|
1169
|
+
readonly fix: "Remove the link or badge option, or move the hint to its own column.";
|
|
1170
|
+
};
|
|
1171
|
+
readonly hintColumnEmptyPlaceholder: {
|
|
1172
|
+
readonly id: "list/hint-column-empty-placeholder";
|
|
1173
|
+
readonly summary: "A hint column shows hint.emptyLabel for an empty value and sets no emptyPlaceholder.";
|
|
1174
|
+
readonly fix: "Remove emptyPlaceholder, or name the empty sentence with hint.emptyLabel.";
|
|
1175
|
+
};
|
|
1176
|
+
readonly buttonColumnWithoutLink: {
|
|
1177
|
+
readonly id: "list/button-column-without-link";
|
|
1178
|
+
readonly summary: 'A column with display "button" has a link (linkScreenField or refEntity) to draw as the button.';
|
|
1179
|
+
readonly fix: 'Set linkScreenField or refEntity on the column, or remove display: "button".';
|
|
1180
|
+
};
|
|
1181
|
+
readonly buttonColumnInListTable: {
|
|
1182
|
+
readonly id: "list/button-column-in-list-table";
|
|
1183
|
+
readonly summary: 'display "button" is drawn only in dashboard list panels; entityList and projectionList tables (RenderList) keep a row button as a rowAction.';
|
|
1184
|
+
readonly fix: 'Declare the button as a rowAction with display: "button" or remove display: "button" from the column.';
|
|
1185
|
+
};
|
|
1186
|
+
readonly narrowOnlyConflict: {
|
|
1187
|
+
readonly id: "list/narrow-only-conflict";
|
|
1188
|
+
readonly summary: "A showOnNarrowOnly column sets none of hideOnNarrow: true, hidden: true or pinned.";
|
|
1189
|
+
readonly fix: "Remove the conflicting option or showOnNarrowOnly.";
|
|
1190
|
+
};
|
|
1191
|
+
readonly narrowDetailFieldWithoutDetailField: {
|
|
1192
|
+
readonly id: "list/narrow-detail-field-without-detail-field";
|
|
1193
|
+
readonly summary: "hint.narrowDetailField replaces hint.detailField below sm, so it needs detailField.";
|
|
1194
|
+
readonly fix: "Set hint.detailField or remove narrowDetailField.";
|
|
1195
|
+
};
|
|
1196
|
+
readonly reasonOptionWithoutReasonField: {
|
|
1197
|
+
readonly id: "list/reason-option-without-reason-field";
|
|
1198
|
+
readonly summary: "hint.reasonOpenField and hint.reasonTitleField shape the reason text, so they need reasonField.";
|
|
1199
|
+
readonly fix: "Set hint.reasonField or remove reasonOpenField and reasonTitleField.";
|
|
1200
|
+
};
|
|
1201
|
+
readonly linkParamsWithoutScreenField: {
|
|
1202
|
+
readonly id: "list/link-params-without-screen-field";
|
|
1203
|
+
readonly summary: "linkParamsField only parametrizes the linkScreenField target.";
|
|
1204
|
+
readonly fix: "Set linkScreenField on the column or remove linkParamsField.";
|
|
1205
|
+
};
|
|
1206
|
+
readonly guidanceFieldEmpty: {
|
|
1207
|
+
readonly id: "list/guidance-field-empty";
|
|
1208
|
+
readonly summary: "rowToneField, linkParamsField and the hint field names are non-empty strings.";
|
|
1209
|
+
readonly fix: "Name a row field or remove the option.";
|
|
1210
|
+
};
|
|
1211
|
+
readonly rowDecorationQueryEmpty: {
|
|
1212
|
+
readonly id: "list/row-decoration-query-empty";
|
|
1213
|
+
readonly summary: "rowDecoration.query is a non-empty query QN.";
|
|
1214
|
+
readonly fix: "Name the decoration query or remove rowDecoration.";
|
|
1215
|
+
};
|
|
1216
|
+
readonly rowDecorationIdsMissing: {
|
|
1217
|
+
readonly id: "list/row-decoration-ids-missing";
|
|
1218
|
+
readonly summary: "The rowDecoration query's input schema declares `ids`, the row ids the list sends with every call.";
|
|
1219
|
+
readonly fix: "Add `ids: z.array(z.string())` to the decoration query's schema.";
|
|
1220
|
+
};
|
|
1045
1221
|
}, {
|
|
1046
1222
|
readonly listScreenIdUnresolved: {
|
|
1047
1223
|
readonly id: "list/screen-id-unresolved";
|
|
@@ -1194,6 +1370,31 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
1194
1370
|
readonly summary: "createScreen resolves to a registered screen in the same feature.";
|
|
1195
1371
|
readonly fix: "Point createScreen at a screen of this feature.";
|
|
1196
1372
|
};
|
|
1373
|
+
readonly createPlacementWithoutCreate: {
|
|
1374
|
+
readonly id: "entity-list/create-placement-without-create";
|
|
1375
|
+
readonly summary: 'createPlacement "toolbar" moves the create button, so the list has one (no allowCreate: false).';
|
|
1376
|
+
readonly fix: "Remove createPlacement or drop allowCreate: false.";
|
|
1377
|
+
};
|
|
1378
|
+
readonly toolbarSortWithoutSortOptions: {
|
|
1379
|
+
readonly id: "entity-list/toolbar-sort-without-sort-options";
|
|
1380
|
+
readonly summary: "toolbarSort draws the sortOptions as a select in the filter row, so it needs sortOptions.";
|
|
1381
|
+
readonly fix: "Declare sortOptions or remove toolbarSort.";
|
|
1382
|
+
};
|
|
1383
|
+
readonly narrowFacetsInvalid: {
|
|
1384
|
+
readonly id: "list/narrow-facets-invalid";
|
|
1385
|
+
readonly summary: 'narrowFacets is "pills".';
|
|
1386
|
+
readonly fix: 'Use "pills", or remove narrowFacets.';
|
|
1387
|
+
};
|
|
1388
|
+
readonly toolbarActionsPlacementInvalid: {
|
|
1389
|
+
readonly id: "list/toolbar-actions-placement-invalid";
|
|
1390
|
+
readonly summary: 'toolbarActionsPlacement is "header" or "toolbar".';
|
|
1391
|
+
readonly fix: 'Use "header" or "toolbar", or remove toolbarActionsPlacement.';
|
|
1392
|
+
};
|
|
1393
|
+
readonly toolbarActionsPlacementWithoutActions: {
|
|
1394
|
+
readonly id: "list/toolbar-actions-placement-without-actions";
|
|
1395
|
+
readonly summary: 'toolbarActionsPlacement "toolbar" moves the toolbarActions, so the list declares some.';
|
|
1396
|
+
readonly fix: "Declare toolbarActions or remove toolbarActionsPlacement.";
|
|
1397
|
+
};
|
|
1197
1398
|
readonly configEditFieldsEmpty: {
|
|
1198
1399
|
readonly id: "config-edit/fields-empty";
|
|
1199
1400
|
readonly summary: "A configEdit screen declares at least one field.";
|
|
@@ -1320,6 +1521,26 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
1320
1521
|
readonly summary: "A header.subtitle part navigate names a screen or an entity.";
|
|
1321
1522
|
readonly fix: "Set screen or entity on the part's navigate.";
|
|
1322
1523
|
};
|
|
1524
|
+
readonly guidanceFieldEmpty: {
|
|
1525
|
+
readonly id: "projection-detail/guidance-field-empty";
|
|
1526
|
+
readonly summary: "The field names of breadcrumb, summary, banner, steps and progress are non-empty strings.";
|
|
1527
|
+
readonly fix: "Name a query output field or remove the block.";
|
|
1528
|
+
};
|
|
1529
|
+
readonly progressBesideStepsWithoutSteps: {
|
|
1530
|
+
readonly id: "projection-detail/progress-beside-steps-without-steps";
|
|
1531
|
+
readonly summary: 'progress.placement "beside-steps" needs a steps block to sit next to.';
|
|
1532
|
+
readonly fix: "Add steps to the projectionDetail or remove progress.placement.";
|
|
1533
|
+
};
|
|
1534
|
+
readonly stepsNarrowLimitInvalid: {
|
|
1535
|
+
readonly id: "projection-detail/steps-narrow-limit-invalid";
|
|
1536
|
+
readonly summary: "steps.narrowLimit is a positive integer.";
|
|
1537
|
+
readonly fix: "Set narrowLimit to a whole number of at least 1 or remove it.";
|
|
1538
|
+
};
|
|
1539
|
+
readonly guidanceActionShowOnTabs: {
|
|
1540
|
+
readonly id: "projection-detail/guidance-action-show-on-tabs";
|
|
1541
|
+
readonly summary: "Banner and steps actions set no showOnTabs.";
|
|
1542
|
+
readonly fix: "Remove showOnTabs.";
|
|
1543
|
+
};
|
|
1323
1544
|
readonly extensionContributesToFormSubmit: {
|
|
1324
1545
|
readonly id: "projection-detail/extension-contributes-to-form-submit";
|
|
1325
1546
|
readonly summary: "A projectionDetail extension section does not set contributesToFormSubmit.";
|
|
@@ -1876,6 +2097,11 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
1876
2097
|
readonly summary: "An encrypted text field is not sortable.";
|
|
1877
2098
|
readonly fix: "Drop sortable: true or remove the encryption.";
|
|
1878
2099
|
};
|
|
2100
|
+
readonly sortNullsNeedsSortable: {
|
|
2101
|
+
readonly id: "entity/sort-nulls-needs-sortable";
|
|
2102
|
+
readonly summary: "A field with sortNulls is sortable.";
|
|
2103
|
+
readonly fix: "Add sortable: true or drop sortNulls.";
|
|
2104
|
+
};
|
|
1879
2105
|
readonly encryptedFilterable: {
|
|
1880
2106
|
readonly id: "entity/encrypted-filterable";
|
|
1881
2107
|
readonly summary: "An encrypted text field is not filterable.";
|
|
@@ -2135,6 +2361,11 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
2135
2361
|
readonly summary: "The boolean table switches (rememberState, columnPicker, pinning, ...) are booleans.";
|
|
2136
2362
|
readonly fix: "Set the table option to true or false.";
|
|
2137
2363
|
};
|
|
2364
|
+
readonly frameInvalid: {
|
|
2365
|
+
readonly id: "list-table/frame-invalid";
|
|
2366
|
+
readonly summary: "table.frame is one of the known frames.";
|
|
2367
|
+
readonly fix: 'Use "card" or remove table.frame.';
|
|
2368
|
+
};
|
|
2138
2369
|
readonly densityNotObject: {
|
|
2139
2370
|
readonly id: "list-table/density-not-object";
|
|
2140
2371
|
readonly summary: "table.density is an object.";
|
|
@@ -2207,12 +2438,12 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
2207
2438
|
};
|
|
2208
2439
|
readonly columnWidthInvalid: {
|
|
2209
2440
|
readonly id: "list-table/column-width-invalid";
|
|
2210
|
-
readonly summary: "A column's width and minWidth are finite pixel counts greater than 0.";
|
|
2211
|
-
readonly fix: "Set a positive finite number or remove the option.";
|
|
2441
|
+
readonly summary: "A column's width and minWidth are finite pixel counts greater than 0 and at most 2000.";
|
|
2442
|
+
readonly fix: "Set a positive finite number up to 2000 or remove the option.";
|
|
2212
2443
|
};
|
|
2213
2444
|
readonly columnWidthWithoutResizing: {
|
|
2214
2445
|
readonly id: "list-table/column-width-without-resizing";
|
|
2215
|
-
readonly summary: "A column's width or minWidth needs table.resizing, otherwise it has no effect.";
|
|
2446
|
+
readonly summary: "A column's width or minWidth needs table.resizing, otherwise it has no effect; a hint column is exempt.";
|
|
2216
2447
|
readonly fix: "Set table: { resizing: true } or remove width and minWidth from the column.";
|
|
2217
2448
|
};
|
|
2218
2449
|
readonly columnMinWidthExceedsWidth: {
|
|
@@ -2237,8 +2468,8 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
2237
2468
|
};
|
|
2238
2469
|
readonly bundledListsScreenOnlyKey: {
|
|
2239
2470
|
readonly id: "bundled-lists/screen-only-table-key";
|
|
2240
|
-
readonly summary: "bundledLists.table leaves out grouping and
|
|
2241
|
-
readonly fix: "Set grouping and
|
|
2471
|
+
readonly summary: "bundledLists.table leaves out grouping, totals and summaryRow, which depend on one list's fields or query.";
|
|
2472
|
+
readonly fix: "Set grouping, totals and summaryRow in the table block of the individual screen.";
|
|
2242
2473
|
};
|
|
2243
2474
|
readonly bundledListsPinFirstColumnNotBoolean: {
|
|
2244
2475
|
readonly id: "bundled-lists/pin-first-column-not-boolean";
|
|
@@ -2437,6 +2668,47 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
2437
2668
|
readonly summary: "An entityList expandableRow declares no bulkActions.";
|
|
2438
2669
|
readonly fix: "Put bulkActions on the entityList screen itself.";
|
|
2439
2670
|
};
|
|
2671
|
+
}, {
|
|
2672
|
+
readonly sortOptionNotSortable: {
|
|
2673
|
+
readonly id: "list/sort-option-not-sortable";
|
|
2674
|
+
readonly summary: "Every sortOptions field is a listed, sortable column (entityList); a projectionList's query takes sort and sortDirection and, when sort is an enum, lists every option field.";
|
|
2675
|
+
readonly fix: "Mark the field sortable and list it as a column, or give the projectionList's query sort and sortDirection parameters that accept the option fields.";
|
|
2676
|
+
};
|
|
2677
|
+
readonly sortOptionsInvalid: {
|
|
2678
|
+
readonly id: "list/sort-options-invalid";
|
|
2679
|
+
readonly summary: "sortOptions is not empty and lists each field and dir once.";
|
|
2680
|
+
readonly fix: "Remove sortOptions, or list each field and dir pair once.";
|
|
2681
|
+
};
|
|
2682
|
+
readonly sortOptionsDefaultNotListed: {
|
|
2683
|
+
readonly id: "list/sort-options-default-not-listed";
|
|
2684
|
+
readonly summary: "A defaultSort is one of the sortOptions, so the select opens on an entry.";
|
|
2685
|
+
readonly fix: "Add the defaultSort field and dir to sortOptions or change defaultSort.";
|
|
2686
|
+
};
|
|
2687
|
+
readonly summaryRowShape: {
|
|
2688
|
+
readonly id: "list/summary-row-shape";
|
|
2689
|
+
readonly summary: "table.summaryRow is an object with a query string and optional params object.";
|
|
2690
|
+
readonly fix: 'Write table.summaryRow as { query: "feature:query:order:summary" }.';
|
|
2691
|
+
};
|
|
2692
|
+
readonly summaryRowQueryUnknown: {
|
|
2693
|
+
readonly id: "list/summary-row-query-unknown";
|
|
2694
|
+
readonly summary: "table.summaryRow.query names a registered query handler.";
|
|
2695
|
+
readonly fix: "Use the qualified name of a query handler (feature:query:name) or remove summaryRow.";
|
|
2696
|
+
};
|
|
2697
|
+
readonly summaryRowQueryAcceptsListKeys: {
|
|
2698
|
+
readonly id: "list/summary-row-query-accepts-list-keys";
|
|
2699
|
+
readonly summary: "The summaryRow query's Zod schema accepts every list key the screen sends (search, namedFilter, filters).";
|
|
2700
|
+
readonly fix: "Add the missing keys to the query schema (or reuse the list query's filter shape) and apply them, or drop the feature on the screen.";
|
|
2701
|
+
};
|
|
2702
|
+
readonly summaryRowWithTotals: {
|
|
2703
|
+
readonly id: "list/summary-row-with-totals";
|
|
2704
|
+
readonly summary: "A table sets summaryRow or totals, not both; two footers under one table read as two answers.";
|
|
2705
|
+
readonly fix: "Drop totals and put the figures into the summary query, or drop summaryRow.";
|
|
2706
|
+
};
|
|
2707
|
+
readonly summaryRowOnRelatedList: {
|
|
2708
|
+
readonly id: "list/summary-row-on-related-list";
|
|
2709
|
+
readonly summary: "A relatedList section or expandableRow sets no table.summaryRow; only entityList and projectionList screens have a list payload to carry it.";
|
|
2710
|
+
readonly fix: "Remove summaryRow from the relatedList, or put the summary on the list screen itself.";
|
|
2711
|
+
};
|
|
2440
2712
|
}, {
|
|
2441
2713
|
readonly notArray: {
|
|
2442
2714
|
readonly id: "list-bulk/not-array";
|
|
@@ -2561,16 +2833,6 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
2561
2833
|
readonly summary: "A required config key has no non-empty default, otherwise it can never be unset and readiness never flags it.";
|
|
2562
2834
|
readonly fix: 'Use default "" or drop required.';
|
|
2563
2835
|
};
|
|
2564
|
-
readonly perRequestText: {
|
|
2565
|
-
readonly id: "config-key/per-request-text";
|
|
2566
|
-
readonly summary: 'A config key of type "text" does not set allowPerRequest (XSS/injection risk).';
|
|
2567
|
-
readonly fix: "Remove allowPerRequest or change the key type.";
|
|
2568
|
-
};
|
|
2569
|
-
readonly perRequestEncrypted: {
|
|
2570
|
-
readonly id: "config-key/per-request-encrypted";
|
|
2571
|
-
readonly summary: 'A config key with encrypted/backing="secrets" does not set allowPerRequest.';
|
|
2572
|
-
readonly fix: "Remove allowPerRequest or the secrets storage from the key.";
|
|
2573
|
-
};
|
|
2574
2836
|
readonly conditionalOptions: {
|
|
2575
2837
|
readonly id: "config-key/conditional-options";
|
|
2576
2838
|
readonly summary: "A config key does not declare conditionalOptions, which only entity select fields support.";
|
|
@@ -2596,11 +2858,6 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
2596
2858
|
readonly summary: "A config key declares either static options or optionsQuery, not both.";
|
|
2597
2859
|
readonly fix: "Remove options or optionsQuery.";
|
|
2598
2860
|
};
|
|
2599
|
-
readonly optionsQueryPerRequest: {
|
|
2600
|
-
readonly id: "config-key/options-query-per-request";
|
|
2601
|
-
readonly summary: "A config key with optionsQuery does not set allowPerRequest, which would bypass the option set unchecked.";
|
|
2602
|
-
readonly fix: "Remove allowPerRequest or optionsQuery.";
|
|
2603
|
-
};
|
|
2604
2861
|
readonly optionsQueryPayloadSelfReference: {
|
|
2605
2862
|
readonly id: "config-key/options-query-payload-self-reference";
|
|
2606
2863
|
readonly summary: "A config key's optionsQueryPayload does not reference the key itself.";
|
|
@@ -2667,6 +2924,11 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
2667
2924
|
readonly summary: "Query handlers on an entity with parentRef carry the entity-convention brand, so the parent-ref read-gate applies.";
|
|
2668
2925
|
readonly fix: "Register the handler via defineEntityListHandler/defineEntityDetailHandler, or pass parentVisibility to the executor.";
|
|
2669
2926
|
};
|
|
2927
|
+
readonly parentRefHandWrittenWrite: {
|
|
2928
|
+
readonly id: "parent-ref/hand-written-write-handler";
|
|
2929
|
+
readonly summary: "Update/delete/restore handlers on an entity with parentRef carry the entity-convention brand, so the parent visibility gate applies.";
|
|
2930
|
+
readonly fix: "Register the handler via defineEntityWriteHandler, or pass parentVisibility: parentVisibilityFor(ctx, event.user) to the executor.";
|
|
2931
|
+
};
|
|
2670
2932
|
readonly readGateWithParentRef: {
|
|
2671
2933
|
readonly id: "read-gate/with-parent-ref";
|
|
2672
2934
|
readonly summary: "An entity with readGate does not also declare parentRef.";
|
|
@@ -3441,6 +3703,11 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
3441
3703
|
readonly summary: "Webhook event payloads are Zod object schemas.";
|
|
3442
3704
|
readonly fix: "Pass z.object({ ... }) as payload.";
|
|
3443
3705
|
};
|
|
3706
|
+
readonly payloadOpenShape: {
|
|
3707
|
+
readonly id: "webhook-event/payload-open-shape";
|
|
3708
|
+
readonly summary: "Webhook event payload objects are closed; undeclared keys must be stripped.";
|
|
3709
|
+
readonly fix: "Replace looseObject/passthrough/catchall with z.object({ ... }) and declare every field.";
|
|
3710
|
+
};
|
|
3444
3711
|
readonly versionInvalid: {
|
|
3445
3712
|
readonly id: "webhook-event/version-invalid";
|
|
3446
3713
|
readonly summary: "Webhook event version is a positive integer.";
|
|
@@ -29,6 +29,8 @@ import { HANDLER_FIELD_REFERENCE_RULES } from "./handler-field-references-rules.
|
|
|
29
29
|
import { I18N_RULES } from "./i18n-keys-rules.js";
|
|
30
30
|
import { LIST_BULK_ACTION_RULES } from "./list-bulk-actions-rules.js";
|
|
31
31
|
import { LIST_QUERY_RULES } from "./list-query-rules.js";
|
|
32
|
+
import { LIST_ROW_GUIDANCE_RULES } from "./list-row-guidance-rules.js";
|
|
33
|
+
import { LIST_SORT_SUMMARY_RULES } from "./list-sort-summary-rules.js";
|
|
32
34
|
import { LIST_TABLE_AGGREGATE_RULES } from "./list-table-aggregate-rules.js";
|
|
33
35
|
import { LIST_TABLE_RULES } from "./list-table-rules.js";
|
|
34
36
|
import { NAMED_FILTER_RULES } from "./named-filter-rules.js";
|
|
@@ -59,6 +61,7 @@ export const FRAMEWORK_BOOT_RULE_TABLES = [
|
|
|
59
61
|
DASHBOARD_CHART_RULES,
|
|
60
62
|
FORM_FIELD_RULES,
|
|
61
63
|
FORM_LAYOUT_RULES,
|
|
64
|
+
LIST_ROW_GUIDANCE_RULES,
|
|
62
65
|
LIST_SCREEN_RULES,
|
|
63
66
|
SCREEN_KIND_RULES,
|
|
64
67
|
PROJECTION_DETAIL_RULES,
|
|
@@ -74,6 +77,7 @@ export const FRAMEWORK_BOOT_RULE_TABLES = [
|
|
|
74
77
|
LIST_TABLE_RULES,
|
|
75
78
|
LIST_TABLE_AGGREGATE_RULES,
|
|
76
79
|
LIST_QUERY_RULES,
|
|
80
|
+
LIST_SORT_SUMMARY_RULES,
|
|
77
81
|
LIST_BULK_ACTION_RULES,
|
|
78
82
|
QUERY_RULES,
|
|
79
83
|
BOOT_ENVIRONMENT_RULES,
|
|
@@ -4,8 +4,8 @@ import { bootRuleError } from "./boot-rule.js";
|
|
|
4
4
|
import { validateListTableOptions } from "./list-table-options.js";
|
|
5
5
|
import { LIST_TABLE_RULES } from "./list-table-rules.js";
|
|
6
6
|
export const BUNDLED_LISTS_OPTION_KEYS = ["table", "pinFirstColumn"];
|
|
7
|
-
// grouping and totals name fields of one list, so they cannot be shared across lists
|
|
8
|
-
const SCREEN_ONLY_TABLE_KEYS = ["grouping", "totals"];
|
|
7
|
+
// grouping and totals name fields; summaryRow names a query of one list, so they cannot be shared across lists
|
|
8
|
+
const SCREEN_ONLY_TABLE_KEYS = ["grouping", "totals", "summaryRow"];
|
|
9
9
|
export function validateBundledListsOptions(options) {
|
|
10
10
|
if (!isPlainObject(options)) {
|
|
11
11
|
throw bootRuleError(LIST_TABLE_RULES.bundledListsNotObject, {
|
|
@@ -3,7 +3,6 @@ export declare function warnOnToggleableDependencies(features: readonly FeatureD
|
|
|
3
3
|
export declare function validateConfigKeyBounds(feature: FeatureDefinition): void;
|
|
4
4
|
export declare function validateConfigKeyComputed(feature: FeatureDefinition): void;
|
|
5
5
|
export declare function validateConfigKeyRequired(feature: FeatureDefinition): void;
|
|
6
|
-
export declare function validateConfigKeyAllowPerRequest(feature: FeatureDefinition): void;
|
|
7
6
|
export declare function validateConfigKeyOptionsQuery(feature: FeatureDefinition): void;
|
|
8
7
|
export declare function validateConfigKeyBacking(feature: FeatureDefinition): void;
|
|
9
8
|
export declare function validateConfigKeyPiiEncrypted(feature: FeatureDefinition): void;
|
|
@@ -100,29 +100,6 @@ export function validateConfigKeyRequired(feature) {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
// --- Config key allowPerRequest compatibility ---
|
|
104
|
-
export function validateConfigKeyAllowPerRequest(feature) {
|
|
105
|
-
for (const [keyName, keyDef] of Object.entries(feature.configKeys)) {
|
|
106
|
-
if (!keyDef.allowPerRequest)
|
|
107
|
-
continue;
|
|
108
|
-
// text is hard-locked against per-request — the helper refuses
|
|
109
|
-
// anyway, but declaring allowPerRequest on a text key is a
|
|
110
|
-
// misconfiguration that should fail loudly at boot.
|
|
111
|
-
if (keyDef.type === "text") {
|
|
112
|
-
throw bootRuleError(CONFIG_KEY_RULES.perRequestText, {
|
|
113
|
-
message: `[Feature ${feature.name}] Config key "${keyName}" has allowPerRequest=true but type="text" — text keys are permanently ineligible for per-request overrides (XSS/injection risk). Remove allowPerRequest or change the key type.`,
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
// encrypted + per-request would expose a cipher-text interpretation
|
|
117
|
-
// to query-strings. The secret-value shouldn't be transported this
|
|
118
|
-
// way — reject as a paradigm-mismatch.
|
|
119
|
-
if (isEncryptedAtRest(keyDef)) {
|
|
120
|
-
throw bootRuleError(CONFIG_KEY_RULES.perRequestEncrypted, {
|
|
121
|
-
message: `[Feature ${feature.name}] Config key "${keyName}" has allowPerRequest=true but encrypted/backing="secrets" — secret values may not be set via query-params`,
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
103
|
// --- Config key optionsQuery compatibility ---
|
|
127
104
|
export function validateConfigKeyOptionsQuery(feature) {
|
|
128
105
|
for (const [keyName, keyDef] of Object.entries(feature.configKeys)) {
|
|
@@ -155,11 +132,6 @@ export function validateConfigKeyOptionsQuery(feature) {
|
|
|
155
132
|
message: `${prefix} declares both options and optionsQuery — pick one`,
|
|
156
133
|
});
|
|
157
134
|
}
|
|
158
|
-
if (keyDef.allowPerRequest) {
|
|
159
|
-
throw bootRuleError(CONFIG_KEY_RULES.optionsQueryPerRequest, {
|
|
160
|
-
message: `${prefix} has optionsQuery AND allowPerRequest=true — a per-request value would bypass the option set unchecked`,
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
135
|
validateOptionsQueryKeyRefs(feature, keyName, keyDef);
|
|
164
136
|
}
|
|
165
137
|
}
|
|
@@ -34,16 +34,6 @@ export declare const CONFIG_KEY_RULES: {
|
|
|
34
34
|
readonly summary: "A required config key has no non-empty default, otherwise it can never be unset and readiness never flags it.";
|
|
35
35
|
readonly fix: 'Use default "" or drop required.';
|
|
36
36
|
};
|
|
37
|
-
readonly perRequestText: {
|
|
38
|
-
readonly id: "config-key/per-request-text";
|
|
39
|
-
readonly summary: 'A config key of type "text" does not set allowPerRequest (XSS/injection risk).';
|
|
40
|
-
readonly fix: "Remove allowPerRequest or change the key type.";
|
|
41
|
-
};
|
|
42
|
-
readonly perRequestEncrypted: {
|
|
43
|
-
readonly id: "config-key/per-request-encrypted";
|
|
44
|
-
readonly summary: 'A config key with encrypted/backing="secrets" does not set allowPerRequest.';
|
|
45
|
-
readonly fix: "Remove allowPerRequest or the secrets storage from the key.";
|
|
46
|
-
};
|
|
47
37
|
readonly conditionalOptions: {
|
|
48
38
|
readonly id: "config-key/conditional-options";
|
|
49
39
|
readonly summary: "A config key does not declare conditionalOptions, which only entity select fields support.";
|
|
@@ -69,11 +59,6 @@ export declare const CONFIG_KEY_RULES: {
|
|
|
69
59
|
readonly summary: "A config key declares either static options or optionsQuery, not both.";
|
|
70
60
|
readonly fix: "Remove options or optionsQuery.";
|
|
71
61
|
};
|
|
72
|
-
readonly optionsQueryPerRequest: {
|
|
73
|
-
readonly id: "config-key/options-query-per-request";
|
|
74
|
-
readonly summary: "A config key with optionsQuery does not set allowPerRequest, which would bypass the option set unchecked.";
|
|
75
|
-
readonly fix: "Remove allowPerRequest or optionsQuery.";
|
|
76
|
-
};
|
|
77
62
|
readonly optionsQueryPayloadSelfReference: {
|
|
78
63
|
readonly id: "config-key/options-query-payload-self-reference";
|
|
79
64
|
readonly summary: "A config key's optionsQueryPayload does not reference the key itself.";
|
|
@@ -34,16 +34,6 @@ export const CONFIG_KEY_RULES = {
|
|
|
34
34
|
summary: "A required config key has no non-empty default, otherwise it can never be unset and readiness never flags it.",
|
|
35
35
|
fix: 'Use default "" or drop required.',
|
|
36
36
|
},
|
|
37
|
-
perRequestText: {
|
|
38
|
-
id: "config-key/per-request-text",
|
|
39
|
-
summary: 'A config key of type "text" does not set allowPerRequest (XSS/injection risk).',
|
|
40
|
-
fix: "Remove allowPerRequest or change the key type.",
|
|
41
|
-
},
|
|
42
|
-
perRequestEncrypted: {
|
|
43
|
-
id: "config-key/per-request-encrypted",
|
|
44
|
-
summary: 'A config key with encrypted/backing="secrets" does not set allowPerRequest.',
|
|
45
|
-
fix: "Remove allowPerRequest or the secrets storage from the key.",
|
|
46
|
-
},
|
|
47
37
|
conditionalOptions: {
|
|
48
38
|
id: "config-key/conditional-options",
|
|
49
39
|
summary: "A config key does not declare conditionalOptions, which only entity select fields support.",
|
|
@@ -69,11 +59,6 @@ export const CONFIG_KEY_RULES = {
|
|
|
69
59
|
summary: "A config key declares either static options or optionsQuery, not both.",
|
|
70
60
|
fix: "Remove options or optionsQuery.",
|
|
71
61
|
},
|
|
72
|
-
optionsQueryPerRequest: {
|
|
73
|
-
id: "config-key/options-query-per-request",
|
|
74
|
-
summary: "A config key with optionsQuery does not set allowPerRequest, which would bypass the option set unchecked.",
|
|
75
|
-
fix: "Remove allowPerRequest or optionsQuery.",
|
|
76
|
-
},
|
|
77
62
|
optionsQueryPayloadSelfReference: {
|
|
78
63
|
id: "config-key/options-query-payload-self-reference",
|
|
79
64
|
summary: "A config key's optionsQueryPayload does not reference the key itself.",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { EntityListScreenDefinition, ProjectionListScreenDefinition } from "@cosmicdrift/kumiko-types/screen";
|
|
2
|
+
import type { FeatureDefinition } from "../types/index.ts";
|
|
3
|
+
export type ListTarget = {
|
|
4
|
+
readonly feature: FeatureDefinition;
|
|
5
|
+
readonly screen: EntityListScreenDefinition | ProjectionListScreenDefinition;
|
|
6
|
+
};
|
|
7
|
+
export type DashboardScreenTarget = {
|
|
8
|
+
readonly kind: "list";
|
|
9
|
+
readonly target: ListTarget;
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: "custom";
|
|
12
|
+
readonly screenId: string;
|
|
13
|
+
} | {
|
|
14
|
+
readonly kind: "other";
|
|
15
|
+
readonly qn: string;
|
|
16
|
+
readonly screenId: string;
|
|
17
|
+
} | {
|
|
18
|
+
readonly kind: "unresolved";
|
|
19
|
+
readonly qn: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function resolveDashboardScreenTarget(featureName: string, screenRef: string, featureMap: ReadonlyMap<string, FeatureDefinition>): DashboardScreenTarget;
|
|
22
|
+
export declare function declaredNamedFilterIds(target: ListTarget): ReadonlySet<string>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { resolveScreenTargetQn } from "./screens-actions.js";
|
|
2
|
+
// One resolver for every dashboard link-like option (stat navigate, list footerLink, stat-group
|
|
3
|
+
// link), so they agree on what a screen reference points at.
|
|
4
|
+
export function resolveDashboardScreenTarget(featureName, screenRef, featureMap) {
|
|
5
|
+
const qn = resolveScreenTargetQn(featureName, screenRef);
|
|
6
|
+
const [targetFeatureName = "", , targetShortId = ""] = qn.split(":");
|
|
7
|
+
const feature = featureMap.get(targetFeatureName);
|
|
8
|
+
const screen = feature?.screens[targetShortId];
|
|
9
|
+
if (feature === undefined || screen === undefined)
|
|
10
|
+
return { kind: "unresolved", qn };
|
|
11
|
+
if (screen.type === "custom")
|
|
12
|
+
return { kind: "custom", screenId: screen.id };
|
|
13
|
+
if (screen.type !== "entityList" && screen.type !== "projectionList") {
|
|
14
|
+
return { kind: "other", qn, screenId: screen.id };
|
|
15
|
+
}
|
|
16
|
+
return { kind: "list", target: { feature, screen } };
|
|
17
|
+
}
|
|
18
|
+
export function declaredNamedFilterIds(target) {
|
|
19
|
+
return new Set((target.screen.namedFilters ?? []).map((ref) => ref.id));
|
|
20
|
+
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { FeatureDefinition } from "../types/index.ts";
|
|
2
|
+
export declare function validateNavigateParams(where: string, params: Readonly<Record<string, unknown>> | undefined): void;
|
|
2
3
|
export declare function validateDashboardStatNavigate(features: readonly FeatureDefinition[]): void;
|