@sylwellsoftware/glue 0.3.0 → 0.5.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 CHANGED
@@ -15,6 +15,26 @@ Glue is ESM-only. Core emitters, derived state, and diagnostics support Node 22+
15
15
  and modern ESM runtimes without a DOM. `LiveQuery` needs `AbortController`, and
16
16
  `RestQueryHandler` needs Fetch and URL capabilities unless they are injected.
17
17
 
18
+ ## Why Glue
19
+
20
+ Most application values come from a service query, direct user input, or a
21
+ calculation over those sources. Those values and their status are real state,
22
+ but developers should not have to construct and synchronize a separate
23
+ framework-shaped copy of them so that consumers can react.
24
+
25
+ Glue keeps each value at its natural boundary. A control can write an
26
+ `Emitter`, a calculation can expose a `DerivedEmitter`, and a query can react
27
+ to argument emitters while exposing its result, loading state, and error. A
28
+ consumer reads the downstream value it needs without knowing whether it began
29
+ as input, computation, or remote data.
30
+
31
+ For example, a table header may write a sort emitter. A `LiveQuery` uses that
32
+ emitter as an argument, retrieves fresh rows, and emits the new result to the
33
+ table. The developer declares this meaningful relationship; Glue handles
34
+ propagation, current snapshots, cancellation, and stale-result protection.
35
+ Mutation authority, domain rules, transport encoding, service construction,
36
+ and ownership/disposal remain explicit application responsibilities.
37
+
18
38
  ## Design model
19
39
 
20
40
  Glue models values that stay current rather than requests that callers must
@@ -46,8 +66,13 @@ by asynchronous retrieval. Richer responsibilities remain separate:
46
66
  | `DerivedEmitter` | A cached value computed from one or more readable emitters |
47
67
  | `QueryArg` | A named query-input view over another emitter when a semantic name is useful |
48
68
  | `LiveQuery` | Reactive request timing, latest-request ownership, status/error state, and cached results |
69
+ | `LiveResult` | Common read/dispose contract for remote and locally derived endpoint results |
49
70
  | `QueryHandler` | Non-reactive retrieval strategy over a plain named argument object |
50
71
  | `RestQueryHandler` | HTTP URL construction, wire serialization, Fetch execution, and JSON result retrieval |
72
+ | `QueryEndpoint` | Immutable declaration that opens caller-owned queries through any handler |
73
+ | `RestEndpoint` | Immutable REST query declaration with optional response parsing |
74
+ | `DerivedEndpoint` | Immutable local projection declaration that opens caller-owned live results |
75
+ | `AsyncCommand` | Abortable mutation lifecycle with explicit concurrency policy |
51
76
  | `EventBubble` / `EventBus` | Optional cause-and-effect diagnostics without owning application history |
52
77
 
53
78
  The intended flow is explicit and one-directional:
@@ -177,20 +202,104 @@ const users = new LiveQuery({handler, args: {search}})
177
202
  Arguments are a named record of emitters. Construction fetches immediately
178
203
  unless `autoFetch: false`; `refresh()` and `retry()` return the active request
179
204
  promise. A newer request aborts and supersedes the older request, and stale
180
- results cannot overwrite current state. `dispose()` aborts the active request
181
- and releases argument subscriptions.
205
+ results cannot overwrite current state. `abort()` cancels without disposing;
206
+ `dispose()` aborts the active request and releases argument subscriptions.
182
207
 
183
208
  By default the last successful value remains visible while refreshing and after
184
209
  a refresh error. Set `keepPreviousValue: false` to clear it while loading or in
185
210
  error state.
186
211
 
212
+ Polling is opt-in and waits one full interval before the first poll:
213
+
214
+ ```ts
215
+ const pollingEnabled = new Emitter(true)
216
+ const intervalMs = new Emitter(5_000)
217
+ const users = new LiveQuery({
218
+ handler,
219
+ args: {search},
220
+ polling: {enabled: pollingEnabled, intervalMs},
221
+ })
222
+ ```
223
+
224
+ `enabled` and `intervalMs` may be constants or readable emitters. A changed
225
+ control restarts the timer from that change. A tick is skipped while a request
226
+ is active; the next normal tick remains scheduled. Errors do not cause an
227
+ immediate retry or backoff, but polling continues while enabled. Disposal
228
+ releases the timer and control subscriptions. Applications can feed page
229
+ visibility or any other policy into `enabled`; Glue never reads the DOM. Tests
230
+ and nonstandard runtimes may inject `PollingScheduler`.
231
+
187
232
  The REST adapter accepts injected `fetch`, `baseUrl`, and `serialize` behavior.
