powerlines 0.47.126 → 0.47.128

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.
Files changed (73) hide show
  1. package/bin/bin.mjs +7 -7
  2. package/bin/build-BIaIu9Y5.mjs +1 -0
  3. package/bin/build.mjs +2 -5
  4. package/bin/changelog-E-js0BZb.mjs +1 -0
  5. package/bin/changelog.mjs +243 -246
  6. package/bin/clean-BiN7vXZE.mjs +1 -0
  7. package/bin/clean.mjs +2 -5
  8. package/bin/completions-bash-config.mjs +5 -7
  9. package/bin/completions-bash-script.mjs +5 -7
  10. package/bin/completions-fish-config.mjs +5 -7
  11. package/bin/completions-fish-script.mjs +5 -7
  12. package/bin/completions-powershell-config.mjs +5 -7
  13. package/bin/completions-powershell-script.mjs +5 -7
  14. package/bin/completions-zsh-config.mjs +5 -7
  15. package/bin/completions-zsh-script.mjs +5 -7
  16. package/bin/config-8bmAaNQ2.mjs +1 -0
  17. package/bin/config-BYunqLZD.mjs +1 -0
  18. package/bin/config-Dlyzcim5.mjs +1 -0
  19. package/bin/config-RZsaJtzu.mjs +1 -0
  20. package/bin/create-BoPKM4sQ.mjs +1 -0
  21. package/bin/create.mjs +3 -5
  22. package/bin/deploy-Dpv_gBUF.mjs +1 -0
  23. package/bin/deploy.mjs +2 -5
  24. package/bin/docs-B3Vy9nmT.mjs +1 -0
  25. package/bin/docs.mjs +2 -5
  26. package/bin/gc-yhl6Wc1U.mjs +1 -0
  27. package/bin/gc.mjs +3 -7
  28. package/bin/help.mjs +3 -5
  29. package/bin/lint-C82qnP4x.mjs +1 -0
  30. package/bin/lint.mjs +2 -5
  31. package/bin/prepare-x9Bix5FR.mjs +1 -0
  32. package/bin/prepare.mjs +2 -5
  33. package/bin/prompts-DEjU8qNL.mjs +26 -0
  34. package/bin/script-Bx-gKDHc.mjs +1 -0
  35. package/bin/script-CXB3vetH.mjs +1 -0
  36. package/bin/script-CYWDQkcZ.mjs +1 -0
  37. package/bin/script-l5WTGeVn.mjs +1 -0
  38. package/bin/{shared-D6Uc3liR.mjs → shared-C3VdzOJx.mjs} +5 -5
  39. package/bin/{shared-BiFPKQIb.mjs → shared-D6KGuDvi.mjs} +69 -69
  40. package/bin/{shared-CLQvIZ7z.mjs → shared-R0IeF6M6.mjs} +34 -34
  41. package/bin/{shared-ClfTGQiY.mjs → shared-rXffwFNh.mjs} +29 -29
  42. package/bin/types-BnaNJFgJ.mjs +1 -0
  43. package/bin/types.mjs +2 -5
  44. package/bin/update-275UZsT_.mjs +1 -0
  45. package/bin/update-DcBNIEnv.mjs +1 -0
  46. package/bin/update.mjs +2 -0
  47. package/bin/zsh-Bf6VX2tW.mjs +1 -0
  48. package/dist/package.cjs +1 -1
  49. package/dist/package.mjs +1 -1
  50. package/package.json +8 -8
  51. package/bin/build-CJIAgNA5.mjs +0 -1
  52. package/bin/changelog-d-cmenYB.mjs +0 -1
  53. package/bin/clean-dutxbMO3.mjs +0 -1
  54. package/bin/config-B0hTZO6E.mjs +0 -1
  55. package/bin/config-BJFVoVkf.mjs +0 -1
  56. package/bin/config-BaNVYrnl.mjs +0 -1
  57. package/bin/config-Bf2LnULJ.mjs +0 -1
  58. package/bin/create-DYKxyvzg.mjs +0 -1
  59. package/bin/deploy-BMhOgvx4.mjs +0 -1
  60. package/bin/docs-CAUeTrLz.mjs +0 -1
  61. package/bin/gc-DZjHvUuc.mjs +0 -1
  62. package/bin/lint-DdDmoyDN.mjs +0 -1
  63. package/bin/prepare-Yz_6EWzB.mjs +0 -1
  64. package/bin/prompts-BnlPjHFR.mjs +0 -26
  65. package/bin/script-B97oHT_M.mjs +0 -1
  66. package/bin/script-Bn4yCHJR.mjs +0 -1
  67. package/bin/script-DGDOPq0P.mjs +0 -1
  68. package/bin/script-Di-8LIT0.mjs +0 -1
  69. package/bin/types-BhiTsmcq.mjs +0 -1
  70. package/bin/upgrade-aCJAI3aA.mjs +0 -1
  71. package/bin/upgrade-yP6Jdrm0.mjs +0 -1
  72. package/bin/upgrade.mjs +0 -5
  73. package/bin/zsh-Cve0Syog.mjs +0 -3
