Regenerate example code + fix broken paths from repo restructure
- Fix testapp/apps.py: import djarea_clients (file was never renamed) - Fix fetch.mjs: command is export_djarea_schema not export_mizan_schema - Fix harness package.json: dependency path to mizan-react after restructure - Add package.json for generator (openapi-typescript dependency) - Regenerate all example code with new protocol format: - generated.provider.tsx uses raw context responses + SSR hydration - generated.server.ts uses GET /ctx/global/ with response.ok check - generated.forms.ts, channels.ts, channels.hooks.tsx refreshed - Remove stale generated.django.tsx and generated.django.server.ts - Update imports: fixtures.tsx and main.tsx import from ./api (index) - Use MizanContext instead of deprecated DjangoContext in examples Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,11 +6,10 @@
|
||||
* @example
|
||||
* ```tsx
|
||||
* import {
|
||||
* DjangoContext,
|
||||
* useUser,
|
||||
* MizanContext,
|
||||
* useCurrentUser,
|
||||
* useEcho,
|
||||
* useChatChannel,
|
||||
* DjangoError,
|
||||
* } from '@/api'
|
||||
* ```
|
||||
*/
|
||||
@@ -23,22 +22,30 @@
|
||||
// =============================================================================
|
||||
|
||||
export {
|
||||
getMizanHydration,
|
||||
getDjangoHydration,
|
||||
type MizanHydrationData,
|
||||
type DjangoHydration,
|
||||
} from './generated.django.server'
|
||||
} from './generated.server'
|
||||
|
||||
export {
|
||||
// Provider
|
||||
MizanContext,
|
||||
type MizanContextProps,
|
||||
DjangoContext,
|
||||
type DjangoContextProps,
|
||||
|
||||
// Context hooks
|
||||
// Global context hooks
|
||||
useCurrentUser,
|
||||
useGreet,
|
||||
|
||||
// Refresh hooks
|
||||
useMizanRefresh,
|
||||
useDjangoRefresh,
|
||||
|
||||
// Named context providers
|
||||
LocalContext,
|
||||
useGreet,
|
||||
|
||||
// Function hooks
|
||||
useEcho,
|
||||
useAdd,
|
||||
@@ -56,14 +63,14 @@ export {
|
||||
useJwtRefresh,
|
||||
|
||||
// Re-exports from mizan library
|
||||
usemizan,
|
||||
usemizanStatus,
|
||||
useMizan,
|
||||
useMizanStatus,
|
||||
usePush,
|
||||
DjangoError,
|
||||
type ConnectionStatus,
|
||||
type PushMessage,
|
||||
type PushListener,
|
||||
} from './generated.django'
|
||||
} from './generated.provider'
|
||||
|
||||
// =============================================================================
|
||||
// Channel Hooks
|
||||
|
||||
Reference in New Issue
Block a user