@junobuild/cli 0.6.6 → 0.6.7

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 +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -668,7 +668,7 @@ tell application "System Events" to get value of property list item "CFBundleNam
668
668
  ${(0,Vn.yellow)("--container-url")} Override a custom container URL. If not provided, defaults to production or the local container in development mode.
669
669
  ${(0,Vn.yellow)("--console-url")} Specify a custom URL to access the developer Console.`,PO=`${(0,Vn.yellow)("-l, --lang")} Specify the language for building the serverless functions: ${(0,Vn.magenta)("rust")}, ${(0,Vn.magenta)("typescript")} or ${(0,Vn.magenta)("javascript")}.
670
670
  ${(0,Vn.yellow)("--cargo-path")} Path to the Rust manifest.
671
- ${(0,Vn.yellow)("--source-path")} Optional path to the TypeScript or JavaScript entry file.`,AO=`The option ${(0,Vn.yellow)("--keep-staged")} only applies when ${(0,Vn.yellow)("--no-apply")} is NOT used (i.e. the change is applied immediately).`;var Xt=e=>Jt({args:e,options:["-d","--doc"]})?"doc":"cli";var Si=oe(Qe(),1);var uE="0.6.6";var Jnt=` __ __ __ __ _ ____
671
+ ${(0,Vn.yellow)("--source-path")} Optional path to the TypeScript or JavaScript entry file.`,AO=`The option ${(0,Vn.yellow)("--keep-staged")} only applies when ${(0,Vn.yellow)("--no-apply")} is NOT used (i.e. the change is applied immediately).`;var Xt=e=>Jt({args:e,options:["-d","--doc"]})?"doc":"cli";var Si=oe(Qe(),1);var uE="0.6.7";var Jnt=` __ __ __ __ _ ____
672
672
  __) || | || \\| |/ \\
673
673
  \\___/ \\___/ |_|\\__|\\____/`,Ht=`${Jnt} CLI ${(0,Si.grey)(`v${uE}`)}`,rfe=`Juno CLI ${(0,Si.grey)(`v${uE}`)}`,lE=`
674
674
  ${Ht}
@@ -973,7 +973,7 @@ ${T5}
973
973
 
974
974
  ${nFe}
