diff --git a/.gitignore b/.gitignore index 72431babd..3b757a206 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ schema.json tsconfig.json tsconfig-cjs.json tsconfig-esm.json -yarn-error.log \ No newline at end of file +yarn-error.log +dataforged-tools/build \ No newline at end of file diff --git a/dataforged-tools/src/classes/assets/AlterMove.js b/dataforged-tools/src/classes/assets/AlterMove.js deleted file mode 100644 index 23b279234..000000000 --- a/dataforged-tools/src/classes/assets/AlterMove.js +++ /dev/null @@ -1,16 +0,0 @@ -import _ from "lodash-es"; -import { MoveTrigger } from "@classes/index.js"; -/** - * @internal - */ -export class AlterMove { - constructor(json, parent, index) { - var _a; - this.$id = `${parent.$id}/Alter_Moves/${index + 1}`; - this.Moves = (_a = json.Moves) !== null && _a !== void 0 ? _a : null; - if (json.Trigger) { - const triggerClone = _.cloneDeep(json.Trigger); - this.Trigger = new MoveTrigger(triggerClone, `${this.$id}/Trigger`); - } - } -} diff --git a/dataforged-tools/src/classes/assets/Asset.js b/dataforged-tools/src/classes/assets/Asset.js deleted file mode 100644 index 7707f58d5..000000000 --- a/dataforged-tools/src/classes/assets/Asset.js +++ /dev/null @@ -1,68 +0,0 @@ -import { AssetAbility } from "@classes/assets/AssetAbility.js"; -import { ConditionMeter } from "@classes/common/ConditionMeter.js"; -import { SourceInheritor } from "@classes/common/SourceInheritor.js"; -import { InputType } from "@json_out/common/index.js"; -import { Replacement } from "@json_out/common/Replacement.js"; -import { InputSelectOptionType } from "@json_out/index.js"; -import { badJsonError } from "@utils/logging/badJsonError.js"; -import { buildLog } from "@utils/logging/buildLog.js"; -import { pickInput } from "@utils/object_transform/pickInput.js"; -import { replaceInAllStrings } from "@utils/object_transform/replaceInAllStrings.js"; -import _ from "lodash-es"; -/** - * @internal - */ -export class Asset extends SourceInheritor { - constructor(json, gamespace, parent, rootSource) { - var _a, _b, _c, _d, _e; - // uses RootSource as a starting point because category info has page numbers in the rulebook, rather than the asset pdf - super((_a = json.Source) !== null && _a !== void 0 ? _a : {}, rootSource); - // console.log(this.Source); - this["Asset Type"] = parent.$id; - this.$id = `${this["Asset Type"]}/${json.Name}`.replaceAll(" ", "_"); - buildLog(this.constructor, `Building: ${this.$id}`); - this.Name = json.Name; - this.Aliases = json.Aliases; - this.Display = { - Title: (_c = (_b = json.Display) === null || _b === void 0 ? void 0 : _b.Title) !== null && _c !== void 0 ? _c : this.Name, - Color: (_e = (_d = json.Display) === null || _d === void 0 ? void 0 : _d.Color) !== null && _e !== void 0 ? _e : parent.Display.Color - }; - this.Attachments = json.Attachments; - if (json.Inputs) { - this.Inputs = json.Inputs.map(inputJson => { - const result = pickInput(inputJson, this); - if (result["Input Type"] === InputType.Select) { - result.Sets.forEach(hint => { - let searchValue = undefined; - switch (hint.Type) { - case InputSelectOptionType.ConditionMeter: - searchValue = Replacement.AssetSelectMeter; - break; - case InputSelectOptionType.Stat: - searchValue = Replacement.AssetSelectStat; - break; - default: - break; - } - if (searchValue) { - json.Abilities = replaceInAllStrings(json.Abilities, searchValue, hint.$id); - } - }); - } - return result; - }); - } - this.Requirement = json.Requirement; - this["Condition Meter"] = json["Condition Meter"] ? new ConditionMeter(json["Condition Meter"], this.$id + "/Condition_Meter", this["Asset Type"]) : undefined; - if (json.Abilities.length !== 3) { - throw badJsonError(this.constructor, json.Abilities, `Asset ${this.$id} doesn't have 3 abilities!`); - } - else { - this.Abilities = json.Abilities.map((abilityJson, index) => new AssetAbility(abilityJson, `${this.$id}/Abilities/${index + 1}`, gamespace, this)); - } - _.merge(this, replaceInAllStrings(this, Replacement.Asset, this.$id)); - if (this["Condition Meter"]) { - _.merge(this, replaceInAllStrings(this, Replacement.AssetMeter, this["Condition Meter"].$id)); - } - } -} diff --git a/dataforged-tools/src/classes/assets/AssetAbility.js b/dataforged-tools/src/classes/assets/AssetAbility.js deleted file mode 100644 index 0f8e4c369..000000000 --- a/dataforged-tools/src/classes/assets/AssetAbility.js +++ /dev/null @@ -1,39 +0,0 @@ -import _ from "lodash-es"; -import { AlterMove, Move } from "@classes/index.js"; -import { Replacement } from "@json_out/common/Replacement.js"; -import { pickInput } from "@utils/object_transform/pickInput.js"; -import { replaceInAllStrings } from "@utils/object_transform/replaceInAllStrings.js"; -/** - * @internal - */ -export class AssetAbility { - constructor(json, id, gamespace, parent) { - var _a; - /* Setting the id of the asset ability. */ - this.$id = id; - this.Text = json.Text; - if (json.Inputs) { - this.Inputs = json.Inputs.map(inputJson => pickInput(inputJson, this)); - } - this.Enabled = (_a = json.Enabled) !== null && _a !== void 0 ? _a : false; - this["Alter Moves"] = json["Alter Moves"] ? json["Alter Moves"].map((alterMove, index) => { - const newData = new AlterMove(alterMove, this, index); - return newData; - }) : json["Alter Moves"]; - this["Alter Properties"] = json["Alter Properties"]; - if (json.Moves) { - this.Moves = json.Moves.map(moveJson => { - var _a; - const moveDataClone = _.cloneDeep(moveJson); - moveDataClone.Asset = parent.$id; - moveDataClone.$id = `${this.$id.replace("/Assets/", "/Moves/Assets/")}/${moveDataClone.Name.replaceAll(" ", "_")}`; - moveDataClone.Category = `${gamespace}/Moves/Assets`; - if (moveDataClone.Trigger.Options && ((_a = parent["Condition Meter"]) === null || _a === void 0 ? void 0 : _a.$id)) { - moveDataClone.Trigger.Options = replaceInAllStrings(moveDataClone.Trigger.Options, Replacement.AssetMeter, parent["Condition Meter"].$id); - // console.log("asset ability move data", moveDataClone); - } - return new Move(moveDataClone, gamespace, parent.Source); - }); - } - } -} diff --git a/dataforged-tools/src/classes/assets/AssetType.js b/dataforged-tools/src/classes/assets/AssetType.js deleted file mode 100644 index 903a00e19..000000000 --- a/dataforged-tools/src/classes/assets/AssetType.js +++ /dev/null @@ -1,24 +0,0 @@ -import { Asset, SourceInheritor } from "@classes/index.js"; -import { badJsonError } from "@utils/logging/badJsonError.js"; -import { validateColor } from "@utils/validateColor.js"; -/** - * @internal - */ -export class AssetType extends SourceInheritor { - constructor(json, gamespace, rootSource) { - var _a, _b; - super((_a = json.Source) !== null && _a !== void 0 ? _a : {}, rootSource); - this.$id = `${gamespace}/Assets/${json.Name.replaceAll(" ", "_")}`; - this.Name = json.Name; - this.Aliases = json.Aliases; - this.Description = json.Description; - this.Display = (_b = json.Display) !== null && _b !== void 0 ? _b : {}; - if (this.Display.Color && !validateColor(this.Display.Color)) { - throw badJsonError(this.constructor, this.Display, "Not a valid color!"); - } - if (!this.Display.Title) { - this.Display.Title = this.Name + "s"; - } - this.Assets = json.Assets.map(asset => new Asset(asset, gamespace, this, rootSource)); - } -} diff --git a/dataforged-tools/src/classes/assets/index.js b/dataforged-tools/src/classes/assets/index.js deleted file mode 100644 index 2eebe8169..000000000 --- a/dataforged-tools/src/classes/assets/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export * from "@classes/assets/AlterMove.js"; -export * from "@classes/assets/Asset.js"; -export * from "@classes/assets/AssetAbility.js"; -export * from "@classes/assets/AssetType.js"; diff --git a/dataforged-tools/src/classes/common/AttributeRequirements.js b/dataforged-tools/src/classes/common/AttributeRequirements.js deleted file mode 100644 index b3ade199c..000000000 --- a/dataforged-tools/src/classes/common/AttributeRequirements.js +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-disable @typescript-eslint/naming-convention */ -import _ from "lodash-es"; -/** - * @internal - */ -export class AttributeRequirements extends Array { - constructor(json) { - super(); - _.forEach(json, (value, key) => { - let values; - if (Array.isArray(value)) { - values = value; - } - else if (value !== null) { - values = [value]; - } - const Key = key; - const Values = values; - this.push({ Key, Values }); - }); - } -} diff --git a/dataforged-tools/src/classes/common/ConditionMeter.js b/dataforged-tools/src/classes/common/ConditionMeter.js deleted file mode 100644 index 7837cfebd..000000000 --- a/dataforged-tools/src/classes/common/ConditionMeter.js +++ /dev/null @@ -1,27 +0,0 @@ -import { MeterBase } from "@classes/common/MeterBase.js"; -import { MeterAlias } from "@json_out/common/index.js"; -/** - * @internal - */ -export class ConditionMeter extends MeterBase { - constructor(json, id, assetType) { - var _a; - super(json, id); - this.Conditions = []; - this["Value"] = (_a = json["Value"]) !== null && _a !== void 0 ? _a : json.Max; - if (json.Conditions) { - this.Conditions = json.Conditions; - } - if (assetType === "Starforged/Assets/Companion" || assetType === "Ironsworn/Assets/Companion") { - this.Aliases = [MeterAlias.CompanionHealth]; - } - if (assetType === "Starforged/Assets/Command_Vehicle") { - this.Aliases = [MeterAlias.CommandVehicleIntegrity, MeterAlias.VehicleIntegrity]; - } - if (assetType === "Starforged/Assets/Support_Vehicle") { - this.Aliases = [ - MeterAlias.SupportVehicleIntegrity, MeterAlias.VehicleIntegrity - ]; - } - } -} diff --git a/dataforged-tools/src/classes/common/CustomStatOption.js b/dataforged-tools/src/classes/common/CustomStatOption.js deleted file mode 100644 index 526c28d49..000000000 --- a/dataforged-tools/src/classes/common/CustomStatOption.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @internal - */ -export class CustomStatOption { - constructor(json, id) { - this.$id = id; - this.Name = json.Name; - this.Value = json.Value; - } -} diff --git a/dataforged-tools/src/classes/common/Input.js b/dataforged-tools/src/classes/common/Input.js deleted file mode 100644 index df5c32f5f..000000000 --- a/dataforged-tools/src/classes/common/Input.js +++ /dev/null @@ -1,49 +0,0 @@ -import { ClockType } from "@json_out/common/index.js"; -/** - * @internal - */ -export class Input { - constructor(json, parent) { - this.$id = `${parent.$id}/Inputs/${json.Name}`; - this.Name = json.Name; - this["Input Type"] = json["Input Type"]; - } -} -/** - * @internal - */ -export class InputNumber extends Input { - constructor(json, parent) { - var _a, _b, _c; - super(json, parent); - this.Step = 1; - this.Min = (_a = json.Min) !== null && _a !== void 0 ? _a : 0; - this.Max = json.Max; - this.Value = (_b = json.Value) !== null && _b !== void 0 ? _b : 0; - this.Adjustable = (_c = json.Adjustable) !== null && _c !== void 0 ? _c : true; - } -} -/** - * @internal - */ -export class InputClock extends Input { - constructor(json, parent) { - var _a, _b; - super(json, parent); - this["Clock Type"] = ClockType.Tension; - this.Segments = json.Segments; - this.Filled = (_a = json.Filled) !== null && _a !== void 0 ? _a : 0; - // TODO: validate number range - maybe with decorators? - this.Adjustable = (_b = json.Adjustable) !== null && _b !== void 0 ? _b : true; - } -} -/** - * @internal - */ -export class InputText extends Input { - constructor(json, parent) { - var _a; - super(json, parent); - this.Adjustable = (_a = json.Adjustable) !== null && _a !== void 0 ? _a : false; - } -} diff --git a/dataforged-tools/src/classes/common/InputSelect.js b/dataforged-tools/src/classes/common/InputSelect.js deleted file mode 100644 index eb6f68b57..000000000 --- a/dataforged-tools/src/classes/common/InputSelect.js +++ /dev/null @@ -1,39 +0,0 @@ -import { Input } from "@classes/common/Input.js"; -import { InputType } from "@json_out/common/InputType.js"; -import { badJsonError } from "@utils/logging/badJsonError.js"; -/** - * @internal - */ -export class InputSelect extends Input { - constructor(json, parent) { - var _a; - super(json, parent); - if (json["Input Type"] !== InputType.Select) { - throw badJsonError(this.constructor, json["Input Type"], "Expected InputType.Select!"); - } - this.Adjustable = (_a = json.Adjustable) !== null && _a !== void 0 ? _a : false; - this.Sets = json.Sets; - this.Options = json.Options.map(optionJson => new InputSelectOption(optionJson, this)); - // TODO: typecheck "Sets" vs the options - via a method that can be invoked? - } -} -/** - * @internal - */ -export class InputSelectOption { - constructor(json, parent) { - this.$id = `${parent.$id}/Options/${json.Name.replace(" ", "_")}`; - this.Name = json.Name; - this.Set = json.Set.map(attr => new InputSelectOptionSetter(attr, this)); - } -} -/** - * @internal - */ -export class InputSelectOptionSetter { - constructor(json, parent) { - this.$id = `${parent.$id}/${json.Key.replace(" ", "_")}`; - this.Key = json.Key; - this.Value = json.Value; - } -} diff --git a/dataforged-tools/src/classes/common/MeterBase.js b/dataforged-tools/src/classes/common/MeterBase.js deleted file mode 100644 index 230f53e71..000000000 --- a/dataforged-tools/src/classes/common/MeterBase.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Class representing a counter embedded in a Starforged Asset. - * @internal - */ -export class MeterBase { - /** - * @param json - the json object to build the counter from - * @param id - the id of the Counter - */ - constructor(json, id) { - var _a, _b; - this.Min = 0; - this["Value"] = 0; - this.$id = id; - this.Name = json.Name; - this.Max = json.Max; - this.Min = (_a = json.Min) !== null && _a !== void 0 ? _a : 0; - this["Value"] = (_b = json["Value"]) !== null && _b !== void 0 ? _b : 0; - } -} diff --git a/dataforged-tools/src/classes/common/Requirements.js b/dataforged-tools/src/classes/common/Requirements.js deleted file mode 100644 index 4723b4131..000000000 --- a/dataforged-tools/src/classes/common/Requirements.js +++ /dev/null @@ -1,10 +0,0 @@ -import { AttributeRequirements } from "@classes/index.js"; -/** - * @internal - */ -export class Requirements { - constructor(json) { - this.Attributes = new AttributeRequirements(json.Attributes); - } -} -; diff --git a/dataforged-tools/src/classes/common/Source.js b/dataforged-tools/src/classes/common/Source.js deleted file mode 100644 index 26316e83c..000000000 --- a/dataforged-tools/src/classes/common/Source.js +++ /dev/null @@ -1,23 +0,0 @@ -import { SourceTitle } from "@json_out/index.js"; -import { badEnumError } from "@utils/logging/badEnumError.js"; -import { enumHas } from "@utils/validation/enumHas.js"; -import _ from "lodash-es"; -/** - * @internal - */ -export class Source { - constructor(json, ...ancestorSourceJson) { - // console.log(arguments); - const sourceStack = _.cloneDeep([..._.compact(ancestorSourceJson) - .reverse(), - json]); - const merged = sourceStack.reduce((a, b) => _.merge(a, b)); - // console.log("newData", newData); - this.Title = merged.Title; - this.Date = merged.Date; - this.Page = merged.Page; - if (!enumHas(SourceTitle, this.Title)) { - throw badEnumError(this.constructor, merged.Title, SourceTitle); - } - } -} diff --git a/dataforged-tools/src/classes/common/SourceInheritor.js b/dataforged-tools/src/classes/common/SourceInheritor.js deleted file mode 100644 index 3f48fd46f..000000000 --- a/dataforged-tools/src/classes/common/SourceInheritor.js +++ /dev/null @@ -1,9 +0,0 @@ -import { Source } from "@classes/common/index.js"; -/** - * @internal - */ -export class SourceInheritor { - constructor(json, ...sourceAncestors) { - this.Source = new Source(json, ...sourceAncestors); - } -} diff --git a/dataforged-tools/src/classes/common/Suggestions.js b/dataforged-tools/src/classes/common/Suggestions.js deleted file mode 100644 index 1c3f7218b..000000000 --- a/dataforged-tools/src/classes/common/Suggestions.js +++ /dev/null @@ -1,24 +0,0 @@ -import { GameObject } from "@classes/index.js"; -/** - * @internal - */ -export class Suggestions { - constructor(data) { - if (data["Game objects"]) { - // console.info("[Suggestions] Game objects", JSON.stringify(data["Game objects"])); - this["Game objects"] = data["Game objects"].map(gameObjData => new GameObject(gameObjData)); - } - if (data["Oracle rolls"]) { - // TODO type check against string - this["Oracle rolls"] = data["Oracle rolls"]; - } - if (data.Moves) { - // TODO type check against string - this.Moves = data.Moves; - } - if (data.Assets) { - // TODO type check against string - this.Assets = data.Assets; - } - } -} diff --git a/dataforged-tools/src/classes/common/index.js b/dataforged-tools/src/classes/common/index.js deleted file mode 100644 index 604af79e8..000000000 --- a/dataforged-tools/src/classes/common/index.js +++ /dev/null @@ -1,10 +0,0 @@ -export * from "@classes/common/AttributeRequirements.js"; -export * from "@classes/common/ConditionMeter.js"; -export * from "@classes/common/CustomStatOption.js"; -export * from "@classes/common/Input.js"; -export * from "@classes/common/InputSelect.js"; -export * from "@classes/common/MeterBase.js"; -export * from "@classes/common/Requirements.js"; -export * from "@classes/common/Source.js"; -export * from "@classes/common/SourceInheritor.js"; -export * from "@classes/common/Suggestions.js"; diff --git a/dataforged-tools/src/classes/encounters/Encounter.js b/dataforged-tools/src/classes/encounters/Encounter.js deleted file mode 100644 index f27e615fa..000000000 --- a/dataforged-tools/src/classes/encounters/Encounter.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @internal - */ -export class Encounter { - constructor(json) { - this.Name = json.Name; - this.Features = json.Features; - this.Drives = json.Drives; - this.Tactics = json.Tactics; - this.Rank = json.Rank; - this.Description = json.Description; - this["Quest Starter"] = json["Quest Starter"]; - } -} diff --git a/dataforged-tools/src/classes/encounters/EncounterDisplay.js b/dataforged-tools/src/classes/encounters/EncounterDisplay.js deleted file mode 100644 index c4fa4332f..000000000 --- a/dataforged-tools/src/classes/encounters/EncounterDisplay.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @internal - */ -export class EncounterDisplay { - constructor(json, parentName) { - var _a; - this.Title = (_a = json.Title) !== null && _a !== void 0 ? _a : parentName; - } -} diff --git a/dataforged-tools/src/classes/encounters/EncounterIronsworn.js b/dataforged-tools/src/classes/encounters/EncounterIronsworn.js deleted file mode 100644 index ec71049e7..000000000 --- a/dataforged-tools/src/classes/encounters/EncounterIronsworn.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Source } from "@classes/common/Source.js"; -import { Encounter } from "@classes/encounters/Encounter.js"; -/** - * @internal - */ -export class EncounterIronsworn extends Encounter { - constructor(json, parent) { - var _a; - super(json); - this.$id = `${parent.$id}/${this.Name.replaceAll(" ", "_")}`; - this.Nature = parent.Name; - this.Display = (_a = json.Display) !== null && _a !== void 0 ? _a : { Title: this.Name }; - this.Source = new Source(json.Source); - this["Your Truth"] = json["Your Truth"]; - } -} diff --git a/dataforged-tools/src/classes/encounters/EncounterNatureInfo.js b/dataforged-tools/src/classes/encounters/EncounterNatureInfo.js deleted file mode 100644 index 7f9ee8519..000000000 --- a/dataforged-tools/src/classes/encounters/EncounterNatureInfo.js +++ /dev/null @@ -1,23 +0,0 @@ -import { EncounterIronsworn } from "@classes/encounters/EncounterIronsworn.js"; -import { Gamespace } from "@json_out/common/Gamespace.js"; -/** - * Represents the metadata describing an *Ironsworn* encounter's nature; used as a category to contain all Encounters of that type. - * @internal - */ -export class EncounterNatureInfo { - constructor(json) { - var _a; - this.$id = `${Gamespace.Ironsworn}/Encounters/${json.Name}`; - this.Name = json.Name; - this.Source = json.Source; - const displayTitle = json.Name; - // TODO: should pluralize, probably - this.Display = (_a = json.Display) !== null && _a !== void 0 ? _a : { Title: displayTitle }; - if (!this.Display.Title) { - this.Display.Title = displayTitle; - } - this.Summary = json.Summary; - this.Description = json.Description; - this.Encounters = json.Encounters.map(enc => new EncounterIronsworn(enc, this)); - } -} diff --git a/dataforged-tools/src/classes/encounters/EncounterStarforged.js b/dataforged-tools/src/classes/encounters/EncounterStarforged.js deleted file mode 100644 index e5309e7ee..000000000 --- a/dataforged-tools/src/classes/encounters/EncounterStarforged.js +++ /dev/null @@ -1,27 +0,0 @@ -import { EncounterDisplay, EncounterVariant, Source } from "@classes/index.js"; -import { Gamespace } from "@json_out/common/Gamespace.js"; -/** - * Represents an *Ironsworn: Starforged* Encounter entry. - * @internal - */ -export class EncounterStarforged { - constructor(json, ...ancestorSourceJson) { - var _a; - const gamespace = Gamespace.Starforged; - this.$id = `${gamespace}/Encounters/${json.Name.replaceAll(" ", "_")}`; - this.Name = json.Name; - this.Nature = json.Nature; - this.Summary = json.Summary; - this.Tags = json.Tags; - this.Rank = json.Rank; - this.Display = new EncounterDisplay((_a = json.Display) !== null && _a !== void 0 ? _a : {}, this.Name); - this.Features = json.Features; - this.Drives = json.Drives; - this.Tactics = json.Tactics; - const newSource = new Source(json.Source, ...ancestorSourceJson); - this.Description = json.Description; - this["Quest Starter"] = json["Quest Starter"]; - this.Source = newSource; - this.Variants = json.Variants.map(variant => new EncounterVariant(variant, this)); - } -} diff --git a/dataforged-tools/src/classes/encounters/EncounterVariant.js b/dataforged-tools/src/classes/encounters/EncounterVariant.js deleted file mode 100644 index 1f93afc8c..000000000 --- a/dataforged-tools/src/classes/encounters/EncounterVariant.js +++ /dev/null @@ -1,21 +0,0 @@ -import { Source } from "@classes/index.js"; -/** - * @internal - */ -export class EncounterVariant { - constructor(json, parent) { - var _a, _b; - this.$id = (`${parent.$id}/${json.Name.replaceAll(" ", "_")}`); - this.Source = new Source(parent.Source); - this.Name = json.Name; - this.Rank = json.Rank; - this.Display = (_a = json.Display) !== null && _a !== void 0 ? _a : { Title: this.Name }; - if (!this.Display.Title) { - this.Display.Title = this.Name; - } - this.Description = json.Description; - this.Nature = (_b = json.Nature) !== null && _b !== void 0 ? _b : parent.Nature; - this["Variant of"] = parent.$id; - this.Tags = json.Tags; - } -} diff --git a/dataforged-tools/src/classes/encounters/index.js b/dataforged-tools/src/classes/encounters/index.js deleted file mode 100644 index 616f222f5..000000000 --- a/dataforged-tools/src/classes/encounters/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export * from "@classes/encounters/Encounter.js"; -export * from "@classes/encounters/EncounterDisplay.js"; -export * from "@classes/encounters/EncounterIronsworn.js"; -export * from "@classes/encounters/EncounterNatureInfo.js"; -export * from "@classes/encounters/EncounterStarforged.js"; -export * from "@classes/encounters/EncounterVariant.js"; diff --git a/dataforged-tools/src/classes/index.js b/dataforged-tools/src/classes/index.js deleted file mode 100644 index e58edf2bf..000000000 --- a/dataforged-tools/src/classes/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export * from "@classes/assets/index.js"; -export * from "@classes/common/index.js"; -export * from "@classes/encounters/index.js"; -export * from "@classes/moves/index.js"; -export * from "@classes/oracles/index.js"; -export * from "@classes/setting_truths/index.js"; diff --git a/dataforged-tools/src/classes/moves/CustomStat.js b/dataforged-tools/src/classes/moves/CustomStat.js deleted file mode 100644 index 230de5cdf..000000000 --- a/dataforged-tools/src/classes/moves/CustomStat.js +++ /dev/null @@ -1,12 +0,0 @@ -import { CustomStatOption } from "@classes/index.js"; -/** - * @internal - */ -export class CustomStat { - constructor(json, id) { - var _a; - this.$id = id; - this.Name = json.Name; - this.Options = (_a = json.Options) === null || _a === void 0 ? void 0 : _a.map(option => new CustomStatOption(option, `${id}/${option.Name.replaceAll(" ", "_")}`)); - } -} diff --git a/dataforged-tools/src/classes/moves/Move.js b/dataforged-tools/src/classes/moves/Move.js deleted file mode 100644 index 771e71cdf..000000000 --- a/dataforged-tools/src/classes/moves/Move.js +++ /dev/null @@ -1,36 +0,0 @@ -import { MoveOutcomes, MoveTrigger, SourceInheritor } from "@classes/index.js"; -import { buildLog } from "@utils/logging/buildLog.js"; -import _ from "lodash-es"; -/** - * Object representing a Starforged move. - * @internal - */ -export class Move extends SourceInheritor { - constructor(json, gamespace, ...sourceAncestors) { - var _a, _b; - super((_a = json.Source) !== null && _a !== void 0 ? _a : {}, ...sourceAncestors); - this.$id = (_b = json.$id) !== null && _b !== void 0 ? _b : `${json.Category}/${json.Name.replaceAll(" ", "_")}`; - buildLog(this.constructor, `Building: ${this.$id}`); - this.Name = json.Name; - this.Category = json.Category; - if (this.Category === ("Starforged/Moves/Assets" || "Ironsworn/Moves/Assets")) { - if (!json.Asset) { - throw new Error("Expected an asset ID"); - } - this.Asset = json.Asset; - } - this["Progress Move"] = json["Progress Move"]; - this["Variant of"] = json["Variant of"]; - const displayStub = { Title: this.Name }; - if (json.Display) { - this.Display = _.merge(displayStub, json.Display); - } - else { - this.Display = displayStub; - } - this.Trigger = new MoveTrigger(json.Trigger, `${this.$id}/Trigger`); - this.Text = json.Text; - this.Oracles = json.Oracles; - this.Outcomes = json.Outcomes ? new MoveOutcomes(json.Outcomes, `${this.$id}/Outcomes`) : undefined; - } -} diff --git a/dataforged-tools/src/classes/moves/MoveCategory.js b/dataforged-tools/src/classes/moves/MoveCategory.js deleted file mode 100644 index 3899a5a54..000000000 --- a/dataforged-tools/src/classes/moves/MoveCategory.js +++ /dev/null @@ -1,19 +0,0 @@ -import { Move, Source } from "@classes/index.js"; -import { MoveCategoryDisplay } from "@classes/moves/MoveCategoryDisplay.js"; -/** - * @internal - */ -export class MoveCategory { - constructor(json, gamespace, ...ancestorSourceJson) { - var _a, _b; - this.$id = `${gamespace}/Moves/${json.Name.replaceAll(" ", "_")}`; - this.Name = json.Name; - this.Description = json.Description; - this.Source = new Source(json.Source, ...ancestorSourceJson); - this.Display = new MoveCategoryDisplay(`${json.Name} Moves`, (_b = (_a = json.Display) === null || _a === void 0 ? void 0 : _a.Color) !== null && _b !== void 0 ? _b : null); - this.Moves = json.Moves.map(move => { - move.Category = this.$id; - return new Move(move, gamespace, this.Source, ...ancestorSourceJson); - }); - } -} diff --git a/dataforged-tools/src/classes/moves/MoveCategoryDisplay.js b/dataforged-tools/src/classes/moves/MoveCategoryDisplay.js deleted file mode 100644 index 9022bbb77..000000000 --- a/dataforged-tools/src/classes/moves/MoveCategoryDisplay.js +++ /dev/null @@ -1,14 +0,0 @@ -import { badJsonError } from "@utils/logging/badJsonError.js"; -import { validateColor } from "@utils/validateColor.js"; -/** - * @internal - */ -export class MoveCategoryDisplay { - constructor(title, color) { - this.Title = title; - if (color && !validateColor(color)) { - throw badJsonError(this.constructor, color, "Not a valid color."); - } - this.Color = color !== null && color !== void 0 ? color : undefined; - } -} diff --git a/dataforged-tools/src/classes/moves/MoveOutcome.js b/dataforged-tools/src/classes/moves/MoveOutcome.js deleted file mode 100644 index 539b57a46..000000000 --- a/dataforged-tools/src/classes/moves/MoveOutcome.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @internal - */ -export class MoveOutcome { - constructor(json, id) { - this.$id = id; - this.Text = json.Text; - if (json["With a Match"]) { - this["With a Match"] = new MoveOutcome(json["With a Match"], `${this.$id}/With_a_Match`); - } - } -} diff --git a/dataforged-tools/src/classes/moves/MoveOutcomes.js b/dataforged-tools/src/classes/moves/MoveOutcomes.js deleted file mode 100644 index d6d6ec76e..000000000 --- a/dataforged-tools/src/classes/moves/MoveOutcomes.js +++ /dev/null @@ -1,12 +0,0 @@ -import { MoveOutcome } from "@classes/index.js"; -/** - * @internal - */ -export class MoveOutcomes { - constructor(json, id) { - this.$id = id; - this["Strong Hit"] = new MoveOutcome(json["Strong Hit"], `${this.$id}/Strong_Hit`); - this["Weak Hit"] = new MoveOutcome(json["Weak Hit"], `${this.$id}/Weak_Hit`); - this["Miss"] = new MoveOutcome(json["Miss"], `${this.$id}/Miss`); - } -} diff --git a/dataforged-tools/src/classes/moves/MoveTrigger.js b/dataforged-tools/src/classes/moves/MoveTrigger.js deleted file mode 100644 index 7fe816cf0..000000000 --- a/dataforged-tools/src/classes/moves/MoveTrigger.js +++ /dev/null @@ -1,12 +0,0 @@ -import { MoveTriggerOption } from "@classes/index.js"; -/** - * @internal - */ -export class MoveTrigger { - constructor(json, id) { - var _a; - this.$id = id; - this.Text = json.Text; - this["Options"] = (_a = json.Options) === null || _a === void 0 ? void 0 : _a.map((option, index) => new MoveTriggerOption(option, this, index)); - } -} diff --git a/dataforged-tools/src/classes/moves/MoveTriggerOption.js b/dataforged-tools/src/classes/moves/MoveTriggerOption.js deleted file mode 100644 index 8b688489a..000000000 --- a/dataforged-tools/src/classes/moves/MoveTriggerOption.js +++ /dev/null @@ -1,26 +0,0 @@ -import { CustomStat } from "@classes/moves/CustomStat.js"; -import { Replacement } from "@json_out/common/Replacement.js"; -import { RollMethod } from "@json_out/index.js"; -/** - * @internal - */ -export class MoveTriggerOption { - constructor(json, parent, index) { - var _a, _b; - this.$id = `${parent.$id}/Options/${index + 1}`; - this.Text = json.Text; - this["Roll type"] = json["Roll type"]; - this.Method = (_a = json.Method) !== null && _a !== void 0 ? _a : RollMethod.Any; - // if (json.Using && json.Using.includes(Replacement.AssetMeter)) { - // throw badJsonError(this.constructor, json, "`Using` includes an unexpected template string. It should be replaced before being sent to this constructor."); - // } else { - this.Using = (_b = json.Using) !== null && _b !== void 0 ? _b : []; - // } - if (json["Custom stat"]) { - this["Custom stat"] = new CustomStat(json["Custom stat"], `${this.$id}/Custom_stat`); - if (this.Using && this["Custom stat"]) { - this.Using = this.Using.map(item => { var _a; return item === Replacement.CustomStat ? (_a = this["Custom stat"]) === null || _a === void 0 ? void 0 : _a.$id : item; }); - } - } - } -} diff --git a/dataforged-tools/src/classes/moves/index.js b/dataforged-tools/src/classes/moves/index.js deleted file mode 100644 index 71ab69700..000000000 --- a/dataforged-tools/src/classes/moves/index.js +++ /dev/null @@ -1,8 +0,0 @@ -export * from "@classes/moves/CustomStat.js"; -export * from "@classes/moves/Move.js"; -export * from "@classes/moves/MoveCategory.js"; -export * from "@classes/moves/MoveCategoryDisplay.js"; -export * from "@classes/moves/MoveOutcome.js"; -export * from "@classes/moves/MoveOutcomes.js"; -export * from "@classes/moves/MoveTrigger.js"; -export * from "@classes/moves/MoveTriggerOption.js"; diff --git a/dataforged-tools/src/classes/oracles/AttributeSetter.js b/dataforged-tools/src/classes/oracles/AttributeSetter.js deleted file mode 100644 index 648ac83c1..000000000 --- a/dataforged-tools/src/classes/oracles/AttributeSetter.js +++ /dev/null @@ -1,22 +0,0 @@ -import _ from "lodash-es"; -/** - * @internal - */ -export class AttributeSetter extends Array { - constructor(json) { - if (Object.values(json).some(item => Array.isArray(item) && item.length > 1)) { - throw new Error("[AttributeSetter] attribute hash can't be converted to attribute setter if it contains arrays longer than 1"); - } - const attributes = _.map(json, (value, key) => { - let newValue; - if (Array.isArray(value)) { - newValue = value[0]; - } - else { - newValue = value; - } - return { Key: key, Value: newValue }; - }); - super(...attributes); - } -} diff --git a/dataforged-tools/src/classes/oracles/DisplayTable.js b/dataforged-tools/src/classes/oracles/DisplayTable.js deleted file mode 100644 index 9c470d38d..000000000 --- a/dataforged-tools/src/classes/oracles/DisplayTable.js +++ /dev/null @@ -1,44 +0,0 @@ -import { RollColumn, TextColumn } from "@classes/index.js"; -import { getNameFromId } from "@utils/getNameFromId.js"; -import { badJsonError } from "@utils/logging/badJsonError.js"; -/** - * @internal - */ -export class DisplayTable { - constructor(json, parentId) { - if (json["Result columns"]) { - const resultColData = json["Result columns"]; - if (resultColData.length > 1) { - resultColData.forEach(col => { - if (!col.Label) { - if (!col["Use content from"]) { - throw badJsonError(this.constructor, json["Result columns"], "There are multiple result columns, but one is missing both Label and Content - Label could not be inferred."); - } - col.Label = getNameFromId((col["Use content from"])); - } - }); - } - this["Result columns"] = resultColData.map(col => { var _a, _b, _c; return new TextColumn(((_a = col["Use content from"]) !== null && _a !== void 0 ? _a : parentId), (_b = col.Label) !== null && _b !== void 0 ? _b : undefined, (_c = col.Key) !== null && _c !== void 0 ? _c : "Result"); }); - } - else { - this["Result columns"] = [new TextColumn(parentId)]; - } - if (json["Roll columns"]) { - const rollColData = json["Roll columns"]; - if (rollColData.length > 1) { - rollColData.forEach(col => { - if (!col.Label) { - if (!col["Use content from"]) { - throw badJsonError(this.constructor, json["Roll columns"], "There are multiple result columns, but one is missing both Label and Content - Label could not be inferred."); - } - col.Label = getNameFromId((col["Use content from"])); - } - }); - } - this["Roll columns"] = rollColData.map(col => { var _a, _b; return new RollColumn(((_a = col["Use content from"]) !== null && _a !== void 0 ? _a : parentId), (_b = col.Label) !== null && _b !== void 0 ? _b : undefined); }); - } - else { - this["Roll columns"] = [new RollColumn(parentId)]; - } - } -} diff --git a/dataforged-tools/src/classes/oracles/GameObject.js b/dataforged-tools/src/classes/oracles/GameObject.js deleted file mode 100644 index 1dee02ebf..000000000 --- a/dataforged-tools/src/classes/oracles/GameObject.js +++ /dev/null @@ -1,22 +0,0 @@ -import { Requirements } from "@classes/index.js"; -import { ActorType, PlaceType } from "@game_objects/index.js"; -import { badJsonError } from "@utils/logging/badJsonError.js"; -import { enumHas } from "@utils/validation/enumHas.js"; -import _ from "lodash-es"; -/** - * @internal - */ -export class GameObject { - constructor(json) { - if (!(enumHas(ActorType, json["Object type"]) || enumHas(PlaceType, json["Object type"]))) { - throw badJsonError(this.constructor, json, "Invalid object type"); - } - this["Object type"] = json["Object type"]; - // this["Inherit rolls"] = json["Inherit rolls"] ?? false; - const requiredAttributes = _.omit(json, ["Object type", "Inherit rolls"]); - if (Object.keys(requiredAttributes).length) { - const requirements = { Attributes: requiredAttributes }; - this.Requires = new Requirements(requirements); - } - } -} diff --git a/dataforged-tools/src/classes/oracles/MultipleRolls.js b/dataforged-tools/src/classes/oracles/MultipleRolls.js deleted file mode 100644 index ab0ea345a..000000000 --- a/dataforged-tools/src/classes/oracles/MultipleRolls.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Represents "Roll twice" and "Roll three times" oracle results. - * @internal - */ -export class MultipleRolls { - constructor(json) { - var _a, _b, _c; - this.Amount = (_a = json.Amount) !== null && _a !== void 0 ? _a : 2; - this["Allow duplicates"] = (_b = json["Allow duplicates"]) !== null && _b !== void 0 ? _b : false; - this["Make it worse"] = (_c = json["Make it worse"]) !== null && _c !== void 0 ? _c : false; - } -} diff --git a/dataforged-tools/src/classes/oracles/Oracle.js b/dataforged-tools/src/classes/oracles/Oracle.js deleted file mode 100644 index 8c7e564cb..000000000 --- a/dataforged-tools/src/classes/oracles/Oracle.js +++ /dev/null @@ -1,95 +0,0 @@ -import { OracleContent, OracleDisplay, OracleUsage, Row, SourceInheritor } from "@classes/index.js"; -import { buildOracleId } from "@utils/buildOracleId.js"; -import { inferSetsAttributes } from "@utils/object_transform/inferSetsAttributes.js"; -import { propagateToChildren } from "@utils/object_transform/propagateToChildren.js"; -import { templateOracle } from "@utils/object_transform/templateOracle.js"; -import { templateOracleTable } from "@utils/object_transform/templateOracleTable.js"; -import _ from "lodash-es"; -/** - * @internal - */ -export class Oracle extends SourceInheritor { - constructor(json, gamespace, category, memberOf, ...ancestorsJson - // ancestors should be in ascending order - ) { - var _a, _b, _c; - let jsonClone = _.cloneDeep(json); - super((_a = json.Source) !== null && _a !== void 0 ? _a : {}, ..._.compact(ancestorsJson.map(item => item.Source))); - if (jsonClone._templateInfo) { - jsonClone = templateOracle(jsonClone, jsonClone._templateInfo); - } - // if (!is(json)) { - // throw new Error("json does not conform to IOracleInfoData!"); - // } - this.$id = buildOracleId(gamespace, jsonClone, ...ancestorsJson); - // buildLog(this.constructor, `Building: ${this.$id}`); - this.Name = jsonClone.Name; - this.Aliases = jsonClone.Aliases; - this["Member of"] = memberOf !== null && memberOf !== void 0 ? memberOf : undefined; - this.Category = category; - this.Description = jsonClone.Description; - this.Display = new OracleDisplay(((_b = jsonClone.Display) !== null && _b !== void 0 ? _b : {}), this.Name, this.$id); - if (jsonClone.Usage) { - this.Usage = new OracleUsage(jsonClone.Usage); - } - if (jsonClone.Content) { - this.Content = new OracleContent(jsonClone.Content); - } - let tableData; - if (jsonClone._templateTable) { - tableData = templateOracleTable(jsonClone._templateTable); - } - else { - tableData = jsonClone.Table; - } - if (tableData) { - this.Table = tableData.map(row => { - // TODO: propagate attributes to row objects - const newRow = new Row(this.$id, row); - newRow.validateRollTemplate(); - return newRow; - }); - } - if (jsonClone.Oracles) { - this.Oracles = jsonClone.Oracles.map(oracleInfo => { - if (jsonClone.Usage) { - propagateToChildren(jsonClone.Usage, "Usage", oracleInfo); - } - if (jsonClone.Content) { - propagateToChildren(jsonClone.Content, "Content", oracleInfo); - } - return new Oracle(oracleInfo, gamespace, this.Category, this.$id, jsonClone, ...ancestorsJson); - }); - } - if (this.Table) { - const attrs = inferSetsAttributes(this.Table); - if (attrs.length > 0) { - if (!this.Usage) { - this.Usage = {}; - } - if (typeof this.Usage["Sets attributes"] === "undefined") { - this.Usage["Sets attributes"] = []; - } - this.Usage["Sets attributes"] = this.Usage["Sets attributes"].concat(...attrs); - } - } - if (this.Oracles) { - const keys = new Set(); - if (!this.Usage) { - this.Usage = {}; - } - if ((_c = this.Usage) === null || _c === void 0 ? void 0 : _c["Sets attributes"]) { - this.Usage["Sets attributes"].map((item) => item.Key).forEach(key => keys.add(key)); - } - this.Oracles.forEach(oracle => { - var _a; - if ((_a = oracle.Usage) === null || _a === void 0 ? void 0 : _a["Sets attributes"]) { - oracle.Usage["Sets attributes"].map((item) => item.Key).forEach(key => keys.add(key)); - } - }); - if (keys.size > 0) { - this.Usage["Sets attributes"] = Array.from(keys).map(key => { return { Key: key }; }); - } - } - } -} diff --git a/dataforged-tools/src/classes/oracles/OracleCategory.js b/dataforged-tools/src/classes/oracles/OracleCategory.js deleted file mode 100644 index 0d1a26137..000000000 --- a/dataforged-tools/src/classes/oracles/OracleCategory.js +++ /dev/null @@ -1,51 +0,0 @@ -import { Oracle, OracleCategoryDisplay, OracleUsage, SourceInheritor } from "@classes/index.js"; -import { buildOracleId } from "@utils/buildOracleId.js"; -import { buildLog } from "@utils/logging/buildLog.js"; -import { propagateToChildren } from "@utils/object_transform/propagateToChildren.js"; -import _ from "lodash-es"; -/** - * @internal - */ -export class OracleCategory extends SourceInheritor { - constructor(json, gamespace, category, ...ancestorsJson) { - var _a, _b; - // if (!is(json)) { - // buildLog(this.constructor, "Json does not conform to type!"); - // throw new Error(); - // } - super((_a = json.Source) !== null && _a !== void 0 ? _a : {}, ..._.compact(ancestorsJson.map(item => item.Source))); - this.$id = buildOracleId(gamespace, json, ...ancestorsJson); - buildLog(this.constructor, `Building: ${this.$id}`); - this.Name = json.Name; - this.Aliases = json.Aliases; - this.Description = json.Description; - this.Display = new OracleCategoryDisplay((_b = json.Display) !== null && _b !== void 0 ? _b : {}, this.Name); - this.Category = category !== null && category !== void 0 ? category : undefined; - this["Sample Names"] = json["Sample Names"]; - if (json.Usage) { - this.Usage = new OracleUsage(json.Usage); - } - if (json.Oracles) { - this.Oracles = json.Oracles.map(oracleInfo => { - if (json.Usage) { - propagateToChildren(json.Usage, "Usage", oracleInfo); - } - if (json.Requires) { - propagateToChildren(json.Requires, "Requires", oracleInfo); - } - return new Oracle(oracleInfo, gamespace, this.$id, undefined, json, ...ancestorsJson); - }); - } - if (json.Categories) { - this.Categories = json.Categories.map(oracleCat => { - if (json.Usage) { - propagateToChildren(json.Usage, "Usage", oracleCat); - } - if (json.Requires) { - propagateToChildren(json.Requires, "Requires", oracleCat); - } - return new OracleCategory(oracleCat, gamespace, this.$id, json, ...ancestorsJson); - }); - } - } -} diff --git a/dataforged-tools/src/classes/oracles/OracleCategoryDisplay.js b/dataforged-tools/src/classes/oracles/OracleCategoryDisplay.js deleted file mode 100644 index ac815ef56..000000000 --- a/dataforged-tools/src/classes/oracles/OracleCategoryDisplay.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @internal - */ -export class OracleCategoryDisplay { - constructor(json, parentName) { - var _a; - this.Title = (_a = json.Title) !== null && _a !== void 0 ? _a : parentName; - this.Images = json.Images; - } -} diff --git a/dataforged-tools/src/classes/oracles/OracleContent.js b/dataforged-tools/src/classes/oracles/OracleContent.js deleted file mode 100644 index 769bf9a90..000000000 --- a/dataforged-tools/src/classes/oracles/OracleContent.js +++ /dev/null @@ -1,15 +0,0 @@ -// import { badJsonError } from "@utils/logging/badJsonError.js"; -/** - * Metadata that describes an oracle's semantic or lexical content. - * @internal - */ -export class OracleContent { - constructor(json) { - var _a, _b; - // if (!(json["Part of speech"]||json["Tags"])) { - // throw badJsonError(this.constructor, json, "Expected IOracleContent"); - // } - this["Part of speech"] = (_a = json["Part of speech"]) !== null && _a !== void 0 ? _a : undefined; - this["Tags"] = (_b = json["Tags"]) !== null && _b !== void 0 ? _b : undefined; - } -} diff --git a/dataforged-tools/src/classes/oracles/OracleDisplay.js b/dataforged-tools/src/classes/oracles/OracleDisplay.js deleted file mode 100644 index 87df55cd8..000000000 --- a/dataforged-tools/src/classes/oracles/OracleDisplay.js +++ /dev/null @@ -1,20 +0,0 @@ -import { DisplayTable } from "@classes/index.js"; -/** - * @internal - */ -export class OracleDisplay { - constructor(json, parentName, parentId) { - var _a, _b; - this.Title = (_a = json.Title) !== null && _a !== void 0 ? _a : parentName; - this.Images = json.Images; - this.Icon = json.Icon; - this["Column of"] = (_b = json["Column of"]) !== null && _b !== void 0 ? _b : undefined; - const tableData = json.Table; - if (tableData) { - this.Table = new DisplayTable(tableData, parentId); - } - else { - this.Table = new DisplayTable({}, parentId); - } - } -} diff --git a/dataforged-tools/src/classes/oracles/OracleRef.js b/dataforged-tools/src/classes/oracles/OracleRef.js deleted file mode 100644 index 3e2bd68e2..000000000 --- a/dataforged-tools/src/classes/oracles/OracleRef.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @internal - */ -export class OracleTableRef { - constructor(tableId) { - this.$id = tableId; - this.getTable = this.getTable.bind(this); - } - getTable(keyedTables) { - return keyedTables[this.$id]; - } - toString() { return this.$id; } - toJSON() { return this.$id; } -} diff --git a/dataforged-tools/src/classes/oracles/OracleUsage.js b/dataforged-tools/src/classes/oracles/OracleUsage.js deleted file mode 100644 index 5aeb718ba..000000000 --- a/dataforged-tools/src/classes/oracles/OracleUsage.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Requirements, Suggestions } from "@classes/index.js"; -/** - * @internal - */ -export class OracleUsage { - constructor(json) { - var _a; - // if (!is(json)) { - // throw new Error(); - // } - this.Initial = json.Initial; - this["Max rolls"] = json["Max rolls"]; - this.Repeatable = json.Repeatable; - this["Allow duplicates"] = (_a = json["Allow duplicates"]) !== null && _a !== void 0 ? _a : false; - if (json.Suggestions) { - this.Suggestions = new Suggestions(json.Suggestions); - } - if (json.Requires) { - this.Requires = new Requirements(json.Requires); - } - // this["Sets attributes"] = json["Sets attributes"]; - } -} diff --git a/dataforged-tools/src/classes/oracles/Row.js b/dataforged-tools/src/classes/oracles/Row.js deleted file mode 100644 index 53e6b117a..000000000 --- a/dataforged-tools/src/classes/oracles/Row.js +++ /dev/null @@ -1,193 +0,0 @@ -import { AttributeSetter, GameObject, MultipleRolls, OracleContent, Suggestions } from "@classes/index.js"; -import { badJsonError } from "@utils/logging/badJsonError.js"; -import { validateRollTemplate } from "@utils/validation/validateRollTemplate.js"; -import _ from "lodash-es"; -/** - * Class representing a single row of an oracle table. - * @internal - */ -export class Row { - /** - * Creates an instance of Row. - */ - constructor(parentId, json) { - let rowData = _.clone(json); - if (Array.isArray(rowData) && rowData.some(item => Array.isArray(item))) { - rowData = rowData.flat(2); - } - this.Floor = Array.isArray(rowData) ? rowData[0] : rowData.Floor; - this.Ceiling = Array.isArray(rowData) ? rowData[1] : rowData.Ceiling; - if ((typeof this.Floor) !== (typeof this.Ceiling)) { - throw badJsonError(this.constructor, rowData, "Floor and Ceiling must have the same type (either number or null)"); - } - let rangeString; - if (this.Floor === null && this.Ceiling === null) { - rangeString = "--"; - } - else { - if (this.Floor === null || this.Ceiling === null) { - throw new Error(); - } - rangeString = this.Floor === this.Ceiling ? `${this.Ceiling}` : `${this.Floor}-${this.Ceiling}`; - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - this.$id = `${parentId}/${rangeString}`; - } - const rowContents = Array.isArray(rowData) ? rowData.slice(2) : [_.omit(rowData, ["Floor", "Ceiling"])]; - rowContents.forEach(item => { - var _a, _b; - switch (typeof item) { - case "string": { - const str = item; - if (str.match(/http.*\.webp/)) { - if (!this.Display) { - this.Display = {}; - } - if (!this.Display.Images) { - this.Display.Images = []; - } - this.Display.Images.push(str); - } - else if (str.match(/http.*\.png/)) { - if (!this.Display) { - this.Display = {}; - } - if (this.Display.Icon) { - throw badJsonError(this.constructor, str, "Row already has an icon!"); - } - this.Display.Icon = str; - } - else if (!this.Result || ((_a = this.Result) === null || _a === void 0 ? void 0 : _a.length) === 0) { - this.Result = str; - } - else if (!this.Summary || ((_b = this.Summary) === null || _b === void 0 ? void 0 : _b.length) === 0) { - this.Summary = str; - } - else { - throw badJsonError(this.constructor, str, "Unable to infer string assignment"); - } - break; - } - case "object": { - if (this.Floor === null && this.Ceiling === null) { - // null rows only exist to provide display text, so they only get strings assigned to them; - break; - } - _.forEach(item, (value, key) => { - switch (key) { - case "Part of speech": { - if (!this.Content) { - this.Content = new OracleContent({}); - } - this.Content["Part of speech"] = value; - break; - } - case "Subtable": { - if (Array.isArray(value) && Array.isArray(value[0])) { - this.Subtable = value.map(rowData => new Row(this.$id + "/Subtable", rowData)); - } - else if (Array.isArray(value) && typeof value[0] === "object") { - this.Subtable = value.map(rowData => new Row(this.$id + "/Subtable", rowData)); - } - else { - throw badJsonError(this.constructor, value, "expected IOracleTableRow[]"); - } - break; - } - case "Oracle rolls": { - // if (!is(value)) { - // throw badJsonError(this.constructor, value, "expected OracleTableId[]"); - // } - if (!Array.isArray(value)) { - throw badJsonError(this.constructor, value, "expected OracleTableId[]"); - } - this["Oracle rolls"] = value; - break; - } - case "Multiple rolls": { - this["Multiple rolls"] = new MultipleRolls(value); - break; - } - case "Game objects": { - if (!this["Game objects"]) { - this["Game objects"] = []; - } - const gameObjData = value; - gameObjData.forEach(item => { var _a; return (_a = this["Game objects"]) === null || _a === void 0 ? void 0 : _a.push(new GameObject(item)); }); - break; - } - case "Suggestions": { - // console.log("row has suggestions:", JSON.stringify(rowContents)); - let newSuggestions; - if (Array.isArray(value)) { - // console.log("Received a suggestion array, merging...", value); - const suggestData = _.cloneDeep(value); - const suggestItems = suggestData.map(item => new Suggestions(item)); - newSuggestions = suggestItems.reduce((a, b) => _.merge(a, b)); - // console.log("merged multiple suggestions", newSuggestions); - } - else { - newSuggestions = new Suggestions(value); - // console.log("single suggestion", newSuggestions); - } - if (!this.Suggestions) { - this.Suggestions = newSuggestions; - } - else { - this.Suggestions = _.merge(Object.assign({}, this.Suggestions), Object.assign({}, newSuggestions)); - } - // console.log("final suggestions object", this.Suggestions); - break; - } - case "Result": { - if (typeof value !== "string") { - throw badJsonError(this.constructor, value, "expected result string"); - } - if (!this.Result || this.Result.length === 0) { - this.Result = value; - } - break; - } - case "Summary": { - if (typeof value !== "string") { - throw badJsonError(this.constructor, value, "expected summary string"); - } - if (!this.Summary || this.Summary.length === 0) { - this.Summary = value; - } - break; - } - case "Attributes": { - this.Attributes = new AttributeSetter(value); - break; - } - case "Roll template": { - this["Roll template"] = item["Roll template"]; - break; - } - default: - break; - } - }); - break; - } - default: - throw badJsonError(this.constructor, item, "Unable to infer key for object"); - } - }); - if (!this.Result || this.Result.length === 0) { - throw badJsonError(this.constructor, this, "Row doesn't have a result string"); - } - } - // this has to happen after derived class inheritance, rather than during the class constructor, so that class inheritance works properly. it gets done when the Oracle class builds the rows. - // FIXME: alternately, i could write an abstract class or something, oof. - validateRollTemplate() { - if (this["Roll template"]) { - return validateRollTemplate(this, this["Roll template"]); - } - else { - return true; - } - ; - } -} diff --git a/dataforged-tools/src/classes/oracles/TableColumn.js b/dataforged-tools/src/classes/oracles/TableColumn.js deleted file mode 100644 index 2628097c2..000000000 --- a/dataforged-tools/src/classes/oracles/TableColumn.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @internal - */ -export class TextColumn { - constructor(content, label = "Result", key = "Result") { - this.Label = label; - this["Use content from"] = content; - this.Key = key; - } -} -/** - * @internal - */ -export class RollColumn { - constructor(content, label = "Roll") { - this.Label = "Roll"; - this.Label = label; - this["Use content from"] = content; - } -} diff --git a/dataforged-tools/src/classes/oracles/index.js b/dataforged-tools/src/classes/oracles/index.js deleted file mode 100644 index 300a942fd..000000000 --- a/dataforged-tools/src/classes/oracles/index.js +++ /dev/null @@ -1,13 +0,0 @@ -export * from "@classes/oracles/AttributeSetter.js"; -export * from "@classes/oracles/DisplayTable.js"; -export * from "@classes/oracles/GameObject.js"; -export * from "@classes/oracles/MultipleRolls.js"; -export * from "@classes/oracles/Oracle.js"; -export * from "@classes/oracles/OracleCategory.js"; -export * from "@classes/oracles/OracleCategoryDisplay.js"; -export * from "@classes/oracles/OracleContent.js"; -export * from "@classes/oracles/OracleDisplay.js"; -export * from "@classes/oracles/OracleRef.js"; -export * from "@classes/oracles/OracleUsage.js"; -export * from "@classes/oracles/Row.js"; -export * from "@classes/oracles/TableColumn.js"; diff --git a/dataforged-tools/src/classes/setting_truths/SettingTruth.js b/dataforged-tools/src/classes/setting_truths/SettingTruth.js deleted file mode 100644 index e47cbef1a..000000000 --- a/dataforged-tools/src/classes/setting_truths/SettingTruth.js +++ /dev/null @@ -1,17 +0,0 @@ -import { SettingTruthOption, Source, Suggestions } from "@classes/index.js"; -import { buildLog } from "@utils/logging/buildLog.js"; -/** - * @internal - */ -export class SettingTruth { - constructor(json, sourceJson, gamespace) { - var _a; - this.$id = `${gamespace}/Setting_Truths/${json.Name.replaceAll(" ", "_")}`; - buildLog(this.constructor, `Building: ${this.$id}`); - this.Name = json.Name; - this.Table = json.Table.map(row => new SettingTruthOption(this.$id, row)); - this.Character = json.Character; - this.Suggestions = json.Suggestions ? new Suggestions(json.Suggestions) : undefined; - this.Source = new Source((_a = json.Source) !== null && _a !== void 0 ? _a : {}, sourceJson); - } -} diff --git a/dataforged-tools/src/classes/setting_truths/SettingTruthOption.js b/dataforged-tools/src/classes/setting_truths/SettingTruthOption.js deleted file mode 100644 index 36f656151..000000000 --- a/dataforged-tools/src/classes/setting_truths/SettingTruthOption.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Row } from "@classes/index.js"; -/** - * @internal - */ -export class SettingTruthOption extends Row { - constructor(parentId, json) { - super(parentId, json); - this["Description"] = json["Description"]; - this["Quest Starter"] = json["Quest Starter"]; - if (this.Subtable) { - // what is happening here? - this.Subtable = this.Subtable.map(row => { var _a; return new Row(`${(_a = this.$id) !== null && _a !== void 0 ? _a : "--"}/Subtable`.replaceAll(" ", "_"), row); }); - this.Subtable.forEach(row => row.validateRollTemplate()); - } - } -} diff --git a/dataforged-tools/src/classes/setting_truths/index.js b/dataforged-tools/src/classes/setting_truths/index.js deleted file mode 100644 index e267d0a19..000000000 --- a/dataforged-tools/src/classes/setting_truths/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export * from "@classes/setting_truths/SettingTruth.js"; -export * from "@classes/setting_truths/SettingTruthOption.js"; diff --git a/dataforged-tools/src/constants/index.js b/dataforged-tools/src/constants/index.js deleted file mode 100644 index a252d948e..000000000 --- a/dataforged-tools/src/constants/index.js +++ /dev/null @@ -1,8 +0,0 @@ -export const MASTER_DATA_PATH = "../_master-data"; -export const REFS_PATH = MASTER_DATA_PATH + "/_refs"; -export const IS_PATH = MASTER_DATA_PATH + "/Ironsworn"; -export const SF_PATH = MASTER_DATA_PATH + "/Starforged"; -export const JSON_PATHS = ["../dist", "../src", "./src/json", "./build/json"]; -export const MD_PATH = "../markdown"; -export const MASTER_PNG_PATH = MASTER_DATA_PATH + "/Starforged/img/raster/png"; -export const IMG_PATH = MASTER_DATA_PATH + "/Starforged/img"; diff --git a/dataforged-tools/src/dataIronsworn.js b/dataforged-tools/src/dataIronsworn.js deleted file mode 100644 index 50a7f77f4..000000000 --- a/dataforged-tools/src/dataIronsworn.js +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-disable no-restricted-imports */ -import assets_is from "./json/ironsworn/assets.json" assert { type: "json" }; -import encounters_is from "./json/ironsworn/encounters.json" assert { type: "json" }; -import moves_is from "./json/ironsworn/moves.json" assert { type: "json" }; -import oracles_is from "./json/ironsworn/oracles.json" assert { type: "json" }; -/** - * @public - */ -const dataIronsworn = { - assets: assets_is, - encounters: encounters_is, - moves: moves_is, - oracles: oracles_is, -}; -export { dataIronsworn }; diff --git a/dataforged-tools/src/dataStarforged.js b/dataforged-tools/src/dataStarforged.js deleted file mode 100644 index dc4be2a1d..000000000 --- a/dataforged-tools/src/dataStarforged.js +++ /dev/null @@ -1,16 +0,0 @@ -import assetsJson from "./json/starforged/assets.json" assert { type: "json" }; -import encountersJson from "./json/starforged/encounters.json" assert { type: "json" }; -import movesJson from "./json/starforged/moves.json" assert { type: "json" }; -import oraclesJson from "./json/starforged/oracles.json" assert { type: "json" }; -import truthsJson from "./json/starforged/setting_truths.json" assert { type: "json" }; -/** - * @public - */ -const dataStarforged = { - assets: assetsJson, - encounters: encountersJson, - moves: movesJson, - oracles: oraclesJson, - truths: truthsJson, -}; -export { dataStarforged }; diff --git a/dataforged-tools/src/game_objects/GameObjectRecord.js b/dataforged-tools/src/game_objects/GameObjectRecord.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/GameObjectRecord.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/IActorRecord.js b/dataforged-tools/src/game_objects/IActorRecord.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/IActorRecord.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/ICharacterRecord.js b/dataforged-tools/src/game_objects/ICharacterRecord.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/ICharacterRecord.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/ICreatureRecord.js b/dataforged-tools/src/game_objects/ICreatureRecord.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/ICreatureRecord.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/IDerelictRecord.js b/dataforged-tools/src/game_objects/IDerelictRecord.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/IDerelictRecord.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/IDerelictZoneRecord.js b/dataforged-tools/src/game_objects/IDerelictZoneRecord.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/IDerelictZoneRecord.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/IFactionRecord.js b/dataforged-tools/src/game_objects/IFactionRecord.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/IFactionRecord.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/IGameObjectRecordBase.js b/dataforged-tools/src/game_objects/IGameObjectRecordBase.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/IGameObjectRecordBase.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/IPlaceRecord.js b/dataforged-tools/src/game_objects/IPlaceRecord.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/IPlaceRecord.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/IPlanetRecord.js b/dataforged-tools/src/game_objects/IPlanetRecord.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/IPlanetRecord.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/IPrecursorVaultRecord.js b/dataforged-tools/src/game_objects/IPrecursorVaultRecord.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/IPrecursorVaultRecord.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/ISettlementRecord.js b/dataforged-tools/src/game_objects/ISettlementRecord.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/ISettlementRecord.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/IStarshipRecord.js b/dataforged-tools/src/game_objects/IStarshipRecord.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/IStarshipRecord.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/enum/ActorType.js b/dataforged-tools/src/game_objects/enum/ActorType.js deleted file mode 100644 index fbb55db0a..000000000 --- a/dataforged-tools/src/game_objects/enum/ActorType.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @public - */ -export var ActorType; -(function (ActorType) { - ActorType["Character"] = "Character"; - ActorType["Creature"] = "Creature"; - ActorType["Faction"] = "Faction"; -})(ActorType || (ActorType = {})); diff --git a/dataforged-tools/src/game_objects/enum/Atmosphere.js b/dataforged-tools/src/game_objects/enum/Atmosphere.js deleted file mode 100644 index e6e385069..000000000 --- a/dataforged-tools/src/game_objects/enum/Atmosphere.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Set by Oracles / Planets / * / Atmosphere - * @public - */ -var Atmosphere; -(function (Atmosphere) { - Atmosphere["NoneThin"] = "None / Thin"; - Atmosphere["Toxic"] = "Toxic"; - Atmosphere["Corrosive"] = "Corrosive"; - Atmosphere["Marginal"] = "Marginal"; - Atmosphere["Breathable"] = "Breathable"; - Atmosphere["Ideal"] = "Ideal"; -})(Atmosphere || (Atmosphere = {})); -export { Atmosphere }; diff --git a/dataforged-tools/src/game_objects/enum/Authority.js b/dataforged-tools/src/game_objects/enum/Authority.js deleted file mode 100644 index b83921f7a..000000000 --- a/dataforged-tools/src/game_objects/enum/Authority.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Set by Oracles / Settlements / Authority - * - * @public - */ -export var Authority; -(function (Authority) { - Authority["NoneLawless"] = "None / lawless"; - Authority["Ineffectual"] = "Ineffectual"; - Authority["Tolerant"] = "Tolerant"; - Authority["Fair"] = "Fair"; - Authority["Unyielding"] = "Unyielding"; - Authority["Corrupt"] = "Corrupt"; - Authority["Oppressive"] = "Oppressive"; -})(Authority || (Authority = {})); diff --git a/dataforged-tools/src/game_objects/enum/Behavior.js b/dataforged-tools/src/game_objects/enum/Behavior.js deleted file mode 100644 index 2dd7dbb00..000000000 --- a/dataforged-tools/src/game_objects/enum/Behavior.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Set by Oracles / Creatures / Encountered Behavior - * - * @public - */ -var Behavior; -(function (Behavior) { - Behavior["Ambusher"] = "Ambusher"; - Behavior["Hibernator"] = "Hibernator"; - Behavior["PackHunter"] = "Pack hunter"; - Behavior["ApexPredator"] = "Apex predator"; - Behavior["Hoarder"] = "Hoarder"; - Behavior["Prey"] = "Prey"; - Behavior["Builder"] = "Builder"; - Behavior["Hunter"] = "Hunter"; - Behavior["Protector"] = "Protector"; - Behavior["Camouflager"] = "Camouflager"; - Behavior["Lurer"] = "Lurer"; - Behavior["Scavenger"] = "Scavenger"; - Behavior["Forager"] = "Forager"; - Behavior["Migratory"] = "Migratory"; - Behavior["Tracker"] = "Tracker"; - Behavior["Grazer"] = "Grazer"; - Behavior["Mimic"] = "Mimic"; - Behavior["Trapper"] = "Trapper"; - Behavior["Herder"] = "Herder"; - Behavior["Nester"] = "Nester"; -})(Behavior || (Behavior = {})); -export { Behavior }; diff --git a/dataforged-tools/src/game_objects/enum/Biome.js b/dataforged-tools/src/game_objects/enum/Biome.js deleted file mode 100644 index 350ab665d..000000000 --- a/dataforged-tools/src/game_objects/enum/Biome.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * NYI. - * @beta - */ -var Biome; -(function (Biome) { -})(Biome || (Biome = {})); -// TODO -export { Biome }; diff --git a/dataforged-tools/src/game_objects/enum/CreatureScale.js b/dataforged-tools/src/game_objects/enum/CreatureScale.js deleted file mode 100644 index e679a1593..000000000 --- a/dataforged-tools/src/game_objects/enum/CreatureScale.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Set by Oracles / Creatures / Scale/** - * @public - */ -export var CreatureScale; -(function (CreatureScale) { - CreatureScale["Minuscule"] = "Minuscule"; - CreatureScale["Tiny"] = "Tiny"; - CreatureScale["Small"] = "Small"; - CreatureScale["Medium"] = "Medium"; - CreatureScale["Large"] = "Large"; - CreatureScale["Huge"] = "Huge"; - CreatureScale["Titanic"] = "Titanic"; - CreatureScale["Colossal"] = "Colossal"; - CreatureScale["Vast"] = "Vast"; -})(CreatureScale || (CreatureScale = {})); diff --git a/dataforged-tools/src/game_objects/enum/DerelictType.js b/dataforged-tools/src/game_objects/enum/DerelictType.js deleted file mode 100644 index 264ef1354..000000000 --- a/dataforged-tools/src/game_objects/enum/DerelictType.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Set by oracle: Oracles / Derelicts / Type - * @public - */ -var DerelictType; -(function (DerelictType) { - DerelictType["Starship"] = "Starship"; - DerelictType["Settlement"] = "Settlement"; -})(DerelictType || (DerelictType = {})); -export { DerelictType }; diff --git a/dataforged-tools/src/game_objects/enum/Disposition.js b/dataforged-tools/src/game_objects/enum/Disposition.js deleted file mode 100644 index c949d6d27..000000000 --- a/dataforged-tools/src/game_objects/enum/Disposition.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Set by Oracles / Characters / Disposition - * @public - */ -var Disposition; -(function (Disposition) { - Disposition["Cooperative"] = "Cooperative"; - Disposition["Curious"] = "Curious"; - Disposition["Demanding"] = "Demanding"; - Disposition["Desperate"] = "Desperate"; - Disposition["Friendly"] = "Friendly"; - Disposition["Helpful"] = "Helpful"; - Disposition["Hostile"] = "Hostile"; - Disposition["Indifferent"] = "Indifferent"; - Disposition["Suspicious"] = "Suspicious"; - Disposition["Threatening"] = "Threatening"; - Disposition["Unfriendly"] = "Unfriendly"; - Disposition["Wanting"] = "Wanting"; -})(Disposition || (Disposition = {})); -export { Disposition }; diff --git a/dataforged-tools/src/game_objects/enum/Diversity.js b/dataforged-tools/src/game_objects/enum/Diversity.js deleted file mode 100644 index cfcc20896..000000000 --- a/dataforged-tools/src/game_objects/enum/Diversity.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Set by Oracles / Planets / Vital / Diversity - * @public - */ -var Diversity; -(function (Diversity) { - Diversity[Diversity["Simple"] = 2] = "Simple"; - Diversity[Diversity["Diverse"] = 3] = "Diverse"; - Diversity[Diversity["Complex"] = 4] = "Complex"; - Diversity[Diversity["GardenWorld"] = 5] = "GardenWorld"; -})(Diversity || (Diversity = {})); -export { Diversity }; diff --git a/dataforged-tools/src/game_objects/enum/Dominion.js b/dataforged-tools/src/game_objects/enum/Dominion.js deleted file mode 100644 index 8b55a669f..000000000 --- a/dataforged-tools/src/game_objects/enum/Dominion.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Set by Oracles / Factions / Dominion - * @public - */ -var Dominion; -(function (Dominion) { - Dominion["Agriculture"] = "Agriculture"; - Dominion["Artistry"] = "Artistry"; - Dominion["Commerce"] = "Commerce"; - Dominion["Conquest"] = "Conquest"; - Dominion["Construction"] = "Construction"; - Dominion["Diplomacy"] = "Diplomacy"; - Dominion["Education"] = "Education"; - Dominion["Environmentalism"] = "Environmentalism"; - Dominion["Exploration"] = "Exploration"; - Dominion["Faith"] = "Faith"; - Dominion["History"] = "History"; - Dominion["Honor"] = "Honor"; - Dominion["Industry"] = "Industry"; - Dominion["Isolationism"] = "Isolationism"; - Dominion["Law"] = "Law"; - Dominion["Mysticism"] = "Mysticism"; - Dominion["Pacifism"] = "Pacifism"; - Dominion["Prophecy"] = "Prophecy"; - Dominion["Science"] = "Science"; - Dominion["Secrecy"] = "Secrecy"; - Dominion["Technology"] = "Technology"; - Dominion["Treachery"] = "Treachery"; - Dominion["Warfare"] = "Warfare"; - Dominion["Wealth"] = "Wealth"; -})(Dominion || (Dominion = {})); -export { Dominion }; diff --git a/dataforged-tools/src/game_objects/enum/Environment.js b/dataforged-tools/src/game_objects/enum/Environment.js deleted file mode 100644 index f0ee72821..000000000 --- a/dataforged-tools/src/game_objects/enum/Environment.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Set by Oracles / Creatures / Environment - * @public - */ -var Environment; -(function (Environment) { - Environment["Space"] = "Space"; - Environment["Interior"] = "Interior"; - Environment["Land"] = "Land"; - Environment["Liquid"] = "Liquid"; - Environment["Air"] = "Air"; -})(Environment || (Environment = {})); -export { Environment }; diff --git a/dataforged-tools/src/game_objects/enum/FactionType.js b/dataforged-tools/src/game_objects/enum/FactionType.js deleted file mode 100644 index ceb697cc2..000000000 --- a/dataforged-tools/src/game_objects/enum/FactionType.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Set by Oracles / Factions / Type - * @public - */ -var FactionType; -(function (FactionType) { - FactionType["FringeGroup"] = "Fringe Group"; - FactionType["Dominion"] = "Dominion"; - FactionType["Guild"] = "Guild"; -})(FactionType || (FactionType = {})); -; -export { FactionType }; diff --git a/dataforged-tools/src/game_objects/enum/FringeGroup.js b/dataforged-tools/src/game_objects/enum/FringeGroup.js deleted file mode 100644 index 9dbe36d22..000000000 --- a/dataforged-tools/src/game_objects/enum/FringeGroup.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Set by Oracles / Factions / Fringe Group - * @public - */ -var FringeGroup; -(function (FringeGroup) { - FringeGroup["Cultists"] = "Cultists"; - FringeGroup["Exiles"] = "Exiles"; - FringeGroup["Gangsters"] = "Gangsters"; - FringeGroup["Hackers"] = "Hackers"; - FringeGroup["MonsterHunters"] = "Monster hunters"; - FringeGroup["Pirates"] = "Pirates"; - FringeGroup["Raiders"] = "Raiders"; - FringeGroup["Rebels"] = "Rebels"; - FringeGroup["RogueAI"] = "Rogue AI"; - FringeGroup["Scavengers"] = "Scavengers"; - FringeGroup["Smugglers"] = "Smugglers"; -})(FringeGroup || (FringeGroup = {})); -export { FringeGroup }; diff --git a/dataforged-tools/src/game_objects/enum/GameObjectType.js b/dataforged-tools/src/game_objects/enum/GameObjectType.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/game_objects/enum/GameObjectType.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/game_objects/enum/Guild.js b/dataforged-tools/src/game_objects/enum/Guild.js deleted file mode 100644 index 3442438c0..000000000 --- a/dataforged-tools/src/game_objects/enum/Guild.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Set by Oracles / Factions / Guild - * @public - */ -var Guild; -(function (Guild) { - Guild["Assassins"] = "Assassins"; - Guild["BountyHunters"] = "Bounty Hunters"; - Guild["Couriers"] = "Couriers"; - Guild["Courtesans"] = "Courtesans"; - Guild["Engineers"] = "Engineers"; - Guild["Healers"] = "Healers"; - Guild["Industrialists"] = "Industrialists"; - Guild["Mercenaries"] = "Mercenaries"; - Guild["Merchants"] = "Merchants"; - Guild["Mystics"] = "Mystics"; - Guild["Navigators"] = "Navigators"; - Guild["Peacekeepers"] = "Peacekeepers"; - Guild["Researchers"] = "Researchers"; - Guild["Spies"] = "Spies"; -})(Guild || (Guild = {})); -export { Guild }; diff --git a/dataforged-tools/src/game_objects/enum/Influence.js b/dataforged-tools/src/game_objects/enum/Influence.js deleted file mode 100644 index 1b983aa0e..000000000 --- a/dataforged-tools/src/game_objects/enum/Influence.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Set by Oracles / Factions / Influence - * @public - */ -var Influence; -(function (Influence) { - Influence["Forsaken"] = "Forsaken"; - Influence["Isolated"] = "Isolated"; - Influence["Localized"] = "Localized"; - Influence["Established"] = "Established"; - Influence["Notable"] = "Notable"; - Influence["Dominant"] = "Dominant"; - Influence["Inescapable"] = "Inescapable"; -})(Influence || (Influence = {})); -export { Influence }; diff --git a/dataforged-tools/src/game_objects/enum/Leadership.js b/dataforged-tools/src/game_objects/enum/Leadership.js deleted file mode 100644 index 31bd7e731..000000000 --- a/dataforged-tools/src/game_objects/enum/Leadership.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Set by Oracles / Factions / Leadership - * @public - */ -var Leadership; -(function (Leadership) { - Leadership["Anarchist"] = "Anarchist"; - Leadership["DisputedLeadership"] = "Disputed leadership"; - Leadership["AuthoritarianDictatorship"] = "Authoritarian dictatorship"; - Leadership["OligarchicalElite"] = "Oligarchical elite"; - Leadership["DynasticLineage"] = "Dynastic lineage"; - Leadership["FatedOrProphesiedLeader"] = "Fated or prophesied leader"; - Leadership["ClanChiefsOrElders"] = "Clan chiefs or elders"; - Leadership["ElectedRepresentatives"] = "Elected representatives"; - Leadership["MachineIntelligence"] = "Machine intelligence"; - Leadership["VariedDecentralized"] = "Varied / decentralized"; -})(Leadership || (Leadership = {})); -export { Leadership }; diff --git a/dataforged-tools/src/game_objects/enum/Life.js b/dataforged-tools/src/game_objects/enum/Life.js deleted file mode 100644 index ded46ef93..000000000 --- a/dataforged-tools/src/game_objects/enum/Life.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Set by Oracles / Planets / * / Life - * @public - */ -var Life; -(function (Life) { - Life["None"] = "None"; - Life["Extinct"] = "Extinct"; - Life["Scarce"] = "Scarce"; - Life["Diverse"] = "Diverse"; - Life["Bountiful"] = "Bountiful"; - Life["Overrun"] = "Overrun"; -})(Life || (Life = {})); -export { Life }; diff --git a/dataforged-tools/src/game_objects/enum/Location.js b/dataforged-tools/src/game_objects/enum/Location.js deleted file mode 100644 index 482904dc1..000000000 --- a/dataforged-tools/src/game_objects/enum/Location.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Set by Oracles / ** / Location - * @public - */ -var Location; -(function (Location) { - Location["Planetside"] = "Planetside"; - Location["Orbital"] = "Orbital"; - Location["DeepSpace"] = "Deep Space"; -})(Location || (Location = {})); -export { Location }; diff --git a/dataforged-tools/src/game_objects/enum/LocationTheme.js b/dataforged-tools/src/game_objects/enum/LocationTheme.js deleted file mode 100644 index f1ccc5918..000000000 --- a/dataforged-tools/src/game_objects/enum/LocationTheme.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Set by Oracles / Location Themes / Theme Type - * @public - */ -var LocationTheme; -(function (LocationTheme) { - LocationTheme["Chaotic"] = "Chaotic"; - LocationTheme["Fortified"] = "Fortified"; - LocationTheme["Haunted"] = "Haunted"; - LocationTheme["Infested"] = "Infested"; - LocationTheme["Inhabited"] = "Inhabited"; - LocationTheme["Mechanical"] = "Mechanical"; - LocationTheme["Ruined"] = "Ruined"; - LocationTheme["Sacred"] = "Sacred"; -})(LocationTheme || (LocationTheme = {})); -export { LocationTheme }; diff --git a/dataforged-tools/src/game_objects/enum/PlaceType.js b/dataforged-tools/src/game_objects/enum/PlaceType.js deleted file mode 100644 index abe99a4d0..000000000 --- a/dataforged-tools/src/game_objects/enum/PlaceType.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @public - */ -export var PlaceType; -(function (PlaceType) { - PlaceType["Derelict"] = "Derelict"; - PlaceType["DerelictZone"] = "Derelict Zone"; - PlaceType["Starship"] = "Starship"; - PlaceType["Settlement"] = "Settlement"; - PlaceType["Planet"] = "Planet"; - PlaceType["PrecursorVault"] = "Precursor Vault"; -})(PlaceType || (PlaceType = {})); diff --git a/dataforged-tools/src/game_objects/enum/PlanetaryClass.js b/dataforged-tools/src/game_objects/enum/PlanetaryClass.js deleted file mode 100644 index 55d36211d..000000000 --- a/dataforged-tools/src/game_objects/enum/PlanetaryClass.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Set by "Oracles / Planets / Class" - * @public - */ -var PlanetaryClass; -(function (PlanetaryClass) { - PlanetaryClass["Desert"] = "Desert"; - PlanetaryClass["Furnace"] = "Furnace"; - PlanetaryClass["Grave"] = "Grave"; - PlanetaryClass["Ice"] = "Ice"; - PlanetaryClass["Jovian"] = "Jovian"; - PlanetaryClass["Jungle"] = "Jungle"; - PlanetaryClass["Ocean"] = "Ocean"; - PlanetaryClass["Rocky"] = "Rocky"; - PlanetaryClass["Shattered"] = "Shattered"; - PlanetaryClass["Tainted"] = "Tainted"; - PlanetaryClass["Vital"] = "Vital"; -})(PlanetaryClass || (PlanetaryClass = {})); -export { PlanetaryClass }; diff --git a/dataforged-tools/src/game_objects/enum/Population.js b/dataforged-tools/src/game_objects/enum/Population.js deleted file mode 100644 index 11acec86d..000000000 --- a/dataforged-tools/src/game_objects/enum/Population.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Set by Oracles / Settlements / Population - * @public - */ -export var Population; -(function (Population) { - Population["Few"] = "Few"; - Population["Dozens"] = "Dozens"; - Population["Hundreds"] = "Hundreds"; - Population["Thousands"] = "Thousands"; - Population["TensOfThousands"] = "Tens of thousands"; -})(Population || (Population = {})); diff --git a/dataforged-tools/src/game_objects/enum/Region.js b/dataforged-tools/src/game_objects/enum/Region.js deleted file mode 100644 index 01a9f0f04..000000000 --- a/dataforged-tools/src/game_objects/enum/Region.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @public - */ -export var Region; -(function (Region) { - Region["Terminus"] = "Terminus"; - Region["Outlands"] = "Outlands"; - Region["Expanse"] = "Expanse"; -})(Region || (Region = {})); diff --git a/dataforged-tools/src/game_objects/enum/Role.js b/dataforged-tools/src/game_objects/enum/Role.js deleted file mode 100644 index 2cf4b0649..000000000 --- a/dataforged-tools/src/game_objects/enum/Role.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Set by Oracles / Character / Role - * @public - */ -var Role; -(function (Role) { - Role["Agent"] = "Agent"; - Role["AI"] = "AI"; - Role["Artisan"] = "Artisan"; - Role["Assassin"] = "Assassin"; - Role["BountyHunter"] = "Hunter"; - Role["Courier"] = "Courier"; - Role["Crew"] = "Crew"; - Role["Criminal"] = "Criminal"; - Role["Cultist"] = "Cultist"; - Role["Diplomat"] = "Diplomat"; - Role["Engineer"] = "Engineer"; - Role["Entertainer"] = "Entertainer"; - Role["Explorer"] = "Explorer"; - Role["Farmer"] = "Farmer"; - Role["Fugitive"] = "Fugitive"; - Role["Guard"] = "Guard"; - Role["Guide"] = "Guide"; - Role["Healer"] = "Healer"; - Role["Historian"] = "Historian"; - Role["Hunter"] = "Hunter"; - Role["Investigator"] = "Investigator"; - Role["Laborer"] = "Laborer"; - Role["Lawkeeper"] = "Lawkeeper"; - Role["Leader"] = "Leader"; - Role["Mercenary"] = "Mercenary"; - Role["Merchant"] = "Merchant"; - Role["Miner"] = "Miner"; - Role["Mystic"] = "Mystic"; - Role["Navigator"] = "Navigator"; - Role["Outcast"] = "Outcast"; - Role["Pilgrim"] = "Pilgrim"; - Role["Pilot"] = "Pilot"; - Role["Pirate"] = "Pirate"; - Role["Preacher"] = "Preacher"; - Role["Prophet"] = "Prophet"; - Role["Raider"] = "Raider"; - Role["Researcher"] = "Researcher"; - Role["Scavenger"] = "Scavenger"; - Role["Scholar"] = "Scholar"; - Role["Scout"] = "Scout"; - Role["Shipwright"] = "Shipwright"; - Role["Smuggler"] = "Smuggler"; - Role["Soldier"] = "Soldier"; - Role["Spacer"] = "Spacer"; - Role["Technician"] = "Technician"; - Role["Thief"] = "Thief"; -})(Role || (Role = {})); -export { Role }; diff --git a/dataforged-tools/src/game_objects/enum/SettlementInitialContact.js b/dataforged-tools/src/game_objects/enum/SettlementInitialContact.js deleted file mode 100644 index e869235ff..000000000 --- a/dataforged-tools/src/game_objects/enum/SettlementInitialContact.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @public - */ -export var SettlementInitialContact; -(function (SettlementInitialContact) { - SettlementInitialContact["AskingForHelp"] = "Asking for help"; - SettlementInitialContact["Captured"] = "Captured"; - SettlementInitialContact["Derelict"] = "Derelict"; - SettlementInitialContact["Destroyed"] = "Destroyed"; - SettlementInitialContact["Hostile"] = "Hostile"; - SettlementInitialContact["InBattle"] = "In battle"; - SettlementInitialContact["NeutralAutomated"] = "Neutral / automated"; - SettlementInitialContact["Uncooperative"] = "Uncooperative"; - SettlementInitialContact["Unresponsive"] = "Unresponsive"; - SettlementInitialContact["Wary"] = "Wary"; - SettlementInitialContact["Welcoming"] = "Welcoming"; -})(SettlementInitialContact || (SettlementInitialContact = {})); diff --git a/dataforged-tools/src/game_objects/enum/StarshipInitialContact.js b/dataforged-tools/src/game_objects/enum/StarshipInitialContact.js deleted file mode 100644 index b2f865cfe..000000000 --- a/dataforged-tools/src/game_objects/enum/StarshipInitialContact.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @public - */ -export var StarshipInitialContact; -(function (StarshipInitialContact) { - StarshipInitialContact["AskingForHelp"] = "Asking for help"; - StarshipInitialContact["Derelict"] = "Derelict"; - StarshipInitialContact["Destroyed"] = "Destroyed"; - StarshipInitialContact["Dismissive"] = "Dismissive"; - StarshipInitialContact["Familiar"] = "Familiar"; - StarshipInitialContact["Friendly"] = "Friendly"; - StarshipInitialContact["Hostile"] = "Hostile"; - StarshipInitialContact["InBattle"] = "In battle"; - StarshipInitialContact["NeutralAutomated"] = "Neutral / automated"; - StarshipInitialContact["Uncooperative"] = "Uncooperative"; - StarshipInitialContact["Unresponsive"] = "Unresponsive"; - StarshipInitialContact["Wary"] = "Wary"; -})(StarshipInitialContact || (StarshipInitialContact = {})); diff --git a/dataforged-tools/src/game_objects/enum/VaultZone.js b/dataforged-tools/src/game_objects/enum/VaultZone.js deleted file mode 100644 index 6ee66b9d0..000000000 --- a/dataforged-tools/src/game_objects/enum/VaultZone.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @public - */ -export var VaultZone; -(function (VaultZone) { - VaultZone["Interior"] = "Interior"; - VaultZone["Sanctum"] = "Sanctum"; -})(VaultZone || (VaultZone = {})); diff --git a/dataforged-tools/src/game_objects/enum/Zone.js b/dataforged-tools/src/game_objects/enum/Zone.js deleted file mode 100644 index ca46f03c0..000000000 --- a/dataforged-tools/src/game_objects/enum/Zone.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @public - */ -export var Zone; -(function (Zone) { - Zone["Access"] = "Access"; - Zone["Community"] = "Community"; - Zone["Engineering"] = "Engineering"; - Zone["Living"] = "Living"; - Zone["Medical"] = "Medical"; - Zone["Operations"] = "Operations"; - Zone["Production"] = "Production"; - Zone["Research"] = "Research"; -})(Zone || (Zone = {})); diff --git a/dataforged-tools/src/game_objects/enum/index.js b/dataforged-tools/src/game_objects/enum/index.js deleted file mode 100644 index 5ef53a8cf..000000000 --- a/dataforged-tools/src/game_objects/enum/index.js +++ /dev/null @@ -1,29 +0,0 @@ -export * from "@game_objects/enum/ActorType.js"; -export * from "@game_objects/enum/Atmosphere.js"; -export * from "@game_objects/enum/Authority.js"; -export * from "@game_objects/enum/Behavior.js"; -export * from "@game_objects/enum/Biome.js"; -export * from "@game_objects/enum/DerelictType.js"; -export * from "@game_objects/enum/Disposition.js"; -export * from "@game_objects/enum/Diversity.js"; -export * from "@game_objects/enum/Dominion.js"; -export * from "@game_objects/enum/Environment.js"; -export * from "@game_objects/enum/FactionType.js"; -export * from "@game_objects/enum/FringeGroup.js"; -export * from "@game_objects/enum/GameObjectType.js"; -export * from "@game_objects/enum/Guild.js"; -export * from "@game_objects/enum/Influence.js"; -export * from "@game_objects/enum/Leadership.js"; -export * from "@game_objects/enum/Life.js"; -export * from "@game_objects/enum/Location.js"; -export * from "@game_objects/enum/LocationTheme.js"; -export * from "@game_objects/enum/PlaceType.js"; -export * from "@game_objects/enum/PlanetaryClass.js"; -export * from "@game_objects/enum/Population.js"; -export * from "@game_objects/enum/Region.js"; -export * from "@game_objects/enum/Role.js"; -export * from "@game_objects/enum/CreatureScale.js"; -export * from "@game_objects/enum/SettlementInitialContact.js"; -export * from "@game_objects/enum/StarshipInitialContact.js"; -export * from "@game_objects/enum/VaultZone.js"; -export * from "@game_objects/enum/Zone.js"; diff --git a/dataforged-tools/src/game_objects/index.js b/dataforged-tools/src/game_objects/index.js deleted file mode 100644 index ae4b57529..000000000 --- a/dataforged-tools/src/game_objects/index.js +++ /dev/null @@ -1,14 +0,0 @@ -export * from "@game_objects/enum/index.js"; -export * from "@game_objects/GameObjectRecord.js"; -export * from "@game_objects/IActorRecord.js"; -export * from "@game_objects/ICharacterRecord.js"; -export * from "@game_objects/ICreatureRecord.js"; -export * from "@game_objects/IDerelictRecord.js"; -export * from "@game_objects/IDerelictZoneRecord.js"; -export * from "@game_objects/IFactionRecord.js"; -export * from "@game_objects/IGameObjectRecordBase.js"; -export * from "@game_objects/IPlaceRecord.js"; -export * from "@game_objects/IPlanetRecord.js"; -export * from "@game_objects/IPrecursorVaultRecord.js"; -export * from "@game_objects/ISettlementRecord.js"; -export * from "@game_objects/IStarshipRecord.js"; diff --git a/dataforged-tools/src/index.js b/dataforged-tools/src/index.js deleted file mode 100644 index 246230c3b..000000000 --- a/dataforged-tools/src/index.js +++ /dev/null @@ -1,5 +0,0 @@ -/* eslint-disable no-restricted-imports */ -export { dataStarforged } from "./dataStarforged.js"; -export { dataIronsworn } from "./dataIronsworn.js"; -export * from "@json_out/index.js"; -export * from "@utils/index.js"; diff --git a/dataforged-tools/src/json_out/DataforgedJsonRoot.js b/dataforged-tools/src/json_out/DataforgedJsonRoot.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/DataforgedJsonRoot.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/assets/AssetConditionMeterId.js b/dataforged-tools/src/json_out/assets/AssetConditionMeterId.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/assets/AssetConditionMeterId.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/assets/AssetTypeName.js b/dataforged-tools/src/json_out/assets/AssetTypeName.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/assets/AssetTypeName.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/assets/IAlterMove.js b/dataforged-tools/src/json_out/assets/IAlterMove.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/assets/IAlterMove.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/assets/IAsset.js b/dataforged-tools/src/json_out/assets/IAsset.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/assets/IAsset.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/assets/IAssetAbility.js b/dataforged-tools/src/json_out/assets/IAssetAbility.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/assets/IAssetAbility.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/assets/IAssetAttachment.js b/dataforged-tools/src/json_out/assets/IAssetAttachment.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/assets/IAssetAttachment.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/assets/IAssetType.js b/dataforged-tools/src/json_out/assets/IAssetType.js deleted file mode 100644 index 068c8e112..000000000 --- a/dataforged-tools/src/json_out/assets/IAssetType.js +++ /dev/null @@ -1 +0,0 @@ -export * from "@utils/types/RequireKey.js"; diff --git a/dataforged-tools/src/json_out/assets/IInput.js b/dataforged-tools/src/json_out/assets/IInput.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/assets/IInput.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/assets/IInputSelect.js b/dataforged-tools/src/json_out/assets/IInputSelect.js deleted file mode 100644 index 9971f83a2..000000000 --- a/dataforged-tools/src/json_out/assets/IInputSelect.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * The type of an attribute set by a Select Input. - * @public - */ -export var InputSelectOptionType; -(function (InputSelectOptionType) { - /** - * A reference to one of the player character's stats: Edge, Heart, Iron, Shadow, or Wits. - * @see {@link Stat} - */ - InputSelectOptionType["Stat"] = "Stat"; - /** - * A reference to one of the player character's condition meters: Health, Spirit, or Supply. - * @see {@link ConditionMeterName} - */ - InputSelectOptionType["ConditionMeter"] = "Condition Meter"; - /** - * An arbitrary pre-set string value. - */ - InputSelectOptionType["String"] = "String"; - /** - * A arbitrary pre-set number value. - */ - InputSelectOptionType["Number"] = "Number"; -})(InputSelectOptionType || (InputSelectOptionType = {})); diff --git a/dataforged-tools/src/json_out/assets/IInputSelectOption.js b/dataforged-tools/src/json_out/assets/IInputSelectOption.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/assets/IInputSelectOption.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/assets/index.js b/dataforged-tools/src/json_out/assets/index.js deleted file mode 100644 index 65c1eff1c..000000000 --- a/dataforged-tools/src/json_out/assets/index.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Types describing asset cards in *Ironsworn* and *Ironsworn: Starforged*. - * @module Json.Assets - */ -export * from "@json_out/assets/AssetConditionMeterId.js"; -export * from "@json_out/assets/AssetTypeName.js"; -export * from "@json_out/assets/IAlterMove.js"; -export * from "@json_out/assets/IAsset.js"; -export * from "@json_out/assets/IAssetAbility.js"; -export * from "@json_out/assets/IAssetAttachment.js"; -export * from "@json_out/assets/IAssetType.js"; -export * from "@json_out/assets/IInput.js"; -export * from "@json_out/assets/IInputSelect.js"; -export * from "@json_out/assets/IInputSelectOption.js"; diff --git a/dataforged-tools/src/json_out/common/ChallengeRank.js b/dataforged-tools/src/json_out/common/ChallengeRank.js deleted file mode 100644 index a65541030..000000000 --- a/dataforged-tools/src/json_out/common/ChallengeRank.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Enumerates challenge ranks. - * @seePage 39 - * @public - */ -var ChallengeRank; -(function (ChallengeRank) { - ChallengeRank[ChallengeRank["Troublesome"] = 1] = "Troublesome"; - ChallengeRank[ChallengeRank["Dangerous"] = 2] = "Dangerous"; - ChallengeRank[ChallengeRank["Formidable"] = 3] = "Formidable"; - ChallengeRank[ChallengeRank["Extreme"] = 4] = "Extreme"; - ChallengeRank[ChallengeRank["Epic"] = 5] = "Epic"; -})(ChallengeRank || (ChallengeRank = {})); -export { ChallengeRank }; diff --git a/dataforged-tools/src/json_out/common/ClockSegments.js b/dataforged-tools/src/json_out/common/ClockSegments.js deleted file mode 100644 index 12f20eeb4..000000000 --- a/dataforged-tools/src/json_out/common/ClockSegments.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @public - */ -export var ClockSegments; -(function (ClockSegments) { - ClockSegments[ClockSegments["Four"] = 4] = "Four"; - ClockSegments[ClockSegments["Six"] = 6] = "Six"; - ClockSegments[ClockSegments["Eight"] = 8] = "Eight"; - ClockSegments[ClockSegments["Ten"] = 10] = "Ten"; -})(ClockSegments || (ClockSegments = {})); diff --git a/dataforged-tools/src/json_out/common/ClockType.js b/dataforged-tools/src/json_out/common/ClockType.js deleted file mode 100644 index e18980053..000000000 --- a/dataforged-tools/src/json_out/common/ClockType.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * See clocks (p. 234) for more information. - * @public - */ -export var ClockType; -(function (ClockType) { - ClockType["Tension"] = "Tension"; - ClockType["Campaign"] = "Campaign"; -})(ClockType || (ClockType = {})); diff --git a/dataforged-tools/src/json_out/common/Gamespace.js b/dataforged-tools/src/json_out/common/Gamespace.js deleted file mode 100644 index 884e673eb..000000000 --- a/dataforged-tools/src/json_out/common/Gamespace.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Some might say that "Gamespace" is a terrible pun. To them, I reply: you'll never take me alive. - * @public - */ -export var Gamespace; -(function (Gamespace) { - Gamespace["Starforged"] = "Starforged"; - Gamespace["Ironsworn"] = "Ironsworn"; -})(Gamespace || (Gamespace = {})); diff --git a/dataforged-tools/src/json_out/common/IConditionMeter.js b/dataforged-tools/src/json_out/common/IConditionMeter.js deleted file mode 100644 index a9df04287..000000000 --- a/dataforged-tools/src/json_out/common/IConditionMeter.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Standard player character condition meters. - * @public - */ -export var ConditionMeterName; -(function (ConditionMeterName) { - ConditionMeterName["Health"] = "Health"; - ConditionMeterName["Spirit"] = "Spirit"; - ConditionMeterName["Supply"] = "Supply"; -})(ConditionMeterName || (ConditionMeterName = {})); diff --git a/dataforged-tools/src/json_out/common/ICounter.js b/dataforged-tools/src/json_out/common/ICounter.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/common/ICounter.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/common/ICustomStat.js b/dataforged-tools/src/json_out/common/ICustomStat.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/common/ICustomStat.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/common/ICustomStatOption.js b/dataforged-tools/src/json_out/common/ICustomStatOption.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/common/ICustomStatOption.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/common/InputType.js b/dataforged-tools/src/json_out/common/InputType.js deleted file mode 100644 index 47f65604b..000000000 --- a/dataforged-tools/src/json_out/common/InputType.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @public - */ -export var InputType; -(function (InputType) { - /** - * @see {@link IInputText} - */ - InputType["Text"] = "Text"; - /** - * @see {@link IInputSelect} - */ - InputType["Select"] = "Select"; - /** - * @see {@link IInputNumber} - */ - InputType["Number"] = "Number"; - /** - * @see {@link IInputClock} - */ - InputType["Clock"] = "Clock"; -})(InputType || (InputType = {})); diff --git a/dataforged-tools/src/json_out/common/MeterAlias.js b/dataforged-tools/src/json_out/common/MeterAlias.js deleted file mode 100644 index 71d03cb38..000000000 --- a/dataforged-tools/src/json_out/common/MeterAlias.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Names of non-player condition meters (for e.g. companions and vehicles) that are referenced by moves and other assets. - * If an asset condition meter can be used in this manner, the alias is included in its Aliases array. - * @public - */ -export var MeterAlias; -(function (MeterAlias) { - MeterAlias["CompanionHealth"] = "Companion Health"; - MeterAlias["VehicleIntegrity"] = "Vehicle Integrity"; - MeterAlias["CommandVehicleIntegrity"] = "Command Vehicle Integrity"; - MeterAlias["SupportVehicleIntegrity"] = "Support Vehicle Integrity"; - MeterAlias["IncidentalVehicleIntegrity"] = "Incidental Vehicle Integrity"; -})(MeterAlias || (MeterAlias = {})); diff --git a/dataforged-tools/src/json_out/common/MeterCondition.js b/dataforged-tools/src/json_out/common/MeterCondition.js deleted file mode 100644 index 044d72c57..000000000 --- a/dataforged-tools/src/json_out/common/MeterCondition.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Conditions (such as impacts) that can apply to asset cards with condition meters. These are typically presented as tick boxes on the asset card. - * @public - */ -export var MeterCondition; -(function (MeterCondition) { - /** - * Battered may be marked when your vehicle is at 0 integrity and you fail to Withstand Damage. The vehicle is barely holding together. - * @seePage 51 - */ - MeterCondition["Battered"] = "Battered"; - /** - * Cursed may be marked when your command vehicle (STARSHIP asset) is at 0 integrity and you fail to Withstand Damage. This is a permanent impact. Your ship will never be quite right again. - * @seePage 51 - */ - MeterCondition["Cursed"] = "Cursed"; - /** - * When your companion’s health is at 0 and you score a miss, they are out of action. You cannot leverage their support until they gain at least +1 health. Envision what this means in the fiction of your scene. - * @seePage 204 - */ - MeterCondition["OutOfAction"] = "Out of Action"; -})(MeterCondition || (MeterCondition = {})); diff --git a/dataforged-tools/src/json_out/common/MeterType.js b/dataforged-tools/src/json_out/common/MeterType.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/common/MeterType.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/common/ProgressType.js b/dataforged-tools/src/json_out/common/ProgressType.js deleted file mode 100644 index 3dbaf379f..000000000 --- a/dataforged-tools/src/json_out/common/ProgressType.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @public - */ -export var LegacyType; -(function (LegacyType) { - LegacyType["Quests"] = "Quests"; - LegacyType["Bonds"] = "Bonds"; - LegacyType["Discoveries"] = "Discoveries"; -})(LegacyType || (LegacyType = {})); -/** - * @public - */ -export var ProgressTrackType; -(function (ProgressTrackType) { - ProgressTrackType["Combat"] = "Combat"; - ProgressTrackType["Vow"] = "Vow"; - ProgressTrackType["Expedition"] = "Expedition"; - ProgressTrackType["Connection"] = "Connection"; - ProgressTrackType["SceneChallenge"] = "Scene Challenge"; -})(ProgressTrackType || (ProgressTrackType = {})); diff --git a/dataforged-tools/src/json_out/common/Replacement.js b/dataforged-tools/src/json_out/common/Replacement.js deleted file mode 100644 index 57ba90111..000000000 --- a/dataforged-tools/src/json_out/common/Replacement.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Standard replacement strings, used by constructors when processing the master YAML data. - * @public - */ -export var Replacement; -(function (Replacement) { - /** - * Replace with the ID of the nearest ancestor asset. - */ - Replacement["Asset"] = "${{@ASSET}}"; - /** - * Replace with the ID of the nearest ancestor asset's condition meter. - */ - Replacement["AssetMeter"] = "${{@ASSET_METER}}"; - /** - * Replace with the ID of the nearest ancestor move trigger's custom stat. - */ - Replacement["CustomStat"] = "${{@CUSTOM_STAT}}"; - /** - * Replace with the ID of the nearest select option value of the Stat type - */ - Replacement["AssetSelectStat"] = "${{@ASSET_SELECT_STAT}}"; - /** - * Replace with the ID of the nearest select option value of the ConditionMeter type. - */ - Replacement["AssetSelectMeter"] = "${{@ASSET_SELECT_METER}}"; -})(Replacement || (Replacement = {})); diff --git a/dataforged-tools/src/json_out/common/RollableStat.js b/dataforged-tools/src/json_out/common/RollableStat.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/common/RollableStat.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/common/Stat.js b/dataforged-tools/src/json_out/common/Stat.js deleted file mode 100644 index 8ee7f9b96..000000000 --- a/dataforged-tools/src/json_out/common/Stat.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @public - */ -export var Stat; -(function (Stat) { - Stat["Edge"] = "Edge"; - Stat["Heart"] = "Heart"; - Stat["Iron"] = "Iron"; - Stat["Shadow"] = "Shadow"; - Stat["Wits"] = "Wits"; -})(Stat || (Stat = {})); diff --git a/dataforged-tools/src/json_out/common/index.js b/dataforged-tools/src/json_out/common/index.js deleted file mode 100644 index dec2156cf..000000000 --- a/dataforged-tools/src/json_out/common/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Types describing elements common to many *Ironsworn: Starforged* game objects in Dataforged. - * @module Json.Common - */ -export * from "@json_out/common/ChallengeRank.js"; -export * from "@json_out/common/ClockSegments.js"; -export * from "@json_out/common/ClockType.js"; -export * from "@json_out/common/Gamespace.js"; -export * from "@json_out/common/IConditionMeter.js"; -export * from "@json_out/common/ICounter.js"; -export * from "@json_out/common/ICustomStat.js"; -export * from "@json_out/common/InputType.js"; -export * from "@json_out/common/MeterAlias.js"; -export * from "@json_out/common/MeterCondition.js"; -export * from "@json_out/common/MeterType.js"; -export * from "@json_out/common/ProgressType.js"; -export * from "@json_out/common/Replacement.js"; -export * from "@json_out/common/RollableStat.js"; -export * from "@json_out/common/Stat.js"; -export * from "@json_out/common/ICustomStatOption.js"; diff --git a/dataforged-tools/src/json_out/encounters/EncounterNature.js b/dataforged-tools/src/json_out/encounters/EncounterNature.js deleted file mode 100644 index 4764a489a..000000000 --- a/dataforged-tools/src/json_out/encounters/EncounterNature.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @public - */ -export var EncounterNatureStarforged; -(function (EncounterNatureStarforged) { - EncounterNatureStarforged["Creature"] = "Creature"; - EncounterNatureStarforged["Horror"] = "Horror"; - EncounterNatureStarforged["Human"] = "Human"; - EncounterNatureStarforged["Machine"] = "Machine"; - EncounterNatureStarforged["Monster"] = "Monster"; -})(EncounterNatureStarforged || (EncounterNatureStarforged = {})); -/** - * @public - */ -export var EncounterNatureIronsworn; -(function (EncounterNatureIronsworn) { - EncounterNatureIronsworn["Ironlander"] = "Ironlander"; - EncounterNatureIronsworn["Firstborn"] = "Firstborn"; - EncounterNatureIronsworn["Animal"] = "Animal"; - EncounterNatureIronsworn["Beast"] = "Beast"; - EncounterNatureIronsworn["Horror"] = "Horror"; - EncounterNatureIronsworn["Anomaly"] = "Anomaly"; -})(EncounterNatureIronsworn || (EncounterNatureIronsworn = {})); -; diff --git a/dataforged-tools/src/json_out/encounters/EncounterTags.js b/dataforged-tools/src/json_out/encounters/EncounterTags.js deleted file mode 100644 index 911add817..000000000 --- a/dataforged-tools/src/json_out/encounters/EncounterTags.js +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @public - */ -export var EncounterTags; -(function (EncounterTags) { - EncounterTags["Vehicle"] = "vehicle"; -})(EncounterTags || (EncounterTags = {})); diff --git a/dataforged-tools/src/json_out/encounters/IEncounter.js b/dataforged-tools/src/json_out/encounters/IEncounter.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/encounters/IEncounter.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/encounters/IEncounterBase.js b/dataforged-tools/src/json_out/encounters/IEncounterBase.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/encounters/IEncounterBase.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/encounters/IEncounterIronsworn.js b/dataforged-tools/src/json_out/encounters/IEncounterIronsworn.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/encounters/IEncounterIronsworn.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/encounters/IEncounterNatureInfo.js b/dataforged-tools/src/json_out/encounters/IEncounterNatureInfo.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/encounters/IEncounterNatureInfo.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/encounters/IEncounterStarforged.js b/dataforged-tools/src/json_out/encounters/IEncounterStarforged.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/encounters/IEncounterStarforged.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/encounters/IEncounterVariant.js b/dataforged-tools/src/json_out/encounters/IEncounterVariant.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/encounters/IEncounterVariant.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/encounters/index.js b/dataforged-tools/src/json_out/encounters/index.js deleted file mode 100644 index dc68b640c..000000000 --- a/dataforged-tools/src/json_out/encounters/index.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Types describing encounters in *Ironsworn: Starforged*. - * @module Json.Encounters - */ -export * from "@json_out/encounters/EncounterNature.js"; -export * from "@json_out/encounters/EncounterTags.js"; -export * from "@json_out/encounters/IEncounter.js"; -export * from "@json_out/encounters/IEncounterBase.js"; -export * from "@json_out/encounters/IEncounterIronsworn.js"; -export * from "@json_out/encounters/IEncounterNatureInfo.js"; -export * from "@json_out/encounters/IEncounterStarforged.js"; -export * from "@json_out/encounters/IEncounterVariant.js"; diff --git a/dataforged-tools/src/json_out/game_objects/AttributeKey.js b/dataforged-tools/src/json_out/game_objects/AttributeKey.js deleted file mode 100644 index e5a3708b7..000000000 --- a/dataforged-tools/src/json_out/game_objects/AttributeKey.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * @public - */ -export var AttributeKey; -(function (AttributeKey) { - /** - * {@link Json.GameObjects#Atmosphere} - */ - AttributeKey["Atmosphere"] = "Atmosphere"; - /** - * {@link Json.GameObjects#Authority} - */ - AttributeKey["Authority"] = "Authority"; - /** - * {@link Json.GameObjects#Behavior} - */ - AttributeKey["Behavior"] = "Encountered Behavior"; - /** - * {@link Json.GameObjects#DerelictType} - */ - AttributeKey["DerelictType"] = "Derelict Type"; - /** - * {@link Json.GameObjects#Disposition} - */ - AttributeKey["Disposition"] = "Disposition"; - /** - * {@link Json.GameObjects#Dominion} - */ - AttributeKey["Dominion"] = "Dominion"; - /** - * {@link Json.GameObjects#Environment} - */ - AttributeKey["Environment"] = "Environment"; - /** - * {@link Json.GameObjects#FactionType} - */ - AttributeKey["FactionType"] = "Faction Type"; - /** - * {@link Json.GameObjects#FringeGroup} - */ - AttributeKey["FringeGroup"] = "Fringe Group"; - /** - * {@link Json.GameObjects#Guild} - */ - AttributeKey["Guild"] = "Guild"; - /** - * {@link Json.GameObjects#Influence} - */ - AttributeKey["Influence"] = "Influence"; - /** - * {@link Json.GameObjects#InitialContact} - */ - AttributeKey["InitialContact"] = "Initial Contact"; - /** - * {@link Json.GameObjects#Leadership} - */ - AttributeKey["Leadership"] = "Leadership"; - /** - * {@link Json.GameObjects#Life} - */ - AttributeKey["Life"] = "Life"; - /** - * {@link Json.GameObjects#Location} - */ - AttributeKey["Location"] = "Location"; - /** - * {@link Json.GameObjects#LocationTheme} - */ - AttributeKey["LocationTheme"] = "Location Theme"; - /** - * {@link Json.GameObjects#PlanetaryClass} - */ - AttributeKey["PlanetaryClass"] = "Planetary Class"; - /** - * {@link Json.GameObjects#Population} - */ - AttributeKey["Population"] = "Population"; - /** - * {@link Json.GameObjects#Region} - */ - AttributeKey["Region"] = "Region"; - /** - * {@link Json.GameObjects#Role} - */ - AttributeKey["Role"] = "Role"; - /** - * {@link Json.GameObjects#CreatureScale} - */ - AttributeKey["CreatureScale"] = "Creature Scale"; - /** - * {@link Json.GameObjects#Zone} - */ - AttributeKey["Zone"] = "Zone"; -})(AttributeKey || (AttributeKey = {})); diff --git a/dataforged-tools/src/json_out/game_objects/AttributeValue.js b/dataforged-tools/src/json_out/game_objects/AttributeValue.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/game_objects/AttributeValue.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/game_objects/IAttribute.js b/dataforged-tools/src/json_out/game_objects/IAttribute.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/game_objects/IAttribute.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/game_objects/IAttributeChoices.js b/dataforged-tools/src/json_out/game_objects/IAttributeChoices.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/game_objects/IAttributeChoices.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/game_objects/IAttributeMaster.js b/dataforged-tools/src/json_out/game_objects/IAttributeMaster.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/game_objects/IAttributeMaster.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/game_objects/IGameObject.js b/dataforged-tools/src/json_out/game_objects/IGameObject.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/game_objects/IGameObject.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/game_objects/index.js b/dataforged-tools/src/json_out/game_objects/index.js deleted file mode 100644 index a1b3553d9..000000000 --- a/dataforged-tools/src/json_out/game_objects/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @module Json.GameObjects - */ -export * from "@json_out/game_objects/AttributeKey.js"; -export * from "@json_out/game_objects/AttributeValue.js"; -export * from "@json_out/game_objects/IAttribute.js"; -export * from "@json_out/game_objects/IAttributeChoices.js"; -export * from "@json_out/game_objects/IAttributeMaster.js"; -export * from "@json_out/game_objects/IGameObject.js"; -export * from "@game_objects/enum/index.js"; diff --git a/dataforged-tools/src/json_out/index.js b/dataforged-tools/src/json_out/index.js deleted file mode 100644 index c9d9755f7..000000000 --- a/dataforged-tools/src/json_out/index.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @module Json - */ -export * from "@json_out/assets/index.js"; -export * from "@json_out/common/index.js"; -export * from "@json_out/encounters/index.js"; -export * from "@json_out/game_objects/index.js"; -export * from "@json_out/meta/index.js"; -export * from "@json_out/moves/index.js"; -export * from "@json_out/oracles/index.js"; -export * from "@json_out/truths/index.js"; -export * from "@json_out/DataforgedJsonRoot.js"; diff --git a/dataforged-tools/src/json_out/meta/IDisplay.js b/dataforged-tools/src/json_out/meta/IDisplay.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/meta/IDisplay.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/meta/IHas.js b/dataforged-tools/src/json_out/meta/IHas.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/meta/IHas.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/meta/IRequirements.js b/dataforged-tools/src/json_out/meta/IRequirements.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/meta/IRequirements.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/meta/ISource.js b/dataforged-tools/src/json_out/meta/ISource.js deleted file mode 100644 index e0ef57625..000000000 --- a/dataforged-tools/src/json_out/meta/ISource.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Enumerates valid sourcebook titles. - * @public - */ -export var SourceTitle; -(function (SourceTitle) { - SourceTitle["Starforged"] = "Ironsworn: Starforged Rulebook"; - SourceTitle["StarforgedAssets"] = "Ironsworn: Starforged Assets"; - SourceTitle["Ironsworn"] = "Ironsworn Rulebook"; - SourceTitle["IronswornAssets"] = "Ironsworn Assets"; - SourceTitle["IronswornDelve"] = "Ironsworn: Delve"; - SourceTitle["IronswornBonusAssets"] = "Ironsworn Bonus Assets (July 2020)"; -})(SourceTitle || (SourceTitle = {})); -/** - * Enumerates valid source URLs. - * @public - */ -export var SourceUrl; -(function (SourceUrl) { - SourceUrl["IronswornRulebook"] = "https://shawn-tomkin.itch.io/ironsworn"; - SourceUrl["IronswornAssets"] = "https://shawn-tomkin.itch.io/ironsworn"; - SourceUrl["IronswornDelve"] = "https://shawn-tomkin.itch.io/ironsworn-delve"; - SourceUrl["IronswornBonusAssets"] = "https://drive.google.com/file/d/1bWyWxJzV_SVtyE_SeEGS4TMJ1ZBHfrdv/view"; -})(SourceUrl || (SourceUrl = {})); diff --git a/dataforged-tools/src/json_out/meta/ISuggestions.js b/dataforged-tools/src/json_out/meta/ISuggestions.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/meta/ISuggestions.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/meta/PartOfSpeechTag.js b/dataforged-tools/src/json_out/meta/PartOfSpeechTag.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/meta/PartOfSpeechTag.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/meta/Url.js b/dataforged-tools/src/json_out/meta/Url.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/meta/Url.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/meta/index.js b/dataforged-tools/src/json_out/meta/index.js deleted file mode 100644 index 2bf142c3e..000000000 --- a/dataforged-tools/src/json_out/meta/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Types describing metadata common to many items in Dataforged. - * @module Json.Meta - */ -export * from "@json_out/meta/IDisplay.js"; -export * from "@json_out/meta/IHas.js"; -export * from "@json_out/meta/IRequirements.js"; -export * from "@json_out/meta/ISource.js"; -export * from "@json_out/meta/ISuggestions.js"; -export * from "@json_out/meta/PartOfSpeechTag.js"; -export * from "@json_out/meta/Url.js"; diff --git a/dataforged-tools/src/json_out/moves/IActionRoll.js b/dataforged-tools/src/json_out/moves/IActionRoll.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/moves/IActionRoll.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/moves/IMove.js b/dataforged-tools/src/json_out/moves/IMove.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/moves/IMove.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/moves/IMoveCategory.js b/dataforged-tools/src/json_out/moves/IMoveCategory.js deleted file mode 100644 index 7989c56fc..000000000 --- a/dataforged-tools/src/json_out/moves/IMoveCategory.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * "Assets" is also valid, technically, but it's only used in IDs, so it's omitted here. - * @public - */ -export var MoveCategoryName; -(function (MoveCategoryName) { - MoveCategoryName["Session"] = "Session"; - MoveCategoryName["Adventure"] = "Adventure"; - MoveCategoryName["Quest"] = "Quest"; - MoveCategoryName["Connection"] = "Connection"; - MoveCategoryName["Exploration"] = "Exploration"; - MoveCategoryName["Combat"] = "Combat"; - MoveCategoryName["Suffer"] = "Suffer"; - MoveCategoryName["Recover"] = "Recover"; - MoveCategoryName["Threshold"] = "Threshold"; - MoveCategoryName["Legacy"] = "Legacy"; - MoveCategoryName["Fate"] = "Fate"; -})(MoveCategoryName || (MoveCategoryName = {})); diff --git a/dataforged-tools/src/json_out/moves/IMoveOutcome.js b/dataforged-tools/src/json_out/moves/IMoveOutcome.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/moves/IMoveOutcome.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/moves/IMoveOutcomes.js b/dataforged-tools/src/json_out/moves/IMoveOutcomes.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/moves/IMoveOutcomes.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/moves/IMoveTrigger.js b/dataforged-tools/src/json_out/moves/IMoveTrigger.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/moves/IMoveTrigger.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/moves/IMoveTriggerOption.js b/dataforged-tools/src/json_out/moves/IMoveTriggerOption.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/moves/IMoveTriggerOption.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/moves/IProgressRoll.js b/dataforged-tools/src/json_out/moves/IProgressRoll.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/moves/IProgressRoll.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/moves/RollMethod.js b/dataforged-tools/src/json_out/moves/RollMethod.js deleted file mode 100644 index 22939f0bf..000000000 --- a/dataforged-tools/src/json_out/moves/RollMethod.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @public - */ -export var RollMethod; -(function (RollMethod) { - RollMethod["All"] = "All"; - RollMethod["Highest"] = "Highest"; - RollMethod["Lowest"] = "Lowest"; - RollMethod["Any"] = "Any"; -})(RollMethod || (RollMethod = {})); -/** - * @public - */ -export var RollType; -(function (RollType) { - RollType["Action"] = "Action roll"; - RollType["Progress"] = "Progress roll"; -})(RollType || (RollType = {})); diff --git a/dataforged-tools/src/json_out/moves/index.js b/dataforged-tools/src/json_out/moves/index.js deleted file mode 100644 index 962ee655d..000000000 --- a/dataforged-tools/src/json_out/moves/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Types describing moves in *Ironsworn: Starforged*. - * @module Json.Moves - */ -export * from "@json_out/moves/IActionRoll.js"; -export * from "@json_out/moves/IMove.js"; -export * from "@json_out/moves/IMoveCategory.js"; -export * from "@json_out/moves/IMoveOutcome.js"; -export * from "@json_out/moves/IMoveOutcomes.js"; -export * from "@json_out/moves/IMoveTrigger.js"; -export * from "@json_out/moves/IMoveTriggerOption.js"; -export * from "@json_out/moves/IProgressRoll.js"; -export * from "@json_out/moves/RollMethod.js"; diff --git a/dataforged-tools/src/json_out/oracles/IDisplayTable.js b/dataforged-tools/src/json_out/oracles/IDisplayTable.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/oracles/IDisplayTable.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/oracles/IMultipleRolls.js b/dataforged-tools/src/json_out/oracles/IMultipleRolls.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/oracles/IMultipleRolls.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/oracles/IOracle.js b/dataforged-tools/src/json_out/oracles/IOracle.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/oracles/IOracle.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/oracles/IOracleBase.js b/dataforged-tools/src/json_out/oracles/IOracleBase.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/oracles/IOracleBase.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/oracles/IOracleCategory.js b/dataforged-tools/src/json_out/oracles/IOracleCategory.js deleted file mode 100644 index 9a4f5aff4..000000000 --- a/dataforged-tools/src/json_out/oracles/IOracleCategory.js +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @public - */ -export var OracleCategoryFlatName; -(function (OracleCategoryFlatName) { - OracleCategoryFlatName["CharacterCreation"] = "Character Creation"; - OracleCategoryFlatName["Characters"] = "Characters"; - OracleCategoryFlatName["Core"] = "Core"; - OracleCategoryFlatName["Creatures"] = "Creatures"; - OracleCategoryFlatName["Factions"] = "Factions"; - OracleCategoryFlatName["Misc"] = "Misc"; - OracleCategoryFlatName["Moves"] = "Moves"; - OracleCategoryFlatName["Space"] = "Space"; - OracleCategoryFlatName["Starships"] = "Starships"; -})(OracleCategoryFlatName || (OracleCategoryFlatName = {})); -/** - * @public - */ -export var OracleCategoryFlatFragment; -(function (OracleCategoryFlatFragment) { - OracleCategoryFlatFragment["CharacterCreation"] = "Character_Creation"; - OracleCategoryFlatFragment["Characters"] = "Characters"; - OracleCategoryFlatFragment["Core"] = "Core"; - OracleCategoryFlatFragment["Creatures"] = "Creatures"; - OracleCategoryFlatFragment["Factions"] = "Factions"; - OracleCategoryFlatFragment["Misc"] = "Misc"; - OracleCategoryFlatFragment["Moves"] = "Moves"; - OracleCategoryFlatFragment["Space"] = "Space"; - OracleCategoryFlatFragment["Starships"] = "Starships"; -})(OracleCategoryFlatFragment || (OracleCategoryFlatFragment = {})); -/** - * @public - */ -export var OracleCategoryJaggedName; -(function (OracleCategoryJaggedName) { - OracleCategoryJaggedName["Derelicts"] = "Derelicts"; - OracleCategoryJaggedName["LocationThemes"] = "Location Themes"; - OracleCategoryJaggedName["Planets"] = "Planets"; - OracleCategoryJaggedName["Vaults"] = "Vaults"; -})(OracleCategoryJaggedName || (OracleCategoryJaggedName = {})); -/** - * @public - */ -export var OracleCategoryJaggedFragment; -(function (OracleCategoryJaggedFragment) { - OracleCategoryJaggedFragment["Derelicts"] = "Derelicts"; - OracleCategoryJaggedFragment["LocationThemes"] = "Location_Themes"; - OracleCategoryJaggedFragment["Planets"] = "Planets"; - OracleCategoryJaggedFragment["Vaults"] = "Vaults"; -})(OracleCategoryJaggedFragment || (OracleCategoryJaggedFragment = {})); diff --git a/dataforged-tools/src/json_out/oracles/IOracleContent.js b/dataforged-tools/src/json_out/oracles/IOracleContent.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/oracles/IOracleContent.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/oracles/IOracleDisplay.js b/dataforged-tools/src/json_out/oracles/IOracleDisplay.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/oracles/IOracleDisplay.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/oracles/IOracleUsage.js b/dataforged-tools/src/json_out/oracles/IOracleUsage.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/oracles/IOracleUsage.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/oracles/IRollColumn.js b/dataforged-tools/src/json_out/oracles/IRollColumn.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/oracles/IRollColumn.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/oracles/IRollTemplate.js b/dataforged-tools/src/json_out/oracles/IRollTemplate.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/oracles/IRollTemplate.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/oracles/IRow.js b/dataforged-tools/src/json_out/oracles/IRow.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/oracles/IRow.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/oracles/ITableColumnBase.js b/dataforged-tools/src/json_out/oracles/ITableColumnBase.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/oracles/ITableColumnBase.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/oracles/ITextColumn.js b/dataforged-tools/src/json_out/oracles/ITextColumn.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/oracles/ITextColumn.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/oracles/index.js b/dataforged-tools/src/json_out/oracles/index.js deleted file mode 100644 index b02fca082..000000000 --- a/dataforged-tools/src/json_out/oracles/index.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @module Json.Oracles - */ -export * from "@json_out/oracles/IDisplayTable.js"; -export * from "@json_out/oracles/IMultipleRolls.js"; -export * from "@json_out/oracles/IOracle.js"; -export * from "@json_out/oracles/IOracleBase.js"; -export * from "@json_out/oracles/IOracleCategory.js"; -export * from "@json_out/oracles/IOracleContent.js"; -export * from "@json_out/oracles/IOracleDisplay.js"; -export * from "@json_out/oracles/IOracleUsage.js"; -export * from "@json_out/oracles/IRollColumn.js"; -export * from "@json_out/oracles/IRollTemplate.js"; -export * from "@json_out/oracles/IRow.js"; -export * from "@json_out/oracles/ITableColumnBase.js"; -export * from "@json_out/oracles/ITextColumn.js"; diff --git a/dataforged-tools/src/json_out/truths/ISettingTruth.js b/dataforged-tools/src/json_out/truths/ISettingTruth.js deleted file mode 100644 index d9c636970..000000000 --- a/dataforged-tools/src/json_out/truths/ISettingTruth.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @public - */ -export var SettingTruthIdFragment; -(function (SettingTruthIdFragment) { - SettingTruthIdFragment["Cataclysm"] = "Cataclysm"; - SettingTruthIdFragment["Exodus"] = "Exodus"; - SettingTruthIdFragment["Communities"] = "Communities"; - SettingTruthIdFragment["Iron"] = "Iron"; - SettingTruthIdFragment["Laws"] = "Laws"; - SettingTruthIdFragment["Religion"] = "Religion"; - SettingTruthIdFragment["Magic"] = "Magic"; - SettingTruthIdFragment["CommunicationAndData"] = "Communication_and_Data"; - SettingTruthIdFragment["Medicine"] = "Medicine"; - SettingTruthIdFragment["ArtificialIntelligence"] = "Artificial_Intelligence"; - SettingTruthIdFragment["War"] = "War"; - SettingTruthIdFragment["Lifeforms"] = "Lifeforms"; - SettingTruthIdFragment["Precursors"] = "Precursors"; - SettingTruthIdFragment["Horrors"] = "Horrors"; -})(SettingTruthIdFragment || (SettingTruthIdFragment = {})); -/** - * @public - */ -export var SettingTruthName; -(function (SettingTruthName) { - SettingTruthName["Cataclysm"] = "Cataclysm"; - SettingTruthName["Exodus"] = "Exodus"; - SettingTruthName["Communities"] = "Communities"; - SettingTruthName["Iron"] = "Iron"; - SettingTruthName["Laws"] = "Laws"; - SettingTruthName["Religion"] = "Religion"; - SettingTruthName["Magic"] = "Magic"; - SettingTruthName["CommunicationAndData"] = "Communication and Data"; - SettingTruthName["Medicine"] = "Medicine"; - SettingTruthName["ArtificialIntelligence"] = "Artificial Intelligence"; - SettingTruthName["War"] = "War"; - SettingTruthName["Lifeforms"] = "Lifeforms"; - SettingTruthName["Precursors"] = "Precursors"; - SettingTruthName["Horrors"] = "Horrors"; -})(SettingTruthName || (SettingTruthName = {})); diff --git a/dataforged-tools/src/json_out/truths/ISettingTruthOption.js b/dataforged-tools/src/json_out/truths/ISettingTruthOption.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/json_out/truths/ISettingTruthOption.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/json_out/truths/index.js b/dataforged-tools/src/json_out/truths/index.js deleted file mode 100644 index fb8f98f75..000000000 --- a/dataforged-tools/src/json_out/truths/index.js +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @module Json.SettingTruths - */ -export * from "@json_out/truths/ISettingTruth.js"; -export * from "@json_out/truths/ISettingTruthOption.js"; diff --git a/dataforged-tools/src/start-ironsworn.js b/dataforged-tools/src/start-ironsworn.js deleted file mode 100644 index 039e5c482..000000000 --- a/dataforged-tools/src/start-ironsworn.js +++ /dev/null @@ -1,16 +0,0 @@ -import "source-map-support/register.js"; -import { JSON_PATHS } from "@constants/index.js"; -import { Gamespace } from "@json_out/common/Gamespace.js"; -import { buildDataforged } from "@utils/buildDataforged.js"; -import { writeJson } from "@utils/io/writeJSON.js"; -import _ from "lodash-es"; -const data = buildDataforged(Gamespace.Ironsworn); -export { data }; -_.forEach(data, (value, key) => { - JSON_PATHS.forEach(path => writeJson(path + `/ironsworn/${key}.json`, value)); -}); -// buildOracleMarkdown(data.oracles, MD_PATH); -// buildMoveMarkdown(data.moves, MD_PATH); -// const outRoot = "img"; -// const outWebP = "img/raster/webp"; -// buildImages(IMG_PATH as string, outRoot, MASTER_PNG_PATH as string, outWebP); diff --git a/dataforged-tools/src/start-md.js b/dataforged-tools/src/start-md.js deleted file mode 100644 index dfb18fa12..000000000 --- a/dataforged-tools/src/start-md.js +++ /dev/null @@ -1,4 +0,0 @@ -import { MD_PATH } from "@constants/index.js"; -import { buildMarkdown } from "@utils/buildMarkdown.js"; -import { dataStarforged } from "src/dataStarforged.js"; -buildMarkdown(dataStarforged, MD_PATH); diff --git a/dataforged-tools/src/start.js b/dataforged-tools/src/start.js deleted file mode 100644 index 7a9e1a4b4..000000000 --- a/dataforged-tools/src/start.js +++ /dev/null @@ -1,15 +0,0 @@ -import "source-map-support/register.js"; -import { IMG_PATH, JSON_PATHS, MASTER_PNG_PATH } from "@constants/index.js"; -import { Gamespace } from "@json_out/common/Gamespace.js"; -import { buildDataforged } from "@utils/buildDataforged.js"; -import { buildImages } from "@utils/buildImages.js"; -import { writeJson } from "@utils/io/writeJSON.js"; -import _ from "lodash-es"; -const data = buildDataforged(Gamespace.Starforged); -export { data }; -_.forEach(data, (value, key) => { - JSON_PATHS.forEach(path => writeJson(path + `/starforged/${key}.json`, value)); -}); -const outRoot = "../img"; -const outWebP = "../img/raster/webp"; -buildImages(IMG_PATH, outRoot, MASTER_PNG_PATH, outWebP); diff --git a/dataforged-tools/src/utils/buildAssets.js b/dataforged-tools/src/utils/buildAssets.js deleted file mode 100644 index 2386e9d44..000000000 --- a/dataforged-tools/src/utils/buildAssets.js +++ /dev/null @@ -1,20 +0,0 @@ -import { AssetType } from "@classes/index.js"; -import { MASTER_DATA_PATH } from "@constants/index.js"; -import { Gamespace } from "@json_out/common/Gamespace.js"; -import { buildLog } from "@utils/logging/buildLog.js"; -import yaml from "js-yaml"; -import _ from "lodash-es"; -import fs from "fs"; -/** - * Build and validate all asset objects from YAML. - * @returns An array of Asset objects. - */ -export function buildAssets(gamespace = Gamespace.Starforged) { - const assetPath = `${MASTER_DATA_PATH}/${gamespace}/Assets.yaml`; - const data = fs.readFileSync(assetPath, { encoding: "utf-8" }); - const json = yaml.load(data); - const result = json["Asset Types"] - .map(assetTypeYaml => new AssetType(assetTypeYaml, gamespace, json.Source)); - buildLog(buildAssets, `Finished building ${result.length} asset types containing a total of ${_.sum(result.map(type => type.Assets.length))} assets.`); - return result; -} diff --git a/dataforged-tools/src/utils/buildDataforged.js b/dataforged-tools/src/utils/buildDataforged.js deleted file mode 100644 index 9c11f3a78..000000000 --- a/dataforged-tools/src/utils/buildDataforged.js +++ /dev/null @@ -1,31 +0,0 @@ -import { Gamespace } from "@json_out/common/Gamespace.js"; -import { buildAssets } from "@utils/buildAssets.js"; -import { buildEncounters } from "@utils/buildEncounters.js"; -import { buildMoves } from "@utils/buildMoves.js"; -import { buildOracles } from "@utils/buildOracles.js"; -import { buildTruths } from "@utils/buildTruths.js"; -import { dataforgedStats } from "@utils/dataforgedStats.js"; -import { buildLog } from "@utils/logging/buildLog.js"; -/** - * Builds all data for Dataforged. - * @returns An object keyed with the game data. -*/ -export function buildDataforged(gamespace = Gamespace.Starforged) { - buildLog(buildDataforged, `Building Dataforged for ${gamespace}...`); - const assets = buildAssets(gamespace); - const encounters = buildEncounters(gamespace); - const moves = buildMoves(gamespace); - const oracles = buildOracles(gamespace); - // eslint-disable-next-line @typescript-eslint/naming-convention - const setting_truths = buildTruths(gamespace); - const data = { - assets, - encounters, - moves, - oracles, - setting_truths - }; - buildLog(buildDataforged, `Finished building JSON for ${gamespace}: - ${dataforgedStats(gamespace, data)}`); - return data; -} diff --git a/dataforged-tools/src/utils/buildDataforgedLegacy.js b/dataforged-tools/src/utils/buildDataforgedLegacy.js deleted file mode 100644 index fbcff15ad..000000000 --- a/dataforged-tools/src/utils/buildDataforgedLegacy.js +++ /dev/null @@ -1,10 +0,0 @@ -// import LegacyOracleCategory from "../classes/legacy/LegacyOracleCategory"; -// import { IOracleCategory } from "../classes/oracles/OracleCategory"; -// import writeJson from "@dataforged/./writeJSON.js"; -// import { PathLike } from "fs"; -// import { IronswornYaml } from "@dataforged/./buildDataforged.js"; -// export default function buildDataforgedLegacy(pathOut: PathLike = "./", ironswornData: IronswornData): LegacyOracleCategory[] { -// let legacyData = ironswornData.oracles.map(oracleCat => new LegacyOracleCategory(oracleCat)); -// writeJson("./legacy/oracles.json", legacyData); -// return legacyData; -// } diff --git a/dataforged-tools/src/utils/buildEncounters.js b/dataforged-tools/src/utils/buildEncounters.js deleted file mode 100644 index 2c8fdb3e1..000000000 --- a/dataforged-tools/src/utils/buildEncounters.js +++ /dev/null @@ -1,34 +0,0 @@ -import { EncounterNatureInfo } from "@classes/encounters/EncounterNatureInfo.js"; -import { EncounterStarforged } from "@classes/index.js"; -import { MASTER_DATA_PATH } from "@constants/index.js"; -import { Gamespace } from "@json_out/common/Gamespace.js"; -import { encounterStats } from "@utils/encounterStats.js"; -import { badJsonError } from "@utils/logging/badJsonError.js"; -import { buildLog } from "@utils/logging/buildLog.js"; -import { concatWithYamlRefs } from "@utils/process_yaml/concatWithYamlRefs.js"; -import fg from "fast-glob"; -/** - * Assembles encounter data from YAML shorthand into JSON. - * @returns - */ -export function buildEncounters(gamespace) { - buildLog(buildEncounters, "Building encounters..."); - const encounterFiles = fg.sync(`${MASTER_DATA_PATH}/${gamespace}/Encounters*.(yml|yaml)`, { onlyFiles: true }); - console.log(encounterFiles); - let json; - const encounterRoot = concatWithYamlRefs(undefined, ...encounterFiles); - switch (gamespace) { - case Gamespace.Starforged: { - json = encounterRoot.Encounters.map(enc => new EncounterStarforged(enc, encounterRoot.Source)); - break; - } - case Gamespace.Ironsworn: { - json = encounterRoot.Encounters.map(enc => new EncounterNatureInfo(enc)); - break; - } - default: - throw badJsonError(buildEncounters); - } - buildLog(buildEncounters, `Finished building ${encounterStats(gamespace, json)}`); - return json; -} diff --git a/dataforged-tools/src/utils/buildImages.js b/dataforged-tools/src/utils/buildImages.js deleted file mode 100644 index eeb91f1e3..000000000 --- a/dataforged-tools/src/utils/buildImages.js +++ /dev/null @@ -1,14 +0,0 @@ -import { cloneImages } from "@utils/process_img/cloneImages.js"; -import { convertRasterImages } from "@utils/process_img/convertRasterImages.js"; -/** - * Clones raster images and converts them to webp. - * - * @param srcRoot - the root directory of source files - * @param outPng - The destination filepath for png images. - * @param srcPng - the directory of png files - * @param outWebP - The destination filepath for webp images. - */ -export function buildImages(srcRoot, outPng, srcPng, outWebP) { - cloneImages(srcRoot, outPng); - convertRasterImages(srcPng, outWebP); -} diff --git a/dataforged-tools/src/utils/buildMarkdown.js b/dataforged-tools/src/utils/buildMarkdown.js deleted file mode 100644 index 29a688398..000000000 --- a/dataforged-tools/src/utils/buildMarkdown.js +++ /dev/null @@ -1,12 +0,0 @@ -import { MD_PATH } from "@constants/index.js"; -import { buildMoveMarkdown } from "@utils/buildMoveMarkdown.js"; -import { buildOracleMarkdown } from "@utils/buildOracleMarkdown.js"; -/** - * Builds markdown from a Dataforged json object. - * @param json The root json object to build from. - * @param mdPath The root directory to render the markdown to. - */ -export function buildMarkdown(json, mdPath = MD_PATH) { - buildOracleMarkdown(json.oracles, mdPath); - buildMoveMarkdown(json.moves, mdPath); -} diff --git a/dataforged-tools/src/utils/buildMoveMarkdown.js b/dataforged-tools/src/utils/buildMoveMarkdown.js deleted file mode 100644 index 17f882712..000000000 --- a/dataforged-tools/src/utils/buildMoveMarkdown.js +++ /dev/null @@ -1,15 +0,0 @@ -import { renderMoveCategory } from "@utils/md/renderMoveCategory.js"; -import { transformMoveLinks } from "@utils/md/transformHyperlink.js"; -import { writeFileSync } from "fs"; -/** - * It takes in a list of move categories, and writes a markdown file with all of the move categories and their moves. - * @param data - MoveCategory[] - * @param mdPath - The path to the directory where the markdown files are stored. - */ -export function buildMoveMarkdown(data, mdPath) { - const allMoveText = [ - "# Starforged Moves", - data.map(moveCat => renderMoveCategory(moveCat, 2)) - ].flat(2).join("\n\n"); - writeFileSync(`${mdPath}/moves.md`, transformMoveLinks(allMoveText, true) + "\n", { encoding: "utf-8" }); -} diff --git a/dataforged-tools/src/utils/buildMoves.js b/dataforged-tools/src/utils/buildMoves.js deleted file mode 100644 index 78464870c..000000000 --- a/dataforged-tools/src/utils/buildMoves.js +++ /dev/null @@ -1,48 +0,0 @@ -import { MoveCategory } from "@classes/index.js"; -import { MASTER_DATA_PATH, REFS_PATH } from "@constants/index.js"; -import { Gamespace } from "@json_out/common/Gamespace.js"; -import { buildLog } from "@utils/logging/buildLog.js"; -import { concatWithYamlRefs } from "@utils/process_yaml/concatWithYamlRefs.js"; -import { sortIronsworn } from "@utils/sortIronsworn.js"; -import fg from "fast-glob"; -import _ from "lodash-es"; -/** - * It takes the data from the YAML files, and then it iterates over the categories, and then it - * iterates over the moves in each category, and then it creates a MoveCategory object for each - * category, and then it returns an array of all of those MoveCategory objects - * @returns An array of MoveCategory objects. - */ -export function buildMoves(gamespace = Gamespace.Starforged) { - buildLog(buildMoves, "Building moves..."); - const moveFiles = fg.sync(`${MASTER_DATA_PATH}/${gamespace}/Moves*.(yml|yaml)`, { onlyFiles: true }); - const moveRoots = moveFiles - .map(moveFile => concatWithYamlRefs(REFS_PATH, moveFile)); - const json = []; - // merges categories that are spread across multiple files - // e.g. Moves + Moves-Delve - moveRoots.forEach(root => { - root.Categories - .forEach((moveCatData) => { - const moveCat = new MoveCategory(moveCatData, gamespace, root.Source); - const targetIndex = json.findIndex(item => item.Name === moveCat.Name); - if (targetIndex === -1) { - json.push(moveCat); - } - else { - buildLog(buildMoves, `A category named "${moveCat.Name}" exists, merging...`); - json[targetIndex].Moves = json[targetIndex].Moves.concat(...moveCat.Moves).sort((a, b) => sortIronsworn(a.Source, b.Source)); - } - }); - }); - // mv.Categories = mv.Categories.map((moveCatData) => { - // moveCatData.Moves.map((moveData, index, movesInCat) => { - // moveData.Source = movesRoot.Source; - // return moveData; - // }); - // return moveCatData; - // }); - // return new MoveCategory(moveCatData, gamespace, movesRoot.Source); - // }); - buildLog(buildMoves, `Finished building ${json.length} move categories containing ${_.sum(json.map(moveCat => moveCat.Moves.length))} moves.`); - return json.sort((a, b) => sortIronsworn(a.Source, b.Source)); -} diff --git a/dataforged-tools/src/utils/buildOracleId.js b/dataforged-tools/src/utils/buildOracleId.js deleted file mode 100644 index ace888ef0..000000000 --- a/dataforged-tools/src/utils/buildOracleId.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Assembles a path-like oracle ID from a stack of the oracle and its ancestor objects. - * @param ancestors - The ancestor objects of this oracle. - * @returns - */ -export function buildOracleId(gamespace, ...ancestors) { - const idParts = ancestors.reverse().map((item) => item.Name); - const id = [gamespace, "Oracles", ...idParts].join("/"); - return id.replaceAll(" ", "_"); -} diff --git a/dataforged-tools/src/utils/buildOracleMarkdown.js b/dataforged-tools/src/utils/buildOracleMarkdown.js deleted file mode 100644 index 1d127f567..000000000 --- a/dataforged-tools/src/utils/buildOracleMarkdown.js +++ /dev/null @@ -1,28 +0,0 @@ -import { renderOracleCategory } from "@utils/md/renderOracleCategory.js"; -import { transformMoveLinks, transformOracleLinks } from "@utils/md/transformHyperlink.js"; -import _ from "lodash-es"; -import { writeFileSync } from "fs"; -/** - * It takes a list of oracle categories and writes them to markdown files. - * @param oracles - The list of oracle categories. - * @param mdPath - The path to the directory where the markdown files will be written. - */ -export function buildOracleMarkdown(oracles, mdPath) { - const mdOraclePath = mdPath + "/oracles"; - oracles.filter(oracle => oracle.$id !== "Starforged/Oracles/Moves").forEach((oracleCat) => { - let text = renderOracleCategory(oracleCat, 1) + "\n"; - const currentFile = _.kebabCase(oracleCat.Name) + ".md"; - const filePath = `${mdOraclePath}/${currentFile}`; - text = transformMoveLinks(text); - text = transformOracleLinks(oracles, text, currentFile); - writeFileSync(filePath, text, { encoding: "utf-8" }); - }); - let allOracleText = [ - "# Starforged Oracles", - oracles.filter(oracleCat => oracleCat.$id !== "Starforged/Oracles/Moves").map((oracleCat) => renderOracleCategory(oracleCat, 2)) - ].flat(2).join("\n\n"); - const currentFile = "oracles.md"; - allOracleText = transformMoveLinks(allOracleText, false); - allOracleText = transformOracleLinks(oracles, allOracleText, currentFile); - writeFileSync(`${mdPath}/${currentFile}`, allOracleText + "\n", { encoding: "utf-8" }); -} diff --git a/dataforged-tools/src/utils/buildOracles.js b/dataforged-tools/src/utils/buildOracles.js deleted file mode 100644 index 51b92ad5b..000000000 --- a/dataforged-tools/src/utils/buildOracles.js +++ /dev/null @@ -1,88 +0,0 @@ -import { OracleCategory } from "@classes/index.js"; -import { MASTER_DATA_PATH, REFS_PATH } from "@constants/index.js"; -import { Gamespace } from "@json_out/common/Gamespace.js"; -import { badJsonError } from "@utils/logging/badJsonError.js"; -import { buildLog } from "@utils/logging/buildLog.js"; -import { templateOracle } from "@utils/object_transform/templateOracle.js"; -import { concatWithYamlRefs } from "@utils/process_yaml/concatWithYamlRefs.js"; -import { loadOracleData } from "@utils/process_yaml/loadOracleData.js"; -import { sortIronsworn } from "@utils/sortIronsworn.js"; -import FastGlob from "fast-glob"; -import jsonpath from "jsonpath"; -/** - * It takes the data from the oracles directory and builds a list of OracleCategory objects. - * @returns An array of OracleCategory objects. - */ -export function buildOracles(gamespace = Gamespace.Starforged) { - buildLog(buildOracles, "Building oracles..."); - if (gamespace === "Ironsworn") { - return buildIronswornOracles(); - } - const oracleCatFiles = FastGlob.sync(`${MASTER_DATA_PATH}/${gamespace}/Oracles/*.(yml|yaml)`, { onlyFiles: true }); - // console.log("category files", oracleCatFiles); - const oracleSubcatFiles = FastGlob.sync(`${MASTER_DATA_PATH}/${gamespace}/Oracles/*/*.(yml|yaml)`, { onlyFiles: true }); - // console.log("subcat files", oracleSubcatFiles); - const categoryRoot = loadOracleData(REFS_PATH, ...oracleCatFiles); - const categories = categoryRoot.Categories; - const subcatRoot = loadOracleData(REFS_PATH, ...oracleSubcatFiles); - const subcategories = subcatRoot.Categories.map((subcatData) => { - if (subcatData._templateCategory) { - // console.log("Building with template vars", subcatData); - subcatData = templateOracle(subcatData, subcatData._templateCategory); - // delete subcatData._templateVars; - // delete subcatData._templateCategory; - // console.log("resulting object:", subcatData); - } - return subcatData; - }); - subcategories.forEach(subcat => { - const parentName = subcat._childOf; - if (!parentName) { - throw badJsonError(buildOracles, undefined, `"${subcat.Name}" is not assigned to a subcategory.`); - } - const parentCat = categories.find(cat => cat.Name === parentName); - if (parentCat._parentOf) { - if (!parentCat._parentOf.includes(subcat.Name)) { - throw badJsonError(buildOracles, subcat, `"${subcat.Name}" assigns itself to "${parentCat.Name}", but the category doesn't list this subcategory by name.`); - } - if (!parentCat.Categories) { - parentCat.Categories = []; - } - buildLog(buildOracles, `Assigning "${subcat.Name}" as subcategory of ${parentCat.Name}`); - parentCat.Categories.push(subcat); - } - }); - const json = categories.map(categoryData => new OracleCategory(categoryData, gamespace)); - const catCount = categories.length; - const subcatCount = subcategories.length; - const tableCount = jsonpath.query(json, "$..[?(@.Table||@.Subtable)]").length; - buildLog(buildOracles, `Finished building ${catCount} oracle categories (plus ${subcatCount} subcategories) containing ${tableCount} tables.`); - return json; -} -/** - * Builds Ironsworn oracles from YAML (structurally much simpler) - */ -function buildIronswornOracles() { - const catFiles = FastGlob.sync(`${MASTER_DATA_PATH}/Ironsworn/Oracles/*.(yml|yaml)`, { onlyFiles: true }); - // console.log("catFiles", catFiles); - const categories = []; - const catYaml = catFiles - .map(moveFile => new OracleCategory(concatWithYamlRefs(REFS_PATH, moveFile), Gamespace.Ironsworn)).sort((a, b) => sortIronsworn(a.Source, b.Source)); - // merges categories that are spread across multiple files - // e.g. Characters + Characters-Delve - catYaml.forEach(oracleCat => { - const targetIndex = categories.findIndex(item => item.Name === oracleCat.Name); - if (targetIndex === -1) { - categories.push(oracleCat); - } - else { - buildLog(buildOracles, `A category named "${oracleCat.Name}" exists, merging...`); - categories[targetIndex].Oracles = categories[targetIndex].Oracles.concat(...oracleCat.Oracles).sort((a, b) => sortIronsworn(a.Source, b.Source)); - } - }); - // console.log(categories); - // const catCount = json.length; - // const tableCount = jsonpath.query(json, "$..Table").length; - // buildLog(buildOracles, `Finished building ${catCount} oracle categories`); - return categories; -} diff --git a/dataforged-tools/src/utils/buildTruths.js b/dataforged-tools/src/utils/buildTruths.js deleted file mode 100644 index f584d1c22..000000000 --- a/dataforged-tools/src/utils/buildTruths.js +++ /dev/null @@ -1,31 +0,0 @@ -import { SettingTruth } from "@classes/index.js"; -import { MASTER_DATA_PATH } from "@constants/index.js"; -import { Gamespace } from "@json_out/common/Gamespace.js"; -import { buildLog } from "@utils/logging/buildLog.js"; -import { concatWithYamlRefs } from "@utils/process_yaml/concatWithYamlRefs.js"; -import { existsSync } from "fs"; -/** - * It takes the YAML files that contain the setting truths, and builds a list of SettingTruth objects - * @returns An array of SettingTruth objects. - */ -export function buildTruths(gamespace) { - buildLog(buildTruths, "Building setting truths..."); - const filePath = `${MASTER_DATA_PATH}/${gamespace}/Truths.yaml`; - if (!existsSync(filePath)) { - buildLog(buildTruths, "No setting truth file found. Returned an empty array."); - return []; - } - switch (gamespace) { - case Gamespace.Ironsworn: - buildLog(buildTruths, "Ironsworn truths NYI."); - return []; - case Gamespace.Starforged: { - const truthsRoot = concatWithYamlRefs(undefined, filePath); - const truths = truthsRoot.Truths.map(item => new SettingTruth(item, truthsRoot.Source, gamespace)); - buildLog(buildTruths, `Finished building ${truths.length} setting truth categories.`); - return truths; - } - default: - throw new Error(); - } -} diff --git a/dataforged-tools/src/utils/dataforgedStats.js b/dataforged-tools/src/utils/dataforgedStats.js deleted file mode 100644 index f2343b71c..000000000 --- a/dataforged-tools/src/utils/dataforgedStats.js +++ /dev/null @@ -1,18 +0,0 @@ -import { encounterStats } from "@utils/encounterStats.js"; -import { JSONPath } from "jsonpath-plus"; -import _ from "lodash-es"; -/** - * Extracts statistics on Ironsworn game data. - * @param param0 - */ -export function dataforgedStats(gamespace, { assets, encounters, moves, oracles, setting_truths }) { - const oracleTables = JSONPath({ path: "$..Oracles[*].Table", json: oracles }); - const oracleSubtables = JSONPath({ json: oracleTables, path: "$..Subtable" }); - const assetCount = _.sum(assets.map(item => item.Assets.length)); - const moveCount = _.sum(moves.map(item => item.Moves.length)); - return `${assetCount} assets comprising ${assets.length} types, - ${encounterStats(gamespace, encounters)}, - ${moveCount} moves in ${moves.length} categories, - ${oracleTables.length + oracleSubtables.length} oracle tables in ${oracles.length} categories, - and ${setting_truths.length} setting truth categories.`; -} diff --git a/dataforged-tools/src/utils/encounterStats.js b/dataforged-tools/src/utils/encounterStats.js deleted file mode 100644 index 9dace64f0..000000000 --- a/dataforged-tools/src/utils/encounterStats.js +++ /dev/null @@ -1,31 +0,0 @@ -import { Gamespace } from "@json_out/common/Gamespace.js"; -import _ from "lodash-es"; -/** - * Creates a string of encounter stats for use in build messages. - * @param gamespace - * @param json - */ -export function encounterStats(gamespace, json) { - var _a; - let text; - switch (gamespace) { - case Gamespace.Starforged: - { - const encounterCount = json.length; - const variantCount = (_a = _.sum(json.map(enc => { var _a; return (_a = enc.Variants) === null || _a === void 0 ? void 0 : _a.length; }))) !== null && _a !== void 0 ? _a : 0; - text = `${encounterCount} encounters (plus ${variantCount} encounter variants)`; - } - break; - case Gamespace.Ironsworn: - { - const natureCount = json.length; - const encounterCount = _.sum(json.map(enc => enc.Encounters.length)); - text = `${encounterCount} encounters across ${natureCount} nature types`; - } - break; - default: - throw new Error(); - } - return text; -} -; diff --git a/dataforged-tools/src/utils/extractMoveOutcomes.js b/dataforged-tools/src/utils/extractMoveOutcomes.js deleted file mode 100644 index f5b0194ec..000000000 --- a/dataforged-tools/src/utils/extractMoveOutcomes.js +++ /dev/null @@ -1,49 +0,0 @@ -// import _ from "lodash-es"; -// import buildMoves from "./buildMoves"; -// import writeJson from "@dataforged/./io/writeJSON.js"; -// import type Move from "@dataforged/../types/moves/Move.js"; -// const hitPattern = new RegExp(/On a \*\*hit\*\*, (?(.|\n)*?)\./, "m"); -// const strongHitPattern = new RegExp(/On a \*\*strong hit\*\*, (?(.|\n)*?)On a \*\*weak hit\*\*, /, "m"); -// const weakHitPattern = new RegExp(/On a \*\*weak hit\*\*, (?(.|\n)*?)On a \*\*miss\*\*/, "m"); -// const missPattern = new RegExp(/On a \*\*miss\*\*, (?(.|\n)*)/, "m"); -// const chooseOptionsPattern = new RegExp(/ {2}\* (.*)/, "gmi"); -// const sortOrder = [ "You are", "Take", "Add" ]; -// type outcomeMatch = { content: string; }; -// export default function extractMoveOutcome(move: Move) { -// const newObj = { -// $id: move.$id, -// Hit: move.Text.match(hitPattern) ? (move.Text.match(hitPattern)?.groups as outcomeMatch).content.trim() : undefined, -// "Strong Hit": move.Text.match(strongHitPattern) ? (move.Text.match(strongHitPattern)?.groups as outcomeMatch).content.trim() : undefined, -// "Weak Hit": move.Text.match(weakHitPattern) ? (move.Text.match(weakHitPattern)?.groups as outcomeMatch).content.trim() : undefined, -// Miss: move.Text.match(missPattern) ? (move.Text.match(missPattern)?.groups as outcomeMatch).content.trim() : undefined, -// }; -// if (newObj["Weak Hit"]?.startsWith("choose")) { -// // console.info(newObj["Weak Hit"]); -// const match = [...newObj["Weak Hit"].matchAll(chooseOptionsPattern)].map(item => item[1]); -// console.info("has options", match); -// const unorderedList = match.map(item => ` * ${item}`).join("\n"); -// if (newObj["Strong Hit"]) { -// if (newObj["Strong Hit"].includes("take both")) { -// const sorted = match.sort((a, b) => sortOrder.findIndex(item => item.startsWith(a)) - sortOrder.findIndex(item => item.startsWith(b))); -// newObj["Strong Hit"] = sorted.join(". "); -// } else if (newObj["Strong Hit"].includes("choose two")) { -// newObj["Strong Hit"] += "\n\n" + unorderedList; -// } -// } -// } -// if (newObj["Weak Hit"]) { -// if (newObj["Weak Hit"].startsWith("as above")) { -// const weakHitEffect = newObj["Weak Hit"].replaceAll("as above, but", ""); -// } -// } -// // alternatively: split at strong hit markers? -// // since we also have the trigger, we can probably remove all lines that include the trigger info. -// // we can also ignore things that don't have a progress roll or an action roll -// // "On a **weak hit**, as above, but" pattern is pretty consistent. -// // "On a **hit**" -// // could just keep looking until the next 'hit' example -// return newObj; -// } -// const moves = buildMoves(); -// const newObj = _.keyBy(moves.map(move => extractMoveOutcome(move)), "$id"); -// writeJson("./moveOutcomes.json", newObj); diff --git a/dataforged-tools/src/utils/getNameFromId.js b/dataforged-tools/src/utils/getNameFromId.js deleted file mode 100644 index 9db034886..000000000 --- a/dataforged-tools/src/utils/getNameFromId.js +++ /dev/null @@ -1,8 +0,0 @@ -// TODO: generate fallback names for when it's unspecified -/** - * Gets the last item of a path-like oracle ID. - */ -export function getNameFromId(oracleId) { - const fragments = oracleId.split("/"); - return fragments[fragments.length - 1]; -} diff --git a/dataforged-tools/src/utils/index.js b/dataforged-tools/src/utils/index.js deleted file mode 100644 index e77dc3777..000000000 --- a/dataforged-tools/src/utils/index.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable no-restricted-imports */ -export * from "./types/index.js"; diff --git a/dataforged-tools/src/utils/io/getAllFiles.js b/dataforged-tools/src/utils/io/getAllFiles.js deleted file mode 100644 index bca7f7504..000000000 --- a/dataforged-tools/src/utils/io/getAllFiles.js +++ /dev/null @@ -1,23 +0,0 @@ -import fs from "fs"; -import path from "path"; -/** - * Recursively gets the path of all YAML files in a directory. - * - * @param dirPath - the path to the directory. - * @param arrayOfFiles - an array of file paths for the function to add paths too (used mainly for recursing) - * @returns An array of file paths. - */ -export function getAllFiles(dirPath, arrayOfFiles = []) { - const files = fs.readdirSync(dirPath); - files.forEach(function (file) { - if (fs.statSync(dirPath.toString() + "/" + file).isDirectory()) { - arrayOfFiles = getAllFiles(dirPath.toString() + "/" + file, arrayOfFiles); - } - else { - arrayOfFiles.push(path.join( - // use __dirname instead of "./" for absolute paths - "./", dirPath.toString(), "/", file)); - } - }); - return arrayOfFiles; -} diff --git a/dataforged-tools/src/utils/io/getSubdirs.js b/dataforged-tools/src/utils/io/getSubdirs.js deleted file mode 100644 index 9f87f2faa..000000000 --- a/dataforged-tools/src/utils/io/getSubdirs.js +++ /dev/null @@ -1,16 +0,0 @@ -import fs from "fs"; -const basePath = "./src/data"; -/** - * It returns an array of all the subdirectories of the given directory. - * @param dir - The directory to search in. - * @param root - The root directory of the project. - * @returns An array of paths. - */ -export function getSubdirs(dir = "", root = basePath) { - const path = dir.length ? root + "/" + dir : root; - const result = fs - .readdirSync(path) - .filter(dir => !dir.startsWith("_") && !dir.includes(".")) - .map(str => (path + "/" + str)); - return result; -} diff --git a/dataforged-tools/src/utils/io/getYamlFiles.js b/dataforged-tools/src/utils/io/getYamlFiles.js deleted file mode 100644 index 20f8d284d..000000000 --- a/dataforged-tools/src/utils/io/getYamlFiles.js +++ /dev/null @@ -1,11 +0,0 @@ -import fs from "fs"; -/** - * It returns an array of all the yaml filepaths in the directory. - * @returns An array of file paths. - */ -export function getYamlFiles(dir) { - return fs - .readdirSync(dir) - .filter(file => !file.startsWith("_") && !file.startsWith(".") && file.match(/.*\.yaml/)) - .map(str => (`${dir.toString()}/${str}`)); -} diff --git a/dataforged-tools/src/utils/io/writeJSON.js b/dataforged-tools/src/utils/io/writeJSON.js deleted file mode 100644 index 6070d5052..000000000 --- a/dataforged-tools/src/utils/io/writeJSON.js +++ /dev/null @@ -1,15 +0,0 @@ -import prettier from "prettier"; -import fs from "fs"; -/** - * Writes a JSON object to a nicely formatted file. - * - */ -export function writeJson(filePathOut, jsonObj, minified = false) { - let parser = "json"; - let jsonData = JSON.stringify(jsonObj); - if (minified === true) { - parser = "json-stringify"; - } - jsonData = prettier.format(jsonData, { parser }); - return fs.writeFileSync(filePathOut, jsonData); -} diff --git a/dataforged-tools/src/utils/io/writeYaml.js b/dataforged-tools/src/utils/io/writeYaml.js deleted file mode 100644 index 4b593fa48..000000000 --- a/dataforged-tools/src/utils/io/writeYaml.js +++ /dev/null @@ -1,15 +0,0 @@ -import yaml from "js-yaml"; -import fs from "fs"; -/** - * Write a nicely formatted YAML file from a JSON object - * @param filePathOut - The path to the file to write. - * @param jsonObj - The JSON object to be converted to YAML. - */ -export function writeYaml(filePathOut, jsonObj) { - const yamlData = yaml.dump(jsonObj, { - lineWidth: -1, - quotingType: "\"", - // noRefs: true, - }); - fs.writeFileSync(filePathOut, yamlData); -} diff --git a/dataforged-tools/src/utils/logging/HasName.js b/dataforged-tools/src/utils/logging/HasName.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/logging/HasName.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/logging/HasString.js b/dataforged-tools/src/utils/logging/HasString.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/logging/HasString.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/logging/badEnumError.js b/dataforged-tools/src/utils/logging/badEnumError.js deleted file mode 100644 index ade80e427..000000000 --- a/dataforged-tools/src/utils/logging/badEnumError.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * It creates an error message for when a value is not present in an enum. - * @param source - The source of the error. This can be anything with a "toString" method, or an object with a `name` property. - * @param badItem - the bad item that was passed in - * @param e - EnumLike - * @returns An Error. - */ -export function badEnumError(source, badItem, e) { - let srcId; - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - if (typeof source.name !== "undefined") { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - srcId = source.name; - } - else { - srcId = source.toString(); - } - const msg = `[${srcId}] "${badItem}" not present in ${JSON.stringify(e)}`; - return new Error(msg); -} diff --git a/dataforged-tools/src/utils/logging/badJsonError.js b/dataforged-tools/src/utils/logging/badJsonError.js deleted file mode 100644 index e6b724734..000000000 --- a/dataforged-tools/src/utils/logging/badJsonError.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * "Create an Error object with a message that includes the source and the object that failed to - * conform to the interface." - * - * @param source - The source of the error. - * @param obj - The object that caused the error. - * @param message - The message to display. - * @returns An Error object. - */ -export function badJsonError(source, obj, message = "JSON does not conform to interface") { - let srcId; - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - if (source.name) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - srcId = source.name; - } - else { - srcId = source.toString(); - } - let msg = `[${srcId}] ${message}`; - if (obj) { - msg += `: ${JSON.stringify(obj, null, 2)}`; - } - return new Error(msg); -} diff --git a/dataforged-tools/src/utils/logging/buildLog.js b/dataforged-tools/src/utils/logging/buildLog.js deleted file mode 100644 index 4350c31ee..000000000 --- a/dataforged-tools/src/utils/logging/buildLog.js +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint-disable @typescript-eslint/ban-types */ -/** - * Logs a standardized build message to console. - * @param fn - the function to tag the message with - */ -export function buildLog(fn, message) { - const parentIdentifier = fn.name; - const msg = `[${parentIdentifier}] ${message}`; - // eslint-disable-next-line no-console - console.info(msg); -} diff --git a/dataforged-tools/src/utils/md/extractColumnData.js b/dataforged-tools/src/utils/md/extractColumnData.js deleted file mode 100644 index d99ec63ce..000000000 --- a/dataforged-tools/src/utils/md/extractColumnData.js +++ /dev/null @@ -1,38 +0,0 @@ -import { badJsonError } from "@utils/logging/badJsonError.js"; -import { getTableByOracleId } from "@utils/md/getTableByOracleId.js"; -export function extractColumnData(oracle) { - const newTableRows = []; - const rollCols = oracle.Display.Table["Roll columns"]; - rollCols.forEach((col, colIndex) => { - // console.log("[extractColumnData] id:",col); - const table = getTableByOracleId(oracle, col["Use content from"]); - table.forEach((rowData, rowIndex) => { - if (!table) { - throw badJsonError(extractColumnData); - } - if (!newTableRows[rowIndex]) { - newTableRows.push({}); - } - const currentTableRow = newTableRows[rowIndex]; - const newRowText = (rowData.Floor === null || rowData.Ceiling === null) ? "--" : rowData.Floor === rowData.Ceiling ? `${rowData.Ceiling}` : `${rowData.Floor}–${rowData.Ceiling}`; - currentTableRow[col.Label] = newRowText; - }); - }); - const resultCols = oracle.Display.Table["Result columns"]; - resultCols.forEach((col, colIndex) => { - const table = getTableByOracleId(oracle, col["Use content from"]); - if (!table) { - throw badJsonError(extractColumnData); - } - // console.log("found table:", table); - table.forEach((rowData, rowIndex) => { - const currentTableRow = newTableRows[rowIndex]; - const newRowText = rowData[col.Key]; - if (typeof rowData[col.Key] !== "string") { - throw badJsonError(extractColumnData, newRowText); - } - currentTableRow[col.Label] = newRowText; - }); - }); - return newTableRows; -} diff --git a/dataforged-tools/src/utils/md/findById.js b/dataforged-tools/src/utils/md/findById.js deleted file mode 100644 index e4253b606..000000000 --- a/dataforged-tools/src/utils/md/findById.js +++ /dev/null @@ -1,10 +0,0 @@ -import jsonpath from "jsonpath"; -/** - * Crawls a JSON tree for an object with a specific ID. Slow! - * @param data - The data to search. - * @param id - The id of the object to find. - * @returns The object that matches the id. - */ -export function findById(data, id) { - return jsonpath.value(data, `$..[?(@.$id=="${id}")]`); -} diff --git a/dataforged-tools/src/utils/md/getOracleById.js b/dataforged-tools/src/utils/md/getOracleById.js deleted file mode 100644 index 4a75b4aac..000000000 --- a/dataforged-tools/src/utils/md/getOracleById.js +++ /dev/null @@ -1,11 +0,0 @@ -import jsonpath from "jsonpath"; -/** - * Given an array of oracle data and an id, return the oracle data that matches the id. Slow! - * @param oracleData - The data to search in. - * @param id - The id of the oracle you want to get. - * @returns An Oracle object. - */ -export function getOracleById(oracleData, id) { - const table = jsonpath.value(oracleData, `$..[?(@.$id=='${id}')]`); - return table; -} diff --git a/dataforged-tools/src/utils/md/getTableByOracleId.js b/dataforged-tools/src/utils/md/getTableByOracleId.js deleted file mode 100644 index 0eb9f847b..000000000 --- a/dataforged-tools/src/utils/md/getTableByOracleId.js +++ /dev/null @@ -1,18 +0,0 @@ -import jsonpath from "jsonpath"; -/** - * Given an oracleData object, and an id, return the table object of the Oracle that matches the id - * @param oracleData - The data to search. - * @param id - The id of the table you want to get. - * @returns An array of rows. - */ -export function getTableByOracleId(oracleData, id) { - if (!Array.isArray(oracleData) && oracleData.$id === id) { - const data = oracleData; - if (data.Table) { - return data.Table; - } - } - ; - const table = jsonpath.value(oracleData, `$..[?(@.$id=='${id}')].Table`); - return table; -} diff --git a/dataforged-tools/src/utils/md/idToHref.js b/dataforged-tools/src/utils/md/idToHref.js deleted file mode 100644 index 64fbb2c3a..000000000 --- a/dataforged-tools/src/utils/md/idToHref.js +++ /dev/null @@ -1,20 +0,0 @@ -import { findById } from "@utils/md/findById.js"; -/** - * Converts an game item's ID string into a hyperlink-friendly relative URL. - * @param id - The id of the item you want to link to. - * @param data - The data to search through. - * @returns A string that can be used as a URL. - */ -export function idToHref(id, data) { - const item = findById(data, id); - if (!item) { - throw new Error(`Unable to find id: ${id}`); - } - let newId = id; - if (item.Display) { - const splitId = newId.split("/"); - newId = splitId.slice(0, -1).join("/") + "/" + item.Display.Title; - } - return newId - .replaceAll(" ", "_"); -} diff --git a/dataforged-tools/src/utils/md/longestLength.js b/dataforged-tools/src/utils/md/longestLength.js deleted file mode 100644 index f38f18684..000000000 --- a/dataforged-tools/src/utils/md/longestLength.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Given an array of objects, return the length of the longest object. - * @param array - Array - * @returns The length of the longest string in the array. - */ -export function lengthOfLongest(array) { - return array.map(item => item.length).reduce((a, b) => a > b ? a : b); -} diff --git a/dataforged-tools/src/utils/md/renderMove.js b/dataforged-tools/src/utils/md/renderMove.js deleted file mode 100644 index 04851b21d..000000000 --- a/dataforged-tools/src/utils/md/renderMove.js +++ /dev/null @@ -1,16 +0,0 @@ -import _ from "lodash-es"; -/** - * It renders a move. - * @param move - The move object to render. - * @param headerLevel - The header level to use for the move. - * @returns A string. - */ -export function renderMove(move, headerLevel = 3) { - const header = _.repeat("#", headerLevel) + " " + move.Display.Title; - const items = [header]; - if (move["Progress Move"]) { - items.push("*Progress Move*"); - } - items.push(move.Text); - return items.join("\n\n"); -} diff --git a/dataforged-tools/src/utils/md/renderMoveCategory.js b/dataforged-tools/src/utils/md/renderMoveCategory.js deleted file mode 100644 index ac51e6ca9..000000000 --- a/dataforged-tools/src/utils/md/renderMoveCategory.js +++ /dev/null @@ -1,28 +0,0 @@ -import { renderMove } from "@utils/md/renderMove.js"; -import _ from "lodash-es"; -/** - * It takes a MoveCategory and returns a string that is a markdown list of all the moves in that - * category - * @param moveCat - The MoveCategory to render. - * @param headerLevel - The level of the top-level header. - * @param localLinksOnly - FIXME: NYI. If true, only links to moves in the same category will be generated. - * @returns A string. - */ -export function renderMoveCategory(moveCat, headerLevel = 2, localLinksOnly = true) { - const header = `${_.repeat("#", headerLevel)} ${moveCat.Display.Title}`; - const items = [header, moveCat.Description]; - const categories = _.uniq(moveCat.Moves.map(move => move.Category)); - const moveCategoryText = categories.map(category => { - const moveText = moveCat.Moves.filter(move => move.Category === category).map(move => renderMove(move, headerLevel + 1)); - return moveText; - }).flat(2); - items.push(...moveCategoryText); - let result = items.join("\n\n"); - if (moveCat.Name !== "Suffer") { - result = result.replaceAll(/(suffer moves?)/g, "[$1](#Suffer-Moves)"); - } - if (moveCat.Name !== "Recover") { - result = result.replaceAll(/(recover moves?)/g, "[$1](#Recover-Moves)"); - } - return result; -} diff --git a/dataforged-tools/src/utils/md/renderOracle.js b/dataforged-tools/src/utils/md/renderOracle.js deleted file mode 100644 index 11bb97842..000000000 --- a/dataforged-tools/src/utils/md/renderOracle.js +++ /dev/null @@ -1,25 +0,0 @@ -import { buildLog } from "@utils/logging/buildLog.js"; -import { extractColumnData } from "@utils/md/extractColumnData.js"; -import { renderTable } from "@utils/md/renderTable.js"; -import _ from "lodash-es"; -/** - * It takes an oracle and returns a markdown string. - * @param oracle - Oracle, headerLevel = 3 - * @param headerLevel - The header level to use for the title. - * @returns A string containing the markdown for the oracle. - */ -export function renderOracle(oracle, headerLevel = 3) { - if (oracle.Display["Column of"]) { - return ""; - } - buildLog(renderOracle, `Generating markdown for ${oracle.Display.Title}...`); - const header = _.repeat("#", headerLevel) + " " + (oracle.Display.Title); - const items = [header]; - if (oracle.Description) { - items.push(oracle.Description); - } - const tableData = extractColumnData(oracle); - const table = renderTable(tableData); - items.push(table); - return items.join("\n\n"); -} diff --git a/dataforged-tools/src/utils/md/renderOracleCategory.js b/dataforged-tools/src/utils/md/renderOracleCategory.js deleted file mode 100644 index 171f418fc..000000000 --- a/dataforged-tools/src/utils/md/renderOracleCategory.js +++ /dev/null @@ -1,24 +0,0 @@ -import { buildLog } from "@utils/logging/buildLog.js"; -import { renderOracle } from "@utils/md/renderOracle.js"; -import _ from "lodash-es"; -/** - * It takes an OracleCategory and returns a markdown string - * @param oracleCat - OracleCategory - * @param headerLevel - The header level to use for the category title. - * @returns A string of markdown. - */ -export function renderOracleCategory(oracleCat, headerLevel = 2) { - buildLog(renderOracleCategory, `Generating markdown for ${oracleCat.Display.Title}...`); - const header = _.repeat("#", headerLevel) + " " + oracleCat.Display.Title; - const items = [header]; - if (oracleCat.Description) { - items.push(oracleCat.Description); - } - if (oracleCat.Oracles) { - items.push(...oracleCat.Oracles.map(oracle => renderOracle(oracle, headerLevel + 1)).flat(1)); - } - if (oracleCat.Categories) { - items.push(...oracleCat.Categories.map(oracleSubCat => renderOracleCategory(oracleSubCat, headerLevel + 1)).flat(1)); - } - return items.flat(1).join("\n\n"); -} diff --git a/dataforged-tools/src/utils/md/renderTable.js b/dataforged-tools/src/utils/md/renderTable.js deleted file mode 100644 index 24cf1e298..000000000 --- a/dataforged-tools/src/utils/md/renderTable.js +++ /dev/null @@ -1,31 +0,0 @@ -import { lengthOfLongest } from "@utils/md/longestLength.js"; -import { transpose2dArray } from "@utils/md/transpose2dArray.js"; -import _ from "lodash-es"; -/** - * Renders an object array as a markdown table. - */ -export function renderTable(rowDataArray) { - const tableBody = rowDataArray.map(row => Object.values(row)); - const tableHeaderText = Object.keys(rowDataArray[0]); - let table = [tableHeaderText, ...tableBody]; - const columnWidths = transpose2dArray(table).map(col => lengthOfLongest(col)); - const colIsCentered = (transpose2dArray(tableBody)).map(col => col.every(cell => cell.match(/^[^A-z]+$/) !== null)); - table = table.map((row) => row.map((cell, colIndex) => cell.padEnd(columnWidths[colIndex], " "))); - let rowStrings = table.map(row => row.join(" | ")); - const headBorder = rowStrings[0].split("|").map((colContent, colIndex) => { - let border = _.repeat("-", colContent.length); - if (colIsCentered[colIndex]) { - border = border.replaceAll(/^-(-+)-$/g, ":$1:"); - } - return border; - }) - .join("|"); - rowStrings.splice(1, 0, headBorder); - rowStrings = rowStrings.map(row => row.trimEnd()); - return rowStrings.join("\n"); -} -// let oracleData = buildOracles(); -// let testOracle = getOracleById(oracleData, "Oracles/Creatures/Basic Form"); -// // console.log("found oracle:", testOracle); -// let extract = extractColumnData(testOracle); -// console.log(renderTable(extract)); diff --git a/dataforged-tools/src/utils/md/toMarkdownTable.js b/dataforged-tools/src/utils/md/toMarkdownTable.js deleted file mode 100644 index 238594c50..000000000 --- a/dataforged-tools/src/utils/md/toMarkdownTable.js +++ /dev/null @@ -1,80 +0,0 @@ -import { renderOracleCategory } from "@utils/md/renderOracleCategory.js"; -import _ from "lodash-es"; -import fs from "fs"; -function toMdMultiTableData(rollColumnData, rollColumnLabels, resultColumnData, resultColumnLabels) { - if (rollColumnLabels.length !== rollColumnData.length) { - throw new Error("rollColumnLabels.length !== rollColumns.length"); - } - if (resultColumnLabels.length !== resultColumnData.length) { - throw new Error("resultColumnLabels.length !== resultColumns.length"); - } - const minimumRows = [...rollColumnData, ...resultColumnData].map(col => col.length).reduce((colA, colB) => colA > colB ? colA : colB); - const rollColumns = rollColumnData.map((col, index) => toRollColumnArray(rollColumnLabels[index], col, minimumRows)); - const resultColumns = resultColumnData.map((col, index) => toResultColumnArray(resultColumnLabels[index], col, minimumRows)); - return [...rollColumns, ...resultColumns]; -} -export function toSummaryColumnArray(label, rows, minimumRows) { - const rowContent = rows.map(row => row.Summary || ""); - return toColumnArray(label, rowContent, minimumRows); -} -export function toResultColumnArray(label, rows, minimumRows) { - const rowContent = rows.map(row => row.Result); - return toColumnArray(label, rowContent, minimumRows); -} -export function toRollColumnArray(label, rows, minimumRows) { - const rowContent = rows.map(row => { - if (row.Ceiling === row.Floor) { - if (row.Ceiling === null) { - return "--"; - } - else { - return row.Ceiling.toString(); - } - } - else { - if (row.Ceiling === null || row.Floor === null) { - throw new Error(); - } - return `${row.Floor}-${row.Ceiling}`; - } - }); - return toColumnArray(label, rowContent, minimumRows); -} -function toColumnArray(label, rowContent, minimumRows) { - while (rowContent.length < minimumRows) { - rowContent.concat(""); - } - rowContent.unshift(label); - return rowContent; -} -export function toMdTable(...columnArrays) { - const transposed = transpose2dArray(columnArrays); - return mdTableFrom2dArray(transposed); -} -function mdTableFrom2dArray(array2d) { - const columnMax = array2d.map(column => column.map(row => row.length).reduce((rowA, rowB) => rowA > rowB ? rowA : rowB)); - const md2dArray = array2d.map(row => { - row = row.map((column, index) => column.padEnd(columnMax[index])); - return row; - }); - // inner borders - const headerBorder = columnMax.map(columnWidth => _.repeat("-", columnWidth)); - md2dArray.splice(1, 0, headerBorder); - let mdRowStrings = md2dArray.map((row) => row.map((col, i) => col.padEnd(columnMax[i])).join(" | ")); - // trim trailing whitepace - mdRowStrings = mdRowStrings.map(row => row.trim()); - const tableString = mdRowStrings.join("\n"); - return tableString; -} -function transpose2dArray(array2d) { - return array2d[0].map((_, colIndex) => array2d.map(row => row[colIndex])); -} -function buildMdOracles(headerText = "Ironsworn Oracles", ...oracleData) { - const header = "# " + headerText; - const oracleMarkdown = oracleData.map(oracleCat => renderOracleCategory(oracleCat), 2); - return header + "\n\n" + oracleMarkdown.join("\n\n") + "\n"; -} -const files = fs.readdirSync("./").filter(dir => dir.match(/^ironsworn_oracles/)) - .map(file => "./" + file); -const text = buildMdOracles(...files); -fs.writeFileSync("./oracles.md", text); diff --git a/dataforged-tools/src/utils/md/transformHyperlink.js b/dataforged-tools/src/utils/md/transformHyperlink.js deleted file mode 100644 index bdaa806b5..000000000 --- a/dataforged-tools/src/utils/md/transformHyperlink.js +++ /dev/null @@ -1,64 +0,0 @@ -import { findById } from "@utils/md/findById.js"; -import _ from "lodash-es"; -/** - * It replaces all the links to the moves.md file with the correct link. - * @param md - The markdown string to be transformed. - * @param localLinks - If true, the links will be relative to the current file. - * @returns The original string with the links replaced. - */ -export function transformMoveLinks(md, localLinks = false, pathPrefix = "") { - md = md.replaceAll(/\(Moves\/([^ ]+?)\/([^ ]+?)\)/g, (match, p1, p2) => { - let result = match; - if (localLinks) { - result = `(#${p2})`; - } - else { - result = `(${pathPrefix}moves.md#${p2})`; - } - return result.replaceAll("_", "-"); - }); - return md; -} -/** - * It replaces all the links in the markdown with the replacement string. - * @param md - The markdown string to be transformed. - * @returns The original string with the links transformed. - */ -export function transformOracleLinks(data, md, currentFile) { - md = md.replaceAll(/\(Oracles\/([^ ]+?)\/([^ ]+?)\)/g, (match, p1, p2) => { - // console.log("matched:", match); - const oracleId = match - .replaceAll("(", "") - .replaceAll(")", ""); - const linkedOracle = findById(data, oracleId); - if (!linkedOracle) { - throw new Error(`Unable to find linked oracle: ${oracleId}`); - } - let targetFile = `${_.kebabCase(p1)}.md`; - if (currentFile === targetFile || currentFile === "oracles.md") { - targetFile = ""; - } - const result = `(${targetFile}#${linkedOracle.Display.Title.replaceAll(" ", "-")})`; - return result.replaceAll("_", "-"); - }); - md = md.replaceAll(/\(Oracles\/([^ ]+?)\)/g, (match, p1) => { - // console.log("matched:", match); - const oracleId = match.replaceAll("/", "/").replaceAll("(", "") - .replaceAll(")", "") - .replaceAll("_", " "); - const linkedOracle = findById(data, oracleId); - if (!linkedOracle) { - throw new Error(`Unable to find linked oracle: ${oracleId}`); - } - let targetFile = ""; - if (currentFile === "oracles.md") { - targetFile = `#${linkedOracle.Display.Title}`.replaceAll(" ", "-"); - } - else { - targetFile = `${_.kebabCase(p1)}.md`; - } - const result = `(${targetFile})`.replaceAll("_", "-"); - return result; - }); - return md; -} diff --git a/dataforged-tools/src/utils/md/transpose2dArray.js b/dataforged-tools/src/utils/md/transpose2dArray.js deleted file mode 100644 index 2e654bad0..000000000 --- a/dataforged-tools/src/utils/md/transpose2dArray.js +++ /dev/null @@ -1,5 +0,0 @@ -//FIXME: could probably be done with lodash's zip instead -export function transpose2dArray(array) { - const output = array[0].map((_, colIndex) => array.map(row => row[colIndex])); - return output; -} diff --git a/dataforged-tools/src/utils/object_transform/extractRowContent.js b/dataforged-tools/src/utils/object_transform/extractRowContent.js deleted file mode 100644 index d34ade7e0..000000000 --- a/dataforged-tools/src/utils/object_transform/extractRowContent.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Extracts the content of a Row array. In other words, it excludes the Floor and Ceiling numbers. - * @param row - IRowYaml | IRowContentYaml - * @returns A list of IRowContentYaml - */ -export function extractRowContent(row) { - // if (!is(row)) { - // throw badJsonError(extractRowContent, row, "Expected IRowYaml or IRowContentYaml"); - // } - let output; - if (typeof row[0] === "number" && typeof row[1] === "number") { - output = row.slice(2); - } - else { - output = row; - } - return output; -} diff --git a/dataforged-tools/src/utils/object_transform/extractRowRolls.js b/dataforged-tools/src/utils/object_transform/extractRowRolls.js deleted file mode 100644 index b1b69984e..000000000 --- a/dataforged-tools/src/utils/object_transform/extractRowRolls.js +++ /dev/null @@ -1,13 +0,0 @@ -import { is } from "typescript-is"; -/** - * Extracts the first two elements (floor and ceiling) of a raw row array. - * @param row - IRowYaml | IRowRollYaml - * @returns The first two elements of the array. - */ -export function extractRowRolls(row) { - if (!Array.isArray(row)) { - throw new Error(`Received an invalid row array ${JSON.stringify(row)}`); - } - const output = row.filter((item) => is(item)).slice(0, 2); - return output; -} diff --git a/dataforged-tools/src/utils/object_transform/inferSetsAttributes.js b/dataforged-tools/src/utils/object_transform/inferSetsAttributes.js deleted file mode 100644 index dc4205e96..000000000 --- a/dataforged-tools/src/utils/object_transform/inferSetsAttributes.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Infers a SetsAttributes object for an Oracle from its table rows. - * @param table - The table of data to infer attributes from. - * @returns An array of objects with a single property called Key. - */ -export function inferSetsAttributes(table) { - const uniqueAttributes = new Set(); - table.forEach(row => { - if (row.Attributes) { - row.Attributes.forEach(item => { - uniqueAttributes.add(item.Key); - }); - } - }); - const result = Array.from(uniqueAttributes).map(attr => ({ Key: attr })); - return result; -} diff --git a/dataforged-tools/src/utils/object_transform/pickInput.js b/dataforged-tools/src/utils/object_transform/pickInput.js deleted file mode 100644 index 3bfd5b9fa..000000000 --- a/dataforged-tools/src/utils/object_transform/pickInput.js +++ /dev/null @@ -1,26 +0,0 @@ -import { InputClock, InputNumber, InputText } from "@classes/common/index.js"; -import { InputSelect } from "@classes/common/InputSelect.js"; -import { InputType } from "@json_out/index.js"; -/** - * Infers the correct class for an IInputYaml object and constructs it. - * @param inputJson - The data to pick a class for. - */ -export function pickInput(inputJson, parent) { - switch (inputJson["Input Type"]) { - case InputType.Clock: { - return new InputClock(inputJson, parent); - } - case InputType.Number: { - return new InputNumber(inputJson, parent); - } - case InputType.Select: { - return new InputSelect(inputJson, parent); - } - case InputType.Text: { - return new InputText(inputJson, parent); - } - default: { - throw new Error("Unable to assign input data to a type - make sure it's correct."); - } - } -} diff --git a/dataforged-tools/src/utils/object_transform/propagateToChildren.js b/dataforged-tools/src/utils/object_transform/propagateToChildren.js deleted file mode 100644 index 15368bb91..000000000 --- a/dataforged-tools/src/utils/object_transform/propagateToChildren.js +++ /dev/null @@ -1,15 +0,0 @@ -import _ from "lodash-es"; -/** - * Propagates an object to child objects; each child receives the propagated object, but if it has any specified properties for that object, they take precedence. - * @param objToPropagate - The object that will be merged into the children. - * @param key - The key of the object to propagate. - * @param children - The array of children to propagate the object to. - */ -export function propagateToChildren(objToPropagate, key, ...children) { - children.forEach(child => { - if (!child[key]) { - child[key] = {}; - } - child[key] = _.merge(objToPropagate, child[key]); - }); -} diff --git a/dataforged-tools/src/utils/object_transform/replaceInAllStrings.js b/dataforged-tools/src/utils/object_transform/replaceInAllStrings.js deleted file mode 100644 index 9b8968fb4..000000000 --- a/dataforged-tools/src/utils/object_transform/replaceInAllStrings.js +++ /dev/null @@ -1,20 +0,0 @@ -import jsonpath from "jsonpath"; -import _ from "lodash-es"; -/** - * Recurses over an object and replaces a substring with another string. - * @param object - The object to be searched and replaced. This function creates a copy and so does **not** mutate `obj`; - * @param searchValue - The string to search for. - * @param replaceValue - The value to replace. - * @returns A copy of the original JSON object with all strings replaced. - */ -export function replaceInAllStrings(object, searchValue, replaceValue) { - // console.log("args", arguments); - const jsonClone = _.cloneDeep(object); - jsonpath.apply(jsonClone, "$..*", (match) => { - if (typeof match === "string") { - return match.replaceAll(searchValue, replaceValue); - } - return match; - }); - return jsonClone; -} diff --git a/dataforged-tools/src/utils/object_transform/templateOracle.js b/dataforged-tools/src/utils/object_transform/templateOracle.js deleted file mode 100644 index a7776095f..000000000 --- a/dataforged-tools/src/utils/object_transform/templateOracle.js +++ /dev/null @@ -1,24 +0,0 @@ -import { buildLog } from "@utils/logging/buildLog.js"; -import { replaceInAllStrings } from "@utils/object_transform/replaceInAllStrings.js"; -import _ from "lodash-es"; -/** - * It takes an oracle metadata template and builds it out with variables from a json object. - * @param json - The JSON object that you want to replace the template variables in. - * @param template - The template to use. - * @returns The template oracle. - */ -export function templateOracle(json, template) { - // buildLog(templateOracle, "Building oracle from template..."); - let jsonClone = _.cloneDeep(json); - const templateClone = _.cloneDeep(template); - jsonClone = _.merge(templateClone, jsonClone); - if (jsonClone._templateVars) { - _.forEach(jsonClone._templateVars, (replaceValue, key) => { - const searchValue = "${{" + key + "}}"; - buildLog(templateOracle, `Replacing "${searchValue}" with "${replaceValue}"`); - jsonClone = replaceInAllStrings(jsonClone, searchValue, replaceValue); - }); - return jsonClone; - } - return jsonClone; -} diff --git a/dataforged-tools/src/utils/object_transform/templateOracleInfo.js b/dataforged-tools/src/utils/object_transform/templateOracleInfo.js deleted file mode 100644 index 05c579cc8..000000000 --- a/dataforged-tools/src/utils/object_transform/templateOracleInfo.js +++ /dev/null @@ -1,23 +0,0 @@ -import { replaceInAllStrings } from "@utils/object_transform/replaceInAllStrings.js"; -import _ from "lodash-es"; -/** - * Builds Oracle metadata from a template, replacing template string values where appropriate. - * @param json - The object to be mutated. - * @returns The original object with the template info removed. - */ -export function templateOracleInfo(json) { - // cloning so that the original object isn't mutated - let jsonClone = _.cloneDeep(json); - if (jsonClone._templateInfo) { - jsonClone = _.merge(jsonClone._templateInfo, jsonClone); - if (jsonClone._templateVars) { - const templateVars = _.cloneDeep(jsonClone._templateVars); - _.forEach(templateVars, (replaceValue, key) => { - const searchValue = "${{" + key + "}}"; - jsonClone = replaceInAllStrings(jsonClone, searchValue, replaceValue); - }); - delete jsonClone._templateInfo; - } - } - return jsonClone; -} diff --git a/dataforged-tools/src/utils/object_transform/templateOracleTable.js b/dataforged-tools/src/utils/object_transform/templateOracleTable.js deleted file mode 100644 index b15872414..000000000 --- a/dataforged-tools/src/utils/object_transform/templateOracleTable.js +++ /dev/null @@ -1,26 +0,0 @@ -import { extractRowContent } from "@utils/object_transform/extractRowContent.js"; -import { extractRowRolls } from "@utils/object_transform/extractRowRolls.js"; -import _ from "lodash-es"; -/** - * Given a table template object, extract the rolls and content into separate arrays and combine them into a single table. - * @param template - The template object. - * @returns A table of rows, where each row is a list of rolls and content. - */ -export function templateOracleTable(template) { - if (template.rolls.length !== template.content.length) { - throw new Error("[buildTemplateTable] Arrays for template content and rolls have different lengths. Use [null, null] to represent a null roll range."); - } - const templateClone = _.cloneDeep(template); - const rolls = templateClone.rolls.map(row => extractRowRolls(row)); - const content = templateClone.content.map(row => { - if (Array.isArray(row)) { - return extractRowContent(row); - } - return [row]; - }); - const newTable = rolls.map((currentRoll, index) => { - const newRow = [...currentRoll, ...content[index]]; - return newRow; - }); - return newTable; -} diff --git a/dataforged-tools/src/utils/process_img/cloneImages.js b/dataforged-tools/src/utils/process_img/cloneImages.js deleted file mode 100644 index bb5e9f529..000000000 --- a/dataforged-tools/src/utils/process_img/cloneImages.js +++ /dev/null @@ -1,12 +0,0 @@ -import pkg from "fs-extra"; -const { copySync } = pkg; -/** - * Copy all files from the srcRoot to the outRoot - * @param srcRoot - The path to the source directory where the images are located. - * @param outRoot - The directory where the images will be copied to. - */ -export function cloneImages(srcRoot, outRoot) { - // eslint-disable-next-line no-console - console.info(`[buildImages] Copying files from ${srcRoot} to ${outRoot}...`); - copySync(srcRoot, outRoot, { recursive: true }); -} diff --git a/dataforged-tools/src/utils/process_img/convertRasterImages.js b/dataforged-tools/src/utils/process_img/convertRasterImages.js deleted file mode 100644 index a60d0e6d8..000000000 --- a/dataforged-tools/src/utils/process_img/convertRasterImages.js +++ /dev/null @@ -1,34 +0,0 @@ -import { getAllFiles } from "@utils/io/getAllFiles.js"; -import pkg from "fs-extra"; -const { ensureDirSync, readFileSync } = pkg; -import sharp from "sharp"; -import { TypedRegEx } from "typed-regex"; -// eslint-disable-next-line no-useless-escape -const filePattern = TypedRegEx("^(?.+)/(?[A-z\-0-9]+)\.(?.+?)$"); -/** - * For each file in the srcRoot directory, convert it to a webp file in the outRootWebP directory - * @param srcRoot - The root directory of the source images. - * @param outRootWebP - The output directory for the webp images. - */ -export function convertRasterImages(srcRoot, outRootWebP) { - const srcFiles = getAllFiles(srcRoot); - srcFiles.forEach(file => { - // console.log("in:", file); - const pattern = filePattern.captures(file); - if (!pattern) { - throw new Error(`Unable to match against pattern ${filePattern.toString()} ${file}`); - } - const input = readFileSync(file); - const oldFileName = pattern.name; - const oldPath = pattern.path; - // console.log(`[convertRasterImages] Converting ${oldFileName }`); - const newPath = oldPath.replaceAll(srcRoot, outRootWebP); - const filePathOut = `${newPath}/${oldFileName}.webp`; - // console.log("out:", filePathOut); - ensureDirSync(newPath); - void sharp(input).webp() - .toFile(filePathOut); - // console.log("finished:", filePathOut); - }); - // console.log("finished converting raster images"); -} diff --git a/dataforged-tools/src/utils/process_yaml/concatWithYamlRefs.js b/dataforged-tools/src/utils/process_yaml/concatWithYamlRefs.js deleted file mode 100644 index a28257a5f..000000000 --- a/dataforged-tools/src/utils/process_yaml/concatWithYamlRefs.js +++ /dev/null @@ -1,19 +0,0 @@ -import { REFS_PATH } from "@constants/index.js"; -import { loadYamlRefs } from "@utils/process_yaml/loadYamlRefs.js"; -import { loadYamlTemplates } from "@utils/process_yaml/loadYamlTemplates.js"; -import yaml from "js-yaml"; -import fs from "fs"; -/** - * Concatenates YAML with reference objects. - * @param referencePath - The path to the directory containing the reference files. - * @param filePaths - The files to load. - * @returns A JavaScript object with the following properties: - */ -export function concatWithYamlRefs(referencePath = REFS_PATH, ...filePaths) { - const refString = loadYamlRefs(referencePath); - const templateString = loadYamlTemplates(referencePath + "/templates/"); - const fileStrings = filePaths.map(path => fs.readFileSync(path, { encoding: "utf-8" })); - const dataStrings = [refString, templateString, ...fileStrings]; - const dataObject = yaml.load(dataStrings.join("\n\n")); - return dataObject; -} diff --git a/dataforged-tools/src/utils/process_yaml/jsonToYaml.js b/dataforged-tools/src/utils/process_yaml/jsonToYaml.js deleted file mode 100644 index 787bc5adf..000000000 --- a/dataforged-tools/src/utils/process_yaml/jsonToYaml.js +++ /dev/null @@ -1,16 +0,0 @@ -// import yaml from "js-yaml"; -import fs from "fs-extra"; -import yaml from "yaml"; -// type JsonSerializable = Record | Record[]; -/** - * Converts a json object to a YAML file with standardized formatting. - */ -export function jsonToYaml(pathIn, pathOut) { - const data = yaml.stringify(fs.readJsonSync(pathIn), { - indent: 2, - blockQuote: false, - doubleQuotedMinMultiLineLength: 40, - }); - fs.writeFileSync(pathOut, data); -} -jsonToYaml("./src/_master-data/Ironsworn/Truths.json", "./src/_master-data/Ironsworn/Truths.yaml"); diff --git a/dataforged-tools/src/utils/process_yaml/loadOracleData.js b/dataforged-tools/src/utils/process_yaml/loadOracleData.js deleted file mode 100644 index 03eaf3af9..000000000 --- a/dataforged-tools/src/utils/process_yaml/loadOracleData.js +++ /dev/null @@ -1,19 +0,0 @@ -import { REFS_PATH } from "@constants/index.js"; -import { concatWithYamlRefs } from "@utils/process_yaml/concatWithYamlRefs.js"; -import deepFreezeStrict from "deep-freeze-strict"; -import _ from "lodash-es"; -/** - * Loads the oracle YAML data from the files and merges them into a single object. - * @param referencePath - The path to the YAML file containing the references.. - * @param filePaths - The files to load. - * @returns A JSON object with the following structure: - */ -export function loadOracleData(referencePath = REFS_PATH, ...filePaths) { - const builtData = concatWithYamlRefs(referencePath, ...filePaths); - const result = { - _refs: deepFreezeStrict(builtData._refs), - _templates: deepFreezeStrict(builtData._templates), - Categories: Object.values(_.omitBy(builtData, (_, key) => key.startsWith("_"))), - }; - return result; -} diff --git a/dataforged-tools/src/utils/process_yaml/loadYamlRefs.js b/dataforged-tools/src/utils/process_yaml/loadYamlRefs.js deleted file mode 100644 index 32fd1f60b..000000000 --- a/dataforged-tools/src/utils/process_yaml/loadYamlRefs.js +++ /dev/null @@ -1,16 +0,0 @@ -import { REFS_PATH } from "@constants/index.js"; -import FastGlob from "fast-glob"; -import fs from "fs"; -/** - * It loads all the yaml files in the refs folder and joins them into a single string. - * @param path - The path to the directory containing the YAML files. - * @returns A string of YAML that is the concatenation of the contents of the files in the `index` - * directory. - */ -export function loadYamlRefs(path = REFS_PATH) { - const files = FastGlob.sync(path + "/*.(yml|yaml)", { onlyFiles: true }); - let refString = files.map(file => fs.readFileSync(file, { encoding: "utf-8" })).join("\n"); - refString = refString.replaceAll(/^/gim, " "); - refString = "_refs:\n" + refString; - return refString; -} diff --git a/dataforged-tools/src/utils/process_yaml/loadYamlTemplates.js b/dataforged-tools/src/utils/process_yaml/loadYamlTemplates.js deleted file mode 100644 index 74cefb76a..000000000 --- a/dataforged-tools/src/utils/process_yaml/loadYamlTemplates.js +++ /dev/null @@ -1,15 +0,0 @@ -import { REFS_PATH } from "@constants/index.js"; -import fs from "fs"; -/** - * It loads all the yaml files in the templates directory and joins them into a single string. - * @param path - The path to the directory containing the YAML files. - * @returns A string of YAML that can be parsed by the `yaml` module. - */ -export function loadYamlTemplates(path = REFS_PATH.toString() + "/templates/") { - const files = fs.readdirSync(path).filter(item => item.match(".yaml")) - .map(item => path.toString() + item); - let templateString = files.map(file => fs.readFileSync(file, { encoding: "utf-8" })).join("\n"); - templateString = templateString.replaceAll(/^/gim, " "); - templateString = "_templates:\n" + templateString; - return templateString; -} diff --git a/dataforged-tools/src/utils/sortIronsworn.js b/dataforged-tools/src/utils/sortIronsworn.js deleted file mode 100644 index 788bd7642..000000000 --- a/dataforged-tools/src/utils/sortIronsworn.js +++ /dev/null @@ -1,32 +0,0 @@ -import { SourceTitle } from "@json_out/index.js"; -const order = [ - SourceTitle.Starforged, - SourceTitle.StarforgedAssets, - SourceTitle.Ironsworn, - SourceTitle.IronswornAssets, - SourceTitle.IronswornDelve, - SourceTitle.IronswornBonusAssets -]; -/** - * Sort comparison function for Ironsworn source data. - * @param source1 - The first source to compare. - * @param source2 - The second source to compare - */ -export function sortIronsworn(source1, source2) { - if (source1.Title !== source2.Title) { - return order.findIndex(src => src === source1.Title) - order.findIndex(src => src === source2.Title); - } - else if (source1.Page && source2.Page) { - return source1.Page - source2.Page; - } - else if (source1.Page || source2.Page) { - // empty page vs specified page defaults to last - if (!source1.Page) { - return 1; - } - if (!source2.Page) { - return -1; - } - } - return 0; -} diff --git a/dataforged-tools/src/utils/types/ArrayElement.js b/dataforged-tools/src/utils/types/ArrayElement.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/types/ArrayElement.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/types/AttributeHash.js b/dataforged-tools/src/utils/types/AttributeHash.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/types/AttributeHash.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/types/EnumLike.js b/dataforged-tools/src/utils/types/EnumLike.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/types/EnumLike.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/types/KeysMatching.js b/dataforged-tools/src/utils/types/KeysMatching.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/types/KeysMatching.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/types/KeysWithValuesOfType.js b/dataforged-tools/src/utils/types/KeysWithValuesOfType.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/types/KeysWithValuesOfType.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/types/OmitNever.js b/dataforged-tools/src/utils/types/OmitNever.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/types/OmitNever.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/types/PartialBy.js b/dataforged-tools/src/utils/types/PartialBy.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/types/PartialBy.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/types/PartialExcept.js b/dataforged-tools/src/utils/types/PartialExcept.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/types/PartialExcept.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/types/RequireKey.js b/dataforged-tools/src/utils/types/RequireKey.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/types/RequireKey.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/types/Stub.js b/dataforged-tools/src/utils/types/Stub.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/types/Stub.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/types/Tuple.js b/dataforged-tools/src/utils/types/Tuple.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/types/Tuple.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/types/TypeKeys.js b/dataforged-tools/src/utils/types/TypeKeys.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/utils/types/TypeKeys.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/utils/types/index.js b/dataforged-tools/src/utils/types/index.js deleted file mode 100644 index 85de7da93..000000000 --- a/dataforged-tools/src/utils/types/index.js +++ /dev/null @@ -1,12 +0,0 @@ -export * from "@utils/types/ArrayElement.js"; -export * from "@utils/types/AttributeHash.js"; -export * from "@utils/types/EnumLike.js"; -export * from "@utils/types/KeysMatching.js"; -export * from "@utils/types/KeysWithValuesOfType.js"; -export * from "@utils/types/OmitNever.js"; -export * from "@utils/types/PartialBy.js"; -export * from "@utils/types/PartialExcept.js"; -export * from "@utils/types/RequireKey.js"; -export * from "@utils/types/Stub.js"; -export * from "@utils/types/Tuple.js"; -export * from "@utils/types/TypeKeys.js"; diff --git a/dataforged-tools/src/utils/uniqueStatArrays.js b/dataforged-tools/src/utils/uniqueStatArrays.js deleted file mode 100644 index 632da9e9e..000000000 --- a/dataforged-tools/src/utils/uniqueStatArrays.js +++ /dev/null @@ -1,42 +0,0 @@ -const stats = ["Edge", "Iron", "Heart", "Shadow", "Wits"]; -/** - * Given an array of items, return an array of all unique pairs of items - * @param items - An array of items to pair. - * @returns An array of arrays. - */ -export function uniquePairs(...items) { - const allPairs = []; - items.forEach(item1 => items.forEach(item2 => { - if (item1 !== item2) { - const newPair = [item1, item2].sort(); - const matchingPairs = allPairs.some((oldPair) => oldPair.every((item, index) => item === newPair[index])); - if (matchingPairs === false) { - // if (matchingPairs.length === 0) { - allPairs.push(newPair); - } - } - })); - return allPairs; -} -/** - * Given a list of stats, return a list of unique pairs of stats, and a list of unique triads of stats - * @returns An array of objects, each of which has a statRecord property. - */ -export function uniqueStatArrays() { - const statPairs = uniquePairs(...stats); - const statTriads = []; - statPairs.forEach(pair => { - stats.forEach(stat => { - if (!pair.includes(stat)) { - statTriads.push([stat, pair]); - } - }); - }); - return statTriads.sort().map(triad => { - const statRecord = {}; - statRecord[triad[0]] = 3; - statRecord[triad[1][0]] = 2; - statRecord[triad[1][1]] = 2; - }); -} -console.log(uniqueStatArrays()); diff --git a/dataforged-tools/src/utils/validateColor.js b/dataforged-tools/src/utils/validateColor.js deleted file mode 100644 index f1ef6b6b0..000000000 --- a/dataforged-tools/src/utils/validateColor.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * It checks if the string is a valid hex color. - * @param str - The string to be validated. - * @returns A boolean value. - */ -export function validateColor(str) { - return RegExp(/#?[0-9A-Fa-f]{6}/g).test(str); -} diff --git a/dataforged-tools/src/utils/validation/enumHas.js b/dataforged-tools/src/utils/validation/enumHas.js deleted file mode 100644 index 045e5e377..000000000 --- a/dataforged-tools/src/utils/validation/enumHas.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Check if an enum has a specific value. Useful mainly in situations where typescript-is shouldn't be invoked, for example while debugging via ts-node or ttypescript. - * @param enumeration - The enum object - * @param str - The string to search for. - * @returns True if the value is included. False if not. - */ -export function enumHas(enumeration, str) { - return Object.values(enumeration).includes(str); -} diff --git a/dataforged-tools/src/utils/validation/validateRollTemplate.js b/dataforged-tools/src/utils/validation/validateRollTemplate.js deleted file mode 100644 index 84ee20c11..000000000 --- a/dataforged-tools/src/utils/validation/validateRollTemplate.js +++ /dev/null @@ -1,46 +0,0 @@ -import { badJsonError } from "@utils/logging/badJsonError.js"; -import _ from "lodash-es"; -import { TypedRegEx } from "typed-regex"; -import { is } from "typescript-is"; -// eslint-disable-next-line no-useless-escape -const rollTplPattern = TypedRegEx("\$\{\{(?.*?)\}\}", "g"); -/** - * It validates that the RollTemplate object has the same keys as the parent object, and validates each individual roll template string. - * @param parent - The parent object that the template is being validated against. - * @param templateObj - RollTemplate - * @returns The original object as the validated type. - */ -export function validateRollTemplate(parent, templateObj) { - // FIXME: smarted subtable template handling. - _.forEach(templateObj, (rollTplData, key) => { - if (!parent[key]) { - // console.info(parent); - throw badJsonError(validateRollTemplate, templateObj, `RollTemplate key '${key}' doesn't exist on its parent object. This is necessary so that a placeholder string is provided.`); - } - if (rollTplData) { - // console.log("validating template data", rollTplData); - _.forEach(rollTplData, (v, k) => { - // console.log("validating string", v); - validateRollTemplateString(v); - }); - } - }); - return templateObj; -} -/** - * It takes a string and returns true if it's a valid roll template string - * @param str - The string to validate. - * @returns A boolean indicating whether the string is valid. - */ -export function validateRollTemplateString(str) { - if (typeof str !== "string") { - throw badJsonError(validateRollTemplateString, str, "Expected a string"); - } - const captures = _.compact(rollTplPattern.captureAll(str).map(capture => capture === null || capture === void 0 ? void 0 : capture.id)); - captures.forEach(capture => { - if (!is(capture)) { - throw badJsonError(validateRollTemplateString, capture, "Doesn't appear to be a valid OracleTableId"); - } - }); - return str; -} diff --git a/dataforged-tools/src/utils/validation/validateTable.js b/dataforged-tools/src/utils/validation/validateTable.js deleted file mode 100644 index 3711fb832..000000000 --- a/dataforged-tools/src/utils/validation/validateTable.js +++ /dev/null @@ -1,55 +0,0 @@ -import { badJsonError } from "@utils/logging/badJsonError.js"; -/** - * It validates a table of dice rolls. - * @param requireUniqueResults - If true, the table must have unique results. - * @param requireAllD100 - If true, the sum of all the dice ranges must be 100. - * @returns A boolean indicating whether the table is valid. - */ -export function validateTable(table, requireUniqueResults = true, requireAllD100 = true) { - if (!Array.isArray(table)) { - throw badJsonError(validateTable, table, "Table is not an array."); - } - if (table.length < 2) { - throw badJsonError(validateTable, table, "Table should have at least two rows."); - } - let totalRange = 0; - const resultStrings = new Set(); - for (let i = 0; i < table.length; i++) { - const floor = table[i].Floor; - const ceiling = table[i].Ceiling; - if (typeof floor === "number" && typeof ceiling === "number") { - const lastCeiling = i > 0 ? table[i - 1].Ceiling : 1; - const errPrefix = `[validateTable] Invalid row at index ${i}:`; - // if (requireUniqueResults) { resultStrings.add(currentRow.Result); } - if (i === 0 && floor !== 1) { - throw new Error(`${errPrefix} first row must have a floor of 1\n${JSON.stringify(table, undefined, 2)}`); - } - if (i === (table.length - 1) && ceiling !== 100) { - throw new Error(`${errPrefix} last row must have a ceiling of 100`); - } - if (floor > ceiling) { - throw new Error(`${errPrefix} floor must be no greater than ceiling.`); - } - if (lastCeiling !== null && (lastCeiling + 1) !== (floor)) { - throw new Error(`${errPrefix} current row's floor must be 1 higher than previous row's ceiling.`); - } - const rangeSize = (ceiling.valueOf() - floor.valueOf()) + 1; - totalRange = totalRange + rangeSize; - } - } - if (requireAllD100 && totalRange !== 100) { - throw new Error("Invalid table - dice ranges do not sum to 100."); - } - if (requireUniqueResults && resultStrings.size !== table.length) { - const duplicatedStrings = table.map(row => row.Result); - const uniqueStrings = Array.from(resultStrings); - uniqueStrings.forEach(row => { - const indexToDelete = duplicatedStrings.findIndex((value) => value === row); - if (indexToDelete > -1) { - delete duplicatedStrings[indexToDelete]; - } - }); - throw new Error(`Invalid table - duplicate Result strings.\n${JSON.stringify(uniqueStrings)}`); - } - return true; -} diff --git a/dataforged-tools/src/yaml_in/assets/IAlterMoveYaml.js b/dataforged-tools/src/yaml_in/assets/IAlterMoveYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/assets/IAlterMoveYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/assets/IAssetAbilityYaml.js b/dataforged-tools/src/yaml_in/assets/IAssetAbilityYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/assets/IAssetAbilityYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/assets/IAssetTypeYaml.js b/dataforged-tools/src/yaml_in/assets/IAssetTypeYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/assets/IAssetTypeYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/assets/IAssetYaml.js b/dataforged-tools/src/yaml_in/assets/IAssetYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/assets/IAssetYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/assets/IInputSelectYaml.js b/dataforged-tools/src/yaml_in/assets/IInputSelectYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/assets/IInputSelectYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/assets/IInputYaml.js b/dataforged-tools/src/yaml_in/assets/IInputYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/assets/IInputYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/assets/index.js b/dataforged-tools/src/yaml_in/assets/index.js deleted file mode 100644 index 40d17bd54..000000000 --- a/dataforged-tools/src/yaml_in/assets/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export * from "@yaml_in/assets/IAlterMoveYaml.js"; -export * from "@yaml_in/assets/IAssetAbilityYaml.js"; -export * from "@yaml_in/assets/IAssetTypeYaml.js"; -export * from "@yaml_in/assets/IAssetYaml.js"; -export * from "@yaml_in/assets/IInputSelectYaml.js"; -export * from "@yaml_in/assets/IInputYaml.js"; diff --git a/dataforged-tools/src/yaml_in/common/IRequirementsYaml.js b/dataforged-tools/src/yaml_in/common/IRequirementsYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/common/IRequirementsYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/common/ISuggestionsYaml.js b/dataforged-tools/src/yaml_in/common/ISuggestionsYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/common/ISuggestionsYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/common/IYamlWithRef.js b/dataforged-tools/src/yaml_in/common/IYamlWithRef.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/common/IYamlWithRef.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/common/index.js b/dataforged-tools/src/yaml_in/common/index.js deleted file mode 100644 index 22ee56af1..000000000 --- a/dataforged-tools/src/yaml_in/common/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from "@yaml_in/common/IRequirementsYaml.js"; -export * from "@yaml_in/common/ISuggestionsYaml.js"; -export * from "@yaml_in/common/IYamlWithRef.js"; diff --git a/dataforged-tools/src/yaml_in/encounters/IEncounterIronswornYaml.js b/dataforged-tools/src/yaml_in/encounters/IEncounterIronswornYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/encounters/IEncounterIronswornYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/encounters/IEncounterStarforgedYaml.js b/dataforged-tools/src/yaml_in/encounters/IEncounterStarforgedYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/encounters/IEncounterStarforgedYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/encounters/IEncounterVariantYaml.js b/dataforged-tools/src/yaml_in/encounters/IEncounterVariantYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/encounters/IEncounterVariantYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/encounters/IEncounterYaml.js b/dataforged-tools/src/yaml_in/encounters/IEncounterYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/encounters/IEncounterYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/encounters/index.js b/dataforged-tools/src/yaml_in/encounters/index.js deleted file mode 100644 index b4f4fa453..000000000 --- a/dataforged-tools/src/yaml_in/encounters/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export * from "@yaml_in/encounters/IEncounterIronswornYaml.js"; -export * from "@yaml_in/encounters/IEncounterStarforgedYaml.js"; -export * from "@yaml_in/encounters/IEncounterVariantYaml.js"; -export * from "@yaml_in/encounters/IEncounterYaml.js"; diff --git a/dataforged-tools/src/yaml_in/index.js b/dataforged-tools/src/yaml_in/index.js deleted file mode 100644 index a19becdc2..000000000 --- a/dataforged-tools/src/yaml_in/index.js +++ /dev/null @@ -1,7 +0,0 @@ -export * from "@yaml_in/assets/index.js"; -export * from "@yaml_in/common/index.js"; -export * from "@yaml_in/encounters/index.js"; -export * from "@yaml_in/moves/index.js"; -export * from "@yaml_in/oracles/index.js"; -export * from "@yaml_in/setting_truths/index.js"; -export * from "@yaml_in/templates/index.js"; diff --git a/dataforged-tools/src/yaml_in/moves/IMoveCategoryYaml.js b/dataforged-tools/src/yaml_in/moves/IMoveCategoryYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/moves/IMoveCategoryYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/moves/IMoveTriggerOptionYaml.js b/dataforged-tools/src/yaml_in/moves/IMoveTriggerOptionYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/moves/IMoveTriggerOptionYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/moves/IMoveTriggerYaml.js b/dataforged-tools/src/yaml_in/moves/IMoveTriggerYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/moves/IMoveTriggerYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/moves/IMoveYaml.js b/dataforged-tools/src/yaml_in/moves/IMoveYaml.js deleted file mode 100644 index 95da36c2f..000000000 --- a/dataforged-tools/src/yaml_in/moves/IMoveYaml.js +++ /dev/null @@ -1,2 +0,0 @@ -; -export {}; diff --git a/dataforged-tools/src/yaml_in/moves/index.js b/dataforged-tools/src/yaml_in/moves/index.js deleted file mode 100644 index ce8fd863c..000000000 --- a/dataforged-tools/src/yaml_in/moves/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from "@yaml_in/moves/IMoveCategoryYaml.js"; -export * from "@yaml_in/moves/IMoveTriggerOptionYaml.js"; -export * from "@yaml_in/moves/IMoveTriggerYaml.js"; diff --git a/dataforged-tools/src/yaml_in/oracles/IOracleCategoryYaml.js b/dataforged-tools/src/yaml_in/oracles/IOracleCategoryYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/oracles/IOracleCategoryYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/oracles/IOracleParentCatRootYaml.js b/dataforged-tools/src/yaml_in/oracles/IOracleParentCatRootYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/oracles/IOracleParentCatRootYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/oracles/IOracleUsageYaml.js b/dataforged-tools/src/yaml_in/oracles/IOracleUsageYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/oracles/IOracleUsageYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/oracles/IOracleYaml.js b/dataforged-tools/src/yaml_in/oracles/IOracleYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/oracles/IOracleYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/oracles/IRowYaml.js b/dataforged-tools/src/yaml_in/oracles/IRowYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/oracles/IRowYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/oracles/index.js b/dataforged-tools/src/yaml_in/oracles/index.js deleted file mode 100644 index 45e1f6cfd..000000000 --- a/dataforged-tools/src/yaml_in/oracles/index.js +++ /dev/null @@ -1,5 +0,0 @@ -export * from "@yaml_in/oracles/IOracleCategoryYaml.js"; -export * from "@yaml_in/oracles/IOracleUsageYaml.js"; -export * from "@yaml_in/oracles/IOracleYaml.js"; -export * from "@yaml_in/oracles/IRowYaml.js"; -export * from "@yaml_in/oracles/IOracleParentCatRootYaml.js"; diff --git a/dataforged-tools/src/yaml_in/setting_truths/ISettingTruthYaml.js b/dataforged-tools/src/yaml_in/setting_truths/ISettingTruthYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/setting_truths/ISettingTruthYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/setting_truths/index.js b/dataforged-tools/src/yaml_in/setting_truths/index.js deleted file mode 100644 index 604260dbf..000000000 --- a/dataforged-tools/src/yaml_in/setting_truths/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from "@yaml_in/setting_truths/ISettingTruthYaml.js"; diff --git a/dataforged-tools/src/yaml_in/templates/ITemplateOracleCategoryYaml.js b/dataforged-tools/src/yaml_in/templates/ITemplateOracleCategoryYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/templates/ITemplateOracleCategoryYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/templates/ITemplateOracleYaml.js b/dataforged-tools/src/yaml_in/templates/ITemplateOracleYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/templates/ITemplateOracleYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/templates/ITemplateTableYaml.js b/dataforged-tools/src/yaml_in/templates/ITemplateTableYaml.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/templates/ITemplateTableYaml.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/templates/ITemplateYamlBase.js b/dataforged-tools/src/yaml_in/templates/ITemplateYamlBase.js deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dataforged-tools/src/yaml_in/templates/ITemplateYamlBase.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dataforged-tools/src/yaml_in/templates/index.js b/dataforged-tools/src/yaml_in/templates/index.js deleted file mode 100644 index 941ea60df..000000000 --- a/dataforged-tools/src/yaml_in/templates/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export * from "@yaml_in/templates/ITemplateOracleCategoryYaml.js"; -export * from "@yaml_in/templates/ITemplateOracleYaml.js"; -export * from "@yaml_in/templates/ITemplateTableYaml.js"; -export * from "@yaml_in/templates/ITemplateYamlBase.js";