@pokepc/dataset 6.7.0-beta.1 → 6.7.1
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/README.md +15 -3
- package/build/{build-DvGzwIK8.mjs → build-D2oPkkzJ.mjs} +52 -52
- package/build/{build-DvGzwIK8.mjs.map → build-D2oPkkzJ.mjs.map} +1 -1
- package/build/{enums-DlMg7WLl.mjs → enums-u8n-nN0B.mjs} +5 -2
- package/build/enums-u8n-nN0B.mjs.map +1 -0
- package/build/lib/fs.d.mts +6 -6
- package/build/lib/fs.d.mts.map +1 -1
- package/build/lib/fs.mjs +21 -29
- package/build/lib/fs.mjs.map +1 -1
- package/build/lib/schemas.d.mts +1 -1
- package/build/lib/search.d.mts +2 -0
- package/build/lib/search.d.mts.map +1 -1
- package/build/lib/search.mjs +3 -3
- package/build/lib/search.mjs.map +1 -1
- package/build/lib/types.d.mts +1 -1
- package/build/lib/utils.d.mts +2 -0
- package/build/lib/utils.d.mts.map +1 -1
- package/build/lib/utils.mjs +3 -2
- package/build/lib-next/_build.mjs +1 -1
- package/build/lib-next/enums.d.mts.map +1 -1
- package/build/lib-next/enums.mjs +1 -1
- package/build/lib-next/schemas.d.mts +8 -8
- package/build/lib-next/schemas.mjs +1 -1
- package/build/{schemas-DZQWOWP4.d.mts → schemas-CIE3b72j.d.mts} +50 -50
- package/build/{schemas-DZQWOWP4.d.mts.map → schemas-CIE3b72j.d.mts.map} +1 -1
- package/build/{schemas-Bj1AIX0P.mjs → schemas-CWE4YPI2.mjs} +2 -2
- package/build/{schemas-Bj1AIX0P.mjs.map → schemas-CWE4YPI2.mjs.map} +1 -1
- package/build/{utils-BwovRocd.mjs → utils-BTjKkD-_.mjs} +2 -2
- package/build/utils-BTjKkD-_.mjs.map +1 -0
- package/build/utils-internal-C-UStMrZ.d.mts +7 -0
- package/build/utils-internal-C-UStMrZ.d.mts.map +1 -0
- package/build/{utils-internal-Czgdbnkv.mjs → utils-internal-DPjO9kQX.mjs} +7 -2
- package/build/{utils-internal-Czgdbnkv.mjs.map → utils-internal-DPjO9kQX.mjs.map} +1 -1
- package/data/pokedexes/champions-regular-roster-m-c.json +27 -1
- package/data/pokedexes/hoenn-oras.json +12 -0
- package/data/pokedexes/kanto-lgpe.json +11 -0
- package/data/pokedexes/national-oras.json +27 -0
- package/data/pokemon/abomasnow-mega.json +1 -1
- package/data/pokemon/aggron-mega.json +1 -1
- package/data/pokemon/ampharos-mega.json +1 -1
- package/data/pokemon/arboliva.json +1 -1
- package/data/pokemon/baxcalibur-mega.json +0 -1
- package/data/pokemon/blastoise-mega.json +12 -1
- package/data/pokemon/blaziken-mega.json +1 -1
- package/data/pokemon/charizard-mega-x.json +12 -2
- package/data/pokemon/charizard-mega-y.json +12 -2
- package/data/pokemon/cinderace.json +1 -1
- package/data/pokemon/farfetchd.json +2 -1
- package/data/pokemon/gengar-mega.json +1 -1
- package/data/pokemon/gogoat.json +2 -1
- package/data/pokemon/golisopod-mega.json +1 -1
- package/data/pokemon/grapploct.json +1 -1
- package/data/pokemon/heracross-mega.json +1 -1
- package/data/pokemon/houndoom-mega.json +1 -1
- package/data/pokemon/indeedee-f.json +1 -1
- package/data/pokemon/indeedee.json +1 -1
- package/data/pokemon/inteleon.json +1 -1
- package/data/pokemon/kangaskhan-mega.json +1 -1
- package/data/pokemon/lucario-mega.json +1 -1
- package/data/pokemon/mabosstiff.json +1 -1
- package/data/pokemon/manectric-mega.json +1 -1
- package/data/pokemon/mawile-mega.json +2 -1
- package/data/pokemon/mewtwo-mega-x.json +10 -1
- package/data/pokemon/mewtwo-mega-y.json +10 -1
- package/data/pokemon/mrmime.json +2 -1
- package/data/pokemon/pawmot.json +1 -1
- package/data/pokemon/perrserker.json +1 -1
- package/data/pokemon/persian-alola.json +2 -1
- package/data/pokemon/persian.json +2 -1
- package/data/pokemon/pincurchin.json +1 -1
- package/data/pokemon/pinsir-mega.json +1 -1
- package/data/pokemon/sableye-mega.json +1 -1
- package/data/pokemon/scizor-mega.json +1 -1
- package/data/pokemon/sirfetchd.json +1 -1
- package/data/pokemon/squawkabilly-blue.json +1 -1
- package/data/pokemon/squawkabilly-white.json +1 -1
- package/data/pokemon/squawkabilly-yellow.json +1 -1
- package/data/pokemon/squawkabilly.json +6 -2
- package/data/pokemon/swalot-f.json +7 -2
- package/data/pokemon/swalot.json +2 -1
- package/data/pokemon/thievul.json +1 -1
- package/data/pokemon/toxtricity-low-key.json +1 -1
- package/data/pokemon/toxtricity.json +1 -1
- package/data/pokemon/tyranitar-mega.json +1 -1
- package/data/pokemon/venusaur-mega.json +12 -1
- package/data/pokemon/wigglytuff.json +2 -1
- package/data-next/champions/abilities.json +117 -5
- package/data-next/champions/battle-states.json +24 -3
- package/data-next/champions/i18n/chs/abilities.json +104 -6
- package/data-next/champions/i18n/chs/battle-states.json +24 -3
- package/data-next/champions/i18n/chs/items.json +144 -0
- package/data-next/champions/i18n/chs/moves.json +25 -25
- package/data-next/champions/i18n/chs/pokemon.json +195 -0
- package/data-next/champions/i18n/cht/abilities.json +105 -7
- package/data-next/champions/i18n/cht/battle-states.json +24 -3
- package/data-next/champions/i18n/cht/items.json +144 -0
- package/data-next/champions/i18n/cht/moves.json +25 -25
- package/data-next/champions/i18n/cht/pokemon.json +195 -0
- package/data-next/champions/i18n/deu/abilities.json +105 -7
- package/data-next/champions/i18n/deu/battle-states.json +24 -3
- package/data-next/champions/i18n/deu/items.json +144 -0
- package/data-next/champions/i18n/deu/moves.json +28 -28
- package/data-next/champions/i18n/deu/pokemon.json +195 -0
- package/data-next/champions/i18n/eng/abilities.json +102 -4
- package/data-next/champions/i18n/eng/battle-states.json +24 -3
- package/data-next/champions/i18n/eng/items.json +144 -0
- package/data-next/champions/i18n/eng/moves.json +25 -25
- package/data-next/champions/i18n/eng/pokemon.json +195 -0
- package/data-next/champions/i18n/es-es/abilities.json +106 -8
- package/data-next/champions/i18n/es-es/battle-states.json +24 -3
- package/data-next/champions/i18n/es-es/items.json +145 -1
- package/data-next/champions/i18n/es-es/moves.json +25 -25
- package/data-next/champions/i18n/es-es/pokemon.json +195 -0
- package/data-next/champions/i18n/es-la/abilities.json +106 -8
- package/data-next/champions/i18n/es-la/battle-states.json +24 -3
- package/data-next/champions/i18n/es-la/items.json +145 -1
- package/data-next/champions/i18n/es-la/moves.json +26 -26
- package/data-next/champions/i18n/es-la/pokemon.json +195 -0
- package/data-next/champions/i18n/fra/abilities.json +105 -7
- package/data-next/champions/i18n/fra/battle-states.json +24 -3
- package/data-next/champions/i18n/fra/items.json +144 -0
- package/data-next/champions/i18n/fra/moves.json +25 -25
- package/data-next/champions/i18n/fra/pokemon.json +195 -0
- package/data-next/champions/i18n/ita/abilities.json +116 -18
- package/data-next/champions/i18n/ita/battle-states.json +24 -3
- package/data-next/champions/i18n/ita/items.json +145 -1
- package/data-next/champions/i18n/ita/moves.json +28 -28
- package/data-next/champions/i18n/ita/pokemon.json +195 -0
- package/data-next/champions/i18n/jpn/abilities.json +104 -6
- package/data-next/champions/i18n/jpn/battle-states.json +24 -3
- package/data-next/champions/i18n/jpn/items.json +144 -0
- package/data-next/champions/i18n/jpn/moves.json +25 -25
- package/data-next/champions/i18n/jpn/pokemon.json +195 -0
- package/data-next/champions/i18n/kor/abilities.json +104 -6
- package/data-next/champions/i18n/kor/battle-states.json +24 -3
- package/data-next/champions/i18n/kor/items.json +144 -0
- package/data-next/champions/i18n/kor/moves.json +25 -25
- package/data-next/champions/i18n/kor/pokemon.json +195 -0
- package/data-next/champions/i18n/pt-br/abilities.json +102 -4
- package/data-next/champions/i18n/pt-br/battle-states.json +24 -3
- package/data-next/champions/i18n/pt-br/items.json +144 -0
- package/data-next/champions/i18n/pt-br/moves.json +25 -25
- package/data-next/champions/i18n/pt-br/pokemon.json +195 -0
- package/data-next/champions/items.json +180 -0
- package/data-next/champions/moves.json +61 -61
- package/data-next/champions/pokemon-moves.json +1882 -173
- package/data-next/champions/pokemon.json +913 -21
- package/package.json +17 -9
- package/build/enums-DlMg7WLl.mjs.map +0 -1
- package/build/utils-BwovRocd.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ pnpm build
|
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
When changing data, run the tests before opening a PR. When changing the static API docs, run
|
|
81
|
-
`pnpm build:pages` and check the local Swagger UI with `pnpm dev`.
|
|
81
|
+
`pnpm build:pages` and check the local Swagger UI with `pnpm dev:openapi`.
|
|
82
82
|
|
|
83
83
|
Build a GitHub Pages-ready artifact:
|
|
84
84
|
|
|
@@ -98,11 +98,23 @@ dist-pages/
|
|
|
98
98
|
Preview the Swagger UI locally:
|
|
99
99
|
|
|
100
100
|
```bash
|
|
101
|
-
pnpm dev
|
|
101
|
+
pnpm dev:openapi
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
The dev server runs at `http://localhost:4173/` by default. Override the port with
|
|
105
|
-
`PORT=4174 pnpm dev` or `node src/openapi/dev.ts --port=4174`.
|
|
105
|
+
`PORT=4174 pnpm dev:openapi` or `node src/openapi/dev.ts --port=4174`.
|
|
106
|
+
|
|
107
|
+
## Dataset editor
|
|
108
|
+
|
|
109
|
+
Edit this checkout's `data/` with the local maintainer app:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pnpm dev:editor
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The editor runs on `http://127.0.0.1:3003` without external-directory configuration.
|
|
116
|
+
`pnpm dev:openapi` starts only the OpenAPI preview, and `pnpm dev` runs both in parallel. See the
|
|
117
|
+
[editor guide](docs/editor.md) for editing rules, builds and disposable browser tests.
|
|
106
118
|
|
|
107
119
|
## Credits
|
|
108
120
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { a as appLangsBySlug, l as gameLocales } from "./languages-CY-Q1SED.mjs";
|
|
2
|
-
import { n as battleStates } from "./enums-
|
|
3
|
-
import { b as pokemonSchema, c as i18nSchema, d as itemSchema, g as pokemonI18nSchema, i as battleStateSchema, n as abilitySchema, p as moveSchema, u as itemI18nSchema, v as pokemonMovesRecordSchema } from "./schemas-
|
|
2
|
+
import { n as battleStates } from "./enums-u8n-nN0B.mjs";
|
|
3
|
+
import { b as pokemonSchema, c as i18nSchema, d as itemSchema, g as pokemonI18nSchema, i as battleStateSchema, n as abilitySchema, p as moveSchema, u as itemI18nSchema, v as pokemonMovesRecordSchema } from "./schemas-CWE4YPI2.mjs";
|
|
4
4
|
import { copyFileSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
//#region \0rolldown/runtime.js
|
|
7
7
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
8
8
|
//#endregion
|
|
9
|
-
//#region src/upstream-adapters/projectpokemon-champout/fixtures/
|
|
9
|
+
//#region src/upstream-adapters/projectpokemon-champout/fixtures/text.ts
|
|
10
10
|
var import_node = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11
11
|
var B = Object.defineProperty;
|
|
12
12
|
var Vu = Object.getOwnPropertyDescriptor;
|
|
@@ -31907,53 +31907,6 @@ var import_node = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31907
31907
|
transliterate
|
|
31908
31908
|
});
|
|
31909
31909
|
})))();
|
|
31910
|
-
const LOCAL_SLUG_ALIASES = { "vise-grip": ["vice-grip"] };
|
|
31911
|
-
function expandLocalSlugAliases(slug) {
|
|
31912
|
-
return [slug, ...LOCAL_SLUG_ALIASES[slug] ?? []];
|
|
31913
|
-
}
|
|
31914
|
-
//#endregion
|
|
31915
|
-
//#region src/upstream-adapters/projectpokemon-champout/fixtures/preliminary.ts
|
|
31916
|
-
const PRELIMINARY_ABILITIES = [{
|
|
31917
|
-
id: "auraguard",
|
|
31918
|
-
slug: "aura-guard",
|
|
31919
|
-
name: "Aura Guard",
|
|
31920
|
-
descriptions: {
|
|
31921
|
-
usa: "Halves the damage the Pokémon takes from contact moves.",
|
|
31922
|
-
jpn: "接触技で受けるダメージが半減する。",
|
|
31923
|
-
kor: "접촉 기술로 입는 데미지가 반감된다.",
|
|
31924
|
-
sch: "因接触类招式而受到的伤害会减半。",
|
|
31925
|
-
tch: "因接觸類招式而受到的傷害會減半。",
|
|
31926
|
-
deu: "Der Schaden, den das Pokémon durch Kontaktattacken erleidet, wird halbiert.",
|
|
31927
|
-
fra: "Les dégâts des capacités à contact subis par le Pokémon sont réduits de moitié.",
|
|
31928
|
-
ita: "Dimezza i danni subiti dalle mosse da contatto.",
|
|
31929
|
-
esp: "Reduce a la mitad el daño recibido por los movimientos de contacto.",
|
|
31930
|
-
latam: "Reduce un 50% el daño recibido por los movimientos de contacto."
|
|
31931
|
-
}
|
|
31932
|
-
}];
|
|
31933
|
-
/** Append the preliminary abilities the dump does not carry yet. */
|
|
31934
|
-
function applyPreliminaryAbilities(abilities) {
|
|
31935
|
-
const known = new Set(abilities.map((ability) => ability.id));
|
|
31936
|
-
return [...abilities, ...PRELIMINARY_ABILITIES.filter((ability) => !known.has(ability.id)).map((ability) => abilitySchema.parse({
|
|
31937
|
-
id: ability.id,
|
|
31938
|
-
championsId: `preliminary-${ability.id}`,
|
|
31939
|
-
slug: ability.slug,
|
|
31940
|
-
name: ability.name,
|
|
31941
|
-
description: ability.descriptions.usa
|
|
31942
|
-
}))];
|
|
31943
|
-
}
|
|
31944
|
-
/** The same abilities for one language's i18n file. */
|
|
31945
|
-
function applyPreliminaryAbilityI18n(records, lang) {
|
|
31946
|
-
const known = new Set(records.map((record) => record.id));
|
|
31947
|
-
return [...records, ...PRELIMINARY_ABILITIES.filter((ability) => !known.has(ability.id)).map((ability) => i18nSchema.parse({
|
|
31948
|
-
id: ability.id,
|
|
31949
|
-
slug: ability.slug,
|
|
31950
|
-
slugLoc: ability.slug,
|
|
31951
|
-
name: ability.name,
|
|
31952
|
-
description: ability.descriptions[lang]
|
|
31953
|
-
}))];
|
|
31954
|
-
}
|
|
31955
|
-
//#endregion
|
|
31956
|
-
//#region src/upstream-adapters/projectpokemon-champout/fixtures/text.ts
|
|
31957
31910
|
const TEXT_REPLACEMENTS = [{
|
|
31958
31911
|
path: "rom-txt/usa/wazaname.json",
|
|
31959
31912
|
labelName: "WAZANAME_011",
|
|
@@ -32066,6 +32019,53 @@ function transformInputData(inputData) {
|
|
|
32066
32019
|
return inputData.data;
|
|
32067
32020
|
}
|
|
32068
32021
|
//#endregion
|
|
32022
|
+
//#region src/upstream-adapters/projectpokemon-champout/fixtures/aliases.ts
|
|
32023
|
+
const LOCAL_SLUG_ALIASES = { "vise-grip": ["vice-grip"] };
|
|
32024
|
+
function expandLocalSlugAliases(slug) {
|
|
32025
|
+
return [slug, ...LOCAL_SLUG_ALIASES[slug] ?? []];
|
|
32026
|
+
}
|
|
32027
|
+
//#endregion
|
|
32028
|
+
//#region src/upstream-adapters/projectpokemon-champout/fixtures/preliminary.ts
|
|
32029
|
+
const PRELIMINARY_ABILITIES = [{
|
|
32030
|
+
id: "auraguard",
|
|
32031
|
+
slug: "aura-guard",
|
|
32032
|
+
name: "Aura Guard",
|
|
32033
|
+
descriptions: {
|
|
32034
|
+
usa: "Halves the damage the Pokémon takes from contact moves.",
|
|
32035
|
+
jpn: "接触技で受けるダメージが半減する。",
|
|
32036
|
+
kor: "접촉 기술로 입는 데미지가 반감된다.",
|
|
32037
|
+
sch: "因接触类招式而受到的伤害会减半。",
|
|
32038
|
+
tch: "因接觸類招式而受到的傷害會減半。",
|
|
32039
|
+
deu: "Der Schaden, den das Pokémon durch Kontaktattacken erleidet, wird halbiert.",
|
|
32040
|
+
fra: "Les dégâts des capacités à contact subis par le Pokémon sont réduits de moitié.",
|
|
32041
|
+
ita: "Dimezza i danni subiti dalle mosse da contatto.",
|
|
32042
|
+
esp: "Reduce a la mitad el daño recibido por los movimientos de contacto.",
|
|
32043
|
+
latam: "Reduce un 50% el daño recibido por los movimientos de contacto."
|
|
32044
|
+
}
|
|
32045
|
+
}];
|
|
32046
|
+
/** Append the preliminary abilities the dump does not carry yet. */
|
|
32047
|
+
function applyPreliminaryAbilities(abilities) {
|
|
32048
|
+
const known = new Set(abilities.map((ability) => ability.id));
|
|
32049
|
+
return [...abilities, ...PRELIMINARY_ABILITIES.filter((ability) => !known.has(ability.id)).map((ability) => abilitySchema.parse({
|
|
32050
|
+
id: ability.id,
|
|
32051
|
+
championsId: `preliminary-${ability.id}`,
|
|
32052
|
+
slug: ability.slug,
|
|
32053
|
+
name: ability.name,
|
|
32054
|
+
description: ability.descriptions.usa
|
|
32055
|
+
}))];
|
|
32056
|
+
}
|
|
32057
|
+
/** The same abilities for one language's i18n file. */
|
|
32058
|
+
function applyPreliminaryAbilityI18n(records, lang) {
|
|
32059
|
+
const known = new Set(records.map((record) => record.id));
|
|
32060
|
+
return [...records, ...PRELIMINARY_ABILITIES.filter((ability) => !known.has(ability.id)).map((ability) => i18nSchema.parse({
|
|
32061
|
+
id: ability.id,
|
|
32062
|
+
slug: ability.slug,
|
|
32063
|
+
slugLoc: ability.slug,
|
|
32064
|
+
name: ability.name,
|
|
32065
|
+
description: ability.descriptions[lang]
|
|
32066
|
+
}))];
|
|
32067
|
+
}
|
|
32068
|
+
//#endregion
|
|
32069
32069
|
//#region src/upstream-adapters/projectpokemon-champout/mappings.ts
|
|
32070
32070
|
const I18N_CODE = [
|
|
32071
32071
|
"deu",
|
|
@@ -32612,7 +32612,7 @@ function resolveDefaultPokemonLocalIds(record, localCandidates) {
|
|
|
32612
32612
|
function resolveFormPokemonLocalIds(record, localCandidates, formNames) {
|
|
32613
32613
|
const formName = requireText(formNames, record.msFormLbl, "usa pokemon form names");
|
|
32614
32614
|
const normalizedFormName = normalizePokemonMapText(formName);
|
|
32615
|
-
const matches = localCandidates.filter((pokemon) => pokemon.isForm && !pokemon.isFemaleForm && !pokemon.isGmax && pokemonTypesMatch(record, pokemon) && pokemonStatsMatch(record, pokemon) && localPokemonNameMatchesFormName(pokemon, normalizedFormName));
|
|
32615
|
+
const matches = localCandidates.filter((pokemon) => pokemon.isForm && !(pokemon.isFemaleForm && pokemon.isCosmeticForm) && !pokemon.isGmax && pokemonTypesMatch(record, pokemon) && pokemonStatsMatch(record, pokemon) && localPokemonNameMatchesFormName(pokemon, normalizedFormName));
|
|
32616
32616
|
if (matches.length !== 1) throw new Error(`Expected one local Pokemon match for Champions ${record.id} "${formName}", found ${matches.length}`);
|
|
32617
32617
|
return matches.map((pokemon) => pokemon.id);
|
|
32618
32618
|
}
|
|
@@ -33080,4 +33080,4 @@ console.log([
|
|
|
33080
33080
|
//#endregion
|
|
33081
33081
|
export {};
|
|
33082
33082
|
|
|
33083
|
-
//# sourceMappingURL=build-
|
|
33083
|
+
//# sourceMappingURL=build-D2oPkkzJ.mjs.map
|