build: add linting and formatting

Add configuration and CI checks as well as fix any linting and
formatting issues reported.
This commit is contained in:
Lukas Obermann
2025-11-30 21:27:30 +01:00
parent 9d2dc029c2
commit a2fdcdb06e
149 changed files with 1693 additions and 333 deletions
+2 -2
View File
@@ -28,6 +28,6 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
# - run: npm run lint
# - run: npm run format:check
- run: npm run lint
- run: npm run format:check
- run: npm test
+86
View File
@@ -0,0 +1,86 @@
import js from "@eslint/js"
import { defineConfig, globalIgnores } from "eslint/config"
import globals from "globals"
import tseslint from "typescript-eslint"
export default defineConfig([
globalIgnores([
"**/gen/",
"**/lib/",
"src/{cache,config,helpers,rendering}/**/*",
"tsondb.config.{js,mjs,cjs,ts,mts,cts}",
]),
{
files: [
"src/**/*.{js,mjs,cjs,ts,mts,cts}"
],
plugins: {
js,
},
extends: ["js/recommended"],
},
{
files: [
"src/**/*.{js,mjs,cjs,ts,mts,cts}"
],
languageOptions: {
globals: {
...globals.node,
},
},
},
{
ignores: [
"eslint.config.js",
],
extends: tseslint.configs.strictTypeChecked,
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "all",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
"@typescript-eslint/consistent-type-exports": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-empty-object-type": [
"error",
{
allowInterfaces: "with-single-extends",
},
],
"@typescript-eslint/no-namespace": [
"error",
{
allowDeclarations: true,
},
],
"@typescript-eslint/prefer-promise-reject-errors": [
"error",
{
allowThrowingUnknown: true,
}
],
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/no-array-constructor": "off",
},
},
// {
// files: ["test/**/*.{js,mjs,cjs,ts,mts,cts}"],
// rules: {
// "@typescript-eslint/no-floating-promises": "off",
// }
// },
])
+1291 -5
View File
File diff suppressed because it is too large Load Diff
+11 -3
View File
@@ -28,9 +28,12 @@
},
"scripts": {
"build": "tsc",
"generate": "tsondb generate",
"watch": "tsc -w",
"generate": "tsondb generate",
"test": "node ./lib/test.js",
"lint": "eslint",
"format": "prettier \"src/{types/**/*.{ts,tsx},*.{ts,tsx}}\" --write",
"format:check": "prettier \"src/{types/**/*.{ts,tsx},*.{ts,tsx}}\" --check",
"release": "commit-and-tag-version",
"release:sign": "commit-and-tag-version --sign --signoff"
},
@@ -38,13 +41,18 @@
"license": "MPL-2.0",
"dependencies": {
"@optolith/helpers": "^0.2.2",
"tsondb": "^0.12.6",
"tsondb": "^0.12.7",
"yaml": "^2.8.1"
},
"devDependencies": {
"@eslint/js": "^9.39.1",
"@types/node": "^24.10.1",
"commit-and-tag-version": "^12.6.0",
"typescript": "^5.9.3"
"eslint": "^9.39.1",
"globals": "^16.5.0",
"prettier": "^3.7.3",
"typescript": "^5.9.3",
"typescript-eslint": "^8.48.0"
},
"repository": "github:elyukai/optolith-database-schema",
"bugs": {
+1 -1
View File
@@ -1,4 +1,4 @@
import { ValidResults } from "./main.js"
import { ValidResults } from "../main.js"
export type CacheConfig<T, D extends unknown[] = []> = {
builder: (data: ValidResults, ...deps: D) => T
+5 -5
View File
@@ -1,6 +1,6 @@
import { filterNonNullable } from "@optolith/helpers/array"
import { collator } from "./helpers/i18n.js"
import { TypeValidationError } from "./main.js"
import { TypeValidationError } from "../main.js"
import { collator } from "./i18n.js"
import { IntegrityError } from "./validation/builders/integrity.js"
import { FileNameError } from "./validation/builders/naming.js"
@@ -25,7 +25,7 @@ export type PrintOptions = {
*/
export const printErrors = (
errorsByFile: Record<string, TypeValidationError[]>,
printOptions: PrintOptions = {}
printOptions: PrintOptions = {},
): string => {
const { verbose = false } = printOptions
@@ -38,13 +38,13 @@ export const printErrors = (
...errors
.filter(
(error): error is IntegrityError | FileNameError =>
error.keyword === "integrity" || error.keyword === "filename"
error.keyword === "integrity" || error.keyword === "filename",
)
.map(printVerboseError(filePath)),
...(errors.some(error => error.keyword !== "integrity" && error.keyword !== "filename")
? [errorMessageBlock([filePath], "has schema errors")]
: []),
]
],
)
.join("\n\n")
}
+1 -1
View File
@@ -158,7 +158,7 @@ export const schema = Schema(
Types.Weapon,
Types.ZibiljaRitual,
],
Types.Locale
Types.Locale,
)
// /**
+1 -1
View File
@@ -59,7 +59,7 @@ export const Advantage = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -14,7 +14,7 @@ export const AnimalType = Entity(import.meta.url, {
comment: "The animal types name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -21,7 +21,7 @@ export const Aspect = Entity(import.meta.url, {
minLength: 1,
}),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -23,7 +23,7 @@ export const Attribute = Entity(import.meta.url, {
comment: "The description of the attribute.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+2 -2
View File
@@ -57,7 +57,7 @@ export const Blessing = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -118,7 +118,7 @@ const IndefiniteBlessingDuration = TypeAlias(import.meta.url, {
comment: "A description of the duration.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
})
+3 -3
View File
@@ -76,7 +76,7 @@ export const Cantrip = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -138,7 +138,7 @@ const CommonCantripTraditionNote = TypeAlias(import.meta.url, {
comment: "A note, appended to the generated string in parenthesis.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
})
@@ -203,7 +203,7 @@ const IndefiniteCantripDuration = TypeAlias(import.meta.url, {
comment: "A description of the duration.",
type: IncludeIdentifier(ResponsiveText),
}),
})
}),
),
}),
})
+1 -1
View File
@@ -96,7 +96,7 @@ export const Ceremony = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
enhancements: Required({
type: ChildEntities(Enhancement),
+2 -2
View File
@@ -54,7 +54,7 @@ export const CloseCombatTechnique = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -114,7 +114,7 @@ export const RangedCombatTechnique = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -39,7 +39,7 @@ export const Condition = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -16,7 +16,7 @@ export const Continent = Entity(import.meta.url, {
comment: "The continent name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+9 -9
View File
@@ -66,28 +66,28 @@ export const Culture = Entity(import.meta.url, {
comment: "A list of common advantages.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [AdvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
common_disadvantages: Optional({
comment: "A list of common disadvantages.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [DisadvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
uncommon_advantages: Optional({
comment: "A list of uncommon advantages.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [AdvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
uncommon_disadvantages: Optional({
comment: "A list of uncommon disadvantages.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [DisadvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
common_skills: Required({
@@ -138,7 +138,7 @@ export const Culture = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -333,7 +333,7 @@ const GroupedCommonProfessions = TypeAlias(import.meta.url, {
]),
}),
},
{ minProperties: 1 }
{ minProperties: 1 },
),
})
@@ -420,7 +420,7 @@ const CommonNames = TypeAlias(import.meta.url, {
type: String({ minLength: 1 }),
}),
},
{ minProperties: 1 }
{ minProperties: 1 },
),
})
@@ -442,7 +442,7 @@ const CommonNameGroup = TypeAlias(import.meta.url, {
type: Array(IncludeIdentifier(CommonName), { minItems: 1 }),
}),
},
{ minProperties: 1 }
{ minProperties: 1 },
),
})
@@ -459,6 +459,6 @@ const CommonName = TypeAlias(import.meta.url, {
type: String({ minLength: 1 }),
}),
},
{ minProperties: 1 }
{ minProperties: 1 },
),
})
+1 -1
View File
@@ -36,7 +36,7 @@ export const DerivedCharacteristic = Entity(import.meta.url, {
comment: "Possible calculation strings for the final value.",
type: IncludeIdentifier(CalculationTranslation),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -69,7 +69,7 @@ export const Disadvantage = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -14,7 +14,7 @@ export const Element = Entity(import.meta.url, {
comment: "The elements name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -43,7 +43,7 @@ export const ExperienceLevel = Entity(import.meta.url, {
comment: "The experience levels name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -14,7 +14,7 @@ export const EyeColor = Entity(import.meta.url, {
comment: "The eye colors name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+4 -4
View File
@@ -72,7 +72,7 @@ If no animal types are given, the animal disease applies to all animal types.`,
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -98,7 +98,7 @@ const IndefiniteFamiliarsTrickProperty = TypeAlias(import.meta.url, {
comment: "A description of the property.",
type: IncludeIdentifier(ResponsiveText),
}),
})
}),
),
}),
})
@@ -164,8 +164,8 @@ const FamiliarsTrickFixedOneTimeCost = TypeAlias(import.meta.url, {
type: IncludeIdentifier(ResponsiveTextOptional),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
+1 -1
View File
@@ -14,7 +14,7 @@ export const HairColor = Entity(import.meta.url, {
comment: "The hair colors name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+4 -4
View File
@@ -42,7 +42,7 @@ export const Guideline = Entity(import.meta.url, {
comment: "The guidelines name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
@@ -83,7 +83,7 @@ export const Curriculum = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -200,10 +200,10 @@ export const LessonPackage = Entity(import.meta.url, {
"The spell values difference of the lesson package. Use this field to specify a text that is displayed instead of the generated `spellwork_changes` list. The field is displayed even if no list is present.",
type: String({ minLength: 1 }),
}),
})
}),
),
},
{ minProperties: 3 }
{ minProperties: 3 },
),
parentReferenceKey: "curriculum",
displayName: {},
+1 -1
View File
@@ -96,7 +96,7 @@ export const LiturgicalChant = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
enhancements: Required({
type: ChildEntities(Enhancement),
+6 -6
View File
@@ -1,15 +1,15 @@
import {
Boolean,
Entity,
MemberDecl,
type MemberDecl,
NestedEntityMap,
Object,
ObjectType,
type ObjectType,
Optional,
Required,
String,
TranslationObject,
Type,
type Type,
} from "tsondb/schema/def"
export const Locale = Entity(import.meta.url, {
@@ -1380,8 +1380,8 @@ export const Locale = Entity(import.meta.url, {
export const NestedTranslationMap = <
Name extends string,
T extends Record<string, MemberDecl<Type, boolean>>,
R extends boolean
T extends Record<string, MemberDecl>,
R extends boolean,
>(
MemberDeclCreator: <T extends Type>(options: {
comment?: string
@@ -1389,7 +1389,7 @@ export const NestedTranslationMap = <
type: T
}) => MemberDecl<T, R>,
entityName: Name,
type: ObjectType<T>
type: ObjectType<T>,
) =>
MemberDeclCreator({
comment: "All translations for the entry, identified by IETF language tag (BCP47).",
+1 -1
View File
@@ -41,7 +41,7 @@ export const MetaCondition = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+3 -3
View File
@@ -37,7 +37,7 @@ export const PactCategory = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -60,7 +60,7 @@ export const PactType = Entity(import.meta.url, {
comment: "The types name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
parentReferenceKey: "parent",
@@ -84,7 +84,7 @@ export const PactDomain = Entity(import.meta.url, {
comment: "The domains name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
parentReferenceKey: "parent",
+1 -1
View File
@@ -83,7 +83,7 @@ export const Patron = Entity(import.meta.url, {
comment: "The patrons name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -20,7 +20,7 @@ export const PatronCategory = Entity(import.meta.url, {
comment: "The patron categorys name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -50,7 +50,7 @@ export const PersonalityTrait = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+19 -21
View File
@@ -70,7 +70,7 @@ export const Profession = Entity(import.meta.url, {
const [firstProfessionVersion, ...otherProfessionVersions] = getChildInstancesForInstanceId(
Profession.name,
instanceId,
ProfessionVersion.name
ProfessionVersion.name,
)
if (!firstProfessionVersion) {
@@ -87,7 +87,7 @@ export const Profession = Entity(import.meta.url, {
return {
...displayName,
name: `${displayName.name} (+${otherProfessionVersions.length} version${
name: `${displayName.name} (+${otherProfessionVersions.length.toString()} version${
otherProfessionVersions.length > 1 ? "s" : ""
})`,
}
@@ -146,14 +146,14 @@ export const ProfessionVersion = Entity(import.meta.url, {
comment: "A list of typical advantages.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [AdvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
suggested_disadvantages: Optional({
comment: "A list of typical disadvantages.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [DisadvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
unsuitable_advantages: Optional({
@@ -161,7 +161,7 @@ export const ProfessionVersion = Entity(import.meta.url, {
"A list of advantages that do not fit well with this profession; to be checked with the GM before taking any of them.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [AdvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
unsuitable_disadvantages: Optional({
@@ -169,7 +169,7 @@ export const ProfessionVersion = Entity(import.meta.url, {
"A list of disadvantages that do not fit well with this profession; to be checked with the GM before taking any of them.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [DisadvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
src,
@@ -207,7 +207,7 @@ export const ProfessionVersion = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
parentReferenceKey: "profession",
@@ -216,17 +216,15 @@ export const ProfessionVersion = Entity(import.meta.url, {
pathInLocaleMap: "name.default",
},
displayNameCustomizer: ({ instance, instanceId, locales }) => {
if (typeof instance.translations === "object" && instance.translations !== null) {
const translations = Object.entries(instance.translations)
for (const locale of locales) {
const translation = translations.find(([key]) => key === locale)
if (translation) {
const [, value] = translation
return {
name:
value.name.default + (value.specification ? ` (${value.specification.default})` : ""),
localeId: locale,
}
const translations = Object.entries(instance.translations)
for (const locale of locales) {
const translation = translations.find(([key]) => key === locale)
if (translation) {
const [, value] = translation
return {
name:
value.name.default + (value.specification ? ` (${value.specification.default})` : ""),
localeId: locale,
}
}
}
@@ -377,7 +375,7 @@ export const ProfessionVariant = Entity(import.meta.url, {
comment: `A text that is appended to the generated text for the profession variant.`,
type: String({ minLength: 1 }),
}),
})
}),
),
}),
parentReferenceKey: "profession_package",
@@ -581,7 +579,7 @@ const ProfessionPackageOptions = TypeAlias(import.meta.url, {
type: IncludeIdentifier(SkillsOptions),
}),
},
{ minProperties: 1 }
{ minProperties: 1 },
),
})
@@ -622,7 +620,7 @@ const ProfessionVariantPackageOptions = TypeAlias(import.meta.url, {
type: GenIncludeIdentifier(VariantOptionAction, [IncludeIdentifier(SkillsOptions)]),
}),
},
{ minProperties: 1 }
{ minProperties: 1 },
),
})
+1 -1
View File
@@ -20,7 +20,7 @@ export const Property = Entity(import.meta.url, {
comment: "The propertys name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+9 -9
View File
@@ -57,14 +57,14 @@ export const Race = Entity(import.meta.url, {
comment: "A list of strongly recommended advantages.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [AdvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
strongly_recommended_disadvantages: Optional({
comment: "A list of strongly recommended disadvantages.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [DisadvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
weight: Required({
@@ -125,7 +125,7 @@ export const Race = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -174,7 +174,7 @@ The array only permits a single entry because no race specified more than one se
}),
}),
},
{ minProperties: 1 }
{ minProperties: 1 },
),
})
@@ -291,28 +291,28 @@ export const RaceVariant = Entity(import.meta.url, {
comment: "A list of common advantages.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [AdvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
common_disadvantages: Optional({
comment: "A list of common disadvantages.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [DisadvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
uncommon_advantages: Optional({
comment: "A list of uncommon advantages.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [AdvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
uncommon_disadvantages: Optional({
comment: "A list of uncommon disadvantages.",
type: Array(
GenIncludeIdentifier(CommonnessRatedAdvantageDisadvantage, [DisadvantageIdentifier()]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
hair_color: Optional({
@@ -354,7 +354,7 @@ export const RaceVariant = Entity(import.meta.url, {
comment: "The respective uncommon disadvantages text from the source book.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
parentReferenceKey: "race",
+1 -1
View File
@@ -14,7 +14,7 @@ export const Region = Entity(import.meta.url, {
comment: "The regions name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -95,7 +95,7 @@ export const Ritual = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
enhancements: Required({
type: ChildEntities(Enhancement),
+1 -1
View File
@@ -41,7 +41,7 @@ export const Service = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -33,7 +33,7 @@ export const SexPractice = Entity(import.meta.url, {
comment: "Effects of a failed *Seduction* check.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+2 -2
View File
@@ -89,7 +89,7 @@ export const Skill = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -138,7 +138,7 @@ export const SkillApplication = Entity(import.meta.url, {
comment: "The skill applications name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
parentReferenceKey: "parent",
+1 -1
View File
@@ -23,7 +23,7 @@ export const SkillGroup = Entity(import.meta.url, {
comment: "The skill groups long name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+7 -9
View File
@@ -45,19 +45,17 @@ export const SkillModificationLevel = Entity(import.meta.url, {
type: IncludeIdentifier(LevelTypeConfigTranslation),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
displayName: null,
displayNameCustomizer: ({ instance, locales }) => ({
name: `${(instance.fast as any).casting_time} Act. / ${
(instance.slow as any).casting_time.value
} ${(instance.slow as any).casting_time.unit.kind} (fast/slow) — ${
(instance.fast as any).range === (instance.slow as any).range
? (instance.fast as any).range
: (instance.fast as any).range + "/" + (instance.slow as any).range + " (fast/slow)"
} m — ${(instance.fast as any).cost}/${(instance.slow as any).cost} (fast/slow) AE or KP`,
name: `${instance.fast.casting_time.toString()} Act. / ${instance.slow.casting_time.value.toString()} ${instance.slow.casting_time.unit.kind} (fast/slow) — ${
instance.fast.range === instance.slow.range
? instance.fast.range.toString()
: `${instance.fast.range.toString()}/${instance.slow.range.toString()} (fast/slow)`
} m — ${instance.fast.cost.toString()}/${instance.slow.cost.toString()} (fast/slow) AE or KP`,
localeId: locales[0],
}),
})
+1 -1
View File
@@ -19,7 +19,7 @@ export const SocialStatus = Entity(import.meta.url, {
comment: "The social status name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -95,7 +95,7 @@ export const Spell = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
enhancements: Required({
type: ChildEntities(Enhancement),
+1 -1
View File
@@ -24,7 +24,7 @@ export const State = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -53,7 +53,7 @@ export const Talisman = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -19,7 +19,7 @@ export const TargetCategory = Entity(import.meta.url, {
comment: "The target categorys name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+38 -55
View File
@@ -12,6 +12,7 @@ import {
GenEnum,
GenIncludeIdentifier,
GenTypeAlias,
getAnyEnumCaseValue,
IncludeIdentifier,
Integer,
Object,
@@ -19,7 +20,7 @@ import {
Param,
Required,
String,
Type,
type Type,
TypeAlias,
TypeArgument,
} from "tsondb/schema/def"
@@ -93,7 +94,7 @@ Note that this is only a full definition of options for simple logic that can be
type: IncludeIdentifier(SelectOptionCategory),
}),
},
{ minProperties: 1 }
{ minProperties: 1 },
),
})
@@ -171,7 +172,7 @@ export const GeneralSelectOption = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
parentReferenceKey: "parent",
@@ -183,7 +184,9 @@ export const GeneralSelectOption = Entity(import.meta.url, {
getDisplayNameForInstanceId,
}) => ({
name: `${
getDisplayNameForInstanceId((instance as any).parent[(instance as any).parent.kind])?.name
instanceDisplayName.length > 0
? instanceDisplayName
: (getDisplayNameForInstanceId(getAnyEnumCaseValue(instance.parent))?.name ?? "")
}${instanceDisplayName}`,
localeId: instanceDisplayNameLocaleId,
}),
@@ -227,8 +230,8 @@ const ExplicitSkillSelectOption = TypeAlias(import.meta.url, {
type: IncludeIdentifier(Errata),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -264,8 +267,8 @@ const ExplicitCombatTechniqueSelectOption = TypeAlias(import.meta.url, {
type: IncludeIdentifier(Errata),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -457,7 +460,7 @@ export const NewSkillApplication = Entity(import.meta.url, {
comment: "The name of the application if different from the activatable entrys name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
parentReferenceKey: "parent",
@@ -468,10 +471,10 @@ export const NewSkillApplication = Entity(import.meta.url, {
instanceDisplayNameLocaleId,
getDisplayNameForInstanceId,
}) => ({
name: `${
instanceDisplayName ||
getDisplayNameForInstanceId((instance as any).parent[(instance as any).parent.kind])
}`,
name:
instanceDisplayName.length > 0
? instanceDisplayName
: (getDisplayNameForInstanceId(getAnyEnumCaseValue(instance.parent))?.name ?? ""),
localeId: instanceDisplayNameLocaleId,
}),
})
@@ -510,7 +513,7 @@ export const SkillUse = Entity(import.meta.url, {
comment: "The name of the use if different from the activatable entrys name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
parentReferenceKey: "parent",
@@ -521,10 +524,10 @@ export const SkillUse = Entity(import.meta.url, {
instanceDisplayNameLocaleId,
getDisplayNameForInstanceId,
}) => ({
name: `${
instanceDisplayName ||
getDisplayNameForInstanceId((instance as any).parent[(instance as any).parent.kind])
}`,
name:
instanceDisplayName.length > 0
? instanceDisplayName
: (getDisplayNameForInstanceId(getAnyEnumCaseValue(instance.parent))?.name ?? ""),
localeId: instanceDisplayNameLocaleId,
}),
})
@@ -822,8 +825,8 @@ const FixedArcaneEnergyCost = TypeAlias(import.meta.url, {
type: IncludeIdentifier(ResponsiveTextOptional),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -863,7 +866,7 @@ const ArcaneEnergyCostPerCountable = TypeAlias(import.meta.url, {
comment: "A note, appended to the generated string in parenthesis.",
type: IncludeIdentifier(ResponsiveTextOptional),
}),
})
}),
),
}),
})
@@ -916,7 +919,7 @@ const IndefiniteArcaneEnergyCost = TypeAlias(import.meta.url, {
comment: "A description of where the cost come from.",
type: IncludeIdentifier(ResponsiveText),
}),
})
}),
),
}),
})
@@ -997,28 +1000,8 @@ const ArcaneEnergyCostDisjunctionOption = TypeAlias(import.meta.url, {
type: IncludeIdentifier(ResponsiveTextOptional),
}),
},
{ minProperties: 1 }
)
),
}),
})
const NoArcaneEnergyCost = TypeAlias(import.meta.url, {
name: "NoArcaneEnergyCost",
type: () =>
Object({
translations: NestedTranslationMap(
Optional,
"NoArcaneEnergyCost",
Object(
{
note: Optional({
comment: "A note, appended to the generated string in parenthesis.",
type: IncludeIdentifier(ResponsiveTextOptional),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -1155,8 +1138,8 @@ This will generate the exact same string as seen above. The associated options a
type: IncludeIdentifier(ResponsiveTextOptional),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -1188,8 +1171,8 @@ const VolumeMapOption = TypeAlias(import.meta.url, {
type: IncludeIdentifier(ResponsiveTextOptional),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -1307,8 +1290,8 @@ This will generate the exact same string as seen above.`,
type: IncludeIdentifier(ResponsiveTextOptional),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -1334,7 +1317,7 @@ const BindingCostMapOption = TypeAlias(import.meta.url, {
"The description of the option if used standalone. Only used if different from `label`.",
type: IncludeIdentifier(ResponsiveTextOptional),
}),
})
}),
),
}),
})
@@ -1450,7 +1433,7 @@ const AdvancedSpecialAbilityDerivedFromExternalOption = GenTypeAlias(import.meta
GenIncludeIdentifier(AdvancedSpecialAbilityDerivedFromExternalOptionMapping, [
TypeArgument(Identifier),
]),
{ minItems: 1 }
{ minItems: 1 },
),
}),
display_option: Optional({
@@ -1632,7 +1615,7 @@ const ApplicableCombatTechniquesNegativeCombatTechniquesRestriction = GenTypeAli
type: Array(TypeArgument(Ref), { minItems: 1 }),
}),
}),
}
},
)
const ApplicableCombatTechniquesRaceRestriction = TypeAlias(import.meta.url, {
@@ -1725,8 +1708,8 @@ const AdventurePointsDerivedFromSelection = TypeAlias(import.meta.url, {
type: String({ minLength: 1, isMarkdown: true }),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -294,7 +294,7 @@ const SkillApplicationOrUse = TypeAlias(import.meta.url, {
"The name of the application or use if different from the activatable entrys name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
})
@@ -424,7 +424,7 @@ const SelectOptionsFixedAdventurePointsValue = GenTypeAlias(import.meta.url, {
type: Array(
GenIncludeIdentifier(SelectOptionsFixedAdventurePointsValueMapping, [
TypeArgument(Identifier),
])
]),
),
}),
default: Required({
+1 -1
View File
@@ -55,7 +55,7 @@ There must always be at least one casting time value.`,
type: IncludeIdentifier(CastingTimeDuringLovemaking),
}),
},
{ minProperties: 1 }
{ minProperties: 1 },
),
})
+8 -8
View File
@@ -62,7 +62,7 @@ const ModifiableOneTimeCost = TypeAlias(import.meta.url, {
comment: "A replacement string.",
type: IncludeIdentifier(ResponsiveTextReplace),
}),
})
}),
),
}),
})
@@ -95,7 +95,7 @@ const NonModifiableOneTimeCost = TypeAlias(import.meta.url, {
comment: "A note, appended to the generated string in parenthesis.",
type: IncludeIdentifier(ResponsiveTextOptional),
}),
})
}),
),
}),
})
@@ -116,7 +116,7 @@ const NonModifiableOneTimeCostPerCountable = TypeAlias(import.meta.url, {
comment: "The countable entity name.",
type: IncludeIdentifier(ResponsiveText),
}),
})
}),
),
}),
})
@@ -133,7 +133,7 @@ export const IndefiniteOneTimeCost = TypeAlias(import.meta.url, {
comment: "A description of where the cost come from.",
type: IncludeIdentifier(ResponsiveText),
}),
})
}),
),
}),
})
@@ -183,8 +183,8 @@ This will generate the exact same string as seen above given it is set for a
type: IncludeIdentifier(ResponsiveTextOptional),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -214,7 +214,7 @@ const CostMapOption = TypeAlias(import.meta.url, {
"The description of the option if used standalone. Only used if different from `label`.",
type: IncludeIdentifier(ResponsiveTextOptional),
}),
})
}),
),
}),
})
@@ -285,7 +285,7 @@ const NonModifiableSustainedCostPerCountable = TypeAlias(import.meta.url, {
comment: "The countable entity name.",
type: IncludeIdentifier(ResponsiveText),
}),
})
}),
),
}),
})
+6 -6
View File
@@ -40,7 +40,7 @@ const Immediate = TypeAlias(import.meta.url, {
comment: "A replacement string.",
type: IncludeIdentifier(ResponsiveTextReplace),
}),
})
}),
),
}),
})
@@ -57,7 +57,7 @@ const PermanentDuration = TypeAlias(import.meta.url, {
comment: "A replacement string.",
type: IncludeIdentifier(ResponsiveTextReplace),
}),
})
}),
),
}),
})
@@ -88,8 +88,8 @@ export const FixedDuration = TypeAlias(import.meta.url, {
type: IncludeIdentifier(ResponsiveTextReplace),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -122,7 +122,7 @@ export const CheckResultBasedDuration = TypeAlias(import.meta.url, {
comment: "A replacement string.",
type: IncludeIdentifier(ResponsiveTextReplace),
}),
})
}),
),
}),
})
@@ -139,7 +139,7 @@ export const IndefiniteDuration = TypeAlias(import.meta.url, {
comment: "A description of the duration.",
type: IncludeIdentifier(ResponsiveText),
}),
})
}),
),
}),
})
+2 -2
View File
@@ -38,8 +38,8 @@ export const Range = TypeAlias(import.meta.url, {
type: IncludeIdentifier(ResponsiveTextReplace),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
+1 -1
View File
@@ -30,7 +30,7 @@ const SpecificAffectedTargetCategory = TypeAlias(import.meta.url, {
"SpecificAffectedTargetCategory",
Object({
note: Required({ type: String({ minLength: 1 }) }),
})
}),
),
}),
})
+1 -1
View File
@@ -17,6 +17,6 @@ export const ArcaneTraditionType =
comment: "The arcane traditions name.",
type: String({ minLength: 1 }),
}),
})
}),
),
})
+1 -1
View File
@@ -72,7 +72,7 @@ export const Cause = TypeAlias(import.meta.url, {
comment: "An additional note about this cause.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
})
+3 -2
View File
@@ -5,6 +5,7 @@
import {
ChildEntities,
Entity,
getAnyEnumCaseValue,
IncludeIdentifier,
Integer,
Object,
@@ -76,7 +77,7 @@ export const Enhancement = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
parentReferenceKey: "parent",
@@ -88,7 +89,7 @@ export const Enhancement = Entity(import.meta.url, {
getDisplayNameForInstanceId,
}) => ({
name: `${
getDisplayNameForInstanceId((instance as any).parent[(instance as any).parent.kind])?.name
getDisplayNameForInstanceId(getAnyEnumCaseValue(instance.parent))?.name ?? ""
}${instanceDisplayName}`,
localeId: instanceDisplayNameLocaleId,
}),
+1 -1
View File
@@ -38,7 +38,7 @@ export const Influence = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+2 -2
View File
@@ -26,7 +26,7 @@ type BinaryMathOperation = {
export type MathOperation = Enum<
"MathOperation",
{
Value: EnumCase<TypeArgument<TypeParameter>>
Value: EnumCase<TypeArgument>
} & BinaryMathOperation,
[Value: TypeParameter]
>
@@ -39,7 +39,7 @@ export const MathOperation: MathOperation = GenEnum(import.meta.url, {
GenIncludeIdentifier<MathOperation, [Value: TypeParameter]>(MathOperation, [
TypeArgument(Value),
]),
{ minItems: 2, maxItems: 2 }
{ minItems: 2, maxItems: 2 },
)
return {
+1 -1
View File
@@ -56,7 +56,7 @@ const PrerequisiteGroup = GenTypeAlias(import.meta.url, {
text: Required({
type: String({ minLength: 1 }),
}),
})
}),
),
}),
})
+1 -1
View File
@@ -32,7 +32,7 @@ export const EquipmentPackage = Entity(import.meta.url, {
comment: "The equipment packages name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -37,7 +37,7 @@ export const Ammunition = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+3 -3
View File
@@ -87,7 +87,7 @@ export const Armor = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -131,8 +131,8 @@ export const SecondaryArmor = TypeAlias(import.meta.url, {
type: String({ minLength: 1, isMarkdown: true }),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
+4 -4
View File
@@ -74,7 +74,7 @@ export const Book = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -185,8 +185,8 @@ const DefiniteBookCostVariant = TypeAlias(import.meta.url, {
type: String({ minLength: 1, isMarkdown: true }),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -209,7 +209,7 @@ const IndefiniteBookCostVariant = TypeAlias(import.meta.url, {
comment: "The description of the cost variant, e.g. “less”.",
type: String({ minLength: 1, isMarkdown: true }),
}),
})
}),
),
}),
})
+1 -1
View File
@@ -76,7 +76,7 @@ export const Elixir = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -41,7 +41,7 @@ export const GemOrPreciousStone = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -29,7 +29,7 @@ export const Newspaper = Entity(import.meta.url, {
comment: "The place the newspaper is published.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+11 -11
View File
@@ -80,7 +80,7 @@ export const Poison = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -138,7 +138,7 @@ export const NoPoisonCost = TypeAlias(import.meta.url, {
comment: "A description of the cost.",
type: String({ minLength: 1, isMarkdown: true }),
}),
})
}),
),
}),
})
@@ -155,7 +155,7 @@ export const IndefinitePoisonCost = TypeAlias(import.meta.url, {
comment: "A description of the cost.",
type: String({ minLength: 1, isMarkdown: true }),
}),
})
}),
),
}),
})
@@ -214,8 +214,8 @@ export const IndefinitePoisonTime = TypeAlias(import.meta.url, {
type: String({ minLength: 1, isMarkdown: true }),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -277,10 +277,10 @@ const AnimalVenomLevelBySubType = TypeAlias(import.meta.url, {
"The subtype name. If there are multiple subtypes with the same level, specify them separately.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
{ minItems: 1 }
{ minItems: 1 },
),
})
@@ -324,7 +324,7 @@ export const AlchemicalPoison = TypeAlias(import.meta.url, {
comment: "Prerequsites for the brewing process, if any.",
type: String({ minLength: 1, isMarkdown: true }),
}),
})
}),
),
}),
})
@@ -377,8 +377,8 @@ export const DemonicPoison = TypeAlias(import.meta.url, {
type: String({ minLength: 1, isMarkdown: true }),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -455,7 +455,7 @@ export const Intoxicant = TypeAlias(import.meta.url, {
comment: "Special information about the intoxicant.",
type: String({ minLength: 1, isMarkdown: true }),
}),
})
}),
),
}),
})
+3 -3
View File
@@ -113,7 +113,7 @@ export const Weapon = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -171,8 +171,8 @@ export const ImprovisedWeapon = TypeAlias(import.meta.url, {
type: String({ minLength: 1, isMarkdown: true }),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
+3 -3
View File
@@ -76,7 +76,7 @@ export const DefaultItemTranslations = (singularName: string) =>
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
)
export const CombatUse = Enum(import.meta.url, {
@@ -137,7 +137,7 @@ export const FixedCost = TypeAlias(import.meta.url, {
"FixedCost",
Object({
wrap_in_text,
})
}),
),
}),
})
@@ -159,7 +159,7 @@ const CostRange = TypeAlias(import.meta.url, {
"CostRange",
Object({
wrap_in_text,
})
}),
),
}),
})
+1 -1
View File
@@ -19,7 +19,7 @@ export const ArmorType = Entity(import.meta.url, {
comment: "The armor types name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -14,7 +14,7 @@ export const Reach = Entity(import.meta.url, {
comment: "The reachs name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+3 -3
View File
@@ -90,7 +90,7 @@ If no tribe tradition is given, the animist power is generally available to all
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -116,7 +116,7 @@ const AnimistPowerLevel = TypeAlias(import.meta.url, {
comment: "An additional effect description for this level.",
type: String({ minLength: 1, isMarkdown: true }),
}),
})
}),
),
}),
})
@@ -185,7 +185,7 @@ const AnimistPowerCostByPrimaryPatron = TypeAlias(import.meta.url, {
comment: "A note, appended to the generated string in parenthesis.",
type: IncludeIdentifier(ResponsiveTextOptional),
}),
})
}),
),
}),
})
@@ -19,7 +19,7 @@ export const Tribe = Entity(import.meta.url, {
comment: "The tribes name.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+4 -4
View File
@@ -67,7 +67,7 @@ export const Curse = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -120,8 +120,8 @@ const FixedCurseCost = TypeAlias(import.meta.url, {
type: IncludeIdentifier(ResponsiveTextOptional),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -152,7 +152,7 @@ const IndefiniteCurseDuration = TypeAlias(import.meta.url, {
comment: "A description of the duration.",
type: IncludeIdentifier(ResponsiveText),
}),
})
}),
),
}),
})
+3 -3
View File
@@ -66,7 +66,7 @@ export const DominationRitual = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -104,7 +104,7 @@ const DominationRitualCost = TypeAlias(import.meta.url, {
comment: "AE cost in addition to the normal AE cost.",
type: IncludeIdentifier(ResponsiveText),
}),
})
}),
),
}),
})
@@ -149,7 +149,7 @@ const IndefiniteDominationRitualDuration = TypeAlias(import.meta.url, {
comment: "A description of the duration.",
type: IncludeIdentifier(ResponsiveText),
}),
})
}),
),
}),
})
+3 -3
View File
@@ -75,7 +75,7 @@ export const ElvenMagicalSong = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -117,7 +117,7 @@ const ElvenMagicalSongCost = TypeAlias(import.meta.url, {
comment: "The cost have to be per a specific countable entity, e.g. `8 AE per person`.",
type: IncludeIdentifier(ResponsiveText),
}),
})
}),
),
}),
})
@@ -138,7 +138,7 @@ const ElvenMagicalSongPermanentCost = TypeAlias(import.meta.url, {
comment: "A replacement string for the permanent cost.",
type: IncludeIdentifier(ResponsiveTextReplace),
}),
})
}),
),
}),
})
+1 -1
View File
@@ -85,7 +85,7 @@ export const GeodeRitual = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -87,7 +87,7 @@ export const JesterTrick = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+4 -4
View File
@@ -76,7 +76,7 @@ export const MagicalDance = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -125,8 +125,8 @@ const FixedMagicalDanceCost = TypeAlias(import.meta.url, {
type: IncludeIdentifier(ResponsiveTextOptional),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
@@ -148,7 +148,7 @@ const IndefiniteMagicalDanceCost = TypeAlias(import.meta.url, {
comment: "A description of where the cost come from.",
type: IncludeIdentifier(ResponsiveText),
}),
})
}),
),
}),
})
+1 -1
View File
@@ -91,7 +91,7 @@ export const MagicalMelody = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+6 -6
View File
@@ -93,7 +93,7 @@ If the rune has an option, the options name will/should not be included in th
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -214,7 +214,7 @@ const SingleMagicalRuneCost = TypeAlias(import.meta.url, {
comment: "A note, appended to the generated string in parenthesis.",
type: IncludeIdentifier(ResponsiveTextOptional),
}),
})
}),
),
}),
})
@@ -247,7 +247,7 @@ const MagicalRuneCraftingTime = TypeAlias(import.meta.url, {
"The crafting time has to be per a specific countable entity, e.g. `8 actions per person`.",
type: IncludeIdentifier(ResponsiveText),
}),
})
}),
),
}),
})
@@ -309,7 +309,7 @@ The surrounding parenthesis will/should not be included, they will/should be gen
comment: "The native name of the magical rune option.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
parentReferenceKey: "parent",
@@ -340,8 +340,8 @@ const CustomMagicalRuneSuboption = TypeAlias(import.meta.url, {
type: Array(String({ minLength: 1 }), { minItems: 1, uniqueItems: true }),
}),
},
{ minProperties: 1 }
)
{ minProperties: 1 },
),
),
}),
})
+1 -1
View File
@@ -85,7 +85,7 @@ export const ZibiljaRitual = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+2 -2
View File
@@ -3,7 +3,7 @@ import {
EnumCase,
IncludeIdentifier,
Object,
ReferenceIdentifier,
type ReferenceIdentifier,
Required,
String,
TypeAlias,
@@ -29,7 +29,7 @@ export const MusicTraditionReference = (traditionIdentifier: ReferenceIdentifier
comment: "The music-tradition-specific name of the entry.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
})
+1 -1
View File
@@ -37,7 +37,7 @@ A standalone sentence is connected to the previous prerequisite string with a pe
comment: "The replacement text.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
})
@@ -44,7 +44,7 @@ This is the only use case for this property.`,
comment: "The displayed text.",
type: String({ minLength: 1, isMarkdown: true }),
}),
})
}),
),
}),
})
+1 -1
View File
@@ -43,7 +43,7 @@ export const AlternativeRule = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -15,7 +15,7 @@ export const PlayerType = Entity(import.meta.url, {
comment: "The player type.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+3 -3
View File
@@ -38,7 +38,7 @@ export const CoreRule = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -86,7 +86,7 @@ const TextNode = TypeAlias(import.meta.url, {
comment: "Markdown-formatted text.",
type: String({ minLength: 1, isMarkdown: true }),
}),
})
}),
),
}),
})
@@ -107,7 +107,7 @@ const ReferenceListNode = TypeAlias(import.meta.url, {
comment: "Markdown-formatted text.",
type: String({ minLength: 1, isMarkdown: true }),
}),
})
}),
),
}),
})
+1 -1
View File
@@ -51,7 +51,7 @@ export const FocusRule = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -15,7 +15,7 @@ export const Subject = Entity(import.meta.url, {
comment: "The subject.",
type: String({ minLength: 1 }),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -46,7 +46,7 @@ export const OptionalRule = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -61,7 +61,7 @@ export const Publication = Entity(import.meta.url, {
"If this publication translation is not (fully) implemented and thus needs to be excluded from stable releases.",
type: Boolean(),
}),
})
}),
),
}),
displayName: {},
@@ -53,7 +53,7 @@ export const AdvancedCombatSpecialAbility = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -47,7 +47,7 @@ export const AdvancedKarmaSpecialAbility = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -47,7 +47,7 @@ export const AdvancedMagicalSpecialAbility = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
@@ -47,7 +47,7 @@ export const AdvancedSkillSpecialAbility = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -47,7 +47,7 @@ export const AncestorGlyph = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},
+1 -1
View File
@@ -107,7 +107,7 @@ export const BlessedTradition = Entity(import.meta.url, {
errata: Optional({
type: IncludeIdentifier(Errata),
}),
})
}),
),
}),
displayName: {},

Some files were not shown because too many files have changed in this diff Show More