create-quiver 0.15.2 → 0.15.4
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/.github/workflows/ci.yml +3 -0
- package/AGENTS.md.es.template +37 -0
- package/README.md +1 -0
- package/README_FOR_AI.md +6 -4
- package/docs/AI_CONTEXT.md.es.template +35 -0
- package/docs/AI_ONBOARDING_PROMPT.md.es.template +22 -0
- package/docs/CLI_UX_GUIDE.md +47 -1
- package/docs/COMMANDS.md.es.template +28 -0
- package/docs/COMMANDS.md.template +14 -3
- package/docs/CONTEXTO.md.es.template +33 -0
- package/docs/DECISIONS.md.es.template +17 -0
- package/docs/GITFLOW_PR_GUIDE.md.es.template +25 -0
- package/docs/INDEX.md +96 -0
- package/docs/INDEX.md.es.template +36 -0
- package/docs/STATUS.md.es.template +28 -0
- package/docs/SUPPORT_MATRIX.md.es.template +22 -0
- package/docs/TESTING_GUIDE_FOR_AI.md.es.template +19 -0
- package/docs/TROUBLESHOOTING.md.es.template +35 -0
- package/docs/WORKFLOW.md.es.template +29 -0
- package/docs/WORKFLOW.md.template +2 -2
- package/docs/ai/LESSONS.md.es.template +24 -0
- package/docs/getting-started/installation.md +19 -0
- package/docs/reference/commands.md +68 -2
- package/package.json +3 -1
- package/specs/quiver-v34-cli-dashboard-status/EVIDENCE_REPORT.md +119 -0
- package/specs/quiver-v34-cli-dashboard-status/EXECUTION_PLAN.md +77 -0
- package/specs/quiver-v34-cli-dashboard-status/SPEC.md +152 -0
- package/specs/quiver-v34-cli-dashboard-status/STATUS.md +29 -0
- package/specs/quiver-v34-cli-dashboard-status/pr.md +99 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-00-dashboard-foundation/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-00-dashboard-foundation/EXECUTION_BRIEF.md +49 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-00-dashboard-foundation/slice.json +68 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-01-dashboard-report-contract/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-01-dashboard-report-contract/EXECUTION_BRIEF.md +53 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-01-dashboard-report-contract/slice.json +78 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-02-dashboard-command-rendering/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-02-dashboard-command-rendering/EXECUTION_BRIEF.md +53 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-02-dashboard-command-rendering/slice.json +82 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-03-dashboard-edge-cases-and-guardrails/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-03-dashboard-edge-cases-and-guardrails/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-03-dashboard-edge-cases-and-guardrails/slice.json +77 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-04-docs-templates-and-scripts/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-04-docs-templates-and-scripts/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-04-docs-templates-and-scripts/slice.json +88 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-05-tests-smokes-release-readiness/CLOSURE_BRIEF.md +26 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-05-tests-smokes-release-readiness/EXECUTION_BRIEF.md +57 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-05-tests-smokes-release-readiness/slice.json +85 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/EVIDENCE_REPORT.md +43 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/EXECUTION_PLAN.md +85 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/SPEC.md +147 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/STATUS.md +33 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/pr.md +106 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-00-foundation-and-doc-router/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-00-foundation-and-doc-router/EXECUTION_BRIEF.md +38 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-00-foundation-and-doc-router/slice.json +64 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-01-dashboard-cli-contract/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-01-dashboard-cli-contract/EXECUTION_BRIEF.md +49 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-01-dashboard-cli-contract/slice.json +80 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-02-dashboard-compact-renderer/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-02-dashboard-compact-renderer/EXECUTION_BRIEF.md +48 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-02-dashboard-compact-renderer/slice.json +73 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-03-dashboard-details-sections/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-03-dashboard-details-sections/EXECUTION_BRIEF.md +48 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-03-dashboard-details-sections/slice.json +72 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-04-version-command/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-04-version-command/EXECUTION_BRIEF.md +49 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-04-version-command/slice.json +82 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-05-docs-help-generated-guidance/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-05-docs-help-generated-guidance/EXECUTION_BRIEF.md +50 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-05-docs-help-generated-guidance/slice.json +90 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-06-tests-smokes-release-readiness/CLOSURE_BRIEF.md +21 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-06-tests-smokes-release-readiness/EXECUTION_BRIEF.md +51 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-06-tests-smokes-release-readiness/slice.json +85 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-07-package-and-cross-platform-smoke/CLOSURE_BRIEF.md +20 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-07-package-and-cross-platform-smoke/EXECUTION_BRIEF.md +49 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-07-package-and-cross-platform-smoke/slice.json +79 -0
- package/specs/quiver-v36-ai-run-watch-portable/EVIDENCE_REPORT.md +33 -0
- package/specs/quiver-v36-ai-run-watch-portable/EXECUTION_PLAN.md +39 -0
- package/specs/quiver-v36-ai-run-watch-portable/SPEC.md +166 -0
- package/specs/quiver-v36-ai-run-watch-portable/STATUS.md +31 -0
- package/specs/quiver-v36-ai-run-watch-portable/pr.md +78 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-00-foundation-and-handoffs/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-00-foundation-and-handoffs/EXECUTION_BRIEF.md +43 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-00-foundation-and-handoffs/slice.json +61 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-01-run-schema-path-safety/CLOSURE_BRIEF.md +18 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-01-run-schema-path-safety/EXECUTION_BRIEF.md +43 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-01-run-schema-path-safety/slice.json +65 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-02-event-writer-redacted-logs/CLOSURE_BRIEF.md +18 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-02-event-writer-redacted-logs/EXECUTION_BRIEF.md +43 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-02-event-writer-redacted-logs/slice.json +66 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-03-provider-streaming-integration/CLOSURE_BRIEF.md +18 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-03-provider-streaming-integration/EXECUTION_BRIEF.md +41 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-03-provider-streaming-integration/slice.json +71 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-04-ai-run-watch-command/CLOSURE_BRIEF.md +18 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-04-ai-run-watch-command/EXECUTION_BRIEF.md +44 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-04-ai-run-watch-command/slice.json +73 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-05-main-progress-user-guidance/CLOSURE_BRIEF.md +18 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-05-main-progress-user-guidance/EXECUTION_BRIEF.md +44 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-05-main-progress-user-guidance/slice.json +71 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-06-docs-generated-guidance/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-06-docs-generated-guidance/EXECUTION_BRIEF.md +45 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-06-docs-generated-guidance/slice.json +77 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-07-tests-cross-platform-readiness/CLOSURE_BRIEF.md +22 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-07-tests-cross-platform-readiness/EXECUTION_BRIEF.md +46 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-07-tests-cross-platform-readiness/slice.json +87 -0
- package/specs/quiver-v37-cli-i18n-foundation/EVIDENCE_REPORT.md +73 -0
- package/specs/quiver-v37-cli-i18n-foundation/EXECUTION_PLAN.md +34 -0
- package/specs/quiver-v37-cli-i18n-foundation/SPEC.md +91 -0
- package/specs/quiver-v37-cli-i18n-foundation/STATUS.md +29 -0
- package/specs/quiver-v37-cli-i18n-foundation/pr.md +97 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-00-foundation-and-program-roadmap/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-00-foundation-and-program-roadmap/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-00-foundation-and-program-roadmap/slice.json +54 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-01-language-resolution-contract/CLOSURE_BRIEF.md +30 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-01-language-resolution-contract/EXECUTION_BRIEF.md +27 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-01-language-resolution-contract/slice.json +66 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-02-message-catalog-interpolation/CLOSURE_BRIEF.md +27 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-02-message-catalog-interpolation/EXECUTION_BRIEF.md +26 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-02-message-catalog-interpolation/slice.json +62 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-03-config-language-command/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-03-config-language-command/EXECUTION_BRIEF.md +25 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-03-config-language-command/slice.json +66 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-04-parser-help-error-foundation/CLOSURE_BRIEF.md +30 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-04-parser-help-error-foundation/EXECUTION_BRIEF.md +24 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-04-parser-help-error-foundation/slice.json +65 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-05-foundation-docs-tests-package-readiness/CLOSURE_BRIEF.md +27 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-05-foundation-docs-tests-package-readiness/EXECUTION_BRIEF.md +23 -0
- package/specs/quiver-v37-cli-i18n-foundation/slices/slice-05-foundation-docs-tests-package-readiness/slice.json +67 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/EVIDENCE_REPORT.md +69 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/EXECUTION_PLAN.md +25 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/SPEC.md +52 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/STATUS.md +24 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/pr.md +119 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-00-read-only-foundation/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-00-read-only-foundation/EXECUTION_BRIEF.md +21 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-00-read-only-foundation/slice.json +53 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-01-version-dashboard-help/CLOSURE_BRIEF.md +17 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-01-version-dashboard-help/EXECUTION_BRIEF.md +23 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-01-version-dashboard-help/slice.json +69 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-02-flow-doctor-next-graph/CLOSURE_BRIEF.md +13 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-02-flow-doctor-next-graph/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-02-flow-doctor-next-graph/slice.json +77 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-03-ai-inspection-and-export/CLOSURE_BRIEF.md +12 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-03-ai-inspection-and-export/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-03-ai-inspection-and-export/slice.json +66 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-04-read-only-tests-smokes/CLOSURE_BRIEF.md +13 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-04-read-only-tests-smokes/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v38-cli-i18n-read-only-commands/slices/slice-04-read-only-tests-smokes/slice.json +61 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/EVIDENCE_REPORT.md +71 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/EXECUTION_PLAN.md +25 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/SPEC.md +53 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/STATUS.md +24 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/pr.md +104 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-00-setup-foundation/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-00-setup-foundation/EXECUTION_BRIEF.md +21 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-00-setup-foundation/slice.json +53 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-01-init-interactive-language/CLOSURE_BRIEF.md +12 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-01-init-interactive-language/EXECUTION_BRIEF.md +23 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-01-init-interactive-language/slice.json +68 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-02-analyze-migrate-prepare/CLOSURE_BRIEF.md +12 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-02-analyze-migrate-prepare/EXECUTION_BRIEF.md +23 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-02-analyze-migrate-prepare/slice.json +62 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-03-demo-evidence-onboarding/CLOSURE_BRIEF.md +12 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-03-demo-evidence-onboarding/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-03-demo-evidence-onboarding/slice.json +72 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-04-setup-tests-smokes/CLOSURE_BRIEF.md +15 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-04-setup-tests-smokes/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v39-cli-i18n-setup-onboarding/slices/slice-04-setup-tests-smokes/slice.json +61 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/EVIDENCE_REPORT.md +50 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/EXECUTION_PLAN.md +25 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/SPEC.md +52 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/STATUS.md +24 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/pr.md +94 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-00-spec-slice-foundation/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-00-spec-slice-foundation/EXECUTION_BRIEF.md +21 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-00-spec-slice-foundation/slice.json +53 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-01-spec-create-start-status/CLOSURE_BRIEF.md +12 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-01-spec-create-start-status/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-01-spec-create-start-status/slice.json +63 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-02-spec-validate-close/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-02-spec-validate-close/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-02-spec-validate-close/slice.json +63 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-03-slice-lifecycle-handoffs/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-03-slice-lifecycle-handoffs/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-03-slice-lifecycle-handoffs/slice.json +72 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-04-spec-slice-tests-smokes/CLOSURE_BRIEF.md +15 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-04-spec-slice-tests-smokes/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v40-cli-i18n-spec-slice-workflows/slices/slice-04-spec-slice-tests-smokes/slice.json +69 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/EVIDENCE_REPORT.md +90 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/EXECUTION_PLAN.md +33 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/SPEC.md +57 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/STATUS.md +26 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/pr.md +103 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-00-ai-i18n-foundation/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-00-ai-i18n-foundation/EXECUTION_BRIEF.md +21 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-00-ai-i18n-foundation/slice.json +53 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-01-ai-run-status-resume/CLOSURE_BRIEF.md +13 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-01-ai-run-status-resume/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-01-ai-run-status-resume/slice.json +68 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-02-ai-agent-models/CLOSURE_BRIEF.md +12 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-02-ai-agent-models/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-02-ai-agent-models/slice.json +66 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-03-ai-planner-approval-review/CLOSURE_BRIEF.md +12 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-03-ai-planner-approval-review/EXECUTION_BRIEF.md +23 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-03-ai-planner-approval-review/slice.json +68 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-04-ai-execution-pr/CLOSURE_BRIEF.md +13 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-04-ai-execution-pr/EXECUTION_BRIEF.md +23 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-04-ai-execution-pr/slice.json +72 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-05-ai-tests-smokes/CLOSURE_BRIEF.md +15 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-05-ai-tests-smokes/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-05-ai-tests-smokes/slice.json +66 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-06-ai-prepare-context-progress-i18n-fix/CLOSURE_BRIEF.md +11 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-06-ai-prepare-context-progress-i18n-fix/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v41-cli-i18n-ai-lifecycle/slices/slice-06-ai-prepare-context-progress-i18n-fix/slice.json +70 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/EVIDENCE_REPORT.md +64 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/EXECUTION_PLAN.md +26 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/SPEC.md +52 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/STATUS.md +24 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/pr.md +125 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-00-generated-docs-foundation/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-00-generated-docs-foundation/EXECUTION_BRIEF.md +21 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-00-generated-docs-foundation/slice.json +53 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-01-template-language-routing/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-01-template-language-routing/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-01-template-language-routing/slice.json +62 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-02-init-docs-and-i18n-assets/CLOSURE_BRIEF.md +11 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-02-init-docs-and-i18n-assets/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-02-init-docs-and-i18n-assets/slice.json +72 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-03-docs-reference-guides/CLOSURE_BRIEF.md +12 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-03-docs-reference-guides/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-03-docs-reference-guides/slice.json +60 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-04-generated-docs-tests-smokes/CLOSURE_BRIEF.md +16 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-04-generated-docs-tests-smokes/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v42-cli-i18n-generated-docs/slices/slice-04-generated-docs-tests-smokes/slice.json +62 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/EVIDENCE_REPORT.md +203 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/EXECUTION_PLAN.md +27 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/SPEC.md +54 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/STATUS.md +24 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/command-language-mode-matrix.json +545 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/cross-platform-smoke-matrix.md +35 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/pr.md +155 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-00-audit-foundation/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-00-audit-foundation/EXECUTION_BRIEF.md +21 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-00-audit-foundation/slice.json +53 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-01-command-language-mode-matrix/CLOSURE_BRIEF.md +13 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-01-command-language-mode-matrix/EXECUTION_BRIEF.md +23 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-01-command-language-mode-matrix/slice.json +62 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-02-public-string-audit/CLOSURE_BRIEF.md +18 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-02-public-string-audit/EXECUTION_BRIEF.md +22 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-02-public-string-audit/slice.json +59 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-03-cross-platform-smokes/CLOSURE_BRIEF.md +15 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-03-cross-platform-smokes/EXECUTION_BRIEF.md +23 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-03-cross-platform-smokes/slice.json +62 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-04-package-release-readiness/CLOSURE_BRIEF.md +17 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-04-package-release-readiness/EXECUTION_BRIEF.md +24 -0
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/slices/slice-04-package-release-readiness/slice.json +66 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/EVIDENCE_REPORT.md +18 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/EXECUTION_PLAN.md +31 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/SPEC.md +118 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/STATUS.md +25 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/pr.md +92 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-00-tui-lite-contract-foundation/CLOSURE_BRIEF.md +11 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-00-tui-lite-contract-foundation/EXECUTION_BRIEF.md +23 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-00-tui-lite-contract-foundation/slice.json +64 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-01-provider-stream-hooks/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-01-provider-stream-hooks/EXECUTION_BRIEF.md +24 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-01-provider-stream-hooks/slice.json +65 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-02-live-output-renderer/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-02-live-output-renderer/EXECUTION_BRIEF.md +24 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-02-live-output-renderer/slice.json +70 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-03-prepare-context-integration/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-03-prepare-context-integration/EXECUTION_BRIEF.md +25 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-03-prepare-context-integration/slice.json +70 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-04-planner-command-audit-adoption/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-04-planner-command-audit-adoption/EXECUTION_BRIEF.md +26 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-04-planner-command-audit-adoption/slice.json +72 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-05-docs-tests-readiness/CLOSURE_BRIEF.md +15 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-05-docs-tests-readiness/EXECUTION_BRIEF.md +26 -0
- package/specs/quiver-v44-provider-live-output-tui-lite/slices/slice-05-docs-tests-readiness/slice.json +75 -0
- package/specs/quiver-v45-ci-actions-node24-readiness/EVIDENCE_REPORT.md +30 -0
- package/specs/quiver-v45-ci-actions-node24-readiness/EXECUTION_PLAN.md +22 -0
- package/specs/quiver-v45-ci-actions-node24-readiness/SPEC.md +49 -0
- package/specs/quiver-v45-ci-actions-node24-readiness/STATUS.md +21 -0
- package/specs/quiver-v45-ci-actions-node24-readiness/pr.md +67 -0
- package/specs/quiver-v45-ci-actions-node24-readiness/slices/slice-00-ci-actions-foundation/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v45-ci-actions-node24-readiness/slices/slice-00-ci-actions-foundation/EXECUTION_BRIEF.md +21 -0
- package/specs/quiver-v45-ci-actions-node24-readiness/slices/slice-00-ci-actions-foundation/slice.json +48 -0
- package/specs/quiver-v45-ci-actions-node24-readiness/slices/slice-01-actions-node24-readiness/CLOSURE_BRIEF.md +14 -0
- package/specs/quiver-v45-ci-actions-node24-readiness/slices/slice-01-actions-node24-readiness/EXECUTION_BRIEF.md +23 -0
- package/specs/quiver-v45-ci-actions-node24-readiness/slices/slice-01-actions-node24-readiness/slice.json +65 -0
- package/src/create-quiver/commands/ai.js +485 -307
- package/src/create-quiver/commands/config.js +124 -0
- package/src/create-quiver/commands/dashboard.js +31 -0
- package/src/create-quiver/commands/demo.js +2 -2
- package/src/create-quiver/commands/evidence.js +6 -4
- package/src/create-quiver/commands/flow.js +108 -16
- package/src/create-quiver/commands/graph.js +1 -0
- package/src/create-quiver/commands/next.js +21 -18
- package/src/create-quiver/commands/plan.js +23 -6
- package/src/create-quiver/commands/spec.js +66 -57
- package/src/create-quiver/index.js +606 -136
- package/src/create-quiver/lib/ai/execution-plan.js +23 -20
- package/src/create-quiver/lib/ai/executor.js +60 -44
- package/src/create-quiver/lib/ai/export-state.js +75 -64
- package/src/create-quiver/lib/ai/github.js +24 -21
- package/src/create-quiver/lib/ai/run-state.js +28 -25
- package/src/create-quiver/lib/cli/ux-flags.js +6 -0
- package/src/create-quiver/lib/dashboard.js +939 -0
- package/src/create-quiver/lib/demo.js +14 -12
- package/src/create-quiver/lib/handoff.js +16 -7
- package/src/create-quiver/lib/i18n/catalog.js +152 -0
- package/src/create-quiver/lib/i18n/language.js +279 -0
- package/src/create-quiver/lib/i18n/messages/en.js +853 -0
- package/src/create-quiver/lib/i18n/messages/es.js +968 -0
- package/src/create-quiver/lib/i18n/read-only-format.js +26 -0
- package/src/create-quiver/lib/i18n/templates.js +172 -0
- package/src/create-quiver/lib/init-docs.js +24 -4
- package/src/create-quiver/lib/init-layout.js +8 -0
- package/src/create-quiver/lib/lifecycle.js +53 -46
- package/src/create-quiver/lib/project-state-resolver.js +22 -2
- package/src/create-quiver/lib/readiness.js +77 -67
- package/src/create-quiver/lib/renderers/tree.js +9 -6
- package/src/create-quiver/lib/spec-worktrees.js +34 -30
- package/src/create-quiver/lib/version.js +159 -0
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
resolveInitPackageScripts,
|
|
7
7
|
toProjectSlug,
|
|
8
8
|
} = require('./init-layout');
|
|
9
|
+
const { createTranslator } = require('./i18n/catalog');
|
|
9
10
|
const cliPackageJson = require('../../../package.json');
|
|
10
11
|
|
|
11
12
|
const SPEC_VIEWER_DEMO = 'spec-viewer';
|
|
@@ -770,38 +771,39 @@ function buildDemoPlan(targetRoot, options = {}) {
|
|
|
770
771
|
}
|
|
771
772
|
|
|
772
773
|
function formatDemoPlan(plan, options = {}) {
|
|
774
|
+
const translator = createTranslator(options.language);
|
|
773
775
|
const lines = [];
|
|
774
|
-
const title = options.dryRun ? '
|
|
776
|
+
const title = options.dryRun ? translator.t('demo.title.dry_run') : translator.t('demo.title.created');
|
|
775
777
|
|
|
776
778
|
lines.push(title);
|
|
777
|
-
lines.push(`-
|
|
778
|
-
lines.push(`-
|
|
779
|
-
lines.push(`-
|
|
780
|
-
lines.push(`-
|
|
781
|
-
lines.push(`-
|
|
779
|
+
lines.push(`- ${translator.t('demo.label.demo', { demo: plan.demo })}`);
|
|
780
|
+
lines.push(`- ${translator.t('demo.label.project', { project: plan.projectName })}`);
|
|
781
|
+
lines.push(`- ${translator.t('demo.label.target', { path: plan.targetRoot })}`);
|
|
782
|
+
lines.push(`- ${translator.t('demo.label.files_to_create', { count: plan.summary.create })}`);
|
|
783
|
+
lines.push(`- ${translator.t('demo.label.files_to_preserve', { count: plan.summary.preserve })}`);
|
|
782
784
|
lines.push('');
|
|
783
|
-
lines.push('
|
|
785
|
+
lines.push(translator.t('demo.section.files_to_create'));
|
|
784
786
|
for (const operation of plan.operations.filter((item) => item.action === 'create')) {
|
|
785
787
|
lines.push(`- ${operation.path}`);
|
|
786
788
|
}
|
|
787
789
|
if (plan.summary.create === 0) {
|
|
788
|
-
lines.push('
|
|
790
|
+
lines.push(`- ${translator.t('common.none')}`);
|
|
789
791
|
}
|
|
790
792
|
lines.push('');
|
|
791
|
-
lines.push('
|
|
793
|
+
lines.push(translator.t('demo.section.files_to_preserve'));
|
|
792
794
|
for (const operation of plan.operations.filter((item) => item.action === 'preserve')) {
|
|
793
795
|
lines.push(`- ${operation.path}`);
|
|
794
796
|
}
|
|
795
797
|
if (plan.summary.preserve === 0) {
|
|
796
|
-
lines.push('
|
|
798
|
+
lines.push(`- ${translator.t('common.none')}`);
|
|
797
799
|
}
|
|
798
800
|
|
|
799
801
|
if (options.dryRun) {
|
|
800
802
|
lines.push('');
|
|
801
|
-
lines.push('
|
|
803
|
+
lines.push(translator.t('demo.no_files_written'));
|
|
802
804
|
} else {
|
|
803
805
|
lines.push('');
|
|
804
|
-
lines.push('
|
|
806
|
+
lines.push(translator.t('demo.next_commands'));
|
|
805
807
|
lines.push(`- cd ${plan.targetRoot}`);
|
|
806
808
|
lines.push('- npm run validate');
|
|
807
809
|
lines.push('- npm start');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
|
+
const { createTranslator } = require('./i18n/catalog');
|
|
3
4
|
|
|
4
5
|
const REQUIRED_HEADINGS = [
|
|
5
6
|
'## Background',
|
|
@@ -141,23 +142,31 @@ function formatMinimalTemplate(kind) {
|
|
|
141
142
|
return lines.join('\n').trimEnd();
|
|
142
143
|
}
|
|
143
144
|
|
|
144
|
-
function formatMissingSectionsError(resolved, missingSections) {
|
|
145
|
+
function formatMissingSectionsError(resolved, missingSections, options = {}) {
|
|
146
|
+
const translator = createTranslator(options.language);
|
|
145
147
|
return [
|
|
146
|
-
`create-quiver: ${
|
|
148
|
+
`create-quiver: ${translator.t('handoff.error.missing_sections', {
|
|
149
|
+
sections: missingSections.join(', '),
|
|
150
|
+
subject: translator.t(`handoff.subject.${resolved.kind}`),
|
|
151
|
+
})}`,
|
|
147
152
|
'',
|
|
148
|
-
'
|
|
153
|
+
translator.t('handoff.accepted_headings'),
|
|
149
154
|
formatAliasGuidance(resolved.kind),
|
|
150
155
|
'',
|
|
151
|
-
'
|
|
156
|
+
translator.t('handoff.minimal_template'),
|
|
152
157
|
formatMinimalTemplate(resolved.kind),
|
|
153
158
|
].join('\n');
|
|
154
159
|
}
|
|
155
160
|
|
|
156
|
-
function checkHandoff(handoffInput, repoRoot = process.cwd()) {
|
|
161
|
+
function checkHandoff(handoffInput, repoRoot = process.cwd(), options = {}) {
|
|
157
162
|
const resolved = resolveHandoffPath(repoRoot, handoffInput);
|
|
163
|
+
const translator = createTranslator(options.language);
|
|
158
164
|
|
|
159
165
|
if (!fs.existsSync(resolved.absolutePath)) {
|
|
160
|
-
throw new Error(`create-quiver:
|
|
166
|
+
throw new Error(`create-quiver: ${translator.t('handoff.error.missing_file', {
|
|
167
|
+
path: resolved.relativePath,
|
|
168
|
+
subject: translator.t(`handoff.subject.${resolved.kind}`),
|
|
169
|
+
})}`);
|
|
161
170
|
}
|
|
162
171
|
|
|
163
172
|
const text = fs.readFileSync(resolved.absolutePath, 'utf8');
|
|
@@ -165,7 +174,7 @@ function checkHandoff(handoffInput, repoRoot = process.cwd()) {
|
|
|
165
174
|
? validateHandoffSections(text)
|
|
166
175
|
: validateBriefSections(text, resolved.kind);
|
|
167
176
|
if (missingSections.length > 0) {
|
|
168
|
-
throw new Error(formatMissingSectionsError(resolved, missingSections));
|
|
177
|
+
throw new Error(formatMissingSectionsError(resolved, missingSections, options));
|
|
169
178
|
}
|
|
170
179
|
|
|
171
180
|
return resolved;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
const { DEFAULT_LANGUAGE, SUPPORTED_LANGUAGES, normalizeLanguage } = require('./language');
|
|
2
|
+
const en = require('./messages/en');
|
|
3
|
+
const es = require('./messages/es');
|
|
4
|
+
|
|
5
|
+
const CATALOGS = Object.freeze({
|
|
6
|
+
en,
|
|
7
|
+
es,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
function getCatalog(language = DEFAULT_LANGUAGE) {
|
|
11
|
+
const normalized = normalizeLanguage(language) || DEFAULT_LANGUAGE;
|
|
12
|
+
return CATALOGS[normalized] || CATALOGS[DEFAULT_LANGUAGE];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function listMessageKeys(catalog) {
|
|
16
|
+
return Object.keys(catalog?.messages || {}).sort();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function validateCatalogCompleteness(catalogs = CATALOGS) {
|
|
20
|
+
const baseKeys = listMessageKeys(catalogs[DEFAULT_LANGUAGE]);
|
|
21
|
+
const missing = [];
|
|
22
|
+
const extra = [];
|
|
23
|
+
|
|
24
|
+
for (const language of SUPPORTED_LANGUAGES) {
|
|
25
|
+
const keys = listMessageKeys(catalogs[language]);
|
|
26
|
+
for (const key of baseKeys) {
|
|
27
|
+
if (!keys.includes(key)) {
|
|
28
|
+
missing.push(`${language}:${key}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
for (const key of keys) {
|
|
32
|
+
if (!baseKeys.includes(key)) {
|
|
33
|
+
extra.push(`${language}:${key}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
ok: missing.length === 0 && extra.length === 0,
|
|
40
|
+
missing,
|
|
41
|
+
extra,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function assertCatalogCompleteness(catalogs = CATALOGS) {
|
|
46
|
+
const report = validateCatalogCompleteness(catalogs);
|
|
47
|
+
if (!report.ok) {
|
|
48
|
+
throw new Error([
|
|
49
|
+
'i18n catalog completeness failed',
|
|
50
|
+
...report.missing.map((item) => `missing ${item}`),
|
|
51
|
+
...report.extra.map((item) => `extra ${item}`),
|
|
52
|
+
].join('\n'));
|
|
53
|
+
}
|
|
54
|
+
return report;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function sanitizeInterpolationValue(value) {
|
|
58
|
+
if (value === null || typeof value === 'undefined') {
|
|
59
|
+
return '';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return String(value)
|
|
63
|
+
.replace(/\u001b\[[0-?]*[ -/]*[@-~]/g, '')
|
|
64
|
+
.replace(/\r/g, '\\r')
|
|
65
|
+
.replace(/\n/g, '\\n')
|
|
66
|
+
.replace(/\t/g, '\\t')
|
|
67
|
+
.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, '');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function interpolate(template, params = {}) {
|
|
71
|
+
return String(template).replace(/\{([a-zA-Z0-9_.-]+)\}/g, (match, name) => {
|
|
72
|
+
if (!Object.prototype.hasOwnProperty.call(params, name)) {
|
|
73
|
+
return `[missing:${name}]`;
|
|
74
|
+
}
|
|
75
|
+
return sanitizeInterpolationValue(params[name]);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function selectPluralTemplate(message, params = {}) {
|
|
80
|
+
if (!message || typeof message !== 'object' || Array.isArray(message)) {
|
|
81
|
+
return message;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const count = Number(params.count);
|
|
85
|
+
if (count === 1 && typeof message.one === 'string') {
|
|
86
|
+
return message.one;
|
|
87
|
+
}
|
|
88
|
+
if (typeof message.other === 'string') {
|
|
89
|
+
return message.other;
|
|
90
|
+
}
|
|
91
|
+
if (typeof message.one === 'string') {
|
|
92
|
+
return message.one;
|
|
93
|
+
}
|
|
94
|
+
return '';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function resolveMessage(language, key) {
|
|
98
|
+
const catalog = getCatalog(language);
|
|
99
|
+
const message = catalog.messages[key];
|
|
100
|
+
if (typeof message !== 'undefined') {
|
|
101
|
+
return {
|
|
102
|
+
message,
|
|
103
|
+
language: catalog.metadata.language,
|
|
104
|
+
fallback: false,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const fallbackCatalog = getCatalog(DEFAULT_LANGUAGE);
|
|
109
|
+
const fallbackMessage = fallbackCatalog.messages[key];
|
|
110
|
+
if (typeof fallbackMessage !== 'undefined') {
|
|
111
|
+
return {
|
|
112
|
+
message: fallbackMessage,
|
|
113
|
+
language: DEFAULT_LANGUAGE,
|
|
114
|
+
fallback: true,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
message: `[missing:${key}]`,
|
|
120
|
+
language: DEFAULT_LANGUAGE,
|
|
121
|
+
fallback: true,
|
|
122
|
+
missing: true,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function translate(language, key, params = {}) {
|
|
127
|
+
const resolved = resolveMessage(language, key);
|
|
128
|
+
const template = selectPluralTemplate(resolved.message, params);
|
|
129
|
+
return interpolate(template, params);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function createTranslator(language = DEFAULT_LANGUAGE) {
|
|
133
|
+
return {
|
|
134
|
+
language: getCatalog(language).metadata.language,
|
|
135
|
+
t(key, params = {}) {
|
|
136
|
+
return translate(language, key, params);
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
module.exports = {
|
|
142
|
+
CATALOGS,
|
|
143
|
+
assertCatalogCompleteness,
|
|
144
|
+
createTranslator,
|
|
145
|
+
getCatalog,
|
|
146
|
+
interpolate,
|
|
147
|
+
listMessageKeys,
|
|
148
|
+
resolveMessage,
|
|
149
|
+
sanitizeInterpolationValue,
|
|
150
|
+
translate,
|
|
151
|
+
validateCatalogCompleteness,
|
|
152
|
+
};
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const os = require('os');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
6
|
+
const SUPPORTED_LANGUAGES = Object.freeze(['en', 'es']);
|
|
7
|
+
const PROJECT_CONFIG_RELATIVE_PATH = path.join('.quiver', 'config.json');
|
|
8
|
+
const GLOBAL_CONFIG_RELATIVE_PATH = path.join('.quiver', 'config.json');
|
|
9
|
+
|
|
10
|
+
function isSupportedLanguage(language) {
|
|
11
|
+
return SUPPORTED_LANGUAGES.includes(language);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function normalizeLanguage(value) {
|
|
15
|
+
const raw = String(value || '').trim();
|
|
16
|
+
if (!raw) {
|
|
17
|
+
return '';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const firstLanguage = raw.split(':').find((part) => part.trim()) || raw;
|
|
21
|
+
const normalized = firstLanguage
|
|
22
|
+
.trim()
|
|
23
|
+
.replace(/_/g, '-')
|
|
24
|
+
.split('.')[0]
|
|
25
|
+
.split('@')[0]
|
|
26
|
+
.toLowerCase();
|
|
27
|
+
const primary = normalized.split('-')[0];
|
|
28
|
+
|
|
29
|
+
return isSupportedLanguage(primary) ? primary : '';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function projectLanguageConfigPath(projectRoot) {
|
|
33
|
+
return path.join(projectRoot, PROJECT_CONFIG_RELATIVE_PATH);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function globalLanguageConfigPath(homeDir = os.homedir()) {
|
|
37
|
+
return path.join(homeDir, GLOBAL_CONFIG_RELATIVE_PATH);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function readJsonFile(filePath) {
|
|
41
|
+
if (!filePath || !fs.existsSync(filePath)) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
return JSON.parse(fs.readFileSync(filePath, 'utf8'));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function readLanguageConfig(filePath) {
|
|
48
|
+
const config = readJsonFile(filePath);
|
|
49
|
+
if (!config || typeof config !== 'object' || Array.isArray(config)) {
|
|
50
|
+
return {
|
|
51
|
+
exists: Boolean(config),
|
|
52
|
+
language: '',
|
|
53
|
+
raw: config,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
exists: true,
|
|
59
|
+
language: typeof config.language === 'string' ? config.language : '',
|
|
60
|
+
raw: config,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function assertWritableLanguage(language) {
|
|
65
|
+
const normalized = normalizeLanguage(language);
|
|
66
|
+
if (!normalized || normalized !== String(language || '').trim().toLowerCase()) {
|
|
67
|
+
throw new Error(`unsupported language: ${language}. Supported languages: ${SUPPORTED_LANGUAGES.join(', ')}`);
|
|
68
|
+
}
|
|
69
|
+
return normalized;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function writeLanguageConfig(filePath, language) {
|
|
73
|
+
const normalized = assertWritableLanguage(language);
|
|
74
|
+
const current = readJsonFile(filePath);
|
|
75
|
+
const base = current && typeof current === 'object' && !Array.isArray(current) ? current : {};
|
|
76
|
+
const next = {
|
|
77
|
+
...base,
|
|
78
|
+
language: normalized,
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
82
|
+
fs.writeFileSync(filePath, `${JSON.stringify(next, null, 2)}\n`);
|
|
83
|
+
return next;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function readProjectLanguageConfig(projectRoot) {
|
|
87
|
+
return readLanguageConfig(projectLanguageConfigPath(projectRoot));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function writeProjectLanguageConfig(projectRoot, language) {
|
|
91
|
+
return writeLanguageConfig(projectLanguageConfigPath(projectRoot), language);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function readGlobalLanguageConfig(homeDir = os.homedir()) {
|
|
95
|
+
return readLanguageConfig(globalLanguageConfigPath(homeDir));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function writeGlobalLanguageConfig(language, homeDir = os.homedir()) {
|
|
99
|
+
return writeLanguageConfig(globalLanguageConfigPath(homeDir), language);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function detectLocaleLanguage(options = {}) {
|
|
103
|
+
const env = options.env || process.env;
|
|
104
|
+
const intlLocale = Object.prototype.hasOwnProperty.call(options, 'intlLocale')
|
|
105
|
+
? options.intlLocale
|
|
106
|
+
: Intl.DateTimeFormat().resolvedOptions().locale;
|
|
107
|
+
const candidates = [
|
|
108
|
+
['locale:LC_ALL', env.LC_ALL],
|
|
109
|
+
['locale:LC_MESSAGES', env.LC_MESSAGES],
|
|
110
|
+
['locale:LANG', env.LANG],
|
|
111
|
+
];
|
|
112
|
+
|
|
113
|
+
const languageValues = String(env.LANGUAGE || '')
|
|
114
|
+
.split(':')
|
|
115
|
+
.filter(Boolean)
|
|
116
|
+
.map((value) => ['locale:LANGUAGE', value]);
|
|
117
|
+
candidates.push(...languageValues);
|
|
118
|
+
candidates.push(['locale:Intl', intlLocale]);
|
|
119
|
+
|
|
120
|
+
for (const [source, value] of candidates) {
|
|
121
|
+
const language = normalizeLanguage(value);
|
|
122
|
+
if (language) {
|
|
123
|
+
return {
|
|
124
|
+
language,
|
|
125
|
+
source,
|
|
126
|
+
requestedLanguage: value,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
language: '',
|
|
133
|
+
source: '',
|
|
134
|
+
requestedLanguage: '',
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function unsupportedLanguageWarning(source, requestedLanguage) {
|
|
139
|
+
return {
|
|
140
|
+
code: 'UNSUPPORTED_LANGUAGE',
|
|
141
|
+
source,
|
|
142
|
+
requestedLanguage: String(requestedLanguage || ''),
|
|
143
|
+
fallbackLanguage: DEFAULT_LANGUAGE,
|
|
144
|
+
supportedLanguages: [...SUPPORTED_LANGUAGES],
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function resolveProvidedLanguage(source, value) {
|
|
149
|
+
if (typeof value !== 'string' || !value.trim()) {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const language = normalizeLanguage(value);
|
|
154
|
+
if (language) {
|
|
155
|
+
return {
|
|
156
|
+
language,
|
|
157
|
+
source,
|
|
158
|
+
requestedLanguage: value,
|
|
159
|
+
warnings: [],
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return {
|
|
164
|
+
language: DEFAULT_LANGUAGE,
|
|
165
|
+
source: 'fallback',
|
|
166
|
+
requestedSource: source,
|
|
167
|
+
requestedLanguage: value,
|
|
168
|
+
warnings: [unsupportedLanguageWarning(source, value)],
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function resolveLanguage(options = {}) {
|
|
173
|
+
const env = options.env || process.env;
|
|
174
|
+
const projectRoot = options.projectRoot || process.cwd();
|
|
175
|
+
const homeDir = typeof options.homeDir === 'string' && options.homeDir
|
|
176
|
+
? options.homeDir
|
|
177
|
+
: os.homedir();
|
|
178
|
+
|
|
179
|
+
const cli = resolveProvidedLanguage('--lang', options.cliLanguage);
|
|
180
|
+
if (cli) return cli;
|
|
181
|
+
|
|
182
|
+
const envLanguage = resolveProvidedLanguage('QUIVER_LANG', env.QUIVER_LANG);
|
|
183
|
+
if (envLanguage) return envLanguage;
|
|
184
|
+
|
|
185
|
+
const projectConfig = readProjectLanguageConfig(projectRoot);
|
|
186
|
+
const projectLanguage = resolveProvidedLanguage(PROJECT_CONFIG_RELATIVE_PATH, projectConfig.language);
|
|
187
|
+
if (projectLanguage) return projectLanguage;
|
|
188
|
+
|
|
189
|
+
const globalConfig = readGlobalLanguageConfig(homeDir);
|
|
190
|
+
const globalLanguage = resolveProvidedLanguage(`~/${GLOBAL_CONFIG_RELATIVE_PATH}`, globalConfig.language);
|
|
191
|
+
if (globalLanguage) return globalLanguage;
|
|
192
|
+
|
|
193
|
+
const locale = detectLocaleLanguage({
|
|
194
|
+
env,
|
|
195
|
+
intlLocale: options.intlLocale,
|
|
196
|
+
});
|
|
197
|
+
if (locale.language) {
|
|
198
|
+
return {
|
|
199
|
+
...locale,
|
|
200
|
+
warnings: [],
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return {
|
|
205
|
+
language: DEFAULT_LANGUAGE,
|
|
206
|
+
source: 'default',
|
|
207
|
+
requestedLanguage: '',
|
|
208
|
+
warnings: [],
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function extractCliLanguageFlag(argv) {
|
|
213
|
+
const nextArgv = [];
|
|
214
|
+
let language = '';
|
|
215
|
+
|
|
216
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
217
|
+
const arg = argv[index];
|
|
218
|
+
|
|
219
|
+
if (arg === '--') {
|
|
220
|
+
nextArgv.push(...argv.slice(index));
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (arg === '--lang') {
|
|
225
|
+
const value = argv[index + 1];
|
|
226
|
+
if (!value || String(value).startsWith('--')) {
|
|
227
|
+
throw new Error('missing value for --lang');
|
|
228
|
+
}
|
|
229
|
+
language = value;
|
|
230
|
+
index += 1;
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (String(arg).startsWith('--lang=')) {
|
|
235
|
+
const value = String(arg).slice('--lang='.length);
|
|
236
|
+
if (!value) {
|
|
237
|
+
throw new Error('missing value for --lang');
|
|
238
|
+
}
|
|
239
|
+
language = value;
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
nextArgv.push(arg);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
return {
|
|
247
|
+
argv: nextArgv,
|
|
248
|
+
language,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function formatLanguageWarning(warning) {
|
|
253
|
+
if (!warning || warning.code !== 'UNSUPPORTED_LANGUAGE') {
|
|
254
|
+
return '';
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
return `create-quiver: unsupported language "${warning.requestedLanguage}" from ${warning.source}; falling back to ${warning.fallbackLanguage}. Supported languages: ${warning.supportedLanguages.join(', ')}.`;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
module.exports = {
|
|
261
|
+
DEFAULT_LANGUAGE,
|
|
262
|
+
GLOBAL_CONFIG_RELATIVE_PATH,
|
|
263
|
+
PROJECT_CONFIG_RELATIVE_PATH,
|
|
264
|
+
SUPPORTED_LANGUAGES,
|
|
265
|
+
detectLocaleLanguage,
|
|
266
|
+
extractCliLanguageFlag,
|
|
267
|
+
formatLanguageWarning,
|
|
268
|
+
globalLanguageConfigPath,
|
|
269
|
+
isSupportedLanguage,
|
|
270
|
+
normalizeLanguage,
|
|
271
|
+
projectLanguageConfigPath,
|
|
272
|
+
readGlobalLanguageConfig,
|
|
273
|
+
readLanguageConfig,
|
|
274
|
+
readProjectLanguageConfig,
|
|
275
|
+
resolveLanguage,
|
|
276
|
+
writeGlobalLanguageConfig,
|
|
277
|
+
writeLanguageConfig,
|
|
278
|
+
writeProjectLanguageConfig,
|
|
279
|
+
};
|