975
975
  `,iFe=e=>{console.log(Xt(e)==="doc"?Kar:Har)};var cFe=oe(et(),1);var uG=oe(Qe(),1);import{dirname as Yar}from"node:path";var Mk="/_juno/releases";import{readFile as Gar}from"node:fs/promises";var sFe=async({path:e})=>{let t=await Gar(e);return await aFe({buffer:t})},oFe=async({wasmModule:e})=>{let t=Buffer.from(e);return await aFe({buffer:t})},aFe=async({buffer:e})=>{let t=vre(e),r=t?await bre({source:e}):e,n=await cCe({wasm:r}),i=await aCe({wasm:r,junoPackage:n});return{gzipped:t,junoPackage:n,buildType:i}};var uFe=async e=>{let{satellite:t}=await nn(),n=jt({args:e,option:"-s"})??jt({args:e,option:"--src"})??`${Os}.gz`;await Jar({args:e,src:n,satellite:t})},Jar=async({args:e,src:t,satellite:r})=>{let{junoPackage:n,gzipped:i}=await sFe({path:t});if((0,cFe.isNullish)(n))return console.log((0,uG.red)("No Juno Package metadata detected.")),console.log("Are you using the latest libraries and tooling?"),{result:"error"};let{version:s}=n;if(!i)return console.log((0,uG.red)("The submitted WASM file must be gzipped.")),{result:"error"};let o=`${Mk}/satellite-${crypto.randomUUID()}.wasm.gz`,a=await Xar({satellite:r,version:s,args:e,filePath:t,fullPath:o});if(a.result!=="deployed")return a;let{proposalId:c}=a;return await rk({args:e,proposalId:c}),a},Xar=async({args:e,satellite:t,fullPath:r,filePath:n,version:i})=>{let s=Jt({args:e,options:["--no-apply"]}),o=async({fullPath:l,headers:p=[],satellite:d,proposalId:f,data:h,...m})=>{await m2({cdn:{satellite:d},proposalId:f,asset:{...m,data:h,fullPath:l??r,headers:[...p,["Access-Control-Allow-Origin",oi.console.urls.root]],token:crypto.randomUUID(),description:`change=${f};version=${i}`}})},a=async l=>{let p={...l,satellite:t};await o(p)},c=async()=>{await ek()},u=Yar(n);return await Ire({publish:{uploadFile:a,fullPath:r,filePath:n,sourceAbsolutePath:u,assertMemory:c},proposal:{autoCommit:!s,cdn:{satellite:t},version:i}})};var hG=oe(et(),1);var qk=oe(Qe(),1),fG=oe(ju(),1);var lFe=oe(et(),1);var pG=oe(ju(),1);var lG=async()=>{let e=await fetch(`${uO}/releases/metadata.json`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)throw new Error("Fetching releases metadata failed.");return await e.json()};var pFe=async e=>{try{let r=(await lG())[e].sort((i,s)=>(0,pG.compare)(i,s));return(i=>{let{length:s,[s-1]:o}=i;return o})(r)}catch{return}},dFe=async({currentVersion:e,assetKeys:t})=>{try{return{result:(await lG())[t].filter(n=>(0,pG.compare)(e,n)===-1)}}catch{return{result:void 0,error:"Cannot fetch new releases from Juno's CDN \u{1F622}."}}},Af=e=>{let t=Jt({args:e,options:["--no-snapshot"]}),r=Jt({args:e,options:["--clear-chunks"]});return{noSnapshot:t,preClearChunks:r}},hm=({success:e,err:t,successMessage:r})=>{if(e){console.log(`\u2705 ${r}`);return}if(!(0,lFe.isNullish)(t)){if(t instanceof CT){console.log(`\u{1F645}\u200D\u2642\uFE0F ${t.message}`);return}throw t}};var fFe=oe(et(),1);var F0=oe(Qe(),1);var Lk=e=>{switch(e){case"orbiter":return"orbiters";case"mission_control":return"mission_controls";default:return"satellites"}},mm=e=>e.replace("_"," ");var hFe=async({satellite:e,wasmModule:t})=>{let r=globalThis.console.warn;globalThis.console.warn=()=>null;let[n,i]=await Promise.allSettled([oFe({wasmModule:t}),OCe({satellite:e})]);if(globalThis.console.warn=r,n.status==="rejected")throw new Error("The custom sections of the WASM module you try to upgrade cannot be read.");if(i.status==="rejected")return;let{value:s}=n,{value:o}=i,{buildType:a}=s,c=o==="extended"&&(a==="stock"||(0,fFe.isNullish)(a));if(ip()&&c)throw new Error("Your satellite uses serverless functions. Reverting to the stock version would remove your custom features! ");c&&await ai(`Your satellite uses ${(0,F0.cyan)("serverless functions")}.${Ms}However, you are about to revert it to the ${(0,F0.yellow)("stock")} version which will remove your custom features!${Ms}Are you sure you want to proceed?`)},mFe=async({assetKey:e,moduleId:t,hash:r,reset:n})=>{await ai(`Upgrade ${mm(e)} ${(0,F0.cyan)(t)} with Wasm hash ${(0,F0.magenta)(r)}${Ms}Start upgrade${n?" and reset":""} now?`)};var Uk=oe(et(),1);var Of=oe(Qe(),1);import{createHash as yFe}from"node:crypto";import{readFile as Qar}from"node:fs/promises";var gFe=oe(Cu(),1);var bFe=async({upgrade:e,wasm:t,hash:r,assert:n,reset:i=!1,assetKey:s,moduleId:o})=>{await n?.({wasmModule:t}),Xpe()&&await mFe({hash:r,reset:i,assetKey:s,moduleId:o}),console.log("");let a=di().start(),c=({step:u})=>{switch(u){case w0.AssertingExistingCode:a.text="Validating if an upgrade is needed...";break;case w0.StoppingCanister:a.text=`Stopping ${mm(s)} before upgrade...`;break;case w0.TakingSnapshot:a.text=`Creating a snapshot for your ${mm(s)}...`;break;case w0.UpgradingCode:a.text=`Upgrading${i?" and resetting state":""}...`;break;case w0.RestartingCanister:a.text=`Restarting ${mm(s)}...`;break}};try{await e({wasmModule:t,onProgress:c}),a.stop(),console.log("\u{1F680} All systems go. Upgrade complete!")}catch(u){if(a.stop(),u instanceof CT){console.log((0,Of.yellow)(u.message));return}throw u}},l_=async({src:e,upgrade:t,reset:r,assert:n,assetKey:i,moduleId:s})=>{let o=async c=>{let u=await Qar(c);return{wasm:u,hash:yFe("sha256").update(u).digest("hex")}},a=di("Loading Wasm...").start();try{let{hash:c,wasm:u}=await o(e);return a.stop(),await bFe({upgrade:t,wasm:u,hash:c,reset:r,assert:n,assetKey:i,moduleId:s}),{success:!0}}catch(c){return a.stop(),{success:!1,err:c}}},p_=async({version:e,assetKey:t,...r})=>{let n={url:uO,path:`/releases/${t}-v${e}.wasm.gz`};return await dG({...r,assetKey:t,cdn:n})},dG=async({assetKey:e,moduleId:t,upgrade:r,assert:n,reset:i,cdn:s})=>{let o=async()=>{let{url:c,path:u,customHost:l}=s,{hostname:p,port:d,protocol:f}=new URL(c),h=await ER({hostname:p,protocol:f,...(0,Uk.notEmptyString)(d)&&{port:d},path:u,headers:{"Accept-Encoding":"gzip, deflate, br",...(0,Uk.nonNullish)(l)&&{Host:l}}});return{wasm:h,hash:yFe("sha256").update(h).digest("hex")}},a=di("Downloading Wasm...").start();try{let{hash:c,wasm:u}=await o();return a.stop(),await bFe({upgrade:r,wasm:u,hash:c,reset:i,assert:n,assetKey:e,moduleId:t}),{success:!0}}catch(c){return a.stop(),{success:!1,err:c}}},vFe=async e=>{let t=di("Setting back custom domains...").start();try{await qF(e)}finally{t.stop()}},ecr=async({newerReleases:e,assetKey:t})=>{let r=e.map(i=>({title:`v${i}`,value:i})),{version:n}=await(0,gFe.default)({type:"select",name:"version",message:`To which version should your ${mm(t)} be upgraded?`,choices:r,initial:0});return Li(n),n},d_=async({currentVersion:e,assetKey:t,displayHint:r})=>{let{result:n,error:i}=await dFe({currentVersion:e,assetKeys:Lk(t)});if(i!==void 0){console.log((0,Of.red)(i));return}if(n===void 0){console.log((0,Of.red)("Did not find any new releases of Juno \u{1F622}."));return}if(n.length===0){console.log("Currently, there are no new releases available.");return}if(n.length===1){let[a]=n;return console.log(`Auto-selecting upgrade to ${(0,Of.green)(`v${a}`)}.`),a}let s=await ecr({newerReleases:n,assetKey:t}),{canUpgrade:o}=oCe({currentVersion:e,selectedVersion:s});if(!o){console.log(`There may have been breaking changes between your ${r} ${(0,Of.yellow)(`v${e}`)} and selected version ${(0,Of.yellow)(`v${s}`)}.
