@arcforge/axon 2.0.44 → 2.0.46
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/app.js +38 -38
- package/package.json +1 -1
- package/update-helper.js +1 -1
package/package.json
CHANGED
package/update-helper.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{mkdir as X,rename as Y,writeFile as Z}from"fs/promises";import{dirname as $}from"path";var V=4;async function w(j,q={}){let z=q.run??F,D=q.sleep??Bun.sleep;await R(j.state,{status:"running",from:j.from,to:j.to,updatedAt:new Date().toISOString()}),process.stdout.write(`
|
|
3
3
|
Updating Axon ${j.from} \u2192 ${j.to}\u2026
|
|
4
|
-
`);let J={code:1,stdout:""};for(let G=1;G<=V;G++){if(J=await z([j.bun,"add","-g",`@arcforge/axon@${j.to}`]),J.code===0)break;if(G<V){let Q=1000*2**(G-1);process.stderr.write(`Axon ${j.to} is not available from this npm edge yet; retrying in ${Q/1000}s\u2026
|
|
4
|
+
`);let J={code:1,stdout:""};for(let G=1;G<=V;G++){if(J=await z([j.bun,"add","-g","--no-cache",`@arcforge/axon@${j.to}`]),J.code===0)break;if(G<V){let Q=1000*2**(G-1);process.stderr.write(`Axon ${j.to} is not available from this npm edge yet; retrying in ${Q/1000}s\u2026
|
|
5
5
|
`),await D(Q)}}if(J.code===0){let G=await z([j.axon,"--version"]);if(G.code===0&&G.stdout.trim()===j.to)return await R(j.state,{status:"complete",from:j.from,to:j.to,updatedAt:new Date().toISOString()}),process.stdout.write(`\u2713 Axon ${j.to} installed. Run axon to continue.
|
|
6
6
|
|
|
7
7
|
`),0}process.stderr.write(`Axon update failed verification; restoring the previous version\u2026
|