@kizenapps/cli 1.11.0 → 1.13.0-44aaefe
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/THIRD-PARTY-NOTICES.txt +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/viewer/assets/{AppDetailPage-D9xr-bY8.js → AppDetailPage-CsAJGeXG.js} +1 -1
- package/dist/viewer/assets/{CodeStepsPage-D_kTMpRO.js → CodeStepsPage-d5OMJi9J.js} +1 -1
- package/dist/viewer/assets/ConfigurationPage-CI0pRNJ0.js +1 -0
- package/dist/viewer/assets/{DevSidebar-zX-4CWYv.js → DevSidebar-BFsoIbMt.js} +1 -1
- package/dist/viewer/assets/{SandboxPage-DuCHX1FY.js → SandboxPage-Dyb8i7vf.js} +1 -1
- package/dist/viewer/assets/{SecretsPage-Da55-e_S.js → SecretsPage-g2FF7d-B.js} +1 -1
- package/dist/viewer/assets/{WhenBadge-B7s7fns2.js → WhenBadge-DKz8ukwo.js} +1 -1
- package/dist/viewer/assets/api--pW2v3sH.js +11 -0
- package/dist/viewer/assets/{bootstrapQuery-CyYWFe68.js → bootstrapQuery-DTAPKOf-.js} +1 -1
- package/dist/viewer/assets/{calendarSource.worker-CTgMuhqr.js → calendarSource.worker-DjLHW14n.js} +1 -1
- package/dist/viewer/assets/{floatingFrame.worker-zn66fKUA.js → floatingFrame.worker-Cy3ysIc7.js} +1 -1
- package/dist/viewer/assets/{generic.worker-gJPrf_ED.js → generic.worker-DKCeuXG7.js} +1 -1
- package/dist/viewer/assets/{index-BF1Fk_v0.js → index-BdpUrI71.js} +3 -3
- package/dist/viewer/assets/{recordDetail.worker-CGLG0Evq.js → recordDetail.worker-DrTKYLJc.js} +1 -1
- package/dist/viewer/assets/storageKeys-BDp-0diL.js +1 -0
- package/dist/viewer/assets/useCompleteSetup-QS3W9RRO.js +40 -0
- package/dist/viewer/assets/usePluginConfig--4sAyik4.js +1 -0
- package/dist/viewer/index.html +4 -4
- package/package.json +3 -3
- package/dist/viewer/assets/ConfigurationPage-5qOX-sx0.js +0 -1
- package/dist/viewer/assets/api--Ax6VWLq.js +0 -11
- package/dist/viewer/assets/storageKeys-DPq6kaaE.js +0 -1
- package/dist/viewer/assets/useCompleteSetup-DUHoBgca.js +0 -40
- package/dist/viewer/assets/usePluginConfig-C8d13THZ.js +0 -1
|
@@ -520,7 +520,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
|
520
520
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
521
521
|
|
|
522
522
|
================================================================================
|
|
523
|
-
@kizenapps/engine@1.
|
|
523
|
+
@kizenapps/engine@1.10.0
|
|
524
524
|
License: GPL-3.0
|
|
525
525
|
================================================================================
|
|
526
526
|
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{readFileSync as Ya}from"fs";import{dirname as Xa,join as Za}from"path";import{fileURLToPath as Qa}from"url";import{Command as el}from"commander";import{createElement as ui}from"react";import{render as fi}from"ink";import{useEffect as vr,useState as Me}from"react";import{Box as ze,Text as Re,useApp as ci}from"ink";import{PluginValidationError as di}from"@kizenapps/packager";import{mkdir as zo,writeFile as Ho}from"fs/promises";import{join as Uo}from"path";import{PluginValidationError as Vo,
|
|
2
|
+
import{readFileSync as Ya}from"fs";import{dirname as Xa,join as Za}from"path";import{fileURLToPath as Qa}from"url";import{Command as el}from"commander";import{createElement as ui}from"react";import{render as fi}from"ink";import{useEffect as vr,useState as Me}from"react";import{Box as ze,Text as Re,useApp as ci}from"ink";import{PluginValidationError as di}from"@kizenapps/packager";import{mkdir as zo,writeFile as Ho}from"fs/promises";import{join as Uo}from"path";import{PluginValidationError as Vo,packagePlugin as qo,parseManifestFromFiles as Jo,transformDeployablePlugin as Wo,transformFiles as Ko,validatePluginApp as Go}from"@kizenapps/packager";import{readdir as Do,readFile as fr}from"fs/promises";import{join as mr,relative as Fo}from"path";var Oo=new Set([".png",".svg"]),jo=new Set([".kzn"]),$o=new Set([".DS_Store"]),tt=new Set(["node_modules",".git",".kizenapp",".github",".claude","__pycache__"]),Lo=8e3;function Mo(e){return e.subarray(0,Lo).includes(0)}async function gr(e,t){let n=await Do(e,{withFileTypes:!0}),o=[];for(let r of n)if(r.isDirectory()){if(tt.has(r.name))continue;o.push(...await gr(mr(e,r.name),t))}else r.isFile()&&($o.has(r.name)||o.push(mr(e,r.name)));return o}async function rt(e,{detectBinaryByContent:t=!1}={}){let n=await gr(e,e);return Promise.all(n.map(async o=>{let r=Fo(e,o).split("\\").join("/"),i=r.lastIndexOf("."),d=i>=0?r.slice(i).toLowerCase():"";if(Oo.has(d)){let g=await fr(o);return{path:r,content:"",base64Image:g.toString("base64")}}let f=await fr(o);return jo.has(d)||t&&Mo(f)?{path:r,content:"",binaryData:f}:{path:r,content:f.toString("utf-8")}}))}var Yo=(e,t)=>({...e,thumbnail:e.thumbnail?Buffer.from(e.thumbnail).toString("base64"):null,kznFile:e.kznFile?Buffer.from(e.kznFile).toString("base64"):null,allReleaseNotes:t});async function nt(e,t,n){await zo(t,{recursive:!0}),n?.("reading-files");let o=await rt(e);n?.("validating");let r=Go(o);if(r.some(x=>x.severity==="error"))throw new Vo(r);n?.("minifying");let i=await Ko(o);n?.("packaging");let d=Jo(i),f=qo(i,d),g=Object.values(f).map(Wo);n?.("writing-bundle");let m=g.map(x=>{let p=x.release_notes_directory?.replace(/\/$/,""),y=p?o.filter(S=>S.path.startsWith(p+"/")&&S.path.endsWith(".md")&&S.content).map(S=>({version:S.path.slice(S.path.lastIndexOf("/")+1,-3),notes:S.content})).sort((S,H)=>H.version.localeCompare(S.version,void 0,{numeric:!0})):[];return Yo(x,y)}),b=JSON.stringify(m,null,2),T=(x,p)=>x==="allReleaseNotes"?void 0:p,P=Buffer.byteLength(JSON.stringify(m,T,2),"utf-8");return await Ho(Uo(t,"bundle.json"),b,"utf-8"),{bundleSize:P}}function $e(e){return e<1024?`${String(e)} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(2)} MB`}import{Box as ei,Text as ti}from"ink";import{Box as Xo,Text as Zo}from"ink";import{jsx as hr}from"react/jsx-runtime";var Qo=[" :::::::: "," :::::: ::::::::::: "," :::::: :::::::::: "," :::::: :::::: ::::::: "," ::::: :::::: ::::::::::::::::: "," ::::: ::::: ::::::::::::::::::: "," ::::: ::::: :::::: ::::: ",":::: ::::: ::: ::::: :: ","::::: :::::: :::::::::: ","::::: :::::: ::::::::::: "," ::::: ::: ::::::: "," ::::::: ::: ::::: "," ::::::::::: :::::: :::::"," :::::::::: :::::: :::::"," :: ::::: ::: ::::: ::::"," ::::: :::::: ::::: ::::: ::: "," ::::::::::::::::::: ::::: ::::: "," ::::::::::::::::: ::::: ::::: "," ::::::::: :::::: :::::: "," :::::::::: :::::: "," ::::::::::: :::::: "," :::::::: "],yr=()=>hr(Xo,{flexDirection:"column",children:Qo.map((e,t)=>hr(Zo,{color:"cyan",children:e},t))});import{Fragment as ri,jsx as jt,jsxs as ni}from"react/jsx-runtime";var q=({marginBottom:e=0})=>ni(ri,{children:[jt(yr,{}),jt(ei,{flexDirection:"column",marginTop:1,marginBottom:e,children:jt(ti,{bold:!0,color:"cyan",children:"Kizen App Development Toolkit"})})]});import{useEffect as oi,useState as ii}from"react";import{Text as si}from"ink";import{jsx as ai}from"react/jsx-runtime";var br=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],me=()=>{let[e,t]=ii(0);return oi(()=>{let n=setInterval(()=>{t(o=>(o+1)%br.length)},80);return()=>{clearInterval(n)}},[]),ai(si,{color:"cyan",children:br[e]??"\u280B"})};import{Box as $t,Text as ot}from"ink";import{jsx as xr,jsxs as Le}from"react/jsx-runtime";var li=e=>{let t=new Map;for(let n of e){let o=n.path??n.pluginApiName??"general",r=t.get(o)??[];r.push(n),t.set(o,r)}return t},it=({issues:e})=>{let t=e.filter(n=>n.severity==="error").length;return Le($t,{flexDirection:"column",marginTop:1,children:[Le(ot,{color:"red",children:["\u2717 ",t," validation ",t===1?"error":"errors"]}),[...li(e)].map(([n,o])=>Le($t,{flexDirection:"column",marginTop:1,children:[xr(ot,{bold:!0,children:n}),o.map((r,i)=>xr($t,{paddingLeft:2,children:Le(ot,{color:r.severity==="error"?"red":"yellow",children:[r.severity==="error"?"\u2717":"\u26A0"," ",r.message," ",Le(ot,{dimColor:!0,children:["(",r.rule,")"]})]})},`${r.rule}-${String(i)}`))]},n))]})};import{Fragment as pi,jsx as ge,jsxs as Ee}from"react/jsx-runtime";var wr=["creating-dir","reading-files","validating","minifying","packaging","writing-bundle"],st={"creating-dir":"Creating .kizenapp directory","reading-files":"Reading plugin files",validating:"Validating plugin app",minifying:"Minifying scripts",packaging:"Packaging plugin","writing-bundle":"Writing bundle.json"},Cr=({outputDir:e,pluginDir:t})=>{let n=ci(),[o,r]=Me("creating-dir"),[i,d]=Me(!1),[f,g]=Me(null),[m,b]=Me(null),[T,P]=Me(null);vr(()=>{nt(t,e,r).then(({bundleSize:y})=>{P(y),r("done")}).catch(y=>{y instanceof di?g(y.issues):b(y instanceof Error?y.message:String(y)),d(!0),process.exitCode=1})},[e,t]),vr(()=>{(o==="done"||i)&&n.exit()},[o,i,n]);let x=wr.indexOf(o),p=o==="done";return Ee(ze,{flexDirection:"column",paddingY:1,paddingX:2,children:[ge(q,{marginBottom:1}),Ee(ze,{flexDirection:"column",gap:0,children:[wr.map((y,S)=>{let H=o===y,O=p||x>S;return ge(ze,{gap:1,children:i&&S===x?Ee(Re,{color:"red",children:["\u2717 ",st[y]]}):O?Ee(Re,{color:"green",children:["\u2713 ",st[y]]}):H?Ee(pi,{children:[ge(me,{}),ge(Re,{children:st[y]})]}):Ee(Re,{dimColor:!0,children:[" ",st[y]]})},y)}),p&&T!==null&&ge(ze,{marginTop:1,gap:1,children:Ee(Re,{color:"green",children:["\u2713 bundle \u2014 ",$e(T)]})}),f!==null&&ge(it,{issues:f}),m!==null&&ge(ze,{marginTop:1,borderStyle:"single",borderColor:"red",paddingX:1,children:ge(Re,{color:"red",children:m})})]})]})};import*as Ae from"fs";import*as Sr from"path";function Ne(e){let t=Sr.join(e,".gitignore"),n=".kizenapp/",o="";if(Ae.existsSync(t)){o=Ae.readFileSync(t,"utf8");let i=o.split(`
|
|
3
3
|
`).map(d=>d.trim());if(i.includes(n)||i.includes(".kizenapp"))return}let r=o.endsWith(`
|
|
4
4
|
`)?n+`
|
|
5
5
|
`:`
|