@power-plant/core 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +220 -0
  2. package/dist/base-BKbfgxno.d.cts +28 -0
  3. package/dist/base-BKbfgxno.d.cts.map +1 -0
  4. package/dist/base-BKbfgxno.d.mts +28 -0
  5. package/dist/base-BKbfgxno.d.mts.map +1 -0
  6. package/dist/create-B14Jt6Iu.d.mts +17 -0
  7. package/dist/create-B14Jt6Iu.d.mts.map +1 -0
  8. package/dist/create-Cfgth9sz.d.cts +19 -0
  9. package/dist/create-Cfgth9sz.d.cts.map +1 -0
  10. package/dist/create-D32Jusq_.d.cts +17 -0
  11. package/dist/create-D32Jusq_.d.cts.map +1 -0
  12. package/dist/create-DVpg-3po.d.mts +19 -0
  13. package/dist/create-DVpg-3po.d.mts.map +1 -0
  14. package/dist/create-DoyLue8r.d.cts +17 -0
  15. package/dist/create-DoyLue8r.d.cts.map +1 -0
  16. package/dist/create-vgEDsShD.d.mts +17 -0
  17. package/dist/create-vgEDsShD.d.mts.map +1 -0
  18. package/dist/define-DEe-HPar.d.cts +38 -0
  19. package/dist/define-DEe-HPar.d.cts.map +1 -0
  20. package/dist/define-RneysDu1.d.mts +38 -0
  21. package/dist/define-RneysDu1.d.mts.map +1 -0
  22. package/dist/generator/create.cjs +1 -0
  23. package/dist/generator/create.d.cts +2 -0
  24. package/dist/generator/create.d.mts +2 -0
  25. package/dist/generator/create.mjs +2 -0
  26. package/dist/generator/create.mjs.map +1 -0
  27. package/dist/generator/helpers.cjs +1 -0
  28. package/dist/generator/helpers.d.cts +6 -0
  29. package/dist/generator/helpers.d.cts.map +1 -0
  30. package/dist/generator/helpers.d.mts +6 -0
  31. package/dist/generator/helpers.d.mts.map +1 -0
  32. package/dist/generator/helpers.mjs +2 -0
  33. package/dist/generator/helpers.mjs.map +1 -0
  34. package/dist/generator/index.cjs +1 -1
  35. package/dist/generator/index.d.cts +2 -20
  36. package/dist/generator/index.d.mts +2 -20
  37. package/dist/generator/index.mjs +1 -2
  38. package/dist/{generator-C5O_C4RV.d.cts → generator-C1_Q-QAb.d.cts} +15 -12
  39. package/dist/generator-C1_Q-QAb.d.cts.map +1 -0
  40. package/dist/{generator-DZI01B4_.d.mts → generator-MC25UERM.d.mts} +15 -12
  41. package/dist/generator-MC25UERM.d.mts.map +1 -0
  42. package/dist/index-BVVgDSdq.d.cts +1 -0
  43. package/dist/index-BVVgDSdq.d.mts +1 -0
  44. package/dist/index.cjs +1 -1
  45. package/dist/index.d.cts +8 -8
  46. package/dist/index.d.mts +8 -8
  47. package/dist/index.mjs +1 -1
  48. package/dist/metadata-Cb6iMZqW.cjs +1 -0
  49. package/dist/metadata-Dmhrb3Kv.mjs +2 -0
  50. package/dist/metadata-Dmhrb3Kv.mjs.map +1 -0
  51. package/dist/sink/create.cjs +1 -0
  52. package/dist/sink/create.d.cts +2 -0
  53. package/dist/sink/create.d.mts +2 -0
  54. package/dist/sink/create.mjs +2 -0
  55. package/dist/sink/create.mjs.map +1 -0
  56. package/dist/sink/define.cjs +1 -0
  57. package/dist/sink/define.d.cts +37 -0
  58. package/dist/sink/define.d.cts.map +1 -0
  59. package/dist/sink/define.d.mts +37 -0
  60. package/dist/sink/define.d.mts.map +1 -0
  61. package/dist/sink/define.mjs +2 -0
  62. package/dist/sink/define.mjs.map +1 -0
  63. package/dist/sink/helpers.cjs +1 -0
  64. package/dist/sink/helpers.d.cts +13 -0
  65. package/dist/sink/helpers.d.cts.map +1 -0
  66. package/dist/sink/helpers.d.mts +13 -0
  67. package/dist/sink/helpers.d.mts.map +1 -0
  68. package/dist/sink/helpers.mjs +2 -0
  69. package/dist/sink/helpers.mjs.map +1 -0
  70. package/dist/sink/index.cjs +1 -1
  71. package/dist/sink/index.d.cts +2 -15
  72. package/dist/sink/index.d.mts +2 -15
  73. package/dist/sink/index.mjs +1 -1
  74. package/dist/sink-CAWlC7am.d.mts +58 -0
  75. package/dist/sink-CAWlC7am.d.mts.map +1 -0
  76. package/dist/sink-CTx7UtqU.d.cts +58 -0
  77. package/dist/sink-CTx7UtqU.d.cts.map +1 -0
  78. package/dist/source/create.cjs +1 -0
  79. package/dist/source/create.d.cts +2 -0
  80. package/dist/source/create.d.mts +2 -0
  81. package/dist/source/create.mjs +2 -0
  82. package/dist/source/create.mjs.map +1 -0
  83. package/dist/source/define.cjs +1 -0
  84. package/dist/source/define.d.cts +2 -0
  85. package/dist/source/define.d.mts +2 -0
  86. package/dist/source/define.mjs +2 -0
  87. package/dist/source/define.mjs.map +1 -0
  88. package/dist/source/helpers.cjs +1 -0
  89. package/dist/source/helpers.d.cts +13 -0
  90. package/dist/source/helpers.d.cts.map +1 -0
  91. package/dist/source/helpers.d.mts +13 -0
  92. package/dist/source/helpers.d.mts.map +1 -0
  93. package/dist/source/helpers.mjs +2 -0
  94. package/dist/source/helpers.mjs.map +1 -0
  95. package/dist/source/index.cjs +1 -1
  96. package/dist/source/index.d.cts +3 -16
  97. package/dist/source/index.d.mts +3 -16
  98. package/dist/source/index.mjs +1 -1
  99. package/dist/source-B3tctCZE.d.cts +57 -0
  100. package/dist/source-B3tctCZE.d.cts.map +1 -0
  101. package/dist/source-DjKhYXZ6.d.mts +57 -0
  102. package/dist/source-DjKhYXZ6.d.mts.map +1 -0
  103. package/package.json +127 -27
  104. package/dist/config.cjs +0 -0
  105. package/dist/config.d.cts +0 -10
  106. package/dist/config.d.cts.map +0 -1
  107. package/dist/config.d.mts +0 -10
  108. package/dist/config.d.mts.map +0 -1
  109. package/dist/config.mjs +0 -2
  110. package/dist/config.mjs.map +0 -1
  111. package/dist/extract-BzZLelb2.mjs +0 -2
  112. package/dist/extract-BzZLelb2.mjs.map +0 -1
  113. package/dist/extract-DUwG1ZUO.cjs +0 -1
  114. package/dist/extract-FkKA9g1K.cjs +0 -1
  115. package/dist/extract-ZIpZAKsq.mjs +0 -2
  116. package/dist/extract-ZIpZAKsq.mjs.map +0 -1
  117. package/dist/generator/index.d.cts.map +0 -1
  118. package/dist/generator/index.d.mts.map +0 -1
  119. package/dist/generator/index.mjs.map +0 -1
  120. package/dist/generator-C5O_C4RV.d.cts.map +0 -1
  121. package/dist/generator-DZI01B4_.d.mts.map +0 -1
  122. package/dist/sink/index.d.cts.map +0 -1
  123. package/dist/sink/index.d.mts.map +0 -1
  124. package/dist/source/index.d.cts.map +0 -1
  125. package/dist/source/index.d.mts.map +0 -1
  126. package/dist/types-B2MtSxCp.d.cts +0 -47
  127. package/dist/types-B2MtSxCp.d.cts.map +0 -1
  128. package/dist/types-B2MtSxCp.d.mts +0 -47
  129. package/dist/types-B2MtSxCp.d.mts.map +0 -1
  130. package/dist/types-DJo-IRmS.d.cts +0 -47
  131. package/dist/types-DJo-IRmS.d.cts.map +0 -1
  132. package/dist/types-DJo-IRmS.d.mts +0 -47
  133. package/dist/types-DJo-IRmS.d.mts.map +0 -1
@@ -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":""}