@power-plant/core 0.0.2 → 0.0.4
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/create-23iLtMb_.cjs +1 -0
- package/dist/create-BR4IeVl4.mjs +2 -0
- package/dist/create-BR4IeVl4.mjs.map +1 -0
- package/dist/create-BqRl9d7m.d.cts +19 -0
- package/dist/create-BqRl9d7m.d.cts.map +1 -0
- package/dist/create-C-rR8nuY.d.mts +23 -0
- package/dist/create-C-rR8nuY.d.mts.map +1 -0
- package/dist/create-Cz9qVT4m.d.cts +23 -0
- package/dist/create-Cz9qVT4m.d.cts.map +1 -0
- package/dist/create-DAGPeYVI.d.cts +25 -0
- package/dist/create-DAGPeYVI.d.cts.map +1 -0
- package/dist/create-DEe398aQ.d.mts +25 -0
- package/dist/create-DEe398aQ.d.mts.map +1 -0
- package/dist/create-DUt-efk7.d.cts +25 -0
- package/dist/create-DUt-efk7.d.cts.map +1 -0
- package/dist/create-DcCu_zM3.d.mts +19 -0
- package/dist/create-DcCu_zM3.d.mts.map +1 -0
- package/dist/create-Qxy2mq7r.d.mts +25 -0
- package/dist/create-Qxy2mq7r.d.mts.map +1 -0
- package/dist/define-BPfeEA9Z.d.cts +14 -0
- package/dist/define-BPfeEA9Z.d.cts.map +1 -0
- package/dist/define-CQZ042K5.d.mts +14 -0
- package/dist/define-CQZ042K5.d.mts.map +1 -0
- package/dist/define-Dw8JgVQ1.d.mts +38 -0
- package/dist/define-Dw8JgVQ1.d.mts.map +1 -0
- package/dist/define-aWeW6VVo.d.cts +38 -0
- package/dist/define-aWeW6VVo.d.cts.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-BGkKE8HQ.d.mts} +18 -14
- package/dist/generator-BGkKE8HQ.d.mts.map +1 -0
- package/dist/{generator-DZI01B4_.d.mts → generator-Dq0PL5w6.d.cts} +18 -14
- package/dist/generator-Dq0PL5w6.d.cts.map +1 -0
- package/dist/helpers-BqnQPaP5.d.cts +13 -0
- package/dist/helpers-BqnQPaP5.d.cts.map +1 -0
- package/dist/helpers-CgXgqnVu.d.mts +13 -0
- package/dist/helpers-CgXgqnVu.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 +12 -8
- package/dist/index.d.mts +12 -8
- package/dist/index.mjs +1 -1
- package/dist/schema/create.cjs +1 -0
- package/dist/schema/create.d.cts +2 -0
- package/dist/schema/create.d.mts +2 -0
- package/dist/schema/create.mjs +1 -0
- package/dist/schema/define.cjs +1 -0
- package/dist/schema/define.d.cts +2 -0
- package/dist/schema/define.d.mts +2 -0
- package/dist/schema/define.mjs +2 -0
- package/dist/schema/define.mjs.map +1 -0
- package/dist/schema/helpers.cjs +1 -0
- package/dist/schema/helpers.d.cts +2 -0
- package/dist/schema/helpers.d.mts +2 -0
- package/dist/schema/helpers.mjs +2 -0
- package/dist/schema/helpers.mjs.map +1 -0
- package/dist/schema/index.cjs +1 -0
- package/dist/schema/index.d.cts +4 -0
- package/dist/schema/index.d.mts +4 -0
- package/dist/schema/index.mjs +1 -0
- package/dist/schema-xFkmOyE6.d.cts +205 -0
- package/dist/schema-xFkmOyE6.d.cts.map +1 -0
- package/dist/schema-xFkmOyE6.d.mts +205 -0
- package/dist/schema-xFkmOyE6.d.mts.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-CHQncb8H.d.mts +58 -0
- package/dist/sink-CHQncb8H.d.mts.map +1 -0
- package/dist/sink-DHpx94GM.d.cts +58 -0
- package/dist/sink-DHpx94GM.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-BiOs3_-8.d.mts +57 -0
- package/dist/source-BiOs3_-8.d.mts.map +1 -0
- package/dist/source-txi0ZuzR.d.cts +57 -0
- package/dist/source-txi0ZuzR.d.cts.map +1 -0
- package/package.json +187 -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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@power-plant/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Core package for Power Plant",
|
|
6
6
|
"keywords": ["power-plant", "powerlines", "storm-software"],
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "github",
|
|
14
14
|
"url": "https://github.com/storm-software/power-plant.git",
|
|
15
|
-
"directory": "packages/core"
|
|
15
|
+
"directory": "packages/base/core"
|
|
16
16
|
},
|
|
17
17
|
"funding": {
|
|
18
18
|
"type": "github",
|
|
@@ -54,20 +54,6 @@
|
|
|
54
54
|
"default": "./dist/index.mjs"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
"./config": {
|
|
58
|
-
"require": {
|
|
59
|
-
"types": "./dist/config.d.cts",
|
|
60
|
-
"default": "./dist/config.cjs"
|
|
61
|
-
},
|
|
62
|
-
"import": {
|
|
63
|
-
"types": "./dist/config.d.mts",
|
|
64
|
-
"default": "./dist/config.mjs"
|
|
65
|
-
},
|
|
66
|
-
"default": {
|
|
67
|
-
"types": "./dist/config.d.mts",
|
|
68
|
-
"default": "./dist/config.mjs"
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
57
|
"./generator": {
|
|
72
58
|
"require": {
|
|
73
59
|
"types": "./dist/generator/index.d.cts",
|
|
@@ -82,7 +68,91 @@
|
|
|
82
68
|
"default": "./dist/generator/index.mjs"
|
|
83
69
|
}
|
|
84
70
|
},
|
|
71
|
+
"./generator/create": {
|
|
72
|
+
"require": {
|
|
73
|
+
"types": "./dist/generator/create.d.cts",
|
|
74
|
+
"default": "./dist/generator/create.cjs"
|
|
75
|
+
},
|
|
76
|
+
"import": {
|
|
77
|
+
"types": "./dist/generator/create.d.mts",
|
|
78
|
+
"default": "./dist/generator/create.mjs"
|
|
79
|
+
},
|
|
80
|
+
"default": {
|
|
81
|
+
"types": "./dist/generator/create.d.mts",
|
|
82
|
+
"default": "./dist/generator/create.mjs"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"./generator/helpers": {
|
|
86
|
+
"require": {
|
|
87
|
+
"types": "./dist/generator/helpers.d.cts",
|
|
88
|
+
"default": "./dist/generator/helpers.cjs"
|
|
89
|
+
},
|
|
90
|
+
"import": {
|
|
91
|
+
"types": "./dist/generator/helpers.d.mts",
|
|
92
|
+
"default": "./dist/generator/helpers.mjs"
|
|
93
|
+
},
|
|
94
|
+
"default": {
|
|
95
|
+
"types": "./dist/generator/helpers.d.mts",
|
|
96
|
+
"default": "./dist/generator/helpers.mjs"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
85
99
|
"./package.json": "./package.json",
|
|
100
|
+
"./schema": {
|
|
101
|
+
"require": {
|
|
102
|
+
"types": "./dist/schema/index.d.cts",
|
|
103
|
+
"default": "./dist/schema/index.cjs"
|
|
104
|
+
},
|
|
105
|
+
"import": {
|
|
106
|
+
"types": "./dist/schema/index.d.mts",
|
|
107
|
+
"default": "./dist/schema/index.mjs"
|
|
108
|
+
},
|
|
109
|
+
"default": {
|
|
110
|
+
"types": "./dist/schema/index.d.mts",
|
|
111
|
+
"default": "./dist/schema/index.mjs"
|
|
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
|
+
},
|
|
86
156
|
"./sink": {
|
|
87
157
|
"require": {
|
|
88
158
|
"types": "./dist/sink/index.d.cts",
|
|
@@ -97,6 +167,48 @@
|
|
|
97
167
|
"default": "./dist/sink/index.mjs"
|
|
98
168
|
}
|
|
99
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
|
+
},
|
|
100
212
|
"./source": {
|
|
101
213
|
"require": {
|
|
102
214
|
"types": "./dist/source/index.d.cts",
|
|
@@ -110,6 +222,48 @@
|
|
|
110
222
|
"types": "./dist/source/index.d.mts",
|
|
111
223
|
"default": "./dist/source/index.mjs"
|
|
112
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
|
+
}
|
|
113
267
|
}
|
|
114
268
|
},
|
|
115
269
|
"main": "./dist/index.cjs",
|
|
@@ -121,30 +275,36 @@
|
|
|
121
275
|
"@alloy-js/core": "^0.23.1",
|
|
122
276
|
"@alloy-js/markdown": "^0.23.0",
|
|
123
277
|
"@alloy-js/typescript": "^0.23.0",
|
|
124
|
-
"@power-plant/schema": "^0.0.
|
|
278
|
+
"@power-plant/schema": "^0.0.4",
|
|
125
279
|
"@powerlines/core": "^0.48.60",
|
|
126
280
|
"@powerlines/engine": "^0.49.62",
|
|
127
281
|
"@powerlines/plugin-alloy": "^0.26.232",
|
|
128
282
|
"@powerlines/plugin-automd": "^0.1.600",
|
|
129
|
-
"@stryke/convert": "^0.7.
|
|
130
|
-
"@stryke/fs": "^0.33.
|
|
131
|
-
"@stryke/helpers": "^0.10.
|
|
132
|
-
"@stryke/json": "^0.15.
|
|
133
|
-
"@stryke/path": "^0.29.
|
|
134
|
-
"@stryke/
|
|
135
|
-
"@stryke/
|
|
136
|
-
"@stryke/
|
|
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",
|
|
137
291
|
"automd": "^0.4.3",
|
|
138
292
|
"defu": "^6.1.7",
|
|
139
293
|
"jiti": "^2.7.0",
|
|
140
|
-
"powerlines": "
|
|
294
|
+
"powerlines": "0.47.139",
|
|
141
295
|
"tsdown": "^0.22.3"
|
|
142
296
|
},
|
|
143
297
|
"devDependencies": {
|
|
144
298
|
"@powerlines/plugin-tsdown": "^0.1.540",
|
|
299
|
+
"@stryke/types": "^0.12.21",
|
|
145
300
|
"@types/node": "^25.9.4",
|
|
146
301
|
"typescript": "^6.0.3"
|
|
147
302
|
},
|
|
148
303
|
"publishConfig": { "access": "public" },
|
|
149
|
-
"
|
|
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"
|
|
150
310
|
}
|
package/dist/config.cjs
DELETED
|
File without changes
|
package/dist/config.d.cts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { t as Generator } from "./generator-C5O_C4RV.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/types/config.d.ts
|
|
4
|
-
interface UserConfig<TSpec extends object> {
|
|
5
|
-
spec: TSpec;
|
|
6
|
-
generate: Generator<TSpec> | Generator<TSpec>[] | { [key in keyof TSpec]: Generator<TSpec[key]> | Generator<TSpec[key]>[] };
|
|
7
|
-
}
|
|
8
|
-
//#endregion
|
|
9
|
-
export type { UserConfig };
|
|
10
|
-
//# sourceMappingURL=config.d.cts.map
|
package/dist/config.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.cts","names":[],"sources":["../src/types/config.ts"],"mappings":";;;UAoBiB,UAAA;EACf,IAAA,EAAM,KAAA;EACN,QAAA,EACI,SAAA,CAAU,KAAA,IACV,SAAA,CAAU,KAAA,sBAEM,KAAA,GAAQ,SAAA,CAAU,KAAA,CAAM,GAAA,KAAQ,SAAA,CAAU,KAAA,CAAM,GAAA;AAAA"}
|
package/dist/config.d.mts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { t as Generator } from "./generator-DZI01B4_.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/types/config.d.ts
|
|
4
|
-
interface UserConfig<TSpec extends object> {
|
|
5
|
-
spec: TSpec;
|
|
6
|
-
generate: Generator<TSpec> | Generator<TSpec>[] | { [key in keyof TSpec]: Generator<TSpec[key]> | Generator<TSpec[key]>[] };
|
|
7
|
-
}
|
|
8
|
-
//#endregion
|
|
9
|
-
export type { UserConfig };
|
|
10
|
-
//# sourceMappingURL=config.d.mts.map
|
package/dist/config.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.mts","names":[],"sources":["../src/types/config.ts"],"mappings":""}
|
package/dist/config.mjs
DELETED
package/dist/config.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{extractFileReference as e}from"@stryke/convert/extract-file-reference";import{findFileExtensionSafe as t}from"@stryke/path/find";import{existsSync as n}from"node:fs";import{resolveSafe as r}from"@power-plant/schema/resolve";import{createJiti as i}from"jiti";const a=[`ts`,`cts`,`mts`,`tsx`,`js`,`cjs`,`mjs`,`jsx`,`json`,`jsonc`,`json5`,`yaml`,`yml`,`toml`];function o(e){return typeof e==`object`&&!!e&&`file`in e&&typeof e.file==`string`}function s(e){if(typeof e==`string`){if(e.includes(`:`)||e.includes(`#`)||e.includes(`;`))return!0;let r=t(e);return!r||!a.includes(r)?!1:n(e)}return o(e)}function c(e){return typeof e==`object`&&!!e&&!o(e)&&`source`in e}async function l(n,o,l={}){let u=c(o)?o:{source:o,meta:void 0},d=u.source;if(s(d)){let o=e(d);if(!o)throw Error(`Failed to extract a file reference from the provided source input ${JSON.stringify(d)}.`);let s=t(o.file);if(s&&!a.includes(s))throw Error(`The provided source file input "${o.file}" has an invalid file extension (.${s}). Please ensure that the file has one of the following extensions: ${a.join(`, `)}.`);let c=await r(o,l);if(c===void 0){let e=await i(l.cwd??process.cwd()).import(o.file),t=o.export;t||=`default`,c=e[t]??e[`__Ω${t}`]??(t==="default"?e.default:void 0)}if(c===void 0)throw Error(`Failed to resolve source input from file reference "${o.file}".`);if(c instanceof Promise&&(c=await c),!c)throw Error(`Resolved source input from file reference "${o.file}" is invalid: ${JSON.stringify(c)}.`);return{schema:n,source:c,meta:u.meta}}return d instanceof Promise?{schema:n,source:await d,meta:u.meta}:{schema:n,source:d,meta:u.meta}}export{a as n,l as t};
|
|
2
|
-
//# sourceMappingURL=extract-BzZLelb2.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extract-BzZLelb2.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e=require("@stryke/type-checks/is-function"),t=require("@power-plant/schema"),n=require("@stryke/convert/extract-file-reference"),r=require("@stryke/path/find"),i=require("node:fs");const a=[`ts`,`cts`,`mts`,`tsx`,`js`,`cjs`,`mjs`,`jsx`];function o(e){return typeof e==`object`&&!!e&&`file`in e&&typeof e.file==`string`}function s(e){if(typeof e==`string`){if(e.includes(`:`)||e.includes(`#`)||e.includes(`;`))return!0;let t=(0,r.findFileExtensionSafe)(e);return!t||!a.includes(t)?!1:(0,i.existsSync)(e)}return o(e)}function c(e){return typeof e==`object`&&!!e&&`sink`in e}async function l(i,o,l={}){let u=c(o)?o:{sink:o,meta:void 0},d=u.sink;if(s(d)){let o=(0,n.extractFileReference)(d);if(!o)throw Error(`Failed to extract a file reference from the provided sink input ${JSON.stringify(d)}.`);let s=(0,r.findFileExtensionSafe)(o.file);if(s&&!a.includes(s))throw Error(`The provided sink file input "${o.file}" has an invalid file extension (.${s}). Please ensure that the file has one of the following extensions: ${a.join(`, `)}.`);let c=await(0,t.resolve)(o,l);if(!(0,e.isFunction)(c))throw TypeError(`Resolved sink input from file reference "${o.file}" is invalid: ${JSON.stringify(c)}.`);return{schema:i,sink:c,meta:u.meta}}return{schema:i,sink:d,meta:u.meta}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e=require("@stryke/convert/extract-file-reference"),t=require("@stryke/path/find"),n=require("node:fs"),r=require("@power-plant/schema/resolve"),i=require("jiti");const a=[`ts`,`cts`,`mts`,`tsx`,`js`,`cjs`,`mjs`,`jsx`,`json`,`jsonc`,`json5`,`yaml`,`yml`,`toml`];function o(e){return typeof e==`object`&&!!e&&`file`in e&&typeof e.file==`string`}function s(e){if(typeof e==`string`){if(e.includes(`:`)||e.includes(`#`)||e.includes(`;`))return!0;let r=(0,t.findFileExtensionSafe)(e);return!r||!a.includes(r)?!1:(0,n.existsSync)(e)}return o(e)}function c(e){return typeof e==`object`&&!!e&&!o(e)&&`source`in e}async function l(n,o,l={}){let u=c(o)?o:{source:o,meta:void 0},d=u.source;if(s(d)){let o=(0,e.extractFileReference)(d);if(!o)throw Error(`Failed to extract a file reference from the provided source input ${JSON.stringify(d)}.`);let s=(0,t.findFileExtensionSafe)(o.file);if(s&&!a.includes(s))throw Error(`The provided source file input "${o.file}" has an invalid file extension (.${s}). Please ensure that the file has one of the following extensions: ${a.join(`, `)}.`);let c=await(0,r.resolveSafe)(o,l);if(c===void 0){let e=await(0,i.createJiti)(l.cwd??process.cwd()).import(o.file),t=o.export;t||=`default`,c=e[t]??e[`__Ω${t}`]??(t==="default"?e.default:void 0)}if(c===void 0)throw Error(`Failed to resolve source input from file reference "${o.file}".`);if(c instanceof Promise&&(c=await c),!c)throw Error(`Resolved source input from file reference "${o.file}" is invalid: ${JSON.stringify(c)}.`);return{schema:n,source:c,meta:u.meta}}return d instanceof Promise?{schema:n,source:await d,meta:u.meta}:{schema:n,source:d,meta:u.meta}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isFunction as e}from"@stryke/type-checks/is-function";import{resolve as t}from"@power-plant/schema";import{extractFileReference as n}from"@stryke/convert/extract-file-reference";import{findFileExtensionSafe as r}from"@stryke/path/find";import{existsSync as i}from"node:fs";const a=[`ts`,`cts`,`mts`,`tsx`,`js`,`cjs`,`mjs`,`jsx`];function o(e){return typeof e==`object`&&!!e&&`file`in e&&typeof e.file==`string`}function s(e){if(typeof e==`string`){if(e.includes(`:`)||e.includes(`#`)||e.includes(`;`))return!0;let t=r(e);return!t||!a.includes(t)?!1:i(e)}return o(e)}function c(e){return typeof e==`object`&&!!e&&`sink`in e}async function l(i,o,l={}){let u=c(o)?o:{sink:o,meta:void 0},d=u.sink;if(s(d)){let o=n(d);if(!o)throw Error(`Failed to extract a file reference from the provided sink input ${JSON.stringify(d)}.`);let s=r(o.file);if(s&&!a.includes(s))throw Error(`The provided sink file input "${o.file}" has an invalid file extension (.${s}). Please ensure that the file has one of the following extensions: ${a.join(`, `)}.`);let c=await t(o,l);if(!e(c))throw TypeError(`Resolved sink input from file reference "${o.file}" is invalid: ${JSON.stringify(c)}.`);return{schema:i,sink:c,meta:u.meta}}return{schema:i,sink:d,meta:u.meta}}export{a as n,l as t};
|
|
2
|
-
//# sourceMappingURL=extract-ZIpZAKsq.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extract-ZIpZAKsq.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/generator/generator.ts"],"mappings":";;;;;;AAqCA;;;;;;;;;;iBAAsB,eAAA,wBACpB,KAAA,EAAO,cAAA,CAAe,KAAA,EAAO,QAAA,GAC7B,OAAA,GAAU,cAAA,GACT,OAAA,CAAQ,SAAA,CAAU,KAAA,EAAO,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/generator/generator.ts"],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generator-C5O_C4RV.d.cts","names":[],"sources":["../src/types/generator.ts"],"mappings":";;;;;UAsBiB,aAAA;;AAAjB;;EAIE,WAAA,cAAyB,IAAA,EAAM,KAAK;AAAA;AAAA,UAGrB,cAAA;EAHf;;;EAOA,IAAA,GAAO,aAAA,CAAc,KAAA;EAPe;AAGtC;;EASE,MAAA,EAAQ,WAAA,CAAY,KAAA;EALC;;;EAUrB,MAAA,EAAQ,WAAA,CAAY,KAAA,EAAO,QAAA;EAAP;;;EAKpB,IAAA,EAAM,SAAA,CAAU,KAAA,EAAO,QAAA;AAAA;AAAA,UAGR,SAAA;EAHA;;;EAOf,IAAA,GAAO,aAAA,CAAc,KAAA;EAtBrB;;;EA2BA,MAAA,EAAQ,QAAA,CAAS,KAAA;EAtBT;;;EA2BR,MAAA,EAAQ,MAAA,CAAO,KAAA,EAAO,QAAA;EAtBF;;;EA2BpB,IAAA,EAAM,IAAA,CAAK,KAAA,EAAO,QAAA;EAtBF;;;AAAe;AAGjC;;EA2BE,QAAA,GAAW,OAAA,EAAS,QAAA,KAAa,OAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generator-DZI01B4_.d.mts","names":[],"sources":["../src/types/generator.ts"],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/sink/constants.ts","../../src/sink/extract.ts"],"mappings":";;;;;cAkBa,0BAAA;;;;;AAAb;iBC8CsB,WAAA,0BACpB,MAAA,EAAQ,QAAA,CAAS,KAAA,GACjB,KAAA,EAAO,SAAA,CAAU,KAAA,EAAO,QAAA,GACxB,OAAA,GAAS,cAAA,GACR,OAAA,CAAQ,IAAA,CAAK,KAAA,EAAO,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/sink/constants.ts","../../src/sink/extract.ts"],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/source/constants.ts","../../src/source/extract.ts"],"mappings":";;;;;cAkBa,4BAAA;;;KCgBD,mBAAA,4BACR,KAAA,GACA,OAAA,CAAQ,KAAA,IACR,cAAA,CAAe,KAAA,EAAO,QAAA;;ADnB1B;;iBC6DsB,aAAA,0BACpB,MAAA,EAAQ,QAAA,CAAS,KAAA,GACjB,KAAA,EAAO,WAAA,CAAY,KAAA,EAAO,QAAA,GAC1B,OAAA,GAAS,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,KAAA,EAAO,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/source/constants.ts","../../src/source/extract.ts"],"mappings":""}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { SchemaOf } from "@power-plant/schema/types";
|
|
2
|
-
import { MaybePromise } from "@stryke/types/base";
|
|
3
|
-
import { FileReferenceInput } from "@stryke/types/configuration";
|
|
4
|
-
|
|
5
|
-
//#region src/sink/types.d.ts
|
|
6
|
-
type SinkFunction<TSpec, TOptions = never> = TOptions extends never ? (spec: TSpec) => MaybePromise<TSpec> : (spec: TSpec, options: TOptions) => MaybePromise<void>;
|
|
7
|
-
interface SinkMeta<TSpec, TOptions = never> {
|
|
8
|
-
/**
|
|
9
|
-
* A string description (or a function that returns a string) of the eventual output of the sink.
|
|
10
|
-
*/
|
|
11
|
-
description?: string | (TOptions extends never ? (spec: TSpec) => string : (spec: TSpec, options: TOptions) => string);
|
|
12
|
-
}
|
|
13
|
-
interface SinkInputWithMeta<TSpec, TOptions = never> {
|
|
14
|
-
/**
|
|
15
|
-
* The sink implementation, either as a callable function or a file reference.
|
|
16
|
-
*/
|
|
17
|
-
sink: SinkFunction<TSpec, TOptions> | FileReferenceInput;
|
|
18
|
-
/**
|
|
19
|
-
* Optional metadata that provides contextual information for the schema.
|
|
20
|
-
*/
|
|
21
|
-
meta?: SinkMeta<TSpec, TOptions>;
|
|
22
|
-
}
|
|
23
|
-
type SinkInput<TSpec, TOptions = never> = FileReferenceInput | SinkFunction<TSpec, TOptions> | SinkInputWithMeta<TSpec, TOptions>;
|
|
24
|
-
interface Sink<TSpec, TOptions = never> {
|
|
25
|
-
/**
|
|
26
|
-
* The schema that defines the structure of the specification input for the generator. This schema is used to validate the input specification and ensure that it conforms to the expected format before being processed by the generator.
|
|
27
|
-
*/
|
|
28
|
-
schema: SchemaOf<TSpec>;
|
|
29
|
-
/**
|
|
30
|
-
* Optional metadata that provides contextual information for the schema.
|
|
31
|
-
*/
|
|
32
|
-
meta?: SinkMeta<TSpec, TOptions>;
|
|
33
|
-
/**
|
|
34
|
-
* The sink of the generator, which can be used to specify where the generator sends its output data. This can be defined as a function that takes the specification and returns a value, or it can be a static value.
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
* The `sink` property is defined as a function that takes the specification object and any additional parameters, and returns a value or a promise that resolves to a value. This allows for flexibility in how the generator sends its output data, enabling both synchronous and asynchronous data handling based on the specification.
|
|
38
|
-
*
|
|
39
|
-
* @param spec - The specification object that conforms to the defined schema input.
|
|
40
|
-
* @param params - Additional parameters that may be needed for the sink function to process the output data.
|
|
41
|
-
* @returns A value or a promise that resolves to a value, which will be used as the output data for the generator.
|
|
42
|
-
*/
|
|
43
|
-
sink: SinkFunction<TSpec, TOptions>;
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
export { SinkMeta as a, SinkInputWithMeta as i, SinkFunction as n, SinkInput as r, Sink as t };
|
|
47
|
-
//# sourceMappingURL=types-B2MtSxCp.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-B2MtSxCp.d.cts","names":[],"sources":["../src/sink/types.ts"],"mappings":";;;;;KAsBY,YAAA,4BAAwC,QAAA,kBAC/C,IAAA,EAAM,KAAA,KAAU,YAAA,CAAa,KAAA,KAC7B,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,QAAA,KAAa,YAAA;AAAA,UAEvB,QAAA;EAJL;;;EAQV,WAAA,aAEK,QAAA,kBACI,IAAA,EAAM,KAAA,eACN,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,QAAA;AAAA;AAAA,UAGhB,iBAAA;EAdI;;;EAkBnB,IAAA,EAAM,YAAA,CAAa,KAAA,EAAO,QAAA,IAAY,kBAAA;EAjBY;;;EAsBlD,IAAA,GAAO,QAAA,CAAS,KAAA,EAAO,QAAA;AAAA;AAAA,KAGb,SAAA,4BACR,kBAAA,GACA,YAAA,CAAa,KAAA,EAAO,QAAA,IACpB,iBAAA,CAAkB,KAAA,EAAO,QAAA;AAAA,UAEZ,IAAA;EA/BI;;;EAmCnB,MAAA,EAAQ,QAAA,CAAS,KAAA;EAlCQ;;;EAuCzB,IAAA,GAAO,QAAA,CAAS,KAAA,EAAO,QAAA;EAvC2B;AAEpD;;;;;;;;;EAiDE,IAAA,EAAM,YAAA,CAAa,KAAA,EAAO,QAAA;AAAA"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { SchemaOf } from "@power-plant/schema/types";
|
|
2
|
-
import { MaybePromise } from "@stryke/types/base";
|
|
3
|
-
import { FileReferenceInput } from "@stryke/types/configuration";
|
|
4
|
-
|
|
5
|
-
//#region src/sink/types.d.ts
|
|
6
|
-
type SinkFunction<TSpec, TOptions = never> = TOptions extends never ? (spec: TSpec) => MaybePromise<TSpec> : (spec: TSpec, options: TOptions) => MaybePromise<void>;
|
|
7
|
-
interface SinkMeta<TSpec, TOptions = never> {
|
|
8
|
-
/**
|
|
9
|
-
* A string description (or a function that returns a string) of the eventual output of the sink.
|
|
10
|
-
*/
|
|
11
|
-
description?: string | (TOptions extends never ? (spec: TSpec) => string : (spec: TSpec, options: TOptions) => string);
|
|
12
|
-
}
|
|
13
|
-
interface SinkInputWithMeta<TSpec, TOptions = never> {
|
|
14
|
-
/**
|
|
15
|
-
* The sink implementation, either as a callable function or a file reference.
|
|
16
|
-
*/
|
|
17
|
-
sink: SinkFunction<TSpec, TOptions> | FileReferenceInput;
|
|
18
|
-
/**
|
|
19
|
-
* Optional metadata that provides contextual information for the schema.
|
|
20
|
-
*/
|
|
21
|
-
meta?: SinkMeta<TSpec, TOptions>;
|
|
22
|
-
}
|
|
23
|
-
type SinkInput<TSpec, TOptions = never> = FileReferenceInput | SinkFunction<TSpec, TOptions> | SinkInputWithMeta<TSpec, TOptions>;
|
|
24
|
-
interface Sink<TSpec, TOptions = never> {
|
|
25
|
-
/**
|
|
26
|
-
* The schema that defines the structure of the specification input for the generator. This schema is used to validate the input specification and ensure that it conforms to the expected format before being processed by the generator.
|
|
27
|
-
*/
|
|
28
|
-
schema: SchemaOf<TSpec>;
|
|
29
|
-
/**
|
|
30
|
-
* Optional metadata that provides contextual information for the schema.
|
|
31
|
-
*/
|
|
32
|
-
meta?: SinkMeta<TSpec, TOptions>;
|
|
33
|
-
/**
|
|
34
|
-
* The sink of the generator, which can be used to specify where the generator sends its output data. This can be defined as a function that takes the specification and returns a value, or it can be a static value.
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
* The `sink` property is defined as a function that takes the specification object and any additional parameters, and returns a value or a promise that resolves to a value. This allows for flexibility in how the generator sends its output data, enabling both synchronous and asynchronous data handling based on the specification.
|
|
38
|
-
*
|
|
39
|
-
* @param spec - The specification object that conforms to the defined schema input.
|
|
40
|
-
* @param params - Additional parameters that may be needed for the sink function to process the output data.
|
|
41
|
-
* @returns A value or a promise that resolves to a value, which will be used as the output data for the generator.
|
|
42
|
-
*/
|
|
43
|
-
sink: SinkFunction<TSpec, TOptions>;
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
export { SinkMeta as a, SinkInputWithMeta as i, SinkFunction as n, SinkInput as r, Sink as t };
|
|
47
|
-
//# sourceMappingURL=types-B2MtSxCp.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-B2MtSxCp.d.mts","names":[],"sources":["../src/sink/types.ts"],"mappings":""}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { SchemaOf } from "@power-plant/schema/types";
|
|
2
|
-
import { MaybePromise } from "@stryke/types/base";
|
|
3
|
-
import { FileReferenceInput } from "@stryke/types/configuration";
|
|
4
|
-
|
|
5
|
-
//#region src/source/types.d.ts
|
|
6
|
-
interface SourceMeta<TSpec, TOptions = never> {
|
|
7
|
-
/**
|
|
8
|
-
* A string description (or a function that returns a string) of the expected method of gathering input for the source.
|
|
9
|
-
*/
|
|
10
|
-
description?: string | (TOptions extends never ? (spec: TSpec) => string : (spec: TSpec, options: TOptions) => string);
|
|
11
|
-
}
|
|
12
|
-
type SourceFunction<TSpec, TOptions = never> = TOptions extends never ? (spec: TSpec) => MaybePromise<TSpec> : (spec: TSpec, options: TOptions) => MaybePromise<TSpec>;
|
|
13
|
-
type SourceValue<TSpec, TOptions = never> = TSpec | SourceFunction<TSpec, TOptions> | Promise<TSpec> | FileReferenceInput;
|
|
14
|
-
interface SourceInputWithMeta<TSpec, TOptions = never> {
|
|
15
|
-
/**
|
|
16
|
-
* The source implementation, which can be a static value, function, promise, or file reference.
|
|
17
|
-
*/
|
|
18
|
-
source: SourceValue<TSpec, TOptions>;
|
|
19
|
-
/**
|
|
20
|
-
* Optional metadata that provides contextual information for the source.
|
|
21
|
-
*/
|
|
22
|
-
meta?: SourceMeta<TSpec, TOptions>;
|
|
23
|
-
}
|
|
24
|
-
type SourceInput<TSpec, TOptions = never> = SourceValue<TSpec, TOptions> | SourceInputWithMeta<TSpec, TOptions>;
|
|
25
|
-
interface Source<TSpec, TOptions = never> {
|
|
26
|
-
/**
|
|
27
|
-
* The schema that defines the structure of the specification input for the generator. This schema is used to validate the input specification and ensure that it conforms to the expected format before being processed by the generator.
|
|
28
|
-
*/
|
|
29
|
-
schema: SchemaOf<TSpec>;
|
|
30
|
-
/**
|
|
31
|
-
* Optional metadata that provides contextual information for the source.
|
|
32
|
-
*/
|
|
33
|
-
meta?: SourceMeta<TSpec, TOptions>;
|
|
34
|
-
/**
|
|
35
|
-
* The source of the generator, which can be used to specify where the generator retrieves its input data from. This can be defined as a function that takes the specification and returns a value, or it can be a static value.
|
|
36
|
-
*
|
|
37
|
-
* @remarks
|
|
38
|
-
* The `source` property can be either a static value of type `TSpec` or a function that takes the specification object and returns a value of type `TSpec` or a promise that resolves to `TSpec`. This allows for flexibility in how the generator retrieves its input data, enabling both synchronous and asynchronous data retrieval based on the specification.
|
|
39
|
-
*
|
|
40
|
-
* @param options - The options object that can be used to influence the generation process.
|
|
41
|
-
* @returns A value or a promise that resolves to a value, which will be used as the input data for the generator.
|
|
42
|
-
*/
|
|
43
|
-
source: TSpec | SourceFunction<TSpec, TOptions>;
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
export { SourceMeta as a, SourceInputWithMeta as i, SourceFunction as n, SourceValue as o, SourceInput as r, Source as t };
|
|
47
|
-
//# sourceMappingURL=types-DJo-IRmS.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-DJo-IRmS.d.cts","names":[],"sources":["../src/source/types.ts"],"mappings":";;;;;UAsBiB,UAAA;;AAAjB;;EAIE,WAAA,aAEK,QAAA,kBACI,IAAA,EAAM,KAAA,eACN,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,QAAA;AAAA;AAAA,KAGrB,cAAA,4BAA0C,QAAA,kBACjD,IAAA,EAAM,KAAA,KAAU,YAAA,CAAa,KAAA,KAC7B,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,QAAA,KAAa,YAAA,CAAa,KAAA;AAAA,KAEzC,WAAA,4BACR,KAAA,GACA,cAAA,CAAe,KAAA,EAAO,QAAA,IACtB,OAAA,CAAQ,KAAA,IACR,kBAAA;AAAA,UAEa,mBAAA;EAbwB;;;EAiBvC,MAAA,EAAQ,WAAA,CAAY,KAAA,EAAO,QAAA;EArB3B;;;EA0BA,IAAA,GAAO,UAAA,CAAW,KAAA,EAAO,QAAA;AAAA;AAAA,KAGf,WAAA,4BACR,WAAA,CAAY,KAAA,EAAO,QAAA,IACnB,mBAAA,CAAoB,KAAA,EAAO,QAAA;AAAA,UAEd,MAAA;EA7BO;;AAAiB;EAiCvC,MAAA,EAAQ,QAAA,CAAS,KAAA;EA9BO;;;EAmCxB,IAAA,GAAO,UAAA,CAAW,KAAA,EAAO,QAAA;EAlCO;;;;;;;;;EA6ChC,MAAA,EAAQ,KAAA,GAAQ,cAAA,CAAe,KAAA,EAAO,QAAA;AAAA"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { SchemaOf } from "@power-plant/schema/types";
|
|
2
|
-
import { MaybePromise } from "@stryke/types/base";
|
|
3
|
-
import { FileReferenceInput } from "@stryke/types/configuration";
|
|
4
|
-
|
|
5
|
-
//#region src/source/types.d.ts
|
|
6
|
-
interface SourceMeta<TSpec, TOptions = never> {
|
|
7
|
-
/**
|
|
8
|
-
* A string description (or a function that returns a string) of the expected method of gathering input for the source.
|
|
9
|
-
*/
|
|
10
|
-
description?: string | (TOptions extends never ? (spec: TSpec) => string : (spec: TSpec, options: TOptions) => string);
|
|
11
|
-
}
|
|
12
|
-
type SourceFunction<TSpec, TOptions = never> = TOptions extends never ? (spec: TSpec) => MaybePromise<TSpec> : (spec: TSpec, options: TOptions) => MaybePromise<TSpec>;
|
|
13
|
-
type SourceValue<TSpec, TOptions = never> = TSpec | SourceFunction<TSpec, TOptions> | Promise<TSpec> | FileReferenceInput;
|
|
14
|
-
interface SourceInputWithMeta<TSpec, TOptions = never> {
|
|
15
|
-
/**
|
|
16
|
-
* The source implementation, which can be a static value, function, promise, or file reference.
|
|
17
|
-
*/
|
|
18
|
-
source: SourceValue<TSpec, TOptions>;
|
|
19
|
-
/**
|
|
20
|
-
* Optional metadata that provides contextual information for the source.
|
|
21
|
-
*/
|
|
22
|
-
meta?: SourceMeta<TSpec, TOptions>;
|
|
23
|
-
}
|
|
24
|
-
type SourceInput<TSpec, TOptions = never> = SourceValue<TSpec, TOptions> | SourceInputWithMeta<TSpec, TOptions>;
|
|
25
|
-
interface Source<TSpec, TOptions = never> {
|
|
26
|
-
/**
|
|
27
|
-
* The schema that defines the structure of the specification input for the generator. This schema is used to validate the input specification and ensure that it conforms to the expected format before being processed by the generator.
|
|
28
|
-
*/
|
|
29
|
-
schema: SchemaOf<TSpec>;
|
|
30
|
-
/**
|
|
31
|
-
* Optional metadata that provides contextual information for the source.
|
|
32
|
-
*/
|
|
33
|
-
meta?: SourceMeta<TSpec, TOptions>;
|
|
34
|
-
/**
|
|
35
|
-
* The source of the generator, which can be used to specify where the generator retrieves its input data from. This can be defined as a function that takes the specification and returns a value, or it can be a static value.
|
|
36
|
-
*
|
|
37
|
-
* @remarks
|
|
38
|
-
* The `source` property can be either a static value of type `TSpec` or a function that takes the specification object and returns a value of type `TSpec` or a promise that resolves to `TSpec`. This allows for flexibility in how the generator retrieves its input data, enabling both synchronous and asynchronous data retrieval based on the specification.
|
|
39
|
-
*
|
|
40
|
-
* @param options - The options object that can be used to influence the generation process.
|
|
41
|
-
* @returns A value or a promise that resolves to a value, which will be used as the input data for the generator.
|
|
42
|
-
*/
|
|
43
|
-
source: TSpec | SourceFunction<TSpec, TOptions>;
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
export { SourceMeta as a, SourceInputWithMeta as i, SourceFunction as n, SourceValue as o, SourceInput as r, Source as t };
|
|
47
|
-
//# sourceMappingURL=types-DJo-IRmS.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-DJo-IRmS.d.mts","names":[],"sources":["../src/source/types.ts"],"mappings":""}
|