@cosmicdrift/kumiko-samples 0.363.0 → 0.365.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/LICENSE +1 -1
- package/package.json +1 -1
- package/packages/bundled-features/package.json +7 -1
- package/packages/bundled-features/src/audit/changes.json +18 -0
- package/packages/bundled-features/src/audit/feature.ts +1 -1
- package/packages/bundled-features/src/audit/handlers/list.query.ts +10 -5
- package/packages/bundled-features/src/audit/run-escape-hatch-retention.ts +63 -11
- package/packages/bundled-features/src/auth-email-password/bootstrap.ts +30 -11
- package/packages/bundled-features/src/auth-email-password/changes.json +55 -0
- package/packages/bundled-features/src/auth-email-password/email-rate-limits.ts +16 -0
- package/packages/bundled-features/src/auth-email-password/feature.ts +4 -7
- package/packages/bundled-features/src/auth-email-password/handlers/change-password.write.ts +6 -2
- package/packages/bundled-features/src/auth-email-password/handlers/invite-accept-with-login.write.ts +2 -3
- package/packages/bundled-features/src/auth-email-password/handlers/invite-create.write.ts +6 -4
- package/packages/bundled-features/src/auth-email-password/handlers/logout.write.ts +7 -2
- package/packages/bundled-features/src/auth-email-password/handlers/signup-request.write.ts +2 -1
- package/packages/bundled-features/src/auth-email-password/handlers/switch-tenant-mfa-gate.write.ts +2 -2
- package/packages/bundled-features/src/auth-email-password/handlers/token-request-handler.ts +2 -1
- package/packages/bundled-features/src/auth-email-password/magic-link-mail.ts +7 -3
- package/packages/bundled-features/src/auth-email-password/mail-i18n.ts +10 -0
- package/packages/bundled-features/src/auth-email-password/web/auth-gate.tsx +24 -5
- package/packages/bundled-features/src/billing-foundation/changes.json +48 -0
- package/packages/bundled-features/src/billing-foundation/consumer-protection/confirmation-mail.ts +57 -5
- package/packages/bundled-features/src/billing-foundation/consumer-protection/consent-gate.ts +22 -1
- package/packages/bundled-features/src/billing-foundation/consumer-protection/mail-notifications.ts +4 -1
- package/packages/bundled-features/src/billing-foundation/consumer-protection/register-termination.ts +11 -1
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-mail.ts +9 -3
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-receipt-limit.ts +41 -0
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-record.ts +18 -2
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-request.ts +35 -19
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-texts.ts +9 -0
- package/packages/bundled-features/src/billing-foundation/consumer-protection/withdrawal-period.ts +35 -0
- package/packages/bundled-features/src/billing-foundation/handlers/create-checkout-session.write.ts +11 -3
- package/packages/bundled-features/src/billing-foundation/handlers/process-event.write.ts +10 -4
- package/packages/bundled-features/src/billing-foundation/i18n.ts +9 -0
- package/packages/bundled-features/src/billing-foundation/subscription-tier-sync.ts +27 -7
- package/packages/bundled-features/src/billing-foundation/types.ts +7 -2
- package/packages/bundled-features/src/cap-counter/book-cap-usage.ts +20 -8
- package/packages/bundled-features/src/cap-counter/calendar-cap-usage-reservation.ts +2 -0
- package/packages/bundled-features/src/cap-counter/cap-reservation.ts +7 -2
- package/packages/bundled-features/src/cap-counter/changes.json +19 -0
- package/packages/bundled-features/src/cap-counter/enforce-cap.ts +75 -5
- package/packages/bundled-features/src/cap-counter/handlers/increment-rolling.write.ts +2 -0
- package/packages/bundled-features/src/cap-counter/index.ts +1 -0
- package/packages/bundled-features/src/cap-counter/with-cap-enforcement.ts +3 -0
- package/packages/bundled-features/src/cap-overview/changes.json +6 -0
- package/packages/bundled-features/src/cap-overview/handlers/tenant-caps-list.query.ts +2 -1
- package/packages/bundled-features/src/cap-overview/handlers/tenant-options.query.ts +2 -1
- package/packages/bundled-features/src/channel-discord/discord-channel.ts +4 -2
- package/packages/bundled-features/src/channel-email/changes.json +18 -0
- package/packages/bundled-features/src/channel-email/email-channel.ts +47 -24
- package/packages/bundled-features/src/channel-email/smtp-transport.ts +7 -1
- package/packages/bundled-features/src/channel-slack/slack-channel.ts +4 -2
- package/packages/bundled-features/src/channel-teams/teams-channel.ts +4 -2
- package/packages/bundled-features/src/config/changes.json +6 -0
- package/packages/bundled-features/src/config/handlers/set.write.ts +2 -2
- package/packages/bundled-features/src/config/resolver.ts +15 -12
- package/packages/bundled-features/src/config/write-helpers.ts +23 -0
- package/packages/bundled-features/src/crypto-shredding/changes.json +6 -0
- package/packages/bundled-features/src/crypto-shredding/handlers/forget-subject.write.ts +54 -27
- package/packages/bundled-features/src/custom-fields/changes.json +6 -0
- package/packages/bundled-features/src/custom-fields/db/queries/retention.ts +2 -2
- package/packages/bundled-features/src/custom-fields/handlers/update-tenant-field.write.ts +0 -1
- package/packages/bundled-features/src/data-retention/run-retention-cleanup.ts +4 -5
- package/packages/bundled-features/src/delivery/attachment-ref.ts +39 -1
- package/packages/bundled-features/src/delivery/changes.json +30 -0
- package/packages/bundled-features/src/delivery/channel-context.ts +31 -8
- package/packages/bundled-features/src/delivery/delivery-service.ts +93 -92
- package/packages/bundled-features/src/delivery/index.ts +2 -0
- package/packages/bundled-features/src/delivery/jobs.ts +51 -14
- package/packages/bundled-features/src/delivery/types.ts +7 -1
- package/packages/bundled-features/src/document-ingest-foundation/changes.json +6 -0
- package/packages/bundled-features/src/feature-toggles/changes.json +7 -0
- package/packages/bundled-features/src/feature-toggles/toggle-runtime.ts +26 -12
- package/packages/bundled-features/src/file-derivatives/handlers/public-variant.query.ts +1 -1
- package/packages/bundled-features/src/file-foundation/changes.json +6 -0
- package/packages/bundled-features/src/file-foundation/read-file-ref-content.ts +6 -3
- package/packages/bundled-features/src/files-tenant-data/changes.json +6 -0
- package/packages/bundled-features/src/files-tenant-data/hooks.ts +4 -0
- package/packages/bundled-features/src/files-tenant-data/index.ts +3 -1
- package/packages/bundled-features/src/form-draft/db/queries/owned-file-refs.ts +12 -3
- package/packages/bundled-features/src/form-draft/handlers/discard.write.ts +1 -1
- package/packages/bundled-features/src/inbound-mail-foundation/changes.json +6 -0
- package/packages/bundled-features/src/inbound-mail-foundation/oauth-access-token.ts +13 -8
- package/packages/bundled-features/src/inbound-mail-foundation/watch-supervisor.ts +3 -1
- package/packages/bundled-features/src/jobs/changes.json +31 -0
- package/packages/bundled-features/src/jobs/db/queries/stale-run-sweep.ts +12 -4
- package/packages/bundled-features/src/jobs/feature.ts +7 -4
- package/packages/bundled-features/src/jobs/handlers/list.query.ts +3 -1
- package/packages/bundled-features/src/jobs/handlers/stale-run-sweep.job.ts +5 -2
- package/packages/bundled-features/src/jobs/job-run-logger.ts +56 -18
- package/packages/bundled-features/src/jobs/tenant-job-run-table.ts +7 -2
- package/packages/bundled-features/src/ledger/changes.json +7 -0
- package/packages/bundled-features/src/ledger/entity.ts +3 -1
- package/packages/bundled-features/src/metrics/changes.json +6 -0
- package/packages/bundled-features/src/metrics/filters.ts +28 -12
- package/packages/bundled-features/src/personal-access-tokens/changes.json +6 -0
- package/packages/bundled-features/src/personal-access-tokens/revoke-for-user.ts +7 -8
- package/packages/bundled-features/src/renderer-foundation/types.ts +2 -0
- package/packages/bundled-features/src/renderer-pdf/changes.json +12 -0
- package/packages/bundled-features/src/renderer-pdf/render-table-pdf.ts +162 -82
- package/packages/bundled-features/src/secrets/changes.json +12 -0
- package/packages/bundled-features/src/secrets/feature.ts +4 -3
- package/packages/bundled-features/src/secrets/handlers/delete.write.ts +3 -1
- package/packages/bundled-features/src/secrets/secrets-context.ts +23 -3
- package/packages/bundled-features/src/secrets/write-gate.ts +8 -2
- package/packages/bundled-features/src/shared/changes.json +6 -0
- package/packages/bundled-features/src/shared/chunked-entity-migration.ts +4 -1
- package/packages/bundled-features/src/shared/index.ts +8 -0
- package/packages/bundled-features/src/shared/mail-template-body.ts +17 -0
- package/packages/bundled-features/src/shared/resource-image-formats.ts +31 -0
- package/packages/bundled-features/src/shared/sharp-input-limits.ts +7 -8
- package/packages/bundled-features/src/step-dispatcher/webhook-runner.ts +2 -2
- package/packages/bundled-features/src/subscription-stripe/changes.json +6 -0
- package/packages/bundled-features/src/subscription-stripe/plugin-methods.ts +19 -11
- package/packages/bundled-features/src/subscription-stripe/verify-webhook.ts +3 -1
- package/packages/bundled-features/src/template-resolver/README.md +4 -2
- package/packages/bundled-features/src/template-resolver/api.ts +3 -2
- package/packages/bundled-features/src/template-resolver/changes.json +149 -0
- package/packages/bundled-features/src/template-resolver/compile-document-body.ts +148 -18
- package/packages/bundled-features/src/template-resolver/compile-steps-block.ts +68 -0
- package/packages/bundled-features/src/template-resolver/constants.ts +23 -3
- package/packages/bundled-features/src/template-resolver/document-sanitizer.ts +3 -0
- package/packages/bundled-features/src/template-resolver/document-schema.ts +33 -5
- package/packages/bundled-features/src/template-resolver/document-steps.ts +114 -0
- package/packages/bundled-features/src/template-resolver/feature.ts +16 -1
- package/packages/bundled-features/src/template-resolver/handlers/bundle-import.ts +81 -39
- package/packages/bundled-features/src/template-resolver/handlers/collection-set.write.ts +4 -3
- package/packages/bundled-features/src/template-resolver/handlers/copy-locale.write.ts +121 -53
- package/packages/bundled-features/src/template-resolver/handlers/diff-to-system.query.ts +6 -44
- package/packages/bundled-features/src/template-resolver/handlers/discard-draft.write.ts +52 -0
- package/packages/bundled-features/src/template-resolver/handlers/export-bundle.query.ts +56 -1
- package/packages/bundled-features/src/template-resolver/handlers/find-by-id.query.ts +6 -3
- package/packages/bundled-features/src/template-resolver/handlers/import-bundle-system.write.ts +25 -15
- package/packages/bundled-features/src/template-resolver/handlers/import-bundle.write.ts +12 -1
- package/packages/bundled-features/src/template-resolver/handlers/layout-source.query.ts +73 -30
- package/packages/bundled-features/src/template-resolver/handlers/list.query.ts +14 -11
- package/packages/bundled-features/src/template-resolver/handlers/override-diff.ts +49 -0
- package/packages/bundled-features/src/template-resolver/handlers/overview.query.ts +102 -19
- package/packages/bundled-features/src/template-resolver/handlers/resource-upload.write.ts +49 -10
- package/packages/bundled-features/src/template-resolver/handlers/send-test.write.ts +39 -10
- package/packages/bundled-features/src/template-resolver/handlers/template-gates.ts +14 -2
- package/packages/bundled-features/src/template-resolver/handlers/template-write.ts +54 -4
- package/packages/bundled-features/src/template-resolver/handlers/tenant-overrides.query.ts +96 -14
- package/packages/bundled-features/src/template-resolver/handlers/toggle-status.write.ts +51 -24
- package/packages/bundled-features/src/template-resolver/handlers/upsert-tenant.write.ts +1 -1
- package/packages/bundled-features/src/template-resolver/handlers/usage.query.ts +16 -2
- package/packages/bundled-features/src/template-resolver/handlers/validate.query.ts +4 -1
- package/packages/bundled-features/src/template-resolver/index.ts +18 -2
- package/packages/bundled-features/src/template-resolver/layout-appearance.ts +56 -0
- package/packages/bundled-features/src/template-resolver/mail-constants.ts +4 -0
- package/packages/bundled-features/src/template-resolver/pdf-constants.ts +12 -0
- package/packages/bundled-features/src/template-resolver/qualified-names.ts +4 -0
- package/packages/bundled-features/src/template-resolver/resource-image.ts +9 -16
- package/packages/bundled-features/src/template-resolver/seeding.ts +27 -4
- package/packages/bundled-features/src/template-resolver/store-template-resource.ts +390 -124
- package/packages/bundled-features/src/template-resolver/table.ts +13 -1
- package/packages/bundled-features/src/template-resolver/template-bundle.ts +4 -0
- package/packages/bundled-features/src/template-resolver/template-draft.ts +106 -0
- package/packages/bundled-features/src/template-resolver/template-meta.ts +95 -24
- package/packages/bundled-features/src/template-resolver/template-preview.ts +160 -57
- package/packages/bundled-features/src/template-resolver/template-resources.ts +3 -4
- package/packages/bundled-features/src/template-resolver/template-usage.ts +31 -11
- package/packages/bundled-features/src/template-resolver/template-validation.ts +16 -9
- package/packages/bundled-features/src/template-resolver/web/client-plugin.tsx +12 -8
- package/packages/bundled-features/src/template-resolver/web/document-editor-extensions.ts +97 -10
- package/packages/bundled-features/src/template-resolver/web/document-editor.tsx +15 -5
- package/packages/bundled-features/src/template-resolver/web/document-tiptap-editor.tsx +405 -145
- package/packages/bundled-features/src/template-resolver/web/document-toolbar-blocks.ts +17 -3
- package/packages/bundled-features/src/template-resolver/web/i18n.ts +32 -4
- package/packages/bundled-features/src/template-resolver/web/index.ts +8 -0
- package/packages/bundled-features/src/template-resolver/web/placeholder-line-editor.tsx +23 -7
- package/packages/bundled-features/src/tenant/changes.json +6 -0
- package/packages/bundled-features/src/tenant/handlers/update-member-roles.write.ts +3 -8
- package/packages/bundled-features/src/tenant/seeding.ts +33 -27
- package/packages/bundled-features/src/tenant-handover/move-entity-graph.ts +14 -3
- package/packages/bundled-features/src/tenant-lifecycle/changes.json +6 -0
- package/packages/bundled-features/src/tenant-lifecycle/run-tenant-destroy.ts +9 -1
- package/packages/bundled-features/src/tenant-lifecycle/stages.ts +3 -2
- package/packages/bundled-features/src/tier-engine/changes.json +18 -0
- package/packages/bundled-features/src/tier-engine/constants.ts +9 -0
- package/packages/bundled-features/src/tier-engine/entity.ts +9 -4
- package/packages/bundled-features/src/tier-engine/feature.ts +11 -3
- package/packages/bundled-features/src/tier-engine/handlers/set-tenant-tier.write.ts +8 -5
- package/packages/bundled-features/src/tier-engine/index.ts +2 -0
- package/packages/bundled-features/src/user/changes.json +6 -0
- package/packages/bundled-features/src/user/constants.ts +1 -0
- package/packages/bundled-features/src/user/invited-global-roles.ts +2 -4
- package/packages/bundled-features/src/user/resolve-display-names.ts +8 -15
- package/packages/bundled-features/src/user/seeding.ts +19 -5
- package/packages/bundled-features/src/user-data-rights/changes.json +12 -0
- package/packages/bundled-features/src/user-data-rights/email-templates.ts +0 -1
- package/packages/bundled-features/src/user-data-rights/i18n.ts +5 -0
- package/packages/bundled-features/src/user-data-rights/lib/update-user-lifecycle.ts +13 -2
- package/packages/bundled-features/src/user-data-rights/run-forget-cleanup.ts +7 -1
- package/packages/bundled-features/src/user-profile/changes.json +1 -1
- package/packages/bundled-features/src/waitlist/changes.json +18 -0
- package/packages/bundled-features/src/waitlist/feature.ts +1 -1
- package/packages/bundled-features/src/waitlist/handlers/invite.write.ts +35 -3
- package/packages/bundled-features/src/waitlist/handlers/reject.write.ts +2 -17
- package/packages/bundled-features/src/waitlist/handlers/submit.write.ts +33 -9
- package/packages/bundled-features/src/waitlist/i18n.ts +9 -0
- package/packages/bundled-features/src/waitlist/lib.ts +20 -0
- package/packages/bundled-features/src/waitlist/options.ts +1 -1
- package/packages/bundled-features/src/workflow-runner/changes.json +6 -0
- package/packages/bundled-features/src/workflow-runner/event-trigger.ts +2 -1
- package/packages/bundled-features/src/workflow-runner/feature.ts +1 -1
- package/packages/bundled-features/src/workflow-runner/handlers/resume-run.write.ts +7 -1
- package/samples/apps/ui-walkthrough/package.json +9 -0
- package/samples/apps/ui-walkthrough/playwright.config.ts +40 -7
- package/samples/apps/ui-walkthrough/src/app/seed-templates.ts +87 -2
- package/samples/apps/ui-walkthrough/src/app/template-seed-data.ts +246 -30
- package/samples/apps/ui-walkthrough/src/features/billing/feature.ts +4 -0
- package/samples/apps/ui-walkthrough/src/run-config.ts +18 -1
- package/samples/apps/use-all-bundled/README.md +3 -13
- package/samples/apps/use-all-bundled/feature-manifest.json +7 -5
- package/samples/apps/use-all-bundled/scripts/check-coverage.ts +34 -118
- package/samples/apps/use-all-bundled/src/app/notes-feature.ts +1 -1
- package/samples/apps/use-all-bundled/src/run-config.ts +0 -3
- package/samples/recipes/auth-mfa/README.md +2 -1
- package/samples/recipes/auth-mfa/src/feature.ts +1 -0
- package/samples/recipes/custom-handlers/README.md +4 -3
- package/samples/recipes/custom-handlers/src/feature.ts +21 -12
- package/samples/recipes/dashboard-stats/README.md +38 -0
- package/samples/recipes/dashboard-stats/package.json +8 -0
- package/samples/recipes/dashboard-stats/src/feature.ts +104 -0
- package/samples/recipes/legal-pages/README.md +2 -2
- package/samples/recipes/managed-pages/README.md +2 -2
- package/samples/recipes/pdf-audit-export/README.md +2 -1
- package/samples/recipes/pdf-audit-export/package.json +1 -1
- package/samples/recipes/pdf-audit-export/src/feature.ts +68 -48
- package/samples/recipes/workflow-engine/src/db/queries/suspended-runs.ts +2 -2
- package/samples/apps/use-all-bundled/schema/generate.ts +0 -617
- package/samples/apps/use-all-bundled/schema/migrations/meta/0000_snapshot.json +0 -3055
- package/samples/apps/use-all-bundled/schema/migrations/meta/_journal.json +0 -13
- package/samples/apps/use-all-bundled/schema/schema.generated.ts +0 -94
- package/samples/apps/use-all-bundled/schema/schema.ts +0 -9
|
@@ -1,617 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
// @runtime dev
|
|
3
|
-
// biome-ignore-all lint/suspicious/noConsole: CLI-Script, console ist Feature.
|
|
4
|
-
//
|
|
5
|
-
// Regeneriert schema.generated.ts (Entity-Tables) für die use-all-bundled
|
|
6
|
-
// Smoke-App. Pattern aus einer vergleichbaren Studio-App adaptiert auf
|
|
7
|
-
// die 29 bundled-features die hier gemountet sind (siehe ../src/run-config.ts).
|
|
8
|
-
//
|
|
9
|
-
// Usage:
|
|
10
|
-
// bun run schema/generate.ts
|
|
11
|
-
//
|
|
12
|
-
// Output: schema/schema.generated.ts.
|
|
13
|
-
// Erweitern wenn use-all-bundled ein neues bundled-Feature mountet:
|
|
14
|
-
// FEATURE_IMPORT_REGISTRY hier ergänzen. Memory-würdig dass die Liste
|
|
15
|
-
// mit run-config.ts in Sync bleibt — wird in M5 als Lint-Guard verdrahtet.
|
|
16
|
-
|
|
17
|
-
import { writeFileSync } from "node:fs";
|
|
18
|
-
import { resolve } from "node:path";
|
|
19
|
-
import { composeFeatures } from "@cosmicdrift/kumiko-server-runtime/compose-features";
|
|
20
|
-
import { APP_FEATURES, AUTH_COMPOSE_OPTIONS } from "../src/run-config";
|
|
21
|
-
|
|
22
|
-
type FeatureImport = (
|
|
23
|
-
| {
|
|
24
|
-
readonly kind: "factory";
|
|
25
|
-
readonly path: string;
|
|
26
|
-
readonly factory: string;
|
|
27
|
-
// Literal args rendered inside the factory call, for factories with a
|
|
28
|
-
// required parameter (e.g. managed-pages' resolveApexTenant). Only the
|
|
29
|
-
// entity shape is consumed here, so a no-op stub is sufficient.
|
|
30
|
-
readonly defaultArgs?: string;
|
|
31
|
-
}
|
|
32
|
-
| {
|
|
33
|
-
readonly kind: "named";
|
|
34
|
-
readonly path: string;
|
|
35
|
-
readonly exportName: string;
|
|
36
|
-
}
|
|
37
|
-
) & {
|
|
38
|
-
readonly projectionTables?: readonly string[];
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const FEATURE_IMPORT_REGISTRY: Record<string, FeatureImport> = {
|
|
42
|
-
config: {
|
|
43
|
-
kind: "factory",
|
|
44
|
-
path: "@cosmicdrift/kumiko-bundled-features/config",
|
|
45
|
-
factory: "createConfigFeature",
|
|
46
|
-
},
|
|
47
|
-
user: {
|
|
48
|
-
kind: "factory",
|
|
49
|
-
path: "@cosmicdrift/kumiko-bundled-features/user",
|
|
50
|
-
factory: "createUserFeature",
|
|
51
|
-
},
|
|
52
|
-
tenant: {
|
|
53
|
-
kind: "factory",
|
|
54
|
-
path: "@cosmicdrift/kumiko-bundled-features/tenant",
|
|
55
|
-
factory: "createTenantFeature",
|
|
56
|
-
},
|
|
57
|
-
secrets: {
|
|
58
|
-
kind: "factory",
|
|
59
|
-
path: "@cosmicdrift/kumiko-bundled-features/secrets",
|
|
60
|
-
factory: "createSecretsFeature",
|
|
61
|
-
},
|
|
62
|
-
sessions: {
|
|
63
|
-
kind: "factory",
|
|
64
|
-
path: "@cosmicdrift/kumiko-bundled-features/sessions",
|
|
65
|
-
factory: "createSessionsFeature",
|
|
66
|
-
},
|
|
67
|
-
"personal-access-tokens": {
|
|
68
|
-
kind: "factory",
|
|
69
|
-
path: "@cosmicdrift/kumiko-bundled-features/personal-access-tokens",
|
|
70
|
-
factory: "createPersonalAccessTokensFeature",
|
|
71
|
-
defaultArgs: "{ scopes: {} }",
|
|
72
|
-
},
|
|
73
|
-
// Owns the tokenVerifier extension-point personal-access-tokens registers
|
|
74
|
-
// against. No r.entity → generate.ts skips it silently. Listed for
|
|
75
|
-
// schema-check ↔ mounted-set consistency (kumiko-framework#1369).
|
|
76
|
-
"auth-foundation": {
|
|
77
|
-
kind: "named",
|
|
78
|
-
path: "@cosmicdrift/kumiko-bundled-features/auth-foundation",
|
|
79
|
-
exportName: "authFoundationFeature",
|
|
80
|
-
},
|
|
81
|
-
// auth-email-password auto-mounted via composeFeatures(includeBundled:true).
|
|
82
|
-
// Kein r.entity → generate.ts skipt silent. Listed für schema-check ↔
|
|
83
|
-
// mounted-set Konsistenz.
|
|
84
|
-
"auth-email-password": {
|
|
85
|
-
kind: "factory",
|
|
86
|
-
path: "@cosmicdrift/kumiko-bundled-features/auth-email-password",
|
|
87
|
-
factory: "createAuthEmailPasswordFeature",
|
|
88
|
-
},
|
|
89
|
-
// Companion toggle auto-mounted by composeFeatures when authOptions.signup
|
|
90
|
-
// is set (#1521). No r.entity — listed for schema-check parity.
|
|
91
|
-
"auth-self-registration": {
|
|
92
|
-
kind: "factory",
|
|
93
|
-
path: "@cosmicdrift/kumiko-bundled-features/auth-email-password",
|
|
94
|
-
factory: "createAuthSelfRegistrationToggleFeature",
|
|
95
|
-
},
|
|
96
|
-
// Opt-in German copy. No r.entity — listed for schema-check ↔ mounted-set.
|
|
97
|
-
"locale-de": {
|
|
98
|
-
kind: "factory",
|
|
99
|
-
path: "@cosmicdrift/kumiko-locale-de",
|
|
100
|
-
factory: "localeDe",
|
|
101
|
-
},
|
|
102
|
-
"auth-mfa": {
|
|
103
|
-
kind: "factory",
|
|
104
|
-
path: "@cosmicdrift/kumiko-bundled-features/auth-mfa",
|
|
105
|
-
factory: "createAuthMfaFeature",
|
|
106
|
-
defaultArgs:
|
|
107
|
-
'{ setupTokenSecret: "stub-setup-secret-at-least-32-bytes-long!!", challengeTokenSecret: "stub-challenge-secret-at-least-32-bytes!!", issuer: "stub" }',
|
|
108
|
-
},
|
|
109
|
-
delivery: {
|
|
110
|
-
kind: "factory",
|
|
111
|
-
path: "@cosmicdrift/kumiko-bundled-features/delivery",
|
|
112
|
-
factory: "createDeliveryFeature",
|
|
113
|
-
projectionTables: ["deliveryAttemptsTable"],
|
|
114
|
-
},
|
|
115
|
-
"channel-in-app": {
|
|
116
|
-
kind: "factory",
|
|
117
|
-
path: "@cosmicdrift/kumiko-bundled-features/channel-in-app",
|
|
118
|
-
factory: "createChannelInAppFeature",
|
|
119
|
-
},
|
|
120
|
-
"mail-foundation": {
|
|
121
|
-
kind: "named",
|
|
122
|
-
path: "@cosmicdrift/kumiko-bundled-features/mail-foundation",
|
|
123
|
-
exportName: "mailFoundationFeature",
|
|
124
|
-
},
|
|
125
|
-
"mail-transport-inmemory": {
|
|
126
|
-
kind: "named",
|
|
127
|
-
path: "@cosmicdrift/kumiko-bundled-features/mail-transport-inmemory",
|
|
128
|
-
exportName: "mailTransportInMemoryFeature",
|
|
129
|
-
},
|
|
130
|
-
"inbound-mail-foundation": {
|
|
131
|
-
kind: "named",
|
|
132
|
-
path: "@cosmicdrift/kumiko-bundled-features/inbound-mail-foundation",
|
|
133
|
-
exportName: "inboundMailFoundationFeature",
|
|
134
|
-
projectionTables: [
|
|
135
|
-
"mailAccountsProjectionTable",
|
|
136
|
-
"inboundMessagesProjectionTable",
|
|
137
|
-
"mailThreadsProjectionTable",
|
|
138
|
-
],
|
|
139
|
-
},
|
|
140
|
-
"inbound-provider-imap": {
|
|
141
|
-
kind: "named",
|
|
142
|
-
path: "@cosmicdrift/kumiko-bundled-features/inbound-provider-imap",
|
|
143
|
-
exportName: "inboundProviderImapFeature",
|
|
144
|
-
},
|
|
145
|
-
"inbound-provider-inmemory": {
|
|
146
|
-
kind: "named",
|
|
147
|
-
path: "@cosmicdrift/kumiko-bundled-features/inbound-provider-inmemory",
|
|
148
|
-
exportName: "inboundProviderInMemoryFeature",
|
|
149
|
-
},
|
|
150
|
-
"file-foundation": {
|
|
151
|
-
kind: "named",
|
|
152
|
-
path: "@cosmicdrift/kumiko-bundled-features/file-foundation",
|
|
153
|
-
exportName: "fileFoundationFeature",
|
|
154
|
-
},
|
|
155
|
-
"file-provider-inmemory": {
|
|
156
|
-
kind: "named",
|
|
157
|
-
path: "@cosmicdrift/kumiko-bundled-features/file-provider-inmemory",
|
|
158
|
-
exportName: "fileProviderInMemoryFeature",
|
|
159
|
-
},
|
|
160
|
-
"file-derivatives": {
|
|
161
|
-
kind: "named",
|
|
162
|
-
path: "@cosmicdrift/kumiko-bundled-features/file-derivatives",
|
|
163
|
-
exportName: "fileDerivativesFeature",
|
|
164
|
-
},
|
|
165
|
-
"derivatives-sharp": {
|
|
166
|
-
kind: "named",
|
|
167
|
-
path: "@cosmicdrift/kumiko-bundled-features/derivatives-sharp",
|
|
168
|
-
exportName: "derivativesSharpFeature",
|
|
169
|
-
},
|
|
170
|
-
"file-provider-s3-env": {
|
|
171
|
-
kind: "named",
|
|
172
|
-
path: "@cosmicdrift/kumiko-bundled-features/file-provider-s3-env",
|
|
173
|
-
exportName: "fileProviderS3EnvFeature",
|
|
174
|
-
},
|
|
175
|
-
files: {
|
|
176
|
-
kind: "factory",
|
|
177
|
-
path: "@cosmicdrift/kumiko-bundled-features/files",
|
|
178
|
-
factory: "createFilesFeature",
|
|
179
|
-
},
|
|
180
|
-
"files-tenant-data": {
|
|
181
|
-
kind: "factory",
|
|
182
|
-
path: "@cosmicdrift/kumiko-bundled-features/files-tenant-data",
|
|
183
|
-
factory: "createFilesTenantDataFeature",
|
|
184
|
-
},
|
|
185
|
-
"billing-foundation": {
|
|
186
|
-
kind: "named",
|
|
187
|
-
path: "@cosmicdrift/kumiko-bundled-features/billing-foundation",
|
|
188
|
-
exportName: "billingFoundationFeature",
|
|
189
|
-
projectionTables: ["subscriptionsProjectionTable"],
|
|
190
|
-
},
|
|
191
|
-
"tier-engine": {
|
|
192
|
-
kind: "named",
|
|
193
|
-
path: "@cosmicdrift/kumiko-bundled-features/tier-engine",
|
|
194
|
-
exportName: "tierEngineFeature",
|
|
195
|
-
},
|
|
196
|
-
// cap-overview: no r.entity of its own (reads tier-engine/billing-
|
|
197
|
-
// foundation/tenant + caller-supplied CapSpec callbacks) — this entry
|
|
198
|
-
// never renders into schema.generated.ts, listed only for check-coverage
|
|
199
|
-
// ↔ mounted-set consistency. defaultArgs mirrors run-config.ts's real
|
|
200
|
-
// CAP_OVERVIEW_CAPS shape so it stays buildable if entities are added later.
|
|
201
|
-
"cap-overview": {
|
|
202
|
-
kind: "factory",
|
|
203
|
-
path: "@cosmicdrift/kumiko-bundled-features/cap-overview",
|
|
204
|
-
factory: "createCapOverviewFeature",
|
|
205
|
-
defaultArgs: '{ caps: [{ id: "stub", label: "stub", limit: () => 0, usage: async () => 0 }] }',
|
|
206
|
-
},
|
|
207
|
-
// cap-overview-labels: app-local, translations only for the example
|
|
208
|
-
// cap ids this sample chose — same pattern as collection-labels below.
|
|
209
|
-
"cap-overview-labels": {
|
|
210
|
-
kind: "named",
|
|
211
|
-
path: "../src/app/cap-overview-labels-feature",
|
|
212
|
-
exportName: "capOverviewLabelsFeature",
|
|
213
|
-
},
|
|
214
|
-
// metrics / metrics-system: no entities, so they never render into
|
|
215
|
-
// schema.generated.ts; the empty metric list is a build stub only.
|
|
216
|
-
metrics: {
|
|
217
|
-
kind: "factory",
|
|
218
|
-
path: "@cosmicdrift/kumiko-bundled-features/metrics",
|
|
219
|
-
factory: "createMetricsFeature",
|
|
220
|
-
defaultArgs: "{ metrics: [] }",
|
|
221
|
-
},
|
|
222
|
-
"metrics-system": {
|
|
223
|
-
kind: "factory",
|
|
224
|
-
path: "@cosmicdrift/kumiko-bundled-features/metrics",
|
|
225
|
-
factory: "createSystemMetricsFeature",
|
|
226
|
-
defaultArgs: "{ metrics: [] }",
|
|
227
|
-
},
|
|
228
|
-
"cap-counter": {
|
|
229
|
-
kind: "named",
|
|
230
|
-
path: "@cosmicdrift/kumiko-bundled-features/cap-counter",
|
|
231
|
-
exportName: "capCounterFeature",
|
|
232
|
-
},
|
|
233
|
-
jobs: {
|
|
234
|
-
kind: "factory",
|
|
235
|
-
path: "@cosmicdrift/kumiko-bundled-features/jobs",
|
|
236
|
-
factory: "createJobsFeature",
|
|
237
|
-
projectionTables: ["jobRunsTable", "jobRunLogsTable"],
|
|
238
|
-
},
|
|
239
|
-
"step-dispatcher": {
|
|
240
|
-
kind: "factory",
|
|
241
|
-
path: "@cosmicdrift/kumiko-bundled-features/step-dispatcher",
|
|
242
|
-
factory: "createStepDispatcherFeature",
|
|
243
|
-
},
|
|
244
|
-
"compliance-profiles": {
|
|
245
|
-
kind: "factory",
|
|
246
|
-
path: "@cosmicdrift/kumiko-bundled-features/compliance-profiles",
|
|
247
|
-
factory: "createComplianceProfilesFeature",
|
|
248
|
-
},
|
|
249
|
-
"tenant-lifecycle": {
|
|
250
|
-
kind: "factory",
|
|
251
|
-
path: "@cosmicdrift/kumiko-bundled-features/tenant-lifecycle",
|
|
252
|
-
factory: "createTenantLifecycleFeature",
|
|
253
|
-
},
|
|
254
|
-
// No r.entity of its own — it reads OTHER entities' `transferable`/
|
|
255
|
-
// `parentRef` declarations off the registry. generate.ts skips it
|
|
256
|
-
// silently; listed for schema-check ↔ mounted-set parity.
|
|
257
|
-
"tenant-handover": {
|
|
258
|
-
kind: "factory",
|
|
259
|
-
path: "@cosmicdrift/kumiko-bundled-features/tenant-handover",
|
|
260
|
-
factory: "createTenantHandoverFeature",
|
|
261
|
-
},
|
|
262
|
-
"data-retention": {
|
|
263
|
-
kind: "factory",
|
|
264
|
-
path: "@cosmicdrift/kumiko-bundled-features/data-retention",
|
|
265
|
-
factory: "createDataRetentionFeature",
|
|
266
|
-
},
|
|
267
|
-
"user-data-rights": {
|
|
268
|
-
kind: "factory",
|
|
269
|
-
path: "@cosmicdrift/kumiko-bundled-features/user-data-rights",
|
|
270
|
-
factory: "createUserDataRightsFeature",
|
|
271
|
-
},
|
|
272
|
-
"user-data-rights-defaults": {
|
|
273
|
-
kind: "factory",
|
|
274
|
-
path: "@cosmicdrift/kumiko-bundled-features/user-data-rights-defaults",
|
|
275
|
-
factory: "createUserDataRightsDefaultsFeature",
|
|
276
|
-
},
|
|
277
|
-
"user-profile": {
|
|
278
|
-
kind: "factory",
|
|
279
|
-
path: "@cosmicdrift/kumiko-bundled-features/user-profile",
|
|
280
|
-
factory: "createUserProfileFeature",
|
|
281
|
-
},
|
|
282
|
-
"legal-pages": {
|
|
283
|
-
kind: "factory",
|
|
284
|
-
path: "@cosmicdrift/kumiko-bundled-features/legal-pages",
|
|
285
|
-
factory: "createLegalPagesFeature",
|
|
286
|
-
},
|
|
287
|
-
waitlist: {
|
|
288
|
-
kind: "factory",
|
|
289
|
-
path: "@cosmicdrift/kumiko-bundled-features/waitlist",
|
|
290
|
-
factory: "createWaitlistFeature",
|
|
291
|
-
},
|
|
292
|
-
"managed-pages": {
|
|
293
|
-
kind: "factory",
|
|
294
|
-
path: "@cosmicdrift/kumiko-bundled-features/managed-pages",
|
|
295
|
-
factory: "createManagedPagesFeature",
|
|
296
|
-
defaultArgs: "{ resolveApexTenant: () => null, allowCustomCss: true }",
|
|
297
|
-
},
|
|
298
|
-
seo: {
|
|
299
|
-
kind: "factory",
|
|
300
|
-
path: "@cosmicdrift/kumiko-bundled-features/seo",
|
|
301
|
-
factory: "createSeoFeature",
|
|
302
|
-
defaultArgs: "{ sitemapEntries: () => [], includeLegalPages: true }",
|
|
303
|
-
},
|
|
304
|
-
// Mounted in run-config (#1581); coverage lint requires registry parity.
|
|
305
|
-
"tenant-settings": {
|
|
306
|
-
kind: "factory",
|
|
307
|
-
path: "@cosmicdrift/kumiko-bundled-features/tenant-settings",
|
|
308
|
-
factory: "createTenantSettingsFeature",
|
|
309
|
-
},
|
|
310
|
-
"template-resolver": {
|
|
311
|
-
kind: "factory",
|
|
312
|
-
path: "@cosmicdrift/kumiko-bundled-features/template-resolver",
|
|
313
|
-
factory: "createTemplateResolverFeature",
|
|
314
|
-
},
|
|
315
|
-
"document-designer": {
|
|
316
|
-
kind: "factory",
|
|
317
|
-
path: "@cosmicdrift/kumiko-document-designer",
|
|
318
|
-
factory: "createDocumentDesignerFeature",
|
|
319
|
-
},
|
|
320
|
-
"renderer-foundation": {
|
|
321
|
-
kind: "factory",
|
|
322
|
-
path: "@cosmicdrift/kumiko-bundled-features/renderer-foundation",
|
|
323
|
-
factory: "createRendererFoundationFeature",
|
|
324
|
-
},
|
|
325
|
-
"renderer-mail-html": {
|
|
326
|
-
kind: "factory",
|
|
327
|
-
path: "@cosmicdrift/kumiko-renderer-mail-html",
|
|
328
|
-
factory: "createRendererMailHtmlFeature",
|
|
329
|
-
},
|
|
330
|
-
"renderer-puppeteer-client": {
|
|
331
|
-
kind: "factory",
|
|
332
|
-
path: "@cosmicdrift/kumiko-renderer-puppeteer-client",
|
|
333
|
-
factory: "createRendererPuppeteerClientFeature",
|
|
334
|
-
},
|
|
335
|
-
"renderer-pdf": {
|
|
336
|
-
kind: "factory",
|
|
337
|
-
path: "@cosmicdrift/kumiko-bundled-features/renderer-pdf",
|
|
338
|
-
factory: "createRendererPdfFeature",
|
|
339
|
-
},
|
|
340
|
-
"rate-limiting": {
|
|
341
|
-
kind: "factory",
|
|
342
|
-
path: "@cosmicdrift/kumiko-bundled-features/rate-limiting",
|
|
343
|
-
factory: "createRateLimitingFeature",
|
|
344
|
-
},
|
|
345
|
-
audit: {
|
|
346
|
-
kind: "factory",
|
|
347
|
-
path: "@cosmicdrift/kumiko-bundled-features/audit",
|
|
348
|
-
factory: "createAuditFeature",
|
|
349
|
-
},
|
|
350
|
-
// admin-shell: workspaces + nav only, kein r.entity → generate.ts skipt
|
|
351
|
-
// silent. Listed für schema-check ↔ mounted-set Konsistenz.
|
|
352
|
-
"admin-shell": {
|
|
353
|
-
kind: "factory",
|
|
354
|
-
path: "@cosmicdrift/kumiko-bundled-features/admin-shell",
|
|
355
|
-
factory: "createAdminShellFeature",
|
|
356
|
-
},
|
|
357
|
-
// agent-tools: tool catalog + boot-time doc lint only, no r.entity — the
|
|
358
|
-
// generator skips it and it is listed purely for the schema-check ↔
|
|
359
|
-
// mounted-set consistency.
|
|
360
|
-
"agent-tools": {
|
|
361
|
-
kind: "factory",
|
|
362
|
-
path: "@cosmicdrift/kumiko-bundled-features/agent-tools",
|
|
363
|
-
factory: "createAgentToolsFeature",
|
|
364
|
-
},
|
|
365
|
-
// compliance-profiles-ops: just a cross-tenant read on tenant/
|
|
366
|
-
// compliance-profiles, no own r.entity → generate.ts skips silently.
|
|
367
|
-
"compliance-profiles-ops": {
|
|
368
|
-
kind: "named",
|
|
369
|
-
path: "@cosmicdrift/kumiko-bundled-features/compliance-profiles-ops",
|
|
370
|
-
exportName: "complianceProfilesOpsFeature",
|
|
371
|
-
},
|
|
372
|
-
"crypto-shredding": {
|
|
373
|
-
kind: "factory",
|
|
374
|
-
path: "@cosmicdrift/kumiko-bundled-features/crypto-shredding",
|
|
375
|
-
factory: "createCryptoShreddingFeature",
|
|
376
|
-
},
|
|
377
|
-
"custom-fields": {
|
|
378
|
-
kind: "named",
|
|
379
|
-
path: "@cosmicdrift/kumiko-bundled-features/custom-fields",
|
|
380
|
-
exportName: "customFieldsFeature",
|
|
381
|
-
},
|
|
382
|
-
tags: {
|
|
383
|
-
kind: "named",
|
|
384
|
-
path: "@cosmicdrift/kumiko-bundled-features/tags",
|
|
385
|
-
exportName: "tagsFeature",
|
|
386
|
-
},
|
|
387
|
-
"notes-history": {
|
|
388
|
-
kind: "named",
|
|
389
|
-
path: "@cosmicdrift/kumiko-bundled-features/notes-history",
|
|
390
|
-
exportName: "notesHistoryFeature",
|
|
391
|
-
},
|
|
392
|
-
"notes-history-user-data": {
|
|
393
|
-
kind: "named",
|
|
394
|
-
path: "@cosmicdrift/kumiko-bundled-features/notes-history-user-data",
|
|
395
|
-
exportName: "notesHistoryUserDataFeature",
|
|
396
|
-
},
|
|
397
|
-
"form-draft": {
|
|
398
|
-
kind: "named",
|
|
399
|
-
path: "@cosmicdrift/kumiko-bundled-features/form-draft",
|
|
400
|
-
exportName: "formDraftFeature",
|
|
401
|
-
},
|
|
402
|
-
"form-draft-user-data": {
|
|
403
|
-
kind: "named",
|
|
404
|
-
path: "@cosmicdrift/kumiko-bundled-features/form-draft-user-data",
|
|
405
|
-
exportName: "formDraftUserDataFeature",
|
|
406
|
-
},
|
|
407
|
-
"template-resolver-user-data": {
|
|
408
|
-
kind: "named",
|
|
409
|
-
path: "@cosmicdrift/kumiko-bundled-features/template-resolver-user-data",
|
|
410
|
-
exportName: "templateResolverUserDataFeature",
|
|
411
|
-
},
|
|
412
|
-
// collection-labels: app-local, translations only, kein r.entity →
|
|
413
|
-
// generate.ts skipt silent. Listed für schema-check ↔ mounted-set Konsistenz.
|
|
414
|
-
"collection-labels": {
|
|
415
|
-
kind: "named",
|
|
416
|
-
path: "../src/app/collection-labels-feature",
|
|
417
|
-
exportName: "collectionLabelsFeature",
|
|
418
|
-
},
|
|
419
|
-
folders: {
|
|
420
|
-
kind: "named",
|
|
421
|
-
path: "@cosmicdrift/kumiko-bundled-features/folders",
|
|
422
|
-
exportName: "foldersFeature",
|
|
423
|
-
},
|
|
424
|
-
"folders-user-data": {
|
|
425
|
-
kind: "named",
|
|
426
|
-
path: "@cosmicdrift/kumiko-bundled-features/folders-user-data",
|
|
427
|
-
exportName: "foldersUserDataFeature",
|
|
428
|
-
},
|
|
429
|
-
"auth-mfa-user-data": {
|
|
430
|
-
kind: "named",
|
|
431
|
-
path: "@cosmicdrift/kumiko-bundled-features/auth-mfa-user-data",
|
|
432
|
-
exportName: "authMfaUserDataFeature",
|
|
433
|
-
},
|
|
434
|
-
ledger: {
|
|
435
|
-
kind: "named",
|
|
436
|
-
path: "@cosmicdrift/kumiko-bundled-features/ledger",
|
|
437
|
-
exportName: "ledgerFeature",
|
|
438
|
-
},
|
|
439
|
-
"document-ingest-foundation": {
|
|
440
|
-
kind: "named",
|
|
441
|
-
path: "@cosmicdrift/kumiko-bundled-features/document-ingest-foundation",
|
|
442
|
-
exportName: "documentIngestFoundationFeature",
|
|
443
|
-
},
|
|
444
|
-
// workflow-runner: no r.entity/MSPs/handlers → generate.ts skips it
|
|
445
|
-
// silently. Listed for schema-check ↔ mounted-set consistency.
|
|
446
|
-
"workflow-runner": {
|
|
447
|
-
kind: "named",
|
|
448
|
-
path: "@cosmicdrift/kumiko-bundled-features/workflow-runner",
|
|
449
|
-
exportName: "workflowRunnerFeature",
|
|
450
|
-
},
|
|
451
|
-
// M0.1 hold-back features. Meist keine eigenen entities/projection-tables
|
|
452
|
-
// (generate.ts skipt sie silent in der entity-loop) — gelistet für
|
|
453
|
-
// check-coverage.ts (Maintenance-Lint M5 erwartet jeden mounted
|
|
454
|
-
// feature-export im Registry). Ausnahme: feature-toggles trägt die
|
|
455
|
-
// Store-Table store_global_feature_state (r.storeTable, siehe
|
|
456
|
-
// global-feature-state-table.ts) — der projectionTables-Key hier steuert
|
|
457
|
-
// nur den Drizzle-Schema-Export, ist keine echte Projection.
|
|
458
|
-
"channel-email": {
|
|
459
|
-
kind: "factory",
|
|
460
|
-
path: "@cosmicdrift/kumiko-bundled-features/channel-email",
|
|
461
|
-
factory: "createChannelEmailFeature",
|
|
462
|
-
},
|
|
463
|
-
"channel-push": {
|
|
464
|
-
kind: "factory",
|
|
465
|
-
path: "@cosmicdrift/kumiko-bundled-features/channel-push",
|
|
466
|
-
factory: "createChannelPushFeature",
|
|
467
|
-
},
|
|
468
|
-
"channel-slack": {
|
|
469
|
-
kind: "factory",
|
|
470
|
-
path: "@cosmicdrift/kumiko-bundled-features/channel-slack",
|
|
471
|
-
factory: "createChannelSlackFeature",
|
|
472
|
-
},
|
|
473
|
-
"channel-discord": {
|
|
474
|
-
kind: "factory",
|
|
475
|
-
path: "@cosmicdrift/kumiko-bundled-features/channel-discord",
|
|
476
|
-
factory: "createChannelDiscordFeature",
|
|
477
|
-
},
|
|
478
|
-
"channel-teams": {
|
|
479
|
-
kind: "factory",
|
|
480
|
-
path: "@cosmicdrift/kumiko-bundled-features/channel-teams",
|
|
481
|
-
factory: "createChannelTeamsFeature",
|
|
482
|
-
},
|
|
483
|
-
"channel-telegram": {
|
|
484
|
-
kind: "factory",
|
|
485
|
-
path: "@cosmicdrift/kumiko-bundled-features/channel-telegram",
|
|
486
|
-
factory: "createChannelTelegramFeature",
|
|
487
|
-
},
|
|
488
|
-
readiness: {
|
|
489
|
-
kind: "named",
|
|
490
|
-
path: "@cosmicdrift/kumiko-bundled-features/readiness",
|
|
491
|
-
exportName: "readinessFeature",
|
|
492
|
-
},
|
|
493
|
-
"mail-transport-smtp": {
|
|
494
|
-
kind: "named",
|
|
495
|
-
path: "@cosmicdrift/kumiko-bundled-features/mail-transport-smtp",
|
|
496
|
-
exportName: "mailTransportSmtpFeature",
|
|
497
|
-
},
|
|
498
|
-
"file-provider-s3": {
|
|
499
|
-
kind: "named",
|
|
500
|
-
path: "@cosmicdrift/kumiko-bundled-features/file-provider-s3",
|
|
501
|
-
exportName: "fileProviderS3Feature",
|
|
502
|
-
},
|
|
503
|
-
"subscription-stripe": {
|
|
504
|
-
kind: "factory",
|
|
505
|
-
path: "@cosmicdrift/kumiko-bundled-features/subscription-stripe",
|
|
506
|
-
factory: "createSubscriptionStripeFeature",
|
|
507
|
-
},
|
|
508
|
-
"subscription-mollie": {
|
|
509
|
-
kind: "factory",
|
|
510
|
-
path: "@cosmicdrift/kumiko-bundled-features/subscription-mollie",
|
|
511
|
-
factory: "createSubscriptionMollieFeature",
|
|
512
|
-
},
|
|
513
|
-
"feature-toggles": {
|
|
514
|
-
kind: "factory",
|
|
515
|
-
path: "@cosmicdrift/kumiko-bundled-features/feature-toggles",
|
|
516
|
-
factory: "createFeatureTogglesFeature",
|
|
517
|
-
projectionTables: ["globalFeatureStateTable"],
|
|
518
|
-
},
|
|
519
|
-
};
|
|
520
|
-
|
|
521
|
-
const features = composeFeatures([...APP_FEATURES], {
|
|
522
|
-
includeBundled: true,
|
|
523
|
-
authOptions: AUTH_COMPOSE_OPTIONS,
|
|
524
|
-
});
|
|
525
|
-
|
|
526
|
-
const importLines: string[] = [
|
|
527
|
-
'import { buildEntityTable } from "@cosmicdrift/kumiko-framework/db";',
|
|
528
|
-
];
|
|
529
|
-
const constLines: string[] = [];
|
|
530
|
-
const seenFeature = new Set<string>();
|
|
531
|
-
const featureVarNames = new Map<string, string>();
|
|
532
|
-
const projectionTableReexports: Array<{
|
|
533
|
-
readonly path: string;
|
|
534
|
-
readonly tables: readonly string[];
|
|
535
|
-
}> = [];
|
|
536
|
-
|
|
537
|
-
for (const feature of features) {
|
|
538
|
-
const hasEntities = Object.keys(feature.entities).length > 0;
|
|
539
|
-
const entry = FEATURE_IMPORT_REGISTRY[feature.name];
|
|
540
|
-
const hasProjectionTables = entry !== undefined && (entry.projectionTables?.length ?? 0) > 0;
|
|
541
|
-
if (!hasEntities && !hasProjectionTables) continue;
|
|
542
|
-
if (seenFeature.has(feature.name)) continue;
|
|
543
|
-
seenFeature.add(feature.name);
|
|
544
|
-
|
|
545
|
-
if (!entry) {
|
|
546
|
-
throw new Error(
|
|
547
|
-
`schema/generate.ts: feature "${feature.name}" has no import entry. ` +
|
|
548
|
-
`Add it to FEATURE_IMPORT_REGISTRY at the top of this file.`,
|
|
549
|
-
);
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
if (hasEntities) {
|
|
553
|
-
const varName = toIdent(`_${feature.name}`);
|
|
554
|
-
featureVarNames.set(feature.name, varName);
|
|
555
|
-
if (entry.kind === "factory") {
|
|
556
|
-
importLines.push(`import { ${entry.factory} } from "${entry.path}";`);
|
|
557
|
-
constLines.push(`const ${varName} = ${entry.factory}(${entry.defaultArgs ?? ""});`);
|
|
558
|
-
} else {
|
|
559
|
-
importLines.push(`import { ${entry.exportName} } from "${entry.path}";`);
|
|
560
|
-
constLines.push(`const ${varName} = ${entry.exportName};`);
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
if (hasProjectionTables && entry.projectionTables) {
|
|
565
|
-
projectionTableReexports.push({
|
|
566
|
-
path: entry.path,
|
|
567
|
-
tables: entry.projectionTables,
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
const lines: string[] = [
|
|
573
|
-
"// Auto-generated by schema/generate.ts — DO NOT EDIT",
|
|
574
|
-
"// Re-run: bun run schema/generate.ts",
|
|
575
|
-
"// biome-ignore-all format: generated output",
|
|
576
|
-
"// biome-ignore-all assist/source/organizeImports: generated output",
|
|
577
|
-
"// biome-ignore-all lint/style/noNonNullAssertion: generated output — entity-lookup ist immer present per registry-contract",
|
|
578
|
-
"",
|
|
579
|
-
...importLines,
|
|
580
|
-
"",
|
|
581
|
-
...constLines,
|
|
582
|
-
"",
|
|
583
|
-
];
|
|
584
|
-
|
|
585
|
-
let entityCount = 0;
|
|
586
|
-
const seenEntityFeature = new Set<string>();
|
|
587
|
-
for (const feature of features) {
|
|
588
|
-
const varName = featureVarNames.get(feature.name);
|
|
589
|
-
if (!varName) continue;
|
|
590
|
-
if (seenEntityFeature.has(feature.name)) continue;
|
|
591
|
-
seenEntityFeature.add(feature.name);
|
|
592
|
-
for (const entityName of Object.keys(feature.entities)) {
|
|
593
|
-
const exportName = `${toIdent(entityName)}Table`;
|
|
594
|
-
lines.push(
|
|
595
|
-
`export const ${exportName} = buildEntityTable("${entityName}", ${varName}.entities["${entityName}"]!);`,
|
|
596
|
-
);
|
|
597
|
-
entityCount++;
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
let projectionTableCount = 0;
|
|
602
|
-
for (const { path, tables } of projectionTableReexports) {
|
|
603
|
-
lines.push(`export { ${tables.join(", ")} } from "${path}";`);
|
|
604
|
-
projectionTableCount += tables.length;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
lines.push("");
|
|
608
|
-
|
|
609
|
-
const outPath = resolve(import.meta.dir, "schema.generated.ts");
|
|
610
|
-
writeFileSync(outPath, lines.join("\n"), "utf-8");
|
|
611
|
-
console.log(
|
|
612
|
-
` Entity-Tables: ${entityCount} + Projection-Tables: ${projectionTableCount} → schema.generated.ts`,
|
|
613
|
-
);
|
|
614
|
-
|
|
615
|
-
function toIdent(name: string): string {
|
|
616
|
-
return name.replace(/-([a-z0-9])/g, (_, c: string) => c.toUpperCase());
|
|
617
|
-
}
|