794e3eba3a
動機:D20 防 flag 鐵律下 self-hosted 用戶(如 Mira)不能碰 GitHub, 而「init 之後才新增的零件」(如 code 零件)唯一重裝管道 acr update 綁死 GitHub codeload → 沒有乾淨重裝路徑。 改動(只碰 CLI 下載邏輯,不動 README/cypher/mcp/tools): - deploy.ts:ARCRUN_REPO 預設 uncle6me-web/Arcrun → Leo/Arcrun; 新增 ARCRUN_GITEA_BASE(預設 https://git.uncle6.me)與 giteaToken() (ARCRUN_GITEA_TOKEN > GITEA_TOKEN,不寫死)。 - 抽出純函式 buildArchiveUrl / buildDownloadHeaders 走 Gitea archive API GET {base}/api/v1/repos/{owner}/{repo}/archive/{ref}.tar.gz,保留 #13 P2 cache-buster + no-cache 防 stale;private repo 帶 Authorization: token。 - downloadRepoTarball 改用上述;401/403 給「設 GITEA_TOKEN」提示。 - update.ts docstring 對齊(GitHub release → Gitea archive;標註 install≈update)。 install≈update:init 與 update 共用 downloadAndDeploy,其內容指紋 manifest 天然「新零件補、內容未變者略過」,故用戶跑 acr update 即補裝新零件。 測試:cli/tests/deploy-url.test.ts(Node 內建 test runner,零新依賴)8 顆全綠, 涵蓋 URL 組裝、repo/base 覆蓋、token→header、public 無 token、env 優先序。 真正打 Gitea 下載/部署是 leo 的閘,不在本 PR。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015d5jDbuqT5Htwv3Q88XXKk
48 lines
980 B
JSON
48 lines
980 B
JSON
{
|
|
"name": "arcrun",
|
|
"version": "1.3.13",
|
|
"description": "AI Workflow CLI for arcrun — self-host WASM-based AI workflows on your own Cloudflare",
|
|
"bin": {
|
|
"acr": "dist/index.js"
|
|
},
|
|
"main": "./dist/index.js",
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"dev": "tsc --watch",
|
|
"test": "node --test \"tests/**/*.test.ts\"",
|
|
"prepublishOnly": "npm run build && chmod +x dist/index.js"
|
|
},
|
|
"dependencies": {
|
|
"chalk": "^5.3.0",
|
|
"commander": "^12.0.0",
|
|
"js-yaml": "^4.1.0",
|
|
"ora": "^8.0.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/js-yaml": "^4.0.9",
|
|
"@types/node": "^20.0.0",
|
|
"typescript": "^5.4.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=18.0.0"
|
|
},
|
|
"files": [
|
|
"dist/",
|
|
"harness/"
|
|
],
|
|
"keywords": [
|
|
"cloudflare",
|
|
"workers",
|
|
"wasm",
|
|
"workflow",
|
|
"ai",
|
|
"arcrun"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/uncle6me-web/Arcrun.git"
|
|
}
|
|
}
|