blade-code 0.10.153 → 0.10.154
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.
- package/dist/blade.js +2 -2
- package/dist/{chunk-6tqt1z4e.js → chunk-0e4vp8pk.js} +1 -1
- package/dist/{chunk-d6wa9jw4.js → chunk-0m3ty3gq.js} +1 -1
- package/dist/{chunk-yxqknx6j.js → chunk-144c76m2.js} +1 -1
- package/dist/chunk-1x6vnqsv.js +1 -0
- package/dist/{chunk-0rrsg4kr.js → chunk-26e0mbfr.js} +1 -1
- package/dist/{chunk-e79hnphk.js → chunk-283cjrxa.js} +1 -1
- package/dist/{chunk-apj2d8m4.js → chunk-28sw5wx1.js} +4 -4
- package/dist/{chunk-vwcmexzs.js → chunk-3659a95p.js} +1 -1
- package/dist/{chunk-n1wmxr6b.js → chunk-3gnxsahn.js} +1 -1
- package/dist/{chunk-bbr1d6ja.js → chunk-3hma3h13.js} +1 -1
- package/dist/{chunk-5cjkdspz.js → chunk-5gfeesjx.js} +1 -1
- package/dist/{chunk-tr53wy7e.js → chunk-5q46xs9r.js} +1 -1
- package/dist/{chunk-7r4krjpv.js → chunk-6843kgys.js} +1 -1
- package/dist/{chunk-0s7ge5cg.js → chunk-7yaefjh4.js} +1 -1
- package/dist/{chunk-pmz4g8b5.js → chunk-9y8nc7rr.js} +1 -1
- package/dist/chunk-bsbwrp47.js +1 -0
- package/dist/{chunk-5a34xdwz.js → chunk-bzkxwkfg.js} +1 -1
- package/dist/{chunk-r6xj1acg.js → chunk-c239v2a5.js} +1 -1
- package/dist/{chunk-9yrc4b5z.js → chunk-czgws642.js} +1 -1
- package/dist/{chunk-n2jknnxd.js → chunk-ddh5fhs3.js} +1 -1
- package/dist/{chunk-r03w22b9.js → chunk-fh0x8k4q.js} +1 -1
- package/dist/chunk-gq5g8g9f.js +181 -0
- package/dist/{chunk-17kwvk25.js → chunk-hbraqszv.js} +1 -1
- package/dist/{chunk-cbz8jnyh.js → chunk-hy3yd7pb.js} +1 -1
- package/dist/{chunk-exrpjnq0.js → chunk-kzgr6zxy.js} +1 -1
- package/dist/{chunk-3s90k8kw.js → chunk-mc7bxkxq.js} +1 -1
- package/dist/{chunk-4ah2qpdc.js → chunk-nzkp0b76.js} +1 -1
- package/dist/{chunk-4rzjfyct.js → chunk-qkhzq36q.js} +1 -1
- package/dist/{chunk-1tsk12rv.js → chunk-rqs5jhxy.js} +1 -1
- package/dist/{chunk-3mwp6np2.js → chunk-sbq1hr8r.js} +1 -1
- package/dist/{chunk-s2f5h9f0.js → chunk-t2y78e91.js} +2 -2
- package/dist/{chunk-03kmyz6a.js → chunk-t6d1nar0.js} +1 -1
- package/dist/{chunk-2yze161j.js → chunk-v7wga64a.js} +1 -1
- package/dist/{chunk-vsnj25d6.js → chunk-va83r9rt.js} +1 -1
- package/dist/{chunk-5633t7kk.js → chunk-vadatgv1.js} +1 -1
- package/dist/{chunk-wxty7syn.js → chunk-wm4pvxjm.js} +1 -1
- package/dist/{chunk-vt4xe4gs.js → chunk-y6mg1388.js} +1 -1
- package/dist/{chunk-382rz0kw.js → chunk-yz483dtj.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-4mhk38my.js +0 -1
- package/dist/chunk-5reazqcx.js +0 -181
- package/dist/chunk-h00gmma4.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{readFileSync as l}from"node:fs";import{dirname as o,join as d}from"node:path";import{fileURLToPath as u}from"node:url";var e={name:"blade-code",version:"0.10.
|
|
1
|
+
import{readFileSync as l}from"node:fs";import{dirname as o,join as d}from"node:path";import{fileURLToPath as u}from"node:url";var e={name:"blade-code",version:"0.10.154",private:!1,description:"🗡️ Blade Code - 智能代码助手命令行工具",type:"module",bin:{blade:"dist/blade.js"},files:["dist","vendor/ripgrep/**","README.md"],scripts:{dev:"node scripts/run-bun.js --watch src/blade.tsx","dev:serve":"node scripts/run-bun.js --watch src/blade.tsx serve --port 4097",build:"rm -rf dist && node scripts/run-bun.js run scripts/build.ts",start:"node scripts/run-bun.js run dist/blade.js",test:"node scripts/test.js","test:all":"node scripts/test.js all","test:unit":"node scripts/test.js unit","test:integration":"node scripts/test.js integration","test:real-api":"node scripts/test.js realApi","test:real-api:qualification":"node scripts/test.js realApiQualification","test:cli":"node scripts/test.js cli","test:headless-core":"node scripts/test.js headlessCore","test:e2e":"node scripts/test.js e2e","test:performance":"node scripts/test.js performance","test:snapshot":"node scripts/test.js snapshot","test:security":"node scripts/test.js security","browser:install":"playwright install chromium","browser:check":"node scripts/run-bun.js run scripts/browser-check.ts","test:coverage":"node scripts/test.js all --coverage","test:watch":"vitest --watch --config vitest.config.ts","qualify:local":"node scripts/run-bun.js run scripts/qualify.ts local","qualify:production":"node scripts/run-bun.js run scripts/qualify.ts production","benchmark:repo":"node scripts/run-bun.js run scripts/run-real-repo-benchmark.ts","test:update-snapshots":"node scripts/test.js snapshot --update",lint:"biome lint src tests","lint:fix":"biome lint --write src tests","type-check":"tsc --noEmit","format:check":"biome format src tests",ready:"node scripts/run-bun.js run scripts/qualify.ts production","detect-unused":"node scripts/run-bun.js run scripts/detect-unused.ts",prepack:"node scripts/run-bun.js run build",release:"node scripts/release.js","release:dry":"node scripts/release.js --dry-run","release:major":"node scripts/release.js --major","release:minor":"node scripts/release.js --minor","release:patch":"node scripts/release.js --patch"},keywords:["cli","blade","ai","assistant","agent","llm"],author:"echoVic",license:"MIT",repository:{type:"git",url:"git+https://github.com/echoVic/blade-code.git"},homepage:"https://github.com/echoVic/blade-code#readme",bugs:{url:"https://github.com/echoVic/blade-code/issues"},engines:{node:">=22.19.0"},optionalDependencies:{"@vscode/ripgrep":"^1.18.0","better-sqlite3":"^11.8.1","bun-pty":"^0.4.8","node-pty":"1.1.0"},dependencies:{"@agentclientprotocol/sdk":"^1.3.0","@anthropic-ai/sandbox-runtime":"0.0.67","@earendil-works/pi-ai":"0.84.2","@inkjs/ui":"^2.0.0","@modelcontextprotocol/sdk":"^1.30.0",ahooks:"^3.9.7",ajv:"^8.17.1","ansi-escapes":"^7.3.0","async-mutex":"^0.5.0",axios:"^1.19.0",chalk:"^5.4.1",diff:"^8.0.2","fast-glob":"^3.3.3","fuse.js":"^7.5.0","gray-matter":"^4.0.3",hono:"^4.13.0",ink:"npm:@jrichman/ink@6.4.10","ink-big-text":"^2.0.0","ink-gradient":"^3.0.0","ink-select-input":"^6.2.0","ink-spinner":"^5.0.0","ink-text-input":"^6.0.0","js-tiktoken":"^1.0.21","lodash-es":"^4.18.1",lowlight:"^3.3.0","lru-cache":"^11.5.2",nanoid:"^5.1.6",open:"^10.1.2",picomatch:"^4.0.5",playwright:"1.62.1","proper-lockfile":"^4.1.2",react:"19.2.4","react-dom":"19.2.4",semver:"^7.8.5","string-width":"^8.2.2",typebox:"1.3.10",undici:"^7.16.0","vscode-jsonrpc":"8.2.1","vscode-languageserver-protocol":"3.17.5","vscode-languageserver-types":"3.17.5","write-file-atomic":"^7.0.0",ws:"^8.21.2",yaml:"^2.9.0",yargs:"^18.1.0",zustand:"^5.0.14"},devDependencies:{"@biomejs/biome":"2.5.7","@types/bun":"^1.3.14","@types/json-schema":"^7.0.15","@types/lodash-es":"^4.17.12","@types/node":"^22.15.24","@types/picomatch":"^4.0.3","@types/proper-lockfile":"^4.1.4","@types/react":"19.2.10","@types/react-dom":"19.2.3","@types/semver":"^7.8.0","@types/write-file-atomic":"^4.0.3","@types/ws":"^8.18.1","@types/yargs":"^17.0.35","@vitest/coverage-v8":"^4.1.10",jsdom:"^26.0.0",typescript:"^5.9.2",vitest:"^4.1.10"}};var s;function r(){if(s)return s;let i=o(u(import.meta.url));for(let n=0;n<5;n++){try{let t=JSON.parse(l(d(i,"package.json"),"utf8"));if(t.name===e.name&&typeof t.version==="string"&&typeof t.description==="string")return s=t,s}catch{}i=o(i)}return s={name:e.name,version:process.env.BLADE_VERSION??e.version,description:e.description},s}function y(){return{...r()}}function p(){return r().version}function v(){return r().name}function w(){return r().description}function g(){return`v${p()}`}function f(){return`v${p()} © 2025 Blade Code`}
|
|
2
2
|
export{y as Vj,p as Wj,v as Xj,w as Yj,g as Zj,f as _j};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Wj as I}from"./chunk-
|
|
1
|
+
import{Wj as I}from"./chunk-y6mg1388.js";import{Lk as f}from"./chunk-sdapqhj0.js";import*as j from"fs/promises";import*as S from"path";import X from"semver";import{ProxyAgent as R,fetch as k}from"undici";function x(){return process.env.HTTPS_PROXY||process.env.HTTP_PROXY||process.env.https_proxy||process.env.http_proxy}function L(){let z=x();if(z)try{return new R(z)}catch(q){console.warn(`[proxyFetch] Invalid proxy URL: ${z}`)}return}async function F(z,q,Z){let{timeout:W=30000,signal:J,...Q}=q;if(J?.aborted)throw new DOMException("The operation was aborted.","AbortError");let Y=L(),$=new AbortController,w=!1,y=setTimeout(()=>{w=!0,$.abort()},W),T=()=>$.abort();J?.addEventListener("abort",T);let D;try{let B={method:Q.method,headers:Q.headers,body:Q.body,signal:$.signal,dispatcher:Y};return D=await k(z.toString(),B),await Z(D)}catch(B){if(B instanceof Error&&B.name==="AbortError"){if(w)throw Error(`Request timeout after ${W}ms`);throw B}throw B}finally{if(clearTimeout(y),J?.removeEventListener("abort",T),$.abort(),D?.body&&!D.body.locked)await D.body.cancel().catch(()=>{return});await Y?.destroy?.().catch(()=>{return})}}var O="blade-code",G="https://cdn.jsdelivr.net/npm/blade-code@latest/CHANGELOG.md",H=S.join(process.env.HOME||process.env.USERPROFILE||".",".blade"),N=S.join(H,"version-cache.json"),_=3600000,g=`https://registry.npmjs.org/${O}/latest`,M=null;async function P(){try{if(process.env.BLADE_VERSION)return process.env.BLADE_VERSION;return I()}catch{return"unknown"}}async function b(){try{let z=await j.readFile(N,"utf-8"),q=JSON.parse(z);if(Date.now()-q.checkedAt<_)return q;return{...q,checkedAt:0}}catch{return null}}async function K(z){try{await j.mkdir(H,{recursive:!0,mode:493}),await j.writeFile(N,JSON.stringify(z,null,2))}catch{}}async function E(){try{return await F(g,{timeout:5000,headers:{Accept:"application/json"}},async(z)=>{if(!z.ok)return null;let q=await z.json();if(!q||typeof q!=="object"||!("version"in q))return null;return typeof q.version==="string"&&X.valid(q.version)?q.version:null})}catch{return null}}async function A(z=!1){let q=await P(),Z=G;if(q==="unknown")return{currentVersion:q,latestVersion:null,hasUpdate:!1,shouldPrompt:!1,releaseNotesUrl:Z,error:"Unable to determine current version"};let W=await b(),J=W?.skipUntilVersion,Q=null;if(!z&&W?.latestVersion&&W.checkedAt>0)Q=W.latestVersion;else if(Q=await E(),J=(await b())?.skipUntilVersion??J,Q)await K({latestVersion:Q,checkedAt:Date.now(),skipUntilVersion:J});else if(W?.latestVersion)await K({checkedAt:0,skipUntilVersion:J});if(!Q||!X.valid(Q))return{currentVersion:q,latestVersion:null,hasUpdate:!1,shouldPrompt:!1,releaseNotesUrl:Z,error:"Unable to check for updates"};if(X.lt(Q,q))Q=q,await K({latestVersion:Q,checkedAt:Date.now(),skipUntilVersion:J});let Y=X.gt(Q,q),$=Y;if(Y&&J)$=X.gt(Q,J);return{currentVersion:q,latestVersion:Q,hasUpdate:Y,shouldPrompt:$,releaseNotesUrl:Z}}async function V(z){let q=await b();await K({latestVersion:q?.latestVersion??z,checkedAt:q?.checkedAt||Date.now(),skipUntilVersion:z})}function v(){return`npm install -g ${O}@latest --registry https://registry.npmjs.org`}async function p(){let{spawn:z}=await import("child_process");return new Promise((q)=>{let Z=v(),W=z(Z,{stdio:"inherit",shell:!0});W.on("close",(J)=>{if(J===0)q({success:!0,message:"Upgrade successful! Please restart blade."});else q({success:!1,message:`Upgrade failed (exit code: ${J})`})}),W.on("error",(J)=>{q({success:!1,message:`Upgrade failed: ${J.message}`})})})}async function h(){try{let z=await b();if(!z?.latestVersion||!X.valid(z.latestVersion)||!z.checkedAt){if(!M)M=A(!0).then(()=>{return},()=>{return}).finally(()=>{M=null});return null}let q=await P();if(!X.valid(q)||!X.gt(z.latestVersion,q)||z.skipUntilVersion&&X.valid(z.skipUntilVersion)&&!X.gt(z.latestVersion,z.skipUntilVersion))return null;return{currentVersion:q,latestVersion:z.latestVersion,hasUpdate:!0,shouldPrompt:!0,releaseNotesUrl:G}}catch{return null}}
|
|
2
2
|
export{A as k,V as l,v as m,p as n,h as o};
|
package/package.json
CHANGED
package/dist/chunk-4mhk38my.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{qf as a,rf as b}from"./chunk-exrpjnq0.js";import"./chunk-vt4xe4gs.js";import"./chunk-sdapqhj0.js";export{a as globalOptions,b as cliConfig};
|