@adeficior/data-modifier 1.0.0-rc.11 → 1.0.0-rc.13

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 (236) hide show
  1. package/dist/common/id.d.ts +1 -0
  2. package/dist/common/id.js +4 -0
  3. package/dist/common/id.js.map +1 -1
  4. package/dist/common/ingredient/filter.d.ts +6 -0
  5. package/dist/common/ingredient/filter.js +97 -0
  6. package/dist/common/ingredient/filter.js.map +1 -0
  7. package/dist/common/ingredient/index.d.ts +74 -0
  8. package/dist/common/ingredient/index.js +112 -0
  9. package/dist/common/ingredient/index.js.map +1 -0
  10. package/dist/common/ingredient/input.d.ts +3 -0
  11. package/dist/common/ingredient/input.js +1 -0
  12. package/dist/common/ingredient/input.js.map +1 -0
  13. package/dist/common/ingredient/serializer.d.ts +17 -0
  14. package/dist/common/ingredient/serializer.js +112 -0
  15. package/dist/common/ingredient/serializer.js.map +1 -0
  16. package/dist/common/predicates.d.ts +2 -1
  17. package/dist/common/predicates.js.map +1 -1
  18. package/dist/common/result/filter.d.ts +6 -0
  19. package/dist/common/result/filter.js +68 -0
  20. package/dist/common/result/filter.js.map +1 -0
  21. package/dist/common/result/index.d.ts +41 -0
  22. package/dist/common/result/index.js +59 -0
  23. package/dist/common/result/index.js.map +1 -0
  24. package/dist/common/result/input.d.ts +3 -0
  25. package/dist/common/result/input.js +1 -0
  26. package/dist/common/result/input.js.map +1 -0
  27. package/dist/common/result/serializer.d.ts +15 -0
  28. package/dist/common/result/serializer.js +81 -0
  29. package/dist/common/result/serializer.js.map +1 -0
  30. package/dist/common/serializable.d.ts +6 -0
  31. package/dist/common/serializable.js +1 -0
  32. package/dist/common/serializable.js.map +1 -0
  33. package/dist/common/units.d.ts +1 -0
  34. package/dist/common/units.js +2 -0
  35. package/dist/common/units.js.map +1 -0
  36. package/dist/emit/blacklist.d.ts +4 -6
  37. package/dist/emit/blacklist.js +19 -21
  38. package/dist/emit/blacklist.js.map +1 -1
  39. package/dist/emit/data/loot.d.ts +6 -7
  40. package/dist/emit/data/loot.js +14 -13
  41. package/dist/emit/data/loot.js.map +1 -1
  42. package/dist/emit/data/recipe.d.ts +18 -16
  43. package/dist/emit/data/recipe.js +28 -22
  44. package/dist/emit/data/recipe.js.map +1 -1
  45. package/dist/emit/data/tags.d.ts +1 -1
  46. package/dist/emit/data/tags.js.map +1 -1
  47. package/dist/emit/polytoneTabs.d.ts +1 -1
  48. package/dist/emit/polytoneTabs.js +1 -2
  49. package/dist/emit/polytoneTabs.js.map +1 -1
  50. package/dist/emit/rule/lootTable.d.ts +2 -1
  51. package/dist/emit/rule/lootTable.js +4 -2
  52. package/dist/emit/rule/lootTable.js.map +1 -1
  53. package/dist/emit/rule/recipe.d.ts +4 -2
  54. package/dist/emit/rule/recipe.js.map +1 -1
  55. package/dist/emit/ruled.d.ts +2 -1
  56. package/dist/emit/ruled.js +5 -2
  57. package/dist/emit/ruled.js.map +1 -1
  58. package/dist/index.d.ts +1 -4
  59. package/dist/index.js +1 -2
  60. package/dist/index.js.map +1 -1
  61. package/dist/loader/context.d.ts +12 -0
  62. package/dist/loader/context.js +1 -0
  63. package/dist/loader/context.js.map +1 -0
  64. package/dist/loader/pack.d.ts +15 -8
  65. package/dist/loader/pack.js +43 -25
  66. package/dist/loader/pack.js.map +1 -1
  67. package/dist/loader/recipe.d.ts +8 -4
  68. package/dist/loader/recipe.js +41 -47
  69. package/dist/loader/recipe.js.map +1 -1
  70. package/dist/loader/registry/dump.d.ts +0 -2
  71. package/dist/loader/registry/dump.js +0 -11
  72. package/dist/loader/registry/dump.js.map +1 -1
  73. package/dist/loader/registry/index.d.ts +0 -2
  74. package/dist/loader/registry/wrapped.d.ts +13 -0
  75. package/dist/loader/registry/wrapped.js +26 -0
  76. package/dist/loader/registry/wrapped.js.map +1 -0
  77. package/dist/loader/tags.d.ts +1 -1
  78. package/dist/loader/tags.js.map +1 -1
  79. package/dist/packFormat.d.ts +11 -0
  80. package/dist/packFormat.js +59 -0
  81. package/dist/packFormat.js.map +1 -0
  82. package/dist/parser/adAstra.d.ts +5 -11
  83. package/dist/parser/adAstra.js +5 -5
  84. package/dist/parser/adAstra.js.map +1 -1
  85. package/dist/parser/botania.d.ts +10 -20
  86. package/dist/parser/botania.js +10 -10
  87. package/dist/parser/botania.js.map +1 -1
  88. package/dist/parser/create.d.ts +2 -4
  89. package/dist/parser/create.js +2 -2
  90. package/dist/parser/create.js.map +1 -1
  91. package/dist/parser/index.d.ts +6 -12
  92. package/dist/parser/index.js +6 -6
  93. package/dist/parser/index.js.map +1 -1
  94. package/dist/parser/lootTable.d.ts +7 -6
  95. package/dist/parser/lootTable.js +25 -23
  96. package/dist/parser/lootTable.js.map +1 -1
  97. package/dist/parser/recipe/adAstra/conversion.d.ts +15 -14
  98. package/dist/parser/recipe/adAstra/conversion.js +26 -19
  99. package/dist/parser/recipe/adAstra/conversion.js.map +1 -1
  100. package/dist/parser/recipe/adAstra/hammering.d.ts +3 -17
  101. package/dist/parser/recipe/adAstra/hammering.js +2 -25
  102. package/dist/parser/recipe/adAstra/hammering.js.map +1 -1
  103. package/dist/parser/recipe/adAstra/inputOutput.d.ts +16 -19
  104. package/dist/parser/recipe/adAstra/inputOutput.js +37 -29
  105. package/dist/parser/recipe/adAstra/inputOutput.js.map +1 -1
  106. package/dist/parser/recipe/adAstra/nasaWorkbench.d.ts +3 -19
  107. package/dist/parser/recipe/adAstra/nasaWorkbench.js +2 -28
  108. package/dist/parser/recipe/adAstra/nasaWorkbench.js.map +1 -1
  109. package/dist/parser/recipe/adAstra/spaceStation.d.ts +15 -14
  110. package/dist/parser/recipe/adAstra/spaceStation.js +33 -14
  111. package/dist/parser/recipe/adAstra/spaceStation.js.map +1 -1
  112. package/dist/parser/recipe/botania/apothecary.d.ts +17 -14
  113. package/dist/parser/recipe/botania/apothecary.js +26 -17
  114. package/dist/parser/recipe/botania/apothecary.js.map +1 -1
  115. package/dist/parser/recipe/botania/blocks.d.ts +21 -0
  116. package/dist/parser/recipe/botania/blocks.js +77 -0
  117. package/dist/parser/recipe/botania/blocks.js.map +1 -0
  118. package/dist/parser/recipe/botania/brew.d.ts +13 -12
  119. package/dist/parser/recipe/botania/brew.js +16 -11
  120. package/dist/parser/recipe/botania/brew.js.map +1 -1
  121. package/dist/parser/recipe/botania/elvenTrade.d.ts +8 -13
  122. package/dist/parser/recipe/botania/elvenTrade.js +11 -22
  123. package/dist/parser/recipe/botania/elvenTrade.js.map +1 -1
  124. package/dist/parser/recipe/botania/gogWrapper.d.ts +12 -12
  125. package/dist/parser/recipe/botania/gogWrapper.js +12 -13
  126. package/dist/parser/recipe/botania/gogWrapper.js.map +1 -1
  127. package/dist/parser/recipe/botania/manaInfusion.d.ts +18 -15
  128. package/dist/parser/recipe/botania/manaInfusion.js +29 -21
  129. package/dist/parser/recipe/botania/manaInfusion.js.map +1 -1
  130. package/dist/parser/recipe/botania/nbtWrapper.d.ts +12 -12
  131. package/dist/parser/recipe/botania/nbtWrapper.js +10 -11
  132. package/dist/parser/recipe/botania/nbtWrapper.js.map +1 -1
  133. package/dist/parser/recipe/botania/orechid.d.ts +3 -30
  134. package/dist/parser/recipe/botania/orechid.js +2 -72
  135. package/dist/parser/recipe/botania/orechid.js.map +1 -1
  136. package/dist/parser/recipe/botania/pureDaisy.d.ts +3 -18
  137. package/dist/parser/recipe/botania/pureDaisy.js +2 -28
  138. package/dist/parser/recipe/botania/pureDaisy.js.map +1 -1
  139. package/dist/parser/recipe/botania/runicAltar.d.ts +8 -13
  140. package/dist/parser/recipe/botania/runicAltar.js +11 -22
  141. package/dist/parser/recipe/botania/runicAltar.js.map +1 -1
  142. package/dist/parser/recipe/botania/terraPlate.d.ts +4 -16
  143. package/dist/parser/recipe/botania/terraPlate.js +2 -25
  144. package/dist/parser/recipe/botania/terraPlate.js.map +1 -1
  145. package/dist/parser/recipe/create/assembly.d.ts +18 -17
  146. package/dist/parser/recipe/create/assembly.js +27 -27
  147. package/dist/parser/recipe/create/assembly.js.map +1 -1
  148. package/dist/parser/recipe/create/processing.d.ts +4 -16
  149. package/dist/parser/recipe/create/processing.js +2 -25
  150. package/dist/parser/recipe/create/processing.js.map +1 -1
  151. package/dist/parser/recipe/farmersdelight/cooking.d.ts +16 -12
  152. package/dist/parser/recipe/farmersdelight/cooking.js +27 -15
  153. package/dist/parser/recipe/farmersdelight/cooking.js.map +1 -1
  154. package/dist/parser/recipe/farmersdelight/cutting.d.ts +14 -14
  155. package/dist/parser/recipe/farmersdelight/cutting.js +32 -29
  156. package/dist/parser/recipe/farmersdelight/cutting.js.map +1 -1
  157. package/dist/parser/recipe/forge/conditional.d.ts +10 -10
  158. package/dist/parser/recipe/forge/conditional.js +13 -17
  159. package/dist/parser/recipe/forge/conditional.js.map +1 -1
  160. package/dist/parser/recipe/index.d.ts +21 -12
  161. package/dist/parser/recipe/index.js +10 -3
  162. package/dist/parser/recipe/index.js.map +1 -1
  163. package/dist/parser/recipe/ingredientMap.d.ts +12 -0
  164. package/dist/parser/recipe/ingredientMap.js +17 -0
  165. package/dist/parser/recipe/ingredientMap.js.map +1 -0
  166. package/dist/parser/recipe/manyToMany.d.ts +20 -0
  167. package/dist/parser/recipe/manyToMany.js +33 -0
  168. package/dist/parser/recipe/manyToMany.js.map +1 -0
  169. package/dist/parser/recipe/manyToOne.d.ts +20 -0
  170. package/dist/parser/recipe/manyToOne.js +33 -0
  171. package/dist/parser/recipe/manyToOne.js.map +1 -0
  172. package/dist/parser/recipe/oneToOne.d.ts +20 -0
  173. package/dist/parser/recipe/oneToOne.js +33 -0
  174. package/dist/parser/recipe/oneToOne.js.map +1 -0
  175. package/dist/parser/recipe/roots/component.d.ts +13 -12
  176. package/dist/parser/recipe/roots/component.js +16 -11
  177. package/dist/parser/recipe/roots/component.js.map +1 -1
  178. package/dist/parser/recipe/roots/ritual.d.ts +14 -15
  179. package/dist/parser/recipe/roots/ritual.js +18 -25
  180. package/dist/parser/recipe/roots/ritual.js.map +1 -1
  181. package/dist/parser/recipe/sullys/polishing.d.ts +4 -16
  182. package/dist/parser/recipe/sullys/polishing.js +2 -25
  183. package/dist/parser/recipe/sullys/polishing.js.map +1 -1
  184. package/dist/parser/recipe/thermal/catalyst.d.ts +13 -12
  185. package/dist/parser/recipe/thermal/catalyst.js +16 -11
  186. package/dist/parser/recipe/thermal/catalyst.js.map +1 -1
  187. package/dist/parser/recipe/thermal/fuel.d.ts +13 -12
  188. package/dist/parser/recipe/thermal/fuel.js +17 -11
  189. package/dist/parser/recipe/thermal/fuel.js.map +1 -1
  190. package/dist/parser/recipe/thermal/index.d.ts +16 -14
  191. package/dist/parser/recipe/thermal/index.js +35 -24
  192. package/dist/parser/recipe/thermal/index.js.map +1 -1
  193. package/dist/parser/recipe/thermal/ingredient.d.ts +4 -21
  194. package/dist/parser/recipe/thermal/ingredient.js +40 -33
  195. package/dist/parser/recipe/thermal/ingredient.js.map +1 -1
  196. package/dist/parser/recipe/thermal/treeExtraction.d.ts +17 -17
  197. package/dist/parser/recipe/thermal/treeExtraction.js +29 -30
  198. package/dist/parser/recipe/thermal/treeExtraction.js.map +1 -1
  199. package/dist/parser/recipe/vanilla/shaped.d.ts +17 -13
  200. package/dist/parser/recipe/vanilla/shaped.js +21 -16
  201. package/dist/parser/recipe/vanilla/shaped.js.map +1 -1
  202. package/dist/parser/recipe/vanilla/shapeless.d.ts +3 -17
  203. package/dist/parser/recipe/vanilla/shapeless.js +2 -25
  204. package/dist/parser/recipe/vanilla/shapeless.js.map +1 -1
  205. package/dist/parser/recipe/vanilla/smelting.d.ts +16 -13
  206. package/dist/parser/recipe/vanilla/smelting.js +21 -15
  207. package/dist/parser/recipe/vanilla/smelting.js.map +1 -1
  208. package/dist/parser/recipe/vanilla/smithing.d.ts +18 -14
  209. package/dist/parser/recipe/vanilla/smithing.js +25 -16
  210. package/dist/parser/recipe/vanilla/smithing.js.map +1 -1
  211. package/dist/parser/recipe/vanilla/stonecutting.d.ts +15 -13
  212. package/dist/parser/recipe/vanilla/stonecutting.js +22 -24
  213. package/dist/parser/recipe/vanilla/stonecutting.js.map +1 -1
  214. package/dist/parser/roots.d.ts +2 -4
  215. package/dist/parser/roots.js +2 -2
  216. package/dist/parser/roots.js.map +1 -1
  217. package/dist/parser/thermal.d.ts +4 -10
  218. package/dist/parser/thermal.js +4 -5
  219. package/dist/parser/thermal.js.map +1 -1
  220. package/dist/schema/data/recipe.d.ts +2 -1
  221. package/package.json +3 -2
  222. package/dist/common/ingredient.d.ts +0 -49
  223. package/dist/common/ingredient.js +0 -108
  224. package/dist/common/ingredient.js.map +0 -1
  225. package/dist/common/result.d.ts +0 -48
  226. package/dist/common/result.js +0 -37
  227. package/dist/common/result.js.map +0 -1
  228. package/dist/parser/recipe/adAstra/index.d.ts +0 -5
  229. package/dist/parser/recipe/adAstra/index.js +0 -1
  230. package/dist/parser/recipe/adAstra/index.js.map +0 -1
  231. package/dist/parser/recipe/ignored.d.ts +0 -10
  232. package/dist/parser/recipe/ignored.js +0 -16
  233. package/dist/parser/recipe/ignored.js.map +0 -1
  234. package/dist/parser/recipe/quark/exclusion.d.ts +0 -20
  235. package/dist/parser/recipe/quark/exclusion.js +0 -32
  236. package/dist/parser/recipe/quark/exclusion.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"cooking.js","sourceRoot":"","sources":["../../../../src/parser/recipe/farmersdelight/cooking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAQlD,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAYnD,MAAM,OAAO,aAAc,SAAQ,MAA+B;IAChE,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CACvE,MAAM,CACP,CAAC;IACJ,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,CAA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er } from "../index.js";
2
- import RecipeParser, { Recipe } from "../index.js";
3
- import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
1
+ import type { Ingredient } from "../../../common/ingredient/index.js";
2
+ import type { Result } from "../../../common/result/index.js";
4
3
  import type { RecipeDefinition } from "../../../schema/data/recipe.js";
5
- import type { Result, ResultInput } from "../../../common/result.js";
4
+ import RecipeParser, { type RecipeParseContext, type Replacer } from "../index.js";
5
+ import { ManyToManyRecipe, type ManyToManyRecipeDefinition } from "../manyToMany.js";
6
6
  export type ToolInput = Readonly<{
7
7
  type: "farmersdelight:tool_action";
8
8
  action: string;
9
9
  }>;
10
- export type CuttingRecipeDefinition = RecipeDefinition & Readonly<{
11
- ingredients: Ingredient[];
12
- result: Result[];
13
- tool: Ingredient | ToolInput;
10
+ export type CuttingRecipeDefinition = Omit<ManyToManyRecipeDefinition, "results"> & Readonly<{
11
+ tool: unknown;
12
+ result: ManyToManyRecipeDefinition["results"];
14
13
  }>;
15
- export declare class CuttingRecipe extends Recipe<CuttingRecipeDefinition> {
16
- getIngredients(): IngredientInput[];
17
- getResults(): ResultInput[];
18
- replaceIngredient(replace: Replacer<Ingredient>): Recipe;
19
- replaceResult(replace: Replacer<Result>): Recipe;
14
+ export declare class CuttingRecipe extends ManyToManyRecipe {
15
+ private readonly tool;
16
+ constructor(definition: RecipeDefinition, ingredients: Ingredient[], results: Result[], tool: Ingredient);
17
+ getIngredients(): Ingredient[];
18
+ replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): CuttingRecipe;
19
+ serialize(context: RecipeParseContext): Partial<CuttingRecipeDefinition>;
20
20
  }
21
21
  export default class CuttingRecipeParser extends RecipeParser<CuttingRecipeDefinition, CuttingRecipe> {
22
- create(definition: CuttingRecipeDefinition): CuttingRecipe;
22
+ deserialize(definition: CuttingRecipeDefinition, context: RecipeParseContext): CuttingRecipe;
23
23
  }
@@ -1,38 +1,41 @@
1
- import RecipeParser, { Recipe } from "../index.js";
2
- function isToolInput(input) {
3
- return (!!input &&
4
- typeof input === "object" &&
5
- "type" in input &&
6
- input.type === "farmersdelight:tool_action");
7
- }
8
- export class CuttingRecipe extends Recipe {
9
- getIngredients() {
10
- if (isToolInput(this.definition.tool))
11
- return this.definition.ingredients;
12
- return [...this.definition.ingredients, this.definition.tool];
1
+ import RecipeParser, {} from "../index.js";
2
+ import { ManyToManyRecipe, } from "../manyToMany.js";
3
+ // TODO create actual input
4
+ // function isToolInput<T>(input: T | ToolInput): input is ToolInput {
5
+ // return (
6
+ // !!input &&
7
+ // typeof input === "object" &&
8
+ // "type" in input &&
9
+ // input.type === "farmersdelight:tool_action"
10
+ // );
11
+ // }
12
+ export class CuttingRecipe extends ManyToManyRecipe {
13
+ tool;
14
+ constructor(definition, ingredients, results, tool) {
15
+ super(definition, ingredients, results);
16
+ this.tool = tool;
13
17
  }
14
- getResults() {
15
- return this.definition.result;
18
+ getIngredients() {
19
+ return [...super.getIngredients(), this.tool];
16
20
  }
17
- replaceIngredient(replace) {
18
- return new CuttingRecipe({
19
- ...this.definition,
20
- ingredients: this.definition.ingredients.map(replace),
21
- tool: isToolInput(this.definition.tool)
22
- ? this.definition.tool
23
- : replace(this.definition.tool),
24
- });
21
+ replace(ingredientReplacer, resultReplacer) {
22
+ return new CuttingRecipe(this.definition, this.ingredients.map(ingredientReplacer), this.results.map(resultReplacer), ingredientReplacer(this.tool));
25
23
  }
26
- replaceResult(replace) {
27
- return new CuttingRecipe({
28
- ...this.definition,
29
- result: this.definition.result.map(replace),
30
- });
24
+ serialize(context) {
25
+ const { results, ...rest } = super.serialize(context);
26
+ return {
27
+ ...rest,
28
+ result: results,
29
+ tool: context.ingredients.serialize(this.tool),
30
+ };
31
31
  }
32
32
  }
33
33
  export default class CuttingRecipeParser extends RecipeParser {
34
- create(definition) {
35
- return new CuttingRecipe(definition);
34
+ deserialize(definition, context) {
35
+ const ingredients = context.ingredients.createList(definition.ingredients);
36
+ const result = context.results.createList(definition.result);
37
+ const tool = context.ingredients.create(definition.tool);
38
+ return new CuttingRecipe(definition, ingredients, result, tool);
36
39
  }
37
40
  }
38
41
  //# sourceMappingURL=cutting.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cutting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/farmersdelight/cutting.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAoBnD,SAAS,WAAW,CAAI,KAAoB;IAC1C,OAAO,CACL,CAAC,CAAC,KAAK;QACP,OAAO,KAAK,KAAK,QAAQ;QACzB,MAAM,IAAI,KAAK;QACf,KAAK,CAAC,IAAI,KAAK,4BAA4B,CAC5C,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,aAAc,SAAQ,MAA+B;IAChE,cAAc;QACZ,IAAI,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;QAC1E,OAAO,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAChE,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAChC,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,aAAa,CAAC;YACvB,GAAG,IAAI,CAAC,UAAU;YAClB,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC;YACrD,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;gBACrC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI;gBACtB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;SAClC,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,OAAO,IAAI,aAAa,CAAC;YACvB,GAAG,IAAI,C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AG,IAAI,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACtD,OAAO;YACL,GAAG,IAAI;YACP,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;SAC/C,CAAC;IACJ,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,YAGhD;IACC,WAAW,CACT,UAAmC,EACnC,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3E,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACzD,OAAO,IAAI,aAAa,CAAC,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAClE,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
- import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
2
- import type { Result, ResultInput } from "../../../common/result.js";
1
+ import type { Ingredient } from "../../../common/ingredient/index.js";
2
+ import type { Result } from "../../../common/result/index.js";
3
3
  import type { RecipeDefinition } from "../../../schema/data/recipe.js";
4
- import type { InlineRecipeParser, Replacer } from "../index.js";
4
+ import type { RecipeParseContext, Replacer } from "../index.js";
5
5
  import RecipeParser, { Recipe } from "../index.js";
6
6
  type WithConditions<T> = {
7
7
  conditions: unknown[];
@@ -10,16 +10,16 @@ type WithConditions<T> = {
10
10
  export type ForgeConditionalRecipeDefinition = RecipeDefinition & Readonly<{
11
11
  recipes: WithConditions<RecipeDefinition>[];
12
12
  }>;
13
- export declare class ForgeConditionalRecipe extends Recipe<ForgeConditionalRecipeDefinition> {
13
+ export declare class ForgeConditionalRecipe extends Recipe {
14
14
  private readonly recipes;
15
- constructor(definition: Omit<ForgeConditionalRecipeDefinition, "recipes">, recipes: WithConditions<Recipe>[]);
16
- getIngredients(): IngredientInput[];
17
- getResults(): ResultInput[];
18
- replaceIngredient(replace: Replacer<Ingredient>): Recipe;
19
- replaceResult(replace: Replacer<Result>): Recipe;
15
+ constructor(definition: RecipeDefinition, recipes: WithConditions<Recipe>[]);
16
+ getIngredients(): Ingredient[];
17
+ getResults(): Result[];
18
+ replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): ForgeConditionalRecipe;
19
+ serialize(context: RecipeParseContext): Partial<ForgeConditionalRecipeDefinition>;
20
20
  getTypes(): string[];
21
21
  }
22
22
  export default class ForgeConditionalRecipeParser extends RecipeParser<ForgeConditionalRecipeDefinition, ForgeConditionalRecipe> {
23
- create(definition: ForgeConditionalRecipeDefinition, parser: InlineRecipeParser): ForgeConditionalRecipe;
23
+ deserialize(definition: ForgeConditionalRecipeDefinition, context: RecipeParseContext): ForgeConditionalRecipe;
24
24
  }
25
25
  export {};
@@ -2,13 +2,7 @@ import RecipeParser, { Recipe } from "../index.js";
2
2
  export class ForgeConditionalRecipe extends Recipe {
3
3
  recipes;
4
4
  constructor(definition, recipes) {
5
- super({
6
- ...definition,
7
- recipes: recipes.map((it) => ({
8
- conditions: it.conditions,
9
- recipe: it.recipe.toJSON(),
10
- })),
11
- });
5
+ super(definition);
12
6
  this.recipes = recipes;
13
7
  }
14
8
  getIngredients() {
@@ -17,27 +11,29 @@ export class ForgeConditionalRecipe extends Recipe {
17
11
  getResults() {
18
12
  return this.recipes.flatMap((it) => it.recipe.getResults());
19
13
  }
20
- replaceIngredient(replace) {
14
+ replace(ingredientReplacer, resultReplacer) {
21
15
  return new ForgeConditionalRecipe(this.definition, this.recipes.map((it) => ({
22
16
  ...it,
23
- recipe: it.recipe.replaceIngredient(replace),
17
+ recipe: it.recipe.replace(ingredientReplacer, resultReplacer),
24
18
  })));
25
19
  }
26
- replaceResult(replace) {
27
- return new ForgeConditionalRecipe(this.definition, this.recipes.map((it) => ({
28
- ...it,
29
- recipe: it.recipe.replaceResult(replace),
30
- })));
20
+ serialize(context) {
21
+ return {
22
+ recipes: this.recipes.map((it) => ({
23
+ ...it,
24
+ recipe: context.recipes.serialize(it.recipe),
25
+ })),
26
+ };
31
27
  }
32
28
  getTypes() {
33
- return this.definition.recipes.map((it) => it.recipe.type);
29
+ return this.recipes.flatMap((it) => it.recipe.getTypes());
34
30
  }
35
31
  }
36
32
  export default class ForgeConditionalRecipeParser extends RecipeParser {
37
- create(definition, parser) {
33
+ deserialize(definition, context) {
38
34
  const recipes = definition.recipes.map((it) => ({
39
35
  conditions: it.conditions,
40
- recipe: parser(it.recipe),
36
+ recipe: context.recipes.deserialize(it.recipe),
41
37
  }));
42
38
  return new ForgeConditionalRecipe(definition, recipes);
43
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"conditional.js","sourceRoot":"","sources":["../../../../src/parser/recipe/forge/conditional.ts"],"names":[],"mappings":"AAOA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAYnD,MAAM,OAAO,sBAAuB,SAAQ,MAAwC;IAG/D;IAFnB,YACE,UAA6D,EAC5C,OAAiC;QAElD,KAAK,CAAC;YACJ,GAAG,UAAU;YACb,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC5B,UAAU,EAAE,EAAE,CAAC,UAAU;gBACzB,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE;aAC3B,CAAC,CAAC;SACJ,CAAC,CAAC;QARc,YAAO,GAAP,OAAO,CAA0B;IASpD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,UAAU;QACR,O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OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,YAGzD;IACU,WAAW,CAClB,UAA4C,EAC5C,OAA2B;QAE3B,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,CAAyB,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YACtE,UAAU,EAAE,EAAE,CAAC,UAAU;YACzB,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,MAAM,CAAC;SAC/C,CAAC,CAAC,CAAC;QAEJ,OAAO,IAAI,sBAAsB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF"}
@@ -1,19 +1,28 @@
1
- import type { Ingredient, IngredientInput, Predicate } from "../../common/ingredient.js";
2
- import type { Result, ResultInput } from "../../common/result.js";
1
+ import type { Ingredient } from "../../common/ingredient/index.js";
2
+ import type { Predicate } from "../../common/predicates.js";
3
+ import type { Result } from "../../common/result/index.js";
4
+ import type { PackContext } from "../../loader/context.js";
3
5
  import type { RecipeDefinition } from "../../schema/data/recipe.js";
4
6
  export type Replacer<T> = (value: T) => T;
5
7
  export declare function createReplacer<T>(from: Predicate<T>, to: T): Replacer<T>;
6
- export declare abstract class Recipe<TDefinition extends RecipeDefinition = RecipeDefinition> {
7
- protected readonly definition: TDefinition;
8
- constructor(definition: TDefinition);
9
- abstract getIngredients(): IngredientInput[];
10
- abstract replaceIngredient(replace: Replacer<Ingredient>): Recipe;
11
- abstract getResults(): ResultInput[];
12
- abstract replaceResult(replace: Replacer<Result>): Recipe;
13
- toJSON(): TDefinition;
8
+ export declare abstract class Recipe {
9
+ readonly definition: RecipeDefinition;
10
+ constructor(definition: RecipeDefinition);
11
+ abstract getIngredients(): Ingredient[];
12
+ replaceIngredient(replace: Replacer<Ingredient>): Recipe;
13
+ abstract getResults(): Result[];
14
+ replaceResult(replace: Replacer<Result>): Recipe;
15
+ abstract replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): Recipe;
14
16
  getTypes(): string[];
17
+ abstract serialize(context: RecipeParseContext): Partial<RecipeDefinition>;
15
18
  }
16
- export type InlineRecipeParser = <TDefinition extends RecipeDefinition>(definition: TDefinition) => Recipe<TDefinition>;
19
+ export type RecipeSerializer = {
20
+ deserialize(definition: RecipeDefinition): Recipe;
21
+ serialize(recipe: Recipe): RecipeDefinition;
22
+ };
23
+ export type RecipeParseContext = Pick<PackContext, "ingredients" | "results"> & {
24
+ recipes: RecipeSerializer;
25
+ };
17
26
  export default abstract class RecipeParser<TDefinition extends RecipeDefinition, TRecipe extends Recipe> {
18
- abstract create(definition: TDefinition, parse: InlineRecipeParser): TRecipe;
27
+ abstract deserialize(definition: TDefinition, context: RecipeParseContext): TRecipe;
19
28
  }
@@ -5,16 +5,23 @@ export function createReplacer(from, to) {
5
5
  return it;
6
6
  };
7
7
  }
8
+ function keep() {
9
+ return (t) => t;
10
+ }
8
11
  export class Recipe {
9
12
  definition;
13
+ // TODO would be pretty cool if this could go await
10
14
  constructor(definition) {
11
15
  this.definition = definition;
12
16
  }
13
- toJSON() {
14
- return this.definition;
17
+ replaceIngredient(replace) {
18
+ return this.replace(replace, keep());
19
+ }
20
+ replaceResult(replace) {
21
+ return this.replace(keep(), replace);
15
22
  }
16
23
  getTypes() {
17
- return [this.toJSON().type];
24
+ return [this.definition.type];
18
25
  }
19
26
  }
20
27
  export default class RecipeParser {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/parser/recipe/index.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,cAAc,CAAI,IAAkB,EAAE,EAAK;IACzD,OAAO,CAAC,EAAK,EAAE,EAAE;QACf,IAAI,IAAI,CAAC,EAAE,CAAC;YAAE,OAAO,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,OAAgB,MAAM;IAGK;IAA/B,YAA+B,UAAuB;QAAvB,eAAU,GAAV,UAAU,CAAa;IAAG,CAAC;IAU1D,MAAM;QACJ,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF;AAMD,MAAM,CAAC,OAAO,OAAgB,YAAY;CAKzC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/parser/recipe/index.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,cAAc,CAAI,IAAkB,EAAE,EAAK;IACzD,OAAO,CAAC,EAAK,EAAE,EAAE;QACf,IAAI,IAAI,CAAC,EAAE,CAAC;YAAE,OAAO,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,IAAI;IACX,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,OAAgB,MAAM;IAEE;IAD5B,mDAAmD;IACnD,YAA4B,UAA4B;QAA5B,eAAU,GAAV,UAAU,CAAkB;IAAG,CAAC;IAI5D,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IACvC,CAAC;IAID,aAAa,CAAC,OAAyB;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;IAOD,QAAQ;QACN,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CAGF;AAcD,MAAM,CAAC,OAAO,OAAgB,YAAY;CAQzC"}
@@ -0,0 +1,12 @@
1
+ import type { RecipeParseContext, Replacer } from ".";
2
+ import type { Ingredient } from "../../common/ingredient";
3
+ export type IngredientMapInput = Record<string, unknown>;
4
+ export declare class IngredientMap {
5
+ private readonly ingredients;
6
+ constructor(ingredients: Record<string, Ingredient>);
7
+ list(): Ingredient[];
8
+ replace(replace: Replacer<Ingredient>): IngredientMap;
9
+ serialize(context: RecipeParseContext): {
10
+ [x: string]: unknown;
11
+ };
12
+ }
@@ -0,0 +1,17 @@
1
+ import { mapValues } from "lodash-es";
2
+ export class IngredientMap {
3
+ ingredients;
4
+ constructor(ingredients) {
5
+ this.ingredients = ingredients;
6
+ }
7
+ list() {
8
+ return Object.values(this.ingredients);
9
+ }
10
+ replace(replace) {
11
+ return new IngredientMap(mapValues(this.ingredients, replace));
12
+ }
13
+ serialize(context) {
14
+ return mapValues(this.ingredients, (it) => context.ingredients.serialize(it));
15
+ }
16
+ }
17
+ //# sourceMappingURL=ingredientMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ingredientMap.js","sourceRoot":"","sources":["../../../src/parser/recipe/ingredientMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAMtC,MAAM,OAAO,aAAa;IACK;IAA7B,YAA6B,WAAuC;QAAvC,gBAAW,GAAX,WAAW,CAA4B;IAAG,CAAC;IAExE,IAAI;QACF,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,CAAC,OAA6B;QACnC,OAAO,IAAI,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;IACjE,CAAC;IAED,SAAS,CAAC,OAA2B;QACnC,OAAO,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CACxC,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC,CAClC,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ import type { Ingredient } from "../../common/ingredient/index.js";
2
+ import type { Result } from "../../common/result/index.js";
3
+ import type { RecipeDefinition } from "../../schema/data/recipe.js";
4
+ import RecipeParser, { Recipe, type RecipeParseContext, type Replacer } from "./index.js";
5
+ export type ManyToManyRecipeDefinition = RecipeDefinition & Readonly<{
6
+ ingredients: unknown[];
7
+ results: unknown[];
8
+ }>;
9
+ export declare class ManyToManyRecipe extends Recipe {
10
+ protected readonly ingredients: Ingredient[];
11
+ protected readonly results: Result[];
12
+ constructor(definition: RecipeDefinition, ingredients: Ingredient[], results: Result[]);
13
+ getIngredients(): Ingredient[];
14
+ getResults(): Result[];
15
+ replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): ManyToManyRecipe;
16
+ serialize(context: RecipeParseContext): Partial<ManyToManyRecipeDefinition>;
17
+ }
18
+ export declare class ManyToManyRecipeParser<TDefinition extends ManyToManyRecipeDefinition> extends RecipeParser<TDefinition, ManyToManyRecipe> {
19
+ deserialize(definition: TDefinition, context: RecipeParseContext): ManyToManyRecipe;
20
+ }
@@ -0,0 +1,33 @@
1
+ import RecipeParser, { Recipe, } from "./index.js";
2
+ export class ManyToManyRecipe extends Recipe {
3
+ ingredients;
4
+ results;
5
+ constructor(definition, ingredients, results) {
6
+ super(definition);
7
+ this.ingredients = ingredients;
8
+ this.results = results;
9
+ }
10
+ getIngredients() {
11
+ return this.ingredients;
12
+ }
13
+ getResults() {
14
+ return this.results;
15
+ }
16
+ replace(ingredientReplacer, resultReplacer) {
17
+ return new ManyToManyRecipe(this.definition, this.ingredients.map(ingredientReplacer), this.results.map(resultReplacer));
18
+ }
19
+ serialize(context) {
20
+ return {
21
+ results: context.results.serializeList(this.results),
22
+ ingredients: context.ingredients.serializeList(this.ingredients),
23
+ };
24
+ }
25
+ }
26
+ export class ManyToManyRecipeParser extends RecipeParser {
27
+ deserialize(definition, context) {
28
+ const ingredients = context.ingredients.createList(definition.ingredients);
29
+ const results = context.results.createList(definition.results);
30
+ return new ManyToManyRecipe(definition, ingredients, results);
31
+ }
32
+ }
33
+ //# sourceMappingURL=manyToMany.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manyToMany.js","sourceRoot":"","sources":["../../../src/parser/recipe/manyToMany.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EACnB,MAAM,GAGP,MAAM,YAAY,CAAC;AAQpB,MAAM,OAAO,gBAAiB,SAAQ,MAAM;IAGrB;IACA;IAHrB,YACE,UAA4B,EACT,WAAyB,EACzB,OAAiB;QAEpC,KAAK,CAAC,UAAU,CAAC,CAAC;QAHC,gBAAW,GAAX,WAAW,CAAc;QACzB,YAAO,GAAP,OAAO,CAAU;IAGtC,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAEQ,OAAO,CACd,kBAAwC,EACxC,cAAgC;QAEhC,OAAO,IAAI,gBAAgB,CACzB,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,kBAAkB,CAAC,EACxC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CACjC,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC;YACpD,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;SACjE,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,sBAEX,SAAQ,YAA2C;IACnD,WAAW,CACT,UAAuB,EACvB,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3E,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC/D,OAAO,IAAI,gBAAgB,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ import type { Ingredient } from "../../common/ingredient/index.js";
2
+ import type { Result } from "../../common/result/index.js";
3
+ import type { RecipeDefinition } from "../../schema/data/recipe.js";
4
+ import RecipeParser, { Recipe, type RecipeParseContext, type Replacer } from "./index.js";
5
+ export type ManyToOneRecipeDefinition = RecipeDefinition & Readonly<{
6
+ ingredients: unknown[];
7
+ result: unknown;
8
+ }>;
9
+ export declare class ManyToOneRecipe extends Recipe {
10
+ protected readonly ingredients: Ingredient[];
11
+ protected readonly result: Result;
12
+ constructor(definition: RecipeDefinition, ingredients: Ingredient[], result: Result);
13
+ getIngredients(): Ingredient[];
14
+ getResults(): Result[];
15
+ replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): ManyToOneRecipe;
16
+ serialize(context: RecipeParseContext): Partial<ManyToOneRecipeDefinition>;
17
+ }
18
+ export declare class ManyToOneRecipeParser<TDefinition extends ManyToOneRecipeDefinition> extends RecipeParser<TDefinition, ManyToOneRecipe> {
19
+ deserialize(definition: TDefinition, context: RecipeParseContext): ManyToOneRecipe;
20
+ }
@@ -0,0 +1,33 @@
1
+ import RecipeParser, { Recipe, } from "./index.js";
2
+ export class ManyToOneRecipe extends Recipe {
3
+ ingredients;
4
+ result;
5
+ constructor(definition, ingredients, result) {
6
+ super(definition);
7
+ this.ingredients = ingredients;
8
+ this.result = result;
9
+ }
10
+ getIngredients() {
11
+ return this.ingredients;
12
+ }
13
+ getResults() {
14
+ return [this.result];
15
+ }
16
+ replace(ingredientReplacer, resultReplacer) {
17
+ return new ManyToOneRecipe(this.definition, this.ingredients.map(ingredientReplacer), resultReplacer(this.result));
18
+ }
19
+ serialize(context) {
20
+ return {
21
+ result: context.results.serialize(this.result),
22
+ ingredients: context.ingredients.serializeList(this.ingredients),
23
+ };
24
+ }
25
+ }
26
+ export class ManyToOneRecipeParser extends RecipeParser {
27
+ deserialize(definition, context) {
28
+ const ingredients = context.ingredients.createList(definition.ingredients);
29
+ const result = context.results.create(definition.result);
30
+ return new ManyToOneRecipe(definition, ingredients, result);
31
+ }
32
+ }
33
+ //# sourceMappingURL=manyToOne.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manyToOne.js","sourceRoot":"","sources":["../../../src/parser/recipe/manyToOne.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EACnB,MAAM,GAGP,MAAM,YAAY,CAAC;AAQpB,MAAM,OAAO,eAAgB,SAAQ,MAAM;IAGpB;IACA;IAHrB,YACE,UAA4B,EACT,WAAyB,EACzB,MAAc;QAEjC,KAAK,CAAC,UAAU,CAAC,CAAC;QAHC,gBAAW,GAAX,WAAW,CAAc;QACzB,WAAM,GAAN,MAAM,CAAQ;IAGnC,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,CACd,kBAAwC,EACxC,cAAgC;QAEhC,OAAO,IAAI,eAAe,CACxB,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,kBAAkB,CAAC,EACxC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAC5B,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;YAC9C,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;SACjE,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,qBAEX,SAAQ,YAA0C;IAClD,WAAW,CACT,UAAuB,EACvB,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3E,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,eAAe,CAAC,UAAU,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ import type { Ingredient } from "../../common/ingredient/index.js";
2
+ import type { Result } from "../../common/result/index.js";
3
+ import type { RecipeDefinition } from "../../schema/data/recipe.js";
4
+ import RecipeParser, { Recipe, type RecipeParseContext, type Replacer } from "./index.js";
5
+ export type OneToOneRecipeDefinition = RecipeDefinition & Readonly<{
6
+ ingredient: unknown;
7
+ result: unknown;
8
+ }>;
9
+ export declare class OneToOneRecipe extends Recipe {
10
+ protected readonly ingredient: Ingredient;
11
+ protected readonly result: Result;
12
+ constructor(definition: RecipeDefinition, ingredient: Ingredient, result: Result);
13
+ getIngredients(): Ingredient[];
14
+ getResults(): Result[];
15
+ replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): OneToOneRecipe;
16
+ serialize(context: RecipeParseContext): Partial<OneToOneRecipeDefinition>;
17
+ }
18
+ export declare class OneToOneRecipeParser<TDefinition extends OneToOneRecipeDefinition> extends RecipeParser<TDefinition, OneToOneRecipe> {
19
+ deserialize(definition: TDefinition, context: RecipeParseContext): OneToOneRecipe;
20
+ }
@@ -0,0 +1,33 @@
1
+ import RecipeParser, { Recipe, } from "./index.js";
2
+ export class OneToOneRecipe extends Recipe {
3
+ ingredient;
4
+ result;
5
+ constructor(definition, ingredient, result) {
6
+ super(definition);
7
+ this.ingredient = ingredient;
8
+ this.result = result;
9
+ }
10
+ getIngredients() {
11
+ return [this.ingredient];
12
+ }
13
+ getResults() {
14
+ return [this.result];
15
+ }
16
+ replace(ingredientReplacer, resultReplacer) {
17
+ return new OneToOneRecipe(this.definition, ingredientReplacer(this.ingredient), resultReplacer(this.result));
18
+ }
19
+ serialize(context) {
20
+ return {
21
+ result: context.results.serialize(this.result),
22
+ ingredient: context.ingredients.serialize(this.ingredient),
23
+ };
24
+ }
25
+ }
26
+ export class OneToOneRecipeParser extends RecipeParser {
27
+ deserialize(definition, context) {
28
+ const ingredient = context.ingredients.create(definition.ingredient);
29
+ const result = context.results.create(definition.result);
30
+ return new OneToOneRecipe(definition, ingredient, result);
31
+ }
32
+ }
33
+ //# sourceMappingURL=oneToOne.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oneToOne.js","sourceRoot":"","sources":["../../../src/parser/recipe/oneToOne.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EACnB,MAAM,GAGP,MAAM,YAAY,CAAC;AAQpB,MAAM,OAAO,cAAe,SAAQ,MAAM;IAGnB;IACA;IAHrB,YACE,UAA4B,EACT,UAAsB,EACtB,MAAc;QAEjC,KAAK,CAAC,UAAU,CAAC,CAAC;QAHC,eAAU,GAAV,UAAU,CAAY;QACtB,WAAM,GAAN,MAAM,CAAQ;IAGnC,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3B,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,CACd,kBAAwC,EACxC,cAAgC;QAEhC,OAAO,IAAI,cAAc,CACvB,IAAI,CAAC,UAAU,EACf,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,EACnC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAC5B,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;YAC9C,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;SAC3D,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,oBAEX,SAAQ,YAAyC;IACjD,WAAW,CACT,UAAuB,EACvB,OAA2B;QAE3B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,cAAc,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;CACF"}
@@ -1,18 +1,19 @@
1
- import type { Replacer } from "../index.js";
2
- import RecipeParser, { Recipe } from "../index.js";
3
- import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
1
+ import type { Ingredient } from "../../../common/ingredient/index.js";
4
2
  import type { RecipeDefinition } from "../../../schema/data/recipe.js";
5
- import type { ResultInput } from "../../../common/result.js";
3
+ import type { RecipeParseContext, Replacer } from "../index.js";
4
+ import RecipeParser, { Recipe } from "../index.js";
6
5
  export type RootComponentRecipeDefinition = RecipeDefinition & Readonly<{
7
6
  effect: string;
8
- ingredients: Ingredient[];
7
+ ingredients: unknown[];
9
8
  }>;
10
- export declare class RootComponentRecipe extends Recipe<RootComponentRecipeDefinition> {
11
- getIngredients(): IngredientInput[];
12
- getResults(): ResultInput[];
13
- replaceIngredient(replace: Replacer<Ingredient>): Recipe;
14
- replaceResult(): RootComponentRecipe;
9
+ export declare class RootComponentRecipe extends Recipe {
10
+ private readonly ingredients;
11
+ constructor(definition: RecipeDefinition, ingredients: Ingredient[]);
12
+ getIngredients(): Ingredient[];
13
+ getResults(): never[];
14
+ replace(ingredientReplacer: Replacer<Ingredient>): RootComponentRecipe;
15
+ serialize(context: RecipeParseContext): Partial<RootComponentRecipeDefinition>;
15
16
  }
16
- export default class RootComponentRecipeParser extends RecipeParser<RootComponentRecipeDefinition, RootComponentRecipe> {
17
- create(definition: RootComponentRecipeDefinition): RootComponentRecipe;
17
+ export declare class RootComponentRecipeParser extends RecipeParser<RootComponentRecipeDefinition, RootComponentRecipe> {
18
+ deserialize(definition: RootComponentRecipeDefinition, context: RecipeParseContext): RootComponentRecipe;
18
19
  }
@@ -1,24 +1,29 @@
1
1
  import RecipeParser, { Recipe } from "../index.js";
2
2
  export class RootComponentRecipe extends Recipe {
3
+ ingredients;
4
+ constructor(definition, ingredients) {
5
+ super(definition);
6
+ this.ingredients = ingredients;
7
+ }
3
8
  getIngredients() {
4
- return this.definition.ingredients;
9
+ return this.ingredients;
5
10
  }
6
11
  getResults() {
7
12
  return [];
8
13
  }
9
- replaceIngredient(replace) {
10
- return new RootComponentRecipe({
11
- ...this.definition,
12
- ingredients: this.definition.ingredients.map(replace),
13
- });
14
+ replace(ingredientReplacer) {
15
+ return new RootComponentRecipe(this.definition, this.ingredients.map(ingredientReplacer));
14
16
  }
15
- replaceResult() {
16
- return new RootComponentRecipe(this.definition);
17
+ serialize(context) {
18
+ return {
19
+ ingredients: context.ingredients.serializeList(this.ingredients),
20
+ };
17
21
  }
18
22
  }
19
- export default class RootComponentRecipeParser extends RecipeParser {
20
- create(definition) {
21
- return new RootComponentRecipe(definition);
23
+ export class RootComponentRecipeParser extends RecipeParser {
24
+ deserialize(definition, context) {
25
+ const ingredients = context.ingredients.createList(definition.ingredients);
26
+ return new RootComponentRecipe(definition, ingredients);
22
27
  }
23
28
  }
24
29
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/parser/recipe/roots/component.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAcnD,MAAM,OAAO,mBAAoB,SAAQ,MAAqC;IAC5E,cAAc;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;IACrC,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,iBAAiB,CAAC,OAA6B;Q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