silvermoon 0.3.0-rc.2 → 0.4.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/README.md +28 -28
- package/README.zh-CN.md +26 -24
- package/dist/bin/build-npm-tarball.d.ts +28 -0
- package/dist/bin/build-npm-tarball.d.ts.map +1 -0
- package/dist/bin/build-npm-tarball.js +200 -0
- package/dist/bin/build-npm-tarball.js.map +1 -0
- package/dist/bin/check-pack.d.ts +2 -0
- package/dist/bin/check-pack.d.ts.map +1 -0
- package/dist/bin/check-pack.js +421 -0
- package/dist/bin/check-pack.js.map +1 -0
- package/dist/bin/ci-package-risk.d.ts +19 -0
- package/dist/bin/ci-package-risk.d.ts.map +1 -0
- package/dist/bin/ci-package-risk.js +78 -0
- package/dist/bin/ci-package-risk.js.map +1 -0
- package/dist/bin/generate-npm-readme.d.ts +7 -0
- package/dist/bin/generate-npm-readme.d.ts.map +1 -0
- package/dist/bin/generate-npm-readme.js +232 -0
- package/dist/bin/generate-npm-readme.js.map +1 -0
- package/dist/bin/migrate-v1-to-v2.d.ts +3 -0
- package/dist/bin/migrate-v1-to-v2.d.ts.map +1 -0
- package/dist/bin/migrate-v1-to-v2.js +25 -0
- package/dist/bin/migrate-v1-to-v2.js.map +1 -0
- package/dist/bin/prepare-npm-release.d.ts +46 -0
- package/dist/bin/prepare-npm-release.d.ts.map +1 -0
- package/dist/bin/prepare-npm-release.js +210 -0
- package/dist/bin/prepare-npm-release.js.map +1 -0
- package/dist/bin/pure-check.d.ts +15 -0
- package/dist/bin/pure-check.d.ts.map +1 -0
- package/dist/bin/pure-check.js +448 -0
- package/dist/bin/pure-check.js.map +1 -0
- package/dist/bin/run-checks.d.ts +34 -0
- package/dist/bin/run-checks.d.ts.map +1 -0
- package/dist/bin/run-checks.js +149 -0
- package/dist/bin/run-checks.js.map +1 -0
- package/dist/bin/silvermoon.d.ts +76 -0
- package/dist/bin/silvermoon.d.ts.map +1 -0
- package/dist/bin/silvermoon.js +401 -0
- package/dist/bin/silvermoon.js.map +1 -0
- package/dist/bin/sync-skills.d.ts +2 -0
- package/dist/bin/sync-skills.d.ts.map +1 -0
- package/dist/bin/sync-skills.js +78 -0
- package/dist/bin/sync-skills.js.map +1 -0
- package/dist/bin/verify-npm-release.d.ts +55 -0
- package/dist/bin/verify-npm-release.d.ts.map +1 -0
- package/dist/bin/verify-npm-release.js +418 -0
- package/dist/bin/verify-npm-release.js.map +1 -0
- package/dist/src/business/agent-copilot.d.ts +82 -0
- package/dist/src/business/agent-copilot.d.ts.map +1 -0
- package/dist/src/business/agent-copilot.js +330 -0
- package/dist/src/business/agent-copilot.js.map +1 -0
- package/dist/src/business/agent-project-registry.d.ts +22 -0
- package/dist/src/business/agent-project-registry.d.ts.map +1 -0
- package/dist/src/business/agent-project-registry.js +239 -0
- package/dist/src/business/agent-project-registry.js.map +1 -0
- package/dist/src/business/agent-project-runtime.d.ts +37 -0
- package/dist/src/business/agent-project-runtime.d.ts.map +1 -0
- package/dist/src/business/agent-project-runtime.js +198 -0
- package/dist/src/business/agent-project-runtime.js.map +1 -0
- package/dist/src/business/append-event-history.d.ts +21 -0
- package/dist/src/business/append-event-history.d.ts.map +1 -0
- package/dist/src/business/append-event-history.js +138 -0
- package/dist/src/business/append-event-history.js.map +1 -0
- package/dist/src/business/append-event.d.ts +140 -0
- package/dist/src/business/append-event.d.ts.map +1 -0
- package/dist/src/business/append-event.js +292 -0
- package/dist/src/business/append-event.js.map +1 -0
- package/dist/src/business/check-repository.d.ts +109 -0
- package/dist/src/business/check-repository.d.ts.map +1 -0
- package/dist/src/business/check-repository.js +379 -0
- package/dist/src/business/check-repository.js.map +1 -0
- package/dist/src/business/create-idea.d.ts +100 -0
- package/dist/src/business/create-idea.d.ts.map +1 -0
- package/dist/src/business/create-idea.js +224 -0
- package/dist/src/business/create-idea.js.map +1 -0
- package/dist/src/business/event-command.d.ts +111 -0
- package/dist/src/business/event-command.d.ts.map +1 -0
- package/dist/src/business/event-command.js +239 -0
- package/dist/src/business/event-command.js.map +1 -0
- package/dist/src/business/index.d.ts +7 -0
- package/dist/src/business/index.d.ts.map +1 -0
- package/dist/src/business/index.js +7 -0
- package/dist/src/business/index.js.map +1 -0
- package/dist/src/business/list-ideas.d.ts +97 -0
- package/dist/src/business/list-ideas.d.ts.map +1 -0
- package/dist/src/business/list-ideas.js +177 -0
- package/dist/src/business/list-ideas.js.map +1 -0
- package/dist/src/business/migrate-v1-to-v2.d.ts +23 -0
- package/dist/src/business/migrate-v1-to-v2.d.ts.map +1 -0
- package/dist/src/business/migrate-v1-to-v2.js +152 -0
- package/dist/src/business/migrate-v1-to-v2.js.map +1 -0
- package/dist/src/business/replay-events.d.ts +20 -0
- package/dist/src/business/replay-events.d.ts.map +1 -0
- package/dist/src/business/replay-events.js +27 -0
- package/dist/src/business/replay-events.js.map +1 -0
- package/dist/src/business/schema-migration.d.ts +19 -0
- package/dist/src/business/schema-migration.d.ts.map +1 -0
- package/dist/src/business/schema-migration.js +23 -0
- package/dist/src/business/schema-migration.js.map +1 -0
- package/dist/src/business/shared/assess-idea-creation-readiness.d.ts +3 -0
- package/dist/src/business/shared/assess-idea-creation-readiness.d.ts.map +1 -0
- package/dist/src/business/shared/assess-idea-creation-readiness.js +9 -0
- package/dist/src/business/shared/assess-idea-creation-readiness.js.map +1 -0
- package/dist/src/business/shared/assess-repository-readiness-with.d.ts +18 -0
- package/dist/src/business/shared/assess-repository-readiness-with.d.ts.map +1 -0
- package/dist/src/business/shared/assess-repository-readiness-with.js +125 -0
- package/dist/src/business/shared/assess-repository-readiness-with.js.map +1 -0
- package/dist/src/business/shared/assess-repository-readiness.d.ts +3 -0
- package/dist/src/business/shared/assess-repository-readiness.d.ts.map +1 -0
- package/dist/src/business/shared/assess-repository-readiness.js +6 -0
- package/dist/src/business/shared/assess-repository-readiness.js.map +1 -0
- package/dist/src/business/shared/business-types.d.ts +151 -0
- package/dist/src/business/shared/business-types.d.ts.map +1 -0
- package/dist/src/business/shared/business-types.js +83 -0
- package/dist/src/business/shared/business-types.js.map +1 -0
- package/dist/src/business/shared/evaluate-local-readiness.d.ts +9 -0
- package/dist/src/business/shared/evaluate-local-readiness.d.ts.map +1 -0
- package/dist/src/business/shared/evaluate-local-readiness.js +97 -0
- package/dist/src/business/shared/evaluate-local-readiness.js.map +1 -0
- package/dist/src/business/shared/evaluate-primary-relation.d.ts +12 -0
- package/dist/src/business/shared/evaluate-primary-relation.d.ts.map +1 -0
- package/dist/src/business/shared/evaluate-primary-relation.js +40 -0
- package/dist/src/business/shared/evaluate-primary-relation.js.map +1 -0
- package/dist/src/business/shared/idea-layout.d.ts +55 -0
- package/dist/src/business/shared/idea-layout.d.ts.map +1 -0
- package/dist/src/business/shared/idea-layout.js +434 -0
- package/dist/src/business/shared/idea-layout.js.map +1 -0
- package/dist/src/business/shared/index.d.ts +18 -0
- package/dist/src/business/shared/index.d.ts.map +1 -0
- package/dist/src/business/shared/index.js +17 -0
- package/dist/src/business/shared/index.js.map +1 -0
- package/dist/src/business/shared/inspect-candidate.d.ts +5 -0
- package/dist/src/business/shared/inspect-candidate.d.ts.map +1 -0
- package/dist/src/business/shared/inspect-candidate.js +57 -0
- package/dist/src/business/shared/inspect-candidate.js.map +1 -0
- package/dist/src/business/shared/metadata-failure-observation.d.ts +21 -0
- package/dist/src/business/shared/metadata-failure-observation.d.ts.map +1 -0
- package/dist/src/business/shared/metadata-failure-observation.js +30 -0
- package/dist/src/business/shared/metadata-failure-observation.js.map +1 -0
- package/dist/src/business/shared/observe-device.d.ts +150 -0
- package/dist/src/business/shared/observe-device.d.ts.map +1 -0
- package/dist/src/business/shared/observe-device.js +71 -0
- package/dist/src/business/shared/observe-device.js.map +1 -0
- package/dist/src/business/shared/observe-idea.d.ts +14 -0
- package/dist/src/business/shared/observe-idea.d.ts.map +1 -0
- package/dist/src/business/shared/observe-idea.js +14 -0
- package/dist/src/business/shared/observe-idea.js.map +1 -0
- package/dist/src/business/shared/observe-project.d.ts +39 -0
- package/dist/src/business/shared/observe-project.d.ts.map +1 -0
- package/dist/src/business/shared/observe-project.js +11 -0
- package/dist/src/business/shared/observe-project.js.map +1 -0
- package/dist/src/business/shared/observe-snapshot.d.ts +35 -0
- package/dist/src/business/shared/observe-snapshot.d.ts.map +1 -0
- package/dist/src/business/shared/observe-snapshot.js +518 -0
- package/dist/src/business/shared/observe-snapshot.js.map +1 -0
- package/dist/src/business/shared/read-idea-inventory-item.d.ts +13 -0
- package/dist/src/business/shared/read-idea-inventory-item.d.ts.map +1 -0
- package/dist/src/business/shared/read-idea-inventory-item.js +18 -0
- package/dist/src/business/shared/read-idea-inventory-item.js.map +1 -0
- package/dist/src/business/shared/resolve-idea.d.ts +7 -0
- package/dist/src/business/shared/resolve-idea.d.ts.map +1 -0
- package/dist/src/business/shared/resolve-idea.js +14 -0
- package/dist/src/business/shared/resolve-idea.js.map +1 -0
- package/dist/src/business/shared/with-observation-language.d.ts +3 -0
- package/dist/src/business/shared/with-observation-language.d.ts.map +1 -0
- package/dist/src/business/shared/with-observation-language.js +20 -0
- package/dist/src/business/shared/with-observation-language.js.map +1 -0
- package/dist/src/business/whats-next.d.ts +94 -0
- package/dist/src/business/whats-next.d.ts.map +1 -0
- package/dist/src/business/whats-next.js +208 -0
- package/dist/src/business/whats-next.js.map +1 -0
- package/dist/src/foundation/command-message/index.d.ts +3 -0
- package/dist/src/foundation/command-message/index.d.ts.map +1 -0
- package/dist/src/foundation/command-message/index.js +3 -0
- package/dist/src/foundation/command-message/index.js.map +1 -0
- package/dist/src/foundation/command-message/observation.d.ts +223 -0
- package/dist/src/foundation/command-message/observation.d.ts.map +1 -0
- package/dist/src/foundation/command-message/observation.js +364 -0
- package/dist/src/foundation/command-message/observation.js.map +1 -0
- package/dist/src/foundation/command-message/runtime.d.ts +214 -0
- package/dist/src/foundation/command-message/runtime.d.ts.map +1 -0
- package/dist/src/foundation/command-message/runtime.js +215 -0
- package/dist/src/foundation/command-message/runtime.js.map +1 -0
- package/dist/src/foundation/coordinates/index.d.ts +3 -0
- package/dist/src/foundation/coordinates/index.d.ts.map +1 -0
- package/dist/src/foundation/coordinates/index.js +3 -0
- package/dist/src/foundation/coordinates/index.js.map +1 -0
- package/dist/src/foundation/coordinates/layout.d.ts +27 -0
- package/dist/src/foundation/coordinates/layout.d.ts.map +1 -0
- package/dist/src/foundation/coordinates/layout.js +41 -0
- package/dist/src/foundation/coordinates/layout.js.map +1 -0
- package/dist/src/foundation/coordinates/repository.d.ts +16 -0
- package/dist/src/foundation/coordinates/repository.d.ts.map +1 -0
- package/dist/src/foundation/coordinates/repository.js +75 -0
- package/dist/src/foundation/coordinates/repository.js.map +1 -0
- package/dist/src/foundation/device-config/index.d.ts +2 -0
- package/dist/src/foundation/device-config/index.d.ts.map +1 -0
- package/dist/src/foundation/device-config/index.js +2 -0
- package/dist/src/foundation/device-config/index.js.map +1 -0
- package/dist/src/foundation/device-config/user-config.d.ts +19 -0
- package/dist/src/foundation/device-config/user-config.d.ts.map +1 -0
- package/dist/src/foundation/device-config/user-config.js +94 -0
- package/dist/src/foundation/device-config/user-config.js.map +1 -0
- package/dist/src/foundation/event-codec/grammar.d.ts +172 -0
- package/dist/src/foundation/event-codec/grammar.d.ts.map +1 -0
- package/dist/src/foundation/event-codec/grammar.js +383 -0
- package/dist/src/foundation/event-codec/grammar.js.map +1 -0
- package/dist/src/foundation/event-codec/index.d.ts +3 -0
- package/dist/src/foundation/event-codec/index.d.ts.map +1 -0
- package/dist/src/foundation/event-codec/index.js +2 -0
- package/dist/src/foundation/event-codec/index.js.map +1 -0
- package/dist/src/foundation/event-cursor/cursor.d.ts +40 -0
- package/dist/src/foundation/event-cursor/cursor.d.ts.map +1 -0
- package/dist/src/foundation/event-cursor/cursor.js +42 -0
- package/dist/src/foundation/event-cursor/cursor.js.map +1 -0
- package/dist/src/foundation/event-cursor/index.d.ts +2 -0
- package/dist/src/foundation/event-cursor/index.d.ts.map +1 -0
- package/dist/src/foundation/event-cursor/index.js +2 -0
- package/dist/src/foundation/event-cursor/index.js.map +1 -0
- package/dist/src/foundation/event-history/digest.d.ts +2 -0
- package/dist/src/foundation/event-history/digest.d.ts.map +1 -0
- package/dist/src/foundation/event-history/digest.js +2 -0
- package/dist/src/foundation/event-history/digest.js.map +1 -0
- package/dist/src/foundation/event-history/history.d.ts +86 -0
- package/dist/src/foundation/event-history/history.d.ts.map +1 -0
- package/dist/src/foundation/event-history/history.js +481 -0
- package/dist/src/foundation/event-history/history.js.map +1 -0
- package/dist/src/foundation/event-history/index.d.ts +3 -0
- package/dist/src/foundation/event-history/index.d.ts.map +1 -0
- package/dist/src/foundation/event-history/index.js +3 -0
- package/dist/src/foundation/event-history/index.js.map +1 -0
- package/dist/src/foundation/event-reducer/index.d.ts +2 -0
- package/dist/src/foundation/event-reducer/index.d.ts.map +1 -0
- package/dist/src/foundation/event-reducer/index.js +2 -0
- package/dist/src/foundation/event-reducer/index.js.map +1 -0
- package/dist/src/foundation/event-reducer/policy.d.ts +69 -0
- package/dist/src/foundation/event-reducer/policy.d.ts.map +1 -0
- package/dist/src/foundation/event-reducer/policy.js +138 -0
- package/dist/src/foundation/event-reducer/policy.js.map +1 -0
- package/dist/src/foundation/event-store/digest.d.ts +11 -0
- package/dist/src/foundation/event-store/digest.d.ts.map +1 -0
- package/dist/src/foundation/event-store/digest.js +38 -0
- package/dist/src/foundation/event-store/digest.js.map +1 -0
- package/dist/src/foundation/event-store/index.d.ts +3 -0
- package/dist/src/foundation/event-store/index.d.ts.map +1 -0
- package/dist/src/foundation/event-store/index.js +3 -0
- package/dist/src/foundation/event-store/index.js.map +1 -0
- package/dist/src/foundation/event-store/storage.d.ts +50 -0
- package/dist/src/foundation/event-store/storage.d.ts.map +1 -0
- package/dist/src/foundation/event-store/storage.js +109 -0
- package/dist/src/foundation/event-store/storage.js.map +1 -0
- package/dist/src/foundation/git/derived-cache.d.ts +5 -0
- package/dist/src/foundation/git/derived-cache.d.ts.map +1 -0
- package/dist/src/foundation/git/derived-cache.js +117 -0
- package/dist/src/foundation/git/derived-cache.js.map +1 -0
- package/dist/src/foundation/git/git.d.ts +100 -0
- package/dist/src/foundation/git/git.d.ts.map +1 -0
- package/dist/src/foundation/git/git.js +677 -0
- package/dist/src/foundation/git/git.js.map +1 -0
- package/dist/src/foundation/git/index.d.ts +3 -0
- package/dist/src/foundation/git/index.d.ts.map +1 -0
- package/dist/src/foundation/git/index.js +3 -0
- package/dist/src/foundation/git/index.js.map +1 -0
- package/dist/src/foundation/guidance/guidance.d.ts +36 -0
- package/dist/src/foundation/guidance/guidance.d.ts.map +1 -0
- package/dist/src/foundation/guidance/guidance.js +198 -0
- package/dist/src/foundation/guidance/guidance.js.map +1 -0
- package/dist/src/foundation/guidance/index.d.ts +3 -0
- package/dist/src/foundation/guidance/index.d.ts.map +1 -0
- package/dist/src/foundation/guidance/index.js +3 -0
- package/dist/src/foundation/guidance/index.js.map +1 -0
- package/dist/src/foundation/guidance/rules.d.ts +36 -0
- package/dist/src/foundation/guidance/rules.d.ts.map +1 -0
- package/dist/src/foundation/guidance/rules.js +65 -0
- package/dist/src/foundation/guidance/rules.js.map +1 -0
- package/dist/src/foundation/idea-model/index.d.ts +3 -0
- package/dist/src/foundation/idea-model/index.d.ts.map +1 -0
- package/dist/src/foundation/idea-model/index.js +3 -0
- package/dist/src/foundation/idea-model/index.js.map +1 -0
- package/dist/src/foundation/idea-model/status.d.ts +28 -0
- package/dist/src/foundation/idea-model/status.d.ts.map +1 -0
- package/dist/src/foundation/idea-model/status.js +192 -0
- package/dist/src/foundation/idea-model/status.js.map +1 -0
- package/dist/src/foundation/idea-model/ulid.d.ts +6 -0
- package/dist/src/foundation/idea-model/ulid.d.ts.map +1 -0
- package/dist/src/foundation/idea-model/ulid.js +16 -0
- package/dist/src/foundation/idea-model/ulid.js.map +1 -0
- package/dist/src/foundation/idea-query/index.d.ts +3 -0
- package/dist/src/foundation/idea-query/index.d.ts.map +1 -0
- package/dist/src/foundation/idea-query/index.js +3 -0
- package/dist/src/foundation/idea-query/index.js.map +1 -0
- package/dist/src/foundation/idea-query/query.d.ts +13 -0
- package/dist/src/foundation/idea-query/query.d.ts.map +1 -0
- package/dist/src/foundation/idea-query/query.js +17 -0
- package/dist/src/foundation/idea-query/query.js.map +1 -0
- package/dist/src/foundation/idea-query/rules.d.ts +55 -0
- package/dist/src/foundation/idea-query/rules.d.ts.map +1 -0
- package/dist/src/foundation/idea-query/rules.js +223 -0
- package/dist/src/foundation/idea-query/rules.js.map +1 -0
- package/dist/src/foundation/idea-template/index.d.ts +2 -0
- package/dist/src/foundation/idea-template/index.d.ts.map +1 -0
- package/dist/src/foundation/idea-template/index.js +2 -0
- package/dist/src/foundation/idea-template/index.js.map +1 -0
- package/dist/src/foundation/idea-template/templates.d.ts +21 -0
- package/dist/src/foundation/idea-template/templates.d.ts.map +1 -0
- package/dist/src/foundation/idea-template/templates.js +265 -0
- package/dist/src/foundation/idea-template/templates.js.map +1 -0
- package/dist/src/foundation/installation/device-readiness.d.ts +94 -0
- package/dist/src/foundation/installation/device-readiness.d.ts.map +1 -0
- package/dist/src/foundation/installation/device-readiness.js +274 -0
- package/dist/src/foundation/installation/device-readiness.js.map +1 -0
- package/dist/src/foundation/installation/index.d.ts +4 -0
- package/dist/src/foundation/installation/index.d.ts.map +1 -0
- package/dist/src/foundation/installation/index.js +4 -0
- package/dist/src/foundation/installation/index.js.map +1 -0
- package/dist/src/foundation/installation/installation.d.ts +25 -0
- package/dist/src/foundation/installation/installation.d.ts.map +1 -0
- package/dist/src/foundation/installation/installation.js +125 -0
- package/dist/src/foundation/installation/installation.js.map +1 -0
- package/dist/src/foundation/installation/rules.d.ts +12 -0
- package/dist/src/foundation/installation/rules.d.ts.map +1 -0
- package/dist/src/foundation/installation/rules.js +63 -0
- package/dist/src/foundation/installation/rules.js.map +1 -0
- package/dist/src/foundation/language/index.d.ts +3 -0
- package/dist/src/foundation/language/index.d.ts.map +1 -0
- package/dist/src/foundation/language/index.js +2 -0
- package/dist/src/foundation/language/index.js.map +1 -0
- package/dist/src/foundation/language/language.d.ts +36 -0
- package/dist/src/foundation/language/language.d.ts.map +1 -0
- package/dist/src/foundation/language/language.js +94 -0
- package/dist/src/foundation/language/language.js.map +1 -0
- package/dist/src/foundation/owned-write/index.d.ts +2 -0
- package/dist/src/foundation/owned-write/index.d.ts.map +1 -0
- package/dist/src/foundation/owned-write/index.js +2 -0
- package/dist/src/foundation/owned-write/index.js.map +1 -0
- package/dist/src/foundation/owned-write/writer.d.ts +86 -0
- package/dist/src/foundation/owned-write/writer.d.ts.map +1 -0
- package/dist/src/foundation/owned-write/writer.js +244 -0
- package/dist/src/foundation/owned-write/writer.js.map +1 -0
- package/dist/src/foundation/package-resource/index.d.ts +2 -0
- package/dist/src/foundation/package-resource/index.d.ts.map +1 -0
- package/dist/src/foundation/package-resource/index.js +2 -0
- package/dist/src/foundation/package-resource/index.js.map +1 -0
- package/dist/src/foundation/package-resource/npm-tarball.d.ts +15 -0
- package/dist/src/foundation/package-resource/npm-tarball.d.ts.map +1 -0
- package/dist/src/foundation/package-resource/npm-tarball.js +124 -0
- package/dist/src/foundation/package-resource/npm-tarball.js.map +1 -0
- package/dist/src/foundation/process/index.d.ts +3 -0
- package/dist/src/foundation/process/index.d.ts.map +1 -0
- package/dist/src/foundation/process/index.js +3 -0
- package/dist/src/foundation/process/index.js.map +1 -0
- package/dist/src/foundation/process/npm-command.d.ts +9 -0
- package/dist/src/foundation/process/npm-command.d.ts.map +1 -0
- package/dist/src/foundation/process/npm-command.js +11 -0
- package/dist/src/foundation/process/npm-command.js.map +1 -0
- package/dist/src/foundation/process/subprocess.d.ts +8 -0
- package/dist/src/foundation/process/subprocess.d.ts.map +1 -0
- package/dist/src/foundation/process/subprocess.js +12 -0
- package/dist/src/foundation/process/subprocess.js.map +1 -0
- package/dist/src/foundation/project-config/config.d.ts +30 -0
- package/dist/src/foundation/project-config/config.d.ts.map +1 -0
- package/dist/src/foundation/project-config/config.js +112 -0
- package/dist/src/foundation/project-config/config.js.map +1 -0
- package/dist/src/foundation/project-config/index.d.ts +3 -0
- package/dist/src/foundation/project-config/index.d.ts.map +1 -0
- package/dist/src/foundation/project-config/index.js +3 -0
- package/dist/src/foundation/project-config/index.js.map +1 -0
- package/dist/src/foundation/project-config/rules.d.ts +32 -0
- package/dist/src/foundation/project-config/rules.d.ts.map +1 -0
- package/dist/src/foundation/project-config/rules.js +119 -0
- package/dist/src/foundation/project-config/rules.js.map +1 -0
- package/dist/src/foundation/projection-cache/index.d.ts +2 -0
- package/dist/src/foundation/projection-cache/index.d.ts.map +1 -0
- package/dist/src/foundation/projection-cache/index.js +2 -0
- package/dist/src/foundation/projection-cache/index.js.map +1 -0
- package/dist/src/foundation/projection-cache/projection.d.ts +36 -0
- package/dist/src/foundation/projection-cache/projection.d.ts.map +1 -0
- package/dist/src/foundation/projection-cache/projection.js +105 -0
- package/dist/src/foundation/projection-cache/projection.js.map +1 -0
- package/dist/src/foundation/renderer/index.d.ts +3 -0
- package/dist/src/foundation/renderer/index.d.ts.map +1 -0
- package/dist/src/foundation/renderer/index.js +3 -0
- package/dist/src/foundation/renderer/index.js.map +1 -0
- package/dist/src/foundation/renderer/markdown.d.ts +7 -0
- package/dist/src/foundation/renderer/markdown.d.ts.map +1 -0
- package/dist/src/foundation/renderer/markdown.js +355 -0
- package/dist/src/foundation/renderer/markdown.js.map +1 -0
- package/dist/src/foundation/renderer/render.d.ts +6 -0
- package/dist/src/foundation/renderer/render.d.ts.map +1 -0
- package/dist/src/foundation/renderer/render.js +23 -0
- package/dist/src/foundation/renderer/render.js.map +1 -0
- package/dist/src/foundation/report/dialogue.d.ts +37 -0
- package/dist/src/foundation/report/dialogue.d.ts.map +1 -0
- package/dist/src/foundation/report/dialogue.js +59 -0
- package/dist/src/foundation/report/dialogue.js.map +1 -0
- package/dist/src/foundation/report/index.d.ts +6 -0
- package/dist/src/foundation/report/index.d.ts.map +1 -0
- package/dist/src/foundation/report/index.js +6 -0
- package/dist/src/foundation/report/index.js.map +1 -0
- package/dist/src/foundation/report/instructions.d.ts +77 -0
- package/dist/src/foundation/report/instructions.d.ts.map +1 -0
- package/dist/src/foundation/report/instructions.js +374 -0
- package/dist/src/foundation/report/instructions.js.map +1 -0
- package/dist/src/foundation/report/observation.d.ts +31 -0
- package/dist/src/foundation/report/observation.d.ts.map +1 -0
- package/dist/src/foundation/report/observation.js +83 -0
- package/dist/src/foundation/report/observation.js.map +1 -0
- package/dist/src/foundation/report/projection.d.ts +7 -0
- package/dist/src/foundation/report/projection.d.ts.map +1 -0
- package/dist/src/foundation/report/projection.js +199 -0
- package/dist/src/foundation/report/projection.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/contract.d.ts +148 -0
- package/dist/src/foundation/report/templates/whats-next/contract.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/contract.js +34 -0
- package/dist/src/foundation/report/templates/whats-next/contract.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/content-language.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/content-language.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/content-language.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/content-language.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/detached-head.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/detached-head.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/detached-head.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/detached-head.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/event-history-invalid.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/event-history-invalid.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/event-history-invalid.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/event-history-invalid.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/head-missing.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/head-missing.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/head-missing.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/head-missing.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-metadata-unavailable.d.ts +12 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-metadata-unavailable.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-metadata-unavailable.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-metadata-unavailable.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-not-found.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-not-found.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-not-found.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/idea-not-found.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/index.d.ts +63 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/index.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/index.js +63 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/index.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-deploying.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-deploying.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-deploying.js +13 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-deploying.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-implementing.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-implementing.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-implementing.js +13 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-implementing.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-inactive.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-inactive.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-inactive.js +11 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-inactive.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-preparing.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-preparing.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-preparing.js +13 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-preparing.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/navigation-ready.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/navigation-ready.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/navigation-ready.js +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/navigation-ready.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/phase-guidance-invalid.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/phase-guidance-invalid.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/phase-guidance-invalid.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/phase-guidance-invalid.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/preparation-seed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/preparation-seed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/preparation-seed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/preparation-seed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ahead.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ahead.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ahead.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ahead.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ancestry-inspection-failed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ancestry-inspection-failed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ancestry-inspection-failed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-ancestry-inspection-failed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-behind.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-behind.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-behind.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-behind.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-diverged.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-diverged.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-diverged.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-diverged.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-fetch-failed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-fetch-failed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-fetch-failed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-fetch-failed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-history-incomplete.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-history-incomplete.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-history-incomplete.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-history-incomplete.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-upstream-mismatch.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-upstream-mismatch.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-upstream-mismatch.js +11 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/primary-upstream-mismatch.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/project-recheck.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/project-recheck.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/project-recheck.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/project-recheck.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/repository-recheck.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/repository-recheck.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/repository-recheck.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/repository-recheck.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation-instruction.d.ts +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation-instruction.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation-instruction.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation-instruction.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation.js +39 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-changes-step.d.ts +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-changes-step.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-changes-step.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-changes-step.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflict-step.d.ts +8 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflict-step.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflict-step.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflict-step.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflicts.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflicts.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflicts.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflicts.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-inspection-failed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-inspection-failed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-inspection-failed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-inspection-failed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-summary.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-summary.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-summary.js +12 -0
- package/dist/src/foundation/report/templates/whats-next/en-US/worktree-summary.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/index.d.ts +5 -0
- package/dist/src/foundation/report/templates/whats-next/index.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/index.js +4 -0
- package/dist/src/foundation/report/templates/whats-next/index.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/registry.d.ts +4 -0
- package/dist/src/foundation/report/templates/whats-next/registry.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/registry.js +14 -0
- package/dist/src/foundation/report/templates/whats-next/registry.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/renderers.d.ts +63 -0
- package/dist/src/foundation/report/templates/whats-next/renderers.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/renderers.js +176 -0
- package/dist/src/foundation/report/templates/whats-next/renderers.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/content-language.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/content-language.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/content-language.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/content-language.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/detached-head.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/detached-head.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/detached-head.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/detached-head.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/event-history-invalid.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/event-history-invalid.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/event-history-invalid.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/event-history-invalid.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/head-missing.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/head-missing.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/head-missing.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/head-missing.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-metadata-unavailable.d.ts +12 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-metadata-unavailable.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-metadata-unavailable.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-metadata-unavailable.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-not-found.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-not-found.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-not-found.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-not-found.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/index.d.ts +63 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/index.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/index.js +63 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/index.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-deploying.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-deploying.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-deploying.js +13 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-deploying.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-implementing.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-implementing.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-implementing.js +13 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-implementing.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-inactive.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-inactive.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-inactive.js +11 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-inactive.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-preparing.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-preparing.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-preparing.js +13 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-preparing.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/navigation-ready.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/navigation-ready.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/navigation-ready.js +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/navigation-ready.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/phase-guidance-invalid.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/phase-guidance-invalid.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/phase-guidance-invalid.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/phase-guidance-invalid.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/preparation-seed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/preparation-seed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/preparation-seed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/preparation-seed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ahead.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ahead.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ahead.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ahead.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ancestry-inspection-failed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ancestry-inspection-failed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ancestry-inspection-failed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ancestry-inspection-failed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-behind.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-behind.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-behind.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-behind.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-diverged.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-diverged.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-diverged.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-diverged.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-fetch-failed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-fetch-failed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-fetch-failed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-fetch-failed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-history-incomplete.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-history-incomplete.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-history-incomplete.js +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-history-incomplete.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-upstream-mismatch.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-upstream-mismatch.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-upstream-mismatch.js +11 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-upstream-mismatch.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/project-recheck.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/project-recheck.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/project-recheck.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/project-recheck.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/repository-recheck.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/repository-recheck.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/repository-recheck.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/repository-recheck.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation-instruction.d.ts +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation-instruction.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation-instruction.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation-instruction.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation.js +39 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-changes-step.d.ts +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-changes-step.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-changes-step.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-changes-step.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflict-step.d.ts +8 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflict-step.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflict-step.js +10 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflict-step.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflicts.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflicts.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflicts.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflicts.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-inspection-failed.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-inspection-failed.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-inspection-failed.js +5 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-inspection-failed.js.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-summary.d.ts +9 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-summary.d.ts.map +1 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-summary.js +12 -0
- package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-summary.js.map +1 -0
- package/dist/src/foundation/report/types.d.ts +321 -0
- package/dist/src/foundation/report/types.d.ts.map +1 -0
- package/dist/src/foundation/report/types.js +2 -0
- package/dist/src/foundation/report/types.js.map +1 -0
- package/dist/src/foundation/scaffold-plan/index.d.ts +2 -0
- package/dist/src/foundation/scaffold-plan/index.d.ts.map +1 -0
- package/dist/src/foundation/scaffold-plan/index.js +2 -0
- package/dist/src/foundation/scaffold-plan/index.js.map +1 -0
- package/dist/src/foundation/scaffold-plan/scaffold-plan.d.ts +11 -0
- package/dist/src/foundation/scaffold-plan/scaffold-plan.d.ts.map +1 -0
- package/dist/src/foundation/scaffold-plan/scaffold-plan.js +36 -0
- package/dist/src/foundation/scaffold-plan/scaffold-plan.js.map +1 -0
- package/dist/src/foundation/schema/index.d.ts +3 -0
- package/dist/src/foundation/schema/index.d.ts.map +1 -0
- package/dist/src/foundation/schema/index.js +3 -0
- package/dist/src/foundation/schema/index.js.map +1 -0
- package/dist/src/foundation/schema/schema.d.ts +3 -0
- package/dist/src/foundation/schema/schema.d.ts.map +1 -0
- package/dist/src/foundation/schema/schema.js +10 -0
- package/dist/src/foundation/schema/schema.js.map +1 -0
- package/dist/src/foundation/schema/yaml.d.ts +10 -0
- package/dist/src/foundation/schema/yaml.d.ts.map +1 -0
- package/dist/src/foundation/schema/yaml.js +60 -0
- package/dist/src/foundation/schema/yaml.js.map +1 -0
- package/dist/src/foundation/schema-capability/index.d.ts +6 -0
- package/dist/src/foundation/schema-capability/index.d.ts.map +1 -0
- package/dist/src/foundation/schema-capability/index.js +4 -0
- package/dist/src/foundation/schema-capability/index.js.map +1 -0
- package/dist/src/foundation/schema-capability/inspection.d.ts +38 -0
- package/dist/src/foundation/schema-capability/inspection.d.ts.map +1 -0
- package/dist/src/foundation/schema-capability/inspection.js +249 -0
- package/dist/src/foundation/schema-capability/inspection.js.map +1 -0
- package/dist/src/foundation/schema-capability/manifest.d.ts +6 -0
- package/dist/src/foundation/schema-capability/manifest.d.ts.map +1 -0
- package/dist/src/foundation/schema-capability/manifest.js +17 -0
- package/dist/src/foundation/schema-capability/manifest.js.map +1 -0
- package/dist/src/foundation/schema-capability/rules.d.ts +38 -0
- package/dist/src/foundation/schema-capability/rules.d.ts.map +1 -0
- package/dist/src/foundation/schema-capability/rules.js +297 -0
- package/dist/src/foundation/schema-capability/rules.js.map +1 -0
- package/dist/src/foundation/skill-registration/adoption.d.ts +40 -0
- package/dist/src/foundation/skill-registration/adoption.d.ts.map +1 -0
- package/dist/src/foundation/skill-registration/adoption.js +63 -0
- package/dist/src/foundation/skill-registration/adoption.js.map +1 -0
- package/dist/src/foundation/skill-registration/index.d.ts +2 -0
- package/dist/src/foundation/skill-registration/index.d.ts.map +1 -0
- package/dist/src/foundation/skill-registration/index.js +2 -0
- package/dist/src/foundation/skill-registration/index.js.map +1 -0
- package/dist/src/foundation/skill-registration/rules.d.ts +2 -0
- package/dist/src/foundation/skill-registration/rules.d.ts.map +1 -0
- package/dist/src/foundation/skill-registration/rules.js +2 -0
- package/dist/src/foundation/skill-registration/rules.js.map +1 -0
- package/dist/src/foundation/snapshot/git-snapshot.d.ts +40 -0
- package/dist/src/foundation/snapshot/git-snapshot.d.ts.map +1 -0
- package/dist/src/foundation/snapshot/git-snapshot.js +168 -0
- package/dist/src/foundation/snapshot/git-snapshot.js.map +1 -0
- package/dist/src/foundation/snapshot/index.d.ts +2 -0
- package/dist/src/foundation/snapshot/index.d.ts.map +1 -0
- package/dist/src/foundation/snapshot/index.js +2 -0
- package/dist/src/foundation/snapshot/index.js.map +1 -0
- package/dist/src/foundation/state-transaction/index.d.ts +2 -0
- package/dist/src/foundation/state-transaction/index.d.ts.map +1 -0
- package/dist/src/foundation/state-transaction/index.js +2 -0
- package/dist/src/foundation/state-transaction/index.js.map +1 -0
- package/dist/src/foundation/state-transaction/state-transaction.d.ts +48 -0
- package/dist/src/foundation/state-transaction/state-transaction.d.ts.map +1 -0
- package/dist/src/foundation/state-transaction/state-transaction.js +364 -0
- package/dist/src/foundation/state-transaction/state-transaction.js.map +1 -0
- package/dist/src/foundation/terminal/index.d.ts +2 -0
- package/dist/src/foundation/terminal/index.d.ts.map +1 -0
- package/dist/src/foundation/terminal/index.js +2 -0
- package/dist/src/foundation/terminal/index.js.map +1 -0
- package/dist/src/foundation/terminal/terminal.d.ts +17 -0
- package/dist/src/foundation/terminal/terminal.d.ts.map +1 -0
- package/dist/src/foundation/terminal/terminal.js +12 -0
- package/dist/src/foundation/terminal/terminal.js.map +1 -0
- package/dist/src/foundation/trace/index.d.ts +2 -0
- package/dist/src/foundation/trace/index.d.ts.map +1 -0
- package/dist/src/foundation/trace/index.js +2 -0
- package/dist/src/foundation/trace/index.js.map +1 -0
- package/dist/src/foundation/trace/trace.d.ts +12 -0
- package/dist/src/foundation/trace/trace.d.ts.map +1 -0
- package/dist/src/foundation/trace/trace.js +299 -0
- package/dist/src/foundation/trace/trace.js.map +1 -0
- package/dist/src/foundation/tui/index.d.ts +3 -0
- package/dist/src/foundation/tui/index.d.ts.map +1 -0
- package/dist/src/foundation/tui/index.js +3 -0
- package/dist/src/foundation/tui/index.js.map +1 -0
- package/dist/src/foundation/tui/table.d.ts +10 -0
- package/dist/src/foundation/tui/table.d.ts.map +1 -0
- package/dist/src/foundation/tui/table.js +91 -0
- package/dist/src/foundation/tui/table.js.map +1 -0
- package/dist/src/foundation/tui/tui.d.ts +33 -0
- package/dist/src/foundation/tui/tui.d.ts.map +1 -0
- package/dist/src/foundation/tui/tui.js +157 -0
- package/dist/src/foundation/tui/tui.js.map +1 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +16 -0
- package/dist/src/index.js.map +1 -0
- package/docs/core-concepts.md +48 -7
- package/docs/getting-started.md +60 -45
- package/docs/maintaining.md +132 -9
- package/docs/npm-package-releases.md +38 -9
- package/docs/operations.md +109 -35
- package/docs/reference.md +304 -35
- package/docs/repository-tasks.md +61 -20
- package/package.json +53 -27
- package/schema/capabilities.json +95 -0
- package/schema/capability-manifest.schema.json +139 -0
- package/schema/v1/command-report.schema.json +4 -2
- package/schema/v1/domain-message.schema.json +2 -1
- package/schema/v2/config.schema.json +14 -0
- package/schema/v2/idea-event.schema.json +121 -0
- package/skills/silvermoon/SKILL.md +204 -112
- package/skills/silvermoon/references/adoption.md +55 -24
- package/skills/silvermoon/references/events.md +296 -0
- package/bin/silvermoon.js +0 -10
- package/src/adoption.js +0 -559
- package/src/cli.js +0 -377
- package/src/config.js +0 -253
- package/src/create-idea.js +0 -497
- package/src/dialogue.js +0 -69
- package/src/domain.js +0 -592
- package/src/git-snapshot.js +0 -212
- package/src/git.js +0 -624
- package/src/guidance.js +0 -281
- package/src/idea-layout.js +0 -411
- package/src/idea-metadata.js +0 -48
- package/src/idea-query.js +0 -230
- package/src/idea-templates.js +0 -242
- package/src/ideas.js +0 -142
- package/src/index.js +0 -386
- package/src/language.js +0 -78
- package/src/layout.js +0 -38
- package/src/list-ideas.js +0 -196
- package/src/observation.js +0 -370
- package/src/repository.js +0 -82
- package/src/response.js +0 -492
- package/src/subprocess.js +0 -27
- package/src/trace.js +0 -292
- package/src/tui-table.js +0 -71
- package/src/tui.js +0 -205
- package/src/user-config.js +0 -135
- package/src/whatsnext.js +0 -726
- package/src/yaml.js +0 -66
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { readFile, rename, writeFile } from "node:fs/promises";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4
|
+
const repositoryRoot = fileURLToPath(new URL("..", import.meta.url));
|
|
5
|
+
const repository = "shazhou-ww/silvermoon";
|
|
6
|
+
const jsDelivrRepository = `https://cdn.jsdelivr.net/gh/${repository}`;
|
|
7
|
+
const jsDelivrMainPrefix = `${jsDelivrRepository}@main/`;
|
|
8
|
+
const rawMainPrefix = `https://raw.githubusercontent.com/${repository}/main/`;
|
|
9
|
+
const fullObjectIdPattern = /^[0-9a-f]{40,64}$/i;
|
|
10
|
+
const readmeSources = new Set(["README.md", "README.zh-CN.md"]);
|
|
11
|
+
function errorMessage(error) {
|
|
12
|
+
return error instanceof Error ? error.message : String(error);
|
|
13
|
+
}
|
|
14
|
+
function validateCommit(commit) {
|
|
15
|
+
if (typeof commit !== "string" || !fullObjectIdPattern.test(commit)) {
|
|
16
|
+
throw new Error("Release commit must be a full hexadecimal Git object ID.");
|
|
17
|
+
}
|
|
18
|
+
return commit;
|
|
19
|
+
}
|
|
20
|
+
function blobUrl(commit, path, anchor = "") {
|
|
21
|
+
return `https://github.com/${repository}/blob/${commit}/${path}${anchor}`;
|
|
22
|
+
}
|
|
23
|
+
function assetUrl(commit, path) {
|
|
24
|
+
return `${jsDelivrRepository}@${commit}/${path}`;
|
|
25
|
+
}
|
|
26
|
+
function parseCanonicalRelativeReference(destination, kind, { asset = false } = {}) {
|
|
27
|
+
if (destination !== destination.trim()) {
|
|
28
|
+
throw new Error(`Relative repository ${kind} must use a canonical path: ${destination}`);
|
|
29
|
+
}
|
|
30
|
+
if (!destination.startsWith("./")) {
|
|
31
|
+
throw new Error(`Unrecognized relative repository ${kind}: ${destination}`);
|
|
32
|
+
}
|
|
33
|
+
const anchorIndex = destination.indexOf("#");
|
|
34
|
+
const pathWithPrefix = anchorIndex === -1 ? destination : destination.slice(0, anchorIndex);
|
|
35
|
+
const anchor = anchorIndex === -1 ? "" : destination.slice(anchorIndex);
|
|
36
|
+
if (pathWithPrefix.includes("?") ||
|
|
37
|
+
(asset && anchor) ||
|
|
38
|
+
!/^\.\/[A-Za-z0-9][A-Za-z0-9._/-]*$/.test(pathWithPrefix)) {
|
|
39
|
+
throw new Error(`Relative repository ${kind} must use a canonical path: ${destination}`);
|
|
40
|
+
}
|
|
41
|
+
const path = pathWithPrefix.slice(2);
|
|
42
|
+
const segments = path.split("/");
|
|
43
|
+
if (segments.some((segment) => !/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(segment) ||
|
|
44
|
+
segment === "." ||
|
|
45
|
+
segment === "..")) {
|
|
46
|
+
throw new Error(`Relative repository ${kind} must not traverse or leave the repository: ${destination}`);
|
|
47
|
+
}
|
|
48
|
+
if (asset &&
|
|
49
|
+
(!path.startsWith("assets/") ||
|
|
50
|
+
!/\.(?:avif|gif|jpe?g|png|svg|webp)$/.test(path))) {
|
|
51
|
+
throw new Error(`Unrecognized relative repository ${kind}: ${destination}`);
|
|
52
|
+
}
|
|
53
|
+
return { path, anchor };
|
|
54
|
+
}
|
|
55
|
+
function rewriteMarkdownRelativeImages(source, commit) {
|
|
56
|
+
return source.replace(/(!\[[^\]]*\]\()([^)]+)(\))/g, (match, prefix, rawDestination, suffix) => {
|
|
57
|
+
const destination = normalizeDestination(rawDestination);
|
|
58
|
+
if (!isRelativeRepositoryReference(destination))
|
|
59
|
+
return match;
|
|
60
|
+
const { path } = parseCanonicalRelativeReference(destination, "Markdown image", { asset: true });
|
|
61
|
+
return `${prefix}${assetUrl(commit, path)}${suffix}`;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function rewriteMarkdownRelativeLinks(source, commit) {
|
|
65
|
+
return source.replace(/(?<!!)(\]\()([^)]+)(\))/g, (match, prefix, rawDestination, suffix) => {
|
|
66
|
+
const destination = normalizeDestination(rawDestination);
|
|
67
|
+
if (!isRelativeRepositoryReference(destination))
|
|
68
|
+
return match;
|
|
69
|
+
const { path, anchor } = parseCanonicalRelativeReference(destination, "Markdown link");
|
|
70
|
+
return `${prefix}${blobUrl(commit, path, anchor)}${suffix}`;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function rewriteHtmlRelativeHrefs(source, commit) {
|
|
74
|
+
return source.replace(/\bhref=(["'])(.*?)\1/gi, (match, quote, destination) => {
|
|
75
|
+
if (!isRelativeRepositoryReference(destination.trim()))
|
|
76
|
+
return match;
|
|
77
|
+
const { path, anchor } = parseCanonicalRelativeReference(destination, "HTML href");
|
|
78
|
+
return `href=${quote}${blobUrl(commit, path, anchor)}${quote}`;
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function rewriteHtmlRelativeSources(source, commit) {
|
|
82
|
+
return source.replace(/\bsrc=(["'])(.*?)\1/gi, (match, quote, destination) => {
|
|
83
|
+
if (!isRelativeRepositoryReference(destination.trim()))
|
|
84
|
+
return match;
|
|
85
|
+
const { path } = parseCanonicalRelativeReference(destination, "HTML resource", { asset: true });
|
|
86
|
+
return `src=${quote}${assetUrl(commit, path)}${quote}`;
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function stripMarkdownLinkTitle(destination) {
|
|
90
|
+
const titled = /^(.*?)\s+(?:"[^"]*"|'[^']*')$/.exec(destination);
|
|
91
|
+
return titled?.[1] ?? destination;
|
|
92
|
+
}
|
|
93
|
+
function normalizeDestination(destination) {
|
|
94
|
+
const normalized = stripMarkdownLinkTitle(destination.trim());
|
|
95
|
+
if (normalized.startsWith("<") && normalized.endsWith(">")) {
|
|
96
|
+
return normalized.slice(1, -1);
|
|
97
|
+
}
|
|
98
|
+
return normalized;
|
|
99
|
+
}
|
|
100
|
+
function isRelativeRepositoryReference(destination) {
|
|
101
|
+
return (!/^[a-z][a-z0-9+.-]*:/i.test(destination) &&
|
|
102
|
+
!destination.startsWith("#") &&
|
|
103
|
+
!destination.startsWith("//"));
|
|
104
|
+
}
|
|
105
|
+
function assertFullObjectId(reference, kind) {
|
|
106
|
+
if (!fullObjectIdPattern.test(reference ?? "")) {
|
|
107
|
+
throw new Error(`${kind} must use a full Git object ID; refusing movable reference ${reference ?? "(missing)"}.`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function assertImmutableHostedRefs(source, releaseCommit) {
|
|
111
|
+
const jsDelivrPattern = /https:\/\/cdn\.jsdelivr\.net\/gh\/([^/\s@"'<>]+)\/([^/@\s)"'<>]+)(?:@([^/\s)"'<>]+))?(?=\/|[\s)"'<>]|$)/gi;
|
|
112
|
+
for (const match of source.matchAll(jsDelivrPattern)) {
|
|
113
|
+
const referencedRepository = `${match[1]}/${match[2]}`;
|
|
114
|
+
const reference = match[3];
|
|
115
|
+
assertFullObjectId(reference, "jsDelivr GitHub reference");
|
|
116
|
+
if (referencedRepository.toLowerCase() === repository.toLowerCase() &&
|
|
117
|
+
reference !== undefined &&
|
|
118
|
+
reference.toLowerCase() !== releaseCommit.toLowerCase()) {
|
|
119
|
+
throw new Error(`Silvermoon jsDelivr reference must use release commit ${releaseCommit}.`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
const rawGitHubPattern = /https:\/\/raw\.githubusercontent\.com\/([^/\s"'<>]+)\/([^/\s"'<>]+)\/([^/\s)"'<>]+)(?=\/)/gi;
|
|
123
|
+
for (const match of source.matchAll(rawGitHubPattern)) {
|
|
124
|
+
assertFullObjectId(match[3], "raw.githubusercontent.com reference");
|
|
125
|
+
if (`${match[1]}/${match[2]}`.toLowerCase() === repository.toLowerCase()) {
|
|
126
|
+
throw new Error("Silvermoon raw.githubusercontent.com references must use the jsDelivr GitHub endpoint.");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const githubFilePattern = /https:\/\/github\.com\/[^/\s"'<>]+\/[^/\s"'<>]+\/(?:blob|raw|tree)\/([^/\s)"'<>]+)(?=\/)/gi;
|
|
130
|
+
for (const match of source.matchAll(githubFilePattern)) {
|
|
131
|
+
assertFullObjectId(match[1], "GitHub file reference");
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function assertNoMovableOrRelativeRefs(source, releaseCommit) {
|
|
135
|
+
assertImmutableHostedRefs(source, releaseCommit);
|
|
136
|
+
for (const match of source.matchAll(/\]\(([^)]+)\)/g)) {
|
|
137
|
+
const destination = normalizeDestination(match[1] ?? "");
|
|
138
|
+
if (isRelativeRepositoryReference(destination)) {
|
|
139
|
+
throw new Error(`Unrecognized relative repository Markdown link: ${destination}`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
for (const match of source.matchAll(/\b(?:href|src)=(["'])(.*?)\1/gi)) {
|
|
143
|
+
const destination = (match[2] ?? "").trim();
|
|
144
|
+
if (isRelativeRepositoryReference(destination)) {
|
|
145
|
+
throw new Error(`Unrecognized relative repository HTML reference: ${destination}`);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
for (const match of source.matchAll(/\b(?:href|src)\s*=\s*(?:(["'])(.*?)\1|([^\s"'=<>`]+))/gi)) {
|
|
149
|
+
const destination = (match[2] ?? match[3] ?? "").trim();
|
|
150
|
+
if (isRelativeRepositoryReference(destination)) {
|
|
151
|
+
throw new Error(`Unrecognized relative repository HTML reference: ${destination}`);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
for (const match of source.matchAll(/^\s*\[[^\]]+\]:\s*(\S+)/gm)) {
|
|
155
|
+
const destination = normalizeDestination(match[1] ?? "");
|
|
156
|
+
if (isRelativeRepositoryReference(destination)) {
|
|
157
|
+
throw new Error(`Unrecognized relative repository Markdown reference: ${destination}`);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
export function generateNpmReadme({ source, commit }) {
|
|
162
|
+
const releaseCommit = validateCommit(commit);
|
|
163
|
+
if (typeof source !== "string") {
|
|
164
|
+
throw new Error("README source must be a string.");
|
|
165
|
+
}
|
|
166
|
+
if (source.trim().length === 0) {
|
|
167
|
+
throw new Error("README source is empty; refusing to generate an empty npm README.");
|
|
168
|
+
}
|
|
169
|
+
let result = source.replaceAll(jsDelivrMainPrefix, `${jsDelivrRepository}@${releaseCommit}/`);
|
|
170
|
+
result = result.replaceAll(rawMainPrefix, `${jsDelivrRepository}@${releaseCommit}/`);
|
|
171
|
+
result = rewriteMarkdownRelativeImages(result, releaseCommit);
|
|
172
|
+
result = rewriteHtmlRelativeSources(result, releaseCommit);
|
|
173
|
+
result = rewriteMarkdownRelativeLinks(result, releaseCommit);
|
|
174
|
+
result = rewriteHtmlRelativeHrefs(result, releaseCommit);
|
|
175
|
+
assertNoMovableOrRelativeRefs(result, releaseCommit);
|
|
176
|
+
if (result.trim().length === 0) {
|
|
177
|
+
throw new Error("Generated npm README is empty; refusing to publish it.");
|
|
178
|
+
}
|
|
179
|
+
return result;
|
|
180
|
+
}
|
|
181
|
+
function parseArguments(argv) {
|
|
182
|
+
const values = {};
|
|
183
|
+
for (let index = 0; index < argv.length; index += 2) {
|
|
184
|
+
const option = argv[index];
|
|
185
|
+
const value = argv[index + 1];
|
|
186
|
+
if (!option || !value || !["--commit", "--out", "--source"].includes(option)) {
|
|
187
|
+
throw new Error("Usage: node bin/generate-npm-readme.mjs --commit <sha> [--source <path>] [--out <path>]");
|
|
188
|
+
}
|
|
189
|
+
if (option === "--commit")
|
|
190
|
+
values.commit = value;
|
|
191
|
+
else if (option === "--out")
|
|
192
|
+
values.out = value;
|
|
193
|
+
else
|
|
194
|
+
values.source = value;
|
|
195
|
+
}
|
|
196
|
+
if (!values.commit) {
|
|
197
|
+
throw new Error("Usage: node bin/generate-npm-readme.mjs --commit <sha> [--source <path>] [--out <path>]");
|
|
198
|
+
}
|
|
199
|
+
return {
|
|
200
|
+
commit: values.commit,
|
|
201
|
+
...(values.out === undefined ? {} : { out: values.out }),
|
|
202
|
+
...(values.source === undefined ? {} : { source: values.source }),
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
async function main() {
|
|
206
|
+
const { commit, out, source = "README.md" } = parseArguments(process.argv.slice(2));
|
|
207
|
+
if (!readmeSources.has(source)) {
|
|
208
|
+
throw new Error(`Unsupported README source: ${source}`);
|
|
209
|
+
}
|
|
210
|
+
const sourcePath = resolve(repositoryRoot, source);
|
|
211
|
+
const sourceText = await readFile(sourcePath, "utf8");
|
|
212
|
+
const generated = generateNpmReadme({ source: sourceText, commit });
|
|
213
|
+
if (out) {
|
|
214
|
+
// Atomic write: never truncate the destination before the content exists.
|
|
215
|
+
// A shell redirect (`> README.md`) would empty the source file before this
|
|
216
|
+
// script reads it; --out exists so the release workflow cannot do that.
|
|
217
|
+
const target = resolve(out);
|
|
218
|
+
const temporary = `${target}.generated-tmp`;
|
|
219
|
+
await writeFile(temporary, generated, "utf8");
|
|
220
|
+
await rename(temporary, target);
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
process.stdout.write(generated);
|
|
224
|
+
}
|
|
225
|
+
const invokedUrl = process.argv[1] ? pathToFileURL(resolve(process.argv[1])).href : null;
|
|
226
|
+
if (invokedUrl === import.meta.url) {
|
|
227
|
+
main().catch((error) => {
|
|
228
|
+
process.stderr.write(`npm README generation failed: ${errorMessage(error)}\n`);
|
|
229
|
+
process.exitCode = 1;
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=generate-npm-readme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-npm-readme.js","sourceRoot":"","sources":["../../bin/generate-npm-readme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,cAAc,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CA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,CAAC;QAC5C,MAAM,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAC9C,MAAM,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAChC,OAAO;IACT,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACzF,IAAI,UAAU,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IACnC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;QAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/E,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-v1-to-v2.d.ts","sourceRoot":"","sources":["../../bin/migrate-v1-to-v2.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { runSchemaMigration } from "../src/business/schema-migration.js";
|
|
4
|
+
const program = new Command()
|
|
5
|
+
.name("silvermoon-migrate-v1-to-v2")
|
|
6
|
+
.description("Explicit one-time project migration; defaults to a read-only plan")
|
|
7
|
+
.option("--root <path>", "project root", process.cwd())
|
|
8
|
+
.option("--apply", "apply the exact confirmed plan")
|
|
9
|
+
.option("--expected-digest <sha256>", "digest returned by the read-only plan")
|
|
10
|
+
.option("--resume", "complete an interrupted migration")
|
|
11
|
+
.option("--rollback", "restore an interrupted migration's original files")
|
|
12
|
+
.option("--confirm-stopped", "confirm the interrupted writer has stopped");
|
|
13
|
+
try {
|
|
14
|
+
program.parse();
|
|
15
|
+
const options = program.opts();
|
|
16
|
+
if ([options.apply, options.resume, options.rollback].filter(Boolean).length > 1) {
|
|
17
|
+
throw new Error("Choose only one of --apply, --resume or --rollback.");
|
|
18
|
+
}
|
|
19
|
+
console.log(JSON.stringify(await runSchemaMigration("project-v1-to-v2", options), null, 2));
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
console.error(`ERROR migration.failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
23
|
+
process.exitCode = 1;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=migrate-v1-to-v2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-v1-to-v2.js","sourceRoot":"","sources":["../../bin/migrate-v1-to-v2.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE;KAC1B,IAAI,CAAC,6BAA6B,CAAC;KACnC,WAAW,CAAC,mEAAmE,CAAC;KAChF,MAAM,CAAC,eAAe,EAAE,cAAc,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;KACtD,MAAM,CAAC,SAAS,EAAE,gCAAgC,CAAC;KACnD,MAAM,CAAC,4BAA4B,EAAE,uCAAuC,CAAC;KAC7E,MAAM,CAAC,UAAU,EAAE,mCAAmC,CAAC;KACvD,MAAM,CAAC,YAAY,EAAE,mDAAmD,CAAC;KACzE,MAAM,CAAC,mBAAmB,EAAE,4CAA4C,CAAC,CAAC;AAE7E,IAAI,CAAC;IACH,OAAO,CAAC,KAAK,EAAE,CAAC;IAChB,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAOxB,CAAC;IACL,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACjF,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CACxB,MAAM,kBAAkB,CAAC,kBAAkB,EAAE,OAAO,CAAC,EACrD,IAAI,EACJ,CAAC,CACF,CAAC,CAAC;AACL,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,OAAO,CAAC,KAAK,CAAC,2BAA2B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACnG,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const RELEASE_PACKAGES: Readonly<{
|
|
2
|
+
silvermoon: Readonly<{
|
|
3
|
+
directory: ".";
|
|
4
|
+
packageName: "silvermoon";
|
|
5
|
+
}>;
|
|
6
|
+
}>;
|
|
7
|
+
type ReleaseKey = keyof typeof RELEASE_PACKAGES;
|
|
8
|
+
type ReleasePlan = {
|
|
9
|
+
commit: string;
|
|
10
|
+
distTag: string;
|
|
11
|
+
packageDirectory: string;
|
|
12
|
+
packageName: string;
|
|
13
|
+
releaseKey: ReleaseKey;
|
|
14
|
+
version: string;
|
|
15
|
+
};
|
|
16
|
+
type PrepareOptions = {
|
|
17
|
+
commit: string;
|
|
18
|
+
fetchImpl?: typeof fetch;
|
|
19
|
+
root?: string;
|
|
20
|
+
tag: string;
|
|
21
|
+
};
|
|
22
|
+
type PreparedPlan = ReleasePlan & {
|
|
23
|
+
publicationState: "absent" | "published";
|
|
24
|
+
};
|
|
25
|
+
export declare function parseReleaseTag(tag: unknown): {
|
|
26
|
+
releaseKey: string;
|
|
27
|
+
version: string;
|
|
28
|
+
};
|
|
29
|
+
export declare function deriveNpmDistTag(version: string): string;
|
|
30
|
+
export declare function createReleasePlan({ commit, manifest, reachableFromPrimary, releases, tag, }: {
|
|
31
|
+
commit: string;
|
|
32
|
+
manifest: unknown;
|
|
33
|
+
reachableFromPrimary: boolean;
|
|
34
|
+
releases?: typeof RELEASE_PACKAGES;
|
|
35
|
+
tag: string;
|
|
36
|
+
}): ReleasePlan;
|
|
37
|
+
export declare function observeVersionPublication({ packageName, version }: Pick<ReleasePlan, "packageName" | "version">, { fetchImpl }?: {
|
|
38
|
+
fetchImpl?: typeof fetch;
|
|
39
|
+
}): Promise<"absent" | "published">;
|
|
40
|
+
export declare function isReachableFromPrimary(commit: string, { root }?: {
|
|
41
|
+
root?: string;
|
|
42
|
+
}): boolean;
|
|
43
|
+
export declare function formatGitHubOutput(plan: PreparedPlan): string;
|
|
44
|
+
export declare function prepareNpmRelease({ commit, fetchImpl, root, tag, }: PrepareOptions): Promise<PreparedPlan>;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=prepare-npm-release.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepare-npm-release.d.ts","sourceRoot":"","sources":["../../bin/prepare-npm-release.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB;;;;;EAK3B,CAAC;AAEH,KAAK,UAAU,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAChD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AACF,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,E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AO,CAAC,YAAY,CAAC,CAoBxC"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { appendFile, readFile } from "node:fs/promises";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
|
+
import semver from "semver";
|
|
6
|
+
const repositoryRoot = fileURLToPath(new URL("..", import.meta.url));
|
|
7
|
+
const npmRegistry = "https://registry.npmjs.org";
|
|
8
|
+
export const RELEASE_PACKAGES = Object.freeze({
|
|
9
|
+
silvermoon: Object.freeze({
|
|
10
|
+
directory: ".",
|
|
11
|
+
packageName: "silvermoon",
|
|
12
|
+
}),
|
|
13
|
+
});
|
|
14
|
+
function errorMessage(error) {
|
|
15
|
+
return error instanceof Error ? error.message : String(error);
|
|
16
|
+
}
|
|
17
|
+
function isReleaseKey(value) {
|
|
18
|
+
return value === "silvermoon";
|
|
19
|
+
}
|
|
20
|
+
function validateCommit(commit) {
|
|
21
|
+
if (typeof commit !== "string" || !/^[0-9a-f]{40,64}$/i.test(commit)) {
|
|
22
|
+
throw new Error("Release commit must be a full hexadecimal Git object ID.");
|
|
23
|
+
}
|
|
24
|
+
return commit;
|
|
25
|
+
}
|
|
26
|
+
export function parseReleaseTag(tag) {
|
|
27
|
+
const match = typeof tag === "string"
|
|
28
|
+
? /^npm\/([a-z0-9](?:[a-z0-9-]*[a-z0-9])?)\/v(.+)$/.exec(tag)
|
|
29
|
+
: null;
|
|
30
|
+
if (!match) {
|
|
31
|
+
throw new Error("Release tag must match npm/<release-key>/v<semver>.");
|
|
32
|
+
}
|
|
33
|
+
const [, releaseKey, requestedVersion] = match;
|
|
34
|
+
if (!releaseKey || !requestedVersion) {
|
|
35
|
+
throw new Error("Release tag must match npm/<release-key>/v<semver>.");
|
|
36
|
+
}
|
|
37
|
+
const version = semver.valid(requestedVersion);
|
|
38
|
+
if (!version || version !== requestedVersion) {
|
|
39
|
+
throw new Error(`Release tag version is not canonical SemVer: ${requestedVersion}`);
|
|
40
|
+
}
|
|
41
|
+
return { releaseKey, version };
|
|
42
|
+
}
|
|
43
|
+
export function deriveNpmDistTag(version) {
|
|
44
|
+
const prerelease = semver.prerelease(version);
|
|
45
|
+
if (!prerelease)
|
|
46
|
+
return "latest";
|
|
47
|
+
const channel = prerelease[0];
|
|
48
|
+
if (typeof channel !== "string" || !/^[a-z][a-z0-9-]*$/i.test(channel)) {
|
|
49
|
+
throw new Error(`Prerelease ${version} must begin with a named channel such as alpha, beta, or rc.`);
|
|
50
|
+
}
|
|
51
|
+
if (channel.toLowerCase() === "latest") {
|
|
52
|
+
throw new Error("Prerelease channel must not use the latest npm dist-tag.");
|
|
53
|
+
}
|
|
54
|
+
return channel.toLowerCase();
|
|
55
|
+
}
|
|
56
|
+
export function createReleasePlan({ commit, manifest, reachableFromPrimary, releases = RELEASE_PACKAGES, tag, }) {
|
|
57
|
+
const { releaseKey, version } = parseReleaseTag(tag);
|
|
58
|
+
if (!isReleaseKey(releaseKey)) {
|
|
59
|
+
throw new Error(`Unknown npm release key: ${releaseKey}`);
|
|
60
|
+
}
|
|
61
|
+
const release = releases[releaseKey];
|
|
62
|
+
if (!release) {
|
|
63
|
+
throw new Error(`Unknown npm release key: ${releaseKey}`);
|
|
64
|
+
}
|
|
65
|
+
validateCommit(commit);
|
|
66
|
+
if (!manifest || typeof manifest !== "object" || Array.isArray(manifest)) {
|
|
67
|
+
throw new Error(`Package manifest is invalid: ${release.directory}/package.json`);
|
|
68
|
+
}
|
|
69
|
+
const manifestName = Reflect.get(manifest, "name");
|
|
70
|
+
const manifestPrivate = Reflect.get(manifest, "private");
|
|
71
|
+
const manifestVersion = Reflect.get(manifest, "version");
|
|
72
|
+
const publishConfig = Reflect.get(manifest, "publishConfig");
|
|
73
|
+
const publishConfigRecord = typeof publishConfig === "object" && publishConfig !== null
|
|
74
|
+
? publishConfig : undefined;
|
|
75
|
+
if (manifestName !== release.packageName) {
|
|
76
|
+
throw new Error(`Package name mismatch for ${releaseKey}: expected ${release.packageName}, found ${String(manifestName ?? "missing")}.`);
|
|
77
|
+
}
|
|
78
|
+
if (manifestPrivate === true) {
|
|
79
|
+
throw new Error(`Package ${String(manifestName)} is private and cannot be published.`);
|
|
80
|
+
}
|
|
81
|
+
if (manifestVersion !== version) {
|
|
82
|
+
throw new Error(`Version mismatch for ${String(manifestName)}: tag requests ${version}, manifest has ${String(manifestVersion ?? "missing")}.`);
|
|
83
|
+
}
|
|
84
|
+
const registryValue = publishConfigRecord
|
|
85
|
+
? Reflect.get(publishConfigRecord, "registry") : undefined;
|
|
86
|
+
const registry = typeof registryValue === "string"
|
|
87
|
+
? registryValue.replace(/\/$/, "") : undefined;
|
|
88
|
+
if (registry !== npmRegistry) {
|
|
89
|
+
throw new Error(`Package ${String(manifestName)} must publish to ${npmRegistry}.`);
|
|
90
|
+
}
|
|
91
|
+
if (!publishConfigRecord || Reflect.get(publishConfigRecord, "access") !== "public") {
|
|
92
|
+
throw new Error(`Package ${String(manifestName)} must set publishConfig.access to public.`);
|
|
93
|
+
}
|
|
94
|
+
if (reachableFromPrimary !== true) {
|
|
95
|
+
throw new Error(`Release commit ${commit} is not reachable from origin/main.`);
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
commit,
|
|
99
|
+
distTag: deriveNpmDistTag(version),
|
|
100
|
+
packageDirectory: release.directory,
|
|
101
|
+
packageName: release.packageName,
|
|
102
|
+
releaseKey,
|
|
103
|
+
version,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export async function observeVersionPublication({ packageName, version }, { fetchImpl = globalThis.fetch } = {}) {
|
|
107
|
+
let response;
|
|
108
|
+
try {
|
|
109
|
+
response = await fetchImpl(`${npmRegistry}/${encodeURIComponent(packageName)}`, {
|
|
110
|
+
headers: { accept: "application/vnd.npm.install-v1+json" },
|
|
111
|
+
signal: AbortSignal.timeout(15_000),
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
throw new Error(`Could not verify ${packageName}@${version} on npm: ${errorMessage(error)}`);
|
|
116
|
+
}
|
|
117
|
+
if (response.status === 404)
|
|
118
|
+
return "absent";
|
|
119
|
+
if (!response.ok) {
|
|
120
|
+
throw new Error(`Could not verify ${packageName}@${version} on npm: registry returned ${response.status}.`);
|
|
121
|
+
}
|
|
122
|
+
let metadata;
|
|
123
|
+
try {
|
|
124
|
+
metadata = await response.json();
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
throw new Error(`Could not parse npm metadata for ${packageName}: ${errorMessage(error)}`);
|
|
128
|
+
}
|
|
129
|
+
const versions = typeof metadata === "object" && metadata !== null
|
|
130
|
+
? Reflect.get(metadata, "versions") : undefined;
|
|
131
|
+
if (!versions || typeof versions !== "object") {
|
|
132
|
+
throw new Error(`npm metadata for ${packageName} does not contain a versions object.`);
|
|
133
|
+
}
|
|
134
|
+
return Object.hasOwn(versions, version) ? "published" : "absent";
|
|
135
|
+
}
|
|
136
|
+
export function isReachableFromPrimary(commit, { root = repositoryRoot } = {}) {
|
|
137
|
+
validateCommit(commit);
|
|
138
|
+
const result = spawnSync("git", ["merge-base", "--is-ancestor", commit, "origin/main"], {
|
|
139
|
+
cwd: root,
|
|
140
|
+
encoding: "utf8",
|
|
141
|
+
windowsHide: true,
|
|
142
|
+
});
|
|
143
|
+
if (result.status === 0)
|
|
144
|
+
return true;
|
|
145
|
+
if (result.status === 1)
|
|
146
|
+
return false;
|
|
147
|
+
throw new Error(`Could not verify origin/main reachability: ${result.stderr || result.error?.message || "git failed"}`);
|
|
148
|
+
}
|
|
149
|
+
export function formatGitHubOutput(plan) {
|
|
150
|
+
return [
|
|
151
|
+
`release_key=${plan.releaseKey}`,
|
|
152
|
+
`package_name=${plan.packageName}`,
|
|
153
|
+
`package_directory=${plan.packageDirectory}`,
|
|
154
|
+
`version=${plan.version}`,
|
|
155
|
+
`dist_tag=${plan.distTag}`,
|
|
156
|
+
`publication_state=${plan.publicationState}`,
|
|
157
|
+
].join("\n");
|
|
158
|
+
}
|
|
159
|
+
function parseArguments(argv) {
|
|
160
|
+
const values = {};
|
|
161
|
+
for (let index = 0; index < argv.length; index += 2) {
|
|
162
|
+
const option = argv[index];
|
|
163
|
+
const value = argv[index + 1];
|
|
164
|
+
if (!option || !value || !["--commit", "--tag"].includes(option)) {
|
|
165
|
+
throw new Error("Usage: node bin/prepare-npm-release.mjs --tag <tag> --commit <sha>");
|
|
166
|
+
}
|
|
167
|
+
if (option === "--commit")
|
|
168
|
+
values.commit = value;
|
|
169
|
+
else
|
|
170
|
+
values.tag = value;
|
|
171
|
+
}
|
|
172
|
+
if (!values.commit || !values.tag) {
|
|
173
|
+
throw new Error("Usage: node bin/prepare-npm-release.mjs --tag <tag> --commit <sha>");
|
|
174
|
+
}
|
|
175
|
+
return { commit: values.commit, tag: values.tag };
|
|
176
|
+
}
|
|
177
|
+
export async function prepareNpmRelease({ commit, fetchImpl, root = repositoryRoot, tag, }) {
|
|
178
|
+
const parsed = parseReleaseTag(tag);
|
|
179
|
+
if (!isReleaseKey(parsed.releaseKey)) {
|
|
180
|
+
throw new Error(`Unknown npm release key: ${parsed.releaseKey}`);
|
|
181
|
+
}
|
|
182
|
+
const release = RELEASE_PACKAGES[parsed.releaseKey];
|
|
183
|
+
const manifestPath = resolve(root, release.directory, "package.json");
|
|
184
|
+
const manifest = JSON.parse(await readFile(manifestPath, "utf8"));
|
|
185
|
+
const plan = createReleasePlan({
|
|
186
|
+
commit,
|
|
187
|
+
manifest,
|
|
188
|
+
reachableFromPrimary: isReachableFromPrimary(commit, { root }),
|
|
189
|
+
tag,
|
|
190
|
+
});
|
|
191
|
+
const publicationState = await observeVersionPublication(plan, fetchImpl === undefined ? {} : { fetchImpl });
|
|
192
|
+
return { ...plan, publicationState };
|
|
193
|
+
}
|
|
194
|
+
async function main() {
|
|
195
|
+
const { commit, tag } = parseArguments(process.argv.slice(2));
|
|
196
|
+
const plan = await prepareNpmRelease({ commit, tag });
|
|
197
|
+
const output = formatGitHubOutput(plan);
|
|
198
|
+
if (process.env.GITHUB_OUTPUT) {
|
|
199
|
+
await appendFile(process.env.GITHUB_OUTPUT, `${output}\n`, "utf8");
|
|
200
|
+
}
|
|
201
|
+
process.stdout.write(`${JSON.stringify(plan)}\n`);
|
|
202
|
+
}
|
|
203
|
+
const invokedUrl = process.argv[1] ? pathToFileURL(resolve(process.argv[1])).href : null;
|
|
204
|
+
if (invokedUrl === import.meta.url) {
|
|
205
|
+
main().catch((error) => {
|
|
206
|
+
process.stderr.write(`Release validation failed: ${errorMessage(error)}\n`);
|
|
207
|
+
process.exitCode = 1;
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=prepare-npm-release.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepare-npm-release.js","sourceRoot":"","sources":["../../bin/prepare-npm-release.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,cAAc,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,MAAM,WAAW,GAAG,4BAA4B,CAAC;AAEjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC;QACxB,SAAS,EAAE,GAAG;QACd,WAAW,EAAE,YAAY;KAC1B,CAAC;CACH,CAAC,CAAC;AAmBH,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,KAAK,YAAY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,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9D,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IACtD,MAAM,MAAM,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACxC,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;QAC9B,MAAM,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,GAAG,MAAM,IAAI,EAAE,MAAM,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACzF,IAAI,UAAU,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IACnC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;QAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC5E,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const RULE_MODULES: readonly string[];
|
|
2
|
+
type PureProblem = {
|
|
3
|
+
path: string;
|
|
4
|
+
line: number;
|
|
5
|
+
message: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function inspectPureSources(sources: ReadonlyMap<string, string> | Iterable<readonly [string, string]>, { ruleModules }?: {
|
|
8
|
+
ruleModules?: readonly string[];
|
|
9
|
+
}): {
|
|
10
|
+
count: number;
|
|
11
|
+
problems: PureProblem[];
|
|
12
|
+
};
|
|
13
|
+
export declare function loadJavaScriptSources(root: string): Promise<Map<string, string>>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=pure-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pure-check.d.ts","sourceRoot":"","sources":["../../bin/pure-check.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,mBASvB,CAAC;AA+DH,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAyCnE,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC1E,EAAE,WAA0B,EAAE,GAAE;IAAE,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAO,GACvE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,WAAW,EAAE,CAAA;CAAE,CAmS5C;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAStF"}
|