From c15c6f3e146faef0c9ff750a5be4ef2dcc42790f Mon Sep 17 00:00:00 2001 From: Ryth Azhur Date: Sun, 10 May 2026 00:24:30 -0400 Subject: [PATCH] Clean codegen leftovers from mizan-react after the protocol/ relocation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The codegen used to live in mizan-react before mizan-django before protocol/mizan-generate. Each move left sediment in the previous home; the bin entry in particular shadowed mizan-generate's own bin in node_modules/.bin/, breaking `npx mizan-generate`. Caught at integration time when the harness install picked up the stale link. frontends/mizan-react/package.json: - Removed bin entry pointing at the long-gone ./dist/generator/cli.mjs. - Simplified the build script — dropped `cpSync('src/generator', 'dist/generator', ...)`. src/generator hasn't existed in this package since the first move; the cpSync would silently fail at every build. - Removed optionalDependencies (chokidar, minimatch, openapi-typescript) — these were codegen-watcher deps, no longer relevant to the React adapter. examples/{django,fastapi}-react-site/harness/package.json: - Added `mizan-generate` as a file: devDep so `npx mizan-generate --config ` resolves to the right binary in the monorepo. Mirrors the install pattern the README documents for downstream users. Verified: mizan-react vitest 33/33 (78 skipped — integration tests). Codegen runs from harness via npx for both example apps. Co-Authored-By: Claude Opus 4.7 (1M context) --- examples/django-react-site/harness/package.json | 1 + examples/fastapi-react-site/harness/package.json | 1 + frontends/mizan-react/package.json | 10 +--------- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/examples/django-react-site/harness/package.json b/examples/django-react-site/harness/package.json index a3f1801..9beb407 100644 --- a/examples/django-react-site/harness/package.json +++ b/examples/django-react-site/harness/package.json @@ -17,6 +17,7 @@ "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", "@vitejs/plugin-react": "^4.0.0", + "mizan-generate": "file:../../../protocol/mizan-generate", "typescript": "^5.7.0", "vite": "^6.0.0" } diff --git a/examples/fastapi-react-site/harness/package.json b/examples/fastapi-react-site/harness/package.json index 1c55adc..b9b52bf 100644 --- a/examples/fastapi-react-site/harness/package.json +++ b/examples/fastapi-react-site/harness/package.json @@ -16,6 +16,7 @@ "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", "@vitejs/plugin-react": "^4.0.0", + "mizan-generate": "file:../../../protocol/mizan-generate", "typescript": "^5.7.0", "vite": "^6.0.0" } diff --git a/frontends/mizan-react/package.json b/frontends/mizan-react/package.json index b1ad3b6..ab0beed 100644 --- a/frontends/mizan-react/package.json +++ b/frontends/mizan-react/package.json @@ -38,11 +38,8 @@ "import": "./dist/allauth/nextjs.js" } }, - "bin": { - "mizan-generate": "./dist/generator/cli.mjs" - }, "scripts": { - "build": "tsc -p tsconfig.build.json && node -e \"require('fs').cpSync('src/generator','dist/generator',{recursive:true})\"", + "build": "tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch", "test": "vitest run", "test:watch": "vitest", @@ -76,10 +73,5 @@ "typescript": "^5.7.0", "vitest": "^3.0.0", "zod": "^4.3.6" - }, - "optionalDependencies": { - "chokidar": "^4.0.0", - "minimatch": "^10.0.0", - "openapi-typescript": "^7.0.0" } }