feat!: la famille ORM est publiee enveloppee, et le ng publie cesse de rendre des promesses

This commit is contained in:
Sylvain Duchesne
2026-09-21 12:38:17 +02:00
parent 2aac703784
commit d0ea043a5b
21 changed files with 1102 additions and 35 deletions
+26 -3
View File
@@ -85,6 +85,9 @@
// NgLike `EventuallyConfig.ng`
// UseShapeLike `EventuallyConfig.useShape`
// OrmSubscriptionLike `EventuallyConfig.ormSubscription`
// GetObjectsLike `EventuallyConfig.getObjects`
// InsertObjectLike `EventuallyConfig.insertObject`
// RdfOrmConfig `getObjects`
//
// `OrmSubscriptionHandle` - what that last one RETURNS - is deliberately NOT here. An
// application hands the shape query in and reads the snapshot back; it never holds a
@@ -99,10 +102,24 @@
// takes the SDK's `Scope` now (re-exported below, from the SDK itself), and a store is
// named by its reference. The three strings stay DEFINED in `model/types.ts` as
// `StoreType`, where the library's own modules still tell the three apart.
export type { Nuri, NuriLike, PrincipalId, NgLike, UseShapeLike, OrmSubscriptionLike } from "./model/types";
export type {
Nuri,
NuriLike,
PrincipalId,
NgLike,
UseShapeLike,
OrmSubscriptionLike,
GetObjectsLike,
InsertObjectLike,
} from "./model/types";
export { useShape } from "./surface/use-shape";
export { useShapeQuery } from "./surface/use-shape-query";
export type { ShapeQuery, ShapeObservable } from "./surface/use-shape-query";
// The ORM's one-shot read and its subscription-free write - WRAPPED, at upstream's own
// names and signatures, never re-exported. `surface/orm.ts` says what each wrapper adds,
// and which neighbours of theirs in `@ng-org/orm`'s entry are deliberately not here
// (`RdfOrmSubscription`, `DiscreteOrmSubscription`, `ngSession`, `getRaw`).
export { getObjects, insertObject } from "./surface/orm";
export { init, initNg } from "./surface/lifecycle";
export * as inbox from "./surface/inbox";
export * as docs from "./surface/docs";
@@ -129,6 +146,12 @@ export type { DeepSignalSet } from "@ng-org/alien-deepsignals";
// `subjects`) are upstream's to change.
// @provenance Scope kind=passthrough level=3 ref=sdk/js/orm/src/types.ts:Scope
export type { Scope } from "@ng-org/orm";
// What `getObjects` takes: a `Scope` plus `where` and `orderBy`. It is re-exported from
// the SDK's `/all` subpath because that is where the SDK puts it - the type the function
// DECLARES is not exported beside the function, which is upstream's packaging and not a
// choice here. Restating it would be how it drifts.
// @provenance RdfOrmConfig kind=passthrough level=3 ref=sdk/js/orm/src/utilTypes.ts:OrmConfig - the published `@ng-org/orm@0.1.2-alpha.21` renames it `RdfOrmConfig` and re-parameterises it on the shape's type rather than its `ShapeType`, which the cited revision has not yet done
export type { RdfOrmConfig } from "@ng-org/orm/all";
// @provenance NG kind=passthrough level=2 ref=sdk/js/web/src/index.ts:NG — 88 members, all forwarded; the proxy adds none and removes none
export type { NG } from "@ng-org/web";
@@ -188,7 +211,7 @@ export type { SharedWalletConfig } from "./shared-wallet/access-gate";
import type { NG } from "@ng-org/web";
import { makeNg } from "./surface/ng-proxy";
import { wrappedNg } from "./surface/ng-proxy";
/**
* SDK-identical `ng` (wrapped). Drop-in replacement for `@ng-org/web`'s `ng`.
@@ -198,4 +221,4 @@ import { makeNg } from "./surface/ng-proxy";
* it forwards to: an application got no completion and no check on any of the 88 members.
*/
// @provenance ng kind=passthrough level=2 ref=sdk/js/web/src/index.ts:ng — a Proxy over the injected real `ng`; only `sparql_update` is overridden (the emulated write guard)
export const ng: NG = makeNg();
export const ng: NG = wrappedNg();