188
233
  Its generic serializer omits `undefined` and empty arrays, encodes `null` as an
189
234
  empty value, repeats keys for arrays, JSON-encodes objects, and stringifies
190
235
  scalars. Application-specific table filter/sort formats belong in an injected
191
- serializer, not Glue. A `RestQueryHandler` result generic declares the expected
192
- JSON shape but does not validate it at runtime; validate untrusted responses at
193
- the application boundary.
236
+ serializer, not Glue. A result generic alone does not validate JSON. Supply
237
+ `parseResult(json: unknown)` to decode or validate immediately after JSON
238
+ parsing. A thrown parser error becomes the `LiveQuery` error, and Glue does not
239
+ include the raw response body in its diagnostics.
240
+
241
+ ## Service endpoint declarations
242
+
243
+ Applications may group immutable endpoint declarations in ordinary service
244
+ classes. Glue does not register, locate, construct, or cache services; the
245
+ application chooses and constructs its service scope. Fray applications may
246
+ expose those services through Fray's typed runtime `ServiceScope`; non-Fray
247
+ applications use their own explicit composition. Every `open()` call creates a
248
+ caller-owned result with independent arguments, request state, polling, and
249
+ disposal.
250
+
251
+ ```ts
252
+ import {DerivedEndpoint, RestEndpoint} from '@sylwellsoftware/glue'
253
+
254
+ class MovieService {
255
+ readonly movies = new RestEndpoint<{genre: string}, readonly Movie[]>({
256
+ url: '/api/movies',
257
+ parseResult: parseMovies,
258
+ })
259
+
260
+ readonly matchingMovies = new DerivedEndpoint<
261
+ readonly Movie[],
262
+ {genre: string},
263
+ readonly Movie[]
264
+ >({
265
+ apply: (movies, {genre}) => movies.filter((movie) => movie.genre === genre),
266
+ })
267
+ }
268
+
269
+ const service = new MovieService()
270
+ const remote = service.movies.open({genre})
271
+ const local = service.matchingMovies.open({source: cachedMovies, args: {genre}})
272
+ ```
273
+
274
+ Both results implement `LiveResult`, so a UI that only reads value, fetch
275
+ state, error, and subscriptions can accept either. `LiveQuery` additionally
276
+ implements `RefreshableLiveResult` with `refresh()`, `retry()`, and `abort()`.
277
+
278
+ For a query-like body protocol such as GraphQL, put a custom handler in a
279
+ `QueryEndpoint`. The handler owns method, headers, authentication, body
280
+ serialization, response checks, validation, and safe diagnostics:
281
+
282
+ ```ts
283
+ import {QueryEndpoint} from '@sylwellsoftware/glue'
284
+
285
+ const projectStatus = new QueryEndpoint<{id: string}, ProjectStatus>({
286
+ handler: {
287
+ async fetch({id}, {signal} = {}) {
288
+ const response = await fetch('/graphql', {
289
+ method: 'POST',
290
+ headers: {'content-type': 'application/json'},
291
+ body: JSON.stringify({query: STATUS_QUERY, variables: {id}}),
292
+ signal,
293
+ })
294
+ if (!response.ok) throw new Error(`HTTP ${response.status}`)
295
+ return parseProjectStatus(await response.json())
296
+ },
297
+ },
298
+ })
299
+ ```
300
+
301
+ Ordinary POST/PUT/PATCH/DELETE mutations belong in `AsyncCommand` executors,
302
+ not auto-running query declarations.
194
303
 
195
304
  ## Optional tracing
196
305
 
@@ -212,8 +321,16 @@ whether to retain, render, or export observed events.
212
321
  mutation lifecycle with explicit `ignore`, `replace`, and `reject` concurrency
213
322
  policies. It exposes the last result/error through the standard emitter
214
323
  snapshot and a read-only `isRunning` view. It deliberately does not own batch
215
- progress, retries, notifications, or UI behavior. See
216
- the API reference below for the command contract.
324
+ progress, retries, notifications, or UI behavior. Executor completion alone
325
+ determines command success. The application may then refresh affected queries;
326
+ their failures remain in their own query snapshots:
327
+
328
+ ```ts
329
+ const saved = await saveCommand.run(update)
330
+ if (saved !== undefined) {
331
+ await Promise.all([users.refresh('save reconciled'), audit.refresh('save reconciled')])
332
+ }
333
+ ```
217
334
 
