@junobuild/cli-tools 0.2.0-next-2025-06-04.2 → 0.2.0-next-2025-06-05
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/node/index.mjs +1 -1
- package/dist/node/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/node/index.mjs
CHANGED
|
@@ -26,7 +26,7 @@ Change submitted.
|
|
|
26
26
|
\u2714 ${e} files uploaded (total: ${rh(i)})`)},Zk=async({files:t,sourceAbsolutePath:e,upload:i})=>{let n=async r=>{for(let a=0;a<r.length;a+=20){let o=r.slice(a,a+20);await new oh.default(o.map(({file:c,paths:u})=>({title:`Uploading ${Hk(e,c.file)}`,task:async()=>await i({file:c,paths:u})})),{concurrent:!0}).run()}};await n(t.filter(({file:{alternateFile:r}})=>Io(r))),await n(t.filter(({file:{alternateFile:r}})=>$k(r)))},Jk=async({uploadFile:t,file:e,fullPath:i,collection:n,filePath:r,token:a,description:o})=>{await t({filename:Wk(r),fullPath:i,data:new Yk([await Gk(e.file)]),collection:n,headers:[...e.mime===void 0?[]:[["Content-Type",e.mime]]],encoding:e.encoding,...Io(a)&&ah(a)&&{token:a},...Io(o)&&ah(o)&&{description:o}})};var jn=async({deploy:{uploadFile:t,files:e,sourceAbsolutePath:i,collection:n},proposal:{proposalType:r,autoCommit:a,...o}})=>{let s=async u=>{await On({files:e,sourceAbsolutePath:i,collection:n,uploadFile:l=>t({...l,proposalId:u})})},{proposalId:c}=await Dc({...o,autoCommit:a,proposalType:r,executeChanges:s});return a?{result:"deployed",files:e.map(u=>u.file),proposalId:c}:{result:"submitted",files:e.map(u=>u.file),proposalId:c}};var WT=async({config:{predeploy:t}})=>{await Mn(t)},HT=async({config:{postdeploy:t}})=>{await Mn(t)},VT=async({uploadFile:t,...e})=>{let i=await sh(e);if(i.result==="skipped")return{result:"skipped"};let{files:n,sourceAbsolutePath:r}=i,a=ch({files:n,sourceAbsolutePath:r});return await On({files:a,uploadFile:t,sourceAbsolutePath:r,collection:qn}),console.log(`
|
|
27
27
|
\u{1F680} Deploy complete!`),{result:"deployed",files:n}},ZT=async({deploy:{uploadFile:t,...e},proposal:{clearAssets:i,...n}})=>{let r=await sh(e);if(r.result==="skipped")return{result:"skipped"};let{sourceAbsolutePath:a}=r,o=ch(r),s=await jn({deploy:{uploadFile:t,files:o,sourceAbsolutePath:a,collection:qn},proposal:{...n,proposalType:{AssetsUpgrade:{clear_existing_assets:Qk(i)}}}});return s.result==="deployed"&&console.log(`
|
|
28
28
|
\u{1F680} Deploy complete!`),s},sh=async({assertMemory:t,...e})=>{let{files:i,sourceAbsolutePath:n}=await Ic(e);return i.length===0?(console.log("\u26A0\uFE0F No file changes detected. Upload skipped."),{result:"skipped"}):(await t?.(),{result:"to-deploy",files:i,sourceAbsolutePath:n})},ch=({files:t,sourceAbsolutePath:e})=>{let i=n=>{let r=n.alternateFile??n.file;return{fullPath:Mi({file:r,sourceAbsolutePath:e}),filePath:r}};return t.map(n=>({file:n,paths:i(n)}))};import{toNullable as Do}from"@dfinity/utils";var eA=async({publish:{assertMemory:t,filePath:e,fullPath:i,...n},proposal:{version:r,...a}})=>{await t?.();let s=await jn({deploy:{...n,files:[{file:{file:e},paths:{filePath:e,fullPath:i}}],collection:Qo},proposal:{...a,proposalType:{SegmentsDeployment:{satellite_version:Do(r),orbiter:Do(),mission_control_version:Do()}}}});return s.result==="deployed"&&console.log(`
|
|
29
|
-
\u{1F4E1} Satellite WASM published to CDN.`),s};var iA=({args:t,options:e})=>t?.find(i=>e.includes(i))!==void 0,nA=({args:t,option:e})=>{let i=(t??[]).findIndex(n=>n===e);if(i!==-1)return t?.[i+1]};import{nonNullish as ph}from"@dfinity/utils";import{get as Xk}from"http";import{get as Kk}from"https";var e3=async t=>await new Promise((e,i)=>{((typeof t=="string"?URL.parse(t)?.protocol:t.protocol)==="http"?Xk:Kk)(t,async a=>{ph(a.statusCode)&&ph(a.headers.location)&&[301,302].includes(a.statusCode)&&await e3(a.headers.location).then(e,i);let o=[];a.on("data",s=>o.push(s)),a.on("end",()=>{e(Buffer.concat(o))}),a.on("error",i)})});import{readFile as t3}from"node:fs/promises";var uA=async({packageJsonPath:t})=>{let e=await t3(t,"utf-8"),{dependencies:i,version:n,juno:r,name:a}=JSON.parse(e);return{name:a,version:n,dependencies:i,juno:r}};import{isNullish as i3,nonNullish as n3}from"@dfinity/utils";var mA=(t,e)=>{(i3(t)||t==="")&&(n3(e)&&console.error(e),process.exit(1))};export{Qo as COLLECTION_CDN_RELEASES,qn as COLLECTION_DAPP,Zo as DEPLOY_DEFAULT_ENCODING,yi as DEPLOY_DEFAULT_GZIP,Vo as DEPLOY_DEFAULT_IGNORE,Ho as DEPLOY_DEFAULT_SOURCE,Jo as IGNORE_OS_FILES,Cn as UPLOAD_BATCH_SIZE,mA as assertAnswerCtrlC,o3 as buildEsm,VT as deploy,ZT as deployWithProposal,e3 as downloadFromURL,is as execute,Ej as fileExists,qc as fileSizeInBytes,tr as files,rh as formatBytes,wj as gunzipFile,Ix as gzipFile,Tc as gzipFiles,iA as hasArgs,_j as isGzip,nA as nextArg,HT as postDeploy,WT as preDeploy,eA as publishSatelliteWasmWithProposal,uA as readPackageJson,b3 as spawn};
|
|
29
|
+
\u{1F4E1} Satellite WASM published to CDN.`),s};var iA=({args:t,options:e})=>t?.find(i=>e.includes(i))!==void 0,nA=({args:t,option:e})=>{let i=(t??[]).findIndex(n=>n===e);if(i!==-1)return t?.[i+1]};import{nonNullish as ph}from"@dfinity/utils";import{get as Xk}from"http";import{get as Kk}from"https";var e3=async t=>await new Promise((e,i)=>{((typeof t=="string"?URL.parse(t)?.protocol:t.protocol)==="http:"?Xk:Kk)(t,async a=>{ph(a.statusCode)&&ph(a.headers.location)&&[301,302].includes(a.statusCode)&&await e3(a.headers.location).then(e,i);let o=[];a.on("data",s=>o.push(s)),a.on("end",()=>{e(Buffer.concat(o))}),a.on("error",i)})});import{readFile as t3}from"node:fs/promises";var uA=async({packageJsonPath:t})=>{let e=await t3(t,"utf-8"),{dependencies:i,version:n,juno:r,name:a}=JSON.parse(e);return{name:a,version:n,dependencies:i,juno:r}};import{isNullish as i3,nonNullish as n3}from"@dfinity/utils";var mA=(t,e)=>{(i3(t)||t==="")&&(n3(e)&&console.error(e),process.exit(1))};export{Qo as COLLECTION_CDN_RELEASES,qn as COLLECTION_DAPP,Zo as DEPLOY_DEFAULT_ENCODING,yi as DEPLOY_DEFAULT_GZIP,Vo as DEPLOY_DEFAULT_IGNORE,Ho as DEPLOY_DEFAULT_SOURCE,Jo as IGNORE_OS_FILES,Cn as UPLOAD_BATCH_SIZE,mA as assertAnswerCtrlC,o3 as buildEsm,VT as deploy,ZT as deployWithProposal,e3 as downloadFromURL,is as execute,Ej as fileExists,qc as fileSizeInBytes,tr as files,rh as formatBytes,wj as gunzipFile,Ix as gzipFile,Tc as gzipFiles,iA as hasArgs,_j as isGzip,nA as nextArg,HT as postDeploy,WT as preDeploy,eA as publishSatelliteWasmWithProposal,uA as readPackageJson,b3 as spawn};
|
|
30
30
|
/*! Bundled license information:
|
|
31
31
|
|
|
32
32
|
ieee754/index.js:
|