From 9fb1e893987386e0dcad8a935d6d5c8e6255f560 Mon Sep 17 00:00:00 2001 From: Rin <58572875+TurtIeSocks@users.noreply.github.com> Date: Mon, 4 May 2026 17:03:06 -0400 Subject: [PATCH 1/3] feat: use better masterfile typing --- biome.json | 3 +- package.json | 3 +- src/classes/Item.ts | 10 +- src/classes/LocationCards.ts | 7 +- src/classes/Masterfile.ts | 9 +- src/classes/Move.ts | 16 +- src/classes/PokeApi.ts | 30 +- src/classes/Pokemon.ts | 705 ++++++++++++++++---------------- src/classes/Translations.ts | 50 ++- src/classes/Weather.ts | 9 +- src/index.ts | 62 +-- src/typings/dataTypes.ts | 6 +- src/typings/general.ts | 199 ++------- tests/formChanges.test.js | 566 ++++++++++++------------- tests/jungleEligibility.test.js | 5 +- tsconfig.json | 4 +- yarn.lock | 109 ++--- 17 files changed, 796 insertions(+), 997 deletions(-) diff --git a/biome.json b/biome.json index 88bf0c1..c1570c9 100644 --- a/biome.json +++ b/biome.json @@ -1,11 +1,12 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.8/schema.json", + "$schema": "https://biomejs.dev/schemas/2.4.14/schema.json", "vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true }, "files": { + "maxSize": 10485760, "includes": [ "**", "!!**/dist" diff --git a/package.json b/package.json index e43d1e7..fe6b286 100644 --- a/package.json +++ b/package.json @@ -53,9 +53,10 @@ "node": ">=21.0.0" }, "devDependencies": { - "@biomejs/biome": "2.3.9", + "@biomejs/biome": "2.4.14", "@types/node": "^24", "jest": "^30.2.0", + "pogo-masterfile-types": "<1.0.0", "ts-node": "^10.9.2", "typescript": "^5.9.3" } diff --git a/src/classes/Item.ts b/src/classes/Item.ts index 69e12c0..23054f4 100644 --- a/src/classes/Item.ts +++ b/src/classes/Item.ts @@ -1,7 +1,7 @@ +import { Rpc } from '@na-ji/pogo-protos' +import type { ItemSettings } from 'pogo-masterfile-types' import type { AllItems } from '../typings/dataTypes' -import type { NiaMfObj } from '../typings/general' import type { Options } from '../typings/inputs' -import { Rpc } from '@na-ji/pogo-protos' import type { ItemProto } from '../typings/protos' import Masterfile from './Masterfile' @@ -34,12 +34,10 @@ export default class Item extends Masterfile { this.parsedItems = {} } - addItem(object: NiaMfObj) { + addItem(object: ItemSettings['data']) { try { const { - data: { - itemSettings: { itemId, itemType, category, dropTrainerLevel }, - }, + itemSettings: { itemId, itemType, category, dropTrainerLevel }, templateId, } = object if ( diff --git a/src/classes/LocationCards.ts b/src/classes/LocationCards.ts index 787e699..2f8a233 100644 --- a/src/classes/LocationCards.ts +++ b/src/classes/LocationCards.ts @@ -1,6 +1,6 @@ import { Rpc } from '@na-ji/pogo-protos' +import type { LocationCardSettings } from 'pogo-masterfile-types' import type { AllLocationCards } from '../typings/dataTypes' -import type { NiaMfObj } from '../typings/general' import type { Options } from '../typings/inputs' import type { LocationCardProto } from '../typings/protos' import Masterfile from './Masterfile' @@ -30,9 +30,8 @@ export default class LocationCards extends Masterfile { this.parsedLocationCards = {} } - addLocationCard(object: NiaMfObj) { - const { templateId, data } = object - const { locationCardSettings } = data + addLocationCard(object: LocationCardSettings['data']) { + const { templateId, locationCardSettings } = object if (!locationCardSettings) { return } diff --git a/src/classes/Masterfile.ts b/src/classes/Masterfile.ts index cf8c703..6ce9a46 100644 --- a/src/classes/Masterfile.ts +++ b/src/classes/Masterfile.ts @@ -65,8 +65,9 @@ export default class Masterfile { ...translationOptions.prefix, } if (!translationOptions.questTitleTermsToSkip) { - merged.translations.options.questTitleTermsToSkip = - [...base.translations.options.questTitleTermsToSkip] + merged.translations.options.questTitleTermsToSkip = [ + ...base.translations.options.questTitleTermsToSkip, + ] } } }) @@ -209,9 +210,7 @@ export default class Masterfile { // checks which fields are in the template and if the data is an object, loops through again let returnedObj: any = {} const ref = - x && typeof x === 'object' - ? x - : reference[fieldKey]?.[x] ?? x + x && typeof x === 'object' ? x : (reference[fieldKey]?.[x] ?? x) if (ref === undefined || ref === null || typeof ref !== 'object') { return ref } diff --git a/src/classes/Move.ts b/src/classes/Move.ts index 0b684e5..1fd0c30 100644 --- a/src/classes/Move.ts +++ b/src/classes/Move.ts @@ -1,6 +1,6 @@ import { Rpc } from '@na-ji/pogo-protos' +import type { CombatMove, MoveSettings } from 'pogo-masterfile-types' import type { AllMoves } from '../typings/dataTypes' -import type { NiaMfObj } from '../typings/general' import type { MoveProto, TypeProto } from '../typings/protos' import Masterfile from './Masterfile' @@ -26,11 +26,8 @@ export default class Moves extends Masterfile { }) } - addMoveSettings(object: NiaMfObj) { - const { - templateId, - data: { moveSettings }, - } = object + addMoveSettings(object: MoveSettings['data']) { + const { templateId, moveSettings } = object try { const isMax = templateId.startsWith('VN_BM_') const proto = isMax ? templateId : templateId.substring(11) @@ -59,11 +56,8 @@ export default class Moves extends Masterfile { } } - addCombatMove(object: NiaMfObj) { - const { - templateId, - data: { combatMove }, - } = object + addCombatMove(object: CombatMove['data']) { + const { templateId, combatMove } = object try { const id: number = Rpc.HoloPokemonMove[templateId.substring(18) as MoveProto] diff --git a/src/classes/PokeApi.ts b/src/classes/PokeApi.ts index c70db02..e21b23d 100644 --- a/src/classes/PokeApi.ts +++ b/src/classes/PokeApi.ts @@ -55,7 +55,9 @@ export default class PokeApi extends Masterfile { [id: string]: { attack?: number; defense?: number; stamina?: number } } moveReference: AllMoves - private pokemonStatsCache: { [id: string]: Promise | PokeApiStats } + private pokemonStatsCache: { + [id: string]: Promise | PokeApiStats + } private speciesCache: { [id: string]: Promise | SpeciesApi } private inheritedMoveParentOverrides: { [id: string]: string } private apiBaseUrl: string @@ -155,7 +157,9 @@ export default class PokeApi extends Masterfile { private shouldFetchPlaceholderMoves(pokemon?: SinglePokemon) { return ( - this.hasExactMoves(pokemon?.quickMoves, [Rpc.HoloPokemonMove.SPLASH_FAST]) && + this.hasExactMoves(pokemon?.quickMoves, [ + Rpc.HoloPokemonMove.SPLASH_FAST, + ]) && this.hasExactMoves(pokemon?.chargedMoves, [Rpc.HoloPokemonMove.STRUGGLE]) ) } @@ -200,7 +204,9 @@ export default class PokeApi extends Masterfile { .sort((a, b) => a - b) } - private resolveStructId(struct?: BasePokeApiStruct | null): number | undefined { + private resolveStructId( + struct?: BasePokeApiStruct | null, + ): number | undefined { if (!struct) { return undefined } @@ -218,9 +224,9 @@ export default class PokeApi extends Masterfile { private async fetchPokemonStats(id: string | number): Promise { const cacheKey = `${id}` if (!this.pokemonStatsCache[cacheKey]) { - this.pokemonStatsCache[cacheKey] = (this.fetch( - this.buildUrl(`pokemon/${id}`), - ) as Promise).catch((error) => { + this.pokemonStatsCache[cacheKey] = ( + this.fetch(this.buildUrl(`pokemon/${id}`)) as Promise + ).catch((error) => { delete this.pokemonStatsCache[cacheKey] throw error }) @@ -233,9 +239,11 @@ export default class PokeApi extends Masterfile { private async fetchSpecies(id: string | number): Promise { const cacheKey = `${id}` if (!this.speciesCache[cacheKey]) { - this.speciesCache[cacheKey] = (this.fetch( - this.buildUrl(`pokemon-species/${id}`), - ) as Promise).catch((error) => { + this.speciesCache[cacheKey] = ( + this.fetch( + this.buildUrl(`pokemon-species/${id}`), + ) as Promise + ).catch((error) => { delete this.speciesCache[cacheKey] throw error }) @@ -504,7 +512,9 @@ export default class PokeApi extends Masterfile { parsedPokemon[id]?.mythic ?? evoData.is_mythical } if (evoData.evolves_from_species) { - const prevEvoId = this.resolveStructId(evoData.evolves_from_species) + const prevEvoId = this.resolveStructId( + evoData.evolves_from_species, + ) if (prevEvoId) { if (!this.baseStats[prevEvoId]) { this.baseStats[prevEvoId] = {} diff --git a/src/classes/Pokemon.ts b/src/classes/Pokemon.ts index 78910fd..d9b2ef2 100644 --- a/src/classes/Pokemon.ts +++ b/src/classes/Pokemon.ts @@ -1,4 +1,13 @@ import { Rpc } from '@na-ji/pogo-protos' +import type { + CombatLeague, + EvolutionQuestTemplate, + FormSettings, + PokemonExtendedSettings, + PokemonSettings, + SourdoughMoveMappingSettingsType, +} from 'pogo-masterfile-types' +import type { DeprecatedMasterfileEntry } from 'pogo-masterfile-types/deprecated' import type { AllForms, AllPokemon, @@ -11,7 +20,6 @@ import type { EvoBranch, EvolutionQuest, Generation, - NiaMfObj, RawFormChange, TempEvo, } from '../typings/general' @@ -28,11 +36,11 @@ import type { QuestTypeProto, TypeProto, } from '../typings/protos' +import { enumName, resolveEnumId, resolveEnumIds } from '../utils/enum' import { mergeTempEvolutions, sortTempEvolutions, } from '../utils/tempEvolutions' -import { enumName, resolveEnumId, resolveEnumIds } from '../utils/enum' import Item from './Item' import LocationCards from './LocationCards' import Masterfile from './Masterfile' @@ -78,7 +86,9 @@ const reconcileBaseFormChanges = ( const cleanNumberList = (arr?: number[]) => Array.isArray(arr) ? Array.from( - new Set(arr.filter((value): value is number => typeof value === 'number')), + new Set( + arr.filter((value): value is number => typeof value === 'number'), + ), ) : [] @@ -91,8 +101,12 @@ const shouldPreferEstimatedPlaceholderQuickMoves = ( actualChargedMoves: number[], fallbackQuickMoves: number[], ) => - hasExactPlaceholderMoves(actualQuickMoves, [Rpc.HoloPokemonMove.SPLASH_FAST]) && - hasExactPlaceholderMoves(actualChargedMoves, [Rpc.HoloPokemonMove.STRUGGLE]) && + hasExactPlaceholderMoves(actualQuickMoves, [ + Rpc.HoloPokemonMove.SPLASH_FAST, + ]) && + hasExactPlaceholderMoves(actualChargedMoves, [ + Rpc.HoloPokemonMove.STRUGGLE, + ]) && !fallbackQuickMoves.includes(Rpc.HoloPokemonMove.SPLASH_FAST) && fallbackQuickMoves.length > 0 @@ -314,272 +328,272 @@ export default class Pokemon extends Masterfile { const seenFormChanges = new Set() return formChanges .map((formChange) => { - const availableForms = resolveEnumIds( - Rpc.PokemonDisplayProto.Form, - formChange.availableForm || [], - 'form', - ) - const questRequirements = - formChange.questRequirement - ?.map((requirement) => ({ - questRequirement: requirement.questRequirementTemplateId, - description: requirement.description, - target: requirement.target, - })) - .filter( - (requirement) => - requirement.questRequirement || - requirement.description || - requirement.target !== undefined, - ) || [] - const componentLocationCardSettings = - formChange.componentPokemonSettings?.locationCardSettings - ?.map((settings) => ({ - basePokemonLocationCard: LocationCards.resolveId( - settings.basePokemonLocationCard, - 'form change location card', - ), - componentPokemonLocationCard: LocationCards.resolveId( - settings.componentPokemonLocationCard, - 'form change location card', - ), - fusionPokemonLocationCard: LocationCards.resolveId( - settings.fusionPokemonLocationCard, - 'form change location card', - ), - })) - .filter((settings) => - Object.values(settings).some((value) => value !== undefined), - ) || [] - const componentPokemonSettings = formChange.componentPokemonSettings - ? { - pokedexId: resolveEnumId( - Rpc.HoloPokemonId, - formChange.componentPokemonSettings.pokedexId, - 'pokemon', + const availableForms = resolveEnumIds( + Rpc.PokemonDisplayProto.Form, + formChange.availableForm || [], + 'form', + ) + const questRequirements = + formChange.questRequirement + ?.map((requirement) => ({ + questRequirement: requirement.questRequirementTemplateId, + description: requirement.description, + target: requirement.target, + })) + .filter( + (requirement) => + requirement.questRequirement || + requirement.description || + requirement.target !== undefined, + ) || [] + const componentLocationCardSettings = + formChange.componentPokemonSettings?.locationCardSettings + ?.map((settings) => ({ + basePokemonLocationCard: LocationCards.resolveId( + settings.basePokemonLocationCard, + 'form change location card', + ), + componentPokemonLocationCard: LocationCards.resolveId( + settings.componentPokemonLocationCard, + 'form change location card', + ), + fusionPokemonLocationCard: LocationCards.resolveId( + settings.fusionPokemonLocationCard, + 'form change location card', + ), + })) + .filter((settings) => + Object.values(settings).some((value) => value !== undefined), + ) || [] + const componentPokemonSettings = formChange.componentPokemonSettings + ? { + pokedexId: resolveEnumId( + Rpc.HoloPokemonId, + formChange.componentPokemonSettings.pokedexId, + 'pokemon', + ), + formId: resolveEnumId( + Rpc.PokemonDisplayProto.Form, + formChange.componentPokemonSettings.form, + 'form', + ), + componentCandyCost: + formChange.componentPokemonSettings.componentCandyCost, + formChangeType: enumName( + Rpc.ComponentPokemonSettingsProto.FormChangeType, + formChange.componentPokemonSettings.formChangeType, + 'form change type', + ), + fusionMove1: resolveEnumId( + Rpc.HoloPokemonMove, + formChange.componentPokemonSettings.fusionMove1, + 'move', + ), + fusionMove2: resolveEnumId( + Rpc.HoloPokemonMove, + formChange.componentPokemonSettings.fusionMove2, + 'move', + ), + locationCardSettings: componentLocationCardSettings.length + ? componentLocationCardSettings + : undefined, + familyId: resolveEnumId( + Rpc.HoloPokemonFamilyId, + formChange.componentPokemonSettings.familyId, + 'family', + ), + } + : undefined + const moveReassignment = formChange.moveReassignment + ? { + quickMoves: + formChange.moveReassignment.quickMoves + ?.map((moves) => ({ + existingMoves: resolveEnumIds( + Rpc.HoloPokemonMove, + moves.existingMoves || [], + 'move', + ), + replacementMoves: resolveEnumIds( + Rpc.HoloPokemonMove, + moves.replacementMoves || [], + 'move', + ), + })) + .filter( + (moves) => + moves.existingMoves.length || + moves.replacementMoves.length, + ) || undefined, + chargedMoves: + formChange.moveReassignment.cinematicMoves + ?.map((moves) => ({ + existingMoves: resolveEnumIds( + Rpc.HoloPokemonMove, + moves.existingMoves || [], + 'move', + ), + replacementMoves: resolveEnumIds( + Rpc.HoloPokemonMove, + moves.replacementMoves || [], + 'move', + ), + })) + .filter( + (moves) => + moves.existingMoves.length || + moves.replacementMoves.length, + ) || undefined, + } + : undefined + const requiredQuickMoves = + formChange.requiredQuickMoves + ?.map((moves) => ({ + requiredMoves: resolveEnumIds( + Rpc.HoloPokemonMove, + moves.requiredMoves || [], + 'move', + ), + })) + .filter((moves) => moves.requiredMoves.length) || [] + const requiredChargedMoves = + formChange.requiredCinematicMoves + ?.map((moves) => ({ + requiredMoves: resolveEnumIds( + Rpc.HoloPokemonMove, + moves.requiredMoves || [], + 'move', + ), + })) + .filter((moves) => moves.requiredMoves.length) || [] + const requiredBreadMoves = + formChange.requiredBreadMoves + ?.map((moves) => { + const moveTypes = moves.moveTypes?.filter(Boolean) || [] + return { + moveTypes: moveTypes.length ? moveTypes : undefined, + moveLevel: enumName( + Rpc.BreadMoveLevels, + moves.moveLevel, + 'bread move level', ), - formId: resolveEnumId( + } + }) + .filter( + (moves) => + (moves.moveTypes?.length || 0) > 0 || + moves.moveLevel !== undefined, + ) || [] + const formChangeBonusAttributes = + formChange.formChangeBonusAttributes + ?.map((attributes) => { + const maxMoves = + attributes.maxMoves + ?.map((move) => ({ + moveType: enumName( + Rpc.BreadMoveSlotProto.BreadMoveType, + move.moveType, + 'bread move type', + ), + moveLevel: enumName( + Rpc.BreadMoveLevels, + move.moveLevel, + 'bread move level', + ), + })) + .filter( + (move) => + move.moveType !== undefined || + move.moveLevel !== undefined, + ) || [] + return { + targetForm: resolveEnumId( Rpc.PokemonDisplayProto.Form, - formChange.componentPokemonSettings.form, + attributes.targetForm, 'form', ), - componentCandyCost: - formChange.componentPokemonSettings.componentCandyCost, - formChangeType: enumName( - Rpc.ComponentPokemonSettingsProto.FormChangeType, - formChange.componentPokemonSettings.formChangeType, - 'form change type', - ), - fusionMove1: resolveEnumId( - Rpc.HoloPokemonMove, - formChange.componentPokemonSettings.fusionMove1, - 'move', - ), - fusionMove2: resolveEnumId( - Rpc.HoloPokemonMove, - formChange.componentPokemonSettings.fusionMove2, - 'move', - ), - locationCardSettings: componentLocationCardSettings.length - ? componentLocationCardSettings - : undefined, - familyId: resolveEnumId( - Rpc.HoloPokemonFamilyId, - formChange.componentPokemonSettings.familyId, - 'family', + breadMode: enumName( + Rpc.BreadModeEnum.Modifier, + attributes.breadMode, + 'bread mode', ), + clearBreadMode: attributes.clearBreadMode, + maxMoves: maxMoves.length ? maxMoves : undefined, } - : undefined - const moveReassignment = formChange.moveReassignment - ? { - quickMoves: - formChange.moveReassignment.quickMoves - ?.map((moves) => ({ - existingMoves: resolveEnumIds( - Rpc.HoloPokemonMove, - moves.existingMoves || [], - 'move', - ), - replacementMoves: resolveEnumIds( - Rpc.HoloPokemonMove, - moves.replacementMoves || [], - 'move', - ), - })) - .filter( - (moves) => - moves.existingMoves.length || - moves.replacementMoves.length, - ) || undefined, - chargedMoves: - formChange.moveReassignment.cinematicMoves - ?.map((moves) => ({ - existingMoves: resolveEnumIds( - Rpc.HoloPokemonMove, - moves.existingMoves || [], - 'move', - ), - replacementMoves: resolveEnumIds( - Rpc.HoloPokemonMove, - moves.replacementMoves || [], - 'move', - ), - })) - .filter( - (moves) => - moves.existingMoves.length || - moves.replacementMoves.length, - ) || undefined, - } - : undefined - const requiredQuickMoves = - formChange.requiredQuickMoves - ?.map((moves) => ({ - requiredMoves: resolveEnumIds( - Rpc.HoloPokemonMove, - moves.requiredMoves || [], - 'move', - ), - })) - .filter((moves) => moves.requiredMoves.length) || [] - const requiredChargedMoves = - formChange.requiredCinematicMoves - ?.map((moves) => ({ - requiredMoves: resolveEnumIds( - Rpc.HoloPokemonMove, - moves.requiredMoves || [], - 'move', - ), - })) - .filter((moves) => moves.requiredMoves.length) || [] - const requiredBreadMoves = - formChange.requiredBreadMoves - ?.map((moves) => { - const moveTypes = moves.moveTypes?.filter(Boolean) || [] - return { - moveTypes: moveTypes.length ? moveTypes : undefined, - moveLevel: enumName( - Rpc.BreadMoveLevels, - moves.moveLevel, - 'bread move level', - ), - } - }) - .filter( - (moves) => - (moves.moveTypes?.length || 0) > 0 || - moves.moveLevel !== undefined, - ) || [] - const formChangeBonusAttributes = - formChange.formChangeBonusAttributes - ?.map((attributes) => { - const maxMoves = - attributes.maxMoves - ?.map((move) => ({ - moveType: enumName( - Rpc.BreadMoveSlotProto.BreadMoveType, - move.moveType, - 'bread move type', - ), - moveLevel: enumName( - Rpc.BreadMoveLevels, - move.moveLevel, - 'bread move level', - ), - })) - .filter( - (move) => - move.moveType !== undefined || - move.moveLevel !== undefined, - ) || [] - return { - targetForm: resolveEnumId( - Rpc.PokemonDisplayProto.Form, - attributes.targetForm, - 'form', - ), - breadMode: enumName( - Rpc.BreadModeEnum.Modifier, - attributes.breadMode, - 'bread mode', - ), - clearBreadMode: attributes.clearBreadMode, - maxMoves: maxMoves.length ? maxMoves : undefined, - } - }) - .filter((attributes) => - Object.entries(attributes).some(([key, value]) => - key === 'maxMoves' - ? Array.isArray(value) - ? value.length > 0 - : false - : value !== undefined, - ), - ) || [] - const locationCardSettings = - formChange.locationCardSettings - ?.map((settings) => ({ - existingLocationCard: LocationCards.resolveId( - settings.existingLocationCard, - 'form change location card', - ), - replacementLocationCard: LocationCards.resolveId( - settings.replacementLocationCard, - 'form change location card', - ), - })) - .filter((settings) => - Object.values(settings).some((value) => value !== undefined), - ) || [] - const normalized: FormChanges = { - availableForms: availableForms.length ? availableForms : undefined, - candyCost: formChange.candyCost, - stardustCost: formChange.stardustCost, - itemRequirement: Item.resolveId( - formChange.item, - 'form change item', - ), - itemCostCount: formChange.itemCostCount, - questRequirements: questRequirements.length - ? questRequirements - : undefined, - componentPokemonSettings: - componentPokemonSettings && - Object.entries(componentPokemonSettings).some(([key, value]) => - key === 'locationCardSettings' + }) + .filter((attributes) => + Object.entries(attributes).some(([key, value]) => + key === 'maxMoves' ? Array.isArray(value) ? value.length > 0 : false : value !== undefined, - ) - ? componentPokemonSettings - : undefined, - moveReassignment: - moveReassignment && - (moveReassignment.quickMoves?.length || - moveReassignment.chargedMoves?.length) - ? moveReassignment - : undefined, - requiredQuickMoves: requiredQuickMoves.length - ? requiredQuickMoves - : undefined, - requiredChargedMoves: requiredChargedMoves.length - ? requiredChargedMoves - : undefined, - requiredBreadMoves: requiredBreadMoves.length - ? requiredBreadMoves - : undefined, - priority: formChange.priority, - formChangeBonusAttributes: formChangeBonusAttributes.length - ? formChangeBonusAttributes + ), + ) || [] + const locationCardSettings = + formChange.locationCardSettings + ?.map((settings) => ({ + existingLocationCard: LocationCards.resolveId( + settings.existingLocationCard, + 'form change location card', + ), + replacementLocationCard: LocationCards.resolveId( + settings.replacementLocationCard, + 'form change location card', + ), + })) + .filter((settings) => + Object.values(settings).some((value) => value !== undefined), + ) || [] + const normalized: FormChanges = { + availableForms: availableForms.length ? availableForms : undefined, + candyCost: formChange.candyCost, + stardustCost: formChange.stardustCost, + itemRequirement: Item.resolveId( + formChange.item, + 'form change item', + ), + itemCostCount: formChange.itemCostCount, + questRequirements: questRequirements.length + ? questRequirements + : undefined, + componentPokemonSettings: + componentPokemonSettings && + Object.entries(componentPokemonSettings).some(([key, value]) => + key === 'locationCardSettings' + ? Array.isArray(value) + ? value.length > 0 + : false + : value !== undefined, + ) + ? componentPokemonSettings : undefined, - locationCardSettings: locationCardSettings.length - ? locationCardSettings + moveReassignment: + moveReassignment && + (moveReassignment.quickMoves?.length || + moveReassignment.chargedMoves?.length) + ? moveReassignment : undefined, - } - return Object.values(normalized).some((value) => value !== undefined) - ? normalized - : undefined + requiredQuickMoves: requiredQuickMoves.length + ? requiredQuickMoves + : undefined, + requiredChargedMoves: requiredChargedMoves.length + ? requiredChargedMoves + : undefined, + requiredBreadMoves: requiredBreadMoves.length + ? requiredBreadMoves + : undefined, + priority: formChange.priority, + formChangeBonusAttributes: formChangeBonusAttributes.length + ? formChangeBonusAttributes + : undefined, + locationCardSettings: locationCardSettings.length + ? locationCardSettings + : undefined, + } + return Object.values(normalized).some((value) => value !== undefined) + ? normalized + : undefined }) .filter((formChange): formChange is FormChanges => { if (!formChange) { @@ -757,11 +771,7 @@ export default class Pokemon extends Masterfile { this.parsedPokemon[id].forms = [] this.parsedPokemon[id].forms.push(+formId) } - reconcileBaseFormChanges( - this.parsedPokemon, - this.parsedForms, - id, - ) + reconcileBaseFormChanges(this.parsedPokemon, this.parsedForms, id) } } } @@ -771,37 +781,35 @@ export default class Pokemon extends Masterfile { }) } - addExtendedStats(object: NiaMfObj) { - if ('pokemonExtendedSettings' in object.data) { - const id: number = - Rpc.HoloPokemonId[ - object.data.pokemonExtendedSettings.uniqueId as PokemonIdProto - ] - if (id) { - if (!this.parsedPokemon[id]) { - this.parsedPokemon[id] = {} - } - const values = Object.entries( - object.data.pokemonExtendedSettings.sizeSettings, - ).map(([name, value]) => ({ name, value })) + addExtendedStats(object: PokemonExtendedSettings['data']) { + const id: number = + Rpc.HoloPokemonId[ + object.pokemonExtendedSettings.uniqueId as PokemonIdProto + ] + if (id) { + if (!this.parsedPokemon[id]) { + this.parsedPokemon[id] = {} + } + const values = Object.entries( + object.pokemonExtendedSettings.sizeSettings, + ).map(([name, value]) => ({ name, value })) - const protoForm = object.data.pokemonExtendedSettings.form - ? typeof object.data.pokemonExtendedSettings.form === 'number' - ? object.data.pokemonExtendedSettings.form - : /^\d+$/.test(object.data.pokemonExtendedSettings.form) - ? +object.data.pokemonExtendedSettings.form - : Rpc.PokemonDisplayProto.Form[ - object.data.pokemonExtendedSettings.form as FormProto - ] - : 0 - if (protoForm) { - if (!this.parsedForms[protoForm]) { - this.parsedForms[protoForm] = {} - } - this.parsedForms[protoForm].sizeSettings = values - } else { - this.parsedPokemon[id].sizeSettings = values + const protoForm = object.pokemonExtendedSettings.form + ? typeof object.pokemonExtendedSettings.form === 'number' + ? object.pokemonExtendedSettings.form + : /^\d+$/.test(object.pokemonExtendedSettings.form) + ? +object.pokemonExtendedSettings.form + : Rpc.PokemonDisplayProto.Form[ + object.pokemonExtendedSettings.form as FormProto + ] + : 0 + if (protoForm) { + if (!this.parsedForms[protoForm]) { + this.parsedForms[protoForm] = {} } + this.parsedForms[protoForm].sizeSettings = values + } else { + this.parsedPokemon[id].sizeSettings = values } } } @@ -853,24 +861,22 @@ export default class Pokemon extends Masterfile { this.parsedForms[formId].stamina = PokeApi.stamina(hp) } - addEvolutionQuest(object: NiaMfObj) { + addEvolutionQuest(object: EvolutionQuestTemplate['data']) { try { - const { evolutionQuestTemplate } = object.data - this.evolutionQuests[object.templateId] = { + const { evolutionQuestTemplate, templateId } = object + this.evolutionQuests[templateId] = { questType: Rpc.QuestType[evolutionQuestTemplate.questType as QuestTypeProto], target: evolutionQuestTemplate.goals[0].target, assetsRef: evolutionQuestTemplate.display.description.toLowerCase(), } - if (this.evolutionQuests[object.templateId].target) { - this.evolutionQuests[object.templateId].assetsRef = - this.evolutionQuests[object.templateId].assetsRef.replace( - 'single', - 'plural', - ) + if (this.evolutionQuests[templateId].target) { + this.evolutionQuests[templateId].assetsRef = this.evolutionQuests[ + templateId + ].assetsRef.replace('single', 'plural') } - if (evolutionQuestTemplate.goals[1]) { - console.warn(`Second quest goal detected, fix it. ${object.templateId}`) + if (evolutionQuestTemplate.goals.at(1)) { + console.warn(`Second quest goal detected, fix it. ${templateId}`) } } catch (e) { console.warn( @@ -880,12 +886,12 @@ export default class Pokemon extends Masterfile { } } - addForm(object: NiaMfObj) { + addForm(object: FormSettings['data']) { if (object.templateId.split('_')[1]) { const id: number = Number(object.templateId.split('_')[1].slice(1)) try { - const forms = object.data.formSettings.forms + const forms = object.formSettings.forms if (forms) { if (!this.parsedPokemon[id]) { @@ -904,7 +910,7 @@ export default class Pokemon extends Masterfile { const form = typeof value === 'number' ? this.lookupForm(value) : value - this.formsRef[form] = object.data.formSettings.pokemon + this.formsRef[form] = object.formSettings.pokemon const name = this.formName(id, form) if (i === 0) { this.parsedPokemon[id].defaultFormId = formId || 0 @@ -939,11 +945,8 @@ export default class Pokemon extends Masterfile { } } - addPokemon(object: NiaMfObj) { - const { - templateId, - data: { pokemonSettings }, - } = object + addPokemon(object: PokemonSettings['data']) { + const { templateId, pokemonSettings } = object const split = templateId.split('_') const id = Number(split[0].slice(1)) @@ -988,12 +991,10 @@ export default class Pokemon extends Masterfile { form.stamina = pokemonSettings.stats.baseStamina } switch (true) { - case object.data.pokemonSettings.pokedexHeightM !== - primaryForm.height: - case object.data.pokemonSettings.pokedexWeightKg !== - primaryForm.weight: - form.height = object.data.pokemonSettings.pokedexHeightM - form.weight = object.data.pokemonSettings.pokedexWeightKg + case pokemonSettings.pokedexHeightM !== primaryForm.height: + case pokemonSettings.pokedexWeightKg !== primaryForm.weight: + form.height = pokemonSettings.pokedexHeightM + form.weight = pokemonSettings.pokedexWeightKg } const qMoves = this.getMoves(pokemonSettings.quickMoves) @@ -1084,8 +1085,6 @@ export default class Pokemon extends Masterfile { eliteChargedMoves: this.getMoves(pokemonSettings.eliteCinematicMove), family: Rpc.HoloPokemonFamilyId[pokemonSettings.familyId as FamilyProto], - fleeRate: pokemonSettings.encounter.baseFleeRate, - captureRate: pokemonSettings.encounter.baseCaptureRate, bonusCandyCapture: pokemonSettings.encounter.bonusCandyCaptureReward, bonusStardustCapture: pokemonSettings.encounter.bonusStardustCaptureReward, @@ -1160,19 +1159,18 @@ export default class Pokemon extends Masterfile { } addSourdoughMoveMappings({ - data: { - sourdoughMoveMappingSettings: { mappings }, - }, - }: NiaMfObj) { - for (let i = 0; i < mappings.length; i += 1) + sourdoughMoveMappingSettings: { mappings }, + }: SourdoughMoveMappingSettingsType['data']) { + for (let i = 0; i < mappings.length; i += 1) { + const mapping = mappings[i] try { - const id = Rpc.HoloPokemonId[mappings[i].pokemonId as PokemonIdProto] + const id = Rpc.HoloPokemonId[mapping.pokemonId as PokemonIdProto] if (!this.parsedPokemon[id]) { this.parsedPokemon[id] = {} } let target = this.parsedPokemon[id] - if (mappings[i].form) { - const rawForm = mappings[i].form + if ('form' in mapping) { + const rawForm = mapping.form const formId = typeof rawForm === 'number' ? rawForm @@ -1201,21 +1199,27 @@ export default class Pokemon extends Masterfile { target = this.parsedForms[formId] } } - target.gmaxMove = Rpc.HoloPokemonMove[mappings[i].move as MoveProto] + target.gmaxMove = Rpc.HoloPokemonMove[mapping.move as MoveProto] } catch (e) { console.warn( e, `Failed to parse gmax move mapping #${i}`, - JSON.stringify(mappings[i], null, 2), + JSON.stringify(mapping, null, 2), ) } + } } addSmeargleMovesSettings({ data: { smeargleMovesSettings: { quickMoves, cinematicMoves }, }, - }: NiaMfObj) { + }: DeprecatedMasterfileEntry< + 'SMEARGLE_MOVES_SETTINGS', + { + smeargleMovesSettings: { quickMoves: MoveProto[]; cinematicMoves: MoveProto[] } + } + >) { const id = 235 if (!this.parsedPokemon[id]) { this.parsedPokemon[id] = {} @@ -1309,11 +1313,9 @@ export default class Pokemon extends Masterfile { } } - jungleCup(object: NiaMfObj) { + jungleCup(object: CombatLeague['data']) { const { - data: { - combatLeague: { pokemonCondition, bannedPokemon }, - }, + combatLeague: { pokemonCondition, bannedPokemon }, } = object pokemonCondition.forEach((condition) => { if (condition.type === 'WITH_POKEMON_TYPE') { @@ -1505,10 +1507,7 @@ export default class Pokemon extends Masterfile { } }) } - const { - _hiddenOnlyChargedMoves, - ...cacheEntry - } = baseEntry + const { _hiddenOnlyChargedMoves, ...cacheEntry } = baseEntry const actualQuickMoves = cleanNumberList(existing.quickMoves) const actualChargedMoves = cleanNumberList(existing.chargedMoves) const fallbackQuickMoves = cleanNumberList(cacheEntry.quickMoves) @@ -1537,25 +1536,23 @@ export default class Pokemon extends Masterfile { `[BASE_STATS] Replacing placeholder moves for ${id} with PokeApi data`, ) } - const quickMoves = - preferEstimatedPlaceholderQuickMoves - ? fallbackQuickMoves - : preferActualNumbers( - existing.quickMoves, - cacheEntry.quickMoves, - 'quick moves', - ) ?? (actualQuickMoves.length ? actualQuickMoves : undefined) - const chargedMoves = - preferEstimatedPlaceholderChargedMoves - ? sanitizedFallbackChargedMoves - : shouldDropPlaceholderChargedMoves - ? undefined - : preferActualNumbers( + const quickMoves = preferEstimatedPlaceholderQuickMoves + ? fallbackQuickMoves + : (preferActualNumbers( + existing.quickMoves, + cacheEntry.quickMoves, + 'quick moves', + ) ?? (actualQuickMoves.length ? actualQuickMoves : undefined)) + const chargedMoves = preferEstimatedPlaceholderChargedMoves + ? sanitizedFallbackChargedMoves + : shouldDropPlaceholderChargedMoves + ? undefined + : (preferActualNumbers( existing.chargedMoves, sanitizedFallbackChargedMoves, 'charged moves', ) ?? - (actualChargedMoves.length ? actualChargedMoves : undefined) + (actualChargedMoves.length ? actualChargedMoves : undefined)) const types = preferActualNumbers(existing.types, cacheEntry.types, 'types') ?? (Array.isArray(existing.types) && existing.types.length diff --git a/src/classes/Translations.ts b/src/classes/Translations.ts index 547c2ad..142348c 100644 --- a/src/classes/Translations.ts +++ b/src/classes/Translations.ts @@ -447,7 +447,7 @@ export default class Translations extends Masterfile { Object.keys(data[category]).forEach((id) => { const questEvo = ref[data[category][id].assetsRef] - if (category == 'evolutionQuests' && questEvo) { + if (category === 'evolutionQuests' && questEvo) { this.masterfile[category][id] = { ...data[category][id], i18n: questEvo, @@ -893,12 +893,25 @@ export default class Translations extends Masterfile { } const TYPE_TO_IDS: { [key: string]: [number, number] } = { - bug: [6, 7], dark: [10, 11], dragon: [12, 13], - electric: [49, 50], fairy: [14, 15], fighting: [16, 17], - fire: [18, 19], flying: [20, 21], ghost: [47, 48], - grass: [22, 23], ground: [24, 25], ice: [26, 27], - metal: [28, 29], steel: [28, 29], normal: [30, 31], poison: [32, 33], - psychic: [34, 35], rock: [36, 37], water: [38, 39], + bug: [6, 7], + dark: [10, 11], + dragon: [12, 13], + electric: [49, 50], + fairy: [14, 15], + fighting: [16, 17], + fire: [18, 19], + flying: [20, 21], + ghost: [47, 48], + grass: [22, 23], + ground: [24, 25], + ice: [26, 27], + metal: [28, 29], + steel: [28, 29], + normal: [30, 31], + poison: [32, 33], + psychic: [34, 35], + rock: [36, 37], + water: [38, 39], } const BALLOON_GRUNT_IDS = this.options.includeBalloons === false @@ -943,7 +956,9 @@ export default class Translations extends Masterfile { match = key.match(/^combat_grunt_balloon_quote#(\d+)__female_speaker$/) if (match) { const quoteNumber = Number(match[1]) - BALLOON_GRUNT_IDS.forEach((id) => addQuote(id, value, quoteNumber)) + BALLOON_GRUNT_IDS.forEach((id) => { + addQuote(id, value, quoteNumber) + }) continue } @@ -960,9 +975,9 @@ export default class Translations extends Masterfile { ) if (match) { const quoteNumber = match[2] ? Number(match[2]) : 1 - EXEC_TO_IDS[match[1]].forEach((id) => - addQuote(id, value, quoteNumber, !!match[2]), - ) + EXEC_TO_IDS[match[1]].forEach((id) => { + addQuote(id, value, quoteNumber, !!match[2]) + }) continue } @@ -972,7 +987,6 @@ export default class Translations extends Masterfile { const quoteNumber = match[1] ? Number(match[1]) : 1 addQuote(46, value, quoteNumber, !!match[1]) addQuote(45, value, quoteNumber, !!match[1]) - continue } } @@ -981,9 +995,10 @@ export default class Translations extends Masterfile { .map((quoteNumber) => Number(quoteNumber)) .sort((a, b) => a - b) .forEach((quoteNumber) => { - const key = quoteNumber === 1 - ? `${prefix}${idStr}` - : `${prefix}${idStr}_${quoteNumber}` + const key = + quoteNumber === 1 + ? `${prefix}${idStr}` + : `${prefix}${idStr}_${quoteNumber}` this.parsedTranslations[locale].gruntQuotes[key] = quotes[quoteNumber] }) @@ -1068,10 +1083,7 @@ export default class Translations extends Masterfile { ] = this.capitalize(name.replace('TEMP_EVOLUTION_', '')) }) if ( - !Object.prototype.hasOwnProperty.call( - Rpc.HoloTemporaryEvolutionId, - 'TEMP_EVOLUTION_MEGA_Z', - ) && + !Object.hasOwn(Rpc.HoloTemporaryEvolutionId, 'TEMP_EVOLUTION_MEGA_Z') && !this.parsedTranslations[locale].misc[ `${this.options.prefix.evolutions}5` ] diff --git a/src/classes/Weather.ts b/src/classes/Weather.ts index d469841..a38bccf 100644 --- a/src/classes/Weather.ts +++ b/src/classes/Weather.ts @@ -1,8 +1,7 @@ import { Rpc } from '@na-ji/pogo-protos' +import type { WeatherAffinities } from 'pogo-masterfile-types' import type { AllWeather } from '../typings/dataTypes' -import type { NiaMfObj } from '../typings/general' import type { TypeProto } from '../typings/protos' - import Masterfile from './Masterfile' export default class Weather extends Masterfile { rawWeather: { [id: string]: number[] } @@ -32,11 +31,9 @@ export default class Weather extends Masterfile { ) } - addWeather(object: NiaMfObj) { + addWeather(object: WeatherAffinities['data']) { const { - data: { - weatherAffinities: { weatherCondition, pokemonType }, - }, + weatherAffinities: { weatherCondition, pokemonType }, } = object this.rawWeather[weatherCondition] = pokemonType .map((type) => { diff --git a/src/index.ts b/src/index.ts index 20fee47..bb0fc3f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,4 @@ +import type { MasterfileEntryType } from 'pogo-masterfile-types' import base from './base' import ApkReader from './classes/Apk' import Invasions from './classes/Invasion' @@ -13,7 +14,6 @@ import Translations from './classes/Translations' import Types from './classes/Types' import Weather from './classes/Weather' import type { AllInvasions, FinalResult } from './typings/dataTypes' -import type { NiaMfObj } from './typings/general' import type { ApkTexts, Input, @@ -118,7 +118,7 @@ export async function generate({ AllTranslations.fromApk = await getApkTexts(apk, apkCache) } - const data: NiaMfObj[] = await AllPokemon.fetch(urlToFetch) + const data: MasterfileEntryType[] = await AllPokemon.fetch(urlToFetch) // add data from old gm (this setting is removed from latest) AllPokemon.addSmeargleMovesSettings({ @@ -354,37 +354,41 @@ export async function generate({ }) for (let i = 0; i < data.length; i += 1) { - if (data[i]) { - if (data[i].data.formSettings) { - AllPokemon.addForm(data[i]) - } else if (data[i].data.pokemonSettings) { - AllPokemon.addPokemon(data[i]) - } else if (data[i].data.sourdoughMoveMappingSettings) { - AllPokemon.addSourdoughMoveMappings(data[i]) - } else if (data[i].data.smeargleMovesSettings) { - AllPokemon.addSmeargleMovesSettings(data[i]) - } else if (data[i].data.itemSettings) { - AllItems.addItem(data[i]) - } else if (data[i].data.moveSettings) { - AllMoves.addMoveSettings(data[i]) - } else if (data[i].data.combatMove) { - AllMoves.addCombatMove(data[i]) + const entry = data[i] + if (entry) { + const data = entry.data + if ('formSettings' in data) { + AllPokemon.addForm(data) + } else if ('pokemonSettings' in data) { + AllPokemon.addPokemon(data) + } else if ('sourdoughMoveMappingSettings' in data) { + AllPokemon.addSourdoughMoveMappings(data) + // } else if (data.smeargleMovesSettings) { + // AllPokemon.addSmeargleMovesSettings(data) + } else if ('itemSettings' in data) { + AllItems.addItem(data) + } else if ('moveSettings' in data) { + AllMoves.addMoveSettings(data) + } else if ('combatMove' in data) { + AllMoves.addCombatMove(data) } else if ( - data[i].templateId === 'COMBAT_LEAGUE_VS_SEEKER_GREAT_LITTLE' + 'combatLeague' in data && + data.templateId === 'COMBAT_LEAGUE_VS_SEEKER_GREAT_LITTLE' ) { - AllPokemon.lcBanList = new Set(data[i].data.combatLeague.bannedPokemon) - } else if (data[i].data.weatherAffinities) { - AllWeather.addWeather(data[i]) - } else if (data[i].data.evolutionQuestTemplate) { - AllPokemon.addEvolutionQuest(data[i]) + AllPokemon.lcBanList = new Set(data.combatLeague.bannedPokemon) + } else if ('weatherAffinities' in data) { + AllWeather.addWeather(data) + } else if ('evolutionQuestTemplate' in data) { + AllPokemon.addEvolutionQuest(data) } else if ( - data[i].templateId === 'COMBAT_LEAGUE_VS_SEEKER_LITTLE_JUNGLE' + 'combatLeague' in data && + data.templateId === 'COMBAT_LEAGUE_VS_SEEKER_LITTLE_JUNGLE' ) { - AllPokemon.jungleCup(data[i]) - } else if (data[i].data.pokemonExtendedSettings) { - AllPokemon.addExtendedStats(data[i]) - } else if (data[i].data.locationCardSettings) { - AllLocationCards.addLocationCard(data[i]) + AllPokemon.jungleCup(data) + } else if ('pokemonExtendedSettings' in data) { + AllPokemon.addExtendedStats(data) + } else if ('locationCardSettings' in data) { + AllLocationCards.addLocationCard(data) } } } diff --git a/src/typings/dataTypes.ts b/src/typings/dataTypes.ts index fca40b4..59877e8 100644 --- a/src/typings/dataTypes.ts +++ b/src/typings/dataTypes.ts @@ -66,8 +66,8 @@ export interface SingleMove { attackerDefenseStatStageChange?: number targetAttackStatStageChange?: number targetDefenseStatStageChange?: number - buffActivationChance: number - }[] + buffActivationChance?: number + } } export interface AllItems { @@ -163,7 +163,7 @@ interface SingleForm extends BaseStats { costumeProto: string costumeName: string }[] - sizeSettings?: { name: string; value: number }[] + sizeSettings?: { name: string; value: number | boolean }[] gmaxMove?: number } diff --git a/src/typings/general.ts b/src/typings/general.ts index 7c4346c..5be2ce7 100644 --- a/src/typings/general.ts +++ b/src/typings/general.ts @@ -1,5 +1,4 @@ -import type { Rpc } from '@na-ji/pogo-protos' - +// import type { Rpc } from '@na-ji/pogo-protos' export interface GuessedMega { attack?: number defense?: number @@ -24,155 +23,6 @@ export interface EvolutionQuest { translated?: string } -export interface NiaMfObj { - templateId: string - data: { - templateId: string - pokemonSettings?: { - pokemonId: string - modelScale: number - type: string - type2: string - encounter: { - baseCaptureRate: number - baseFleeRate: number - bonusCandyCaptureReward: number - bonusStardustCaptureReward: number - } - stats: { - baseStamina: number - baseAttack: number - baseDefense: number - } - quickMoves: string[] - cinematicMoves: string[] - eliteQuickMove: string[] - eliteCinematicMove: string[] - evolutionIds: string[] - evolutionPips: number - pokedexHeightM: number - pokedexWeightKg: number - familyId: string - candyToEvolve: number - kmBuddyDistance: number - evolutionBranch: EvoBranch[] - tempEvoOverrides: TempEvo[] - formChange?: RawFormChange[] - thirdMove: { - stardustToUnlock: number - candyToUnlock: number - } - isTransferable: boolean - isDeployable: boolean - isTradable: boolean - buddyGroupNumber: number - buddyWalkedMegaEnergyAward: number - rarity: string - pokemonClass: keyof typeof Rpc.HoloPokemonClass - shadow: { - purificationStardustNeeded: number - purificationCandyNeeded: number - } - allowNoevolveEvolution: string[] - } - formSettings?: { - pokemon: string - forms: { - form?: string | number - isCostume: boolean - }[] - } - moveSettings?: { - movementId: string - pokemonType: string - power?: number - durationMs: number - energyDelta?: number - vfxName: string - obMoveSettingsNumber18: number[] - } - combatMove?: { - uniqueId: string | number - type: string - power: number - durationTurns?: number - energyDelta: number - buffs?: { - attackerAttackStatStageChange?: number - attackerDefenseStatStageChange?: number - targetAttackStatStageChange?: number - targetDefenseStatStageChange?: number - buffActivationChance: number - }[] - } - sourdoughMoveMappingSettings?: { - mappings: { - pokemonId: string - form?: string | number - move: string - }[] - } - smeargleMovesSettings?: { - quickMoves: string[] - cinematicMoves: string[] - } - itemSettings?: { - itemId: string | number - itemType: string | number - category: string - dropTrainerLevel: number - } - combatLeague?: { - bannedPokemon: string[] - pokemonCondition: { - type: string - withPokemonCpLimit: { - maxCp: number - } - withPokemonType: { - pokemonType: string[] - } - }[] - } - weatherAffinities?: { - weatherCondition: string - pokemonType: string[] - } - evolutionQuestTemplate?: { - questTemplateId: string - questType: string - goals: { - condition: { - type: string - withThrowType: { - throwType: string - } - withPokemonType: { - pokemonType: string[] - } - }[] - target: number - }[] - context: string - display: { - description: string - title: string - } - } - pokemonExtendedSettings?: { - uniqueId: string - form?: string | number - sizeSettings: PokemonSizeSettings - } - locationCardSettings?: { - locationCard: string | number - imageUrl?: string - cardType?: string - vfxAddress?: string - } - } -} - export interface PokemonSizeSettings { xxsLowerBound: number xsLowerBound: number @@ -184,15 +34,15 @@ export interface PokemonSizeSettings { } export interface TempEvo { - tempEvoId: string - stats: { + tempEvoId?: string + stats?: { baseStamina: number baseAttack: number baseDefense: number } - averageHeightM: number - averageWeightKg: number - typeOverride1: string + averageHeightM?: number + averageWeightKg?: number + typeOverride1?: string typeOverride2?: string } @@ -273,31 +123,28 @@ export interface RawFormChangeLocationCardSettings { } export interface EvoBranch { - evolution: string - candyCost: number - form: string | number - genderRequirement: string - evolutionItemRequirement: string - temporaryEvolution: string - temporaryEvolutionEnergyCost: number - temporaryEvolutionEnergyCostSubsequent: number - noCandyCostViaTrade: boolean - buddyDistance: boolean - mustBeBuddy: boolean - onlyDaytime: boolean - onlyNighttime: boolean - questDisplay: { + evolution?: string + candyCost?: number + form?: string | number + genderRequirement?: string + evolutionItemRequirement?: string + temporaryEvolution?: string + temporaryEvolutionEnergyCost?: number + temporaryEvolutionEnergyCostSubsequent?: number + noCandyCostViaTrade?: boolean + mustBeBuddy?: boolean + onlyDaytime?: boolean + onlyNighttime?: boolean + questDisplay?: { questRequirementTemplateId: string }[] } export interface SpeciesApi { - evolves_from_species?: - | { - name: string - url: string - } - | null + evolves_from_species?: { + name: string + url: string + } | null is_legendary: boolean is_mythical: boolean } diff --git a/tests/formChanges.test.js b/tests/formChanges.test.js index 9b0caec..bf73e24 100644 --- a/tests/formChanges.test.js +++ b/tests/formChanges.test.js @@ -92,24 +92,22 @@ describe('Pokemon form changes', () => { allPokemon.addPokemon({ templateId: 'V0720_POKEMON_HOOPA', - data: { - pokemonSettings: basePokemonSettings({ - pokemonId: 'HOOPA', - type: 'POKEMON_TYPE_PSYCHIC', - type2: 'POKEMON_TYPE_GHOST', - familyId: 'FAMILY_HOOPA', - pokemonClass: 'POKEMON_CLASS_MYTHIC', - quickMoves: ['CONFUSION_FAST'], - cinematicMoves: ['SHADOW_BALL'], - formChange: [ - { - availableForm: ['HOOPA_UNBOUND'], - candyCost: 50, - stardustCost: 10000, - }, - ], - }), - }, + pokemonSettings: basePokemonSettings({ + pokemonId: 'HOOPA', + type: 'POKEMON_TYPE_PSYCHIC', + type2: 'POKEMON_TYPE_GHOST', + familyId: 'FAMILY_HOOPA', + pokemonClass: 'POKEMON_CLASS_MYTHIC', + quickMoves: ['CONFUSION_FAST'], + cinematicMoves: ['SHADOW_BALL'], + formChange: [ + { + availableForm: ['HOOPA_UNBOUND'], + candyCost: 50, + stardustCost: 10000, + }, + ], + }), }) expect(allPokemon.parsedPokemon[Rpc.HoloPokemonId.HOOPA].formChanges).toEqual( @@ -155,15 +153,11 @@ describe('Pokemon form changes', () => { allPokemon.addPokemon({ templateId: 'V0646_POKEMON', - data: { - pokemonSettings: settings, - }, + pokemonSettings: settings, }) allPokemon.addPokemon({ templateId: 'V0646_POKEMON_KYUREM_NORMAL', - data: { - pokemonSettings: settings, - }, + pokemonSettings: settings, }) expect(allPokemon.parsedPokemon[Rpc.HoloPokemonId.KYUREM].formChanges).toEqual( @@ -197,15 +191,11 @@ describe('Pokemon form changes', () => { allPokemon.addPokemon({ templateId: 'V0646_POKEMON_KYUREM_NORMAL', - data: { - pokemonSettings: settings, - }, + pokemonSettings: settings, }) allPokemon.addPokemon({ templateId: 'V0646_POKEMON', - data: { - pokemonSettings: settings, - }, + pokemonSettings: settings, }) allPokemon.missingPokemon() allPokemon.generateProtoForms() @@ -244,15 +234,11 @@ describe('Pokemon form changes', () => { allPokemon.addPokemon({ templateId: 'V0720_POKEMON_HOOPA_UNBOUND', - data: { - pokemonSettings: settings, - }, + pokemonSettings: settings, }) allPokemon.addPokemon({ templateId: 'V0720_POKEMON_HOOPA', - data: { - pokemonSettings: settings, - }, + pokemonSettings: settings, }) expect(allPokemon.parsedForms[formId].formChanges).toBeUndefined() @@ -284,23 +270,17 @@ describe('Pokemon form changes', () => { allPokemon.addPokemon({ templateId: 'V0720_POKEMON_HOOPA_CONFINED', - data: { - pokemonSettings: settings, - }, + pokemonSettings: settings, }) allPokemon.addPokemon({ templateId: 'V0720_POKEMON_HOOPA', - data: { - pokemonSettings: settings, - }, + pokemonSettings: settings, }) allPokemon.addForm({ templateId: 'FORMS_V0720_POKEMON_HOOPA', - data: { - formSettings: { - pokemon: 'HOOPA', - forms: [{ form: 'HOOPA_CONFINED' }, { form: 'HOOPA_UNBOUND' }], - }, + formSettings: { + pokemon: 'HOOPA', + forms: [{ form: 'HOOPA_CONFINED' }, { form: 'HOOPA_UNBOUND' }], }, }) @@ -363,15 +343,11 @@ describe('Pokemon form changes', () => { allPokemon.addPokemon({ templateId: 'V0646_POKEMON_KYUREM_NORMAL', - data: { - pokemonSettings: formSettings, - }, + pokemonSettings: formSettings, }) allPokemon.addPokemon({ templateId: 'V0646_POKEMON', - data: { - pokemonSettings: baseSettings, - }, + pokemonSettings: baseSettings, }) allPokemon.missingPokemon() allPokemon.generateProtoForms() @@ -431,15 +407,11 @@ describe('Pokemon form changes', () => { allPokemon.addPokemon({ templateId: 'V0646_POKEMON_KYUREM_NORMAL', - data: { - pokemonSettings: formSettings, - }, + pokemonSettings: formSettings, }) allPokemon.addPokemon({ templateId: 'V0646_POKEMON', - data: { - pokemonSettings: baseSettings, - }, + pokemonSettings: baseSettings, }) allPokemon.missingPokemon() allPokemon.generateProtoForms() @@ -475,30 +447,24 @@ describe('Pokemon form changes', () => { }) allPokemon.addPokemon({ templateId: 'V0421_POKEMON_CHERRIM_OVERCAST', - data: { - pokemonSettings: settings, - }, + pokemonSettings: settings, }) allPokemon.addPokemon({ templateId: 'V0421_POKEMON', - data: { - pokemonSettings: settings, - }, + pokemonSettings: settings, }) expect(allPokemon.parsedForms[overcastFormId].formChanges).toBeUndefined() allPokemon.addForm({ templateId: 'FORMS_V0421_POKEMON_CHERRIM', - data: { - formSettings: { - pokemon: 'CHERRIM', - forms: [ - { form: 'CHERRIM_NORMAL' }, - { form: 'CHERRIM_OVERCAST' }, - { form: 'CHERRIM_SUNNY' }, - ], - }, + formSettings: { + pokemon: 'CHERRIM', + forms: [ + { form: 'CHERRIM_NORMAL' }, + { form: 'CHERRIM_OVERCAST' }, + { form: 'CHERRIM_SUNNY' }, + ], }, }) @@ -513,48 +479,46 @@ describe('Pokemon form changes', () => { allPokemon.addPokemon({ templateId: 'V0646_POKEMON_KYUREM_NORMAL', - data: { - pokemonSettings: basePokemonSettings({ - pokemonId: 'KYUREM', - type: 'POKEMON_TYPE_DRAGON', - type2: 'POKEMON_TYPE_ICE', - familyId: 'FAMILY_KYUREM', - quickMoves: ['DRAGON_BREATH_FAST'], - cinematicMoves: ['GLACIATE'], - formChange: [ - { - availableForm: ['KYUREM_BLACK'], - candyCost: 30, - item: 'FUSION_RESOURCE_BLACK_KYUREM', - itemCostCount: 1000, - componentPokemonSettings: { - pokedexId: 'ZEKROM', - componentCandyCost: 30, - formChangeType: 'FUSE', - locationCardSettings: [ - { - basePokemonLocationCard: - 'LC_SPECIALBACKGROUND_2025_GLOBAL_GOTOUR_BLACK_001', - componentPokemonLocationCard: - 'LC_SPECIALBACKGROUND_2025_GLOBAL_GOTOUR_WHITE_001', - fusionPokemonLocationCard: - 'LC_SPECIALBACKGROUND_2025_GLOBAL_GOTOUR_BLACK_WHITE_001', - }, - ], - familyId: 'FAMILY_ZEKROM', - }, - moveReassignment: { - cinematicMoves: [ - { - existingMoves: ['GLACIATE'], - replacementMoves: ['FREEZE_SHOCK'], - }, - ], - }, + pokemonSettings: basePokemonSettings({ + pokemonId: 'KYUREM', + type: 'POKEMON_TYPE_DRAGON', + type2: 'POKEMON_TYPE_ICE', + familyId: 'FAMILY_KYUREM', + quickMoves: ['DRAGON_BREATH_FAST'], + cinematicMoves: ['GLACIATE'], + formChange: [ + { + availableForm: ['KYUREM_BLACK'], + candyCost: 30, + item: 'FUSION_RESOURCE_BLACK_KYUREM', + itemCostCount: 1000, + componentPokemonSettings: { + pokedexId: 'ZEKROM', + componentCandyCost: 30, + formChangeType: 'FUSE', + locationCardSettings: [ + { + basePokemonLocationCard: + 'LC_SPECIALBACKGROUND_2025_GLOBAL_GOTOUR_BLACK_001', + componentPokemonLocationCard: + 'LC_SPECIALBACKGROUND_2025_GLOBAL_GOTOUR_WHITE_001', + fusionPokemonLocationCard: + 'LC_SPECIALBACKGROUND_2025_GLOBAL_GOTOUR_BLACK_WHITE_001', + }, + ], + familyId: 'FAMILY_ZEKROM', }, - ], - }), - }, + moveReassignment: { + cinematicMoves: [ + { + existingMoves: ['GLACIATE'], + replacementMoves: ['FREEZE_SHOCK'], + }, + ], + }, + }, + ], + }), }) const expectedFormChange = { @@ -680,34 +644,32 @@ describe('Pokemon form changes', () => { allPokemon.addPokemon({ templateId: 'V0646_POKEMON_KYUREM_NORMAL', - data: { - pokemonSettings: basePokemonSettings({ - pokemonId: 'KYUREM', - type: 'POKEMON_TYPE_DRAGON', - type2: 'POKEMON_TYPE_ICE', - familyId: 'FAMILY_KYUREM', - quickMoves: ['DRAGON_BREATH_FAST'], - cinematicMoves: ['GLACIATE'], - formChange: [ - { - availableForm: [999999], - moveReassignment: { - cinematicMoves: [ - { - existingMoves: [999998], - replacementMoves: [999997], - }, - ], - }, - requiredCinematicMoves: [ + pokemonSettings: basePokemonSettings({ + pokemonId: 'KYUREM', + type: 'POKEMON_TYPE_DRAGON', + type2: 'POKEMON_TYPE_ICE', + familyId: 'FAMILY_KYUREM', + quickMoves: ['DRAGON_BREATH_FAST'], + cinematicMoves: ['GLACIATE'], + formChange: [ + { + availableForm: [999999], + moveReassignment: { + cinematicMoves: [ { - requiredMoves: [999996], + existingMoves: [999998], + replacementMoves: [999997], }, ], }, - ], - }), - }, + requiredCinematicMoves: [ + { + requiredMoves: [999996], + }, + ], + }, + ], + }), }) expect(allPokemon.parsedForms[formId].formChanges).toEqual([ @@ -1015,33 +977,29 @@ describe('Pokemon form changes', () => { allItems.addItem({ templateId: storedFusionResource, - data: { - itemSettings: { - itemId: storedFusionResource, - itemType: 'ITEM_TYPE_NONE', - category: 'ITEM_CATEGORY_MISC', - dropTrainerLevel: 1, - }, + itemSettings: { + itemId: storedFusionResource, + itemType: 'ITEM_TYPE_NONE', + category: 'ITEM_CATEGORY_MISC', + dropTrainerLevel: 1, }, }) allPokemon.addPokemon({ templateId: 'V0646_POKEMON_KYUREM_NORMAL', - data: { - pokemonSettings: basePokemonSettings({ - pokemonId: 'KYUREM', - type: 'POKEMON_TYPE_DRAGON', - type2: 'POKEMON_TYPE_ICE', - familyId: 'FAMILY_KYUREM', - quickMoves: ['DRAGON_BREATH_FAST'], - cinematicMoves: ['GLACIATE'], - formChange: [ - { - item: unknownFusionResource, - }, - ], - }), - }, + pokemonSettings: basePokemonSettings({ + pokemonId: 'KYUREM', + type: 'POKEMON_TYPE_DRAGON', + type2: 'POKEMON_TYPE_ICE', + familyId: 'FAMILY_KYUREM', + quickMoves: ['DRAGON_BREATH_FAST'], + cinematicMoves: ['GLACIATE'], + formChange: [ + { + item: unknownFusionResource, + }, + ], + }), }) expect(allPokemon.parsedForms[formId].formChanges).toBeUndefined() @@ -1082,33 +1040,29 @@ describe('Pokemon form changes', () => { allItems.addItem({ templateId: 'ITEM_FUTURE_TEST', - data: { - itemSettings: { - itemId: futureItemId, - itemType: 'ITEM_TYPE_NONE', - category: 'ITEM_CATEGORY_MISC', - dropTrainerLevel: 1, - }, + itemSettings: { + itemId: futureItemId, + itemType: 'ITEM_TYPE_NONE', + category: 'ITEM_CATEGORY_MISC', + dropTrainerLevel: 1, }, }) allPokemon.addPokemon({ templateId: 'V0646_POKEMON_KYUREM_NORMAL', - data: { - pokemonSettings: basePokemonSettings({ - pokemonId: 'KYUREM', - type: 'POKEMON_TYPE_DRAGON', - type2: 'POKEMON_TYPE_ICE', - familyId: 'FAMILY_KYUREM', - quickMoves: ['DRAGON_BREATH_FAST'], - cinematicMoves: ['GLACIATE'], - formChange: [ - { - item: futureItemId, - }, - ], - }), - }, + pokemonSettings: basePokemonSettings({ + pokemonId: 'KYUREM', + type: 'POKEMON_TYPE_DRAGON', + type2: 'POKEMON_TYPE_ICE', + familyId: 'FAMILY_KYUREM', + quickMoves: ['DRAGON_BREATH_FAST'], + cinematicMoves: ['GLACIATE'], + formChange: [ + { + item: futureItemId, + }, + ], + }), }) expect( @@ -1168,10 +1122,8 @@ describe('Pokemon form changes', () => { expect(Rpc.LocationCard[locationCard]).toBeUndefined() allLocationCards.addLocationCard({ templateId: locationCard, - data: { - locationCardSettings: { - locationCard, - }, + locationCardSettings: { + locationCard, }, }) }) @@ -1179,35 +1131,33 @@ describe('Pokemon form changes', () => { allPokemon.addPokemon({ templateId: 'V0646_POKEMON_KYUREM_NORMAL', - data: { - pokemonSettings: basePokemonSettings({ - pokemonId: 'KYUREM', - type: 'POKEMON_TYPE_DRAGON', - type2: 'POKEMON_TYPE_ICE', - familyId: 'FAMILY_KYUREM', - quickMoves: ['DRAGON_BREATH_FAST'], - cinematicMoves: ['GLACIATE'], - formChange: [ - { + pokemonSettings: basePokemonSettings({ + pokemonId: 'KYUREM', + type: 'POKEMON_TYPE_DRAGON', + type2: 'POKEMON_TYPE_ICE', + familyId: 'FAMILY_KYUREM', + quickMoves: ['DRAGON_BREATH_FAST'], + cinematicMoves: ['GLACIATE'], + formChange: [ + { + locationCardSettings: [ + { + existingLocationCard: locationCards.existing, + replacementLocationCard: locationCards.replacement, + }, + ], + componentPokemonSettings: { locationCardSettings: [ { - existingLocationCard: locationCards.existing, - replacementLocationCard: locationCards.replacement, + basePokemonLocationCard: locationCards.base, + componentPokemonLocationCard: locationCards.component, + fusionPokemonLocationCard: locationCards.fusion, }, ], - componentPokemonSettings: { - locationCardSettings: [ - { - basePokemonLocationCard: locationCards.base, - componentPokemonLocationCard: locationCards.component, - fusionPokemonLocationCard: locationCards.fusion, - }, - ], - }, }, - ], - }), - }, + }, + ], + }), }) expect(allPokemon.parsedForms[formId].formChanges).toBeUndefined() @@ -1267,44 +1217,40 @@ describe('Pokemon form changes', () => { allLocationCards.addLocationCard({ templateId: 'LC_SPECIALBACKGROUND_FUTURE_TEST', - data: { - locationCardSettings: { - locationCard: locationCards.existing, - }, + locationCardSettings: { + locationCard: locationCards.existing, }, }) allPokemon.addPokemon({ templateId: 'V0646_POKEMON_KYUREM_NORMAL', - data: { - pokemonSettings: basePokemonSettings({ - pokemonId: 'KYUREM', - type: 'POKEMON_TYPE_DRAGON', - type2: 'POKEMON_TYPE_ICE', - familyId: 'FAMILY_KYUREM', - quickMoves: ['DRAGON_BREATH_FAST'], - cinematicMoves: ['GLACIATE'], - formChange: [ - { + pokemonSettings: basePokemonSettings({ + pokemonId: 'KYUREM', + type: 'POKEMON_TYPE_DRAGON', + type2: 'POKEMON_TYPE_ICE', + familyId: 'FAMILY_KYUREM', + quickMoves: ['DRAGON_BREATH_FAST'], + cinematicMoves: ['GLACIATE'], + formChange: [ + { + locationCardSettings: [ + { + existingLocationCard: locationCards.existing, + replacementLocationCard: locationCards.replacement, + }, + ], + componentPokemonSettings: { locationCardSettings: [ { - existingLocationCard: locationCards.existing, - replacementLocationCard: locationCards.replacement, + basePokemonLocationCard: locationCards.base, + componentPokemonLocationCard: locationCards.component, + fusionPokemonLocationCard: locationCards.fusion, }, ], - componentPokemonSettings: { - locationCardSettings: [ - { - basePokemonLocationCard: locationCards.base, - componentPokemonLocationCard: locationCards.component, - fusionPokemonLocationCard: locationCards.fusion, - }, - ], - }, }, - ], - }), - }, + }, + ], + }), }) expect( @@ -1399,34 +1345,30 @@ describe('Pokemon form changes', () => { allLocationCards.addLocationCard({ templateId: 'LC_SPECIALBACKGROUND_FUTURE_TEST', - data: { - locationCardSettings: { - locationCard, - }, + locationCardSettings: { + locationCard, }, }) allPokemon.addPokemon({ templateId: 'V0646_POKEMON_KYUREM_NORMAL', - data: { - pokemonSettings: basePokemonSettings({ - pokemonId: 'KYUREM', - type: 'POKEMON_TYPE_DRAGON', - type2: 'POKEMON_TYPE_ICE', - familyId: 'FAMILY_KYUREM', - quickMoves: ['DRAGON_BREATH_FAST'], - cinematicMoves: ['GLACIATE'], - formChange: [ - { - locationCardSettings: [ - { - existingLocationCard: locationCard, - }, - ], - }, - ], - }), - }, + pokemonSettings: basePokemonSettings({ + pokemonId: 'KYUREM', + type: 'POKEMON_TYPE_DRAGON', + type2: 'POKEMON_TYPE_ICE', + familyId: 'FAMILY_KYUREM', + quickMoves: ['DRAGON_BREATH_FAST'], + cinematicMoves: ['GLACIATE'], + formChange: [ + { + locationCardSettings: [ + { + existingLocationCard: locationCard, + }, + ], + }, + ], + }), }) expect(allLocationCards.parsedLocationCards[+locationCard]).toEqual({ @@ -1472,10 +1414,8 @@ describe('Pokemon form changes', () => { allLocationCards.addLocationCard({ templateId: 'LC_SPECIALBACKGROUND_TEST', - data: { - locationCardSettings: { - locationCard: locationCardId, - }, + locationCardSettings: { + locationCard: locationCardId, }, }) @@ -1639,58 +1579,56 @@ describe('Pokemon form changes', () => { allPokemon.addPokemon({ templateId: 'V0888_POKEMON_ZACIAN_HERO', - data: { - pokemonSettings: basePokemonSettings({ - pokemonId: 'ZACIAN', - type: 'POKEMON_TYPE_FAIRY', - familyId: 'FAMILY_ZACIAN', - quickMoves: ['QUICK_ATTACK_FAST'], - cinematicMoves: ['IRON_HEAD'], - formChange: [ - { - availableForm: ['ZACIAN_CROWNED_SWORD'], - moveReassignment: { - cinematicMoves: [ - { - existingMoves: ['IRON_HEAD'], - replacementMoves: ['BEHEMOTH_BLADE'], - }, - ], - }, - requiredCinematicMoves: [ - { - requiredMoves: ['IRON_HEAD'], - }, - ], - requiredBreadMoves: [ - { - moveTypes: ['A'], - moveLevel: 'LEVEL_1', - }, - ], - priority: 1, - formChangeBonusAttributes: [ - { - targetForm: 'ZACIAN_CROWNED_SWORD', - breadMode: 'BREAD_SPECIAL_MODE', - maxMoves: [ - { - moveType: 'A', - moveLevel: 'LEVEL_1', - }, - ], - }, - ], - locationCardSettings: [ + pokemonSettings: basePokemonSettings({ + pokemonId: 'ZACIAN', + type: 'POKEMON_TYPE_FAIRY', + familyId: 'FAMILY_ZACIAN', + quickMoves: ['QUICK_ATTACK_FAST'], + cinematicMoves: ['IRON_HEAD'], + formChange: [ + { + availableForm: ['ZACIAN_CROWNED_SWORD'], + moveReassignment: { + cinematicMoves: [ { - existingLocationCard: 87, - replacementLocationCard: 90, + existingMoves: ['IRON_HEAD'], + replacementMoves: ['BEHEMOTH_BLADE'], }, ], }, - ], - }), - }, + requiredCinematicMoves: [ + { + requiredMoves: ['IRON_HEAD'], + }, + ], + requiredBreadMoves: [ + { + moveTypes: ['A'], + moveLevel: 'LEVEL_1', + }, + ], + priority: 1, + formChangeBonusAttributes: [ + { + targetForm: 'ZACIAN_CROWNED_SWORD', + breadMode: 'BREAD_SPECIAL_MODE', + maxMoves: [ + { + moveType: 'A', + moveLevel: 'LEVEL_1', + }, + ], + }, + ], + locationCardSettings: [ + { + existingLocationCard: 87, + replacementLocationCard: 90, + }, + ], + }, + ], + }), }) expect( diff --git a/tests/jungleEligibility.test.js b/tests/jungleEligibility.test.js index 01e72a8..323c439 100644 --- a/tests/jungleEligibility.test.js +++ b/tests/jungleEligibility.test.js @@ -21,8 +21,6 @@ describe('Pokemon jungle eligibility', () => { } allPokemon.jungleCup({ - templateId: 'COMBAT_LEAGUE_VS_SEEKER_LITTLE_JUNGLE', - data: { templateId: 'COMBAT_LEAGUE_VS_SEEKER_LITTLE_JUNGLE', combatLeague: { pokemonCondition: [ @@ -33,8 +31,7 @@ describe('Pokemon jungle eligibility', () => { }, ], }, - }, - }) + }) expect(allPokemon.jungleCupRules.banned).toEqual([]) expect(() => allPokemon.jungleEligibility()).not.toThrow() diff --git a/tsconfig.json b/tsconfig.json index a7a9a63..0cfc018 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "target": "es2022", - "module": "CommonJS", - "moduleResolution": "node", + "module": "node16", + "moduleResolution": "node16", "declaration": true, "outDir": "./dist", "rootDir": "./src", diff --git a/yarn.lock b/yarn.lock index e4ee553..9367266 100644 --- a/yarn.lock +++ b/yarn.lock @@ -351,59 +351,59 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@biomejs/biome@2.3.9": - version "2.3.9" - resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-2.3.9.tgz#2502c835aafdaa01049ea45531cfdd7d34f633b7" - integrity sha512-js+34KpnY65I00k8P71RH0Uh2rJk4BrpxMGM5m2nBfM9XTlKE5N1URn5ydILPRyXXq4ebhKCjsvR+txS+D4z2A== +"@biomejs/biome@2.4.14": + version "2.4.14" + resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-2.4.14.tgz#3d29f06baa789dce37169e5c537d6e6648361635" + integrity sha512-TmAvxOEgrpLypzVGJ8FulIZnlyA9TxrO1hyqYrCz9r+bwma9xXxuLA5IuYnj55XQneFx460KjRbx6SWGLkg3bQ== optionalDependencies: - "@biomejs/cli-darwin-arm64" "2.3.9" - "@biomejs/cli-darwin-x64" "2.3.9" - "@biomejs/cli-linux-arm64" "2.3.9" - "@biomejs/cli-linux-arm64-musl" "2.3.9" - "@biomejs/cli-linux-x64" "2.3.9" - "@biomejs/cli-linux-x64-musl" "2.3.9" - "@biomejs/cli-win32-arm64" "2.3.9" - "@biomejs/cli-win32-x64" "2.3.9" - -"@biomejs/cli-darwin-arm64@2.3.9": - version "2.3.9" - resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.9.tgz#996394ec0078a08a5d9afbad6baf8a20f3cb0569" - integrity sha512-hHbYYnna/WBwem5iCpssQQLtm5ey8ADuDT8N2zqosk6LVWimlEuUnPy6Mbzgu4GWVriyL5ijWd+1zphX6ll4/A== - -"@biomejs/cli-darwin-x64@2.3.9": - version "2.3.9" - resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.9.tgz#c5b87cc137d4932d213e607d6b6e98725741f314" - integrity sha512-sKMW5fpvGDmPdqCchtVH5MVlbVeSU3ad4CuKS45x8VHt3tNSC8CZ2QbxffAOKYK9v/mAeUiPC6Cx6+wtyU1q7g== - -"@biomejs/cli-linux-arm64-musl@2.3.9": - version "2.3.9" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.9.tgz#fd68fed856dcca79341691c707d0d9d0dab58e90" - integrity sha512-JOHyG2nl8XDpncbMazm1uBSi1dPX9VbQDOjKcfSVXTqajD0PsgodMOKyuZ/PkBu5Lw877sWMTGKfEfpM7jE7Cw== - -"@biomejs/cli-linux-arm64@2.3.9": - version "2.3.9" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.9.tgz#4d1cbe6606f54a7193635df4a64ef71ae216bd67" - integrity sha512-BXBB6HbAgZI6T6QB8q6NSwIapVngqArP6K78BqkMerht7YjL6yWctqfeTnJm0qGF2bKBYFexslrbV+VTlM2E6g== - -"@biomejs/cli-linux-x64-musl@2.3.9": - version "2.3.9" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.9.tgz#e67b1fc45255a7c12acf565759374781dac7f0dc" - integrity sha512-FUkb/5beCIC2trpqAbW9e095X4vamdlju80c1ExSmhfdrojLZnWkah/XfTSixKb/dQzbAjpD7vvs6rWkJ+P07Q== - -"@biomejs/cli-linux-x64@2.3.9": - version "2.3.9" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.9.tgz#93fc8c2c4c3ccd8f810923239cb18d1faa02a8eb" - integrity sha512-PjYuv2WLmvf0WtidxAkFjlElsn0P6qcvfPijrqu1j+3GoW3XSQh3ywGu7gZ25J25zrYj3KEovUjvUZB55ATrGw== - -"@biomejs/cli-win32-arm64@2.3.9": - version "2.3.9" - resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.9.tgz#cead8eb4464ec95824c74ca54de94eaaa6e2b32b" - integrity sha512-w48Yh/XbYHO2cBw8B5laK3vCAEKuocX5ItGXVDAqFE7Ze2wnR00/1vkY6GXglfRDOjWHu2XtxI0WKQ52x1qxEA== - -"@biomejs/cli-win32-x64@2.3.9": - version "2.3.9" - resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.9.tgz#55e4527901a181ad2e0158d629ebbf6ed24f788e" - integrity sha512-90+J63VT7qImy9s3pkWL0ZX27VzVwMNCRzpLpe5yMzMYPbO1vcjL/w/Q5f/juAGMvP7a2Fd0H7IhAR6F7/i78A== + "@biomejs/cli-darwin-arm64" "2.4.14" + "@biomejs/cli-darwin-x64" "2.4.14" + "@biomejs/cli-linux-arm64" "2.4.14" + "@biomejs/cli-linux-arm64-musl" "2.4.14" + "@biomejs/cli-linux-x64" "2.4.14" + "@biomejs/cli-linux-x64-musl" "2.4.14" + "@biomejs/cli-win32-arm64" "2.4.14" + "@biomejs/cli-win32-x64" "2.4.14" + +"@biomejs/cli-darwin-arm64@2.4.14": + version "2.4.14" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.14.tgz#b026f36d3f6add2e712928f65e70b030abb62ef6" + integrity sha512-XvgoE9XOawUOQPdmvs4J7wPhi/DLwSCGks3AlPJDmh34O0awRTqCED1HRcRDdpf1Zrp4us4MGOOdIxNpbqNF5Q== + +"@biomejs/cli-darwin-x64@2.4.14": + version "2.4.14" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.14.tgz#bc4e2166ecc143641781e7093def0079fb870c86" + integrity sha512-jE7hKBCFhOx3uUh+ZkWBfOHxAcILPfhFplNkuID/eZeSTLHzfZzoZxW8fbqY9xXRnPi7jGNAf1iPVR+0yWsM/Q== + +"@biomejs/cli-linux-arm64-musl@2.4.14": + version "2.4.14" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.14.tgz#f2b5a52482b98c6bfe1399d0c4c001873740ccee" + integrity sha512-/z+6gqAqqUQTHazwStxSXKHg9b8UvqBmDFRp+c4wYbq2KXhELQDon9EoC9RpmQ8JWkqQx/lIUy/cs+MhzDZp6A== + +"@biomejs/cli-linux-arm64@2.4.14": + version "2.4.14" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.14.tgz#86c5195e69139eafbbabb9a285bcda9b737f3632" + integrity sha512-2TELhZnW5RSLL063l9rc5xLpA0ZIw0Ccwy/0q384rvNAgFw3yI76bd59547yxowdQr5MNPET/xDLrLuvgSeeWQ== + +"@biomejs/cli-linux-x64-musl@2.4.14": + version "2.4.14" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.14.tgz#0abae51ba32c6fdc9c8e273bc406245f660fc49f" + integrity sha512-R6BWgJdQOwW9ulJatuTVrQkjnODjqHZkKNOqb1sz++3Noe5LYd0i3PchnOBUCYAPHoPWHhjJqbdZlHEu0hpjdA== + +"@biomejs/cli-linux-x64@2.4.14": + version "2.4.14" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.14.tgz#31204057d50b0218b3f54614c7521f5530f0901c" + integrity sha512-zHrlQZDBDUz4OLAraYpWKcnLS6HOewBFWYOzY91d1ZjdqZwibOyb6BEu6WuWLugyo0P3riCmsbV9UqV1cSXwQg== + +"@biomejs/cli-win32-arm64@2.4.14": + version "2.4.14" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.14.tgz#1df473fa218e9c191b1de671daf45d739688af96" + integrity sha512-M3EH5hqOI/F/FUA2u4xcLoUgmxd218mvuj/6JL7Hv2toQvr2/AdOvKSpGkoRuWFCtQPVa+ZqkEV3Q5xBA9+XSA== + +"@biomejs/cli-win32-x64@2.4.14": + version "2.4.14" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.14.tgz#65d585b378f79aba1cddb1817d2c64880815639c" + integrity sha512-WL0EG5qE+EAKomGXbf2g6VnSKJhTL3tXC0QRzWRwA5VpjxNYa6H4P7ZWfymbGE4IhZZQi1KXQ2R0YjwInmz2fA== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" @@ -2302,6 +2302,11 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pogo-masterfile-types@<1.0.0: + version "0.1.5" + resolved "https://registry.yarnpkg.com/pogo-masterfile-types/-/pogo-masterfile-types-0.1.5.tgz#c555b3bbcf1241d3095f82d29229e8809ecff331" + integrity sha512-sPihwGXdbizzKm6kfM9MCF0T3nztYiD4HT2aOTx3Z49T28iTNgQbvc+GIMnAyBsdV1oHeSZ4PiDa3zNjp59CBg== + pretty-format@30.2.0: version "30.2.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-30.2.0.tgz#2d44fe6134529aed18506f6d11509d8a62775ebe" From 94785af91d638785db25eebb24381f4d3b5a79a5 Mon Sep 17 00:00:00 2001 From: Rin <58572875+TurtIeSocks@users.noreply.github.com> Date: Sat, 9 May 2026 00:06:40 +0200 Subject: [PATCH 2/3] Update yarn.lock --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9367266..611d2f3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2303,9 +2303,9 @@ pkg-dir@^4.2.0: find-up "^4.0.0" pogo-masterfile-types@<1.0.0: - version "0.1.5" - resolved "https://registry.yarnpkg.com/pogo-masterfile-types/-/pogo-masterfile-types-0.1.5.tgz#c555b3bbcf1241d3095f82d29229e8809ecff331" - integrity sha512-sPihwGXdbizzKm6kfM9MCF0T3nztYiD4HT2aOTx3Z49T28iTNgQbvc+GIMnAyBsdV1oHeSZ4PiDa3zNjp59CBg== + version "0.1.12" + resolved "https://registry.yarnpkg.com/pogo-masterfile-types/-/pogo-masterfile-types-0.1.12.tgz#d4b5f7aaa04e23f51162bd1e70b06b0851b48853" + integrity sha512-v5594L9y0vaMJfGayAwR/I5p1LibfZdZNxIDYNm5xMQqDp2t2ZEAtoBYcCH190sXC7+mqYwnMKGHynO9jEiwpw== pretty-format@30.2.0: version "30.2.0" From 2b3b781678cbacf4af404e807cc1ec6fc94b0d91 Mon Sep 17 00:00:00 2001 From: Rin <58572875+TurtIeSocks@users.noreply.github.com> Date: Mon, 18 May 2026 14:22:41 -0400 Subject: [PATCH 3/3] chore: update deps & remove deprecated `moduleResolution` --- package.json | 5 ++-- tsconfig.json | 3 +-- yarn.lock | 64 +++++++++++++++++++++++++++------------------------ 3 files changed, 38 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index fe6b286..a1a20c9 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,8 @@ "apk": "ts-node devWrapper.ts --test --apk", "test": "tsc && ./node_modules/.bin/jest", "format": "biome format --write ./src/**/*.ts", - "publishBuild": "rm -r dist && tsc" + "publishBuild": "rm -r dist && tsc", + "deps:update": "yarn upgrade pogo-masterfile-types @na-ji/pogo-protos" }, "repository": { "type": "git", @@ -58,6 +59,6 @@ "jest": "^30.2.0", "pogo-masterfile-types": "<1.0.0", "ts-node": "^10.9.2", - "typescript": "^5.9.3" + "typescript": "^6.0.3" } } diff --git a/tsconfig.json b/tsconfig.json index 0cfc018..ecb1d64 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,7 @@ { "compilerOptions": { "target": "es2022", - "module": "node16", - "moduleResolution": "node16", + "module": "CommonJS", "declaration": true, "outDir": "./dist", "rootDir": "./src", diff --git a/yarn.lock b/yarn.lock index 611d2f3..16d3345 100644 --- a/yarn.lock +++ b/yarn.lock @@ -733,9 +733,9 @@ "@jridgewell/sourcemap-codec" "^1.4.14" "@na-ji/pogo-protos@<3.0.0": - version "2.213.0" - resolved "https://registry.yarnpkg.com/@na-ji/pogo-protos/-/pogo-protos-2.213.0.tgz#abfce97cc0ccca89158cc1a62d9605dde5d66e8c" - integrity sha512-ZpyOB1HJfOMOMRPO1eFhwnH9bZY5GTzV/rghn3x8tGLDiCyEEhAo3sJazSRKcZFDZnv0yfxin2gF46obJLO9MA== + version "2.238.0" + resolved "https://registry.yarnpkg.com/@na-ji/pogo-protos/-/pogo-protos-2.238.0.tgz#35781cdf8efb275df40fd32736d3531fc284d91a" + integrity sha512-FJofcjVMe8hvR26uHk2gD6uz78lFBwfJfGQ6mdl5YwZWHS9HFAwnpdcKvh3jhUbqU0PuyHfqhzM0rPkk9D/h5w== dependencies: protobufjs "^6.11.4" @@ -769,9 +769,9 @@ integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== "@protobufjs/codegen@^2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" - integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + version "2.0.5" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.5.tgz#d9315ad7cf3f30aac70bda3c068443dc6f143659" + integrity sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g== "@protobufjs/eventemitter@^1.1.0": version "1.1.0" @@ -779,12 +779,11 @@ integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== "@protobufjs/fetch@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" - integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== + version "1.1.1" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.1.tgz#4d6fc00c8fb64016a5c81b469d549046350f1065" + integrity sha512-GpptLrs57adMSuHi3VNj0mAF8dwh36LMaYF6XyJ6JMWlVsc+t42tm1HSEDmOs3A8fC9yyeisgLhsTVQokOZ0zw== dependencies: "@protobufjs/aspromise" "^1.1.1" - "@protobufjs/inquire" "^1.1.0" "@protobufjs/float@^1.0.2": version "1.0.2" @@ -792,9 +791,9 @@ integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== "@protobufjs/inquire@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" - integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.2.tgz#ae64fbc014ff44c8bfad03dd4c93cd2d6a4c82db" + integrity sha512-pa0vFRuws4wkvaXKK1uXZMAwAX4/t8ANaJo45iw/oQHNQ9q5xUzwgFmVJGXiga2BeN+zpX7Vf9vmsiIa2J+MUw== "@protobufjs/path@^1.1.2": version "1.1.2" @@ -807,9 +806,9 @@ integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== "@protobufjs/utf8@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" - integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== + version "1.1.1" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.1.tgz#eaee5900122c110a3dbcb728c0597014a2621774" + integrity sha512-oOAWABowe8EAbMyWKM0tYDKi8Yaox52D+HWZhAIJqQXbqe0xI/GV7FhLWqlEKreMkfDjshR5FKgi3mnle0h6Eg== "@sinclair/typebox@^0.34.0": version "0.34.41" @@ -922,11 +921,11 @@ undici-types "~7.10.0" "@types/node@>=13.7.0": - version "25.0.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-25.0.2.tgz#411f9dd6cb2bf5ee46aed7199a9f85ca6b068b4e" - integrity sha512-gWEkeiyYE4vqjON/+Obqcoeffmk0NF15WSBwSs7zwVA2bAbTaE0SJ7P0WNGoJn8uE7fiaV5a7dKYIJriEqOrmA== + version "25.9.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-25.9.0.tgz#4823e66e0f486bfd8d9019fb445fbbb9e6f77348" + integrity sha512-AOQwYUNolgy3VosiRqXrACUXTN8nJUtPl7FJXMqZVyxiiCLhQuG3jXKvCS1ALr+Y2OmZhzzLVlYPEqJaiqkaJQ== dependencies: - undici-types "~7.16.0" + undici-types ">=7.24.0 <7.24.7" "@types/node@^24": version "24.10.4" @@ -2303,9 +2302,9 @@ pkg-dir@^4.2.0: find-up "^4.0.0" pogo-masterfile-types@<1.0.0: - version "0.1.12" - resolved "https://registry.yarnpkg.com/pogo-masterfile-types/-/pogo-masterfile-types-0.1.12.tgz#d4b5f7aaa04e23f51162bd1e70b06b0851b48853" - integrity sha512-v5594L9y0vaMJfGayAwR/I5p1LibfZdZNxIDYNm5xMQqDp2t2ZEAtoBYcCH190sXC7+mqYwnMKGHynO9jEiwpw== + version "0.1.17" + resolved "https://registry.yarnpkg.com/pogo-masterfile-types/-/pogo-masterfile-types-0.1.17.tgz#f4b3742a87c6d93da80a79e5f372e2268df3dc68" + integrity sha512-I7Y0R3VH+Hn2/eFV28KKw4rSC6uuwQsnhONDfhKv28OadVEH1Vc8s3uIcQHPM+4bF2n1dcHlBuriTi26gt7F8w== pretty-format@30.2.0: version "30.2.0" @@ -2322,9 +2321,9 @@ process-nextick-args@~2.0.0: integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== protobufjs@^6.11.4: - version "6.11.4" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.4.tgz#29a412c38bf70d89e537b6d02d904a6f448173aa" - integrity sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw== + version "6.11.6" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.6.tgz#f02b04ef842469a2bf89da18be8fd5c41dc820ca" + integrity sha512-k8BHqgPBOtrlougZZqF2uUk5Z7bN8f0wj+3e8M3hvtSv0NBAz4VBy5f6R5Nxq/l+i7mRFTgNZb2trxqTpHNY/A== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" @@ -2611,10 +2610,15 @@ type-fest@^0.21.3: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== -typescript@^5.9.3: - version "5.9.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" - integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== +typescript@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.3.tgz#90251dc007916e972786cb94d74d15b185577d21" + integrity sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw== + +"undici-types@>=7.24.0 <7.24.7": + version "7.24.6" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.24.6.tgz#61275b485d7fd4e9d269c7cf04ec2873c9cc0f91" + integrity sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg== undici-types@~7.10.0: version "7.10.0"