optolith-database-schema 0.15.1 → 0.15.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.
- package/.prettierrc.yml +3 -0
- package/CHANGELOG.md +14 -0
- package/lib/cache/ancestorBloodAdvantages.d.ts +5 -0
- package/lib/cache/ancestorBloodAdvantages.js +18 -0
- package/lib/cache/newApplicationsAndUses.js +2 -1
- package/lib/config/cache.d.ts +3 -0
- package/lib/config/cache.js +3 -1
- package/lib/types/prerequisites/single/RatedSumPrerequisite.d.ts +1 -1
- package/package.json +1 -1
- package/schema/prerequisites/single/RatedSumPrerequisite.schema.json +1 -1
package/.prettierrc.yml
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.15.3](https://github.com/elyukai/optolith-database-schema/compare/v0.15.2...v0.15.3) (2024-01-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **cache:** add ancestor blood advantages list as cache ([8f06497](https://github.com/elyukai/optolith-database-schema/commit/8f0649704670264a10acd4985311345b8f80c45a))
|
|
11
|
+
|
|
12
|
+
### [0.15.2](https://github.com/elyukai/optolith-database-schema/compare/v0.15.1...v0.15.2) (2024-01-08)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* rated sum targets should only be skill identifiers ([7247292](https://github.com/elyukai/optolith-database-schema/commit/7247292c9e8f47bca7d0e96e139b77eeeaa6a08a))
|
|
18
|
+
|
|
5
19
|
### [0.15.1](https://github.com/elyukai/optolith-database-schema/compare/v0.15.0...v0.15.1) (2024-01-06)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const config = {
|
|
2
|
+
builder(database) {
|
|
3
|
+
return {
|
|
4
|
+
ids: database.advantages
|
|
5
|
+
.filter(([id, advantage]) => advantage.prerequisites?.some(p => {
|
|
6
|
+
switch (p.prerequisite.tag) {
|
|
7
|
+
case "Single":
|
|
8
|
+
return p.prerequisite.single.tag === "NoOtherAncestorBloodAdvantage";
|
|
9
|
+
case "Disjunction":
|
|
10
|
+
return p.prerequisite.disjunction.list.some(d => d.tag === "NoOtherAncestorBloodAdvantage");
|
|
11
|
+
case "Group":
|
|
12
|
+
return p.prerequisite.group.list.some(g => g.tag === "NoOtherAncestorBloodAdvantage");
|
|
13
|
+
}
|
|
14
|
+
}))
|
|
15
|
+
.map(([id]) => id),
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -39,6 +39,7 @@ export const config = {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
+
// prettier-ignore
|
|
42
43
|
const entries = [
|
|
43
44
|
[database.advancedCombatSpecialAbilities, n => ({ tag: "AdvancedCombatSpecialAbility", advanced_combat_special_ability: n })],
|
|
44
45
|
[database.advancedKarmaSpecialAbilities, n => ({ tag: "AdvancedKarmaSpecialAbility", advanced_karma_special_ability: n })],
|
|
@@ -63,5 +64,5 @@ export const config = {
|
|
|
63
64
|
});
|
|
64
65
|
});
|
|
65
66
|
return cache;
|
|
66
|
-
}
|
|
67
|
+
},
|
|
67
68
|
};
|
package/lib/config/cache.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import * as AncestorBloodAdvantages from "../cache/ancestorBloodAdvantages.js";
|
|
1
2
|
import * as NewApplicationsAndUses from "../cache/newApplicationsAndUses.js";
|
|
2
3
|
export type CacheMap = {
|
|
4
|
+
ancestorBloodAdvantages: AncestorBloodAdvantages.AncestorBloodAdvantagesCache;
|
|
3
5
|
newApplicationsAndUses: NewApplicationsAndUses.NewApplicationsAndUsesCache;
|
|
4
6
|
};
|
|
5
7
|
export declare const cacheMap: {
|
|
8
|
+
ancestorBloodAdvantages: import("../cacheConfig.js").CacheConfig<AncestorBloodAdvantages.AncestorBloodAdvantagesCache>;
|
|
6
9
|
newApplicationsAndUses: import("../cacheConfig.js").CacheConfig<NewApplicationsAndUses.NewApplicationsAndUsesCache>;
|
|
7
10
|
};
|
package/lib/config/cache.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import * as AncestorBloodAdvantages from "../cache/ancestorBloodAdvantages.js";
|
|
1
2
|
import * as NewApplicationsAndUses from "../cache/newApplicationsAndUses.js";
|
|
2
3
|
export const cacheMap = {
|
|
3
|
-
|
|
4
|
+
ancestorBloodAdvantages: AncestorBloodAdvantages.config,
|
|
5
|
+
newApplicationsAndUses: NewApplicationsAndUses.config,
|
|
4
6
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "optolith-database-schema",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
4
4
|
"description": "Definitions and utilities for the flat-file database of Optolith, a character creation tool for the Pen and Paper RPG “The Dark Eye 5”, and its external integrations into other software.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tde",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"description": "The targets that are included in calculating the sum.",
|
|
16
16
|
"type": "array",
|
|
17
17
|
"items": {
|
|
18
|
-
"$ref": "../../
|
|
18
|
+
"$ref": "../../_Identifier.schema.json#/$defs/SkillIdentifier"
|
|
19
19
|
},
|
|
20
20
|
"minItems": 2
|
|
21
21
|
},
|