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:
2026-04-07 03:13:35 -04:00
parent 711e92ac4d
commit 658cbebce1
10 changed files with 43 additions and 339 deletions

View File

@@ -84,5 +84,5 @@ export async function fetchMizanSchema(source, cwd) {
if (!source.django) {
throw new Error('mizan schema export requires django source configuration')
}
return runDjangoCommand(source, cwd, 'export_mizan_schema')
return runDjangoCommand(source, cwd, 'export_djarea_schema')
}

View File

@@ -0,0 +1,16 @@
{
"name": "generate",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "commonjs",
"dependencies": {
"openapi-typescript": "^7.13.0"
}
}