@power-plant/core 0.0.4 → 0.0.5

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.
Files changed (207) hide show
  1. package/dist/context-BGSa-2fY.mjs +2 -0
  2. package/dist/context-BGSa-2fY.mjs.map +1 -0
  3. package/dist/context-Bcrz4kGb.cjs +1 -0
  4. package/dist/create-0IEoomGw.cjs +1 -0
  5. package/dist/create-CYRTmdJO.mjs +2 -0
  6. package/dist/create-CYRTmdJO.mjs.map +1 -0
  7. package/dist/create-D_u2Zj81.cjs +1 -0
  8. package/dist/create-DcfhZUHw.mjs +2 -0
  9. package/dist/create-DcfhZUHw.mjs.map +1 -0
  10. package/dist/create-MFKW4s0V.cjs +1 -0
  11. package/dist/create-cqJljXdZ.mjs +2 -0
  12. package/dist/create-cqJljXdZ.mjs.map +1 -0
  13. package/dist/define-B5baoppv.d.cts +14 -0
  14. package/dist/define-B5baoppv.d.cts.map +1 -0
  15. package/dist/define-BNsSORkE.d.cts +13 -0
  16. package/dist/define-BNsSORkE.d.cts.map +1 -0
  17. package/dist/define-B__DotaM.cjs +1 -0
  18. package/dist/define-BpCv3wD0.d.mts +38 -0
  19. package/dist/define-BpCv3wD0.d.mts.map +1 -0
  20. package/dist/define-Bviec8Ry.d.cts +38 -0
  21. package/dist/define-Bviec8Ry.d.cts.map +1 -0
  22. package/dist/define-C5_Sx-Eg.mjs +2 -0
  23. package/dist/define-C5_Sx-Eg.mjs.map +1 -0
  24. package/dist/define-C_GLY1-q.cjs +1 -0
  25. package/dist/define-Cjl-0yK0.d.mts +13 -0
  26. package/dist/define-Cjl-0yK0.d.mts.map +1 -0
  27. package/dist/define-DE0RBdIR.mjs +2 -0
  28. package/dist/define-DE0RBdIR.mjs.map +1 -0
  29. package/dist/define-DQQxZK9L.d.mts +14 -0
  30. package/dist/define-DQQxZK9L.d.mts.map +1 -0
  31. package/dist/define-DVggP_03.cjs +1 -0
  32. package/dist/define-DY1s6sGY.mjs +2 -0
  33. package/dist/define-DY1s6sGY.mjs.map +1 -0
  34. package/dist/define-OeGEPyv1.d.cts +45 -0
  35. package/dist/define-OeGEPyv1.d.cts.map +1 -0
  36. package/dist/define-hhs2D0Hq.d.mts +45 -0
  37. package/dist/define-hhs2D0Hq.d.mts.map +1 -0
  38. package/dist/generator/index.cjs +1 -1
  39. package/dist/generator/index.d.cts +29 -2
  40. package/dist/generator/index.d.cts.map +1 -0
  41. package/dist/generator/index.d.mts +29 -2
  42. package/dist/generator/index.d.mts.map +1 -0
  43. package/dist/generator/index.mjs +2 -1
  44. package/dist/generator/index.mjs.map +1 -0
  45. package/dist/generator-9GSAWmOj.d.mts +126 -0
  46. package/dist/generator-9GSAWmOj.d.mts.map +1 -0
  47. package/dist/generator-D9KikId4.d.cts +126 -0
  48. package/dist/generator-D9KikId4.d.cts.map +1 -0
  49. package/dist/helpers-8tc33xyp.mjs +2 -0
  50. package/dist/helpers-8tc33xyp.mjs.map +1 -0
  51. package/dist/helpers-BWqqSR02.cjs +1 -0
  52. package/dist/helpers-BcTg0l_X.cjs +1 -0
  53. package/dist/helpers-Botqc1jf.cjs +1 -0
  54. package/dist/helpers-Cfl4NsE5.mjs +2 -0
  55. package/dist/helpers-Cfl4NsE5.mjs.map +1 -0
  56. package/dist/helpers-DwNCh4F3.mjs +2 -0
  57. package/dist/helpers-DwNCh4F3.mjs.map +1 -0
  58. package/dist/index.cjs +1 -1
  59. package/dist/index.d.cts +101 -12
  60. package/dist/index.d.cts.map +1 -0
  61. package/dist/index.d.mts +101 -12
  62. package/dist/index.d.mts.map +1 -0
  63. package/dist/index.mjs +1 -1
  64. package/dist/input/index.cjs +1 -0
  65. package/dist/input/index.d.cts +35 -0
  66. package/dist/input/index.d.cts.map +1 -0
  67. package/dist/input/index.d.mts +35 -0
  68. package/dist/input/index.d.mts.map +1 -0
  69. package/dist/input/index.mjs +1 -0
  70. package/dist/input-C3yGEfI-.d.mts +58 -0
  71. package/dist/input-C3yGEfI-.d.mts.map +1 -0
  72. package/dist/input-Osyk3YIo.d.cts +58 -0
  73. package/dist/input-Osyk3YIo.d.cts.map +1 -0
  74. package/dist/output/index.cjs +1 -0
  75. package/dist/output/index.d.cts +35 -0
  76. package/dist/output/index.d.cts.map +1 -0
  77. package/dist/output/index.d.mts +35 -0
  78. package/dist/output/index.d.mts.map +1 -0
  79. package/dist/output/index.mjs +1 -0
  80. package/dist/schema/index.cjs +1 -1
  81. package/dist/schema/index.d.cts +33 -4
  82. package/dist/schema/index.d.cts.map +1 -0
  83. package/dist/schema/index.d.mts +33 -4
  84. package/dist/schema/index.d.mts.map +1 -0
  85. package/dist/schema/index.mjs +1 -1
  86. package/dist/{schema-xFkmOyE6.d.cts → schema-DvnNqFd4.d.cts} +10 -35
  87. package/dist/schema-DvnNqFd4.d.cts.map +1 -0
  88. package/dist/{schema-xFkmOyE6.d.mts → schema-DvnNqFd4.d.mts} +10 -35
  89. package/dist/schema-DvnNqFd4.d.mts.map +1 -0
  90. package/package.json +28 -188
  91. package/dist/create-23iLtMb_.cjs +0 -1
  92. package/dist/create-BR4IeVl4.mjs +0 -2
  93. package/dist/create-BR4IeVl4.mjs.map +0 -1
  94. package/dist/create-BqRl9d7m.d.cts +0 -19
  95. package/dist/create-BqRl9d7m.d.cts.map +0 -1
  96. package/dist/create-C-rR8nuY.d.mts +0 -23
  97. package/dist/create-C-rR8nuY.d.mts.map +0 -1
  98. package/dist/create-Cz9qVT4m.d.cts +0 -23
  99. package/dist/create-Cz9qVT4m.d.cts.map +0 -1
  100. package/dist/create-DAGPeYVI.d.cts +0 -25
  101. package/dist/create-DAGPeYVI.d.cts.map +0 -1
  102. package/dist/create-DEe398aQ.d.mts +0 -25
  103. package/dist/create-DEe398aQ.d.mts.map +0 -1
  104. package/dist/create-DUt-efk7.d.cts +0 -25
  105. package/dist/create-DUt-efk7.d.cts.map +0 -1
  106. package/dist/create-DcCu_zM3.d.mts +0 -19
  107. package/dist/create-DcCu_zM3.d.mts.map +0 -1
  108. package/dist/create-Qxy2mq7r.d.mts +0 -25
  109. package/dist/create-Qxy2mq7r.d.mts.map +0 -1
  110. package/dist/define-BPfeEA9Z.d.cts +0 -14
  111. package/dist/define-BPfeEA9Z.d.cts.map +0 -1
  112. package/dist/define-CQZ042K5.d.mts +0 -14
  113. package/dist/define-CQZ042K5.d.mts.map +0 -1
  114. package/dist/define-Dw8JgVQ1.d.mts +0 -38
  115. package/dist/define-Dw8JgVQ1.d.mts.map +0 -1
  116. package/dist/define-aWeW6VVo.d.cts +0 -38
  117. package/dist/define-aWeW6VVo.d.cts.map +0 -1
  118. package/dist/generator/create.cjs +0 -1
  119. package/dist/generator/create.d.cts +0 -2
  120. package/dist/generator/create.d.mts +0 -2
  121. package/dist/generator/create.mjs +0 -2
  122. package/dist/generator/create.mjs.map +0 -1
  123. package/dist/generator/helpers.cjs +0 -1
  124. package/dist/generator/helpers.d.cts +0 -6
  125. package/dist/generator/helpers.d.cts.map +0 -1
  126. package/dist/generator/helpers.d.mts +0 -6
  127. package/dist/generator/helpers.d.mts.map +0 -1
  128. package/dist/generator/helpers.mjs +0 -2
  129. package/dist/generator/helpers.mjs.map +0 -1
  130. package/dist/generator-BGkKE8HQ.d.mts +0 -61
  131. package/dist/generator-BGkKE8HQ.d.mts.map +0 -1
  132. package/dist/generator-Dq0PL5w6.d.cts +0 -61
  133. package/dist/generator-Dq0PL5w6.d.cts.map +0 -1
  134. package/dist/helpers-BqnQPaP5.d.cts +0 -13
  135. package/dist/helpers-BqnQPaP5.d.cts.map +0 -1
  136. package/dist/helpers-CgXgqnVu.d.mts +0 -13
  137. package/dist/helpers-CgXgqnVu.d.mts.map +0 -1
  138. package/dist/index-BVVgDSdq.d.cts +0 -1
  139. package/dist/index-BVVgDSdq.d.mts +0 -1
  140. package/dist/schema/create.cjs +0 -1
  141. package/dist/schema/create.d.cts +0 -2
  142. package/dist/schema/create.d.mts +0 -2
  143. package/dist/schema/create.mjs +0 -1
  144. package/dist/schema/define.cjs +0 -1
  145. package/dist/schema/define.d.cts +0 -2
  146. package/dist/schema/define.d.mts +0 -2
  147. package/dist/schema/define.mjs +0 -2
  148. package/dist/schema/define.mjs.map +0 -1
  149. package/dist/schema/helpers.cjs +0 -1
  150. package/dist/schema/helpers.d.cts +0 -2
  151. package/dist/schema/helpers.d.mts +0 -2
  152. package/dist/schema/helpers.mjs +0 -2
  153. package/dist/schema/helpers.mjs.map +0 -1
  154. package/dist/schema-xFkmOyE6.d.cts.map +0 -1
  155. package/dist/schema-xFkmOyE6.d.mts.map +0 -1
  156. package/dist/sink/create.cjs +0 -1
  157. package/dist/sink/create.d.cts +0 -2
  158. package/dist/sink/create.d.mts +0 -2
  159. package/dist/sink/create.mjs +0 -2
  160. package/dist/sink/create.mjs.map +0 -1
  161. package/dist/sink/define.cjs +0 -1
  162. package/dist/sink/define.d.cts +0 -37
  163. package/dist/sink/define.d.cts.map +0 -1
  164. package/dist/sink/define.d.mts +0 -37
  165. package/dist/sink/define.d.mts.map +0 -1
  166. package/dist/sink/define.mjs +0 -2
  167. package/dist/sink/define.mjs.map +0 -1
  168. package/dist/sink/helpers.cjs +0 -1
  169. package/dist/sink/helpers.d.cts +0 -13
  170. package/dist/sink/helpers.d.cts.map +0 -1
  171. package/dist/sink/helpers.d.mts +0 -13
  172. package/dist/sink/helpers.d.mts.map +0 -1
  173. package/dist/sink/helpers.mjs +0 -2
  174. package/dist/sink/helpers.mjs.map +0 -1
  175. package/dist/sink/index.cjs +0 -1
  176. package/dist/sink/index.d.cts +0 -2
  177. package/dist/sink/index.d.mts +0 -2
  178. package/dist/sink/index.mjs +0 -1
  179. package/dist/sink-CHQncb8H.d.mts +0 -58
  180. package/dist/sink-CHQncb8H.d.mts.map +0 -1
  181. package/dist/sink-DHpx94GM.d.cts +0 -58
  182. package/dist/sink-DHpx94GM.d.cts.map +0 -1
  183. package/dist/source/create.cjs +0 -1
  184. package/dist/source/create.d.cts +0 -2
  185. package/dist/source/create.d.mts +0 -2
  186. package/dist/source/create.mjs +0 -2
  187. package/dist/source/create.mjs.map +0 -1
  188. package/dist/source/define.cjs +0 -1
  189. package/dist/source/define.d.cts +0 -2
  190. package/dist/source/define.d.mts +0 -2
  191. package/dist/source/define.mjs +0 -2
  192. package/dist/source/define.mjs.map +0 -1
  193. package/dist/source/helpers.cjs +0 -1
  194. package/dist/source/helpers.d.cts +0 -13
  195. package/dist/source/helpers.d.cts.map +0 -1
  196. package/dist/source/helpers.d.mts +0 -13
  197. package/dist/source/helpers.d.mts.map +0 -1
  198. package/dist/source/helpers.mjs +0 -2
  199. package/dist/source/helpers.mjs.map +0 -1
  200. package/dist/source/index.cjs +0 -1
  201. package/dist/source/index.d.cts +0 -3
  202. package/dist/source/index.d.mts +0 -3
  203. package/dist/source/index.mjs +0 -1
  204. package/dist/source-BiOs3_-8.d.mts +0 -57
  205. package/dist/source-BiOs3_-8.d.mts.map +0 -1
  206. package/dist/source-txi0ZuzR.d.cts +0 -57
  207. package/dist/source-txi0ZuzR.d.cts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@power-plant/core",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "private": false,
