@junobuild/cli 0.0.74 → 0.0.75
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/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -638,7 +638,7 @@ Are you sure the folder containing your built app (the "source" tag in the confi
|
|
|
638
638
|
${r}`,"utf-8")},Mxe=async()=>{await Fxe(JU,{recursive:!0}),await La({command:"ic-wasm",args:[nd(YU,"satellite.wasm"),"-o",Sa,"shrink"]}),await La({command:"ic-wasm",args:[Sa,"-o",Sa,"metadata","candid:service","-f",ZU,"-v","public"]}),await La({command:"ic-wasm",args:[Sa,"-o",Sa,"metadata","juno:build","-d","extended","-v","public"]}),await La({command:"ic-wasm",args:[Sa,"-o",Sa,"metadata","supported_certificate_versions","-d",'"1,2"',"-v","public"]})},Lxe=async e=>{let t=`${Sa}.gz`,{size:r}=await Nxe(t),n=i=>Intl.NumberFormat("en-US",{maximumSignificantDigits:2}).format(i/(1024*1024));e.succeed(`${(0,xl.green)("Success!")}
|
|
639
639
|
|
|
640
640
|
The satellite has been compiled.
|
|
641
|
-
Output file: ${(0,xl.yellow)(`${kxe(process.cwd(),t)}`)} ${(0,xl.grey)(`(${n(r)}MB)`)}`)},$xe=async()=>{let{valid:e}=await WU();return e===!1?{valid:e}:(e==="error"&&(await Di(`The ${(0,xl.magenta)("ic-wasm")} ${(0,xl.yellow)(`v${sh}`)} tool is required to build a satellite but appears to be not available. Would you like to install it on your machine?`),await Jl({command:"cargo",args:["install",`ic-wasm@${sh}`]})),{valid:!0})},Uxe=async()=>{let{valid:e}=await KU();return e===!1?{valid:e}:(e==="error"&&(await Di(`The ${(0,xl.magenta)("candid-extractor")} tool is required to generate the API ("did file") of your custom satellite but appears to be not available. Would you like to install it on your machine?`),await Jl({command:"cargo",args:["install","candid-extractor"]})),{valid:!0})};var nq=St(Gt(),1);import{existsSync as qxe}from"node:fs";import{writeFile as Vxe}from"node:fs/promises";import{basename as Gxe,join as Hxe}from"node:path";var dD={filename:_b},eq=async()=>await ev(dD),tq=()=>tv(dD),rq=()=>Gf(dD);var iq="../templates/docker",sq=process.cwd(),aq=async()=>{let{valid:e}=await cD();e==="error"||!e||(await pD(),await Wxe(),await zxe(),await Jl({command:"docker",args:["compose","up"]}))},oq=async()=>{let{valid:e}=await cD();e==="error"||!e||(await pD(),await Jl({command:"docker",args:["compose","stop"]}))},Wxe=async()=>{if(await eq())return;await Di("A config file is required for development. Would you like the CLI to create one for you?");let{configType:e,configPath:t}=await Kxe();await Vc({template:`${_b}.${e}`,sourceFolder:iq,destinationFolder:sq,...or(t)&&{destinationFilename:t}})},Kxe=async()=>{let e=tq();return or(e)?e:{configType:await jv()}},zxe=async()=>{if(qxe("docker-compose.yml"))return;await Di(`The CLI utilizes Docker Compose, which is handy for customizing configurations. Would you like the CLI to generate a default ${(0,nq.magenta)("docker-compose.yml")} file for you?`);let e=await Hf({template:"docker-compose.yml",sourceFolder:iq}),{configPath:t}=rq(),r=Gxe(t),n=e.replaceAll("<JUNO_DEV_CONFIG>",r);await Vxe(Hxe(sq,"docker-compose.yml"),n,"utf-8")};var Yc=St(Gt(),1);import{mkdir as Xxe}from"node:fs/promises";import{join as bq}from"node:path";var Tt=St(Gt(),1);var qv="0.0.
|
|
641
|
+
Output file: ${(0,xl.yellow)(`${kxe(process.cwd(),t)}`)} ${(0,xl.grey)(`(${n(r)}MB)`)}`)},$xe=async()=>{let{valid:e}=await WU();return e===!1?{valid:e}:(e==="error"&&(await Di(`The ${(0,xl.magenta)("ic-wasm")} ${(0,xl.yellow)(`v${sh}`)} tool is required to build a satellite but appears to be not available. Would you like to install it on your machine?`),await Jl({command:"cargo",args:["install",`ic-wasm@${sh}`]})),{valid:!0})},Uxe=async()=>{let{valid:e}=await KU();return e===!1?{valid:e}:(e==="error"&&(await Di(`The ${(0,xl.magenta)("candid-extractor")} tool is required to generate the API ("did file") of your custom satellite but appears to be not available. Would you like to install it on your machine?`),await Jl({command:"cargo",args:["install","candid-extractor"]})),{valid:!0})};var nq=St(Gt(),1);import{existsSync as qxe}from"node:fs";import{writeFile as Vxe}from"node:fs/promises";import{basename as Gxe,join as Hxe}from"node:path";var dD={filename:_b},eq=async()=>await ev(dD),tq=()=>tv(dD),rq=()=>Gf(dD);var iq="../templates/docker",sq=process.cwd(),aq=async()=>{let{valid:e}=await cD();e==="error"||!e||(await pD(),await Wxe(),await zxe(),await Jl({command:"docker",args:["compose","up"]}))},oq=async()=>{let{valid:e}=await cD();e==="error"||!e||(await pD(),await Jl({command:"docker",args:["compose","stop"]}))},Wxe=async()=>{if(await eq())return;await Di("A config file is required for development. Would you like the CLI to create one for you?");let{configType:e,configPath:t}=await Kxe();await Vc({template:`${_b}.${e}`,sourceFolder:iq,destinationFolder:sq,...or(t)&&{destinationFilename:t}})},Kxe=async()=>{let e=tq();return or(e)?e:{configType:await jv()}},zxe=async()=>{if(qxe("docker-compose.yml"))return;await Di(`The CLI utilizes Docker Compose, which is handy for customizing configurations. Would you like the CLI to generate a default ${(0,nq.magenta)("docker-compose.yml")} file for you?`);let e=await Hf({template:"docker-compose.yml",sourceFolder:iq}),{configPath:t}=rq(),r=Gxe(t),n=e.replaceAll("<JUNO_DEV_CONFIG>",r);await Vxe(Hxe(sq,"docker-compose.yml"),n,"utf-8")};var Yc=St(Gt(),1);import{mkdir as Xxe}from"node:fs/promises";import{join as bq}from"node:path";var Tt=St(Gt(),1);var qv="0.0.75";var Jxe=` __ __ __ __ _ ____
|
|
642
642
|
__) || | || \\| |/ \\
|
|
643
643
|
\\___/ \\___/ |_|\\__|\\____/`,El=`${Jxe} CLI ${(0,Tt.grey)(`v${qv}`)}`,Vv=`
|
|
644
644
|
${El}
|