foldkit-remote-server 0.19.0 → 0.21.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 +215 -11
- package/dist/fetch.d.mts +55 -4
- package/dist/fetch.d.mts.map +1 -1
- package/dist/fetch.mjs +259 -26
- package/dist/fetch.mjs.map +1 -1
- package/dist/{index-BnaRbvjr.d.mts → index-pMrHmWZt.d.mts} +116 -18
- package/dist/index-pMrHmWZt.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{src-ZV9pARkU.mjs → src-CHkHaItI.mjs} +313 -74
- package/dist/src-CHkHaItI.mjs.map +1 -0
- package/package.json +7 -7
- package/dist/index-BnaRbvjr.d.mts.map +0 -1
- package/dist/src-ZV9pARkU.mjs.map +0 -1
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
import { Cause, Context, Data, Duration, Effect, Layer, Option, Schema, Stream } from "effect";
|
|
2
2
|
import { AnyQuery, AnyWrite, Computation, EntityRef, ExprContext, MemoryOperators, QueryEvaluateError, Row, WriteAssignment, assertSupported as assertSupported$1, evaluate as evaluate$1, supported } from "foldkit-entity";
|
|
3
|
-
import { Boundary, ConnectionChangeSchema, ConnectionIdentity, ConnectionSpec, Diagnostic, LiveChange, MutationDescriptor, NormalizedPatch, QueryDescriptor, QueryWindow, RelationRequirement, RemoteClient, RemoteDescriptor, RemoteForbidden, RemoteJsonAnswer, RemoteReadError, RemoteRpcClient, RemoteUnauthenticated, Requirement } from "foldkit-remote";
|
|
3
|
+
import { Boundary, CachePolicy, ConnectionChangeSchema, ConnectionIdentity, ConnectionSpec, Diagnostic, LiveChange, MutationDescriptor, NormalizedPatch, QueryDescriptor, QueryWindow, RelationRequirement, RemoteClient, RemoteDescriptor, RemoteForbidden, RemoteJsonAnswer, RemoteReadError, RemoteRpcClient, RemoteUnauthenticated, Requirement } from "foldkit-remote";
|
|
4
|
+
import { HttpServerRequest, HttpServerResponse } from "effect/http";
|
|
5
|
+
/**
|
|
6
|
+
* Effect HTTP middleware refusing a request body over `maxBytes` (default
|
|
7
|
+
* 1 MiB, `serveFetch`'s) with a 413 and Remote's `tooLarge` answer, before
|
|
8
|
+
* the endpoint reads it. For an endpoint that serves `RemoteRpc` through
|
|
9
|
+
* `RpcServer`, where Effect's own `MaxBodySize` fails the body read as a
|
|
10
|
+
* defect, a 500:
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* HttpRouter.add('POST', '/rpc', bodyLimit(64 * 1024)(rpcHttpEffect))
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* A body within the limit reaches the endpoint whole, read once.
|
|
17
|
+
*/
|
|
18
|
+
declare const bodyLimit: (maxBytes?: number) => <E, R>(endpoint: Effect.Effect<HttpServerResponse.HttpServerResponse, E, R>) => Effect.Effect<HttpServerResponse.HttpServerResponse, E, R | HttpServerRequest.HttpServerRequest>;
|
|
4
19
|
/** A failure on this side, answered "Internal error"; the caller is told nothing of it. */
|
|
5
20
|
interface ServerDefect extends Diagnostic {
|
|
6
21
|
readonly _tag: 'ServerDefect';
|
|
7
22
|
readonly cause: Cause.Cause<unknown>;
|
|
8
23
|
}
|
|
9
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* A mutation that committed, answered without the read of the rows it names or
|
|
26
|
+
* of a list it was asked for: the client reads them again.
|
|
27
|
+
*/
|
|
10
28
|
interface AnswerUnread extends Diagnostic {
|
|
11
29
|
readonly _tag: 'AnswerUnread';
|
|
12
30
|
readonly mutation: string;
|
|
@@ -34,8 +52,19 @@ interface ClockSkewed extends Diagnostic {
|
|
|
34
52
|
/** The bound, in milliseconds. */
|
|
35
53
|
readonly bound: number;
|
|
36
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* A read the server judged public answered otherwise for who asked than for
|
|
57
|
+
* the visitor (`serveFetch`'s `cache.check`): its declaration or a source's
|
|
58
|
+
* `read` depends on who asks, so it must not be cached. The asker was given
|
|
59
|
+
* their own answer.
|
|
60
|
+
*/
|
|
61
|
+
interface CachedReadDiffers extends Diagnostic {
|
|
62
|
+
readonly _tag: 'CachedReadDiffers';
|
|
63
|
+
/** The request, as the JSON it was sent as. */
|
|
64
|
+
readonly request: string;
|
|
65
|
+
}
|
|
37
66
|
/** Every diagnostic a Remote server reports. */
|
|
38
|
-
type RemoteServerDiagnostic = ServerDefect | AnswerUnread | PublishFailed | ClockSkewed;
|
|
67
|
+
type RemoteServerDiagnostic = ServerDefect | AnswerUnread | PublishFailed | ClockSkewed | CachedReadDiffers;
|
|
39
68
|
declare const RemoteServerError_base: Schema.Class<RemoteServerError, Schema.TaggedStruct<"RemoteServerError", {
|
|
40
69
|
readonly message: Schema.String;
|
|
41
70
|
}>, Cause.YieldableError>;
|
|
@@ -141,6 +170,12 @@ interface EntitySource<P, R = never> {
|
|
|
141
170
|
* without one.
|
|
142
171
|
*/
|
|
143
172
|
readonly perViewer?: ReadonlyArray<string> | undefined;
|
|
173
|
+
/**
|
|
174
|
+
* How long a read of these rows stays fresh, from the Entity's declaration
|
|
175
|
+
* (`EdgeCache.of`). It never makes a read public: `serveFetch` caches one
|
|
176
|
+
* only where nothing about it depends on who asks.
|
|
177
|
+
*/
|
|
178
|
+
readonly cache?: CachePolicy | undefined;
|
|
144
179
|
}
|
|
145
180
|
/** What `EntitySource.filter` decides for one read. */
|
|
146
181
|
interface ReadPlan {
|
|
@@ -200,6 +235,45 @@ interface WriteRequirement {
|
|
|
200
235
|
readonly holds: RowRequirement;
|
|
201
236
|
readonly reason: Option.Option<string>;
|
|
202
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* What each row of `entity` a cascading delete would take must hold (#348):
|
|
240
|
+
* that Entity's `Delete` rule for the person deleting. A writer with
|
|
241
|
+
* `cascades` refuses the whole delete as `Forbidden` when any such row does
|
|
242
|
+
* not, and removes nothing. Only rows reached through a relation whose
|
|
243
|
+
* `authorizedBy` is `child` are held to it.
|
|
244
|
+
*/
|
|
245
|
+
interface CascadeRequirement {
|
|
246
|
+
readonly entity: string;
|
|
247
|
+
readonly requires: WriteRequirement;
|
|
248
|
+
}
|
|
249
|
+
/** A row a delete removed with the row it was asked to delete (`onDelete: 'cascade'`). */
|
|
250
|
+
interface CascadedRow {
|
|
251
|
+
readonly entity: string;
|
|
252
|
+
readonly id: string;
|
|
253
|
+
/** Each `one` relation it pointed, by key: what the answer re-reads (the counts it moved). */
|
|
254
|
+
readonly links: Readonly<Record<string, Option.Option<EntityRef>>>;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* What a writer's `delete` did. `Deleted`: the row is gone, with `cascaded`,
|
|
258
|
+
* the rows declared to go with it (`Relation.one(…, { onDelete: 'cascade' })`)
|
|
259
|
+
* that the principal may see. `Absent`: no row, so nothing to delete (a
|
|
260
|
+
* retry's case). `Moved`: the row is there at another revision, and stays.
|
|
261
|
+
*/
|
|
262
|
+
type DeleteOutcome = Data.TaggedEnum<{
|
|
263
|
+
Deleted: {
|
|
264
|
+
readonly cascaded: ReadonlyArray<CascadedRow>;
|
|
265
|
+
};
|
|
266
|
+
Absent: {};
|
|
267
|
+
Moved: {};
|
|
268
|
+
}>;
|
|
269
|
+
declare const DeleteOutcome: Data.TaggedEnum.Constructor<{
|
|
270
|
+
readonly _tag: "Absent";
|
|
271
|
+
} | {
|
|
272
|
+
readonly _tag: "Deleted";
|
|
273
|
+
readonly cascaded: ReadonlyArray<CascadedRow>;
|
|
274
|
+
} | {
|
|
275
|
+
readonly _tag: "Moved";
|
|
276
|
+
}>;
|
|
203
277
|
interface EntityWriter<P, R = never> {
|
|
204
278
|
readonly entity: string;
|
|
205
279
|
/**
|
|
@@ -263,6 +337,15 @@ interface EntityWriter<P, R = never> {
|
|
|
263
337
|
* a writer without it.
|
|
264
338
|
*/
|
|
265
339
|
readonly invariants?: true;
|
|
340
|
+
/**
|
|
341
|
+
* Whether `delete` removes, in the transaction that deletes the row, every
|
|
342
|
+
* row declared to go with it (`Entity.cascading`), and answers them as
|
|
343
|
+
* `cascaded`; and holds those rows to the `cascading` requirements it is
|
|
344
|
+
* given, judged before anything is removed, refusing the whole delete
|
|
345
|
+
* where one fails. `RemoteServer.write` refuses a delete of an Entity that
|
|
346
|
+
* cascades through a writer without it.
|
|
347
|
+
*/
|
|
348
|
+
readonly cascades?: true;
|
|
266
349
|
/**
|
|
267
350
|
* Why this writer cannot land `write`, each a sentence; none when it can.
|
|
268
351
|
* `RemoteServer.write` asks once, where the write is registered, for what
|
|
@@ -318,7 +401,7 @@ interface EntityWriter<P, R = never> {
|
|
|
318
401
|
/** What the row must hold, judged where it is written; only a writer with `requires` is given one. */
|
|
319
402
|
readonly requires?: WriteRequirement | undefined;
|
|
320
403
|
readonly principal: P;
|
|
321
|
-
}) => Effect.Effect<Option.Option<Readonly<Record<string, unknown>>>, RemoteServerError | RemoteForbidden | RemoteUnmet | RemoteInvalid, R>;
|
|
404
|
+
}) => Effect.Effect<Option.Option<Readonly<Record<string, unknown>>>, RemoteServerError | RemoteForbidden | RemoteUnauthenticated | RemoteUnmet | RemoteInvalid, R>;
|
|
322
405
|
/**
|
|
323
406
|
* Inserts the row and answers it. An id already taken fails with
|
|
324
407
|
* `RemoteTaken`, whatever the row there holds and whether its asker may see
|
|
@@ -339,11 +422,11 @@ interface EntityWriter<P, R = never> {
|
|
|
339
422
|
readonly values: Readonly<Record<string, unknown>>;
|
|
340
423
|
readonly links: Readonly<Record<string, Option.Option<EntityRef>>>;
|
|
341
424
|
readonly principal: P;
|
|
342
|
-
}) => Effect.Effect<Readonly<Record<string, unknown>>, RemoteServerError | RemoteForbidden | RemoteInvalid | RemoteTaken, R>;
|
|
425
|
+
}) => Effect.Effect<Readonly<Record<string, unknown>>, RemoteServerError | RemoteForbidden | RemoteUnauthenticated | RemoteInvalid | RemoteTaken, R>;
|
|
343
426
|
/**
|
|
344
|
-
* Deletes the row, while it is still at the revision when one is expected
|
|
345
|
-
* `
|
|
346
|
-
*
|
|
427
|
+
* Deletes the row, while it is still at the revision when one is expected,
|
|
428
|
+
* and, when it `cascades`, the rows declared to go with it, in the same
|
|
429
|
+
* transaction: a `DeleteOutcome`.
|
|
347
430
|
*/
|
|
348
431
|
readonly delete: (context: {
|
|
349
432
|
readonly id: string;
|
|
@@ -354,8 +437,13 @@ interface EntityWriter<P, R = never> {
|
|
|
354
437
|
readonly when: Option.Option<WriteWhen>;
|
|
355
438
|
/** What the row must hold, judged where it is deleted; only a writer with `requires` is given one. */
|
|
356
439
|
readonly requires?: WriteRequirement | undefined;
|
|
440
|
+
/**
|
|
441
|
+
* What the rows a cascade takes must hold, by Entity; only a writer with
|
|
442
|
+
* `cascades` is given them.
|
|
443
|
+
*/
|
|
444
|
+
readonly cascading?: ReadonlyArray<CascadeRequirement> | undefined;
|
|
357
445
|
readonly principal: P;
|
|
358
|
-
}) => Effect.Effect<
|
|
446
|
+
}) => Effect.Effect<DeleteOutcome, RemoteServerError | RemoteForbidden | RemoteUnauthenticated | RemoteUnmet, R>;
|
|
359
447
|
/**
|
|
360
448
|
* The row as `principal` may see it, under the read rule its Source applies:
|
|
361
449
|
* none when there is no such row, or it is hidden. Given, a write's answer
|
|
@@ -466,7 +554,7 @@ interface MutationSource<P, R = never> {
|
|
|
466
554
|
readonly entity: string;
|
|
467
555
|
readonly id: string;
|
|
468
556
|
}>;
|
|
469
|
-
}, RemoteServerError | MutationRefused | RemoteForbidden, R>;
|
|
557
|
+
}, RemoteServerError | MutationRefused | RemoteForbidden | RemoteUnauthenticated, R>;
|
|
470
558
|
}
|
|
471
559
|
interface QueryPage {
|
|
472
560
|
readonly edges: ReadonlyArray<{
|
|
@@ -498,9 +586,11 @@ interface QuerySource<P, R = never> {
|
|
|
498
586
|
}) => Effect.Effect<QueryPage, RemoteServerError, R>;
|
|
499
587
|
/** The rule that decides which rows the query lists. See `EntitySource.visible`. */
|
|
500
588
|
readonly visible?: unknown;
|
|
589
|
+
/** How long an answer stays fresh, from the Query's declaration. See `EntitySource.cache`. */
|
|
590
|
+
readonly cache?: CachePolicy | undefined;
|
|
501
591
|
}
|
|
502
592
|
/**
|
|
503
|
-
* A list a subscriber reads live (`Data
|
|
593
|
+
* A list a subscriber reads live (`liveQuery(Data, …)`), admitted
|
|
504
594
|
* and resolved by `handlers`: what a live source diffs to tell a row that
|
|
505
595
|
* joins, changes or leaves it.
|
|
506
596
|
*/
|
|
@@ -771,7 +861,7 @@ declare const RemoteServer: {
|
|
|
771
861
|
readonly operation: Option.Option<string>;
|
|
772
862
|
/** The write's time: the client's within the server's `clockSkew`, or its own; see `MutationSource`. */
|
|
773
863
|
readonly now: number;
|
|
774
|
-
}) => Effect.Effect<MutationOutcome<Output>, RemoteServerError | MutationRefused | RemoteForbidden, R>) => MutationSource<P, R>;
|
|
864
|
+
}) => Effect.Effect<MutationOutcome<Output>, RemoteServerError | MutationRefused | RemoteForbidden | RemoteUnauthenticated, R>) => MutationSource<P, R>;
|
|
775
865
|
/**
|
|
776
866
|
* A refusal of `mutation`, as a value of its declared `Refusal`: fail a
|
|
777
867
|
* Source with it (`yield* RemoteServer.refuse(SavePost, { _tag: 'Field', ... })`)
|
|
@@ -809,8 +899,10 @@ declare const RemoteServer: {
|
|
|
809
899
|
/**
|
|
810
900
|
* A refusal of a caller who could not be told: a `serveFetch` or
|
|
811
901
|
* `defineDocumentHost` resolver fails with it (`RemoteServer.unauthenticated()`)
|
|
812
|
-
* when the credential it was sent no longer holds
|
|
813
|
-
* `
|
|
902
|
+
* when the credential it was sent no longer holds, and a write refused to a
|
|
903
|
+
* visitor fails with it (`GuardServer` does), so a client can tell a session
|
|
904
|
+
* that ended from a refusal. It answers 401, with `reason`, when given, for
|
|
905
|
+
* the person who asked; a durable write so answered waits for a sign-in.
|
|
814
906
|
*/
|
|
815
907
|
unauthenticated: (reason?: string) => RemoteUnauthenticated;
|
|
816
908
|
/**
|
|
@@ -868,7 +960,12 @@ declare const RemoteServer: {
|
|
|
868
960
|
* The server: its sources by name. `viewer` says who asks, as a row
|
|
869
961
|
* (`principal => Option.some(Remote.ref(User, principal.id))`), or none for
|
|
870
962
|
* a visitor: what a declared write's `Expr.viewer` sets. A server
|
|
871
|
-
* registering such an insert without one is refused here.
|
|
963
|
+
* registering such an insert without one is refused here. It is also whom
|
|
964
|
+
* each answer says it is for (`principal`, the row's key), which a durable
|
|
965
|
+
* write carries back: one made for another viewer than who asks is refused
|
|
966
|
+
* before it runs (`RemotePrincipalChanged`). A server without `viewer`
|
|
967
|
+
* names no one in its answers, and refuses a write that names someone,
|
|
968
|
+
* since it cannot check it; a write that names no one runs (#405).
|
|
872
969
|
*
|
|
873
970
|
* `clockSkew` is how far from this server's clock a client's time (the
|
|
874
971
|
* `now` a write is sent with, when the reader acted) may be and still be
|
|
@@ -914,7 +1011,8 @@ declare const RemoteServer: {
|
|
|
914
1011
|
* The request and its payload are decoded by the protocol's own schemas
|
|
915
1012
|
* before a handler sees them, so an operation name is one of Remote's three
|
|
916
1013
|
* and nothing else. A body that is not a request is a 400; a caller who
|
|
917
|
-
* could not be told a 401; a refusal of who is asking a 403; a
|
|
1014
|
+
* could not be told a 401; a refusal of who is asking a 403; a write made
|
|
1015
|
+
* for someone else (`RemotePrincipalChanged`) a 409; a mutation's
|
|
918
1016
|
* declared refusal a 422, or a 409 when it is `Refusal.taken`; a handler's
|
|
919
1017
|
* failure a 500 with its message; a defect a 500 that says nothing of it,
|
|
920
1018
|
* its cause reported as a `ServerDefect` (`Diagnostics`, by default the log).
|
|
@@ -933,5 +1031,5 @@ declare const RemoteServer: {
|
|
|
933
1031
|
*/
|
|
934
1032
|
handlers: <P, R, I = never>(server: ServerDefinition<P, R>, principal: P | Context.Key<I, P>, options?: HandlerOptions<P, R>) => RemoteRpcClient<R | I>;
|
|
935
1033
|
};
|
|
936
|
-
export {
|
|
937
|
-
//# sourceMappingURL=index-
|
|
1034
|
+
export { RemoteUnmet as A, RemoteServerDiagnostic as B, QueryPage as C, RemoteServer as D, RemoteInvalid as E, exprContext as F, assertSupported$1 as G, bodyLimit as H, AnswerUnread as I, evaluate$1 as K, CachedReadDiffers as L, ServerDefinition as M, WriteRequirement as N, RemoteServerError as O, WriteWhen as P, ClockSkewed as R, MutationSource as S, ReadPlan as T, QueryEvaluateError as U, ServerDefect as V, Row as W, MemoryRows as _, EntityRecord as a, MutationOutcome as b, EntityWriter as c, LiveQuery as d, LiveSource as f, MemoryReadable as g, MemoryConfig as h, DeleteOutcome as i, RowRequirement as j, RemoteTaken as k, HandlerOptions as l, MemoryBackend as m, CascadedRow as n, EntitySource as o, MemoryAnswering as p, supported as q, ConnectionChange as r, EntitySourceContext as s, CascadeRequirement as t, LiveHub as u, MemoryServed as v, QuerySource as w, MutationRefused as x, MemoryStore as y, PublishFailed as z };
|
|
1035
|
+
//# sourceMappingURL=index-pMrHmWZt.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-pMrHmWZt.d.mts","names":[],"sources":["../src/body.ts","../src/diagnostics.ts","../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;cA4Ga,YAAS,uBAEnB,GAAG,GAAC,UACO,OAAO,OAAO,mBAAmB,oBAAoB,GAAG,OACjE,OAAO,OACR,mBAAmB,oBACnB,GACA,IAAI,kBAAkB;;UCtGT,qBAAqB;WAC3B;WACA,OAAO,MAAM;;;;;;UAOP,qBAAqB;WAC3B;WACA;;WAEA;;;UAIM,sBAAsB;WAC5B;WACA;WACA,OAAO,MAAM;;;;;;;UAQP,oBAAoB;WAC1B;WACA;;WAEA;;WAEA;;WAEA;;;;;;;;UASM,0BAA0B;WAChC;;WAEA;;;KAIC,yBACR,eACA,eACA,gBACA,cACA;;;;cCmCS,0BAA0B;;;;;;;;;cAY1B,oBAAoB;;;;;;;;;;cAUpB,oBAAoB;;;;;;;;;;;;cAUpB,sBAAsB;;UAOlB;WACN,MAAM;WACN,OAAO,SAAS;;;;;;;;;;;;;;cAQd,wBAAwB;UAQpB;WACN;WACA,QAAQ,SAAS;;UAGX,oBAAoB;WAC1B;WACA;;WAE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B,OAAO,iBAAe,MAC/C;aACK,OAAO;aACP,QAAQ;aACR,WAAW;;aAEX,SAAS,OAAO,OAAO;aACvB,SAAS;QACd,OAAO,OAAO,WAAW,mBAAmB,OACjD,YAAY,GAAG;;;;;;;;;;;;;;;;EAgCX,OAAA,aAAa,WAAS,QACnB,YAAU;aACE,WAAW,WAAW,GAAG;QAC5C,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCV,OAAA,aAAa,WAAS;aAClB,mBAAmB,aAAa,GAAG;aACnC,qBAAqB,eAAe,GAAG;aACvC,mBAAmB,YAAY,GAAG;aAClC,gBAAgB,WAAW,GAAG;aAC9B,WAAW,WAAW,MAAM,OAAO,OAAO;aAC1C,YAAY,SAAS;QAC5B,iBAAiB,GAAG;;;;;;EA8CL,WAAA,QAAA,kBAAgB,QAAU;;;;;;;EAsBhC,aAAA,GAAG,GAAC,QACP,iBAAiB,GAAG,IAAE,WACnB,GAAC,SACH,eAAe,GAAG,IAAE,UACnB,cAAc,iBACvB,OAAO;aAEG,UAAU;eACR;eACA;eACA,QAAQ;;aAEV,SAAS;eACP;eACA;eACA,QAAQ;;KAGrB,iBACA;;;;;;;;;;;;;;EAoJO,SAAA,GAAC,UACE,gBAAgB,IAAE,kBAE3B,OAAO;aAEG;aACA,MAAM;YAGjB;;;;;;;;EAwES,WAAA,GAAG,GAAG,WAAS,QAChB,iBAAiB,GAAG,IAAE,WACnB,IAAI,QAAQ,IAAI,GAAG,IAAE,UACvB,eAAe,GAAG,OAC1B,gBAAgB,IAAI"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { type AnswerUnread, type ClockSkewed, ConnectionChange, EntityRecord, EntitySource, EntitySourceContext, EntityWriter, HandlerOptions, LiveHub, LiveQuery, LiveSource, MemoryAnswering, MemoryBackend, MemoryConfig, MemoryReadable, MemoryRows, MemoryServed, MemoryStore, MutationOutcome, MutationRefused, MutationSource, type PublishFailed, QueryEvaluateError, QueryPage, QuerySource, ReadPlan, RemoteInvalid, RemoteServer, type RemoteServerDiagnostic, RemoteServerError, RemoteTaken, RemoteUnmet, type Row, RowRequirement, type ServerDefect, ServerDefinition, WriteRequirement, WriteWhen, assertSupported, evaluate, exprContext, supported };
|
|
1
|
+
import { A as RemoteUnmet, B as RemoteServerDiagnostic, C as QueryPage, D as RemoteServer, E as RemoteInvalid, F as exprContext, G as assertSupported, H as bodyLimit, I as AnswerUnread, K as evaluate, L as CachedReadDiffers, M as ServerDefinition, N as WriteRequirement, O as RemoteServerError, P as WriteWhen, R as ClockSkewed, S as MutationSource, T as ReadPlan, U as QueryEvaluateError, V as ServerDefect, W as Row, _ as MemoryRows, a as EntityRecord, b as MutationOutcome, c as EntityWriter, d as LiveQuery, f as LiveSource, g as MemoryReadable, h as MemoryConfig, i as DeleteOutcome, j as RowRequirement, k as RemoteTaken, l as HandlerOptions, m as MemoryBackend, n as CascadedRow, o as EntitySource, p as MemoryAnswering, q as supported, r as ConnectionChange, s as EntitySourceContext, t as CascadeRequirement, u as LiveHub, v as MemoryServed, w as QuerySource, x as MutationRefused, y as MemoryStore, z as PublishFailed } from "./index-pMrHmWZt.mjs";
|
|
2
|
+
export { type AnswerUnread, type CachedReadDiffers, CascadeRequirement, CascadedRow, type ClockSkewed, ConnectionChange, DeleteOutcome, EntityRecord, EntitySource, EntitySourceContext, EntityWriter, HandlerOptions, LiveHub, LiveQuery, LiveSource, MemoryAnswering, MemoryBackend, MemoryConfig, MemoryReadable, MemoryRows, MemoryServed, MemoryStore, MutationOutcome, MutationRefused, MutationSource, type PublishFailed, QueryEvaluateError, QueryPage, QuerySource, ReadPlan, RemoteInvalid, RemoteServer, type RemoteServerDiagnostic, RemoteServerError, RemoteTaken, RemoteUnmet, type Row, RowRequirement, type ServerDefect, ServerDefinition, WriteRequirement, WriteWhen, assertSupported, bodyLimit, evaluate, exprContext, supported };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as MutationRefused,
|
|
1
|
+
export { t as DeleteOutcome, n as MutationRefused, m as QueryEvaluateError, r as RemoteInvalid, i as RemoteServer, a as RemoteServerError, o as RemoteTaken, s as RemoteUnmet, c as RowRequirement, h as assertSupported, u as bodyLimit, g as evaluate, l as exprContext, _ as supported } from "./src-CHkHaItI.mjs";
|