218
335
  ## Integration with Fray and other consumers
219
336
 
@@ -2,26 +2,42 @@ import { EventBubble } from '../debugging/eventBubble.js';
2
2
  import type { QueryHandlerLike } from '../queryhandling/queryHandler.js';
3
3
  import { BaseEmitter } from './baseEmitter.js';
4
4
  import type { EmitterValue, ReadableEmitter } from './baseEmitter.js';
5
+ import type { RefreshableLiveResult } from './liveResult.js';
5
6
  export type QueryArgumentEmitters = Record<string, ReadableEmitter<unknown, unknown>>;
6
7
  export type QueryArgumentValues<TArguments extends QueryArgumentEmitters> = {
7
8
  [TName in keyof TArguments]: EmitterValue<TArguments[TName]>;
8
9
  };
10
+ export interface PollingScheduler {
11
+ schedule(callback: () => void, delayMs: number): unknown;
12
+ cancel(handle: unknown): void;
13
+ }
14
+ export interface LiveQueryPollingOptions {
15
+ intervalMs: number | ReadableEmitter<number, unknown>;
16
+ enabled?: boolean | ReadableEmitter<boolean, unknown>;
17
+ scheduler?: PollingScheduler;
18
+ }
9
19
  export interface LiveQueryOptions<TResult, TArguments extends QueryArgumentEmitters> {
10
20
  handler: QueryHandlerLike<QueryArgumentValues<TArguments>, TResult>;
11
21
  args?: TArguments;
12
22
  autoFetch?: boolean;
13
23
  keepPreviousValue?: boolean;
24
+ polling?: LiveQueryPollingOptions;
14
25
  owner?: unknown;
15
26
  purpose?: string;
16
27
  trace?: boolean;
17
28
  }
18
29
  /** Reactive, abortable query driven by a named record of emitter arguments. */