@@ -0,0 +1 @@
1
+ import{A as e,F as t,a as n,k as r,x as i}from"./prompts-DEjU8qNL.mjs";function a(){t(``),t(n(e.heading.secondary(`Usage:`))),t(e.body.secondary(`${e.usage.bin(`>_ powerlines`)} ${e.usage.command(`clean`)} ${e.usage.options(`[options]`)}`),{padding:0}),t(``),t(n(e.heading.secondary(`Options:`))),r([[{value:e.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force colored terminal output (env: POWERLINES_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: POWERLINES_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.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: POWERLINES_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--root <root>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`The root directory of the project to clean.`),align:`left`,border:`none`}],[{value:e.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable verbose output (env: POWERLINES_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: POWERLINES_YES, default: false).`),align:`left`,border:`none`}]]),t(``),t(e.body.tertiary(`More information can be found in the Clean command documentation at ${i(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/clean`)}${e.body.tertiary(`.`)}`),{padding:0}),t(``)}export{a as t};
package/bin/clean.mjs CHANGED
@@ -1,5 +1,2 @@
1
- import{B as e,F as t,G as n,H as r,I as i,J as a,K as o,M as s,O as c,P as l,R as u,T as d,V as f,W as p,X as m,Z as h,a as g,o as _,u as v,w as y}from"./prompts-BnlPjHFR.mjs";import{t as b}from"./upgrade-yP6Jdrm0.mjs";import{t as x}from"./create-powerlines-DvusHjN3.mjs";import{t as S}from"./clean-dutxbMO3.mjs";async function C(r=500){if(n().get(`banner`)||e(`no-banner`)||e(`hide-banner`)||i)return;n().set(`banner`,!0),s(``),s(_.banner.outline.primary(`┏`)+_.banner.outline.primary(`━`.repeat(6))+` `+c.banner.header.primary(`⬤`)+` `+_.banner.outline.primary(`━`)+` `+g(c.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+_.banner.outline.primary(`━`.repeat(Math.max(l().columns-38,0)))+_.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`Command-Line Interface`];y(Math.max(...a.map(e=>d(e).length))>Math.max(l().columns+30,20)?``:`\n${a.join(`
2
- `)}\n`,Math.max(l().columns-30,20)).forEach(e=>{s(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((l().columns-(d(e).length+2))/2),0))+g(c.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((l().columns-(d(e).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log})}),s(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((l().columns-(d(`Clean`).length+2))/2),0))+g(c.banner.command.primary(`Clean`))+` `.repeat(Math.max(Math.ceil((l().columns-(d(`Clean`).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log}),y(g(c.banner.description.primary(`Cleans the project by removing build artifacts and temporary files.`)),Math.max(60>l().columns/2?l().columns-6:l().columns-30,20)).forEach(e=>{s(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((l().columns-(d(e).length+2))/2),0))+c.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((l().columns-(d(e).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log})}),s(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(l().columns-2,0))+_.banner.outline.primary(`┃`),{consoleFn:console.log}),s(_.banner.outline.primary(`┗`)+_.banner.outline.primary(`━`.repeat(Math.max(l().columns-35,0)))+` `+g(c.banner.footer.primary(`https://stormsoftware.com`))+` `+_.banner.outline.primary(`━`.repeat(6))+_.banner.outline.primary(`┛`),{consoleFn:console.log}),s(``),t&&!f()&&await u(r)}async function w(e){await(await x(e)).clean(e)}async function T(e=r()){let t={...p()};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 await C(),await b(),s(``),(h||m||a.LOG_LEVEL===`debug`)&&(s(c.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`)),s(``),v(`Command path: clean
3
-
4
- Options:
5
- `)),t.help?S():o(`clean`,[`clean`],[],w)}export{T as handler};
1
+ import{$ as e,A as t,D as n,E as r,F as i,G as a,J as o,L as s,R as c,U as l,V as u,W as d,Y as f,Z as p,a as m,et as h,o as g,q as _,z as v}from"./prompts-DEjU8qNL.mjs";import{t as y}from"./update-DcBNIEnv.mjs";import{t as b}from"./create-powerlines-DvusHjN3.mjs";import{t as x}from"./clean-BiN7vXZE.mjs";async function S(e=500){if(o().get(`banner`)||l(`no-banner`)||l(`hide-banner`)||v)return;o().set(`banner`,!0),i(``),i(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+t.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+m(t.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(s().columns-38,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`█████▄ ▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄`,`██▄▄█▀ ██▀██ ██ ▄ ██ ██▄▄ ██▄█▄ ██ ██ ███▄██ ██▄▄ ███▄▄`,`██ ▀███▀ ▀█▀█▀ ██▄▄▄ ██ ██ ██▄▄▄ ██ ██ ▀██ ██▄▄▄ ▄▄██▀`];r(Math.max(...a.map(e=>n(e).length))>Math.max(s().columns+30,20)?`Powerlines`:`\n${a.join(`
2
+ `)}\n`,Math.max(s().columns-30,20)).forEach(e=>{i(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+m(t.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(`Clean`).length+2))/2),0))+m(t.banner.command.primary(`Clean`))+` `.repeat(Math.max(Math.ceil((s().columns-(n(`Clean`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),r(m(t.banner.description.primary(`Cleans the project by removing build artifacts and temporary files.`)),Math.max(60>s().columns/2?s().columns-6:s().columns-30,20)).forEach(e=>{i(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+t.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(s().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),i(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(s().columns-35,0)))+` `+m(t.banner.footer.primary(`https://stormsoftware.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),c&&!d()&&await u(e)}async function C(e){await(await b(e)).clean(e)}async function w(n=a()){let r={..._()};for(let e=0;e<n.slice(0).length;e++){let t=n[e].length>3&&n[e].startsWith(`--`)?`--${n[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:n[e].length>2&&n[e].startsWith(`-`)?`-${n[e].slice(1).replaceAll(`-`,``)}`:n[e];(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`root=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`root`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`root=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`root`)&&(/^--?(root)=/.test(`-`+t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?r.root=t.replace(/^--?(root)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):n.length>e+1&&(r.root=n[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}return await S(),await y(),d()||(i(``),(h||e||p.LOG_LEVEL===`debug`)&&i(t.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),r.help?x():f(`clean`,[`clean`],[r],C)}export{w as handler};
@@ -1,9 +1,7 @@
1
- import{A as e,B as t,E as n,F as r,G as i,H as a,I as o,J as s,K as c,M as l,O as u,P as d,R as f,T as p,V as m,W as h,X as g,Z as _,a as v,g as y,o as b,u as x,v as S,w as C}from"./prompts-BnlPjHFR.mjs";import{t as w}from"./upgrade-yP6Jdrm0.mjs";import{t as T}from"./config-B0hTZO6E.mjs";import{n as E,t as D}from"./shared-D6Uc3liR.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(e=500){if(i().get(`banner`)||t(`no-banner`)||t(`hide-banner`)||o)return;i().set(`banner`,!0),l(``),l(b.banner.outline.primary(`┏`)+b.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+b.banner.outline.primary(`━`)+` `+v(u.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+b.banner.outline.primary(`━`.repeat(Math.max(d().columns-38,0)))+b.banner.outline.primary(`┓`),{consoleFn:console.log});let n=[`Command-Line Interface`];C(Math.max(...n.map(e=>p(e).length))>Math.max(d().columns+30,20)?``:`\n${n.join(`
2
- `)}\n`,Math.max(d().columns-30,20)).forEach(e=>{l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((d().columns-(p(e).length+2))/2),0))+v(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((d().columns-(p(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((d().columns-(p(`Completions - Bash Configuration`).length+2))/2),0))+v(u.banner.command.primary(`Completions - Bash Configuration`))+` `.repeat(Math.max(Math.ceil((d().columns-(p(`Completions - Bash Configuration`).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),C(v(u.banner.description.primary(`Update the current system's bash shell configuration to include completions for the command-line interface.`)),Math.max(60>d().columns/2?d().columns-6:d().columns-30,20)).forEach(e=>{l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((d().columns-(p(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((d().columns-(p(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(d().columns-2,0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),l(b.banner.outline.primary(`┗`)+b.banner.outline.primary(`━`.repeat(Math.max(d().columns-35,0)))+` `+v(u.banner.footer.primary(`https://stormsoftware.com`))+` `+b.banner.outline.primary(`━`.repeat(6))+b.banner.outline.primary(`┛`),{consoleFn:console.log}),l(``),r&&!m()&&await f(e)}async function N(t={},r=`~/.bashrc`){if(t.display!==!0){let t=r.includes(`.`)?r:k(r,`.bashrc`);t.startsWith(`~`)&&(t=k(O.homedir(),t.replace(`~`,``)));let i=``;try{i=await A(t,`utf8`)}catch(n){if(typeof n==`object`&&n&&`code`in n&&n.code===`ENOENT`)e(`Configuration file ${v(t)} does not exist. It will be created when the completion script is written.`);else return{error:n}}await j(t,`${i}\n\n### Begin - Command Line Interface Shell Completions ###\n\n${D} \n\n### End - Command Line Interface Bash Completions ###`),n(`Command Line Interface shell completions have been applied to Bash configuration file at ${v(t)}. Please restart your terminal or run ${S(`source ${t}`)} for the changes to take effect.`)}else l(` ------------------------------------------------- `),l(``),l(`### Begin - Command Line Interface Bash Completions ###`),l(``),E.split(`
3
- `).map(e=>l(e)),l(``),l(`### End - Command Line Interface Bash Completions ###`),l(``),l(` ------------------------------------------------- `),l(``),y(`To enable these completions, perform one of the following actions:
1
+ import{$ as e,A as t,D as n,E as r,F as i,G as a,J as o,L as s,N as c,O as l,R as u,U as d,V as f,W as p,Y as m,Z as h,a as g,b as _,et as v,f as y,g as b,o as x,q as S,r as C,t as w,v as T,z as E}from"./prompts-DEjU8qNL.mjs";import{t as D}from"./update-DcBNIEnv.mjs";import{n as O,t as k}from"./shared-C3VdzOJx.mjs";import{t as A}from"./config-RZsaJtzu.mjs";import j from"node:os";import{join as M}from"node:path";import{readFile as N,writeFile as P}from"node:fs/promises";async function F(e=500){if(o().get(`banner`)||d(`no-banner`)||d(`hide-banner`)||E)return;o().set(`banner`,!0),i(``),i(x.banner.outline.primary(`┏`)+x.banner.outline.primary(`━`.repeat(6))+` `+t.banner.header.primary(`⬤`)+` `+x.banner.outline.primary(`━`)+` `+g(t.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+x.banner.outline.primary(`━`.repeat(Math.max(s().columns-38,0)))+x.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`█████▄ ▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄`,`██▄▄█▀ ██▀██ ██ ▄ ██ ██▄▄ ██▄█▄ ██ ██ ███▄██ ██▄▄ ███▄▄`,`██ ▀███▀ ▀█▀█▀ ██▄▄▄ ██ ██ ██▄▄▄ ██ ██ ▀██ ██▄▄▄ ▄▄██▀`];r(Math.max(...a.map(e=>n(e).length))>Math.max(s().columns+30,20)?`Powerlines`:`\n${a.join(`
2
+ `)}\n`,Math.max(s().columns-30,20)).forEach(e=>{i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+g(t.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+x.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(`Completions - Bash Configuration`).length+2))/2),0))+g(t.banner.command.primary(`Completions - Bash Configuration`))+` `.repeat(Math.max(Math.ceil((s().columns-(n(`Completions - Bash Configuration`).length+2))/2),0))+x.banner.outline.primary(`┃`),{consoleFn:console.log}),r(g(t.banner.description.primary(`Update the current system's bash shell configuration to include completions for the Powerlines command-line interface.`)),Math.max(60>s().columns/2?s().columns-6:s().columns-30,20)).forEach(e=>{i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+t.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+x.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(s().columns-2,0))+x.banner.outline.primary(`┃`),{consoleFn:console.log}),i(x.banner.outline.primary(`┗`)+x.banner.outline.primary(`━`.repeat(Math.max(s().columns-35,0)))+` `+g(t.banner.footer.primary(`https://stormsoftware.com`))+` `+x.banner.outline.primary(`━`.repeat(6))+x.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),u&&!p()&&await f(e)}async function I(e={},t=`~/.bashrc`){if(e.display!==!0){let e=t.includes(`.`)?t:M(t,`.bashrc`);e.startsWith(`~`)&&(e=M(j.homedir(),e.replace(`~`,``)));let n=``;try{n=await N(e,`utf8`)}catch(t){if(typeof t==`object`&&t&&`code`in t&&t.code===`ENOENT`)c(`Configuration file ${g(e)} does not exist. It will be created when the completion script is written.`);else return{error:t}}await P(e,`${n}\n\n### Begin - Powerlines Shell Completions ###\n\n${k} \n\n### End - Powerlines Bash Completions ###`),l(`Powerlines shell completions have been applied to Bash configuration file at ${g(e)}. Please restart your terminal or run ${T(`source ${e}`)} for the changes to take effect.`)}else i(` ------------------------------------------------- `),i(``),i(`### Begin - Powerlines Bash Completions ###`),i(``),O.split(`
3
+ `).map(e=>i(e)),i(``),i(`### End - Powerlines Bash Completions ###`),i(``),i(` ------------------------------------------------- `),i(``),b(`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 P(e=a()){let t={...h()};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 await M(),await w(),l(``),(_||g||s.LOG_LEVEL===`debug`)&&(l(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`)),l(``),x(`Command path: completions / bash / config
7
-
8
- Options:
9
- `)),t.help?T():c(`completions/bash/config`,[`completions`,`bash`,`config`],[],N)}export{P as handler};
6
+ 2) Save the above script to a file and source it from your shell configuration file `)}async function L(n=a()){let r={...S(),display:!0};for(let e=0;e<n.slice(0).length;e++){let t=n[e].length>3&&n[e].startsWith(`--`)?`--${n[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:n[e].length>2&&n[e].startsWith(`-`)?`-${n[e].slice(1).replaceAll(`-`,``)}`:n[e];if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`)if(/^--?(display)=/.test(`-`+t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=t.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();r.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 r.display=!0}let o=Math.max(0,n.slice(4).findIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,s=o>4?4:Math.max(0,n.slice(o).findLastIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,c=`~/.bashrc`;if(s+0<n.length&&s+0!==o&&(c=n[s+0]),await F(),await D(),p()||(i(``),(v||e||h.LOG_LEVEL===`debug`)&&i(t.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!u)c||[].push(`Missing required "path" positional argument`);else if(!p()&&c===void 0){if(i(``),!c){let e=await C({message:`Please provide a value for the ${_(`path`)} argument`,description:`An argument that allows the user to specify a custom Path s...`,validate(e){return!e||e.trim()===``?`A value must be provided for this argument`:null}});if(w(e))return;c=e}i(``);let e=[];c||e.push(`Missing required "path" positional argument`),e.length>0&&(y(`The following validation failures were found while processing the user provided input, and must be corrected before the ${_(`Completions - Bash Configuration`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
7
+ `)}`),r.help=!0)}return r.help?A():m(`completions/bash/config`,[`completions`,`bash`,`config`],[r,c],I)}export{L as handler};
@@ -1,9 +1,7 @@
1
- import{B as e,E as t,F as n,G as r,H as i,I as a,J as o,K as s,M as c,O as l,P as u,R as d,T as f,V as p,W as m,X as h,Z as g,a as _,g as v,o as y,u as b,w as x}from"./prompts-BnlPjHFR.mjs";import{t as S}from"./upgrade-yP6Jdrm0.mjs";import{n as C,t as w}from"./shared-D6Uc3liR.mjs";import{t as T}from"./script-B97oHT_M.mjs";import{writeFile as E}from"node:fs/promises";async function D(t=500){if(r().get(`banner`)||e(`no-banner`)||e(`hide-banner`)||a)return;r().set(`banner`,!0),c(``),c(y.banner.outline.primary(`┏`)+y.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+y.banner.outline.primary(`━`)+` `+_(l.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+y.banner.outline.primary(`━`.repeat(Math.max(u().columns-38,0)))+y.banner.outline.primary(`┓`),{consoleFn:console.log});let i=[`Command-Line Interface`];x(Math.max(...i.map(e=>f(e).length))>Math.max(u().columns+30,20)?``:`\n${i.join(`
2
- `)}\n`,Math.max(u().columns-30,20)).forEach(e=>{c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((u().columns-(f(e).length+2))/2),0))+_(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((u().columns-(f(e).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log})}),c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((u().columns-(f(`Completions - Bash Script`).length+2))/2),0))+_(l.banner.command.primary(`Completions - Bash Script`))+` `.repeat(Math.max(Math.ceil((u().columns-(f(`Completions - Bash Script`).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log}),x(_(l.banner.description.primary(`Generate a bash completion script for the command-line interface.`)),Math.max(60>u().columns/2?u().columns-6:u().columns-30,20)).forEach(e=>{c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((u().columns-(f(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((u().columns-(f(e).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log})}),c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(u().columns-2,0))+y.banner.outline.primary(`┃`),{consoleFn:console.log}),c(y.banner.outline.primary(`┗`)+y.banner.outline.primary(`━`.repeat(Math.max(u().columns-35,0)))+` `+_(l.banner.footer.primary(`https://stormsoftware.com`))+` `+y.banner.outline.primary(`━`.repeat(6))+y.banner.outline.primary(`┛`),{consoleFn:console.log}),c(``),n&&!p()&&await d(t)}async function O(e={},n=`./cli-completions.bash`){if(e.display!==!0){let e=n.includes(`.`)?`${n}.bash`:n;await E(e,`# Bash script to add completions for Command Line Interface\n\n${w}`),t(`Command Line Interface Bash completion script has been generated at ${_(e)}.`)}else c(` ------------------------------------------------- `),c(``),c(`# Bash completion for Command Line Interface`),c(``),C.split(`
3
- `).map(e=>c(e)),c(``),c(` ------------------------------------------------- `),c(``),v(`To enable these completions, perform one of the following actions:
1
+ import{$ as e,A as t,D as n,E as r,F as i,G as a,J as o,L as s,O as c,R as l,U as u,V as d,W as f,Y as p,Z as m,a as h,b as g,et as _,f as v,g as y,o as b,q as x,r as S,t as C,z as w}from"./prompts-DEjU8qNL.mjs";import{t as T}from"./update-DcBNIEnv.mjs";import{t as E}from"./script-Bx-gKDHc.mjs";import{n as D,t as O}from"./shared-C3VdzOJx.mjs";import{writeFile as k}from"node:fs/promises";async function A(e=500){if(o().get(`banner`)||u(`no-banner`)||u(`hide-banner`)||w)return;o().set(`banner`,!0),i(``),i(b.banner.outline.primary(`┏`)+b.banner.outline.primary(`━`.repeat(6))+` `+t.banner.header.primary(`⬤`)+` `+b.banner.outline.primary(`━`)+` `+h(t.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+b.banner.outline.primary(`━`.repeat(Math.max(s().columns-38,0)))+b.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`█████▄ ▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄`,`██▄▄█▀ ██▀██ ██ ▄ ██ ██▄▄ ██▄█▄ ██ ██ ███▄██ ██▄▄ ███▄▄`,`██ ▀███▀ ▀█▀█▀ ██▄▄▄ ██ ██ ██▄▄▄ ██ ██ ▀██ ██▄▄▄ ▄▄██▀`];r(Math.max(...a.map(e=>n(e).length))>Math.max(s().columns+30,20)?`Powerlines`:`\n${a.join(`
2
+ `)}\n`,Math.max(s().columns-30,20)).forEach(e=>{i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+h(t.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(`Completions - Bash Script`).length+2))/2),0))+h(t.banner.command.primary(`Completions - Bash Script`))+` `.repeat(Math.max(Math.ceil((s().columns-(n(`Completions - Bash Script`).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),r(h(t.banner.description.primary(`Generate a bash completion script for the Powerlines command-line interface.`)),Math.max(60>s().columns/2?s().columns-6:s().columns-30,20)).forEach(e=>{i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+t.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(s().columns-2,0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),i(b.banner.outline.primary(`┗`)+b.banner.outline.primary(`━`.repeat(Math.max(s().columns-35,0)))+` `+h(t.banner.footer.primary(`https://stormsoftware.com`))+` `+b.banner.outline.primary(`━`.repeat(6))+b.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),l&&!f()&&await d(e)}async function j(e={},t=`./powerlines-completions.bash`){if(e.display!==!0){let e=t.includes(`.`)?`${t}.bash`:t;await k(e,`# Bash script to add completions for Powerlines\n\n${O}`),c(`Powerlines Bash completion script has been generated at ${h(e)}.`)}else i(` ------------------------------------------------- `),i(``),i(`# Bash completion for Powerlines`),i(``),D.split(`
3
+ `).map(e=>i(e)),i(``),i(` ------------------------------------------------- `),i(``),y(`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 k(e=i()){let t={...m()};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 await D(),await S(),c(``),(g||h||o.LOG_LEVEL===`debug`)&&(c(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`)),c(``),b(`Command path: completions / bash / script
7
-
8
- Options:
9
- `)),t.help?T():s(`completions/bash/script`,[`completions`,`bash`,`script`],[],O)}export{k as handler};
6
+ 2) Save the above script to a file and source it from your shell configuration file `)}async function M(n=a()){let r={...x(),display:!0};for(let e=0;e<n.slice(0).length;e++){let t=n[e].length>3&&n[e].startsWith(`--`)?`--${n[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:n[e].length>2&&n[e].startsWith(`-`)?`-${n[e].slice(1).replaceAll(`-`,``)}`:n[e];if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`)if(/^--?(display)=/.test(`-`+t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=t.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();r.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 r.display=!0}let o=Math.max(0,n.slice(4).findIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,s=o>4?4:Math.max(0,n.slice(o).findLastIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,c=`./powerlines-completions.bash`;if(s+0<n.length&&s+0!==o&&(c=n[s+0]),await A(),await T(),f()||(i(``),(_||e||m.LOG_LEVEL===`debug`)&&i(t.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!l)c||[].push(`Missing required "path" positional argument`);else if(!f()&&c===void 0){if(i(``),!c){let e=await S({message:`Please provide a value for the ${g(`path`)} argument`,description:`An argument that allows the user to specify a custom Path s...`,validate(e){return!e||e.trim()===``?`A value must be provided for this argument`:null}});if(C(e))return;c=e}i(``);let e=[];c||e.push(`Missing required "path" positional argument`),e.length>0&&(v(`The following validation failures were found while processing the user provided input, and must be corrected before the ${g(`Completions - Bash Script`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
7
+ `)}`),r.help=!0)}return r.help?E():p(`completions/bash/script`,[`completions`,`bash`,`script`],[r,c],j)}export{M as handler};
@@ -1,9 +1,7 @@
1
- import{A as e,B as t,E as n,F as r,G as i,H as a,I as o,J as s,K as c,M as l,O as u,P as d,R as f,T as p,V as m,W as h,X as g,Z as _,a as v,g as y,o as b,u as x,v as S,w as C}from"./prompts-BnlPjHFR.mjs";import{t as w}from"./upgrade-yP6Jdrm0.mjs";import{t as T}from"./config-BaNVYrnl.mjs";import{n as E,t as D}from"./shared-BiFPKQIb.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(e=500){if(i().get(`banner`)||t(`no-banner`)||t(`hide-banner`)||o)return;i().set(`banner`,!0),l(``),l(b.banner.outline.primary(`┏`)+b.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+b.banner.outline.primary(`━`)+` `+v(u.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+b.banner.outline.primary(`━`.repeat(Math.max(d().columns-38,0)))+b.banner.outline.primary(`┓`),{consoleFn:console.log});let n=[`Command-Line Interface`];C(Math.max(...n.map(e=>p(e).length))>Math.max(d().columns+30,20)?``:`\n${n.join(`
2
- `)}\n`,Math.max(d().columns-30,20)).forEach(e=>{l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((d().columns-(p(e).length+2))/2),0))+v(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((d().columns-(p(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((d().columns-(p(`Completions - Fish Configuration`).length+2))/2),0))+v(u.banner.command.primary(`Completions - Fish Configuration`))+` `.repeat(Math.max(Math.ceil((d().columns-(p(`Completions - Fish Configuration`).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),C(v(u.banner.description.primary(`Update the current system's Fish shell configuration to include completions for the command-line interface.`)),Math.max(60>d().columns/2?d().columns-6:d().columns-30,20)).forEach(e=>{l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((d().columns-(p(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((d().columns-(p(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(d().columns-2,0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),l(b.banner.outline.primary(`┗`)+b.banner.outline.primary(`━`.repeat(Math.max(d().columns-35,0)))+` `+v(u.banner.footer.primary(`https://stormsoftware.com`))+` `+b.banner.outline.primary(`━`.repeat(6))+b.banner.outline.primary(`┛`),{consoleFn:console.log}),l(``),r&&!m()&&await f(e)}async function N(t={},r=`~/.config/fish/config.fish`){if(t.display!==!0){let t=r.includes(`.`)?r:k(r,`.config`,`fish`,`config.fish`);t.startsWith(`~`)&&(t=k(O.homedir(),t.replace(`~`,``)));let i=``;try{i=await A(t,`utf8`)}catch(n){if(typeof n==`object`&&n&&`code`in n&&n.code===`ENOENT`)e(`Configuration file ${v(t)} does not exist. It will be created when the completion script is written.`);else return{error:n}}await j(t,`${i}\n\n### Begin - Command Line Interface Fish Completions ###\n\n${D} \n\n### End - Command Line Interface Fish Completions ###`),n(`Command Line Interface shell completions have been applied to Fish configuration file at ${v(t)}. Please restart your terminal or run ${S(`source ${t}`)} for the changes to take effect.`)}else l(` ------------------------------------------------- `),l(``),l(`### Begin - Command Line Interface Fish Completions ###`),l(``),E.split(`
3
- `).map(e=>l(e)),l(``),l(`### End - Command Line Interface Fish Completions ###`),l(``),l(` ------------------------------------------------- `),l(``),y(`To enable these completions, perform one of the following actions:
1
+ import{$ as e,A as t,D as n,E as r,F as i,G as a,J as o,L as s,N as c,O as l,R as u,U as d,V as f,W as p,Y as m,Z as h,a as g,b as _,et as v,f as y,g as b,o as x,q as S,r as C,t as w,v as T,z as E}from"./prompts-DEjU8qNL.mjs";import{t as D}from"./update-DcBNIEnv.mjs";import{t as O}from"./config-8bmAaNQ2.mjs";import{n as k,t as A}from"./shared-D6KGuDvi.mjs";import j from"node:os";import{join as M}from"node:path";import{readFile as N,writeFile as P}from"node:fs/promises";async function F(e=500){if(o().get(`banner`)||d(`no-banner`)||d(`hide-banner`)||E)return;o().set(`banner`,!0),i(``),i(x.banner.outline.primary(`┏`)+x.banner.outline.primary(`━`.repeat(6))+` `+t.banner.header.primary(`⬤`)+` `+x.banner.outline.primary(`━`)+` `+g(t.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+x.banner.outline.primary(`━`.repeat(Math.max(s().columns-38,0)))+x.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`█████▄ ▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄`,`██▄▄█▀ ██▀██ ██ ▄ ██ ██▄▄ ██▄█▄ ██ ██ ███▄██ ██▄▄ ███▄▄`,`██ ▀███▀ ▀█▀█▀ ██▄▄▄ ██ ██ ██▄▄▄ ██ ██ ▀██ ██▄▄▄ ▄▄██▀`];r(Math.max(...a.map(e=>n(e).length))>Math.max(s().columns+30,20)?`Powerlines`:`\n${a.join(`
2
+ `)}\n`,Math.max(s().columns-30,20)).forEach(e=>{i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+g(t.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+x.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(`Completions - Fish Configuration`).length+2))/2),0))+g(t.banner.command.primary(`Completions - Fish Configuration`))+` `.repeat(Math.max(Math.ceil((s().columns-(n(`Completions - Fish Configuration`).length+2))/2),0))+x.banner.outline.primary(`┃`),{consoleFn:console.log}),r(g(t.banner.description.primary(`Update the current system's Fish shell configuration to include completions for the Powerlines command-line interface.`)),Math.max(60>s().columns/2?s().columns-6:s().columns-30,20)).forEach(e=>{i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+t.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+x.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(s().columns-2,0))+x.banner.outline.primary(`┃`),{consoleFn:console.log}),i(x.banner.outline.primary(`┗`)+x.banner.outline.primary(`━`.repeat(Math.max(s().columns-35,0)))+` `+g(t.banner.footer.primary(`https://stormsoftware.com`))+` `+x.banner.outline.primary(`━`.repeat(6))+x.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),u&&!p()&&await f(e)}async function I(e={},t=`~/.config/fish/config.fish`){if(e.display!==!0){let e=t.includes(`.`)?t:M(t,`.config`,`fish`,`config.fish`);e.startsWith(`~`)&&(e=M(j.homedir(),e.replace(`~`,``)));let n=``;try{n=await N(e,`utf8`)}catch(t){if(typeof t==`object`&&t&&`code`in t&&t.code===`ENOENT`)c(`Configuration file ${g(e)} does not exist. It will be created when the completion script is written.`);else return{error:t}}await P(e,`${n}\n\n### Begin - Powerlines Fish Completions ###\n\n${A} \n\n### End - Powerlines Fish Completions ###`),l(`Powerlines shell completions have been applied to Fish configuration file at ${g(e)}. Please restart your terminal or run ${T(`source ${e}`)} for the changes to take effect.`)}else i(` ------------------------------------------------- `),i(``),i(`### Begin - Powerlines Fish Completions ###`),i(``),k.split(`
3
+ `).map(e=>i(e)),i(``),i(`### End - Powerlines Fish Completions ###`),i(``),i(` ------------------------------------------------- `),i(``),b(`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 P(e=a()){let t={...h()};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 await M(),await w(),l(``),(_||g||s.LOG_LEVEL===`debug`)&&(l(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`)),l(``),x(`Command path: completions / fish / config
7
-
8
- Options:
9
- `)),t.help?T():c(`completions/fish/config`,[`completions`,`fish`,`config`],[],N)}export{P as handler};
6
+ 2) Save the above script to a file and source it from your shell configuration file `)}async function L(n=a()){let r={...S(),display:!0};for(let e=0;e<n.slice(0).length;e++){let t=n[e].length>3&&n[e].startsWith(`--`)?`--${n[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:n[e].length>2&&n[e].startsWith(`-`)?`-${n[e].slice(1).replaceAll(`-`,``)}`:n[e];if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`)if(/^--?(display)=/.test(`-`+t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=t.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();r.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 r.display=!0}let o=Math.max(0,n.slice(4).findIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,s=o>4?4:Math.max(0,n.slice(o).findLastIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,c=`~/.config/fish/config.fish`;if(s+0<n.length&&s+0!==o&&(c=n[s+0]),await F(),await D(),p()||(i(``),(v||e||h.LOG_LEVEL===`debug`)&&i(t.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!u)c||[].push(`Missing required "path" positional argument`);else if(!p()&&c===void 0){if(i(``),!c){let e=await C({message:`Please provide a value for the ${_(`path`)} argument`,description:`An argument that allows the user to specify a custom Path s...`,validate(e){return!e||e.trim()===``?`A value must be provided for this argument`:null}});if(w(e))return;c=e}i(``);let e=[];c||e.push(`Missing required "path" positional argument`),e.length>0&&(y(`The following validation failures were found while processing the user provided input, and must be corrected before the ${_(`Completions - Fish Configuration`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
7
+ `)}`),r.help=!0)}return r.help?O():m(`completions/fish/config`,[`completions`,`fish`,`config`],[r,c],I)}export{L as handler};
@@ -1,9 +1,7 @@
1
- import{B as e,E as t,F as n,G as r,H as i,I as a,J as o,K as s,M as c,O as l,P as u,R as d,T as f,V as p,W as m,X as h,Z as g,a as _,g as v,o as y,u as b,w as x}from"./prompts-BnlPjHFR.mjs";import{t as S}from"./upgrade-yP6Jdrm0.mjs";import{n as C,t as w}from"./shared-BiFPKQIb.mjs";import{t as T}from"./script-Di-8LIT0.mjs";import{writeFile as E}from"node:fs/promises";async function D(t=500){if(r().get(`banner`)||e(`no-banner`)||e(`hide-banner`)||a)return;r().set(`banner`,!0),c(``),c(y.banner.outline.primary(`┏`)+y.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+y.banner.outline.primary(`━`)+` `+_(l.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+y.banner.outline.primary(`━`.repeat(Math.max(u().columns-38,0)))+y.banner.outline.primary(`┓`),{consoleFn:console.log});let i=[`Command-Line Interface`];x(Math.max(...i.map(e=>f(e).length))>Math.max(u().columns+30,20)?``:`\n${i.join(`
2
- `)}\n`,Math.max(u().columns-30,20)).forEach(e=>{c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((u().columns-(f(e).length+2))/2),0))+_(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((u().columns-(f(e).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log})}),c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((u().columns-(f(`Completions - Fish Script`).length+2))/2),0))+_(l.banner.command.primary(`Completions - Fish Script`))+` `.repeat(Math.max(Math.ceil((u().columns-(f(`Completions - Fish Script`).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log}),x(_(l.banner.description.primary(`Generate a Fish completion script for the command-line interface.`)),Math.max(60>u().columns/2?u().columns-6:u().columns-30,20)).forEach(e=>{c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((u().columns-(f(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((u().columns-(f(e).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log})}),c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(u().columns-2,0))+y.banner.outline.primary(`┃`),{consoleFn:console.log}),c(y.banner.outline.primary(`┗`)+y.banner.outline.primary(`━`.repeat(Math.max(u().columns-35,0)))+` `+_(l.banner.footer.primary(`https://stormsoftware.com`))+` `+y.banner.outline.primary(`━`.repeat(6))+y.banner.outline.primary(`┛`),{consoleFn:console.log}),c(``),n&&!p()&&await d(t)}async function O(e={},n=`./cli-completions.fish`){if(e.display!==!0){let e=n.includes(`.`)?`${n}.fish`:n;await E(e,`# Fish script to add completions for Command Line Interface\n\n${w}`),t(`Command Line Interface Fish completion script has been generated at ${_(e)}.`)}else c(` ------------------------------------------------- `),c(``),c(`# Fish completion for Command Line Interface`),c(``),C.split(`
3
- `).map(e=>c(e)),c(``),c(` ------------------------------------------------- `),c(``),v(`To enable these completions, perform one of the following actions:
1
+ import{$ as e,A as t,D as n,E as r,F as i,G as a,J as o,L as s,O as c,R as l,U as u,V as d,W as f,Y as p,Z as m,a as h,b as g,et as _,f as v,g as y,o as b,q as x,r as S,t as C,z as w}from"./prompts-DEjU8qNL.mjs";import{t as T}from"./update-DcBNIEnv.mjs";import{n as E,t as D}from"./shared-D6KGuDvi.mjs";import{t as O}from"./script-CYWDQkcZ.mjs";import{writeFile as k}from"node:fs/promises";async function A(e=500){if(o().get(`banner`)||u(`no-banner`)||u(`hide-banner`)||w)return;o().set(`banner`,!0),i(``),i(b.banner.outline.primary(`┏`)+b.banner.outline.primary(`━`.repeat(6))+` `+t.banner.header.primary(`⬤`)+` `+b.banner.outline.primary(`━`)+` `+h(t.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+b.banner.outline.primary(`━`.repeat(Math.max(s().columns-38,0)))+b.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`█████▄ ▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄`,`██▄▄█▀ ██▀██ ██ ▄ ██ ██▄▄ ██▄█▄ ██ ██ ███▄██ ██▄▄ ███▄▄`,`██ ▀███▀ ▀█▀█▀ ██▄▄▄ ██ ██ ██▄▄▄ ██ ██ ▀██ ██▄▄▄ ▄▄██▀`];r(Math.max(...a.map(e=>n(e).length))>Math.max(s().columns+30,20)?`Powerlines`:`\n${a.join(`
2
+ `)}\n`,Math.max(s().columns-30,20)).forEach(e=>{i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+h(t.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(`Completions - Fish Script`).length+2))/2),0))+h(t.banner.command.primary(`Completions - Fish Script`))+` `.repeat(Math.max(Math.ceil((s().columns-(n(`Completions - Fish Script`).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),r(h(t.banner.description.primary(`Generate a Fish completion script for the Powerlines command-line interface.`)),Math.max(60>s().columns/2?s().columns-6:s().columns-30,20)).forEach(e=>{i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+t.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(s().columns-2,0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),i(b.banner.outline.primary(`┗`)+b.banner.outline.primary(`━`.repeat(Math.max(s().columns-35,0)))+` `+h(t.banner.footer.primary(`https://stormsoftware.com`))+` `+b.banner.outline.primary(`━`.repeat(6))+b.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),l&&!f()&&await d(e)}async function j(e={},t=`./powerlines-completions.fish`){if(e.display!==!0){let e=t.includes(`.`)?`${t}.fish`:t;await k(e,`# Fish script to add completions for Powerlines\n\n${D}`),c(`Powerlines Fish completion script has been generated at ${h(e)}.`)}else i(` ------------------------------------------------- `),i(``),i(`# Fish completion for Powerlines`),i(``),E.split(`
3
+ `).map(e=>i(e)),i(``),i(` ------------------------------------------------- `),i(``),y(`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 k(e=i()){let t={...m()};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 await D(),await S(),c(``),(g||h||o.LOG_LEVEL===`debug`)&&(c(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`)),c(``),b(`Command path: completions / fish / script
7
-
8
- Options:
9
- `)),t.help?T():s(`completions/fish/script`,[`completions`,`fish`,`script`],[],O)}export{k as handler};
6
+ 2) Save the above script to a file and source it from your shell configuration file `)}async function M(n=a()){let r={...x(),display:!0};for(let e=0;e<n.slice(0).length;e++){let t=n[e].length>3&&n[e].startsWith(`--`)?`--${n[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:n[e].length>2&&n[e].startsWith(`-`)?`-${n[e].slice(1).replaceAll(`-`,``)}`:n[e];if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`)if(/^--?(display)=/.test(`-`+t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=t.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();r.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 r.display=!0}let o=Math.max(0,n.slice(4).findIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,s=o>4?4:Math.max(0,n.slice(o).findLastIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,c=`./powerlines-completions.fish`;if(s+0<n.length&&s+0!==o&&(c=n[s+0]),await A(),await T(),f()||(i(``),(_||e||m.LOG_LEVEL===`debug`)&&i(t.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!l)c||[].push(`Missing required "path" positional argument`);else if(!f()&&c===void 0){if(i(``),!c){let e=await S({message:`Please provide a value for the ${g(`path`)} argument`,description:`An argument that allows the user to specify a custom Path s...`,validate(e){return!e||e.trim()===``?`A value must be provided for this argument`:null}});if(C(e))return;c=e}i(``);let e=[];c||e.push(`Missing required "path" positional argument`),e.length>0&&(v(`The following validation failures were found while processing the user provided input, and must be corrected before the ${g(`Completions - Fish Script`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
7
+ `)}`),r.help=!0)}return r.help?O():p(`completions/fish/script`,[`completions`,`fish`,`script`],[r,c],j)}export{M as handler};
@@ -1,9 +1,7 @@
1
- import{A as e,B as t,E as n,F as r,G as i,H as a,I as o,J as s,K as c,M as l,O as u,P as d,R as f,T as p,V as m,W as h,X as g,Z as _,a as v,g as y,o as b,u as x,v as S,w as C}from"./prompts-BnlPjHFR.mjs";import{t as w}from"./upgrade-yP6Jdrm0.mjs";import{n as T,t as E}from"./shared-ClfTGQiY.mjs";import{t as D}from"./config-BJFVoVkf.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(e=500){if(i().get(`banner`)||t(`no-banner`)||t(`hide-banner`)||o)return;i().set(`banner`,!0),l(``),l(b.banner.outline.primary(`┏`)+b.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+b.banner.outline.primary(`━`)+` `+v(u.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+b.banner.outline.primary(`━`.repeat(Math.max(d().columns-38,0)))+b.banner.outline.primary(`┓`),{consoleFn:console.log});let n=[`Command-Line Interface`];C(Math.max(...n.map(e=>p(e).length))>Math.max(d().columns+30,20)?``:`\n${n.join(`
2
- `)}\n`,Math.max(d().columns-30,20)).forEach(e=>{l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((d().columns-(p(e).length+2))/2),0))+v(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((d().columns-(p(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((d().columns-(p(`Completions - PowerShell Configuration`).length+2))/2),0))+v(u.banner.command.primary(`Completions - PowerShell Configuration`))+` `.repeat(Math.max(Math.ceil((d().columns-(p(`Completions - PowerShell Configuration`).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),C(v(u.banner.description.primary(`Update the current system's PowerShell configuration to include completions for the command-line interface.`)),Math.max(60>d().columns/2?d().columns-6:d().columns-30,20)).forEach(e=>{l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((d().columns-(p(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((d().columns-(p(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(d().columns-2,0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),l(b.banner.outline.primary(`┗`)+b.banner.outline.primary(`━`.repeat(Math.max(d().columns-35,0)))+` `+v(u.banner.footer.primary(`https://stormsoftware.com`))+` `+b.banner.outline.primary(`━`.repeat(6))+b.banner.outline.primary(`┛`),{consoleFn:console.log}),l(``),r&&!m()&&await f(e)}async function N(t={},r=`~/.config/powershell/Microsoft.PowerShell_profile.ps1`){if(t.display!==!0){let t=r.includes(`.`)?r:k(r,`Microsoft.PowerShell_profile.ps1`);t.startsWith(`~`)&&(t=k(O.homedir(),t.replace(`~`,``)));let i=``;try{i=await A(t,`utf8`)}catch(n){if(typeof n==`object`&&n&&`code`in n&&n.code===`ENOENT`)e(`Configuration file ${v(t)} does not exist. It will be created when the completion script is written.`);else return{error:n}}await j(t,`${i}\n\n### Begin - Command Line Interface PowerShell Completions ###\n\n${E} \n\n### End - Command Line Interface PowerShell Completions ###`),n(`Command Line Interface shell completions have been applied to PowerShell configuration file at ${v(t)}. Please restart your terminal or run ${S(`source ${t}`)} for the changes to take effect.`)}else l(` ------------------------------------------------- `),l(``),l(`### Begin - Command Line Interface PowerShell Completions ###`),l(``),T.split(`
3
- `).map(e=>l(e)),l(``),l(`### End - Command Line Interface PowerShell Completions ###`),l(``),l(` ------------------------------------------------- `),l(``),y(`To enable these completions, perform one of the following actions:
1
+ import{$ as e,A as t,D as n,E as r,F as i,G as a,J as o,L as s,N as c,O as l,R as u,U as d,V as f,W as p,Y as m,Z as h,a as g,b as _,et as v,f as y,g as b,o as x,q as S,r as C,t as w,v as T,z as E}from"./prompts-DEjU8qNL.mjs";import{t as D}from"./update-DcBNIEnv.mjs";import{t as O}from"./config-Dlyzcim5.mjs";import{n as k,t as A}from"./shared-rXffwFNh.mjs";import j from"node:os";import{join as M}from"node:path";import{readFile as N,writeFile as P}from"node:fs/promises";async function F(e=500){if(o().get(`banner`)||d(`no-banner`)||d(`hide-banner`)||E)return;o().set(`banner`,!0),i(``),i(x.banner.outline.primary(`┏`)+x.banner.outline.primary(`━`.repeat(6))+` `+t.banner.header.primary(`⬤`)+` `+x.banner.outline.primary(`━`)+` `+g(t.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+x.banner.outline.primary(`━`.repeat(Math.max(s().columns-38,0)))+x.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`█████▄ ▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄`,`██▄▄█▀ ██▀██ ██ ▄ ██ ██▄▄ ██▄█▄ ██ ██ ███▄██ ██▄▄ ███▄▄`,`██ ▀███▀ ▀█▀█▀ ██▄▄▄ ██ ██ ██▄▄▄ ██ ██ ▀██ ██▄▄▄ ▄▄██▀`];r(Math.max(...a.map(e=>n(e).length))>Math.max(s().columns+30,20)?`Powerlines`:`\n${a.join(`
2
+ `)}\n`,Math.max(s().columns-30,20)).forEach(e=>{i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+g(t.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+x.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(`Completions - PowerShell Configuration`).length+2))/2),0))+g(t.banner.command.primary(`Completions - PowerShell Configuration`))+` `.repeat(Math.max(Math.ceil((s().columns-(n(`Completions - PowerShell Configuration`).length+2))/2),0))+x.banner.outline.primary(`┃`),{consoleFn:console.log}),r(g(t.banner.description.primary(`Update the current system's PowerShell configuration to include completions for the Powerlines command-line interface.`)),Math.max(60>s().columns/2?s().columns-6:s().columns-30,20)).forEach(e=>{i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+t.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+x.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(s().columns-2,0))+x.banner.outline.primary(`┃`),{consoleFn:console.log}),i(x.banner.outline.primary(`┗`)+x.banner.outline.primary(`━`.repeat(Math.max(s().columns-35,0)))+` `+g(t.banner.footer.primary(`https://stormsoftware.com`))+` `+x.banner.outline.primary(`━`.repeat(6))+x.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),u&&!p()&&await f(e)}async function I(e={},t=`~/.config/powershell/Microsoft.PowerShell_profile.ps1`){if(e.display!==!0){let e=t.includes(`.`)?t:M(t,`Microsoft.PowerShell_profile.ps1`);e.startsWith(`~`)&&(e=M(j.homedir(),e.replace(`~`,``)));let n=``;try{n=await N(e,`utf8`)}catch(t){if(typeof t==`object`&&t&&`code`in t&&t.code===`ENOENT`)c(`Configuration file ${g(e)} does not exist. It will be created when the completion script is written.`);else return{error:t}}await P(e,`${n}\n\n### Begin - Powerlines PowerShell Completions ###\n\n${A} \n\n### End - Powerlines PowerShell Completions ###`),l(`Powerlines shell completions have been applied to PowerShell configuration file at ${g(e)}. Please restart your terminal or run ${T(`source ${e}`)} for the changes to take effect.`)}else i(` ------------------------------------------------- `),i(``),i(`### Begin - Powerlines PowerShell Completions ###`),i(``),k.split(`
3
+ `).map(e=>i(e)),i(``),i(`### End - Powerlines PowerShell Completions ###`),i(``),i(` ------------------------------------------------- `),i(``),b(`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=a()){let t={...h()};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 await M(),await w(),l(``),(_||g||s.LOG_LEVEL===`debug`)&&(l(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`)),l(``),x(`Command path: completions / powershell / config
7
-
8
- Options:
9
- `)),t.help?D():c(`completions/powershell/config`,[`completions`,`powershell`,`config`],[],N)}export{P as handler};
6
+ 2) Save the above script to a file and source it from your shell configuration file `)}async function L(n=a()){let r={...S(),display:!0};for(let e=0;e<n.slice(0).length;e++){let t=n[e].length>3&&n[e].startsWith(`--`)?`--${n[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:n[e].length>2&&n[e].startsWith(`-`)?`-${n[e].slice(1).replaceAll(`-`,``)}`:n[e];if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`)if(/^--?(display)=/.test(`-`+t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=t.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();r.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 r.display=!0}let o=Math.max(0,n.slice(4).findIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,s=o>4?4:Math.max(0,n.slice(o).findLastIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,c=`~/.config/powershell/Microsoft.PowerShell_profile.ps1`;if(s+0<n.length&&s+0!==o&&(c=n[s+0]),await F(),await D(),p()||(i(``),(v||e||h.LOG_LEVEL===`debug`)&&i(t.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!u)c||[].push(`Missing required "path" positional argument`);else if(!p()&&c===void 0){if(i(``),!c){let e=await C({message:`Please provide a value for the ${_(`path`)} argument`,description:`An argument that allows the user to specify a custom Path s...`,validate(e){return!e||e.trim()===``?`A value must be provided for this argument`:null}});if(w(e))return;c=e}i(``);let e=[];c||e.push(`Missing required "path" positional argument`),e.length>0&&(y(`The following validation failures were found while processing the user provided input, and must be corrected before the ${_(`Completions - PowerShell Configuration`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
7
+ `)}`),r.help=!0)}return r.help?O():m(`completions/powershell/config`,[`completions`,`powershell`,`config`],[r,c],I)}export{L as handler};
@@ -1,9 +1,7 @@
1
- import{B as e,E as t,F as n,G as r,H as i,I as a,J as o,K as s,M as c,O as l,P as u,R as d,T as f,V as p,W as m,X as h,Z as g,a as _,g as v,o as y,u as b,w as x}from"./prompts-BnlPjHFR.mjs";import{t as S}from"./upgrade-yP6Jdrm0.mjs";import{t as C}from"./script-Bn4yCHJR.mjs";import{n as w,t as T}from"./shared-ClfTGQiY.mjs";import{writeFile as E}from"node:fs/promises";async function D(t=500){if(r().get(`banner`)||e(`no-banner`)||e(`hide-banner`)||a)return;r().set(`banner`,!0),c(``),c(y.banner.outline.primary(`┏`)+y.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+y.banner.outline.primary(`━`)+` `+_(l.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+y.banner.outline.primary(`━`.repeat(Math.max(u().columns-38,0)))+y.banner.outline.primary(`┓`),{consoleFn:console.log});let i=[`Command-Line Interface`];x(Math.max(...i.map(e=>f(e).length))>Math.max(u().columns+30,20)?``:`\n${i.join(`
2
- `)}\n`,Math.max(u().columns-30,20)).forEach(e=>{c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((u().columns-(f(e).length+2))/2),0))+_(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((u().columns-(f(e).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log})}),c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((u().columns-(f(`Completions - PowerShell Script`).length+2))/2),0))+_(l.banner.command.primary(`Completions - PowerShell Script`))+` `.repeat(Math.max(Math.ceil((u().columns-(f(`Completions - PowerShell Script`).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log}),x(_(l.banner.description.primary(`Generate a PowerShell completion script for the command-line interface.`)),Math.max(60>u().columns/2?u().columns-6:u().columns-30,20)).forEach(e=>{c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((u().columns-(f(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((u().columns-(f(e).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log})}),c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(u().columns-2,0))+y.banner.outline.primary(`┃`),{consoleFn:console.log}),c(y.banner.outline.primary(`┗`)+y.banner.outline.primary(`━`.repeat(Math.max(u().columns-35,0)))+` `+_(l.banner.footer.primary(`https://stormsoftware.com`))+` `+y.banner.outline.primary(`━`.repeat(6))+y.banner.outline.primary(`┛`),{consoleFn:console.log}),c(``),n&&!p()&&await d(t)}async function O(e={},n=`./cli-completions.ps1`){if(e.display!==!0){let e=n.includes(`.`)?`${n}.ps1`:n;await E(e,`# PowerShell script to add completions for Command Line Interface\n\n${T}`),t(`Command Line Interface PowerShell completion script has been generated at ${_(e)}.`)}else c(` ------------------------------------------------- `),c(``),c(`# PowerShell completions for Command Line Interface`),c(``),w.split(`
3
- `).map(e=>c(e)),c(``),c(` ------------------------------------------------- `),c(``),v(`To enable these completions, perform one of the following actions:
1
+ import{$ as e,A as t,D as n,E as r,F as i,G as a,J as o,L as s,O as c,R as l,U as u,V as d,W as f,Y as p,Z as m,a as h,b as g,et as _,f as v,g as y,o as b,q as x,r as S,t as C,z as w}from"./prompts-DEjU8qNL.mjs";import{t as T}from"./update-DcBNIEnv.mjs";import{n as E,t as D}from"./shared-rXffwFNh.mjs";import{t as O}from"./script-l5WTGeVn.mjs";import{writeFile as k}from"node:fs/promises";async function A(e=500){if(o().get(`banner`)||u(`no-banner`)||u(`hide-banner`)||w)return;o().set(`banner`,!0),i(``),i(b.banner.outline.primary(`┏`)+b.banner.outline.primary(`━`.repeat(6))+` `+t.banner.header.primary(`⬤`)+` `+b.banner.outline.primary(`━`)+` `+h(t.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+b.banner.outline.primary(`━`.repeat(Math.max(s().columns-38,0)))+b.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`█████▄ ▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄`,`██▄▄█▀ ██▀██ ██ ▄ ██ ██▄▄ ██▄█▄ ██ ██ ███▄██ ██▄▄ ███▄▄`,`██ ▀███▀ ▀█▀█▀ ██▄▄▄ ██ ██ ██▄▄▄ ██ ██ ▀██ ██▄▄▄ ▄▄██▀`];r(Math.max(...a.map(e=>n(e).length))>Math.max(s().columns+30,20)?`Powerlines`:`\n${a.join(`
2
+ `)}\n`,Math.max(s().columns-30,20)).forEach(e=>{i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+h(t.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(`Completions - PowerShell Script`).length+2))/2),0))+h(t.banner.command.primary(`Completions - PowerShell Script`))+` `.repeat(Math.max(Math.ceil((s().columns-(n(`Completions - PowerShell Script`).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),r(h(t.banner.description.primary(`Generate a PowerShell completion script for the Powerlines command-line interface.`)),Math.max(60>s().columns/2?s().columns-6:s().columns-30,20)).forEach(e=>{i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+t.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(s().columns-2,0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),i(b.banner.outline.primary(`┗`)+b.banner.outline.primary(`━`.repeat(Math.max(s().columns-35,0)))+` `+h(t.banner.footer.primary(`https://stormsoftware.com`))+` `+b.banner.outline.primary(`━`.repeat(6))+b.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),l&&!f()&&await d(e)}async function j(e={},t=`./powerlines-completions.ps1`){if(e.display!==!0){let e=t.includes(`.`)?`${t}.ps1`:t;await k(e,`# PowerShell script to add completions for Powerlines\n\n${D}`),c(`Powerlines PowerShell completion script has been generated at ${h(e)}.`)}else i(` ------------------------------------------------- `),i(``),i(`# PowerShell completions for Powerlines`),i(``),E.split(`
3
+ `).map(e=>i(e)),i(``),i(` ------------------------------------------------- `),i(``),y(`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 k(e=i()){let t={...m()};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 await D(),await S(),c(``),(g||h||o.LOG_LEVEL===`debug`)&&(c(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`)),c(``),b(`Command path: completions / powershell / script
7
-
8
- Options:
9
- `)),t.help?C():s(`completions/powershell/script`,[`completions`,`powershell`,`script`],[],O)}export{k as handler};
6
+ 2) Save the above script to a file and source it from your shell configuration file `)}async function M(n=a()){let r={...x(),display:!0};for(let e=0;e<n.slice(0).length;e++){let t=n[e].length>3&&n[e].startsWith(`--`)?`--${n[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:n[e].length>2&&n[e].startsWith(`-`)?`-${n[e].slice(1).replaceAll(`-`,``)}`:n[e];if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`)if(/^--?(display)=/.test(`-`+t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=t.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();r.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 r.display=!0}let o=Math.max(0,n.slice(4).findIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,s=o>4?4:Math.max(0,n.slice(o).findLastIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,c=`./powerlines-completions.ps1`;if(s+0<n.length&&s+0!==o&&(c=n[s+0]),await A(),await T(),f()||(i(``),(_||e||m.LOG_LEVEL===`debug`)&&i(t.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!l)c||[].push(`Missing required "path" positional argument`);else if(!f()&&c===void 0){if(i(``),!c){let e=await S({message:`Please provide a value for the ${g(`path`)} argument`,description:`An argument that allows the user to specify a custom Path s...`,validate(e){return!e||e.trim()===``?`A value must be provided for this argument`:null}});if(C(e))return;c=e}i(``);let e=[];c||e.push(`Missing required "path" positional argument`),e.length>0&&(v(`The following validation failures were found while processing the user provided input, and must be corrected before the ${g(`Completions - PowerShell Script`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
7
+ `)}`),r.help=!0)}return r.help?O():p(`completions/powershell/script`,[`completions`,`powershell`,`script`],[r,c],j)}export{M as handler};
@@ -1,9 +1,7 @@
1
- import{A as e,B as t,E as n,F as r,G as i,H as a,I as o,J as s,K as c,M as l,O as u,P as d,R as f,T as p,V as m,W as h,X as g,Z as _,a as v,g as y,o as b,u as x,v as S,w as C}from"./prompts-BnlPjHFR.mjs";import{t as w}from"./upgrade-yP6Jdrm0.mjs";import{n as T,t as E}from"./shared-CLQvIZ7z.mjs";import{t as D}from"./config-Bf2LnULJ.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(e=500){if(i().get(`banner`)||t(`no-banner`)||t(`hide-banner`)||o)return;i().set(`banner`,!0),l(``),l(b.banner.outline.primary(`┏`)+b.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+b.banner.outline.primary(`━`)+` `+v(u.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+b.banner.outline.primary(`━`.repeat(Math.max(d().columns-38,0)))+b.banner.outline.primary(`┓`),{consoleFn:console.log});let n=[`Command-Line Interface`];C(Math.max(...n.map(e=>p(e).length))>Math.max(d().columns+30,20)?``:`\n${n.join(`
2
- `)}\n`,Math.max(d().columns-30,20)).forEach(e=>{l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((d().columns-(p(e).length+2))/2),0))+v(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((d().columns-(p(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((d().columns-(p(`Completions - Zsh Configuration`).length+2))/2),0))+v(u.banner.command.primary(`Completions - Zsh Configuration`))+` `.repeat(Math.max(Math.ceil((d().columns-(p(`Completions - Zsh Configuration`).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),C(v(u.banner.description.primary(`Update the current system's Zsh shell configuration to include completions for the command-line interface.`)),Math.max(60>d().columns/2?d().columns-6:d().columns-30,20)).forEach(e=>{l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((d().columns-(p(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((d().columns-(p(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),l(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(d().columns-2,0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),l(b.banner.outline.primary(`┗`)+b.banner.outline.primary(`━`.repeat(Math.max(d().columns-35,0)))+` `+v(u.banner.footer.primary(`https://stormsoftware.com`))+` `+b.banner.outline.primary(`━`.repeat(6))+b.banner.outline.primary(`┛`),{consoleFn:console.log}),l(``),r&&!m()&&await f(e)}async function N(t={},r=`~/.zshrc`){if(t.display!==!0){let t=r.includes(`.`)?r:k(r,`.zshrc`);t.startsWith(`~`)&&(t=k(O.homedir(),t.replace(`~`,``)));let i=``;try{i=await A(t,`utf8`)}catch(n){if(typeof n==`object`&&n&&`code`in n&&n.code===`ENOENT`)e(`Configuration file ${v(t)} does not exist. It will be created when the completion script is written.`);else return{error:n}}await j(t,`${i}\n\n### Begin - Command Line Interface Shell Completions ###\n\n${E} \n\n### End - Command Line Interface Zsh Completions ###`),n(`Command Line Interface shell completions have been applied to Zsh configuration file at ${v(t)}. Please restart your terminal or run ${S(`source ${t}`)} for the changes to take effect.`)}else l(` ------------------------------------------------- `),l(``),l(`### Begin - Command Line Interface Zsh Completions ###`),l(``),T.split(`
3
- `).map(e=>l(e)),l(``),l(`### End - Command Line Interface Zsh Completions ###`),l(``),l(` ------------------------------------------------- `),l(``),y(`To enable these completions, perform one of the following actions:
1
+ import{$ as e,A as t,D as n,E as r,F as i,G as a,J as o,L as s,N as c,O as l,R as u,U as d,V as f,W as p,Y as m,Z as h,a as g,b as _,et as v,f as y,g as b,o as x,q as S,r as C,t as w,v as T,z as E}from"./prompts-DEjU8qNL.mjs";import{t as D}from"./update-DcBNIEnv.mjs";import{n as O,t as k}from"./shared-R0IeF6M6.mjs";import{t as A}from"./config-BYunqLZD.mjs";import j from"node:os";import{join as M}from"node:path";import{readFile as N,writeFile as P}from"node:fs/promises";async function F(e=500){if(o().get(`banner`)||d(`no-banner`)||d(`hide-banner`)||E)return;o().set(`banner`,!0),i(``),i(x.banner.outline.primary(`┏`)+x.banner.outline.primary(`━`.repeat(6))+` `+t.banner.header.primary(`⬤`)+` `+x.banner.outline.primary(`━`)+` `+g(t.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+x.banner.outline.primary(`━`.repeat(Math.max(s().columns-38,0)))+x.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`█████▄ ▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄`,`██▄▄█▀ ██▀██ ██ ▄ ██ ██▄▄ ██▄█▄ ██ ██ ███▄██ ██▄▄ ███▄▄`,`██ ▀███▀ ▀█▀█▀ ██▄▄▄ ██ ██ ██▄▄▄ ██ ██ ▀██ ██▄▄▄ ▄▄██▀`];r(Math.max(...a.map(e=>n(e).length))>Math.max(s().columns+30,20)?`Powerlines`:`\n${a.join(`
2
+ `)}\n`,Math.max(s().columns-30,20)).forEach(e=>{i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+g(t.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+x.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(`Completions - Zsh Configuration`).length+2))/2),0))+g(t.banner.command.primary(`Completions - Zsh Configuration`))+` `.repeat(Math.max(Math.ceil((s().columns-(n(`Completions - Zsh Configuration`).length+2))/2),0))+x.banner.outline.primary(`┃`),{consoleFn:console.log}),r(g(t.banner.description.primary(`Update the current system's Zsh shell configuration to include completions for the Powerlines command-line interface.`)),Math.max(60>s().columns/2?s().columns-6:s().columns-30,20)).forEach(e=>{i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+t.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+x.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(x.banner.outline.primary(`┃`)+` `.repeat(Math.max(s().columns-2,0))+x.banner.outline.primary(`┃`),{consoleFn:console.log}),i(x.banner.outline.primary(`┗`)+x.banner.outline.primary(`━`.repeat(Math.max(s().columns-35,0)))+` `+g(t.banner.footer.primary(`https://stormsoftware.com`))+` `+x.banner.outline.primary(`━`.repeat(6))+x.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),u&&!p()&&await f(e)}async function I(e={},t=`~/.zshrc`){if(e.display!==!0){let e=t.includes(`.`)?t:M(t,`.zshrc`);e.startsWith(`~`)&&(e=M(j.homedir(),e.replace(`~`,``)));let n=``;try{n=await N(e,`utf8`)}catch(t){if(typeof t==`object`&&t&&`code`in t&&t.code===`ENOENT`)c(`Configuration file ${g(e)} does not exist. It will be created when the completion script is written.`);else return{error:t}}await P(e,`${n}\n\n### Begin - Powerlines Shell Completions ###\n\n${k} \n\n### End - Powerlines Zsh Completions ###`),l(`Powerlines shell completions have been applied to Zsh configuration file at ${g(e)}. Please restart your terminal or run ${T(`source ${e}`)} for the changes to take effect.`)}else i(` ------------------------------------------------- `),i(``),i(`### Begin - Powerlines Zsh Completions ###`),i(``),O.split(`
3
+ `).map(e=>i(e)),i(``),i(`### End - Powerlines Zsh Completions ###`),i(``),i(` ------------------------------------------------- `),i(``),b(`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 P(e=a()){let t={...h()};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 await M(),await w(),l(``),(_||g||s.LOG_LEVEL===`debug`)&&(l(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`)),l(``),x(`Command path: completions / zsh / config
7
-
8
- Options:
9
- `)),t.help?D():c(`completions/zsh/config`,[`completions`,`zsh`,`config`],[],N)}export{P as handler};
6
+ 2) Save the above script to a file and source it from your shell configuration file `)}async function L(n=a()){let r={...S(),display:!0};for(let e=0;e<n.slice(0).length;e++){let t=n[e].length>3&&n[e].startsWith(`--`)?`--${n[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:n[e].length>2&&n[e].startsWith(`-`)?`-${n[e].slice(1).replaceAll(`-`,``)}`:n[e];if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`)if(/^--?(display)=/.test(`-`+t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=t.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();r.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 r.display=!0}let o=Math.max(0,n.slice(4).findIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,s=o>4?4:Math.max(0,n.slice(o).findLastIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,c=`~/.zshrc`;if(s+0<n.length&&s+0!==o&&(c=n[s+0]),await F(),await D(),p()||(i(``),(v||e||h.LOG_LEVEL===`debug`)&&i(t.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!u)c||[].push(`Missing required "path" positional argument`);else if(!p()&&c===void 0){if(i(``),!c){let e=await C({message:`Please provide a value for the ${_(`path`)} argument`,description:`An argument that allows the user to specify a custom Path s...`,validate(e){return!e||e.trim()===``?`A value must be provided for this argument`:null}});if(w(e))return;c=e}i(``);let e=[];c||e.push(`Missing required "path" positional argument`),e.length>0&&(y(`The following validation failures were found while processing the user provided input, and must be corrected before the ${_(`Completions - Zsh Configuration`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
7
+ `)}`),r.help=!0)}return r.help?A():m(`completions/zsh/config`,[`completions`,`zsh`,`config`],[r,c],I)}export{L as handler};
@@ -1,9 +1,7 @@
1
- import{B as e,E as t,F as n,G as r,H as i,I as a,J as o,K as s,M as c,O as l,P as u,R as d,T as f,V as p,W as m,X as h,Z as g,a as _,g as v,o as y,u as b,w as x}from"./prompts-BnlPjHFR.mjs";import{t as S}from"./upgrade-yP6Jdrm0.mjs";import{t as C}from"./script-DGDOPq0P.mjs";import{n as w,t as T}from"./shared-CLQvIZ7z.mjs";import{writeFile as E}from"node:fs/promises";async function D(t=500){if(r().get(`banner`)||e(`no-banner`)||e(`hide-banner`)||a)return;r().set(`banner`,!0),c(``),c(y.banner.outline.primary(`┏`)+y.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+y.banner.outline.primary(`━`)+` `+_(l.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+y.banner.outline.primary(`━`.repeat(Math.max(u().columns-38,0)))+y.banner.outline.primary(`┓`),{consoleFn:console.log});let i=[`Command-Line Interface`];x(Math.max(...i.map(e=>f(e).length))>Math.max(u().columns+30,20)?``:`\n${i.join(`
2
- `)}\n`,Math.max(u().columns-30,20)).forEach(e=>{c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((u().columns-(f(e).length+2))/2),0))+_(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((u().columns-(f(e).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log})}),c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((u().columns-(f(`Completions - Zsh Script`).length+2))/2),0))+_(l.banner.command.primary(`Completions - Zsh Script`))+` `.repeat(Math.max(Math.ceil((u().columns-(f(`Completions - Zsh Script`).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log}),x(_(l.banner.description.primary(`Generate a Zsh completion script for the command-line interface.`)),Math.max(60>u().columns/2?u().columns-6:u().columns-30,20)).forEach(e=>{c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((u().columns-(f(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((u().columns-(f(e).length+2))/2),0))+y.banner.outline.primary(`┃`),{consoleFn:console.log})}),c(y.banner.outline.primary(`┃`)+` `.repeat(Math.max(u().columns-2,0))+y.banner.outline.primary(`┃`),{consoleFn:console.log}),c(y.banner.outline.primary(`┗`)+y.banner.outline.primary(`━`.repeat(Math.max(u().columns-35,0)))+` `+_(l.banner.footer.primary(`https://stormsoftware.com`))+` `+y.banner.outline.primary(`━`.repeat(6))+y.banner.outline.primary(`┛`),{consoleFn:console.log}),c(``),n&&!p()&&await d(t)}async function O(e={},n=`cli-completions.zsh`){if(e.display!==!0){let e=n.includes(`.`)?`${n}.zsh`:n;await E(e,`# Zsh script to add completions for Command Line Interface\n\n${T}`),t(`Command Line Interface Zsh completion script has been generated at ${_(e)}.`)}else c(` ------------------------------------------------- `),c(``),c(`#compdef cli `),c(`#compdef _cli cli`),c(``),c(`# Zsh completion for Command Line Interface`),c(``),w.split(`
3
- `).map(e=>c(e)),c(``),c(` ------------------------------------------------- `),c(``),v(`To enable these completions, perform one of the following actions:
1
+ import{$ as e,A as t,D as n,E as r,F as i,G as a,J as o,L as s,O as c,R as l,U as u,V as d,W as f,Y as p,Z as m,a as h,b as g,et as _,f as v,g as y,o as b,q as x,r as S,t as C,z as w}from"./prompts-DEjU8qNL.mjs";import{t as T}from"./update-DcBNIEnv.mjs";import{t as E}from"./script-CXB3vetH.mjs";import{n as D,t as O}from"./shared-R0IeF6M6.mjs";import{writeFile as k}from"node:fs/promises";async function A(e=500){if(o().get(`banner`)||u(`no-banner`)||u(`hide-banner`)||w)return;o().set(`banner`,!0),i(``),i(b.banner.outline.primary(`┏`)+b.banner.outline.primary(`━`.repeat(6))+` `+t.banner.header.primary(`⬤`)+` `+b.banner.outline.primary(`━`)+` `+h(t.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+b.banner.outline.primary(`━`.repeat(Math.max(s().columns-38,0)))+b.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`█████▄ ▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄`,`██▄▄█▀ ██▀██ ██ ▄ ██ ██▄▄ ██▄█▄ ██ ██ ███▄██ ██▄▄ ███▄▄`,`██ ▀███▀ ▀█▀█▀ ██▄▄▄ ██ ██ ██▄▄▄ ██ ██ ▀██ ██▄▄▄ ▄▄██▀`];r(Math.max(...a.map(e=>n(e).length))>Math.max(s().columns+30,20)?`Powerlines`:`\n${a.join(`
2
+ `)}\n`,Math.max(s().columns-30,20)).forEach(e=>{i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+h(t.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(`Completions - Zsh Script`).length+2))/2),0))+h(t.banner.command.primary(`Completions - Zsh Script`))+` `.repeat(Math.max(Math.ceil((s().columns-(n(`Completions - Zsh Script`).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),r(h(t.banner.description.primary(`Generate a Zsh completion script for the Powerlines command-line interface.`)),Math.max(60>s().columns/2?s().columns-6:s().columns-30,20)).forEach(e=>{i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+t.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+b.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(b.banner.outline.primary(`┃`)+` `.repeat(Math.max(s().columns-2,0))+b.banner.outline.primary(`┃`),{consoleFn:console.log}),i(b.banner.outline.primary(`┗`)+b.banner.outline.primary(`━`.repeat(Math.max(s().columns-35,0)))+` `+h(t.banner.footer.primary(`https://stormsoftware.com`))+` `+b.banner.outline.primary(`━`.repeat(6))+b.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),l&&!f()&&await d(e)}async function j(e={},t=`powerlines-completions.zsh`){if(e.display!==!0){let e=t.includes(`.`)?`${t}.zsh`:t;await k(e,`# Zsh script to add completions for Powerlines\n\n${O}`),c(`Powerlines Zsh completion script has been generated at ${h(e)}.`)}else i(` ------------------------------------------------- `),i(``),i(`#compdef powerlines `),i(`#compdef _powerlines powerlines`),i(``),i(`# Zsh completion for Powerlines`),i(``),D.split(`
3
+ `).map(e=>i(e)),i(``),i(` ------------------------------------------------- `),i(``),y(`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 k(e=i()){let t={...m()};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 await D(),await S(),c(``),(g||h||o.LOG_LEVEL===`debug`)&&(c(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`)),c(``),b(`Command path: completions / zsh / script
7
-
8
- Options:
9
- `)),t.help?C():s(`completions/zsh/script`,[`completions`,`zsh`,`script`],[],O)}export{k as handler};
6
+ 2) Save the above script to a file and source it from your shell configuration file `)}async function M(n=a()){let r={...x(),display:!0};for(let e=0;e<n.slice(0).length;e++){let t=n[e].length>3&&n[e].startsWith(`--`)?`--${n[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:n[e].length>2&&n[e].startsWith(`-`)?`-${n[e].slice(1).replaceAll(`-`,``)}`:n[e];if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`)if(/^--?(display)=/.test(`-`+t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=t.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();r.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 r.display=!0}let o=Math.max(0,n.slice(4).findIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,s=o>4?4:Math.max(0,n.slice(o).findLastIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,c=`powerlines-completions.zsh`;if(s+0<n.length&&s+0!==o&&(c=n[s+0]),await A(),await T(),f()||(i(``),(_||e||m.LOG_LEVEL===`debug`)&&i(t.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!l)c||[].push(`Missing required "path" positional argument`);else if(!f()&&c===void 0){if(i(``),!c){let e=await S({message:`Please provide a value for the ${g(`path`)} argument`,description:`An argument that allows the user to specify a custom Path s...`,validate(e){return!e||e.trim()===``?`A value must be provided for this argument`:null}});if(C(e))return;c=e}i(``);let e=[];c||e.push(`Missing required "path" positional argument`),e.length>0&&(v(`The following validation failures were found while processing the user provided input, and must be corrected before the ${g(`Completions - Zsh Script`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
7
+ `)}`),r.help=!0)}return r.help?E():p(`completions/zsh/script`,[`completions`,`zsh`,`script`],[r,c],j)}export{M as handler};
@@ -0,0 +1 @@
1
+ import{A as e,F as t,a as n,k as r,x as i,y as a}from"./prompts-DEjU8qNL.mjs";function o(){t(`${n(e.heading.secondary(`Tags: `))} ${e.tags.utility?e.tags.utility(a(` Utility `)):e.tags.$default(a(` Utility `))}`,{padding:0}),t(``),t(n(e.heading.secondary(`Usage:`))),t(e.body.secondary(`${e.usage.bin(`>_ powerlines`)} ${e.usage.command(`completions`)} ${e.usage.command(`fish`)} ${e.usage.command(`config`)} ${e.usage.args(`<path>`)} ${e.usage.options(`[options]`)}`),{padding:0}),t(e.body.secondary(`${e.usage.bin(`>_ powerlines`)} ${e.usage.command(`completions`)} ${e.usage.command(`fish`)} ${e.usage.command(`config`)} ${e.usage.options(`[options]`)} ${e.usage.args(`<path>`)}`),{padding:0}),t(``),t(n(e.heading.secondary(`Options:`))),r([[{value:e.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force colored terminal output (env: POWERLINES_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--display`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Should the generated completion script be written to console output instead of an actual file on disk? (default: true).`),align:`left`,border:`none`}],[{value:e.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: POWERLINES_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.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: POWERLINES_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable verbose output (env: POWERLINES_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: POWERLINES_YES, default: false).`),align:`left`,border:`none`}]]),t(``),t(e.body.tertiary(`More information can be found in the Completions - Fish Configuration command documentation at ${i(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/completions/fish/config`)}${e.body.tertiary(`.`)}`),{padding:0}),t(``)}export{o as t};
@@ -0,0 +1 @@
1
+ import{A as e,F as t,a as n,k as r,x as i,y as a}from"./prompts-DEjU8qNL.mjs";function o(){t(`${n(e.heading.secondary(`Tags: `))} ${e.tags.utility?e.tags.utility(a(` Utility `)):e.tags.$default(a(` Utility `))}`,{padding:0}),t(``),t(n(e.heading.secondary(`Usage:`))),t(e.body.secondary(`${e.usage.bin(`>_ powerlines`)} ${e.usage.command(`completions`)} ${e.usage.command(`zsh`)} ${e.usage.command(`config`)} ${e.usage.args(`<path>`)} ${e.usage.options(`[options]`)}`),{padding:0}),t(e.body.secondary(`${e.usage.bin(`>_ powerlines`)} ${e.usage.command(`completions`)} ${e.usage.command(`zsh`)} ${e.usage.command(`config`)} ${e.usage.options(`[options]`)} ${e.usage.args(`<path>`)}`),{padding:0}),t(``),t(n(e.heading.secondary(`Options:`))),r([[{value:e.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force colored terminal output (env: POWERLINES_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--display`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Should the generated completion script be written to console output instead of an actual file on disk? (default: true).`),align:`left`,border:`none`}],[{value:e.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: POWERLINES_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.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: POWERLINES_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable verbose output (env: POWERLINES_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: POWERLINES_YES, default: false).`),align:`left`,border:`none`}]]),t(``),t(e.body.tertiary(`More information can be found in the Completions - Zsh Configuration command documentation at ${i(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/completions/zsh/config`)}${e.body.tertiary(`.`)}`),{padding:0}),t(``)}export{o as t};
@@ -0,0 +1 @@
1
+ import{A as e,F as t,a as n,k as r,x as i,y as a}from"./prompts-DEjU8qNL.mjs";function o(){t(`${n(e.heading.secondary(`Tags: `))} ${e.tags.utility?e.tags.utility(a(` Utility `)):e.tags.$default(a(` Utility `))}`,{padding:0}),t(``),t(n(e.heading.secondary(`Usage:`))),t(e.body.secondary(`${e.usage.bin(`>_ powerlines`)} ${e.usage.command(`completions`)} ${e.usage.command(`powershell`)} ${e.usage.command(`config`)} ${e.usage.args(`<path>`)} ${e.usage.options(`[options]`)}`),{padding:0}),t(e.body.secondary(`${e.usage.bin(`>_ powerlines`)} ${e.usage.command(`completions`)} ${e.usage.command(`powershell`)} ${e.usage.command(`config`)} ${e.usage.options(`[options]`)} ${e.usage.args(`<path>`)}`),{padding:0}),t(``),t(n(e.heading.secondary(`Options:`))),r([[{value:e.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force colored terminal output (env: POWERLINES_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--display`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Should the generated completion script be written to console output instead of an actual file on disk? (default: true).`),align:`left`,border:`none`}],[{value:e.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: POWERLINES_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.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: POWERLINES_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable verbose output (env: POWERLINES_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: POWERLINES_YES, default: false).`),align:`left`,border:`none`}]]),t(``),t(e.body.tertiary(`More information can be found in the Completions - PowerShell Configuration command documentation at ${i(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/completions/powershell/config`)}${e.body.tertiary(`.`)}`),{padding:0}),t(``)}export{o as t};
@@ -0,0 +1 @@
1
+ import{A as e,F as t,a as n,k as r,x as i,y as a}from"./prompts-DEjU8qNL.mjs";function o(){t(`${n(e.heading.secondary(`Tags: `))} ${e.tags.utility?e.tags.utility(a(` Utility `)):e.tags.$default(a(` Utility `))}`,{padding:0}),t(``),t(n(e.heading.secondary(`Usage:`))),t(e.body.secondary(`${e.usage.bin(`>_ powerlines`)} ${e.usage.command(`completions`)} ${e.usage.command(`bash`)} ${e.usage.command(`config`)} ${e.usage.args(`<path>`)} ${e.usage.options(`[options]`)}`),{padding:0}),t(e.body.secondary(`${e.usage.bin(`>_ powerlines`)} ${e.usage.command(`completions`)} ${e.usage.command(`bash`)} ${e.usage.command(`config`)} ${e.usage.options(`[options]`)} ${e.usage.args(`<path>`)}`),{padding:0}),t(``),t(n(e.heading.secondary(`Options:`))),r([[{value:e.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force colored terminal output (env: POWERLINES_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--display`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Should the generated completion script be written to console output instead of an actual file on disk? (default: true).`),align:`left`,border:`none`}],[{value:e.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: POWERLINES_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.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: POWERLINES_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable verbose output (env: POWERLINES_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: POWERLINES_YES, default: false).`),align:`left`,border:`none`}]]),t(``),t(e.body.tertiary(`More information can be found in the Completions - Bash Configuration command documentation at ${i(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/completions/bash/config`)}${e.body.tertiary(`.`)}`),{padding:0}),t(``)}export{o as t};
@@ -0,0 +1 @@
1
+ import{A as e,F as t,a as n,k as r,x as i}from"./prompts-DEjU8qNL.mjs";function a(){t(``),t(n(e.heading.secondary(`Usage:`))),t(e.body.secondary(`${e.usage.bin(`>_ powerlines`)} ${e.usage.command(`create`)} ${e.usage.options(`[options]`)}`),{padding:0}),t(``),t(n(e.heading.secondary(`Options:`))),r([[{value:e.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force colored terminal output (env: POWERLINES_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: POWERLINES_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.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: POWERLINES_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--root <root>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`The root directory of the project to create.`),align:`left`,border:`none`}],[{value:e.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable verbose output (env: POWERLINES_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: POWERLINES_YES, default: false).`),align:`left`,border:`none`}]]),t(``),t(e.body.tertiary(`More information can be found in the Create Project command documentation at ${i(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/create`)}${e.body.tertiary(`.`)}`),{padding:0}),t(``)}export{a as t};
package/bin/create.mjs CHANGED
@@ -1,5 +1,3 @@
1
- import{B as e,F as t,G as n,H as r,I as i,J as a,K as o,M as s,O as c,P as l,R as u,T as d,V as f,W as p,X as m,Z as h,a as g,o as _,u as v,w as y}from"./prompts-BnlPjHFR.mjs";import{t as b}from"./upgrade-yP6Jdrm0.mjs";import{t as x}from"./create-powerlines-DvusHjN3.mjs";import{t as S}from"./create-DYKxyvzg.mjs";async function C(r=500){if(n().get(`banner`)||e(`no-banner`)||e(`hide-banner`)||i)return;n().set(`banner`,!0),s(``),s(_.banner.outline.primary(`┏`)+_.banner.outline.primary(`━`.repeat(6))+` `+c.banner.header.primary(`⬤`)+` `+_.banner.outline.primary(`━`)+` `+g(c.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+_.banner.outline.primary(`━`.repeat(Math.max(l().columns-38,0)))+_.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`Command-Line Interface`];y(Math.max(...a.map(e=>d(e).length))>Math.max(l().columns+30,20)?``:`\n${a.join(`
2
- `)}\n`,Math.max(l().columns-30,20)).forEach(e=>{s(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((l().columns-(d(e).length+2))/2),0))+g(c.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((l().columns-(d(e).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log})}),s(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((l().columns-(d(`Create Project`).length+2))/2),0))+g(c.banner.command.primary(`Create Project`))+` `.repeat(Math.max(Math.ceil((l().columns-(d(`Create Project`).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log}),y(g(c.banner.description.primary(`Create a new Powerlines project.`)),Math.max(60>l().columns/2?l().columns-6:l().columns-30,20)).forEach(e=>{s(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((l().columns-(d(e).length+2))/2),0))+c.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((l().columns-(d(e).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log})}),s(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(l().columns-2,0))+_.banner.outline.primary(`┃`),{consoleFn:console.log}),s(_.banner.outline.primary(`┗`)+_.banner.outline.primary(`━`.repeat(Math.max(l().columns-35,0)))+` `+g(c.banner.footer.primary(`https://stormsoftware.com`))+` `+_.banner.outline.primary(`━`.repeat(6))+_.banner.outline.primary(`┛`),{consoleFn:console.log}),s(``),t&&!f()&&await u(r)}async function w(e){await(await x(e)).create(e)}async function T(e=r()){let t={...p()};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 await C(),await b(),s(``),(h||m||a.LOG_LEVEL===`debug`)&&(s(c.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`)),s(``),v(`Command path: create
3
-
4
- Options:
5
- `)),t.help?S():o(`create`,[`create`],[],w)}export{T as handler};
1
+ import{$ as e,A as t,D as n,E as r,F as i,G as a,J as o,L as s,R as c,U as l,V as u,W as d,Y as f,Z as p,a as m,b as h,et as g,f as _,o as v,q as y,r as b,t as x,z as S}from"./prompts-DEjU8qNL.mjs";import{t as C}from"./update-DcBNIEnv.mjs";import{t as w}from"./create-powerlines-DvusHjN3.mjs";import{t as T}from"./create-BoPKM4sQ.mjs";async function E(e=500){if(o().get(`banner`)||l(`no-banner`)||l(`hide-banner`)||S)return;o().set(`banner`,!0),i(``),i(v.banner.outline.primary(`┏`)+v.banner.outline.primary(`━`.repeat(6))+` `+t.banner.header.primary(`⬤`)+` `+v.banner.outline.primary(`━`)+` `+m(t.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+v.banner.outline.primary(`━`.repeat(Math.max(s().columns-38,0)))+v.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`█████▄ ▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄`,`██▄▄█▀ ██▀██ ██ ▄ ██ ██▄▄ ██▄█▄ ██ ██ ███▄██ ██▄▄ ███▄▄`,`██ ▀███▀ ▀█▀█▀ ██▄▄▄ ██ ██ ██▄▄▄ ██ ██ ▀██ ██▄▄▄ ▄▄██▀`];r(Math.max(...a.map(e=>n(e).length))>Math.max(s().columns+30,20)?`Powerlines`:`\n${a.join(`
2
+ `)}\n`,Math.max(s().columns-30,20)).forEach(e=>{i(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+m(t.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(`Create Project`).length+2))/2),0))+m(t.banner.command.primary(`Create Project`))+` `.repeat(Math.max(Math.ceil((s().columns-(n(`Create Project`).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log}),r(m(t.banner.description.primary(`Create a new Powerlines project.`)),Math.max(60>s().columns/2?s().columns-6:s().columns-30,20)).forEach(e=>{i(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+t.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(s().columns-2,0))+v.banner.outline.primary(`┃`),{consoleFn:console.log}),i(v.banner.outline.primary(`┗`)+v.banner.outline.primary(`━`.repeat(Math.max(s().columns-35,0)))+` `+m(t.banner.footer.primary(`https://stormsoftware.com`))+` `+v.banner.outline.primary(`━`.repeat(6))+v.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),c&&!d()&&await u(e)}async function D(e){await(await w(e)).create(e)}async function O(n=a()){let r={...y()};for(let e=0;e<n.slice(0).length;e++){let t=n[e].length>3&&n[e].startsWith(`--`)?`--${n[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:n[e].length>2&&n[e].startsWith(`-`)?`-${n[e].slice(1).replaceAll(`-`,``)}`:n[e];(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`root=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`root`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`root=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`root`)&&(/^--?(root)=/.test(`-`+t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?r.root=t.replace(/^--?(root)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):n.length>e+1&&(r.root=n[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}if(await E(),await C(),d()||(i(``),(g||e||p.LOG_LEVEL===`debug`)&&i(t.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!c)r.root||[].push(`Missing required "root" option`);else if(!d()&&r.root===void 0){if(i(``),!r.root){let e=await b({message:`Please provide a value for the ${h(`root`)} option`,description:`The root directory of the project to create. Defaults to the current working directory if not specified.`,validate(e){return!e||e.trim()===``?`A value must be provided for this option`:null}});if(x(e))return;r.root=e}i(``);let e=[];r.root||e.push(`Missing required "root" option`),e.length>0&&(_(`The following validation failures were found while processing the user provided input, and must be corrected before the ${h(`Create Project`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
3
+ `)}`),r.help=!0)}return r.help?T():f(`create`,[`create`],[r],D)}export{O as handler};
@@ -0,0 +1 @@
1
+ import{A as e,F as t,a as n,k as r,x as i}from"./prompts-DEjU8qNL.mjs";function a(){t(``),t(n(e.heading.secondary(`Usage:`))),t(e.body.secondary(`${e.usage.bin(`>_ powerlines`)} ${e.usage.command(`deploy`)} ${e.usage.options(`[options]`)}`),{padding:0}),t(e.body.secondary(`${e.usage.bin(`>_ powerlines`)} ${e.usage.command(`deployment`)} ${e.usage.options(`[options]`)}`),{padding:0}),t(``),t(n(e.heading.secondary(`Options:`))),r([[{value:e.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force colored terminal output (env: POWERLINES_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: POWERLINES_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.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: POWERLINES_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--root <root>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`The root directory of the project to deploy.`),align:`left`,border:`none`}],[{value:e.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable verbose output (env: POWERLINES_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: POWERLINES_YES, default: false).`),align:`left`,border:`none`}]]),t(``),t(e.body.tertiary(`More information can be found in the Deploy command documentation at ${i(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/deploy`)}${e.body.tertiary(`.`)}`),{padding:0}),t(``)}export{a as t};
package/bin/deploy.mjs CHANGED
@@ -1,5 +1,2 @@
1
- import{B as e,F as t,G as n,H as r,I as i,J as a,K as o,M as s,O as c,P as l,R as u,T as d,V as f,W as p,X as m,Z as h,a as g,o as _,u as v,w as y}from"./prompts-BnlPjHFR.mjs";import{t as b}from"./upgrade-yP6Jdrm0.mjs";import{t as x}from"./create-powerlines-DvusHjN3.mjs";import{t as S}from"./deploy-BMhOgvx4.mjs";async function C(r=500){if(n().get(`banner`)||e(`no-banner`)||e(`hide-banner`)||i)return;n().set(`banner`,!0),s(``),s(_.banner.outline.primary(`┏`)+_.banner.outline.primary(`━`.repeat(6))+` `+c.banner.header.primary(`⬤`)+` `+_.banner.outline.primary(`━`)+` `+g(c.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+_.banner.outline.primary(`━`.repeat(Math.max(l().columns-38,0)))+_.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`Command-Line Interface`];y(Math.max(...a.map(e=>d(e).length))>Math.max(l().columns+30,20)?``:`\n${a.join(`
2
- `)}\n`,Math.max(l().columns-30,20)).forEach(e=>{s(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((l().columns-(d(e).length+2))/2),0))+g(c.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((l().columns-(d(e).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log})}),s(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((l().columns-(d(`Deploy`).length+2))/2),0))+g(c.banner.command.primary(`Deploy`))+` `.repeat(Math.max(Math.ceil((l().columns-(d(`Deploy`).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log}),y(g(c.banner.description.primary(`Deploys the project and its generated assets/artifacts.`)),Math.max(60>l().columns/2?l().columns-6:l().columns-30,20)).forEach(e=>{s(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((l().columns-(d(e).length+2))/2),0))+c.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((l().columns-(d(e).length+2))/2),0))+_.banner.outline.primary(`┃`),{consoleFn:console.log})}),s(_.banner.outline.primary(`┃`)+` `.repeat(Math.max(l().columns-2,0))+_.banner.outline.primary(`┃`),{consoleFn:console.log}),s(_.banner.outline.primary(`┗`)+_.banner.outline.primary(`━`.repeat(Math.max(l().columns-35,0)))+` `+g(c.banner.footer.primary(`https://stormsoftware.com`))+` `+_.banner.outline.primary(`━`.repeat(6))+_.banner.outline.primary(`┛`),{consoleFn:console.log}),s(``),t&&!f()&&await u(r)}async function w(e){await(await x(e)).deploy(e)}async function T(e=r()){let t={...p()};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 await C(),await b(),s(``),(h||m||a.LOG_LEVEL===`debug`)&&(s(c.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`)),s(``),v(`Command path: deploy
3
-
4
- Options:
5
- `)),t.help?S():o(`deploy`,[`deploy`],[],w)}export{T as handler};
1
+ import{$ as e,A as t,D as n,E as r,F as i,G as a,J as o,L as s,R as c,U as l,V as u,W as d,Y as f,Z as p,a as m,et as h,o as g,q as _,z as v}from"./prompts-DEjU8qNL.mjs";import{t as y}from"./update-DcBNIEnv.mjs";import{t as b}from"./create-powerlines-DvusHjN3.mjs";import{t as x}from"./deploy-Dpv_gBUF.mjs";async function S(e=500){if(o().get(`banner`)||l(`no-banner`)||l(`hide-banner`)||v)return;o().set(`banner`,!0),i(``),i(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+t.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+m(t.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(s().columns-38,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`█████▄ ▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄`,`██▄▄█▀ ██▀██ ██ ▄ ██ ██▄▄ ██▄█▄ ██ ██ ███▄██ ██▄▄ ███▄▄`,`██ ▀███▀ ▀█▀█▀ ██▄▄▄ ██ ██ ██▄▄▄ ██ ██ ▀██ ██▄▄▄ ▄▄██▀`];r(Math.max(...a.map(e=>n(e).length))>Math.max(s().columns+30,20)?`Powerlines`:`\n${a.join(`
2
+ `)}\n`,Math.max(s().columns-30,20)).forEach(e=>{i(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+m(t.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(`Deploy`).length+2))/2),0))+m(t.banner.command.primary(`Deploy`))+` `.repeat(Math.max(Math.ceil((s().columns-(n(`Deploy`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),r(m(t.banner.description.primary(`Deploys the project and its generated assets/artifacts.`)),Math.max(60>s().columns/2?s().columns-6:s().columns-30,20)).forEach(e=>{i(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((s().columns-(n(e).length+2))/2),0))+t.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((s().columns-(n(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(s().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),i(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(s().columns-35,0)))+` `+m(t.banner.footer.primary(`https://stormsoftware.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),c&&!d()&&await u(e)}async function C(e){await(await b(e)).deploy(e)}async function w(n=a()){let r={..._()};for(let e=0;e<n.slice(0).length;e++){let t=n[e].length>3&&n[e].startsWith(`--`)?`--${n[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:n[e].length>2&&n[e].startsWith(`-`)?`-${n[e].slice(1).replaceAll(`-`,``)}`:n[e];(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`root=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`root`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`root=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`root`)&&(/^--?(root)=/.test(`-`+t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?r.root=t.replace(/^--?(root)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):n.length>e+1&&(r.root=n[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}return await S(),await y(),d()||(i(``),(h||e||p.LOG_LEVEL===`debug`)&&i(t.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),r.help?x():f(`deploy`,[`deploy`],[r],C)}export{w as handler};
@@ -0,0 +1 @@
1
+ import{A as e,F as t,a as n,k as r,x as i}from"./prompts-DEjU8qNL.mjs";function a(){t(``),t(n(e.heading.secondary(`Usage:`))),t(e.body.secondary(`${e.usage.bin(`>_ powerlines`)} ${e.usage.command(`docs`)} ${e.usage.options(`[options]`)}`),{padding:0}),t(``),t(n(e.heading.secondary(`Options:`))),r([[{value:e.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force colored terminal output (env: POWERLINES_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: POWERLINES_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.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: POWERLINES_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: POWERLINES_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`--root <root>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`The root directory of the project to generate documentation for.`),align:`left`,border:`none`}],[{value:e.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Enable verbose output (env: POWERLINES_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:e.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:e.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: POWERLINES_YES, default: false).`),align:`left`,border:`none`}]]),t(``),t(e.body.tertiary(`More information can be found in the Generate Documentation command documentation at ${i(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/docs`)}${e.body.tertiary(`.`)}`),{padding:0}),t(``)}export{a as t};