@power-plant/core 0.0.2 → 0.0.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/README.md +220 -0
- package/dist/base-BKbfgxno.d.cts +28 -0
- package/dist/base-BKbfgxno.d.cts.map +1 -0
- package/dist/base-BKbfgxno.d.mts +28 -0
- package/dist/base-BKbfgxno.d.mts.map +1 -0
- package/dist/create-B14Jt6Iu.d.mts +17 -0
- package/dist/create-B14Jt6Iu.d.mts.map +1 -0
- package/dist/create-Cfgth9sz.d.cts +19 -0
- package/dist/create-Cfgth9sz.d.cts.map +1 -0
- package/dist/create-D32Jusq_.d.cts +17 -0
- package/dist/create-D32Jusq_.d.cts.map +1 -0
- package/dist/create-DVpg-3po.d.mts +19 -0
- package/dist/create-DVpg-3po.d.mts.map +1 -0
- package/dist/create-DoyLue8r.d.cts +17 -0
- package/dist/create-DoyLue8r.d.cts.map +1 -0
- package/dist/create-vgEDsShD.d.mts +17 -0
- package/dist/create-vgEDsShD.d.mts.map +1 -0
- package/dist/define-DEe-HPar.d.cts +38 -0
- package/dist/define-DEe-HPar.d.cts.map +1 -0
- package/dist/define-RneysDu1.d.mts +38 -0
- package/dist/define-RneysDu1.d.mts.map +1 -0
- package/dist/generator/create.cjs +1 -0
- package/dist/generator/create.d.cts +2 -0
- package/dist/generator/create.d.mts +2 -0
- package/dist/generator/create.mjs +2 -0
- package/dist/generator/create.mjs.map +1 -0
- package/dist/generator/helpers.cjs +1 -0
- package/dist/generator/helpers.d.cts +6 -0
- package/dist/generator/helpers.d.cts.map +1 -0
- package/dist/generator/helpers.d.mts +6 -0
- package/dist/generator/helpers.d.mts.map +1 -0
- package/dist/generator/helpers.mjs +2 -0
- package/dist/generator/helpers.mjs.map +1 -0
- package/dist/generator/index.cjs +1 -1
- package/dist/generator/index.d.cts +2 -20
- package/dist/generator/index.d.mts +2 -20
- package/dist/generator/index.mjs +1 -2
- package/dist/{generator-C5O_C4RV.d.cts → generator-C1_Q-QAb.d.cts} +15 -12
- package/dist/generator-C1_Q-QAb.d.cts.map +1 -0
- package/dist/{generator-DZI01B4_.d.mts → generator-MC25UERM.d.mts} +15 -12
- package/dist/generator-MC25UERM.d.mts.map +1 -0
- package/dist/index-BVVgDSdq.d.cts +1 -0
- package/dist/index-BVVgDSdq.d.mts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.mts +8 -8
- package/dist/index.mjs +1 -1
- package/dist/metadata-Cb6iMZqW.cjs +1 -0
- package/dist/metadata-Dmhrb3Kv.mjs +2 -0
- package/dist/metadata-Dmhrb3Kv.mjs.map +1 -0
- package/dist/sink/create.cjs +1 -0
- package/dist/sink/create.d.cts +2 -0
- package/dist/sink/create.d.mts +2 -0
- package/dist/sink/create.mjs +2 -0
- package/dist/sink/create.mjs.map +1 -0
- package/dist/sink/define.cjs +1 -0
- package/dist/sink/define.d.cts +37 -0
- package/dist/sink/define.d.cts.map +1 -0
- package/dist/sink/define.d.mts +37 -0
- package/dist/sink/define.d.mts.map +1 -0
- package/dist/sink/define.mjs +2 -0
- package/dist/sink/define.mjs.map +1 -0
- package/dist/sink/helpers.cjs +1 -0
- package/dist/sink/helpers.d.cts +13 -0
- package/dist/sink/helpers.d.cts.map +1 -0
- package/dist/sink/helpers.d.mts +13 -0
- package/dist/sink/helpers.d.mts.map +1 -0
- package/dist/sink/helpers.mjs +2 -0
- package/dist/sink/helpers.mjs.map +1 -0
- package/dist/sink/index.cjs +1 -1
- package/dist/sink/index.d.cts +2 -15
- package/dist/sink/index.d.mts +2 -15
- package/dist/sink/index.mjs +1 -1
- package/dist/sink-CAWlC7am.d.mts +58 -0
- package/dist/sink-CAWlC7am.d.mts.map +1 -0
- package/dist/sink-CTx7UtqU.d.cts +58 -0
- package/dist/sink-CTx7UtqU.d.cts.map +1 -0
- package/dist/source/create.cjs +1 -0
- package/dist/source/create.d.cts +2 -0
- package/dist/source/create.d.mts +2 -0
- package/dist/source/create.mjs +2 -0
- package/dist/source/create.mjs.map +1 -0
- package/dist/source/define.cjs +1 -0
- package/dist/source/define.d.cts +2 -0
- package/dist/source/define.d.mts +2 -0
- package/dist/source/define.mjs +2 -0
- package/dist/source/define.mjs.map +1 -0
- package/dist/source/helpers.cjs +1 -0
- package/dist/source/helpers.d.cts +13 -0
- package/dist/source/helpers.d.cts.map +1 -0
- package/dist/source/helpers.d.mts +13 -0
- package/dist/source/helpers.d.mts.map +1 -0
- package/dist/source/helpers.mjs +2 -0
- package/dist/source/helpers.mjs.map +1 -0
- package/dist/source/index.cjs +1 -1
- package/dist/source/index.d.cts +3 -16
- package/dist/source/index.d.mts +3 -16
- package/dist/source/index.mjs +1 -1
- package/dist/source-B3tctCZE.d.cts +57 -0
- package/dist/source-B3tctCZE.d.cts.map +1 -0
- package/dist/source-DjKhYXZ6.d.mts +57 -0
- package/dist/source-DjKhYXZ6.d.mts.map +1 -0
- package/package.json +127 -27
- package/dist/config.cjs +0 -0
- package/dist/config.d.cts +0 -10
- package/dist/config.d.cts.map +0 -1
- package/dist/config.d.mts +0 -10
- package/dist/config.d.mts.map +0 -1
- package/dist/config.mjs +0 -2
- package/dist/config.mjs.map +0 -1
- package/dist/extract-BzZLelb2.mjs +0 -2
- package/dist/extract-BzZLelb2.mjs.map +0 -1
- package/dist/extract-DUwG1ZUO.cjs +0 -1
- package/dist/extract-FkKA9g1K.cjs +0 -1
- package/dist/extract-ZIpZAKsq.mjs +0 -2
- package/dist/extract-ZIpZAKsq.mjs.map +0 -1
- package/dist/generator/index.d.cts.map +0 -1
- package/dist/generator/index.d.mts.map +0 -1
- package/dist/generator/index.mjs.map +0 -1
- package/dist/generator-C5O_C4RV.d.cts.map +0 -1
- package/dist/generator-DZI01B4_.d.mts.map +0 -1
- package/dist/sink/index.d.cts.map +0 -1
- package/dist/sink/index.d.mts.map +0 -1
- package/dist/source/index.d.cts.map +0 -1
- package/dist/source/index.d.mts.map +0 -1
- package/dist/types-B2MtSxCp.d.cts +0 -47
- package/dist/types-B2MtSxCp.d.cts.map +0 -1
- package/dist/types-B2MtSxCp.d.mts +0 -47
- package/dist/types-B2MtSxCp.d.mts.map +0 -1
- package/dist/types-DJo-IRmS.d.cts +0 -47
- package/dist/types-DJo-IRmS.d.cts.map +0 -1
- package/dist/types-DJo-IRmS.d.mts +0 -47
- package/dist/types-DJo-IRmS.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -1,4 +1,59 @@
|
|
|
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/power-plant/media/banner-1280x640-dark.gif">
|
|
9
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/power-plant/media/banner-1280x640-light.gif">
|
|
10
|
+
<img src="https://public.storm-cdn.com/power-plant/media/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/power-plant" target="_blank">GitHub</a> •
|
|
19
|
+
<a href="https://discord.gg/MQ6YVzakM5">Discord</a> • <a href="https://docs.stormsoftware.com/projects/power-plant/" target="_blank">Docs</a> • <a href="https://stormsoftware.com/contact" target="_blank">Contact</a> •
|
|
20
|
+
<a href="https://github.com/storm-software/power-plant/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
|
+
|
|
26
|
+
**☢️ Power Plant** is a collection of TypeScript packages and stand-alone developer tools that center on a single, simple concept: **generate anything from a specification**. The goal of Power Plant is to make it easy for developers to generate code, documentation, and other artifacts from a specification, without having to write any boilerplate code themselves.
|
|
27
|
+
|
|
28
|
+
In the background, Power Plant will also gather metadata about the repository and provide it to LLMs and various other tools. **This allows our favorite AI models to understand more than just the source code, but also its context, the reason why it exists, and its intended usage.**
|
|
29
|
+
|
|
30
|
+
The Power Plant monorepo is a collection of packages that are designed to work together, but in many cases can also be used independently.
|
|
31
|
+
|
|
32
|
+
<br />
|
|
33
|
+
|
|
34
|
+
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
35
|
+
|
|
36
|
+
[](https://docs.stormsoftware.com/projects/power-plant) [](http://commitizen.github.io/cz-cli/)  
|
|
37
|
+
|
|
38
|
+
<!-- prettier-ignore-start -->
|
|
39
|
+
<!-- markdownlint-disable -->
|
|
40
|
+
|
|
41
|
+
> [!IMPORTANT]
|
|
42
|
+
> 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.
|
|
43
|
+
|
|
44
|
+
<!-- markdownlint-restore -->
|
|
45
|
+
<!-- prettier-ignore-end -->
|
|
46
|
+
|
|
47
|
+
<div align="center">
|
|
48
|
+
<a href="https://github.com/storm-software/power-plant" target="_blank">
|
|
49
|
+
<b>Be sure to ⭐ this repository on GitHub so you can keep up to date on any daily progress!</b>
|
|
50
|
+
</a>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<br />
|
|
54
|
+
|
|
55
|
+
<!-- markdownlint-restore -->
|
|
56
|
+
<!-- prettier-ignore-end -->
|
|
2
57
|
|
|
3
58
|
<!-- END header -->
|
|
4
59
|
|
|
@@ -41,5 +96,170 @@ Run `nx build core` to build the library.
|
|
|
41
96
|
Run `nx test core` to execute the unit tests via [Vitest](https://vitest.dev/).
|
|
42
97
|
|
|
43
98
|
<!-- START footer -->
|
|
99
|
+
<!-- prettier-ignore-start -->
|
|
100
|
+
<!-- markdownlint-disable -->
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
## Storm Workspaces
|
|
104
|
+
|
|
105
|
+
Storm workspaces are built using
|
|
106
|
+
<a href="https://nx.dev/" target="_blank">Nx</a>, a set of extensible dev tools
|
|
107
|
+
for monorepos, which helps you develop like Google, Facebook, and Microsoft.
|
|
108
|
+
Building on top of Nx, the Open System provides a set of tools and patterns that
|
|
109
|
+
help you scale your monorepo to many teams while keeping the codebase
|
|
110
|
+
maintainable.
|
|
111
|
+
|
|
112
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
113
|
+
|
|
114
|
+
## Roadmap
|
|
115
|
+
|
|
116
|
+
See the [open issues](https://github.com/storm-software/power-plant/issues) for
|
|
117
|
+
a list of proposed features (and known issues).
|
|
118
|
+
|
|
119
|
+
- [Top Feature Requests](https://github.com/storm-software/power-plant/issues?q=label%3Aenhancement+is%3Aopen+sort%3Areactions-%2B1-desc)
|
|
120
|
+
(Add your votes using the 👍 reaction)
|
|
121
|
+
- [Top Bugs](https://github.com/storm-software/power-plant/issues?q=is%3Aissue+is%3Aopen+label%3Abug+sort%3Areactions-%2B1-desc)
|
|
122
|
+
(Add your votes using the 👍 reaction)
|
|
123
|
+
- [Newest Bugs](https://github.com/storm-software/power-plant/issues?q=is%3Aopen+is%3Aissue+label%3Abug)
|
|
124
|
+
|
|
125
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
126
|
+
|
|
127
|
+
## Support
|
|
128
|
+
|
|
129
|
+
Reach out to the maintainer at one of the following places:
|
|
130
|
+
|
|
131
|
+
- [Contact](https://stormsoftware.com/contact)
|
|
132
|
+
- [GitHub discussions](https://github.com/storm-software/power-plant/discussions)
|
|
133
|
+
- <support@stormsoftware.com>
|
|
134
|
+
|
|
135
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
This project is licensed under the **Apache License 2.0**. Feel free to edit and
|
|
140
|
+
distribute this template as you like.
|
|
141
|
+
|
|
142
|
+
See [LICENSE](LICENSE) for more information.
|
|
143
|
+
|
|
144
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
145
|
+
|
|
146
|
+
## Changelog
|
|
147
|
+
|
|
148
|
+
This project adheres to
|
|
149
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html). Every release, along
|
|
150
|
+
with the migration instructions, is documented in the [CHANGELOG](CHANGELOG.md)
|
|
151
|
+
file
|
|
152
|
+
|
|
153
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
154
|
+
|
|
155
|
+
## Contributing
|
|
156
|
+
|
|
157
|
+
First off, thanks for taking the time to contribute! Contributions are what
|
|
158
|
+
makes the open-source community such an amazing place to learn, inspire, and
|
|
159
|
+
create. Any contributions you make will benefit everybody else and are **greatly
|
|
160
|
+
appreciated**.
|
|
161
|
+
|
|
162
|
+
Please try to create bug reports that are:
|
|
163
|
+
|
|
164
|
+
- _Reproducible._ Include steps to reproduce the problem.
|
|
165
|
+
- _Specific._ Include as much detail as possible: which version, what
|
|
166
|
+
environment, etc.
|
|
167
|
+
- _Unique._ Do not duplicate existing opened issues.
|
|
168
|
+
- _Scoped to a Single Bug._ One bug per report.
|
|
169
|
+
|
|
170
|
+
Please adhere to this project's [code of conduct](.github/CODE_OF_CONDUCT.md).
|
|
171
|
+
|
|
172
|
+
You can use
|
|
173
|
+
[markdownlint-cli](https://github.com/storm-software/power-plant/markdownlint-cli)
|
|
174
|
+
to check for common markdown style inconsistency.
|
|
175
|
+
|
|
176
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
177
|
+
|
|
178
|
+
## Contributors
|
|
179
|
+
|
|
180
|
+
Thanks goes to these wonderful people
|
|
181
|
+
([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
182
|
+
|
|
183
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
184
|
+
|
|
185
|
+
<table>
|
|
186
|
+
<tbody>
|
|
187
|
+
<tr>
|
|
188
|
+
<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/power-plant/commits?author=sullivanpj" title="Code">💻</a> <a href="#tool-sullivanpj" title="Tools">🔧</a> <a href="https://github.com/storm-software/power-plant/commits?author=sullivanpj" title="Documentation">📖</a> <a href="https://github.com/storm-software/power-plant/commits?author=sullivanpj" title="Tests">⚠️</a></td>
|
|
189
|
+
<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>
|
|
190
|
+
<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>
|
|
191
|
+
</tr>
|
|
192
|
+
</tbody>
|
|
193
|
+
<tfoot>
|
|
194
|
+
<tr>
|
|
195
|
+
<td align="center" size="13px" colspan="7">
|
|
196
|
+
<img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg" alt="All Contributors">
|
|
197
|
+
<a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a>
|
|
198
|
+
</img>
|
|
199
|
+
</td>
|
|
200
|
+
</tr>
|
|
201
|
+
</tfoot>
|
|
202
|
+
</table>
|
|
203
|
+
|
|
204
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
205
|
+
|
|
206
|
+
This project follows the
|
|
207
|
+
[all-contributors](https://github.com/all-contributors/all-contributors)
|
|
208
|
+
specification. Contributions of any kind welcome!
|
|
209
|
+
|
|
210
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
211
|
+
<br />
|
|
212
|
+
|
|
213
|
+
<hr />
|
|
214
|
+
<br />
|
|
215
|
+
|
|
216
|
+
<div align="center">
|
|
217
|
+
<picture>
|
|
218
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/media/banner-1280x320-dark.webp">
|
|
219
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/media/banner-1280x320-light.webp">
|
|
220
|
+
<img src="https://public.storm-cdn.com/storm-software/media/banner-1280x320-dark.webp" width="100%" alt="Storm Software" />
|
|
221
|
+
</picture>
|
|
222
|
+
</div>
|
|
223
|
+
<br />
|
|
224
|
+
|
|
225
|
+
<div align="center">
|
|
226
|
+
<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>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
<div align="center">
|
|
230
|
+
<b>Fingerprint:</b> 1BD2 7192 7770 2549 F4C9 F238 E6AD C420 DA5C 4C2D
|
|
231
|
+
</div>
|
|
232
|
+
<br />
|
|
233
|
+
|
|
234
|
+
Storm Software is an open source software development organization and creator
|
|
235
|
+
of Acidic, StormStack and StormCloud.
|
|
236
|
+
|
|
237
|
+
Our mission is to make software development more accessible. Our ideal future is
|
|
238
|
+
one where anyone can create software without years of prior development
|
|
239
|
+
experience serving as a barrier to entry. We hope to achieve this via LLMs,
|
|
240
|
+
Generative AI, and intuitive, high-level data modeling/programming languages.
|
|
241
|
+
|
|
242
|
+
Join us on [Discord](https://discord.gg/MQ6YVzakM5) to chat with the team,
|
|
243
|
+
receive release notifications, ask questions, and get involved.
|
|
244
|
+
|
|
245
|
+
If this sounds interesting, and you would like to help us in creating the next
|
|
246
|
+
generation of development tools, please reach out on our
|
|
247
|
+
[website](https://stormsoftware.com/contact) or join our
|
|
248
|
+
[Slack channel](https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA)!
|
|
249
|
+
|
|
250
|
+
<br />
|
|
251
|
+
|
|
252
|
+
<div align="center"><a href="https://stormsoftware.com" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/icons/circle-dark.webp"><source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/icons/circle-light.webp"><img src="https://public.storm-cdn.com/storm-software/icons/circle-dark.webp" width="200px" alt="Storm Software" /></picture></a></div>
|
|
253
|
+
<br />
|
|
254
|
+
<div align="center"><a href="https://stormsoftware.com" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/misc/text/visit-us-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/misc/text/visit-us-light.png"><img src="https://public.storm-cdn.com/misc/text/visit-us-dark.png" height="90px" alt="Visit us at stormsoftware.com" /></picture></a></div>
|
|
255
|
+
<br />
|
|
256
|
+
|
|
257
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
258
|
+
<br />
|
|
259
|
+
<br />
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
<!-- markdownlint-restore -->
|
|
263
|
+
<!-- prettier-ignore-end -->
|
|
44
264
|
|
|
45
265
|
<!-- END footer -->
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region ../../../node_modules/.pnpm/@stryke+types@0.12.20/node_modules/@stryke/types/dist/base.d.mts
|
|
2
|
+
/**
|
|
3
|
+
* Matches a value that is either of type `T` or a promise that resolves to `T`.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* type Result = MaybePromise<string>;
|
|
8
|
+
* // string | Promise<string>
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
12
|
+
/**
|
|
13
|
+
* Matches a reducer function that takes the current state and an action, returning the next state.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* This is the function signature used in state management libraries like Redux.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* type CounterReducer = ReducerFunction<number, { type: 'increment' | 'decrement' }>;
|
|
21
|
+
* const reducer: CounterReducer = (state, action) => {
|
|
22
|
+
* return action.type === 'increment' ? state + 1 : state - 1;
|
|
23
|
+
* };
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
//#endregion
|
|
27
|
+
export { MaybePromise as t };
|
|
28
|
+
//# sourceMappingURL=base-BKbfgxno.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-BKbfgxno.d.cts","names":["SerializablePrimitive","Primitive","Date","RegExp","Function","Promise","value","Record","TypeTester","Value","X","A","ReadonlyArray","P","List","R","args","FunctionLike","T","Nullish","Map","WeakMap","WeakKey","emptyObjectSymbol","PlainObject","AnyArray","AnyMap","AnyWeakMap","IndexType","TypedIndexable","F1","F2","Uppercase","Lowercase","AnyCase","F","EMPTY_STRING","_args","prototype","clone","TState","TAction","state","action","IArguments","Set","K","Omit","Required","Pick","Narrowable","NarrowRaw","Try","A1","A2","Catch","N","Result","ComputeRange","TValue","TName","name","File","D","BrowserNativeObject","NestedValue","DeepPartial","Depth","DeepRequired","DeepNonNullable","NonNullable","DeepReadonly","Array","U","DeepReadonlyNonNullable","DeepReadonlyNullable","initialValue","currentValue","BaseType","Exclude","Key","B","G","KeyType","ExcludeType","IsEqual","requireExactProps","ObjectType","KeysType","Options","ExceptOptions","Filter","Partial","Keys","$NestedValue","current","id","version","sequence","__type","Typed","isTypeOf","BuiltIns","arguments_","IsNull","IsUndefined","AnyFunction","globalThis","Arguments","AbstractConstructor","L","Fill","BuildTuple","ArrayBuffer","DataView","Error","TypedArray","Blob","StructuredCloneable","key","ReadonlyMap","ReadonlySet","StructuredCloneablePrimitive","StructuredCloneableData","StructuredCloneableCollection"],"sources":["../../../../node_modules/.pnpm/@stryke+types@0.12.20/node_modules/@stryke/types/dist/base.d.mts"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;KAmOK,YAAA,MAAkB,CAAA,GAAI,OAAA,CAAQ,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region ../../../node_modules/.pnpm/@stryke+types@0.12.20/node_modules/@stryke/types/dist/base.d.mts
|
|
2
|
+
/**
|
|
3
|
+
* Matches a value that is either of type `T` or a promise that resolves to `T`.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* type Result = MaybePromise<string>;
|
|
8
|
+
* // string | Promise<string>
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
12
|
+
/**
|
|
13
|
+
* Matches a reducer function that takes the current state and an action, returning the next state.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* This is the function signature used in state management libraries like Redux.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* type CounterReducer = ReducerFunction<number, { type: 'increment' | 'decrement' }>;
|
|
21
|
+
* const reducer: CounterReducer = (state, action) => {
|
|
22
|
+
* return action.type === 'increment' ? state + 1 : state - 1;
|
|
23
|
+
* };
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
//#endregion
|
|
27
|
+
export { MaybePromise as t };
|
|
28
|
+
//# sourceMappingURL=base-BKbfgxno.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-BKbfgxno.d.mts","names":["SerializablePrimitive","Primitive","Date","RegExp","Function","Promise","value","Record","TypeTester","Value","X","A","ReadonlyArray","P","List","R","args","FunctionLike","T","Nullish","Map","WeakMap","WeakKey","emptyObjectSymbol","PlainObject","AnyArray","AnyMap","AnyWeakMap","IndexType","TypedIndexable","F1","F2","Uppercase","Lowercase","AnyCase","F","EMPTY_STRING","_args","prototype","clone","TState","TAction","state","action","IArguments","Set","K","Omit","Required","Pick","Narrowable","NarrowRaw","Try","A1","A2","Catch","N","Result","ComputeRange","TValue","TName","name","File","D","BrowserNativeObject","NestedValue","DeepPartial","Depth","DeepRequired","DeepNonNullable","NonNullable","DeepReadonly","Array","U","DeepReadonlyNonNullable","DeepReadonlyNullable","initialValue","currentValue","BaseType","Exclude","Key","B","G","KeyType","ExcludeType","IsEqual","requireExactProps","ObjectType","KeysType","Options","ExceptOptions","Filter","Partial","Keys","$NestedValue","current","id","version","sequence","__type","Typed","isTypeOf","BuiltIns","arguments_","IsNull","IsUndefined","AnyFunction","globalThis","Arguments","AbstractConstructor","L","Fill","BuildTuple","ArrayBuffer","DataView","Error","TypedArray","Blob","StructuredCloneable","key","ReadonlyMap","ReadonlySet","StructuredCloneablePrimitive","StructuredCloneableData","StructuredCloneableCollection"],"sources":["../../../../node_modules/.pnpm/@stryke+types@0.12.20/node_modules/@stryke/types/dist/base.d.mts"],"x_google_ignoreList":[0],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { i as SinkInput, n as Sink, t as InferCreateSinkOptions } from "./sink-CAWlC7am.mjs";
|
|
2
|
+
import { ExtractedSchema, Meta, MetaInput, SchemaOf } from "@power-plant/schema/types";
|
|
3
|
+
|
|
4
|
+
//#region src/sink/create.d.ts
|
|
5
|
+
declare function extractSinkMeta<TSpec>(schema: ExtractedSchema<TSpec>, input?: MetaInput<TSpec>): Meta<TSpec>;
|
|
6
|
+
/**
|
|
7
|
+
* Normalizes any accepted sink input into a concrete sink descriptor.
|
|
8
|
+
*
|
|
9
|
+
* @param schema - The schema that the sink input is expected to conform to.
|
|
10
|
+
* @param input - The sink input to normalize.
|
|
11
|
+
* @param options - Optional options for resolving the sink input.
|
|
12
|
+
* @returns A promise that resolves to a normalized sink descriptor.
|
|
13
|
+
*/
|
|
14
|
+
declare function createSink<TSpec, TOptions extends object, TReturns = void>(schema: SchemaOf<TSpec>, input: SinkInput<TSpec, TOptions, TReturns>, options?: InferCreateSinkOptions<typeof input>): Promise<Sink<TSpec, TOptions, TReturns>>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { extractSinkMeta as n, createSink as t };
|
|
17
|
+
//# sourceMappingURL=create-B14Jt6Iu.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-B14Jt6Iu.d.mts","names":[],"sources":["../src/sink/create.ts"],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { a as InferCreateGeneratorOptions, n as GeneratorInput, t as Generator } from "./generator-C1_Q-QAb.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/generator/create.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Creates a generator from raw schema/source/sink inputs and resolves all descriptors.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* This function is used to create a generator from raw schema, source, and sink inputs. It resolves all descriptors and returns a fully constructed generator that can be used to generate output based on the provided schema and options.
|
|
9
|
+
*
|
|
10
|
+
* @template TSpec - The type of the specification that the generator will produce.
|
|
11
|
+
* @template TOptions - The type of the options that will be passed to the generator during generation.
|
|
12
|
+
* @param input - The generator input containing schema, source, sink, and optional meta information.
|
|
13
|
+
* @param options - Optional extraction options for schema, source, and sink.
|
|
14
|
+
* @returns A promise that resolves to a fully constructed generator.
|
|
15
|
+
*/
|
|
16
|
+
declare function createGenerator<TSpec, TOptions extends object, TReturns = void>(input: GeneratorInput<TSpec, TOptions, TReturns>, options?: InferCreateGeneratorOptions<typeof input>): Promise<Generator<TSpec, TOptions, TReturns>>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { createGenerator as t };
|
|
19
|
+
//# sourceMappingURL=create-Cfgth9sz.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-Cfgth9sz.d.cts","names":[],"sources":["../src/generator/create.ts"],"mappings":";;;;;AA2CA;;;;;;;;;;iBAAsB,eAAA,kDAKpB,KAAA,EAAO,cAAA,CAAe,KAAA,EAAO,QAAA,EAAU,QAAA,GACvC,OAAA,GAAS,2BAAA,QAAmC,KAAA,IAC3C,OAAA,CAAQ,SAAA,CAAU,KAAA,EAAO,QAAA,EAAU,QAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { i as SinkInput, n as Sink, t as InferCreateSinkOptions } from "./sink-CTx7UtqU.cjs";
|
|
2
|
+
import { ExtractedSchema, Meta, MetaInput, SchemaOf } from "@power-plant/schema/types";
|
|
3
|
+
|
|
4
|
+
//#region src/sink/create.d.ts
|
|
5
|
+
declare function extractSinkMeta<TSpec>(schema: ExtractedSchema<TSpec>, input?: MetaInput<TSpec>): Meta<TSpec>;
|
|
6
|
+
/**
|
|
7
|
+
* Normalizes any accepted sink input into a concrete sink descriptor.
|
|
8
|
+
*
|
|
9
|
+
* @param schema - The schema that the sink input is expected to conform to.
|
|
10
|
+
* @param input - The sink input to normalize.
|
|
11
|
+
* @param options - Optional options for resolving the sink input.
|
|
12
|
+
* @returns A promise that resolves to a normalized sink descriptor.
|
|
13
|
+
*/
|
|
14
|
+
declare function createSink<TSpec, TOptions extends object, TReturns = void>(schema: SchemaOf<TSpec>, input: SinkInput<TSpec, TOptions, TReturns>, options?: InferCreateSinkOptions<typeof input>): Promise<Sink<TSpec, TOptions, TReturns>>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { extractSinkMeta as n, createSink as t };
|
|
17
|
+
//# sourceMappingURL=create-D32Jusq_.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-D32Jusq_.d.cts","names":[],"sources":["../src/sink/create.ts"],"mappings":";;;;iBAkCgB,eAAA,QACd,MAAA,EAAQ,eAAA,CAAgB,KAAA,GACxB,KAAA,GAAQ,SAAA,CAAU,KAAA,IACjB,IAAA,CAAK,KAAA;;AAHR;;;;;;;iBAuBsB,UAAA,kDAKpB,MAAA,EAAQ,QAAA,CAAS,KAAA,GACjB,KAAA,EAAO,SAAA,CAAU,KAAA,EAAO,QAAA,EAAU,QAAA,GAClC,OAAA,GAAS,sBAAA,QAA8B,KAAA,IACtC,OAAA,CAAQ,IAAA,CAAK,KAAA,EAAO,QAAA,EAAU,QAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { a as InferCreateGeneratorOptions, n as GeneratorInput, t as Generator } from "./generator-MC25UERM.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/generator/create.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Creates a generator from raw schema/source/sink inputs and resolves all descriptors.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* This function is used to create a generator from raw schema, source, and sink inputs. It resolves all descriptors and returns a fully constructed generator that can be used to generate output based on the provided schema and options.
|
|
9
|
+
*
|
|
10
|
+
* @template TSpec - The type of the specification that the generator will produce.
|
|
11
|
+
* @template TOptions - The type of the options that will be passed to the generator during generation.
|
|
12
|
+
* @param input - The generator input containing schema, source, sink, and optional meta information.
|
|
13
|
+
* @param options - Optional extraction options for schema, source, and sink.
|
|
14
|
+
* @returns A promise that resolves to a fully constructed generator.
|
|
15
|
+
*/
|
|
16
|
+
declare function createGenerator<TSpec, TOptions extends object, TReturns = void>(input: GeneratorInput<TSpec, TOptions, TReturns>, options?: InferCreateGeneratorOptions<typeof input>): Promise<Generator<TSpec, TOptions, TReturns>>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { createGenerator as t };
|
|
19
|
+
//# sourceMappingURL=create-DVpg-3po.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-DVpg-3po.d.mts","names":[],"sources":["../src/generator/create.ts"],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { i as SourceInput, n as Source, t as InferCreateSourceOptions } from "./source-B3tctCZE.cjs";
|
|
2
|
+
import { ExtractedSchema, Meta, MetaInput, SchemaOf } from "@power-plant/schema/types";
|
|
3
|
+
|
|
4
|
+
//#region src/source/create.d.ts
|
|
5
|
+
declare function extractSourceMeta<TSpec>(schema: ExtractedSchema<TSpec>, input?: MetaInput<TSpec>): Meta<TSpec>;
|
|
6
|
+
/**
|
|
7
|
+
* Normalizes any accepted source input into a concrete source descriptor.
|
|
8
|
+
*
|
|
9
|
+
* @param schema - The schema that the source input is expected to conform to.
|
|
10
|
+
* @param input - The source input to normalize.
|
|
11
|
+
* @param options - Optional options for resolving the source input.
|
|
12
|
+
* @returns A promise that resolves to a normalized source descriptor.
|
|
13
|
+
*/
|
|
14
|
+
declare function createSource<TSpec, TOptions extends object>(schema: SchemaOf<TSpec>, input: SourceInput<TSpec, TOptions>, options?: InferCreateSourceOptions<typeof input>): Promise<Source<TSpec, TOptions>>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { extractSourceMeta as n, createSource as t };
|
|
17
|
+
//# sourceMappingURL=create-DoyLue8r.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-DoyLue8r.d.cts","names":[],"sources":["../src/source/create.ts"],"mappings":";;;;iBAuCgB,iBAAA,QACd,MAAA,EAAQ,eAAA,CAAgB,KAAA,GACxB,KAAA,GAAQ,SAAA,CAAU,KAAA,IACjB,IAAA,CAAK,KAAA;;AAHR;;;;;;;iBAuBsB,YAAA,iCACpB,MAAA,EAAQ,QAAA,CAAS,KAAA,GACjB,KAAA,EAAO,WAAA,CAAY,KAAA,EAAO,QAAA,GAC1B,OAAA,GAAS,wBAAA,QAAgC,KAAA,IACxC,OAAA,CAAQ,MAAA,CAAO,KAAA,EAAO,QAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { i as SourceInput, n as Source, t as InferCreateSourceOptions } from "./source-DjKhYXZ6.mjs";
|
|
2
|
+
import { ExtractedSchema, Meta, MetaInput, SchemaOf } from "@power-plant/schema/types";
|
|
3
|
+
|
|
4
|
+
//#region src/source/create.d.ts
|
|
5
|
+
declare function extractSourceMeta<TSpec>(schema: ExtractedSchema<TSpec>, input?: MetaInput<TSpec>): Meta<TSpec>;
|
|
6
|
+
/**
|
|
7
|
+
* Normalizes any accepted source input into a concrete source descriptor.
|
|
8
|
+
*
|
|
9
|
+
* @param schema - The schema that the source input is expected to conform to.
|
|
10
|
+
* @param input - The source input to normalize.
|
|
11
|
+
* @param options - Optional options for resolving the source input.
|
|
12
|
+
* @returns A promise that resolves to a normalized source descriptor.
|
|
13
|
+
*/
|
|
14
|
+
declare function createSource<TSpec, TOptions extends object>(schema: SchemaOf<TSpec>, input: SourceInput<TSpec, TOptions>, options?: InferCreateSourceOptions<typeof input>): Promise<Source<TSpec, TOptions>>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { extractSourceMeta as n, createSource as t };
|
|
17
|
+
//# sourceMappingURL=create-vgEDsShD.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-vgEDsShD.d.mts","names":[],"sources":["../src/source/create.ts"],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { a as SourceInputObject, i as SourceInput } from "./source-B3tctCZE.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/source/define.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Defines a source input object. If the provided source is already a source input object, it will be returned as-is. Otherwise, it will be wrapped in an object with a `source` property.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { defineSource } from "@power-plant/core";
|
|
10
|
+
*
|
|
11
|
+
* // Define a source from a source function
|
|
12
|
+
* export default defineSource((options) => {
|
|
13
|
+
* // Your source logic here
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* // Define a source from an existing source input object
|
|
17
|
+
* export default defineSource({
|
|
18
|
+
* meta: {
|
|
19
|
+
* name: "My Source",
|
|
20
|
+
* version: "1.0.0",
|
|
21
|
+
* description: "A source that does something.",
|
|
22
|
+
* },
|
|
23
|
+
* schema: z.object({
|
|
24
|
+
* // Your schema definition here
|
|
25
|
+
* }),
|
|
26
|
+
* source: (options) => {
|
|
27
|
+
* // Your source logic here
|
|
28
|
+
* },
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @param source - The source input to define. This can be either a source input object or a source function.
|
|
33
|
+
* @returns A source input object that contains the provided source. If the input was already a source input object, it will be returned unchanged.
|
|
34
|
+
*/
|
|
35
|
+
declare function defineSource<TSpec, TOptions extends object>(source: SourceInput<TSpec, TOptions>): SourceInputObject<TSpec, TOptions>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { defineSource as t };
|
|
38
|
+
//# sourceMappingURL=define-DEe-HPar.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-DEe-HPar.d.cts","names":[],"sources":["../src/source/define.ts"],"mappings":";;;;;AAoDA;;;;;;;;;;;;;;;;;;;;;AAEoC;;;;;;;;iBAFpB,YAAA,iCACd,MAAA,EAAQ,WAAA,CAAY,KAAA,EAAO,QAAA,IAC1B,iBAAA,CAAkB,KAAA,EAAO,QAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { a as SourceInputObject, i as SourceInput } from "./source-DjKhYXZ6.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/source/define.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Defines a source input object. If the provided source is already a source input object, it will be returned as-is. Otherwise, it will be wrapped in an object with a `source` property.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { defineSource } from "@power-plant/core";
|
|
10
|
+
*
|
|
11
|
+
* // Define a source from a source function
|
|
12
|
+
* export default defineSource((options) => {
|
|
13
|
+
* // Your source logic here
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* // Define a source from an existing source input object
|
|
17
|
+
* export default defineSource({
|
|
18
|
+
* meta: {
|
|
19
|
+
* name: "My Source",
|
|
20
|
+
* version: "1.0.0",
|
|
21
|
+
* description: "A source that does something.",
|
|
22
|
+
* },
|
|
23
|
+
* schema: z.object({
|
|
24
|
+
* // Your schema definition here
|
|
25
|
+
* }),
|
|
26
|
+
* source: (options) => {
|
|
27
|
+
* // Your source logic here
|
|
28
|
+
* },
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @param source - The source input to define. This can be either a source input object or a source function.
|
|
33
|
+
* @returns A source input object that contains the provided source. If the input was already a source input object, it will be returned unchanged.
|
|
34
|
+
*/
|
|
35
|
+
declare function defineSource<TSpec, TOptions extends object>(source: SourceInput<TSpec, TOptions>): SourceInputObject<TSpec, TOptions>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { defineSource as t };
|
|
38
|
+
//# sourceMappingURL=define-RneysDu1.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-RneysDu1.d.mts","names":[],"sources":["../src/source/define.ts"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../sink/create.cjs"),t=require("../source/create.cjs"),n=require("./helpers.cjs");let r=require("@power-plant/schema/extract"),i=require("@stryke/resolve/load"),a=require("@stryke/type-checks/is-function");async function o(o,s={}){let c;c=n.isGeneratorInputObject(o)?o:await(0,i.load)(o,s);let l=await(0,r.extract)(c.schema,s),[u,d]=await Promise.all([t.createSource(l,c.source,s),e.createSink(l,c.sink,s)]);return{meta:c.meta,schema:l,source:u,sink:d,generate:async e=>{let t=(0,a.isFunction)(u.source)?await u.source(e):u.source,n=typeof c.meta?.description==`function`?c.meta.description(t):c.meta?.description;return n&&console.log(`Generating ${n}...`),d.sink(t,e)}}}exports.createGenerator=o;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createSink as e}from"../sink/create.mjs";import{createSource as t}from"../source/create.mjs";import{isGeneratorInputObject as n}from"./helpers.mjs";import{extract as r}from"@power-plant/schema/extract";import{load as i}from"@stryke/resolve/load";import{isFunction as a}from"@stryke/type-checks/is-function";async function o(o,s={}){let c;c=n(o)?o:await i(o,s);let l=await r(c.schema,s),[u,d]=await Promise.all([t(l,c.source,s),e(l,c.sink,s)]);return{meta:c.meta,schema:l,source:u,sink:d,generate:async e=>{let t=a(u.source)?await u.source(e):u.source,n=typeof c.meta?.description==`function`?c.meta.description(t):c.meta?.description;return n&&console.log(`Generating ${n}...`),d.sink(t,e)}}}export{o as createGenerator};
|
|
2
|
+
//# sourceMappingURL=create.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@stryke/type-checks/is-set-object");function t(t){return(0,e.isSetObject)(t)&&`schema`in t&&`source`in t&&`sink`in t}exports.isGeneratorInputObject=t;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { r as GeneratorInputObject } from "../generator-C1_Q-QAb.cjs";
|
|
2
|
+
//#region src/generator/helpers.d.ts
|
|
3
|
+
declare function isGeneratorInputObject<TSpec, TOptions extends object, TReturns = void>(input: unknown): input is GeneratorInputObject<TSpec, TOptions, TReturns>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { isGeneratorInputObject };
|
|
6
|
+
//# sourceMappingURL=helpers.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.cts","names":[],"sources":["../../src/generator/helpers.ts"],"mappings":";;iBAqBgB,sBAAA,kDAId,KAAA,YAAiB,KAAA,IAAS,oBAAA,CAAqB,KAAA,EAAO,QAAA,EAAU,QAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { r as GeneratorInputObject } from "../generator-MC25UERM.mjs";
|
|
2
|
+
//#region src/generator/helpers.d.ts
|
|
3
|
+
declare function isGeneratorInputObject<TSpec, TOptions extends object, TReturns = void>(input: unknown): input is GeneratorInputObject<TSpec, TOptions, TReturns>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { isGeneratorInputObject };
|
|
6
|
+
//# sourceMappingURL=helpers.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.mts","names":[],"sources":["../../src/generator/helpers.ts"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.mjs","names":[],"sources":[],"mappings":""}
|
package/dist/generator/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./create.cjs");exports.createGenerator=e.createGenerator;
|
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/generator/generator.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Creates a generator from raw schema/source/sink inputs and resolves all descriptors.
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* This function is used to create a generator from raw schema, source, and sink inputs. It resolves all descriptors and returns a fully constructed generator that can be used to generate output based on the provided schema and options.
|
|
10
|
-
*
|
|
11
|
-
* @template TSpec - The type of the specification that the generator will produce.
|
|
12
|
-
* @template TOptions - The type of the options that will be passed to the generator during generation.
|
|
13
|
-
* @param input - The generator input containing schema, source, sink, and optional meta information.
|
|
14
|
-
* @param options - Optional extraction options for schema, source, and sink.
|
|
15
|
-
* @returns A promise that resolves to a fully constructed generator.
|
|
16
|
-
*/
|
|
17
|
-
declare function createGenerator<TSpec, TOptions = any>(input: GeneratorInput<TSpec, TOptions>, options?: ExtractOptions): Promise<Generator<TSpec, TOptions>>;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { createGenerator };
|
|
20
|
-
//# sourceMappingURL=index.d.cts.map
|
|
1
|
+
import { t as createGenerator } from "../create-Cfgth9sz.cjs";
|
|
2
|
+
export { createGenerator };
|