19
- export declare class LiveQuery<TResult, TArguments extends QueryArgumentEmitters = Record<string, never>> extends BaseEmitter<TResult | undefined, unknown> {
30
+ export declare class LiveQuery<TResult, TArguments extends QueryArgumentEmitters = Record<string, never>> extends BaseEmitter<TResult | undefined, unknown> implements RefreshableLiveResult<TResult | undefined, unknown> {
20
31
  readonly handler: QueryHandlerLike<QueryArgumentValues<TArguments>, TResult>;
21
32
  readonly args: TArguments;
22
33
  readonly keepPreviousValue: boolean;
23
34
  private lastSuccessfulValue;
35
+ private hasSuccessfulValue;
24
36
  private argumentUnsubscribers;
37
+ private pollingUnsubscribers;
38
+ private readonly polling;
39
+ private readonly pollingScheduler;
40
+ private pollingHandle;
25
41
  private requestId;
26
42
  private abortController;
27
43
  /** Exposed for deterministic tests; consumers should use refresh()/retry(). */
@@ -30,7 +46,11 @@ export declare class LiveQuery<TResult, TArguments extends QueryArgumentEmitters
30
46
  get argumentValues(): QueryArgumentValues<TArguments>;
31
47
  refresh(eventOrCause?: EventBubble<unknown> | unknown): Promise<TResult | undefined>;
32
48
  retry(eventOrCause?: EventBubble<unknown> | unknown): Promise<TResult | undefined>;
49
+ abort(eventOrCause?: EventBubble<unknown> | unknown): void;
33
50
  dispose(): void;
51
+ private initializePolling;
52
+ private scheduleNextPoll;
53
+ private cancelScheduledPoll;
34
54
  private isCurrentRequest;
35
55
  }
36
56
  //# sourceMappingURL=liveQuery.d.ts.map
@@ -1 +1 @@
1
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,CAAC,IAAI,EAAE,UAAU,CAAA;IACzB,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAA;IACnC,OAAO,CAAC,mBAAmB,CAAqB;IAChD,OAAO,CAAC,kBAAkB,CAAQ;IAClC,OAAO,CAAC,qBAAqB,CAAmB;IAChD,OAAO,CAAC,oBAAoB,CAAwB;IACpD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqC;IAC7D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAkB;IACnD,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,SAAS,CAAI;IACrB,OAAO,CAAC,eAAe,CAAmC;IAC1D,+EAA+E;IAC/E,cAAc,EAAE,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,GAAG,IAAI,CAAO;gBAE9C,OAAO,EAAE,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC;IA6C1D,IAAI,cAAc,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAIpD;IAED,OAAO,CAAC,YAAY,GAAE,WAAW,CAAC,OAAO,CAAC,GAAG,OAAmB,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IA+D/F,KAAK,CAAC,YAAY,GAAE,WAAW,CAAC,OAAO,CAAC,GAAG,OAAiB,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAI3F,KAAK,CAAC,YAAY,GAAE,WAAW,CAAC,OAAO,CAAC,GAAG,OAAyB,GAAG,IAAI;IAgBlE,OAAO,IAAI,IAAI;IAcxB,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,gBAAgB;CAM3B"}
@@ -0,0 +1,14 @@
1
+ import type { EventBubble } from '../debugging/eventBubble.js';
2
+ import type { ReadableEmitter } from './baseEmitter.js';
3
+ /** Common caller-facing contract for remote and locally derived live results. */
4
+ export interface LiveResult<TValue, TError = unknown> extends ReadableEmitter<TValue, TError> {
5
+ readonly disposed: boolean;
6
+ dispose(): void;
7
+ }
8
+ /** Capabilities available only when a result can re-execute its source. */
9
+ export interface RefreshableLiveResult<TValue, TError = unknown> extends LiveResult<TValue, TError> {
10
+ refresh(eventOrCause?: EventBubble<unknown> | unknown): Promise<TValue>;
11
+ retry(eventOrCause?: EventBubble<unknown> | unknown): Promise<TValue>;
12
+ abort(eventOrCause?: EventBubble<unknown> | unknown): void;
13
+ }
14
+ //# sourceMappingURL=liveResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"liveResult.d.ts","sourceRoot":"","sources":["../../src/emitters/liveResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,6BAA6B,CAAA;AAC5D,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAA;AAErD,iFAAiF;AACjF,MAAM,WAAW,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAChD,SAAQ,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,OAAO,IAAI,IAAI,CAAA;CAClB;AAED,2EAA2E;AAC3E,MAAM,WAAW,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAC3D,SAAQ,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC;IAClC,OAAO,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACvE,KAAK,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACrE,KAAK,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,IAAI,CAAA;CAC7D"}
package/dist/index.d.ts CHANGED
@@ -8,12 +8,15 @@ export { Emitter } from './emitters/emitter.js';
8
8
  export { AsyncCommand, AsyncCommandConcurrencyError } from './commands/asyncCommand.js';
9
9
  export type { AsyncCommandConcurrency, AsyncCommandContext, AsyncCommandExecutor, AsyncCommandOptions, } from './commands/asyncCommand.js';
10
10
  export { LiveQuery } from './emitters/liveQuery.js';
11
- export type { LiveQueryOptions, QueryArgumentEmitters, QueryArgumentValues, } from './emitters/liveQuery.js';
11
+ export type { LiveQueryPollingOptions, LiveQueryOptions, PollingScheduler, QueryArgumentEmitters, QueryArgumentValues, } from './emitters/liveQuery.js';
12
+ export type { LiveResult, RefreshableLiveResult } from './emitters/liveResult.js';
12
13
  export { combineFetchStates, FetchState, FetchStateValues } from './enums/fetchState.js';
13
14
  export type { FetchStateValue } from './enums/fetchState.js';
14
15
  export { QueryArg } from './queryhandling/queryArg.js';
15
16
  export { QueryHandler } from './queryhandling/queryHandler.js';
16
17
  export type { AbortSignalLike, QueryHandlerLike, QueryRequestOptions, QueryValues, } from './queryhandling/queryHandler.js';
17
18
  export { RestQueryHandler } from './queryhandling/restQueryHandler.js';
18
- export type { FetchLike, JsonResponseLike, QuerySerializer, RestQueryHandlerOptions, SearchParamsLike, UrlLike, } from './queryhandling/restQueryHandler.js';
19
+ export type { FetchLike, JsonResponseLike, QuerySerializer, ResultParser, RestQueryHandlerOptions, SearchParamsLike, UrlLike, } from './queryhandling/restQueryHandler.js';
20
+ export { DerivedEndpoint, DerivedLiveResult, derivedEndpoint, QueryEndpoint, queryEndpoint, RestEndpoint, restEndpoint, } from './queryhandling/endpoints.js';
21
+ export type { DerivedEndpointOptions, EndpointArgumentEmitters, EndpointQueryOptions, OpenDerivedEndpointOptions, QueryEndpointOptions, RestEndpointOptions, } from './queryhandling/endpoints.js';
19
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAA;AACtD,YAAY,EAAC,YAAY,E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