@power-plant/core 0.0.3 → 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 (183) 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 -8
  60. package/dist/index.d.cts.map +1 -0
  61. package/dist/index.d.mts +101 -8
  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 -0
  81. package/dist/schema/index.d.cts +33 -0
  82. package/dist/schema/index.d.cts.map +1 -0
  83. package/dist/schema/index.d.mts +33 -0
  84. package/dist/schema/index.d.mts.map +1 -0
  85. package/dist/schema/index.mjs +1 -0
  86. package/dist/schema-DvnNqFd4.d.cts +180 -0
  87. package/dist/schema-DvnNqFd4.d.cts.map +1 -0
  88. package/dist/schema-DvnNqFd4.d.mts +180 -0
  89. package/dist/schema-DvnNqFd4.d.mts.map +1 -0
  90. package/package.json +35 -135
  91. package/dist/base-BKbfgxno.d.cts +0 -28
  92. package/dist/base-BKbfgxno.d.cts.map +0 -1
  93. package/dist/base-BKbfgxno.d.mts +0 -28
  94. package/dist/base-BKbfgxno.d.mts.map +0 -1
  95. package/dist/create-B14Jt6Iu.d.mts +0 -17
  96. package/dist/create-B14Jt6Iu.d.mts.map +0 -1
  97. package/dist/create-Cfgth9sz.d.cts +0 -19
  98. package/dist/create-Cfgth9sz.d.cts.map +0 -1
  99. package/dist/create-D32Jusq_.d.cts +0 -17
  100. package/dist/create-D32Jusq_.d.cts.map +0 -1
  101. package/dist/create-DVpg-3po.d.mts +0 -19
  102. package/dist/create-DVpg-3po.d.mts.map +0 -1
  103. package/dist/create-DoyLue8r.d.cts +0 -17
  104. package/dist/create-DoyLue8r.d.cts.map +0 -1
  105. package/dist/create-vgEDsShD.d.mts +0 -17
  106. package/dist/create-vgEDsShD.d.mts.map +0 -1
  107. package/dist/define-DEe-HPar.d.cts +0 -38
  108. package/dist/define-DEe-HPar.d.cts.map +0 -1
  109. package/dist/define-RneysDu1.d.mts +0 -38
  110. package/dist/define-RneysDu1.d.mts.map +0 -1
  111. package/dist/generator/create.cjs +0 -1
  112. package/dist/generator/create.d.cts +0 -2
  113. package/dist/generator/create.d.mts +0 -2
  114. package/dist/generator/create.mjs +0 -2
  115. package/dist/generator/create.mjs.map +0 -1
  116. package/dist/generator/helpers.cjs +0 -1
  117. package/dist/generator/helpers.d.cts +0 -6
  118. package/dist/generator/helpers.d.cts.map +0 -1
  119. package/dist/generator/helpers.d.mts +0 -6
  120. package/dist/generator/helpers.d.mts.map +0 -1
  121. package/dist/generator/helpers.mjs +0 -2
  122. package/dist/generator/helpers.mjs.map +0 -1
  123. package/dist/generator-C1_Q-QAb.d.cts +0 -60
  124. package/dist/generator-C1_Q-QAb.d.cts.map +0 -1
  125. package/dist/generator-MC25UERM.d.mts +0 -60
  126. package/dist/generator-MC25UERM.d.mts.map +0 -1
  127. package/dist/index-BVVgDSdq.d.cts +0 -1
  128. package/dist/index-BVVgDSdq.d.mts +0 -1
  129. package/dist/metadata-Cb6iMZqW.cjs +0 -1
  130. package/dist/metadata-Dmhrb3Kv.mjs +0 -2
  131. package/dist/metadata-Dmhrb3Kv.mjs.map +0 -1
  132. package/dist/sink/create.cjs +0 -1
  133. package/dist/sink/create.d.cts +0 -2
  134. package/dist/sink/create.d.mts +0 -2
  135. package/dist/sink/create.mjs +0 -2
  136. package/dist/sink/create.mjs.map +0 -1
  137. package/dist/sink/define.cjs +0 -1
  138. package/dist/sink/define.d.cts +0 -37
  139. package/dist/sink/define.d.cts.map +0 -1
  140. package/dist/sink/define.d.mts +0 -37
  141. package/dist/sink/define.d.mts.map +0 -1
  142. package/dist/sink/define.mjs +0 -2
  143. package/dist/sink/define.mjs.map +0 -1
  144. package/dist/sink/helpers.cjs +0 -1
  145. package/dist/sink/helpers.d.cts +0 -13
  146. package/dist/sink/helpers.d.cts.map +0 -1
  147. package/dist/sink/helpers.d.mts +0 -13
  148. package/dist/sink/helpers.d.mts.map +0 -1
  149. package/dist/sink/helpers.mjs +0 -2
  150. package/dist/sink/helpers.mjs.map +0 -1
  151. package/dist/sink/index.cjs +0 -1
  152. package/dist/sink/index.d.cts +0 -2
  153. package/dist/sink/index.d.mts +0 -2
  154. package/dist/sink/index.mjs +0 -1
  155. package/dist/sink-CAWlC7am.d.mts +0 -58
  156. package/dist/sink-CAWlC7am.d.mts.map +0 -1
  157. package/dist/sink-CTx7UtqU.d.cts +0 -58
  158. package/dist/sink-CTx7UtqU.d.cts.map +0 -1
  159. package/dist/source/create.cjs +0 -1
  160. package/dist/source/create.d.cts +0 -2
  161. package/dist/source/create.d.mts +0 -2
  162. package/dist/source/create.mjs +0 -2
  163. package/dist/source/create.mjs.map +0 -1
  164. package/dist/source/define.cjs +0 -1
  165. package/dist/source/define.d.cts +0 -2
  166. package/dist/source/define.d.mts +0 -2
  167. package/dist/source/define.mjs +0 -2
  168. package/dist/source/define.mjs.map +0 -1
  169. package/dist/source/helpers.cjs +0 -1
  170. package/dist/source/helpers.d.cts +0 -13
  171. package/dist/source/helpers.d.cts.map +0 -1
  172. package/dist/source/helpers.d.mts +0 -13
  173. package/dist/source/helpers.d.mts.map +0 -1
  174. package/dist/source/helpers.mjs +0 -2
  175. package/dist/source/helpers.mjs.map +0 -1
  176. package/dist/source/index.cjs +0 -1
  177. package/dist/source/index.d.cts +0 -3
  178. package/dist/source/index.d.mts +0 -3
  179. package/dist/source/index.mjs +0 -1
  180. package/dist/source-B3tctCZE.d.cts +0 -57
  181. package/dist/source-B3tctCZE.d.cts.map +0 -1
  182. package/dist/source-DjKhYXZ6.d.mts +0 -57
  183. package/dist/source-DjKhYXZ6.d.mts.map +0 -1
