@shrkcrft/inspector 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/acceptance-replay.d.ts +63 -0
- package/dist/acceptance-replay.d.ts.map +1 -0
- package/dist/acceptance-replay.js +240 -0
- package/dist/action-hint-diagnostics.d.ts +32 -0
- package/dist/action-hint-diagnostics.d.ts.map +1 -0
- package/dist/action-hint-diagnostics.js +133 -0
- package/dist/adoption-check.d.ts +28 -0
- package/dist/adoption-check.d.ts.map +1 -0
- package/dist/adoption-check.js +181 -0
- package/dist/adoption-checkpoint.d.ts +97 -0
- package/dist/adoption-checkpoint.d.ts.map +1 -0
- package/dist/adoption-checkpoint.js +209 -0
- package/dist/adoption-merge-preview.d.ts +28 -0
- package/dist/adoption-merge-preview.d.ts.map +1 -0
- package/dist/adoption-merge-preview.js +254 -0
- package/dist/adoption-report-renderer.d.ts +33 -0
- package/dist/adoption-report-renderer.d.ts.map +1 -0
- package/dist/adoption-report-renderer.js +257 -0
- package/dist/adoption-state.d.ts +100 -0
- package/dist/adoption-state.d.ts.map +1 -0
- package/dist/adoption-state.js +296 -0
- package/dist/adoption-three-way.d.ts +46 -0
- package/dist/adoption-three-way.d.ts.map +1 -0
- package/dist/adoption-three-way.js +181 -0
- package/dist/agent-brief.d.ts +77 -0
- package/dist/agent-brief.d.ts.map +1 -0
- package/dist/agent-brief.js +490 -0
- package/dist/agent-contract-gate.d.ts +108 -0
- package/dist/agent-contract-gate.d.ts.map +1 -0
- package/dist/agent-contract-gate.js +412 -0
- package/dist/agent-contract-templates.d.ts +63 -0
- package/dist/agent-contract-templates.d.ts.map +1 -0
- package/dist/agent-contract-templates.js +346 -0
- package/dist/agent-contract.d.ts +65 -0
- package/dist/agent-contract.d.ts.map +1 -0
- package/dist/agent-contract.js +555 -0
- package/dist/agent-handoff.d.ts +123 -0
- package/dist/agent-handoff.d.ts.map +1 -0
- package/dist/agent-handoff.js +470 -0
- package/dist/agent-instructions.d.ts +2 -0
- package/dist/agent-instructions.d.ts.map +1 -0
- package/dist/agent-instructions.js +21 -0
- package/dist/agent-orchestration.d.ts +61 -0
- package/dist/agent-orchestration.d.ts.map +1 -0
- package/dist/agent-orchestration.js +285 -0
- package/dist/agent-task-prep.d.ts +31 -0
- package/dist/agent-task-prep.d.ts.map +1 -0
- package/dist/agent-task-prep.js +73 -0
- package/dist/ai-readiness.d.ts +30 -0
- package/dist/ai-readiness.d.ts.map +1 -0
- package/dist/ai-readiness.js +279 -0
- package/dist/api-report.d.ts +51 -0
- package/dist/api-report.d.ts.map +1 -0
- package/dist/api-report.js +254 -0
- package/dist/apply-dispatch-trace.d.ts +93 -0
- package/dist/apply-dispatch-trace.d.ts.map +1 -0
- package/dist/apply-dispatch-trace.js +283 -0
- package/dist/apply-gate-result.d.ts +52 -0
- package/dist/apply-gate-result.d.ts.map +1 -0
- package/dist/apply-gate-result.js +44 -0
- package/dist/architecture-map.d.ts +118 -0
- package/dist/architecture-map.d.ts.map +1 -0
- package/dist/architecture-map.js +543 -0
- package/dist/area-explore.d.ts +75 -0
- package/dist/area-explore.d.ts.map +1 -0
- package/dist/area-explore.js +438 -0
- package/dist/area-map.d.ts +43 -0
- package/dist/area-map.d.ts.map +1 -0
- package/dist/area-map.js +197 -0
- package/dist/asset-provenance.d.ts +123 -0
- package/dist/asset-provenance.d.ts.map +1 -0
- package/dist/asset-provenance.js +209 -0
- package/dist/barrel-operations.d.ts +45 -0
- package/dist/barrel-operations.d.ts.map +1 -0
- package/dist/barrel-operations.js +159 -0
- package/dist/boundaries-changed-only.d.ts +62 -0
- package/dist/boundaries-changed-only.d.ts.map +1 -0
- package/dist/boundaries-changed-only.js +97 -0
- package/dist/boundary-suggestions.d.ts +20 -0
- package/dist/boundary-suggestions.d.ts.map +1 -0
- package/dist/boundary-suggestions.js +51 -0
- package/dist/bundle-diff.d.ts +98 -0
- package/dist/bundle-diff.d.ts.map +1 -0
- package/dist/bundle-diff.js +531 -0
- package/dist/bundle-replay.d.ts +68 -0
- package/dist/bundle-replay.d.ts.map +1 -0
- package/dist/bundle-replay.js +273 -0
- package/dist/bundle-validate-html.d.ts +11 -0
- package/dist/bundle-validate-html.d.ts.map +1 -0
- package/dist/bundle-validate-html.js +60 -0
- package/dist/change-intent.d.ts +36 -0
- package/dist/change-intent.d.ts.map +1 -0
- package/dist/change-intent.js +259 -0
- package/dist/changed-preflight.d.ts +59 -0
- package/dist/changed-preflight.d.ts.map +1 -0
- package/dist/changed-preflight.js +358 -0
- package/dist/changed-scope.d.ts +112 -0
- package/dist/changed-scope.d.ts.map +1 -0
- package/dist/changed-scope.js +172 -0
- package/dist/changes-summary.d.ts +87 -0
- package/dist/changes-summary.d.ts.map +1 -0
- package/dist/changes-summary.js +323 -0
- package/dist/check-result-v1.d.ts +90 -0
- package/dist/check-result-v1.d.ts.map +1 -0
- package/dist/check-result-v1.js +335 -0
- package/dist/ci-integrity-report.d.ts +38 -0
- package/dist/ci-integrity-report.d.ts.map +1 -0
- package/dist/ci-integrity-report.js +324 -0
- package/dist/ci-permissions-fix.d.ts +38 -0
- package/dist/ci-permissions-fix.d.ts.map +1 -0
- package/dist/ci-permissions-fix.js +201 -0
- package/dist/ci-permissions.d.ts +51 -0
- package/dist/ci-permissions.d.ts.map +1 -0
- package/dist/ci-permissions.js +431 -0
- package/dist/ci-predict.d.ts +42 -0
- package/dist/ci-predict.d.ts.map +1 -0
- package/dist/ci-predict.js +300 -0
- package/dist/ci-scaffold.d.ts +47 -0
- package/dist/ci-scaffold.d.ts.map +1 -0
- package/dist/ci-scaffold.js +638 -0
- package/dist/codemod-assist.d.ts +97 -0
- package/dist/codemod-assist.d.ts.map +1 -0
- package/dist/codemod-assist.js +261 -0
- package/dist/command-recommender.d.ts +25 -0
- package/dist/command-recommender.d.ts.map +1 -0
- package/dist/command-recommender.js +145 -0
- package/dist/command-suggester.d.ts +61 -0
- package/dist/command-suggester.d.ts.map +1 -0
- package/dist/command-suggester.js +159 -0
- package/dist/command-taxonomy.d.ts +38 -0
- package/dist/command-taxonomy.d.ts.map +1 -0
- package/dist/command-taxonomy.js +164 -0
- package/dist/compliance-evidence.d.ts +58 -0
- package/dist/compliance-evidence.d.ts.map +1 -0
- package/dist/compliance-evidence.js +260 -0
- package/dist/compliance-profiles.d.ts +42 -0
- package/dist/compliance-profiles.d.ts.map +1 -0
- package/dist/compliance-profiles.js +171 -0
- package/dist/construct-adoption-diff.d.ts +55 -0
- package/dist/construct-adoption-diff.d.ts.map +1 -0
- package/dist/construct-adoption-diff.js +331 -0
- package/dist/construct-adoption.d.ts +71 -0
- package/dist/construct-adoption.d.ts.map +1 -0
- package/dist/construct-adoption.js +331 -0
- package/dist/construct-inference.d.ts +44 -0
- package/dist/construct-inference.d.ts.map +1 -0
- package/dist/construct-inference.js +391 -0
- package/dist/construct-registry.d.ts +32 -0
- package/dist/construct-registry.d.ts.map +1 -0
- package/dist/construct-registry.js +198 -0
- package/dist/contract-file-rule.d.ts +37 -0
- package/dist/contract-file-rule.d.ts.map +1 -0
- package/dist/contract-file-rule.js +99 -0
- package/dist/contract-template-registry.d.ts +28 -0
- package/dist/contract-template-registry.d.ts.map +1 -0
- package/dist/contract-template-registry.js +161 -0
- package/dist/contradictions.d.ts +52 -0
- package/dist/contradictions.d.ts.map +1 -0
- package/dist/contradictions.js +391 -0
- package/dist/convention-registry.d.ts +44 -0
- package/dist/convention-registry.d.ts.map +1 -0
- package/dist/convention-registry.js +195 -0
- package/dist/coverage-report.d.ts +25 -0
- package/dist/coverage-report.d.ts.map +1 -0
- package/dist/coverage-report.js +190 -0
- package/dist/custom-checks.d.ts +146 -0
- package/dist/custom-checks.d.ts.map +1 -0
- package/dist/custom-checks.js +260 -0
- package/dist/dashboard/dashboard-data.d.ts +59 -0
- package/dist/dashboard/dashboard-data.d.ts.map +1 -0
- package/dist/dashboard/dashboard-data.js +653 -0
- package/dist/dashboard-export.d.ts +67 -0
- package/dist/dashboard-export.d.ts.map +1 -0
- package/dist/dashboard-export.js +203 -0
- package/dist/decision-records.d.ts +47 -0
- package/dist/decision-records.d.ts.map +1 -0
- package/dist/decision-records.js +255 -0
- package/dist/demo-package.d.ts +49 -0
- package/dist/demo-package.d.ts.map +1 -0
- package/dist/demo-package.js +305 -0
- package/dist/demo-script.d.ts +25 -0
- package/dist/demo-script.d.ts.map +1 -0
- package/dist/demo-script.js +198 -0
- package/dist/demo-workflow.d.ts +28 -0
- package/dist/demo-workflow.d.ts.map +1 -0
- package/dist/demo-workflow.js +178 -0
- package/dist/dev-cycle.d.ts +41 -0
- package/dist/dev-cycle.d.ts.map +1 -0
- package/dist/dev-cycle.js +94 -0
- package/dist/dev-session-html.d.ts +13 -0
- package/dist/dev-session-html.d.ts.map +1 -0
- package/dist/dev-session-html.js +223 -0
- package/dist/dev-session-report.d.ts +11 -0
- package/dist/dev-session-report.d.ts.map +1 -0
- package/dist/dev-session-report.js +206 -0
- package/dist/dev-session.d.ts +257 -0
- package/dist/dev-session.d.ts.map +1 -0
- package/dist/dev-session.js +568 -0
- package/dist/diagnostics-suggest.d.ts +17 -0
- package/dist/diagnostics-suggest.d.ts.map +1 -0
- package/dist/diagnostics-suggest.js +69 -0
- package/dist/docs-check.d.ts +40 -0
- package/dist/docs-check.d.ts.map +1 -0
- package/dist/docs-check.js +221 -0
- package/dist/doctor-acknowledgements.d.ts +69 -0
- package/dist/doctor-acknowledgements.d.ts.map +1 -0
- package/dist/doctor-acknowledgements.js +150 -0
- package/dist/doctor-result.d.ts +51 -0
- package/dist/doctor-result.d.ts.map +1 -0
- package/dist/doctor-result.js +7 -0
- package/dist/doctor-suppressions.d.ts +91 -0
- package/dist/doctor-suppressions.d.ts.map +1 -0
- package/dist/doctor-suppressions.js +238 -0
- package/dist/drift-baseline.d.ts +29 -0
- package/dist/drift-baseline.d.ts.map +1 -0
- package/dist/drift-baseline.js +80 -0
- package/dist/drift.d.ts +38 -0
- package/dist/drift.d.ts.map +1 -0
- package/dist/drift.js +107 -0
- package/dist/entrypoint-matrix.d.ts +61 -0
- package/dist/entrypoint-matrix.d.ts.map +1 -0
- package/dist/entrypoint-matrix.js +221 -0
- package/dist/examples-check.d.ts +36 -0
- package/dist/examples-check.d.ts.map +1 -0
- package/dist/examples-check.js +168 -0
- package/dist/execution-graph.d.ts +98 -0
- package/dist/execution-graph.d.ts.map +1 -0
- package/dist/execution-graph.js +484 -0
- package/dist/export-bundle.d.ts +10 -0
- package/dist/export-bundle.d.ts.map +1 -0
- package/dist/export-bundle.js +90 -0
- package/dist/failure-diagnostics.d.ts +63 -0
- package/dist/failure-diagnostics.d.ts.map +1 -0
- package/dist/failure-diagnostics.js +243 -0
- package/dist/feature-bundle.d.ts +111 -0
- package/dist/feature-bundle.d.ts.map +1 -0
- package/dist/feature-bundle.js +211 -0
- package/dist/feedback-actions-v2.d.ts +65 -0
- package/dist/feedback-actions-v2.d.ts.map +1 -0
- package/dist/feedback-actions-v2.js +183 -0
- package/dist/feedback-ingestion.d.ts +96 -0
- package/dist/feedback-ingestion.d.ts.map +1 -0
- package/dist/feedback-ingestion.js +400 -0
- package/dist/fix-preview.d.ts +82 -0
- package/dist/fix-preview.d.ts.map +1 -0
- package/dist/fix-preview.js +365 -0
- package/dist/fuzzy-impact.d.ts +50 -0
- package/dist/fuzzy-impact.d.ts.map +1 -0
- package/dist/fuzzy-impact.js +446 -0
- package/dist/generated-code.d.ts +97 -0
- package/dist/generated-code.d.ts.map +1 -0
- package/dist/generated-code.js +395 -0
- package/dist/git-helpers.d.ts +26 -0
- package/dist/git-helpers.d.ts.map +1 -0
- package/dist/git-helpers.js +110 -0
- package/dist/golden-output.d.ts +33 -0
- package/dist/golden-output.d.ts.map +1 -0
- package/dist/golden-output.js +92 -0
- package/dist/grounding/build-grounding.d.ts +53 -0
- package/dist/grounding/build-grounding.d.ts.map +1 -0
- package/dist/grounding/build-grounding.js +51 -0
- package/dist/grounding/nx-projects.d.ts +29 -0
- package/dist/grounding/nx-projects.d.ts.map +1 -0
- package/dist/grounding/nx-projects.js +109 -0
- package/dist/grounding/validate-extracted-plan.d.ts +20 -0
- package/dist/grounding/validate-extracted-plan.d.ts.map +1 -0
- package/dist/grounding/validate-extracted-plan.js +127 -0
- package/dist/healing-plan.d.ts +33 -0
- package/dist/healing-plan.d.ts.map +1 -0
- package/dist/healing-plan.js +346 -0
- package/dist/helper-registry.d.ts +90 -0
- package/dist/helper-registry.d.ts.map +1 -0
- package/dist/helper-registry.js +529 -0
- package/dist/impact-analysis.d.ts +150 -0
- package/dist/impact-analysis.d.ts.map +1 -0
- package/dist/impact-analysis.js +697 -0
- package/dist/impact-graph-render.d.ts +51 -0
- package/dist/impact-graph-render.d.ts.map +1 -0
- package/dist/impact-graph-render.js +139 -0
- package/dist/impact-graph.d.ts +17 -0
- package/dist/impact-graph.d.ts.map +1 -0
- package/dist/impact-graph.js +119 -0
- package/dist/impact-render.d.ts +22 -0
- package/dist/impact-render.d.ts.map +1 -0
- package/dist/impact-render.js +413 -0
- package/dist/import-graph-analysis.d.ts +28 -0
- package/dist/import-graph-analysis.d.ts.map +1 -0
- package/dist/import-graph-analysis.js +193 -0
- package/dist/import-hygiene.d.ts +93 -0
- package/dist/import-hygiene.d.ts.map +1 -0
- package/dist/import-hygiene.js +366 -0
- package/dist/index.d.ts +223 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +233 -0
- package/dist/ingest-adoption.d.ts +50 -0
- package/dist/ingest-adoption.d.ts.map +1 -0
- package/dist/ingest-adoption.js +183 -0
- package/dist/ingest-apply.d.ts +80 -0
- package/dist/ingest-apply.d.ts.map +1 -0
- package/dist/ingest-apply.js +227 -0
- package/dist/ingest-body-extractor.d.ts +28 -0
- package/dist/ingest-body-extractor.d.ts.map +1 -0
- package/dist/ingest-body-extractor.js +129 -0
- package/dist/ingest-drafts.d.ts +16 -0
- package/dist/ingest-drafts.d.ts.map +1 -0
- package/dist/ingest-drafts.js +482 -0
- package/dist/inspector-cache.d.ts +41 -0
- package/dist/inspector-cache.d.ts.map +1 -0
- package/dist/inspector-cache.js +104 -0
- package/dist/install-smoke.d.ts +44 -0
- package/dist/install-smoke.d.ts.map +1 -0
- package/dist/install-smoke.js +31 -0
- package/dist/knowledge-authoring.d.ts +151 -0
- package/dist/knowledge-authoring.d.ts.map +1 -0
- package/dist/knowledge-authoring.js +586 -0
- package/dist/knowledge-graph.d.ts +76 -0
- package/dist/knowledge-graph.d.ts.map +1 -0
- package/dist/knowledge-graph.js +336 -0
- package/dist/knowledge-lint.d.ts +97 -0
- package/dist/knowledge-lint.d.ts.map +1 -0
- package/dist/knowledge-lint.js +302 -0
- package/dist/knowledge-rename.d.ts +38 -0
- package/dist/knowledge-rename.d.ts.map +1 -0
- package/dist/knowledge-rename.js +88 -0
- package/dist/knowledge-stale.d.ts +124 -0
- package/dist/knowledge-stale.d.ts.map +1 -0
- package/dist/knowledge-stale.js +892 -0
- package/dist/languages/command-inference.d.ts +27 -0
- package/dist/languages/command-inference.d.ts.map +1 -0
- package/dist/languages/command-inference.js +214 -0
- package/dist/languages/dependency-scan.d.ts +33 -0
- package/dist/languages/dependency-scan.d.ts.map +1 -0
- package/dist/languages/dependency-scan.js +343 -0
- package/dist/languages/index.d.ts +14 -0
- package/dist/languages/index.d.ts.map +1 -0
- package/dist/languages/index.js +13 -0
- package/dist/languages/language-boundaries.d.ts +30 -0
- package/dist/languages/language-boundaries.d.ts.map +1 -0
- package/dist/languages/language-boundaries.js +176 -0
- package/dist/languages/language-cache.d.ts +54 -0
- package/dist/languages/language-cache.d.ts.map +1 -0
- package/dist/languages/language-cache.js +236 -0
- package/dist/languages/language-detection.d.ts +30 -0
- package/dist/languages/language-detection.d.ts.map +1 -0
- package/dist/languages/language-detection.js +584 -0
- package/dist/languages/language-id.d.ts +15 -0
- package/dist/languages/language-id.d.ts.map +1 -0
- package/dist/languages/language-id.js +15 -0
- package/dist/languages/language-runner.d.ts +90 -0
- package/dist/languages/language-runner.d.ts.map +1 -0
- package/dist/languages/language-runner.js +346 -0
- package/dist/languages/polyglot-boundary.d.ts +80 -0
- package/dist/languages/polyglot-boundary.d.ts.map +1 -0
- package/dist/languages/polyglot-boundary.js +373 -0
- package/dist/languages/polyglot-ci.d.ts +25 -0
- package/dist/languages/polyglot-ci.d.ts.map +1 -0
- package/dist/languages/polyglot-ci.js +278 -0
- package/dist/languages/test-impact.d.ts +19 -0
- package/dist/languages/test-impact.d.ts.map +1 -0
- package/dist/languages/test-impact.js +157 -0
- package/dist/loader-diagnostics.d.ts +40 -0
- package/dist/loader-diagnostics.d.ts.map +1 -0
- package/dist/loader-diagnostics.js +49 -0
- package/dist/memory-diff.d.ts +60 -0
- package/dist/memory-diff.d.ts.map +1 -0
- package/dist/memory-diff.js +302 -0
- package/dist/migration-profile-registry.d.ts +26 -0
- package/dist/migration-profile-registry.d.ts.map +1 -0
- package/dist/migration-profile-registry.js +135 -0
- package/dist/migration-readiness.d.ts +101 -0
- package/dist/migration-readiness.d.ts.map +1 -0
- package/dist/migration-readiness.js +253 -0
- package/dist/monorepo-onboarding.d.ts +51 -0
- package/dist/monorepo-onboarding.d.ts.map +1 -0
- package/dist/monorepo-onboarding.js +235 -0
- package/dist/onboarding-adoption-diff.d.ts +53 -0
- package/dist/onboarding-adoption-diff.d.ts.map +1 -0
- package/dist/onboarding-adoption-diff.js +285 -0
- package/dist/onboarding-adoption.d.ts +136 -0
- package/dist/onboarding-adoption.d.ts.map +1 -0
- package/dist/onboarding-adoption.js +702 -0
- package/dist/onboarding-agent-import.d.ts +40 -0
- package/dist/onboarding-agent-import.d.ts.map +1 -0
- package/dist/onboarding-agent-import.js +114 -0
- package/dist/onboarding-diff.d.ts +39 -0
- package/dist/onboarding-diff.d.ts.map +1 -0
- package/dist/onboarding-diff.js +240 -0
- package/dist/onboarding-drafts.d.ts +28 -0
- package/dist/onboarding-drafts.d.ts.map +1 -0
- package/dist/onboarding-drafts.js +234 -0
- package/dist/onboarding-report.d.ts +8 -0
- package/dist/onboarding-report.d.ts.map +1 -0
- package/dist/onboarding-report.js +239 -0
- package/dist/onboarding.d.ts +134 -0
- package/dist/onboarding.d.ts.map +1 -0
- package/dist/onboarding.js +729 -0
- package/dist/ownership.d.ts +38 -0
- package/dist/ownership.d.ts.map +1 -0
- package/dist/ownership.js +102 -0
- package/dist/pack-author-ux.d.ts +58 -0
- package/dist/pack-author-ux.d.ts.map +1 -0
- package/dist/pack-author-ux.js +219 -0
- package/dist/pack-author.d.ts +94 -0
- package/dist/pack-author.d.ts.map +1 -0
- package/dist/pack-author.js +208 -0
- package/dist/pack-compatibility.d.ts +21 -0
- package/dist/pack-compatibility.d.ts.map +1 -0
- package/dist/pack-compatibility.js +114 -0
- package/dist/pack-contributions-inventory.d.ts +121 -0
- package/dist/pack-contributions-inventory.d.ts.map +1 -0
- package/dist/pack-contributions-inventory.js +732 -0
- package/dist/pack-docs.d.ts +11 -0
- package/dist/pack-docs.d.ts.map +1 -0
- package/dist/pack-docs.js +101 -0
- package/dist/pack-doctor.d.ts +50 -0
- package/dist/pack-doctor.d.ts.map +1 -0
- package/dist/pack-doctor.js +302 -0
- package/dist/pack-helper-registry.d.ts +29 -0
- package/dist/pack-helper-registry.d.ts.map +1 -0
- package/dist/pack-helper-registry.js +144 -0
- package/dist/pack-pending.d.ts +68 -0
- package/dist/pack-pending.d.ts.map +1 -0
- package/dist/pack-pending.js +189 -0
- package/dist/pack-quality-score.d.ts +44 -0
- package/dist/pack-quality-score.d.ts.map +1 -0
- package/dist/pack-quality-score.js +155 -0
- package/dist/pack-release-check.d.ts +24 -0
- package/dist/pack-release-check.d.ts.map +1 -0
- package/dist/pack-release-check.js +258 -0
- package/dist/pack-signature-status.d.ts +72 -0
- package/dist/pack-signature-status.d.ts.map +1 -0
- package/dist/pack-signature-status.js +222 -0
- package/dist/pack-symbol-compat.d.ts +60 -0
- package/dist/pack-symbol-compat.d.ts.map +1 -0
- package/dist/pack-symbol-compat.js +371 -0
- package/dist/pack-test-runner.d.ts +59 -0
- package/dist/pack-test-runner.d.ts.map +1 -0
- package/dist/pack-test-runner.js +211 -0
- package/dist/pipeline-command-dictionary.d.ts +2 -0
- package/dist/pipeline-command-dictionary.d.ts.map +1 -0
- package/dist/pipeline-command-dictionary.js +20 -0
- package/dist/pipeline-lint.d.ts +30 -0
- package/dist/pipeline-lint.d.ts.map +1 -0
- package/dist/pipeline-lint.js +134 -0
- package/dist/plan-dependency-graph.d.ts +25 -0
- package/dist/plan-dependency-graph.d.ts.map +1 -0
- package/dist/plan-dependency-graph.js +195 -0
- package/dist/plan-review.d.ts +64 -0
- package/dist/plan-review.d.ts.map +1 -0
- package/dist/plan-review.js +242 -0
- package/dist/plan-simulation.d.ts +108 -0
- package/dist/plan-simulation.d.ts.map +1 -0
- package/dist/plan-simulation.js +767 -0
- package/dist/playbook-registry.d.ts +25 -0
- package/dist/playbook-registry.d.ts.map +1 -0
- package/dist/playbook-registry.js +148 -0
- package/dist/playbook-script.d.ts +60 -0
- package/dist/playbook-script.d.ts.map +1 -0
- package/dist/playbook-script.js +161 -0
- package/dist/plugin-lifecycle-profile-registry.d.ts +52 -0
- package/dist/plugin-lifecycle-profile-registry.d.ts.map +1 -0
- package/dist/plugin-lifecycle-profile-registry.js +202 -0
- package/dist/plugin-lifecycle.d.ts +132 -0
- package/dist/plugin-lifecycle.d.ts.map +1 -0
- package/dist/plugin-lifecycle.js +477 -0
- package/dist/policy-engine.d.ts +101 -0
- package/dist/policy-engine.d.ts.map +1 -0
- package/dist/policy-engine.js +321 -0
- package/dist/policy-override-audit.d.ts +18 -0
- package/dist/policy-override-audit.d.ts.map +1 -0
- package/dist/policy-override-audit.js +54 -0
- package/dist/policy-overrides.d.ts +35 -0
- package/dist/policy-overrides.d.ts.map +1 -0
- package/dist/policy-overrides.js +84 -0
- package/dist/policy-test.d.ts +83 -0
- package/dist/policy-test.d.ts.map +1 -0
- package/dist/policy-test.js +342 -0
- package/dist/pr-summary.d.ts +34 -0
- package/dist/pr-summary.d.ts.map +1 -0
- package/dist/pr-summary.js +220 -0
- package/dist/product-coherence.d.ts +21 -0
- package/dist/product-coherence.d.ts.map +1 -0
- package/dist/product-coherence.js +158 -0
- package/dist/profile-registry.d.ts +42 -0
- package/dist/profile-registry.d.ts.map +1 -0
- package/dist/profile-registry.js +104 -0
- package/dist/project-coupling-audit.d.ts +64 -0
- package/dist/project-coupling-audit.d.ts.map +1 -0
- package/dist/project-coupling-audit.js +282 -0
- package/dist/project-overview.d.ts +14 -0
- package/dist/project-overview.d.ts.map +1 -0
- package/dist/project-overview.js +27 -0
- package/dist/propose-knowledge.d.ts +64 -0
- package/dist/propose-knowledge.d.ts.map +1 -0
- package/dist/propose-knowledge.js +367 -0
- package/dist/quality-baseline.d.ts +123 -0
- package/dist/quality-baseline.d.ts.map +1 -0
- package/dist/quality-baseline.js +433 -0
- package/dist/quality-html.d.ts +7 -0
- package/dist/quality-html.d.ts.map +1 -0
- package/dist/quality-html.js +64 -0
- package/dist/quality-report.d.ts +49 -0
- package/dist/quality-report.d.ts.map +1 -0
- package/dist/quality-report.js +296 -0
- package/dist/query-resolver.d.ts +38 -0
- package/dist/query-resolver.d.ts.map +1 -0
- package/dist/query-resolver.js +163 -0
- package/dist/ranker-explainability.d.ts +91 -0
- package/dist/ranker-explainability.d.ts.map +1 -0
- package/dist/ranker-explainability.js +550 -0
- package/dist/reference-lookup.d.ts +8 -0
- package/dist/reference-lookup.d.ts.map +1 -0
- package/dist/reference-lookup.js +18 -0
- package/dist/registration-hint-registry.d.ts +55 -0
- package/dist/registration-hint-registry.d.ts.map +1 -0
- package/dist/registration-hint-registry.js +327 -0
- package/dist/registry-lifecycle.d.ts +47 -0
- package/dist/registry-lifecycle.d.ts.map +1 -0
- package/dist/registry-lifecycle.js +214 -0
- package/dist/release-readiness.d.ts +64 -0
- package/dist/release-readiness.d.ts.map +1 -0
- package/dist/release-readiness.js +456 -0
- package/dist/release-smoke.d.ts +138 -0
- package/dist/release-smoke.d.ts.map +1 -0
- package/dist/release-smoke.js +459 -0
- package/dist/release-train.d.ts +33 -0
- package/dist/release-train.d.ts.map +1 -0
- package/dist/release-train.js +104 -0
- package/dist/repo-memory.d.ts +95 -0
- package/dist/repo-memory.d.ts.map +1 -0
- package/dist/repo-memory.js +614 -0
- package/dist/report-site.d.ts +92 -0
- package/dist/report-site.d.ts.map +1 -0
- package/dist/report-site.js +658 -0
- package/dist/reposet.d.ts +56 -0
- package/dist/reposet.d.ts.map +1 -0
- package/dist/reposet.js +160 -0
- package/dist/repository-intelligence.d.ts +145 -0
- package/dist/repository-intelligence.d.ts.map +1 -0
- package/dist/repository-intelligence.js +729 -0
- package/dist/repository-knowledge-model.d.ts +218 -0
- package/dist/repository-knowledge-model.d.ts.map +1 -0
- package/dist/repository-knowledge-model.js +939 -0
- package/dist/repository-map.d.ts +72 -0
- package/dist/repository-map.d.ts.map +1 -0
- package/dist/repository-map.js +332 -0
- package/dist/repository-stats.d.ts +66 -0
- package/dist/repository-stats.d.ts.map +1 -0
- package/dist/repository-stats.js +329 -0
- package/dist/review-comment-renderer.d.ts +59 -0
- package/dist/review-comment-renderer.d.ts.map +1 -0
- package/dist/review-comment-renderer.js +181 -0
- package/dist/review-comment-v2.d.ts +9 -0
- package/dist/review-comment-v2.d.ts.map +1 -0
- package/dist/review-comment-v2.js +178 -0
- package/dist/review-html.d.ts +13 -0
- package/dist/review-html.d.ts.map +1 -0
- package/dist/review-html.js +79 -0
- package/dist/review-packet-v2.d.ts +29 -0
- package/dist/review-packet-v2.d.ts.map +1 -0
- package/dist/review-packet-v2.js +71 -0
- package/dist/review-packet-v3.d.ts +22 -0
- package/dist/review-packet-v3.d.ts.map +1 -0
- package/dist/review-packet-v3.js +181 -0
- package/dist/review-packet.d.ts +49 -0
- package/dist/review-packet.d.ts.map +1 -0
- package/dist/review-packet.js +129 -0
- package/dist/risk-signals.d.ts +28 -0
- package/dist/risk-signals.d.ts.map +1 -0
- package/dist/risk-signals.js +68 -0
- package/dist/role-views.d.ts +50 -0
- package/dist/role-views.d.ts.map +1 -0
- package/dist/role-views.js +334 -0
- package/dist/rounds.d.ts +52 -0
- package/dist/rounds.d.ts.map +1 -0
- package/dist/rounds.js +172 -0
- package/dist/rule-drift.d.ts +42 -0
- package/dist/rule-drift.d.ts.map +1 -0
- package/dist/rule-drift.js +148 -0
- package/dist/rule-quality.d.ts +73 -0
- package/dist/rule-quality.d.ts.map +1 -0
- package/dist/rule-quality.js +356 -0
- package/dist/rule-scaffold.d.ts +71 -0
- package/dist/rule-scaffold.d.ts.map +1 -0
- package/dist/rule-scaffold.js +258 -0
- package/dist/safety-audit-deep.d.ts +38 -0
- package/dist/safety-audit-deep.d.ts.map +1 -0
- package/dist/safety-audit-deep.js +162 -0
- package/dist/safety-audit.d.ts +91 -0
- package/dist/safety-audit.d.ts.map +1 -0
- package/dist/safety-audit.js +138 -0
- package/dist/safety-html.d.ts +7 -0
- package/dist/safety-html.d.ts.map +1 -0
- package/dist/safety-html.js +70 -0
- package/dist/scaffold-coverage.d.ts +46 -0
- package/dist/scaffold-coverage.d.ts.map +1 -0
- package/dist/scaffold-coverage.js +273 -0
- package/dist/scaffold-patterns.d.ts +38 -0
- package/dist/scaffold-patterns.d.ts.map +1 -0
- package/dist/scaffold-patterns.js +282 -0
- package/dist/schema-inventory.d.ts +55 -0
- package/dist/schema-inventory.d.ts.map +1 -0
- package/dist/schema-inventory.js +301 -0
- package/dist/search-index.d.ts +75 -0
- package/dist/search-index.d.ts.map +1 -0
- package/dist/search-index.js +531 -0
- package/dist/search-tuning-explain.d.ts +68 -0
- package/dist/search-tuning-explain.d.ts.map +1 -0
- package/dist/search-tuning-explain.js +207 -0
- package/dist/search-tuning-registry.d.ts +54 -0
- package/dist/search-tuning-registry.d.ts.map +1 -0
- package/dist/search-tuning-registry.js +303 -0
- package/dist/self-audit.d.ts +59 -0
- package/dist/self-audit.d.ts.map +1 -0
- package/dist/self-audit.js +192 -0
- package/dist/self-config-doctor-v2.d.ts +57 -0
- package/dist/self-config-doctor-v2.d.ts.map +1 -0
- package/dist/self-config-doctor-v2.js +653 -0
- package/dist/self-config-doctor.d.ts +47 -0
- package/dist/self-config-doctor.d.ts.map +1 -0
- package/dist/self-config-doctor.js +432 -0
- package/dist/sharkcraft-inspector.d.ts +73 -0
- package/dist/sharkcraft-inspector.d.ts.map +1 -0
- package/dist/sharkcraft-inspector.js +745 -0
- package/dist/spec/spec-cross-validate.d.ts +17 -0
- package/dist/spec/spec-cross-validate.d.ts.map +1 -0
- package/dist/spec/spec-cross-validate.js +53 -0
- package/dist/spec/spec-discovery.d.ts +27 -0
- package/dist/spec/spec-discovery.d.ts.map +1 -0
- package/dist/spec/spec-discovery.js +78 -0
- package/dist/spec/spec-review.d.ts +36 -0
- package/dist/spec/spec-review.d.ts.map +1 -0
- package/dist/spec/spec-review.js +37 -0
- package/dist/stability-map.d.ts +62 -0
- package/dist/stability-map.d.ts.map +1 -0
- package/dist/stability-map.js +404 -0
- package/dist/start-here.d.ts +49 -0
- package/dist/start-here.d.ts.map +1 -0
- package/dist/start-here.js +259 -0
- package/dist/surface-profile-detect.d.ts +42 -0
- package/dist/surface-profile-detect.d.ts.map +1 -0
- package/dist/surface-profile-detect.js +76 -0
- package/dist/symbol-index.d.ts +108 -0
- package/dist/symbol-index.d.ts.map +1 -0
- package/dist/symbol-index.js +483 -0
- package/dist/task-decompose.d.ts +38 -0
- package/dist/task-decompose.d.ts.map +1 -0
- package/dist/task-decompose.js +154 -0
- package/dist/task-packet.d.ts +104 -0
- package/dist/task-packet.d.ts.map +1 -0
- package/dist/task-packet.js +156 -0
- package/dist/task-ranker.d.ts +51 -0
- package/dist/task-ranker.d.ts.map +1 -0
- package/dist/task-ranker.js +410 -0
- package/dist/task-risk.d.ts +84 -0
- package/dist/task-risk.d.ts.map +1 -0
- package/dist/task-risk.js +731 -0
- package/dist/task-routing-hint-registry.d.ts +36 -0
- package/dist/task-routing-hint-registry.d.ts.map +1 -0
- package/dist/task-routing-hint-registry.js +186 -0
- package/dist/template-authoring.d.ts +113 -0
- package/dist/template-authoring.d.ts.map +1 -0
- package/dist/template-authoring.js +521 -0
- package/dist/template-body-inference-v2.d.ts +19 -0
- package/dist/template-body-inference-v2.d.ts.map +1 -0
- package/dist/template-body-inference-v2.js +468 -0
- package/dist/template-body-inference.d.ts +59 -0
- package/dist/template-body-inference.d.ts.map +1 -0
- package/dist/template-body-inference.js +277 -0
- package/dist/template-drift.d.ts +39 -0
- package/dist/template-drift.d.ts.map +1 -0
- package/dist/template-drift.js +353 -0
- package/dist/template-lint.d.ts +31 -0
- package/dist/template-lint.d.ts.map +1 -0
- package/dist/template-lint.js +113 -0
- package/dist/test-definitions.d.ts +41 -0
- package/dist/test-definitions.d.ts.map +1 -0
- package/dist/test-definitions.js +6 -0
- package/dist/test-impact.d.ts +30 -0
- package/dist/test-impact.d.ts.map +1 -0
- package/dist/test-impact.js +173 -0
- package/dist/test-runner.d.ts +87 -0
- package/dist/test-runner.d.ts.map +1 -0
- package/dist/test-runner.js +560 -0
- package/dist/uncertainty-report.d.ts +46 -0
- package/dist/uncertainty-report.d.ts.map +1 -0
- package/dist/uncertainty-report.js +108 -0
- package/dist/uncertainty.d.ts +38 -0
- package/dist/uncertainty.d.ts.map +1 -0
- package/dist/uncertainty.js +115 -0
- package/dist/universal-search.d.ts +64 -0
- package/dist/universal-search.d.ts.map +1 -0
- package/dist/universal-search.js +347 -0
- package/dist/upgrade-advisor.d.ts +22 -0
- package/dist/upgrade-advisor.d.ts.map +1 -0
- package/dist/upgrade-advisor.js +109 -0
- package/dist/why-file.d.ts +75 -0
- package/dist/why-file.d.ts.map +1 -0
- package/dist/why-file.js +202 -0
- package/dist/workflow-simulation.d.ts +46 -0
- package/dist/workflow-simulation.d.ts.map +1 -0
- package/dist/workflow-simulation.js +154 -0
- package/package.json +66 -0
|
@@ -0,0 +1,638 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministic GitHub Actions scaffolds for SharkCraft. The CLI commands
|
|
3
|
+
* stay dry-run by default; this module only renders YAML strings.
|
|
4
|
+
*
|
|
5
|
+
* Two surfaces:
|
|
6
|
+
* - `renderQualityCiWorkflow` — selectable gates (quality / policy / impact
|
|
7
|
+
* / review / report-site / bundle-replay / node-compat).
|
|
8
|
+
* - `renderBundleReplayWorkflow` — scheduled cross-bundle replay job.
|
|
9
|
+
*/
|
|
10
|
+
export const CI_SCAFFOLD_SCHEMA = 'sharkcraft.ci-scaffold/v1';
|
|
11
|
+
function header(name) {
|
|
12
|
+
return [
|
|
13
|
+
`# SharkCraft CI scaffold — generated by \`shrk ci scaffold github-actions\`.`,
|
|
14
|
+
`# Edit by hand if you outgrow the defaults; SharkCraft will not regenerate without --force.`,
|
|
15
|
+
`name: ${name}`,
|
|
16
|
+
`on:`,
|
|
17
|
+
` push:`,
|
|
18
|
+
` branches: [main]`,
|
|
19
|
+
` pull_request:`,
|
|
20
|
+
` branches: [main]`,
|
|
21
|
+
].join('\n');
|
|
22
|
+
}
|
|
23
|
+
function setup(bunVersion) {
|
|
24
|
+
return [
|
|
25
|
+
' - uses: actions/checkout@v4',
|
|
26
|
+
' - uses: oven-sh/setup-bun@v1',
|
|
27
|
+
` with: { bun-version: '${bunVersion}' }`,
|
|
28
|
+
' - run: bun install --frozen-lockfile',
|
|
29
|
+
].join('\n');
|
|
30
|
+
}
|
|
31
|
+
export function renderQualityCiWorkflow(options = {}) {
|
|
32
|
+
const name = options.name ?? 'SharkCraft CI';
|
|
33
|
+
const bun = options.bunVersion ?? '1.1.0';
|
|
34
|
+
const lines = [];
|
|
35
|
+
lines.push(header(name));
|
|
36
|
+
lines.push('jobs:');
|
|
37
|
+
lines.push(' sharkcraft:');
|
|
38
|
+
lines.push(' runs-on: ubuntu-latest');
|
|
39
|
+
lines.push(' timeout-minutes: 20');
|
|
40
|
+
lines.push(' steps:');
|
|
41
|
+
lines.push(setup(bun));
|
|
42
|
+
lines.push(" - name: SharkCraft doctor");
|
|
43
|
+
lines.push(" run: bun run shrk doctor");
|
|
44
|
+
if (options.withQuality) {
|
|
45
|
+
lines.push(" - name: Quality gate");
|
|
46
|
+
lines.push(" run: bun run shrk quality --ci");
|
|
47
|
+
}
|
|
48
|
+
if (options.withPolicy) {
|
|
49
|
+
lines.push(" - name: Policy run");
|
|
50
|
+
lines.push(" run: bun run shrk policy run --json > .sharkcraft/reports/policy.json");
|
|
51
|
+
lines.push(" - name: Policy snapshot gate");
|
|
52
|
+
lines.push(" run: bun run shrk policy snapshot --all --gate --json > .sharkcraft/reports/policy-snapshots.json || true");
|
|
53
|
+
}
|
|
54
|
+
if (options.withImpact) {
|
|
55
|
+
lines.push(" - name: Impact (since origin/main)");
|
|
56
|
+
lines.push(" run: |");
|
|
57
|
+
lines.push(" mkdir -p .sharkcraft/reports");
|
|
58
|
+
lines.push(" bun run shrk impact --since origin/main --format json > .sharkcraft/reports/impact.json || true");
|
|
59
|
+
}
|
|
60
|
+
if (options.withReview) {
|
|
61
|
+
lines.push(" - name: Review packet v3");
|
|
62
|
+
lines.push(" run: bun run shrk review packet --v3 --since origin/main --json > .sharkcraft/reports/review.json || true");
|
|
63
|
+
}
|
|
64
|
+
if (options.withBundleReplay) {
|
|
65
|
+
lines.push(" - name: Bundle replay (all)");
|
|
66
|
+
lines.push(" run: bun run shrk bundle replay --all --report --html || true");
|
|
67
|
+
}
|
|
68
|
+
if (options.withReportSite) {
|
|
69
|
+
lines.push(" - name: Build static report site");
|
|
70
|
+
lines.push(" run: bun run shrk report site --output .sharkcraft/reports/site || true");
|
|
71
|
+
}
|
|
72
|
+
if (options.withNodeCompat) {
|
|
73
|
+
lines.push(" - name: compat:node audit");
|
|
74
|
+
lines.push(" run: bun run compat:node --json > .sharkcraft/reports/compat-node.json || true");
|
|
75
|
+
}
|
|
76
|
+
if (options.withReleaseReadiness) {
|
|
77
|
+
lines.push(" - name: Release readiness gate");
|
|
78
|
+
lines.push(" run: bun run shrk release readiness --json > .sharkcraft/reports/release-readiness.json");
|
|
79
|
+
}
|
|
80
|
+
lines.push(" - name: Upload SharkCraft reports");
|
|
81
|
+
lines.push(" if: always()");
|
|
82
|
+
lines.push(" uses: actions/upload-artifact@v4");
|
|
83
|
+
lines.push(" with:");
|
|
84
|
+
lines.push(" name: sharkcraft-reports");
|
|
85
|
+
lines.push(" path: |");
|
|
86
|
+
lines.push(" .sharkcraft/reports/**");
|
|
87
|
+
lines.push(" .sharkcraft/bundles/*/reports/**");
|
|
88
|
+
lines.push(" if-no-files-found: ignore");
|
|
89
|
+
return lines.join('\n') + '\n';
|
|
90
|
+
}
|
|
91
|
+
function scheduleCron(s) {
|
|
92
|
+
if (s === 'daily')
|
|
93
|
+
return " - cron: '17 6 * * *'";
|
|
94
|
+
if (s === 'weekly')
|
|
95
|
+
return " - cron: '17 6 * * 1'";
|
|
96
|
+
return '';
|
|
97
|
+
}
|
|
98
|
+
export function renderGitlabCiWorkflow(options = {}) {
|
|
99
|
+
const bun = options.bunVersion ?? '1.1.0';
|
|
100
|
+
const lines = [];
|
|
101
|
+
lines.push('# SharkCraft CI scaffold — generated by `shrk ci scaffold gitlab`.');
|
|
102
|
+
lines.push('# Edit by hand if you outgrow the defaults; SharkCraft will not regenerate without --force.');
|
|
103
|
+
lines.push('');
|
|
104
|
+
lines.push('stages:');
|
|
105
|
+
lines.push(' - sharkcraft_quality');
|
|
106
|
+
lines.push(' - sharkcraft_review');
|
|
107
|
+
lines.push(' - sharkcraft_reports');
|
|
108
|
+
lines.push('');
|
|
109
|
+
lines.push('default:');
|
|
110
|
+
lines.push(` image: oven/bun:${bun}`);
|
|
111
|
+
lines.push(' before_script:');
|
|
112
|
+
lines.push(' - bun install --frozen-lockfile');
|
|
113
|
+
lines.push('');
|
|
114
|
+
lines.push('sharkcraft:doctor:');
|
|
115
|
+
lines.push(' stage: sharkcraft_quality');
|
|
116
|
+
lines.push(' script:');
|
|
117
|
+
lines.push(' - bun run shrk doctor');
|
|
118
|
+
if (options.withQuality) {
|
|
119
|
+
lines.push('');
|
|
120
|
+
lines.push('sharkcraft:quality:');
|
|
121
|
+
lines.push(' stage: sharkcraft_quality');
|
|
122
|
+
lines.push(' script:');
|
|
123
|
+
lines.push(' - bun run shrk quality --ci');
|
|
124
|
+
lines.push(' artifacts:');
|
|
125
|
+
lines.push(' when: always');
|
|
126
|
+
lines.push(' paths:');
|
|
127
|
+
lines.push(' - .sharkcraft/reports/');
|
|
128
|
+
}
|
|
129
|
+
if (options.withPolicy) {
|
|
130
|
+
lines.push('');
|
|
131
|
+
lines.push('sharkcraft:policy:');
|
|
132
|
+
lines.push(' stage: sharkcraft_quality');
|
|
133
|
+
lines.push(' script:');
|
|
134
|
+
lines.push(' - mkdir -p .sharkcraft/reports');
|
|
135
|
+
lines.push(' - bun run shrk policy run --json > .sharkcraft/reports/policy.json');
|
|
136
|
+
if (options.withPolicySnapshotGate) {
|
|
137
|
+
lines.push(' - bun run shrk policy snapshot --all --gate --json > .sharkcraft/reports/policy-snapshots.json || true');
|
|
138
|
+
}
|
|
139
|
+
lines.push(' artifacts:');
|
|
140
|
+
lines.push(' when: always');
|
|
141
|
+
lines.push(' paths:');
|
|
142
|
+
lines.push(' - .sharkcraft/reports/');
|
|
143
|
+
}
|
|
144
|
+
if (options.withImpact) {
|
|
145
|
+
lines.push('');
|
|
146
|
+
lines.push('sharkcraft:impact:');
|
|
147
|
+
lines.push(' stage: sharkcraft_review');
|
|
148
|
+
lines.push(' script:');
|
|
149
|
+
lines.push(' - mkdir -p .sharkcraft/reports');
|
|
150
|
+
lines.push(' - bun run shrk impact --since $CI_DEFAULT_BRANCH --format json > .sharkcraft/reports/impact.json || true');
|
|
151
|
+
lines.push(' artifacts:');
|
|
152
|
+
lines.push(' when: always');
|
|
153
|
+
lines.push(' paths:');
|
|
154
|
+
lines.push(' - .sharkcraft/reports/');
|
|
155
|
+
}
|
|
156
|
+
if (options.withReview) {
|
|
157
|
+
lines.push('');
|
|
158
|
+
lines.push('sharkcraft:review:');
|
|
159
|
+
lines.push(' stage: sharkcraft_review');
|
|
160
|
+
lines.push(' script:');
|
|
161
|
+
lines.push(' - mkdir -p .sharkcraft/reports');
|
|
162
|
+
lines.push(' - bun run shrk review packet --v3 --since $CI_DEFAULT_BRANCH --json > .sharkcraft/reports/review.json || true');
|
|
163
|
+
lines.push(' artifacts:');
|
|
164
|
+
lines.push(' when: always');
|
|
165
|
+
lines.push(' paths:');
|
|
166
|
+
lines.push(' - .sharkcraft/reports/');
|
|
167
|
+
}
|
|
168
|
+
if (options.withBundleReplay) {
|
|
169
|
+
lines.push('');
|
|
170
|
+
lines.push('sharkcraft:bundle-replay:');
|
|
171
|
+
lines.push(' stage: sharkcraft_reports');
|
|
172
|
+
lines.push(' script:');
|
|
173
|
+
lines.push(' - bun run shrk bundle replay --all --report --html || true');
|
|
174
|
+
lines.push(' artifacts:');
|
|
175
|
+
lines.push(' when: always');
|
|
176
|
+
lines.push(' paths:');
|
|
177
|
+
lines.push(' - .sharkcraft/reports/');
|
|
178
|
+
}
|
|
179
|
+
if (options.withReportSite) {
|
|
180
|
+
lines.push('');
|
|
181
|
+
lines.push('sharkcraft:report-site:');
|
|
182
|
+
lines.push(' stage: sharkcraft_reports');
|
|
183
|
+
lines.push(' script:');
|
|
184
|
+
lines.push(' - bun run shrk report site --output .sharkcraft/reports/site || true');
|
|
185
|
+
lines.push(' artifacts:');
|
|
186
|
+
lines.push(' when: always');
|
|
187
|
+
lines.push(' paths:');
|
|
188
|
+
lines.push(' - .sharkcraft/reports/site/');
|
|
189
|
+
}
|
|
190
|
+
if (options.withNodeCompat) {
|
|
191
|
+
lines.push('');
|
|
192
|
+
lines.push('sharkcraft:compat-node:');
|
|
193
|
+
lines.push(' stage: sharkcraft_quality');
|
|
194
|
+
lines.push(' script:');
|
|
195
|
+
lines.push(' - bun run compat:node --json > .sharkcraft/reports/compat-node.json || true');
|
|
196
|
+
lines.push(' artifacts:');
|
|
197
|
+
lines.push(' when: always');
|
|
198
|
+
lines.push(' paths:');
|
|
199
|
+
lines.push(' - .sharkcraft/reports/');
|
|
200
|
+
}
|
|
201
|
+
if (options.withReleaseReadiness) {
|
|
202
|
+
lines.push('');
|
|
203
|
+
lines.push('sharkcraft:release-readiness:');
|
|
204
|
+
lines.push(' stage: sharkcraft_reports');
|
|
205
|
+
lines.push(' script:');
|
|
206
|
+
lines.push(' - bun run shrk release readiness --json > .sharkcraft/reports/release-readiness.json');
|
|
207
|
+
lines.push(' artifacts:');
|
|
208
|
+
lines.push(' when: always');
|
|
209
|
+
lines.push(' paths:');
|
|
210
|
+
lines.push(' - .sharkcraft/reports/');
|
|
211
|
+
}
|
|
212
|
+
return lines.join('\n') + '\n';
|
|
213
|
+
}
|
|
214
|
+
export function renderBitbucketCiWorkflow(options = {}) {
|
|
215
|
+
const bun = options.bunVersion ?? '1.1.0';
|
|
216
|
+
const lines = [];
|
|
217
|
+
lines.push('# SharkCraft CI scaffold — generated by `shrk ci scaffold bitbucket`.');
|
|
218
|
+
lines.push('# Edit by hand if you outgrow the defaults; SharkCraft will not regenerate without --force.');
|
|
219
|
+
lines.push('');
|
|
220
|
+
lines.push(`image: oven/bun:${bun}`);
|
|
221
|
+
lines.push('');
|
|
222
|
+
lines.push('definitions:');
|
|
223
|
+
lines.push(' steps:');
|
|
224
|
+
lines.push(' - step: &sharkcraft-doctor');
|
|
225
|
+
lines.push(' name: SharkCraft doctor');
|
|
226
|
+
lines.push(' script:');
|
|
227
|
+
lines.push(' - bun install --frozen-lockfile');
|
|
228
|
+
lines.push(' - bun run shrk doctor');
|
|
229
|
+
if (options.withQuality) {
|
|
230
|
+
lines.push(' - step: &sharkcraft-quality');
|
|
231
|
+
lines.push(' name: SharkCraft quality');
|
|
232
|
+
lines.push(' script:');
|
|
233
|
+
lines.push(' - bun install --frozen-lockfile');
|
|
234
|
+
lines.push(' - bun run shrk quality --ci');
|
|
235
|
+
lines.push(' artifacts:');
|
|
236
|
+
lines.push(' - .sharkcraft/reports/**');
|
|
237
|
+
}
|
|
238
|
+
if (options.withPolicy) {
|
|
239
|
+
lines.push(' - step: &sharkcraft-policy');
|
|
240
|
+
lines.push(' name: SharkCraft policy');
|
|
241
|
+
lines.push(' script:');
|
|
242
|
+
lines.push(' - bun install --frozen-lockfile');
|
|
243
|
+
lines.push(' - mkdir -p .sharkcraft/reports');
|
|
244
|
+
lines.push(' - bun run shrk policy run --json > .sharkcraft/reports/policy.json');
|
|
245
|
+
if (options.withPolicySnapshotGate) {
|
|
246
|
+
lines.push(' - bun run shrk policy snapshot --all --gate --json > .sharkcraft/reports/policy-snapshots.json || true');
|
|
247
|
+
}
|
|
248
|
+
lines.push(' artifacts:');
|
|
249
|
+
lines.push(' - .sharkcraft/reports/**');
|
|
250
|
+
}
|
|
251
|
+
if (options.withImpact) {
|
|
252
|
+
lines.push(' - step: &sharkcraft-impact');
|
|
253
|
+
lines.push(' name: SharkCraft impact');
|
|
254
|
+
lines.push(' script:');
|
|
255
|
+
lines.push(' - bun install --frozen-lockfile');
|
|
256
|
+
lines.push(' - mkdir -p .sharkcraft/reports');
|
|
257
|
+
lines.push(' - bun run shrk impact --since origin/main --format json > .sharkcraft/reports/impact.json || true');
|
|
258
|
+
lines.push(' artifacts:');
|
|
259
|
+
lines.push(' - .sharkcraft/reports/**');
|
|
260
|
+
}
|
|
261
|
+
if (options.withReview) {
|
|
262
|
+
lines.push(' - step: &sharkcraft-review');
|
|
263
|
+
lines.push(' name: SharkCraft review');
|
|
264
|
+
lines.push(' script:');
|
|
265
|
+
lines.push(' - bun install --frozen-lockfile');
|
|
266
|
+
lines.push(' - mkdir -p .sharkcraft/reports');
|
|
267
|
+
lines.push(' - bun run shrk review packet --v3 --since origin/main --json > .sharkcraft/reports/review.json || true');
|
|
268
|
+
lines.push(' artifacts:');
|
|
269
|
+
lines.push(' - .sharkcraft/reports/**');
|
|
270
|
+
}
|
|
271
|
+
if (options.withReportSite) {
|
|
272
|
+
lines.push(' - step: &sharkcraft-report-site');
|
|
273
|
+
lines.push(' name: SharkCraft report site');
|
|
274
|
+
lines.push(' script:');
|
|
275
|
+
lines.push(' - bun install --frozen-lockfile');
|
|
276
|
+
lines.push(' - bun run shrk report site --output .sharkcraft/reports/site || true');
|
|
277
|
+
lines.push(' artifacts:');
|
|
278
|
+
lines.push(' - .sharkcraft/reports/site/**');
|
|
279
|
+
}
|
|
280
|
+
if (options.withBundleReplay) {
|
|
281
|
+
lines.push(' - step: &sharkcraft-bundle-replay');
|
|
282
|
+
lines.push(' name: SharkCraft bundle replay');
|
|
283
|
+
lines.push(' script:');
|
|
284
|
+
lines.push(' - bun install --frozen-lockfile');
|
|
285
|
+
lines.push(' - bun run shrk bundle replay --all --report --html || true');
|
|
286
|
+
lines.push(' artifacts:');
|
|
287
|
+
lines.push(' - .sharkcraft/reports/**');
|
|
288
|
+
}
|
|
289
|
+
if (options.withNodeCompat) {
|
|
290
|
+
lines.push(' - step: &sharkcraft-compat-node');
|
|
291
|
+
lines.push(' name: SharkCraft compat:node');
|
|
292
|
+
lines.push(' script:');
|
|
293
|
+
lines.push(' - bun install --frozen-lockfile');
|
|
294
|
+
lines.push(' - bun run compat:node --json > .sharkcraft/reports/compat-node.json || true');
|
|
295
|
+
lines.push(' artifacts:');
|
|
296
|
+
lines.push(' - .sharkcraft/reports/**');
|
|
297
|
+
}
|
|
298
|
+
if (options.withReleaseReadiness) {
|
|
299
|
+
lines.push(' - step: &sharkcraft-release-readiness');
|
|
300
|
+
lines.push(' name: SharkCraft release readiness');
|
|
301
|
+
lines.push(' script:');
|
|
302
|
+
lines.push(' - bun install --frozen-lockfile');
|
|
303
|
+
lines.push(' - bun run shrk release readiness --json > .sharkcraft/reports/release-readiness.json');
|
|
304
|
+
lines.push(' artifacts:');
|
|
305
|
+
lines.push(' - .sharkcraft/reports/**');
|
|
306
|
+
}
|
|
307
|
+
lines.push('');
|
|
308
|
+
lines.push('pipelines:');
|
|
309
|
+
lines.push(' pull-requests:');
|
|
310
|
+
lines.push(' "**":');
|
|
311
|
+
lines.push(' - step: *sharkcraft-doctor');
|
|
312
|
+
if (options.withQuality)
|
|
313
|
+
lines.push(' - step: *sharkcraft-quality');
|
|
314
|
+
if (options.withPolicy)
|
|
315
|
+
lines.push(' - step: *sharkcraft-policy');
|
|
316
|
+
if (options.withImpact)
|
|
317
|
+
lines.push(' - step: *sharkcraft-impact');
|
|
318
|
+
if (options.withReview)
|
|
319
|
+
lines.push(' - step: *sharkcraft-review');
|
|
320
|
+
if (options.withReportSite)
|
|
321
|
+
lines.push(' - step: *sharkcraft-report-site');
|
|
322
|
+
if (options.withBundleReplay)
|
|
323
|
+
lines.push(' - step: *sharkcraft-bundle-replay');
|
|
324
|
+
if (options.withNodeCompat)
|
|
325
|
+
lines.push(' - step: *sharkcraft-compat-node');
|
|
326
|
+
if (options.withReleaseReadiness)
|
|
327
|
+
lines.push(' - step: *sharkcraft-release-readiness');
|
|
328
|
+
lines.push('');
|
|
329
|
+
lines.push(' custom:');
|
|
330
|
+
lines.push(' sharkcraft-governance:');
|
|
331
|
+
lines.push(' - step: *sharkcraft-doctor');
|
|
332
|
+
if (options.withQuality)
|
|
333
|
+
lines.push(' - step: *sharkcraft-quality');
|
|
334
|
+
if (options.withPolicy)
|
|
335
|
+
lines.push(' - step: *sharkcraft-policy');
|
|
336
|
+
if (options.withBundleReplay)
|
|
337
|
+
lines.push(' - step: *sharkcraft-bundle-replay');
|
|
338
|
+
if (options.withReportSite)
|
|
339
|
+
lines.push(' - step: *sharkcraft-report-site');
|
|
340
|
+
if (options.withReleaseReadiness)
|
|
341
|
+
lines.push(' - step: *sharkcraft-release-readiness');
|
|
342
|
+
return lines.join('\n') + '\n';
|
|
343
|
+
}
|
|
344
|
+
export function renderCiWorkflow(provider, options = {}) {
|
|
345
|
+
if (provider === 'gitlab')
|
|
346
|
+
return renderGitlabCiWorkflow(options);
|
|
347
|
+
if (provider === 'bitbucket')
|
|
348
|
+
return renderBitbucketCiWorkflow(options);
|
|
349
|
+
return renderQualityCiWorkflow(options);
|
|
350
|
+
}
|
|
351
|
+
export function defaultCiOutputPath(provider) {
|
|
352
|
+
if (provider === 'gitlab')
|
|
353
|
+
return '.gitlab-ci.yml';
|
|
354
|
+
if (provider === 'bitbucket')
|
|
355
|
+
return 'bitbucket-pipelines.yml';
|
|
356
|
+
if (provider === 'jenkins')
|
|
357
|
+
return 'Jenkinsfile';
|
|
358
|
+
if (provider === 'azure')
|
|
359
|
+
return 'azure-pipelines.yml';
|
|
360
|
+
return '.github/workflows/sharkcraft.yml';
|
|
361
|
+
}
|
|
362
|
+
export function renderJenkinsCiWorkflow(options = {}) {
|
|
363
|
+
const bun = options.bunVersion ?? '1.1.0';
|
|
364
|
+
const lines = [];
|
|
365
|
+
lines.push('// SharkCraft CI scaffold — generated by `shrk ci scaffold jenkins`.');
|
|
366
|
+
lines.push('// Declarative pipeline. Edit by hand if you outgrow the defaults.');
|
|
367
|
+
lines.push('pipeline {');
|
|
368
|
+
lines.push(' agent {');
|
|
369
|
+
lines.push(' docker {');
|
|
370
|
+
lines.push(` image 'oven/bun:${bun}'`);
|
|
371
|
+
lines.push(' args \'-u 0\'');
|
|
372
|
+
lines.push(' }');
|
|
373
|
+
lines.push(' }');
|
|
374
|
+
lines.push(' options { timestamps() }');
|
|
375
|
+
lines.push(' stages {');
|
|
376
|
+
lines.push(' stage(\'Install\') {');
|
|
377
|
+
lines.push(' steps {');
|
|
378
|
+
lines.push(' sh \'bun install --frozen-lockfile\'');
|
|
379
|
+
lines.push(' sh \'bun run shrk doctor\'');
|
|
380
|
+
lines.push(' }');
|
|
381
|
+
lines.push(' }');
|
|
382
|
+
if (options.withQuality) {
|
|
383
|
+
lines.push(' stage(\'SharkCraft quality\') {');
|
|
384
|
+
lines.push(' steps {');
|
|
385
|
+
lines.push(' sh \'bun run shrk quality --ci\'');
|
|
386
|
+
lines.push(' }');
|
|
387
|
+
lines.push(' }');
|
|
388
|
+
}
|
|
389
|
+
if (options.withPolicy) {
|
|
390
|
+
lines.push(' stage(\'SharkCraft policy\') {');
|
|
391
|
+
lines.push(' steps {');
|
|
392
|
+
lines.push(' sh \'mkdir -p .sharkcraft/reports\'');
|
|
393
|
+
lines.push(' sh \'bun run shrk policy run --json > .sharkcraft/reports/policy.json\'');
|
|
394
|
+
if (options.withPolicySnapshotGate) {
|
|
395
|
+
lines.push(' sh \'bun run shrk policy snapshot --all --gate --json > .sharkcraft/reports/policy-snapshots.json || true\'');
|
|
396
|
+
}
|
|
397
|
+
lines.push(' }');
|
|
398
|
+
lines.push(' }');
|
|
399
|
+
}
|
|
400
|
+
if (options.withImpact) {
|
|
401
|
+
lines.push(' stage(\'SharkCraft impact\') {');
|
|
402
|
+
lines.push(' steps {');
|
|
403
|
+
lines.push(' sh \'mkdir -p .sharkcraft/reports\'');
|
|
404
|
+
lines.push(' sh \'bun run shrk impact --since origin/main --format json > .sharkcraft/reports/impact.json || true\'');
|
|
405
|
+
lines.push(' }');
|
|
406
|
+
lines.push(' }');
|
|
407
|
+
}
|
|
408
|
+
if (options.withReview) {
|
|
409
|
+
lines.push(' stage(\'SharkCraft review\') {');
|
|
410
|
+
lines.push(' steps {');
|
|
411
|
+
lines.push(' sh \'mkdir -p .sharkcraft/reports\'');
|
|
412
|
+
lines.push(' sh \'bun run shrk review packet --v3 --since origin/main --json > .sharkcraft/reports/review.json || true\'');
|
|
413
|
+
lines.push(' }');
|
|
414
|
+
lines.push(' }');
|
|
415
|
+
}
|
|
416
|
+
if (options.withReportSite) {
|
|
417
|
+
lines.push(' stage(\'SharkCraft report site\') {');
|
|
418
|
+
lines.push(' steps {');
|
|
419
|
+
lines.push(' sh \'bun run shrk report site --output .sharkcraft/reports/site || true\'');
|
|
420
|
+
lines.push(' }');
|
|
421
|
+
lines.push(' }');
|
|
422
|
+
}
|
|
423
|
+
if (options.withBundleReplay) {
|
|
424
|
+
lines.push(' stage(\'SharkCraft bundle replay\') {');
|
|
425
|
+
lines.push(' steps {');
|
|
426
|
+
lines.push(' sh \'bun run shrk bundle replay --all --report --html || true\'');
|
|
427
|
+
lines.push(' }');
|
|
428
|
+
lines.push(' }');
|
|
429
|
+
}
|
|
430
|
+
if (options.withNodeCompat) {
|
|
431
|
+
lines.push(' stage(\'compat:node\') {');
|
|
432
|
+
lines.push(' steps {');
|
|
433
|
+
lines.push(' sh \'bun run compat:node --json > .sharkcraft/reports/compat-node.json || true\'');
|
|
434
|
+
lines.push(' }');
|
|
435
|
+
lines.push(' }');
|
|
436
|
+
}
|
|
437
|
+
if (options.withReleaseReadiness) {
|
|
438
|
+
lines.push(' stage(\'Release readiness gate\') {');
|
|
439
|
+
lines.push(' steps {');
|
|
440
|
+
lines.push(' sh \'bun run shrk release readiness --json > .sharkcraft/reports/release-readiness.json\'');
|
|
441
|
+
lines.push(' }');
|
|
442
|
+
lines.push(' }');
|
|
443
|
+
}
|
|
444
|
+
lines.push(' }');
|
|
445
|
+
lines.push(' post {');
|
|
446
|
+
lines.push(' always {');
|
|
447
|
+
lines.push(' archiveArtifacts artifacts: \'.sharkcraft/reports/**/*\', allowEmptyArchive: true');
|
|
448
|
+
lines.push(' }');
|
|
449
|
+
lines.push(' }');
|
|
450
|
+
lines.push('}');
|
|
451
|
+
// Trailing comments to ease customization.
|
|
452
|
+
lines.push('');
|
|
453
|
+
lines.push('// Customization notes:');
|
|
454
|
+
lines.push('// * To install Bun on a self-hosted agent, replace the docker block above with');
|
|
455
|
+
lines.push('// a shell step that downloads bun from https://bun.sh/install.');
|
|
456
|
+
lines.push('// * Archived artifacts are under .sharkcraft/reports/. Adjust the post block to');
|
|
457
|
+
lines.push('// fan out to your artifact server / Slack notifier.');
|
|
458
|
+
lines.push('// * SharkCraft never writes outside .sharkcraft/ — safe to run on shared agents.');
|
|
459
|
+
return lines.join('\n') + '\n';
|
|
460
|
+
}
|
|
461
|
+
export function renderAzureCiWorkflow(options = {}) {
|
|
462
|
+
const bun = options.bunVersion ?? '1.1.0';
|
|
463
|
+
const lines = [];
|
|
464
|
+
lines.push('# SharkCraft CI scaffold — generated by `shrk ci scaffold azure`.');
|
|
465
|
+
lines.push('# Edit by hand if you outgrow the defaults.');
|
|
466
|
+
lines.push('trigger:');
|
|
467
|
+
lines.push(' branches:');
|
|
468
|
+
lines.push(' include:');
|
|
469
|
+
lines.push(' - main');
|
|
470
|
+
lines.push('pr:');
|
|
471
|
+
lines.push(' branches:');
|
|
472
|
+
lines.push(' include:');
|
|
473
|
+
lines.push(' - main');
|
|
474
|
+
lines.push('');
|
|
475
|
+
lines.push('pool:');
|
|
476
|
+
lines.push(' vmImage: ubuntu-latest');
|
|
477
|
+
lines.push('');
|
|
478
|
+
lines.push('stages:');
|
|
479
|
+
lines.push(' - stage: SharkCraft_Install');
|
|
480
|
+
lines.push(' jobs:');
|
|
481
|
+
lines.push(' - job: Install');
|
|
482
|
+
lines.push(' steps:');
|
|
483
|
+
lines.push(` - script: curl -fsSL https://bun.sh/install | bash -s "bun-v${bun}"`);
|
|
484
|
+
lines.push(' displayName: Install Bun');
|
|
485
|
+
lines.push(' - script: ~/.bun/bin/bun install --frozen-lockfile');
|
|
486
|
+
lines.push(' displayName: bun install');
|
|
487
|
+
lines.push(' - script: ~/.bun/bin/bun run shrk doctor');
|
|
488
|
+
lines.push(' displayName: SharkCraft doctor');
|
|
489
|
+
if (options.withQuality) {
|
|
490
|
+
lines.push(' - stage: SharkCraft_Quality');
|
|
491
|
+
lines.push(' dependsOn: SharkCraft_Install');
|
|
492
|
+
lines.push(' jobs:');
|
|
493
|
+
lines.push(' - job: Quality');
|
|
494
|
+
lines.push(' steps:');
|
|
495
|
+
lines.push(' - script: ~/.bun/bin/bun run shrk quality --ci');
|
|
496
|
+
lines.push(' displayName: shrk quality --ci');
|
|
497
|
+
lines.push(' - publish: $(System.DefaultWorkingDirectory)/.sharkcraft/reports/');
|
|
498
|
+
lines.push(' artifact: sharkcraft-quality');
|
|
499
|
+
lines.push(' condition: always()');
|
|
500
|
+
}
|
|
501
|
+
if (options.withPolicy) {
|
|
502
|
+
lines.push(' - stage: SharkCraft_Policy');
|
|
503
|
+
lines.push(' dependsOn: SharkCraft_Install');
|
|
504
|
+
lines.push(' jobs:');
|
|
505
|
+
lines.push(' - job: Policy');
|
|
506
|
+
lines.push(' steps:');
|
|
507
|
+
lines.push(' - script: |');
|
|
508
|
+
lines.push(' mkdir -p .sharkcraft/reports');
|
|
509
|
+
lines.push(' ~/.bun/bin/bun run shrk policy run --json > .sharkcraft/reports/policy.json');
|
|
510
|
+
if (options.withPolicySnapshotGate) {
|
|
511
|
+
lines.push(' ~/.bun/bin/bun run shrk policy snapshot --all --gate --json > .sharkcraft/reports/policy-snapshots.json || true');
|
|
512
|
+
}
|
|
513
|
+
lines.push(' displayName: shrk policy');
|
|
514
|
+
lines.push(' - publish: $(System.DefaultWorkingDirectory)/.sharkcraft/reports/');
|
|
515
|
+
lines.push(' artifact: sharkcraft-policy');
|
|
516
|
+
lines.push(' condition: always()');
|
|
517
|
+
}
|
|
518
|
+
if (options.withImpact) {
|
|
519
|
+
lines.push(' - stage: SharkCraft_Impact');
|
|
520
|
+
lines.push(' dependsOn: SharkCraft_Install');
|
|
521
|
+
lines.push(' jobs:');
|
|
522
|
+
lines.push(' - job: Impact');
|
|
523
|
+
lines.push(' steps:');
|
|
524
|
+
lines.push(' - script: |');
|
|
525
|
+
lines.push(' mkdir -p .sharkcraft/reports');
|
|
526
|
+
lines.push(' ~/.bun/bin/bun run shrk impact --since origin/main --format json > .sharkcraft/reports/impact.json || true');
|
|
527
|
+
lines.push(' displayName: shrk impact');
|
|
528
|
+
lines.push(' - publish: $(System.DefaultWorkingDirectory)/.sharkcraft/reports/');
|
|
529
|
+
lines.push(' artifact: sharkcraft-impact');
|
|
530
|
+
lines.push(' condition: always()');
|
|
531
|
+
}
|
|
532
|
+
if (options.withReview) {
|
|
533
|
+
lines.push(' - stage: SharkCraft_Review');
|
|
534
|
+
lines.push(' dependsOn: SharkCraft_Install');
|
|
535
|
+
lines.push(' jobs:');
|
|
536
|
+
lines.push(' - job: Review');
|
|
537
|
+
lines.push(' steps:');
|
|
538
|
+
lines.push(' - script: |');
|
|
539
|
+
lines.push(' mkdir -p .sharkcraft/reports');
|
|
540
|
+
lines.push(' ~/.bun/bin/bun run shrk review packet --v3 --since origin/main --json > .sharkcraft/reports/review.json || true');
|
|
541
|
+
lines.push(' displayName: shrk review');
|
|
542
|
+
lines.push(' - publish: $(System.DefaultWorkingDirectory)/.sharkcraft/reports/');
|
|
543
|
+
lines.push(' artifact: sharkcraft-review');
|
|
544
|
+
lines.push(' condition: always()');
|
|
545
|
+
}
|
|
546
|
+
if (options.withReportSite) {
|
|
547
|
+
lines.push(' - stage: SharkCraft_ReportSite');
|
|
548
|
+
lines.push(' dependsOn: SharkCraft_Install');
|
|
549
|
+
lines.push(' jobs:');
|
|
550
|
+
lines.push(' - job: ReportSite');
|
|
551
|
+
lines.push(' steps:');
|
|
552
|
+
lines.push(' - script: ~/.bun/bin/bun run shrk report site --output .sharkcraft/reports/site || true');
|
|
553
|
+
lines.push(' displayName: shrk report site');
|
|
554
|
+
lines.push(' - publish: $(System.DefaultWorkingDirectory)/.sharkcraft/reports/site/');
|
|
555
|
+
lines.push(' artifact: sharkcraft-report-site');
|
|
556
|
+
lines.push(' condition: always()');
|
|
557
|
+
}
|
|
558
|
+
if (options.withBundleReplay) {
|
|
559
|
+
lines.push(' - stage: SharkCraft_BundleReplay');
|
|
560
|
+
lines.push(' dependsOn: SharkCraft_Install');
|
|
561
|
+
lines.push(' jobs:');
|
|
562
|
+
lines.push(' - job: BundleReplay');
|
|
563
|
+
lines.push(' steps:');
|
|
564
|
+
lines.push(' - script: ~/.bun/bin/bun run shrk bundle replay --all --report --html || true');
|
|
565
|
+
lines.push(' displayName: shrk bundle replay');
|
|
566
|
+
lines.push(' - publish: $(System.DefaultWorkingDirectory)/.sharkcraft/reports/');
|
|
567
|
+
lines.push(' artifact: sharkcraft-bundle-replay');
|
|
568
|
+
lines.push(' condition: always()');
|
|
569
|
+
}
|
|
570
|
+
if (options.withNodeCompat) {
|
|
571
|
+
lines.push(' - stage: SharkCraft_CompatNode');
|
|
572
|
+
lines.push(' dependsOn: SharkCraft_Install');
|
|
573
|
+
lines.push(' jobs:');
|
|
574
|
+
lines.push(' - job: CompatNode');
|
|
575
|
+
lines.push(' steps:');
|
|
576
|
+
lines.push(' - script: ~/.bun/bin/bun run compat:node --json > .sharkcraft/reports/compat-node.json || true');
|
|
577
|
+
lines.push(' displayName: compat:node');
|
|
578
|
+
lines.push(' - publish: $(System.DefaultWorkingDirectory)/.sharkcraft/reports/');
|
|
579
|
+
lines.push(' artifact: sharkcraft-compat-node');
|
|
580
|
+
lines.push(' condition: always()');
|
|
581
|
+
}
|
|
582
|
+
if (options.withReleaseReadiness) {
|
|
583
|
+
lines.push(' - stage: SharkCraft_ReleaseReadiness');
|
|
584
|
+
lines.push(' dependsOn: SharkCraft_Install');
|
|
585
|
+
lines.push(' jobs:');
|
|
586
|
+
lines.push(' - job: ReleaseReadiness');
|
|
587
|
+
lines.push(' steps:');
|
|
588
|
+
lines.push(' - script: ~/.bun/bin/bun run shrk release readiness --json > .sharkcraft/reports/release-readiness.json');
|
|
589
|
+
lines.push(' displayName: shrk release readiness');
|
|
590
|
+
lines.push(' - publish: $(System.DefaultWorkingDirectory)/.sharkcraft/reports/');
|
|
591
|
+
lines.push(' artifact: sharkcraft-release-readiness');
|
|
592
|
+
lines.push(' condition: always()');
|
|
593
|
+
}
|
|
594
|
+
// Trailing comments to ease customization.
|
|
595
|
+
lines.push('');
|
|
596
|
+
lines.push('# Customization notes:');
|
|
597
|
+
lines.push('# * Self-hosted agents may already have Bun installed — drop the install script in that case.');
|
|
598
|
+
lines.push('# * Adjust artifact retention via your Azure DevOps project settings (default is 30 days).');
|
|
599
|
+
lines.push('# * SharkCraft writes only to .sharkcraft/ — never modifies source on the agent.');
|
|
600
|
+
return lines.join('\n') + '\n';
|
|
601
|
+
}
|
|
602
|
+
export function renderBundleReplayWorkflow(options = {}) {
|
|
603
|
+
const name = options.name ?? 'SharkCraft bundle replay';
|
|
604
|
+
const bun = options.bunVersion ?? '1.1.0';
|
|
605
|
+
const schedule = options.schedule ?? 'weekly';
|
|
606
|
+
const lines = [];
|
|
607
|
+
lines.push(`# Generated by \`shrk bundle replay scaffold github-actions\`.`);
|
|
608
|
+
lines.push(`name: ${name}`);
|
|
609
|
+
lines.push('on:');
|
|
610
|
+
if (schedule !== 'manual') {
|
|
611
|
+
lines.push(' schedule:');
|
|
612
|
+
lines.push(scheduleCron(schedule));
|
|
613
|
+
}
|
|
614
|
+
lines.push(' workflow_dispatch: {}');
|
|
615
|
+
lines.push('jobs:');
|
|
616
|
+
lines.push(' bundle-replay:');
|
|
617
|
+
lines.push(' runs-on: ubuntu-latest');
|
|
618
|
+
lines.push(' timeout-minutes: 15');
|
|
619
|
+
lines.push(' steps:');
|
|
620
|
+
lines.push(setup(bun));
|
|
621
|
+
lines.push(" - name: Replay all bundles");
|
|
622
|
+
lines.push(" run: |");
|
|
623
|
+
lines.push(" mkdir -p .sharkcraft/reports");
|
|
624
|
+
lines.push(" bun run shrk bundle replay --all --report --html || true");
|
|
625
|
+
if (options.withReportSite) {
|
|
626
|
+
lines.push(" - name: Build static report site");
|
|
627
|
+
lines.push(" run: bun run shrk report site --output .sharkcraft/reports/site || true");
|
|
628
|
+
}
|
|
629
|
+
lines.push(" - name: Upload replay artifacts");
|
|
630
|
+
lines.push(" if: always()");
|
|
631
|
+
lines.push(" uses: actions/upload-artifact@v4");
|
|
632
|
+
lines.push(" with:");
|
|
633
|
+
lines.push(" name: bundle-replay-report");
|
|
634
|
+
lines.push(" path: |");
|
|
635
|
+
lines.push(" .sharkcraft/reports/**");
|
|
636
|
+
lines.push(" if-no-files-found: ignore");
|
|
637
|
+
return lines.join('\n') + '\n';
|
|
638
|
+
}
|