@cosmicdrift/kumiko-types 0.234.0 → 0.235.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/package.json +1 -1
- package/src/config.ts +16 -0
- package/src/projection.ts +6 -0
- package/src/screen.ts +27 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.235.0",
|
|
4
4
|
"description": "Framework-Type-Definitions für Kumiko — FeatureDefinition, BootCheck-Types und die reinen Engine-Types. Erlaubt Downstream-Konsumenten, gegen die Type-Contracts zu bauen, ohne das ganze Framework-Package zu importieren. Enthaelt keine identitaets-sensitiven Runtime-Werte mehr (Error-Klassen leben seit #1629 in kumiko-framework, Brand-Symbole nutzen Symbol.for) und ist deshalb eine plain dependency, keine peerDependency.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
package/src/config.ts
CHANGED
|
@@ -369,7 +369,23 @@ export type JobDefinition = {
|
|
|
369
369
|
readonly backoff?: "fixed" | "exponential" | undefined;
|
|
370
370
|
readonly timeout?: number | undefined;
|
|
371
371
|
readonly schema?: ZodType | undefined;
|
|
372
|
+
// Enqueue this job once when a runner for its lane starts. Fire-and-forget:
|
|
373
|
+
// the enqueue is awaited, the run is not, so a throwing handler only fails
|
|
374
|
+
// the queue job — the process keeps booting and reports ready.
|
|
375
|
+
// Deduped on a fixed job id, so it runs at most once per Redis dataset: a
|
|
376
|
+
// boot job that already ran (or failed) is not retried on a later deploy.
|
|
377
|
+
// Never a deploy gate — use `bootGate` for that.
|
|
372
378
|
readonly runOnBoot?: boolean | undefined;
|
|
379
|
+
// Run this job inline while the runner for its lane starts, before cron
|
|
380
|
+
// schedules and `runOnBoot` enqueues. The handler is awaited and a throw
|
|
381
|
+
// rejects the runner's start() — which rejects runProdApp's boot, so the
|
|
382
|
+
// process exits before it ever reports ready. That makes it a real deploy
|
|
383
|
+
// gate, unlike `runOnBoot`. Runs on every start, never deduped.
|
|
384
|
+
// `retries`/`timeout`/`backoff` are BullMQ options and do not apply on the
|
|
385
|
+
// inline path. Incompatible with `perTenant` and `concurrency: "sequential"`.
|
|
386
|
+
// The gate runs wherever a job runner for its lane starts — a setup that
|
|
387
|
+
// starts no runner for that lane runs no gate.
|
|
388
|
+
readonly bootGate?: boolean | undefined;
|
|
373
389
|
readonly perTenant?: boolean | undefined;
|
|
374
390
|
// Which deploy-lane runs this job. Default "worker". Set "api" only for
|
|
375
391
|
// short CPU-light handlers (token cleanup, in-process cache warmup) that
|
package/src/projection.ts
CHANGED
|
@@ -161,4 +161,10 @@ export type MultiStreamProjectionDefinition = {
|
|
|
161
161
|
// writes duplicate rows. Misuse = duplicated side
|
|
162
162
|
// effects, not a safety property.
|
|
163
163
|
readonly delivery?: "shared" | "per-instance";
|
|
164
|
+
// Where the consumer's cursor starts on its FIRST registration. Default
|
|
165
|
+
// "beginning" replays the full log. "now" seeds the cursor at the current
|
|
166
|
+
// MAX(events.id) so mounting the MSP into an existing app does not
|
|
167
|
+
// retroactively fire side effects for historical events. Only affects the
|
|
168
|
+
// first registration — an existing cursor row is never clobbered.
|
|
169
|
+
readonly startFrom?: "beginning" | "now";
|
|
164
170
|
};
|
package/src/screen.ts
CHANGED
|
@@ -984,6 +984,32 @@ export type ConfigEditScreenDefinition = {
|
|
|
984
984
|
readonly access?: AccessRule;
|
|
985
985
|
};
|
|
986
986
|
|
|
987
|
+
// Self-populating counterpart of ConfigEditScreenDefinition for `r.secret(...)`
|
|
988
|
+
// declarations. No EditLayout/FieldDefinition — secrets never round-trip a
|
|
989
|
+
// stored value to the client, so the screen renders its own body (password
|
|
990
|
+
// inputs + redaction display + delete) instead of going through RenderEdit.
|
|
991
|
+
export type SecretsEditSection = {
|
|
992
|
+
readonly title?: string;
|
|
993
|
+
readonly fields: readonly string[];
|
|
994
|
+
};
|
|
995
|
+
|
|
996
|
+
export type SecretsEditScreenDefinition = {
|
|
997
|
+
readonly id: string;
|
|
998
|
+
readonly type: "secretsEdit";
|
|
999
|
+
readonly nav?: ScreenNavSugar;
|
|
1000
|
+
readonly detailFor?: string;
|
|
1001
|
+
/** field id -> qualified secret name (`<feature>:secret:<kebab>`). */
|
|
1002
|
+
readonly secretKeys: Readonly<Record<string, string>>;
|
|
1003
|
+
/** field id -> i18n key for the label. */
|
|
1004
|
+
readonly fieldLabels: Readonly<Record<string, string>>;
|
|
1005
|
+
/** field id -> i18n key for the hint, only where the declaration carries one. */
|
|
1006
|
+
readonly fieldHints?: Readonly<Record<string, string>>;
|
|
1007
|
+
/** field ids whose declaration set `required: true`. */
|
|
1008
|
+
readonly requiredFields?: readonly string[];
|
|
1009
|
+
readonly sections: readonly SecretsEditSection[];
|
|
1010
|
+
readonly access?: AccessRule;
|
|
1011
|
+
};
|
|
1012
|
+
|
|
987
1013
|
// --- shared slots (Level 4 from ui-architecture.md) ---
|
|
988
1014
|
|
|
989
1015
|
export type ScreenSlots = {
|
|
@@ -1030,4 +1056,5 @@ export type ScreenDefinition =
|
|
|
1030
1056
|
| EntityEditScreenDefinition
|
|
1031
1057
|
| ActionFormScreenDefinition
|
|
1032
1058
|
| ConfigEditScreenDefinition
|
|
1059
|
+
| SecretsEditScreenDefinition
|
|
1033
1060
|
| CustomScreenDefinition;
|