powerlines 0.47.134 → 0.47.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -21
- package/bin/bin.mjs +6 -7
- package/bin/build-DmdL_gU8.mjs +1 -0
- package/bin/build.mjs +2 -2
- package/bin/changelog-D657CUOQ.mjs +1 -0
- package/bin/changelog.mjs +243 -243
- package/bin/clean-GHqu6VFD.mjs +1 -0
- package/bin/clean.mjs +2 -2
- package/bin/completions-bash-config.mjs +5 -5
- package/bin/completions-bash-script.mjs +5 -5
- package/bin/completions-fish-config.mjs +5 -5
- package/bin/completions-fish-script.mjs +5 -5
- package/bin/completions-powershell-config.mjs +5 -5
- package/bin/completions-powershell-script.mjs +5 -5
- package/bin/completions-zsh-config.mjs +5 -5
- package/bin/completions-zsh-script.mjs +5 -5
- package/bin/config-BPXcxh8s.mjs +1 -0
- package/bin/config-BjCn5vT3.mjs +1 -0
- package/bin/config-DsbpqvsS.mjs +1 -0
- package/bin/config-GCz0cyYm.mjs +1 -0
- package/bin/create-Dt1jWiv8.mjs +1 -0
- package/bin/create.mjs +3 -3
- package/bin/deploy-he5rDKtH.mjs +1 -0
- package/bin/deploy.mjs +2 -2
- package/bin/docs-vhKzSf_x.mjs +1 -0
- package/bin/docs.mjs +2 -2
- package/bin/gc-DDu6-snG.mjs +1 -0
- package/bin/gc.mjs +3 -3
- package/bin/help.mjs +3 -3
- package/bin/lint-DGPhDDlL.mjs +1 -0
- package/bin/lint.mjs +2 -2
- package/bin/prepare-BdQgDLoR.mjs +1 -0
- package/bin/prepare.mjs +2 -2
- package/bin/{prompts-rJ8Zkvkh.mjs → prompts-C2GxQEnX.mjs} +6 -5
- package/bin/script-B0BqiPJo.mjs +1 -0
- package/bin/script-B_4PQWfe.mjs +1 -0
- package/bin/script-CRmdEs0R.mjs +1 -0
- package/bin/script-LVKzKpIC.mjs +1 -0
- package/bin/{shared-CqKaBgb0.mjs → shared-BjE8ZSZ_.mjs} +2 -2
- package/bin/{shared-Bxd02w_p.mjs → shared-Ci6p00OQ.mjs} +2 -2
- package/bin/{shared-D5y3W13R.mjs → shared-CnED_D3N.mjs} +2 -2
- package/bin/{shared-CUXzo4Hl.mjs → shared-CsAqkJbo.mjs} +2 -2
- package/bin/types-D2mYD-vc.mjs +1 -0
- package/bin/types.mjs +2 -2
- package/bin/update-CtUn-oK3.mjs +1 -0
- package/bin/update-mR-f3vxG.mjs +1 -0
- package/bin/update.mjs +2 -2
- package/bin/zsh-jLjlZhWy.mjs +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.mjs +1 -1
- package/package.json +10 -10
- package/bin/build-CfQN7D2i.mjs +0 -1
- package/bin/changelog-YvOlpRNW.mjs +0 -1
- package/bin/clean-DkD7F12f.mjs +0 -1
- package/bin/config-BshG3OVJ.mjs +0 -1
- package/bin/config-D2Y7UAVP.mjs +0 -1
- package/bin/config-Dyr9GPXb.mjs +0 -1
- package/bin/config-mG0keekQ.mjs +0 -1
- package/bin/create-C6-64ZoZ.mjs +0 -1
- package/bin/deploy-C0BxsnBu.mjs +0 -1
- package/bin/docs-D4htFHCe.mjs +0 -1
- package/bin/gc-DPnR98G3.mjs +0 -1
- package/bin/lint-Cq4DaQZl.mjs +0 -1
- package/bin/prepare-CRiyDIvW.mjs +0 -1
- package/bin/script-B-S4-NVJ.mjs +0 -1
- package/bin/script-BFPw3cmT.mjs +0 -1
- package/bin/script-D5l9lL9A.mjs +0 -1
- package/bin/script-DdK0gNQv.mjs +0 -1
- package/bin/types-B0EnYviY.mjs +0 -1
- package/bin/update-CLUvmNXK.mjs +0 -1
- package/bin/update-CbfYNNnn.mjs +0 -1
- package/bin/zsh-DRzKImAL.mjs +0 -1
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
<div align="center">
|
|
7
7
|
<picture>
|
|
8
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-dark.gif">
|
|
9
|
-
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-light.gif">
|
|
10
|
-
<img src="https://public.storm-cdn.com/powerlines/banner-1280x640-dark.gif" width="100%" alt="Powerlines" />
|
|
8
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/powerlines/media/banner-1280x640-dark.gif">
|
|
9
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/powerlines/media/banner-1280x640-light.gif">
|
|
10
|
+
<img src="https://public.storm-cdn.com/powerlines/media/banner-1280x640-dark.gif" width="100%" alt="Powerlines" />
|
|
11
11
|
</picture>
|
|
12
12
|
</div>
|
|
13
13
|
<br />
|
|
@@ -58,19 +58,21 @@ A build toolkit and runtime used by Storm Software in TypeScript applications
|
|
|
58
58
|
|
|
59
59
|
## Table of Contents
|
|
60
60
|
|
|
61
|
-
- [
|
|
62
|
-
- [
|
|
63
|
-
- [
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
66
|
-
|
|
67
|
-
- [
|
|
68
|
-
- [
|
|
69
|
-
- [
|
|
70
|
-
- [
|
|
71
|
-
- [
|
|
72
|
-
- [
|
|
73
|
-
- [
|
|
61
|
+
- [Powerlines](#powerlines)
|
|
62
|
+
- [Table of Contents](#table-of-contents)
|
|
63
|
+
- [Installing](#installing)
|
|
64
|
+
- [Reduced Package Size](#reduced-package-size)
|
|
65
|
+
- [Development](#development)
|
|
66
|
+
- [Building](#building)
|
|
67
|
+
- [Running unit tests](#running-unit-tests)
|
|
68
|
+
- [Linting](#linting)
|
|
69
|
+
- [Storm Workspaces](#storm-workspaces)
|
|
70
|
+
- [Roadmap](#roadmap)
|
|
71
|
+
- [Support](#support)
|
|
72
|
+
- [License](#license)
|
|
73
|
+
- [Changelog](#changelog)
|
|
74
|
+
- [Contributing](#contributing)
|
|
75
|
+
- [Contributors](#contributors)
|
|
74
76
|
|
|
75
77
|
<!-- END doctoc -->
|
|
76
78
|
|
|
@@ -250,9 +252,9 @@ specification. Contributions of any kind welcome!
|
|
|
250
252
|
|
|
251
253
|
<div align="center">
|
|
252
254
|
<picture>
|
|
253
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-dark.webp">
|
|
254
|
-
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-light.webp">
|
|
255
|
-
<img src="https://public.storm-cdn.com/storm-software/banner-1280x320-dark.webp" width="100%" alt="Storm Software" />
|
|
255
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/media/banner-1280x320-dark.webp">
|
|
256
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/media/banner-1280x320-light.webp">
|
|
257
|
+
<img src="https://public.storm-cdn.com/storm-software/media/banner-1280x320-dark.webp" width="100%" alt="Storm Software" />
|
|
256
258
|
</picture>
|
|
257
259
|
</div>
|
|
258
260
|
<br />
|
|
@@ -284,9 +286,17 @@ generation of development tools, please reach out on our
|
|
|
284
286
|
|
|
285
287
|
<br />
|
|
286
288
|
|
|
287
|
-
<div align="center"
|
|
289
|
+
<div align="center">
|
|
290
|
+
<a href="https://stormsoftware.com" target="_blank">
|
|
291
|
+
<picture>
|
|
292
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/icons/circle-dark.webp">
|
|
293
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/icons/circle-light.webp">
|
|
294
|
+
<img src="https://public.storm-cdn.com/storm-software/icons/circle-dark.webp" width="200px" alt="Storm Software" />
|
|
295
|
+
</picture>
|
|
296
|
+
</a>
|
|
297
|
+
</div>
|
|
288
298
|
<br />
|
|
289
|
-
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/visit-us-
|
|
299
|
+
<div align="center"><a href="https://stormsoftware.com" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/misc/text/visit-us-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/misc/text/visit-us-light.png"><img src="https://public.storm-cdn.com/misc/text/visit-us-dark.png" height="90px" alt="Visit us at stormsoftware.com" /></picture></a></div>
|
|
290
300
|
|
|
291
301
|
<br />
|
|
292
302
|
|
package/bin/bin.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import{
|
|
4
|
-
`)}\n`,Math.max(
|
|
5
|
-
`)}\n`,Math.max(
|
|
6
|
-
`)}\n`,Math.max(
|
|
7
|
-
`)}\n`,Math.max(
|
|
8
|
-
`)}\n`,Math.max(c().columns-30,20)).forEach(n=>{r(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((c().columns-(t(n).length+2))/2),0))+h(e.banner.title.primary(n))+` `.repeat(Math.max(Math.ceil((c().columns-(t(n).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((c().columns-(t(`Completions - PowerShell`).length+2))/2),0))+h(e.banner.command.primary(`Completions - PowerShell`))+` `.repeat(Math.max(Math.ceil((c().columns-(t(`Completions - PowerShell`).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h(e.banner.description.primary(`Commands to setup PowerShell completions for the Powerlines command-line interface.`)),Math.max(60>c().columns/2?c().columns-6:c().columns-30,20)).forEach(n=>{r(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((c().columns-(t(n).length+2))/2),0))+e.banner.description.primary(n)+` `.repeat(Math.max(Math.ceil((c().columns-(t(n).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(c().columns-2,0))+v.banner.outline.primary(`┃`),{consoleFn:console.log}),r(v.banner.outline.primary(`┗`)+v.banner.outline.primary(`━`.repeat(Math.max(c().columns-35,0)))+` `+h(e.banner.footer.primary(`https://stormsoftware.com`))+` `+v.banner.outline.primary(`━`.repeat(6))+v.banner.outline.primary(`┛`),{consoleFn:console.log}),r(``),u&&!p()&&await f(i)}async function F(e=i()){let t=``;if(e.length>4&&e[4]&&(t=e[4]),!t.startsWith(`-`)){if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-powershell-script.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-powershell-config.mjs`).then(e=>e.handler))(e);if(t&&!t.startsWith(`-`)){let e=a(t,[`script`,`config`]).slice(0,3);g(`Unknown command: "${t}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}if(u&&!p()){await P();let n=await _({message:`Which command would you like to execute?`,options:[{value:[`completions`,`powershell`,`script`],label:`Completions - PowerShell Script`,description:`(powerlines completions powershell script)`,icon:`🖵`},{value:[`completions`,`powershell`,`config`],label:`Completions - PowerShell Configuration`,description:`(powerlines completions powershell config)`,icon:`🖵`}]});if(b(n))return;let r={};for(let e of n.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let t=await y({message:`Please provide a value for ${e.replace(/^[+/, "").replace(/]+$/,``)}:`});if(b(t))return;r[e]=t}n=n.map(e=>r[e]||e);let i=s();if(i&&(i.inputArgs=[e.length>0?e[0]:void 0,e.length>1?e[1]:void 0,...n,...e.slice(4)].filter(Boolean)),t=n[0],e=i.inputArgs,!t.startsWith(`-`)){if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-powershell-script.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-powershell-config.mjs`).then(e=>e.handler))(e);if(t&&!t.startsWith(`-`)){let e=a(t,[`script`,`config`]).slice(0,3);g(`Unknown command: "${t}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}}return w()}async function I(i=500){if(o().get(`banner`)||d(`no-banner`)||d(`hide-banner`)||x)return;o().set(`banner`,!0),r(``),r(v.banner.outline.primary(`┏`)+v.banner.outline.primary(`━`.repeat(6))+` `+e.banner.header.primary(`⬤`)+` `+v.banner.outline.primary(`━`)+` `+h(e.banner.header.primary(`Powerlines CLI v0.47.125`))+` `+v.banner.outline.primary(`━`.repeat(Math.max(c().columns-38,0)))+v.banner.outline.primary(`┓`),{consoleFn:console.log});let a=[`█████▄ ▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄ ▄▄▄▄`,`██▄▄█▀ ██▀██ ██ ▄ ██ ██▄▄ ██▄█▄ ██ ██ ███▄██ ██▄▄ ███▄▄`,`██ ▀███▀ ▀█▀█▀ ██▄▄▄ ██ ██ ██▄▄▄ ██ ██ ▀██ ██▄▄▄ ▄▄██▀`];n(Math.max(...a.map(e=>t(e).length))>Math.max(c().columns+30,20)?`Powerlines`:`\n${a.join(`
|
|
9
|
-
`)}\n`,Math.max(c().columns-30,20)).forEach(n=>{r(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((c().columns-(t(n).length+2))/2),0))+h(e.banner.title.primary(n))+` `.repeat(Math.max(Math.ceil((c().columns-(t(n).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((c().columns-(t(`Completions - Zsh`).length+2))/2),0))+h(e.banner.command.primary(`Completions - Zsh`))+` `.repeat(Math.max(Math.ceil((c().columns-(t(`Completions - Zsh`).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h(e.banner.description.primary(`Commands to setup Zsh completions for the Powerlines command-line interface.`)),Math.max(60>c().columns/2?c().columns-6:c().columns-30,20)).forEach(n=>{r(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((c().columns-(t(n).length+2))/2),0))+e.banner.description.primary(n)+` `.repeat(Math.max(Math.ceil((c().columns-(t(n).length+2))/2),0))+v.banner.outline.primary(`┃`),{consoleFn:console.log})}),r(v.banner.outline.primary(`┃`)+` `.repeat(Math.max(c().columns-2,0))+v.banner.outline.primary(`┃`),{consoleFn:console.log}),r(v.banner.outline.primary(`┗`)+v.banner.outline.primary(`━`.repeat(Math.max(c().columns-35,0)))+` `+h(e.banner.footer.primary(`https://stormsoftware.com`))+` `+v.banner.outline.primary(`━`.repeat(6))+v.banner.outline.primary(`┛`),{consoleFn:console.log}),r(``),u&&!p()&&await f(i)}async function L(e=i()){let t=``;if(e.length>4&&e[4]&&(t=e[4]),!t.startsWith(`-`)){if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-zsh-script.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-zsh-config.mjs`).then(e=>e.handler))(e);if(t&&!t.startsWith(`-`)){let e=a(t,[`script`,`config`]).slice(0,3);g(`Unknown command: "${t}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}if(u&&!p()){await I();let n=await _({message:`Which command would you like to execute?`,options:[{value:[`completions`,`zsh`,`script`],label:`Completions - Zsh Script`,description:`(powerlines completions zsh script)`,icon:`🖵`},{value:[`completions`,`zsh`,`config`],label:`Completions - Zsh Configuration`,description:`(powerlines completions zsh config)`,icon:`🖵`}]});if(b(n))return;let r={};for(let e of n.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let t=await y({message:`Please provide a value for ${e.replace(/^[+/, "").replace(/]+$/,``)}:`});if(b(t))return;r[e]=t}n=n.map(e=>r[e]||e);let i=s();if(i&&(i.inputArgs=[e.length>0?e[0]:void 0,e.length>1?e[1]:void 0,...n,...e.slice(4)].filter(Boolean)),t=n[0],e=i.inputArgs,!t.startsWith(`-`)){if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-zsh-script.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-zsh-config.mjs`).then(e=>e.handler))(e);if(t&&!t.startsWith(`-`)){let e=a(t,[`script`,`config`]).slice(0,3);g(`Unknown command: "${t}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}}return D()}async function R(e=i()){let t=``;if(e.length>3&&e[3]&&(t=e[3]),!t.startsWith(`-`)){if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`bash`)return j(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`powershell`)return F(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`zsh`)return L(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`fish`)return N(e);if(t&&!t.startsWith(`-`)){let e=a(t,[`bash`,`powershell`,`zsh`,`fish`]).slice(0,3);g(`Unknown command: "${t}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}if(u&&!p()){await k();let n=await _({message:`Which command would you like to execute?`,options:[{value:[`completions`,`bash`,`script`],label:`Completions - Bash Script`,description:`(powerlines completions bash script)`,icon:`🖵`},{value:[`completions`,`bash`,`config`],label:`Completions - Bash Configuration`,description:`(powerlines completions bash config)`,icon:`🖵`},{value:[`completions`,`powershell`,`script`],label:`Completions - PowerShell Script`,description:`(powerlines completions powershell script)`,icon:`🖵`},{value:[`completions`,`powershell`,`config`],label:`Completions - PowerShell Configuration`,description:`(powerlines completions powershell config)`,icon:`🖵`},{value:[`completions`,`zsh`,`script`],label:`Completions - Zsh Script`,description:`(powerlines completions zsh script)`,icon:`🖵`},{value:[`completions`,`zsh`,`config`],label:`Completions - Zsh Configuration`,description:`(powerlines completions zsh config)`,icon:`🖵`},{value:[`completions`,`fish`,`script`],label:`Completions - Fish Script`,description:`(powerlines completions fish script)`,icon:`🖵`},{value:[`completions`,`fish`,`config`],label:`Completions - Fish Configuration`,description:`(powerlines completions fish config)`,icon:`🖵`}]});if(b(n))return;let r={};for(let e of n.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let t=await y({message:`Please provide a value for ${e.replace(/^[+/, "").replace(/]+$/,``)}:`});if(b(t))return;r[e]=t}n=n.map(e=>r[e]||e);let i=s();if(i&&(i.inputArgs=[e.length>0?e[0]:void 0,e.length>1?e[1]:void 0,...n,...e.slice(3)].filter(Boolean)),t=n[0],e=i.inputArgs,!t.startsWith(`-`)){if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`bash`)return j(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`powershell`)return F(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`zsh`)return L(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`fish`)return N(e);if(t&&!t.startsWith(`-`)){let e=a(t,[`bash`,`powershell`,`zsh`,`fish`]).slice(0,3);g(`Unknown command: "${t}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}}return S()}let z=!1;const B=[],V=[];async function H(e={}){try{if(z)return;z=!0;let t=0;e.signal!==void 0&&e.signal>0||e.exception?t=128+(e.signal??1):(typeof process.exitCode==`number`||typeof process.exitCode==`string`)&&(t=process.exitCode),e.exception&&g({message:`A fatal error occured while running the application - please contact the Powerlines support team${e.exception&&typeof e.exception!=`symbol`?`: \n\n${typeof e.exception==`string`?e.exception:e.exception.message}`:`.`}`,...e.exception&&typeof e.exception==`object`?{stack:e.exception.stack}:{}});let n=(n=!1)=>{l(`The Powerlines application exited ${e.exception?`early due to an exception`:`successfully`}${e.startDate?`. Total run time is ${Date.now()-e.startDate.getTime()>5e3?Math.floor((Date.now()-e.startDate.getTime())/1e3):Date.now()-e.startDate.getTime()} ${Date.now()-e.startDate.getTime()>5e3?`seconds`:`milliseconds`}`:``}...`),e.skipProcessExit||process.nextTick(()=>process.exit(t))};for(let e of V)e(t);if(!e.isSynchronous){let e=[],r=0;for(let[n,i]of B)r=Math.max(r,i),e.push(Promise.resolve(n(t)));let i=setTimeout(()=>{n(!0)},r);await Promise.all(e),clearTimeout(i)}n()}catch(t){g(`The exit process failed to complete${t?.message?` - ${t.message}`:``}. Please contact the Powerlines support team.`),e.skipProcessExit||process.nextTick(()=>process.exit(1))}}async function U(){if(d([`version`,`v`])){console.log(`0.47.125`);return}let e=i(),t=``;if(e.length>2&&e[2]&&(t=e[2]),!t.startsWith(`-`)){if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`types`)return(await import(`./types.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`prepare`)return(await import(`./prepare.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`gc`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`garbagecollection`)return(await import(`./gc.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`lint`)return(await import(`./lint.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`docs`)return(await import(`./docs.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`deploy`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`deployment`)return(await import(`./deploy.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`create`)return(await import(`./create.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`clean`)return(await import(`./clean.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`build`)return(await import(`./build.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`changelog`)return(await import(`./changelog.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`completions`)return R(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`update`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`upgrade`)return(await import(`./update.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`help`)return(await import(`./help.mjs`).then(e=>e.handler))(e);if(t&&!t.startsWith(`-`)){let e=a(t,[`types`,`prepare`,`gc`,`garbage-collection`,`lint`,`docs`,`deploy`,`deployment`,`create`,`clean`,`build`,`changelog`,`completions`,`update`,`upgrade`,`help`]).slice(0,3);g(`Unknown command: "${t}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}if(u&&!p()){await O();let n=await _({message:`Which command would you like to execute?`,options:[{value:[`types`],label:`Generate Typescript Declarations`,description:`(powerlines types)`,icon:`🖹`},{value:[`prepare`],label:`Prepare Artifacts`,description:`(powerlines prepare)`,icon:`🖉`},{value:[`gc`],label:`Garbage Collection`,description:`(powerlines gc)`,icon:`🗶`},{value:[`lint`],label:`Lint Source Code`,description:`(powerlines lint)`,icon:`🗹`},{value:[`docs`],label:`Generate Documentation`,description:`(powerlines docs)`,icon:`🕮`},{value:[`deploy`],label:`Deploy`,description:`(powerlines deploy)`,icon:`🛪`},{value:[`create`],label:`Create Project`,description:`(powerlines create)`,icon:`⬚`},{value:[`clean`],label:`Clean`,description:`(powerlines clean)`,icon:`🗑`},{value:[`build`],label:`Build`,description:`(powerlines build)`,icon:`🏗`},{value:[`changelog`],label:`Changelog`,description:`(powerlines changelog)`,icon:`🗃`},{value:[`completions`,`bash`,`script`],label:`Completions - Bash Script`,description:`(powerlines completions bash script)`,icon:`🖵`},{value:[`completions`,`bash`,`config`],label:`Completions - Bash Configuration`,description:`(powerlines completions bash config)`,icon:`🖵`},{value:[`completions`,`powershell`,`script`],label:`Completions - PowerShell Script`,description:`(powerlines completions powershell script)`,icon:`🖵`},{value:[`completions`,`powershell`,`config`],label:`Completions - PowerShell Configuration`,description:`(powerlines completions powershell config)`,icon:`🖵`},{value:[`completions`,`zsh`,`script`],label:`Completions - Zsh Script`,description:`(powerlines completions zsh script)`,icon:`🖵`},{value:[`completions`,`zsh`,`config`],label:`Completions - Zsh Configuration`,description:`(powerlines completions zsh config)`,icon:`🖵`},{value:[`completions`,`fish`,`script`],label:`Completions - Fish Script`,description:`(powerlines completions fish script)`,icon:`🖵`},{value:[`completions`,`fish`,`config`],label:`Completions - Fish Configuration`,description:`(powerlines completions fish config)`,icon:`🖵`},{value:[`update`],label:`Update`,description:`(powerlines update)`,icon:`🖒`},{value:[`help`],label:`Help`,description:`(powerlines help)`,icon:`🛈`}]});if(b(n))return;let r={};for(let e of n.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let t=await y({message:`Please provide a value for ${e.replace(/^[+/, "").replace(/]+$/,``)}:`});if(b(t))return;r[e]=t}n=n.map(e=>r[e]||e);let i=s();if(i&&(i.inputArgs=[e.length>0?e[0]:void 0,e.length>1?e[1]:void 0,...n,...e.slice(2)].filter(Boolean)),t=n[0],e=i.inputArgs,!t.startsWith(`-`)){if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`types`)return(await import(`./types.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`prepare`)return(await import(`./prepare.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`gc`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`garbagecollection`)return(await import(`./gc.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`lint`)return(await import(`./lint.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`docs`)return(await import(`./docs.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`deploy`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`deployment`)return(await import(`./deploy.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`create`)return(await import(`./create.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`clean`)return(await import(`./clean.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`build`)return(await import(`./build.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`changelog`)return(await import(`./changelog.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`completions`)return R(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`update`||t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`upgrade`)return(await import(`./update.mjs`).then(e=>e.handler))(e);if(t.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`help`)return(await import(`./help.mjs`).then(e=>e.handler))(e);if(t&&!t.startsWith(`-`)){let e=a(t,[`types`,`prepare`,`gc`,`garbage-collection`,`lint`,`docs`,`deploy`,`deployment`,`create`,`clean`,`build`,`changelog`,`completions`,`update`,`upgrade`,`help`]).slice(0,3);g(`Unknown command: "${t}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}}return await O(0),T()}(async()=>{let e=new Date;try{process.on(`exit`,()=>H({startDate:e,skipProcessExit:!0,isSynchronous:!0,signal:0})),process.on(`beforeExit`,()=>H({startDate:e,signal:0})),process.on(`message`,t=>{t===`shutdown`&&H({startDate:e,isSynchronous:!0,signal:-128})}),process.once(`SIGTERM`,()=>H({startDate:e,signal:15})),process.once(`SIGINT`,()=>H({startDate:e,signal:2})),process.once(`SIGUSR2`,()=>(l(`The application was terminated by the user`),H({startDate:e,signal:12}))),process.once(`SIGQUIT`,()=>(l(`The application was terminated by the user`),H({startDate:e,signal:12})));for(let t of[`unhandledRejection`,`uncaughtException`])process.on(t,n=>H({startDate:e,exception:n||Error(`An ${t===`unhandledRejection`?`unhandled promise rejection`:`uncaught exception`} occurred during processing - the application is shutting down.`)}));await m(async()=>{let e=await U();e?.error&&g(e.error)}),H({startDate:e})}catch(t){H({startDate:e,exception:t})}})();export{H as exit};
|
|
3
|
+
import{B as e,G as t,J as n,K as r,L as i,M as a,O as o,P as s,Q as c,R as l,U as u,V as d,X as f,a as p,c as m,k as h,m as g,n as _,o as v,q as y,r as b,s as x,t as S,z as C}from"./prompts-C2GxQEnX.mjs";import{a as w,i as T,n as E,o as D,r as O,t as k}from"./zsh-jLjlZhWy.mjs";async function A(n=500){f().get(`is-banner-displayed`)||t(`no-banner`)||t(`hide-banner`)||d||(f().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(`━`)+` `+x(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(`
|
|
4
|
+
`)}\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))+x(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(`Completions`).length+2))/2),0))+x(a.banner.command.primary(`Completions`))+` `.repeat(Math.max(Math.ceil((C().columns-(h(`Completions`).length+2))/2),0))+m.banner.outline.primary(`┃`),{consoleFn:console.log}),o(x(a.banner.description.primary(`Commands for generating shell completion scripts for Powerlines.`)),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)))+` `+x(a.banner.footer.primary(`https://stormsoftware.com`))+` `+m.banner.outline.primary(`━`.repeat(6))+m.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),e&&!r()&&await u(n))}async function j(n=500){f().get(`is-banner-displayed`)||t(`no-banner`)||t(`hide-banner`)||d||(f().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(`━`)+` `+x(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(`
|
|
5
|
+
`)}\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))+x(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(`Completions - Bash`).length+2))/2),0))+x(a.banner.command.primary(`Completions - Bash`))+` `.repeat(Math.max(Math.ceil((C().columns-(h(`Completions - Bash`).length+2))/2),0))+m.banner.outline.primary(`┃`),{consoleFn:console.log}),o(x(a.banner.description.primary(`Commands to setup bash completions for the Powerlines command-line interface.`)),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)))+` `+x(a.banner.footer.primary(`https://stormsoftware.com`))+` `+m.banner.outline.primary(`━`.repeat(6))+m.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),e&&!r()&&await u(n))}async function M(t=y()){let i=``;if(t.length>4&&t[4]&&(i=t[4]),!i.startsWith(`-`)){if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-bash-config.mjs`).then(e=>e.handler))(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-bash-script.mjs`).then(e=>e.handler))(t);if(i&&!i.startsWith(`-`)){let e=l(i,[`config`,`script`]).slice(0,3);g(`Unknown command: "${i}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}if(e&&!r()){await j();let e=await _({message:`Which command would you like to execute?`,options:[{value:[`completions`,`bash`,`config`],label:`Completions - Bash Configuration`,description:`(powerlines completions bash config)`,icon:`🖵`},{value:[`completions`,`bash`,`script`],label:`Completions - Bash Script`,description:`(powerlines completions bash script)`,icon:`🖵`}]});if(S(e))return;let r={};for(let t of e.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let e=await b({message:`Please provide a value for ${t.replace(/^[+/, "").replace(/]+$/,``)}:`});if(S(e))return;r[t]=e}e=e.map(e=>r[e]||e);let a=n();if(a&&(a.inputArgs=[t.length>0?t[0]:void 0,t.length>1?t[1]:void 0,...e,...t.slice(4)].filter(Boolean)),i=e[0],t=a.inputArgs,!i.startsWith(`-`)){if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-bash-config.mjs`).then(e=>e.handler))(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-bash-script.mjs`).then(e=>e.handler))(t);if(i&&!i.startsWith(`-`)){let e=l(i,[`config`,`script`]).slice(0,3);g(`Unknown command: "${i}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}}return T()}async function N(n=500){f().get(`is-banner-displayed`)||t(`no-banner`)||t(`hide-banner`)||d||(f().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(`━`)+` `+x(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(`
|
|
6
|
+
`)}\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))+x(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(`Completions - Fish`).length+2))/2),0))+x(a.banner.command.primary(`Completions - Fish`))+` `.repeat(Math.max(Math.ceil((C().columns-(h(`Completions - Fish`).length+2))/2),0))+m.banner.outline.primary(`┃`),{consoleFn:console.log}),o(x(a.banner.description.primary(`Commands to setup Fish completions for the Powerlines command-line interface.`)),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)))+` `+x(a.banner.footer.primary(`https://stormsoftware.com`))+` `+m.banner.outline.primary(`━`.repeat(6))+m.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),e&&!r()&&await u(n))}async function P(t=y()){let i=``;if(t.length>4&&t[4]&&(i=t[4]),!i.startsWith(`-`)){if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-fish-script.mjs`).then(e=>e.handler))(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-fish-config.mjs`).then(e=>e.handler))(t);if(i&&!i.startsWith(`-`)){let e=l(i,[`script`,`config`]).slice(0,3);g(`Unknown command: "${i}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}if(e&&!r()){await N();let e=await _({message:`Which command would you like to execute?`,options:[{value:[`completions`,`fish`,`script`],label:`Completions - Fish Script`,description:`(powerlines completions fish script)`,icon:`🖵`},{value:[`completions`,`fish`,`config`],label:`Completions - Fish Configuration`,description:`(powerlines completions fish config)`,icon:`🖵`}]});if(S(e))return;let r={};for(let t of e.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let e=await b({message:`Please provide a value for ${t.replace(/^[+/, "").replace(/]+$/,``)}:`});if(S(e))return;r[t]=e}e=e.map(e=>r[e]||e);let a=n();if(a&&(a.inputArgs=[t.length>0?t[0]:void 0,t.length>1?t[1]:void 0,...e,...t.slice(4)].filter(Boolean)),i=e[0],t=a.inputArgs,!i.startsWith(`-`)){if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-fish-script.mjs`).then(e=>e.handler))(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-fish-config.mjs`).then(e=>e.handler))(t);if(i&&!i.startsWith(`-`)){let e=l(i,[`script`,`config`]).slice(0,3);g(`Unknown command: "${i}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}}return O()}async function F(n=500){f().get(`is-banner-displayed`)||t(`no-banner`)||t(`hide-banner`)||d||(f().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(`━`)+` `+x(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(`
|
|
7
|
+
`)}\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))+x(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(`Completions - PowerShell`).length+2))/2),0))+x(a.banner.command.primary(`Completions - PowerShell`))+` `.repeat(Math.max(Math.ceil((C().columns-(h(`Completions - PowerShell`).length+2))/2),0))+m.banner.outline.primary(`┃`),{consoleFn:console.log}),o(x(a.banner.description.primary(`Commands to setup PowerShell completions for the Powerlines command-line interface.`)),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)))+` `+x(a.banner.footer.primary(`https://stormsoftware.com`))+` `+m.banner.outline.primary(`━`.repeat(6))+m.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),e&&!r()&&await u(n))}async function I(t=y()){let i=``;if(t.length>4&&t[4]&&(i=t[4]),!i.startsWith(`-`)){if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-powershell-script.mjs`).then(e=>e.handler))(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-powershell-config.mjs`).then(e=>e.handler))(t);if(i&&!i.startsWith(`-`)){let e=l(i,[`script`,`config`]).slice(0,3);g(`Unknown command: "${i}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}if(e&&!r()){await F();let e=await _({message:`Which command would you like to execute?`,options:[{value:[`completions`,`powershell`,`script`],label:`Completions - PowerShell Script`,description:`(powerlines completions powershell script)`,icon:`🖵`},{value:[`completions`,`powershell`,`config`],label:`Completions - PowerShell Configuration`,description:`(powerlines completions powershell config)`,icon:`🖵`}]});if(S(e))return;let r={};for(let t of e.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let e=await b({message:`Please provide a value for ${t.replace(/^[+/, "").replace(/]+$/,``)}:`});if(S(e))return;r[t]=e}e=e.map(e=>r[e]||e);let a=n();if(a&&(a.inputArgs=[t.length>0?t[0]:void 0,t.length>1?t[1]:void 0,...e,...t.slice(4)].filter(Boolean)),i=e[0],t=a.inputArgs,!i.startsWith(`-`)){if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-powershell-script.mjs`).then(e=>e.handler))(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-powershell-config.mjs`).then(e=>e.handler))(t);if(i&&!i.startsWith(`-`)){let e=l(i,[`script`,`config`]).slice(0,3);g(`Unknown command: "${i}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}}return E()}async function L(n=500){f().get(`is-banner-displayed`)||t(`no-banner`)||t(`hide-banner`)||d||(f().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(`━`)+` `+x(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(`
|
|
8
|
+
`)}\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))+x(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(`Completions - Zsh`).length+2))/2),0))+x(a.banner.command.primary(`Completions - Zsh`))+` `.repeat(Math.max(Math.ceil((C().columns-(h(`Completions - Zsh`).length+2))/2),0))+m.banner.outline.primary(`┃`),{consoleFn:console.log}),o(x(a.banner.description.primary(`Commands to setup Zsh completions for the Powerlines command-line interface.`)),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)))+` `+x(a.banner.footer.primary(`https://stormsoftware.com`))+` `+m.banner.outline.primary(`━`.repeat(6))+m.banner.outline.primary(`┛`),{consoleFn:console.log}),i(``),e&&!r()&&await u(n))}async function R(t=y()){let i=``;if(t.length>4&&t[4]&&(i=t[4]),!i.startsWith(`-`)){if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-zsh-script.mjs`).then(e=>e.handler))(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-zsh-config.mjs`).then(e=>e.handler))(t);if(i&&!i.startsWith(`-`)){let e=l(i,[`script`,`config`]).slice(0,3);g(`Unknown command: "${i}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}if(e&&!r()){await L();let e=await _({message:`Which command would you like to execute?`,options:[{value:[`completions`,`zsh`,`script`],label:`Completions - Zsh Script`,description:`(powerlines completions zsh script)`,icon:`🖵`},{value:[`completions`,`zsh`,`config`],label:`Completions - Zsh Configuration`,description:`(powerlines completions zsh config)`,icon:`🖵`}]});if(S(e))return;let r={};for(let t of e.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let e=await b({message:`Please provide a value for ${t.replace(/^[+/, "").replace(/]+$/,``)}:`});if(S(e))return;r[t]=e}e=e.map(e=>r[e]||e);let a=n();if(a&&(a.inputArgs=[t.length>0?t[0]:void 0,t.length>1?t[1]:void 0,...e,...t.slice(4)].filter(Boolean)),i=e[0],t=a.inputArgs,!i.startsWith(`-`)){if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-zsh-script.mjs`).then(e=>e.handler))(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-zsh-config.mjs`).then(e=>e.handler))(t);if(i&&!i.startsWith(`-`)){let e=l(i,[`script`,`config`]).slice(0,3);g(`Unknown command: "${i}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}}return k()}async function z(t=y()){let i=``;if(t.length>3&&t[3]&&(i=t[3]),!i.startsWith(`-`)){if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`fish`)return P(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`bash`)return M(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`zsh`)return R(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`powershell`)return I(t);if(i&&!i.startsWith(`-`)){let e=l(i,[`fish`,`bash`,`zsh`,`powershell`]).slice(0,3);g(`Unknown command: "${i}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}if(e&&!r()){await A();let e=await _({message:`Which command would you like to execute?`,options:[{value:[`completions`,`fish`,`script`],label:`Completions - Fish Script`,description:`(powerlines completions fish script)`,icon:`🖵`},{value:[`completions`,`fish`,`config`],label:`Completions - Fish Configuration`,description:`(powerlines completions fish config)`,icon:`🖵`},{value:[`completions`,`bash`,`config`],label:`Completions - Bash Configuration`,description:`(powerlines completions bash config)`,icon:`🖵`},{value:[`completions`,`bash`,`script`],label:`Completions - Bash Script`,description:`(powerlines completions bash script)`,icon:`🖵`},{value:[`completions`,`zsh`,`script`],label:`Completions - Zsh Script`,description:`(powerlines completions zsh script)`,icon:`🖵`},{value:[`completions`,`zsh`,`config`],label:`Completions - Zsh Configuration`,description:`(powerlines completions zsh config)`,icon:`🖵`},{value:[`completions`,`powershell`,`script`],label:`Completions - PowerShell Script`,description:`(powerlines completions powershell script)`,icon:`🖵`},{value:[`completions`,`powershell`,`config`],label:`Completions - PowerShell Configuration`,description:`(powerlines completions powershell config)`,icon:`🖵`}]});if(S(e))return;let r={};for(let t of e.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let e=await b({message:`Please provide a value for ${t.replace(/^[+/, "").replace(/]+$/,``)}:`});if(S(e))return;r[t]=e}e=e.map(e=>r[e]||e);let a=n();if(a&&(a.inputArgs=[t.length>0?t[0]:void 0,t.length>1?t[1]:void 0,...e,...t.slice(3)].filter(Boolean)),i=e[0],t=a.inputArgs,!i.startsWith(`-`)){if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`fish`)return P(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`bash`)return M(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`zsh`)return R(t);if(i.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`powershell`)return I(t);if(i&&!i.startsWith(`-`)){let e=l(i,[`fish`,`bash`,`zsh`,`powershell`]).slice(0,3);g(`Unknown command: "${i}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}}return w()}let B=!1;const V=[],H=[];async function U(e={}){try{if(B)return;B=!0;let t=0;e.signal!==void 0&&e.signal>0||e.exception?t=128+(e.signal??1):(typeof process.exitCode==`number`||typeof process.exitCode==`string`)&&(t=process.exitCode),e.exception&&g({message:`A fatal error occured while running the application - please contact the Powerlines support team${e.exception&&typeof e.exception!=`symbol`?`: \n\n${typeof e.exception==`string`?e.exception:e.exception.message}`:`.`}`,...e.exception&&typeof e.exception==`object`?{stack:e.exception.stack}:{}});let n=(n=!1)=>{s(`The Powerlines application exited ${e.exception?`early due to an exception`:`successfully`}${e.startDate?`. Total run time is ${Date.now()-e.startDate.getTime()>5e3?Math.floor((Date.now()-e.startDate.getTime())/1e3):Date.now()-e.startDate.getTime()} ${Date.now()-e.startDate.getTime()>5e3?`seconds`:`milliseconds`}`:``}...`),e.skipProcessExit||process.nextTick(()=>process.exit(t))};for(let e of H)e(t);if(!e.isSynchronous){let e=[],r=0;for(let[n,i]of V)r=Math.max(r,i),e.push(Promise.resolve(n(t)));let i=setTimeout(()=>{n(!0)},r);await Promise.all(e),clearTimeout(i)}n()}catch(t){g(`The exit process failed to complete${t?.message?` - ${t.message}`:``}. Please contact the Powerlines support team.`),e.skipProcessExit||process.nextTick(()=>process.exit(1))}}async function W(){if(t([`version`,`v`])){console.log(`0.47.125`);return}let i=y(),a=``;if(i.length>2&&i[2]&&(a=i[2]),!a.startsWith(`-`)){if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`types`)return(await import(`./types.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`prepare`)return(await import(`./prepare.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`lint`)return(await import(`./lint.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`gc`||a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`garbagecollection`)return(await import(`./gc.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`docs`)return(await import(`./docs.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`deploy`||a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`deployment`)return(await import(`./deploy.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`create`)return(await import(`./create.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`clean`)return(await import(`./clean.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`build`)return(await import(`./build.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`changelog`)return(await import(`./changelog.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`completions`)return z(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`update`||a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`upgrade`)return(await import(`./update.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`help`)return(await import(`./help.mjs`).then(e=>e.handler))(i);if(a&&!a.startsWith(`-`)){let e=l(a,[`types`,`prepare`,`lint`,`gc`,`garbage-collection`,`docs`,`deploy`,`deployment`,`create`,`clean`,`build`,`changelog`,`completions`,`update`,`upgrade`,`help`]).slice(0,3);g(`Unknown command: "${a}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}if(e&&!r()){await v();let e=await _({message:`Which command would you like to execute?`,options:[{value:[`types`],label:`Generate Typescript Declarations`,description:`(powerlines types)`,icon:`🖹`},{value:[`prepare`],label:`Prepare Artifacts`,description:`(powerlines prepare)`,icon:`🖉`},{value:[`lint`],label:`Lint Source Code`,description:`(powerlines lint)`,icon:`🗹`},{value:[`gc`],label:`Garbage Collection`,description:`(powerlines gc)`,icon:`🗶`},{value:[`docs`],label:`Generate Documentation`,description:`(powerlines docs)`,icon:`🕮`},{value:[`deploy`],label:`Deploy`,description:`(powerlines deploy)`,icon:`🛪`},{value:[`create`],label:`Create Project`,description:`(powerlines create)`,icon:`⬚`},{value:[`clean`],label:`Clean`,description:`(powerlines clean)`,icon:`🗑`},{value:[`build`],label:`Build`,description:`(powerlines build)`,icon:`🏗`},{value:[`changelog`],label:`Changelog`,description:`(powerlines changelog)`,icon:`🗃`},{value:[`completions`,`fish`,`script`],label:`Completions - Fish Script`,description:`(powerlines completions fish script)`,icon:`🖵`},{value:[`completions`,`fish`,`config`],label:`Completions - Fish Configuration`,description:`(powerlines completions fish config)`,icon:`🖵`},{value:[`completions`,`bash`,`config`],label:`Completions - Bash Configuration`,description:`(powerlines completions bash config)`,icon:`🖵`},{value:[`completions`,`bash`,`script`],label:`Completions - Bash Script`,description:`(powerlines completions bash script)`,icon:`🖵`},{value:[`completions`,`zsh`,`script`],label:`Completions - Zsh Script`,description:`(powerlines completions zsh script)`,icon:`🖵`},{value:[`completions`,`zsh`,`config`],label:`Completions - Zsh Configuration`,description:`(powerlines completions zsh config)`,icon:`🖵`},{value:[`completions`,`powershell`,`script`],label:`Completions - PowerShell Script`,description:`(powerlines completions powershell script)`,icon:`🖵`},{value:[`completions`,`powershell`,`config`],label:`Completions - PowerShell Configuration`,description:`(powerlines completions powershell config)`,icon:`🖵`},{value:[`update`],label:`Update`,description:`(powerlines update)`,icon:`🖒`},{value:[`help`],label:`Help`,description:`(powerlines help)`,icon:`🛈`}]});if(S(e))return;let t={};for(let n of e.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let e=await b({message:`Please provide a value for ${n.replace(/^[+/, "").replace(/]+$/,``)}:`});if(S(e))return;t[n]=e}e=e.map(e=>t[e]||e);let r=n();if(r&&(r.inputArgs=[i.length>0?i[0]:void 0,i.length>1?i[1]:void 0,...e,...i.slice(2)].filter(Boolean)),a=e[0],i=r.inputArgs,!a.startsWith(`-`)){if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`types`)return(await import(`./types.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`prepare`)return(await import(`./prepare.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`lint`)return(await import(`./lint.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`gc`||a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`garbagecollection`)return(await import(`./gc.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`docs`)return(await import(`./docs.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`deploy`||a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`deployment`)return(await import(`./deploy.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`create`)return(await import(`./create.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`clean`)return(await import(`./clean.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`build`)return(await import(`./build.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`changelog`)return(await import(`./changelog.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`completions`)return z(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`update`||a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`upgrade`)return(await import(`./update.mjs`).then(e=>e.handler))(i);if(a.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`help`)return(await import(`./help.mjs`).then(e=>e.handler))(i);if(a&&!a.startsWith(`-`)){let e=l(a,[`types`,`prepare`,`lint`,`gc`,`garbage-collection`,`docs`,`deploy`,`deployment`,`create`,`clean`,`build`,`changelog`,`completions`,`update`,`upgrade`,`help`]).slice(0,3);g(`Unknown command: "${a}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}}return await v(0),D()}(async()=>{let e=new Date;try{process.on(`exit`,()=>U({startDate:e,skipProcessExit:!0,isSynchronous:!0,signal:0})),process.on(`beforeExit`,()=>U({startDate:e,signal:0})),process.on(`message`,t=>{t===`shutdown`&&U({startDate:e,isSynchronous:!0,signal:-128})}),process.once(`SIGTERM`,()=>U({startDate:e,signal:15})),process.once(`SIGINT`,()=>U({startDate:e,signal:2})),process.once(`SIGUSR2`,()=>(s(`The application was terminated by the user`),U({startDate:e,signal:12}))),process.once(`SIGQUIT`,()=>(s(`The application was terminated by the user`),U({startDate:e,signal:12})));for(let t of[`unhandledRejection`,`uncaughtException`])process.on(t,n=>U({startDate:e,exception:n||Error(`An ${t===`unhandledRejection`?`unhandled promise rejection`:`uncaught exception`} occurred during processing - the application is shutting down.`)}));await c(async()=>{let e=await W();e?.error&&g(e.error)}),U({startDate:e})}catch(t){U({startDate:e,exception:t})}})();export{U as exit};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,L as t,M as n,j as r,s as i}from"./prompts-C2GxQEnX.mjs";function a(){t(``),t(i(n.heading.secondary(`Usage:`))),t(n.body.secondary(`${n.usage.bin(`>_ powerlines`)} ${n.usage.command(`build`)} ${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 build.`),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 Build command documentation at ${e(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/build`)}${n.body.tertiary(`.`)}`),{padding:0}),t(``)}export{a as t};
|
package/bin/build.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as e,
|
|
2
|
-
`)}\n`,Math.max(
|
|
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-C2GxQEnX.mjs";import{t as b}from"./update-mR-f3vxG.mjs";import{t as x}from"./create-powerlines-DvusHjN3.mjs";import{t as S}from"./build-DmdL_gU8.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
|
+
`)}\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(`Build`).length+2))/2),0))+_(a.banner.command.primary(`Build`))+` `.repeat(Math.max(Math.ceil((y().columns-(m(`Build`).length+2))/2),0))+p.banner.outline.primary(`┃`),{consoleFn:console.log}),o(_(a.banner.description.primary(`Builds the project for production deployment.`)),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)).build(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(`build`,[`build`],[n],w)}export{T as handler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,L as t,M as n,j as r,s as i,x as a}from"./prompts-C2GxQEnX.mjs";function o(){t(`${i(n.heading.secondary(`Tags: `))} ${n.tags.utility?n.tags.utility(a(` Utility `)):n.tags.$default(a(` Utility `))}`,{padding:0}),t(``),t(i(n.heading.secondary(`Usage:`))),t(n.body.secondary(`${n.usage.bin(`>_ powerlines`)} ${n.usage.command(`changelog`)} ${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(`-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 Changelog command documentation at ${e(`https://docs.stormsoftware.com/projects/powerlines/reference/cli/changelog`)}${n.body.tertiary(`.`)}`),{padding:0}),t(``)}export{o as t};
|