@code-partner/codepipe 0.1.133-dev.36.g427f8ee → 0.1.133

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 ce="0.1.133-dev.36.g427f8ee",me="https://hub.dev.codepipe.dev";var ge=2,Wc=1;function mr(t){return typeof t!="number"||!Number.isFinite(t)?!1:t>=Wc&&t<=ge}var ve=".devpipe-context.yaml",Sn=[{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",ve]}];function gr(t=1){return`# CodePipe Context Repo format version.
2
+ var ce="0.1.133",me="https://hub.codepipe.dev";var ge=2,Wc=1;function mr(t){return typeof t!="number"||!Number.isFinite(t)?!1:t>=Wc&&t<=ge}var ve=".devpipe-context.yaml",Sn=[{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",ve]}];function gr(t=1){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 Cn(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 Tn(t,e=Sn){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 Rn(t,e=Sn){return e.filter(r=>r.version>t)}function hr(){return{inputTokens:0,outputTokens:0,cacheReadInputTokens:0,cacheCreationInputTokens:0,totalCostUsd:0,model:"",numTurns:0,durationMs:0}}function In(t){return!(!t||t.length>250||!/^[A-Za-z0-9._/-]+$/.test(t)||/^[-/.]/.test(t)||/[/.]$/.test(t)||t.endsWith(".lock")||t.includes("..")||t.includes("//")||t.includes("/."))}var ze=/^[a-z][a-z0-9-]{1,30}$/,qc="-codepipe-ctx";function Se(t){return`${t}${qc}`}var Gt={github:"github.com",gitlab:"gitlab.com",bitbucket:"bitbucket.org"};function ut(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 Je="x-bitbucket-api-token-auth";function yr(t){switch(t){case Gt.gitlab:return"oauth2";case Gt.bitbucket:return"x-token-auth";default:return"x-access-token"}}var Pn=20;function N(t){return process.env[`CODEPIPE_${t}`]??process.env[`DEVPIPE_${t}`]}import{Command as mm}from"commander";import{homedir as Nn}from"node:os";import{mkdirSync as rl,readFileSync as ol,writeFileSync as nl,existsSync as wo}from"node:fs";import{dirname as Un,join as kr,resolve as il}from"node:path";import{fileURLToPath as sl}from"node:url";import{existsSync as wr,readFileSync as En,readdirSync as Vc,writeFileSync as zc}from"node:fs";import{dirname as Jc,join as Ae}from"node:path";import{parse as Xc}from"yaml";import{existsSync as jn,renameSync as Yc}from"node:fs";function Xe(t,e,r=o=>console.error(o)){if(jn(e)||!jn(t))return!1;try{return Yc(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 he=".codepipe",yo=".devpipe";function Qc(t=process.cwd()){let e=t;for(;;){if(wr(Ae(e,he,"project.yaml")))return e;if(wr(Ae(e,yo,"project.yaml")))return Xe(Ae(e,yo),Ae(e,he))&&el(e),e;let r=Jc(e);if(r===e)return null;e=r}}function Zc(t){let e=Ae(t,he);return wr(e)?e:Ae(t,yo)}function el(t){let e=Ae(t,".gitignore");if(!wr(e))return;let r=En(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.133-dev.36.g427f8ee",
3
+ "version": "0.1.133",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {