@a-company/paradigm 6.0.5 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{b as activeRemediationsCommand,a as getActiveRemediations}from'./chunk-THAMRY4J.js';import'./chunk-5TAVYPOV.js';
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import {e,h as h$1,f as f$1,a,g as g$1}from'./chunk-WR6D3SC6.js';import'./chunk-5TAVYPOV.js';import*as f from'path';import*as h from'js-yaml';import*as c from'fs';var g=".paradigm/arch.yaml";function d(t){let i=f.join(t,g);if(!c.existsSync(i))return null;try{let r=c.readFileSync(i,"utf8");return h.load(r)}catch{return null}}function u(t){let i=n=>n.replace(/[^a-zA-Z0-9_-]/g,"-"),r=["graph TD"];for(let n of t.tiers){let o=i(n.id);r.push(` ${o}["${n.label}\\n(${n.responsibility})"]`);}for(let n of t.links){let o=i(n.from),m=i(n.to);n.via?r.push(` ${o} -->|"${n.via}"| ${m}`):r.push(` ${o} --> ${m}`);}return r.join(`
3
+ `)}async function y(t){let i=process.cwd(),r=d(i);if(!r){e("No .paradigm/arch.yaml found \u2014 create one to map your architecture."),e("Example: .paradigm/arch.yaml with version, tiers, and links fields.");return}if(t.json){let n={version:r.version,tierCount:r.tiers.length,tiers:r.tiers.map(o=>({id:o.id,label:o.label,responsibility:o.responsibility,framework:o.tech?.framework??"",componentCount:o.components.length,components:o.components})),links:r.links};h$1(n);return}f$1(`Architectural Map v${r.version}`),a("");for(let n of r.tiers)a(` ${n.label}`),g$1(" id",n.id),g$1(" responsibility",n.responsibility),n.tech?.framework&&g$1(" framework",n.tech.framework),g$1(" components",`${n.components.length} declared`),n.components.length>0&&e(` ${n.components.slice(0,5).join(", ")}${n.components.length>5?` +${n.components.length-5} more`:""}`),a("");if(r.links.length>0){a(" Links:");for(let n of r.links){let o=n.via?` via ${n.via}`:"";e(` ${n.from} \u2192 ${n.to}${o}`);}a("");}e(" Run 'paradigm arch diagram' to render a Mermaid diagram.");}async function $(t){let i=process.cwd(),r=d(i);if(!r){e("No .paradigm/arch.yaml found \u2014 cannot render diagram.");return}let n=u(r);a(n);}export{$ as archDiagramCommand,y as archStatusCommand};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import*as e from'fs/promises';import*as s from'path';import*as p from'js-yaml';async function l(r=process.cwd()){let n=s.join(r,".paradigm","remediations"),a=[],o;try{o=await e.readdir(n);}catch{return a}let u=new Date().toISOString();for(let i of o){if(i.startsWith(".")||!i.endsWith(".yaml")&&!i.endsWith(".yml"))continue;let c=s.join(n,i),d;try{if(!(await e.stat(c)).isFile())continue;d=await e.readFile(c,"utf8");}catch{continue}let t;try{t=p.load(d);}catch(m){process.stderr.write(`paradigm internal active-remediations: skipping ${i}: ${m.message}
3
+ `);continue}!t||typeof t!="object"||t.expires_at&&t.expires_at<u||!t.id||!t.claimant||!t.severity||!t.reason||a.push({id:t.id,claimant:t.claimant,severity:t.severity,reason:t.reason,...t.expires_at?{expires_at:t.expires_at}:{},...t.created?{created:t.created}:{}});}return a}async function f(r={}){let n=await l();process.stdout.write(JSON.stringify(n)+`
4
+ `);}export{l as a,f as b};