powerlines 0.47.138 → 0.47.139
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/bin.mjs +2 -2
- package/bin/{build-BLdt_Shh.mjs → build-CAoyovYp.mjs} +1 -1
- package/bin/build.mjs +1 -1
- package/bin/{changelog-XNv9Llxe.mjs → changelog-CuRlydrC.mjs} +1 -1
- package/bin/changelog.mjs +1 -1
- package/bin/{clean-BEzBCl_2.mjs → clean-DnU9yacU.mjs} +1 -1
- package/bin/clean.mjs +1 -1
- package/bin/completions-bash-config.mjs +1 -1
- package/bin/completions-bash-script.mjs +1 -1
- package/bin/completions-fish-config.mjs +1 -1
- package/bin/completions-fish-script.mjs +1 -1
- package/bin/completions-powershell-config.mjs +1 -1
- package/bin/completions-powershell-script.mjs +1 -1
- package/bin/completions-zsh-config.mjs +3 -3
- package/bin/completions-zsh-script.mjs +3 -3
- package/bin/{config-ICibRthC.mjs → config-BviB4q0i.mjs} +1 -1
- package/bin/{config-Ir-i-MZh.mjs → config-CCtmurY_.mjs} +1 -1
- package/bin/{config-qvHsGGlr.mjs → config-D081RTl3.mjs} +1 -1
- package/bin/{config-C6-iNi2n.mjs → config-DNspZ1fX.mjs} +1 -1
- package/bin/{create-Be2xKypU.mjs → create-CchW-TwN.mjs} +1 -1
- package/bin/create.mjs +1 -1
- package/bin/{deploy-CekV3wjD.mjs → deploy-7qpJGrFI.mjs} +1 -1
- package/bin/deploy.mjs +1 -1
- package/bin/{docs-CcKeiymm.mjs → docs-CMYq7TR4.mjs} +1 -1
- package/bin/docs.mjs +1 -1
- package/bin/{gc-DMgWLP5G.mjs → gc-BfrUs8t4.mjs} +1 -1
- package/bin/gc.mjs +1 -1
- package/bin/help.mjs +2 -2
- package/bin/{lint-C2k93juO.mjs → lint-D89vp8Cr.mjs} +1 -1
- package/bin/lint.mjs +1 -1
- package/bin/{prepare-D19-TfrB.mjs → prepare-CHpl-gcc.mjs} +1 -1
- package/bin/prepare.mjs +1 -1
- package/bin/{prompts-DvtAxZew.mjs → prompts-D2lN84PY.mjs} +1 -1
- package/bin/{script-CMKR9VRw.mjs → script-CAFoODHg.mjs} +1 -1
- package/bin/{script-BNiC787q.mjs → script-Dhmoxqaf.mjs} +1 -1
- package/bin/{script-OyjVcAK_.mjs → script-eUDz8YBn.mjs} +1 -1
- package/bin/{script-C1h3v8vO.mjs → script-oBAkmWqR.mjs} +1 -1
- package/bin/{shared-URpmZl9S.mjs → shared-C2eu-H2W.mjs} +1 -1
- package/bin/{shared-BNLlhubi.mjs → shared-CqUWiMGM.mjs} +1 -1
- package/bin/{shared-DXsPPZnz.mjs → shared-D5FKeI-E.mjs} +1 -1
- package/bin/{shared-hGgwnmxQ.mjs → shared-nuR01v5A.mjs} +1 -1
- package/bin/{types-CfKGDfUq.mjs → types-Cos-hD27.mjs} +1 -1
- package/bin/types.mjs +1 -1
- package/bin/{update-B_hlyP9Z.mjs → update-BCnYZE7Z.mjs} +1 -1
- package/bin/{update-DPMBKpJ6.mjs → update-DDWHXu_S.mjs} +1 -1
- package/bin/update.mjs +1 -1
- package/bin/{zsh-C-L_3JkP.mjs → zsh-D4vduhpt.mjs} +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.mjs +1 -1
- package/package.json +3 -3
package/bin/docs.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as e,B as t,G as n,K as r,L as i,M as a,O as o,U as s,V as c,X as l,Y as u,Z as d,a as f,c as p,k as m,nt as h,q as g,s as _,tt as v,z as y}from"./prompts-
|
|
1
|
+
import{$ as e,B as t,G as n,K as r,L as i,M as a,O as o,U as s,V as c,X as l,Y as u,Z as d,a as f,c as p,k as m,nt as h,q as g,s as _,tt as v,z as y}from"./prompts-D2lN84PY.mjs";import{t as b}from"./update-BCnYZE7Z.mjs";import{t as x}from"./create-powerlines-DvusHjN3.mjs";import{t as S}from"./docs-CMYq7TR4.mjs";async function C(e=500){l().get(`is-banner-displayed`)||n(`no-banner`)||n(`hide-banner`)||c||(l().set(`is-banner-displayed`,!0),i(``),i(p.banner.outline.primary(`┏`)+p.banner.outline.primary(`━`.repeat(6))+` `+a.banner.header.primary(`⬤`)+` `+p.banner.outline.primary(`━`)+` `+_(a.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+p.banner.outline.primary(`━`.repeat(Math.max(y().columns-38,0)))+p.banner.outline.primary(`┓`),{consoleFn:console.log}),o(Math.max(...f.map(e=>m(e).length))>Math.max(y().columns+30,20)?`Powerlines`:`\n${f.join(`
|
|
2
2
|
`)}\n`,Math.max(y().columns-30,20)).forEach(e=>{i(p.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((y().columns-(m(e).length+2))/2),0))+_(a.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((y().columns-(m(e).length+2))/2),0))+p.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(p.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((y().columns-(m(`Generate Documentation`).length+2))/2),0))+_(a.banner.command.primary(`Generate Documentation`))+` `.repeat(Math.max(Math.ceil((y().columns-(m(`Generate Documentation`).length+2))/2),0))+p.banner.outline.primary(`┃`),{consoleFn:console.log}),o(_(a.banner.description.primary(`Generate documentation for the project's source code.`)),Math.max(60>y().columns/2?y().columns-6:y().columns-30,20)).forEach(e=>{i(p.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((y().columns-(m(e).length+2))/2),0))+a.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((y().columns-(m(e).length+2))/2),0))+p.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(p.banner.outline.primary(`┃`)+` `.repeat(Math.max(y().columns-2,0))+p.banner.outline.primary(`┃`),{consoleFn:console.log}),i(p.banner.outline.primary(`┗`)+p.banner.outline.primary(`━`.repeat(Math.max(y().columns-35,0)))+` `+_(a.banner.footer.primary(`https://stormsoftware.com`))+` `+p.banner.outline.primary(`━`.repeat(6))+p.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),t&&!r()&&await s(e))}async function w(e){await(await x(e)).docs(e)}async function T(t=g()){let n={...u()};for(let e=0;e<t.slice(0).length;e++){let r=t[e].length>3&&t[e].startsWith(`--`)?`--${t[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:t[e].length>2&&t[e].startsWith(`-`)?`-${t[e].slice(1).replaceAll(`-`,``)}`:t[e];(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`root=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`root`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`root=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`root`)&&(/^--?(root)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?n.root=r.replace(/^--?(root)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):t.length>e+1&&(n.root=t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}return await C(),await b(),r()||(i(``),(h||v||e.LOG_LEVEL===`debug`)&&i(a.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),n.help?S():d(`docs`,[`docs`],[n],w)}export{T as handler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,L as t,M as n,j as r,s as i}from"./prompts-
|
|
1
|
+
import{C as e,L as t,M as n,j as r,s as i}from"./prompts-D2lN84PY.mjs";function a(){t(``),t(i(n.heading.secondary(`Usage:`))),t(n.body.secondary(`${n.usage.bin(`>_ powerlines`)} ${n.usage.command(`gc`)} ${n.usage.args(`<data|cache|logs|temp|all>`)} ${n.usage.options(`[options]`)}`),{padding:0}),t(n.body.secondary(`${n.usage.bin(`>_ powerlines`)} ${n.usage.command(`gc`)} ${n.usage.options(`[options]`)} ${n.usage.args(`<data|cache|logs|temp|all>`)}`),{padding:0}),t(n.body.secondary(`${n.usage.bin(`>_ powerlines`)} ${n.usage.command(`garbage-collection`)} ${n.usage.args(`<data|cache|logs|temp|all>`)} ${n.usage.options(`[options]`)}`),{padding:0}),t(n.body.secondary(`${n.usage.bin(`>_ powerlines`)} ${n.usage.command(`garbage-collection`)} ${n.usage.options(`[options]`)} ${n.usage.args(`<data|cache|logs|temp|all>`)}`),{padding:0}),t(``),t(i(n.heading.secondary(`Options:`))),r([[{value:n.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Force colored terminal output (env: POWERLINES_COLOR, default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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:n.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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:n.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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:n.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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:n.body.primary(`--type <data|cache|logs|temp|all>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`The type of environment paths to clean up.`),align:`left`,border:`none`}],[{value:n.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Enable verbose output (env: POWERLINES_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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(n.body.tertiary(`More information can be found in the Garbage Collection command documentation at ${e(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/gc`)}${n.body.tertiary(`.`)}`),{padding:0}),t(``)}export{a as t};
|
package/bin/gc.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{$ as e,B as t,G as n,K as r,L as i,M as a,O as o,S as s,U as c,V as l,X as u,Y as d,Z as f,a as p,c as m,k as h,m as g,n as _,nt as v,q as y,s as b,t as x,tt as S,z as C}from"./prompts-
|
|
1
|
+
import{$ as e,B as t,G as n,K as r,L as i,M as a,O as o,S as s,U as c,V as l,X as u,Y as d,Z as f,a as p,c as m,k as h,m as g,n as _,nt as v,q as y,s as b,t as x,tt as S,z as C}from"./prompts-D2lN84PY.mjs";import{t as w}from"./update-BCnYZE7Z.mjs";import{t as T}from"./create-powerlines-DvusHjN3.mjs";import{t as E}from"./gc-BfrUs8t4.mjs";import{removeDirectory as D}from"@stryke/fs";async function O(e=500){u().get(`is-banner-displayed`)||n(`no-banner`)||n(`hide-banner`)||l||(u().set(`is-banner-displayed`,!0),i(``),i(m.banner.outline.primary(`┏`)+m.banner.outline.primary(`━`.repeat(6))+` `+a.banner.header.primary(`⬤`)+` `+m.banner.outline.primary(`━`)+` `+b(a.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+m.banner.outline.primary(`━`.repeat(Math.max(C().columns-38,0)))+m.banner.outline.primary(`┓`),{consoleFn:console.log}),o(Math.max(...p.map(e=>h(e).length))>Math.max(C().columns+30,20)?`Powerlines`:`\n${p.join(`
|
|
2
2
|
`)}\n`,Math.max(C().columns-30,20)).forEach(e=>{i(m.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((C().columns-(h(e).length+2))/2),0))+b(a.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((C().columns-(h(e).length+2))/2),0))+m.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(m.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((C().columns-(h(`Garbage Collection`).length+2))/2),0))+b(a.banner.command.primary(`Garbage Collection`))+` `.repeat(Math.max(Math.ceil((C().columns-(h(`Garbage Collection`).length+2))/2),0))+m.banner.outline.primary(`┃`),{consoleFn:console.log}),o(b(a.banner.description.primary(`Perform garbage collection to clean up unnecessary system files based on the specified options. This can help free up disk space and improve system performance. Please note: the actual types of environment paths available for cleanup may vary based on the project's configuration and the underlying system's operating system.`)),Math.max(60>C().columns/2?C().columns-6:C().columns-30,20)).forEach(e=>{i(m.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((C().columns-(h(e).length+2))/2),0))+a.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((C().columns-(h(e).length+2))/2),0))+m.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(m.banner.outline.primary(`┃`)+` `.repeat(Math.max(C().columns-2,0))+m.banner.outline.primary(`┃`),{consoleFn:console.log}),i(m.banner.outline.primary(`┗`)+m.banner.outline.primary(`━`.repeat(Math.max(C().columns-35,0)))+` `+b(a.banner.footer.primary(`https://stormsoftware.com`))+` `+m.banner.outline.primary(`━`.repeat(6))+m.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),t&&!r()&&await c(e))}async function k(e={},t=`all`){let n=await T({root:process.cwd(),...e}),r=[];(t===`all`||t===`data`)&&r.push(n.context.envPaths.data),(t===`all`||t===`cache`)&&r.push(n.context.envPaths.cache),(t===`all`||t===`logs`)&&r.push(n.context.envPaths.log),(t===`all`||t===`temp`)&&r.push(n.context.envPaths.temp),await Promise.all(r.map(async e=>{await D(e)}))}async function A(n=y()){let o={...d()};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(`type=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`type`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`type=`)||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`type`)&&(/^--?(type)=/.test(`-`+t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?o.type=t.replace(/^--?(type)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):n.length>e+1&&(o.type=n[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}let c=Math.max(0,n.slice(2).findIndex(e=>e.startsWith(`-`)&&/^(type)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,l=c>2?2:Math.max(0,n.slice(c).findLastIndex(e=>e.startsWith(`-`)&&/^(type)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,u=`all`;if(l+0<n.length&&l+0!==c&&(u=n[l+0]),await O(),await w(),r()||(i(``),(v||S||e.LOG_LEVEL===`debug`)&&i(a.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!t){let e=[];[`data`,`cache`,`logs`,`temp`,`all`].includes(o.type)||e.push(`Invalid value provided for the \"type\" option - valid values include: data, cache, logs, temp, and all; provided: ${o.type}`),u||e.push(`Missing required "type" positional argument`)}else if(!r()&&u===void 0){if(i(``),!u){let e=await _({message:`Please select a value for the ${s(`type`)} argument`,description:`An argument that allows the user to specify a custom Type string value.`,options:[{value:`data`,label:`data`,description:`An argument that allows the user to specify a custom Type s...`},{value:`cache`,label:`cache`,description:`An argument that allows the user to specify a custom Type s...`},{value:`logs`,label:`logs`,description:`An argument that allows the user to specify a custom Type s...`},{value:`temp`,label:`temp`,description:`An argument that allows the user to specify a custom Type s...`},{value:`all`,label:`all`,description:`An argument that allows the user to specify a custom Type s...`}]});if(x(e))return;u=e}i(``);let e=[];[`data`,`cache`,`logs`,`temp`,`all`].includes(o.type)||e.push(`Invalid value provided for the \"type\" option - valid values include: data, cache, logs, temp, and all; provided: ${o.type}`),u||e.push(`Missing required "type" positional argument`),e.length>0&&(g(`The following validation failures were found while processing the user provided input, and must be corrected before the ${s(`Garbage Collection`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
|
|
3
3
|
`)}`),o.help=!0)}return o.help?E():f(`gc`,[`gc`],[o,u],k)}export{A as handler};
|
package/bin/help.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{$ as e,B as t,C as n,G as r,K as i,L as a,M as o,O as s,S as c,U as l,V as u,X as d,Y as f,Z as p,a as m,c as h,j as g,k as _,m as v,nt as y,q as b,r as x,s as S,t as C,tt as w,x as T,z as E}from"./prompts-
|
|
2
|
-
`)}\n`,Math.max(E().columns-30,20)).forEach(e=>{a(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((E().columns-(_(e).length+2))/2),0))+S(o.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((E().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),a(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((E().columns-(_(`Help`).length+2))/2),0))+S(o.banner.command.primary(`Help`))+` `.repeat(Math.max(Math.ceil((E().columns-(_(`Help`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),s(S(o.banner.description.primary(`Display command usage details and other useful information to the user.`)),Math.max(60>E().columns/2?E().columns-6:E().columns-30,20)).forEach(e=>{a(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((E().columns-(_(e).length+2))/2),0))+o.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((E().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),a(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(E().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),a(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(E().columns-35,0)))+` `+S(o.banner.footer.primary(`https://stormsoftware.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),a(``),t&&!i()&&await l(e))}function $(){a(`${S(o.heading.secondary(`Tags: `))} ${o.tags.utility?o.tags.utility(T(` Utility `)):o.tags.$default(T(` Utility `))}`,{padding:0}),a(``),a(S(o.heading.secondary(`Usage:`))),a(o.body.secondary(`${o.usage.bin(`>_ powerlines`)} ${o.usage.command(`help`)} ${o.usage.args(`<commands...>`)} ${o.usage.options(`[options]`)}`),{padding:0}),a(o.body.secondary(`${o.usage.bin(`>_ powerlines`)} ${o.usage.command(`help`)} ${o.usage.options(`[options]`)} ${o.usage.args(`<commands...>`)}`),{padding:0}),a(``),a(S(o.heading.secondary(`Options:`))),g([[{value:o.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.body.tertiary(`Force colored terminal output (env: POWERLINES_COLOR, default: false).`),align:`left`,border:`none`}],[{value:o.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:o.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:o.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.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:o.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.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:o.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.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:o.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:o.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.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:o.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.body.tertiary(`Enable verbose output (env: POWERLINES_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:o.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:o.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.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`}]]),a(``),a(o.body.tertiary(`More information can be found in the Help command documentation at ${n(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/help`)}${o.body.tertiary(`.`)}`),{padding:0}),a(``)}async function te(e=[]){e.join(`/`).toLowerCase()===`build`?V():e.join(`/`).toLowerCase()===`changelog`?H():e.join(`/`).toLowerCase()===`clean`?B():e.join(`/`).toLowerCase()===`completions`?D():e.join(`/`).toLowerCase()===`completions/bash`?O():e.join(`/`).toLowerCase()===`completions/bash/config`?
|
|
1
|
+
import{$ as e,B as t,C as n,G as r,K as i,L as a,M as o,O as s,S as c,U as l,V as u,X as d,Y as f,Z as p,a as m,c as h,j as g,k as _,m as v,nt as y,q as b,r as x,s as S,t as C,tt as w,x as T,z as E}from"./prompts-D2lN84PY.mjs";import{a as D,i as O,n as k,o as A,r as j,t as M}from"./zsh-D4vduhpt.mjs";import{t as N}from"./types-Cos-hD27.mjs";import{t as P}from"./update-BCnYZE7Z.mjs";import{t as F}from"./lint-D89vp8Cr.mjs";import{t as I}from"./prepare-CHpl-gcc.mjs";import{t as L}from"./gc-BfrUs8t4.mjs";import{t as ee}from"./docs-CMYq7TR4.mjs";import{t as R}from"./deploy-7qpJGrFI.mjs";import{t as z}from"./create-CchW-TwN.mjs";import{t as B}from"./clean-DnU9yacU.mjs";import{t as V}from"./build-CAoyovYp.mjs";import{t as H}from"./changelog-CuRlydrC.mjs";import{t as U}from"./script-Dhmoxqaf.mjs";import{t as W}from"./config-D081RTl3.mjs";import{t as G}from"./script-oBAkmWqR.mjs";import{t as K}from"./config-DNspZ1fX.mjs";import{t as q}from"./script-CAFoODHg.mjs";import{t as J}from"./config-CCtmurY_.mjs";import{t as Y}from"./script-eUDz8YBn.mjs";import{t as X}from"./config-BviB4q0i.mjs";import{t as Z}from"./update-DDWHXu_S.mjs";async function Q(e=500){d().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||u||(d().set(`is-banner-displayed`,!0),a(``),a(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+o.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+S(o.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(E().columns-38,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log}),s(Math.max(...m.map(e=>_(e).length))>Math.max(E().columns+30,20)?`Powerlines`:`\n${m.join(`
|
|
2
|
+
`)}\n`,Math.max(E().columns-30,20)).forEach(e=>{a(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((E().columns-(_(e).length+2))/2),0))+S(o.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((E().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),a(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((E().columns-(_(`Help`).length+2))/2),0))+S(o.banner.command.primary(`Help`))+` `.repeat(Math.max(Math.ceil((E().columns-(_(`Help`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),s(S(o.banner.description.primary(`Display command usage details and other useful information to the user.`)),Math.max(60>E().columns/2?E().columns-6:E().columns-30,20)).forEach(e=>{a(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((E().columns-(_(e).length+2))/2),0))+o.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((E().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),a(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(E().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),a(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(E().columns-35,0)))+` `+S(o.banner.footer.primary(`https://stormsoftware.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),a(``),t&&!i()&&await l(e))}function $(){a(`${S(o.heading.secondary(`Tags: `))} ${o.tags.utility?o.tags.utility(T(` Utility `)):o.tags.$default(T(` Utility `))}`,{padding:0}),a(``),a(S(o.heading.secondary(`Usage:`))),a(o.body.secondary(`${o.usage.bin(`>_ powerlines`)} ${o.usage.command(`help`)} ${o.usage.args(`<commands...>`)} ${o.usage.options(`[options]`)}`),{padding:0}),a(o.body.secondary(`${o.usage.bin(`>_ powerlines`)} ${o.usage.command(`help`)} ${o.usage.options(`[options]`)} ${o.usage.args(`<commands...>`)}`),{padding:0}),a(``),a(S(o.heading.secondary(`Options:`))),g([[{value:o.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.body.tertiary(`Force colored terminal output (env: POWERLINES_COLOR, default: false).`),align:`left`,border:`none`}],[{value:o.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:o.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:o.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.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:o.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.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:o.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.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:o.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:o.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.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:o.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.body.tertiary(`Enable verbose output (env: POWERLINES_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:o.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:o.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:o.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`}]]),a(``),a(o.body.tertiary(`More information can be found in the Help command documentation at ${n(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/help`)}${o.body.tertiary(`.`)}`),{padding:0}),a(``)}async function te(e=[]){e.join(`/`).toLowerCase()===`build`?V():e.join(`/`).toLowerCase()===`changelog`?H():e.join(`/`).toLowerCase()===`clean`?B():e.join(`/`).toLowerCase()===`completions`?D():e.join(`/`).toLowerCase()===`completions/bash`?O():e.join(`/`).toLowerCase()===`completions/bash/config`?W():e.join(`/`).toLowerCase()===`completions/bash/script`?U():e.join(`/`).toLowerCase()===`completions/fish`?j():e.join(`/`).toLowerCase()===`completions/fish/config`?X():e.join(`/`).toLowerCase()===`completions/fish/script`?Y():e.join(`/`).toLowerCase()===`completions/powershell`?k():e.join(`/`).toLowerCase()===`completions/powershell/config`?J():e.join(`/`).toLowerCase()===`completions/powershell/script`?q():e.join(`/`).toLowerCase()===`completions/zsh`?M():e.join(`/`).toLowerCase()===`completions/zsh/config`?K():e.join(`/`).toLowerCase()===`completions/zsh/script`?G():e.join(`/`).toLowerCase()===`create`?z():e.join(`/`).toLowerCase()===`deploy`?R():e.join(`/`).toLowerCase()===`docs`?ee():e.join(`/`).toLowerCase()===`gc`?L():e.join(`/`).toLowerCase()===`help`?$():e.join(`/`).toLowerCase()===`lint`?F():e.join(`/`).toLowerCase()===`prepare`?I():e.join(`/`).toLowerCase()===`types`?N():e.join(`/`).toLowerCase()===`update`?Z():A()}async function ne(n=b()){let r={...f()};for(let e=0;e<n.slice(0).length;e++)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];let s=Math.max(0,n.slice(2).findIndex(e=>e.startsWith(`-`)&&/^()=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,l=s>2?2:Math.max(0,n.slice(s).findLastIndex(e=>e.startsWith(`-`)&&/^()=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,u=[];if(l+0<n.length&&l+0!==s&&(u=n.slice(l+0,(s>l?s:n.length)-1).join(` `).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)),await Q(),await P(),i()||(a(``),(y||w||e.LOG_LEVEL===`debug`)&&a(o.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!t){let e=[];u?u.length===0&&e.push(`No values were provided to the required "commands" array positional argument`):e.push(`Missing required "commands" positional argument`)}else if(!i()&&(!u||u.length===0)){if(a(``),!u){let e=await x({message:`Please provide a value for the ${c(`commands`)} argument`,description:`An argument that allows the user to specify custom Commands...`,validate(e){return!e||e.trim()===``?`A value must be provided for this argument`:null}});if(C(e))return;u=e}else if(u.length===0){let e=await x({message:`Please provide one or more values for the ${c(`commands`)} argument (values are separated by a \",\" character)`,description:`An argument that allows the user to specify custom Commands...`,validate(e){if(!e||e.trim()===``)return`A value must be provided for this argument`;if(e.split(`,`).map(e=>e.trim()).filter(Boolean).length===0)return`At least one value must be provided for this argument`}});if(C(e))return;u=e.split(`,`).map(e=>e.trim()).filter(Boolean)}a(``);let e=[];u?u.length===0&&e.push(`No values were provided to the required "commands" array positional argument`):e.push(`Missing required "commands" positional argument`),e.length>0&&(v(`The following validation failures were found while processing the user provided input, and must be corrected before the ${c(`Help`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
|
|
3
3
|
`)}`),r.help=!0)}return r.help?$():p(`help`,[`help`],[u],te)}export{ne as handler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,L as t,M as n,j as r,s as i}from"./prompts-
|
|
1
|
+
import{C as e,L as t,M as n,j as r,s as i}from"./prompts-D2lN84PY.mjs";function a(){t(``),t(i(n.heading.secondary(`Usage:`))),t(n.body.secondary(`${n.usage.bin(`>_ powerlines`)} ${n.usage.command(`lint`)} ${n.usage.options(`[options]`)}`),{padding:0}),t(``),t(i(n.heading.secondary(`Options:`))),r([[{value:n.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Force colored terminal output (env: POWERLINES_COLOR, default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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:n.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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:n.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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:n.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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:n.body.primary(`--root <root>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`The root directory of the project to lint.`),align:`left`,border:`none`}],[{value:n.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Enable verbose output (env: POWERLINES_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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(n.body.tertiary(`More information can be found in the Lint Source Code command documentation at ${e(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/lint`)}${n.body.tertiary(`.`)}`),{padding:0}),t(``)}export{a as t};
|
package/bin/lint.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as e,B as t,G as n,K as r,L as i,M as a,O as o,U as s,V as c,X as l,Y as u,Z as d,a as f,c as p,k as m,nt as h,q as g,s as _,tt as v,z as y}from"./prompts-
|
|
1
|
+
import{$ as e,B as t,G as n,K as r,L as i,M as a,O as o,U as s,V as c,X as l,Y as u,Z as d,a as f,c as p,k as m,nt as h,q as g,s as _,tt as v,z as y}from"./prompts-D2lN84PY.mjs";import{t as b}from"./update-BCnYZE7Z.mjs";import{t as x}from"./create-powerlines-DvusHjN3.mjs";import{t as S}from"./lint-D89vp8Cr.mjs";async function C(e=500){l().get(`is-banner-displayed`)||n(`no-banner`)||n(`hide-banner`)||c||(l().set(`is-banner-displayed`,!0),i(``),i(p.banner.outline.primary(`┏`)+p.banner.outline.primary(`━`.repeat(6))+` `+a.banner.header.primary(`⬤`)+` `+p.banner.outline.primary(`━`)+` `+_(a.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+p.banner.outline.primary(`━`.repeat(Math.max(y().columns-38,0)))+p.banner.outline.primary(`┓`),{consoleFn:console.log}),o(Math.max(...f.map(e=>m(e).length))>Math.max(y().columns+30,20)?`Powerlines`:`\n${f.join(`
|
|
2
2
|
`)}\n`,Math.max(y().columns-30,20)).forEach(e=>{i(p.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((y().columns-(m(e).length+2))/2),0))+_(a.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((y().columns-(m(e).length+2))/2),0))+p.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(p.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((y().columns-(m(`Lint Source Code`).length+2))/2),0))+_(a.banner.command.primary(`Lint Source Code`))+` `.repeat(Math.max(Math.ceil((y().columns-(m(`Lint Source Code`).length+2))/2),0))+p.banner.outline.primary(`┃`),{consoleFn:console.log}),o(_(a.banner.description.primary(`Lint the project's source code for style and syntax errors.`)),Math.max(60>y().columns/2?y().columns-6:y().columns-30,20)).forEach(e=>{i(p.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((y().columns-(m(e).length+2))/2),0))+a.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((y().columns-(m(e).length+2))/2),0))+p.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(p.banner.outline.primary(`┃`)+` `.repeat(Math.max(y().columns-2,0))+p.banner.outline.primary(`┃`),{consoleFn:console.log}),i(p.banner.outline.primary(`┗`)+p.banner.outline.primary(`━`.repeat(Math.max(y().columns-35,0)))+` `+_(a.banner.footer.primary(`https://stormsoftware.com`))+` `+p.banner.outline.primary(`━`.repeat(6))+p.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),t&&!r()&&await s(e))}async function w(e){await(await x(e)).lint(e)}async function T(t=g()){let n={...u()};for(let e=0;e<t.slice(0).length;e++){let r=t[e].length>3&&t[e].startsWith(`--`)?`--${t[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:t[e].length>2&&t[e].startsWith(`-`)?`-${t[e].slice(1).replaceAll(`-`,``)}`:t[e];(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`root=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`root`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`root=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`root`)&&(/^--?(root)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?n.root=r.replace(/^--?(root)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):t.length>e+1&&(n.root=t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}return await C(),await b(),r()||(i(``),(h||v||e.LOG_LEVEL===`debug`)&&i(a.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),n.help?S():d(`lint`,[`lint`],[n],w)}export{T as handler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,L as t,M as n,j as r,s as i}from"./prompts-
|
|
1
|
+
import{C as e,L as t,M as n,j as r,s as i}from"./prompts-D2lN84PY.mjs";function a(){t(``),t(i(n.heading.secondary(`Usage:`))),t(n.body.secondary(`${n.usage.bin(`>_ powerlines`)} ${n.usage.command(`prepare`)} ${n.usage.options(`[options]`)}`),{padding:0}),t(``),t(i(n.heading.secondary(`Options:`))),r([[{value:n.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Force colored terminal output (env: POWERLINES_COLOR, default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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:n.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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:n.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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:n.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Force disable colored terminal output (env: POWERLINES_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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:n.body.primary(`--root <root>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`The root directory of the project to prepare.`),align:`left`,border:`none`}],[{value:n.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Enable verbose output (env: POWERLINES_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:n.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:n.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(n.body.tertiary(`More information can be found in the Prepare Artifacts command documentation at ${e(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/prepare`)}${n.body.tertiary(`.`)}`),{padding:0}),t(``)}export{a as t};
|
package/bin/prepare.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as e,B as t,G as n,K as r,L as i,M as a,O as o,U as s,V as c,X as l,Y as u,Z as d,a as f,c as p,k as m,nt as h,q as g,s as _,tt as v,z as y}from"./prompts-
|
|
1
|
+
import{$ as e,B as t,G as n,K as r,L as i,M as a,O as o,U as s,V as c,X as l,Y as u,Z as d,a as f,c as p,k as m,nt as h,q as g,s as _,tt as v,z as y}from"./prompts-D2lN84PY.mjs";import{t as b}from"./update-BCnYZE7Z.mjs";import{t as x}from"./create-powerlines-DvusHjN3.mjs";import{t as S}from"./prepare-CHpl-gcc.mjs";async function C(e=500){l().get(`is-banner-displayed`)||n(`no-banner`)||n(`hide-banner`)||c||(l().set(`is-banner-displayed`,!0),i(``),i(p.banner.outline.primary(`┏`)+p.banner.outline.primary(`━`.repeat(6))+` `+a.banner.header.primary(`⬤`)+` `+p.banner.outline.primary(`━`)+` `+_(a.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+p.banner.outline.primary(`━`.repeat(Math.max(y().columns-38,0)))+p.banner.outline.primary(`┓`),{consoleFn:console.log}),o(Math.max(...f.map(e=>m(e).length))>Math.max(y().columns+30,20)?`Powerlines`:`\n${f.join(`
|
|
2
2
|
`)}\n`,Math.max(y().columns-30,20)).forEach(e=>{i(p.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((y().columns-(m(e).length+2))/2),0))+_(a.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((y().columns-(m(e).length+2))/2),0))+p.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(p.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((y().columns-(m(`Prepare Artifacts`).length+2))/2),0))+_(a.banner.command.primary(`Prepare Artifacts`))+` `.repeat(Math.max(Math.ceil((y().columns-(m(`Prepare Artifacts`).length+2))/2),0))+p.banner.outline.primary(`┃`),{consoleFn:console.log}),o(_(a.banner.description.primary(`Generate the project's required build and deployment artifacts.`)),Math.max(60>y().columns/2?y().columns-6:y().columns-30,20)).forEach(e=>{i(p.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((y().columns-(m(e).length+2))/2),0))+a.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((y().columns-(m(e).length+2))/2),0))+p.banner.outline.primary(`┃`),{consoleFn:console.log})}),i(p.banner.outline.primary(`┃`)+` `.repeat(Math.max(y().columns-2,0))+p.banner.outline.primary(`┃`),{consoleFn:console.log}),i(p.banner.outline.primary(`┗`)+p.banner.outline.primary(`━`.repeat(Math.max(y().columns-35,0)))+` `+_(a.banner.footer.primary(`https://stormsoftware.com`))+` `+p.banner.outline.primary(`━`.repeat(6))+p.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),t&&!r()&&await s(e))}async function w(e){await(await x(e)).prepare(e)}async function T(t=g()){let n={...u()};for(let e=0;e<t.slice(0).length;e++){let r=t[e].length>3&&t[e].startsWith(`--`)?`--${t[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:t[e].length>2&&t[e].startsWith(`-`)?`-${t[e].slice(1).replaceAll(`-`,``)}`:t[e];(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`root=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`root`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`root=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`root`)&&(/^--?(root)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?n.root=r.replace(/^--?(root)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):t.length>e+1&&(n.root=t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}return await C(),await b(),r()||(i(``),(h||v||e.LOG_LEVEL===`debug`)&&i(a.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),n.help?S():d(`prepare`,[`prepare`],[n],w)}export{T as handler};
|