Skip to content

Commit 7a248a6

Browse files
committed
fix(plugin-designer): pages that read getClient import the adapter declaration (test program reach)
Claude-Session: https://claude.ai/code/session_017sGTFTS9edirCTVBgQysK7 Co-authored-by: Claude <noreply@anthropic.com>
1 parent edf407d commit 7a248a6

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎ui/packages/plugin-designer/src/adapter-context-register.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
* (`getClient`), a member beyond `DataSource`, and run inside the ObjectStack
99
* Console, whose shell installs an `ObjectStackAdapter`; so the designer
1010
* declares that adapter here, in the package that already depends on it.
11+
*
12+
* Imported by each page that reads such a member, so every program that
13+
* compiles the page (the build and the test type-check) sees the declaration.
1114
*/
1215

1316
import type { ObjectStackAdapter } from '@object-ui/data-objectstack';

‎ui/packages/plugin-designer/src/pages/CreateAppPage.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import { wizardDraftToAppSchema } from '@object-ui/types';
1414
import type { AppWizardDraft, ObjectSelection } from '@object-ui/types';
1515
import { useMetadata } from '@object-ui/react';
1616
import { useAdapter } from '@object-ui/react';
17+
// Declares the ObjectStackAdapter this page reads `getClient` off.
18+
import '../adapter-context-register';
1719
import { toast } from 'sonner';
1820

1921
const DRAFT_STORAGE_KEY = 'objectui-app-wizard-draft';

‎ui/packages/plugin-designer/src/pages/EditAppPage.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import type { AppWizardDraft, ObjectSelection } from '@object-ui/types';
1515
import { AppSchema as SpecAppSchema, AppBrandingSchema as SpecAppBrandingSchema } from '@objectstack/spec/ui';
1616
import { useMetadata } from '@object-ui/react';
1717
import { useAdapter } from '@object-ui/react';
18+
// Declares the ObjectStackAdapter this page reads `getClient` off.
19+
import '../adapter-context-register';
1820
import { toast } from 'sonner';
1921

2022
/**

0 commit comments

Comments
 (0)