@latticecms/core 0.0.0 → 0.2.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/README.md +1297 -2
- package/dist/access.d.ts +209 -0
- package/dist/access.d.ts.map +1 -0
- package/dist/access.js +241 -0
- package/dist/access.js.map +1 -0
- package/dist/build.d.ts +555 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/build.js +655 -0
- package/dist/build.js.map +1 -0
- package/dist/collection.d.ts +480 -0
- package/dist/collection.d.ts.map +1 -0
- package/dist/collection.js +351 -0
- package/dist/collection.js.map +1 -0
- package/dist/crud.d.ts +46 -0
- package/dist/crud.d.ts.map +1 -0
- package/dist/crud.js +527 -0
- package/dist/crud.js.map +1 -0
- package/dist/describe.d.ts +89 -0
- package/dist/describe.d.ts.map +1 -0
- package/dist/describe.js +119 -0
- package/dist/describe.js.map +1 -0
- package/dist/errors.d.ts +183 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +150 -0
- package/dist/errors.js.map +1 -0
- package/dist/family.d.ts +80 -0
- package/dist/family.d.ts.map +1 -0
- package/dist/family.js +227 -0
- package/dist/family.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/marker.d.ts +15 -0
- package/dist/marker.d.ts.map +1 -0
- package/dist/marker.js +28 -0
- package/dist/marker.js.map +1 -0
- package/dist/mask.d.ts +69 -0
- package/dist/mask.d.ts.map +1 -0
- package/dist/mask.js +277 -0
- package/dist/mask.js.map +1 -0
- package/dist/populate.d.ts +39 -0
- package/dist/populate.d.ts.map +1 -0
- package/dist/populate.js +72 -0
- package/dist/populate.js.map +1 -0
- package/dist/relations.d.ts +144 -0
- package/dist/relations.d.ts.map +1 -0
- package/dist/relations.js +144 -0
- package/dist/relations.js.map +1 -0
- package/dist/repo.d.ts +99 -0
- package/dist/repo.d.ts.map +1 -0
- package/dist/repo.js +92 -0
- package/dist/repo.js.map +1 -0
- package/dist/sort.d.ts +86 -0
- package/dist/sort.d.ts.map +1 -0
- package/dist/sort.js +187 -0
- package/dist/sort.js.map +1 -0
- package/dist/store/conformance.d.ts +15 -0
- package/dist/store/conformance.d.ts.map +1 -0
- package/dist/store/conformance.js +811 -0
- package/dist/store/conformance.js.map +1 -0
- package/dist/store/index.d.ts +9 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +8 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store.d.ts +119 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +176 -0
- package/dist/store.js.map +1 -0
- package/dist/tenancy.d.ts +66 -0
- package/dist/tenancy.d.ts.map +1 -0
- package/dist/tenancy.js +69 -0
- package/dist/tenancy.js.map +1 -0
- package/dist/tracing.d.ts +12 -0
- package/dist/tracing.d.ts.map +1 -0
- package/dist/tracing.js +27 -0
- package/dist/tracing.js.map +1 -0
- package/dist/where.d.ts +95 -0
- package/dist/where.d.ts.map +1 -0
- package/dist/where.js +308 -0
- package/dist/where.js.map +1 -0
- package/package.json +80 -2
- package/skills/lattice/SKILL.md +106 -0
- package/skills/lattice/references/access.md +90 -0
- package/skills/lattice/references/cli.md +87 -0
- package/skills/lattice/references/collection.md +94 -0
- package/skills/lattice/references/event-handler.md +88 -0
- package/skills/lattice/references/masking.md +72 -0
- package/skills/lattice/references/method.md +88 -0
- package/skills/lattice/references/override.md +160 -0
- package/skills/lattice/references/relations.md +91 -0
- package/skills/lattice/references/tenancy.md +82 -0
- package/skills/lattice/references/testing.md +75 -0
- package/src/access.ts +449 -0
- package/src/build.ts +1888 -0
- package/src/collection.ts +1025 -0
- package/src/crud.ts +797 -0
- package/src/describe.ts +232 -0
- package/src/errors.ts +174 -0
- package/src/family.ts +334 -0
- package/src/index.ts +44 -0
- package/src/marker.ts +54 -0
- package/src/mask.ts +336 -0
- package/src/populate.ts +103 -0
- package/src/relations.ts +370 -0
- package/src/repo.ts +218 -0
- package/src/sort.ts +271 -0
- package/src/store/conformance.ts +1179 -0
- package/src/store/index.ts +22 -0
- package/src/store.ts +315 -0
- package/src/tenancy.ts +124 -0
- package/src/tracing.ts +29 -0
- package/src/where.ts +463 -0
package/dist/build.d.ts
ADDED
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
import type { Logger } from '@hexok/logger';
|
|
2
|
+
import { type ContractProcedure, type ContractRouterBrand, type ErrorMap, type Expansion, type InferContractProcedure, type InferExpandedOutput, type InferSchemaInput, type InferSchemaOutput } from '@ts-pf/contract';
|
|
3
|
+
import type { DocsMeta } from '@ts-pf/docs';
|
|
4
|
+
import type { McpEffect } from '@ts-pf/mcp/meta';
|
|
5
|
+
import { type ImplementedRouter } from '@ts-pf/server';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { type Access, type AccessCheck, type AccessFns, type AccessMap, type AccessReturns, type FieldsMap } from './access.js';
|
|
8
|
+
import { type Action, type AnyCollection, type AnyRelation, type Operations } from './collection.js';
|
|
9
|
+
import { type EventPublisher, type Executable } from './crud.js';
|
|
10
|
+
import { type EffectOf } from './describe.js';
|
|
11
|
+
import { declaredErrors, type LatticeCode } from './errors.js';
|
|
12
|
+
import { type CallContext, type Family, type FamilyContext } from './family.js';
|
|
13
|
+
import { type Withheld } from './populate.js';
|
|
14
|
+
import { type CascadeFields, type RefSlugs } from './relations.js';
|
|
15
|
+
import { type ClientDoc, type Repo } from './repo.js';
|
|
16
|
+
import type { CollectionStore } from './store.js';
|
|
17
|
+
import type { TenantField } from './tenancy.js';
|
|
18
|
+
/**
|
|
19
|
+
* Names a collection slug, a relation or a method cannot take: ts-pf
|
|
20
|
+
* `Implementer` keys, whose members they would shadow in the router.
|
|
21
|
+
*/
|
|
22
|
+
export declare const reservedNames: readonly ["$context", "use", "useAfter", "middleware", "router"];
|
|
23
|
+
type Reserved = (typeof reservedNames)[number];
|
|
24
|
+
type Ctor<I> = abstract new (...args: never[]) => I;
|
|
25
|
+
type Schemas = {
|
|
26
|
+
readonly input: z.ZodType;
|
|
27
|
+
readonly output: z.ZodType;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* What a method's class says about itself, beside its schemas: one
|
|
31
|
+
* sentence on what it does, and whether it reads, writes or destroys. They
|
|
32
|
+
* become its procedure's `docs` and `mcp` meta (0033).
|
|
33
|
+
*/
|
|
34
|
+
type MethodDescription = {
|
|
35
|
+
readonly summary: string;
|
|
36
|
+
readonly effect: McpEffect;
|
|
37
|
+
};
|
|
38
|
+
type MethodStatics = Schemas & MethodDescription;
|
|
39
|
+
/** An override as declared: a class, or one per operation of a relation. */
|
|
40
|
+
type AnyOverride = Ctor<unknown> | Readonly<Record<string, Ctor<unknown>>>;
|
|
41
|
+
/**
|
|
42
|
+
* A collection, its access functions, and the classes attached to it. A
|
|
43
|
+
* join collection a relation derived is an entry too, so its events, refs
|
|
44
|
+
* and indexes count, but it has no slice and no use cases.
|
|
45
|
+
*/
|
|
46
|
+
type Entry = {
|
|
47
|
+
readonly collection: AnyCollection;
|
|
48
|
+
readonly access: AccessMap;
|
|
49
|
+
readonly fields: FieldsMap;
|
|
50
|
+
readonly methods: Readonly<Record<string, Ctor<unknown> & MethodStatics>>;
|
|
51
|
+
readonly overrides: Readonly<Record<string, AnyOverride>>;
|
|
52
|
+
readonly join: boolean;
|
|
53
|
+
};
|
|
54
|
+
/** The relation operations Lattice generates. */
|
|
55
|
+
declare const relationOps: readonly ["list", "set"];
|
|
56
|
+
type RelationOp = (typeof relationOps)[number];
|
|
57
|
+
/** The entries a collection's relations add: their join collections. */
|
|
58
|
+
type JoinEntries<C extends AnyCollection> = {
|
|
59
|
+
[K in keyof C['relations'] as C['relations'][K]['through']['slug']]: {
|
|
60
|
+
collection: C['relations'][K]['through'];
|
|
61
|
+
methods: Record<never, never>;
|
|
62
|
+
overrides: Record<never, never>;
|
|
63
|
+
join: true;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
/** The entries with a contract slice: all but join collections. */
|
|
67
|
+
type Sliced<E extends Entries> = {
|
|
68
|
+
[S in keyof E as E[S]['join'] extends true ? never : S]: E[S];
|
|
69
|
+
};
|
|
70
|
+
type Entries = Record<string, Entry>;
|
|
71
|
+
type Ops<Col extends AnyCollection> = Operations<Col['schema']['shape'], TenantField<Col>>;
|
|
72
|
+
/**
|
|
73
|
+
* What a collection's create takes: its input schema's input type, so a
|
|
74
|
+
* defaulted field may be left out. An override of create declares it.
|
|
75
|
+
*/
|
|
76
|
+
export type CreateInput<C extends AnyCollection> = z.input<Ops<C>['create']['input']>;
|
|
77
|
+
/**
|
|
78
|
+
* What a collection's update takes: the `id`, and each field to change. It
|
|
79
|
+
* applies no defaults, and `null` clears an optional field with no default.
|
|
80
|
+
* An override of update declares it.
|
|
81
|
+
*/
|
|
82
|
+
export type UpdateInput<C extends AnyCollection> = z.input<Ops<C>['update']['input']>;
|
|
83
|
+
/**
|
|
84
|
+
* What a client receives from operation `A` of `Col`: its documents as
|
|
85
|
+
* `clientOutput`, each maskable field optional.
|
|
86
|
+
*/
|
|
87
|
+
type ClientOut<Col extends AnyCollection, A extends Action> = A extends 'count' ? Ops<Col>['count']['output'] : A extends 'find' ? z.ZodObject<{
|
|
88
|
+
docs: z.ZodArray<Col['clientOutput']>;
|
|
89
|
+
next: z.ZodNullable<z.ZodString>;
|
|
90
|
+
}> : Col['clientOutput'];
|
|
91
|
+
/** The maskable fields of `Col`. */
|
|
92
|
+
type MaskableOf<Col extends AnyCollection> = Col['maskable'][number];
|
|
93
|
+
/**
|
|
94
|
+
* The `fields` option of `.collection()`: a read rule for each maskable
|
|
95
|
+
* field, given the actor, and required exactly when there is one.
|
|
96
|
+
*/
|
|
97
|
+
type FieldsOption<Actor, Col extends AnyCollection> = [
|
|
98
|
+
MaskableOf<Col>
|
|
99
|
+
] extends [never] ? {
|
|
100
|
+
readonly fields?: never;
|
|
101
|
+
} : {
|
|
102
|
+
readonly fields: {
|
|
103
|
+
readonly [K in MaskableOf<Col>]: {
|
|
104
|
+
readonly read: (args: {
|
|
105
|
+
readonly actor: Actor;
|
|
106
|
+
}) => boolean | Promise<boolean>;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* What a class attached as method `N` of `Col` must be: its statics name
|
|
112
|
+
* `Col` and `<slug>.<N>`, say what it does and its effect, and `execute`
|
|
113
|
+
* takes and returns its own schemas' types. `execute` is a property here,
|
|
114
|
+
* not a method, so its input is checked contravariantly: a method signature
|
|
115
|
+
* is bivariant and would accept a narrower input.
|
|
116
|
+
*/
|
|
117
|
+
type MethodCheck<C, Col extends AnyCollection, N, Ctx> = N extends Action | 'read' | Reserved | keyof Col['relations'] | `${string}.${string}` ? Ctor<unknown> & MethodStatics & {
|
|
118
|
+
readonly '~error': `"${N & string}" is a generated operation, an access key, a relation, a ts-pf implementer key, or has a dot`;
|
|
119
|
+
} : C extends {
|
|
120
|
+
readonly input: infer I extends z.ZodType;
|
|
121
|
+
readonly output: infer O extends z.ZodType;
|
|
122
|
+
} ? C extends MethodDescription ? Ctor<{
|
|
123
|
+
execute: (ctx: Ctx, input: z.output<I>) => Promise<z.output<O>>;
|
|
124
|
+
}> & {
|
|
125
|
+
readonly token: `${Col['slug']}.${N & string}`;
|
|
126
|
+
readonly collection: Col;
|
|
127
|
+
readonly input: I;
|
|
128
|
+
readonly output: O;
|
|
129
|
+
readonly summary: string;
|
|
130
|
+
readonly effect: McpEffect;
|
|
131
|
+
} : Ctor<unknown> & MethodStatics & {
|
|
132
|
+
readonly '~error': `method "${N & string}" needs a summary and an effect: what it does, and whether it reads, writes or is destructive`;
|
|
133
|
+
} : Ctor<unknown> & MethodStatics;
|
|
134
|
+
/** What a class that replaces relation operation `Op` of `Col.R` must be. */
|
|
135
|
+
type RelationOverrideCheck<Col extends AnyCollection, R extends keyof Col['relations'], Op extends RelationOp, Ctx> = Ctor<{
|
|
136
|
+
execute: (ctx: Ctx, input: z.output<Col['relations'][R][Op]['input']>) => Promise<z.output<Col['relations'][R][Op]['output']>>;
|
|
137
|
+
}> & {
|
|
138
|
+
readonly token: `${Col['slug']}.${R & string}.${Op}`;
|
|
139
|
+
readonly collection: Col;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* An override keeps the summary and effect of the operation it replaces,
|
|
143
|
+
* because clients see the same procedure. A class `X` that declares either
|
|
144
|
+
* gains a key it lacks, so the error names the override.
|
|
145
|
+
*/
|
|
146
|
+
type Undescribed<X, Name extends string> = X extends {
|
|
147
|
+
readonly summary: unknown;
|
|
148
|
+
} | {
|
|
149
|
+
readonly effect: unknown;
|
|
150
|
+
} ? {
|
|
151
|
+
readonly '~error': `override "${Name}" keeps the generated summary and effect; remove its summary and effect statics`;
|
|
152
|
+
} : unknown;
|
|
153
|
+
/**
|
|
154
|
+
* What class `X`, replacing operation `A` of `Col`, must be. A relation's
|
|
155
|
+
* operations are replaced by name: `{ categories: { set: Class } }`.
|
|
156
|
+
*/
|
|
157
|
+
type OverrideCheck<X, Col extends AnyCollection, A, Ctx> = A extends Action ? Ctor<{
|
|
158
|
+
execute: (ctx: Ctx, input: z.output<Ops<Col>[A]['input']>) => Promise<z.output<Ops<Col>[A]['output']>>;
|
|
159
|
+
}> & {
|
|
160
|
+
readonly token: `${Col['slug']}.${A}`;
|
|
161
|
+
readonly collection: Col;
|
|
162
|
+
} & Undescribed<X, A> : A extends keyof Col['relations'] ? {
|
|
163
|
+
readonly [Op in RelationOp]?: RelationOverrideCheck<Col, A, Op, Ctx> & Undescribed<Op extends keyof X ? X[Op] : unknown, `${A & string}.${Op}`>;
|
|
164
|
+
} : Ctor<unknown> & {
|
|
165
|
+
readonly '~error': `"${A & string}" is not a generated operation or a relation`;
|
|
166
|
+
};
|
|
167
|
+
type SlugCheck<C extends AnyCollection, E extends Entries> = C extends {
|
|
168
|
+
readonly slug: Reserved;
|
|
169
|
+
} ? {
|
|
170
|
+
readonly '~error': `"${C['slug']}" is a ts-pf implementer key`;
|
|
171
|
+
} : C['slug'] extends keyof E ? {
|
|
172
|
+
readonly '~error': `"${C['slug']}" is already a collection`;
|
|
173
|
+
} : [keyof JoinEntries<C> & (keyof E | C['slug'])] extends [never] ? unknown : {
|
|
174
|
+
readonly '~error': `the join collection "${keyof JoinEntries<C> & (keyof E | C['slug']) & string}" is already a collection`;
|
|
175
|
+
};
|
|
176
|
+
type TenantCheck<C extends AnyCollection, Tenanted extends boolean> = [
|
|
177
|
+
TenantField<C>
|
|
178
|
+
] extends [never] ? unknown : [Tenanted] extends [false] ? {
|
|
179
|
+
readonly '~error': `"${C['slug']}" is tenanted, but the family has no tenantOf`;
|
|
180
|
+
} : unknown;
|
|
181
|
+
type CascadeOverrideCheck<C extends AnyCollection, O> = 'delete' extends keyof O ? [CascadeFields<C['schema']['shape']>] extends [never] ? unknown : {
|
|
182
|
+
readonly '~error': `${C['slug']} overrides delete, so ${C['slug']}.${CascadeFields<C['schema']['shape']> & string} cannot cascade; use restrict or nullify`;
|
|
183
|
+
} : unknown;
|
|
184
|
+
type Refused<Col extends AnyCollection, P extends EventPublisher> = {
|
|
185
|
+
[K in keyof Col['events']]: [Instance<Col['events'][K]>] extends [
|
|
186
|
+
Parameters<P['publish']>[0]
|
|
187
|
+
] ? never : Instance<Col['events'][K]> extends {
|
|
188
|
+
readonly token: infer T;
|
|
189
|
+
} ? T : never;
|
|
190
|
+
}[keyof Col['events']];
|
|
191
|
+
type RefusedBy<E extends Entries, P extends EventPublisher> = {
|
|
192
|
+
[S in keyof E]: Refused<E[S]['collection'], P>;
|
|
193
|
+
}[keyof E];
|
|
194
|
+
type EventsCheck<E extends Entries, P extends EventPublisher> = [
|
|
195
|
+
RefusedBy<E, P>
|
|
196
|
+
] extends [never] ? unknown : {
|
|
197
|
+
readonly '~error': `the events publisher does not take "${RefusedBy<E, P> & string}"`;
|
|
198
|
+
};
|
|
199
|
+
type DeclaredCheck<D> = [keyof D & LatticeCode] extends [never] ? unknown : {
|
|
200
|
+
readonly '~error': `"${keyof D & LatticeCode & string}" is a Lattice error code`;
|
|
201
|
+
};
|
|
202
|
+
/** The errors every procedure declares: Lattice's, then the app's. */
|
|
203
|
+
type Declared<D extends ErrorMap> = typeof declaredErrors & D;
|
|
204
|
+
/**
|
|
205
|
+
* A procedure as ts-pf's `procedure.input(In).output(Out)` types it: a
|
|
206
|
+
* caller sends the input schema's input type, so a defaulted field is
|
|
207
|
+
* optional, and the handler receives its output type.
|
|
208
|
+
*/
|
|
209
|
+
type Procedure<In, Out, D extends ErrorMap, Fx extends McpEffect> = ContractProcedure<InferSchemaInput<In>, InferSchemaOutput<Out>, Declared<D>, MetaOf<Fx>, InferSchemaOutput<In>>;
|
|
210
|
+
/**
|
|
211
|
+
* A procedure's meta: its summary and MCP effect, generated or from a
|
|
212
|
+
* method's statics. The effect is literal, so `@ts-pf/mcp`'s toolkit
|
|
213
|
+
* filters by it in types as the server does. Written out, not named, so an
|
|
214
|
+
* app's declarations name only what ts-pf exports (TS2883). The `lattice`
|
|
215
|
+
* key is runtime only: clients read it from the catalog, and no type needs
|
|
216
|
+
* it.
|
|
217
|
+
*/
|
|
218
|
+
type MetaOf<Fx extends McpEffect> = {
|
|
219
|
+
readonly docs: DocsMeta;
|
|
220
|
+
readonly mcp: {
|
|
221
|
+
readonly effect: Fx;
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
type Flat<T> = {
|
|
225
|
+
[K in keyof T]: T[K];
|
|
226
|
+
} & {};
|
|
227
|
+
/** The ref fields of `Col`, and the slug each refers to. */
|
|
228
|
+
type RefsOf<Col extends AnyCollection> = RefSlugs<Col['schema']['shape']>;
|
|
229
|
+
/** A read that populates: `get` takes refs and relations, `find` refs only. */
|
|
230
|
+
type PopulatingRead = 'get' | 'find';
|
|
231
|
+
/** The `many()` relations a read of `Col` may populate. */
|
|
232
|
+
type RelationsOf<Col extends AnyCollection, R extends PopulatingRead> = R extends 'get' ? keyof Col['relations'] : never;
|
|
233
|
+
/**
|
|
234
|
+
* What `populate` may name on read `R` of `Col`. A template literal, so an
|
|
235
|
+
* error prints the union rather than the alias.
|
|
236
|
+
*/
|
|
237
|
+
type PopulateKey<Col extends AnyCollection, R extends PopulatingRead> = `${(keyof RefsOf<Col> | RelationsOf<Col, R>) & string}`;
|
|
238
|
+
/** A populated ref's document: the target's, or `Withheld`. */
|
|
239
|
+
type Target<E extends Entries, Slug> = (Slug extends keyof E ? ClientDoc<E[Slug]['collection']> : never) | Withheld;
|
|
240
|
+
/** A ref field's expanded type, one target or a list. Null and undefined stay the field's own. */
|
|
241
|
+
type Swap<V, T> = V extends string ? T : V extends readonly string[] ? T[] : never;
|
|
242
|
+
/** A populated link of `Rel`: its fields and its target document. */
|
|
243
|
+
type Link<E extends Entries, Rel extends AnyRelation> = Flat<Omit<ClientDoc<Rel['through']>, 'id' | 'createdAt' | 'updatedAt' | Rel['parentField'] | Rel['targetField'] | TenantField<Rel['through']>> & {
|
|
244
|
+
doc: Target<E, Rel['target']>;
|
|
245
|
+
}>;
|
|
246
|
+
/** Each ref field of `Col`, populated. */
|
|
247
|
+
type ExpandedRefs<E extends Entries, Col extends AnyCollection> = {
|
|
248
|
+
[K in keyof RefsOf<Col>]: Swap<ClientDoc<Col>[K & keyof ClientDoc<Col>], Target<E, RefsOf<Col>[K]>>;
|
|
249
|
+
};
|
|
250
|
+
/** Each relation read `R` of `Col` may populate, as its links. */
|
|
251
|
+
type ExpandedLinks<E extends Entries, Col extends AnyCollection, R extends PopulatingRead> = {
|
|
252
|
+
[N in RelationsOf<Col, R>]: Link<E, Col['relations'][N]>[];
|
|
253
|
+
};
|
|
254
|
+
/** What `populate` gives on read `R` of `Col`: the expansion's `fields`. */
|
|
255
|
+
type Expanded<E extends Entries, Col extends AnyCollection, R extends PopulatingRead> = Flat<ExpandedRefs<E, Col> & ExpandedLinks<E, Col, R>>;
|
|
256
|
+
/**
|
|
257
|
+
* `Col`'s document as read `R` sends it: each ref field plain or
|
|
258
|
+
* populated, and each relation only when populated.
|
|
259
|
+
*/
|
|
260
|
+
type Wide<E extends Entries, Col extends AnyCollection, R extends PopulatingRead> = Flat<{
|
|
261
|
+
[K in keyof ClientDoc<Col>]: K extends keyof ExpandedRefs<E, Col> ? ClientDoc<Col>[K] | ExpandedRefs<E, Col>[K] : ClientDoc<Col>[K];
|
|
262
|
+
} & Partial<ExpandedLinks<E, Col, R>>>;
|
|
263
|
+
/**
|
|
264
|
+
* A read of `Col`, as `contractOf` builds it: its output follows `populate`
|
|
265
|
+
* through ts-pf's expandable outputs (0022), at the root (`get`) or in
|
|
266
|
+
* `docs` (`find`, `list`). Plain when `Col` has no ref field.
|
|
267
|
+
*/
|
|
268
|
+
type Read<E extends Entries, Col extends AnyCollection, In, R extends PopulatingRead, D extends ErrorMap> = [PopulateKey<Col, R>] extends [never] ? never : ContractProcedure<Flat<InferSchemaInput<In> & {
|
|
269
|
+
populate?: PopulateKey<Col, R>[];
|
|
270
|
+
}>, R extends 'get' ? Wide<E, Col, R> : {
|
|
271
|
+
docs: Wide<E, Col, R>[];
|
|
272
|
+
next: string | null;
|
|
273
|
+
}, Declared<D>, MetaOf<EffectOf<R>>, Flat<InferSchemaOutput<In> & {
|
|
274
|
+
populate?: PopulateKey<Col, R>[] | undefined;
|
|
275
|
+
}>, Expansion<'populate', R extends 'get' ? [] : ['docs'], Expanded<E, Col, R>>>;
|
|
276
|
+
/** `Read`, or the plain procedure when there is nothing to populate. */
|
|
277
|
+
type ReadOr<E extends Entries, Col extends AnyCollection, In, Out, R extends PopulatingRead, D extends ErrorMap> = [Read<E, Col, In, R, D>] extends [never] ? Procedure<In, Out, D, EffectOf<R>> : Read<E, Col, In, R, D>;
|
|
278
|
+
/**
|
|
279
|
+
* Generated operation `A` of entry `S`. An overridden read is plain: the
|
|
280
|
+
* override serves it, and Lattice's population runs in the generated read.
|
|
281
|
+
*/
|
|
282
|
+
type Operation<E extends Entries, S extends Entry, A extends Action, D extends ErrorMap> = A extends 'get' | 'find' ? A extends keyof S['overrides'] ? Procedure<Ops<S['collection']>[A]['input'], ClientOut<S['collection'], A>, D, EffectOf<A>> : ReadOr<E, S['collection'], Ops<S['collection']>[A]['input'], ClientOut<S['collection'], A>, A, D> : Procedure<Ops<S['collection']>[A]['input'], ClientOut<S['collection'], A>, D, EffectOf<A>>;
|
|
283
|
+
/** Operation `Op` of relation `R` of entry `S`. An overridden list is plain. */
|
|
284
|
+
type RelationOperation<E extends Entries, S extends Entry, R extends keyof S['collection']['relations'], Op extends RelationOp, D extends ErrorMap> = Op extends 'list' ? R extends keyof S['overrides'] ? 'list' extends keyof S['overrides'][R] ? Procedure<S['collection']['relations'][R]['list']['input'], S['collection']['relations'][R]['list']['output'], D, EffectOf<'list'>> : RelationList<E, S, R, D> : RelationList<E, S, R, D> : Procedure<S['collection']['relations'][R][Op]['input'], S['collection']['relations'][R][Op]['output'], D, EffectOf<Op>>;
|
|
285
|
+
type RelationList<E extends Entries, S extends Entry, R extends keyof S['collection']['relations'], D extends ErrorMap> = ReadOr<E, S['collection']['relations'][R]['through'], S['collection']['relations'][R]['list']['input'], S['collection']['relations'][R]['list']['output'], 'find', D>;
|
|
286
|
+
/** One collection's contract slice: the generated operations plus its methods. */
|
|
287
|
+
type Slice<E extends Entries, S extends Entry, D extends ErrorMap> = {
|
|
288
|
+
[K in Action | (keyof S['methods'] & string)]: K extends Action ? Operation<E, S, K, D> : Procedure<S['methods'][K]['input'], S['methods'][K]['output'], D, S['methods'][K]['effect']>;
|
|
289
|
+
} & {
|
|
290
|
+
[R in keyof S['collection']['relations']]: {
|
|
291
|
+
[Op in RelationOp]: RelationOperation<E, S, R, Op, D>;
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
/** Each ref whose slug is not a collection of `E`, as `slug.field → target`. */
|
|
295
|
+
type Unresolved<E extends Entries> = {
|
|
296
|
+
[S in keyof E]: {
|
|
297
|
+
[K in keyof RefSlugs<E[S]['collection']['schema']['shape']>]: RefSlugs<E[S]['collection']['schema']['shape']>[K] extends keyof E ? never : `${S & string}.${K & string} refers to "${RefSlugs<E[S]['collection']['schema']['shape']>[K] & string}"`;
|
|
298
|
+
}[keyof RefSlugs<E[S]['collection']['schema']['shape']>];
|
|
299
|
+
}[keyof E];
|
|
300
|
+
type SlugsCheck<E extends Entries> = [Unresolved<E>] extends [never] ? unknown : {
|
|
301
|
+
readonly '~error': `${Unresolved<E>}, which is not a collection of this framework`;
|
|
302
|
+
};
|
|
303
|
+
/** The generated ts-pf contract: one slice per collection. */
|
|
304
|
+
export type Contract<E extends Entries, D extends ErrorMap> = {
|
|
305
|
+
[S in keyof Sliced<E>]: Slice<E, E[S], D>;
|
|
306
|
+
} & ContractRouterBrand;
|
|
307
|
+
/** The contract as `.contract` gives it: with an `'~error'` key while a ref is unresolved. */
|
|
308
|
+
type CheckedContract<E extends Entries, D extends ErrorMap> = Contract<E, D> & SlugsCheck<E>;
|
|
309
|
+
type Instance<C> = C extends Ctor<infer I> ? I : never;
|
|
310
|
+
/** The instance of a declared class, or of each relation operation's. */
|
|
311
|
+
type InstanceOf<V, Ctx> = V extends Ctor<infer I> ? I & Executable<Ctx> : {
|
|
312
|
+
[Op in keyof V]: Instance<V[Op]> & Executable<Ctx>;
|
|
313
|
+
};
|
|
314
|
+
type Instances<E extends Entries, Kind extends 'methods' | 'overrides', Ctx> = {
|
|
315
|
+
[S in keyof E as [keyof E[S][Kind]] extends [never] ? never : S]: {
|
|
316
|
+
[N in keyof E[S][Kind]]: InstanceOf<E[S][Kind][N], Ctx>;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
/** Each collection's repo, by slug. */
|
|
320
|
+
type Repos<E extends Entries> = {
|
|
321
|
+
[S in keyof E]: Repo<E[S]['collection']>;
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* A generated operation's body, as an override calls it: the operation
|
|
325
|
+
* without the family's guards, logging and spans, which the override's own
|
|
326
|
+
* use case has run (0036). Typed as a direct caller sees the generated use
|
|
327
|
+
* case.
|
|
328
|
+
*/
|
|
329
|
+
type GeneratedBody<Schemas_ extends {
|
|
330
|
+
readonly input: z.core.$ZodType;
|
|
331
|
+
readonly output: z.core.$ZodType;
|
|
332
|
+
}, Ctx> = (ctx: Ctx, input: z.input<Schemas_['input']>) => Promise<z.output<Schemas_['output']>>;
|
|
333
|
+
/**
|
|
334
|
+
* The body of each operation the app overrides, by slug, and of each
|
|
335
|
+
* overridden relation operation by relation name: what an override may
|
|
336
|
+
* call. An operation that is not overridden is not here, so no override
|
|
337
|
+
* reaches another operation's body.
|
|
338
|
+
*
|
|
339
|
+
* The variances are stated, because measuring them instantiates every
|
|
340
|
+
* operation's input and output for a marker `E`, which cost an app over a
|
|
341
|
+
* million instantiations. `Ctx` appears only in parameters, so it is `in`.
|
|
342
|
+
* `E` decides the keys, the inputs and the outputs, so it is invariant: do
|
|
343
|
+
* not loosen it.
|
|
344
|
+
*/
|
|
345
|
+
type Generated<in out E extends Entries, in Ctx> = {
|
|
346
|
+
[S in keyof E as [keyof E[S]['overrides']] extends [never] ? never : S]: {
|
|
347
|
+
[A in keyof E[S]['overrides'] & Action]: GeneratedBody<Ops<E[S]['collection']>[A], Ctx>;
|
|
348
|
+
} & {
|
|
349
|
+
[R in keyof E[S]['overrides'] & keyof E[S]['collection']['relations']]: {
|
|
350
|
+
[Op in keyof E[S]['overrides'][R] & RelationOp]: GeneratedBody<E[S]['collection']['relations'][R][Op], Ctx>;
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
/**
|
|
355
|
+
* What an instance factory receives: what exists before the use cases. The
|
|
356
|
+
* overrides factory also receives the generated operations it may call.
|
|
357
|
+
*/
|
|
358
|
+
type Wiring<E extends Entries, Kind, Ctx> = Kind extends 'overrides' ? {
|
|
359
|
+
readonly repos: Repos<E>;
|
|
360
|
+
readonly generated: Generated<E, Ctx>;
|
|
361
|
+
} : {
|
|
362
|
+
readonly repos: Repos<E>;
|
|
363
|
+
};
|
|
364
|
+
/**
|
|
365
|
+
* One kind of instance `build()` takes: a factory that returns one instance
|
|
366
|
+
* per attached class, by slug and name. Required when a collection declared
|
|
367
|
+
* that kind.
|
|
368
|
+
*/
|
|
369
|
+
type Factory<E extends Entries, Kind extends 'methods' | 'overrides', Ctx> = [
|
|
370
|
+
keyof Instances<E, Kind, Ctx>
|
|
371
|
+
] extends [never] ? {
|
|
372
|
+
readonly [K in Kind]?: (wiring: Wiring<E, Kind, Ctx>) => Record<never, never>;
|
|
373
|
+
} : {
|
|
374
|
+
readonly [K in Kind]: (wiring: Wiring<E, Kind, Ctx>) => Instances<E, Kind, Ctx>;
|
|
375
|
+
};
|
|
376
|
+
/** What `build()` takes: the ports, and the method and override instances. */
|
|
377
|
+
type BuildOptions<E extends Entries, P extends EventPublisher, Actor, Ctx> = {
|
|
378
|
+
/**
|
|
379
|
+
* Where every collection's documents live. A ref to a slug the definition
|
|
380
|
+
* lacks is reported here, because the store is what every ref needs.
|
|
381
|
+
*/
|
|
382
|
+
readonly store: CollectionStore & SlugsCheck<E>;
|
|
383
|
+
/**
|
|
384
|
+
* Decides access instead of the functions given at `.collection()`, such
|
|
385
|
+
* as an adapter of another decision engine.
|
|
386
|
+
*/
|
|
387
|
+
readonly access?: Access<Actor>;
|
|
388
|
+
/**
|
|
389
|
+
* The app's domain event publisher. Generated writes publish each
|
|
390
|
+
* collection's events through it. An app with no subscribers passes one
|
|
391
|
+
* that does nothing.
|
|
392
|
+
*/
|
|
393
|
+
readonly events: P & EventsCheck<E, P>;
|
|
394
|
+
} & Factory<E, 'methods', Ctx> & Factory<E, 'overrides', Ctx>;
|
|
395
|
+
/**
|
|
396
|
+
* A generated use case as a direct caller sees it. Its `execute` parses its
|
|
397
|
+
* own input, so it takes the schema's input type: defaulted fields may be
|
|
398
|
+
* left out.
|
|
399
|
+
*/
|
|
400
|
+
type GeneratedUseCase<Col extends AnyCollection, A extends Action, Ctx> = {
|
|
401
|
+
execute(ctx: Ctx, input: z.input<Ops<Col>[A]['input']>): Promise<z.output<Ops<Col>[A]['output']>>;
|
|
402
|
+
};
|
|
403
|
+
/** A generated relation operation as a direct caller sees it. */
|
|
404
|
+
type GeneratedRelationUseCase<Schemas_ extends {
|
|
405
|
+
readonly input: z.core.$ZodType;
|
|
406
|
+
readonly output: z.core.$ZodType;
|
|
407
|
+
}, Ctx> = {
|
|
408
|
+
execute(ctx: Ctx, input: z.input<Schemas_['input']>): Promise<z.output<Schemas_['output']>>;
|
|
409
|
+
};
|
|
410
|
+
/**
|
|
411
|
+
* A generated read as a direct caller sees it: its output follows
|
|
412
|
+
* `populate`, as a client's does.
|
|
413
|
+
*/
|
|
414
|
+
export interface ReadUseCase<Proc, Ctx> {
|
|
415
|
+
execute<const P extends readonly ExpansionKeys<Proc>[] = readonly []>(ctx: Ctx, input: InferContractProcedure<Proc>['input'] & {
|
|
416
|
+
readonly populate?: P;
|
|
417
|
+
}): Promise<InferExpandedOutput<Proc, P>>;
|
|
418
|
+
}
|
|
419
|
+
type ExpansionKeys<T> = InferContractProcedure<T>['expand'] extends infer X extends Expansion ? keyof X['fields'] & string : never;
|
|
420
|
+
/** The use case of generated operation `A`: a populating read, or plain. */
|
|
421
|
+
type OperationUseCase<E extends Entries, S extends Entry, A extends Action, Ctx> = [InferContractProcedure<Operation<E, S, A, ErrorMap>>['expand']] extends [
|
|
422
|
+
never
|
|
423
|
+
] ? GeneratedUseCase<S['collection'], A, Ctx> : ReadUseCase<Operation<E, S, A, ErrorMap>, Ctx>;
|
|
424
|
+
/** The instances of one collection's relation operations. */
|
|
425
|
+
type RelationUseCases<E extends Entries, S extends Entry, Ctx> = {
|
|
426
|
+
[R in keyof S['collection']['relations']]: {
|
|
427
|
+
[Op in RelationOp]: R extends keyof S['overrides'] ? Op extends keyof S['overrides'][R] ? Instance<S['overrides'][R][Op]> : RelationUseCase<E, S, R, Op, Ctx> : RelationUseCase<E, S, R, Op, Ctx>;
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
/** The generated use case of relation operation `Op`: list populates. */
|
|
431
|
+
type RelationUseCase<E extends Entries, S extends Entry, R extends keyof S['collection']['relations'], Op extends RelationOp, Ctx> = Op extends 'list' ? ReadUseCase<RelationList<E, S, R, ErrorMap>, Ctx> : GeneratedRelationUseCase<S['collection']['relations'][R][Op], Ctx>;
|
|
432
|
+
/** The instance that serves each procedure: generated, override or method. */
|
|
433
|
+
type UseCases<E extends Entries, Ctx> = {
|
|
434
|
+
[S in keyof Sliced<E>]: {
|
|
435
|
+
[A in Action]: A extends keyof E[S]['overrides'] ? Instance<E[S]['overrides'][A]> : OperationUseCase<E, E[S], A, Ctx>;
|
|
436
|
+
} & {
|
|
437
|
+
[N in keyof E[S]['methods']]: Instance<E[S]['methods'][N]>;
|
|
438
|
+
} & RelationUseCases<E, E[S], Ctx>;
|
|
439
|
+
};
|
|
440
|
+
/** What `build()` returns. */
|
|
441
|
+
type Built<E extends Entries, D extends ErrorMap, Actor> = {
|
|
442
|
+
readonly app: ImplementedRouter<Contract<E, D>, CallContext<Actor>>;
|
|
443
|
+
readonly useCases: UseCases<E, FamilyContext<Actor>>;
|
|
444
|
+
readonly repos: Repos<E>;
|
|
445
|
+
readonly onError: typeof unexpectedErrors;
|
|
446
|
+
/**
|
|
447
|
+
* Creates the indexes each collection declares, collection by collection
|
|
448
|
+
* in definition order, and never drops one. Await it after the store has
|
|
449
|
+
* started and before serving.
|
|
450
|
+
*/
|
|
451
|
+
readonly ensure: () => Promise<void>;
|
|
452
|
+
/**
|
|
453
|
+
* The context for a direct `useCases.*.execute` call: the caller's, plus
|
|
454
|
+
* the call's access. Access answers are kept on it, so make one per call
|
|
455
|
+
* or per job.
|
|
456
|
+
*/
|
|
457
|
+
readonly context: (base: CallContext<Actor>) => FamilyContext<Actor>;
|
|
458
|
+
};
|
|
459
|
+
/** The app's client errors: its declared map, and the mapper that builds them. */
|
|
460
|
+
type AppErrors<D extends ErrorMap> = {
|
|
461
|
+
readonly declared: D;
|
|
462
|
+
/** Returns the error a client receives. ts-pf sends one it returns unchanged as INTERNAL. */
|
|
463
|
+
readonly map: (error: unknown) => unknown;
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* An app's definition: its family, its error map and its collections, with
|
|
467
|
+
* the methods and overrides attached to them. It holds no ports, so its
|
|
468
|
+
* `contract` needs no store and no publisher. `build()` wires it.
|
|
469
|
+
*/
|
|
470
|
+
export declare class Framework<Actor, D extends ErrorMap, E extends Entries, Tenanted extends boolean = boolean> {
|
|
471
|
+
#private;
|
|
472
|
+
private readonly family;
|
|
473
|
+
private readonly errors;
|
|
474
|
+
private readonly entries;
|
|
475
|
+
constructor(family: Family<Actor, Tenanted>, errors: AppErrors<ErrorMap>, entries: readonly Entry[]);
|
|
476
|
+
/**
|
|
477
|
+
* Adds a collection, and the methods and overrides attached to it. Its slug
|
|
478
|
+
* becomes its contract slice.
|
|
479
|
+
*/
|
|
480
|
+
collection<C extends AnyCollection, const R extends AccessReturns<R, C>, M extends {
|
|
481
|
+
[N in keyof M]: MethodCheck<M[N], C, N, FamilyContext<Actor>>;
|
|
482
|
+
} = Record<never, never>, O extends {
|
|
483
|
+
[A in keyof O]: OverrideCheck<O[A], C, A, FamilyContext<Actor>>;
|
|
484
|
+
} = Record<never, never>>(collection: C & SlugCheck<C, E> & TenantCheck<C, Tenanted>, options: {
|
|
485
|
+
/**
|
|
486
|
+
* Who may do what (0021): `read` (find and get), `create`, `update`,
|
|
487
|
+
* `delete`, and one per method. A missing function denies.
|
|
488
|
+
*/
|
|
489
|
+
readonly access: AccessFns<Actor, R, C>;
|
|
490
|
+
readonly methods?: M;
|
|
491
|
+
readonly overrides?: O;
|
|
492
|
+
} & FieldsOption<Actor, C> & AccessCheck<R, M, C> & CascadeOverrideCheck<C, O>): Framework<Actor, D, E & Record<C['slug'], {
|
|
493
|
+
collection: C;
|
|
494
|
+
methods: M;
|
|
495
|
+
overrides: O;
|
|
496
|
+
join: false;
|
|
497
|
+
}> & JoinEntries<C>, Tenanted>;
|
|
498
|
+
/**
|
|
499
|
+
* The ts-pf contract: one slice per collection. Built on first read and
|
|
500
|
+
* the same object after, so clients and codegen import it with no ports.
|
|
501
|
+
*/
|
|
502
|
+
get contract(): CheckedContract<E, D>;
|
|
503
|
+
/**
|
|
504
|
+
* Wires the definition to its ports: the implemented router, the use
|
|
505
|
+
* cases, the repos, and the edge's `onError`. `methods` and `overrides`
|
|
506
|
+
* build the declared instances from the repos. The overload states the
|
|
507
|
+
* precise types; the implementation works on the runtime shape, which a
|
|
508
|
+
* loop over collections cannot express as a mapped type.
|
|
509
|
+
*/
|
|
510
|
+
build<P extends EventPublisher>(options: BuildOptions<E, P, Actor, FamilyContext<Actor>>): Built<E, D, Actor>;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* The edge's `onError`, such as `FetchHandler`'s: it logs each unexpected
|
|
514
|
+
* error (ts-pf's `isUnexpectedError`) that no family logged as a failure. A
|
|
515
|
+
* throw inside `execute` reaches the edge unchanged, and the family has
|
|
516
|
+
* logged it once already. Logged here: a throw the family never saw, such as
|
|
517
|
+
* the context factory's or ts-pf's output check, and a refusal the app's
|
|
518
|
+
* map keeps from clients, which the family logged only at info. Typed
|
|
519
|
+
* structurally, so core needs no `@ts-pf/server-http`: it fits
|
|
520
|
+
* `FetchHandlerOnError`, which also passes the request.
|
|
521
|
+
*/
|
|
522
|
+
declare function unexpectedErrors(logger: Logger): (error: unknown) => void;
|
|
523
|
+
/**
|
|
524
|
+
* The finished root router. The runtime contract's slice node is
|
|
525
|
+
* `RuntimeProcedure | RuntimeRelation`, and ts-pf (1.0) types a node that
|
|
526
|
+
* may be a procedure as one: `IsContractProcedure` of the union is true, so
|
|
527
|
+
* `RouterImplCheck` wants an implemented procedure where a relation's
|
|
528
|
+
* router sits. The root implementer's `router()` is therefore called
|
|
529
|
+
* through its runtime shape, and its result typed by `hasRouter`. At
|
|
530
|
+
* runtime ts-pf still checks the tree against the whole contract, sets each
|
|
531
|
+
* procedure's path and adds the root middleware. This function and
|
|
532
|
+
* `hasRouter` go when ts-pf ships a `RouterImplCheck` that decides a mixed
|
|
533
|
+
* node by the implementation's node, or a public guard for an implemented
|
|
534
|
+
* router. Exported for its test only; it is not in index.ts.
|
|
535
|
+
*/
|
|
536
|
+
export declare function rootRouter<Ctx>(implementer: object, tree: object): ImplementedRouter<unknown, Ctx>;
|
|
537
|
+
/**
|
|
538
|
+
* Starts an app's definition: the family every generated and hand-written
|
|
539
|
+
* use case extends, and the app's client errors. It takes no ports;
|
|
540
|
+
* `build()` does.
|
|
541
|
+
*/
|
|
542
|
+
export declare function framework<Actor, Tenanted extends boolean, D extends ErrorMap = Record<never, never>>(options: {
|
|
543
|
+
family: Family<Actor, Tenanted>;
|
|
544
|
+
/**
|
|
545
|
+
* The app's client errors, such as app-template's `clientErrors` and
|
|
546
|
+
* `toRpcError`. Every procedure declares them next to Lattice's codes. An
|
|
547
|
+
* app with no domain errors leaves this out.
|
|
548
|
+
*/
|
|
549
|
+
errors?: {
|
|
550
|
+
readonly declared: D & DeclaredCheck<D>;
|
|
551
|
+
readonly map: (error: unknown) => unknown;
|
|
552
|
+
};
|
|
553
|
+
}): Framework<Actor, D, Record<never, never>, Tenanted>;
|
|
554
|
+
export {};
|
|
555
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAO5C,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EAIvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAGL,KAAK,i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