@cherishxn/agent-scaffold 0.0.0-stage → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +99 -2
- package/THIRD_PARTY_NOTICES.md +18 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +105 -0
- package/dist/diagnostics.d.ts +10 -0
- package/dist/diagnostics.js +27 -0
- package/dist/generate.d.ts +55 -0
- package/dist/generate.js +159 -0
- package/dist/model.d.ts +33 -0
- package/dist/model.js +24 -0
- package/dist/verify.d.ts +67 -0
- package/dist/verify.js +278 -0
- package/package.json +52 -4
- package/schemas/manifest.json +171 -0
- package/schemas/plan.json +164 -0
- package/schemas/result.json +97 -0
- package/schemas/spec.json +50 -0
- package/skills/scaffold-use/SKILL.md +24 -0
- package/templates/catalog.json +37 -0
- package/templates/next-fullstack-antd/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/next-fullstack-antd/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/next-fullstack-antd/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/next-fullstack-antd/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/next-fullstack-antd/.dockerignore +18 -0
- package/templates/next-fullstack-antd/.env.example +13 -0
- package/templates/next-fullstack-antd/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/next-fullstack-antd/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/next-fullstack-antd/.scaffold-checks.json +7 -0
- package/templates/next-fullstack-antd/AGENTS.md +11 -0
- package/templates/next-fullstack-antd/CLAUDE.md +1 -0
- package/templates/next-fullstack-antd/DESIGN.md +208 -0
- package/templates/next-fullstack-antd/LICENSE +21 -0
- package/templates/next-fullstack-antd/README.md +64 -0
- package/templates/next-fullstack-antd/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/next-fullstack-antd/compose.yaml +18 -0
- package/templates/next-fullstack-antd/design/guide.md +61 -0
- package/templates/next-fullstack-antd/design/layout.css +6 -0
- package/templates/next-fullstack-antd/design/structure.json +107 -0
- package/templates/next-fullstack-antd/design/tokens.json +171 -0
- package/templates/next-fullstack-antd/design/widgets.css +30 -0
- package/templates/next-fullstack-antd/design/widgets.json +233 -0
- package/templates/next-fullstack-antd/docs/PROJECT.md +32 -0
- package/templates/next-fullstack-antd/docs/api.d.ts +544 -0
- package/templates/next-fullstack-antd/docs/openapi.json +461 -0
- package/templates/next-fullstack-antd/gitignore.template +19 -0
- package/templates/next-fullstack-antd/licenses/fastapi.txt +21 -0
- package/templates/next-fullstack-antd/licenses/nest.txt +22 -0
- package/templates/next-fullstack-antd/licenses/next.txt +21 -0
- package/templates/next-fullstack-antd/licenses/shadcn.txt +21 -0
- package/templates/next-fullstack-antd/licenses/sources.json +27 -0
- package/templates/next-fullstack-antd/licenses/spring.txt +202 -0
- package/templates/next-fullstack-antd/package-lock.json +494 -0
- package/templates/next-fullstack-antd/package.json +26 -0
- package/templates/next-fullstack-antd/playwright.config.ts +3 -0
- package/templates/next-fullstack-antd/project.json +8 -0
- package/templates/next-fullstack-antd/scripts/api-check.mjs +18 -0
- package/templates/next-fullstack-antd/scripts/api-contract.mjs +46 -0
- package/templates/next-fullstack-antd/scripts/design-coverage.mjs +20 -0
- package/templates/next-fullstack-antd/scripts/design-next-cleanup.mjs +13 -0
- package/templates/next-fullstack-antd/scripts/design-verify.mjs +154 -0
- package/templates/next-fullstack-antd/scripts/design.mjs +108 -0
- package/templates/next-fullstack-antd/scripts/project.mjs +120 -0
- package/templates/next-fullstack-antd/tests/contract-client.ts +20 -0
- package/templates/next-fullstack-antd/tests/contract.spec.ts +49 -0
- package/templates/next-fullstack-antd/tests/design/harness.tsx +63 -0
- package/templates/next-fullstack-antd/tests/ui.spec.ts +61 -0
- package/templates/next-fullstack-antd/web/Dockerfile +12 -0
- package/templates/next-fullstack-antd/web/app/api/auth/login/route.ts +1 -0
- package/templates/next-fullstack-antd/web/app/api/auth/logout/route.ts +1 -0
- package/templates/next-fullstack-antd/web/app/api/auth/me/route.ts +1 -0
- package/templates/next-fullstack-antd/web/app/api/health/route.ts +1 -0
- package/templates/next-fullstack-antd/web/app/api/records/[id]/route.ts +5 -0
- package/templates/next-fullstack-antd/web/app/api/records/route.ts +3 -0
- package/templates/next-fullstack-antd/web/app/layout.tsx +5 -0
- package/templates/next-fullstack-antd/web/app/page.tsx +2 -0
- package/templates/next-fullstack-antd/web/eslint.config.mjs +3 -0
- package/templates/next-fullstack-antd/web/lib/api.ts +35 -0
- package/templates/next-fullstack-antd/web/lib/auth.ts +10 -0
- package/templates/next-fullstack-antd/web/lib/db.ts +3 -0
- package/templates/next-fullstack-antd/web/lib/session.test.ts +15 -0
- package/templates/next-fullstack-antd/web/lib/validation.test.ts +3 -0
- package/templates/next-fullstack-antd/web/lib/validation.ts +5 -0
- package/templates/next-fullstack-antd/web/next-env.d.ts +7 -0
- package/templates/next-fullstack-antd/web/next.config.ts +3 -0
- package/templates/next-fullstack-antd/web/package.json +35 -0
- package/templates/next-fullstack-antd/web/pnpm-lock.yaml +3756 -0
- package/templates/next-fullstack-antd/web/pnpm-workspace.yaml +7 -0
- package/templates/next-fullstack-antd/web/prisma/migrations/202610190001_initial/migration.sql +99 -0
- package/templates/next-fullstack-antd/web/prisma/migrations/migration_lock.toml +1 -0
- package/templates/next-fullstack-antd/web/prisma/schema.prisma +72 -0
- package/templates/next-fullstack-antd/web/scripts/seed.ts +4 -0
- package/templates/next-fullstack-antd/web/src/App.tsx +29 -0
- package/templates/next-fullstack-antd/web/src/design-layout.css +7 -0
- package/templates/next-fullstack-antd/web/src/design-runtime.json +511 -0
- package/templates/next-fullstack-antd/web/src/design-tokens.css +168 -0
- package/templates/next-fullstack-antd/web/src/design-widgets.css +31 -0
- package/templates/next-fullstack-antd/web/src/structure-view.tsx +16 -0
- package/templates/next-fullstack-antd/web/src/styles.css +3 -0
- package/templates/next-fullstack-antd/web/src/ui.tsx +30 -0
- package/templates/next-fullstack-antd/web/src/widget-icon.tsx +5 -0
- package/templates/next-fullstack-antd/web/src/widget-types.ts +13 -0
- package/templates/next-fullstack-antd/web/src/workspace-model.ts +85 -0
- package/templates/next-fullstack-antd/web/tsconfig.json +42 -0
- package/templates/next-fullstack-antd/web/vitest.config.ts +2 -0
- package/templates/next-fullstack-shadcn/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/next-fullstack-shadcn/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/next-fullstack-shadcn/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/next-fullstack-shadcn/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/next-fullstack-shadcn/.dockerignore +18 -0
- package/templates/next-fullstack-shadcn/.env.example +13 -0
- package/templates/next-fullstack-shadcn/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/next-fullstack-shadcn/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/next-fullstack-shadcn/.scaffold-checks.json +7 -0
- package/templates/next-fullstack-shadcn/AGENTS.md +11 -0
- package/templates/next-fullstack-shadcn/CLAUDE.md +1 -0
- package/templates/next-fullstack-shadcn/DESIGN.md +208 -0
- package/templates/next-fullstack-shadcn/LICENSE +21 -0
- package/templates/next-fullstack-shadcn/README.md +64 -0
- package/templates/next-fullstack-shadcn/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/next-fullstack-shadcn/compose.yaml +18 -0
- package/templates/next-fullstack-shadcn/design/guide.md +61 -0
- package/templates/next-fullstack-shadcn/design/layout.css +6 -0
- package/templates/next-fullstack-shadcn/design/structure.json +107 -0
- package/templates/next-fullstack-shadcn/design/tokens.json +171 -0
- package/templates/next-fullstack-shadcn/design/widgets.css +30 -0
- package/templates/next-fullstack-shadcn/design/widgets.json +233 -0
- package/templates/next-fullstack-shadcn/docs/PROJECT.md +32 -0
- package/templates/next-fullstack-shadcn/docs/api.d.ts +544 -0
- package/templates/next-fullstack-shadcn/docs/openapi.json +461 -0
- package/templates/next-fullstack-shadcn/gitignore.template +19 -0
- package/templates/next-fullstack-shadcn/licenses/fastapi.txt +21 -0
- package/templates/next-fullstack-shadcn/licenses/nest.txt +22 -0
- package/templates/next-fullstack-shadcn/licenses/next.txt +21 -0
- package/templates/next-fullstack-shadcn/licenses/shadcn.txt +21 -0
- package/templates/next-fullstack-shadcn/licenses/sources.json +27 -0
- package/templates/next-fullstack-shadcn/licenses/spring.txt +202 -0
- package/templates/next-fullstack-shadcn/package-lock.json +494 -0
- package/templates/next-fullstack-shadcn/package.json +26 -0
- package/templates/next-fullstack-shadcn/playwright.config.ts +3 -0
- package/templates/next-fullstack-shadcn/project.json +8 -0
- package/templates/next-fullstack-shadcn/scripts/api-check.mjs +18 -0
- package/templates/next-fullstack-shadcn/scripts/api-contract.mjs +46 -0
- package/templates/next-fullstack-shadcn/scripts/design-coverage.mjs +20 -0
- package/templates/next-fullstack-shadcn/scripts/design-next-cleanup.mjs +13 -0
- package/templates/next-fullstack-shadcn/scripts/design-verify.mjs +154 -0
- package/templates/next-fullstack-shadcn/scripts/design.mjs +108 -0
- package/templates/next-fullstack-shadcn/scripts/project.mjs +120 -0
- package/templates/next-fullstack-shadcn/tests/contract-client.ts +20 -0
- package/templates/next-fullstack-shadcn/tests/contract.spec.ts +49 -0
- package/templates/next-fullstack-shadcn/tests/design/harness.tsx +63 -0
- package/templates/next-fullstack-shadcn/tests/ui.spec.ts +61 -0
- package/templates/next-fullstack-shadcn/web/Dockerfile +12 -0
- package/templates/next-fullstack-shadcn/web/app/api/auth/login/route.ts +1 -0
- package/templates/next-fullstack-shadcn/web/app/api/auth/logout/route.ts +1 -0
- package/templates/next-fullstack-shadcn/web/app/api/auth/me/route.ts +1 -0
- package/templates/next-fullstack-shadcn/web/app/api/health/route.ts +1 -0
- package/templates/next-fullstack-shadcn/web/app/api/records/[id]/route.ts +5 -0
- package/templates/next-fullstack-shadcn/web/app/api/records/route.ts +3 -0
- package/templates/next-fullstack-shadcn/web/app/layout.tsx +4 -0
- package/templates/next-fullstack-shadcn/web/app/page.tsx +2 -0
- package/templates/next-fullstack-shadcn/web/eslint.config.mjs +3 -0
- package/templates/next-fullstack-shadcn/web/lib/api.ts +35 -0
- package/templates/next-fullstack-shadcn/web/lib/auth.ts +10 -0
- package/templates/next-fullstack-shadcn/web/lib/db.ts +3 -0
- package/templates/next-fullstack-shadcn/web/lib/session.test.ts +15 -0
- package/templates/next-fullstack-shadcn/web/lib/validation.test.ts +3 -0
- package/templates/next-fullstack-shadcn/web/lib/validation.ts +5 -0
- package/templates/next-fullstack-shadcn/web/next-env.d.ts +7 -0
- package/templates/next-fullstack-shadcn/web/next.config.ts +3 -0
- package/templates/next-fullstack-shadcn/web/package.json +39 -0
- package/templates/next-fullstack-shadcn/web/pnpm-lock.yaml +3286 -0
- package/templates/next-fullstack-shadcn/web/pnpm-workspace.yaml +7 -0
- package/templates/next-fullstack-shadcn/web/postcss.config.mjs +1 -0
- package/templates/next-fullstack-shadcn/web/prisma/migrations/202610190001_initial/migration.sql +99 -0
- package/templates/next-fullstack-shadcn/web/prisma/migrations/migration_lock.toml +1 -0
- package/templates/next-fullstack-shadcn/web/prisma/schema.prisma +72 -0
- package/templates/next-fullstack-shadcn/web/scripts/seed.ts +4 -0
- package/templates/next-fullstack-shadcn/web/src/App.tsx +30 -0
- package/templates/next-fullstack-shadcn/web/src/design-layout.css +7 -0
- package/templates/next-fullstack-shadcn/web/src/design-runtime.json +511 -0
- package/templates/next-fullstack-shadcn/web/src/design-tokens.css +168 -0
- package/templates/next-fullstack-shadcn/web/src/design-widgets.css +31 -0
- package/templates/next-fullstack-shadcn/web/src/structure-view.tsx +16 -0
- package/templates/next-fullstack-shadcn/web/src/styles.css +3 -0
- package/templates/next-fullstack-shadcn/web/src/tailwind.css +2 -0
- package/templates/next-fullstack-shadcn/web/src/ui.tsx +13 -0
- package/templates/next-fullstack-shadcn/web/src/widget-icon.tsx +5 -0
- package/templates/next-fullstack-shadcn/web/src/widget-types.ts +13 -0
- package/templates/next-fullstack-shadcn/web/src/workspace-model.ts +85 -0
- package/templates/next-fullstack-shadcn/web/tsconfig.json +42 -0
- package/templates/next-fullstack-shadcn/web/vitest.config.ts +2 -0
- package/templates/react-fastapi-antd/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/react-fastapi-antd/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/react-fastapi-antd/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/react-fastapi-antd/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/react-fastapi-antd/.dockerignore +18 -0
- package/templates/react-fastapi-antd/.env.example +13 -0
- package/templates/react-fastapi-antd/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/react-fastapi-antd/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/react-fastapi-antd/.scaffold-checks.json +7 -0
- package/templates/react-fastapi-antd/AGENTS.md +11 -0
- package/templates/react-fastapi-antd/CLAUDE.md +1 -0
- package/templates/react-fastapi-antd/DESIGN.md +208 -0
- package/templates/react-fastapi-antd/LICENSE +21 -0
- package/templates/react-fastapi-antd/README.md +64 -0
- package/templates/react-fastapi-antd/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/react-fastapi-antd/backend/.python-version +1 -0
- package/templates/react-fastapi-antd/backend/Dockerfile +10 -0
- package/templates/react-fastapi-antd/backend/alembic.ini +3 -0
- package/templates/react-fastapi-antd/backend/app/__init__.py +0 -0
- package/templates/react-fastapi-antd/backend/app/core/__init__.py +0 -0
- package/templates/react-fastapi-antd/backend/app/core/security.py +25 -0
- package/templates/react-fastapi-antd/backend/app/db.py +11 -0
- package/templates/react-fastapi-antd/backend/app/main.py +146 -0
- package/templates/react-fastapi-antd/backend/app/models.py +21 -0
- package/templates/react-fastapi-antd/backend/app/seed.py +21 -0
- package/templates/react-fastapi-antd/backend/migrations/env.py +9 -0
- package/templates/react-fastapi-antd/backend/migrations/versions/0001_initial.py +18 -0
- package/templates/react-fastapi-antd/backend/pyproject.toml +16 -0
- package/templates/react-fastapi-antd/backend/tests/test_api.py +27 -0
- package/templates/react-fastapi-antd/backend/uv.lock +1085 -0
- package/templates/react-fastapi-antd/compose.yaml +18 -0
- package/templates/react-fastapi-antd/design/guide.md +61 -0
- package/templates/react-fastapi-antd/design/layout.css +6 -0
- package/templates/react-fastapi-antd/design/structure.json +107 -0
- package/templates/react-fastapi-antd/design/tokens.json +171 -0
- package/templates/react-fastapi-antd/design/widgets.css +30 -0
- package/templates/react-fastapi-antd/design/widgets.json +233 -0
- package/templates/react-fastapi-antd/docs/PROJECT.md +32 -0
- package/templates/react-fastapi-antd/docs/api.d.ts +544 -0
- package/templates/react-fastapi-antd/docs/openapi.json +461 -0
- package/templates/react-fastapi-antd/gitignore.template +19 -0
- package/templates/react-fastapi-antd/licenses/fastapi.txt +21 -0
- package/templates/react-fastapi-antd/licenses/nest.txt +22 -0
- package/templates/react-fastapi-antd/licenses/next.txt +21 -0
- package/templates/react-fastapi-antd/licenses/shadcn.txt +21 -0
- package/templates/react-fastapi-antd/licenses/sources.json +27 -0
- package/templates/react-fastapi-antd/licenses/spring.txt +202 -0
- package/templates/react-fastapi-antd/package-lock.json +494 -0
- package/templates/react-fastapi-antd/package.json +26 -0
- package/templates/react-fastapi-antd/playwright.config.ts +3 -0
- package/templates/react-fastapi-antd/project.json +8 -0
- package/templates/react-fastapi-antd/scripts/api-check.mjs +18 -0
- package/templates/react-fastapi-antd/scripts/api-contract.mjs +46 -0
- package/templates/react-fastapi-antd/scripts/design-coverage.mjs +20 -0
- package/templates/react-fastapi-antd/scripts/design-next-cleanup.mjs +13 -0
- package/templates/react-fastapi-antd/scripts/design-verify.mjs +154 -0
- package/templates/react-fastapi-antd/scripts/design.mjs +108 -0
- package/templates/react-fastapi-antd/scripts/project.mjs +120 -0
- package/templates/react-fastapi-antd/tests/contract-client.ts +20 -0
- package/templates/react-fastapi-antd/tests/contract.spec.ts +49 -0
- package/templates/react-fastapi-antd/tests/design/harness.tsx +63 -0
- package/templates/react-fastapi-antd/tests/ui.spec.ts +61 -0
- package/templates/react-fastapi-antd/web/bun.lock +442 -0
- package/templates/react-fastapi-antd/web/eslint.config.mjs +3 -0
- package/templates/react-fastapi-antd/web/index.html +1 -0
- package/templates/react-fastapi-antd/web/package.json +28 -0
- package/templates/react-fastapi-antd/web/src/App.tsx +29 -0
- package/templates/react-fastapi-antd/web/src/design-layout.css +7 -0
- package/templates/react-fastapi-antd/web/src/design-runtime.json +511 -0
- package/templates/react-fastapi-antd/web/src/design-tokens.css +168 -0
- package/templates/react-fastapi-antd/web/src/design-widgets.css +31 -0
- package/templates/react-fastapi-antd/web/src/main.tsx +6 -0
- package/templates/react-fastapi-antd/web/src/structure-view.tsx +16 -0
- package/templates/react-fastapi-antd/web/src/styles.css +3 -0
- package/templates/react-fastapi-antd/web/src/ui.tsx +30 -0
- package/templates/react-fastapi-antd/web/src/widget-icon.tsx +5 -0
- package/templates/react-fastapi-antd/web/src/widget-types.ts +13 -0
- package/templates/react-fastapi-antd/web/src/workspace-model.ts +85 -0
- package/templates/react-fastapi-antd/web/tsconfig.json +22 -0
- package/templates/react-fastapi-antd/web/vite.config.ts +3 -0
- package/templates/react-fastapi-shadcn/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/react-fastapi-shadcn/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/react-fastapi-shadcn/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/react-fastapi-shadcn/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/react-fastapi-shadcn/.dockerignore +18 -0
- package/templates/react-fastapi-shadcn/.env.example +13 -0
- package/templates/react-fastapi-shadcn/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/react-fastapi-shadcn/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/react-fastapi-shadcn/.scaffold-checks.json +7 -0
- package/templates/react-fastapi-shadcn/AGENTS.md +11 -0
- package/templates/react-fastapi-shadcn/CLAUDE.md +1 -0
- package/templates/react-fastapi-shadcn/DESIGN.md +208 -0
- package/templates/react-fastapi-shadcn/LICENSE +21 -0
- package/templates/react-fastapi-shadcn/README.md +64 -0
- package/templates/react-fastapi-shadcn/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/react-fastapi-shadcn/backend/.python-version +1 -0
- package/templates/react-fastapi-shadcn/backend/Dockerfile +10 -0
- package/templates/react-fastapi-shadcn/backend/alembic.ini +3 -0
- package/templates/react-fastapi-shadcn/backend/app/__init__.py +0 -0
- package/templates/react-fastapi-shadcn/backend/app/core/__init__.py +0 -0
- package/templates/react-fastapi-shadcn/backend/app/core/security.py +25 -0
- package/templates/react-fastapi-shadcn/backend/app/db.py +11 -0
- package/templates/react-fastapi-shadcn/backend/app/main.py +146 -0
- package/templates/react-fastapi-shadcn/backend/app/models.py +21 -0
- package/templates/react-fastapi-shadcn/backend/app/seed.py +21 -0
- package/templates/react-fastapi-shadcn/backend/migrations/env.py +9 -0
- package/templates/react-fastapi-shadcn/backend/migrations/versions/0001_initial.py +18 -0
- package/templates/react-fastapi-shadcn/backend/pyproject.toml +16 -0
- package/templates/react-fastapi-shadcn/backend/tests/test_api.py +27 -0
- package/templates/react-fastapi-shadcn/backend/uv.lock +1085 -0
- package/templates/react-fastapi-shadcn/compose.yaml +18 -0
- package/templates/react-fastapi-shadcn/design/guide.md +61 -0
- package/templates/react-fastapi-shadcn/design/layout.css +6 -0
- package/templates/react-fastapi-shadcn/design/structure.json +107 -0
- package/templates/react-fastapi-shadcn/design/tokens.json +171 -0
- package/templates/react-fastapi-shadcn/design/widgets.css +30 -0
- package/templates/react-fastapi-shadcn/design/widgets.json +233 -0
- package/templates/react-fastapi-shadcn/docs/PROJECT.md +32 -0
- package/templates/react-fastapi-shadcn/docs/api.d.ts +544 -0
- package/templates/react-fastapi-shadcn/docs/openapi.json +461 -0
- package/templates/react-fastapi-shadcn/gitignore.template +19 -0
- package/templates/react-fastapi-shadcn/licenses/fastapi.txt +21 -0
- package/templates/react-fastapi-shadcn/licenses/nest.txt +22 -0
- package/templates/react-fastapi-shadcn/licenses/next.txt +21 -0
- package/templates/react-fastapi-shadcn/licenses/shadcn.txt +21 -0
- package/templates/react-fastapi-shadcn/licenses/sources.json +27 -0
- package/templates/react-fastapi-shadcn/licenses/spring.txt +202 -0
- package/templates/react-fastapi-shadcn/package-lock.json +494 -0
- package/templates/react-fastapi-shadcn/package.json +26 -0
- package/templates/react-fastapi-shadcn/playwright.config.ts +3 -0
- package/templates/react-fastapi-shadcn/project.json +8 -0
- package/templates/react-fastapi-shadcn/scripts/api-check.mjs +18 -0
- package/templates/react-fastapi-shadcn/scripts/api-contract.mjs +46 -0
- package/templates/react-fastapi-shadcn/scripts/design-coverage.mjs +20 -0
- package/templates/react-fastapi-shadcn/scripts/design-next-cleanup.mjs +13 -0
- package/templates/react-fastapi-shadcn/scripts/design-verify.mjs +154 -0
- package/templates/react-fastapi-shadcn/scripts/design.mjs +108 -0
- package/templates/react-fastapi-shadcn/scripts/project.mjs +120 -0
- package/templates/react-fastapi-shadcn/tests/contract-client.ts +20 -0
- package/templates/react-fastapi-shadcn/tests/contract.spec.ts +49 -0
- package/templates/react-fastapi-shadcn/tests/design/harness.tsx +63 -0
- package/templates/react-fastapi-shadcn/tests/ui.spec.ts +61 -0
- package/templates/react-fastapi-shadcn/web/bun.lock +413 -0
- package/templates/react-fastapi-shadcn/web/eslint.config.mjs +3 -0
- package/templates/react-fastapi-shadcn/web/index.html +1 -0
- package/templates/react-fastapi-shadcn/web/package.json +33 -0
- package/templates/react-fastapi-shadcn/web/src/App.tsx +30 -0
- package/templates/react-fastapi-shadcn/web/src/design-layout.css +7 -0
- package/templates/react-fastapi-shadcn/web/src/design-runtime.json +511 -0
- package/templates/react-fastapi-shadcn/web/src/design-tokens.css +168 -0
- package/templates/react-fastapi-shadcn/web/src/design-widgets.css +31 -0
- package/templates/react-fastapi-shadcn/web/src/main.tsx +6 -0
- package/templates/react-fastapi-shadcn/web/src/structure-view.tsx +16 -0
- package/templates/react-fastapi-shadcn/web/src/styles.css +3 -0
- package/templates/react-fastapi-shadcn/web/src/tailwind.css +2 -0
- package/templates/react-fastapi-shadcn/web/src/ui.tsx +13 -0
- package/templates/react-fastapi-shadcn/web/src/widget-icon.tsx +5 -0
- package/templates/react-fastapi-shadcn/web/src/widget-types.ts +13 -0
- package/templates/react-fastapi-shadcn/web/src/workspace-model.ts +85 -0
- package/templates/react-fastapi-shadcn/web/tsconfig.json +22 -0
- package/templates/react-fastapi-shadcn/web/vite.config.ts +4 -0
- package/templates/react-nest-antd/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/react-nest-antd/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/react-nest-antd/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/react-nest-antd/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/react-nest-antd/.dockerignore +18 -0
- package/templates/react-nest-antd/.env.example +13 -0
- package/templates/react-nest-antd/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/react-nest-antd/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/react-nest-antd/.scaffold-checks.json +7 -0
- package/templates/react-nest-antd/AGENTS.md +11 -0
- package/templates/react-nest-antd/CLAUDE.md +1 -0
- package/templates/react-nest-antd/DESIGN.md +208 -0
- package/templates/react-nest-antd/LICENSE +21 -0
- package/templates/react-nest-antd/README.md +64 -0
- package/templates/react-nest-antd/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/react-nest-antd/backend/Dockerfile +12 -0
- package/templates/react-nest-antd/backend/eslint.config.mjs +3 -0
- package/templates/react-nest-antd/backend/jest.config.cjs +1 -0
- package/templates/react-nest-antd/backend/package.json +40 -0
- package/templates/react-nest-antd/backend/pnpm-lock.yaml +5165 -0
- package/templates/react-nest-antd/backend/pnpm-workspace.yaml +6 -0
- package/templates/react-nest-antd/backend/prisma/migrations/202610190001_initial/migration.sql +3 -0
- package/templates/react-nest-antd/backend/prisma/migrations/migration_lock.toml +1 -0
- package/templates/react-nest-antd/backend/prisma/schema.prisma +25 -0
- package/templates/react-nest-antd/backend/scripts/seed.ts +4 -0
- package/templates/react-nest-antd/backend/src/app.module.ts +43 -0
- package/templates/react-nest-antd/backend/src/main.ts +6 -0
- package/templates/react-nest-antd/backend/src/password.ts +3 -0
- package/templates/react-nest-antd/backend/src/validation.ts +7 -0
- package/templates/react-nest-antd/backend/test/api.test.ts +25 -0
- package/templates/react-nest-antd/backend/tsconfig.build.json +15 -0
- package/templates/react-nest-antd/backend/tsconfig.json +17 -0
- package/templates/react-nest-antd/compose.yaml +18 -0
- package/templates/react-nest-antd/design/guide.md +61 -0
- package/templates/react-nest-antd/design/layout.css +6 -0
- package/templates/react-nest-antd/design/structure.json +107 -0
- package/templates/react-nest-antd/design/tokens.json +171 -0
- package/templates/react-nest-antd/design/widgets.css +30 -0
- package/templates/react-nest-antd/design/widgets.json +233 -0
- package/templates/react-nest-antd/docs/PROJECT.md +32 -0
- package/templates/react-nest-antd/docs/api.d.ts +544 -0
- package/templates/react-nest-antd/docs/openapi.json +461 -0
- package/templates/react-nest-antd/gitignore.template +19 -0
- package/templates/react-nest-antd/licenses/fastapi.txt +21 -0
- package/templates/react-nest-antd/licenses/nest.txt +22 -0
- package/templates/react-nest-antd/licenses/next.txt +21 -0
- package/templates/react-nest-antd/licenses/shadcn.txt +21 -0
- package/templates/react-nest-antd/licenses/sources.json +27 -0
- package/templates/react-nest-antd/licenses/spring.txt +202 -0
- package/templates/react-nest-antd/package-lock.json +494 -0
- package/templates/react-nest-antd/package.json +26 -0
- package/templates/react-nest-antd/playwright.config.ts +3 -0
- package/templates/react-nest-antd/project.json +8 -0
- package/templates/react-nest-antd/scripts/api-check.mjs +18 -0
- package/templates/react-nest-antd/scripts/api-contract.mjs +46 -0
- package/templates/react-nest-antd/scripts/design-coverage.mjs +20 -0
- package/templates/react-nest-antd/scripts/design-next-cleanup.mjs +13 -0
- package/templates/react-nest-antd/scripts/design-verify.mjs +154 -0
- package/templates/react-nest-antd/scripts/design.mjs +108 -0
- package/templates/react-nest-antd/scripts/project.mjs +120 -0
- package/templates/react-nest-antd/tests/contract-client.ts +20 -0
- package/templates/react-nest-antd/tests/contract.spec.ts +49 -0
- package/templates/react-nest-antd/tests/design/harness.tsx +63 -0
- package/templates/react-nest-antd/tests/ui.spec.ts +61 -0
- package/templates/react-nest-antd/web/eslint.config.mjs +3 -0
- package/templates/react-nest-antd/web/index.html +1 -0
- package/templates/react-nest-antd/web/package.json +28 -0
- package/templates/react-nest-antd/web/pnpm-lock.yaml +2215 -0
- package/templates/react-nest-antd/web/src/App.tsx +29 -0
- package/templates/react-nest-antd/web/src/design-layout.css +7 -0
- package/templates/react-nest-antd/web/src/design-runtime.json +511 -0
- package/templates/react-nest-antd/web/src/design-tokens.css +168 -0
- package/templates/react-nest-antd/web/src/design-widgets.css +31 -0
- package/templates/react-nest-antd/web/src/main.tsx +6 -0
- package/templates/react-nest-antd/web/src/structure-view.tsx +16 -0
- package/templates/react-nest-antd/web/src/styles.css +3 -0
- package/templates/react-nest-antd/web/src/ui.tsx +30 -0
- package/templates/react-nest-antd/web/src/widget-icon.tsx +5 -0
- package/templates/react-nest-antd/web/src/widget-types.ts +13 -0
- package/templates/react-nest-antd/web/src/workspace-model.ts +85 -0
- package/templates/react-nest-antd/web/tsconfig.json +22 -0
- package/templates/react-nest-antd/web/vite.config.ts +3 -0
- package/templates/react-nest-shadcn/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/react-nest-shadcn/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/react-nest-shadcn/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/react-nest-shadcn/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/react-nest-shadcn/.dockerignore +18 -0
- package/templates/react-nest-shadcn/.env.example +13 -0
- package/templates/react-nest-shadcn/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/react-nest-shadcn/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/react-nest-shadcn/.scaffold-checks.json +7 -0
- package/templates/react-nest-shadcn/AGENTS.md +11 -0
- package/templates/react-nest-shadcn/CLAUDE.md +1 -0
- package/templates/react-nest-shadcn/DESIGN.md +208 -0
- package/templates/react-nest-shadcn/LICENSE +21 -0
- package/templates/react-nest-shadcn/README.md +64 -0
- package/templates/react-nest-shadcn/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/react-nest-shadcn/backend/Dockerfile +12 -0
- package/templates/react-nest-shadcn/backend/eslint.config.mjs +3 -0
- package/templates/react-nest-shadcn/backend/jest.config.cjs +1 -0
- package/templates/react-nest-shadcn/backend/package.json +40 -0
- package/templates/react-nest-shadcn/backend/pnpm-lock.yaml +5165 -0
- package/templates/react-nest-shadcn/backend/pnpm-workspace.yaml +6 -0
- package/templates/react-nest-shadcn/backend/prisma/migrations/202610190001_initial/migration.sql +3 -0
- package/templates/react-nest-shadcn/backend/prisma/migrations/migration_lock.toml +1 -0
- package/templates/react-nest-shadcn/backend/prisma/schema.prisma +25 -0
- package/templates/react-nest-shadcn/backend/scripts/seed.ts +4 -0
- package/templates/react-nest-shadcn/backend/src/app.module.ts +43 -0
- package/templates/react-nest-shadcn/backend/src/main.ts +6 -0
- package/templates/react-nest-shadcn/backend/src/password.ts +3 -0
- package/templates/react-nest-shadcn/backend/src/validation.ts +7 -0
- package/templates/react-nest-shadcn/backend/test/api.test.ts +25 -0
- package/templates/react-nest-shadcn/backend/tsconfig.build.json +15 -0
- package/templates/react-nest-shadcn/backend/tsconfig.json +17 -0
- package/templates/react-nest-shadcn/compose.yaml +18 -0
- package/templates/react-nest-shadcn/design/guide.md +61 -0
- package/templates/react-nest-shadcn/design/layout.css +6 -0
- package/templates/react-nest-shadcn/design/structure.json +107 -0
- package/templates/react-nest-shadcn/design/tokens.json +171 -0
- package/templates/react-nest-shadcn/design/widgets.css +30 -0
- package/templates/react-nest-shadcn/design/widgets.json +233 -0
- package/templates/react-nest-shadcn/docs/PROJECT.md +32 -0
- package/templates/react-nest-shadcn/docs/api.d.ts +544 -0
- package/templates/react-nest-shadcn/docs/openapi.json +461 -0
- package/templates/react-nest-shadcn/gitignore.template +19 -0
- package/templates/react-nest-shadcn/licenses/fastapi.txt +21 -0
- package/templates/react-nest-shadcn/licenses/nest.txt +22 -0
- package/templates/react-nest-shadcn/licenses/next.txt +21 -0
- package/templates/react-nest-shadcn/licenses/shadcn.txt +21 -0
- package/templates/react-nest-shadcn/licenses/sources.json +27 -0
- package/templates/react-nest-shadcn/licenses/spring.txt +202 -0
- package/templates/react-nest-shadcn/package-lock.json +494 -0
- package/templates/react-nest-shadcn/package.json +26 -0
- package/templates/react-nest-shadcn/playwright.config.ts +3 -0
- package/templates/react-nest-shadcn/project.json +8 -0
- package/templates/react-nest-shadcn/scripts/api-check.mjs +18 -0
- package/templates/react-nest-shadcn/scripts/api-contract.mjs +46 -0
- package/templates/react-nest-shadcn/scripts/design-coverage.mjs +20 -0
- package/templates/react-nest-shadcn/scripts/design-next-cleanup.mjs +13 -0
- package/templates/react-nest-shadcn/scripts/design-verify.mjs +154 -0
- package/templates/react-nest-shadcn/scripts/design.mjs +108 -0
- package/templates/react-nest-shadcn/scripts/project.mjs +120 -0
- package/templates/react-nest-shadcn/tests/contract-client.ts +20 -0
- package/templates/react-nest-shadcn/tests/contract.spec.ts +49 -0
- package/templates/react-nest-shadcn/tests/design/harness.tsx +63 -0
- package/templates/react-nest-shadcn/tests/ui.spec.ts +61 -0
- package/templates/react-nest-shadcn/web/eslint.config.mjs +3 -0
- package/templates/react-nest-shadcn/web/index.html +1 -0
- package/templates/react-nest-shadcn/web/package.json +33 -0
- package/templates/react-nest-shadcn/web/pnpm-lock.yaml +1788 -0
- package/templates/react-nest-shadcn/web/src/App.tsx +30 -0
- package/templates/react-nest-shadcn/web/src/design-layout.css +7 -0
- package/templates/react-nest-shadcn/web/src/design-runtime.json +511 -0
- package/templates/react-nest-shadcn/web/src/design-tokens.css +168 -0
- package/templates/react-nest-shadcn/web/src/design-widgets.css +31 -0
- package/templates/react-nest-shadcn/web/src/main.tsx +6 -0
- package/templates/react-nest-shadcn/web/src/structure-view.tsx +16 -0
- package/templates/react-nest-shadcn/web/src/styles.css +3 -0
- package/templates/react-nest-shadcn/web/src/tailwind.css +2 -0
- package/templates/react-nest-shadcn/web/src/ui.tsx +13 -0
- package/templates/react-nest-shadcn/web/src/widget-icon.tsx +5 -0
- package/templates/react-nest-shadcn/web/src/widget-types.ts +13 -0
- package/templates/react-nest-shadcn/web/src/workspace-model.ts +85 -0
- package/templates/react-nest-shadcn/web/tsconfig.json +22 -0
- package/templates/react-nest-shadcn/web/vite.config.ts +4 -0
- package/templates/react-spring-antd/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/react-spring-antd/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/react-spring-antd/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/react-spring-antd/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/react-spring-antd/.dockerignore +18 -0
- package/templates/react-spring-antd/.env.example +13 -0
- package/templates/react-spring-antd/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/react-spring-antd/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/react-spring-antd/.scaffold-checks.json +7 -0
- package/templates/react-spring-antd/AGENTS.md +11 -0
- package/templates/react-spring-antd/CLAUDE.md +1 -0
- package/templates/react-spring-antd/DESIGN.md +208 -0
- package/templates/react-spring-antd/LICENSE +21 -0
- package/templates/react-spring-antd/README.md +64 -0
- package/templates/react-spring-antd/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/react-spring-antd/backend/.mvn/wrapper/maven-wrapper.properties +3 -0
- package/templates/react-spring-antd/backend/Dockerfile +11 -0
- package/templates/react-spring-antd/backend/mvnw +295 -0
- package/templates/react-spring-antd/backend/pom.xml +15 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Api.java +38 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/AppUser.java +11 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Application.java +7 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Errors.java +13 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/PersonalRecord.java +15 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Records.java +14 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Security.java +28 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Seed.java +13 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Users.java +5 -0
- package/templates/react-spring-antd/backend/src/main/resources/application.properties +17 -0
- package/templates/react-spring-antd/backend/src/main/resources/db/migration/V1__initial.sql +3 -0
- package/templates/react-spring-antd/backend/src/main/resources/openapi.json +461 -0
- package/templates/react-spring-antd/backend/src/test/java/dev/scaffold/app/ApiTest.java +28 -0
- package/templates/react-spring-antd/backend/src/test/java/dev/scaffold/app/SessionExpiryTest.java +37 -0
- package/templates/react-spring-antd/compose.yaml +18 -0
- package/templates/react-spring-antd/design/guide.md +61 -0
- package/templates/react-spring-antd/design/layout.css +6 -0
- package/templates/react-spring-antd/design/structure.json +107 -0
- package/templates/react-spring-antd/design/tokens.json +171 -0
- package/templates/react-spring-antd/design/widgets.css +30 -0
- package/templates/react-spring-antd/design/widgets.json +233 -0
- package/templates/react-spring-antd/docs/PROJECT.md +32 -0
- package/templates/react-spring-antd/docs/api.d.ts +544 -0
- package/templates/react-spring-antd/docs/openapi.json +461 -0
- package/templates/react-spring-antd/gitignore.template +19 -0
- package/templates/react-spring-antd/licenses/fastapi.txt +21 -0
- package/templates/react-spring-antd/licenses/nest.txt +22 -0
- package/templates/react-spring-antd/licenses/next.txt +21 -0
- package/templates/react-spring-antd/licenses/shadcn.txt +21 -0
- package/templates/react-spring-antd/licenses/sources.json +27 -0
- package/templates/react-spring-antd/licenses/spring.txt +202 -0
- package/templates/react-spring-antd/package-lock.json +494 -0
- package/templates/react-spring-antd/package.json +26 -0
- package/templates/react-spring-antd/playwright.config.ts +3 -0
- package/templates/react-spring-antd/project.json +8 -0
- package/templates/react-spring-antd/scripts/api-check.mjs +18 -0
- package/templates/react-spring-antd/scripts/api-contract.mjs +46 -0
- package/templates/react-spring-antd/scripts/design-coverage.mjs +20 -0
- package/templates/react-spring-antd/scripts/design-next-cleanup.mjs +13 -0
- package/templates/react-spring-antd/scripts/design-verify.mjs +154 -0
- package/templates/react-spring-antd/scripts/design.mjs +108 -0
- package/templates/react-spring-antd/scripts/project.mjs +120 -0
- package/templates/react-spring-antd/tests/contract-client.ts +20 -0
- package/templates/react-spring-antd/tests/contract.spec.ts +49 -0
- package/templates/react-spring-antd/tests/design/harness.tsx +63 -0
- package/templates/react-spring-antd/tests/ui.spec.ts +61 -0
- package/templates/react-spring-antd/web/eslint.config.mjs +3 -0
- package/templates/react-spring-antd/web/index.html +1 -0
- package/templates/react-spring-antd/web/package.json +28 -0
- package/templates/react-spring-antd/web/pnpm-lock.yaml +2215 -0
- package/templates/react-spring-antd/web/src/App.tsx +29 -0
- package/templates/react-spring-antd/web/src/design-layout.css +7 -0
- package/templates/react-spring-antd/web/src/design-runtime.json +511 -0
- package/templates/react-spring-antd/web/src/design-tokens.css +168 -0
- package/templates/react-spring-antd/web/src/design-widgets.css +31 -0
- package/templates/react-spring-antd/web/src/main.tsx +6 -0
- package/templates/react-spring-antd/web/src/structure-view.tsx +16 -0
- package/templates/react-spring-antd/web/src/styles.css +3 -0
- package/templates/react-spring-antd/web/src/ui.tsx +30 -0
- package/templates/react-spring-antd/web/src/widget-icon.tsx +5 -0
- package/templates/react-spring-antd/web/src/widget-types.ts +13 -0
- package/templates/react-spring-antd/web/src/workspace-model.ts +85 -0
- package/templates/react-spring-antd/web/tsconfig.json +22 -0
- package/templates/react-spring-antd/web/vite.config.ts +3 -0
- package/templates/react-spring-shadcn/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/react-spring-shadcn/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/react-spring-shadcn/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/react-spring-shadcn/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/react-spring-shadcn/.dockerignore +18 -0
- package/templates/react-spring-shadcn/.env.example +13 -0
- package/templates/react-spring-shadcn/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/react-spring-shadcn/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/react-spring-shadcn/.scaffold-checks.json +7 -0
- package/templates/react-spring-shadcn/AGENTS.md +11 -0
- package/templates/react-spring-shadcn/CLAUDE.md +1 -0
- package/templates/react-spring-shadcn/DESIGN.md +208 -0
- package/templates/react-spring-shadcn/LICENSE +21 -0
- package/templates/react-spring-shadcn/README.md +64 -0
- package/templates/react-spring-shadcn/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/react-spring-shadcn/backend/.mvn/wrapper/maven-wrapper.properties +3 -0
- package/templates/react-spring-shadcn/backend/Dockerfile +11 -0
- package/templates/react-spring-shadcn/backend/mvnw +295 -0
- package/templates/react-spring-shadcn/backend/pom.xml +15 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Api.java +38 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/AppUser.java +11 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Application.java +7 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Errors.java +13 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/PersonalRecord.java +15 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Records.java +14 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Security.java +28 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Seed.java +13 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Users.java +5 -0
- package/templates/react-spring-shadcn/backend/src/main/resources/application.properties +17 -0
- package/templates/react-spring-shadcn/backend/src/main/resources/db/migration/V1__initial.sql +3 -0
- package/templates/react-spring-shadcn/backend/src/main/resources/openapi.json +461 -0
- package/templates/react-spring-shadcn/backend/src/test/java/dev/scaffold/app/ApiTest.java +28 -0
- package/templates/react-spring-shadcn/backend/src/test/java/dev/scaffold/app/SessionExpiryTest.java +37 -0
- package/templates/react-spring-shadcn/compose.yaml +18 -0
- package/templates/react-spring-shadcn/design/guide.md +61 -0
- package/templates/react-spring-shadcn/design/layout.css +6 -0
- package/templates/react-spring-shadcn/design/structure.json +107 -0
- package/templates/react-spring-shadcn/design/tokens.json +171 -0
- package/templates/react-spring-shadcn/design/widgets.css +30 -0
- package/templates/react-spring-shadcn/design/widgets.json +233 -0
- package/templates/react-spring-shadcn/docs/PROJECT.md +32 -0
- package/templates/react-spring-shadcn/docs/api.d.ts +544 -0
- package/templates/react-spring-shadcn/docs/openapi.json +461 -0
- package/templates/react-spring-shadcn/gitignore.template +19 -0
- package/templates/react-spring-shadcn/licenses/fastapi.txt +21 -0
- package/templates/react-spring-shadcn/licenses/nest.txt +22 -0
- package/templates/react-spring-shadcn/licenses/next.txt +21 -0
- package/templates/react-spring-shadcn/licenses/shadcn.txt +21 -0
- package/templates/react-spring-shadcn/licenses/sources.json +27 -0
- package/templates/react-spring-shadcn/licenses/spring.txt +202 -0
- package/templates/react-spring-shadcn/package-lock.json +494 -0
- package/templates/react-spring-shadcn/package.json +26 -0
- package/templates/react-spring-shadcn/playwright.config.ts +3 -0
- package/templates/react-spring-shadcn/project.json +8 -0
- package/templates/react-spring-shadcn/scripts/api-check.mjs +18 -0
- package/templates/react-spring-shadcn/scripts/api-contract.mjs +46 -0
- package/templates/react-spring-shadcn/scripts/design-coverage.mjs +20 -0
- package/templates/react-spring-shadcn/scripts/design-next-cleanup.mjs +13 -0
- package/templates/react-spring-shadcn/scripts/design-verify.mjs +154 -0
- package/templates/react-spring-shadcn/scripts/design.mjs +108 -0
- package/templates/react-spring-shadcn/scripts/project.mjs +120 -0
- package/templates/react-spring-shadcn/tests/contract-client.ts +20 -0
- package/templates/react-spring-shadcn/tests/contract.spec.ts +49 -0
- package/templates/react-spring-shadcn/tests/design/harness.tsx +63 -0
- package/templates/react-spring-shadcn/tests/ui.spec.ts +61 -0
- package/templates/react-spring-shadcn/web/eslint.config.mjs +3 -0
- package/templates/react-spring-shadcn/web/index.html +1 -0
- package/templates/react-spring-shadcn/web/package.json +33 -0
- package/templates/react-spring-shadcn/web/pnpm-lock.yaml +1788 -0
- package/templates/react-spring-shadcn/web/src/App.tsx +30 -0
- package/templates/react-spring-shadcn/web/src/design-layout.css +7 -0
- package/templates/react-spring-shadcn/web/src/design-runtime.json +511 -0
- package/templates/react-spring-shadcn/web/src/design-tokens.css +168 -0
- package/templates/react-spring-shadcn/web/src/design-widgets.css +31 -0
- package/templates/react-spring-shadcn/web/src/main.tsx +6 -0
- package/templates/react-spring-shadcn/web/src/structure-view.tsx +16 -0
- package/templates/react-spring-shadcn/web/src/styles.css +3 -0
- package/templates/react-spring-shadcn/web/src/tailwind.css +2 -0
- package/templates/react-spring-shadcn/web/src/ui.tsx +13 -0
- package/templates/react-spring-shadcn/web/src/widget-icon.tsx +5 -0
- package/templates/react-spring-shadcn/web/src/widget-types.ts +13 -0
- package/templates/react-spring-shadcn/web/src/workspace-model.ts +85 -0
- package/templates/react-spring-shadcn/web/tsconfig.json +22 -0
- package/templates/react-spring-shadcn/web/vite.config.ts +4 -0
package/dist/verify.js
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { diagnose } from './diagnostics.js';
|
|
2
|
+
import { spawn } from 'node:child_process';
|
|
3
|
+
import { mkdir, readFile, writeFile, readdir, lstat } from 'node:fs/promises';
|
|
4
|
+
import { resolve, join, relative } from 'node:path';
|
|
5
|
+
import { randomBytes, randomUUID } from 'node:crypto';
|
|
6
|
+
import { createServer } from 'node:net';
|
|
7
|
+
import { platform, arch } from 'node:os';
|
|
8
|
+
import { jsonFile, specFrom } from './generate.js';
|
|
9
|
+
import { CLI_VERSION, digest, canonical, ScaffoldError } from './model.js';
|
|
10
|
+
const envKeys = ['PATH', 'HOME', 'TMPDIR', 'TMP', 'TEMP', 'JAVA_HOME', 'PNPM_HOME', 'UV_CACHE_DIR', 'COREPACK_HOME', 'DOCKER_HOST', 'DOCKER_CONTEXT', 'XDG_CACHE_HOME'];
|
|
11
|
+
function cleanEnv() { return Object.fromEntries(envKeys.flatMap(k => process.env[k] === undefined ? [] : [[k, process.env[k]]])); }
|
|
12
|
+
async function project(dir) { const m = await jsonFile(join(dir, '.scaffold-manifest.json')); if (m.status !== 'complete')
|
|
13
|
+
throw new ScaffoldError('NOT_INITIALIZED', 'A complete scaffold manifest is required.'); return specFrom(m.normalizedSpec); }
|
|
14
|
+
async function execute(program, args, cwd, env, timeout = 30000, abort) {
|
|
15
|
+
return new Promise(resolveResult => {
|
|
16
|
+
let text = '', timedOut = false, settled = false;
|
|
17
|
+
const c = spawn(program, args, { cwd, env, stdio: ['ignore', 'pipe', 'pipe'], detached: process.platform !== 'win32' });
|
|
18
|
+
const append = (chunk) => { if (text.length < 8_000_000)
|
|
19
|
+
text += chunk.toString('utf8'); };
|
|
20
|
+
c.stdout.on('data', append);
|
|
21
|
+
c.stderr.on('data', append);
|
|
22
|
+
function kill() { if (c.pid)
|
|
23
|
+
try {
|
|
24
|
+
process.kill(process.platform === 'win32' ? c.pid : -c.pid, 'SIGTERM');
|
|
25
|
+
}
|
|
26
|
+
catch { /* Process already exited. */ } }
|
|
27
|
+
const timer = setTimeout(() => { timedOut = true; kill(); }, timeout);
|
|
28
|
+
const hardKill = () => { if (c.pid)
|
|
29
|
+
try {
|
|
30
|
+
process.kill(process.platform === 'win32' ? c.pid : -c.pid, 'SIGKILL');
|
|
31
|
+
}
|
|
32
|
+
catch { /* Already gone. */ } };
|
|
33
|
+
const hardTimer = setTimeout(hardKill, timeout + 5000);
|
|
34
|
+
let abortTimer;
|
|
35
|
+
const onAbort = () => { kill(); abortTimer = setTimeout(hardKill, 5000); };
|
|
36
|
+
abort?.addEventListener('abort', onAbort, { once: true });
|
|
37
|
+
if (abort?.aborted)
|
|
38
|
+
onAbort();
|
|
39
|
+
function finish(code, signal) { if (settled)
|
|
40
|
+
return; settled = true; clearTimeout(timer); clearTimeout(hardTimer); clearTimeout(abortTimer); abort?.removeEventListener('abort', onAbort); resolveResult({ code, signal, output: text + (text.length >= 8_000_000 ? '\n[output truncated]' : ''), timedOut }); }
|
|
41
|
+
c.on('error', error => { append(Buffer.from(`\n${error.code ?? 'SPAWN_ERROR'}: ${error.message}`)); finish(127, null); });
|
|
42
|
+
c.on('close', (code, signal) => finish(code, signal));
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
export async function doctor(directory, options = {}) {
|
|
46
|
+
const dir = resolve(directory), spec = await project(dir), env = cleanEnv();
|
|
47
|
+
const needs = [
|
|
48
|
+
{ program: 'node', args: ['--version'], label: 'node', remedy: 'Use Node.js 24, then rerun doctor.', accept: output => /^v24\./.test(output.trim()) },
|
|
49
|
+
{ program: 'docker', args: ['info', '--format', '{{.ServerVersion}}'], label: 'docker', remedy: 'Start Docker and check that docker info succeeds for the selected context.' },
|
|
50
|
+
{ program: 'docker', args: ['compose', 'version', '--short'], label: 'docker compose', remedy: 'Install the Docker Compose v2 plugin, then rerun doctor.' }
|
|
51
|
+
];
|
|
52
|
+
if (spec.template === 'react-fastapi')
|
|
53
|
+
needs.push({ program: 'uv', args: ['--version'], label: 'uv', remedy: 'Install uv and add it to PATH; setup uses the locked Python 3.12 project.' }, { program: 'bun', args: ['--version'], label: 'bun', remedy: 'Install Bun and add it to PATH for the frontend lockfile.' });
|
|
54
|
+
else
|
|
55
|
+
needs.push({ program: 'pnpm', args: ['--version'], label: 'pnpm', remedy: 'Use pnpm 10 and add it to PATH.', accept: output => /^10\./.test(output.trim()) });
|
|
56
|
+
if (spec.template === 'react-spring')
|
|
57
|
+
needs.push({ program: 'java', args: ['-version'], label: 'java', remedy: 'Use JDK 17 or newer and check JAVA_HOME/PATH.', accept: output => { const major = output.match(/version "(\d+)/)?.[1]; return Number(major) >= 17; } }, { program: 'javac', args: ['-version'], label: 'javac', remedy: 'Install a full JDK 17 or newer (not just a JRE), and put its bin directory on PATH.', accept: output => Number(output.match(/javac (\d+)/)?.[1]) >= 17 });
|
|
58
|
+
const checks = await Promise.all(needs.map(async (need) => {
|
|
59
|
+
const r = await execute(need.program, need.args, dir, env, 15000);
|
|
60
|
+
const ok = r.code === 0 && !r.timedOut && (!need.accept || need.accept(r.output));
|
|
61
|
+
return { program: need.label, ok, version: r.code === 0 ? r.output.trim().split('\n')[0] : 'unavailable', remedy: ok ? null : need.remedy };
|
|
62
|
+
}));
|
|
63
|
+
if (!options.toolsOnly)
|
|
64
|
+
for (const path of ['node_modules/@playwright/test/package.json', 'web/node_modules/react/package.json', ...(spec.template === 'react-nest' ? ['backend/node_modules/@nestjs/core/package.json'] : [])]) {
|
|
65
|
+
try {
|
|
66
|
+
await lstat(join(dir, path));
|
|
67
|
+
checks.push({ program: path, ok: true, version: 'installed', remedy: null });
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
checks.push({ program: path, ok: false, version: 'not installed', remedy: 'Run npm run setup for local development, or npm run installProject to install dependencies only.' });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return { ok: checks.every(c => c.ok), scope: options.toolsOnly ? 'tools' : 'tools-and-dependencies', checks, platform: `${platform()}-${arch()}`, template: spec.template };
|
|
74
|
+
}
|
|
75
|
+
const excluded = new Set(['.git', 'node_modules', '.venv', '__pycache__', '.pytest_cache', '.ruff_cache', '.mypy_cache', '.next', 'target', 'dist', 'reports', 'playwright-report', 'test-results', '.scaffold-runs', '.scaffold-local-credentials']);
|
|
76
|
+
export async function contentDigest(dir) {
|
|
77
|
+
const files = [];
|
|
78
|
+
async function visit(at) { for (const e of await readdir(at, { withFileTypes: true })) {
|
|
79
|
+
if (excluded.has(e.name) || e.name === '.env' || e.name.startsWith('.env.') && e.name !== '.env.example' || e.name.endsWith('.tsbuildinfo'))
|
|
80
|
+
continue;
|
|
81
|
+
const full = join(at, e.name);
|
|
82
|
+
if (e.isSymbolicLink())
|
|
83
|
+
throw new ScaffoldError('SYMLINK', 'Evidence cannot follow workspace symbolic links.', 2, relative(dir, full));
|
|
84
|
+
if (e.isDirectory())
|
|
85
|
+
await visit(full);
|
|
86
|
+
else if (e.isFile())
|
|
87
|
+
files.push({ path: relative(dir, full), digest: digest(await readFile(full)) });
|
|
88
|
+
} }
|
|
89
|
+
await visit(dir);
|
|
90
|
+
files.sort((a, b) => a.path.localeCompare(b.path, 'en'));
|
|
91
|
+
return digest(canonical(files));
|
|
92
|
+
}
|
|
93
|
+
async function freePort() { return new Promise((yes, no) => { const s = createServer(); s.on('error', no); s.listen(0, '127.0.0.1', () => { const address = s.address(); if (!address || typeof address === 'string')
|
|
94
|
+
return no(new Error('No port')); const port = address.port; s.close(() => yes(port)); }); }); }
|
|
95
|
+
function redact(text, values) { for (const v of values.filter(v => v.length > 3).sort((a, b) => b.length - a.length))
|
|
96
|
+
text = text.split(v).join('[REDACTED]'); return text.replace(/postgres(?:ql)?:\/\/[^\s"']+/g, '[REDACTED_DATABASE_URL]'); }
|
|
97
|
+
async function nativeReport(reportDir, spec) {
|
|
98
|
+
if (spec.template !== 'react-spring')
|
|
99
|
+
return [join(reportDir, 'native.xml')];
|
|
100
|
+
const folder = join(reportDir, 'spring');
|
|
101
|
+
try {
|
|
102
|
+
return (await readdir(folder)).filter(n => n.startsWith('TEST-') && n.endsWith('.xml')).map(n => join(folder, n));
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
return [];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
async function executedReports(paths) {
|
|
109
|
+
if (!paths.length)
|
|
110
|
+
return false;
|
|
111
|
+
let executed = 0;
|
|
112
|
+
for (const path of paths) {
|
|
113
|
+
let xml;
|
|
114
|
+
try {
|
|
115
|
+
xml = await readFile(path, 'utf8');
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
const cases = [...xml.matchAll(/<testcase\b[^>]*?(?:\/>|>([\s\S]*?)<\/testcase>)/g)];
|
|
121
|
+
for (const match of cases) {
|
|
122
|
+
const body = match[1] ?? '';
|
|
123
|
+
if (/<(?:failure|error)\b/.test(body))
|
|
124
|
+
return false;
|
|
125
|
+
if (!/<skipped\b/.test(body))
|
|
126
|
+
executed++;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return executed > 0;
|
|
130
|
+
}
|
|
131
|
+
async function sanitizeArtifacts(folder, secrets) {
|
|
132
|
+
const files = [];
|
|
133
|
+
async function visit(at) {
|
|
134
|
+
for (const entry of await readdir(at, { withFileTypes: true })) {
|
|
135
|
+
const path = join(at, entry.name);
|
|
136
|
+
if (entry.isSymbolicLink())
|
|
137
|
+
throw new Error('Report symbolic link is not allowed');
|
|
138
|
+
if (entry.isDirectory())
|
|
139
|
+
await visit(path);
|
|
140
|
+
else if (entry.isFile()) {
|
|
141
|
+
await writeFile(path, redact(await readFile(path, 'utf8'), secrets), { mode: 0o600 });
|
|
142
|
+
files.push(path);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
await visit(folder);
|
|
147
|
+
return files;
|
|
148
|
+
}
|
|
149
|
+
export async function verify(directory) {
|
|
150
|
+
const dir = resolve(directory), spec = await project(dir), start = new Date().toISOString(), runId = randomUUID();
|
|
151
|
+
const reportDir = join(dir, '.scaffold-runs', runId), artifacts = join(reportDir, 'artifacts');
|
|
152
|
+
await mkdir(artifacts, { recursive: true, mode: 0o700 });
|
|
153
|
+
const beforeDigest = await contentDigest(dir), checks = [], warnings = [];
|
|
154
|
+
const baseEnv = cleanEnv(), secrets = [];
|
|
155
|
+
let containerId = '', interrupted = false, failed = false, incomplete = false, internal = false;
|
|
156
|
+
const abort = new AbortController();
|
|
157
|
+
const interrupt = () => { interrupted = true; abort.abort(); };
|
|
158
|
+
process.once('SIGINT', interrupt);
|
|
159
|
+
process.once('SIGTERM', interrupt);
|
|
160
|
+
const now = () => new Date().toISOString();
|
|
161
|
+
async function check(id, fn) {
|
|
162
|
+
const begin = now();
|
|
163
|
+
process.stderr.write(`[${id}] checking\n`);
|
|
164
|
+
try {
|
|
165
|
+
const { result, evidence = [] } = await fn();
|
|
166
|
+
const log = join(reportDir, `${id}.log`);
|
|
167
|
+
await writeFile(log, redact(result.output, secrets), { mode: 0o600 });
|
|
168
|
+
const ok = result.code === 0 && !result.timedOut && !interrupted;
|
|
169
|
+
checks.push({ id, status: interrupted ? 'NOT RUN' : ok ? 'PASS' : 'FAIL', reason: interrupted ? 'Interrupted' : result.timedOut ? 'Timed out' : ok ? 'Completed' : 'Command failed or required report missing', startedAt: begin, finishedAt: now(), exitCode: result.code, signal: result.signal, evidence: [relative(dir, log), ...evidence], diagnostic: ok ? null : diagnose(id, result.output, { timedOut: result.timedOut, interrupted }) });
|
|
170
|
+
if (!ok && !interrupted)
|
|
171
|
+
failed = true;
|
|
172
|
+
}
|
|
173
|
+
catch (error) {
|
|
174
|
+
const output = redact(error instanceof Error ? error.message : 'Unknown execution error', secrets), log = join(reportDir, `${id}.log`);
|
|
175
|
+
await writeFile(log, output, { mode: 0o600 });
|
|
176
|
+
checks.push({ id, status: interrupted ? 'NOT RUN' : 'FAIL', reason: 'Check could not complete', startedAt: begin, finishedAt: now(), exitCode: null, signal: null, evidence: [relative(dir, log)], diagnostic: diagnose(id, output, { interrupted }) });
|
|
177
|
+
if (!interrupted)
|
|
178
|
+
failed = true;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
function skip(id, reason) { checks.push({ id, status: 'NOT RUN', reason, startedAt: now(), finishedAt: now(), exitCode: null, signal: null, evidence: [] }); incomplete = true; }
|
|
182
|
+
try {
|
|
183
|
+
const prerequisites = await doctor(dir);
|
|
184
|
+
checks.push({ id: 'environment', status: prerequisites.ok ? 'PASS' : 'NOT RUN', reason: prerequisites.ok ? 'Required tools and dependencies available' : prerequisites.checks.filter(c => !c.ok).map(c => c.program).join(', '), startedAt: start, finishedAt: now(), exitCode: prerequisites.ok ? 0 : 3, signal: null, evidence: [] });
|
|
185
|
+
if (!prerequisites.ok)
|
|
186
|
+
incomplete = true;
|
|
187
|
+
const password = randomBytes(24).toString('hex'), secret = randomBytes(32).toString('hex'), seedPassword = randomBytes(18).toString('hex'), bodyMarker = `record-body-${randomUUID()}`;
|
|
188
|
+
secrets.push(password, secret, seedPassword, bodyMarker);
|
|
189
|
+
let env = { ...baseEnv, SCAFFOLD_TEST: '1', SCAFFOLD_REPORT_DIR: artifacts, NODE_ENV: 'test', AUTH_SECRET: secret, SEED_A_EMAIL: `a-${runId}@example.test`, SEED_B_EMAIL: `b-${runId}@example.test`, SEED_PASSWORD: seedPassword, TEST_BODY_MARKER: bodyMarker, NEXT_TELEMETRY_DISABLED: '1', CI: '1' };
|
|
190
|
+
if (!incomplete && !interrupted) {
|
|
191
|
+
await check('database', async () => {
|
|
192
|
+
const creation = await execute('docker', ['run', '--detach', '--name', `agent-scaffold-${runId}`, '--label', `agent-scaffold.run=${runId}`, '-e', 'POSTGRES_PASSWORD', '-e', 'POSTGRES_USER=app', '-e', 'POSTGRES_DB=app', '-p', '127.0.0.1::5432', 'postgres:17.9-alpine@sha256:c7526c0f6c3f30260a563d7bcf8ad778effac59a44f8ffa86678c35418338609'], dir, { ...baseEnv, POSTGRES_PASSWORD: password }, 180000, abort.signal);
|
|
193
|
+
if (creation.code !== 0)
|
|
194
|
+
return { result: creation };
|
|
195
|
+
containerId = creation.output.trim().split('\n').at(-1) ?? '';
|
|
196
|
+
if (!/^[a-f0-9]{64}$/.test(containerId))
|
|
197
|
+
throw new Error('Invalid container id');
|
|
198
|
+
const inspect = await execute('docker', ['inspect', '--format', '{{json .NetworkSettings.Ports}}', containerId], dir, baseEnv);
|
|
199
|
+
const mappings = JSON.parse(inspect.output);
|
|
200
|
+
const mapping = mappings['5432/tcp']?.[0];
|
|
201
|
+
if (inspect.code !== 0 || !mapping || mapping.HostIp !== '127.0.0.1')
|
|
202
|
+
throw new Error('Invalid endpoint');
|
|
203
|
+
const databaseUrl = `postgresql://app:${password}@127.0.0.1:${mapping.HostPort}/app`;
|
|
204
|
+
secrets.push(databaseUrl);
|
|
205
|
+
const contextPath = join(reportDir, 'database.json');
|
|
206
|
+
await writeFile(contextPath, JSON.stringify({ runId, containerId, databaseUrl }), { mode: 0o600 });
|
|
207
|
+
env = { ...env, DATABASE_URL: databaseUrl, SCAFFOLD_TEST_CONTEXT: contextPath, WEB_PORT: String(await freePort()), PORT: String(await freePort()) };
|
|
208
|
+
env.APP_ORIGIN = `http://127.0.0.1:${env.WEB_PORT}`;
|
|
209
|
+
let ready = { code: 1, signal: null, output: 'Database did not become ready', timedOut: false };
|
|
210
|
+
for (let n = 0; n < 30 && !interrupted; n++) {
|
|
211
|
+
ready = await execute('docker', ['exec', containerId, 'pg_isready', '-h', '127.0.0.1', '-U', 'app', '-d', 'app'], dir, baseEnv, 5000, abort.signal);
|
|
212
|
+
if (ready.code === 0)
|
|
213
|
+
break;
|
|
214
|
+
await new Promise(r => setTimeout(r, 1000));
|
|
215
|
+
}
|
|
216
|
+
return { result: ready };
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
else
|
|
220
|
+
skip('database', 'Environment unavailable or interrupted');
|
|
221
|
+
for (const id of ['api:check', 'typecheck', 'lint', 'build', 'migrate', 'seed', 'test:native', 'test:api', 'test:e2e']) {
|
|
222
|
+
if (failed || incomplete || interrupted) {
|
|
223
|
+
skip(id, 'A required prerequisite failed or was not run');
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
await check(id.replace(':', '-'), async () => {
|
|
227
|
+
const reportFile = join(artifacts, id === 'test:api' ? 'api.xml' : 'e2e.xml');
|
|
228
|
+
const result = await execute('node', ['scripts/project.mjs', id], dir, { ...env, PLAYWRIGHT_JUNIT_OUTPUT_FILE: reportFile }, 600000, abort.signal);
|
|
229
|
+
let evidence = [];
|
|
230
|
+
if (id.startsWith('test:')) {
|
|
231
|
+
const required = id === 'test:native' ? await nativeReport(artifacts, spec) : [reportFile];
|
|
232
|
+
const valid = await executedReports(required);
|
|
233
|
+
// Sanitize every produced artifact even on failure or interruption, before publishing evidence.
|
|
234
|
+
const produced = await sanitizeArtifacts(artifacts, secrets);
|
|
235
|
+
evidence = produced.map(path => relative(dir, path));
|
|
236
|
+
if (result.code === 0 && !valid) {
|
|
237
|
+
result.code = 1;
|
|
238
|
+
result.output += '\nRequired report missing, contains failures, or has no executed test cases.';
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return { result, evidence };
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
catch (error) {
|
|
246
|
+
internal = true;
|
|
247
|
+
const log = join(reportDir, 'internal.log');
|
|
248
|
+
await writeFile(log, redact(error instanceof Error ? error.message : 'Unknown internal error', secrets), { mode: 0o600 });
|
|
249
|
+
warnings.push('Verification stopped due to an internal error. See ' + relative(dir, log));
|
|
250
|
+
}
|
|
251
|
+
finally {
|
|
252
|
+
// Only delete a container whose immutable ID and run label match this invocation.
|
|
253
|
+
if (containerId) {
|
|
254
|
+
await check('cleanup', async () => { const owner = await execute('docker', ['inspect', '--format', '{{index .Config.Labels "agent-scaffold.run"}}', containerId], dir, baseEnv); if (owner.code !== 0 || owner.output.trim() !== runId)
|
|
255
|
+
throw new Error('Uncertain ownership'); return { result: await execute('docker', ['rm', '-f', containerId], dir, baseEnv, 30000) }; });
|
|
256
|
+
}
|
|
257
|
+
process.removeListener('SIGINT', interrupt);
|
|
258
|
+
process.removeListener('SIGTERM', interrupt);
|
|
259
|
+
}
|
|
260
|
+
const afterDigest = await contentDigest(dir);
|
|
261
|
+
const validity = beforeDigest === afterDigest ? 'CURRENT' : 'STALE';
|
|
262
|
+
if (validity === 'STALE') {
|
|
263
|
+
warnings.push('Workspace content changed during verification; results are not for the current candidate.');
|
|
264
|
+
incomplete = true;
|
|
265
|
+
}
|
|
266
|
+
const exitCode = interrupted ? 130 : internal ? 5 : failed ? 4 : incomplete ? 3 : 0;
|
|
267
|
+
const run = { schemaVersion: 1, runId, template: spec.template, cliVersion: CLI_VERSION, platform: `${platform()}-${arch()}`, runtime: process.version, startedAt: start, finishedAt: now(), beforeDigest, afterDigest, overallStatus: failed || internal ? 'FAIL' : exitCode !== 0 ? 'NOT RUN' : 'PASS', validity, checks, exitCode, warnings };
|
|
268
|
+
await writeFile(join(reportDir, 'result.json'), JSON.stringify(run, null, 2) + '\n', { mode: 0o600 });
|
|
269
|
+
await writeFile(join(dir, '.scaffold-runs/latest.json'), JSON.stringify({ runId }) + '\n', { mode: 0o600 });
|
|
270
|
+
return run;
|
|
271
|
+
}
|
|
272
|
+
export async function report(directory) { const dir = resolve(directory); await project(dir); let latest; try {
|
|
273
|
+
latest = await jsonFile(join(dir, '.scaffold-runs/latest.json'));
|
|
274
|
+
}
|
|
275
|
+
catch {
|
|
276
|
+
return { overallStatus: 'NOT RUN', reason: 'No verification result exists.' };
|
|
277
|
+
} if (!/^[a-f0-9-]{36}$/.test(latest.runId))
|
|
278
|
+
throw new ScaffoldError('INVALID_REPORT', 'Invalid report identifier.'); const result = await jsonFile(join(dir, '.scaffold-runs', latest.runId, 'result.json')); const current = await contentDigest(dir); return { ...result, validity: result.validity === 'CURRENT' && result.afterDigest === current ? 'CURRENT' : 'STALE' }; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cherishxn/agent-scaffold",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Deterministic project scaffolding for coding agents",
|
|
6
|
+
"bin": {
|
|
7
|
+
"scaffold": "dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=24 <25"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"templates",
|
|
15
|
+
"schemas",
|
|
16
|
+
"skills",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE",
|
|
19
|
+
"THIRD_PARTY_NOTICES.md"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "node scripts/materialize.mjs && tsc && node scripts/catalog.mjs",
|
|
23
|
+
"typecheck": "tsc --noEmit",
|
|
24
|
+
"lint": "eslint src tests",
|
|
25
|
+
"test": "npm run build && vitest run",
|
|
26
|
+
"check": "npm run typecheck && npm run lint && npm test",
|
|
27
|
+
"prepack": "npm run build",
|
|
28
|
+
"matrix": "node scripts/matrix.mjs",
|
|
29
|
+
"test:interactive": "python3 scripts/test-interactive.py",
|
|
30
|
+
"test:package": "node scripts/test-package.mjs",
|
|
31
|
+
"design:verify": "npm run build && node scripts/design-matrix.mjs",
|
|
32
|
+
"test:onboarding": "node scripts/test-onboarding.mjs",
|
|
33
|
+
"eval:codex": "node scripts/eval-codex.mjs"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"ajv": "8.20.0",
|
|
37
|
+
"commander": "15.0.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@eslint/js": "10.0.1",
|
|
41
|
+
"@google/design.md": "0.4.0",
|
|
42
|
+
"@types/node": "24.19.2",
|
|
43
|
+
"ajv-formats": "3.0.1",
|
|
44
|
+
"eslint": "10.13.0",
|
|
45
|
+
"openapi-typescript": "7.13.0",
|
|
46
|
+
"typescript": "5.9.3",
|
|
47
|
+
"typescript-eslint": "8.71.2",
|
|
48
|
+
"vitest": "5.0.5"
|
|
49
|
+
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public",
|
|
52
|
+
"registry": "https://registry.npmjs.org/"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"required": [
|
|
6
|
+
"schemaVersion",
|
|
7
|
+
"cliVersion",
|
|
8
|
+
"templateId",
|
|
9
|
+
"templateVersion",
|
|
10
|
+
"templateDigest",
|
|
11
|
+
"normalizedSpec",
|
|
12
|
+
"files",
|
|
13
|
+
"nextActions",
|
|
14
|
+
"planDigest",
|
|
15
|
+
"status"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schemaVersion": {
|
|
19
|
+
"const": 1
|
|
20
|
+
},
|
|
21
|
+
"cliVersion": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"templateId": {
|
|
25
|
+
"enum": [
|
|
26
|
+
"react-fastapi",
|
|
27
|
+
"react-spring",
|
|
28
|
+
"react-nest",
|
|
29
|
+
"next-fullstack"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"templateVersion": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"templateDigest": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
38
|
+
},
|
|
39
|
+
"normalizedSpec": {
|
|
40
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
41
|
+
"type": "object",
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"required": [
|
|
44
|
+
"schemaVersion",
|
|
45
|
+
"nameZh",
|
|
46
|
+
"nameEn",
|
|
47
|
+
"description",
|
|
48
|
+
"template",
|
|
49
|
+
"ui"
|
|
50
|
+
],
|
|
51
|
+
"properties": {
|
|
52
|
+
"schemaVersion": {
|
|
53
|
+
"const": 1
|
|
54
|
+
},
|
|
55
|
+
"nameZh": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1,
|
|
58
|
+
"maxLength": 120,
|
|
59
|
+
"pattern": "^[^\\r\\n\\x00-\\x1f]+$"
|
|
60
|
+
},
|
|
61
|
+
"nameEn": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"minLength": 1,
|
|
64
|
+
"maxLength": 50,
|
|
65
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
|
|
66
|
+
},
|
|
67
|
+
"description": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"minLength": 1,
|
|
70
|
+
"maxLength": 1000,
|
|
71
|
+
"pattern": "^[^\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]+$"
|
|
72
|
+
},
|
|
73
|
+
"template": {
|
|
74
|
+
"enum": [
|
|
75
|
+
"react-fastapi",
|
|
76
|
+
"react-spring",
|
|
77
|
+
"react-nest",
|
|
78
|
+
"next-fullstack"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"ui": {
|
|
82
|
+
"enum": [
|
|
83
|
+
"shadcn",
|
|
84
|
+
"antd"
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"files": {
|
|
90
|
+
"type": "array",
|
|
91
|
+
"items": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": [
|
|
95
|
+
"path",
|
|
96
|
+
"source",
|
|
97
|
+
"digest",
|
|
98
|
+
"mode"
|
|
99
|
+
],
|
|
100
|
+
"properties": {
|
|
101
|
+
"path": {
|
|
102
|
+
"type": "string"
|
|
103
|
+
},
|
|
104
|
+
"source": {
|
|
105
|
+
"type": "string"
|
|
106
|
+
},
|
|
107
|
+
"digest": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
110
|
+
},
|
|
111
|
+
"mode": {
|
|
112
|
+
"enum": [
|
|
113
|
+
420,
|
|
114
|
+
493
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"nextActions": {
|
|
121
|
+
"type": "array",
|
|
122
|
+
"items": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"additionalProperties": false,
|
|
125
|
+
"required": [
|
|
126
|
+
"program",
|
|
127
|
+
"args",
|
|
128
|
+
"cwd",
|
|
129
|
+
"prerequisites",
|
|
130
|
+
"sideEffects"
|
|
131
|
+
],
|
|
132
|
+
"properties": {
|
|
133
|
+
"program": {
|
|
134
|
+
"type": "string"
|
|
135
|
+
},
|
|
136
|
+
"args": {
|
|
137
|
+
"type": "array",
|
|
138
|
+
"items": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"cwd": {
|
|
143
|
+
"type": "string"
|
|
144
|
+
},
|
|
145
|
+
"prerequisites": {
|
|
146
|
+
"type": "array",
|
|
147
|
+
"items": {
|
|
148
|
+
"type": "string"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"sideEffects": {
|
|
152
|
+
"type": "array",
|
|
153
|
+
"items": {
|
|
154
|
+
"type": "string"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"planDigest": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
163
|
+
},
|
|
164
|
+
"status": {
|
|
165
|
+
"enum": [
|
|
166
|
+
"generating",
|
|
167
|
+
"complete"
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"required": [
|
|
6
|
+
"schemaVersion",
|
|
7
|
+
"cliVersion",
|
|
8
|
+
"templateId",
|
|
9
|
+
"templateVersion",
|
|
10
|
+
"templateDigest",
|
|
11
|
+
"normalizedSpec",
|
|
12
|
+
"files",
|
|
13
|
+
"nextActions",
|
|
14
|
+
"planDigest"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"schemaVersion": {
|
|
18
|
+
"const": 1
|
|
19
|
+
},
|
|
20
|
+
"cliVersion": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"templateId": {
|
|
24
|
+
"enum": [
|
|
25
|
+
"react-fastapi",
|
|
26
|
+
"react-spring",
|
|
27
|
+
"react-nest",
|
|
28
|
+
"next-fullstack"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"templateVersion": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"templateDigest": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
37
|
+
},
|
|
38
|
+
"normalizedSpec": {
|
|
39
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": [
|
|
43
|
+
"schemaVersion",
|
|
44
|
+
"nameZh",
|
|
45
|
+
"nameEn",
|
|
46
|
+
"description",
|
|
47
|
+
"template",
|
|
48
|
+
"ui"
|
|
49
|
+
],
|
|
50
|
+
"properties": {
|
|
51
|
+
"schemaVersion": {
|
|
52
|
+
"const": 1
|
|
53
|
+
},
|
|
54
|
+
"nameZh": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1,
|
|
57
|
+
"maxLength": 120,
|
|
58
|
+
"pattern": "^[^\\r\\n\\x00-\\x1f]+$"
|
|
59
|
+
},
|
|
60
|
+
"nameEn": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"minLength": 1,
|
|
63
|
+
"maxLength": 50,
|
|
64
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
|
|
65
|
+
},
|
|
66
|
+
"description": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"minLength": 1,
|
|
69
|
+
"maxLength": 1000,
|
|
70
|
+
"pattern": "^[^\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]+$"
|
|
71
|
+
},
|
|
72
|
+
"template": {
|
|
73
|
+
"enum": [
|
|
74
|
+
"react-fastapi",
|
|
75
|
+
"react-spring",
|
|
76
|
+
"react-nest",
|
|
77
|
+
"next-fullstack"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"ui": {
|
|
81
|
+
"enum": [
|
|
82
|
+
"shadcn",
|
|
83
|
+
"antd"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"files": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"additionalProperties": false,
|
|
93
|
+
"required": [
|
|
94
|
+
"path",
|
|
95
|
+
"source",
|
|
96
|
+
"digest",
|
|
97
|
+
"mode"
|
|
98
|
+
],
|
|
99
|
+
"properties": {
|
|
100
|
+
"path": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
"source": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"digest": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
109
|
+
},
|
|
110
|
+
"mode": {
|
|
111
|
+
"enum": [
|
|
112
|
+
420,
|
|
113
|
+
493
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"nextActions": {
|
|
120
|
+
"type": "array",
|
|
121
|
+
"items": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"additionalProperties": false,
|
|
124
|
+
"required": [
|
|
125
|
+
"program",
|
|
126
|
+
"args",
|
|
127
|
+
"cwd",
|
|
128
|
+
"prerequisites",
|
|
129
|
+
"sideEffects"
|
|
130
|
+
],
|
|
131
|
+
"properties": {
|
|
132
|
+
"program": {
|
|
133
|
+
"type": "string"
|
|
134
|
+
},
|
|
135
|
+
"args": {
|
|
136
|
+
"type": "array",
|
|
137
|
+
"items": {
|
|
138
|
+
"type": "string"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"cwd": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"prerequisites": {
|
|
145
|
+
"type": "array",
|
|
146
|
+
"items": {
|
|
147
|
+
"type": "string"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"sideEffects": {
|
|
151
|
+
"type": "array",
|
|
152
|
+
"items": {
|
|
153
|
+
"type": "string"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"planDigest": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|