@adeficior/data-modifier-botania 2.0.0-rc.20260816171656 → 2.0.0

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.
@@ -0,0 +1,14 @@
1
+ import type { IdInput, NormalizedId } from "@adeficior/data-modifier-core";
2
+ import type { IngredientInput, IngredientSerializer, ResultInput, ResultSerializer } from "@adeficior/data-modifier-ingredients";
3
+ import type { RecipeEmitter } from "@adeficior/data-modifier-recipes";
4
+ export type BotaniaRecipeHelper = {
5
+ manaInfusion(id: IdInput, ingredient: IngredientInput, result: ResultInput): NormalizedId;
6
+ manaInfusion(ingredient: IngredientInput, result: ResultInput): NormalizedId;
7
+ };
8
+ export declare class BotaniaRecipeHelperImpl implements BotaniaRecipeHelper {
9
+ private readonly emitter;
10
+ private readonly ingredients;
11
+ private readonly results;
12
+ constructor(emitter: RecipeEmitter, ingredients: IngredientSerializer, results: ResultSerializer);
13
+ readonly manaInfusion: BotaniaRecipeHelper["manaInfusion"];
14
+ }
package/dist/helper.js ADDED
@@ -0,0 +1,18 @@
1
+ import { createResultId, withDefaultId, } from "@adeficior/data-modifier-recipes/helper";
2
+ import { ManaInfusionRecipe } from "./serializer/manaInfusion";
3
+ export class BotaniaRecipeHelperImpl {
4
+ emitter;
5
+ ingredients;
6
+ results;
7
+ constructor(emitter, ingredients, results) {
8
+ this.emitter = emitter;
9
+ this.ingredients = ingredients;
10
+ this.results = results;
11
+ }
12
+ manaInfusion = withDefaultId((id, ingredientInput, resultInput) => {
13
+ const ingredients = this.ingredients.deserialize(ingredientInput);
14
+ const result = this.results.deserialize(resultInput);
15
+ return this.emitter.add(id ?? createResultId(result), "botania:mana_infusion", new ManaInfusionRecipe(ingredients, result));
16
+ });
17
+ }
18
+ //# sourceMappingURL=helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,cAAc,EACd,aAAa,GACd,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAW/D,MAAM,OAAO,uBAAuB;IAEf;IACA;IACA;IAHnB,YACmB,OAAsB,EACtB,WAAiC,EACjC,OAAyB;QAFzB,YAAO,GAAP,OAAO,CAAe;QACtB,gBAAW,GAAX,WAAW,CAAsB;QACjC,YAAO,GAAP,OAAO,CAAkB;IACzC,CAAC;IAEK,YAAY,GAAwC,aAAa,CACxE,CACE,EAAkB,EAClB,eAAgC,EAChC,WAAwB,EACxB,EAAE;QACF,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;QAClE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAErD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CACrB,EAAE,IAAI,cAAc,CAAC,MAAM,CAAC,EAC5B,uBAAuB,EACvB,IAAI,kBAAkB,CAAC,WAAW,EAAE,MAAM,CAAC,CAC5C,CAAC;IACJ,CAAC,CACF,CAAC;CACH"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export type { BotaniaRecipeHelper } from "./helper";
1
2
  export { default } from "./module";
2
3
  export * from "./serializer/apothecary";
3
4
  export * from "./serializer/blocks";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC"}
package/dist/module.d.ts CHANGED
@@ -1,2 +1,7 @@
1
- declare const _default: import("@adeficior/data-modifier-core").ModuleConfig<import("@adeficior/data-modifier-core").ModuleTypes>;
1
+ import type { BotaniaRecipeHelper } from "./helper";
2
+ declare const _default: import("@adeficior/data-modifier-core").ModuleConfig<{
3
+ services: {
4
+ "helper:recipes:botania": BotaniaRecipeHelper;
5
+ };
6
+ }>;
2
7
  export default _default;
