feat(data): route useShape through @ng-eventually/client (passthrough)

The reactive ORM data-plane now goes through the @ng-eventually/client wrapper
instead of @ng-org/orm directly; ngSession injects the real SDK into the polyfill via
configure(). Currently a transparent passthrough (lib mechanisms still stubbed) →
behavior unchanged. Validated: build, @ui 4/4, @data 8/8 against the real broker.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sylvain Duchesne
2026-06-22 16:35:58 +02:00
parent 3ca2d10c49
commit 9af128cb22
5 changed files with 14 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
* Must only be called when NG is connected (inside NgDataProvider).
*/
import { useShape } from '@ng-org/orm/react';
import { useShape } from '@ng-eventually/client';
import type { ShapeType, BaseType } from '@ng-org/shex-orm';
import type { DeepSignalSet } from '@ng-org/alien-deepsignals';
export interface ShapeWithDefaults<NgT extends BaseType, AppT> {
+1 -1
View File
@@ -11,7 +11,7 @@ import React, { useEffect, useState } from 'react';
import { createRoot } from 'react-dom/client';
import { NextGraphProvider, useNextGraph } from '../context/NextGraphContext';
import { FestipodDataProvider, useFestipodData } from '../context/FestipodDataContext';
import { useShape } from '@ng-org/orm/react';
import { useShape } from '@ng-eventually/client';
import type { DeepSignalSet } from '@ng-org/alien-deepsignals';
import {
FpEventShapeType,
+8
View File
@@ -1,6 +1,14 @@
import { ng, init as initNgWeb } from "@ng-org/web";
import type { NG } from "@ng-org/web";
import { initNg as initNgSignals } from "@ng-org/orm";
import { useShape as realUseShape } from "@ng-org/orm/react";
import { configure as configureEventually } from "@ng-eventually/client/polyfill";
// Inject the REAL SDK into the ng-eventually polyfill. The app imports the
// SDK-shaped exports (`useShape`, `ng`, `inbox`) from `@ng-eventually/client`,
// which delegate to what we inject here. This is the single injection point —
// removed at migration (the app then points back at the real SDK).
configureEventually({ ng, useShape: realUseShape });
export let session: NextGraphSession | undefined;