Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Teal Mask DLC data #890

Merged
merged 42 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
93ff319
refactor: cleanup file locations, add a lot of documentation
favna Nov 20, 2023
e065f33
fix: proper export mapping
favna Nov 20, 2023
fd1449d
build: update data-injector script
favna Nov 20, 2023
9cf2713
build: pin volta to node 20
favna Nov 20, 2023
db86e10
build: add script to update items data
favna Nov 20, 2023
d34ae82
feat: update items data to include all known items
favna Nov 20, 2023
001efd2
feat: update moves data to include all known moves
favna Nov 20, 2023
97aaa9d
build: update enum key collector to be more generic
favna Nov 20, 2023
9473ee1
chore: move updater files to subdirectory
favna Nov 20, 2023
9ed7637
feat: update abilities data to include all known abilities
favna Nov 20, 2023
5f91bcf
feat: add `isNonStandard` to abilities for the CAP and Past abilities
favna Nov 20, 2023
a39154e
build: add file for copy-pasting
favna Nov 20, 2023
0b914a2
feat: add Teal Mask DLC Pokémon
favna Nov 20, 2023
726b71a
chore: sort imports and exports alphabetically
favna Nov 20, 2023
be8f7bd
feat: add Ogerpon Pokémon
favna Nov 24, 2023
f827293
build: update flavor text updater script
favna Nov 24, 2023
2b37ac2
docs: update readme header
favna Nov 24, 2023
9fcd727
feat: add flavor texts for Teal Mask DLC Pokemon
favna Nov 24, 2023
766cd4b
feat: update flavor text for Teal Mask DLC
favna Nov 25, 2023
b0c633e
build: start scripting out flavor text data updater for other gens
favna Nov 25, 2023
f0ff1a2
build: add flavor text game sets for remaining gens
favna Nov 26, 2023
e0fed2c
fix: update `Legends Arceus` to `Legends: Arceus` in `version_id`
favna Nov 26, 2023
a2bd580
build: update all scripts to be TS
favna Nov 26, 2023
3e1e6a2
fix: make type for flavors module
favna Nov 26, 2023
aade761
build: fix and fully make functional flavors updater
favna Nov 26, 2023
fc159bf
fix: replace all remaining `[[templates]]`
favna Nov 27, 2023
d0bd9d7
build: fully parallelise flavor text updating
favna Nov 27, 2023
d9c6eda
feat: update flavor texts, add stadium and stadium 2
favna Nov 27, 2023
11e462a
fix: finish all parsing of flavor texts
favna Nov 27, 2023
c14695b
fix: fixed some of the abilities, items and moves data
favna Nov 27, 2023
78c1e56
chore: import sorting
favna Nov 27, 2023
d22ddfa
fix: correct the maximums for `take` and `offset` for `getAllPokemon`
favna Nov 27, 2023
4d7a824
test: update test data
favna Nov 27, 2023
8175c75
build: rework get-all-data to python because NodeJS fetch kinda sucks
favna Nov 27, 2023
57bb35c
fix: set correct species for hemogoblin
favna Nov 27, 2023
1e967a5
build: update generated typing files
favna Nov 27, 2023
7cab7dd
chore: update dev dependencies
favna Nov 27, 2023
4fada43
docs: update urls to mention v8
favna Nov 27, 2023
ed8f9da
chore: fix yarn lock
favna Nov 27, 2023
20ddb0f
test: update test data
favna Nov 27, 2023
5d345f5
test: update test data
favna Nov 27, 2023
12b149b
fix: update dockerfile
favna Nov 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,5 @@ codegen/
docs/magidoc/

