Restructure repo into five-package AFI architecture
Mizan is an Application Framework Interface (AFI) with five
independent packages:
packages/
mizan-ast/ Language layer (source → KDL schema)
mizan-schema/ IR layer (KDL schema definition)
mizan-rpc/ Protocol layer (client gen + server adapters)
adapters/django/ ← was django/
generator/ ← was react/src/generator/
mizan-csr/ State layer (client state engine)
adapters/react/ ← was react/
mizan-ssr/ Rendering layer (server-side rendering)
Each package is independent. The adapter directories contain the
framework-specific implementations. Stub packages (ast, schema, ssr)
establish the structure for future work.
264 Django tests + 33 React tests pass from new locations.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
27
packages/mizan-csr/adapters/react/vitest.config.ts
Normal file
27
packages/mizan-csr/adapters/react/vitest.config.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { defineConfig } from 'vitest/config'
|
||||
import path from 'path'
|
||||
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
alias: {
|
||||
'mizan/channels': path.resolve(__dirname, 'src/channels/index.ts'),
|
||||
'mizan/client/react': path.resolve(__dirname, 'src/client/react.ts'),
|
||||
'mizan/client/nextjs': path.resolve(__dirname, 'src/client/nextjs.tsx'),
|
||||
'mizan/client': path.resolve(__dirname, 'src/client/index.ts'),
|
||||
'mizan/jwt': path.resolve(__dirname, 'src/jwt/index.ts'),
|
||||
'mizan/allauth/nextjs': path.resolve(__dirname, 'src/allauth/nextjs.tsx'),
|
||||
'mizan/allauth': path.resolve(__dirname, 'src/allauth/index.ts'),
|
||||
'mizan': path.resolve(__dirname, 'src/index.ts'),
|
||||
},
|
||||
},
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
setupFiles: ['./vitest.setup.ts'],
|
||||
include: ['src/**/*.test.{ts,tsx}'],
|
||||
exclude: [
|
||||
// Requires @/api/generated.mizan.schema.json from consuming project
|
||||
'src/jwt/__tests__/contract.test.ts',
|
||||
],
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user