package/dist/module.js CHANGED
@@ -1,13 +1,21 @@
1
1
  import { defineModule } from "@adeficior/data-modifier-core";
2
2
  import { name } from "../package.json";
3
+ import { BotaniaRecipeHelperImpl } from "./helper";
3
4
  import { registerSerializers } from "./registration";
4
5
  export default defineModule({
5
6
  importModule: name,
6
7
  dependencies: {
7
8
  "@adeficior/data-modifier-recipes": "required",
8
9
  },
10
+ types: {
11
+ services: {
12
+ "helper:recipes:botania": "BotaniaRecipeHelper",
13
+ },
14
+ },
15
+ promote: [{ service: "helper:recipes:botania", key: "recipes.botania" }],
9
16
  setup: (pack) => {
10
17
  pack.hook("recipes:register-serializer", registerSerializers);
18
+ pack.service("helper:recipes:botania", (container) => new BotaniaRecipeHelperImpl(container.get("emitter:recipes"), container.get("serializer:ingredients"), container.get("serializer:results")));
11
19
  },
12
20
  });
13
21
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,eAAe,YAAY,CAAC;IAC1B,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE;QACZ,kCAAkC,EAAE,UAAU;KAC/C;IACD,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE;QACd,IAAI,CAAC,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC;IAChE,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,eAAe,YAAY,CAIxB;IACD,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE;QACZ,kCAAkC,EAAE,UAAU;KAC/C;IACD,KAAK,EAAE;QACL,QAAQ,EAAE;YACR,wBAAwB,EAAE,qBAAqB;SAChD;KACF;IACD,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC;IACxE,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE;QACd,IAAI,CAAC,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC;QAE9D,IAAI,CAAC,OAAO,CACV,wBAAwB,EACxB,CAAC,SAAS,EAAE,EAAE,CACZ,IAAI,uBAAuB,CACzB,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAChC,SAAS,CAAC,GAAG,CAAC,wBAAwB,CAAC,EACvC,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,CACpC,CACJ,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,23 +1,22 @@
1
1
  {
2
2
  "name": "@adeficior/data-modifier-botania",
3
3
  "description": "data-modifier module adding compatibility for botania",
4
- "version": "2.0.0-rc.20260816171656",
4
+ "version": "2.0.0",
5
5
  "exports": { ".": "./dist/index.js" },
6
- "types": "./dist/index.d.ts",
7
- "files": ["dist"],
8
6
  "type": "module",
9
- "devDependencies": {
10
- "@adeficior/data-modifier-recipes": "^2.0.0-rc.20260816171656"
11
- },
7
+ "devDependencies": { "@adeficior/data-modifier-recipes": "^2.0.0" },
12
8
  "peerDependencies": {
13
- "@adeficior/pack-resolver": "^2.0.0",
9
+ "@adeficior/pack-resolver": "^2.0.1",
14
10
  "typescript": "^5",
15
11
  "zod": "^4.4.3",
16
- "@adeficior/data-modifier-core": "^2.0.0-rc.20260816171656",
17
- "@adeficior/data-modifier-recipes": "^2.0.0-rc.20260816171656",
18
- "@adeficior/data-modifier-ingredients": "^2.0.0-rc.20260816171656",
19
- "@adeficior/data-modifier-tags": "^2.0.0-rc.20260816171656"
12
+ "@adeficior/data-modifier-core": "^2.0.0",
13
+ "@adeficior/data-modifier-recipes": "^2.0.0",
14
+ "@adeficior/data-modifier-ingredients": "^2.0.0",
15
+ "@adeficior/data-modifier-tags": "^2.0.0"
20
16
  },
17
+ "typesVersions": { "*": {} },
18
+ "types": "./dist/index.d.ts",
19
+ "files": ["dist"],
21
20
  "bugs": { "url": "https://github.com/Adeficior/DataModifier/issues" },
22
21
  "homepage": "https://github.com/Adeficior/DataModifier#readme",
23
22
  "license": "LGPL-3.0-or-later",