@cyclone-ui/cli 0.0.0-stage → 0.6.3
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/LICENSE +187 -0
- package/README.md +113 -2
- package/dist/add-4Ct1ECRe.mjs +1 -0
- package/dist/add.mjs +4 -0
- package/dist/analyze-a11y-D4BXOl5k.mjs +1 -0
- package/dist/analyze-a11y.mjs +2 -0
- package/dist/bin.mjs +9 -0
- package/dist/build-S4TNQCWg.mjs +1 -0
- package/dist/build.mjs +2 -0
- package/dist/changelog-A0_Ppa5s.mjs +1 -0
- package/dist/changelog.mjs +15 -0
- package/dist/completions-bash-config.mjs +6 -0
- package/dist/completions-bash-script.mjs +6 -0
- package/dist/completions-fish-config.mjs +6 -0
- package/dist/completions-fish-script.mjs +6 -0
- package/dist/completions-powershell-config.mjs +6 -0
- package/dist/completions-powershell-script.mjs +6 -0
- package/dist/completions-zsh-config.mjs +6 -0
- package/dist/completions-zsh-script.mjs +6 -0
- package/dist/components-CL5K9O-8.mjs +10 -0
- package/dist/config-BjzHI2jX.mjs +1 -0
- package/dist/config-CAv0VyPg.mjs +1 -0
- package/dist/config-D4XQ3gm9.mjs +1 -0
- package/dist/config-DUi0QjX_.mjs +1 -0
- package/dist/config-jcI737wh.mjs +1 -0
- package/dist/console-D_4G2UA-.mjs +20 -0
- package/dist/create-tokens-BjbYOiwy.mjs +1 -0
- package/dist/create-tokens.mjs +2 -0
- package/dist/design-system-DjvUB-NN.mjs +1 -0
- package/dist/diff-DzN2w7hv.mjs +1 -0
- package/dist/diff.mjs +2 -0
- package/dist/docs-CnfxeUaA.mjs +1 -0
- package/dist/docs.mjs +4 -0
- package/dist/guidelines-DIsxR2U5.mjs +1 -0
- package/dist/guidelines.mjs +2 -0
- package/dist/help.mjs +2 -0
- package/dist/info-ClmmNogH.mjs +1 -0
- package/dist/info.mjs +2 -0
- package/dist/init-udsV6Bj3.mjs +1 -0
- package/dist/init.mjs +2 -0
- package/dist/list-components-B51vNWex.mjs +1 -0
- package/dist/list-components.mjs +2 -0
- package/dist/list-fonts-CPbihu-x.mjs +1 -0
- package/dist/list-fonts.mjs +2 -0
- package/dist/list-icons-C20yG4GK.mjs +1 -0
- package/dist/list-icons.mjs +2 -0
- package/dist/list-tokens-Cd1ukzZq.mjs +1 -0
- package/dist/list-tokens.mjs +2 -0
- package/dist/local-registry-pqsOERYj.mjs +1 -0
- package/dist/mcp-zebQTrSp.mjs +1 -0
- package/dist/mcp.mjs +48 -0
- package/dist/plan-pV3QhIOh.mjs +1 -0
- package/dist/plan.mjs +2 -0
- package/dist/prompts-BwHSbA_H.mjs +8 -0
- package/dist/registry-BVdDswGJ.mjs +1 -0
- package/dist/registry-C95vaVW8.mjs +1 -0
- package/dist/registry-validate.mjs +2 -0
- package/dist/script-B1VhcRoz.mjs +1 -0
- package/dist/script-CN0WuqZt.mjs +1 -0
- package/dist/script-DMDQ2LKa.mjs +1 -0
- package/dist/script-Z-KdhlYx.mjs +1 -0
- package/dist/search-DNGsv9_x.mjs +1 -0
- package/dist/search-components-BGV0v7Hm.mjs +1 -0
- package/dist/search-components.mjs +3 -0
- package/dist/search-fonts-B_sLwDH3.mjs +1 -0
- package/dist/search-fonts.mjs +3 -0
- package/dist/search-icons-DqNldrjU.mjs +1 -0
- package/dist/search-icons.mjs +3 -0
- package/dist/search-tokens-D9Mdl0Mv.mjs +1 -0
- package/dist/search-tokens.mjs +3 -0
- package/dist/search.mjs +3 -0
- package/dist/shared-BHWQIq8h.mjs +216 -0
- package/dist/shared-BgKqmf2q.mjs +103 -0
- package/dist/shared-Bs-4ebiC.mjs +249 -0
- package/dist/shared-DgLETJ0V.mjs +235 -0
- package/dist/update-B-Dxpo9r.mjs +1 -0
- package/dist/update-C9x3xia0.mjs +1 -0
- package/dist/update.mjs +2 -0
- package/dist/validate-BNf83y5f.mjs +1 -0
- package/dist/view-D7FPS6ra.mjs +1 -0
- package/dist/view.mjs +3 -0
- package/package.json +100 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and
|
|
10
|
+
distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by the
|
|
13
|
+
copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all other
|
|
16
|
+
entities that control, are controlled by, or are under common control with
|
|
17
|
+
that entity. For the purposes of this definition, "control" means (i) the
|
|
18
|
+
power, direct or indirect, to cause the direction or management of such
|
|
19
|
+
entity, whether by contract or otherwise, or (ii) ownership of fifty percent
|
|
20
|
+
(50%) or more of the outstanding shares, or (iii) beneficial ownership of
|
|
21
|
+
such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
|
24
|
+
permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation source, and
|
|
28
|
+
configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical transformation or
|
|
31
|
+
translation of a Source form, including but not limited to compiled object
|
|
32
|
+
code, generated documentation, and conversions to other media types.
|
|
33
|
+
|
|
34
|
+
"Work" shall mean the work of authorship, whether in Source or Object form,
|
|
35
|
+
made available under the License, as indicated by a copyright notice that is
|
|
36
|
+
included in or attached to the work (an example is provided in the Appendix
|
|
37
|
+
below).
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object form,
|
|
40
|
+
that is based on (or derived from) the Work and for which the editorial
|
|
41
|
+
revisions, annotations, elaborations, or other modifications represent, as a
|
|
42
|
+
whole, an original work of authorship. For the purposes of this License,
|
|
43
|
+
Derivative Works shall not include works that remain separable from, or
|
|
44
|
+
merely link (or bind by name) to the interfaces of, the Work and Derivative
|
|
45
|
+
Works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean any work of authorship, including the original
|
|
48
|
+
version of the Work and any modifications or additions to that Work or
|
|
49
|
+
Derivative Works thereof, that is intentionally submitted to Licensor for
|
|
50
|
+
inclusion in the Work by the copyright owner or by an individual or Legal
|
|
51
|
+
Entity authorized to submit on behalf of the copyright owner. For the
|
|
52
|
+
purposes of this definition, "submitted" means any form of electronic,
|
|
53
|
+
verbal, or written communication sent to the Licensor or its representatives,
|
|
54
|
+
including but not limited to communication on electronic mailing lists,
|
|
55
|
+
source code control systems, and issue tracking systems that are managed by,
|
|
56
|
+
or on behalf of, the Licensor for the purpose of discussing and improving the
|
|
57
|
+
Work, but excluding communication that is conspicuously marked or otherwise
|
|
58
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
59
|
+
|
|
60
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on
|
|
61
|
+
behalf of whom a Contribution has been received by Licensor and subsequently
|
|
62
|
+
incorporated within the Work.
|
|
63
|
+
|
|
64
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this
|
|
65
|
+
License, each Contributor hereby grants to You a perpetual, worldwide,
|
|
66
|
+
non-exclusive, no-charge, royalty-free, irrevocable copyright license to
|
|
67
|
+
reproduce, prepare Derivative Works of, publicly display, publicly perform,
|
|
68
|
+
sublicense, and distribute the Work and such Derivative Works in Source or
|
|
69
|
+
Object form.
|
|
70
|
+
|
|
71
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License,
|
|
72
|
+
each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
|
|
73
|
+
no-charge, royalty-free, irrevocable (except as stated in this section)
|
|
74
|
+
patent license to make, have made, use, offer to sell, sell, import, and
|
|
75
|
+
otherwise transfer the Work, where such license applies only to those patent
|
|
76
|
+
claims licensable by such Contributor that are necessarily infringed by their
|
|
77
|
+
Contribution(s) alone or by combination of their Contribution(s) with the
|
|
78
|
+
Work to which such Contribution(s) was submitted. If You institute patent
|
|
79
|
+
litigation against any entity (including a cross-claim or counterclaim in a
|
|
80
|
+
lawsuit) alleging that the Work or a Contribution incorporated within the
|
|
81
|
+
Work constitutes direct or contributory patent infringement, then any patent
|
|
82
|
+
licenses granted to You under this License for that Work shall terminate as
|
|
83
|
+
of the date such litigation is filed.
|
|
84
|
+
|
|
85
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or
|
|
86
|
+
Derivative Works thereof in any medium, with or without modifications, and in
|
|
87
|
+
Source or Object form, provided that You meet the following conditions:
|
|
88
|
+
|
|
89
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy
|
|
90
|
+
of this License; and
|
|
91
|
+
|
|
92
|
+
(b) You must cause any modified files to carry prominent notices stating that
|
|
93
|
+
You changed the files; and
|
|
94
|
+
|
|
95
|
+
(c) You must retain, in the Source form of any Derivative Works that You
|
|
96
|
+
distribute, all copyright, patent, trademark, and attribution notices from
|
|
97
|
+
the Source form of the Work, excluding those notices that do not pertain to
|
|
98
|
+
any part of the Derivative Works; and
|
|
99
|
+
|
|
100
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution,
|
|
101
|
+
then any Derivative Works that You distribute must include a readable copy of
|
|
102
|
+
the attribution notices contained within such NOTICE file, excluding those
|
|
103
|
+
notices that do not pertain to any part of the Derivative Works, in at least
|
|
104
|
+
one of the following places: within a NOTICE text file distributed as part of
|
|
105
|
+
the Derivative Works; within the Source form or documentation, if provided
|
|
106
|
+
along with the Derivative Works; or, within a display generated by the
|
|
107
|
+
Derivative Works, if and wherever such third-party notices normally appear.
|
|
108
|
+
The contents of the NOTICE file are for informational purposes only and do
|
|
109
|
+
not modify the License. You may add Your own attribution notices within
|
|
110
|
+
Derivative Works that You distribute, alongside or as an addendum to the
|
|
111
|
+
NOTICE text from the Work, provided that such additional attribution notices
|
|
112
|
+
cannot be construed as modifying the License.
|
|
113
|
+
|
|
114
|
+
You may add Your own copyright statement to Your modifications and may
|
|
115
|
+
provide additional or different license terms and conditions for use,
|
|
116
|
+
reproduction, or distribution of Your modifications, or for any such
|
|
117
|
+
Derivative Works as a whole, provided Your use, reproduction, and
|
|
118
|
+
distribution of the Work otherwise complies with the conditions stated in
|
|
119
|
+
this License.
|
|
120
|
+
|
|
121
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any
|
|
122
|
+
Contribution intentionally submitted for inclusion in the Work by You to the
|
|
123
|
+
Licensor shall be under the terms and conditions of this License, without any
|
|
124
|
+
additional terms or conditions. Notwithstanding the above, nothing herein
|
|
125
|
+
shall supersede or modify the terms of any separate license agreement you may
|
|
126
|
+
have executed with Licensor regarding such Contributions.
|
|
127
|
+
|
|
128
|
+
6. Trademarks. This License does not grant permission to use the trade names,
|
|
129
|
+
trademarks, service marks, or product names of the Licensor, except as
|
|
130
|
+
required for reasonable and customary use in describing the origin of the
|
|
131
|
+
Work and reproducing the content of the NOTICE file.
|
|
132
|
+
|
|
133
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
|
|
134
|
+
writing, Licensor provides the Work (and each Contributor provides its
|
|
135
|
+
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
136
|
+
KIND, either express or implied, including, without limitation, any
|
|
137
|
+
warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or
|
|
138
|
+
FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining
|
|
139
|
+
the appropriateness of using or redistributing the Work and assume any risks
|
|
140
|
+
associated with Your exercise of permissions under this License.
|
|
141
|
+
|
|
142
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in
|
|
143
|
+
tort (including negligence), contract, or otherwise, unless required by
|
|
144
|
+
applicable law (such as deliberate and grossly negligent acts) or agreed to
|
|
145
|
+
in writing, shall any Contributor be liable to You for damages, including any
|
|
146
|
+
direct, indirect, special, incidental, or consequential damages of any
|
|
147
|
+
character arising as a result of this License or out of the use or inability
|
|
148
|
+
to use the Work (including but not limited to damages for loss of goodwill,
|
|
149
|
+
work stoppage, computer failure or malfunction, or any and all other
|
|
150
|
+
commercial damages or losses), even if such Contributor has been advised of
|
|
151
|
+
the possibility of such damages.
|
|
152
|
+
|
|
153
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or
|
|
154
|
+
Derivative Works thereof, You may choose to offer, and charge a fee for,
|
|
155
|
+
acceptance of support, warranty, indemnity, or other liability obligations
|
|
156
|
+
and/or rights consistent with this License. However, in accepting such
|
|
157
|
+
obligations, You may act only on Your own behalf and on Your sole
|
|
158
|
+
responsibility, not on behalf of any other Contributor, and only if You agree
|
|
159
|
+
to indemnify, defend, and hold each Contributor harmless for any liability
|
|
160
|
+
incurred by, or claims asserted against, such Contributor by reason of your
|
|
161
|
+
accepting any such warranty or additional liability.
|
|
162
|
+
|
|
163
|
+
END OF TERMS AND CONDITIONS
|
|
164
|
+
|
|
165
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
166
|
+
|
|
167
|
+
To apply the Apache License to your work, attach the following
|
|
168
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
169
|
+
replaced with your own identifying information. (Don't include
|
|
170
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
171
|
+
comment syntax for the file format. We also recommend that a
|
|
172
|
+
file or class name and description of purpose be included on the
|
|
173
|
+
same "printed page" as the copyright notice for easier
|
|
174
|
+
identification within third-party archives.
|
|
175
|
+
|
|
176
|
+
Copyright [yyyy] [name of copyright owner]
|
|
177
|
+
|
|
178
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
179
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
180
|
+
License at
|
|
181
|
+
|
|
182
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
183
|
+
|
|
184
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
185
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
186
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
187
|
+
specific language governing permissions and limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,114 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- START header -->
|
|
2
|
+
<!-- END header -->
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
# Cyclone UI - Command-Line Interface (CLI)
|
|
5
|
+
|
|
6
|
+
The Cyclone UI command-line interface application.
|
|
7
|
+
|
|
8
|
+
<!-- START doctoc -->
|
|
9
|
+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
10
|
+
|
|
11
|
+
## Table of Contents
|
|
12
|
+
|
|
13
|
+
- [Cyclone UI - Command-Line Interface (CLI)](#cyclone-ui---command-line-interface-cli)
|
|
14
|
+
- [Table of Contents](#table-of-contents)
|
|
15
|
+
- [Installing](#installing)
|
|
16
|
+
- [Configuration](#configuration)
|
|
17
|
+
- [Development](#development)
|
|
18
|
+
- [Building](#building)
|
|
19
|
+
- [Running unit tests](#running-unit-tests)
|
|
20
|
+
- [Linting](#linting)
|
|
21
|
+
|
|
22
|
+
<!-- END doctoc -->
|
|
23
|
+
|
|
24
|
+
## Installing
|
|
25
|
+
|
|
26
|
+
Using [pnpm](http://pnpm.io):
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pnpm add @cyclone-ui/cli
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
<details>
|
|
33
|
+
<summary>Using npm</summary>
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install @cyclone-ui/cli
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
</details>
|
|
40
|
+
|
|
41
|
+
<details>
|
|
42
|
+
<summary>Using yarn</summary>
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
yarn add @cyclone-ui/cli
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
</details>
|
|
49
|
+
|
|
50
|
+
<!-- shell-shock:commands -->
|
|
51
|
+
<!-- /shell-shock -->
|
|
52
|
+
|
|
53
|
+
The Cyclone CLI follows the registry workflow used by the shadcn CLI while
|
|
54
|
+
retrieving components through the typed Cyclone Registry API.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Create components.json and the local component directory.
|
|
58
|
+
cyclone init
|
|
59
|
+
|
|
60
|
+
# Browse the registry. `list` is an alias for `search`.
|
|
61
|
+
cyclone search --query button
|
|
62
|
+
|
|
63
|
+
# Inspect or install registry components.
|
|
64
|
+
cyclone view button
|
|
65
|
+
cyclone add button
|
|
66
|
+
|
|
67
|
+
# Preview an installation or compare installed files with the registry.
|
|
68
|
+
cyclone add button --dry-run
|
|
69
|
+
cyclone diff button
|
|
70
|
+
|
|
71
|
+
# Inspect the current project configuration.
|
|
72
|
+
cyclone info
|
|
73
|
+
|
|
74
|
+
# Validate and build a distributable shadcn-format registry.
|
|
75
|
+
cyclone registry validate registry.json
|
|
76
|
+
cyclone build registry.json --output public/r
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`init` writes a `components.json` file containing the registry API URL, output
|
|
80
|
+
path, and installed component manifest. `add` resolves internal component
|
|
81
|
+
dependencies, refuses to overwrite changed files unless `--overwrite` is
|
|
82
|
+
provided, updates package dependencies, and records the installed version and
|
|
83
|
+
files. Registry file paths are constrained to the configured component
|
|
84
|
+
directory.
|
|
85
|
+
|
|
86
|
+
## Configuration
|
|
87
|
+
|
|
88
|
+
<!-- shell-shock:env -->
|
|
89
|
+
<!-- /shell-shock -->
|
|
90
|
+
|
|
91
|
+
## Development
|
|
92
|
+
|
|
93
|
+
This project is built using [Nx](https://nx.dev). As a result, many of the usual
|
|
94
|
+
commands are available to assist in development.
|
|
95
|
+
|
|
96
|
+
### Building
|
|
97
|
+
|
|
98
|
+
Run `nx build cli` to build the library. The Razorwind Shell Shock plugin
|
|
99
|
+
extracts this repository's design system during the build and bakes its tokens,
|
|
100
|
+
components, icons and fonts into CLI commands and MCP tools. No Razorwind
|
|
101
|
+
configuration or generated snapshot is needed at runtime.
|
|
102
|
+
|
|
103
|
+
### Running unit tests
|
|
104
|
+
|
|
105
|
+
Run `nx test cli` to execute the unit tests via
|
|
106
|
+
[Vitest](https://vitest.dev).
|
|
107
|
+
|
|
108
|
+
### Linting
|
|
109
|
+
|
|
110
|
+
Run `nx lint cli` to run
|
|
111
|
+
[ESLint](https://eslint.org/) on the package.
|
|
112
|
+
|
|
113
|
+
<!-- START footer -->
|
|
114
|
+
<!-- END footer -->
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as e,S as t,h as n,t as r,x as i}from"./console-D_4G2UA-.mjs";function a(){e(``),e(r(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`add`)} ${t.usage.args(`<components...>`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`add`)} ${t.usage.options(`[options]`)} ${t.usage.args(`<components...>`)}`),{padding:0}),e(``),e(r(t.heading.secondary(`Options:`))),i([[{value:t.body.primary(`--all`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Add every available component.`),align:`left`,border:`none`}],[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--cwd <cwd>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`The working directory.`),align:`left`,border:`none`}],[{value:t.body.primary(`--diff`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the changes as a diff without writing files.`),align:`left`,border:`none`}],[{value:t.body.primary(`--dry-run`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Preview changes without writing files.`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--overwrite`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Overwrite existing files.`),align:`left`,border:`none`}],[{value:t.body.primary(`--path <path>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Override the configured component output path.`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--registry <registry>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Override the configured registry API URL.`),align:`left`,border:`none`}],[{value:t.body.primary(`--silent`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Mute non-essential output.`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--view`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show resolved file contents without writing files.`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the Add command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/add`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{a as t};
|
package/dist/add.mjs
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{A as e,B as t,D as n,E as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-D_4G2UA-.mjs";import{a as b}from"./prompts-BwHSbA_H.mjs";import{t as x}from"./update-C9x3xia0.mjs";import{a as S}from"./config-D4XQ3gm9.mjs";import{n as C}from"./registry-C95vaVW8.mjs";import{i as w,n as T,r as E,t as D}from"./components-CL5K9O-8.mjs";import{t as O}from"./add-4Ct1ECRe.mjs";import{resolve as k}from"node:path";async function A(r=500){if(t().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||m)return;t().set(`is-banner-displayed`,!0),n(``),n(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+_(u.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let a=Math.max(...b.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone User Interface`:`\n${b.join(`
|
|
2
|
+
`)}\n`;p(a,Math.max(h().columns-30,20)).forEach(e=>{n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Add`).length+2))/2),0))+_(u.banner.command.primary(`Add`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Add`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Adds a new component to the project.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),n(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+_(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!o()&&await l(r)}async function j(e,t=[]){let n=k(e.cwd??process.cwd()),i=await S(n),a=C(e.registry??i.registry),o=e.all?(await a.components.list.query()).map(e=>e.name):t;if(o.length===0)throw Error(`Provide at least one component or use --all.`);let s=e.dryRun||e.diff||e.view,c=await T(a,i,o,{root:n,path:e.path,overwrite:e.overwrite,dryRun:s});e.diff?r(E(c,n)):e.view?r(c.files.map(e=>`// ${e.path}\n${e.content}`).join(`
|
|
3
|
+
|
|
4
|
+
`)):e.silent||r(w(c,n)),await D(i,c,{root:n,path:e.path,overwrite:e.overwrite,dryRun:s})}async function M(e=c()){let t={...y()};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`)/^--?(cwd)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.cwd=r.replace(/^--?(cwd)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.cwd=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`overwrite=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`overwrite`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`overwrite=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`overwrite`){if(/^--?(overwrite)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(overwrite)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.overwrite=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.overwrite=!0}else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`all=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`all`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`all=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`all`){if(/^--?(all)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(all)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.all=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.all=!0}else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`path=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`path`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`path=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`path`)/^--?(path)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.path=r.replace(/^--?(path)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.path=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`dryrun=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`dryrun`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`dryrun=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`dryrun`){if(/^--?(dryrun)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(dryrun)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.dryRun=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.dryRun=!0}else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`diff=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`diff`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`diff=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`diff`){if(/^--?(diff)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(diff)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.diff=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.diff=!0}else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`view=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`view`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`view=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`view`){if(/^--?(view)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(view)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.view=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.view=!0}else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`silent=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`silent`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`silent=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`silent`){if(/^--?(silent)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(silent)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.silent=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.silent=!0}else(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`registry=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`registry=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`)&&(/^--?(registry)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.registry=r.replace(/^--?(registry)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.registry=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}let r=Math.max(0,e.slice(2).findIndex(e=>e.startsWith(`-`)&&/^(cwd|overwrite|all|path|dryrun|diff|view|silent|registry)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,l=r>2?2:Math.max(0,e.slice(r).findLastIndex(e=>e.startsWith(`-`)&&/^(cwd|overwrite|all|path|dryrun|diff|view|silent|registry)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,p=[];return l+0<e.length&&l+0!==r&&(p=e.slice(l+0,(r>l?r:e.length)-1).join(` `).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)),i(`quiet`)||(await A(),await x()),!o()&&!i(`quiet`)&&(n(``),(s||a||d.LOG_LEVEL===`debug`)&&n(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?O():f(`add`,[`add`],[t,p],j)}export{M as handler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-D_4G2UA-.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.designSystem?t.tags.designSystem(r(` Design System `)):t.tags.default(r(` Design System `))} ${t.tags.accessibility?t.tags.accessibility(r(` Accessibility `)):t.tags.default(r(` Accessibility `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`analyze-a11y`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(``),e(i(t.heading.secondary(`Options:`))),a([[{value:t.body.primary(`--code <code>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Source code of a React component or JSX snippet to analyze.`),align:`left`,border:`none`}],[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--component-name <component_name>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Optional label for the component under review.`),align:`left`,border:`none`}],[{value:t.body.primary(`--context <context>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Optional usage context (for example "in a form" or "modal").`),align:`left`,border:`none`}],[{value:t.body.primary(`--file <file>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Path to a source file to analyze (alternative to --code).`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--pattern-analysis`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Run regex-based heuristics (unlabeled buttons, missing alt, …) (default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the Analyze Accessibility command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/analyze-a11y`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-D_4G2UA-.mjs";import{a as y}from"./prompts-BwHSbA_H.mjs";import{t as b}from"./update-C9x3xia0.mjs";import{t as x}from"./design-system-DjvUB-NN.mjs";import{t as S}from"./analyze-a11y-D4BXOl5k.mjs";import{readFile as C}from"node:fs/promises";import{analyzeA11y as w}from"@razorwind/shell-shock/runtime";async function T(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...y.map(e=>_(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
|
|
2
|
+
`)}\n`;f(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(`Analyze Accessibility`).length+2))/2),0))+g(l.banner.command.primary(`Analyze Accessibility`))+` `.repeat(Math.max(Math.ceil((m().columns-(_(`Analyze Accessibility`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),f(g(l.banner.description.primary(`Analyze a React/JSX source string (or file) for likely accessibility issues and hard-coded colors, suggesting the nearest design tokens for each color.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}function E(e){process.stdout.write(`${typeof e==`string`?e:JSON.stringify(e,null,2)}\n`)}async function D(e){let t=e.code??(e.file?await C(e.file,`utf8`):void 0);t?E(w(x,t,{componentName:e.componentName,context:e.context,includePatternAnalysis:e.patternAnalysis!==!1})):(E({error:`Provide source code via --code or a path via --file.`}),process.exitCode=1)}async function O(e=s()){let t={...v(),patternAnalysis:!0};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`code=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`code`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`code=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`code`)/^--?(code)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.code=r.replace(/^--?(code)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.code=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`file=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`file`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`file=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`file`)/^--?(file)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.file=r.replace(/^--?(file)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.file=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`componentname=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`componentname`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`componentname=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`componentname`)/^--?(componentname)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.componentName=r.replace(/^--?(componentname)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.componentName=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`context=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`context`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`context=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`context`)/^--?(context)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.context=r.replace(/^--?(context)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.context=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`patternanalysis=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`patternanalysis`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`patternanalysis=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`patternanalysis`){if(/^--?(patternanalysis)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(patternanalysis)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.patternAnalysis=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.patternAnalysis=!0}}return r(`quiet`)||(await T(),await b()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?S():d(`analyze-a11y`,[`analyze-a11y`],[t],D)}export{O as handler};
|
package/dist/bin.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import{A as e,B as t,D as n,F as r,H as i,I as a,L as o,N as s,O as c,R as l,S as u,_ as d,c as f,j as p,k as m,n as h,t as g,w as _,y as v}from"./console-D_4G2UA-.mjs";import{a as y,n as b,o as x,r as S,t as C}from"./prompts-BwHSbA_H.mjs";import{a as w,i as T,n as E,o as D,r as O,s as k,t as A}from"./registry-BVdDswGJ.mjs";async function j(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+g(u.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...y.map(e=>v(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
|
|
4
|
+
`)}\n`;d(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(e).length+2))/2),0))+g(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(v(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(`Completions`).length+2))/2),0))+g(u.banner.command.primary(`Completions`))+` `.repeat(Math.max(Math.ceil((m().columns-(v(`Completions`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),d(g(u.banner.description.primary(`Commands for generating shell completion scripts for Cyclone User Interface.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(v(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+` `+g(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await s(i)}async function M(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+g(u.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...y.map(e=>v(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
|
|
5
|
+
`)}\n`;d(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(e).length+2))/2),0))+g(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(v(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(`Completions - Bash`).length+2))/2),0))+g(u.banner.command.primary(`Completions - Bash`))+` `.repeat(Math.max(Math.ceil((m().columns-(v(`Completions - Bash`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),d(g(u.banner.description.primary(`Commands to setup bash completions for the Cyclone User Interface command-line interface.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(v(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+` `+g(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await s(i)}async function N(t=o()){let n=``;if(t.length>4&&t[4]&&(n=t[4]),!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-bash-script.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-bash-config.mjs`).then(e=>e.handler))(t);if(n&&!n.startsWith(`-`)){let e=c(n,[`script`,`config`]).slice(0,3);f(`Unknown command: "${n}"${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&&!a()){await M();let e=await b({message:`Which command would you like to execute?`,options:[{value:[`completions`,`bash`,`script`],label:`Completions - Bash Script`,description:`(cyclone-ui completions bash script)`,icon:`🖵`},{value:[`completions`,`bash`,`config`],label:`Completions - Bash Configuration`,description:`(cyclone-ui completions bash config)`,icon:`🖵`}]});if(C(e))return;let r={};for(let t of e.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let e=await S({message:`Please provide a value for ${t.replace(/^[+/, "").replace(/]+$/,``)}:`});if(C(e))return;r[t]=e}e=e.map(e=>r[e]||e);let i=l();if(i&&(i.inputArgs=[t.length>0?t[0]:void 0,t.length>1?t[1]:void 0,...e,...t.slice(4)].filter(Boolean)),n=e[0],t=i.inputArgs,!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-bash-script.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-bash-config.mjs`).then(e=>e.handler))(t);if(n&&!n.startsWith(`-`)){let e=c(n,[`script`,`config`]).slice(0,3);f(`Unknown command: "${n}"${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 P(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+g(u.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...y.map(e=>v(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
|
|
6
|
+
`)}\n`;d(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(e).length+2))/2),0))+g(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(v(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(`Completions - Fish`).length+2))/2),0))+g(u.banner.command.primary(`Completions - Fish`))+` `.repeat(Math.max(Math.ceil((m().columns-(v(`Completions - Fish`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),d(g(u.banner.description.primary(`Commands to setup Fish completions for the Cyclone User Interface command-line interface.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(v(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+` `+g(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await s(i)}async function F(t=o()){let n=``;if(t.length>4&&t[4]&&(n=t[4]),!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-fish-script.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-fish-config.mjs`).then(e=>e.handler))(t);if(n&&!n.startsWith(`-`)){let e=c(n,[`script`,`config`]).slice(0,3);f(`Unknown command: "${n}"${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&&!a()){await P();let e=await b({message:`Which command would you like to execute?`,options:[{value:[`completions`,`fish`,`script`],label:`Completions - Fish Script`,description:`(cyclone-ui completions fish script)`,icon:`🖵`},{value:[`completions`,`fish`,`config`],label:`Completions - Fish Configuration`,description:`(cyclone-ui completions fish config)`,icon:`🖵`}]});if(C(e))return;let r={};for(let t of e.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let e=await S({message:`Please provide a value for ${t.replace(/^[+/, "").replace(/]+$/,``)}:`});if(C(e))return;r[t]=e}e=e.map(e=>r[e]||e);let i=l();if(i&&(i.inputArgs=[t.length>0?t[0]:void 0,t.length>1?t[1]:void 0,...e,...t.slice(4)].filter(Boolean)),n=e[0],t=i.inputArgs,!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-fish-script.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-fish-config.mjs`).then(e=>e.handler))(t);if(n&&!n.startsWith(`-`)){let e=c(n,[`script`,`config`]).slice(0,3);f(`Unknown command: "${n}"${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 I(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+g(u.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...y.map(e=>v(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
|
|
7
|
+
`)}\n`;d(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(e).length+2))/2),0))+g(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(v(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(`Completions - PowerShell`).length+2))/2),0))+g(u.banner.command.primary(`Completions - PowerShell`))+` `.repeat(Math.max(Math.ceil((m().columns-(v(`Completions - PowerShell`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),d(g(u.banner.description.primary(`Commands to setup PowerShell completions for the Cyclone User Interface command-line interface.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(v(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+` `+g(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await s(i)}async function L(t=o()){let n=``;if(t.length>4&&t[4]&&(n=t[4]),!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-powershell-script.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-powershell-config.mjs`).then(e=>e.handler))(t);if(n&&!n.startsWith(`-`)){let e=c(n,[`script`,`config`]).slice(0,3);f(`Unknown command: "${n}"${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&&!a()){await I();let e=await b({message:`Which command would you like to execute?`,options:[{value:[`completions`,`powershell`,`script`],label:`Completions - PowerShell Script`,description:`(cyclone-ui completions powershell script)`,icon:`🖵`},{value:[`completions`,`powershell`,`config`],label:`Completions - PowerShell Configuration`,description:`(cyclone-ui completions powershell config)`,icon:`🖵`}]});if(C(e))return;let r={};for(let t of e.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let e=await S({message:`Please provide a value for ${t.replace(/^[+/, "").replace(/]+$/,``)}:`});if(C(e))return;r[t]=e}e=e.map(e=>r[e]||e);let i=l();if(i&&(i.inputArgs=[t.length>0?t[0]:void 0,t.length>1?t[1]:void 0,...e,...t.slice(4)].filter(Boolean)),n=e[0],t=i.inputArgs,!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-powershell-script.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-powershell-config.mjs`).then(e=>e.handler))(t);if(n&&!n.startsWith(`-`)){let e=c(n,[`script`,`config`]).slice(0,3);f(`Unknown command: "${n}"${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 R(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+g(u.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...y.map(e=>v(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
|
|
8
|
+
`)}\n`;d(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(e).length+2))/2),0))+g(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(v(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(`Completions - Zsh`).length+2))/2),0))+g(u.banner.command.primary(`Completions - Zsh`))+` `.repeat(Math.max(Math.ceil((m().columns-(v(`Completions - Zsh`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),d(g(u.banner.description.primary(`Commands to setup Zsh completions for the Cyclone User Interface command-line interface.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(v(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+` `+g(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await s(i)}async function z(t=o()){let n=``;if(t.length>4&&t[4]&&(n=t[4]),!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-zsh-script.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-zsh-config.mjs`).then(e=>e.handler))(t);if(n&&!n.startsWith(`-`)){let e=c(n,[`script`,`config`]).slice(0,3);f(`Unknown command: "${n}"${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&&!a()){await R();let e=await b({message:`Which command would you like to execute?`,options:[{value:[`completions`,`zsh`,`script`],label:`Completions - Zsh Script`,description:`(cyclone-ui completions zsh script)`,icon:`🖵`},{value:[`completions`,`zsh`,`config`],label:`Completions - Zsh Configuration`,description:`(cyclone-ui completions zsh config)`,icon:`🖵`}]});if(C(e))return;let r={};for(let t of e.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let e=await S({message:`Please provide a value for ${t.replace(/^[+/, "").replace(/]+$/,``)}:`});if(C(e))return;r[t]=e}e=e.map(e=>r[e]||e);let i=l();if(i&&(i.inputArgs=[t.length>0?t[0]:void 0,t.length>1?t[1]:void 0,...e,...t.slice(4)].filter(Boolean)),n=e[0],t=i.inputArgs,!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`script`)return(await import(`./completions-zsh-script.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`config`)return(await import(`./completions-zsh-config.mjs`).then(e=>e.handler))(t);if(n&&!n.startsWith(`-`)){let e=c(n,[`script`,`config`]).slice(0,3);f(`Unknown command: "${n}"${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 B(t=o()){let n=``;if(t.length>3&&t[3]&&(n=t[3]),!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`bash`)return N(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`zsh`)return z(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`powershell`)return L(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`fish`)return F(t);if(n&&!n.startsWith(`-`)){let e=c(n,[`bash`,`zsh`,`powershell`,`fish`]).slice(0,3);f(`Unknown command: "${n}"${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&&!a()){await j();let e=await b({message:`Which command would you like to execute?`,options:[{value:[`completions`,`bash`,`script`],label:`Completions - Bash Script`,description:`(cyclone-ui completions bash script)`,icon:`🖵`},{value:[`completions`,`bash`,`config`],label:`Completions - Bash Configuration`,description:`(cyclone-ui completions bash config)`,icon:`🖵`},{value:[`completions`,`zsh`,`script`],label:`Completions - Zsh Script`,description:`(cyclone-ui completions zsh script)`,icon:`🖵`},{value:[`completions`,`zsh`,`config`],label:`Completions - Zsh Configuration`,description:`(cyclone-ui completions zsh config)`,icon:`🖵`},{value:[`completions`,`powershell`,`script`],label:`Completions - PowerShell Script`,description:`(cyclone-ui completions powershell script)`,icon:`🖵`},{value:[`completions`,`powershell`,`config`],label:`Completions - PowerShell Configuration`,description:`(cyclone-ui completions powershell config)`,icon:`🖵`},{value:[`completions`,`fish`,`script`],label:`Completions - Fish Script`,description:`(cyclone-ui completions fish script)`,icon:`🖵`},{value:[`completions`,`fish`,`config`],label:`Completions - Fish Configuration`,description:`(cyclone-ui completions fish config)`,icon:`🖵`}]});if(C(e))return;let r={};for(let t of e.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let e=await S({message:`Please provide a value for ${t.replace(/^[+/, "").replace(/]+$/,``)}:`});if(C(e))return;r[t]=e}e=e.map(e=>r[e]||e);let i=l();if(i&&(i.inputArgs=[t.length>0?t[0]:void 0,t.length>1?t[1]:void 0,...e,...t.slice(3)].filter(Boolean)),n=e[0],t=i.inputArgs,!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`bash`)return N(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`zsh`)return z(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`powershell`)return L(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`fish`)return F(t);if(n&&!n.startsWith(`-`)){let e=c(n,[`bash`,`zsh`,`powershell`,`fish`]).slice(0,3);f(`Unknown command: "${n}"${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 V(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+u.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+g(u.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...y.map(e=>v(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
|
|
9
|
+
`)}\n`;d(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(e).length+2))/2),0))+g(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(v(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(`Registry Commands`).length+2))/2),0))+g(u.banner.command.primary(`Registry Commands`))+` `.repeat(Math.max(Math.ceil((m().columns-(v(`Registry Commands`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),d(g(u.banner.description.primary(`A collection of available Registry commands that are included in the Cyclone User Interface command-line application.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(v(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+` `+g(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await s(i)}async function H(t=o()){let n=``;if(t.length>3&&t[3]&&(n=t[3]),!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`validate`)return(await import(`./registry-validate.mjs`).then(e=>e.handler))(t);if(n&&!n.startsWith(`-`)){let e=c(n,[`validate`]).slice(0,3);f(`Unknown command: "${n}"${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&&!a()){await V();let e=await b({message:`Which command would you like to execute?`,options:[{value:[`registry`,`validate`],label:`Validate Registry`,description:`(cyclone-ui registry validate)`,icon:`✓`}]});if(C(e))return;let r={};for(let t of e.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let e=await S({message:`Please provide a value for ${t.replace(/^[+/, "").replace(/]+$/,``)}:`});if(C(e))return;r[t]=e}e=e.map(e=>r[e]||e);let i=l();if(i&&(i.inputArgs=[t.length>0?t[0]:void 0,t.length>1?t[1]:void 0,...e,...t.slice(3)].filter(Boolean)),n=e[0],t=i.inputArgs,!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`validate`)return(await import(`./registry-validate.mjs`).then(e=>e.handler))(t);if(n&&!n.startsWith(`-`)){let e=c(n,[`validate`]).slice(0,3);f(`Unknown command: "${n}"${e&&e.length>0?`, did you mean: ${e.length===1?`"${e[0]}"`:e.map((t,n)=>n<e.length-1?`"${t}", `:`or "${t}"`)}?`:``} `)}}}return A()}let U=!1;const W=[],G=[];async function K(e={}){try{if(U)return;U=!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&&f({message:`A fatal error occured while running the application - please contact the Cyclone User Interface 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)=>{r(`quiet`)||_(`The Cyclone User Interface 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 G)e(t);if(!e.isSynchronous){let e=[],r=0;for(let[n,i]of W)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){f(`The exit process failed to complete${t?.message?` - ${t.message}`:``}. Please contact the Cyclone User Interface support team.`),e.skipProcessExit||process.nextTick(()=>process.exit(1))}}async function q(){if(r([`version`,`v`])){console.log(`0.6.2`);return}let t=o(),n=``;if(t.length>2&&t[2]&&(n=t[2]),!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`view`)return(await import(`./view.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`search`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`list`)return(await import(`./search.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`init`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`create`)return(await import(`./init.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`info`)return(await import(`./info.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`docs`)return(await import(`./docs.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`diff`)return(await import(`./diff.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`createtokens`)return(await import(`./create-tokens.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`build`)return(await import(`./build.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`add`)return(await import(`./add.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`changelog`)return(await import(`./changelog.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`completions`)return B(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`update`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`upgrade`)return(await import(`./update.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`searchtokens`)return(await import(`./search-tokens.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`listtokens`)return(await import(`./list-tokens.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`searchcomponents`)return(await import(`./search-components.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`listcomponents`)return(await import(`./list-components.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`searchicons`)return(await import(`./search-icons.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`listicons`)return(await import(`./list-icons.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`searchfonts`)return(await import(`./search-fonts.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`listfonts`)return(await import(`./list-fonts.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`plan`)return(await import(`./plan.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`guidelines`)return(await import(`./guidelines.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`analyzea11y`)return(await import(`./analyze-a11y.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`mcp`)return(await import(`./mcp.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`)return H(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`help`)return(await import(`./help.mjs`).then(e=>e.handler))(t);if(n&&!n.startsWith(`-`)){let e=c(n,/* @__PURE__ */ `view.search.list.init.create.info.docs.diff.create-tokens.build.add.changelog.completions.update.upgrade.search-tokens.list-tokens.search-components.list-components.search-icons.list-icons.search-fonts.list-fonts.plan.guidelines.analyze-a11y.mcp.registry.help`.split(`.`)).slice(0,3);f(`Unknown command: "${n}"${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&&!a()){await x();let e=await b({message:`Which command would you like to execute?`,options:[{value:[`view`],label:`View Registry Components`,description:`(cyclone-ui view)`,icon:`◉`},{value:[`search`],label:`Search Registry`,description:`(cyclone-ui search)`,icon:`⌕`},{value:[`init`],label:`Initialize`,description:`(cyclone-ui init)`,icon:`🌀`},{value:[`info`],label:`Project Information`,description:`(cyclone-ui info)`,icon:`ⓘ`},{value:[`docs`],label:`Component Documentation`,description:`(cyclone-ui docs)`,icon:`🕮`},{value:[`diff`],label:`Diff Components`,description:`(cyclone-ui diff)`,icon:`±`},{value:[`create-tokens`],label:`Create Tokens`,description:`(cyclone-ui create-tokens)`,icon:`🏗`},{value:[`build`],label:`Build Registry`,description:`(cyclone-ui build)`,icon:`🏗`},{value:[`add`],label:`Add`,description:`(cyclone-ui add)`,icon:`➕`},{value:[`changelog`],label:`Changelog`,description:`(cyclone-ui changelog)`,icon:`🗃`},{value:[`completions`,`bash`,`script`],label:`Completions - Bash Script`,description:`(cyclone-ui completions bash script)`,icon:`🖵`},{value:[`completions`,`bash`,`config`],label:`Completions - Bash Configuration`,description:`(cyclone-ui completions bash config)`,icon:`🖵`},{value:[`completions`,`zsh`,`script`],label:`Completions - Zsh Script`,description:`(cyclone-ui completions zsh script)`,icon:`🖵`},{value:[`completions`,`zsh`,`config`],label:`Completions - Zsh Configuration`,description:`(cyclone-ui completions zsh config)`,icon:`🖵`},{value:[`completions`,`powershell`,`script`],label:`Completions - PowerShell Script`,description:`(cyclone-ui completions powershell script)`,icon:`🖵`},{value:[`completions`,`powershell`,`config`],label:`Completions - PowerShell Configuration`,description:`(cyclone-ui completions powershell config)`,icon:`🖵`},{value:[`completions`,`fish`,`script`],label:`Completions - Fish Script`,description:`(cyclone-ui completions fish script)`,icon:`🖵`},{value:[`completions`,`fish`,`config`],label:`Completions - Fish Configuration`,description:`(cyclone-ui completions fish config)`,icon:`🖵`},{value:[`update`],label:`Update`,description:`(cyclone-ui update)`,icon:`🖒`},{value:[`search-tokens`],label:`Search Tokens`,description:`(cyclone-ui search-tokens)`,icon:`🎨`},{value:[`list-tokens`],label:`List Tokens`,description:`(cyclone-ui list-tokens)`,icon:`🎨`},{value:[`search-components`],label:`Search Components`,description:`(cyclone-ui search-components)`,icon:`🧩`},{value:[`list-components`],label:`List Components`,description:`(cyclone-ui list-components)`,icon:`🧩`},{value:[`search-icons`],label:`Search Icons`,description:`(cyclone-ui search-icons)`,icon:`🖼`},{value:[`list-icons`],label:`List Icons`,description:`(cyclone-ui list-icons)`,icon:`🖼`},{value:[`search-fonts`],label:`Search Fonts`,description:`(cyclone-ui search-fonts)`,icon:`🔤`},{value:[`list-fonts`],label:`List Fonts`,description:`(cyclone-ui list-fonts)`,icon:`🔤`},{value:[`plan`],label:`Plan`,description:`(cyclone-ui plan)`,icon:`🗺`},{value:[`guidelines`],label:`Guidelines`,description:`(cyclone-ui guidelines)`,icon:`📖`},{value:[`analyze-a11y`],label:`Analyze Accessibility`,description:`(cyclone-ui analyze-a11y)`,icon:`♿`},{value:[`mcp`],label:`MCP Server`,description:`(cyclone-ui mcp)`,icon:`🔌`},{value:[`registry`,`validate`],label:`Validate Registry`,description:`(cyclone-ui registry validate)`,icon:`✓`},{value:[`help`],label:`Help`,description:`(cyclone-ui help)`,icon:`🛈`}]});if(C(e))return;let r={};for(let t of e.filter(e=>e.startsWith(`[`)&&e.endsWith(`]`))){let e=await S({message:`Please provide a value for ${t.replace(/^[+/, "").replace(/]+$/,``)}:`});if(C(e))return;r[t]=e}e=e.map(e=>r[e]||e);let i=l();if(i&&(i.inputArgs=[t.length>0?t[0]:void 0,t.length>1?t[1]:void 0,...e,...t.slice(2)].filter(Boolean)),n=e[0],t=i.inputArgs,!n.startsWith(`-`)){if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`view`)return(await import(`./view.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`search`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`list`)return(await import(`./search.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`init`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`create`)return(await import(`./init.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`info`)return(await import(`./info.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`docs`)return(await import(`./docs.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`diff`)return(await import(`./diff.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`createtokens`)return(await import(`./create-tokens.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`build`)return(await import(`./build.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`add`)return(await import(`./add.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`changelog`)return(await import(`./changelog.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`completions`)return B(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`update`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`upgrade`)return(await import(`./update.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`searchtokens`)return(await import(`./search-tokens.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`listtokens`)return(await import(`./list-tokens.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`searchcomponents`)return(await import(`./search-components.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`listcomponents`)return(await import(`./list-components.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`searchicons`)return(await import(`./search-icons.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`listicons`)return(await import(`./list-icons.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`searchfonts`)return(await import(`./search-fonts.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`listfonts`)return(await import(`./list-fonts.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`plan`)return(await import(`./plan.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`guidelines`)return(await import(`./guidelines.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`analyzea11y`)return(await import(`./analyze-a11y.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`mcp`)return(await import(`./mcp.mjs`).then(e=>e.handler))(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`)return H(t);if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`help`)return(await import(`./help.mjs`).then(e=>e.handler))(t);if(n&&!n.startsWith(`-`)){let e=c(n,/* @__PURE__ */ `view.search.list.init.create.info.docs.diff.create-tokens.build.add.changelog.completions.update.upgrade.search-tokens.list-tokens.search-components.list-components.search-icons.list-icons.search-fonts.list-fonts.plan.guidelines.analyze-a11y.mcp.registry.help`.split(`.`)).slice(0,3);f(`Unknown command: "${n}"${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 x(0),k()}(async()=>{let e=/* @__PURE__ */ new Date;try{process.on(`exit`,()=>K({startDate:e,skipProcessExit:!0,isSynchronous:!0,signal:0})),process.on(`beforeExit`,()=>K({startDate:e,signal:0})),process.on(`message`,t=>{t===`shutdown`&&K({startDate:e,isSynchronous:!0,signal:-128})}),process.once(`SIGTERM`,()=>K({startDate:e,signal:15})),process.once(`SIGINT`,()=>K({startDate:e,signal:2})),process.once(`SIGUSR2`,()=>(_(`The application was terminated by the user`),K({startDate:e,signal:12}))),process.once(`SIGQUIT`,()=>(_(`The application was terminated by the user`),K({startDate:e,signal:12})));for(let t of[`unhandledRejection`,`uncaughtException`])process.on(t,n=>K({startDate:e,exception:n||/* @__PURE__ */ Error(`An ${t===`unhandledRejection`?`unhandled promise rejection`:`uncaught exception`} occurred during processing - the application is shutting down.`)}));await i(async()=>{let e=await q();e?.error&&f(e.error)})}catch(t){K({startDate:e,exception:t})}})();export{K as exit};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as e,S as t,h as n,t as r,x as i}from"./console-D_4G2UA-.mjs";function a(){e(``),e(r(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`build`)} ${t.usage.args(`<registry>`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`build`)} ${t.usage.options(`[options]`)} ${t.usage.args(`<registry>`)}`),{padding:0}),e(``),e(r(t.heading.secondary(`Options:`))),i([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--cwd <cwd>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`The working directory.`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--output <output>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Output directory.`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the Build Registry command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/build`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{a as t};
|
package/dist/build.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,b as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-D_4G2UA-.mjs";import{a as b}from"./prompts-BwHSbA_H.mjs";import{t as x}from"./update-C9x3xia0.mjs";import{t as S}from"./build-S4TNQCWg.mjs";import{n as C,t as w}from"./local-registry-pqsOERYj.mjs";import{dirname as T,resolve as E}from"node:path";import{mkdir as D,writeFile as O}from"node:fs/promises";async function k(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||m)return;t().set(`is-banner-displayed`,!0),n(``),n(g.banner.outline.primary(`┏`)+g.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+g.banner.outline.primary(`━`)+` `+_(l.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+g.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...b.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone User Interface`:`\n${b.join(`
|
|
2
|
+
`)}\n`;f(o,Math.max(h().columns-30,20)).forEach(e=>{n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Build Registry`).length+2))/2),0))+_(l.banner.command.primary(`Build Registry`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Build Registry`).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),f(_(l.banner.description.primary(`Build registry item JSON files for distribution.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(g.banner.outline.primary(`┃`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`┃`),{consoleFn:console.log}),n(g.banner.outline.primary(`┗`)+g.banner.outline.primary(`━`.repeat(Math.max(h().columns-32,0)))+` `+_(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`━`.repeat(6))+g.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}async function A(e,t=`registry.json`){let n=E(e.cwd??process.cwd()),r=await C(E(n,t)),i=await w(n,r,e.output??`public/r`);for(let e of i)await D(T(e.path),{recursive:!0}),await O(e.path,e.content,`utf8`);p(`Built ${i.length} registry items.`)}async function j(e=s()){let t={...y()};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`?/^--?(cwd)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.cwd=r.replace(/^--?(cwd)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.cwd=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)):(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`output=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`output`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`output=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`output`)&&(/^--?(output)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.output=r.replace(/^--?(output)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.output=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}let c=Math.max(0,e.slice(2).findIndex(e=>e.startsWith(`-`)&&/^(cwd|output)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,f=c>2?2:Math.max(0,e.slice(c).findLastIndex(e=>e.startsWith(`-`)&&/^(cwd|output)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,p=`registry.json`;return f+0<e.length&&f+0!==c&&(p=e[f+0]),r(`quiet`)||(await k(),await x()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?S():d(`build`,[`build`],[t,p],A)}export{j as handler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-D_4G2UA-.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.utility?t.tags.utility(r(` Utility `)):t.tags.default(r(` Utility `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`changelog`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(``),e(i(t.heading.secondary(`Options:`))),a([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the Changelog command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/changelog`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-D_4G2UA-.mjs";import{a as y}from"./prompts-BwHSbA_H.mjs";import{t as b}from"./update-C9x3xia0.mjs";import{t as x}from"./changelog-A0_Ppa5s.mjs";import{bold as S,textColors as C}from"node:console";async function w(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...y.map(e=>_(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
|
|
2
|
+
`)}\n`;f(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(`Changelog`).length+2))/2),0))+g(l.banner.command.primary(`Changelog`))+` `.repeat(Math.max(Math.ceil((m().columns-(_(`Changelog`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),f(g(l.banner.description.primary(`Display the Cyclone User Interface changelog.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}function T(){console.log(`${C.body.primary(`textColors.body.primary("[Image: Cyclone UI's logo banner]")`)}
|
|
3
|
+
|
|
4
|
+
${S(C.heading.primary(`Changelog for Cyclone UI - CLI`))}
|
|
5
|
+
|
|
6
|
+
${S(C.heading.secondary(`0.6.2 (10/11/2026)`))}
|
|
7
|
+
|
|
8
|
+
${S(C.heading.tertiary(`Features`))}
|
|
9
|
+
|
|
10
|
+
${C.body.primary(`• cli: Added a create-tokens command (0c2dde08)`)}
|
|
11
|
+
|
|
12
|
+
${S(C.heading.tertiary(`Updated Dependencies`))}
|
|
13
|
+
|
|
14
|
+
${C.body.primary(`• Updated registry-api to v0.3.12
|
|
15
|
+
• Updated theme-builder to v0.0.2`)}`)}async function E(e=s()){let t={...v()};for(let t=0;t<e.slice(0).length;t++)e[t].length>3&&e[t].startsWith(`--`)?`${e[t].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[t].length>2&&e[t].startsWith(`-`)?`${e[t].slice(1).replaceAll(`-`,``)}`:e[t];return r(`quiet`)||(await w(),await b()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?x():d(`changelog`,[`changelog`],[],T)}export{E as handler};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-D_4G2UA-.mjs";import{a as y}from"./prompts-BwHSbA_H.mjs";import{t as b}from"./update-C9x3xia0.mjs";import{n as x,t as S}from"./shared-BgKqmf2q.mjs";import{t as C}from"./config-BjzHI2jX.mjs";import w from"node:os";import{join as T}from"node:path";import{readFile as E,writeFile as D}from"node:fs/promises";import{bold as O,help as k,inlineCode as A,success as j,warn as M,writeLine as N}from"node:console";async function P(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...y.map(e=>_(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
|
|
2
|
+
`)}\n`;f(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(`Completions - Bash Configuration`).length+2))/2),0))+g(l.banner.command.primary(`Completions - Bash Configuration`))+` `.repeat(Math.max(Math.ceil((m().columns-(_(`Completions - Bash Configuration`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),f(g(l.banner.description.primary(`Update the current system's bash shell configuration to include completions for the Cyclone User Interface command-line interface.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}async function F(e={},t=`~/.bashrc`){if(e.display!==!0){let e=t.includes(`.`)?t:T(t,`.bashrc`);e.startsWith(`~`)&&(e=T(w.homedir(),e.replace(`~`,``)));let n=``;try{n=await E(e,`utf8`)}catch(t){if(typeof t==`object`&&t&&`code`in t&&t.code===`ENOENT`)M(`Configuration file ${O(e)} does not exist. It will be created when the completion script is written.`);else return{error:t}}await D(e,`${n}\n\n### Begin - Cyclone User Interface Shell Completions ###\n\n${S} \n\n### End - Cyclone User Interface Bash Completions ###`),j(`Cyclone User Interface shell completions have been applied to Bash configuration file at ${O(e)}. Please restart your terminal or run ${A(`source ${e}`)} for the changes to take effect.`)}else N(` ------------------------------------------------- `),N(``),N(`### Begin - Cyclone User Interface Bash Completions ###`),N(``),x.split(`
|
|
3
|
+
`).map(e=>N(e)),N(``),N(`### End - Cyclone User Interface Bash Completions ###`),N(``),N(` ------------------------------------------------- `),N(``),k(`To enable these completions, perform one of the following actions:
|
|
4
|
+
|
|
5
|
+
1) Copy and paste the above script into your shell configuration file (e.g., ~/.bashrc)
|
|
6
|
+
2) Save the above script to a file and source it from your shell configuration file `)}async function I(e=s()){let t={...v(),display:!1};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`){if(/^--?(display)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.display=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.display=!0}}let c=Math.max(0,e.slice(4).findIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,f=c>4?4:Math.max(0,e.slice(c).findLastIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,p=`~/.bashrc`;return f+0<e.length&&f+0!==c&&(p=e[f+0]),r(`quiet`)||(await P(),await b()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?C():d(`completions/bash/config`,[`completions`,`bash`,`config`],[t,p],F)}export{I as handler};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-D_4G2UA-.mjs";import{a as y}from"./prompts-BwHSbA_H.mjs";import{t as b}from"./update-C9x3xia0.mjs";import{t as x}from"./script-CN0WuqZt.mjs";import{n as S,t as C}from"./shared-BgKqmf2q.mjs";import{writeFile as w}from"node:fs/promises";import{bold as T,help as E,success as D,writeLine as O}from"node:console";async function k(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...y.map(e=>_(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
|
|
2
|
+
`)}\n`;f(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(`Completions - Bash Script`).length+2))/2),0))+g(l.banner.command.primary(`Completions - Bash Script`))+` `.repeat(Math.max(Math.ceil((m().columns-(_(`Completions - Bash Script`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),f(g(l.banner.description.primary(`Generate a bash completion script for the Cyclone User Interface command-line interface.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}async function A(e={},t=`./cyclone-ui-completions.bash`){if(e.display!==!0){let e=t.includes(`.`)?`${t}.bash`:t;await w(e,`# Bash script to add completions for Cyclone User Interface\n\n${C}`),D(`Cyclone User Interface Bash completion script has been generated at ${T(e)}.`)}else O(` ------------------------------------------------- `),O(``),O(`# Bash completion for Cyclone User Interface`),O(``),S.split(`
|
|
3
|
+
`).map(e=>O(e)),O(``),O(` ------------------------------------------------- `),O(``),E(`To enable these completions, perform one of the following actions:
|
|
4
|
+
|
|
5
|
+
1) Copy and paste the above script into your shell configuration file (e.g., ~/.bashrc)
|
|
6
|
+
2) Save the above script to a file and source it from your shell configuration file `)}async function j(e=s()){let t={...v(),display:!1};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`){if(/^--?(display)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.display=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.display=!0}}let c=Math.max(0,e.slice(4).findIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,f=c>4?4:Math.max(0,e.slice(c).findLastIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,p=`./cyclone-ui-completions.bash`;return f+0<e.length&&f+0!==c&&(p=e[f+0]),r(`quiet`)||(await k(),await b()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?x():d(`completions/bash/script`,[`completions`,`bash`,`script`],[t,p],A)}export{j as handler};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-D_4G2UA-.mjs";import{a as y}from"./prompts-BwHSbA_H.mjs";import{t as b}from"./update-C9x3xia0.mjs";import{n as x,t as S}from"./shared-DgLETJ0V.mjs";import{t as C}from"./config-jcI737wh.mjs";import w from"node:os";import{join as T}from"node:path";import{readFile as E,writeFile as D}from"node:fs/promises";import{bold as O,help as k,inlineCode as A,success as j,warn as M,writeLine as N}from"node:console";async function P(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...y.map(e=>_(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
|
|
2
|
+
`)}\n`;f(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(`Completions - Fish Configuration`).length+2))/2),0))+g(l.banner.command.primary(`Completions - Fish Configuration`))+` `.repeat(Math.max(Math.ceil((m().columns-(_(`Completions - Fish Configuration`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),f(g(l.banner.description.primary(`Update the current system's Fish shell configuration to include completions for the Cyclone User Interface command-line interface.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}async function F(e={},t=`~/.config/fish/config.fish`){if(e.display!==!0){let e=t.includes(`.`)?t:T(t,`.config`,`fish`,`config.fish`);e.startsWith(`~`)&&(e=T(w.homedir(),e.replace(`~`,``)));let n=``;try{n=await E(e,`utf8`)}catch(t){if(typeof t==`object`&&t&&`code`in t&&t.code===`ENOENT`)M(`Configuration file ${O(e)} does not exist. It will be created when the completion script is written.`);else return{error:t}}await D(e,`${n}\n\n### Begin - Cyclone User Interface Fish Completions ###\n\n${S} \n\n### End - Cyclone User Interface Fish Completions ###`),j(`Cyclone User Interface shell completions have been applied to Fish configuration file at ${O(e)}. Please restart your terminal or run ${A(`source ${e}`)} for the changes to take effect.`)}else N(` ------------------------------------------------- `),N(``),N(`### Begin - Cyclone User Interface Fish Completions ###`),N(``),x.split(`
|
|
3
|
+
`).map(e=>N(e)),N(``),N(`### End - Cyclone User Interface Fish Completions ###`),N(``),N(` ------------------------------------------------- `),N(``),k(`To enable these completions, perform one of the following actions:
|
|
4
|
+
|
|
5
|
+
1) Copy and paste the above script into your shell configuration file (e.g., ~/.config/fish/config.fish)
|
|
6
|
+
2) Save the above script to a file and source it from your shell configuration file `)}async function I(e=s()){let t={...v(),display:!1};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`){if(/^--?(display)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.display=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.display=!0}}let c=Math.max(0,e.slice(4).findIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,f=c>4?4:Math.max(0,e.slice(c).findLastIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,p=`~/.config/fish/config.fish`;return f+0<e.length&&f+0!==c&&(p=e[f+0]),r(`quiet`)||(await P(),await b()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?C():d(`completions/fish/config`,[`completions`,`fish`,`config`],[t,p],F)}export{I as handler};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-D_4G2UA-.mjs";import{a as y}from"./prompts-BwHSbA_H.mjs";import{t as b}from"./update-C9x3xia0.mjs";import{t as x}from"./script-DMDQ2LKa.mjs";import{n as S,t as C}from"./shared-DgLETJ0V.mjs";import{writeFile as w}from"node:fs/promises";import{bold as T,help as E,success as D,writeLine as O}from"node:console";async function k(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`┏`)+h.banner.outline.primary(`━`.repeat(6))+` `+l.banner.header.primary(`⬤`)+` `+h.banner.outline.primary(`━`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.2`))+` `+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`┓`),{consoleFn:console.log});let o=Math.max(...y.map(e=>_(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
|
|
2
|
+
`)}\n`;f(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(`Completions - Fish Script`).length+2))/2),0))+g(l.banner.command.primary(`Completions - Fish Script`))+` `.repeat(Math.max(Math.ceil((m().columns-(_(`Completions - Fish Script`).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),f(g(l.banner.description.primary(`Generate a Fish completion script for the Cyclone User Interface command-line interface.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`┃`),{consoleFn:console.log})}),n(h.banner.outline.primary(`┃`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`┃`),{consoleFn:console.log}),n(h.banner.outline.primary(`┗`)+h.banner.outline.primary(`━`.repeat(Math.max(m().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`━`.repeat(6))+h.banner.outline.primary(`┛`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}async function A(e={},t=`./cyclone-ui-completions.fish`){if(e.display!==!0){let e=t.includes(`.`)?`${t}.fish`:t;await w(e,`# Fish script to add completions for Cyclone User Interface\n\n${C}`),D(`Cyclone User Interface Fish completion script has been generated at ${T(e)}.`)}else O(` ------------------------------------------------- `),O(``),O(`# Fish completion for Cyclone User Interface`),O(``),S.split(`
|
|
3
|
+
`).map(e=>O(e)),O(``),O(` ------------------------------------------------- `),O(``),E(`To enable these completions, perform one of the following actions:
|
|
4
|
+
|
|
5
|
+
1) Copy and paste the above script into your shell configuration file (e.g., ~/.config/fish/config.fish)
|
|
6
|
+
2) Save the above script to a file and source it from your shell configuration file `)}async function j(e=s()){let t={...v(),display:!1};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`display=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`display`){if(/^--?(display)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(display)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.display=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.display=!0}}let c=Math.max(0,e.slice(4).findIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,f=c>4?4:Math.max(0,e.slice(c).findLastIndex(e=>e.startsWith(`-`)&&/^(display)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+4,p=`./cyclone-ui-completions.fish`;return f+0<e.length&&f+0!==c&&(p=e[f+0]),r(`quiet`)||(await k(),await b()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?x():d(`completions/fish/script`,[`completions`,`fish`,`script`],[t,p],A)}export{j as handler};
|