{"_id":"@berryn/migration-report","_rev":"3-33a7b8bf1da6239433c6e5dd44007a76","name":"@berryn/migration-report","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@berryn/migration-report","version":"0.1.0","author":"Berryn Core Engineering Team","license":"MIT","_id":"@berryn/migration-report@0.1.0","maintainers":[{"name":"aaryan28","email":"aaryan28rwt@gmail.com"}],"homepage":"https://github.com/Grevix/berryn","bugs":{"url":"https://github.com/Grevix/berryn/issues"},"dist":{"shasum":"3603c9bcdf85946f8b62a7d8d01f398abcdd7f86","tarball":"https://registry.npmjs.org/@berryn/migration-report/-/migration-report-0.1.0.tgz","fileCount":22,"integrity":"sha512-kPTzRnV+CbRzR6zacENnfggU7hjjf6ZoqsapjpnG7FE+v7J9qqBG/VP5X8z3ZxGzZ+b/ojaxUL6UpfXeUJlcVQ==","signatures":[{"sig":"MEUCIDHhef8CXLrhghUqiSW9Idmbuo7Q1ZR3TIfPJS0rsv4vAiEA2hBo4JgXzt87bMjoPy471xYyxf2iuR1jm4i7QZVGTxM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12236},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"build":"tsc --build","clean":"rimraf dist"},"_npmUser":{"name":"aaryan28","email":"aaryan28rwt@gmail.com"},"repository":{"url":"https://github.com/Grevix/berryn.git","type":"git"},"description":"Berryn Migration Report — JSON schema validator and Markdown human summary generator","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@berryn/core":"0.1.0","@berryn/diagnostics":"0.1.0"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/migration-report_0.1.0_1787000640333_0.1670962043756936","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@berryn/migration-report","version":"0.2.0","author":"Berryn Core Engineering Team","license":"MIT","_id":"@berryn/migration-report@0.2.0","maintainers":[{"name":"aaryan28","email":"aaryan28rwt@gmail.com"}],"homepage":"https://github.com/Grevix/berryn#readme","bugs":{"url":"https://github.com/Grevix/berryn/issues"},"dist":{"shasum":"116f57ca2ca8db889340c0c1b1c8b24cbaf0119f","tarball":"https://registry.npmjs.org/@berryn/migration-report/-/migration-report-0.2.0.tgz","fileCount":18,"integrity":"sha512-ipndYLo8Pk7Ec3GjIZFBzblTvCdA7NMj/wA8xLOwJO39u4xg9X4CQ5M3Ur3XbxbFzC0ksxrcrImdRpGUVA2qUQ==","signatures":[{"sig":"MEQCIBfS1tzoehKQI4l63wCuxdcBTkbOSHXTG0+VhS6s+WesAiAyJDxE1w7ut6J9IKf3zrvD0YmZE61Y1zkh9wwU28+M3w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15395},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"build":"tsc --build","clean":"rimraf dist"},"_npmUser":{"name":"aaryan28","email":"aaryan28rwt@gmail.com"},"repository":{"url":"git+https://github.com/Grevix/berryn.git","type":"git"},"description":"Berryn Migration Report — JSON schema validator and Markdown human summary generator","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@berryn/core":"0.2.0","@berryn/diagnostics":"0.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/migration-report_0.2.0_1788157959861_0.4442540411268936","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@berryn/migration-report","version":"0.2.1","description":"Berryn Migration Report — JSON schema validator and Markdown human summary generator","repository":{"type":"git","url":"git+https://github.com/Grevix/berryn.git"},"homepage":"https://github.com/Grevix/berryn#readme","bugs":{"url":"https://github.com/Grevix/berryn/issues"},"license":"MIT","author":{"name":"Berryn Core Engineering Team"},"engines":{"node":">=22.0.0"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"type":"module","scripts":{"build":"tsc --build","clean":"rimraf dist"},"dependencies":{"@berryn/core":"0.2.1","@berryn/diagnostics":"0.2.1"},"devDependencies":{},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"gitHead":"576fa2934836ad4f045966f8a86d99490cbea05b","_id":"@berryn/migration-report@0.2.1","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-ybRWW3zouB9/2Sl7K7DGVW3lUgPC07k/8QoVko4WFobSc1eb8KIyalSy6UUBPhqGyfWzHZxVNmJQZRBRIex6DQ==","shasum":"5933035beb599a4172df9cbf4b26397fe7ccb040","tarball":"https://registry.npmjs.org/@berryn/migration-report/-/migration-report-0.2.1.tgz","fileCount":18,"unpackedSize":15396,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICz7P6RbXiywfrp8TTiyop6HKJnZ1v91kfn0tseWiGUWAiBhpiiqQlu3G4p4dol1Dbw2q7Wgzl64TyidRP/R46W7qA=="}]},"_npmUser":{"name":"aaryan28","email":"aaryan28rwt@gmail.com"},"directories":{},"maintainers":[{"name":"aaryan28","email":"aaryan28rwt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/migration-report_0.2.1_1788165876939_0.30898641329370746"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T21:04:00.109Z","modified":"2026-08-31T08:44:37.355Z","0.1.0":"2026-08-17T21:04:00.486Z","0.2.0":"2026-08-31T06:32:39.996Z","0.2.1":"2026-08-31T08:44:37.060Z"},"bugs":{"url":"https://github.com/Grevix/berryn/issues"},"author":{"name":"Berryn Core Engineering Team"},"license":"MIT","homepage":"https://github.com/Grevix/berryn#readme","repository":{"type":"git","url":"git+https://github.com/Grevix/berryn.git"},"description":"Berryn Migration Report — JSON schema validator and Markdown human summary generator","maintainers":[{"name":"aaryan28","email":"aaryan28rwt@gmail.com"}],"readme":"# @berryn/migration-report\n\n> **`BERRYN_REPORT_V1` machine-readable JSON schema validator and Markdown executive report renderer.**\n\n[![npm version](https://img.shields.io/npm/v/@berryn/migration-report.svg)](https://www.npmjs.com/package/@berryn/migration-report)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg)](https://nodejs.org)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.7%2B-blue.svg)](https://www.typescriptlang.org/)\n\n---\n\n## Overview\n\n`@berryn/migration-report` standardizes and renders evidence artifacts across all Berryn inspection, diffing, validation, and codemod workflows.\n\nIt defines the formal `BERRYN_REPORT_V1` schema, calculates overall deployability gates (`ready`, `warnings-review-required`, `blocked`), and provides renderers for:\n1. **Machine-Readable JSON**: For CI pipelines, SAST tools, and automated regression tracking.\n2. **Executive Markdown Summaries**: For Pull Request comments, compliance audit packets, and release notes.\n\n---\n\n## Installation\n\n```bash\n# Using pnpm\npnpm add @berryn/migration-report\n\n# Using npm\nnpm install @berryn/migration-report\n```\n\n---\n\n## The `BERRYN_REPORT_V1` Schema\n\n```typescript\nexport interface BERRYN_REPORT_V1 {\n  schemaVersion: '0.1.0';\n  reportType: 'inspection' | 'diff' | 'validation' | 'migration';\n  generatedAt: string;\n  summary: {\n    totalDiagnostics: number;\n    criticalCount: number;\n    errorCount: number;\n    warningCount: number;\n    deployability: 'ready' | 'warnings-review-required' | 'blocked';\n  };\n  details: unknown;\n  diagnostics: Diagnostic[];\n}\n```\n\n### Deployability Assessment Logic\n\n- **`ready`**: Zero critical security findings, zero errors, and clean execution status.\n- **`warnings-review-required`**: Non-critical warnings present (e.g. unmodeled opaque parts preserved, consumer repair notices); requires reviewer sign-off.\n- **`blocked`**: Any critical finding, structural corruption, failed validation stage, or rejected mutation.\n\n---\n\n## Usage Examples\n\n### 1. Building a Migration Report from a Result Envelope\n\n```typescript\nimport { createSuccessEnvelope, createRunContext } from '@berryn/core';\nimport { buildMigrationReport, renderReportMarkdown, renderReportJson } from '@berryn/migration-report';\n\nconst context = createRunContext();\nconst envelope = createSuccessEnvelope({ migratedFiles: 12 }, context.runMetadata);\n\n// Build structured report\nconst report = buildMigrationReport(envelope, 'migration');\n\nconsole.log(`Deployability: ${report.summary.deployability}`); // 'ready'\n```\n\n---\n\n### 2. Rendering Markdown for GitHub PR Comments\n\n```typescript\nimport { renderReportMarkdown } from '@berryn/migration-report';\n\nconst markdown = renderReportMarkdown(report);\nconsole.log(markdown);\n\n// Output:\n// # Berryn Migration & Evidence Report (MIGRATION)\n// **Schema Version**: 0.1.0\n// **Generated At**: 2026-08-18T00:00:00.000Z\n// **Deployability Status**: PASSED (Deployment Ready)\n//\n// ## Executive Summary\n// - **Total Observations**: 0\n// - **Critical Security Findings**: 0\n// - **Errors**: 0\n// - **Warnings**: 0\n```\n\n---\n\n### 3. Rendering Formatted JSON for CI Artifacts\n\n```typescript\nimport { renderReportJson } from '@berryn/migration-report';\n\nconst jsonString = renderReportJson(report);\n// Save to disk for CI pipeline consumption\n// fs.writeFileSync('berryn-evidence-report.json', jsonString);\n```\n\n---\n\n## Exported Symbols\n\n| Symbol | Type | Description |\n|---|---|---|\n| `buildMigrationReport` | Function | Transforms any `ResultEnvelope<T>` into a typed `BERRYN_REPORT_V1` structure. |\n| `renderReportMarkdown` | Function | Renders an executive Markdown summary with breakdown tables and formatted diagnostics. |\n| `renderReportJson` | Function | Formats a report into an indented JSON string. |\n| `BERRYN_REPORT_V1` | Interface | Canonical schema definition for Berryn evidence reports. |\n\n---\n\n## Links\n\n- **Repository**: [https://github.com/Grevix/berryn](https://github.com/Grevix/berryn)\n- **License**: [MIT](https://opensource.org/licenses/MIT) © 2026 Berryn Core Engineering Team\n","readmeFilename":"README.md"}