@code-partner/codepipe 0.5.4-dev.149.g10a051b → 0.5.4-dev.151.gac1ff83

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- var $h=Object.defineProperty;var R=(t,e)=>()=>(t&&(e=t(t=0)),e);var vh=(t,e)=>{for(var r in e)$h(t,r,{get:e[r],enumerable:!0})};var Te,Ye,Is=R(()=>{"use strict";Te="0.5.4-dev.149.g10a051b",Ye="https://hub.dev.codepipe.dev"});function Kn(t){return typeof t!="number"||!Number.isFinite(t)?!1:t>=xh&&t<=Ve}var Ve,xh,Qa=R(()=>{"use strict";Is();Ve=4,xh=4});var Za=R(()=>{"use strict";Is()});function Wn(t=4){return`# CodePipe Context Repo format version.
2
+ var $h=Object.defineProperty;var R=(t,e)=>()=>(t&&(e=t(t=0)),e);var vh=(t,e)=>{for(var r in e)$h(t,r,{get:e[r],enumerable:!0})};var Te,Ye,Is=R(()=>{"use strict";Te="0.5.4-dev.151.gac1ff83",Ye="https://hub.dev.codepipe.dev"});function Kn(t){return typeof t!="number"||!Number.isFinite(t)?!1:t>=xh&&t<=Ve}var Ve,xh,Qa=R(()=>{"use strict";Is();Ve=4,xh=4});var Za=R(()=>{"use strict";Is()});function Wn(t=4){return`# CodePipe Context Repo format version.
3
3
  # Bumped by the scaffold / the format-migration PR \u2014 do not edit by hand.
4
4
  template_version: ${t}
5
5
  `}function tc(t){if(!t)return 0;let e=/^\s*template_version:\s*(\d+)\s*$/m.exec(t),r=e?parseInt(e[1]??"",10):NaN;return Number.isFinite(r)&&r>=0?r:0}function rc(t,e=ec){let r=[];for(let n of e)if(!(n.version<=t))for(let o of n.addedPaths)r.includes(o)||r.push(o);return r}function nc(t,e=ec){return e.filter(r=>r.version>t)}var ze,zr,ec,oc=R(()=>{"use strict";ze=".codepipe-context.yaml",zr=".devpipe-context.yaml",ec=[{version:1,summary:"ADR section: adr/ scaffold (README, template, derived INDEX) + the format-version stamp itself",addedPaths:["adr/README.md","adr/0000-template.md","adr/INDEX.md",ze]},{version:2,summary:"Rename the format-version stamp .devpipe-context.yaml \u2192 .codepipe-context.yaml (drop the devpipe-brand leftover)",addedPaths:[ze]},{version:3,summary:"Custom project actions (the RUN tab): actions/ scaffold with the format README",addedPaths:["actions/README.md"]},{version:4,summary:"Project model (the map / VIEW): model/ scaffold with the format README",addedPaths:["model/README.md"]}]});function Je(t,e){return typeof t=="string"&&e.includes(t)}function V(t){return typeof t=="string"&&t.length>0}function Sh(t){return typeof t=="string"&&/^(system|container|component|code):.+/.test(t)}function Rh(t,e){if(!t||typeof t!="object"||Array.isArray(t))return[`${e}: must be an object`];let r=t,n=[];V(r.id)||n.push(`${e}: id must be a non-empty string`),V(r.label)||n.push(`${e}: label must be a non-empty string`),Je(r.level,Ot)||n.push(`${e}: level must be one of ${Ot.join("|")}`),r.repo!==null&&!V(r.repo)&&n.push(`${e}: repo must be a non-empty string or null`),Je(r.freshness,qn)||n.push(`${e}: freshness must be one of ${qn.join("|")}`),r.lod!==void 0&&(Je(r.lod,sc)?r.level!=="code"&&n.push(`${e}: lod is only allowed on code-level nodes`):n.push(`${e}: lod must be one of ${sc.join("|")}`));for(let o of["parent","summary","contentHash","driftReason","labeledAt"])r[o]!==void 0&&!V(r[o])&&n.push(`${e}: ${o} must be a non-empty string`);if(r.driftReason!==void 0&&r.freshness==="fresh"&&n.push(`${e}: driftReason is only allowed on a non-fresh node`),r.links!==void 0&&(Array.isArray(r.links)?r.links.forEach((o,s)=>{let i=o;(!i||typeof i!="object"||!Je(i.kind,Yn)||!V(i.ref))&&n.push(`${e}: links[${s}] must be { kind: ${Yn.join("|")}, ref }`)}):n.push(`${e}: links must be a list`)),r.source!==void 0){let o=r.source;(!o||typeof o!="object"||Array.isArray(o)||!V(o.repo))&&n.push(`${e}: source must be an object with a non-empty repo`)}if(r.layout!==void 0){let o=r.layout;(o&&typeof o=="object"&&!Array.isArray(o)?["x","y","width","height"].every(i=>typeof o[i]=="number"):!1)||n.push(`${e}: layout must carry numeric x/y/width/height`)}return n}function Ih(t,e){if(!t||typeof t!="object"||Array.isArray(t))return[`${e}: must be an object`];let r=t,n=[];return V(r.id)||n.push(`${e}: id must be a non-empty string`),Je(r.kind,ic)||n.push(`${e}: kind must be one of ${ic.join("|")}`),V(r.from)||n.push(`${e}: from must be a non-empty string`),V(r.to)||n.push(`${e}: to must be a non-empty string`),r.repo!==null&&!V(r.repo)&&n.push(`${e}: repo must be a non-empty string or null`),r.freshness!==void 0&&!Je(r.freshness,qn)&&n.push(`${e}: freshness must be one of ${qn.join("|")}`),n}function st(t){if(!t||typeof t!="object"||Array.isArray(t))return{ok:!1,errors:["shard must be an object"]};let e=t,r=[];(typeof e.modelFormatVersion!="number"||!Number.isFinite(e.modelFormatVersion))&&r.push("modelFormatVersion must be a number"),Je(e.level,Ot)||r.push(`level must be one of ${Ot.join("|")}`);let n=e.repo;n!==null&&!V(n)&&r.push("repo must be a non-empty string or null"),e.container!==void 0&&!V(e.container)&&r.push("container must be a non-empty string"),e.builtFromCommit!==null&&!V(e.builtFromCommit)&&r.push("builtFromCommit must be a non-empty string or null");let o=new Set;return Array.isArray(e.nodes)?e.nodes.forEach((s,i)=>{let a=s??{},c=V(a.id)?`node ${a.id}`:`nodes[${i}]`;r.push(...Rh(s,c)),V(a.id)&&(o.has(a.id)&&r.push(`${c}: duplicate id`),o.add(a.id)),V(n)&&(a.repo!==n&&r.push(`${c}: repo-mix \u2014 node repo must be "${n}"`),V(a.id)&&Je(a.level,Ot)&&a.level!=="system"&&!a.id.startsWith(`${a.level}:${n}:`)&&r.push(`${c}: id must start with "${a.level}:${n}:"`))}):r.push("nodes must be a list"),Array.isArray(e.edges)?e.edges.forEach((s,i)=>{let a=s??{},c=V(a.id)?`edge ${a.id}`:`edges[${i}]`;r.push(...Ih(s,c)),V(a.from)&&!o.has(a.from)&&r.push(`${c}: dangling from \u2014 must be a node of this shard`),V(a.to)&&!o.has(a.to)&&!Sh(a.to)&&r.push(`${c}: to must be a shard node or a valid node id`)}):r.push("edges must be a list"),{ok:r.length===0,errors:r}}function cc(t,e){return t.id<e.id?-1:t.id>e.id?1:0}function Vn(t){if(Array.isArray(t))return t.map(Vn);if(t&&typeof t=="object"){let e=t,r={};for(let n of Object.keys(e).sort())e[n]!==void 0&&(r[n]=Vn(e[n]));return r}return t}function Jn(t){let e={...t,nodes:[...t.nodes].sort(cc),edges:[...t.edges].sort(cc)};return`${JSON.stringify(Vn(e),null,2)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-partner/codepipe",
3
- "version": "0.5.4-dev.149.g10a051b",
3
+ "version": "0.5.4-dev.151.gac1ff83",
4
4
  "description": "CodePipe turns tasks into reviewed pull requests: an AI agent analyzes, implements, and opens a PR under your control.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",