@code-partner/codepipe 0.1.137-dev.64.g8fe83af → 0.1.137-dev.66.g7c10059

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 +3 -3
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- var pe="0.1.137-dev.64.g8fe83af",ve="https://hub.dev.codepipe.dev";var Se=4,ql=4;function _r(t){return typeof t!="number"||!Number.isFinite(t)?!1:t>=ql&&t<=Se}var Ce=".codepipe-context.yaml",ir=".devpipe-context.yaml",Qn=[{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",Ce]},{version:2,summary:"Rename the format-version stamp .devpipe-context.yaml \u2192 .codepipe-context.yaml (drop the devpipe-brand leftover)",addedPaths:[Ce]}];function Or(t=2){return`# CodePipe Context Repo format version.
2
+ var pe="0.1.137-dev.66.g7c10059",ve="https://hub.dev.codepipe.dev";var Se=4,ql=4;function _r(t){return typeof t!="number"||!Number.isFinite(t)?!1:t>=ql&&t<=Se}var Ce=".codepipe-context.yaml",ir=".devpipe-context.yaml",Qn=[{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",Ce]},{version:2,summary:"Rename the format-version stamp .devpipe-context.yaml \u2192 .codepipe-context.yaml (drop the devpipe-brand leftover)",addedPaths:[Ce]}];function Or(t=2){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 Zn(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 ei(t,e=Qn){let r=[];for(let o of e)if(!(o.version<=t))for(let n of o.addedPaths)r.includes(n)||r.push(n);return r}function ti(t,e=Qn){return e.filter(r=>r.version>t)}function ct(){return{inputTokens:0,outputTokens:0,cacheReadInputTokens:0,cacheCreationInputTokens:0,totalCostUsd:0,model:"",numTurns:0,durationMs:0}}var lt=/^[a-z][a-z0-9-]{1,30}$/,Yl="-codepipe-ctx";function Ne(t){return`${t}${Yl}`}var Vl=[{name:"rework",pattern:/^@(?:codepipe|devpipe)\s+rework:\s*(.+)$/im,description:"Send the task back to ANALYZING with a new instruction.",hasArg:!0},{name:"approve",pattern:/^@(?:codepipe|devpipe)\s+approve\s*$/im,description:"Merge every PR for this task (TRACKING only)."},{name:"reject",pattern:/^@(?:codepipe|devpipe)\s+reject(?::\s*(.+))?\s*$/im,description:"Abandon this task: close any open PR(s) and move it to DONE (reason rejected_and_closed). Valid from any non-terminal phase; from early phases it just skips the task.",hasArg:!0},{name:"merge",pattern:/^@(?:codepipe|devpipe)\s+merge\s*$/im,description:"Merge the task branch into the default branch without a PR (direct apply path, apply.pull_request=false; TRACKING only)."},{name:"rebase",pattern:/^@(?:codepipe|devpipe)\s+rebase\s*$/im,description:"Re-apply the patch on top of the latest base branch and force-push. Use after a PR merge conflict or APPLYING failure."},{name:"update",pattern:/^@(?:codepipe|devpipe)\s+update(?::\s*(.+))?\s*$/im,description:"Update a conflicting PR: resolve conflicts against the current base branch (TRACKING only). Optional `: <instruction>` is forwarded to the agent.",hasArg:!0},{name:"apply",pattern:/^@(?:codepipe|devpipe)\s+apply:\s*(local|auto)\s*$/im,description:"Override apply mode for this task: local (you apply by hand) or auto.",hasArg:!0}];function Nr(t){for(let e of Vl){let r=t.match(e.pattern);if(r)return{name:e.name,args:(r[1]??"").trim()}}return null}var sr={github:"github.com",gitlab:"gitlab.com",bitbucket:"bitbucket.org"};function vt(t){let e=t.match(/^git@([^:/]+):/);if(e)return e[1]??null;let r=t.match(/^ssh:\/\/(?:[^@/]+@)?([^/:]+)/);if(r)return r[1]??null;let o=t.match(/^https?:\/\/(?:[^@/]+@)?([^/:]+)/);return o?o[1]??null:null}var ut="x-bitbucket-api-token-auth";function Ur(t){switch(t){case sr.gitlab:return"oauth2";case sr.bitbucket:return"x-token-auth";default:return"x-access-token"}}var ri=20;function L(t){return process.env[`CODEPIPE_${t}`]??process.env[`DEVPIPE_${t}`]}import{Command as Xg}from"commander";import{homedir as ai}from"node:os";import{mkdirSync as nu,readFileSync as iu,writeFileSync as su,existsSync as Lo}from"node:fs";import{dirname as li,join as Br,resolve as au}from"node:path";import{fileURLToPath as cu}from"node:url";import{existsSync as Lr,readFileSync as ni,readdirSync as Jl,writeFileSync as Xl}from"node:fs";import{dirname as Ql,join as Ke}from"node:path";import{parse as Zl}from"yaml";import{existsSync as oi,renameSync as zl}from"node:fs";function pt(t,e,r=o=>console.error(o)){if(oi(e)||!oi(t))return!1;try{return zl(t,e),r(`migrated ${t} \u2192 ${e} (DevPipe \u2192 CodePipe)`),!0}catch(o){return r(`failed to migrate ${t} \u2192 ${e}: ${o instanceof Error?o.message:String(o)} \u2014 continuing with the legacy path untouched`),!1}}var Te=".codepipe",Uo=".devpipe";function eu(t=process.cwd()){let e=t;for(;;){if(Lr(Ke(e,Te,"project.yaml")))return e;if(Lr(Ke(e,Uo,"project.yaml")))return pt(Ke(e,Uo),Ke(e,Te))&&ru(e),e;let r=Ql(e);if(r===e)return null;e=r}}function tu(t){let e=Ke(t,Te);return Lr(e)?e:Ke(t,Uo)}function ru(t){let e=Ke(t,".gitignore");if(!Lr(e))return;let r=ni(e,"utf-8"),o=r.split(/\r?\n/).map(n=>{let i=n.trim();return i===".devpipe"||i===".devpipe/"||i==="/.devpipe"||i==="/.devpipe/"?n.replace(".devpipe",".codepipe"):n}).join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-partner/codepipe",
3
- "version": "0.1.137-dev.64.g8fe83af",
3
+ "version": "0.1.137-dev.66.g7c10059",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {
@@ -28,8 +28,8 @@
28
28
  "@types/ws": "^8.5.13",
29
29
  "esbuild": "^0.21.5",
30
30
  "vitest": "2.1.9",
31
- "@codepipe/shared": "0.0.0",
32
- "@codepipe/sandbox": "0.1.0"
31
+ "@codepipe/sandbox": "0.1.0",
32
+ "@codepipe/shared": "0.0.0"
33
33
  },
34
34
  "scripts": {
35
35
  "build": "tsc -p tsconfig.json && chmod +x dist/index.js",