@cyclone-ui/cli 0.6.27 → 0.6.29
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/README.md +19 -0
- package/dist/{add-BfIMaCew.mjs → add-CCxd91Cm.mjs} +1 -1
- package/dist/{add-Dx_koTHm.mjs → add-DumpqU4e.mjs} +1 -1
- package/dist/add.mjs +3 -3
- package/dist/{analyze-a11y-CcsNRuni.mjs → analyze-a11y-BxlnyqbG.mjs} +1 -1
- package/dist/{analyze-a11y-DSeuntNV.mjs → analyze-a11y-c6PzYKd4.mjs} +1 -1
- package/dist/analyze-a11y.mjs +2 -2
- package/dist/bin.mjs +7 -7
- package/dist/{build-6ozTcR0P.mjs → build-BtyT4Zan.mjs} +1 -1
- package/dist/{build-Cb2dvDrg.mjs → build-T_HgwaMV.mjs} +1 -1
- package/dist/{build-tokens-Bp8pRTwV.mjs → build-tokens-CbxsujP7.mjs} +1 -1
- package/dist/{build-tokens-WrYH9rWS.mjs → build-tokens-DqETXngW.mjs} +1 -1
- package/dist/build-tokens.mjs +2 -2
- package/dist/build.mjs +2 -2
- package/dist/{changelog-DPlV99Pq.mjs → changelog-Bx6hXwPZ.mjs} +1 -1
- package/dist/{changelog-DusO4ZGM.mjs → changelog-D6tnHIzn.mjs} +1 -1
- package/dist/changelog.mjs +17 -3
- package/dist/{command-B8MUnoUh.mjs → command-DH7TJa_T.mjs} +1 -1
- package/dist/{command-DMTfIThP.mjs → command-DIfonR8Q.mjs} +1 -1
- package/dist/completions-bash-config.mjs +3 -3
- package/dist/completions-bash-script.mjs +3 -3
- package/dist/completions-fish-config.mjs +3 -3
- package/dist/completions-fish-script.mjs +3 -3
- package/dist/completions-powershell-config.mjs +4 -4
- package/dist/completions-powershell-script.mjs +3 -3
- package/dist/completions-zsh-config.mjs +3 -3
- package/dist/completions-zsh-script.mjs +3 -3
- package/dist/components-CFdP7ILK.mjs +10 -0
- package/dist/{config-BG_ugfQz.mjs → config-0Djqqh_T.mjs} +1 -1
- package/dist/{config-DxsYsT40.mjs → config-BwGb7RTa.mjs} +1 -1
- package/dist/{config-CUHbmgOd.mjs → config-C1yRBqpq.mjs} +1 -1
- package/dist/{config-CW_6Hw4x.mjs → config-CfacbkmE.mjs} +1 -1
- package/dist/{config-DNGQGPvY.mjs → config-DginxS3b.mjs} +1 -1
- package/dist/{config-BlYuvJ-b.mjs → config-DyLs5oQt.mjs} +1 -1
- package/dist/{config-DAv4ynEC.mjs → config-dh9BciUc.mjs} +1 -1
- package/dist/{config-CDd3n2ez.mjs → config-ipPXwjoE.mjs} +1 -1
- package/dist/{config-AV1vb3R6.mjs → config-zswEkHA-.mjs} +1 -1
- package/dist/{console-CuwpK_nP.mjs → console-C9sr-XcB.mjs} +2 -2
- package/dist/{console-DBm5oED7.mjs → console-CpZxo7mz.mjs} +2 -2
- package/dist/{design-system-XTJf4P0a.mjs → design-system-BACPn_3U.mjs} +1 -1
- package/dist/{design-system-DTptaxg5.mjs → design-system-BRQwxlFZ.mjs} +1 -1
- package/dist/{diff-CPI6DP0p.mjs → diff-BAHLO4Dw.mjs} +1 -1
- package/dist/{diff-DN2s4s2u.mjs → diff-fD057Wal.mjs} +1 -1
- package/dist/diff.mjs +2 -2
- package/dist/{docs-B8fr7keZ.mjs → docs-3LjAnffm.mjs} +1 -1
- package/dist/{docs-Dv3lptcF.mjs → docs-DfaKDkzf.mjs} +1 -1
- package/dist/docs.mjs +4 -4
- package/dist/{guidelines-D94shOR0.mjs → guidelines-BTr2c2ds.mjs} +1 -1
- package/dist/{guidelines-bKW8vl5v.mjs → guidelines-Bc78Vcma.mjs} +1 -1
- package/dist/guidelines.mjs +2 -2
- package/dist/help.mjs +2 -2
- package/dist/{info-C7gM4SFA.mjs → info-LSuDaj3P.mjs} +1 -1
- package/dist/{info-DwZ_Gk5X.mjs → info-PFFK6seV.mjs} +1 -1
- package/dist/info.mjs +2 -2
- package/dist/{init-CzhC8Bcz.mjs → init-BjtHO0Ie.mjs} +1 -1
- package/dist/{init-jW_rVrLD.mjs → init-iMJN6FuN.mjs} +1 -1
- package/dist/init.mjs +2 -2
- package/dist/{list-components-Cb1l59FG.mjs → list-components-BDqS-zpn.mjs} +1 -1
- package/dist/{list-components-D6K5OfSM.mjs → list-components-C9gSI7rz.mjs} +1 -1
- package/dist/list-components.mjs +2 -2
- package/dist/{list-fonts-YdKKHJEO.mjs → list-fonts-5rYZfR1b.mjs} +1 -1
- package/dist/{list-fonts-tNy7jj49.mjs → list-fonts-Cf2mighG.mjs} +1 -1
- package/dist/list-fonts.mjs +2 -2
- package/dist/{list-icons-BOLtlEuI.mjs → list-icons-0ej0Q05H.mjs} +1 -1
- package/dist/{list-icons-NWgXWbJ2.mjs → list-icons-DVSRFw6X.mjs} +1 -1
- package/dist/list-icons.mjs +2 -2
- package/dist/{list-tokens-DMmpPvs5.mjs → list-tokens-Ci67Y9Kd.mjs} +1 -1
- package/dist/{list-tokens-DTBKTPn2.mjs → list-tokens-CwDvkuFe.mjs} +1 -1
- package/dist/list-tokens.mjs +2 -2
- package/dist/{mcp-B0B2FmIG.mjs → mcp-BpYLJGkl.mjs} +1 -1
- package/dist/{mcp-DIFz2W9U.mjs → mcp-D62Y943w.mjs} +1 -1
- package/dist/mcp.mjs +5 -5
- package/dist/{plan-7yArRIOO.mjs → plan-B-ki4CdJ.mjs} +1 -1
- package/dist/{plan-xhJNh5p-.mjs → plan-DSoYe32E.mjs} +1 -1
- package/dist/plan.mjs +2 -2
- package/dist/{prompts-CKTQ1emI.mjs → prompts-2RKAx6EK.mjs} +1 -1
- package/dist/{prompts-L-F9m8Ke.mjs → prompts-UxPqt-Gb.mjs} +1 -1
- package/dist/registry-BpEYYarX.mjs +1 -0
- package/dist/registry-DILf5_LC.mjs +1 -0
- package/dist/registry-validate.mjs +2 -2
- package/dist/{script-D0OkrEWr.mjs → script-BIoqAgJ7.mjs} +1 -1
- package/dist/{script-BU7qqSeT.mjs → script-BVXbRHzO.mjs} +1 -1
- package/dist/{script-C_84R-oH.mjs → script-C5c4niE-.mjs} +1 -1
- package/dist/{script-BjfxZyOe.mjs → script-D7Xk6MbD.mjs} +1 -1
- package/dist/{script-DyS_-4j9.mjs → script-DEDXnff_.mjs} +1 -1
- package/dist/{script-BxXpsMFH.mjs → script-EIUERkQr.mjs} +1 -1
- package/dist/{script-CrDNK7jw.mjs → script-JSaHIeA2.mjs} +1 -1
- package/dist/{script-U7Lq0fNS.mjs → script-vK-_gHx5.mjs} +1 -1
- package/dist/{search-DEuh7BCF.mjs → search-C-kF-NAP.mjs} +1 -1
- package/dist/{search-DExqpNjN.mjs → search-D6foWhNN.mjs} +1 -1
- package/dist/{search-components-C0UiLB2u.mjs → search-components-CMz9FbeD.mjs} +1 -1
- package/dist/{search-components-Cu2_aill.mjs → search-components-lBa8duFr.mjs} +1 -1
- package/dist/search-components.mjs +3 -3
- package/dist/{search-fonts-BATqVuFg.mjs → search-fonts-BN-FS1AX.mjs} +1 -1
- package/dist/{search-fonts-ghe6pS9u.mjs → search-fonts-UL7PtbNr.mjs} +1 -1
- package/dist/search-fonts.mjs +3 -3
- package/dist/{search-icons-DFsnJH-t.mjs → search-icons-C_ffHyeL.mjs} +1 -1
- package/dist/{search-icons-hLHCIacV.mjs → search-icons-khQR5V-5.mjs} +1 -1
- package/dist/search-icons.mjs +3 -3
- package/dist/{search-tokens-EqI9jg3V.mjs → search-tokens-DQe1Of0s.mjs} +1 -1
- package/dist/{search-tokens-uXQkRf7l.mjs → search-tokens-xHjN4Ap3.mjs} +1 -1
- package/dist/search-tokens.mjs +3 -3
- package/dist/search.mjs +3 -3
- package/dist/{update-Cb_zzc8Z.mjs → update-Bzhkuhrx.mjs} +1 -1
- package/dist/{update-DivOAmjH.mjs → update-DQSbPz6n.mjs} +1 -1
- package/dist/{update-pxD7yqo7.mjs → update-DSl4_D0i.mjs} +1 -1
- package/dist/{update-DqCg3Tqh.mjs → update-Diwox1wU.mjs} +1 -1
- package/dist/update.mjs +2 -2
- package/dist/{validate-45bZ3lmt.mjs → validate-BbfaJ0kr.mjs} +1 -1
- package/dist/{validate-FxaL0-h6.mjs → validate-Cya7mLtW.mjs} +1 -1
- package/dist/{view-CJycu2Y2.mjs → view-ByCXZ9h_.mjs} +1 -1
- package/dist/{view-DUuhfbJK.mjs → view-oCTkMn1u.mjs} +1 -1
- package/dist/view.mjs +3 -3
- package/package.json +5 -5
- package/dist/components-BeiahS2c.mjs +0 -10
- package/dist/registry-BGOpPADQ.mjs +0 -1
- package/dist/registry-Ce-9M1eW.mjs +0 -1
package/dist/build-tokens.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)}\n`;
|
|
1
|
+
import{a as e}from"./prompts-2RKAx6EK.mjs";import{A as t,B as n,D as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-CpZxo7mz.mjs";import{t as b}from"./build-tokens-DqETXngW.mjs";import{t as x}from"./update-DSl4_D0i.mjs";import{t as S}from"./command-DIfonR8Q.mjs";async function C(a=500){if(n().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||m)return;n().set(`is-banner-displayed`,!0),r(``),r(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+_(u.banner.header.primary(`Cyclone CLI v0.6.28`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-33,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let s=Math.max(...e.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone UI`:`\n${e.join(`
|
|
2
|
+
`)}\n`;p(s,Math.max(h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Build Tokens`).length+2))/2),0))+_(u.banner.command.primary(`Build Tokens`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Build Tokens`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Generate a Tamagui config file from design tokens.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),r(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+_(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),r(``),t&&!o()&&await l(a)}async function w(e=c()){let t={...y()};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`?/^--?(cwd)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.cwd=r.replace(/^--?(cwd)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.cwd=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)):r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`config=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`config=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`?/^--?(config)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.config=r.replace(/^--?(config)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.config=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)):r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`tokens=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`tokens`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`tokens=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`tokens`?/^--?(tokens)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.tokens=r.replace(/^--?(tokens)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.tokens=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)):(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`output=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`output`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`output=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`output`)&&(/^--?(output)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.output=r.replace(/^--?(output)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.output=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}return i(`quiet`)||(await C(),await x()),!o()&&!i(`quiet`)&&(r(``),(s||a||d.LOG_LEVEL===`debug`)&&r(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?b():f(`build-tokens`,[`build-tokens`],[t],S)}export{w as handler};
|
package/dist/build.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)}\n`;
|
|
1
|
+
import{a as e}from"./prompts-2RKAx6EK.mjs";import{A as t,B as n,D as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,b as m,j as h,k as g,n as _,t as v,y,z as b}from"./console-CpZxo7mz.mjs";import{t as x}from"./build-T_HgwaMV.mjs";import{t as S}from"./update-DSl4_D0i.mjs";import{t as C}from"./command-DIfonR8Q.mjs";import{resolve as w}from"node:path";async function T(a=500){if(n().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||h)return;n().set(`is-banner-displayed`,!0),r(``),r(_.banner.outline.primary(`┏`)+_.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+_.banner.outline.primary(`━`)+` `+v(u.banner.header.primary(`Cyclone CLI v0.6.28`))+` `+_.banner.outline.primary(`━`.repeat(Math.max(g().columns-33,0)))+_.banner.outline.primary(`┓`),{consoleFn:console.log});let s=Math.max(...e.map(e=>y(e).length))>Math.max(g().columns+30,20)?`Cyclone UI`:`\n${e.join(`
|
|
2
|
+
`)}\n`;p(s,Math.max(g().columns-30,20)).forEach(e=>{r(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((g().columns-(y(e).length+2))/2),0))+v(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((g().columns-(y(e).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((g().columns-(y(`Build`).length+2))/2),0))+v(u.banner.command.primary(`Build`))+` `.repeat(Math.max(Math.ceil((g().columns-(y(`Build`).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log}),p(v(u.banner.description.primary(`Generate design tokens and build the resulting Tamagui config.`)),Math.max(60>g().columns/2?g().columns-6:g().columns-30,20)).forEach(e=>{r(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((g().columns-(y(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((g().columns-(y(e).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(g().columns-2,0))+_.banner.outline.primary(`┃`),{consoleFn:console.log}),r(_.banner.outline.primary(`┗`)+_.banner.outline.primary(`━`.repeat(Math.max(g().columns-32,0)))+` `+v(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+_.banner.outline.primary(`━`.repeat(6))+_.banner.outline.primary(`┛`),{consoleFn:console.log}),r(``),t&&!o()&&await l(a)}async function E(e){let t=w(e.cwd??process.cwd()),n=e.output??`tamagui.config.ts`;await C({...e,cwd:t,output:n});let{loadTamagui:r}=await import(`@tamagui/static/loadTamagui`);if(!(await r({root:t,config:w(t,n),outputCSS:w(t,`tamagui.generated.css`),components:[`@tamagui/core`],platform:`web`},!0))?.tamaguiConfig)throw Error(`Unable to build Tamagui config: ${w(t,n)}`);m(`Built Tamagui config and CSS.`)}async function D(e=c()){let t={...b()};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`?/^--?(cwd)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.cwd=r.replace(/^--?(cwd)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.cwd=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)):r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`config=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`config=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`?/^--?(config)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.config=r.replace(/^--?(config)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.config=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)):r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`tokens=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`tokens`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`tokens=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`tokens`?/^--?(tokens)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.tokens=r.replace(/^--?(tokens)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.tokens=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)):(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`output=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`output`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`output=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`output`)&&(/^--?(output)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.output=r.replace(/^--?(output)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.output=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}return i(`quiet`)||(await T(),await S()),!o()&&!i(`quiet`)&&(r(``),(s||a||d.LOG_LEVEL===`debug`)&&r(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?x():f(`build`,[`build`],[t],E)}export{D as handler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-
|
|
1
|
+
import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-CpZxo7mz.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.utility?t.tags.utility(r(` Utility `)):t.tags.default(r(` Utility `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`changelog`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(``),e(i(t.heading.secondary(`Options:`))),a([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the Changelog command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/changelog`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-
|
|
1
|
+
import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-C9sr-XcB.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.utility?t.tags.utility(r(` Utility `)):t.tags.default(r(` Utility `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`changelog`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(``),e(i(t.heading.secondary(`Options:`))),a([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the Changelog command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/changelog`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
|
package/dist/changelog.mjs
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)}\n`;
|
|
1
|
+
import{a as e}from"./prompts-2RKAx6EK.mjs";import{A as t,B as n,D as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-CpZxo7mz.mjs";import{t as b}from"./changelog-Bx6hXwPZ.mjs";import{t as x}from"./update-DSl4_D0i.mjs";import{bold as S,textColors as C}from"node:console";async function w(a=500){if(n().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||m)return;n().set(`is-banner-displayed`,!0),r(``),r(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+_(u.banner.header.primary(`Cyclone CLI v0.6.28`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-33,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let s=Math.max(...e.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone UI`:`\n${e.join(`
|
|
2
|
+
`)}\n`;p(s,Math.max(h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Changelog`).length+2))/2),0))+_(u.banner.command.primary(`Changelog`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Changelog`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Display the Cyclone User Interface changelog.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),r(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+_(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),r(``),t&&!o()&&await l(a)}function T(){console.log(`${C.body.primary(`textColors.body.primary("[Image: Cyclone UI's logo banner]")`)}
|
|
3
3
|
|
|
4
4
|
${S(C.heading.primary(`Changelog for Cyclone UI - CLI`))}
|
|
5
5
|
|
|
6
|
+
${S(C.heading.secondary(`0.6.28 (10/31/2026)`))}
|
|
7
|
+
|
|
8
|
+
${S(C.heading.tertiary(`Updated Dependencies`))}
|
|
9
|
+
|
|
10
|
+
${C.body.primary(`• Updated registry-api to v0.3.37
|
|
11
|
+
• Updated theme-builder to v0.0.27`)}
|
|
12
|
+
|
|
13
|
+
${S(C.heading.secondary(`0.6.27 (10/30/2026)`))}
|
|
14
|
+
|
|
15
|
+
${S(C.heading.tertiary(`Updated Dependencies`))}
|
|
16
|
+
|
|
17
|
+
${C.body.primary(`• Updated registry-api to v0.3.36
|
|
18
|
+
• Updated theme-builder to v0.0.26`)}
|
|
19
|
+
|
|
6
20
|
${S(C.heading.secondary(`0.6.26 (10/29/2026)`))}
|
|
7
21
|
|
|
8
22
|
${S(C.heading.tertiary(`Bug Fixes`))}
|
|
@@ -219,4 +233,4 @@ import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U a
|
|
|
219
233
|
${S(C.heading.tertiary(`Updated Dependencies`))}
|
|
220
234
|
|
|
221
235
|
${C.body.primary(`• Updated registry-api to v0.3.12
|
|
222
|
-
• Updated theme-builder to v0.0.2`)}`)}async function E(e=
|
|
236
|
+
• Updated theme-builder to v0.0.2`)}`)}async function E(e=c()){let t={...y()};for(let t=0;t<e.slice(0).length;t++)e[t].length>3&&e[t].startsWith(`--`)?`${e[t].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[t].length>2&&e[t].startsWith(`-`)?`${e[t].slice(1).replaceAll(`-`,``)}`:e[t];return i(`quiet`)||(await w(),await x()),!o()&&!i(`quiet`)&&(r(``),(s||a||d.LOG_LEVEL===`debug`)&&r(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?b():f(`changelog`,[`changelog`],[],T)}export{E as handler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,b as t}from"./console-
|
|
1
|
+
import{D as e,b as t}from"./console-C9sr-XcB.mjs";import{relative as n,resolve as r}from"node:path";import{generate as i}from"@cyclone-ui/theme-builder";import{generatePluginDocuments as a,isEmptyTokens as o,prepareSpec as s,resolveConfig as c,writeGeneratedDocuments as l}from"@razorwind/core";async function u(u){let d=r(u.cwd??process.cwd()),f=await c(d,{configFile:u.config,mode:`production`});u.tokens&&(f.tokensPath=u.tokens),f.plugins=[...f.plugins.filter(e=>!e.generate),i({outputPath:u.output??`tamagui.config.ts`})];let p=await s({cwd:d,options:f});if(o(p.tokens))throw Error("No design tokens found. Pass --tokens or set `tokensPath` in razorwind.config.ts.");let m=await l(await a(p,f),d);for(let t of m)e(n(d,t));t(`Generated ${m.length} files.`)}export{u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,b as t}from"./console-
|
|
1
|
+
import{D as e,b as t}from"./console-CpZxo7mz.mjs";import{relative as n,resolve as r}from"node:path";import{generate as i}from"@cyclone-ui/theme-builder";import{generatePluginDocuments as a,isEmptyTokens as o,prepareSpec as s,resolveConfig as c,writeGeneratedDocuments as l}from"@razorwind/core";async function u(u){let d=r(u.cwd??process.cwd()),f=await c(d,{configFile:u.config,mode:`production`});u.tokens&&(f.tokensPath=u.tokens),f.plugins=[...f.plugins.filter(e=>!e.generate),i({outputPath:u.output??`tamagui.config.ts`})];let p=await s({cwd:d,options:f});if(o(p.tokens))throw Error("No design tokens found. Pass --tokens or set `tokensPath` in razorwind.config.ts.");let m=await l(await a(p,f),d);for(let t of m)e(n(d,t));t(`Generated ${m.length} files.`)}export{u as t};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{A as
|
|
2
|
-
`)}\n`;
|
|
1
|
+
import{a as e}from"./prompts-2RKAx6EK.mjs";import{A as t,B as n,D as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-CpZxo7mz.mjs";import{t as b}from"./config-C1yRBqpq.mjs";import{t as x}from"./update-DSl4_D0i.mjs";import{n as S,t as C}from"./shared-DBrT0RAI.mjs";import w from"node:os";import{join as T}from"node:path";import{readFile as E,writeFile as D}from"node:fs/promises";import{bold as O,help as k,inlineCode as A,success as j,warn as M,writeLine as N}from"node:console";async function P(a=500){if(n().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||m)return;n().set(`is-banner-displayed`,!0),r(``),r(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+_(u.banner.header.primary(`Cyclone CLI v0.6.28`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-33,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let s=Math.max(...e.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone UI`:`\n${e.join(`
|
|
2
|
+
`)}\n`;p(s,Math.max(h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Completions - Bash Configuration`).length+2))/2),0))+_(u.banner.command.primary(`Completions - Bash Configuration`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Completions - Bash Configuration`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Update the current system's bash shell configuration to include completions for the Cyclone User Interface command-line interface.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),r(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+_(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),r(``),t&&!o()&&await l(a)}async function F(e={},t=`~/.bashrc`){if(e.display!==!0){let e=t.includes(`.`)?t:T(t,`.bashrc`);e.startsWith(`~`)&&(e=T(w.homedir(),e.replace(`~`,``)));let n=``;try{n=await E(e,`utf8`)}catch(t){if(typeof t==`object`&&t&&`code`in t&&t.code===`ENOENT`)M(`Configuration file ${O(e)} does not exist. It will be created when the completion script is written.`);else return{error:t}}await D(e,`${n}\n\n### Begin - Cyclone User Interface Shell Completions ###\n\n${C} \n\n### End - Cyclone User Interface Bash Completions ###`),j(`Cyclone User Interface shell completions have been applied to Bash configuration file at ${O(e)}. Please restart your terminal or run ${A(`source ${e}`)} for the changes to take effect.`)}else N(` ------------------------------------------------- `),N(``),N(`### Begin - Cyclone User Interface Bash Completions ###`),N(``),S.split(`
|
|
3
3
|
`).map(e=>N(e)),N(``),N(`### End - Cyclone User Interface Bash Completions ###`),N(``),N(` ------------------------------------------------- `),N(``),k(`To enable these completions, perform one of the following actions:
|
|
4
4
|
|
|
5
5
|
1) Copy and paste the above script into your shell configuration file (e.g., ~/.bashrc)
|
|
6
|
-
2) Save the above script to a file and source it from your shell configuration file `)}async function I(e=
|
|
6
|
+
2) Save the above script to a file and source it from your shell configuration file `)}async function I(e=c()){let t={...y(),display:!1};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`){if(/^--?(display)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.display=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.display=!0}}let n=[];for(let t=5;t<e.length;t++)e[t].length>1&&e[t].startsWith(`-`)||n.push(e[t]);let l=`~/.bashrc`;return n.length>0&&(l=n[0]),i(`quiet`)||(await P(),await x()),!o()&&!i(`quiet`)&&(r(``),(s||a||d.LOG_LEVEL===`debug`)&&r(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?b():f(`completions/bash/config`,[`completions`,`bash`,`config`],[t,l],F)}export{I as handler};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)}\n`;
|
|
1
|
+
import{a as e}from"./prompts-2RKAx6EK.mjs";import{A as t,B as n,D as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-CpZxo7mz.mjs";import{t as b}from"./script-JSaHIeA2.mjs";import{t as x}from"./update-DSl4_D0i.mjs";import{n as S,t as C}from"./shared-DBrT0RAI.mjs";import{writeFile as w}from"node:fs/promises";import{bold as T,help as E,success as D,writeLine as O}from"node:console";async function k(a=500){if(n().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||m)return;n().set(`is-banner-displayed`,!0),r(``),r(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+_(u.banner.header.primary(`Cyclone CLI v0.6.28`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-33,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let s=Math.max(...e.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone UI`:`\n${e.join(`
|
|
2
|
+
`)}\n`;p(s,Math.max(h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Completions - Bash Script`).length+2))/2),0))+_(u.banner.command.primary(`Completions - Bash Script`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Completions - Bash Script`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Generate a bash completion script for the Cyclone User Interface command-line interface.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),r(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+_(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),r(``),t&&!o()&&await l(a)}async function A(e={},t=`./cyclone-ui-completions.bash`){if(e.display!==!0){let e=t.includes(`.`)?`${t}.bash`:t;await w(e,`# Bash script to add completions for Cyclone User Interface\n\n${C}`),D(`Cyclone User Interface Bash completion script has been generated at ${T(e)}.`)}else O(` ------------------------------------------------- `),O(``),O(`# Bash completion for Cyclone User Interface`),O(``),S.split(`
|
|
3
3
|
`).map(e=>O(e)),O(``),O(` ------------------------------------------------- `),O(``),E(`To enable these completions, perform one of the following actions:
|
|
4
4
|
|
|
5
5
|
1) Copy and paste the above script into your shell configuration file (e.g., ~/.bashrc)
|
|
6
|
-
2) Save the above script to a file and source it from your shell configuration file `)}async function j(e=
|
|
6
|
+
2) Save the above script to a file and source it from your shell configuration file `)}async function j(e=c()){let t={...y(),display:!1};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`){if(/^--?(display)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.display=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.display=!0}}let n=[];for(let t=5;t<e.length;t++)e[t].length>1&&e[t].startsWith(`-`)||n.push(e[t]);let l=`./cyclone-ui-completions.bash`;return n.length>0&&(l=n[0]),i(`quiet`)||(await k(),await x()),!o()&&!i(`quiet`)&&(r(``),(s||a||d.LOG_LEVEL===`debug`)&&r(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?b():f(`completions/bash/script`,[`completions`,`bash`,`script`],[t,l],A)}export{j as handler};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{A as
|
|
2
|
-
`)}\n`;
|
|
1
|
+
import{a as e}from"./prompts-2RKAx6EK.mjs";import{A as t,B as n,D as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-CpZxo7mz.mjs";import{t as b}from"./config-zswEkHA-.mjs";import{t as x}from"./update-DSl4_D0i.mjs";import{n as S,t as C}from"./shared-DydhGIcA.mjs";import w from"node:os";import{join as T}from"node:path";import{readFile as E,writeFile as D}from"node:fs/promises";import{bold as O,help as k,inlineCode as A,success as j,warn as M,writeLine as N}from"node:console";async function P(a=500){if(n().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||m)return;n().set(`is-banner-displayed`,!0),r(``),r(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+_(u.banner.header.primary(`Cyclone CLI v0.6.28`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-33,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let s=Math.max(...e.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone UI`:`\n${e.join(`
|
|
2
|
+
`)}\n`;p(s,Math.max(h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Completions - Fish Configuration`).length+2))/2),0))+_(u.banner.command.primary(`Completions - Fish Configuration`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Completions - Fish Configuration`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Update the current system's Fish shell configuration to include completions for the Cyclone User Interface command-line interface.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),r(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+_(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),r(``),t&&!o()&&await l(a)}async function F(e={},t=`~/.config/fish/config.fish`){if(e.display!==!0){let e=t.includes(`.`)?t:T(t,`.config`,`fish`,`config.fish`);e.startsWith(`~`)&&(e=T(w.homedir(),e.replace(`~`,``)));let n=``;try{n=await E(e,`utf8`)}catch(t){if(typeof t==`object`&&t&&`code`in t&&t.code===`ENOENT`)M(`Configuration file ${O(e)} does not exist. It will be created when the completion script is written.`);else return{error:t}}await D(e,`${n}\n\n### Begin - Cyclone User Interface Fish Completions ###\n\n${C} \n\n### End - Cyclone User Interface Fish Completions ###`),j(`Cyclone User Interface shell completions have been applied to Fish configuration file at ${O(e)}. Please restart your terminal or run ${A(`source ${e}`)} for the changes to take effect.`)}else N(` ------------------------------------------------- `),N(``),N(`### Begin - Cyclone User Interface Fish Completions ###`),N(``),S.split(`
|
|
3
3
|
`).map(e=>N(e)),N(``),N(`### End - Cyclone User Interface Fish Completions ###`),N(``),N(` ------------------------------------------------- `),N(``),k(`To enable these completions, perform one of the following actions:
|
|
4
4
|
|
|
5
5
|
1) Copy and paste the above script into your shell configuration file (e.g., ~/.config/fish/config.fish)
|
|
6
|
-
2) Save the above script to a file and source it from your shell configuration file `)}async function I(e=
|
|
6
|
+
2) Save the above script to a file and source it from your shell configuration file `)}async function I(e=c()){let t={...y(),display:!1};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`){if(/^--?(display)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.display=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.display=!0}}let n=[];for(let t=5;t<e.length;t++)e[t].length>1&&e[t].startsWith(`-`)||n.push(e[t]);let l=`~/.config/fish/config.fish`;return n.length>0&&(l=n[0]),i(`quiet`)||(await P(),await x()),!o()&&!i(`quiet`)&&(r(``),(s||a||d.LOG_LEVEL===`debug`)&&r(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?b():f(`completions/fish/config`,[`completions`,`fish`,`config`],[t,l],F)}export{I as handler};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)}\n`;
|
|
1
|
+
import{a as e}from"./prompts-2RKAx6EK.mjs";import{A as t,B as n,D as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-CpZxo7mz.mjs";import{t as b}from"./script-vK-_gHx5.mjs";import{t as x}from"./update-DSl4_D0i.mjs";import{n as S,t as C}from"./shared-DydhGIcA.mjs";import{writeFile as w}from"node:fs/promises";import{bold as T,help as E,success as D,writeLine as O}from"node:console";async function k(a=500){if(n().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||m)return;n().set(`is-banner-displayed`,!0),r(``),r(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+_(u.banner.header.primary(`Cyclone CLI v0.6.28`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-33,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let s=Math.max(...e.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone UI`:`\n${e.join(`
|
|
2
|
+
`)}\n`;p(s,Math.max(h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Completions - Fish Script`).length+2))/2),0))+_(u.banner.command.primary(`Completions - Fish Script`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Completions - Fish Script`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Generate a Fish completion script for the Cyclone User Interface command-line interface.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),r(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+_(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),r(``),t&&!o()&&await l(a)}async function A(e={},t=`./cyclone-ui-completions.fish`){if(e.display!==!0){let e=t.includes(`.`)?`${t}.fish`:t;await w(e,`# Fish script to add completions for Cyclone User Interface\n\n${C}`),D(`Cyclone User Interface Fish completion script has been generated at ${T(e)}.`)}else O(` ------------------------------------------------- `),O(``),O(`# Fish completion for Cyclone User Interface`),O(``),S.split(`
|
|
3
3
|
`).map(e=>O(e)),O(``),O(` ------------------------------------------------- `),O(``),E(`To enable these completions, perform one of the following actions:
|
|
4
4
|
|
|
5
5
|
1) Copy and paste the above script into your shell configuration file (e.g., ~/.config/fish/config.fish)
|
|
6
|
-
2) Save the above script to a file and source it from your shell configuration file `)}async function j(e=
|
|
6
|
+
2) Save the above script to a file and source it from your shell configuration file `)}async function j(e=c()){let t={...y(),display:!1};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`){if(/^--?(display)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.display=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.display=!0}}let n=[];for(let t=5;t<e.length;t++)e[t].length>1&&e[t].startsWith(`-`)||n.push(e[t]);let l=`./cyclone-ui-completions.fish`;return n.length>0&&(l=n[0]),i(`quiet`)||(await k(),await x()),!o()&&!i(`quiet`)&&(r(``),(s||a||d.LOG_LEVEL===`debug`)&&r(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?b():f(`completions/fish/script`,[`completions`,`fish`,`script`],[t,l],A)}export{j as handler};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{A as
|
|
2
|
-
`)}\n`;
|
|
3
|
-
`).map(e=>
|
|
1
|
+
import{a as e}from"./prompts-2RKAx6EK.mjs";import{A as t,B as n,D as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,T as d,U as f,V as p,_ as m,b as h,f as g,j as _,k as v,n as y,t as b,u as x,y as S,z as C}from"./console-CpZxo7mz.mjs";import{t as w}from"./config-dh9BciUc.mjs";import{t as T}from"./update-DSl4_D0i.mjs";import{n as E,t as D}from"./shared-COs2b2F8.mjs";import O from"node:os";import{join as k}from"node:path";import{readFile as A,writeFile as j}from"node:fs/promises";async function M(a=500){if(n().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||_)return;n().set(`is-banner-displayed`,!0),r(``),r(y.banner.outline.primary(`┏`)+y.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+y.banner.outline.primary(`━`)+` `+b(u.banner.header.primary(`Cyclone CLI v0.6.28`))+` `+y.banner.outline.primary(`━`.repeat(Math.max(v().columns-33,0)))+y.banner.outline.primary(`┓`),{consoleFn:console.log});let s=Math.max(...e.map(e=>S(e).length))>Math.max(v().columns+30,20)?`Cyclone UI`:`\n${e.join(`
|
|
2
|
+
`)}\n`;m(s,Math.max(v().columns-30,20)).forEach(e=>{r(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((v().columns-(S(e).length+2))/2),0))+b(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((v().columns-(S(e).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((v().columns-(S(`Completions - PowerShell Configuration`).length+2))/2),0))+b(u.banner.command.primary(`Completions - PowerShell Configuration`))+` `.repeat(Math.max(Math.ceil((v().columns-(S(`Completions - PowerShell Configuration`).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log}),m(b(u.banner.description.primary(`Update the current system's PowerShell configuration to include completions for the Cyclone User Interface command-line interface.`)),Math.max(60>v().columns/2?v().columns-6:v().columns-30,20)).forEach(e=>{r(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((v().columns-(S(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((v().columns-(S(e).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(v().columns-2,0))+y.banner.outline.primary(`┃`),{consoleFn:console.log}),r(y.banner.outline.primary(`┗`)+y.banner.outline.primary(`━`.repeat(Math.max(v().columns-32,0)))+` `+b(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+y.banner.outline.primary(`━`.repeat(6))+y.banner.outline.primary(`┛`),{consoleFn:console.log}),r(``),t&&!o()&&await l(a)}async function N(e={},t=`~/.config/powershell/Microsoft.PowerShell_profile.ps1`){if(e.display!==!0){let e=t.includes(`.`)?t:k(t,`Microsoft.PowerShell_profile.ps1`);e.startsWith(`~`)&&(e=k(O.homedir(),e.replace(`~`,``)));let n=``;try{n=await A(e,`utf8`)}catch(t){if(typeof t==`object`&&t&&`code`in t&&t.code===`ENOENT`)d(`Configuration file ${b(e)} does not exist. It will be created when the completion script is written.`);else return{error:t}}await j(e,`${n}\n\n### Begin - Cyclone User Interface PowerShell Completions ###\n\n${D} \n\n### End - Cyclone User Interface PowerShell Completions ###`),h(`Cyclone User Interface shell completions have been applied to PowerShell configuration file at ${b(e)}. Please restart your terminal or run ${g(`source ${e}`)} for the changes to take effect.`)}else r(` ------------------------------------------------- `),r(``),r(`### Begin - Cyclone User Interface PowerShell Completions ###`),r(``),E.split(`
|
|
3
|
+
`).map(e=>r(e)),r(``),r(`### End - Cyclone User Interface PowerShell Completions ###`),r(``),r(` ------------------------------------------------- `),r(``),x(`To enable these completions, perform one of the following actions:
|
|
4
4
|
|
|
5
5
|
1) Copy and paste the above script into your shell configuration file (e.g., ~/.config/powershell/Microsoft.PowerShell_profile.ps1)
|
|
6
|
-
2) Save the above script to a file and source it from your shell configuration file `)}async function P(e=
|
|
6
|
+
2) Save the above script to a file and source it from your shell configuration file `)}async function P(e=c()){let t={...C(),display:!1};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`){if(/^--?(display)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.display=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.display=!0}}let n=[];for(let t=5;t<e.length;t++)e[t].length>1&&e[t].startsWith(`-`)||n.push(e[t]);let l=`~/.config/powershell/Microsoft.PowerShell_profile.ps1`;return n.length>0&&(l=n[0]),i(`quiet`)||(await M(),await T()),!o()&&!i(`quiet`)&&(r(``),(s||a||f.LOG_LEVEL===`debug`)&&r(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?w():p(`completions/powershell/config`,[`completions`,`powershell`,`config`],[t,l],N)}export{P as handler};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)}\n`;
|
|
1
|
+
import{a as e}from"./prompts-2RKAx6EK.mjs";import{A as t,B as n,D as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-CpZxo7mz.mjs";import{t as b}from"./script-C5c4niE-.mjs";import{t as x}from"./update-DSl4_D0i.mjs";import{n as S,t as C}from"./shared-COs2b2F8.mjs";import{writeFile as w}from"node:fs/promises";import{bold as T,help as E,success as D,writeLine as O}from"node:console";async function k(a=500){if(n().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||m)return;n().set(`is-banner-displayed`,!0),r(``),r(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+_(u.banner.header.primary(`Cyclone CLI v0.6.28`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-33,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let s=Math.max(...e.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone UI`:`\n${e.join(`
|
|
2
|
+
`)}\n`;p(s,Math.max(h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Completions - PowerShell Script`).length+2))/2),0))+_(u.banner.command.primary(`Completions - PowerShell Script`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Completions - PowerShell Script`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Generate a PowerShell completion script for the Cyclone User Interface command-line interface.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),r(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+_(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),r(``),t&&!o()&&await l(a)}async function A(e={},t=`./cyclone-ui-completions.ps1`){if(e.display!==!0){let e=t.includes(`.`)?`${t}.ps1`:t;await w(e,`# PowerShell script to add completions for Cyclone User Interface\n\n${C}`),D(`Cyclone User Interface PowerShell completion script has been generated at ${T(e)}.`)}else O(` ------------------------------------------------- `),O(``),O(`# PowerShell completions for Cyclone User Interface`),O(``),S.split(`
|
|
3
3
|
`).map(e=>O(e)),O(``),O(` ------------------------------------------------- `),O(``),E(`To enable these completions, perform one of the following actions:
|
|
4
4
|
|
|
5
5
|
1) Copy and paste the above script into your shell configuration file (e.g., ~/.config/powershell/Microsoft.PowerShell_profile.ps1)
|
|
6
|
-
2) Save the above script to a file and source it from your shell configuration file `)}async function j(e=
|
|
6
|
+
2) Save the above script to a file and source it from your shell configuration file `)}async function j(e=c()){let t={...y(),display:!1};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`){if(/^--?(display)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.display=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.display=!0}}let n=[];for(let t=5;t<e.length;t++)e[t].length>1&&e[t].startsWith(`-`)||n.push(e[t]);let l=`./cyclone-ui-completions.ps1`;return n.length>0&&(l=n[0]),i(`quiet`)||(await k(),await x()),!o()&&!i(`quiet`)&&(r(``),(s||a||d.LOG_LEVEL===`debug`)&&r(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?b():f(`completions/powershell/script`,[`completions`,`powershell`,`script`],[t,l],A)}export{j as handler};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{A as
|
|
2
|
-
`)}\n`;
|
|
1
|
+
import{a as e}from"./prompts-2RKAx6EK.mjs";import{A as t,B as n,D as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-CpZxo7mz.mjs";import{t as b}from"./config-DyLs5oQt.mjs";import{t as x}from"./update-DSl4_D0i.mjs";import{n as S,t as C}from"./shared-BGOJLoin.mjs";import w from"node:os";import{join as T}from"node:path";import{readFile as E,writeFile as D}from"node:fs/promises";import{bold as O,help as k,inlineCode as A,success as j,warn as M,writeLine as N}from"node:console";async function P(a=500){if(n().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||m)return;n().set(`is-banner-displayed`,!0),r(``),r(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+_(u.banner.header.primary(`Cyclone CLI v0.6.28`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-33,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let s=Math.max(...e.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone UI`:`\n${e.join(`
|
|
2
|
+
`)}\n`;p(s,Math.max(h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Completions - Zsh Configuration`).length+2))/2),0))+_(u.banner.command.primary(`Completions - Zsh Configuration`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Completions - Zsh Configuration`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Update the current system's Zsh shell configuration to include completions for the Cyclone User Interface command-line interface.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),r(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+_(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),r(``),t&&!o()&&await l(a)}async function F(e={},t=`~/.zshrc`){if(e.display!==!0){let e=t.includes(`.`)?t:T(t,`.zshrc`);e.startsWith(`~`)&&(e=T(w.homedir(),e.replace(`~`,``)));let n=``;try{n=await E(e,`utf8`)}catch(t){if(typeof t==`object`&&t&&`code`in t&&t.code===`ENOENT`)M(`Configuration file ${O(e)} does not exist. It will be created when the completion script is written.`);else return{error:t}}await D(e,`${n}\n\n### Begin - Cyclone User Interface Shell Completions ###\n\n${C} \n\n### End - Cyclone User Interface Zsh Completions ###`),j(`Cyclone User Interface shell completions have been applied to Zsh configuration file at ${O(e)}. Please restart your terminal or run ${A(`source ${e}`)} for the changes to take effect.`)}else N(` ------------------------------------------------- `),N(``),N(`### Begin - Cyclone User Interface Zsh Completions ###`),N(``),S.split(`
|
|
3
3
|
`).map(e=>N(e)),N(``),N(`### End - Cyclone User Interface Zsh Completions ###`),N(``),N(` ------------------------------------------------- `),N(``),k(`To enable these completions, perform one of the following actions:
|
|
4
4
|
|
|
5
5
|
1) Copy and paste the above script into your shell configuration file (e.g., ~/.config/zsh/.zshrc)
|
|
6
|
-
2) Save the above script to a file and source it from your shell configuration file `)}async function I(e=
|
|
6
|
+
2) Save the above script to a file and source it from your shell configuration file `)}async function I(e=c()){let t={...y(),display:!1};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`){if(/^--?(display)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.display=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.display=!0}}let n=[];for(let t=5;t<e.length;t++)e[t].length>1&&e[t].startsWith(`-`)||n.push(e[t]);let l=`~/.zshrc`;return n.length>0&&(l=n[0]),i(`quiet`)||(await P(),await x()),!o()&&!i(`quiet`)&&(r(``),(s||a||d.LOG_LEVEL===`debug`)&&r(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?b():f(`completions/zsh/config`,[`completions`,`zsh`,`config`],[t,l],F)}export{I as handler};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)}\n`;
|
|
1
|
+
import{a as e}from"./prompts-2RKAx6EK.mjs";import{A as t,B as n,D as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-CpZxo7mz.mjs";import{t as b}from"./script-D7Xk6MbD.mjs";import{t as x}from"./update-DSl4_D0i.mjs";import{n as S,t as C}from"./shared-BGOJLoin.mjs";import{writeFile as w}from"node:fs/promises";import{bold as T,help as E,success as D,writeLine as O}from"node:console";async function k(a=500){if(n().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||m)return;n().set(`is-banner-displayed`,!0),r(``),r(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+_(u.banner.header.primary(`Cyclone CLI v0.6.28`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-33,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let s=Math.max(...e.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone UI`:`\n${e.join(`
|
|
2
|
+
`)}\n`;p(s,Math.max(h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Completions - Zsh Script`).length+2))/2),0))+_(u.banner.command.primary(`Completions - Zsh Script`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Completions - Zsh Script`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Generate a Zsh completion script for the Cyclone User Interface command-line interface.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),r(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+_(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),r(``),t&&!o()&&await l(a)}async function A(e={},t=`cyclone-ui-completions.zsh`){if(e.display!==!0){let e=t.includes(`.`)?`${t}.zsh`:t;await w(e,`# Zsh script to add completions for Cyclone User Interface\n\n${C}`),D(`Cyclone User Interface Zsh completion script has been generated at ${T(e)}.`)}else O(` ------------------------------------------------- `),O(``),O(`#compdef cyclone-ui `),O(`#compdef _cyclone_ui cyclone-ui`),O(``),O(`# Zsh completion for Cyclone User Interface`),O(``),S.split(`
|
|
3
3
|
`).map(e=>O(e)),O(``),O(` ------------------------------------------------- `),O(``),E(`To enable these completions, perform one of the following actions:
|
|
4
4
|
|
|
5
5
|
1) Copy and paste the above script into your shell configuration file (e.g., ~/.config/zsh/.zshrc)
|
|
6
|
-
2) Save the above script to a file and source it from your shell configuration file `)}async function j(e=
|
|
6
|
+
2) Save the above script to a file and source it from your shell configuration file `)}async function j(e=c()){let t={...y(),display:!1};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`){if(/^--?(display)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.display=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.display=!0}}let n=[];for(let t=5;t<e.length;t++)e[t].length>1&&e[t].startsWith(`-`)||n.push(e[t]);let l=`cyclone-ui-completions.zsh`;return n.length>0&&(l=n[0]),i(`quiet`)||(await k(),await x()),!o()&&!i(`quiet`)&&(r(``),(s||a||d.LOG_LEVEL===`debug`)&&r(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?b():f(`completions/zsh/script`,[`completions`,`zsh`,`script`],[t,l],A)}export{j as handler};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{l as e,o as t,r as n,s as r}from"./config-BwGb7RTa.mjs";import{dirname as i,relative as a,resolve as o}from"node:path";import{mkdir as s,readFile as c,writeFile as l}from"node:fs/promises";async function u(e,t,n){if(n!==!1||!/\.[cm]?[jt]sx?$/.test(e)||/\.d\.[cm]?ts$/.test(e))return t;let r=await import(`typescript`),i=r.createSourceFile(e,t,r.ScriptTarget.Latest),a=[];for(let e of i.statements){if(!r.isExpressionStatement(e)||!r.isStringLiteral(e.expression))break;e.expression.text===`use client`&&(a.push({start:e.expression.getStart(i),end:e.expression.end}),t[e.end-1]===`;`&&a.push({start:e.end-1,end:e.end}))}for(let{start:e,end:n}of a.reverse())t=t.slice(0,e)+t.slice(n);return t}async function d(e,t,n,r,s){if(!/\.[cm]?[jt]sx?$/.test(e))return t;let{default:c}=await import(`typescript`),l=c.createSourceFile(e,t,c.ScriptTarget.Latest),u=[],d=e=>{if(!c.isStringLiteralLike(e))return;let t=/^@cyclone-ui\/([^/]+)(\/.*)?$/.exec(e.text);if(!t||!s.has(t[1]))return;let d=t[2]??``,f=o(r,t[1],`.${d}`),p=a(i(n),f).replaceAll(`\\`,`/`);p.startsWith(`.`)||(p=`./${p}`),u.push({start:e.getStart(l)+1,end:e.getEnd()-1,value:p})},f=e=>{c.isImportDeclaration(e)||c.isExportDeclaration(e)?e.moduleSpecifier&&d(e.moduleSpecifier):c.isCallExpression(e)&&(e.expression.kind===c.SyntaxKind.ImportKeyword||c.isIdentifier(e.expression)&&e.expression.text===`require`)?e.arguments.length===1&&d(e.arguments[0]):c.isImportTypeNode(e)&&c.isLiteralTypeNode(e.argument)&&d(e.argument.literal),c.forEachChild(e,f)};f(l);for(let e of u.sort((e,t)=>t.start-e.start))t=t.slice(0,e.start)+e.value+t.slice(e.end);return t}async function f(t,n){let r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Set,a=async n=>{let o=e(n);if(r.has(o))return;if(i.has(o))throw Error(`Circular component dependency detected at \"${o}\"`);i.add(o);let s=await t.components.get.query(o);for(let e of s.internalDependencies)await a(e);i.delete(o),r.set(o,s)};for(let e of n)await a(e);return[...r.values()]}const p=/\.tailwind(?=\.[cm]?[jt]sx?$)/;function m(e,t){let n=e.filter(e=>!p.test(e.name));if(t!==`tailwind`)return n;let r=e.filter(e=>p.test(e.name)).map(e=>({...e,name:e.name.replace(p,``)})),i=new Set(r.map(e=>e.name));return[...n.filter(e=>!i.has(e.name)),...r]}async function h(r,i,o,s){let l=await f(r,o),p=t(s.root,s.path??i.path),h=new Set(l.map(t=>e(t.name))),g=[];for(let r of l){let o=e(r.name);if(!/^[a-z0-9][a-z0-9._-]*$/i.test(o))throw Error(`Invalid component name received: ${r.name}`);for(let e of m(r.files,i.style)){let r=t(p,o),l=t(r,e.name),f=await u(e.name,e.content,s.rsc??i.rsc),m=await d(e.name,f,l,p,h),_=await n(l)?await c(l,`utf8`):null,v=_===null?`create`:_===m?`unchanged`:`overwrite`;if(v===`overwrite`&&!s.overwrite&&!s.dryRun)throw Error(`${a(s.root,l)} already exists. Re-run with --overwrite to replace it.`);g.push({component:o,path:l,content:m,previousContent:_,status:v})}}return{components:l,files:g}}async function g(t,n,o){if(!o.dryRun){for(let e of n.files)e.status!==`unchanged`&&(await s(i(e.path),{recursive:!0}),await l(e.path,e.content,`utf8`));for(let r of n.components){let i=e(r.name);t.components[i]={version:r.version,files:n.files.filter(e=>e.component===i).map(e=>a(o.root,e.path))}}await _(o.root,n.components,t.style),await r(o.root,t)}}async function _(t,r,i){let a=o(t,`package.json`);if(!await n(a))return;let s=JSON.parse(await c(a,`utf8`)),u=new Set(r.flatMap(t=>[t.name,`@cyclone-ui/${e(t.name)}`])),d=Object.assign({},...r.map(e=>e.dependencies));i!==`tailwind`&&delete d[`@tamagui/tailwind`];let f=Object.assign({},...r.map(e=>e.devDependencies));s.dependencies??={},s.devDependencies??={};for(let[e,t]of Object.entries(d))u.has(e)||s.dependencies[e]||s.devDependencies[e]||(s.dependencies[e]=v(t));for(let[e,t]of Object.entries(f))u.has(e)||s.dependencies[e]||s.devDependencies[e]||(s.devDependencies[e]=v(t));await l(a,`${JSON.stringify(s,null,2)}\n`,`utf8`)}function v(e){return e.startsWith(`catalog:`)||e.startsWith(`workspace:`)?`latest`:e}function y(e,t){return e.files.map(e=>`${e.status.padEnd(9)} ${a(t,e.path)}`).join(`
|
|
2
|
+
`)}function b(e,t){let n=e.files.filter(e=>e.status!==`unchanged`);return n.length===0?`No differences found.`:n.map(e=>{let n=`--- ${e.previousContent===null?`/dev/null`:a(t,e.path)}\n+++ ${a(t,e.path)}`;return e.previousContent===null?`${n}\n${e.content.split(`
|
|
3
|
+
`).map(e=>`+${e}`).join(`
|
|
4
|
+
`)}`:`${n}\n${e.previousContent.split(`
|
|
5
|
+
`).map(e=>`-${e}`).join(`
|
|
6
|
+
`)}\n${e.content.split(`
|
|
7
|
+
`).map(e=>`+${e}`).join(`
|
|
8
|
+
`)}`}).join(`
|
|
9
|
+
|
|
10
|
+
`)}export{y as i,h as n,b as r,g as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-
|
|
1
|
+
import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-C9sr-XcB.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.utility?t.tags.utility(r(` Utility `)):t.tags.default(r(` Utility `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`completions`)} ${t.usage.command(`zsh`)} ${t.usage.command(`config`)} ${t.usage.args(`<path>`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`completions`)} ${t.usage.command(`zsh`)} ${t.usage.command(`config`)} ${t.usage.options(`[options]`)} ${t.usage.args(`<path>`)}`),{padding:0}),e(``),e(i(t.heading.secondary(`Options:`))),a([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--display`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Should the generated completion script be written to console output instead of an actual file on disk? (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the Completions - Zsh Configuration command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/completions/zsh/config`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dirname as e,isAbsolute as t,relative as n,resolve as r}from"node:path";import{access as i,mkdir as a,readFile as o,writeFile as s}from"node:fs/promises";import{createRegistryClient as c}from"@cyclone-ui/registry-api/client";const l=`https://public.storm-cdn.com/cyclone-ui/registry`;function u(e){if(!e||typeof e!=`object`||Array.isArray(e))throw Error(`Invalid registry JSON object`);return e}function d(e){if(e===void 0)return[];if(!Array.isArray(e)||e.some(e=>typeof e!=`string`))throw Error(`Invalid registry dependency or tags array`);return e}function f(e){let t=u(e);if(typeof t.name!=`string`)throw Error(`Registry item is missing a name`);return m(t.name),{name:t.name,version:typeof t.version==`string`?t.version:void 0,release:typeof t.release==`string`?t.release:`latest`,description:typeof t.description==`string`?t.description:``,tags:d(t.tags)}}function p(e){return Object.fromEntries(d(e).map(e=>{let t=e.lastIndexOf(`@`),n=t>0?e.slice(0,t):e,r=t>0?e.slice(t+1):`latest`;if(!/^(?:@[\w.-]+\/)?[\w.-]+$/.test(n)||!r||/^(?:catalog|workspace|link):/.test(r))throw Error(`Invalid published dependency: ${e}`);return[n,r]}))}function m(e){let t=g(e);if(!/^[a-z0-9][\w.-]*$/i.test(t))throw Error(`Invalid component name: ${e}`);return t}function h(e){let t;try{if(t=new URL(e),![`http:`,`https:`].includes(t.protocol))throw Error(`Unsupported registry protocol`)}catch{throw Error(`Invalid registry URL: ${e}`)}if(/\/api\/?$/.test(t.pathname))return c(t.toString().replace(/\/$/,``));t.pathname=`${t.pathname.replace(/\/registry\.json$/,``).replace(/\/$/,``)}/`,t.search=``,t.hash=``;let n=async e=>{let n=new URL(e,t),r=await fetch(n,{signal:AbortSignal.timeout(3e4),cache:`no-cache`});if(!r.ok)throw Error(`Registry request failed (${r.status}): ${n.toString()}`);return r.json()};return{components:{list:{query:async()=>{let e=u(await n(`registry.json`));if(!Array.isArray(e.items))throw Error(`Registry catalog must contain an items array`);return e.items.map(f)}},get:{query:async e=>{let t=m(e),r=u(await n(`components/${t}.json`)),i=f(r);if(m(i.name)!==t)throw Error(`Registry returned the wrong component for ${t}`);if(!Array.isArray(r.files))throw Error(`Registry component ${t} is missing its files`);return{...i,dependencies:p(r.dependencies),devDependencies:p(r.devDependencies),internalDependencies:d(r.registryDependencies).map(m),files:r.files.map(e=>{let n=u(e);if(typeof n.path!=`string`||typeof n.content!=`string`)throw Error(`Registry component ${t} has a file without a path or content`);return{name:n.path,content:n.content}})}}}}}}function g(e){return e.replace(/^@cyclone-ui\//,``)}const _=`components.json`;function v(e={}){return{registry:e.registry??`https://public.storm-cdn.com/cyclone-ui/registry`,path:e.path??`components`,...e.rsc===void 0?{}:{rsc:e.rsc},components:{}}}async function y(e){try{return await i(e),!0}catch{return!1}}async function b(e){let t=r(e,_);if(!await y(t))return null;let n=JSON.parse(await o(t,`utf8`));if(!n||typeof n!=`object`||!(`registry`in n)||typeof n.registry!=`string`||!(`path`in n)||typeof n.path!=`string`||`rsc`in n&&typeof n.rsc!=`boolean`||!(`components`in n)||!n.components||typeof n.components!=`object`||Array.isArray(n.components))throw Error(`${_} exists but is not a Cyclone UI configuration file`);return n}async function x(e){let t=await b(e);if(!t)throw Error(`No ${_} found. Run \"cyclone init\" first.`);return t}async function S(t,n){let i=r(t,_);await a(e(i),{recursive:!0}),await s(i,`${JSON.stringify(n,null,2)}\n`,`utf8`)}function C(e,i){let a=r(e),o=r(a,i),s=n(a,o);if(s.startsWith(`..`)||t(s))throw Error(`Refusing to write outside the project: ${i}`);return o}export{x as a,l as c,b as i,g as l,v as n,C as o,y as r,S as s,_ as t,h as u};
|
|
1
|
+
import{dirname as e,isAbsolute as t,relative as n,resolve as r}from"node:path";import{access as i,mkdir as a,readFile as o,writeFile as s}from"node:fs/promises";import{createRegistryClient as c}from"@cyclone-ui/registry-api/client";const l=`https://public.storm-cdn.com/cyclone-ui/registry`;function u(e){if(!e||typeof e!=`object`||Array.isArray(e))throw Error(`Invalid registry JSON object`);return e}function d(e){if(e===void 0)return[];if(!Array.isArray(e)||e.some(e=>typeof e!=`string`))throw Error(`Invalid registry dependency or tags array`);return e}function f(e){let t=u(e);if(typeof t.name!=`string`)throw Error(`Registry item is missing a name`);return m(t.name),{name:t.name,version:typeof t.version==`string`?t.version:void 0,release:typeof t.release==`string`?t.release:`latest`,description:typeof t.description==`string`?t.description:``,tags:d(t.tags)}}function p(e){return Object.fromEntries(d(e).map(e=>{let t=e.lastIndexOf(`@`),n=t>0?e.slice(0,t):e,r=t>0?e.slice(t+1):`latest`;if(!/^(?:@[\w.-]+\/)?[\w.-]+$/.test(n)||!r||/^(?:catalog|workspace|link):/.test(r))throw Error(`Invalid published dependency: ${e}`);return[n,r]}))}function m(e){let t=g(e);if(!/^[a-z0-9][\w.-]*$/i.test(t))throw Error(`Invalid component name: ${e}`);return t}function h(e){let t;try{if(t=new URL(e),![`http:`,`https:`].includes(t.protocol))throw Error(`Unsupported registry protocol`)}catch{throw Error(`Invalid registry URL: ${e}`)}if(/\/api\/?$/.test(t.pathname))return c(t.toString().replace(/\/$/,``));t.pathname=`${t.pathname.replace(/\/registry\.json$/,``).replace(/\/$/,``)}/`,t.search=``,t.hash=``;let n=async e=>{let n=new URL(e,t),r=await fetch(n,{signal:AbortSignal.timeout(3e4),cache:`no-cache`});if(!r.ok)throw Error(`Registry request failed (${r.status}): ${n.toString()}`);return r.json()};return{components:{list:{query:async()=>{let e=u(await n(`registry.json`));if(!Array.isArray(e.items))throw Error(`Registry catalog must contain an items array`);return e.items.map(f)}},get:{query:async e=>{let t=m(e),r=u(await n(`components/${t}.json`)),i=f(r);if(m(i.name)!==t)throw Error(`Registry returned the wrong component for ${t}`);if(!Array.isArray(r.files))throw Error(`Registry component ${t} is missing its files`);return{...i,dependencies:p(r.dependencies),devDependencies:p(r.devDependencies),internalDependencies:d(r.registryDependencies).map(m),files:r.files.map(e=>{let n=u(e);if(typeof n.path!=`string`||typeof n.content!=`string`)throw Error(`Registry component ${t} has a file without a path or content`);return{name:n.path,content:n.content}})}}}}}}function g(e){return e.replace(/^@cyclone-ui\//,``)}const _=`components.json`;function v(e={}){return{registry:e.registry??`https://public.storm-cdn.com/cyclone-ui/registry`,path:e.path??`components`,...e.rsc===void 0?{}:{rsc:e.rsc},...e.style===void 0?{}:{style:e.style},components:{}}}async function y(e){try{return await i(e),!0}catch{return!1}}async function b(e){let t=r(e,_);if(!await y(t))return null;let n=JSON.parse(await o(t,`utf8`));if(!n||typeof n!=`object`||!(`registry`in n)||typeof n.registry!=`string`||!(`path`in n)||typeof n.path!=`string`||`rsc`in n&&typeof n.rsc!=`boolean`||`style`in n&&n.style!==`tamagui`&&n.style!==`tailwind`||!(`components`in n)||!n.components||typeof n.components!=`object`||Array.isArray(n.components))throw Error(`${_} exists but is not a Cyclone UI configuration file`);return n}async function x(e){let t=await b(e);if(!t)throw Error(`No ${_} found. Run \"cyclone init\" first.`);return t}async function S(t,n){let i=r(t,_);await a(e(i),{recursive:!0}),await s(i,`${JSON.stringify(n,null,2)}\n`,`utf8`)}function C(e,i){let a=r(e),o=r(a,i),s=n(a,o);if(s.startsWith(`..`)||t(s))throw Error(`Refusing to write outside the project: ${i}`);return o}export{x as a,l as c,b as i,g as l,v as n,C as o,y as r,S as s,_ as t,h as u};
|