976
- Please upgrade iteratively.`);return}return s},rS=async({args:e,assetKey:t})=>Jt({args:e,options:["-r","--reset"]})?(await ai(`\u26A0\uFE0F Are you absolutely sure you want to upgrade and reset (\u2757\uFE0F) your ${mm(t)} to its initial state?`),!0):!1;var _Fe=async e=>{let{satellite:t}=await nn(),{satelliteId:r}=t;console.log(`${Ms}Initiating upgrade for satellite ${(0,qk.cyan)(r)}.${Ms}`);let n=s=>{hm({...s,successMessage:"Satellite successfully upgraded."})};if(Jt({args:e,options:["-s","--src"]})){let s=await tcr({satellite:t,args:e});n(s);return}let i=await rcr({satellite:t,args:e});n(i)},tcr=async({satellite:e,args:t})=>{let r=jt({args:t,option:"-s"})??jt({args:t,option:"--src"});return(0,hG.isNullish)(r)?(console.log((0,qk.red)("No source file provided.")),{success:!1}):await mG({satellite:e,src:r})},mG=async({src:e,satellite:t,...r})=>await EFe({...r,satellite:t,upgradeFn:async i=>await l_({src:e,assetKey:"satellite",moduleId:t.satelliteId,...i})}),xFe=async({cdn:e,satellite:t,...r})=>await EFe({...r,satellite:t,upgradeFn:async i=>await dG({cdn:e,assetKey:"satellite",moduleId:t.satelliteId,...i})}),EFe=async({satellite:e,args:t,upgradeFn:r})=>{let n=await S0({satellite:e}),{noSnapshot:i,preClearChunks:s}=Af(t);return await wFe({satellite:e,args:t,currentVersion:n,preClearChunks:s,noSnapshot:i,upgrade:r})},rcr=async({satellite:e,args:t})=>{let r=await S0({satellite:e}),n=`satellite "${await NF(e.satelliteId)}"`,i=await d_({currentVersion:r,assetKey:oO,displayHint:n});if((0,hG.isNullish)(i))return{success:!1};let{noSnapshot:s,preClearChunks:o}=Af(t);return await wFe({satellite:e,args:t,currentVersion:r,preClearChunks:o,noSnapshot:s,upgrade:async c=>await p_({version:i,assetKey:"satellite",moduleId:e.satelliteId,...c})})},wFe=async({satellite:e,args:t,currentVersion:r,upgrade:n,preClearChunks:i,noSnapshot:s})=>{let o=await rS({args:t,assetKey:"satellite"}),a=o?await lm({satellite:e}):[],c=async d=>{await ACe({satellite:e,...d,deprecated:(0,fG.compare)(r,"0.0.7")<0,deprecatedNoScope:(0,fG.compare)(r,"0.0.9")<0,...o&&{reset:o},preClearChunks:i,...s&&{takeSnapshot:!1}})},u=async d=>{await hFe({satellite:e,...d})},{success:l,err:p}=await n({upgrade:c,reset:o,assert:u});if(!l)return{success:l,err:p};try{o&&a.length>0&&await vFe({satellite:e,domains:a})}catch(d){return{success:!1,err:d}}return{success:!0}};var k0=oe(et(),1);var TFe=oe(Qe(),1),SFe=oe(Cu(),1);var yG=async({startAfter:e,satellite:t,traverseAll:r=!1})=>{let{items:n,items_length:i,matches_length:s}=await XF({collection:mR,satellite:t,filter:{order:{desc:!0,field:"created_at"},paginate:{startAfter:e,limit:500}}});if(i>s&&r){let o=await yG({startAfter:tk(n)?.fullPath,satellite:t,traverseAll:r});return[...n,...o]}return n};var PFe=async({args:e,satellite:t})=>{let n=(Jt({args:e,options:["--cdn-path"]})?jt({args:e,option:"--cdn-path"}):void 0)??await ncr({satellite:t});if((0,k0.isNullish)(n))return;let i=URL.parse(wf(t.satelliteId))?.hostname,s={url:oi.containerUrl??wf(t.satelliteId),path:n,...(0,k0.nonNullish)(i)&&{customHost:i}},o=await xFe({args:e,cdn:s,satellite:t});hm({...o,successMessage:"Satellite successfully upgraded with serverless functions."})},ncr=async e=>{let t=await icr(e);if(t.length===0){console.log((0,TFe.yellow)("No published WASM files found in the CDN."));return}return await scr({assets:t})},icr=async e=>(await yG(e)).map(({fullPath:r,description:n,token:i})=>({title:`${r.replace(`${Mk}/`,"")}${(0,k0.notEmptyString)(n)?` (${n})`:""}`,value:`${r}${(0,k0.notEmptyString)(i)?`?token=${i}`:""}`})),scr=async({assets:e})=>{let{fullPath:t}=await(0,SFe.default)({type:"select",name:"fullPath",message:"Which published WASM would you like to use?",choices:e});return Li(t),t};var AFe=async e=>{let{satellite:t}=await nn();await(Jt({args:e,options:["--cdn","--cdn-path"]})?PFe:ocr)({args:e,satellite:t})},ocr=async({args:e,satellite:t})=>{let n=jt({args:e,option:"-s"})??jt({args:e,option:"--src"})??`${Os}.gz`;await mG({args:e,src:n,satellite:t})};var DFe=async e=>{let[t]=e??[];switch(t){case"eject":await Bk(e);break;case"build":await $k(e);break;case"publish":await uFe(e);break;case"upgrade":await AFe(e);break;default:console.log((0,OFe.red)("Unknown subcommand.")),cG(e)}},CFe=e=>{let[t]=e??[];switch(t){case"build":ck(e);break;case"eject":uk(e);break;case"publish":rFe(e);break;case"upgrade":iFe(e);break;default:cG(e)}};var IFe=oe(Cu(),1);var NFe=async e=>{let{satellite:t}=await nn(),{satelliteId:r}=t,n=jt({args:e,option:"-b"})??jt({args:e,option:"--browser"});if(Jt({args:e,options:["-c","--console"]})){await Eb({url:nk(r),browser:n});return}let i=await lm({satellite:t});if(i.length===0){await Eb({url:wf(r),browser:n});return}let s=await acr({domains:i,satelliteId:r});await Eb({url:s,browser:n})},acr=async({satelliteId:e,domains:t})=>{let{url:r}=await(0,IFe.default)({type:"select",name:"url",message:"Which URL of your satellite should be opened?",choices:[...t.map(({domain:n})=>({title:`https://${n}`,value:`https://${n}`})),{title:wf(e),value:wf(e)}]});return Li(r),r};var wG=oe(Qe(),1);var bl=oe(Qe(),1);var Df=oe(Qe(),1),zk=e=>`${(0,Df.yellow)("-t, --target")} Which module type should be ${e==="snapshot"?"snapshotted":"upgraded"}? Valid targets are ${(0,Df.magenta)("satellite")}, ${(0,Df.magenta)("mission-control")} or ${(0,Df.magenta)("orbiter")}.`,Vk=`- Targets can be shortened to ${(0,Df.magenta)("s")} for satellite, ${(0,Df.magenta)("m")} for mission-control and ${(0,Df.magenta)("o")} for orbiter.`;var FFe=`Usage: ${(0,bl.green)("juno")} ${(0,bl.cyan)("snapshot")} ${(0,bl.magenta)("<subcommand>")} ${(0,bl.yellow)("[options]")}
976
+ Please upgrade iteratively.`);return}return s},rS=async({args:e,assetKey:t})=>Jt({args:e,options:["-r","--reset"]})?(await ai(`\u26A0\uFE0F Are you absolutely sure you want to upgrade and reset (\u2757\uFE0F) your ${mm(t)} to its initial state?`),!0):!1;var _Fe=async e=>{let{satellite:t}=await nn(),{satelliteId:r}=t;console.log(`${Ms}Initiating upgrade for satellite ${(0,qk.cyan)(r)}.${Ms}`);let n=s=>{hm({...s,successMessage:"Satellite successfully upgraded."})};if(Jt({args:e,options:["-s","--src"]})){let s=await tcr({satellite:t,args:e});n(s);return}let i=await rcr({satellite:t,args:e});n(i)},tcr=async({satellite:e,args:t})=>{let r=jt({args:t,option:"-s"})??jt({args:t,option:"--src"});return(0,hG.isNullish)(r)?(console.log((0,qk.red)("No source file provided.")),{success:!1}):await mG({satellite:e,src:r,args:t})},mG=async({src:e,satellite:t,...r})=>await EFe({...r,satellite:t,upgradeFn:async i=>await l_({src:e,assetKey:"satellite",moduleId:t.satelliteId,...i})}),xFe=async({cdn:e,satellite:t,...r})=>await EFe({...r,satellite:t,upgradeFn:async i=>await dG({cdn:e,assetKey:"satellite",moduleId:t.satelliteId,...i})}),EFe=async({satellite:e,args:t,upgradeFn:r})=>{let n=await S0({satellite:e}),{noSnapshot:i,preClearChunks:s}=Af(t);return await wFe({satellite:e,args:t,currentVersion:n,preClearChunks:s,noSnapshot:i,upgrade:r})},rcr=async({satellite:e,args:t})=>{let r=await S0({satellite:e}),n=`satellite "${await NF(e.satelliteId)}"`,i=await d_({currentVersion:r,assetKey:oO,displayHint:n});if((0,hG.isNullish)(i))return{success:!1};let{noSnapshot:s,preClearChunks:o}=Af(t);return await wFe({satellite:e,args:t,currentVersion:r,preClearChunks:o,noSnapshot:s,upgrade:async c=>await p_({version:i,assetKey:"satellite",moduleId:e.satelliteId,...c})})},wFe=async({satellite:e,args:t,currentVersion:r,upgrade:n,preClearChunks:i,noSnapshot:s})=>{let o=await rS({args:t,assetKey:"satellite"}),a=o?await lm({satellite:e}):[],c=async d=>{await ACe({satellite:e,...d,deprecated:(0,fG.compare)(r,"0.0.7")<0,deprecatedNoScope:(0,fG.compare)(r,"0.0.9")<0,...o&&{reset:o},preClearChunks:i,...s&&{takeSnapshot:!1}})},u=async d=>{await hFe({satellite:e,...d})},{success:l,err:p}=await n({upgrade:c,reset:o,assert:u});if(!l)return{success:l,err:p};try{o&&a.length>0&&await vFe({satellite:e,domains:a})}catch(d){return{success:!1,err:d}}return{success:!0}};var k0=oe(et(),1);var TFe=oe(Qe(),1),SFe=oe(Cu(),1);var yG=async({startAfter:e,satellite:t,traverseAll:r=!1})=>{let{items:n,items_length:i,matches_length:s}=await XF({collection:mR,satellite:t,filter:{order:{desc:!0,field:"created_at"},paginate:{startAfter:e,limit:500}}});if(i>s&&r){let o=await yG({startAfter:tk(n)?.fullPath,satellite:t,traverseAll:r});return[...n,...o]}return n};var PFe=async({args:e,satellite:t})=>{let n=(Jt({args:e,options:["--cdn-path"]})?jt({args:e,option:"--cdn-path"}):void 0)??await ncr({satellite:t});if((0,k0.isNullish)(n))return;let i=URL.parse(wf(t.satelliteId))?.hostname,s={url:oi.containerUrl??wf(t.satelliteId),path:n,...(0,k0.nonNullish)(i)&&{customHost:i}},o=await xFe({args:e,cdn:s,satellite:t});hm({...o,successMessage:"Satellite successfully upgraded with serverless functions."})},ncr=async e=>{let t=await icr(e);if(t.length===0){console.log((0,TFe.yellow)("No published WASM files found in the CDN."));return}return await scr({assets:t})},icr=async e=>(await yG(e)).map(({fullPath:r,description:n,token:i})=>({title:`${r.replace(`${Mk}/`,"")}${(0,k0.notEmptyString)(n)?` (${n})`:""}`,value:`${r}${(0,k0.notEmptyString)(i)?`?token=${i}`:""}`})),scr=async({assets:e})=>{let{fullPath:t}=await(0,SFe.default)({type:"select",name:"fullPath",message:"Which published WASM would you like to use?",choices:e});return Li(t),t};var AFe=async e=>{let{satellite:t}=await nn();await(Jt({args:e,options:["--cdn","--cdn-path"]})?PFe:ocr)({args:e,satellite:t})},ocr=async({args:e,satellite:t})=>{let n=jt({args:e,option:"-s"})??jt({args:e,option:"--src"})??`${Os}.gz`;await mG({args:e,src:n,satellite:t})};var DFe=async e=>{let[t]=e??[];switch(t){case"eject":await Bk(e);break;case"build":await $k(e);break;case"publish":await uFe(e);break;case"upgrade":await AFe(e);break;default:console.log((0,OFe.red)("Unknown subcommand.")),cG(e)}},CFe=e=>{let[t]=e??[];switch(t){case"build":ck(e);break;case"eject":uk(e);break;case"publish":rFe(e);break;case"upgrade":iFe(e);break;default:cG(e)}};var IFe=oe(Cu(),1);var NFe=async e=>{let{satellite:t}=await nn(),{satelliteId:r}=t,n=jt({args:e,option:"-b"})??jt({args:e,option:"--browser"});if(Jt({args:e,options:["-c","--console"]})){await Eb({url:nk(r),browser:n});return}let i=await lm({satellite:t});if(i.length===0){await Eb({url:wf(r),browser:n});return}let s=await acr({domains:i,satelliteId:r});await Eb({url:s,browser:n})},acr=async({satelliteId:e,domains:t})=>{let{url:r}=await(0,IFe.default)({type:"select",name:"url",message:"Which URL of your satellite should be opened?",choices:[...t.map(({domain:n})=>({title:`https://${n}`,value:`https://${n}`})),{title:wf(e),value:wf(e)}]});return Li(r),r};var wG=oe(Qe(),1);var bl=oe(Qe(),1);var Df=oe(Qe(),1),zk=e=>`${(0,Df.yellow)("-t, --target")} Which module type should be ${e==="snapshot"?"snapshotted":"upgraded"}? Valid targets are ${(0,Df.magenta)("satellite")}, ${(0,Df.magenta)("mission-control")} or ${(0,Df.magenta)("orbiter")}.`,Vk=`- Targets can be shortened to ${(0,Df.magenta)("s")} for satellite, ${(0,Df.magenta)("m")} for mission-control and ${(0,Df.magenta)("o")} for orbiter.`;var FFe=`Usage: ${(0,bl.green)("juno")} ${(0,bl.cyan)("snapshot")} ${(0,bl.magenta)("<subcommand>")} ${(0,bl.yellow)("[options]")}
977
977
 
978
978
  Subcommands:
979
979
  ${(0,bl.magenta)("create")} Create a snapshot of your current state.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/cli",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "description": "The Juno command-line interface",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",