@shell-shock/core 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +221 -0
- package/dist/_virtual/rolldown_runtime.cjs +29 -1
- package/dist/api.cjs +57 -1
- package/dist/api.cjs.map +1 -0
- package/dist/api.d.cts +9 -1
- package/dist/api.d.cts.map +1 -0
- package/dist/api.d.mts +9 -1
- package/dist/api.d.mts.map +1 -0
- package/dist/api.mjs +55 -1
- package/dist/api.mjs.map +1 -0
- package/dist/components/docs.cjs +105 -0
- package/dist/components/docs.cjs.map +1 -0
- package/dist/components/docs.d.cts +56 -0
- package/dist/components/docs.d.cts.map +1 -0
- package/dist/components/docs.d.mts +56 -0
- package/dist/components/docs.d.mts.map +1 -0
- package/dist/components/docs.mjs +102 -0
- package/dist/components/docs.mjs.map +1 -0
- package/dist/components/index.cjs +5 -0
- package/dist/components/index.d.cts +2 -0
- package/dist/components/index.d.mts +2 -0
- package/dist/components/index.mjs +3 -0
- package/dist/config.cjs +18 -1
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +2 -1
- package/dist/config.d.cts.map +1 -0
- package/dist/config.d.mts +2 -1
- package/dist/config.d.mts.map +1 -0
- package/dist/config.mjs +17 -1
- package/dist/config.mjs.map +1 -0
- package/dist/contexts/command.cjs +21 -0
- package/dist/contexts/command.cjs.map +1 -0
- package/dist/contexts/command.d.cts +18 -0
- package/dist/contexts/command.d.cts.map +1 -0
- package/dist/contexts/command.d.mts +18 -0
- package/dist/contexts/command.d.mts.map +1 -0
- package/dist/contexts/command.mjs +19 -0
- package/dist/contexts/command.mjs.map +1 -0
- package/dist/contexts/index.cjs +4 -0
- package/dist/contexts/index.d.cts +2 -0
- package/dist/contexts/index.d.mts +2 -0
- package/dist/contexts/index.mjs +3 -0
- package/dist/helpers/docs-helpers.cjs +17 -0
- package/dist/helpers/docs-helpers.cjs.map +1 -0
- package/dist/helpers/docs-helpers.mjs +16 -0
- package/dist/helpers/docs-helpers.mjs.map +1 -0
- package/dist/helpers/persistence.cjs +50 -1
- package/dist/helpers/persistence.cjs.map +1 -0
- package/dist/helpers/persistence.mjs +47 -1
- package/dist/helpers/persistence.mjs.map +1 -0
- package/dist/helpers/resolve-command.cjs +177 -1
- package/dist/helpers/resolve-command.cjs.map +1 -0
- package/dist/helpers/resolve-command.mjs +172 -1
- package/dist/helpers/resolve-command.mjs.map +1 -0
- package/dist/helpers/update-package-json.cjs +36 -1
- package/dist/helpers/update-package-json.cjs.map +1 -0
- package/dist/helpers/update-package-json.mjs +34 -1
- package/dist/helpers/update-package-json.mjs.map +1 -0
- package/dist/helpers/utilities.cjs +41 -1
- package/dist/helpers/utilities.cjs.map +1 -0
- package/dist/helpers/utilities.mjs +39 -1
- package/dist/helpers/utilities.mjs.map +1 -0
- package/dist/helpers/validations.cjs +97 -0
- package/dist/helpers/validations.cjs.map +1 -0
- package/dist/helpers/validations.mjs +97 -0
- package/dist/helpers/validations.mjs.map +1 -0
- package/dist/index.cjs +16 -1
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +7 -18
- package/dist/index.d.mts +6 -18
- package/dist/index.mjs +10 -1
- package/dist/index.mjs.map +1 -0
- package/dist/plugin-utils/context-helpers.cjs +86 -0
- package/dist/plugin-utils/context-helpers.cjs.map +1 -0
- package/dist/plugin-utils/context-helpers.d.cts +58 -0
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -0
- package/dist/plugin-utils/context-helpers.d.mts +58 -0
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -0
- package/dist/plugin-utils/context-helpers.mjs +79 -0
- package/dist/plugin-utils/context-helpers.mjs.map +1 -0
- package/dist/plugin-utils/get-command-tree.cjs +24 -0
- package/dist/plugin-utils/get-command-tree.cjs.map +1 -0
- package/dist/plugin-utils/get-command-tree.d.cts +16 -0
- package/dist/plugin-utils/get-command-tree.d.cts.map +1 -0
- package/dist/plugin-utils/get-command-tree.d.mts +16 -0
- package/dist/plugin-utils/get-command-tree.d.mts.map +1 -0
- package/dist/plugin-utils/get-command-tree.mjs +24 -0
- package/dist/plugin-utils/get-command-tree.mjs.map +1 -0
- package/dist/plugin-utils/index.cjs +16 -0
- package/dist/plugin-utils/index.d.cts +5 -0
- package/dist/plugin-utils/index.d.mts +5 -0
- package/dist/plugin-utils/index.mjs +6 -0
- package/dist/plugin-utils/reflect.cjs +25 -0
- package/dist/plugin-utils/reflect.cjs.map +1 -0
- package/dist/plugin-utils/reflect.d.cts +14 -0
- package/dist/plugin-utils/reflect.d.cts.map +1 -0
- package/dist/plugin-utils/reflect.d.mts +14 -0
- package/dist/plugin-utils/reflect.d.mts.map +1 -0
- package/dist/plugin-utils/reflect.mjs +24 -0
- package/dist/plugin-utils/reflect.mjs.map +1 -0
- package/dist/plugin-utils/traverse-command-tree.cjs +33 -0
- package/dist/plugin-utils/traverse-command-tree.cjs.map +1 -0
- package/dist/plugin-utils/traverse-command-tree.d.cts +23 -0
- package/dist/plugin-utils/traverse-command-tree.d.cts.map +1 -0
- package/dist/plugin-utils/traverse-command-tree.d.mts +23 -0
- package/dist/plugin-utils/traverse-command-tree.d.mts.map +1 -0
- package/dist/plugin-utils/traverse-command-tree.mjs +31 -0
- package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -0
- package/dist/plugin.cjs +267 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.cts +13 -0
- package/dist/plugin.d.cts.map +1 -0
- package/dist/plugin.d.mts +13 -0
- package/dist/plugin.d.mts.map +1 -0
- package/dist/plugin.mjs +261 -0
- package/dist/plugin.mjs.map +1 -0
- package/dist/types/command.d.cts +13 -4
- package/dist/types/command.d.cts.map +1 -0
- package/dist/types/command.d.mts +13 -4
- package/dist/types/command.d.mts.map +1 -0
- package/dist/types/command.mjs +1 -1
- package/dist/types/config.d.cts +71 -23
- package/dist/types/config.d.cts.map +1 -0
- package/dist/types/config.d.mts +71 -23
- package/dist/types/config.d.mts.map +1 -0
- package/dist/types/config.mjs +1 -1
- package/dist/types/context.d.cts +7 -3
- package/dist/types/context.d.cts.map +1 -0
- package/dist/types/context.d.mts +7 -3
- package/dist/types/context.d.mts.map +1 -0
- package/dist/types/context.mjs +1 -1
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.mjs +1 -1
- package/dist/types/internal.cjs +0 -0
- package/dist/types/internal.d.cts +24 -0
- package/dist/types/internal.d.cts.map +1 -0
- package/dist/types/internal.d.mts +24 -0
- package/dist/types/internal.d.mts.map +1 -0
- package/dist/types/internal.mjs +1 -0
- package/dist/types/options.d.cts +2 -1
- package/dist/types/options.d.cts.map +1 -0
- package/dist/types/options.d.mts +2 -1
- package/dist/types/options.d.mts.map +1 -0
- package/dist/types/options.mjs +1 -1
- package/package.json +230 -55
- package/dist/helpers/get-default-options.cjs +0 -1
- package/dist/helpers/get-default-options.d.cts +0 -15
- package/dist/helpers/get-default-options.d.mts +0 -15
- package/dist/helpers/get-default-options.mjs +0 -1
- package/dist/powerlines.cjs +0 -3
- package/dist/powerlines.d.cts +0 -12
- package/dist/powerlines.d.mts +0 -12
- package/dist/powerlines.mjs +0 -3
package/README.md
CHANGED
|
@@ -1,4 +1,52 @@
|
|
|
1
1
|
<!-- START header -->
|
|
2
|
+
<!-- prettier-ignore-start -->
|
|
3
|
+
<!-- markdownlint-disable -->
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
<div align="center">
|
|
7
|
+
<picture>
|
|
8
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/shell-shock/banner-1280x640-dark.gif">
|
|
9
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/shell-shock/banner-1280x640-light.gif">
|
|
10
|
+
<img src="https://public.storm-cdn.com/shell-shock/banner-1280x640-dark.gif" width="100%" alt="Storm Software" />
|
|
11
|
+
</picture>
|
|
12
|
+
</div>
|
|
13
|
+
<br />
|
|
14
|
+
|
|
15
|
+
<div align="center">
|
|
16
|
+
<b>
|
|
17
|
+
<a href="https://stormsoftware.com" target="_blank">Website</a> •
|
|
18
|
+
<a href="https://github.com/storm-software/shell-shock" target="_blank">GitHub</a> •
|
|
19
|
+
<a href="https://discord.gg/MQ6YVzakM5">Discord</a> • <a href="https://stormstack.github.io/stormstack/" target="_blank">Docs</a> • <a href="https://stormsoftware.com/contact" target="_blank">Contact</a> •
|
|
20
|
+
<a href="https://github.com/storm-software/shell-shock/issues/new?assignees=&labels=bug&template=bug-report.yml&title=Bug Report%3A+">Report a Bug</a>
|
|
21
|
+
</b>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<br />
|
|
25
|
+
This package is part of the ⚡<b>Shell Shock</b> monorepo. The Shell Shock packages include CLI utility applications, tools, and various libraries used to create modern, scalable web applications.
|
|
26
|
+
<br />
|
|
27
|
+
|
|
28
|
+
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
|
+
|
|
30
|
+
[](https://stormsoftware.com/projects/shell-shock/) [](http://commitizen.github.io/cz-cli/)  
|
|
31
|
+
|
|
32
|
+
<!-- prettier-ignore-start -->
|
|
33
|
+
<!-- markdownlint-disable -->
|
|
34
|
+
|
|
35
|
+
> [!IMPORTANT]
|
|
36
|
+
> This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be available through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.
|
|
37
|
+
|
|
38
|
+
<!-- markdownlint-restore -->
|
|
39
|
+
<!-- prettier-ignore-end -->
|
|
40
|
+
|
|
41
|
+
<div align="center">
|
|
42
|
+
<b>Be sure to ⭐ this repository on <a href="https://github.com/storm-software/shell-shock" target="_blank">GitHub</a> so you can keep up to date on any daily progress!</b>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<br />
|
|
46
|
+
|
|
47
|
+
<!-- markdownlint-restore -->
|
|
48
|
+
<!-- prettier-ignore-end -->
|
|
49
|
+
|
|
2
50
|
<!-- END header -->
|
|
3
51
|
|
|
4
52
|
# Shell Shock
|
|
@@ -40,4 +88,177 @@ Run `nx build core` to build the library.
|
|
|
40
88
|
Run `nx test core` to execute the unit tests via [Jest](https://jestjs.io).
|
|
41
89
|
|
|
42
90
|
<!-- START footer -->
|
|
91
|
+
<!-- prettier-ignore-start -->
|
|
92
|
+
<!-- markdownlint-disable -->
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## Storm Workspaces
|
|
96
|
+
|
|
97
|
+
Storm workspaces are built using
|
|
98
|
+
<a href="https://nx.dev/" target="_blank">Nx</a>, a set of extensible dev tools
|
|
99
|
+
for monorepos, which helps you develop like Google, Facebook, and Microsoft.
|
|
100
|
+
Building on top of Nx, the Open System provides a set of tools and patterns that
|
|
101
|
+
help you scale your monorepo to many teams while keeping the codebase
|
|
102
|
+
maintainable.
|
|
103
|
+
|
|
104
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
105
|
+
<br />
|
|
106
|
+
|
|
107
|
+
## Roadmap
|
|
108
|
+
|
|
109
|
+
See the [open issues](https://github.com/storm-software/shell-shock/issues) for
|
|
110
|
+
a list of proposed features (and known issues).
|
|
111
|
+
|
|
112
|
+
- [Top Feature Requests](https://github.com/storm-software/shell-shock/issues?q=label%3Aenhancement+is%3Aopen+sort%3Areactions-%2B1-desc)
|
|
113
|
+
(Add your votes using the 👍 reaction)
|
|
114
|
+
- [Top Bugs](https://github.com/storm-software/shell-shock/issues?q=is%3Aissue+is%3Aopen+label%3Abug+sort%3Areactions-%2B1-desc)
|
|
115
|
+
(Add your votes using the 👍 reaction)
|
|
116
|
+
- [Newest Bugs](https://github.com/storm-software/shell-shock/issues?q=is%3Aopen+is%3Aissue+label%3Abug)
|
|
117
|
+
|
|
118
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
119
|
+
<br />
|
|
120
|
+
|
|
121
|
+
## Support
|
|
122
|
+
|
|
123
|
+
Reach out to the maintainer at one of the following places:
|
|
124
|
+
|
|
125
|
+
- [Contact](https://stormsoftware.com/contact)
|
|
126
|
+
- [GitHub discussions](https://github.com/storm-software/shell-shock/discussions)
|
|
127
|
+
- <support@stormsoftware.com>
|
|
128
|
+
|
|
129
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
130
|
+
<br />
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
This project is licensed under the **Apache License 2.0**. Feel free to edit and
|
|
135
|
+
distribute this template as you like.
|
|
136
|
+
|
|
137
|
+
See [LICENSE](LICENSE) for more information.
|
|
138
|
+
|
|
139
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
140
|
+
<br />
|
|
141
|
+
|
|
142
|
+
## Changelog
|
|
143
|
+
|
|
144
|
+
This project adheres to
|
|
145
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html). Every release, along
|
|
146
|
+
with the migration instructions, is documented in the [CHANGELOG](CHANGELOG.md)
|
|
147
|
+
file
|
|
148
|
+
|
|
149
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
150
|
+
<br />
|
|
151
|
+
|
|
152
|
+
## Contributing
|
|
153
|
+
|
|
154
|
+
First off, thanks for taking the time to contribute! Contributions are what
|
|
155
|
+
makes the open-source community such an amazing place to learn, inspire, and
|
|
156
|
+
create. Any contributions you make will benefit everybody else and are **greatly
|
|
157
|
+
appreciated**.
|
|
158
|
+
|
|
159
|
+
Please try to create bug reports that are:
|
|
160
|
+
|
|
161
|
+
- _Reproducible._ Include steps to reproduce the problem.
|
|
162
|
+
- _Specific._ Include as much detail as possible: which version, what
|
|
163
|
+
environment, etc.
|
|
164
|
+
- _Unique._ Do not duplicate existing opened issues.
|
|
165
|
+
- _Scoped to a Single Bug._ One bug per report.
|
|
166
|
+
|
|
167
|
+
Please adhere to this project's [code of conduct](.github/CODE_OF_CONDUCT.md).
|
|
168
|
+
|
|
169
|
+
You can use
|
|
170
|
+
[markdownlint-cli](https://github.com/storm-software/shell-shock/markdownlint-cli)
|
|
171
|
+
to check for common markdown style inconsistency.
|
|
172
|
+
|
|
173
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
174
|
+
<br />
|
|
175
|
+
|
|
176
|
+
## Contributors
|
|
177
|
+
|
|
178
|
+
Thanks goes to these wonderful people
|
|
179
|
+
([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
180
|
+
|
|
181
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
182
|
+
|
|
183
|
+
<table>
|
|
184
|
+
<tbody>
|
|
185
|
+
<tr>
|
|
186
|
+
<td align="center" valign="top" width="14.28%"><a href="http://www.sullypat.com/"><img src="https://avatars.githubusercontent.com/u/99053093?v=4?s=100" width="100px;" alt="Patrick Sullivan"/><br /><sub><b>Patrick Sullivan</b></sub></a><br /><a href="#design-sullivanpj" title="Design">🎨</a> <a href="https://github.com/storm-software/shell-shock/commits?author=sullivanpj" title="Code">💻</a> <a href="#tool-sullivanpj" title="Tools">🔧</a> <a href="https://github.com/storm-software/shell-shock/commits?author=sullivanpj" title="Documentation">📖</a> <a href="https://github.com/storm-software/shell-shock/commits?author=sullivanpj" title="Tests">⚠️</a></td>
|
|
187
|
+
<td align="center" valign="top" width="14.28%"><a href="https://tylerbenning.com/"><img src="https://avatars.githubusercontent.com/u/7265547?v=4?s=100" width="100px;" alt="Tyler Benning"/><br /><sub><b>Tyler Benning</b></sub></a><br /><a href="#design-tbenning" title="Design">🎨</a></td>
|
|
188
|
+
<td align="center" valign="top" width="14.28%"><a href="http://stormsoftware.com"><img src="https://avatars.githubusercontent.com/u/149802440?v=4?s=100" width="100px;" alt="Stormie"/><br /><sub><b>Stormie</b></sub></a><br /><a href="#maintenance-stormie-bot" title="Maintenance">🚧</a></td>
|
|
189
|
+
</tr>
|
|
190
|
+
</tbody>
|
|
191
|
+
<tfoot>
|
|
192
|
+
<tr>
|
|
193
|
+
<td align="center" size="13px" colspan="7">
|
|
194
|
+
<img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg" alt="All Contributors">
|
|
195
|
+
<a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a>
|
|
196
|
+
</img>
|
|
197
|
+
</td>
|
|
198
|
+
</tr>
|
|
199
|
+
</tfoot>
|
|
200
|
+
</table>
|
|
201
|
+
|
|
202
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
203
|
+
|
|
204
|
+
This project follows the
|
|
205
|
+
[all-contributors](https://github.com/all-contributors/all-contributors)
|
|
206
|
+
specification. Contributions of any kind welcome!
|
|
207
|
+
|
|
208
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
209
|
+
<br />
|
|
210
|
+
|
|
211
|
+
<hr />
|
|
212
|
+
<br />
|
|
213
|
+
|
|
214
|
+
<div align="center">
|
|
215
|
+
<picture>
|
|
216
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-dark.webp">
|
|
217
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-light.webp">
|
|
218
|
+
<img src="https://public.storm-cdn.com/storm-software/banner-1280x320-dark.webp" width="100%" alt="Storm Software" />
|
|
219
|
+
</picture>
|
|
220
|
+
</div>
|
|
221
|
+
<br />
|
|
222
|
+
|
|
223
|
+
<div align="center">
|
|
224
|
+
<a href="https://stormsoftware.com" target="_blank">Website</a> • <a href="https://stormsoftware.com/contact" target="_blank">Contact</a> • <a href="https://linkedin.com/in/patrick-sullivan-865526b0" target="_blank">LinkedIn</a> • <a href="https://medium.com/@pat.joseph.sullivan" target="_blank">Medium</a> • <a href="https://github.com/storm-software" target="_blank">GitHub</a> • <a href="https://keybase.io/sullivanp" target="_blank">OpenPGP Key</a>
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
<div align="center">
|
|
228
|
+
<b>Fingerprint:</b> 1BD2 7192 7770 2549 F4C9 F238 E6AD C420 DA5C 4C2D
|
|
229
|
+
</div>
|
|
230
|
+
<br />
|
|
231
|
+
|
|
232
|
+
Storm Software is an open source software development organization and creator
|
|
233
|
+
of Acidic, StormStack and StormCloud.
|
|
234
|
+
|
|
235
|
+
Our mission is to make software development more accessible. Our ideal future is
|
|
236
|
+
one where anyone can create software without years of prior development
|
|
237
|
+
experience serving as a barrier to entry. We hope to achieve this via LLMs,
|
|
238
|
+
Generative AI, and intuitive, high-level data modeling/programming languages.
|
|
239
|
+
|
|
240
|
+
Join us on [Discord](https://discord.gg/MQ6YVzakM5) to chat with the team,
|
|
241
|
+
receive release notifications, ask questions, and get involved.
|
|
242
|
+
|
|
243
|
+
If this sounds interesting, and you would like to help us in creating the next
|
|
244
|
+
generation of development tools, please reach out on our
|
|
245
|
+
[website](https://stormsoftware.com/contact) or join our
|
|
246
|
+
[Slack channel](https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA)!
|
|
247
|
+
|
|
248
|
+
<br />
|
|
249
|
+
|
|
250
|
+
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/icon-fill.png" alt="Storm Software" width="200px"/></a></div>
|
|
251
|
+
<br />
|
|
252
|
+
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/visit-us-text.svg" alt="Visit us at stormsoftware.com" height="90px"/></a></div>
|
|
253
|
+
|
|
254
|
+
<br />
|
|
255
|
+
|
|
256
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
257
|
+
<br />
|
|
258
|
+
<br />
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
<!-- markdownlint-restore -->
|
|
262
|
+
<!-- prettier-ignore-end -->
|
|
263
|
+
|
|
43
264
|
<!-- END footer -->
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
package/dist/api.cjs
CHANGED
|
@@ -1 +1,57 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_plugin = require('./plugin.cjs');
|
|
3
|
+
let powerlines = require("powerlines");
|
|
4
|
+
|
|
5
|
+
//#region src/api.ts
|
|
6
|
+
/**
|
|
7
|
+
* The Shell Shock API class.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.
|
|
11
|
+
*/
|
|
12
|
+
var ShellShockAPI = class ShellShockAPI {
|
|
13
|
+
#powerlines;
|
|
14
|
+
static async from(config = {}) {
|
|
15
|
+
return new ShellShockAPI(await (0, powerlines.createPowerlines)({
|
|
16
|
+
framework: "shell-shock",
|
|
17
|
+
...config,
|
|
18
|
+
plugins: [require_plugin.plugin(), ...config.plugins ?? []]
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
constructor(powerlines$1) {
|
|
22
|
+
this.#powerlines = powerlines$1;
|
|
23
|
+
}
|
|
24
|
+
async clean(inlineConfig) {
|
|
25
|
+
return this.#powerlines.clean(inlineConfig);
|
|
26
|
+
}
|
|
27
|
+
async prepare(inlineConfig) {
|
|
28
|
+
return this.#powerlines.prepare(inlineConfig);
|
|
29
|
+
}
|
|
30
|
+
async lint(inlineConfig) {
|
|
31
|
+
return this.#powerlines.lint(inlineConfig);
|
|
32
|
+
}
|
|
33
|
+
async build(inlineConfig) {
|
|
34
|
+
return this.#powerlines.build(inlineConfig);
|
|
35
|
+
}
|
|
36
|
+
async docs(inlineConfig) {
|
|
37
|
+
return this.#powerlines.docs(inlineConfig);
|
|
38
|
+
}
|
|
39
|
+
async finalize() {
|
|
40
|
+
return this.#powerlines.finalize();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Creates a new {@link ShellShockAPI} instance.
|
|
45
|
+
*
|
|
46
|
+
* @param options - The user configuration options.
|
|
47
|
+
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
48
|
+
*/
|
|
49
|
+
async function createShellShock(options = {}) {
|
|
50
|
+
options.root ??= process.cwd();
|
|
51
|
+
return ShellShockAPI.from(options);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
exports.ShellShockAPI = ShellShockAPI;
|
|
56
|
+
exports.createShellShock = createShellShock;
|
|
57
|
+
//# sourceMappingURL=api.cjs.map
|
package/dist/api.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.cjs","names":["createPowerlines","plugin","ShellShockAPI","powerlines","from","config","framework","plugins","constructor","clean","inlineConfig","prepare","lint","build","docs","finalize","createShellShock","options","root","process","cwd"],"sources":["../src/api.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { createPowerlines } from \"powerlines\";\nimport type { PowerlinesAPI } from \"powerlines/api\";\nimport type {\n BuildInlineConfig,\n CleanInlineConfig,\n DocsInlineConfig,\n LintInlineConfig,\n PluginConfig,\n PrepareInlineConfig\n} from \"powerlines/types/config\";\nimport { plugin } from \"./plugin\";\nimport type { UserConfig } from \"./types/config\";\nimport type { Context } from \"./types/context\";\n\n/**\n * The Shell Shock API class.\n *\n * @remarks\n * This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.\n */\nexport class ShellShockAPI {\n #powerlines: PowerlinesAPI;\n\n public static async from(config: UserConfig = {}): Promise<ShellShockAPI> {\n const powerlines = await createPowerlines({\n framework: \"shell-shock\",\n ...config,\n plugins: [plugin(), ...(config.plugins ?? [])] as PluginConfig<Context>[]\n });\n\n return new ShellShockAPI(powerlines);\n }\n\n private constructor(powerlines: PowerlinesAPI) {\n this.#powerlines = powerlines;\n }\n\n public async clean(inlineConfig: CleanInlineConfig): Promise<void> {\n return this.#powerlines.clean(inlineConfig);\n }\n\n public async prepare(inlineConfig: PrepareInlineConfig): Promise<void> {\n return this.#powerlines.prepare(inlineConfig);\n }\n\n public async lint(inlineConfig: LintInlineConfig): Promise<void> {\n return this.#powerlines.lint(inlineConfig);\n }\n\n public async build(inlineConfig: BuildInlineConfig): Promise<void> {\n return this.#powerlines.build(inlineConfig);\n }\n\n public async docs(inlineConfig: DocsInlineConfig): Promise<void> {\n return this.#powerlines.docs(inlineConfig);\n }\n\n public async finalize(): Promise<void> {\n return this.#powerlines.finalize();\n }\n}\n\n/**\n * Creates a new {@link ShellShockAPI} instance.\n *\n * @param options - The user configuration options.\n * @returns A promise that resolves to a {@link ShellShockAPI} instance.\n */\nexport async function createShellShock(\n options: Partial<UserConfig> = {}\n): Promise<ShellShockAPI> {\n options.root ??= process.cwd();\n\n return ShellShockAPI.from(options);\n}\n"],"mappings":";;;;;;;;;;;AAsCA,IAAaE,gBAAb,MAAaA,cAAc;CACzB;CAEA,aAAoBE,KAAKC,SAAqB,EAAE,EAA0B;AAOxE,SAAO,IAAIH,cANQ,uCAAuB;GACxCI,WAAW;GACX,GAAGD;GACHE,SAAS,CAACN,uBAAQ,EAAE,GAAII,OAAOE,WAAW,EAAE,CAAC;GAC9C,CAAC,CAEkC;;CAG9BC,YAAYL,cAA2B;AAC7C,QAAK,aAAcA;;CAGrB,MAAaM,MAAMC,cAAgD;AACjE,SAAO,MAAK,WAAYD,MAAMC,aAAa;;CAG7C,MAAaC,QAAQD,cAAkD;AACrE,SAAO,MAAK,WAAYC,QAAQD,aAAa;;CAG/C,MAAaE,KAAKF,cAA+C;AAC/D,SAAO,MAAK,WAAYE,KAAKF,aAAa;;CAG5C,MAAaG,MAAMH,cAAgD;AACjE,SAAO,MAAK,WAAYG,MAAMH,aAAa;;CAG7C,MAAaI,KAAKJ,cAA+C;AAC/D,SAAO,MAAK,WAAYI,KAAKJ,aAAa;;CAG5C,MAAaK,WAA0B;AACrC,SAAO,MAAK,WAAYA,UAAU;;;;;;;;;AAUtC,eAAsBC,iBACpBC,UAA+B,EAAE,EACT;AACxBA,SAAQC,SAASC,QAAQC,KAAK;AAE9B,QAAOlB,cAAcE,KAAKa,QAAQ"}
|
package/dist/api.d.cts
CHANGED
|
@@ -20,5 +20,13 @@ declare class ShellShockAPI {
|
|
|
20
20
|
docs(inlineConfig: DocsInlineConfig): Promise<void>;
|
|
21
21
|
finalize(): Promise<void>;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Creates a new {@link ShellShockAPI} instance.
|
|
25
|
+
*
|
|
26
|
+
* @param options - The user configuration options.
|
|
27
|
+
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
28
|
+
*/
|
|
29
|
+
declare function createShellShock(options?: Partial<UserConfig>): Promise<ShellShockAPI>;
|
|
23
30
|
//#endregion
|
|
24
|
-
export { ShellShockAPI };
|
|
31
|
+
export { ShellShockAPI, createShellShock };
|
|
32
|
+
//# sourceMappingURL=api.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.cts","names":[],"sources":["../src/api.ts"],"sourcesContent":[],"mappings":";;;;;;;AAsCA;;;;AAiBmC,cAjBtB,aAAA,CAiBsB;EAAoB,CAAA,OAAA;EAIlB,OAAA,IAAA,CAAA,MAAA,CAAA,EAlBF,UAkBE,CAAA,EAlBgB,OAkBhB,CAlBwB,aAkBxB,CAAA;EAAsB,QAAA,WAAA,CAAA;EAIzB,KAAA,CAAA,YAAA,EARC,iBAQD,CAAA,EARqB,OAQrB,CAAA,IAAA,CAAA;EAAmB,OAAA,CAAA,YAAA,EAJhB,mBAIgB,CAAA,EAJM,OAIN,CAAA,IAAA,CAAA;EAIlB,IAAA,CAAA,YAAA,EAJD,gBAIC,CAAA,EAJkB,OAIlB,CAAA,IAAA,CAAA;EAAoB,KAAA,CAAA,YAAA,EAApB,iBAAoB,CAAA,EAAA,OAAA,CAAA,IAAA,CAAA;EAIrB,IAAA,CAAA,YAAA,EAAA,gBAAA,CAAA,EAAmB,OAAnB,CAAA,IAAA,CAAA;EAAmB,QAAA,CAAA,CAAA,EAI1B,OAJ0B,CAAA,IAAA,CAAA;;;AAerD;;;;;AAEU,iBAFY,gBAAA,CAEZ,OAAA,CAAA,EADC,OACD,CADS,UACT,CAAA,CAAA,EAAP,OAAO,CAAC,aAAD,CAAA"}
|
package/dist/api.d.mts
CHANGED
|
@@ -20,5 +20,13 @@ declare class ShellShockAPI {
|
|
|
20
20
|
docs(inlineConfig: DocsInlineConfig): Promise<void>;
|
|
21
21
|
finalize(): Promise<void>;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Creates a new {@link ShellShockAPI} instance.
|
|
25
|
+
*
|
|
26
|
+
* @param options - The user configuration options.
|
|
27
|
+
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
28
|
+
*/
|
|
29
|
+
declare function createShellShock(options?: Partial<UserConfig>): Promise<ShellShockAPI>;
|
|
23
30
|
//#endregion
|
|
24
|
-
export { ShellShockAPI };
|
|
31
|
+
export { ShellShockAPI, createShellShock };
|
|
32
|
+
//# sourceMappingURL=api.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.mts","names":[],"sources":["../src/api.ts"],"sourcesContent":[],"mappings":";;;;;;;AAsCA;;;;AAiBmC,cAjBtB,aAAA,CAiBsB;EAAoB,CAAA,OAAA;EAIlB,OAAA,IAAA,CAAA,MAAA,CAAA,EAlBF,UAkBE,CAAA,EAlBgB,OAkBhB,CAlBwB,aAkBxB,CAAA;EAAsB,QAAA,WAAA,CAAA;EAIzB,KAAA,CAAA,YAAA,EARC,iBAQD,CAAA,EARqB,OAQrB,CAAA,IAAA,CAAA;EAAmB,OAAA,CAAA,YAAA,EAJhB,mBAIgB,CAAA,EAJM,OAIN,CAAA,IAAA,CAAA;EAIlB,IAAA,CAAA,YAAA,EAJD,gBAIC,CAAA,EAJkB,OAIlB,CAAA,IAAA,CAAA;EAAoB,KAAA,CAAA,YAAA,EAApB,iBAAoB,CAAA,EAAA,OAAA,CAAA,IAAA,CAAA;EAIrB,IAAA,CAAA,YAAA,EAAA,gBAAA,CAAA,EAAmB,OAAnB,CAAA,IAAA,CAAA;EAAmB,QAAA,CAAA,CAAA,EAI1B,OAJ0B,CAAA,IAAA,CAAA;;;AAerD;;;;;AAEU,iBAFY,gBAAA,CAEZ,OAAA,CAAA,EADC,OACD,CADS,UACT,CAAA,CAAA,EAAP,OAAO,CAAC,aAAD,CAAA"}
|
package/dist/api.mjs
CHANGED
|
@@ -1 +1,55 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { plugin } from "./plugin.mjs";
|
|
2
|
+
import { createPowerlines } from "powerlines";
|
|
3
|
+
|
|
4
|
+
//#region src/api.ts
|
|
5
|
+
/**
|
|
6
|
+
* The Shell Shock API class.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.
|
|
10
|
+
*/
|
|
11
|
+
var ShellShockAPI = class ShellShockAPI {
|
|
12
|
+
#powerlines;
|
|
13
|
+
static async from(config = {}) {
|
|
14
|
+
return new ShellShockAPI(await createPowerlines({
|
|
15
|
+
framework: "shell-shock",
|
|
16
|
+
...config,
|
|
17
|
+
plugins: [plugin(), ...config.plugins ?? []]
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
constructor(powerlines) {
|
|
21
|
+
this.#powerlines = powerlines;
|
|
22
|
+
}
|
|
23
|
+
async clean(inlineConfig) {
|
|
24
|
+
return this.#powerlines.clean(inlineConfig);
|
|
25
|
+
}
|
|
26
|
+
async prepare(inlineConfig) {
|
|
27
|
+
return this.#powerlines.prepare(inlineConfig);
|
|
28
|
+
}
|
|
29
|
+
async lint(inlineConfig) {
|
|
30
|
+
return this.#powerlines.lint(inlineConfig);
|
|
31
|
+
}
|
|
32
|
+
async build(inlineConfig) {
|
|
33
|
+
return this.#powerlines.build(inlineConfig);
|
|
34
|
+
}
|
|
35
|
+
async docs(inlineConfig) {
|
|
36
|
+
return this.#powerlines.docs(inlineConfig);
|
|
37
|
+
}
|
|
38
|
+
async finalize() {
|
|
39
|
+
return this.#powerlines.finalize();
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Creates a new {@link ShellShockAPI} instance.
|
|
44
|
+
*
|
|
45
|
+
* @param options - The user configuration options.
|
|
46
|
+
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
47
|
+
*/
|
|
48
|
+
async function createShellShock(options = {}) {
|
|
49
|
+
options.root ??= process.cwd();
|
|
50
|
+
return ShellShockAPI.from(options);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { ShellShockAPI, createShellShock };
|
|
55
|
+
//# sourceMappingURL=api.mjs.map
|
package/dist/api.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.mjs","names":["createPowerlines","plugin","ShellShockAPI","powerlines","from","config","framework","plugins","constructor","clean","inlineConfig","prepare","lint","build","docs","finalize","createShellShock","options","root","process","cwd"],"sources":["../src/api.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { createPowerlines } from \"powerlines\";\nimport type { PowerlinesAPI } from \"powerlines/api\";\nimport type {\n BuildInlineConfig,\n CleanInlineConfig,\n DocsInlineConfig,\n LintInlineConfig,\n PluginConfig,\n PrepareInlineConfig\n} from \"powerlines/types/config\";\nimport { plugin } from \"./plugin\";\nimport type { UserConfig } from \"./types/config\";\nimport type { Context } from \"./types/context\";\n\n/**\n * The Shell Shock API class.\n *\n * @remarks\n * This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.\n */\nexport class ShellShockAPI {\n #powerlines: PowerlinesAPI;\n\n public static async from(config: UserConfig = {}): Promise<ShellShockAPI> {\n const powerlines = await createPowerlines({\n framework: \"shell-shock\",\n ...config,\n plugins: [plugin(), ...(config.plugins ?? [])] as PluginConfig<Context>[]\n });\n\n return new ShellShockAPI(powerlines);\n }\n\n private constructor(powerlines: PowerlinesAPI) {\n this.#powerlines = powerlines;\n }\n\n public async clean(inlineConfig: CleanInlineConfig): Promise<void> {\n return this.#powerlines.clean(inlineConfig);\n }\n\n public async prepare(inlineConfig: PrepareInlineConfig): Promise<void> {\n return this.#powerlines.prepare(inlineConfig);\n }\n\n public async lint(inlineConfig: LintInlineConfig): Promise<void> {\n return this.#powerlines.lint(inlineConfig);\n }\n\n public async build(inlineConfig: BuildInlineConfig): Promise<void> {\n return this.#powerlines.build(inlineConfig);\n }\n\n public async docs(inlineConfig: DocsInlineConfig): Promise<void> {\n return this.#powerlines.docs(inlineConfig);\n }\n\n public async finalize(): Promise<void> {\n return this.#powerlines.finalize();\n }\n}\n\n/**\n * Creates a new {@link ShellShockAPI} instance.\n *\n * @param options - The user configuration options.\n * @returns A promise that resolves to a {@link ShellShockAPI} instance.\n */\nexport async function createShellShock(\n options: Partial<UserConfig> = {}\n): Promise<ShellShockAPI> {\n options.root ??= process.cwd();\n\n return ShellShockAPI.from(options);\n}\n"],"mappings":";;;;;;;;;;AAsCA,IAAaE,gBAAb,MAAaA,cAAc;CACzB;CAEA,aAAoBE,KAAKC,SAAqB,EAAE,EAA0B;AAOxE,SAAO,IAAIH,cANQ,MAAMF,iBAAiB;GACxCM,WAAW;GACX,GAAGD;GACHE,SAAS,CAACN,QAAQ,EAAE,GAAII,OAAOE,WAAW,EAAE,CAAC;GAC9C,CAAC,CAEkC;;CAG9BC,YAAYL,YAA2B;AAC7C,QAAK,aAAcA;;CAGrB,MAAaM,MAAMC,cAAgD;AACjE,SAAO,MAAK,WAAYD,MAAMC,aAAa;;CAG7C,MAAaC,QAAQD,cAAkD;AACrE,SAAO,MAAK,WAAYC,QAAQD,aAAa;;CAG/C,MAAaE,KAAKF,cAA+C;AAC/D,SAAO,MAAK,WAAYE,KAAKF,aAAa;;CAG5C,MAAaG,MAAMH,cAAgD;AACjE,SAAO,MAAK,WAAYG,MAAMH,aAAa;;CAG7C,MAAaI,KAAKJ,cAA+C;AAC/D,SAAO,MAAK,WAAYI,KAAKJ,aAAa;;CAG5C,MAAaK,WAA0B;AACrC,SAAO,MAAK,WAAYA,UAAU;;;;;;;;;AAUtC,eAAsBC,iBACpBC,UAA+B,EAAE,EACT;AACxBA,SAAQC,SAASC,QAAQC,KAAK;AAE9B,QAAOlB,cAAcE,KAAKa,QAAQ"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_contexts_command = require('../contexts/command.cjs');
|
|
3
|
+
const require_docs_helpers = require('../helpers/docs-helpers.cjs');
|
|
4
|
+
const require_plugin_utils_context_helpers = require('../plugin-utils/context-helpers.cjs');
|
|
5
|
+
const require_plugin_utils_reflect = require('../plugin-utils/reflect.cjs');
|
|
6
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
7
|
+
let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
8
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
9
|
+
let __alloy_js_markdown = require("@alloy-js/markdown");
|
|
10
|
+
let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
11
|
+
let __powerlines_plugin_alloy_markdown_components_markdown_file = require("@powerlines/plugin-alloy/markdown/components/markdown-file");
|
|
12
|
+
let __powerlines_plugin_alloy_markdown_components_markdown_table = require("@powerlines/plugin-alloy/markdown/components/markdown-table");
|
|
13
|
+
let __stryke_path_join = require("@stryke/path/join");
|
|
14
|
+
|
|
15
|
+
//#region src/components/docs.tsx
|
|
16
|
+
/**
|
|
17
|
+
* Generates the options markdown documentation for a command.
|
|
18
|
+
*/
|
|
19
|
+
function CommandOptionsDocs(props) {
|
|
20
|
+
const { command } = props;
|
|
21
|
+
if (Object.keys(command.options).length === 0) return ["This command does not have any options."];
|
|
22
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_markdown_components_markdown_table.MarkdownTable, { get data() {
|
|
23
|
+
return require_plugin_utils_reflect.sortOptions(Object.values(command.options)).map((option) => {
|
|
24
|
+
return {
|
|
25
|
+
name: option.name.trim(),
|
|
26
|
+
description: option.description.trim(),
|
|
27
|
+
defaultValue: option.default ? String(option.default)?.includes("\"") ? option.default : `\`${option.default}\`` : "",
|
|
28
|
+
required: option.optional || option.default ? "" : "✔"
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
} });
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Generates the markdown documentation for a command.
|
|
35
|
+
*/
|
|
36
|
+
function CommandDocs(props) {
|
|
37
|
+
const { levelOffset = 0, command } = props;
|
|
38
|
+
const context = (0, __powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
39
|
+
return [
|
|
40
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_markdown.Heading, {
|
|
41
|
+
level: 1 + levelOffset,
|
|
42
|
+
get children() {
|
|
43
|
+
return command.name;
|
|
44
|
+
}
|
|
45
|
+
}),
|
|
46
|
+
(0, __alloy_js_core_jsx_runtime.memo)(() => command.description),
|
|
47
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
48
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
49
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_markdown.Heading, {
|
|
50
|
+
level: 2 + levelOffset,
|
|
51
|
+
children: "Usage"
|
|
52
|
+
}),
|
|
53
|
+
__alloy_js_core.code`The command can be executed using the following syntax:
|
|
54
|
+
\`\`\`bash `,
|
|
55
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
56
|
+
(0, __alloy_js_core_jsx_runtime.memo)(() => __alloy_js_core.code`$ ${require_plugin_utils_context_helpers.getAppBin(context)} `),
|
|
57
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
|
|
58
|
+
get each() {
|
|
59
|
+
return command.path.segments;
|
|
60
|
+
},
|
|
61
|
+
children: (segment) => require_plugin_utils_context_helpers.isVariableCommandPath(segment) ? `<${command.path.variables[segment]?.variadic ? "..." : ""}${(0, __stryke_string_format_kebab_case.kebabCase)(require_plugin_utils_context_helpers.getVariableCommandPathName(segment))}>` : segment
|
|
62
|
+
}),
|
|
63
|
+
__alloy_js_core.code` [options] `,
|
|
64
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
65
|
+
__alloy_js_core.code`\`\`\``,
|
|
66
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
67
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
68
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_markdown.Heading, {
|
|
69
|
+
level: 2 + levelOffset,
|
|
70
|
+
children: "Options"
|
|
71
|
+
}),
|
|
72
|
+
(0, __alloy_js_core_jsx_runtime.memo)(() => __alloy_js_core.code`The following options are available for the ${command.title} command:`),
|
|
73
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
74
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
75
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(CommandOptionsDocs, { command }),
|
|
76
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
77
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
78
|
+
];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Generates the markdown documentation file for a command.
|
|
82
|
+
*/
|
|
83
|
+
function CommandDocsFile(props) {
|
|
84
|
+
const { levelOffset = 0, command, ...rest } = props;
|
|
85
|
+
const context = (0, __powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
86
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_contexts_command.CommandContext.Provider, {
|
|
87
|
+
value: command,
|
|
88
|
+
get children() {
|
|
89
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_markdown_components_markdown_file.MarkdownFile, (0, __alloy_js_core_jsx_runtime.mergeProps)({ get path() {
|
|
90
|
+
return (0, __stryke_path_join.joinPaths)(require_docs_helpers.getDocsOutputPath(context), `${command.path.value}.md`);
|
|
91
|
+
} }, rest, { get children() {
|
|
92
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(CommandDocs, {
|
|
93
|
+
levelOffset,
|
|
94
|
+
command
|
|
95
|
+
});
|
|
96
|
+
} }));
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
//#endregion
|
|
102
|
+
exports.CommandDocs = CommandDocs;
|
|
103
|
+
exports.CommandDocsFile = CommandDocsFile;
|
|
104
|
+
exports.CommandOptionsDocs = CommandOptionsDocs;
|
|
105
|
+
//# sourceMappingURL=docs.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.cjs","names":["code","For","Heading","usePowerlines","MarkdownFile","MarkdownTable","joinPaths","kebabCase","CommandContext","getDocsOutputPath","getAppBin","getVariableCommandPathName","isVariableCommandPath","sortOptions","CommandOptionsDocs","props","command","Object","keys","options","length","_$createComponent","data","values","map","option","name","trim","description","defaultValue","default","String","includes","required","optional","CommandDocs","levelOffset","context","level","children","_$memo","_$createIntrinsic","each","path","segments","segment","variables","variadic","title","CommandDocsFile","rest","Provider","value","_$mergeProps"],"sources":["../../src/components/docs.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, For } from \"@alloy-js/core\";\nimport { Heading } from \"@alloy-js/markdown\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { MarkdownFileProps } from \"@powerlines/plugin-alloy/markdown/components/markdown-file\";\nimport { MarkdownFile } from \"@powerlines/plugin-alloy/markdown/components/markdown-file\";\nimport { MarkdownTable } from \"@powerlines/plugin-alloy/markdown/components/markdown-table\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { CommandContext } from \"../contexts/command\";\nimport { getDocsOutputPath } from \"../helpers/docs-helpers\";\nimport {\n getAppBin,\n getVariableCommandPathName,\n isVariableCommandPath\n} from \"../plugin-utils/context-helpers\";\nimport { sortOptions } from \"../plugin-utils/reflect\";\nimport type { CommandTree } from \"../types/command\";\nimport type { Context } from \"../types/context\";\n\nexport interface CommandOptionsDocsProps {\n /**\n * The command to generate options documentation for.\n */\n command: CommandTree;\n}\n\n/**\n * Generates the options markdown documentation for a command.\n */\nexport function CommandOptionsDocs(props: CommandOptionsDocsProps) {\n const { command } = props;\n if (Object.keys(command.options).length === 0) {\n return <>This command does not have any options.</>;\n }\n\n return (\n <MarkdownTable\n data={sortOptions(Object.values(command.options)).map(option => {\n return {\n name: option.name.trim(),\n description: option.description.trim(),\n defaultValue: option.default\n ? String(option.default)?.includes('\"')\n ? option.default\n : `\\`${option.default}\\``\n : \"\",\n required: option.optional || option.default ? \"\" : \"✔\"\n };\n })}\n />\n );\n}\n\nexport interface CommandDocsProps {\n /**\n * The heading level offset to apply to the generated documentation.\n *\n * @remarks\n * This is useful when nesting the documentation within other markdown files.\n *\n * @defaultValue 0\n */\n levelOffset?: number;\n\n /**\n * The command to generate options documentation for.\n */\n command: CommandTree;\n}\n\n/**\n * Generates the markdown documentation for a command.\n */\nexport function CommandDocs(props: CommandDocsProps) {\n const { levelOffset = 0, command } = props;\n\n const context = usePowerlines<Context>();\n\n return (\n <>\n <Heading level={1 + levelOffset}>{command.name}</Heading>\n {command.description}\n <hbr />\n <hbr />\n <Heading level={2 + levelOffset}>Usage</Heading>\n {code`The command can be executed using the following syntax:\n \\`\\`\\`bash `}\n <hbr />\n {code`$ ${getAppBin(context)} `}\n <For each={command.path.segments}>\n {segment =>\n isVariableCommandPath(segment)\n ? `<${command.path.variables[segment]?.variadic ? \"...\" : \"\"}${kebabCase(\n getVariableCommandPathName(segment)\n )}>`\n : segment\n }\n </For>\n {code` [options] `}\n <hbr />\n {code`\\`\\`\\``}\n <hbr />\n <hbr />\n <Heading level={2 + levelOffset}>Options</Heading>\n {code`The following options are available for the ${\n command.title\n } command:`}\n <hbr />\n <hbr />\n <CommandOptionsDocs command={command} />\n <hbr />\n <hbr />\n </>\n );\n}\n\nexport interface CommandDocsFileProps extends Partial<MarkdownFileProps> {\n /**\n * The heading level offset to apply to the generated documentation.\n *\n * @remarks\n * This is useful when nesting the documentation within other markdown files.\n *\n * @defaultValue 0\n */\n levelOffset?: number;\n\n /**\n * The command to generate documentation for.\n */\n command: CommandTree;\n}\n\n/**\n * Generates the markdown documentation file for a command.\n */\nexport function CommandDocsFile(props: CommandDocsFileProps) {\n const { levelOffset = 0, command, ...rest } = props;\n\n const context = usePowerlines<Context>();\n\n return (\n <CommandContext.Provider value={command}>\n <MarkdownFile\n path={joinPaths(getDocsOutputPath(context), `${command.path.value}.md`)}\n {...rest}>\n <CommandDocs levelOffset={levelOffset} command={command} />\n </MarkdownFile>\n </CommandContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA+CA,SAAgBc,mBAAmBC,OAAgC;CACjE,MAAM,EAAEC,YAAYD;AACpB,KAAIE,OAAOC,KAAKF,QAAQG,QAAQ,CAACC,WAAW,EAC1C,QAAA,CAAA,0CAAA;AAGF,yDACGf,4EAAa,EAAA,IACZiB,OAAI;AAAA,SAAET,yCAAYI,OAAOM,OAAOP,QAAQG,QAAQ,CAAC,CAACK,KAAIC,WAAU;AAC9D,UAAO;IACLC,MAAMD,OAAOC,KAAKC,MAAM;IACxBC,aAAaH,OAAOG,YAAYD,MAAM;IACtCE,cAAcJ,OAAOK,UACjBC,OAAON,OAAOK,QAAQ,EAAEE,SAAS,KAAI,GACnCP,OAAOK,UACP,KAAKL,OAAOK,QAAO,MACrB;IACJG,UAAUR,OAAOS,YAAYT,OAAOK,UAAU,KAAK;IACpD;IACD;IAAA,CAAA;;;;;AAyBR,SAAgBK,YAAYpB,OAAyB;CACnD,MAAM,EAAEqB,cAAc,GAAGpB,YAAYD;CAErC,MAAMsB,8EAAkC;AAExC,QAAA;mDAEKnC,6BAAO;GAACoC,OAAO,IAAIF;GAAW,IAAAG,WAAA;AAAA,WAAGvB,QAAQU;;GAAI,CAAA;8CAC7CV,QAAQY,YAAW;mDAAA,OAAA,EAAA,CAAA;mDAAA,OAAA,EAAA,CAAA;mDAGnB1B,6BAAO;GAACoC,OAAO,IAAIF;GAAWG,UAAA;GAAA,CAAA;EAC9BvC,oBAAI;;mDACO,OAAA,EAAA,CAAA;8CAEXA,oBAAI,KAAKU,+CAAU2B,QAAQ,CAAA,GAAG;mDAC9BpC,qBAAG;GAAA,IAACyC,OAAI;AAAA,WAAE1B,QAAQ2B,KAAKC;;GAAQL,WAC7BM,YACCjC,2DAAsBiC,QAAQ,GAC1B,IAAI7B,QAAQ2B,KAAKG,UAAUD,UAAUE,WAAW,QAAQ,sDACtDpC,gEAA2BkC,QAC7B,CAAC,CAAA,KACDA;GAAO,CAAA;EAGd7C,oBAAI;mDAAa,OAAA,EAAA,CAAA;EAEjBA,oBAAI;mDAAQ,OAAA,EAAA,CAAA;mDAAA,OAAA,EAAA,CAAA;mDAGZE,6BAAO;GAACoC,OAAO,IAAIF;GAAWG,UAAA;GAAA,CAAA;8CAC9BvC,oBAAI,+CACHgB,QAAQgC,MAAK,WACJ;mDAAA,OAAA,EAAA,CAAA;mDAAA,OAAA,EAAA,CAAA;mDAGVlC,oBAAkB,EAAUE,SAAO,CAAA;mDAAA,OAAA,EAAA,CAAA;mDAAA,OAAA,EAAA,CAAA;EAAA;;;;;AA2B1C,SAAgBiC,gBAAgBlC,OAA6B;CAC3D,MAAM,EAAEqB,cAAc,GAAGpB,SAAS,GAAGkC,SAASnC;CAE9C,MAAMsB,8EAAkC;AAExC,yDACG7B,wCAAe2C,UAAQ;EAACC,OAAOpC;EAAO,IAAAuB,WAAA;AAAA,2DACpCnC,sHAAY,EAAA,IACXuC,OAAI;AAAA,6CAAYlC,uCAAkB4B,QAAQ,EAAE,GAAGrB,QAAQ2B,KAAKS,MAAK,KAAM;MAAA,EACnEF,MAAI,EAAA,IAAAX,WAAA;AAAA,4DACPJ,aAAW;KAAcC;KAAsBpB;KAAO,CAAA;MAAA,CAAA,CAAA;;EAAA,CAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CommandTree } from "../types/command.cjs";
|
|
2
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
3
|
+
import { MarkdownFileProps } from "@powerlines/plugin-alloy/markdown/components/markdown-file";
|
|
4
|
+
|
|
5
|
+
//#region src/components/docs.d.ts
|
|
6
|
+
interface CommandOptionsDocsProps {
|
|
7
|
+
/**
|
|
8
|
+
* The command to generate options documentation for.
|
|
9
|
+
*/
|
|
10
|
+
command: CommandTree;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Generates the options markdown documentation for a command.
|
|
14
|
+
*/
|
|
15
|
+
declare function CommandOptionsDocs(props: CommandOptionsDocsProps): _alloy_js_core0.Children;
|
|
16
|
+
interface CommandDocsProps {
|
|
17
|
+
/**
|
|
18
|
+
* The heading level offset to apply to the generated documentation.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* This is useful when nesting the documentation within other markdown files.
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue 0
|
|
24
|
+
*/
|
|
25
|
+
levelOffset?: number;
|
|
26
|
+
/**
|
|
27
|
+
* The command to generate options documentation for.
|
|
28
|
+
*/
|
|
29
|
+
command: CommandTree;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Generates the markdown documentation for a command.
|
|
33
|
+
*/
|
|
34
|
+
declare function CommandDocs(props: CommandDocsProps): _alloy_js_core0.Children;
|
|
35
|
+
interface CommandDocsFileProps extends Partial<MarkdownFileProps> {
|
|
36
|
+
/**
|
|
37
|
+
* The heading level offset to apply to the generated documentation.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* This is useful when nesting the documentation within other markdown files.
|
|
41
|
+
*
|
|
42
|
+
* @defaultValue 0
|
|
43
|
+
*/
|
|
44
|
+
levelOffset?: number;
|
|
45
|
+
/**
|
|
46
|
+
* The command to generate documentation for.
|
|
47
|
+
*/
|
|
48
|
+
command: CommandTree;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Generates the markdown documentation file for a command.
|
|
52
|
+
*/
|
|
53
|
+
declare function CommandDocsFile(props: CommandDocsFileProps): _alloy_js_core0.Children;
|
|
54
|
+
//#endregion
|
|
55
|
+
export { CommandDocs, CommandDocsFile, CommandDocsFileProps, CommandDocsProps, CommandOptionsDocs, CommandOptionsDocsProps };
|
|
56
|
+
//# sourceMappingURL=docs.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.d.cts","names":[],"sources":["../../src/components/docs.tsx"],"sourcesContent":[],"mappings":";;;;;UAqCiB,uBAAA;;;AAAjB;EAUgB,OAAA,EANL,WAMK;AAwBhB;AAoBA;AA2CA;;AAcW,iBArGK,kBAAA,CAqGL,KAAA,EArG+B,uBAqG/B,CAAA,EArGsD,eAAA,CAAA,QAqGtD;AAdmC,UA/D7B,gBAAA,CA+D6B;EAAO;AAoBrD;;;;;;;;;;;WArEW;;;;;iBAMK,WAAA,QAAmB,mBAAgB,eAAA,CAAA;UA2ClC,oBAAA,SAA6B,QAAQ;;;;;;;;;;;;;WAc3C;;;;;iBAMK,eAAA,QAAuB,uBAAoB,eAAA,CAAA"}
|