@pokepc/dataset 6.5.1 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{build-DlK17pH-.mjs → build-GIV09lTc.mjs} +14 -7
- package/build/build-GIV09lTc.mjs.map +1 -0
- package/build/lib/fs.d.mts +4 -4
- package/build/lib/schemas.d.mts +1 -1
- package/build/lib/types.d.mts +1 -1
- package/build/lib-next/_build.mjs +1 -1
- package/build/{schemas-BCuqOH_X.d.mts → schemas-CiojUbKN.d.mts} +12 -12
- package/build/{schemas-BCuqOH_X.d.mts.map → schemas-CiojUbKN.d.mts.map} +1 -1
- package/data/games/pokopia-bubblybasin.json +42 -0
- package/data/games/pokopia.json +1 -1
- package/data/indices/games.json +1 -0
- package/data/indices/pokedexes.json +1 -0
- package/data/pokedexes/paldea-kitakami.json +0 -2
- package/data/pokedexes/pokopia-basin.json +63 -0
- package/data/pokedexes/pokopia-event.json +6 -2
- package/data-next/champions/abilities.json +2 -0
- package/data-next/champions/items.json +34 -0
- package/package.json +1 -1
- package/build/build-DlK17pH-.mjs.map +0 -1
|
@@ -33,12 +33,19 @@ async function fetchPokeApiResourceIndex(kind, options) {
|
|
|
33
33
|
name: resource.name
|
|
34
34
|
};
|
|
35
35
|
const idKey = String(id);
|
|
36
|
-
|
|
36
|
+
const existingIdEntry = index.byId.get(idKey);
|
|
37
|
+
if (existingIdEntry !== void 0 && existingIdEntry.name !== resource.name) throw new Error(`Duplicate PokeAPI ${kind} resource id ${idKey}: ${existingIdEntry.name}, ${resource.name}`);
|
|
37
38
|
index.byId.set(idKey, entry);
|
|
38
39
|
for (const nameKey of pokeApiResourceNameKeys(resource.name)) {
|
|
39
40
|
const existingEntry = index.byName.get(nameKey);
|
|
40
|
-
if (existingEntry
|
|
41
|
-
|
|
41
|
+
if (existingEntry === void 0 || existingEntry.id === id) {
|
|
42
|
+
index.byName.set(nameKey, entry);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (existingEntry.name !== resource.name) throw new Error(`Duplicate PokeAPI ${kind} resource lookup key ${nameKey}: ${existingEntry.name}, ${resource.name}`);
|
|
46
|
+
const keptEntry = existingEntry.id < id ? existingEntry : entry;
|
|
47
|
+
console.warn(`Duplicate PokeAPI ${kind} resource name ${resource.name} (ids ${existingEntry.id}, ${id}); keeping id ${keptEntry.id} for lookup key ${nameKey}`);
|
|
48
|
+
index.byName.set(nameKey, keptEntry);
|
|
42
49
|
}
|
|
43
50
|
}
|
|
44
51
|
return index;
|
|
@@ -183,7 +190,7 @@ async function enrichChampionsDataWithPokeApiIds(options = {}) {
|
|
|
183
190
|
missing: preparedDomain.missing
|
|
184
191
|
}];
|
|
185
192
|
}));
|
|
186
|
-
if (Object.values(result).reduce((count, domainResult) => count + domainResult.missing.length, 0) > 0) console.warn(
|
|
193
|
+
if (Object.values(result).reduce((count, domainResult) => count + domainResult.missing.length, 0) > 0) console.warn(formatMissingPokeApiResourcesWarning(result));
|
|
187
194
|
for (const preparedDomain of preparedDomains) writeJsonFile(preparedDomain.filePath, preparedDomain.records);
|
|
188
195
|
return result;
|
|
189
196
|
}
|
|
@@ -282,8 +289,8 @@ function formatDomainSummary(domain, result) {
|
|
|
282
289
|
const missing = result.missing.length === 0 ? "" : `, ${result.missing.length} unmatched`;
|
|
283
290
|
return `${result.matched} ${domain} with PokeAPI IDs${missing}`;
|
|
284
291
|
}
|
|
285
|
-
function
|
|
286
|
-
const lines = ["Missing PokeAPI resources;
|
|
292
|
+
function formatMissingPokeApiResourcesWarning(result) {
|
|
293
|
+
const lines = ["Missing PokeAPI resources; they were written without a pokeApiId."];
|
|
287
294
|
for (const [domain, domainResult] of Object.entries(result)) {
|
|
288
295
|
if (domainResult.missing.length === 0) continue;
|
|
289
296
|
lines.push(`${domain}: ${domainResult.missing.length} missing`);
|
|
@@ -301,4 +308,4 @@ console.log(formatEnrichChampionsDataSummary(result));
|
|
|
301
308
|
//#endregion
|
|
302
309
|
export {};
|
|
303
310
|
|
|
304
|
-
//# sourceMappingURL=build-
|
|
311
|
+
//# sourceMappingURL=build-GIV09lTc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-GIV09lTc.mjs","names":[],"sources":["../src/upstream-adapters/projectpokemon-champout/fixtures/pokeapi.ts","../src/upstream-adapters/pokeapi/client.ts","../src/upstream-adapters/pokeapi/enrich-champions.ts","../src/upstream-adapters/pokeapi/build.ts"],"sourcesContent":["export const champoutPokeApiResourceNameAliases: Partial<\n Record<'ability' | 'item' | 'move', Record<string, readonly string[]>>\n> = {\n move: {\n visegrip: ['vicegrip', 'vice-grip'],\n },\n}\n","import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'\nimport { dirname, join } from 'node:path'\n\nexport const DEFAULT_POKEAPI_BASE_URL = 'https://pokeapi.co/api/v2'\nexport const DEFAULT_POKEAPI_CACHE_DIR = join(process.cwd(), '.local/pokeapi')\n\nexport const pokeApiResourceKinds = ['ability', 'item', 'move'] as const\nexport type PokeApiResourceKind = (typeof pokeApiResourceKinds)[number]\n\nexport type PokeApiResourceSummary = {\n name: string\n url: string\n}\n\nexport type PokeApiResourceIndexEntry = {\n id: number\n name: string\n}\n\nexport type PokeApiResourceIndex = {\n byId: Map<string, PokeApiResourceIndexEntry>\n byName: Map<string, PokeApiResourceIndexEntry>\n}\nexport type PokeApiResourceIndexes = Record<PokeApiResourceKind, PokeApiResourceIndex>\n\nexport type PokeApiFetchOptions = {\n baseUrl?: string\n cache?: boolean\n cacheDir?: string\n forceRefresh?: boolean\n retries?: number\n}\n\ntype PokeApiResourceListResponse = {\n count: number\n results: PokeApiResourceSummary[]\n}\n\nexport async function fetchPokeApiResourceIndexes(\n baseUrlOrOptions: string | PokeApiFetchOptions = DEFAULT_POKEAPI_BASE_URL,\n): Promise<PokeApiResourceIndexes> {\n const options = normalizePokeApiFetchOptions(baseUrlOrOptions)\n const [ability, item, move] = await Promise.all(\n pokeApiResourceKinds.map((kind) => fetchPokeApiResourceIndex(kind, options)),\n )\n\n return { ability, item, move }\n}\n\nasync function fetchPokeApiResourceIndex(\n kind: PokeApiResourceKind,\n options: PokeApiFetchOptions,\n): Promise<PokeApiResourceIndex> {\n const list = await fetchPokeApiResourceList(kind, options)\n const index: PokeApiResourceIndex = {\n byId: new Map(),\n byName: new Map(),\n }\n\n for (const resource of list.results) {\n const id = parsePokeApiResourceId(resource.url, kind)\n const entry = { id, name: resource.name }\n const idKey = String(id)\n const existingIdEntry = index.byId.get(idKey)\n\n if (existingIdEntry !== undefined && existingIdEntry.name !== resource.name) {\n throw new Error(\n `Duplicate PokeAPI ${kind} resource id ${idKey}: ${existingIdEntry.name}, ${resource.name}`,\n )\n }\n\n index.byId.set(idKey, entry)\n\n for (const nameKey of pokeApiResourceNameKeys(resource.name)) {\n const existingEntry = index.byName.get(nameKey)\n\n if (existingEntry === undefined || existingEntry.id === id) {\n index.byName.set(nameKey, entry)\n continue\n }\n\n if (existingEntry.name !== resource.name) {\n throw new Error(\n `Duplicate PokeAPI ${kind} resource lookup key ${nameKey}: ${existingEntry.name}, ${resource.name}`,\n )\n }\n\n // Upstream sometimes lists the same resource name under two ids; keep the lowest so\n // lookups stay stable when a newer duplicate row appears.\n const keptEntry = existingEntry.id < id ? existingEntry : entry\n\n console.warn(\n `Duplicate PokeAPI ${kind} resource name ${resource.name} (ids ${existingEntry.id}, ${id}); keeping id ${keptEntry.id} for lookup key ${nameKey}`,\n )\n index.byName.set(nameKey, keptEntry)\n }\n }\n\n return index\n}\n\nasync function fetchPokeApiResourceList(\n kind: PokeApiResourceKind,\n options: PokeApiFetchOptions,\n): Promise<PokeApiResourceListResponse> {\n const baseUrl = options.baseUrl ?? DEFAULT_POKEAPI_BASE_URL\n const url = new URL(`${baseUrl.replace(/\\/+$/, '')}/${kind}/`)\n url.searchParams.set('limit', '100000')\n url.searchParams.set('offset', '0')\n\n const json = await fetchPokeApiJson(url, options)\n\n if (!isPokeApiResourceListResponse(json)) {\n throw new Error(`Unexpected PokeAPI ${kind} list response shape`)\n }\n\n if (json.results.length < json.count) {\n throw new Error(\n `Expected all PokeAPI ${kind} resources in one list response, got ${json.results.length} of ${json.count}`,\n )\n }\n\n return json\n}\n\nexport async function fetchPokeApiJson(\n pathnameOrUrl: string | URL,\n options: PokeApiFetchOptions = {},\n): Promise<unknown> {\n const resolvedOptions = normalizePokeApiFetchOptions(options)\n const url = resolvePokeApiUrl(pathnameOrUrl, resolvedOptions.baseUrl)\n const cacheEnabled = resolvedOptions.cache ?? process.env.POKEAPI_CACHE !== '0'\n const cachePath = pokeApiCachePath(url, resolvedOptions.cacheDir)\n\n if (cacheEnabled && !resolvedOptions.forceRefresh) {\n const cachedJson = readCachedPokeApiJson(cachePath)\n\n if (cachedJson !== undefined) {\n return cachedJson\n }\n }\n\n const json = await fetchPokeApiJsonFromNetwork(url, resolvedOptions.retries)\n\n if (cacheEnabled) {\n writeCachedPokeApiJson(cachePath, json)\n }\n\n return json\n}\n\nfunction normalizePokeApiFetchOptions(\n options: string | PokeApiFetchOptions,\n): Required<PokeApiFetchOptions> {\n const input = typeof options === 'string' ? { baseUrl: options } : options\n\n return {\n baseUrl: input.baseUrl ?? DEFAULT_POKEAPI_BASE_URL,\n cache: input.cache ?? process.env.POKEAPI_CACHE !== '0',\n cacheDir: input.cacheDir ?? process.env.POKEAPI_CACHE_DIR ?? DEFAULT_POKEAPI_CACHE_DIR,\n forceRefresh: input.forceRefresh ?? process.env.POKEAPI_REFRESH_CACHE === '1',\n retries: input.retries ?? 3,\n }\n}\n\nfunction resolvePokeApiUrl(pathnameOrUrl: string | URL, baseUrl: string): URL {\n if (pathnameOrUrl instanceof URL) {\n return pathnameOrUrl\n }\n\n if (/^https?:\\/\\//i.test(pathnameOrUrl)) {\n return new URL(pathnameOrUrl)\n }\n\n const base = baseUrl.replace(/\\/+$/, '')\n const pathname = pathnameOrUrl.replace(/^\\/+/, '').replace(/\\/?$/, '/')\n return new URL(`${base}/${pathname}`)\n}\n\nasync function fetchPokeApiJsonFromNetwork(url: URL, retries: number): Promise<unknown> {\n let lastError: unknown\n\n for (let attempt = 1; attempt <= retries; attempt += 1) {\n try {\n const response = await fetch(url, {\n headers: {\n accept: 'application/json',\n },\n })\n\n if (response.ok) {\n return await response.json()\n }\n\n const body = await response.text()\n lastError = new Error(\n `${response.status} ${response.statusText}${body.length > 0 ? `: ${body.slice(0, 240)}` : ''}`,\n )\n\n if (response.status !== 429 && response.status < 500) {\n break\n }\n } catch (error) {\n lastError = error\n }\n\n await sleep(backoffMs(attempt))\n }\n\n throw lastError instanceof Error ? lastError : new Error(String(lastError))\n}\n\nfunction readCachedPokeApiJson(cachePath: string): unknown | undefined {\n if (!existsSync(cachePath)) {\n return undefined\n }\n\n try {\n return JSON.parse(readFileSync(cachePath, 'utf8'))\n } catch {\n return undefined\n }\n}\n\nfunction writeCachedPokeApiJson(cachePath: string, json: unknown): void {\n mkdirSync(dirname(cachePath), { recursive: true })\n writeFileSync(cachePath, `${JSON.stringify(json)}\\n`)\n}\n\nfunction pokeApiCachePath(url: URL, cacheDir: string): string {\n const segments = [\n sanitizeCachePathSegment(url.hostname),\n ...url.pathname.split('/').filter(Boolean).map(sanitizeCachePathSegment),\n ]\n const searchSuffix = url.search.length > 0 ? `-${stableSearchSuffix(url.searchParams)}` : ''\n const filename = `${segments.pop() ?? 'index'}${searchSuffix}.json`\n\n return join(cacheDir, ...segments, filename)\n}\n\nfunction stableSearchSuffix(searchParams: URLSearchParams): string {\n return Array.from(searchParams.entries())\n .sort(([leftKey, leftValue], [rightKey, rightValue]) =>\n `${leftKey}=${leftValue}`.localeCompare(`${rightKey}=${rightValue}`),\n )\n .map(([key, value]) => `${sanitizeCachePathSegment(key)}-${sanitizeCachePathSegment(value)}`)\n .join('-')\n}\n\nfunction sanitizeCachePathSegment(value: string): string {\n const sanitized = value.replace(/[^a-zA-Z0-9._-]+/g, '-').replace(/^-+|-+$/g, '')\n return sanitized.length > 0 ? sanitized : '_'\n}\n\nfunction backoffMs(attempt: number): number {\n return Math.min(15_000, 750 * 2 ** Math.max(0, attempt - 1))\n}\n\nasync function sleep(ms: number): Promise<void> {\n if (ms <= 0) {\n return\n }\n\n await new Promise((resolveSleep) => setTimeout(resolveSleep, ms))\n}\n\nfunction isPokeApiResourceListResponse(value: unknown): value is PokeApiResourceListResponse {\n if (typeof value !== 'object' || value === null) {\n return false\n }\n\n const response = value as Record<string, unknown>\n\n return (\n typeof response.count === 'number' &&\n Array.isArray(response.results) &&\n response.results.every(isPokeApiResourceSummary)\n )\n}\n\nfunction isPokeApiResourceSummary(value: unknown): value is PokeApiResourceSummary {\n if (typeof value !== 'object' || value === null) {\n return false\n }\n\n const resource = value as Record<string, unknown>\n\n return typeof resource.name === 'string' && typeof resource.url === 'string'\n}\n\nfunction parsePokeApiResourceId(resourceUrl: string, kind: PokeApiResourceKind): number {\n const url = new URL(resourceUrl)\n const segments = url.pathname.split('/').filter(Boolean)\n const kindIndex = segments.lastIndexOf(kind)\n const id = kindIndex === -1 ? undefined : segments[kindIndex + 1]\n\n if (id === undefined || !/^\\d+$/.test(id)) {\n throw new Error(`Could not parse PokeAPI ${kind} id from URL: ${resourceUrl}`)\n }\n\n return Number(id)\n}\n\nexport function pokeApiResourceNameKeys(value: string): string[] {\n return Array.from(\n new Set([\n value.toLowerCase(),\n value\n .toLowerCase()\n .normalize('NFKD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .replace(/[^a-z0-9]+/g, ''),\n ]),\n ).filter((key) => key.length > 0)\n}\n","import { readFileSync, writeFileSync } from 'node:fs'\nimport { join } from 'node:path'\nimport { champoutPokeApiResourceNameAliases } from '../projectpokemon-champout/fixtures/pokeapi'\nimport {\n DEFAULT_POKEAPI_BASE_URL,\n fetchPokeApiResourceIndexes,\n pokeApiResourceNameKeys,\n type PokeApiResourceIndex,\n type PokeApiResourceIndexEntry,\n type PokeApiResourceKind,\n} from './client'\n\nexport const DEFAULT_CHAMPIONS_DATA_ROOT = join(process.cwd(), 'data-next/champions')\n\nexport type EnrichChampionsDataOptions = {\n championsDataRoot?: string\n pokeApiBaseUrl?: string\n}\n\nexport type EnrichedChampionsDomainResult = {\n filePath: string\n matched: number\n missing: MissingPokeApiResource[]\n}\n\nexport type EnrichChampionsDataResult = Record<\n 'abilities' | 'items' | 'moves',\n EnrichedChampionsDomainResult\n>\n\nexport type MissingPokeApiResource = {\n id: string\n championsId: string\n slug: string\n name: string\n triedIdCandidates: string[]\n championsIdMatchedResource?: PokeApiResourceIndexEntry\n}\n\ntype ChampionsDomain = {\n key: keyof EnrichChampionsDataResult\n kind: PokeApiResourceKind\n fileName: string\n}\n\ntype JsonRecord = Record<string, unknown>\n\ntype PreparedChampionsDomain = EnrichedChampionsDomainResult & {\n records: JsonRecord[]\n}\n\nconst championsDomains = [\n { key: 'abilities', kind: 'ability', fileName: 'abilities.json' },\n { key: 'items', kind: 'item', fileName: 'items.json' },\n { key: 'moves', kind: 'move', fileName: 'moves.json' },\n] as const satisfies readonly ChampionsDomain[]\n\nexport async function enrichChampionsDataWithPokeApiIds(\n options: EnrichChampionsDataOptions = {},\n): Promise<EnrichChampionsDataResult> {\n const championsDataRoot = options.championsDataRoot ?? DEFAULT_CHAMPIONS_DATA_ROOT\n const pokeApiBaseUrl = options.pokeApiBaseUrl ?? DEFAULT_POKEAPI_BASE_URL\n const resourceIndexes = await fetchPokeApiResourceIndexes(pokeApiBaseUrl)\n const preparedDomains = championsDomains.map((domain) =>\n prepareChampionsDomainWithPokeApiIds(\n domain.kind,\n join(championsDataRoot, domain.fileName),\n resourceIndexes[domain.kind],\n ),\n )\n const result = Object.fromEntries(\n championsDomains.map((domain, index) => {\n const preparedDomain = preparedDomains[index]\n\n return [\n domain.key,\n {\n filePath: preparedDomain.filePath,\n matched: preparedDomain.matched,\n missing: preparedDomain.missing,\n },\n ]\n }),\n ) as EnrichChampionsDataResult\n\n const missingCount = Object.values(result).reduce(\n (count, domainResult) => count + domainResult.missing.length,\n 0,\n )\n\n if (missingCount > 0) {\n console.warn(formatMissingPokeApiResourcesWarning(result))\n }\n\n for (const preparedDomain of preparedDomains) {\n writeJsonFile(preparedDomain.filePath, preparedDomain.records)\n }\n\n return result\n}\n\nexport function formatEnrichChampionsDataSummary(result: EnrichChampionsDataResult): string {\n return [\n formatDomainSummary('abilities', result.abilities),\n formatDomainSummary('items', result.items),\n formatDomainSummary('moves', result.moves),\n ].join(', ')\n}\n\nfunction prepareChampionsDomainWithPokeApiIds(\n kind: PokeApiResourceKind,\n filePath: string,\n resourceIndex: PokeApiResourceIndex,\n): PreparedChampionsDomain {\n const records = readJsonRecordArray(filePath)\n const missing: MissingPokeApiResource[] = []\n let matched = 0\n\n const enrichedRecords = records.map((record, index) => {\n const id = requiredString(record, 'id', filePath, index)\n const championsId = requiredString(record, 'championsId', filePath, index)\n const slug = requiredString(record, 'slug', filePath, index)\n const name = requiredString(record, 'name', filePath, index)\n const triedIdCandidates = pokeApiIdCandidates(kind, id)\n const championsIdMatchedResource = resourceIndex.byId.get(championsId)\n const pokeApiId = findPokeApiId(resourceIndex, championsId, triedIdCandidates)\n\n if (pokeApiId === undefined) {\n missing.push({\n id,\n championsId,\n slug,\n name,\n triedIdCandidates,\n championsIdMatchedResource,\n })\n } else {\n matched += 1\n }\n\n return withPokeApiId(record, pokeApiId)\n })\n\n return { filePath, matched, missing, records: enrichedRecords }\n}\n\nfunction findPokeApiId(\n resourceIndex: PokeApiResourceIndex,\n championsId: string,\n idCandidates: string[],\n): number | undefined {\n for (const candidate of idCandidates) {\n const resource = findPokeApiResourceByName(resourceIndex, candidate)\n\n if (resource !== undefined) {\n return resource.id\n }\n }\n\n const resourceByChampionsId = resourceIndex.byId.get(championsId)\n\n if (resourceByChampionsId === undefined) {\n return undefined\n }\n\n return resourceByChampionsId.id\n}\n\nfunction findPokeApiResourceByName(\n resourceIndex: PokeApiResourceIndex,\n candidate: string,\n): PokeApiResourceIndexEntry | undefined {\n for (const key of pokeApiResourceNameKeys(candidate)) {\n const resource = resourceIndex.byName.get(key)\n\n if (resource !== undefined) {\n return resource\n }\n }\n\n return undefined\n}\n\nfunction pokeApiIdCandidates(kind: PokeApiResourceKind, id: string): string[] {\n return uniqueStrings([id, ...(champoutPokeApiResourceNameAliases[kind]?.[id] ?? [])])\n}\n\nfunction withPokeApiId(record: JsonRecord, pokeApiId: number | undefined): JsonRecord {\n const { id, championsId, slug, ...rest } = record\n delete rest.pokeApiId\n\n if (pokeApiId === undefined) {\n return { id, championsId, slug, ...rest }\n }\n\n return { id, championsId, pokeApiId, slug, ...rest }\n}\n\nfunction readJsonRecordArray(filePath: string): JsonRecord[] {\n const json: unknown = JSON.parse(readFileSync(filePath, 'utf8'))\n\n if (!Array.isArray(json)) {\n throw new Error(`Expected ${filePath} to contain an array`)\n }\n\n return json.map((record, index) => {\n if (typeof record !== 'object' || record === null || Array.isArray(record)) {\n throw new Error(`Expected ${filePath}[${index}] to contain an object`)\n }\n\n return record as JsonRecord\n })\n}\n\nfunction writeJsonFile(filePath: string, data: unknown): void {\n writeFileSync(filePath, `${JSON.stringify(data, null, 2)}\\n`)\n}\n\nfunction requiredString(record: JsonRecord, key: string, filePath: string, index: number): string {\n const value = record[key]\n\n if (typeof value !== 'string' || value.length === 0) {\n throw new Error(`Expected ${filePath}[${index}].${key} to be a non-empty string`)\n }\n\n return value\n}\n\nfunction uniqueStrings(values: readonly unknown[]): string[] {\n return Array.from(new Set(values.filter((value): value is string => typeof value === 'string')))\n}\n\nfunction formatDomainSummary(\n domain: keyof EnrichChampionsDataResult,\n result: EnrichedChampionsDomainResult,\n): string {\n const missing = result.missing.length === 0 ? '' : `, ${result.missing.length} unmatched`\n\n return `${result.matched} ${domain} with PokeAPI IDs${missing}`\n}\n\nfunction formatMissingPokeApiResourcesWarning(result: EnrichChampionsDataResult): string {\n const lines = ['Missing PokeAPI resources; they were written without a pokeApiId.']\n\n for (const [domain, domainResult] of Object.entries(result)) {\n if (domainResult.missing.length === 0) {\n continue\n }\n\n lines.push(`${domain}: ${domainResult.missing.length} missing`)\n\n for (const missing of domainResult.missing) {\n const championsIdMatch =\n missing.championsIdMatchedResource === undefined\n ? 'no PokeAPI resource with that numeric id'\n : `numeric id belongs to ${missing.championsIdMatchedResource.name}`\n\n lines.push(\n `- ${missing.id} (${missing.name}; championsId ${missing.championsId}; tried id candidates ${missing.triedIdCandidates.join(', ')}; ${championsIdMatch})`,\n )\n }\n }\n\n return lines.join('\\n')\n}\n","import {\n enrichChampionsDataWithPokeApiIds,\n formatEnrichChampionsDataSummary,\n} from './enrich-champions'\n\nconst result = await enrichChampionsDataWithPokeApiIds()\n\nconsole.log(formatEnrichChampionsDataSummary(result))\n"],"mappings":";;;AAAA,MAAa,qCAET,EACF,MAAM,EACJ,UAAU,CAAC,YAAY,WAAW,EACpC,EACF;;;ACHA,MAAa,2BAA2B;AACxC,MAAa,4BAA4B,KAAK,QAAQ,IAAI,GAAG,gBAAgB;AAE7E,MAAa,uBAAuB;CAAC;CAAW;CAAQ;AAAM;AAgC9D,eAAsB,4BACpB,mBAAiD,0BAChB;CACjC,MAAM,UAAU,6BAA6B,gBAAgB;CAC7D,MAAM,CAAC,SAAS,MAAM,QAAQ,MAAM,QAAQ,IAC1C,qBAAqB,KAAK,SAAS,0BAA0B,MAAM,OAAO,CAAC,CAC7E;CAEA,OAAO;EAAE;EAAS;EAAM;CAAK;AAC/B;AAEA,eAAe,0BACb,MACA,SAC+B;CAC/B,MAAM,OAAO,MAAM,yBAAyB,MAAM,OAAO;CACzD,MAAM,QAA8B;EAClC,sBAAM,IAAI,IAAI;EACd,wBAAQ,IAAI,IAAI;CAClB;CAEA,KAAK,MAAM,YAAY,KAAK,SAAS;EACnC,MAAM,KAAK,uBAAuB,SAAS,KAAK,IAAI;EACpD,MAAM,QAAQ;GAAE;GAAI,MAAM,SAAS;EAAK;EACxC,MAAM,QAAQ,OAAO,EAAE;EACvB,MAAM,kBAAkB,MAAM,KAAK,IAAI,KAAK;EAE5C,IAAI,oBAAoB,KAAA,KAAa,gBAAgB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,qCAAqC,QAA2C;CACvF,MAAM,QAAQ,CAAC,mEAAmE;CAElF,KAAK,MAAM,CAAC,QAAQ,iBAAiB,OAAO,QAAQ,MAAM,GAAG;EAC3D,IAAI,aAAa,QAAQ,WAAW,GAClC;EAGF,MAAM,KAAK,GAAG,OAAO,IAAI,aAAa,QAAQ,OAAO,SAAS;EAE9D,KAAK,MAAM,WAAW,aAAa,SAAS;GAC1C,MAAM,mBACJ,QAAQ,+BAA+B,KAAA,IACnC,6CACA,yBAAyB,QAAQ,2BAA2B;GAElE,MAAM,KACJ,KAAK,QAAQ,GAAG,IAAI,QAAQ,KAAK,gBAAgB,QAAQ,YAAY,wBAAwB,QAAQ,kBAAkB,KAAK,IAAI,EAAE,IAAI,iBAAiB,EACzJ;EACF;CACF;CAEA,OAAO,MAAM,KAAK,IAAI;AACxB;;;ACnQA,MAAM,SAAS,MAAM,kCAAkC;AAEvD,QAAQ,IAAI,iCAAiC,MAAM,CAAC"}
|
package/build/lib/fs.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ declare const itemsFs: import("yolodb").YoloDbTable<{
|
|
|
9
9
|
gen: number;
|
|
10
10
|
shortDesc: string;
|
|
11
11
|
desc: string | null;
|
|
12
|
-
category: "berry" | "other" | "ball" | "medicine" | "battle" | "machine" | "
|
|
12
|
+
category: "berry" | "other" | "ball" | "medicine" | "battle" | "machine" | "megastone" | "zcrystal" | "treasure" | "ingredient" | "material" | "key";
|
|
13
13
|
unholdable?: boolean | undefined;
|
|
14
14
|
}>;
|
|
15
15
|
declare const pokeballsFs: import("yolodb").YoloDbTable<{
|
|
@@ -85,8 +85,8 @@ declare const typesFs: import("yolodb").YoloDbTable<{
|
|
|
85
85
|
declare const naturesFs: import("yolodb").YoloDbTable<{
|
|
86
86
|
id: string;
|
|
87
87
|
name: string;
|
|
88
|
-
raises: "
|
|
89
|
-
lowers: "
|
|
88
|
+
raises: "def" | "hp" | "atk" | "spa" | "spd" | "spe" | "acc" | "eva" | null;
|
|
89
|
+
lowers: "def" | "hp" | "atk" | "spa" | "spd" | "spe" | "acc" | "eva" | null;
|
|
90
90
|
}>;
|
|
91
91
|
declare const personalitiesFs: import("yolodb").YoloDbTable<{
|
|
92
92
|
id: string;
|
|
@@ -102,7 +102,7 @@ declare const colorsFs: import("yolodb").YoloDbTable<{
|
|
|
102
102
|
color: string;
|
|
103
103
|
}>;
|
|
104
104
|
declare const languagesFs: import("yolodb").YoloDbTable<{
|
|
105
|
-
id: "en" | "es" | "
|
|
105
|
+
id: "en" | "es" | "esla" | "fr" | "de" | "it" | "ja" | "ko" | "chs" | "cht" | "pt";
|
|
106
106
|
name: string;
|
|
107
107
|
nameEng: string;
|
|
108
108
|
alpha3: "esla" | "chs" | "cht" | "eng" | "esp" | "fra" | "deu" | "ita" | "jap" | "kor" | "por";
|
package/build/lib/schemas.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as pokemonSchema, C as onlineFeaturesSchema, D as pokedexEntrySchema, E as pokeballSchema, M as regionSchema, N as ribbonSchema, O as pokedexSchema, P as typeSchema, S as natureSchema, T as personalitySchema, _ as modernBoxPresetIndexSchema, a as boxPresetMapSchema, b as modernBoxPresetTags, c as colorSchema, d as generationSchema, f as i18nTextSchema, g as modernBoxPresetBoxSchema, h as markSchema, i as boxPresetIndexItemSchema, j as pokemonSearchFilterSchema, k as pokemonRefsSchema, l as gameFeaturesSchema, m as languageSchema, n as boxPresetBoxPokemonSchema, o as boxPresetSchema, p as itemSchema, r as boxPresetBoxSchema, s as characterSchema, t as abilitySchema, u as gameSchema, v as modernBoxPresetSchema, w as originMarkSchema, x as moveSchema, y as modernBoxPresetSlotSchema } from "../schemas-
|
|
1
|
+
import { A as pokemonSchema, C as onlineFeaturesSchema, D as pokedexEntrySchema, E as pokeballSchema, M as regionSchema, N as ribbonSchema, O as pokedexSchema, P as typeSchema, S as natureSchema, T as personalitySchema, _ as modernBoxPresetIndexSchema, a as boxPresetMapSchema, b as modernBoxPresetTags, c as colorSchema, d as generationSchema, f as i18nTextSchema, g as modernBoxPresetBoxSchema, h as markSchema, i as boxPresetIndexItemSchema, j as pokemonSearchFilterSchema, k as pokemonRefsSchema, l as gameFeaturesSchema, m as languageSchema, n as boxPresetBoxPokemonSchema, o as boxPresetSchema, p as itemSchema, r as boxPresetBoxSchema, s as characterSchema, t as abilitySchema, u as gameSchema, v as modernBoxPresetSchema, w as originMarkSchema, x as moveSchema, y as modernBoxPresetSlotSchema } from "../schemas-CiojUbKN.mjs";
|
|
2
2
|
export { abilitySchema, boxPresetBoxPokemonSchema, boxPresetBoxSchema, boxPresetIndexItemSchema, boxPresetMapSchema, boxPresetSchema, characterSchema, colorSchema, gameFeaturesSchema, gameSchema, generationSchema, i18nTextSchema, itemSchema, languageSchema, markSchema, modernBoxPresetBoxSchema, modernBoxPresetIndexSchema, modernBoxPresetSchema, modernBoxPresetSlotSchema, modernBoxPresetTags, moveSchema, natureSchema, onlineFeaturesSchema, originMarkSchema, personalitySchema, pokeballSchema, pokedexEntrySchema, pokedexSchema, pokemonRefsSchema, pokemonSchema, pokemonSearchFilterSchema, regionSchema, ribbonSchema, typeSchema };
|
package/build/lib/types.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as statIds, a as gameType, c as ivJudgeValues, d as languageInGameCodes, f as moveCategory, g as ribbonCategory, h as raidStyles, i as gameSeries, l as languageAlpha3Codes, m as pokemonSizes, n as battleStyles, o as genders, p as pokeballCategory, r as gamePlatforms, s as itemCategory, t as abilityTagIds, u as languageIds, v as titleTypes, y as typeIds } from "../enums-CCbmORM6.mjs";
|
|
2
|
-
import { A as pokemonSchema, C as onlineFeaturesSchema, D as pokedexEntrySchema, E as pokeballSchema, M as regionSchema, N as ribbonSchema, O as pokedexSchema, P as typeSchema, S as natureSchema, T as personalitySchema, _ as modernBoxPresetIndexSchema, b as modernBoxPresetTags, c as colorSchema, d as generationSchema, f as i18nTextSchema, g as modernBoxPresetBoxSchema, h as markSchema, j as pokemonSearchFilterSchema, k as pokemonRefsSchema, l as gameFeaturesSchema, m as languageSchema, n as boxPresetBoxPokemonSchema, o as boxPresetSchema, p as itemSchema, r as boxPresetBoxSchema, s as characterSchema, t as abilitySchema, u as gameSchema, v as modernBoxPresetSchema, w as originMarkSchema, x as moveSchema, y as modernBoxPresetSlotSchema } from "../schemas-
|
|
2
|
+
import { A as pokemonSchema, C as onlineFeaturesSchema, D as pokedexEntrySchema, E as pokeballSchema, M as regionSchema, N as ribbonSchema, O as pokedexSchema, P as typeSchema, S as natureSchema, T as personalitySchema, _ as modernBoxPresetIndexSchema, b as modernBoxPresetTags, c as colorSchema, d as generationSchema, f as i18nTextSchema, g as modernBoxPresetBoxSchema, h as markSchema, j as pokemonSearchFilterSchema, k as pokemonRefsSchema, l as gameFeaturesSchema, m as languageSchema, n as boxPresetBoxPokemonSchema, o as boxPresetSchema, p as itemSchema, r as boxPresetBoxSchema, s as characterSchema, t as abilitySchema, u as gameSchema, v as modernBoxPresetSchema, w as originMarkSchema, x as moveSchema, y as modernBoxPresetSlotSchema } from "../schemas-CiojUbKN.mjs";
|
|
3
3
|
import z$1 from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/types.d.ts
|
|
@@ -2,7 +2,7 @@ import { n as writeJsonDataFile } from "../fs-B5MIz_Bs.mjs";
|
|
|
2
2
|
import { i as appLangs } from "../languages-CY-Q1SED.mjs";
|
|
3
3
|
//#region src/lib-next/_build.ts
|
|
4
4
|
await import("../build-DeFbpXmN.mjs");
|
|
5
|
-
await import("../build-
|
|
5
|
+
await import("../build-GIV09lTc.mjs");
|
|
6
6
|
writeJsonDataFile("languages.json", appLangs);
|
|
7
7
|
console.log(`Exported ${appLangs.length} app languages`);
|
|
8
8
|
//#endregion
|
|
@@ -137,8 +137,8 @@ declare const onlineFeaturesSchema: z.ZodObject<{
|
|
|
137
137
|
trades: z.ZodBoolean;
|
|
138
138
|
raids: z.ZodBoolean;
|
|
139
139
|
raidStyles: z.ZodArray<z.ZodEnum<{
|
|
140
|
-
dynamax: "dynamax";
|
|
141
140
|
tera: "tera";
|
|
141
|
+
dynamax: "dynamax";
|
|
142
142
|
}>>;
|
|
143
143
|
coop: z.ZodBoolean;
|
|
144
144
|
}, z.core.$strip>;
|
|
@@ -149,15 +149,15 @@ declare const gameSchema: z.ZodObject<{
|
|
|
149
149
|
nameSlug: z.ZodString;
|
|
150
150
|
codename: z.ZodNullable<z.ZodString>;
|
|
151
151
|
type: z.ZodEnum<{
|
|
152
|
-
superset: "superset";
|
|
153
152
|
set: "set";
|
|
153
|
+
superset: "superset";
|
|
154
154
|
game: "game";
|
|
155
155
|
dlc: "dlc";
|
|
156
156
|
}>;
|
|
157
157
|
series: z.ZodEnum<{
|
|
158
|
+
storage: "storage";
|
|
158
159
|
main: "main";
|
|
159
160
|
spinoff: "spinoff";
|
|
160
|
-
storage: "storage";
|
|
161
161
|
legends: "legends";
|
|
162
162
|
}>;
|
|
163
163
|
gameSet: z.ZodNullable<z.ZodString>;
|
|
@@ -218,8 +218,8 @@ declare const gameSchema: z.ZodObject<{
|
|
|
218
218
|
trades: z.ZodBoolean;
|
|
219
219
|
raids: z.ZodBoolean;
|
|
220
220
|
raidStyles: z.ZodArray<z.ZodEnum<{
|
|
221
|
-
dynamax: "dynamax";
|
|
222
221
|
tera: "tera";
|
|
222
|
+
dynamax: "dynamax";
|
|
223
223
|
}>>;
|
|
224
224
|
coop: z.ZodBoolean;
|
|
225
225
|
}, z.core.$strip>>;
|
|
@@ -243,12 +243,12 @@ declare const itemSchema: z.ZodObject<{
|
|
|
243
243
|
medicine: "medicine";
|
|
244
244
|
battle: "battle";
|
|
245
245
|
machine: "machine";
|
|
246
|
+
megastone: "megastone";
|
|
247
|
+
zcrystal: "zcrystal";
|
|
246
248
|
treasure: "treasure";
|
|
247
249
|
ingredient: "ingredient";
|
|
248
250
|
material: "material";
|
|
249
251
|
key: "key";
|
|
250
|
-
megastone: "megastone";
|
|
251
|
-
zcrystal: "zcrystal";
|
|
252
252
|
}>;
|
|
253
253
|
unholdable: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
254
254
|
}, z.core.$strip>;
|
|
@@ -270,12 +270,12 @@ declare const languageSchema: z.ZodObject<{
|
|
|
270
270
|
id: z.ZodEnum<{
|
|
271
271
|
en: "en";
|
|
272
272
|
es: "es";
|
|
273
|
+
esla: "esla";
|
|
274
|
+
fr: "fr";
|
|
273
275
|
de: "de";
|
|
274
276
|
it: "it";
|
|
275
|
-
fr: "fr";
|
|
276
|
-
ko: "ko";
|
|
277
277
|
ja: "ja";
|
|
278
|
-
|
|
278
|
+
ko: "ko";
|
|
279
279
|
chs: "chs";
|
|
280
280
|
cht: "cht";
|
|
281
281
|
pt: "pt";
|
|
@@ -356,9 +356,9 @@ declare const natureSchema: z.ZodObject<{
|
|
|
356
356
|
id: z.ZodString;
|
|
357
357
|
name: z.ZodString;
|
|
358
358
|
raises: z.ZodNullable<z.ZodEnum<{
|
|
359
|
+
def: "def";
|
|
359
360
|
hp: "hp";
|
|
360
361
|
atk: "atk";
|
|
361
|
-
def: "def";
|
|
362
362
|
spa: "spa";
|
|
363
363
|
spd: "spd";
|
|
364
364
|
spe: "spe";
|
|
@@ -366,9 +366,9 @@ declare const natureSchema: z.ZodObject<{
|
|
|
366
366
|
eva: "eva";
|
|
367
367
|
}>>;
|
|
368
368
|
lowers: z.ZodNullable<z.ZodEnum<{
|
|
369
|
+
def: "def";
|
|
369
370
|
hp: "hp";
|
|
370
371
|
atk: "atk";
|
|
371
|
-
def: "def";
|
|
372
372
|
spa: "spa";
|
|
373
373
|
spd: "spd";
|
|
374
374
|
spe: "spe";
|
|
@@ -802,4 +802,4 @@ declare const pokemonSearchFilterSchema: z.ZodObject<{
|
|
|
802
802
|
}, z.core.$strip>;
|
|
803
803
|
//#endregion
|
|
804
804
|
export { pokemonSchema as A, onlineFeaturesSchema as C, pokedexEntrySchema as D, pokeballSchema as E, regionSchema as M, ribbonSchema as N, pokedexSchema as O, typeSchema as P, natureSchema as S, personalitySchema as T, modernBoxPresetIndexSchema as _, boxPresetMapSchema as a, modernBoxPresetTags as b, colorSchema as c, generationSchema as d, i18nTextSchema as f, modernBoxPresetBoxSchema as g, markSchema as h, boxPresetIndexItemSchema as i, pokemonSearchFilterSchema as j, pokemonRefsSchema as k, gameFeaturesSchema as l, languageSchema as m, boxPresetBoxPokemonSchema as n, boxPresetSchema as o, itemSchema as p, boxPresetBoxSchema as r, characterSchema as s, abilitySchema as t, gameSchema as u, modernBoxPresetSchema as v, originMarkSchema as w, moveSchema as x, modernBoxPresetSlotSchema as y };
|
|
805
|
-
//# sourceMappingURL=schemas-
|
|
805
|
+
//# sourceMappingURL=schemas-CiojUbKN.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas-
|
|
1
|
+
{"version":3,"file":"schemas-CiojUbKN.d.mts","names":[],"sources":["../src/lib/schemas.ts"],"mappings":";;;cAkEa,cAAA,EAAc,CAAA,CAAA,SAAA,CAAA,CAAA,CAAA,OAAA;;;;;;;;;;;;;cAEd,aAAA,EAAa,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKb,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;cAKjB,eAAA,EAAe,CAAA,CAAA,SAAA;;;;cAGf,WAAA,EAAW,CAAA,CAAA,SAAA;;;;;cAGX,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;cAwBlB,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAQpB,UAAA,EAAU,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqBV,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;cAKhB,UAAA,EAAU,CA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;;;;;;;cAKlB,eAAA,EAAe,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;cAWf,kBAAA,EAAkB,CAAA,CAAA,SAAA,CAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,SAAA,CAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;cAElB,mBAAA;AAAA,cAUA,0BAAA,EAA0B,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,SAAA;AAAA,cAE1B,yBAAA,EAAyB,CAAA,CAAA,QAAA,EAAA,CAAA,CAAA,WAAA,CAAA,CAAA,CAAA,SAAA,GAAA,CAAA,CAAA,SAAA;;;;;;cAWzB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;cAOxB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsBrB,yBAAA,EAAyB,CAAA,CAAA,SAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "pokopia-bubblybasin",
|
|
3
|
+
"name": "Bubbly Basin",
|
|
4
|
+
"gen": 0,
|
|
5
|
+
"nameSlug": "bubbly-basin",
|
|
6
|
+
"codename": null,
|
|
7
|
+
"type": "dlc",
|
|
8
|
+
"series": "spinoff",
|
|
9
|
+
"gameSet": "pokopia",
|
|
10
|
+
"gameSuperSet": null,
|
|
11
|
+
"releaseDate": "2026-08-05",
|
|
12
|
+
"region": "kanto",
|
|
13
|
+
"originMark": "none",
|
|
14
|
+
"pokedexes": ["pokopia-basin"],
|
|
15
|
+
"maxBoxes": 0,
|
|
16
|
+
"maxBoxSize": 0,
|
|
17
|
+
"platforms": ["switch2"],
|
|
18
|
+
"features": {
|
|
19
|
+
"storage": false,
|
|
20
|
+
"pokedex": true,
|
|
21
|
+
"training": false,
|
|
22
|
+
"shiny": false,
|
|
23
|
+
"items": false,
|
|
24
|
+
"gender": false,
|
|
25
|
+
"pokerus": false,
|
|
26
|
+
"nature": false,
|
|
27
|
+
"ribbons": false,
|
|
28
|
+
"marks": false,
|
|
29
|
+
"markings": false,
|
|
30
|
+
"shadow": false,
|
|
31
|
+
"ball": false,
|
|
32
|
+
"mega": false,
|
|
33
|
+
"zmove": false,
|
|
34
|
+
"gmax": false,
|
|
35
|
+
"alpha": false,
|
|
36
|
+
"tera": false,
|
|
37
|
+
"plusmvs": false,
|
|
38
|
+
"mints": false,
|
|
39
|
+
"sizes": false,
|
|
40
|
+
"abilities": false
|
|
41
|
+
}
|
|
42
|
+
}
|
package/data/games/pokopia.json
CHANGED
package/data/indices/games.json
CHANGED
|
@@ -157,9 +157,7 @@
|
|
|
157
157
|
{ "pid": "oricorio-pau", "dexNum": 115, "isForm": true },
|
|
158
158
|
{ "pid": "oricorio-sensu", "dexNum": 115, "isForm": true },
|
|
159
159
|
{ "pid": "sandshrew", "dexNum": 116, "isForm": false },
|
|
160
|
-
{ "pid": "sandshrew-alola", "dexNum": 116, "isForm": true },
|
|
161
160
|
{ "pid": "sandslash", "dexNum": 117, "isForm": false },
|
|
162
|
-
{ "pid": "sandslash-alola", "dexNum": 117, "isForm": true },
|
|
163
161
|
{ "pid": "gastly", "dexNum": 118, "isForm": false },
|
|
164
162
|
{ "pid": "haunter", "dexNum": 119, "isForm": false },
|
|
165
163
|
{ "pid": "gengar", "dexNum": 120, "isForm": false },
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "pokopia-basin",
|
|
3
|
+
"name": "Pokopia Basin Pokédex",
|
|
4
|
+
"gen": 0,
|
|
5
|
+
"region": "kanto",
|
|
6
|
+
"isNational": false,
|
|
7
|
+
"baseDex": "pokopia",
|
|
8
|
+
"pkApiId": null,
|
|
9
|
+
"entries": [
|
|
10
|
+
{ "pid": "shellder", "dexNum": 1, "isForm": false },
|
|
11
|
+
{ "pid": "cloyster", "dexNum": 2, "isForm": false },
|
|
12
|
+
{ "pid": "horsea", "dexNum": 3, "isForm": false },
|
|
13
|
+
{ "pid": "seadra", "dexNum": 4, "isForm": false },
|
|
14
|
+
{ "pid": "kingdra", "dexNum": 5, "isForm": false },
|
|
15
|
+
{ "pid": "staryu", "dexNum": 6, "isForm": false },
|
|
16
|
+
{ "pid": "starmie", "dexNum": 7, "isForm": false },
|
|
17
|
+
{ "pid": "totodile", "dexNum": 8, "isForm": false },
|
|
18
|
+
{ "pid": "croconaw", "dexNum": 9, "isForm": false },
|
|
19
|
+
{ "pid": "feraligatr", "dexNum": 10, "isForm": false },
|
|
20
|
+
{ "pid": "chinchou", "dexNum": 11, "isForm": false },
|
|
21
|
+
{ "pid": "lanturn", "dexNum": 12, "isForm": false },
|
|
22
|
+
{ "pid": "corsola", "dexNum": 13, "isForm": false },
|
|
23
|
+
{ "pid": "mudkip", "dexNum": 14, "isForm": false },
|
|
24
|
+
{ "pid": "marshtomp", "dexNum": 15, "isForm": false },
|
|
25
|
+
{ "pid": "swampert", "dexNum": 16, "isForm": false },
|
|
26
|
+
{ "pid": "carvanha", "dexNum": 17, "isForm": false },
|
|
27
|
+
{ "pid": "sharpedo", "dexNum": 18, "isForm": false },
|
|
28
|
+
{ "pid": "barboach", "dexNum": 19, "isForm": false },
|
|
29
|
+
{ "pid": "whiscash", "dexNum": 20, "isForm": false },
|
|
30
|
+
{ "pid": "corphish", "dexNum": 21, "isForm": false },
|
|
31
|
+
{ "pid": "crawdaunt", "dexNum": 22, "isForm": false },
|
|
32
|
+
{ "pid": "luvdisc", "dexNum": 23, "isForm": false },
|
|
33
|
+
{ "pid": "buizel", "dexNum": 24, "isForm": false },
|
|
34
|
+
{ "pid": "floatzel", "dexNum": 25, "isForm": false },
|
|
35
|
+
{ "pid": "finneon", "dexNum": 26, "isForm": false },
|
|
36
|
+
{ "pid": "lumineon", "dexNum": 27, "isForm": false },
|
|
37
|
+
{ "pid": "frillish", "dexNum": 28, "isForm": false },
|
|
38
|
+
{ "pid": "frillish-f", "dexNum": 28, "isForm": true },
|
|
39
|
+
{ "pid": "jellicent", "dexNum": 29, "isForm": false },
|
|
40
|
+
{ "pid": "jellicent-f", "dexNum": 29, "isForm": true },
|
|
41
|
+
{ "pid": "alomomola", "dexNum": 30, "isForm": false },
|
|
42
|
+
{ "pid": "stunfisk", "dexNum": 31, "isForm": false },
|
|
43
|
+
{ "pid": "inkay", "dexNum": 32, "isForm": false },
|
|
44
|
+
{ "pid": "malamar", "dexNum": 33, "isForm": false },
|
|
45
|
+
{ "pid": "popplio", "dexNum": 34, "isForm": false },
|
|
46
|
+
{ "pid": "brionne", "dexNum": 35, "isForm": false },
|
|
47
|
+
{ "pid": "primarina", "dexNum": 36, "isForm": false },
|
|
48
|
+
{ "pid": "mareanie", "dexNum": 37, "isForm": false },
|
|
49
|
+
{ "pid": "toxapex", "dexNum": 38, "isForm": false },
|
|
50
|
+
{ "pid": "wimpod", "dexNum": 39, "isForm": false },
|
|
51
|
+
{ "pid": "golisopod", "dexNum": 40, "isForm": false },
|
|
52
|
+
{ "pid": "bruxish", "dexNum": 41, "isForm": false },
|
|
53
|
+
{ "pid": "dhelmise", "dexNum": 42, "isForm": false },
|
|
54
|
+
{ "pid": "chewtle", "dexNum": 43, "isForm": false },
|
|
55
|
+
{ "pid": "drednaw", "dexNum": 44, "isForm": false },
|
|
56
|
+
{ "pid": "pincurchin", "dexNum": 45, "isForm": false },
|
|
57
|
+
{ "pid": "wiglett", "dexNum": 46, "isForm": false },
|
|
58
|
+
{ "pid": "wugtrio", "dexNum": 47, "isForm": false },
|
|
59
|
+
{ "pid": "veluza", "dexNum": 48, "isForm": false },
|
|
60
|
+
{ "pid": "phione", "dexNum": 49, "isForm": false },
|
|
61
|
+
{ "pid": "manaphy", "dexNum": 50, "isForm": false }
|
|
62
|
+
]
|
|
63
|
+
}
|
|
@@ -4,11 +4,15 @@
|
|
|
4
4
|
"gen": 0,
|
|
5
5
|
"region": "kanto",
|
|
6
6
|
"isNational": false,
|
|
7
|
-
"baseDex":
|
|
7
|
+
"baseDex": "pokopia",
|
|
8
8
|
"pkApiId": null,
|
|
9
9
|
"entries": [
|
|
10
10
|
{ "pid": "hoppip", "dexNum": 1, "isForm": false },
|
|
11
11
|
{ "pid": "skiploom", "dexNum": 2, "isForm": false },
|
|
12
|
-
{ "pid": "jumpluff", "dexNum": 3, "isForm": false }
|
|
12
|
+
{ "pid": "jumpluff", "dexNum": 3, "isForm": false },
|
|
13
|
+
{ "pid": "sableye", "dexNum": 4, "isForm": false },
|
|
14
|
+
{ "pid": "jirachi", "dexNum": 5, "isForm": false },
|
|
15
|
+
{ "pid": "feebas", "dexNum": 6, "isForm": false },
|
|
16
|
+
{ "pid": "milotic", "dexNum": 7, "isForm": false }
|
|
13
17
|
]
|
|
14
18
|
}
|
|
@@ -1586,6 +1586,7 @@
|
|
|
1586
1586
|
{
|
|
1587
1587
|
"id": "eelevate",
|
|
1588
1588
|
"championsId": "313",
|
|
1589
|
+
"pokeApiId": 312,
|
|
1589
1590
|
"slug": "eelevate",
|
|
1590
1591
|
"name": "Eelevate",
|
|
1591
1592
|
"description": "The Pokémon floats off the ground, making it immune to\nGround-type moves, as well as the Spikes, Toxic Spikes,\nand Sticky Web statuses. When the Pokémon knocks out a\ntarget with an attack, its highest stat is boosted by 1 stage."
|
|
@@ -1601,6 +1602,7 @@
|
|
|
1601
1602
|
{
|
|
1602
1603
|
"id": "firemane",
|
|
1603
1604
|
"championsId": "316",
|
|
1605
|
+
"pokeApiId": 313,
|
|
1604
1606
|
"slug": "fire-mane",
|
|
1605
1607
|
"name": "Fire Mane",
|
|
1606
1608
|
"description": "Boosts the power of the Pokémon's Fire-type moves by 50%."
|
|
@@ -1142,6 +1142,7 @@
|
|
|
1142
1142
|
{
|
|
1143
1143
|
"id": "clefablite",
|
|
1144
1144
|
"championsId": "2559",
|
|
1145
|
+
"pokeApiId": 2233,
|
|
1145
1146
|
"slug": "clefablite",
|
|
1146
1147
|
"name": "Clefablite",
|
|
1147
1148
|
"description": "A held item that allows Clefable to Mega Evolve.",
|
|
@@ -1151,6 +1152,7 @@
|
|
|
1151
1152
|
{
|
|
1152
1153
|
"id": "victreebelite",
|
|
1153
1154
|
"championsId": "2560",
|
|
1155
|
+
"pokeApiId": 2234,
|
|
1154
1156
|
"slug": "victreebelite",
|
|
1155
1157
|
"name": "Victreebelite",
|
|
1156
1158
|
"description": "A held item that allows Victreebel to Mega Evolve.",
|
|
@@ -1160,6 +1162,7 @@
|
|
|
1160
1162
|
{
|
|
1161
1163
|
"id": "starminite",
|
|
1162
1164
|
"championsId": "2561",
|
|
1165
|
+
"pokeApiId": 2235,
|
|
1163
1166
|
"slug": "starminite",
|
|
1164
1167
|
"name": "Starminite",
|
|
1165
1168
|
"description": "A held item that allows Starmie to Mega Evolve.",
|
|
@@ -1169,6 +1172,7 @@
|
|
|
1169
1172
|
{
|
|
1170
1173
|
"id": "dragoninite",
|
|
1171
1174
|
"championsId": "2562",
|
|
1175
|
+
"pokeApiId": 2236,
|
|
1172
1176
|
"slug": "dragoninite",
|
|
1173
1177
|
"name": "Dragoninite",
|
|
1174
1178
|
"description": "A held item that allows Dragonite to Mega Evolve.",
|
|
@@ -1178,6 +1182,7 @@
|
|
|
1178
1182
|
{
|
|
1179
1183
|
"id": "meganiumite",
|
|
1180
1184
|
"championsId": "2563",
|
|
1185
|
+
"pokeApiId": 2237,
|
|
1181
1186
|
"slug": "meganiumite",
|
|
1182
1187
|
"name": "Meganiumite",
|
|
1183
1188
|
"description": "A held item that allows Meganium to Mega Evolve.",
|
|
@@ -1187,6 +1192,7 @@
|
|
|
1187
1192
|
{
|
|
1188
1193
|
"id": "feraligite",
|
|
1189
1194
|
"championsId": "2564",
|
|
1195
|
+
"pokeApiId": 2238,
|
|
1190
1196
|
"slug": "feraligite",
|
|
1191
1197
|
"name": "Feraligite",
|
|
1192
1198
|
"description": "A held item that allows Feraligatr to Mega Evolve.",
|
|
@@ -1196,6 +1202,7 @@
|
|
|
1196
1202
|
{
|
|
1197
1203
|
"id": "skarmorite",
|
|
1198
1204
|
"championsId": "2565",
|
|
1205
|
+
"pokeApiId": 2239,
|
|
1199
1206
|
"slug": "skarmorite",
|
|
1200
1207
|
"name": "Skarmorite",
|
|
1201
1208
|
"description": "A held item that allows Skarmory to Mega Evolve.",
|
|
@@ -1205,6 +1212,7 @@
|
|
|
1205
1212
|
{
|
|
1206
1213
|
"id": "froslassite",
|
|
1207
1214
|
"championsId": "2566",
|
|
1215
|
+
"pokeApiId": 2240,
|
|
1208
1216
|
"slug": "froslassite",
|
|
1209
1217
|
"name": "Froslassite",
|
|
1210
1218
|
"description": "A held item that allows Froslass to Mega Evolve.",
|
|
@@ -1214,6 +1222,7 @@
|
|
|
1214
1222
|
{
|
|
1215
1223
|
"id": "emboarite",
|
|
1216
1224
|
"championsId": "2569",
|
|
1225
|
+
"pokeApiId": 2243,
|
|
1217
1226
|
"slug": "emboarite",
|
|
1218
1227
|
"name": "Emboarite",
|
|
1219
1228
|
"description": "A held item that allows Emboar to Mega Evolve.",
|
|
@@ -1223,6 +1232,7 @@
|
|
|
1223
1232
|
{
|
|
1224
1233
|
"id": "excadrite",
|
|
1225
1234
|
"championsId": "2570",
|
|
1235
|
+
"pokeApiId": 2244,
|
|
1226
1236
|
"slug": "excadrite",
|
|
1227
1237
|
"name": "Excadrite",
|
|
1228
1238
|
"description": "A held item that allows Excadrill to Mega Evolve.",
|
|
@@ -1232,6 +1242,7 @@
|
|
|
1232
1242
|
{
|
|
1233
1243
|
"id": "scolipite",
|
|
1234
1244
|
"championsId": "2571",
|
|
1245
|
+
"pokeApiId": 2245,
|
|
1235
1246
|
"slug": "scolipite",
|
|
1236
1247
|
"name": "Scolipite",
|
|
1237
1248
|
"description": "A held item that allows Scolipede to Mega Evolve.",
|
|
@@ -1241,6 +1252,7 @@
|
|
|
1241
1252
|
{
|
|
1242
1253
|
"id": "scraftinite",
|
|
1243
1254
|
"championsId": "2572",
|
|
1255
|
+
"pokeApiId": 2246,
|
|
1244
1256
|
"slug": "scraftinite",
|
|
1245
1257
|
"name": "Scraftinite",
|
|
1246
1258
|
"description": "A held item that allows Scrafty to Mega Evolve.",
|
|
@@ -1250,6 +1262,7 @@
|
|
|
1250
1262
|
{
|
|
1251
1263
|
"id": "eelektrossite",
|
|
1252
1264
|
"championsId": "2573",
|
|
1265
|
+
"pokeApiId": 2247,
|
|
1253
1266
|
"slug": "eelektrossite",
|
|
1254
1267
|
"name": "Eelektrossite",
|
|
1255
1268
|
"description": "A held item that allows Eelektross to Mega Evolve.",
|
|
@@ -1259,6 +1272,7 @@
|
|
|
1259
1272
|
{
|
|
1260
1273
|
"id": "chandelurite",
|
|
1261
1274
|
"championsId": "2574",
|
|
1275
|
+
"pokeApiId": 2248,
|
|
1262
1276
|
"slug": "chandelurite",
|
|
1263
1277
|
"name": "Chandelurite",
|
|
1264
1278
|
"description": "A held item that allows Chandelure to Mega Evolve.",
|
|
@@ -1268,6 +1282,7 @@
|
|
|
1268
1282
|
{
|
|
1269
1283
|
"id": "chesnaughtite",
|
|
1270
1284
|
"championsId": "2575",
|
|
1285
|
+
"pokeApiId": 2249,
|
|
1271
1286
|
"slug": "chesnaughtite",
|
|
1272
1287
|
"name": "Chesnaughtite",
|
|
1273
1288
|
"description": "A held item that allows Chesnaught to Mega Evolve.",
|
|
@@ -1277,6 +1292,7 @@
|
|
|
1277
1292
|
{
|
|
1278
1293
|
"id": "delphoxite",
|
|
1279
1294
|
"championsId": "2576",
|
|
1295
|
+
"pokeApiId": 2250,
|
|
1280
1296
|
"slug": "delphoxite",
|
|
1281
1297
|
"name": "Delphoxite",
|
|
1282
1298
|
"description": "A held item that allows Delphox to Mega Evolve.",
|
|
@@ -1286,6 +1302,7 @@
|
|
|
1286
1302
|
{
|
|
1287
1303
|
"id": "greninjite",
|
|
1288
1304
|
"championsId": "2577",
|
|
1305
|
+
"pokeApiId": 2251,
|
|
1289
1306
|
"slug": "greninjite",
|
|
1290
1307
|
"name": "Greninjite",
|
|
1291
1308
|
"description": "A held item that allows Greninja to Mega Evolve.",
|
|
@@ -1295,6 +1312,7 @@
|
|
|
1295
1312
|
{
|
|
1296
1313
|
"id": "pyroarite",
|
|
1297
1314
|
"championsId": "2578",
|
|
1315
|
+
"pokeApiId": 2252,
|
|
1298
1316
|
"slug": "pyroarite",
|
|
1299
1317
|
"name": "Pyroarite",
|
|
1300
1318
|
"description": "A held item that allows Pyroar to Mega Evolve.",
|
|
@@ -1304,6 +1322,7 @@
|
|
|
1304
1322
|
{
|
|
1305
1323
|
"id": "floettite",
|
|
1306
1324
|
"championsId": "2579",
|
|
1325
|
+
"pokeApiId": 2253,
|
|
1307
1326
|
"slug": "floettite",
|
|
1308
1327
|
"name": "Floettite",
|
|
1309
1328
|
"description": "A held item that allows Eternal Flower Floette to\nMega Evolve.",
|
|
@@ -1313,6 +1332,7 @@
|
|
|
1313
1332
|
{
|
|
1314
1333
|
"id": "malamarite",
|
|
1315
1334
|
"championsId": "2580",
|
|
1335
|
+
"pokeApiId": 2254,
|
|
1316
1336
|
"slug": "malamarite",
|
|
1317
1337
|
"name": "Malamarite",
|
|
1318
1338
|
"description": "A held item that allows Malamar to Mega Evolve.",
|
|
@@ -1322,6 +1342,7 @@
|
|
|
1322
1342
|
{
|
|
1323
1343
|
"id": "barbaracite",
|
|
1324
1344
|
"championsId": "2581",
|
|
1345
|
+
"pokeApiId": 2255,
|
|
1325
1346
|
"slug": "barbaracite",
|
|
1326
1347
|
"name": "Barbaracite",
|
|
1327
1348
|
"description": "A held item that allows Barbaracle to Mega Evolve.",
|
|
@@ -1331,6 +1352,7 @@
|
|
|
1331
1352
|
{
|
|
1332
1353
|
"id": "dragalgite",
|
|
1333
1354
|
"championsId": "2582",
|
|
1355
|
+
"pokeApiId": 2256,
|
|
1334
1356
|
"slug": "dragalgite",
|
|
1335
1357
|
"name": "Dragalgite",
|
|
1336
1358
|
"description": "A held item that allows Dragalge to Mega Evolve.",
|
|
@@ -1340,6 +1362,7 @@
|
|
|
1340
1362
|
{
|
|
1341
1363
|
"id": "hawluchanite",
|
|
1342
1364
|
"championsId": "2583",
|
|
1365
|
+
"pokeApiId": 2257,
|
|
1343
1366
|
"slug": "hawluchanite",
|
|
1344
1367
|
"name": "Hawluchanite",
|
|
1345
1368
|
"description": "A held item that allows Hawlucha to Mega Evolve.",
|
|
@@ -1349,6 +1372,7 @@
|
|
|
1349
1372
|
{
|
|
1350
1373
|
"id": "drampanite",
|
|
1351
1374
|
"championsId": "2585",
|
|
1375
|
+
"pokeApiId": 2259,
|
|
1352
1376
|
"slug": "drampanite",
|
|
1353
1377
|
"name": "Drampanite",
|
|
1354
1378
|
"description": "A held item that allows Drampa to Mega Evolve.",
|
|
@@ -1358,6 +1382,7 @@
|
|
|
1358
1382
|
{
|
|
1359
1383
|
"id": "falinksite",
|
|
1360
1384
|
"championsId": "2587",
|
|
1385
|
+
"pokeApiId": 2261,
|
|
1361
1386
|
"slug": "falinksite",
|
|
1362
1387
|
"name": "Falinksite",
|
|
1363
1388
|
"description": "A held item that allows Falinks to Mega Evolve.",
|
|
@@ -1367,6 +1392,7 @@
|
|
|
1367
1392
|
{
|
|
1368
1393
|
"id": "raichunitex",
|
|
1369
1394
|
"championsId": "2635",
|
|
1395
|
+
"pokeApiId": 2262,
|
|
1370
1396
|
"slug": "raichunite-x",
|
|
1371
1397
|
"name": "Raichunite X",
|
|
1372
1398
|
"description": "A held item that allows Raichu to Mega Evolve into\nMega Raichu X. It has no effect on Alolan Raichu.",
|
|
@@ -1376,6 +1402,7 @@
|
|
|
1376
1402
|
{
|
|
1377
1403
|
"id": "raichunitey",
|
|
1378
1404
|
"championsId": "2636",
|
|
1405
|
+
"pokeApiId": 2263,
|
|
1379
1406
|
"slug": "raichunite-y",
|
|
1380
1407
|
"name": "Raichunite Y",
|
|
1381
1408
|
"description": "A held item that allows Raichu to Mega Evolve into\nMega Raichu Y. It has no effect on Alolan Raichu.",
|
|
@@ -1385,6 +1412,7 @@
|
|
|
1385
1412
|
{
|
|
1386
1413
|
"id": "chimechite",
|
|
1387
1414
|
"championsId": "2637",
|
|
1415
|
+
"pokeApiId": 2264,
|
|
1388
1416
|
"slug": "chimechite",
|
|
1389
1417
|
"name": "Chimechite",
|
|
1390
1418
|
"description": "A held item that allows Chimecho to Mega Evolve.",
|
|
@@ -1394,6 +1422,7 @@
|
|
|
1394
1422
|
{
|
|
1395
1423
|
"id": "staraptite",
|
|
1396
1424
|
"championsId": "2639",
|
|
1425
|
+
"pokeApiId": 2266,
|
|
1397
1426
|
"slug": "staraptite",
|
|
1398
1427
|
"name": "Staraptite",
|
|
1399
1428
|
"description": "A held item that allows Staraptor to Mega Evolve.",
|
|
@@ -1403,6 +1432,7 @@
|
|
|
1403
1432
|
{
|
|
1404
1433
|
"id": "golurkite",
|
|
1405
1434
|
"championsId": "2642",
|
|
1435
|
+
"pokeApiId": 2269,
|
|
1406
1436
|
"slug": "golurkite",
|
|
1407
1437
|
"name": "Golurkite",
|
|
1408
1438
|
"description": "A held item that allows Golurk to Mega Evolve.",
|
|
@@ -1412,6 +1442,7 @@
|
|
|
1412
1442
|
{
|
|
1413
1443
|
"id": "meowsticite",
|
|
1414
1444
|
"championsId": "2643",
|
|
1445
|
+
"pokeApiId": 2270,
|
|
1415
1446
|
"slug": "meowsticite",
|
|
1416
1447
|
"name": "Meowsticite",
|
|
1417
1448
|
"description": "A held item that allows Meowstic to Mega Evolve.",
|
|
@@ -1421,6 +1452,7 @@
|
|
|
1421
1452
|
{
|
|
1422
1453
|
"id": "crabominite",
|
|
1423
1454
|
"championsId": "2644",
|
|
1455
|
+
"pokeApiId": 2271,
|
|
1424
1456
|
"slug": "crabominite",
|
|
1425
1457
|
"name": "Crabominite",
|
|
1426
1458
|
"description": "A held item that allows Crabominable to Mega Evolve.",
|
|
@@ -1430,6 +1462,7 @@
|
|
|
1430
1462
|
{
|
|
1431
1463
|
"id": "scovillainite",
|
|
1432
1464
|
"championsId": "2647",
|
|
1465
|
+
"pokeApiId": 2274,
|
|
1433
1466
|
"slug": "scovillainite",
|
|
1434
1467
|
"name": "Scovillainite",
|
|
1435
1468
|
"description": "A held item that allows Scovillain to Mega Evolve.",
|
|
@@ -1439,6 +1472,7 @@
|
|
|
1439
1472
|
{
|
|
1440
1473
|
"id": "glimmoranite",
|
|
1441
1474
|
"championsId": "2650",
|
|
1475
|
+
"pokeApiId": 2277,
|
|
1442
1476
|
"slug": "glimmoranite",
|
|
1443
1477
|
"name": "Glimmoranite",
|
|
1444
1478
|
"description": "A held item that allows Glimmora to Mega Evolve.",
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-DlK17pH-.mjs","names":[],"sources":["../src/upstream-adapters/projectpokemon-champout/fixtures/pokeapi.ts","../src/upstream-adapters/pokeapi/client.ts","../src/upstream-adapters/pokeapi/enrich-champions.ts","../src/upstream-adapters/pokeapi/build.ts"],"sourcesContent":["export const champoutPokeApiResourceNameAliases: Partial<\n Record<'ability' | 'item' | 'move', Record<string, readonly string[]>>\n> = {\n move: {\n visegrip: ['vicegrip', 'vice-grip'],\n },\n}\n","import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'\nimport { dirname, join } from 'node:path'\n\nexport const DEFAULT_POKEAPI_BASE_URL = 'https://pokeapi.co/api/v2'\nexport const DEFAULT_POKEAPI_CACHE_DIR = join(process.cwd(), '.local/pokeapi')\n\nexport const pokeApiResourceKinds = ['ability', 'item', 'move'] as const\nexport type PokeApiResourceKind = (typeof pokeApiResourceKinds)[number]\n\nexport type PokeApiResourceSummary = {\n name: string\n url: string\n}\n\nexport type PokeApiResourceIndexEntry = {\n id: number\n name: string\n}\n\nexport type PokeApiResourceIndex = {\n byId: Map<string, PokeApiResourceIndexEntry>\n byName: Map<string, PokeApiResourceIndexEntry>\n}\nexport type PokeApiResourceIndexes = Record<PokeApiResourceKind, PokeApiResourceIndex>\n\nexport type PokeApiFetchOptions = {\n baseUrl?: string\n cache?: boolean\n cacheDir?: string\n forceRefresh?: boolean\n retries?: number\n}\n\ntype PokeApiResourceListResponse = {\n count: number\n results: PokeApiResourceSummary[]\n}\n\nexport async function fetchPokeApiResourceIndexes(\n baseUrlOrOptions: string | PokeApiFetchOptions = DEFAULT_POKEAPI_BASE_URL,\n): Promise<PokeApiResourceIndexes> {\n const options = normalizePokeApiFetchOptions(baseUrlOrOptions)\n const [ability, item, move] = await Promise.all(\n pokeApiResourceKinds.map((kind) => fetchPokeApiResourceIndex(kind, options)),\n )\n\n return { ability, item, move }\n}\n\nasync function fetchPokeApiResourceIndex(\n kind: PokeApiResourceKind,\n options: PokeApiFetchOptions,\n): Promise<PokeApiResourceIndex> {\n const list = await fetchPokeApiResourceList(kind, options)\n const index: PokeApiResourceIndex = {\n byId: new Map(),\n byName: new Map(),\n }\n\n for (const resource of list.results) {\n const id = parsePokeApiResourceId(resource.url, kind)\n const entry = { id, name: resource.name }\n const idKey = String(id)\n\n if (index.byId.has(idKey)) {\n throw new Error(`Duplicate PokeAPI ${kind} resource id: ${idKey}`)\n }\n\n index.byId.set(idKey, entry)\n\n for (const nameKey of pokeApiResourceNameKeys(resource.name)) {\n const existingEntry = index.byName.get(nameKey)\n\n if (existingEntry !== undefined && existingEntry.id !== id) {\n throw new Error(\n `Duplicate PokeAPI ${kind} resource lookup key ${nameKey}: ${existingEntry.name}, ${resource.name}`,\n )\n }\n\n index.byName.set(nameKey, entry)\n }\n }\n\n return index\n}\n\nasync function fetchPokeApiResourceList(\n kind: PokeApiResourceKind,\n options: PokeApiFetchOptions,\n): Promise<PokeApiResourceListResponse> {\n const baseUrl = options.baseUrl ?? DEFAULT_POKEAPI_BASE_URL\n const url = new URL(`${baseUrl.replace(/\\/+$/, '')}/${kind}/`)\n url.searchParams.set('limit', '100000')\n url.searchParams.set('offset', '0')\n\n const json = await fetchPokeApiJson(url, options)\n\n if (!isPokeApiResourceListResponse(json)) {\n throw new Error(`Unexpected PokeAPI ${kind} list response shape`)\n }\n\n if (json.results.length < json.count) {\n throw new Error(\n `Expected all PokeAPI ${kind} resources in one list response, got ${json.results.length} of ${json.count}`,\n )\n }\n\n return json\n}\n\nexport async function fetchPokeApiJson(\n pathnameOrUrl: string | URL,\n options: PokeApiFetchOptions = {},\n): Promise<unknown> {\n const resolvedOptions = normalizePokeApiFetchOptions(options)\n const url = resolvePokeApiUrl(pathnameOrUrl, resolvedOptions.baseUrl)\n const cacheEnabled = resolvedOptions.cache ?? process.env.POKEAPI_CACHE !== '0'\n const cachePath = pokeApiCachePath(url, resolvedOptions.cacheDir)\n\n if (cacheEnabled && !resolvedOptions.forceRefresh) {\n const cachedJson = readCachedPokeApiJson(cachePath)\n\n if (cachedJson !== undefined) {\n return cachedJson\n }\n }\n\n const json = await fetchPokeApiJsonFromNetwork(url, resolvedOptions.retries)\n\n if (cacheEnabled) {\n writeCachedPokeApiJson(cachePath, json)\n }\n\n return json\n}\n\nfunction normalizePokeApiFetchOptions(\n options: string | PokeApiFetchOptions,\n): Required<PokeApiFetchOptions> {\n const input = typeof options === 'string' ? { baseUrl: options } : options\n\n return {\n baseUrl: input.baseUrl ?? DEFAULT_POKEAPI_BASE_URL,\n cache: input.cache ?? process.env.POKEAPI_CACHE !== '0',\n cacheDir: input.cacheDir ?? process.env.POKEAPI_CACHE_DIR ?? DEFAULT_POKEAPI_CACHE_DIR,\n forceRefresh: input.forceRefresh ?? process.env.POKEAPI_REFRESH_CACHE === '1',\n retries: input.retries ?? 3,\n }\n}\n\nfunction resolvePokeApiUrl(pathnameOrUrl: string | URL, baseUrl: string): URL {\n if (pathnameOrUrl instanceof URL) {\n return pathnameOrUrl\n }\n\n if (/^https?:\\/\\//i.test(pathnameOrUrl)) {\n return new URL(pathnameOrUrl)\n }\n\n const base = baseUrl.replace(/\\/+$/, '')\n const pathname = pathnameOrUrl.replace(/^\\/+/, '').replace(/\\/?$/, '/')\n return new URL(`${base}/${pathname}`)\n}\n\nasync function fetchPokeApiJsonFromNetwork(url: URL, retries: number): Promise<unknown> {\n let lastError: unknown\n\n for (let attempt = 1; attempt <= retries; attempt += 1) {\n try {\n const response = await fetch(url, {\n headers: {\n accept: 'application/json',\n },\n })\n\n if (response.ok) {\n return await response.json()\n }\n\n const body = await response.text()\n lastError = new Error(\n `${response.status} ${response.statusText}${body.length > 0 ? `: ${body.slice(0, 240)}` : ''}`,\n )\n\n if (response.status !== 429 && response.status < 500) {\n break\n }\n } catch (error) {\n lastError = error\n }\n\n await sleep(backoffMs(attempt))\n }\n\n throw lastError instanceof Error ? lastError : new Error(String(lastError))\n}\n\nfunction readCachedPokeApiJson(cachePath: string): unknown | undefined {\n if (!existsSync(cachePath)) {\n return undefined\n }\n\n try {\n return JSON.parse(readFileSync(cachePath, 'utf8'))\n } catch {\n return undefined\n }\n}\n\nfunction writeCachedPokeApiJson(cachePath: string, json: unknown): void {\n mkdirSync(dirname(cachePath), { recursive: true })\n writeFileSync(cachePath, `${JSON.stringify(json)}\\n`)\n}\n\nfunction pokeApiCachePath(url: URL, cacheDir: string): string {\n const segments = [\n sanitizeCachePathSegment(url.hostname),\n ...url.pathname.split('/').filter(Boolean).map(sanitizeCachePathSegment),\n ]\n const searchSuffix = url.search.length > 0 ? `-${stableSearchSuffix(url.searchParams)}` : ''\n const filename = `${segments.pop() ?? 'index'}${searchSuffix}.json`\n\n return join(cacheDir, ...segments, filename)\n}\n\nfunction stableSearchSuffix(searchParams: URLSearchParams): string {\n return Array.from(searchParams.entries())\n .sort(([leftKey, leftValue], [rightKey, rightValue]) =>\n `${leftKey}=${leftValue}`.localeCompare(`${rightKey}=${rightValue}`),\n )\n .map(([key, value]) => `${sanitizeCachePathSegment(key)}-${sanitizeCachePathSegment(value)}`)\n .join('-')\n}\n\nfunction sanitizeCachePathSegment(value: string): string {\n const sanitized = value.replace(/[^a-zA-Z0-9._-]+/g, '-').replace(/^-+|-+$/g, '')\n return sanitized.length > 0 ? sanitized : '_'\n}\n\nfunction backoffMs(attempt: number): number {\n return Math.min(15_000, 750 * 2 ** Math.max(0, attempt - 1))\n}\n\nasync function sleep(ms: number): Promise<void> {\n if (ms <= 0) {\n return\n }\n\n await new Promise((resolveSleep) => setTimeout(resolveSleep, ms))\n}\n\nfunction isPokeApiResourceListResponse(value: unknown): value is PokeApiResourceListResponse {\n if (typeof value !== 'object' || value === null) {\n return false\n }\n\n const response = value as Record<string, unknown>\n\n return (\n typeof response.count === 'number' &&\n Array.isArray(response.results) &&\n response.results.every(isPokeApiResourceSummary)\n )\n}\n\nfunction isPokeApiResourceSummary(value: unknown): value is PokeApiResourceSummary {\n if (typeof value !== 'object' || value === null) {\n return false\n }\n\n const resource = value as Record<string, unknown>\n\n return typeof resource.name === 'string' && typeof resource.url === 'string'\n}\n\nfunction parsePokeApiResourceId(resourceUrl: string, kind: PokeApiResourceKind): number {\n const url = new URL(resourceUrl)\n const segments = url.pathname.split('/').filter(Boolean)\n const kindIndex = segments.lastIndexOf(kind)\n const id = kindIndex === -1 ? undefined : segments[kindIndex + 1]\n\n if (id === undefined || !/^\\d+$/.test(id)) {\n throw new Error(`Could not parse PokeAPI ${kind} id from URL: ${resourceUrl}`)\n }\n\n return Number(id)\n}\n\nexport function pokeApiResourceNameKeys(value: string): string[] {\n return Array.from(\n new Set([\n value.toLowerCase(),\n value\n .toLowerCase()\n .normalize('NFKD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .replace(/[^a-z0-9]+/g, ''),\n ]),\n ).filter((key) => key.length > 0)\n}\n","import { readFileSync, writeFileSync } from 'node:fs'\nimport { join } from 'node:path'\nimport { champoutPokeApiResourceNameAliases } from '../projectpokemon-champout/fixtures/pokeapi'\nimport {\n DEFAULT_POKEAPI_BASE_URL,\n fetchPokeApiResourceIndexes,\n pokeApiResourceNameKeys,\n type PokeApiResourceIndex,\n type PokeApiResourceIndexEntry,\n type PokeApiResourceKind,\n} from './client'\n\nexport const DEFAULT_CHAMPIONS_DATA_ROOT = join(process.cwd(), 'data-next/champions')\n\nexport type EnrichChampionsDataOptions = {\n championsDataRoot?: string\n pokeApiBaseUrl?: string\n}\n\nexport type EnrichedChampionsDomainResult = {\n filePath: string\n matched: number\n missing: MissingPokeApiResource[]\n}\n\nexport type EnrichChampionsDataResult = Record<\n 'abilities' | 'items' | 'moves',\n EnrichedChampionsDomainResult\n>\n\nexport type MissingPokeApiResource = {\n id: string\n championsId: string\n slug: string\n name: string\n triedIdCandidates: string[]\n championsIdMatchedResource?: PokeApiResourceIndexEntry\n}\n\ntype ChampionsDomain = {\n key: keyof EnrichChampionsDataResult\n kind: PokeApiResourceKind\n fileName: string\n}\n\ntype JsonRecord = Record<string, unknown>\n\ntype PreparedChampionsDomain = EnrichedChampionsDomainResult & {\n records: JsonRecord[]\n}\n\nconst championsDomains = [\n { key: 'abilities', kind: 'ability', fileName: 'abilities.json' },\n { key: 'items', kind: 'item', fileName: 'items.json' },\n { key: 'moves', kind: 'move', fileName: 'moves.json' },\n] as const satisfies readonly ChampionsDomain[]\n\nexport async function enrichChampionsDataWithPokeApiIds(\n options: EnrichChampionsDataOptions = {},\n): Promise<EnrichChampionsDataResult> {\n const championsDataRoot = options.championsDataRoot ?? DEFAULT_CHAMPIONS_DATA_ROOT\n const pokeApiBaseUrl = options.pokeApiBaseUrl ?? DEFAULT_POKEAPI_BASE_URL\n const resourceIndexes = await fetchPokeApiResourceIndexes(pokeApiBaseUrl)\n const preparedDomains = championsDomains.map((domain) =>\n prepareChampionsDomainWithPokeApiIds(\n domain.kind,\n join(championsDataRoot, domain.fileName),\n resourceIndexes[domain.kind],\n ),\n )\n const result = Object.fromEntries(\n championsDomains.map((domain, index) => {\n const preparedDomain = preparedDomains[index]\n\n return [\n domain.key,\n {\n filePath: preparedDomain.filePath,\n matched: preparedDomain.matched,\n missing: preparedDomain.missing,\n },\n ]\n }),\n ) as EnrichChampionsDataResult\n\n const missingCount = Object.values(result).reduce(\n (count, domainResult) => count + domainResult.missing.length,\n 0,\n )\n\n if (missingCount > 0) {\n console.warn(formatMissingPokeApiResourcesError(result))\n }\n\n for (const preparedDomain of preparedDomains) {\n writeJsonFile(preparedDomain.filePath, preparedDomain.records)\n }\n\n return result\n}\n\nexport function formatEnrichChampionsDataSummary(result: EnrichChampionsDataResult): string {\n return [\n formatDomainSummary('abilities', result.abilities),\n formatDomainSummary('items', result.items),\n formatDomainSummary('moves', result.moves),\n ].join(', ')\n}\n\nfunction prepareChampionsDomainWithPokeApiIds(\n kind: PokeApiResourceKind,\n filePath: string,\n resourceIndex: PokeApiResourceIndex,\n): PreparedChampionsDomain {\n const records = readJsonRecordArray(filePath)\n const missing: MissingPokeApiResource[] = []\n let matched = 0\n\n const enrichedRecords = records.map((record, index) => {\n const id = requiredString(record, 'id', filePath, index)\n const championsId = requiredString(record, 'championsId', filePath, index)\n const slug = requiredString(record, 'slug', filePath, index)\n const name = requiredString(record, 'name', filePath, index)\n const triedIdCandidates = pokeApiIdCandidates(kind, id)\n const championsIdMatchedResource = resourceIndex.byId.get(championsId)\n const pokeApiId = findPokeApiId(resourceIndex, championsId, triedIdCandidates)\n\n if (pokeApiId === undefined) {\n missing.push({\n id,\n championsId,\n slug,\n name,\n triedIdCandidates,\n championsIdMatchedResource,\n })\n } else {\n matched += 1\n }\n\n return withPokeApiId(record, pokeApiId)\n })\n\n return { filePath, matched, missing, records: enrichedRecords }\n}\n\nfunction findPokeApiId(\n resourceIndex: PokeApiResourceIndex,\n championsId: string,\n idCandidates: string[],\n): number | undefined {\n for (const candidate of idCandidates) {\n const resource = findPokeApiResourceByName(resourceIndex, candidate)\n\n if (resource !== undefined) {\n return resource.id\n }\n }\n\n const resourceByChampionsId = resourceIndex.byId.get(championsId)\n\n if (resourceByChampionsId === undefined) {\n return undefined\n }\n\n return resourceByChampionsId.id\n}\n\nfunction findPokeApiResourceByName(\n resourceIndex: PokeApiResourceIndex,\n candidate: string,\n): PokeApiResourceIndexEntry | undefined {\n for (const key of pokeApiResourceNameKeys(candidate)) {\n const resource = resourceIndex.byName.get(key)\n\n if (resource !== undefined) {\n return resource\n }\n }\n\n return undefined\n}\n\nfunction pokeApiIdCandidates(kind: PokeApiResourceKind, id: string): string[] {\n return uniqueStrings([id, ...(champoutPokeApiResourceNameAliases[kind]?.[id] ?? [])])\n}\n\nfunction withPokeApiId(record: JsonRecord, pokeApiId: number | undefined): JsonRecord {\n const { id, championsId, slug, ...rest } = record\n delete rest.pokeApiId\n\n if (pokeApiId === undefined) {\n return { id, championsId, slug, ...rest }\n }\n\n return { id, championsId, pokeApiId, slug, ...rest }\n}\n\nfunction readJsonRecordArray(filePath: string): JsonRecord[] {\n const json: unknown = JSON.parse(readFileSync(filePath, 'utf8'))\n\n if (!Array.isArray(json)) {\n throw new Error(`Expected ${filePath} to contain an array`)\n }\n\n return json.map((record, index) => {\n if (typeof record !== 'object' || record === null || Array.isArray(record)) {\n throw new Error(`Expected ${filePath}[${index}] to contain an object`)\n }\n\n return record as JsonRecord\n })\n}\n\nfunction writeJsonFile(filePath: string, data: unknown): void {\n writeFileSync(filePath, `${JSON.stringify(data, null, 2)}\\n`)\n}\n\nfunction requiredString(record: JsonRecord, key: string, filePath: string, index: number): string {\n const value = record[key]\n\n if (typeof value !== 'string' || value.length === 0) {\n throw new Error(`Expected ${filePath}[${index}].${key} to be a non-empty string`)\n }\n\n return value\n}\n\nfunction uniqueStrings(values: readonly unknown[]): string[] {\n return Array.from(new Set(values.filter((value): value is string => typeof value === 'string')))\n}\n\nfunction formatDomainSummary(\n domain: keyof EnrichChampionsDataResult,\n result: EnrichedChampionsDomainResult,\n): string {\n const missing = result.missing.length === 0 ? '' : `, ${result.missing.length} unmatched`\n\n return `${result.matched} ${domain} with PokeAPI IDs${missing}`\n}\n\nfunction formatMissingPokeApiResourcesError(result: EnrichChampionsDataResult): string {\n const lines = ['Missing PokeAPI resources; no Champions JSON files were written.']\n\n for (const [domain, domainResult] of Object.entries(result)) {\n if (domainResult.missing.length === 0) {\n continue\n }\n\n lines.push(`${domain}: ${domainResult.missing.length} missing`)\n\n for (const missing of domainResult.missing) {\n const championsIdMatch =\n missing.championsIdMatchedResource === undefined\n ? 'no PokeAPI resource with that numeric id'\n : `numeric id belongs to ${missing.championsIdMatchedResource.name}`\n\n lines.push(\n `- ${missing.id} (${missing.name}; championsId ${missing.championsId}; tried id candidates ${missing.triedIdCandidates.join(', ')}; ${championsIdMatch})`,\n )\n }\n }\n\n return lines.join('\\n')\n}\n","import {\n enrichChampionsDataWithPokeApiIds,\n formatEnrichChampionsDataSummary,\n} from './enrich-champions'\n\nconst result = await enrichChampionsDataWithPokeApiIds()\n\nconsole.log(formatEnrichChampionsDataSummary(result))\n"],"mappings":";;;AAAA,MAAa,qCAET,EACF,MAAM,EACJ,UAAU,CAAC,YAAY,WAAW,EACpC,EACF;;;ACHA,MAAa,2BAA2B;AACxC,MAAa,4BAA4B,KAAK,QAAQ,IAAI,GAAG,gBAAgB;AAE7E,MAAa,uBAAuB;CAAC;CAAW;CAAQ;AAAM;AAgC9D,eAAsB,4BACpB,mBAAiD,0BAChB;CACjC,MAAM,UAAU,6BAA6B,gBAAgB;CAC7D,MAAM,CAAC,SAAS,MAAM,QAAQ,MAAM,QAAQ,IAC1C,qBAAqB,KAAK,SAAS,0BAA0B,MAAM,OAAO,CAAC,CAC7E;CAEA,OAAO;EAAE;EAAS;EAAM;CAAK;AAC/B;AAEA,eAAe,0BACb,MACA,SAC+B;CAC/B,MAAM,OAAO,MAAM,yBAAyB,MAAM,OAAO;CACzD,MAAM,QAA8B;EAClC,sBAAM,IAAI,IAAI;EACd,wBAAQ,IAAI,IAAI;CAClB;CAEA,KAAK,MAAM,YAAY,KAAK,SAAS;EACnC,MAAM,KAAK,uBAAuB,SAAS,KAAK,IAAI;EACpD,MAAM,QAAQ;GAAE;GAAI,MAAM,SAAS;EAAK;EACxC,MAAM,QAAQ,OAAO,EAAE;EAEvB,IAAI,MAAM,KAAK,IAAI,KAAK,GACtB,MAAM,IAAI,MAAM,qBAAqB,KAAK,gBAAgB,OAAO;EAGnE,MAAM,KAAK,IAAI,OAAO,KAAK;EAE3B,KAAK,MAAM,WAAW,wBAAwB,SAAS,IAAI,GAAG;GAC5D,MAAM,gBAAgB,MAAM,OAAO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