5
5
  "description": "Core package for Power Plant",
6
6
  "keywords": ["power-plant", "powerlines", "storm-software"],
@@ -68,32 +68,32 @@
68
68
  "default": "./dist/generator/index.mjs"
69
69
  }
70
70
  },
71
- "./generator/create": {
71
+ "./input": {
72
72
  "require": {
73
- "types": "./dist/generator/create.d.cts",
74
- "default": "./dist/generator/create.cjs"
73
+ "types": "./dist/input/index.d.cts",
74
+ "default": "./dist/input/index.cjs"
75
75
  },
76
76
  "import": {
77
- "types": "./dist/generator/create.d.mts",
78
- "default": "./dist/generator/create.mjs"
77
+ "types": "./dist/input/index.d.mts",
78
+ "default": "./dist/input/index.mjs"
79
79
  },
80
80
  "default": {
81
- "types": "./dist/generator/create.d.mts",
82
- "default": "./dist/generator/create.mjs"
81
+ "types": "./dist/input/index.d.mts",
82
+ "default": "./dist/input/index.mjs"
83
83
  }
84
84
  },
85
- "./generator/helpers": {
85
+ "./output": {
86
86
  "require": {
87
- "types": "./dist/generator/helpers.d.cts",
88
- "default": "./dist/generator/helpers.cjs"
87
+ "types": "./dist/output/index.d.cts",
88
+ "default": "./dist/output/index.cjs"
89
89
  },
90
90
  "import": {
91
- "types": "./dist/generator/helpers.d.mts",
92
- "default": "./dist/generator/helpers.mjs"
91
+ "types": "./dist/output/index.d.mts",
92
+ "default": "./dist/output/index.mjs"
93
93
  },
94
94
  "default": {
95
- "types": "./dist/generator/helpers.d.mts",
96
- "default": "./dist/generator/helpers.mjs"
95
+ "types": "./dist/output/index.d.mts",
96
+ "default": "./dist/output/index.mjs"
97
97
  }
98
98
  },
99
99
  "./package.json": "./package.json",
@@ -110,160 +110,6 @@
110
110
  "types": "./dist/schema/index.d.mts",
111
111
  "default": "./dist/schema/index.mjs"
112
112
  }
113
- },
114
- "./schema/create": {
115
- "require": {
116
- "types": "./dist/schema/create.d.cts",
117
- "default": "./dist/schema/create.cjs"
118
- },
119
- "import": {
120
- "types": "./dist/schema/create.d.mts",
121
- "default": "./dist/schema/create.mjs"
122
- },
123
- "default": {
124
- "types": "./dist/schema/create.d.mts",
125
- "default": "./dist/schema/create.mjs"
126
- }
127
- },
128
- "./schema/define": {
129
- "require": {
130
- "types": "./dist/schema/define.d.cts",
131
- "default": "./dist/schema/define.cjs"
132
- },
133
- "import": {
134
- "types": "./dist/schema/define.d.mts",
135
- "default": "./dist/schema/define.mjs"
136
- },
137
- "default": {
138
- "types": "./dist/schema/define.d.mts",
139
- "default": "./dist/schema/define.mjs"
140
- }
141
- },
142
- "./schema/helpers": {
143
- "require": {
144
- "types": "./dist/schema/helpers.d.cts",
145
- "default": "./dist/schema/helpers.cjs"
146
- },
147
- "import": {
148
- "types": "./dist/schema/helpers.d.mts",
149
- "default": "./dist/schema/helpers.mjs"
150
- },
151
- "default": {
152
- "types": "./dist/schema/helpers.d.mts",
153
- "default": "./dist/schema/helpers.mjs"
154
- }
155
- },
156
- "./sink": {
157
- "require": {
158
- "types": "./dist/sink/index.d.cts",
159
- "default": "./dist/sink/index.cjs"
160
- },
161
- "import": {
162
- "types": "./dist/sink/index.d.mts",
163
- "default": "./dist/sink/index.mjs"
164
- },
165
- "default": {
166
- "types": "./dist/sink/index.d.mts",
167
- "default": "./dist/sink/index.mjs"
168
- }
169
- },
170
- "./sink/create": {
171
- "require": {
172
- "types": "./dist/sink/create.d.cts",
173
- "default": "./dist/sink/create.cjs"
174
- },
175
- "import": {
176
- "types": "./dist/sink/create.d.mts",
177
- "default": "./dist/sink/create.mjs"
178
- },
179
- "default": {
180
- "types": "./dist/sink/create.d.mts",
181
- "default": "./dist/sink/create.mjs"
182
- }
183
- },
184
- "./sink/define": {
185
- "require": {
186
- "types": "./dist/sink/define.d.cts",
187
- "default": "./dist/sink/define.cjs"
188
- },
189
- "import": {
190
- "types": "./dist/sink/define.d.mts",
191
- "default": "./dist/sink/define.mjs"
192
- },
193
- "default": {
194
- "types": "./dist/sink/define.d.mts",
195
- "default": "./dist/sink/define.mjs"
196
- }
197
- },
198
- "./sink/helpers": {
199
- "require": {
200
- "types": "./dist/sink/helpers.d.cts",
201
- "default": "./dist/sink/helpers.cjs"
202
- },
203
- "import": {
204
- "types": "./dist/sink/helpers.d.mts",
205
- "default": "./dist/sink/helpers.mjs"
206
- },
207
- "default": {
208
- "types": "./dist/sink/helpers.d.mts",
209
- "default": "./dist/sink/helpers.mjs"
210
- }
211
- },
212
- "./source": {
213
- "require": {
214
- "types": "./dist/source/index.d.cts",
215
- "default": "./dist/source/index.cjs"
216
- },
217
- "import": {
218
- "types": "./dist/source/index.d.mts",
219
- "default": "./dist/source/index.mjs"
220
- },
221
- "default": {
222
- "types": "./dist/source/index.d.mts",
223
- "default": "./dist/source/index.mjs"
224
- }
225
- },
226
- "./source/create": {
227
- "require": {
228
- "types": "./dist/source/create.d.cts",
229
- "default": "./dist/source/create.cjs"
230
- },
231
- "import": {
232
- "types": "./dist/source/create.d.mts",
233
- "default": "./dist/source/create.mjs"
234
- },
235
- "default": {
236
- "types": "./dist/source/create.d.mts",
237
- "default": "./dist/source/create.mjs"
238
- }
239
- },
240
- "./source/define": {
241
- "require": {
242
- "types": "./dist/source/define.d.cts",
243
- "default": "./dist/source/define.cjs"
244
- },
245
- "import": {
246
- "types": "./dist/source/define.d.mts",
247
- "default": "./dist/source/define.mjs"
248
- },
249
- "default": {
250
- "types": "./dist/source/define.d.mts",
251
- "default": "./dist/source/define.mjs"
252
- }
253
- },
254
- "./source/helpers": {
255
- "require": {
256
- "types": "./dist/source/helpers.d.cts",
257
- "default": "./dist/source/helpers.cjs"
258
- },
259
- "import": {
260
- "types": "./dist/source/helpers.d.mts",
261
- "default": "./dist/source/helpers.mjs"
262
- },
263
- "default": {
264
- "types": "./dist/source/helpers.d.mts",
265
- "default": "./dist/source/helpers.mjs"
266
- }
267
113
  }