## Scripts
scripts/tiers.ts
scripts/learnsets.ts
scripts/data-gen-scripts/failed-pokemon.json
scripts/data-gen-scripts/skipped-pokemon.json
scripts/data-gen-scripts/flavor-text-updater/failed-pokemon.json
scripts/manual-tests/*.json
29 changes: 21 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,30 @@ RUN apk add --no-cache dumb-init

COPY --chown=node:node package.json .
COPY --chown=node:node yarn.lock .
COPY --chown=node:node tsconfig.base.json tsconfig.base.json
COPY --chown=node:node tsup.config.ts tsup.config.ts
COPY --chown=node:node src/ src/
COPY --chown=node:node graphql/ graphql/
COPY --chown=node:node scripts/on-build-success.mjs scripts/on-build-success.mjs
COPY --chown=node:node .yarnrc.yml .
COPY --chown=node:node .yarn/ .yarn/
COPY --chown=node:node graphql/ graphql/

RUN yarn install --immutable

ENTRYPOINT ["dumb-init", "--"]

# ================ #
# Builder Stage #
# ================ #

FROM base as builder

COPY --from=base --chown=node:node /usr/src/app/node_modules/ /usr/src/app/node_modules/

COPY --chown=node:node tsconfig.base.json tsconfig.base.json
COPY --chown=node:node tsup.config.ts tsup.config.ts
COPY --chown=node:node src/ src/
COPY --chown=node:node scripts/on-build-success.ts scripts/on-build-success.ts
COPY --chown=node:node scripts/data-gen-scripts/tsconfig.json scripts/data-gen-scripts/tsconfig.json

RUN yarn build

# ================ #
# Runner Stage #
# ================ #
Expand All @@ -32,9 +46,8 @@ FROM base as runner
ENV NODE_ENV="production"
ENV NODE_OPTIONS="--enable-source-maps"

RUN yarn install --immutable

RUN yarn build
COPY --from=base --chown=node:node /usr/src/app/node_modules/ /usr/src/app/node_modules/
COPY --from=builder --chown=node:node /usr/src/app/api/ /usr/src/app/api/

USER node

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- [GraphQL-Pokemon](#graphql-pokemon)
- [About](#about)
- [Key Features](#key-features)
- [Installation](#installation)
- [Type Information Installation](#type-information-installation)
- [API Documentation](#api-documentation)
- [Autogenerated text based documentation](#autogenerated-text-based-documentation)
- [Interactive playground with documentation embedded](#interactive-playground-with-documentation-embedded)
Expand Down Expand Up @@ -62,7 +62,7 @@ and [Bulbapedia].
- Learnsets
- Type matchups

## Installation
## Type Information Installation

**_Note: This is only needed if you are writing TypeScript, or if you're using a
GraphQL schema validator. If you're using neither of these, you do not need to
Expand Down Expand Up @@ -112,7 +112,7 @@ interface GraphQLPokemonResponse<K extends keyof Omit<Query, '__typename'>> {
data: Record<K, Omit<Query[K], '__typename'>>;
}

fetch('https://graphqlpokemon.favware.tech/v7', {
fetch('https://graphqlpokemon.favware.tech/v8', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
Expand Down Expand Up @@ -161,7 +161,7 @@ const getFuzzyPokemon = gql`
`;

const apolloClient = new ApolloClient({
uri: 'https://graphqlpokemon.favware.tech/v7',
uri: 'https://graphqlpokemon.favware.tech/v8',
fetch
});

Expand Down Expand Up @@ -189,7 +189,7 @@ import { HttpLink } from 'apollo-link-http';
// Instantiate required constructor fields
const cache = new InMemoryCache();
const link = new HttpLink({
uri: 'https://graphqlpokemon.favware.tech/v7'
uri: 'https://graphqlpokemon.favware.tech/v8'
});

export const client = new ApolloClient({
Expand Down Expand Up @@ -285,7 +285,7 @@ Thank you to all the people who already contributed to GraphQL-Pokemon!
</a>

[contributing]: ./.github/CONTRIBUTING.md
[dashboard]: https://graphqlpokemon.favware.tech/v7
[dashboard]: https://graphqlpokemon.favware.tech/v8
[yarn]: https://yarnpkg.com/package/@favware/graphql-pokemon
[npm]: https://www.npmjs.com/package/@favware/graphql-pokemon
[ghcr_npm]: https://github.com/favware/graphql-pokemon/packages/199047
Expand Down
2 changes: 1 addition & 1 deletion docs/magidoc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const config = {
{
group: 'Demo',
label: 'Playground',
href: 'https://graphqlpokemon.favware.tech/v7'
href: 'https://graphqlpokemon.favware.tech/v8'
},
{
group: 'Donate',
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/01.Introduction/01.Welcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ popular video game series, provided by external sources such as
[Bulbapedia](https://bulbapedia.bulbagarden.net).

The easiest way to get to know this API is to try it out in the
[playground](https://graphqlpokemon.favware.tech/v7).
[playground](https://graphqlpokemon.favware.tech/v8).

For implementing the API in your own code, choose your preferred language and
method of making Web requests. Beyond that point you will need to learn the
GraphQL syntax, and the documentation on this website as well as the queries
provided by the [playground](https://graphqlpokemon.favware.tech/v7) will help
provided by the [playground](https://graphqlpokemon.favware.tech/v8) will help
you get started.
6 changes: 3 additions & 3 deletions docs/pages/01.Introduction/02.JavaScript Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface GraphQLPokemonResponse<K extends keyof Omit<Query, '__typename'>> {
data: Record<K, Omit<Query[K], '__typename'>>;
}

fetch('https://graphqlpokemon.favware.tech/v7', {
fetch('https://graphqlpokemon.favware.tech/v8', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
Expand Down Expand Up @@ -64,7 +64,7 @@ const getFuzzyPokemon = gql`
`;

const apolloClient = new ApolloClient({
uri: 'https://graphqlpokemon.favware.tech/v7',
uri: 'https://graphqlpokemon.favware.tech/v8',
fetch
});

Expand Down Expand Up @@ -93,7 +93,7 @@ import { HttpLink } from 'apollo-link-http';
// Instantiate required constructor fields
const cache = new InMemoryCache();
const link = new HttpLink({
uri: 'https://graphqlpokemon.favware.tech/v7'
uri: 'https://graphqlpokemon.favware.tech/v8'
});

export const client = new ApolloClient({
Expand Down
146 changes: 145 additions & 1 deletion graphql/enums.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,14 @@ enum AbilitiesEnum {
wonderskin
zenmode
zerotohero
embodyaspectcornerstone
embodyaspecthearthflame
embodyaspectteal
embodyaspectwellspring
hospitality
mindseye
supersweetsyrup
toxicchain
}

"The supported Pokémon"
Expand Down Expand Up @@ -393,6 +401,9 @@ enum PokemonEnum {
venomiconepilogue
saharascal
saharaja
ababo
scattervein
hemogoblin
missingno
m00
bulbasaur
Expand Down Expand Up @@ -1579,6 +1590,7 @@ enum PokemonEnum {
wyrdeer
kleavor
ursaluna
ursalunabloodmoon
basculegion
basculegionf
sneasler
Expand Down Expand Up @@ -1698,6 +1710,22 @@ enum PokemonEnum {
miraidon
walkingwake
ironleaves
dipplin
poltchageist
poltchageistartisan
sinistcha
sinistchamasterpiece
okidogi
munkidori
fezandipiti
ogerpon
ogerponcornerstone
ogerponcornerstonetera
ogerponhearthflame
ogerponhearthflametera
ogerponwellspring
ogerponwellspringtera
ogerpontealtera
}

"The supported items"
Expand Down Expand Up @@ -2353,6 +2381,118 @@ enum ItemsEnum {
zpowering
zring
zygardecube
adamantcrystal
bignugget
cornerstonemask
fairyfeather
griseouscore
hearthflamemask
lustrousglobe
masterpieceteacup
strangeball
syrupyapple
tr00
tr01
tr02
tr03
tr04
tr05
tr06
tr07
tr08
tr09
tr10
tr11
tr12
tr13
tr14
tr15
tr16
tr17
tr18
tr19
tr20
tr21
tr22
tr23
tr24
tr25
tr26
tr27
tr28
tr29
tr30
tr31
tr32
tr33
tr34
tr35
tr36
tr37
tr38
tr39
tr40
tr41
tr42
tr43
tr44
tr45
tr46
tr47
tr48
tr49
tr50
tr51
tr52
tr53
tr54
tr55
tr56
tr57
tr58
tr59
tr60
tr61
tr62
tr63
tr64
tr65
tr66
tr67
tr68
tr69
tr70
tr71
tr72
tr73
tr74
tr75
tr76
tr77
tr78
tr79
tr80
tr81
tr82
tr83
tr84
tr85
tr86
tr87
tr88
tr89
tr90
tr91
tr92
tr93
tr94
tr95
tr96
tr97
tr98
tr99
unremarkableteacup
wellspringmask
}

"The supported moves"
Expand Down Expand Up @@ -2979,13 +3119,13 @@ enum MovesEnum {
prismaticlaser
protect
psybeam
psyblade
psychic
psychicfangs
psychicterrain
psychoboost
psychocut
psychoshift
psyblade
psychup
psyshieldbash
psyshock
Expand Down Expand Up @@ -3290,6 +3430,10 @@ enum MovesEnum {
zenheadbutt
zingzap
zippyzap
bloodmoon
ivycudgel
matchagotcha
syrupbomb
}

"The types in Pokémon"
Expand Down
2 changes: 1 addition & 1 deletion graphql/resolvers.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ type Query {
offset: Int = 0

"Return only this many results, starting from the offset"
take: Int = 1392
take: Int = 1412

"Reverses the dataset before paginating"
reverse: Boolean = false
Expand Down
3 changes: 3 additions & 0 deletions graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ type Ability {
"Whether this ability has effects outside of battle, and if so what the effect is"
isFieldAbility: String

"Whether an ability is non-standard, and if it is why"
isNonstandard: String

"The name for an ability"
name: String!

Expand Down
Loading
Loading