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:
@@ -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> {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user