268
114
  },
269
115
  "main": "./dist/index.cjs",
@@ -272,22 +118,22 @@
272
118
  "typings": "dist/index.d.mts",
273
119
  "files": ["dist"],
274
120
  "dependencies": {
275
- "@alloy-js/core": "^0.23.1",
276
- "@alloy-js/markdown": "^0.23.0",
277
- "@alloy-js/typescript": "^0.23.0",
278
- "@power-plant/schema": "^0.0.4",
121
+ "@power-plant/schema": "^0.0.5",
279
122
  "@powerlines/core": "^0.48.60",
280
123
  "@powerlines/engine": "^0.49.62",
281
124
  "@powerlines/plugin-alloy": "^0.26.232",
282
125
  "@powerlines/plugin-automd": "^0.1.600",
283
- "@stryke/convert": "^0.7.24",
284
- "@stryke/fs": "^0.33.94",
285
- "@stryke/helpers": "^0.10.33",
286
- "@stryke/json": "^0.15.17",
287
- "@stryke/path": "^0.29.20",
288
- "@stryke/resolve": "^0.0.9",
289
- "@stryke/string-format": "^0.17.35",
290
- "@stryke/type-checks": "^0.6.26",
126
+ "@stryke/convert": "^0.7.25",
127
+ "@stryke/date": "^0.0.6",
128
+ "@stryke/fs": "^0.33.95",
129
+ "@stryke/helpers": "^0.10.34",
130
+ "@stryke/json": "^0.15.18",
131
+ "@stryke/path": "^0.29.21",
132
+ "@stryke/resolve": "^0.0.10",
133
+ "@stryke/string-format": "^0.17.36",
134
+ "@stryke/type-checks": "^0.6.27",
135
+ "@stryke/types": "^0.12.22",
136
+ "@stryke/unique-id": "^0.3.106",
291
137
  "automd": "^0.4.3",
292
138
  "defu": "^6.1.7",
293
139
  "jiti": "^2.7.0",
@@ -296,15 +142,9 @@
296
142
  },
