@polymorphism-tech/morph-spec 3.0.1 → 3.2.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/CLAUDE.md +561 -63
- package/LICENSE +72 -72
- package/README.md +275 -79
- package/bin/detect-agents.js +3 -1
- package/bin/morph-spec.js +60 -1
- package/bin/render-template.js +61 -14
- package/bin/semantic-detect-agents.js +2 -1
- package/bin/{task-manager.js → task-manager.cjs} +113 -8
- package/bin/validate-agents-skills.js +10 -4
- package/bin/validate-agents.js +4 -3
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +977 -977
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1048 -1048
- package/docs/api/scripts/collapse.js +38 -38
- package/docs/api/scripts/commonNav.js +28 -28
- package/docs/api/scripts/linenumber.js +25 -25
- package/docs/api/scripts/nav.js +12 -12
- package/docs/api/scripts/polyfill.js +3 -3
- package/docs/api/scripts/prettify/Apache-License-2.0.txt +202 -202
- package/docs/api/scripts/prettify/lang-css.js +2 -2
- package/docs/api/scripts/prettify/prettify.js +28 -28
- package/docs/api/scripts/search.js +98 -98
- package/docs/api/styles/jsdoc.css +776 -776
- package/docs/api/styles/prettify.css +80 -80
- package/docs/cli-auto-detection.md +219 -0
- package/docs/examples.md +328 -328
- package/docs/getting-started.md +3 -3
- package/docs/llm-interaction-config.md +735 -0
- package/docs/templates.md +418 -418
- package/docs/troubleshooting.md +269 -0
- package/package.json +7 -3
- package/scripts/postinstall.js +132 -132
- package/scripts/reorganize-skills.cjs +1 -1
- package/scripts/validate-agents-structure.cjs +1 -1
- package/scripts/validate-skills.cjs +2 -2
- package/src/commands/advance-phase.js +93 -2
- package/src/commands/analyze-blazor-concurrency.js +193 -193
- package/src/commands/approve.js +221 -0
- package/src/commands/capture-pattern.js +121 -0
- package/src/commands/create-story.js +5 -2
- package/src/commands/deploy.js +780 -780
- package/src/commands/detect-agents.js +4 -2
- package/src/commands/generate.js +276 -149
- package/src/commands/init.js +37 -0
- package/src/commands/lint-fluent.js +352 -352
- package/src/commands/migrate-state.js +158 -0
- package/src/commands/rollback-phase.js +185 -185
- package/src/commands/search-patterns.js +126 -0
- package/src/commands/session-summary.js +291 -291
- package/src/commands/shard-spec.js +224 -224
- package/src/commands/spawn-team.js +172 -0
- package/src/commands/sprint-status.js +250 -250
- package/src/commands/task.js +3 -3
- package/src/commands/troubleshoot.js +222 -222
- package/src/commands/update.js +36 -0
- package/src/commands/upgrade.js +346 -0
- package/src/commands/validate-blazor-state.js +210 -210
- package/src/commands/validate-blazor.js +156 -156
- package/src/commands/validate-css.js +84 -84
- package/src/commands/validate-phase.js +221 -221
- package/src/generator/.gitkeep +0 -0
- package/src/generator/config-generator.js +206 -0
- package/src/generator/templates/config.json.template +40 -0
- package/src/generator/templates/project.md.template +67 -0
- package/src/lib/blazor-concurrency-analyzer.js +288 -288
- package/src/lib/blazor-state-validator.js +291 -291
- package/src/lib/blazor-validator.js +374 -374
- package/src/lib/checkpoint-hooks.js +258 -0
- package/src/lib/context-generator.js +7 -4
- package/src/lib/css-validator.js +352 -352
- package/src/lib/design-system-generator.js +298 -298
- package/src/lib/hook-executor.js +2 -1
- package/src/lib/learning-system.js +520 -520
- package/src/lib/metadata-extractor.js +380 -0
- package/src/lib/mockup-generator.js +366 -366
- package/src/lib/phase-state-machine.js +214 -0
- package/src/lib/stack-resolver.js +148 -0
- package/src/lib/standards-context-injector.js +4 -3
- package/src/lib/state-manager.js +120 -0
- package/src/lib/team-orchestrator.js +2 -1
- package/src/lib/template-data-sources.js +325 -0
- package/src/lib/troubleshoot-grep.js +204 -194
- package/src/lib/troubleshoot-index.js +144 -144
- package/src/lib/ui-detector.js +350 -350
- package/src/lib/validation-runner.js +2 -1
- package/src/lib/validators/architecture-validator.js +387 -387
- package/src/lib/validators/content-validator.js +351 -0
- package/src/lib/validators/package-validator.js +360 -360
- package/src/lib/validators/ui-contrast-validator.js +422 -422
- package/src/llm/.gitkeep +0 -0
- package/src/llm/analyzer.js +215 -0
- package/src/llm/environment-detector.js +43 -0
- package/src/llm/few-shot-examples.js +216 -0
- package/src/llm/project-config-schema.json +188 -0
- package/src/llm/prompt-builder.js +96 -0
- package/src/llm/schema-validator.js +121 -0
- package/src/orchestrator.js +206 -0
- package/src/sanitizer/.gitkeep +0 -0
- package/src/sanitizer/context-sanitizer.js +221 -0
- package/src/sanitizer/patterns.js +163 -0
- package/src/scanner/.gitkeep +0 -0
- package/src/scanner/project-scanner.js +242 -0
- package/src/types/index.js +477 -0
- package/src/ui/.gitkeep +0 -0
- package/src/ui/diff-display.js +91 -0
- package/src/ui/interactive-wizard.js +96 -0
- package/src/ui/user-review.js +211 -0
- package/src/ui/wizard-questions.js +190 -0
- package/src/utils/file-copier.js +3 -1
- package/src/utils/logger.js +32 -32
- package/src/utils/version-checker.js +175 -175
- package/src/writer/.gitkeep +0 -0
- package/src/writer/file-writer.js +86 -0
- package/{content → stacks/blazor-azure}/.azure/README.md +2 -2
- package/{content → stacks/blazor-azure}/.azure/pipelines/pipeline-variables.yml +1 -1
- package/{content → stacks/blazor-azure}/.azure/pipelines/prod-pipeline.yml +1 -1
- package/{content → stacks/blazor-azure}/.azure/pipelines/staging-pipeline.yml +1 -1
- package/{content → stacks/blazor-azure}/.claude/commands/morph-preflight.md +227 -227
- package/{content → stacks/blazor-azure}/.claude/commands/morph-troubleshoot.md +122 -122
- package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-setup.md +1 -1
- package/{content → stacks/blazor-azure}/.morph/docs/workflows/enforcement-pipeline.md +3 -3
- package/{content → stacks/blazor-azure}/.morph/hooks/README.md +12 -12
- package/{content → stacks/blazor-azure}/.morph/standards/agent-teams-workflow.md +2 -2
- package/{content → stacks/blazor-azure}/.morph/standards/migration-guide.md +2 -2
- package/{content → stacks/blazor-azure}/.morph/templates/infra/deploy-checklist.md +426 -426
- package/stacks/nextjs-supabase/.claude/skills/level-2-domains/backend/dotnet-supabase.md +244 -0
- package/stacks/nextjs-supabase/.claude/skills/level-2-domains/frontend/nextjs-supabase.md +335 -0
- package/stacks/nextjs-supabase/.claude/skills/level-2-domains/infrastructure/easypanel-deployer.md +189 -0
- package/stacks/nextjs-supabase/.claude/skills/level-2-domains/integrations/supabase-expert.md +170 -0
- package/stacks/nextjs-supabase/.morph/config/agents.json +345 -0
- package/stacks/nextjs-supabase/.morph/config/config.template.json +92 -0
- package/stacks/nextjs-supabase/.morph/docs/easypanel-setup.md +169 -0
- package/stacks/nextjs-supabase/.morph/docs/supabase-mcp-setup.md +247 -0
- package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/README.md +697 -0
- package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/spec.md +85 -0
- package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/tasks.md +86 -0
- package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/README.md +498 -0
- package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/decisions.md +121 -0
- package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/spec.md +138 -0
- package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/tasks.md +162 -0
- package/stacks/nextjs-supabase/.morph/project.md +168 -0
- package/stacks/nextjs-supabase/.morph/standards/easypanel-deploy.md +191 -0
- package/stacks/nextjs-supabase/.morph/standards/nextjs-patterns.md +193 -0
- package/stacks/nextjs-supabase/.morph/standards/supabase-auth.md +171 -0
- package/stacks/nextjs-supabase/.morph/standards/supabase-pgvector.md +164 -0
- package/stacks/nextjs-supabase/.morph/standards/supabase-rls.md +179 -0
- package/stacks/nextjs-supabase/.morph/standards/supabase-storage.md +148 -0
- package/stacks/nextjs-supabase/.morph/templates/contracts.cs +173 -0
- package/stacks/nextjs-supabase/.morph/templates/contracts.ts +168 -0
- package/stacks/nextjs-supabase/.morph/templates/decisions.md +115 -0
- package/stacks/nextjs-supabase/.morph/templates/dockerfile-api.dockerfile +38 -0
- package/stacks/nextjs-supabase/.morph/templates/dockerfile-web.dockerfile +48 -0
- package/stacks/nextjs-supabase/.morph/templates/proposal.md +145 -0
- package/stacks/nextjs-supabase/.morph/templates/recap.md +134 -0
- package/stacks/nextjs-supabase/.morph/templates/rls-policy.sql +57 -0
- package/stacks/nextjs-supabase/.morph/templates/spec.md +231 -0
- package/stacks/nextjs-supabase/.morph/templates/supabase-migration.sql +100 -0
- package/stacks/nextjs-supabase/.morph/templates/tasks.md +257 -0
- package/stacks/nextjs-supabase/CLAUDE.md +149 -0
- package/stacks/nextjs-supabase/README.md +112 -0
- /package/{content → stacks/blazor-azure}/.azure/docs/azure-devops-setup.md +0 -0
- /package/{content → stacks/blazor-azure}/.azure/docs/branch-strategy.md +0 -0
- /package/{content → stacks/blazor-azure}/.azure/docs/local-development.md +0 -0
- /package/{content → stacks/blazor-azure}/.azure/pipelines/templates/build-dotnet.yml +0 -0
- /package/{content → stacks/blazor-azure}/.azure/pipelines/templates/deploy-app-service.yml +0 -0
- /package/{content → stacks/blazor-azure}/.azure/pipelines/templates/deploy-container-app.yml +0 -0
- /package/{content → stacks/blazor-azure}/.azure/pipelines/templates/infra-deploy.yml +0 -0
- /package/{content → stacks/blazor-azure}/.claude/commands/morph-apply.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/commands/morph-archive.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/commands/morph-deploy.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/commands/morph-infra.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/commands/morph-proposal.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/commands/morph-status.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/settings.local.json +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-0-meta/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-0-meta/code-review.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-0-meta/morph-checklist.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-0-meta/simulation-checklist.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/morph-replicate.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-clarify.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-design.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-tasks.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-uiux.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/ai-agents/ai-system-architect.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/architecture/po-pm-advisor.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/architecture/prompt-engineer.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/architecture/seo-growth-hacker.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/architecture/standards-architect.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/backend/dotnet-senior.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/backend/ef-modeler.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/backend/hangfire-orchestrator.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/backend/ms-agent-expert.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/frontend/blazor-builder.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/frontend/nextjs-expert.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/frontend/ui-ux-designer.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/azure-architect.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/azure-deploy-specialist.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/bicep-architect.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/container-specialist.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/devops-engineer.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/integrations/asaas-financial.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/integrations/azure-identity.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/integrations/clerk-auth.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/integrations/resend-email.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/quality/code-analyzer.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/quality/testing-specialist.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-3-technologies/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-4-patterns/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/.morphversion +0 -0
- /package/{content → stacks/blazor-azure}/.morph/archive/.gitkeep +0 -0
- /package/{content → stacks/blazor-azure}/.morph/config/agents.json +0 -0
- /package/{content → stacks/blazor-azure}/.morph/config/config.template.json +0 -0
- /package/{content → stacks/blazor-azure}/.morph/docs/STORY-DRIVEN-DEVELOPMENT.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/docs/workflows/design-impl.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/docs/workflows/fast-track.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/docs/workflows/full-morph.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/docs/workflows/standard.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/docs/workflows/ui-refresh.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/api-nextjs/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/api-nextjs/contracts.ts +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/api-nextjs/spec.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/api-nextjs/tasks.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/contracts.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/decisions.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/spec.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/tasks.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/multi-agent/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/multi-agent/contracts.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/multi-agent/spec.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/multi-agent/tasks.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/scheduled-reports/decisions.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/scheduled-reports/proposal.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/scheduled-reports/spec.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/state-v3.json +0 -0
- /package/{content → stacks/blazor-azure}/.morph/features/.gitkeep +0 -0
- /package/{content → stacks/blazor-azure}/.morph/hooks/pre-commit-agents.sh +0 -0
- /package/{content → stacks/blazor-azure}/.morph/hooks/pre-commit-all.sh +0 -0
- /package/{content → stacks/blazor-azure}/.morph/hooks/pre-commit-specs.sh +0 -0
- /package/{content → stacks/blazor-azure}/.morph/hooks/pre-commit-tests.sh +0 -0
- /package/{content → stacks/blazor-azure}/.morph/hooks/task-completed.js +0 -0
- /package/{content → stacks/blazor-azure}/.morph/hooks/teammate-idle.js +0 -0
- /package/{content → stacks/blazor-azure}/.morph/project.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/schemas/agent.schema.json +0 -0
- /package/{content → stacks/blazor-azure}/.morph/schemas/tasks.schema.json +0 -0
- /package/{content → stacks/blazor-azure}/.morph/specs/.gitkeep +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/agent-framework-blazor-ui.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/agent-framework-production.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/agent-framework-setup.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/agent-framework-workflows.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/architecture.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/azure.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/coding.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/dotnet10-migration.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/fluent-ui-setup.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/passkeys-auth.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/vector-search-rag.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/state.json +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/CONTEXT-FEATURE.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/CONTEXT.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/FluentDesignTheme.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/MudTheme.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/agent.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/clarify-questions.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/component.razor +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/contracts/Commands.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/contracts/Entities.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/contracts/Queries.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/contracts/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/contracts.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/decisions.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/design-system.css +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/.dockerignore.example +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/Dockerfile.example +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/app-insights.bicep +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/app-service.bicep +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/azure-pipelines-deploy.yml +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/container-app-env.bicep +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/container-app.bicep +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/deploy.ps1 +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/deploy.sh +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/key-vault.bicep +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/main.bicep +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/parameters.dev.json +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/parameters.prod.json +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/parameters.staging.json +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/sql-database.bicep +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/storage.bicep +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/integrations/asaas-client.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/integrations/asaas-webhook.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/integrations/azure-identity-config.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/integrations/clerk-config.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/job.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/migration.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/proposal.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/recap.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/repository.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/saas/subscription.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/saas/tenant.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/service.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/simulation.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/spec.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/sprint-status.yaml +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/state.template.json +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/story.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/tasks.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/test.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/ui-components.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/ui-design-system.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/ui-flows.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/ui-mockups.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/test-infra/example.bicep +0 -0
- /package/{content → stacks/blazor-azure}/CLAUDE.md +0 -0
- /package/{content → stacks/blazor-azure}/README.md +0 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview UserReview - Prompts user for approval of generated configs
|
|
3
|
+
* @module morph-spec/ui/user-review
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import inquirer from 'inquirer';
|
|
7
|
+
import chalk from 'chalk';
|
|
8
|
+
import { displayDiff, displayConfigSummary } from './diff-display.js';
|
|
9
|
+
import { writeFile, readFile, access } from 'fs/promises';
|
|
10
|
+
import { join } from 'path';
|
|
11
|
+
import { execSync } from 'child_process';
|
|
12
|
+
import { tmpdir } from 'os';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {import('../types/index.js').GeneratedConfigs} GeneratedConfigs
|
|
16
|
+
* @typedef {import('../types/index.js').ProjectConfig} ProjectConfig
|
|
17
|
+
* @typedef {import('../types/index.js').ApprovalResponse} ApprovalResponse
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* UserReview - Handles user review and approval of generated configs
|
|
22
|
+
* @class
|
|
23
|
+
*/
|
|
24
|
+
export class UserReview {
|
|
25
|
+
/**
|
|
26
|
+
* Prompt user for approval of generated configs
|
|
27
|
+
* @param {GeneratedConfigs} configs - Generated configs
|
|
28
|
+
* @param {ProjectConfig} projectConfig - Detected project config
|
|
29
|
+
* @param {Object} [existingConfigs] - Existing configs (if updating)
|
|
30
|
+
* @returns {Promise<ApprovalResponse>}
|
|
31
|
+
*/
|
|
32
|
+
async promptForApproval(configs, projectConfig, existingConfigs = null) {
|
|
33
|
+
console.log(chalk.bold.cyan('\n🔍 Auto-Detected Project Configuration\n'));
|
|
34
|
+
|
|
35
|
+
// Display summary
|
|
36
|
+
this.displayPreview(projectConfig);
|
|
37
|
+
|
|
38
|
+
// If updating existing configs, show diff
|
|
39
|
+
if (existingConfigs) {
|
|
40
|
+
if (existingConfigs.projectMd) {
|
|
41
|
+
displayDiff(existingConfigs.projectMd, configs.projectMd, 'project.md');
|
|
42
|
+
}
|
|
43
|
+
if (existingConfigs.configJson) {
|
|
44
|
+
try {
|
|
45
|
+
const oldConfig = JSON.parse(existingConfigs.configJson);
|
|
46
|
+
displayConfigSummary(oldConfig, configs.configObject);
|
|
47
|
+
} catch (error) {
|
|
48
|
+
// Couldn't parse old config, skip summary
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Prompt for action
|
|
54
|
+
const { action } = await inquirer.prompt([
|
|
55
|
+
{
|
|
56
|
+
type: 'list',
|
|
57
|
+
name: 'action',
|
|
58
|
+
message: 'What would you like to do?',
|
|
59
|
+
choices: [
|
|
60
|
+
{ name: '✅ Approve and save configs', value: 'approve' },
|
|
61
|
+
{ name: '✏️ Edit configs before saving', value: 'edit' },
|
|
62
|
+
{ name: '❌ Cancel and exit', value: 'cancel' }
|
|
63
|
+
],
|
|
64
|
+
default: 'approve'
|
|
65
|
+
}
|
|
66
|
+
]);
|
|
67
|
+
|
|
68
|
+
switch (action) {
|
|
69
|
+
case 'approve':
|
|
70
|
+
return { action: 'approve' };
|
|
71
|
+
|
|
72
|
+
case 'edit':
|
|
73
|
+
const editedConfigs = await this.openInEditor(configs);
|
|
74
|
+
return { action: 'approve', editedConfigs };
|
|
75
|
+
|
|
76
|
+
case 'cancel':
|
|
77
|
+
const { reason } = await inquirer.prompt([
|
|
78
|
+
{
|
|
79
|
+
type: 'input',
|
|
80
|
+
name: 'reason',
|
|
81
|
+
message: 'Why are you canceling? (optional)',
|
|
82
|
+
default: 'User canceled'
|
|
83
|
+
}
|
|
84
|
+
]);
|
|
85
|
+
return { action: 'cancel', cancelReason: reason };
|
|
86
|
+
|
|
87
|
+
default:
|
|
88
|
+
return { action: 'cancel', cancelReason: 'Unknown action' };
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Display preview of detected configuration
|
|
94
|
+
* @param {ProjectConfig} projectConfig - Detected project config
|
|
95
|
+
*/
|
|
96
|
+
displayPreview(projectConfig) {
|
|
97
|
+
console.log(chalk.bold(' Name: ') + chalk.cyan(projectConfig.name));
|
|
98
|
+
console.log(chalk.bold(' Type: ') + chalk.yellow(projectConfig.type));
|
|
99
|
+
console.log(chalk.bold(' Description: ') + chalk.white(projectConfig.description));
|
|
100
|
+
console.log();
|
|
101
|
+
|
|
102
|
+
console.log(chalk.bold(' Stack:'));
|
|
103
|
+
if (projectConfig.stack.frontend) {
|
|
104
|
+
console.log(chalk.gray(' Frontend: ') + chalk.white(`${projectConfig.stack.frontend.tech} ${projectConfig.stack.frontend.version}`));
|
|
105
|
+
}
|
|
106
|
+
console.log(chalk.gray(' Backend: ') + chalk.white(`${projectConfig.stack.backend.tech} ${projectConfig.stack.backend.version}`));
|
|
107
|
+
if (projectConfig.stack.database) {
|
|
108
|
+
console.log(chalk.gray(' Database: ') + chalk.white(`${projectConfig.stack.database.tech} ${projectConfig.stack.database.version}`));
|
|
109
|
+
}
|
|
110
|
+
if (projectConfig.stack.hosting) {
|
|
111
|
+
console.log(chalk.gray(' Hosting: ') + chalk.white(projectConfig.stack.hosting));
|
|
112
|
+
}
|
|
113
|
+
console.log();
|
|
114
|
+
|
|
115
|
+
console.log(chalk.bold(' Architecture: ') + chalk.magenta(projectConfig.architecture));
|
|
116
|
+
console.log(chalk.bold(' Conventions: ') + chalk.white(projectConfig.conventions));
|
|
117
|
+
console.log();
|
|
118
|
+
|
|
119
|
+
// Infrastructure flags
|
|
120
|
+
const flags = [];
|
|
121
|
+
if (projectConfig.hasAzure) flags.push(chalk.blue('Azure'));
|
|
122
|
+
if (projectConfig.hasDocker) flags.push(chalk.cyan('Docker'));
|
|
123
|
+
if (projectConfig.hasDevOps) flags.push(chalk.green('CI/CD'));
|
|
124
|
+
|
|
125
|
+
if (flags.length > 0) {
|
|
126
|
+
console.log(chalk.bold(' Infrastructure: ') + flags.join(' • '));
|
|
127
|
+
console.log();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Confidence and warnings
|
|
131
|
+
const confidenceColor = projectConfig.confidence >= 90 ? chalk.green : projectConfig.confidence >= 70 ? chalk.yellow : chalk.red;
|
|
132
|
+
console.log(chalk.bold(' Confidence: ') + confidenceColor(`${projectConfig.confidence}%`));
|
|
133
|
+
|
|
134
|
+
if (projectConfig.warnings && projectConfig.warnings.length > 0) {
|
|
135
|
+
console.log(chalk.bold.yellow('\n ⚠️ Warnings:'));
|
|
136
|
+
projectConfig.warnings.forEach(warning => {
|
|
137
|
+
console.log(chalk.yellow(` • ${warning}`));
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
console.log();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Display diff between current and generated configs
|
|
146
|
+
* @param {string} current - Current config content
|
|
147
|
+
* @param {string} generated - Generated config content
|
|
148
|
+
*/
|
|
149
|
+
displayDiff(current, generated) {
|
|
150
|
+
displayDiff(current, generated, 'config');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Open configs in editor for manual editing
|
|
155
|
+
* @param {GeneratedConfigs} configs - Configs to edit
|
|
156
|
+
* @returns {Promise<GeneratedConfigs>} Edited configs
|
|
157
|
+
*/
|
|
158
|
+
async openInEditor(configs) {
|
|
159
|
+
console.log(chalk.cyan('\n📝 Opening configs in editor...\n'));
|
|
160
|
+
|
|
161
|
+
// Write to temp files
|
|
162
|
+
const tempDir = tmpdir();
|
|
163
|
+
const projectMdPath = join(tempDir, 'morph-project.md');
|
|
164
|
+
const configJsonPath = join(tempDir, 'morph-config.json');
|
|
165
|
+
|
|
166
|
+
await Promise.all([
|
|
167
|
+
writeFile(projectMdPath, configs.projectMd, 'utf-8'),
|
|
168
|
+
writeFile(configJsonPath, configs.configJson, 'utf-8')
|
|
169
|
+
]);
|
|
170
|
+
|
|
171
|
+
// Get editor from environment or use default
|
|
172
|
+
const editor = process.env.EDITOR || process.env.VISUAL || 'nano';
|
|
173
|
+
|
|
174
|
+
console.log(chalk.dim(` Using editor: ${editor}`));
|
|
175
|
+
console.log(chalk.dim(` Files: ${projectMdPath}, ${configJsonPath}`));
|
|
176
|
+
console.log(chalk.yellow('\n Press ENTER when done editing...'));
|
|
177
|
+
|
|
178
|
+
// Open editor (blocking)
|
|
179
|
+
try {
|
|
180
|
+
execSync(`${editor} "${projectMdPath}" "${configJsonPath}"`, {
|
|
181
|
+
stdio: 'inherit'
|
|
182
|
+
});
|
|
183
|
+
} catch (error) {
|
|
184
|
+
console.log(chalk.yellow('\n⚠️ Editor exited with error, using original configs\n'));
|
|
185
|
+
return configs;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Read edited files
|
|
189
|
+
const [editedProjectMd, editedConfigJson] = await Promise.all([
|
|
190
|
+
readFile(projectMdPath, 'utf-8'),
|
|
191
|
+
readFile(configJsonPath, 'utf-8')
|
|
192
|
+
]);
|
|
193
|
+
|
|
194
|
+
// Parse config.json
|
|
195
|
+
let editedConfigObject;
|
|
196
|
+
try {
|
|
197
|
+
editedConfigObject = JSON.parse(editedConfigJson);
|
|
198
|
+
} catch (error) {
|
|
199
|
+
console.log(chalk.red('\n❌ Edited config.json is not valid JSON. Using original.\n'));
|
|
200
|
+
return configs;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
console.log(chalk.green('\n✅ Configs edited successfully\n'));
|
|
204
|
+
|
|
205
|
+
return {
|
|
206
|
+
projectMd: editedProjectMd,
|
|
207
|
+
configJson: editedConfigJson,
|
|
208
|
+
configObject: editedConfigObject
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Wizard Questions - Defines interactive wizard questions
|
|
3
|
+
* @module morph-spec/ui/wizard-questions
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Get wizard questions for interactive mode
|
|
8
|
+
* @returns {Array} Inquirer questions
|
|
9
|
+
*/
|
|
10
|
+
export function getWizardQuestions() {
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
type: 'input',
|
|
14
|
+
name: 'name',
|
|
15
|
+
message: '1/7 Project name:',
|
|
16
|
+
default: process.cwd().split(/[/\\]/).pop(),
|
|
17
|
+
validate: (input) => {
|
|
18
|
+
if (!input || input.trim().length === 0) {
|
|
19
|
+
return 'Project name is required';
|
|
20
|
+
}
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
type: 'input',
|
|
26
|
+
name: 'description',
|
|
27
|
+
message: '2/7 Project description (1-2 sentences):',
|
|
28
|
+
validate: (input) => {
|
|
29
|
+
if (!input || input.trim().length < 10) {
|
|
30
|
+
return 'Description must be at least 10 characters';
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: 'list',
|
|
37
|
+
name: 'type',
|
|
38
|
+
message: '3/7 Project type:',
|
|
39
|
+
choices: [
|
|
40
|
+
{ name: 'Blazor Server (.NET)', value: 'blazor-server' },
|
|
41
|
+
{ name: 'Next.js (React)', value: 'nextjs' },
|
|
42
|
+
{ name: '.NET Web API', value: 'dotnet-api' },
|
|
43
|
+
{ name: 'CLI Tool', value: 'cli-tool' },
|
|
44
|
+
{ name: 'Monorepo (multiple projects)', value: 'monorepo' },
|
|
45
|
+
{ name: 'Other', value: 'other' }
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: 'list',
|
|
50
|
+
name: 'frontend',
|
|
51
|
+
message: '4/7 Frontend technology:',
|
|
52
|
+
choices: [
|
|
53
|
+
{ name: 'Blazor Server', value: 'blazor' },
|
|
54
|
+
{ name: 'Next.js', value: 'nextjs' },
|
|
55
|
+
{ name: 'React', value: 'react' },
|
|
56
|
+
{ name: 'Vue.js', value: 'vue' },
|
|
57
|
+
{ name: 'Angular', value: 'angular' },
|
|
58
|
+
{ name: 'None (backend-only)', value: null }
|
|
59
|
+
],
|
|
60
|
+
when: (answers) => answers.type !== 'cli-tool' && answers.type !== 'dotnet-api'
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: 'list',
|
|
64
|
+
name: 'backend',
|
|
65
|
+
message: '5/7 Backend technology:',
|
|
66
|
+
choices: [
|
|
67
|
+
{ name: '.NET 10', value: 'dotnet-10' },
|
|
68
|
+
{ name: '.NET 9', value: 'dotnet-9' },
|
|
69
|
+
{ name: '.NET 8', value: 'dotnet-8' },
|
|
70
|
+
{ name: 'Node.js', value: 'nodejs' },
|
|
71
|
+
{ name: 'Supabase', value: 'supabase' },
|
|
72
|
+
{ name: 'Firebase', value: 'firebase' },
|
|
73
|
+
{ name: 'Other', value: 'other' }
|
|
74
|
+
],
|
|
75
|
+
default: 'dotnet-10'
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
type: 'list',
|
|
79
|
+
name: 'database',
|
|
80
|
+
message: '6/7 Database:',
|
|
81
|
+
choices: [
|
|
82
|
+
{ name: 'Azure SQL Database', value: 'azure-sql' },
|
|
83
|
+
{ name: 'PostgreSQL', value: 'postgresql' },
|
|
84
|
+
{ name: 'Cosmos DB', value: 'cosmosdb' },
|
|
85
|
+
{ name: 'MongoDB', value: 'mongodb' },
|
|
86
|
+
{ name: 'SQLite', value: 'sqlite' },
|
|
87
|
+
{ name: 'Supabase (PostgreSQL)', value: 'supabase' },
|
|
88
|
+
{ name: 'None (no database)', value: null }
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: 'confirm',
|
|
93
|
+
name: 'hasAzure',
|
|
94
|
+
message: '7a/7 Uses Azure infrastructure?',
|
|
95
|
+
default: false
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
type: 'confirm',
|
|
99
|
+
name: 'hasDocker',
|
|
100
|
+
message: '7b/7 Uses Docker containerization?',
|
|
101
|
+
default: true
|
|
102
|
+
}
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Map wizard answers to ProjectConfig
|
|
108
|
+
* @param {Object} answers - Wizard answers from inquirer
|
|
109
|
+
* @returns {ProjectConfig} Mapped project config
|
|
110
|
+
*/
|
|
111
|
+
export function mapAnswersToConfig(answers) {
|
|
112
|
+
// Parse backend tech and version
|
|
113
|
+
const backendParts = answers.backend.split('-');
|
|
114
|
+
const backendTech = backendParts[0] === 'dotnet' ? '.NET' :
|
|
115
|
+
backendParts[0] === 'nodejs' ? 'Node.js' :
|
|
116
|
+
answers.backend;
|
|
117
|
+
const backendVersion = backendParts[1] || 'latest';
|
|
118
|
+
|
|
119
|
+
// Map frontend
|
|
120
|
+
let frontend = null;
|
|
121
|
+
if (answers.frontend) {
|
|
122
|
+
const frontendMap = {
|
|
123
|
+
'blazor': { tech: 'Blazor', version: backendVersion, details: 'Blazor Server' },
|
|
124
|
+
'nextjs': { tech: 'Next.js', version: '15', details: 'App Router' },
|
|
125
|
+
'react': { tech: 'React', version: '18', details: null },
|
|
126
|
+
'vue': { tech: 'Vue.js', version: '3', details: null },
|
|
127
|
+
'angular': { tech: 'Angular', version: '17', details: null }
|
|
128
|
+
};
|
|
129
|
+
frontend = frontendMap[answers.frontend] || null;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Map database
|
|
133
|
+
let database = null;
|
|
134
|
+
if (answers.database) {
|
|
135
|
+
const databaseMap = {
|
|
136
|
+
'azure-sql': { tech: 'Azure SQL', version: 'latest', details: 'Managed SQL Database' },
|
|
137
|
+
'postgresql': { tech: 'PostgreSQL', version: '16', details: null },
|
|
138
|
+
'cosmosdb': { tech: 'Cosmos DB', version: 'latest', details: 'NoSQL' },
|
|
139
|
+
'mongodb': { tech: 'MongoDB', version: '7', details: null },
|
|
140
|
+
'sqlite': { tech: 'SQLite', version: '3', details: null },
|
|
141
|
+
'supabase': { tech: 'PostgreSQL', version: '16', details: 'Managed by Supabase' }
|
|
142
|
+
};
|
|
143
|
+
database = databaseMap[answers.database] || null;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Infer architecture from project type
|
|
147
|
+
const architectureMap = {
|
|
148
|
+
'blazor-server': 'clean-architecture',
|
|
149
|
+
'nextjs': 'layered',
|
|
150
|
+
'dotnet-api': 'clean-architecture',
|
|
151
|
+
'cli-tool': 'monolith',
|
|
152
|
+
'monorepo': 'microservices',
|
|
153
|
+
'other': 'layered'
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const architecture = architectureMap[answers.type] || 'layered';
|
|
157
|
+
|
|
158
|
+
// Infer hosting
|
|
159
|
+
let hosting = null;
|
|
160
|
+
if (answers.hasAzure) {
|
|
161
|
+
hosting = 'Azure';
|
|
162
|
+
} else if (answers.hasDocker) {
|
|
163
|
+
hosting = 'Docker';
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return {
|
|
167
|
+
name: answers.name,
|
|
168
|
+
description: answers.description,
|
|
169
|
+
type: answers.type,
|
|
170
|
+
stack: {
|
|
171
|
+
frontend,
|
|
172
|
+
backend: {
|
|
173
|
+
tech: backendTech,
|
|
174
|
+
version: backendVersion,
|
|
175
|
+
details: null
|
|
176
|
+
},
|
|
177
|
+
database,
|
|
178
|
+
hosting
|
|
179
|
+
},
|
|
180
|
+
architecture,
|
|
181
|
+
projectStructure: 'User-specified configuration via interactive wizard',
|
|
182
|
+
conventions: 'Standard conventions for ' + backendTech,
|
|
183
|
+
repository: null,
|
|
184
|
+
hasAzure: answers.hasAzure,
|
|
185
|
+
hasDocker: answers.hasDocker,
|
|
186
|
+
hasDevOps: false,
|
|
187
|
+
confidence: 100, // User input is 100% confident
|
|
188
|
+
warnings: ['Configuration was manually entered, not auto-detected']
|
|
189
|
+
};
|
|
190
|
+
}
|
package/src/utils/file-copier.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import fs from 'fs-extra';
|
|
2
2
|
import { join, dirname, resolve } from 'path';
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
|
+
import { resolveStackPath } from '../lib/stack-resolver.js';
|
|
4
5
|
|
|
5
6
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const frameworkRoot = join(__dirname, '..', '..');
|
|
6
8
|
|
|
7
9
|
function isSamePath(a, b) {
|
|
8
10
|
return resolve(a) === resolve(b);
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
export function getContentDir() {
|
|
12
|
-
return
|
|
14
|
+
return resolveStackPath(frameworkRoot);
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
export async function copyDirectory(src, dest, options = {}) {
|
package/src/utils/logger.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
|
|
3
|
-
export const logger = {
|
|
4
|
-
info: (msg) => console.log(chalk.cyan(` ${msg}`)),
|
|
5
|
-
success: (msg) => console.log(chalk.green(` ✓ ${msg}`)),
|
|
6
|
-
warn: (msg) => console.log(chalk.yellow(` ⚠ ${msg}`)),
|
|
7
|
-
error: (msg) => console.log(chalk.red(` ✗ ${msg}`)),
|
|
8
|
-
dim: (msg) => console.log(chalk.gray(` ${msg}`)),
|
|
9
|
-
|
|
10
|
-
header: (msg) => {
|
|
11
|
-
console.log('');
|
|
12
|
-
console.log(chalk.cyan.bold(` ${msg}`));
|
|
13
|
-
console.log(chalk.cyan(' ' + '─'.repeat(msg.length)));
|
|
14
|
-
console.log('');
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
step: (num, msg) => console.log(chalk.white(` ${num}. ${msg}`)),
|
|
18
|
-
|
|
19
|
-
blank: () => console.log(''),
|
|
20
|
-
|
|
21
|
-
box: (lines) => {
|
|
22
|
-
const maxLen = Math.max(...lines.map(l => l.length));
|
|
23
|
-
const border = '─'.repeat(maxLen + 2);
|
|
24
|
-
|
|
25
|
-
console.log(chalk.cyan(` ┌${border}┐`));
|
|
26
|
-
lines.forEach(line => {
|
|
27
|
-
const padded = line.padEnd(maxLen);
|
|
28
|
-
console.log(chalk.cyan(` │ ${padded} │`));
|
|
29
|
-
});
|
|
30
|
-
console.log(chalk.cyan(` └${border}┘`));
|
|
31
|
-
}
|
|
32
|
-
};
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
|
|
3
|
+
export const logger = {
|
|
4
|
+
info: (msg) => console.log(chalk.cyan(` ${msg}`)),
|
|
5
|
+
success: (msg) => console.log(chalk.green(` ✓ ${msg}`)),
|
|
6
|
+
warn: (msg) => console.log(chalk.yellow(` ⚠ ${msg}`)),
|
|
7
|
+
error: (msg) => console.log(chalk.red(` ✗ ${msg}`)),
|
|
8
|
+
dim: (msg) => console.log(chalk.gray(` ${msg}`)),
|
|
9
|
+
|
|
10
|
+
header: (msg) => {
|
|
11
|
+
console.log('');
|
|
12
|
+
console.log(chalk.cyan.bold(` ${msg}`));
|
|
13
|
+
console.log(chalk.cyan(' ' + '─'.repeat(msg.length)));
|
|
14
|
+
console.log('');
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
step: (num, msg) => console.log(chalk.white(` ${num}. ${msg}`)),
|
|
18
|
+
|
|
19
|
+
blank: () => console.log(''),
|
|
20
|
+
|
|
21
|
+
box: (lines) => {
|
|
22
|
+
const maxLen = Math.max(...lines.map(l => l.length));
|
|
23
|
+
const border = '─'.repeat(maxLen + 2);
|
|
24
|
+
|
|
25
|
+
console.log(chalk.cyan(` ┌${border}┐`));
|
|
26
|
+
lines.forEach(line => {
|
|
27
|
+
const padded = line.padEnd(maxLen);
|
|
28
|
+
console.log(chalk.cyan(` │ ${padded} │`));
|
|
29
|
+
});
|
|
30
|
+
console.log(chalk.cyan(` └${border}┘`));
|
|
31
|
+
}
|
|
32
|
+
};
|