@sylwellsoftware/glue 0.2.0 → 0.3.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
@@ -5,7 +5,7 @@ uses it as its state/data-flow layer, but Glue does not depend on Fray, a DOM,
5
5
  or any UI framework. Its implementation and tests are strict TypeScript; the
6
6
  ESM build includes declarations and declaration maps.
7
7
 
8
- Install the published alpha with pnpm:
8
+ Install with pnpm:
9
9
 
10
10
  ```bash
11
11
  pnpm add @sylwellsoftware/glue
@@ -206,14 +206,14 @@ start, and query completion can retain explicit parent/child causality without
206
206
  turning diagnostics into a second execution system. Applications decide
207
207
  whether to retain, render, or export observed events.
208
208
 
209
- ## Experimental commands
209
+ ## Async commands
210
210
 
211
- `@sylwellsoftware/glue/experimental` exports `AsyncCommand`, an abortable
211
+ `AsyncCommand` is exported from Glue's package root. It is an abortable
212
212
  mutation lifecycle with explicit `ignore`, `replace`, and `reject` concurrency
213
213
  policies. It exposes the last result/error through the standard emitter
214
214
  snapshot and a read-only `isRunning` view. It deliberately does not own batch
215
215
  progress, retries, notifications, or UI behavior. See
216
- [EXPERIMENTAL.md](EXPERIMENTAL.md) for the provisional contract.
216
+ the API reference below for the command contract.
217
217
 
218
218
  ## Integration with Fray and other consumers
219
219
 
@@ -256,7 +256,7 @@ Glue intentionally does not own a DOM renderer, component lifecycle,
256
256
  application-specific query encoding, persistent event history, CommonJS build,
257
257
  or framework adapter. Fray consumes Glue as a peer; browser UI belongs there.
258
258
 
259
- See the [workspace overview](../../README.md), [alpha API
259
+ See the [workspace overview](../../README.md), [API
260
260
  surface](../../docs/API_SURFACE.md), [changelog](../../CHANGELOG.md),
261
261
  [contribution guide](../../CONTRIBUTING.md), and [security
262
262
  policy](../../SECURITY.md).
@@ -19,7 +19,7 @@ export interface AsyncCommandOptions<TArguments, TResult, TError = unknown> {
19
19
  export declare class AsyncCommandConcurrencyError extends Error {
20
20
  constructor();
21
21
  }
22
- /** Experimental abortable mutation state with an explicit concurrency policy. */
22
+ /** Abortable mutation state with an explicit concurrency policy. */
23
23
  export declare class AsyncCommand<TArguments, TResult, TError = unknown> extends BaseEmitter<TResult | undefined, TError> {
24
24
  readonly execute: AsyncCommandExecutor<TArguments, TResult>;
25
25
  readonly concurrency: AsyncCommandConcurrency;
@@ -1 +1 @@
1
- {"version":3,"file":"asyncCommand.d.ts","sourceRoot":"","sources":["../../src/commands/asyncCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAA;AACtD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAA;AAG/D,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAA;AAErE,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;AAErE,MAAM,WAAW,mBAAmB;IAChC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;IAChC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI,CAAA;CAC9C;AAED,MAAM,MAAM,oBAAoB,CAAC,UAAU,EAAE,OAAO,IAAI,CACpD,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,mBAAmB,KAC3B,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAA;AAEnC,MAAM,WAAW,mBAAmB,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IACtE,OAAO,EAAE,oBAAoB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;IAClD,WAAW,CAAC,EAAE,uBAAuB,CAAA;IACrC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAA;IACrC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,OA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,QAAQ,CAAC,WAAW,EAAE,uBAAuB,CAAA;IAC7C,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IACnD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA4B;IACrD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAyB;IACxD,OAAO,CAAC,SAAS,CAAI;IACrB,OAAO,CAAC,eAAe,CAAmC;IAC1D,OAAO,CAAC,mBAAmB,CAAqB;IAChD,OAAO,CAAC,kBAAkB,CAAQ;IAClC,2EAA2E;IAC3E,cAAc,EAAE,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,GAAG,IAAI,CAAO;gBAE9C,OAAO,EAAE,mBAAmB,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC;IAgCrE,GAAG,CACC,UAAU,EAAE,UAAU,EACtB,YAAY,GAAE,WAAW,CAAC,OAAO,CAAC,GAAG,OAAuB,GAC7D,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAiE/B,KAAK,CAAC,YAAY,GAAE,WAAW,CAAC,OAAO,CAAC,GAAG,OAA2B,GAAG,OAAO;IAmBhF,KAAK,CAAC,YAAY,GAAE,WAAW,CAAC,OAAO,CAAC,GAAG,OAAyB,GAAG,IAAI;IAelE,OAAO,IAAI,IAAI;IAWxB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,eAAe;CAO1B"}
package/dist/index.d.ts CHANGED
@@ -5,6 +5,8 @@ export type { BubbleGraph, EventListener } from './debugging/eventBus.js';
5
5
  export { BaseEmitter, DerivedEmitter } from './emitters/baseEmitter.js';
6
6
  export type { DerivedEmitterOptions, DerivedErrorEntry, DerivedErrors, EmitterNotification, EmitterOptions, EmitterValue, EmitterValues, MapOptions, ReadableEmitter, SnapshotUpdate, SubscribeOptions, } from './emitters/baseEmitter.js';
7
7
  export { Emitter } from './emitters/emitter.js';
8
+ export { AsyncCommand, AsyncCommandConcurrencyError } from './commands/asyncCommand.js';
9
+ export type { AsyncCommandConcurrency, AsyncCommandContext, AsyncCommandExecutor, AsyncCommandOptions, } from './commands/asyncCommand.js';
8
10
  export { LiveQuery } from './emitters/liveQuery.js';
9
11
  export type { LiveQueryOptions, QueryArgumentEmitters, QueryArgumentValues, } from './emitters/liveQuery.js';
10
12
  export { combineFetchStates, FetchState, FetchStateValues } from './enums/fetchState.js';
@@ -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,EAAC,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAA;AAChD,YAAY,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAA;AAEvE,OAAO,EAAC,WAAW,EAAE,cAAc,EAAC,MAAM,2BAA2B,CAAA;AACrE,YAAY,EACR,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,eAAe,EACf,cAAc,EACd,gBAAgB,GACnB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAC,OAAO,EAAC,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAA;AACjD,YAAY,EACR,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,GACtB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAC,kBAAkB,EAAE,UAAU,EAAE,gBAAgB,EAAC,MAAM,uBAAuB,CAAA;AACtF,YAAY,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAA;AAE1D,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAA;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAA;AAC5D,YAAY,EACR,eAAe,EACf,gBAAgB,EAChB,mBAAm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