297
143
  "devDependencies": {
298
144
  "@powerlines/plugin-tsdown": "^0.1.540",
299
- "@stryke/types": "^0.12.21",
300
145
  "@types/node": "^25.9.4",
301
146
  "typescript": "^6.0.3"
302
147
  },
303
148
  "publishConfig": { "access": "public" },
304
- "inlinedDependencies": {
305
- "@stryke/date": "0.0.5",
306
- "@stryke/types": "0.12.21",
307
- "@stryke/unique-id": "0.3.105"
308
- },
309
- "gitHead": "4f510175050312992ba4fa174eafdc56edd1f69b"
149
+ "gitHead": "bdd629384084ca6a276f91c0ee5b3fdfca4b6f2e"
310
150
  }
@@ -1 +0,0 @@
1
- const e=require("./schema/helpers.cjs");let t=require("@stryke/type-checks/is-function"),n=require("@power-plant/schema/extract"),r=require("@power-plant/schema/codegen"),i=require("@power-plant/schema/type-checks"),a=require("@stryke/convert/to-array"),o=require("@stryke/helpers/get-unique"),s=require("@stryke/string-format/kebab-case"),c=require("@stryke/string-format/title-case"),l=require("@stryke/type-checks/is-date"),u=require("@stryke/type-checks/is-number"),d=require("@stryke/type-checks/is-set-object"),f=require("@stryke/type-checks/is-set-string");function p(e,t){let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,`0`),i=String(e.getDate()).padStart(2,`0`),a=t?.separator??`-`;return`${n}${a}${r}${a}${i}`}function m(e){return Number.isInteger(e)&&e>=0}Array.from({length:26},(e,t)=>String.fromCodePoint(t+97));function h(e){if(e===null)throw TypeError(`array cannot be null`);for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function g(e=21){return h(new Uint8Array(e)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+=`-`:e+=`_`,e),``)}function _(e){return(0,l.isDate)(e)?p(e):(0,u.isNumber)(e)?m(e)&&e>1e9?p(new Date(e)):e.toString():(0,f.isSetString)(e)?e:`1.0`}function v(e,n,r){let i=r??n?.version??e?.version;return(0,t.isFunction)(i)?async(e,t)=>_(await Promise.resolve(i(e,t))):_(i)}function y(e,t,n){return n??t.name??((0,f.isSetString)(e?.name)?e.name:(0,f.isSetString)(e?.title)?e.title:e.$id?(0,s.kebabCase)(e.$id):(0,r.stringifyType)(e))}function b(e,n){let r=y(e,n),i=v(e,n);return r?(0,t.isFunction)(r)?(0,t.isFunction)(i)?async(e,t)=>`${(0,s.kebabCase)(await Promise.resolve(r(e,t)))}@${await Promise.resolve(i(e,t))}`:async(e,t)=>`${(0,s.kebabCase)(await Promise.resolve(r(e,t)))}@${i}`:(0,t.isFunction)(i)?async(e,t)=>`${(0,s.kebabCase)(r)}@${await Promise.resolve(i(e,t))}`:`${(0,s.kebabCase)(r)}@${i}`:g()}function x(e,n,i){let a=i??n.title??e?.title;if(a!==void 0)return a;let o=n.name;return(0,t.isFunction)(o)?async(e,t)=>(0,c.titleCase)(await Promise.resolve(o(e,t))):(0,c.titleCase)(o??(0,r.stringifyType)(e))}function S(e,n,r,i){r.title??=x(n,r);let a=r.title,o=(0,t.isFunction)(a)?async(n,r)=>(0,t.isFunction)(e)?(await Promise.resolve(e(n,r))).replaceAll(/\{\s*title\s*\}/g,await Promise.resolve(a(n,r))):e.replaceAll(/\{\s*title\s*\}/g,await Promise.resolve(a(n,r))):(0,t.isFunction)(e)?async(t,n)=>(await Promise.resolve(e(t,n))).replaceAll(/\{\s*title\s*\}/g,await Promise.resolve(a)):e.replaceAll(/\{\s*title\s*\}/g,a),s=i??r.description??n?.description;if((0,t.isFunction)(s)){let e=s;return async(n,r)=>{let i=await Promise.resolve(e(n,r));return(0,f.isSetString)(i)?i:(0,t.isFunction)(o)?Promise.resolve(o(n,r)):Promise.resolve(o)}}return(0,f.isSetString)(s)?s:o}function C(e,n,r){let i=e=>e.map((e,t)=>(0,f.isSetString)(e)?{name:`example-${t+1}`,description:`Example Specification #${t+1}`,value:e}:(0,d.isSetObject)(e)&&`value`in e&&(0,f.isSetString)(e.value)?{name:`example-${t+1}`,description:e.description||`Example Specification #${t+1}`,value:e.value}:void 0).filter(Boolean),o=r??n.examples??e?.examples??[];return(0,t.isFunction)(o)?async(e,t)=>i((0,a.toArray)(await Promise.resolve(o(e,t)))):i((0,a.toArray)(o))}function w(e,n,r){return(0,t.isFunction)(r)||(0,t.isFunction)(n.links)?async(i,s)=>(0,o.getUnique)((0,a.toArray)((0,t.isFunction)(r)?await Promise.resolve(r(i,s)):r).concat((0,t.isFunction)(n.links)?await Promise.resolve(n.links(i,s)):n.links??[]).concat(e?.docs??[])):(0,o.getUnique)((0,a.toArray)(r).concat(n.links??[]).concat(e?.docs??[]))}function T(e,t){let n=(0,i.isSchemaOf)(e)?e:e??{schema:{}},r={};return r.name=y(n?.schema,r,t?.name),r.version=v(n?.schema,r,t?.version),r.id=b(n?.schema,r),r.title=x(n?.schema,r,t?.title),r.links=w(n?.schema,r,t?.links),t?.deprecated&&(r.deprecated=t?.deprecated),t?.usage&&(r.usage=t?.usage),t?.tags&&(r.tags=t?.tags),r}function E(e,n){let r=e?.schema??{},i=T(e,n);return i.description=S((0,t.isFunction)(i.title)?async(e,t)=>`Accepts a ${await Promise.resolve(i.title(e,t))??``} specification and processes it with a {title} sink.`:`Accepts a ${i.title??``} specification and processes it with a {title} sink.`,r,i,n?.description),i.examples=C(r,i,n?.examples),i}async function D(t,r={}){let{meta:i,schema:a}=e.isSchemaInputObject(t)?t:{schema:t,meta:{}},o=await(0,n.extractSchemaWithSource)(a,r);return{...o,meta:E(o,i)}}Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return D}});
@@ -1,2 +0,0 @@
1
- import{isSchemaInputObject as e}from"./schema/helpers.mjs";import{isFunction as t}from"@stryke/type-checks/is-function";import{extractSchemaWithSource as n}from"@power-plant/schema/extract";import{stringifyType as r}from"@power-plant/schema/codegen";import{isSchemaOf as i}from"@power-plant/schema/type-checks";import{toArray as a}from"@stryke/convert/to-array";import{getUnique as o}from"@stryke/helpers/get-unique";import{kebabCase as s}from"@stryke/string-format/kebab-case";import{titleCase as c}from"@stryke/string-format/title-case";import{isDate as l}from"@stryke/type-checks/is-date";import{isNumber as u}from"@stryke/type-checks/is-number";import{isSetObject as d}from"@stryke/type-checks/is-set-object";import{isSetString as f}from"@stryke/type-checks/is-set-string";function p(e,t){let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,`0`),i=String(e.getDate()).padStart(2,`0`),a=t?.separator??`-`;return`${n}${a}${r}${a}${i}`}function m(e){return Number.isInteger(e)&&e>=0}Array.from({length:26},(e,t)=>String.fromCodePoint(t+97));function h(e){if(e===null)throw TypeError(`array cannot be null`);for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function g(e=21){return h(new Uint8Array(e)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+=`-`:e+=`_`,e),``)}function _(e){return l(e)?p(e):u(e)?m(e)&&e>1e9?p(new Date(e)):e.toString():f(e)?e:`1.0`}function v(e,n,r){let i=r??n?.version??e?.version;return t(i)?async(e,t)=>_(await Promise.resolve(i(e,t))):_(i)}function y(e,t,n){return n??t.name??(f(e?.name)?e.name:f(e?.title)?e.title:e.$id?s(e.$id):r(e))}function b(e,n){let r=y(e,n),i=v(e,n);return r?t(r)?t(i)?async(e,t)=>`${s(await Promise.resolve(r(e,t)))}@${await Promise.resolve(i(e,t))}`:async(e,t)=>`${s(await Promise.resolve(r(e,t)))}@${i}`:t(i)?async(e,t)=>`${s(r)}@${await Promise.resolve(i(e,t))}`:`${s(r)}@${i}`:g()}function x(e,n,i){let a=i??n.title??e?.title;if(a!==void 0)return a;let o=n.name;return t(o)?async(e,t)=>c(await Promise.resolve(o(e,t))):c(o??r(e))}function S(e,n,r,i){r.title??=x(n,r);let a=r.title,o=t(a)?async(n,r)=>t(e)?(await Promise.resolve(e(n,r))).replaceAll(/\{\s*title\s*\}/g,await Promise.resolve(a(n,r))):e.replaceAll(/\{\s*title\s*\}/g,await Promise.resolve(a(n,r))):t(e)?async(t,n)=>(await Promise.resolve(e(t,n))).replaceAll(/\{\s*title\s*\}/g,await Promise.resolve(a)):e.replaceAll(/\{\s*title\s*\}/g,a),s=i??r.description??n?.description;if(t(s)){let e=s;return async(n,r)=>{let i=await Promise.resolve(e(n,r));return f(i)?i:t(o)?Promise.resolve(o(n,r)):Promise.resolve(o)}}return f(s)?s:o}function C(e,n,r){let i=e=>e.map((e,t)=>f(e)?{name:`example-${t+1}`,description:`Example Specification #${t+1}`,value:e}:d(e)&&`value`in e&&f(e.value)?{name:`example-${t+1}`,description:e.description||`Example Specification #${t+1}`,value:e.value}:void 0).filter(Boolean),o=r??n.examples??e?.examples??[];return t(o)?async(e,t)=>i(a(await Promise.resolve(o(e,t)))):i(a(o))}function w(e,n,r){return t(r)||t(n.links)?async(i,s)=>o(a(t(r)?await Promise.resolve(r(i,s)):r).concat(t(n.links)?await Promise.resolve(n.links(i,s)):n.links??[]).concat(e?.docs??[])):o(a(r).concat(n.links??[]).concat(e?.docs??[]))}function T(e,t){let n=i(e)?e:e??{schema:{}},r={};return r.name=y(n?.schema,r,t?.name),r.version=v(n?.schema,r,t?.version),r.id=b(n?.schema,r),r.title=x(n?.schema,r,t?.title),r.links=w(n?.schema,r,t?.links),t?.deprecated&&(r.deprecated=t?.deprecated),t?.usage&&(r.usage=t?.usage),t?.tags&&(r.tags=t?.tags),r}function E(e,n){let r=e?.schema??{},i=T(e,n);return i.description=S(t(i.title)?async(e,t)=>`Accepts a ${await Promise.resolve(i.title(e,t))??``} specification and processes it with a {title} sink.`:`Accepts a ${i.title??``} specification and processes it with a {title} sink.`,r,i,n?.description),i.examples=C(r,i,n?.examples),i}async function D(t,r={}){let{meta:i,schema:a}=e(t)?t:{schema:t,meta:{}},o=await n(a,r);return{...o,meta:E(o,i)}}export{S as i,E as n,T as r,D as t};
2
- //# sourceMappingURL=create-BR4IeVl4.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-BR4IeVl4.mjs","names":[],"sources":[],"mappings":""}
@@ -1,19 +0,0 @@
1
- import { a as InferCreateGeneratorOptions, n as GeneratorInput, t as Generator } from "./generator-Dq0PL5w6.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-BqRl9d7m.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-BqRl9d7m.d.cts","names":[],"sources":["../src/generator/create.ts"],"mappings":";;;;;AA4CA;;;;;;;;;;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"}
@@ -1,23 +0,0 @@
1
- import { i as SchemaMeta, o as SchemaMetaInput, r as SchemaInputObject, s as SchemaOf, t as InferCreateSchemaOptions } from "./schema-xFkmOyE6.mjs";
2
- import { ExtractedSchemaEnvelope, SchemaEnvelopeOf, SchemaSourceInput } from "@power-plant/schema/types";
3
-
4
- //#region src/schema/create.d.ts
5
- /**
6
- * Extracts and normalizes {@link SchemaMeta | schema metadata} from a given {@link SchemaMetaInput}. This function ensures that the metadata is in a consistent format, converting version numbers to strings and filtering out any invalid or empty tags.
7
- *
8
- * @param schema - The schema from which to extract metadata.
9
- * @param input - The schema metadata input to extract and normalize.
10
- * @returns The normalized schema metadata.
11
- */
12
- declare function extractSchemaMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec>, input?: SchemaMetaInput<TSpec, TOptions>): SchemaMeta<TSpec, TOptions>;
13
- /**
14
- * Normalizes any accepted schema input into a concrete schema descriptor.
15
- *
16
- * @param input - The schema input to normalize.
17
- * @param options - Optional options for resolving the schema input.
18
- * @returns A promise that resolves to a normalized schema descriptor.
19
- */
20
- declare function createSchema<TSpec, TOptions extends object>(input: SchemaSourceInput<TSpec> | SchemaEnvelopeOf<TSpec> | SchemaInputObject<TSpec, TOptions>, options?: InferCreateSchemaOptions<typeof input>): Promise<SchemaOf<TSpec, TOptions>>;
21
- //#endregion
22
- export { extractSchemaMeta as n, createSchema as t };
23
- //# sourceMappingURL=create-C-rR8nuY.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-C-rR8nuY.d.mts","names":[],"sources":["../src/schema/create.ts"],"mappings":""}
@@ -1,23 +0,0 @@
1
- import { i as SchemaMeta, o as SchemaMetaInput, r as SchemaInputObject, s as SchemaOf, t as InferCreateSchemaOptions } from "./schema-xFkmOyE6.cjs";
2
- import { ExtractedSchemaEnvelope, SchemaEnvelopeOf, SchemaSourceInput } from "@power-plant/schema/types";
3
-
4
- //#region src/schema/create.d.ts
5
- /**
6
- * Extracts and normalizes {@link SchemaMeta | schema metadata} from a given {@link SchemaMetaInput}. This function ensures that the metadata is in a consistent format, converting version numbers to strings and filtering out any invalid or empty tags.
7
- *
8
- * @param schema - The schema from which to extract metadata.
9
- * @param input - The schema metadata input to extract and normalize.
10
- * @returns The normalized schema metadata.
11
- */
12
- declare function extractSchemaMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec>, input?: SchemaMetaInput<TSpec, TOptions>): SchemaMeta<TSpec, TOptions>;
13
- /**
14
- * Normalizes any accepted schema input into a concrete schema descriptor.
15
- *
16
- * @param input - The schema input to normalize.
17
- * @param options - Optional options for resolving the schema input.
18
- * @returns A promise that resolves to a normalized schema descriptor.
19
- */
20
- declare function createSchema<TSpec, TOptions extends object>(input: SchemaSourceInput<TSpec> | SchemaEnvelopeOf<TSpec> | SchemaInputObject<TSpec, TOptions>, options?: InferCreateSchemaOptions<typeof input>): Promise<SchemaOf<TSpec, TOptions>>;
21
- //#endregion
22
- export { extractSchemaMeta as n, createSchema as t };
23
- //# sourceMappingURL=create-Cz9qVT4m.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-Cz9qVT4m.d.cts","names":[],"sources":["../src/schema/create.ts"],"mappings":";;;;;;AA8CA;;;;;iBAAgB,iBAAA,iCACd,MAAA,EAAQ,uBAAA,CAAwB,KAAA,GAChC,KAAA,GAAQ,eAAA,CAAgB,KAAA,EAAO,QAAA,IAC9B,UAAA,CAAW,KAAA,EAAO,QAAA;;;;;;;;iBAoCC,YAAA,iCACpB,KAAA,EACI,iBAAA,CAAkB,KAAA,IAClB,gBAAA,CAAiB,KAAA,IACjB,iBAAA,CAAkB,KAAA,EAAO,QAAA,GAC7B,OAAA,GAAS,wBAAA,QAAgC,KAAA,IACxC,OAAA,CAAQ,QAAA,CAAS,KAAA,EAAO,QAAA"}
@@ -1,25 +0,0 @@
1
- import { s as SchemaOf } from "./schema-xFkmOyE6.cjs";
2
- import { i as SinkInput, n as Sink, o as SinkMeta, s as SinkMetaInput, t as InferCreateSinkOptions } from "./sink-DHpx94GM.cjs";
3
- import { ExtractedSchemaEnvelope } from "@power-plant/schema/types";
4
-
5
- //#region src/sink/create.d.ts
6
- /**
7
- * Extracts and normalizes {@link SinkMeta | sink metadata} from a given {@link SinkMetaInput}. This function ensures that the metadata is in a consistent format, converting version numbers to strings and filtering out any invalid or empty tags.
8
- *
9
- * @param schema - The schema that the sink input is expected to conform to.
10
- * @param input - The sink metadata input to extract and normalize.
11
- * @returns The normalized sink metadata.
12
- */
13
- declare function extractSinkMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec> | SchemaOf<TSpec, TOptions>, input?: SinkMetaInput<TSpec, TOptions>): SinkMeta<TSpec, TOptions>;
14
- /**
15
- * Normalizes any accepted sink input into a concrete sink descriptor.
16
- *
17
- * @param schema - The schema that the sink input is expected to conform to.
18
- * @param input - The sink input to normalize.
19
- * @param options - Optional options for resolving the sink input.
20
- * @returns A promise that resolves to a normalized sink descriptor.
21
- */
22
- declare function createSink<TSpec, TOptions extends object, TReturns = void>(schema: SchemaOf<TSpec, TOptions>, input: SinkInput<TSpec, TOptions, TReturns>, options?: InferCreateSinkOptions<typeof input>): Promise<Sink<TSpec, TOptions, TReturns>>;
23
- //#endregion
24
- export { extractSinkMeta as n, createSink as t };
25
- //# sourceMappingURL=create-DAGPeYVI.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-DAGPeYVI.d.cts","names":[],"sources":["../src/sink/create.ts"],"mappings":";;;;;;;AA2CA;;;;;iBAAgB,eAAA,iCACd,MAAA,EAAQ,uBAAA,CAAwB,KAAA,IAAS,QAAA,CAAS,KAAA,EAAO,QAAA,GACzD,KAAA,GAAQ,aAAA,CAAc,KAAA,EAAO,QAAA,IAC5B,QAAA,CAAS,KAAA,EAAO,QAAA;;;;;;;;;iBAoCG,UAAA,kDAKpB,MAAA,EAAQ,QAAA,CAAS,KAAA,EAAO,QAAA,GACxB,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"}
@@ -1,25 +0,0 @@
1
- import { s as SchemaOf } from "./schema-xFkmOyE6.mjs";
2
- import { i as SinkInput, n as Sink, o as SinkMeta, s as SinkMetaInput, t as InferCreateSinkOptions } from "./sink-CHQncb8H.mjs";
3
- import { ExtractedSchemaEnvelope } from "@power-plant/schema/types";
4
-
5
- //#region src/sink/create.d.ts
6
- /**
7
- * Extracts and normalizes {@link SinkMeta | sink metadata} from a given {@link SinkMetaInput}. This function ensures that the metadata is in a consistent format, converting version numbers to strings and filtering out any invalid or empty tags.
8
- *
9
- * @param schema - The schema that the sink input is expected to conform to.
10
- * @param input - The sink metadata input to extract and normalize.
11
- * @returns The normalized sink metadata.
12
- */
13
- declare function extractSinkMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec> | SchemaOf<TSpec, TOptions>, input?: SinkMetaInput<TSpec, TOptions>): SinkMeta<TSpec, TOptions>;
14
- /**
15
- * Normalizes any accepted sink input into a concrete sink descriptor.
16
- *
17
- * @param schema - The schema that the sink input is expected to conform to.
18
- * @param input - The sink input to normalize.
19
- * @param options - Optional options for resolving the sink input.
20
- * @returns A promise that resolves to a normalized sink descriptor.
21
- */
22
- declare function createSink<TSpec, TOptions extends object, TReturns = void>(schema: SchemaOf<TSpec, TOptions>, input: SinkInput<TSpec, TOptions, TReturns>, options?: InferCreateSinkOptions<typeof input>): Promise<Sink<TSpec, TOptions, TReturns>>;
23
- //#endregion
24
- export { extractSinkMeta as n, createSink as t };
25
- //# sourceMappingURL=create-DEe398aQ.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-DEe398aQ.d.mts","names":[],"sources":["../src/sink/create.ts"],"mappings":""}
@@ -1,25 +0,0 @@
1
- import { s as SchemaOf } from "./schema-xFkmOyE6.cjs";
2
- import { i as SourceInput, n as Source, o as SourceMeta, s as SourceMetaInput, t as InferCreateSourceOptions } from "./source-txi0ZuzR.cjs";
3
- import { ExtractedSchemaEnvelope } from "@power-plant/schema/types";
4
-
5
- //#region src/source/create.d.ts
6
- /**
7
- * Extracts and normalizes {@link SourceMeta | source metadata} from a given {@link SourceMetaInput}. This function ensures that the metadata is in a consistent format, converting version numbers to strings and filtering out any invalid or empty tags.
8
- *
9
- * @param schema - The schema that the source input is expected to conform to.
10
- * @param input - The source metadata input to extract and normalize.
11
- * @returns The normalized source metadata.
12
- */
13
- declare function extractSourceMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec> | SchemaOf<TSpec, TOptions>, input?: SourceMetaInput<TSpec, TOptions>): SourceMeta<TSpec, TOptions>;
14
- /**
15
- * Normalizes any accepted source input into a concrete source descriptor.
16
- *
17
- * @param schema - The schema that the source input is expected to conform to.
18
- * @param input - The source input to normalize.
19
- * @param options - Optional options for resolving the source input.
20
- * @returns A promise that resolves to a normalized source descriptor.
21
- */
22
- declare function createSource<TSpec, TOptions extends object>(schema: SchemaOf<TSpec, TOptions>, input: SourceInput<TSpec, TOptions>, options?: InferCreateSourceOptions<typeof input>): Promise<Source<TSpec, TOptions>>;
23
- //#endregion
24
- export { extractSourceMeta as n, createSource as t };
25
- //# sourceMappingURL=create-DUt-efk7.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-DUt-efk7.d.cts","names":[],"sources":["../src/source/create.ts"],"mappings":";;;;;;;AA2CA;;;;;iBAAgB,iBAAA,iCACd,MAAA,EAAQ,uBAAA,CAAwB,KAAA,IAAS,QAAA,CAAS,KAAA,EAAO,QAAA,GACzD,KAAA,GAAQ,eAAA,CAAgB,KAAA,EAAO,QAAA,IAC9B,UAAA,CAAW,KAAA,EAAO,QAAA;;;;;;;;;iBAoCC,YAAA,iCACpB,MAAA,EAAQ,QAAA,CAAS,KAAA,EAAO,QAAA,GACxB,KAAA,EAAO,WAAA,CAAY,KAAA,EAAO,QAAA,GAC1B,OAAA,GAAS,wBAAA,QAAgC,KAAA,IACxC,OAAA,CAAQ,MAAA,CAAO,KAAA,EAAO,QAAA"}
@@ -1,19 +0,0 @@
1
- import { a as InferCreateGeneratorOptions, n as GeneratorInput, t as Generator } from "./generator-BGkKE8HQ.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-DcCu_zM3.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-DcCu_zM3.d.mts","names":[],"sources":["../src/generator/create.ts"],"mappings":""}
@@ -1,25 +0,0 @@
1
- import { s as SchemaOf } from "./schema-xFkmOyE6.mjs";
2
- import { i as SourceInput, n as Source, o as SourceMeta, s as SourceMetaInput, t as InferCreateSourceOptions } from "./source-BiOs3_-8.mjs";
3
- import { ExtractedSchemaEnvelope } from "@power-plant/schema/types";
4
-
5
- //#region src/source/create.d.ts
6
- /**
7
- * Extracts and normalizes {@link SourceMeta | source metadata} from a given {@link SourceMetaInput}. This function ensures that the metadata is in a consistent format, converting version numbers to strings and filtering out any invalid or empty tags.
8
- *
9
- * @param schema - The schema that the source input is expected to conform to.
10
- * @param input - The source metadata input to extract and normalize.
11
- * @returns The normalized source metadata.
12
- */
13
- declare function extractSourceMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec> | SchemaOf<TSpec, TOptions>, input?: SourceMetaInput<TSpec, TOptions>): SourceMeta<TSpec, TOptions>;
14
- /**
15
- * Normalizes any accepted source input into a concrete source descriptor.
16
- *
17
- * @param schema - The schema that the source input is expected to conform to.
18
- * @param input - The source input to normalize.
19
- * @param options - Optional options for resolving the source input.
20
- * @returns A promise that resolves to a normalized source descriptor.
21
- */
22
- declare function createSource<TSpec, TOptions extends object>(schema: SchemaOf<TSpec, TOptions>, input: SourceInput<TSpec, TOptions>, options?: InferCreateSourceOptions<typeof input>): Promise<Source<TSpec, TOptions>>;
23
- //#endregion
24
- export { extractSourceMeta as n, createSource as t };
25
- //# sourceMappingURL=create-Qxy2mq7r.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-Qxy2mq7r.d.mts","names":[],"sources":["../src/source/create.ts"],"mappings":""}
@@ -1,14 +0,0 @@
1
- import { r as SchemaInputObject } from "./schema-xFkmOyE6.cjs";
2
- import { SchemaEnvelopeOf, SchemaSourceInput } from "@power-plant/schema/types";
3
-
4
- //#region src/schema/define.d.ts
5
- /**
6
- * Defines a schema input object. If the provided schema is already a schema input object, it will be returned as-is. Otherwise, it will be wrapped in an object with a `schema` property.
7
- *
8
- * @param schema - The schema input to define. This can be either a schema source input, a schema envelope, or a schema input object.
9
- * @returns A schema input object that contains the provided schema. If the input was already a schema input object, it will be returned unchanged.
10
- */
11
- declare function defineSchema<TSpec, TOptions extends object>(schema: SchemaSourceInput<TSpec> | SchemaEnvelopeOf<TSpec> | SchemaInputObject<TSpec, TOptions>): SchemaInputObject<TSpec, TOptions>;
12
- //#endregion
13
- export { defineSchema as t };
14
- //# sourceMappingURL=define-BPfeEA9Z.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"define-BPfeEA9Z.d.cts","names":[],"sources":["../src/schema/define.ts"],"mappings":";;;;;;AA+BA;;;;iBAAgB,YAAA,iCACd,MAAA,EACI,iBAAA,CAAkB,KAAA,IAClB,gBAAA,CAAiB,KAAA,IACjB,iBAAA,CAAkB,KAAA,EAAO,QAAA,IAC5B,iBAAA,CAAkB,KAAA,EAAO,QAAA"}
@@ -1,14 +0,0 @@
1
- import { r as SchemaInputObject } from "./schema-xFkmOyE6.mjs";
2
- import { SchemaEnvelopeOf, SchemaSourceInput } from "@power-plant/schema/types";
3
-
4
- //#region src/schema/define.d.ts
5
- /**
6
- * Defines a schema input object. If the provided schema is already a schema input object, it will be returned as-is. Otherwise, it will be wrapped in an object with a `schema` property.
7
- *
8
- * @param schema - The schema input to define. This can be either a schema source input, a schema envelope, or a schema input object.
9
- * @returns A schema input object that contains the provided schema. If the input was already a schema input object, it will be returned unchanged.
10
- */
11
- declare function defineSchema<TSpec, TOptions extends object>(schema: SchemaSourceInput<TSpec> | SchemaEnvelopeOf<TSpec> | SchemaInputObject<TSpec, TOptions>): SchemaInputObject<TSpec, TOptions>;
12
- //#endregion
13
- export { defineSchema as t };
14
- //# sourceMappingURL=define-CQZ042K5.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"define-CQZ042K5.d.mts","names":[],"sources":["../src/schema/define.ts"],"mappings":""}
@@ -1,38 +0,0 @@
1
- import { a as SourceInputObject, i as SourceInput } from "./source-BiOs3_-8.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-Dw8JgVQ1.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"define-Dw8JgVQ1.d.mts","names":[],"sources":["../src/source/define.ts"],"mappings":""}