@cyclone-ui/cli 0.6.14 → 0.6.15
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 +58 -13
- package/dist/{add-BO9sicre.mjs → add-QZOxYcRK.mjs} +1 -1
- package/dist/add.mjs +3 -3
- package/dist/{analyze-a11y-C0_xJ68a.mjs → analyze-a11y-BU8faGzr.mjs} +1 -1
- package/dist/analyze-a11y.mjs +1 -1
- package/dist/bin.mjs +7 -7
- package/dist/build-BMHh7SnK.mjs +1 -0
- package/dist/build-tokens-C_wzH90_.mjs +1 -0
- package/dist/build-tokens.mjs +2 -0
- package/dist/build.mjs +2 -2
- package/dist/{changelog-D7Pj1d-6.mjs → changelog-Q5DymQRF.mjs} +1 -1
- package/dist/changelog.mjs +12 -1
- package/dist/command-DbeCTonF.mjs +1 -0
- package/dist/completions-bash-config.mjs +1 -1
- package/dist/completions-bash-script.mjs +1 -1
- package/dist/completions-fish-config.mjs +1 -1
- package/dist/completions-fish-script.mjs +1 -1
- package/dist/completions-powershell-config.mjs +1 -1
- package/dist/completions-powershell-script.mjs +1 -1
- package/dist/completions-zsh-config.mjs +1 -1
- package/dist/completions-zsh-script.mjs +1 -1
- package/dist/components-BeiahS2c.mjs +10 -0
- package/dist/{config-Dt1_5gd_.mjs → config-6_J_XRsw.mjs} +1 -1
- package/dist/{config-BCSzLSa4.mjs → config-B169hbG3.mjs} +1 -1
- package/dist/{config-zK7GEtuI.mjs → config-C09YwAnf.mjs} +1 -1
- package/dist/config-DxsYsT40.mjs +1 -0
- package/dist/{config-DUW81qVA.mjs → config-YZotDfFJ.mjs} +1 -1
- package/dist/{console-CoX88Qw8.mjs → console-C3z2Y61E.mjs} +2 -2
- package/dist/design-system-CNVVaZ1M.mjs +1 -0
- package/dist/{diff-BvxQ_pPh.mjs → diff-BLZFm5eJ.mjs} +1 -1
- package/dist/diff.mjs +1 -1
- package/dist/{docs-Drqg-8iT.mjs → docs-A44uCA1K.mjs} +1 -1
- package/dist/docs.mjs +4 -4
- package/dist/{guidelines-BioBIwoK.mjs → guidelines-CfvgqEk7.mjs} +1 -1
- package/dist/guidelines.mjs +1 -1
- package/dist/help.mjs +2 -2
- package/dist/{info-CQWXwPbx.mjs → info-CMedDFnc.mjs} +1 -1
- package/dist/info.mjs +1 -1
- package/dist/{init-Dl6gJpM5.mjs → init-DBROV6sE.mjs} +1 -1
- package/dist/init.mjs +2 -2
- package/dist/{list-components-CvsFpf_K.mjs → list-components-Dx-J-Dnq.mjs} +1 -1
- package/dist/list-components.mjs +1 -1
- package/dist/{list-fonts-Ce0dnvNt.mjs → list-fonts-DBT1mrsH.mjs} +1 -1
- package/dist/list-fonts.mjs +1 -1
- package/dist/{list-icons-Cc1yXA8W.mjs → list-icons-C8xYxnqZ.mjs} +1 -1
- package/dist/list-icons.mjs +1 -1
- package/dist/{list-tokens-5-5H0j1d.mjs → list-tokens-BKFnTzsn.mjs} +1 -1
- package/dist/list-tokens.mjs +1 -1
- package/dist/{mcp-ChXpEwWx.mjs → mcp-B6D5petn.mjs} +1 -1
- package/dist/mcp.mjs +13 -14
- package/dist/{plan-CvJupXVE.mjs → plan-ZWeXBx16.mjs} +1 -1
- package/dist/plan.mjs +1 -1
- package/dist/{prompts-bFke_NJI.mjs → prompts-e3s_BIKU.mjs} +2 -2
- package/dist/registry-DnOTA6eC.mjs +1 -0
- package/dist/registry-validate.mjs +2 -2
- package/dist/{script-kCLhRSfR.mjs → script-B00X1Gka.mjs} +1 -1
- package/dist/{script-CWA2YfkI.mjs → script-CI1NIrdw.mjs} +1 -1
- package/dist/{script-BYp3JkZA.mjs → script-CkCsXZJK.mjs} +1 -1
- package/dist/{script-CEbthWWk.mjs → script-CucYHbm0.mjs} +1 -1
- package/dist/{search-C4twQm15.mjs → search-JStGlg5t.mjs} +1 -1
- package/dist/{search-components-DUH_uWPf.mjs → search-components-CpFDPRfz.mjs} +1 -1
- package/dist/search-components.mjs +1 -1
- package/dist/{search-fonts-DJ3b4nWY.mjs → search-fonts-BbUV2DYZ.mjs} +1 -1
- package/dist/search-fonts.mjs +1 -1
- package/dist/{search-icons-D60D53ID.mjs → search-icons-JbWNW9vv.mjs} +1 -1
- package/dist/search-icons.mjs +1 -1
- package/dist/{search-tokens-B0mM-jau.mjs → search-tokens-Mwyu1sLi.mjs} +1 -1
- package/dist/search-tokens.mjs +1 -1
- package/dist/search.mjs +3 -3
- package/dist/{update-C18mGf4L.mjs → update-0bXYJiJj.mjs} +1 -1
- package/dist/{update-B4ENMzlX.mjs → update-wulHGaSU.mjs} +1 -1
- package/dist/update.mjs +1 -1
- package/dist/{validate-DLP65PTe.mjs → validate-CqYKElXI.mjs} +1 -1
- package/dist/{view-Dr6zOEXW.mjs → view-BLGl-i0d.mjs} +1 -1
- package/dist/view.mjs +3 -3
- package/package.json +11 -9
- package/dist/build-C219f-U4.mjs +0 -1
- package/dist/components-CL5K9O-8.mjs +0 -10
- package/dist/config-D4XQ3gm9.mjs +0 -1
- package/dist/create-tokens-DnyuLDUq.mjs +0 -1
- package/dist/create-tokens.mjs +0 -2
- package/dist/design-system-CSIS3wXV.mjs +0 -1
- package/dist/local-registry-pqsOERYj.mjs +0 -1
- package/dist/registry-C95vaVW8.mjs +0 -1
- package/dist/registry-f26fn1W0.mjs +0 -1
|
@@ -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-C3z2Y61E.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.designSystem?t.tags.designSystem(r(` Design System `)):t.tags.default(r(` Design System `))} ${t.tags.icons?t.tags.icons(r(` Icons `)):t.tags.default(r(` Icons `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`search-icons`)} ${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(`--limit <limit>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Maximum matches per term (default: 2).`),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(`--terms <terms...>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`One or more search terms (fuzzy match).`),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 Search Icons command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/search-icons`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
|
package/dist/search-icons.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
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 as u,V as d,_ as f,c as p,j as m,k as h,m as g,n as _,t as v,y,z as b}from"./console-
|
|
1
|
+
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 as u,V as d,_ as f,c as p,j as m,k as h,m as g,n as _,t as v,y,z as b}from"./console-C3z2Y61E.mjs";import{a as x,r as S,t as C}from"./prompts-e3s_BIKU.mjs";import{t as w}from"./update-wulHGaSU.mjs";import{t as T}from"./design-system-CNVVaZ1M.mjs";import{t as E}from"./search-icons-JbWNW9vv.mjs";import{isSearchError as D,searchIcons as O}from"@razorwind/shell-shock/runtime";async function k(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||m)return;t().set(`is-banner-displayed`,!0),n(``),n(_.banner.outline.primary(`┏`)+_.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+_.banner.outline.primary(`━`)+` `+v(l.banner.header.primary(`Cyclone CLI v0.6.14`))+` `+_.banner.outline.primary(`━`.repeat(Math.max(h().columns-33,0)))+_.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...x.map(e=>y(e).length))>Math.max(h().columns+30,20)?`Cyclone User Interface`:`\n${x.join(`
|
|
2
2
|
`)}\n`;f(o,Math.max(h().columns-30,20)).forEach(e=>{n(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(y(e).length+2))/2),0))+v(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(y(e).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(y(`Search Icons`).length+2))/2),0))+v(l.banner.command.primary(`Search Icons`))+` `.repeat(Math.max(Math.ceil((h().columns-(y(`Search Icons`).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log}),f(v(l.banner.description.primary(`Search design-system icons by name, title, aliases, tags and category. Returns name and asset files for each match.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{n(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(y(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(y(e).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+_.banner.outline.primary(`┃`),{consoleFn:console.log}),n(_.banner.outline.primary(`┗`)+_.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+v(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+_.banner.outline.primary(`━`.repeat(6))+_.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}function A(e){process.stdout.write(`${typeof e==`string`?e:JSON.stringify(e,null,2)}\n`)}async function j(e){let t=O(T,{terms:e.terms??[],limit:e.limit});A(t),D(t)&&(process.exitCode=1)}async function M(t=s()){let c={...b(),terms:[],limit:2};for(let e=0;e<t.slice(0).length;e++){let n=t[e].length>3&&t[e].startsWith(`--`)?`--${t[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:t[e].length>2&&t[e].startsWith(`-`)?`-${t[e].slice(1).replaceAll(`-`,``)}`:t[e];if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`terms=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`terms`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`terms=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`terms`)c.terms??=[],/^--?(terms)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?c.terms.push(...n.replace(/^--?(terms)=/,``).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)):t.length>e+1&&c.terms.push(...t[++e].split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean));else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`limit=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`limit`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`limit=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`limit`){if(/^--?(limit)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=Number(n.replace(/^--?(limit)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``));Number.isNaN(e)||(c.limit=e)}else if(t.length>e+1){let n=Number(t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``));Number.isNaN(n)||(c.limit=n)}}}if(r(`quiet`)||(await k(),await w()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!e){let e=[];c.terms?c.terms.length===0&&e.push(`No values were provided to the required "terms" array option`):e.push(`Missing required "terms" option`),c.limit&&Number.isNaN(c.limit)&&e.push(`Invalid numeric value provided for the "limit" option`)}else if(!a()&&(!c.terms||c.terms.length===0)){if(n(``),!c.terms){let e=await S({message:`Please provide a value for the ${g(`terms`)} option`,description:`One or more search terms (fuzzy match). Example: ["search", "folder", "user"].`,validate(e){return!e||e.trim()===``?`A value must be provided for this option`:null}});if(C(e))return;c.terms=e}else if(c.terms.length===0){let e=await S({message:`Please provide one or more values for the ${g(`terms`)} option (values are separated by a \",\" character)`,description:`One or more search terms (fuzzy match). Example: ["search", "folder", "user"].`,validate(e){if(!e||e.trim()===``)return`A value must be provided for this option`;if(e.split(`,`).map(e=>e.trim()).filter(Boolean).length===0)return`At least one value must be provided for this option`}});if(C(e))return;c.terms=e.split(`,`).map(e=>e.trim()).filter(Boolean)}n(``);let e=[];c.terms?c.terms.length===0&&e.push(`No values were provided to the required "terms" array option`):e.push(`Missing required "terms" option`),c.limit&&Number.isNaN(c.limit)&&e.push(`Invalid numeric value provided for the "limit" option`),e.length>0&&(p(`The following validation failures were found while processing the user provided input, and must be corrected before the ${g(`Search Icons`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
|
|
3
3
|
`)}`),c.help=!0)}return c.help?E():d(`search-icons`,[`search-icons`],[c],j)}export{M 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-C3z2Y61E.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.designSystem?t.tags.designSystem(r(` Design System `)):t.tags.default(r(` Design System `))} ${t.tags.tokens?t.tags.tokens(r(` Tokens `)):t.tags.default(r(` Tokens `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`search-tokens`)} ${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(`--include-metadata`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Include type, description, hex value and CSS variable in each result (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(`--limit <limit>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Maximum matches per term (default: 2).`),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(`--terms <terms...>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`One or more search terms (fuzzy match). Example: ["spacing", "color.`),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 Search Tokens command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/search-tokens`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
|
package/dist/search-tokens.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
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 as u,V as d,_ as f,c as p,j as m,k as h,m as g,n as _,t as v,y,z as b}from"./console-
|
|
1
|
+
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 as u,V as d,_ as f,c as p,j as m,k as h,m as g,n as _,t as v,y,z as b}from"./console-C3z2Y61E.mjs";import{a as x,r as S,t as C}from"./prompts-e3s_BIKU.mjs";import{t as w}from"./update-wulHGaSU.mjs";import{t as T}from"./search-tokens-Mwyu1sLi.mjs";import{t as E}from"./design-system-CNVVaZ1M.mjs";import{isSearchError as D,searchTokens as O}from"@razorwind/shell-shock/runtime";async function k(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||m)return;t().set(`is-banner-displayed`,!0),n(``),n(_.banner.outline.primary(`┏`)+_.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+_.banner.outline.primary(`━`)+` `+v(l.banner.header.primary(`Cyclone CLI v0.6.14`))+` `+_.banner.outline.primary(`━`.repeat(Math.max(h().columns-33,0)))+_.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...x.map(e=>y(e).length))>Math.max(h().columns+30,20)?`Cyclone User Interface`:`\n${x.join(`
|
|
2
2
|
`)}\n`;f(o,Math.max(h().columns-30,20)).forEach(e=>{n(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(y(e).length+2))/2),0))+v(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(y(e).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(y(`Search Tokens`).length+2))/2),0))+v(l.banner.command.primary(`Search Tokens`))+` `.repeat(Math.max(Math.ceil((h().columns-(y(`Search Tokens`).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log}),f(v(l.banner.description.primary(`Search design tokens by name, path, description, type and value. Returns compact JSON records with name and value for each match; set --include-metadata for descriptions and CSS variables.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{n(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(y(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(y(e).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+_.banner.outline.primary(`┃`),{consoleFn:console.log}),n(_.banner.outline.primary(`┗`)+_.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+v(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+_.banner.outline.primary(`━`.repeat(6))+_.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}function A(e){process.stdout.write(`${typeof e==`string`?e:JSON.stringify(e,null,2)}\n`)}async function j(e){let t=O(E,{terms:e.terms??[],limit:e.limit,includeMetadata:e.includeMetadata});A(t),D(t)&&(process.exitCode=1)}async function M(t=s()){let c={...b(),terms:[],limit:2,includeMetadata:!1};for(let e=0;e<t.slice(0).length;e++){let n=t[e].length>3&&t[e].startsWith(`--`)?`--${t[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:t[e].length>2&&t[e].startsWith(`-`)?`-${t[e].slice(1).replaceAll(`-`,``)}`:t[e];if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`terms=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`terms`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`terms=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`terms`)c.terms??=[],/^--?(terms)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?c.terms.push(...n.replace(/^--?(terms)=/,``).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)):t.length>e+1&&c.terms.push(...t[++e].split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean));else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`limit=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`limit`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`limit=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`limit`){if(/^--?(limit)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=Number(n.replace(/^--?(limit)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``));Number.isNaN(e)||(c.limit=e)}else if(t.length>e+1){let n=Number(t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``));Number.isNaN(n)||(c.limit=n)}}else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`includemetadata=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`includemetadata`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`includemetadata=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`includemetadata`){if(/^--?(includemetadata)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=n.replace(/^--?(includemetadata)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();c.includeMetadata=!!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 c.includeMetadata=!0}}if(r(`quiet`)||(await k(),await w()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!e){let e=[];c.terms?c.terms.length===0&&e.push(`No values were provided to the required "terms" array option`):e.push(`Missing required "terms" option`),c.limit&&Number.isNaN(c.limit)&&e.push(`Invalid numeric value provided for the "limit" option`)}else if(!a()&&(!c.terms||c.terms.length===0)){if(n(``),!c.terms){let e=await S({message:`Please provide a value for the ${g(`terms`)} option`,description:`One or more search terms (fuzzy match). Example: ["spacing", "color.text", "background"].`,validate(e){return!e||e.trim()===``?`A value must be provided for this option`:null}});if(C(e))return;c.terms=e}else if(c.terms.length===0){let e=await S({message:`Please provide one or more values for the ${g(`terms`)} option (values are separated by a \",\" character)`,description:`One or more search terms (fuzzy match). Example: ["spacing", "color.text", "background"].`,validate(e){if(!e||e.trim()===``)return`A value must be provided for this option`;if(e.split(`,`).map(e=>e.trim()).filter(Boolean).length===0)return`At least one value must be provided for this option`}});if(C(e))return;c.terms=e.split(`,`).map(e=>e.trim()).filter(Boolean)}n(``);let e=[];c.terms?c.terms.length===0&&e.push(`No values were provided to the required "terms" array option`):e.push(`Missing required "terms" option`),c.limit&&Number.isNaN(c.limit)&&e.push(`Invalid numeric value provided for the "limit" option`),e.length>0&&(p(`The following validation failures were found while processing the user provided input, and must be corrected before the ${g(`Search Tokens`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
|
|
3
3
|
`)}`),c.help=!0)}return c.help?T():d(`search-tokens`,[`search-tokens`],[c],j)}export{M as handler};
|
package/dist/search.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{A as e,B as t,D as n,E 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-
|
|
2
|
-
`)}\n`;p(a,Math.max(h().columns-30,20)).forEach(e=>{n(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})}),n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Search Registry`).length+2))/2),0))+_(u.banner.command.primary(`Search Registry`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Search Registry`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Search components in the Cyclone registry.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{n(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})}),n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),n(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}),n(``),e&&!o()&&await l(r)}async function
|
|
3
|
-
`))}async function
|
|
1
|
+
import{A as e,B as t,D as n,E 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-C3z2Y61E.mjs";import{a as b}from"./prompts-e3s_BIKU.mjs";import{t as x}from"./update-wulHGaSU.mjs";import{i as S,u as C}from"./config-DxsYsT40.mjs";import{t as w}from"./search-JStGlg5t.mjs";import{resolve as T}from"node:path";import"@shell-shock/core";async function E(r=500){if(t().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||m)return;t().set(`is-banner-displayed`,!0),n(``),n(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.14`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-33,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let a=Math.max(...b.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone User Interface`:`\n${b.join(`
|
|
2
|
+
`)}\n`;p(a,Math.max(h().columns-30,20)).forEach(e=>{n(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})}),n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Search Registry`).length+2))/2),0))+_(u.banner.command.primary(`Search Registry`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Search Registry`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Search components in the Cyclone registry.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{n(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})}),n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),n(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}),n(``),e&&!o()&&await l(r)}async function D(e){let t=T(e.cwd??process.cwd()),n=await S(t),i=await C(e.registry??n?.registry??`https://public.storm-cdn.com/cyclone-ui/registry`).components.list.query(),a=e.query?.toLowerCase(),o=Math.max(0,e.offset??0),s=Math.max(0,e.limit??100),c=i.filter(e=>!a||[e.name,e.description,...e.tags].join(` `).toLowerCase().includes(a)).slice(o,o+s);r(e.json?JSON.stringify(c,null,2):c.map(e=>`${e.name.padEnd(28)} ${e.version??`-`} ${e.description}`).join(`
|
|
3
|
+
`))}async function O(t=c()){let r={...y()};for(let e=0;e<t.slice(0).length;e++){let n=t[e].length>3&&t[e].startsWith(`--`)?`--${t[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:t[e].length>2&&t[e].startsWith(`-`)?`-${t[e].slice(1).replaceAll(`-`,``)}`:t[e];if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`)/^--?(cwd)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?r.cwd=n.replace(/^--?(cwd)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):t.length>e+1&&(r.cwd=t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`query=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`query`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`query=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`query`)/^--?(query)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?r.query=n.replace(/^--?(query)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):t.length>e+1&&(r.query=t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`limit=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`limit`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`limit=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`limit`){if(/^--?(limit)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=Number(n.replace(/^--?(limit)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``));Number.isNaN(e)||(r.limit=e)}else if(t.length>e+1){let n=Number(t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``));Number.isNaN(n)||(r.limit=n)}}else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`offset=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`offset`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`offset=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`offset`){if(/^--?(offset)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=Number(n.replace(/^--?(offset)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``));Number.isNaN(e)||(r.offset=e)}else if(t.length>e+1){let n=Number(t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``));Number.isNaN(n)||(r.offset=n)}}else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`json=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`json`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`json=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`json`){if(/^--?(json)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=n.replace(/^--?(json)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();r.json=!!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 r.json=!0}else(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`registry=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`registry=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`)&&(/^--?(registry)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?r.registry=n.replace(/^--?(registry)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):t.length>e+1&&(r.registry=t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}if(i(`quiet`)||(await E(),await x()),!o()&&!i(`quiet`)&&(n(``),(s||a||d.LOG_LEVEL===`debug`)&&n(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!e){let e=[];r.limit&&Number.isNaN(r.limit)&&e.push(`Invalid numeric value provided for the "limit" option`),r.offset&&Number.isNaN(r.offset)&&e.push(`Invalid numeric value provided for the "offset" option`)}return r.help?w():f(`search`,[`search`],[r],D)}export{O 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-C3z2Y61E.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(`update`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`upgrade`)} ${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(`--latest`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Whether to update to the latest version (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(`--version <version>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`A specific application version to update to (default: "latest").`),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 Update command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/update`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,D as t,J as n,P as r,S as i,U as a,W as o,d as s,f as c,g as l,i as u,l as d,o as f,q as p,u as m}from"./console-
|
|
1
|
+
import{A as e,D as t,J as n,P as r,S as i,U as a,W as o,d as s,f as c,g as l,i as u,l as d,o as f,q as p,u as m}from"./console-C3z2Y61E.mjs";import{i as h}from"./prompts-e3s_BIKU.mjs";import g from"node:os";import{join as _,resolve as v}from"node:path";import{existsSync as y}from"node:fs";import b from"node:process";import{mkdir as x,readFile as S,writeFile as C}from"node:fs/promises";const w=g.homedir(),T=g.tmpdir();async function E(e={}){let t=e.cwd??b.cwd(),n=v(t,`..`);for(;n!==t&&t!==w&&t!==T;){let r=_(t,`package.json`);if(y(r)){if(e.isDependencyRequired){let e=JSON.parse(await S(r,`utf8`));if(Object.keys(e.dependencies||{}).concat(Object.keys(e.devDependencies||{})).concat(Object.keys(e.peerDependencies||{})).concat(Object.keys(e.optionalDependencies||{})).some(e=>e===`@cyclone-ui/cli`||e.startsWith(`@cyclone-ui/cli@`)))return r}else return r}else t=n,n=v(t,`..`)}}function D(e={}){let t=e.cwd??b.cwd(),n=v(t,`..`);for(;n!==t&&t!==w&&t!==T;){let e=[`package-lock.json`,`npm-shrinkwrap.json`,`yarn.lock`,`pnpm-lock.yaml`,`pnpm-workspace.yaml`,`deno.lock`,`deno.json`,`deno.jsonc`,`bun.lock`,`bun.lockb`].find(e=>y(_(t,e)));if(e)return e;t=n,n=v(t,`..`)}}async function O(e={}){let t=b.env.npm_config_user_agent??``,n=b.env.npm_execpath??``;if(t.startsWith(`yarn`)||n.includes(`yarn`))return`yarn`;if(t.startsWith(`pnpm`)||n.includes(`pnpm`))return`pnpm`;if(t.startsWith(`bun`)||n.includes(`bun`)||b.versions.bun)return`bun`;{let t=D(e);if(t===`yarn.lock`)return`yarn`;if(t===`deno.lock`||t===`deno.json`||t===`deno.jsonc`)return`deno`;if(t===`pnpm-lock.yaml`||t===`pnpm-workspace.yaml`)return`pnpm`;if(t===`bun.lock`||t===`bun.lockb`)return`bun`;{let t=await E(e);if(t&&y(t)){let e=JSON.parse(await S(t,`utf8`));if(e.devEngines?.packageManager?.name&&typeof e.devEngines.packageManager.name==`string`&&[`npm`,`yarn`,`pnpm`,`deno`,`bun`].includes(e.devEngines.packageManager.name))return e.devEngines.packageManager.name;let n={...e.dependencies,...e.devDependencies,...e.peerDependencies,...e.optionalDependencies};if(Object.keys(n).some(e=>e===`yarn`||e.startsWith(`yarn@`)||e===`yarnpkg`||e.startsWith(`yarnpkg@`)))return`yarn`;if(Object.keys(n).some(e=>e===`bun`||e.startsWith(`bun@`)))return`bun`;if(Object.keys(n).some(e=>e===`pnpm`||e.startsWith(`pnpm@`)))return`pnpm`;if(Object.keys(n).some(e=>e===`deno`||e.startsWith(`deno@`)))return`deno`}return`npm`}}}async function k(e){let t=await fetch(`https://registry.npmjs.com/-/v1/search?text=${e}&size=1`).then(e=>e.json());if(t.objects&&t.objects.length>0&&t.objects[0].package&&t.objects[0].package.name===e)return t.objects[0].package}async function A(e=`@cyclone-ui/cli`){return(await k(e))?.version}async function j(e,t=b.cwd()){let n=await A(`@cyclone-ui/cli`)||`latest`;return e===`yarn`?[`upgrade`,`@cyclone-ui/cli@${n}`]:e===`pnpm`?[`update`,`@cyclone-ui/cli@${n}`]:e===`deno`?[`outdated`,`--update`,`@cyclone-ui/cli@${n}`]:e===`bun`?[`update`,`--save`,`@cyclone-ui/cli@${n}`]:[`update`,`--save`,`--bin-links`,`@cyclone-ui/cli@${n}`]}async function M(e={}){let t=await O(e),n=await j(t,e.cwd),i=``;await r(`${t}${p&&t!==`bun`?`.cmd`:``}`,[n.join(` `)],{...e,env:{...e.env,...t===`pnpm`?{npm_config_strict_peer_dependencies:!1}:null},stdout:t=>{e.stdout?.(t),i+=t},stderr:t=>{e.stderr?.(t)}})}async function N(e={}){if(!e.force&&!await P())return{latestVersion:`0.6.14`,currentVersion:`0.6.14`,isUpToDate:!0,isError:!1};try{let e=await k(`@cyclone-ui/cli`);return{latestVersion:e?.version||`0.6.14`,currentVersion:`0.6.14`,isUpToDate:!e||e.version===`0.6.14`,package:e,isError:!1}}catch(e){return{isError:!0,error:e instanceof Error?e:Error(String(e))}}}async function P(){if(!e||o||a.SKIP_UPDATE_CHECK)return!1;let t=_(n.data,`update-check.json`);if(y(t)){let e=JSON.parse(await S(t,`utf8`));if(!e.timestamp)return await F(),!0;if((/* @__PURE__ */ new Date()).getTime()-e.timestamp<1296e5)return!1}else return await F(),!0}async function F(){y(n.data)||await x(n.data,{recursive:!0}),await C(_(n.data,`update-check.json`),JSON.stringify({timestamp:(/* @__PURE__ */ new Date()).getTime()}),`utf8`)}async function I(){if(await P()){let e=u({message:`Checking for updates...`}).start(),n=await N({force:!0});if(n?.isError)e.error(`An error occurred while checking for Cyclone User Interface application updates. Please try again later - if the problem persists, please contact support.`),f(n.error);else if(n?.isUpToDate)e.success(`Currently running the latest version of Cyclone User Interface.`),t(``);else{e.stop(),s(`A new version of Cyclone User Interface is available: ${l(`v${n.currentVersion}`)} ${i.body.tertiary(`➜`)} ${d(`v${n.latestVersion}`)}${n.package?.date?i.body.tertiary(` (updated on ${n.package?.date})`):``}`);try{await M(),e.success(`Update successful! Please restart the application to apply the update.`),t(``),m(`The changelog for this release can be viewed by running the ${c(`cyclone-ui changelog`)} command.`),t(``),t(`Press any key to exit the application...`),await h();return}catch(t){e.error(`An error occurred while updating Cyclone User Interface to v${n.latestVersion}. Please try again later - if the problem persists, please contact support.`),f(t)}}}}export{I as t};
|
package/dist/update.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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 as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-
|
|
1
|
+
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 as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-C3z2Y61E.mjs";import{a as y}from"./prompts-e3s_BIKU.mjs";import{t as b}from"./update-wulHGaSU.mjs";import{t as x}from"./update-0bXYJiJj.mjs";async function S(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.14`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-33,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...y.map(e=>_(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
|
|
2
2
|
`)}\n`;f(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(`Update`).length+2))/2),0))+g(l.banner.command.primary(`Update`))+` `.repeat(Math.max(Math.ceil((m().columns-(_(`Update`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),f(g(l.banner.description.primary(`A command for checking and updating the version of the Cyclone User Interface command-line interface application.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}async function C(e){}async function w(e=s()){let t={...v(),latest:!1,version:`latest`};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(`latest=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`latest`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`latest=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`latest`){if(/^--?(latest)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(latest)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.latest=!!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.latest=!0}else(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`version=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`version`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`version=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`version`)&&(/^--?(version)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.version=r.replace(/^--?(version)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.version=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}return r(`quiet`)||(await S(),await b()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?x():d(`update`,[`update`],[t],C)}export{w as handler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,S as t,h as n,t as r,x as i}from"./console-
|
|
1
|
+
import{D as e,S as t,h as n,t as r,x as i}from"./console-C3z2Y61E.mjs";function a(){e(``),e(r(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`registry`)} ${t.usage.command(`validate`)} ${t.usage.args(`<registry>`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`registry`)} ${t.usage.command(`validate`)} ${t.usage.options(`[options]`)} ${t.usage.args(`<registry>`)}`),{padding:0}),e(``),e(r(t.heading.secondary(`Options:`))),i([[{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(`--cwd <cwd>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`The working directory.`),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 Validate Registry command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/registry/validate`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,S as t,h as n,t as r,x as i}from"./console-
|
|
1
|
+
import{D as e,S as t,h as n,t as r,x as i}from"./console-C3z2Y61E.mjs";function a(){e(``),e(r(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`view`)} ${t.usage.args(`<components...>`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`view`)} ${t.usage.options(`[options]`)} ${t.usage.args(`<components...>`)}`),{padding:0}),e(``),e(r(t.heading.secondary(`Options:`))),i([[{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(`--cwd <cwd>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`The working directory.`),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(`--registry <registry>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Registry URL.`),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 View Registry Components command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/view`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{a as t};
|
package/dist/view.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{A as e,B as t,D as n,E 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,c as m,j as h,k as g,m as _,n as v,t as y,y as b,z as x}from"./console-
|
|
2
|
-
`)}\n`;p(a,Math.max(g().columns-30,20)).forEach(e=>{n(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((g().columns-(b(e).length+2))/2),0))+y(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((g().columns-(b(e).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((g().columns-(b(`View Registry Components`).length+2))/2),0))+y(u.banner.command.primary(`View Registry Components`))+` `.repeat(Math.max(Math.ceil((g().columns-(b(`View Registry Components`).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log}),p(y(u.banner.description.primary(`View component metadata and files from the registry.`)),Math.max(60>g().columns/2?g().columns-6:g().columns-30,20)).forEach(e=>{n(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((g().columns-(b(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((g().columns-(b(e).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(g().columns-2,0))+v.banner.outline.primary(`┃`),{consoleFn:console.log}),n(v.banner.outline.primary(`┗`)+v.banner.outline.primary(`━`.repeat(Math.max(g().columns-32,0)))+` `+y(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+v.banner.outline.primary(`━`.repeat(6))+v.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!o()&&await l(r)}async function
|
|
3
|
-
`)}`),r.help=!0)}return r.help?T():f(`view`,[`view`],[r,h],
|
|
1
|
+
import{A as e,B as t,D as n,E 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,c as m,j as h,k as g,m as _,n as v,t as y,y as b,z as x}from"./console-C3z2Y61E.mjs";import{a as S,r as C,t as w}from"./prompts-e3s_BIKU.mjs";import{t as T}from"./view-BLGl-i0d.mjs";import{t as E}from"./update-wulHGaSU.mjs";import{i as D,u as O}from"./config-DxsYsT40.mjs";import{resolve as k}from"node:path";async function A(r=500){if(t().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||h)return;t().set(`is-banner-displayed`,!0),n(``),n(v.banner.outline.primary(`┏`)+v.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+v.banner.outline.primary(`━`)+` `+y(u.banner.header.primary(`Cyclone CLI v0.6.14`))+` `+v.banner.outline.primary(`━`.repeat(Math.max(g().columns-33,0)))+v.banner.outline.primary(`┓`),{consoleFn:console.log});let a=Math.max(...S.map(e=>b(e).length))>Math.max(g().columns+30,20)?`Cyclone User Interface`:`\n${S.join(`
|
|
2
|
+
`)}\n`;p(a,Math.max(g().columns-30,20)).forEach(e=>{n(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((g().columns-(b(e).length+2))/2),0))+y(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((g().columns-(b(e).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((g().columns-(b(`View Registry Components`).length+2))/2),0))+y(u.banner.command.primary(`View Registry Components`))+` `.repeat(Math.max(Math.ceil((g().columns-(b(`View Registry Components`).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log}),p(y(u.banner.description.primary(`View component metadata and files from the registry.`)),Math.max(60>g().columns/2?g().columns-6:g().columns-30,20)).forEach(e=>{n(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((g().columns-(b(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((g().columns-(b(e).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(g().columns-2,0))+v.banner.outline.primary(`┃`),{consoleFn:console.log}),n(v.banner.outline.primary(`┗`)+v.banner.outline.primary(`━`.repeat(Math.max(g().columns-32,0)))+` `+y(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+v.banner.outline.primary(`━`.repeat(6))+v.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!o()&&await l(r)}async function j(e,t){let n=k(e.cwd??process.cwd()),i=await D(n),a=O(e.registry??i?.registry??`https://public.storm-cdn.com/cyclone-ui/registry`);r(JSON.stringify(await Promise.all(t.map(e=>a.components.get.query(e))),null,2))}async function M(t=c()){let r={...x()};for(let e=0;e<t.slice(0).length;e++){let n=t[e].length>3&&t[e].startsWith(`--`)?`--${t[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:t[e].length>2&&t[e].startsWith(`-`)?`-${t[e].slice(1).replaceAll(`-`,``)}`:t[e];n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`?/^--?(cwd)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?r.cwd=n.replace(/^--?(cwd)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):t.length>e+1&&(r.cwd=t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``)):(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`registry=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`registry=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`)&&(/^--?(registry)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?r.registry=n.replace(/^--?(registry)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):t.length>e+1&&(r.registry=t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}let l=Math.max(0,t.slice(2).findIndex(e=>e.startsWith(`-`)&&/^(cwd|registry)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,p=l>2?2:Math.max(0,t.slice(l).findLastIndex(e=>e.startsWith(`-`)&&/^(cwd|registry)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,h=[];if(p+0<t.length&&p+0!==l&&(h=t.slice(p+0,(l>p?l:t.length)-1).join(` `).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)),i(`quiet`)||(await A(),await E()),!o()&&!i(`quiet`)&&(n(``),(s||a||d.LOG_LEVEL===`debug`)&&n(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!e){let e=[];h?h.length===0&&e.push(`No values were provided to the required "components" array positional argument`):e.push(`Missing required "components" positional argument`)}else if(!o()&&(!h||h.length===0)){if(n(``),!h){let e=await C({message:`Please provide a value for the ${_(`components`)} argument`,description:`Component names to view.`,validate(e){return!e||e.trim()===``?`A value must be provided for this argument`:null}});if(w(e))return;h=e}else if(h.length===0){let e=await C({message:`Please provide one or more values for the ${_(`components`)} argument (values are separated by a \",\" character)`,description:`Component names to view.`,validate(e){if(!e||e.trim()===``)return`A value must be provided for this argument`;if(e.split(`,`).map(e=>e.trim()).filter(Boolean).length===0)return`At least one value must be provided for this argument`}});if(w(e))return;h=e.split(`,`).map(e=>e.trim()).filter(Boolean)}n(``);let e=[];h?h.length===0&&e.push(`No values were provided to the required "components" array positional argument`):e.push(`Missing required "components" positional argument`),e.length>0&&(m(`The following validation failures were found while processing the user provided input, and must be corrected before the ${_(`View Registry Components`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
|
|
3
|
+
`)}`),r.help=!0)}return r.help?T():f(`view`,[`view`],[r,h],j)}export{M as handler};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyclone-ui/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.15",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "🌀 A repository containing
|
|
5
|
+
"description": "🌀 A repository containing Tamagui based design components used by Storm Software. Like shadcn/ui, the components are copied into other repositories via the Cyclone CLI.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "github",
|
|
8
8
|
"url": "https://github.com/storm-software/cyclone-ui.git",
|
|
@@ -41,16 +41,18 @@
|
|
|
41
41
|
"files": ["dist"],
|
|
42
42
|
"keywords": ["cli", "cyclone-ui", "storm-software", "shell-shock"],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@cyclone-ui/registry-api": "0.3.
|
|
45
|
-
"@cyclone-ui/theme-builder": "0.0.
|
|
44
|
+
"@cyclone-ui/registry-api": "0.3.25",
|
|
45
|
+
"@cyclone-ui/theme-builder": "0.0.15",
|
|
46
46
|
"@modelcontextprotocol/server": "^2.3.1",
|
|
47
47
|
"@powerlines/plugin-env": "^0.16.423",
|
|
48
|
-
"@razorwind/core": "^0.0.
|
|
49
|
-
"@razorwind/shell-shock": "^0.0.
|
|
48
|
+
"@razorwind/core": "^0.0.105",
|
|
49
|
+
"@razorwind/shell-shock": "^0.0.26",
|
|
50
50
|
"@shell-shock/core": "^0.17.32",
|
|
51
51
|
"@shell-shock/plugin-theme": "^0.4.45",
|
|
52
52
|
"@shell-shock/preset-cli": "^0.9.44",
|
|
53
|
-
"
|
|
53
|
+
"@tamagui/static": "3.0.13",
|
|
54
|
+
"typescript": "^6.0.3",
|
|
55
|
+
"zod": "^4.6.7"
|
|
54
56
|
},
|
|
55
57
|
"devDependencies": {
|
|
56
58
|
"@shell-shock/eslint-plugin": "^0.0.96",
|
|
@@ -66,6 +68,7 @@
|
|
|
66
68
|
"./analyze-a11y": "./dist/analyze-a11y.mjs",
|
|
67
69
|
"./bin": "./dist/bin.mjs",
|
|
68
70
|
"./build": "./dist/build.mjs",
|
|
71
|
+
"./build-tokens": "./dist/build-tokens.mjs",
|
|
69
72
|
"./changelog": "./dist/changelog.mjs",
|
|
70
73
|
"./completions-bash-config": "./dist/completions-bash-config.mjs",
|
|
71
74
|
"./completions-bash-script": "./dist/completions-bash-script.mjs",
|
|
@@ -75,7 +78,6 @@
|
|
|
75
78
|
"./completions-powershell-script": "./dist/completions-powershell-script.mjs",
|
|
76
79
|
"./completions-zsh-config": "./dist/completions-zsh-config.mjs",
|
|
77
80
|
"./completions-zsh-script": "./dist/completions-zsh-script.mjs",
|
|
78
|
-
"./create-tokens": "./dist/create-tokens.mjs",
|
|
79
81
|
"./diff": "./dist/diff.mjs",
|
|
80
82
|
"./docs": "./dist/docs.mjs",
|
|
81
83
|
"./guidelines": "./dist/guidelines.mjs",
|
|
@@ -98,5 +100,5 @@
|
|
|
98
100
|
"./update": "./dist/update.mjs",
|
|
99
101
|
"./view": "./dist/view.mjs"
|
|
100
102
|
},
|
|
101
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "13806869dab99bab5aca14eb5d6d138c42ae7475"
|
|
102
104
|
}
|
package/dist/build-C219f-U4.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e,S as t,h as n,t as r,x as i}from"./console-CoX88Qw8.mjs";function a(){e(``),e(r(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`build`)} ${t.usage.args(`<registry>`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`build`)} ${t.usage.options(`[options]`)} ${t.usage.args(`<registry>`)}`),{padding:0}),e(``),e(r(t.heading.secondary(`Options:`))),i([[{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(`--cwd <cwd>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`The working directory.`),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(`--output <output>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Output directory.`),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 Build Registry command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/build`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{a as t};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{o as e,r as t,s as n}from"./config-D4XQ3gm9.mjs";import{t as r}from"./registry-C95vaVW8.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){let n=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Set,a=async t=>{let o=r(t);if(n.has(o))return;if(i.has(o))throw Error(`Circular component dependency detected at \"${o}\"`);i.add(o);let s=await e.components.get.query(o);for(let e of s.internalDependencies)await a(e);i.delete(o),n.set(o,s)};for(let e of t)await a(e);return[...n.values()]}async function d(n,i,o,s){let l=await u(n,o),d=e(s.root,s.path??i.path),f=[];for(let n of l){let i=r(n.name);if(!/^[a-z0-9][a-z0-9._-]*$/i.test(i))throw Error(`Invalid component name received: ${n.name}`);for(let r of n.files){let n=e(d,i),o=e(n,r.name),l=await t(o)?await c(o,`utf8`):null,u=l===null?`create`:l===r.content?`unchanged`:`overwrite`;if(u===`overwrite`&&!s.overwrite&&!s.dryRun)throw Error(`${a(s.root,o)} already exists. Re-run with --overwrite to replace it.`);f.push({component:i,path:o,content:r.content,previousContent:l,status:u})}}return{components:l,files:f}}async function f(e,t,o){if(!o.dryRun){for(let e of t.files)e.status!==`unchanged`&&(await s(i(e.path),{recursive:!0}),await l(e.path,e.content,`utf8`));for(let n of t.components){let i=r(n.name);e.components[i]={version:n.version,files:t.files.filter(e=>e.component===i).map(e=>a(o.root,e.path))}}await p(o.root,t.components),await n(o.root,e)}}async function p(e,n){let r=o(e,`package.json`);if(!await t(r))return;let i=JSON.parse(await c(r,`utf8`)),a=new Set(n.map(e=>e.name)),s=Object.assign({},...n.map(e=>e.dependencies)),u=Object.assign({},...n.map(e=>e.devDependencies));i.dependencies??={},i.devDependencies??={};for(let[e,t]of Object.entries(s))!a.has(e)&&!e.startsWith(`@cyclone-ui/`)&&(i.dependencies[e]=m(t));for(let[e,t]of Object.entries(u))!a.has(e)&&!e.startsWith(`@cyclone-ui/`)&&(i.devDependencies[e]=m(t));await l(r,`${JSON.stringify(i,null,2)}\n`,`utf8`)}function m(e){return e.startsWith(`catalog:`)||e.startsWith(`workspace:`)?`latest`:e}function h(e,t){return e.files.map(e=>`${e.status.padEnd(9)} ${a(t,e.path)}`).join(`
|
|
2
|
-
`)}function g(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{h as i,d as n,g as r,f as t};
|
package/dist/config-D4XQ3gm9.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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{DEFAULT_REGISTRY_URL as c}from"@cyclone-ui/registry-api/client";const l=`components.json`;function u(e={}){return{registry:e.registry??c,path:e.path??`components`,components:{}}}async function d(e){try{return await i(e),!0}catch{return!1}}async function f(e){let t=r(e,l);if(!await d(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`||!(`components`in n)||!n.components||typeof n.components!=`object`||Array.isArray(n.components))throw Error(`${l} exists but is not a Cyclone UI configuration file`);return n}async function p(e){let t=await f(e);if(!t)throw Error(`No ${l} found. Run \"cyclone init\" first.`);return t}async function m(t,n){let i=r(t,l);await a(e(i),{recursive:!0}),await s(i,`${JSON.stringify(n,null,2)}\n`,`utf8`)}function h(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{p as a,f as i,u as n,h as o,d as r,m as s,l as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e,S as t,h as n,t as r,x as i}from"./console-CoX88Qw8.mjs";function a(){e(``),e(r(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`create-tokens`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(``),e(r(t.heading.secondary(`Options:`))),i([[{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(`--config <config>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Path to the Razorwind configuration file.`),align:`left`,border:`none`}],[{value:t.body.primary(`--cwd <cwd>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`The working directory.`),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(`--output <output>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Output path for the generated Tamagui config.`),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(`--tokens <tokens>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary("Design token source path or glob (overrides the configured `tokensPath`)."),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 Create Tokens command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/create-tokens`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{a as t};
|
package/dist/create-tokens.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
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 as u,V as d,_ as f,b as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-CoX88Qw8.mjs";import{a as b}from"./prompts-bFke_NJI.mjs";import{t as x}from"./update-B4ENMzlX.mjs";import{t as S}from"./create-tokens-DnyuLDUq.mjs";import{relative as C,resolve as w}from"node:path";import{generate as T}from"@cyclone-ui/theme-builder";import{generatePluginDocuments as E,isEmptyTokens as D,prepareSpec as O,resolveConfig as k,writeGeneratedDocuments as A}from"@razorwind/core";async function j(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||m)return;t().set(`is-banner-displayed`,!0),n(``),n(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+_(l.banner.header.primary(`Cyclone CLI v0.6.13`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-33,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...b.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone User Interface`:`\n${b.join(`
|
|
2
|
-
`)}\n`;f(o,Math.max(h().columns-30,20)).forEach(e=>{n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Create Tokens`).length+2))/2),0))+_(l.banner.command.primary(`Create Tokens`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Create Tokens`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),f(_(l.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=>{n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),n(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+_(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}async function M(e){let t=w(e.cwd??process.cwd()),r=await k(t,{configFile:e.config,mode:`production`});e.tokens&&(r.tokensPath=e.tokens),r.plugins=[...r.plugins.filter(e=>!e.generate),T({outputPath:e.output??`tamagui.config.ts`})];let i=await O({cwd:t,options:r});if(D(i.tokens))throw Error("No design tokens found. Pass --tokens or set `tokensPath` in razorwind.config.ts.");let a=await A(await E(i,r),t);for(let e of a)n(C(t,e));p(`Generated ${a.length} files.`)}async function N(e=s()){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 r(`quiet`)||(await j(),await x()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?S():d(`create-tokens`,[`create-tokens`],[t],M)}export{N as handler};
|