@@ -1,57 +0,0 @@
1
- import { t as MaybePromise } from "./base-BKbfgxno.cjs";
2
- import { InferLoadOptions, LoadInput } from "@stryke/resolve/types";
3
- import { Meta, MetaInput, SchemaInput, SchemaOf } from "@power-plant/schema/types";
4
-
5
- //#region src/types/source.d.ts
6
- type SourceFunction<TSpec, TOptions extends object> = (options: TOptions) => MaybePromise<TSpec>;
7
- interface SourceMetaInput<TSpec, TOptions extends object> extends MetaInput<TSpec> {
8
- /**
9
- * A string that describes how the specification will be extracted/generated. This property can provide context about the source of the specification, such as whether it is derived from a file, a database, an API, or any other source. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
10
- */
11
- input?: string;
12
- }
13
- interface SourceMeta<TSpec, TOptions extends object> extends Meta<TSpec> {
14
- /**
15
- * A string that describes how the specification will be extracted/generated. This property can provide context about the source of the specification, such as whether it is derived from a file, a database, an API, or any other source. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
16
- */
17
- input?: string;
18
- }
19
- interface SourceInputObject<TSpec, TOptions extends object> {
20
- /**
21
- * 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.
22
- */
23
- schema?: SchemaInput<TSpec>;
24
- /**
25
- * The source implementation, either as a callable function, a static value, or a file reference.
26
- */
27
- source: TSpec | SourceFunction<TSpec, TOptions> | LoadInput;
28
- /**
29
- * Optional metadata that provides contextual information for the source.
30
- */
31
- meta?: SourceMetaInput<TSpec, TOptions>;
32
- }
33
- type SourceInput<TSpec, TOptions extends object> = LoadInput | TSpec | SourceFunction<TSpec, TOptions> | SourceInputObject<TSpec, TOptions>;
34
- type InferCreateSourceOptions<T extends SourceInput<any, any>> = T extends LoadInput ? InferLoadOptions<T> : {};
35
- interface Source<TSpec, TOptions extends object> {
36
- /**
37
- * 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.
38
- */
39
- schema: SchemaOf<TSpec>;
40
- /**
41
- * Optional metadata that provides contextual information for the source.
42
- */
43
- meta?: SourceMeta<TSpec, TOptions>;
44
- /**
45
- * 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.
46
- *
47
- * @remarks
48
- * 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.
49
- *
50
- * @param options - The options object that can be used to influence the generation process.
51
- * @returns A value or a promise that resolves to a value, which will be used as the input data for the generator.
52
- */
53
- source: TSpec | SourceFunction<TSpec, TOptions>;
54
- }
55
- //#endregion
56
- export { SourceInputObject as a, SourceInput as i, Source as n, SourceMeta as o, SourceFunction as r, SourceMetaInput as s, InferCreateSourceOptions as t };
57
- //# sourceMappingURL=source-B3tctCZE.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-B3tctCZE.d.cts","names":[],"sources":["../src/types/source.ts"],"mappings":";;;;;KA2BY,cAAA,oCACV,OAAA,EAAS,QAAA,KACN,YAAA,CAAa,KAAA;AAAA,UAED,eAAA,yCAIP,SAAS,CAAC,KAAA;EARR;;;EAYV,KAAA;AAAA;AAAA,UAGe,UAAA,yCAIP,IAAI,CAAC,KAAA;EAjBE;;;EAqBf,KAAA;AAAA;AAAA,UAGe,iBAAA;EAxBZ;;;EA4BH,MAAA,GAAS,WAAA,CAAY,KAAA;EA1BN;;;EA+Bf,MAAA,EAAQ,KAAA,GAAQ,cAAA,CAAe,KAAA,EAAO,QAAA,IAAY,SAAA;EA9BlD;;;EAmCA,IAAA,GAAO,eAAA,CAAgB,KAAA,EAAO,QAAA;AAAA;AAAA,KAGpB,WAAA,mCACR,SAAA,GACA,KAAA,GACA,cAAA,CAAe,KAAA,EAAO,QAAA,IACtB,iBAAA,CAAkB,KAAA,EAAO,QAAA;AAAA,KAEjB,wBAAA,WAAmC,WAAA,cAC7C,CAAA,SAAU,SAAA,GACN,gBAAA,CAAiB,CAAA;AAAA,UAIN,MAAA;EAxCU;;;EA4CzB,MAAA,EAAQ,QAAA,CAAS,KAAA;EAzCjB;;;EA8CA,IAAA,GAAO,UAAA,CAAW,KAAA,EAAO,QAAA;EAzCpB;AAAA;AAGP;;;;;;;EAiDE,MAAA,EAAQ,KAAA,GAAQ,cAAA,CAAe,KAAA,EAAO,QAAA;AAAA"}
@@ -1,57 +0,0 @@
1
- import { t as MaybePromise } from "./base-BKbfgxno.mjs";
2
- import { InferLoadOptions, LoadInput } from "@stryke/resolve/types";
3
- import { Meta, MetaInput, SchemaInput, SchemaOf } from "@power-plant/schema/types";
4
-
5
- //#region src/types/source.d.ts
6
- type SourceFunction<TSpec, TOptions extends object> = (options: TOptions) => MaybePromise<TSpec>;
7
- interface SourceMetaInput<TSpec, TOptions extends object> extends MetaInput<TSpec> {
8
- /**
9
- * A string that describes how the specification will be extracted/generated. This property can provide context about the source of the specification, such as whether it is derived from a file, a database, an API, or any other source. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
10
- */
11
- input?: string;
12
- }
13
- interface SourceMeta<TSpec, TOptions extends object> extends Meta<TSpec> {
14
- /**
15
- * A string that describes how the specification will be extracted/generated. This property can provide context about the source of the specification, such as whether it is derived from a file, a database, an API, or any other source. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
16
- */
17
- input?: string;
18
- }
19
- interface SourceInputObject<TSpec, TOptions extends object> {
20
- /**
21
- * 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.
22
- */
23
- schema?: SchemaInput<TSpec>;
24
- /**
25
- * The source implementation, either as a callable function, a static value, or a file reference.
26
- */
27
- source: TSpec | SourceFunction<TSpec, TOptions> | LoadInput;
28
- /**
29
- * Optional metadata that provides contextual information for the source.
30
- */
31
- meta?: SourceMetaInput<TSpec, TOptions>;
32
- }
33
- type SourceInput<TSpec, TOptions extends object> = LoadInput | TSpec | SourceFunction<TSpec, TOptions> | SourceInputObject<TSpec, TOptions>;
34
- type InferCreateSourceOptions<T extends SourceInput<any, any>> = T extends LoadInput ? InferLoadOptions<T> : {};
35
- interface Source<TSpec, TOptions extends object> {
36
- /**
37
- * 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.
38
- */
39
- schema: SchemaOf<TSpec>;
40
- /**
41
- * Optional metadata that provides contextual information for the source.
42
- */
43
- meta?: SourceMeta<TSpec, TOptions>;
44
- /**
45
- * 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.
46
- *
47
- * @remarks
48
- * 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.
49
- *
50
- * @param options - The options object that can be used to influence the generation process.
51
- * @returns A value or a promise that resolves to a value, which will be used as the input data for the generator.
52
- */
53
- source: TSpec | SourceFunction<TSpec, TOptions>;
54
- }
55
- //#endregion
56
- export { SourceInputObject as a, SourceInput as i, Source as n, SourceMeta as o, SourceFunction as r, SourceMetaInput as s, InferCreateSourceOptions as t };
57
- //# sourceMappingURL=source-DjKhYXZ6.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-DjKhYXZ6.d.mts","names":[],"sources":["../src/types/source.ts"],"mappings":""}