chore: ng-e2e-helpers suit alpha.14, et la mise a jour des paquets devient une tache
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
import { ng as realNg, init as realInit } from "@ng-org/web";
|
||||
import { initNg as ormInitNg, OrmSubscription, type Scope as OrmScope } from "@ng-org/orm";
|
||||
import { initNg as ormInitNg, RdfOrmSubscription, type Scope as OrmScope } from "@ng-org/orm";
|
||||
import { configure, docs, init, useShape as libUseShape } from "@ng-eventually/polyfill";
|
||||
import type { BaseType, Nuri, ShapeType } from "@ng-eventually/polyfill";
|
||||
import { adoptCurrentUser, configureStoreRegistry } from "../src/shared-wallet/bootstrap";
|
||||
@@ -92,9 +92,22 @@ const sessionReady = new Promise<BrokerSession>((r) => (sessionResolve = r));
|
||||
* the broker refused leaves it pending for ever — the silence this measurement is here to
|
||||
* break.
|
||||
*/
|
||||
let liveSubscription: OrmSubscription<BaseType> | null = null;
|
||||
/**
|
||||
* The handle this page keeps, DERIVED from `getOrCreate` rather than written by hand.
|
||||
*
|
||||
* `RdfOrmSubscription` (renamed from `OrmSubscription` in `@ng-org/orm@0.1.2-alpha.21`)
|
||||
* now takes its config as a type parameter and `getOrCreate` returns a narrowed
|
||||
* `RdfOrmSubscriptionFor<...>` - the paging methods are `Omit`ted when no `pageSize` is
|
||||
* asked for. Naming the class directly would restate that narrowing and get it wrong the
|
||||
* next time it moves; `ReturnType` asks the package what it actually hands back.
|
||||
*/
|
||||
type LiveSubscription = ReturnType<
|
||||
typeof RdfOrmSubscription.getOrCreate<ShapeType<BaseType>, BaseType, OrmScope>
|
||||
>;
|
||||
|
||||
let liveSubscription: LiveSubscription | null = null;
|
||||
function realOrmUseShape(shapeType: unknown, scope: unknown): unknown {
|
||||
const sub = OrmSubscription.getOrCreate(shapeType as ShapeType<BaseType>, scope as OrmScope);
|
||||
const sub = RdfOrmSubscription.getOrCreate(shapeType as ShapeType<BaseType>, scope as OrmScope);
|
||||
liveSubscription = sub;
|
||||
return sub.signalObject;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"types": ["bun"],
|
||||
"noEmit": true
|
||||
"noEmit": true,
|
||||
"paths": {
|
||||
"@ng-org/web": ["../node_modules/@ng-org/web"]
|
||||
}
|
||||
},
|
||||
"include": ["."]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user