Compare commits

...

197 Commits

Author SHA1 Message Date
c392b27cac bump: 2.5.0
Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
2023-06-28 14:22:05 +02:00
dc5e41a638 feat: Full support for ESM modules
Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
2023-06-28 14:21:17 +02:00
09d8b28a66 docs: Include HTML base for browser people :D
Signed-off-by: Avior <github@avior.me>
2023-01-11 20:54:16 +01:00
4507bbd651 misc: Upgraded deps
Signed-off-by: Avior <github@avior.me>
2023-01-11 20:41:55 +01:00
8a89aefe73 2.4.9 2023-01-11 20:33:00 +01:00
8df969c1db fix: Issue regarding browser loading
Signed-off-by: Avior <github@avior.me>
2023-01-11 20:32:51 +01:00
2177e9c088 fix: Updated build versions 2022-12-11 01:38:54 +01:00
a32f42975a 2.4.8 2022-12-09 16:11:29 +01:00
0148979d7d misc: Updated deps
Signed-off-by: Avior <f.bouillon@aptatio.com>
2022-12-09 16:11:24 +01:00
ea357c9080 fix: Version number not being correctly exported
Signed-off-by: Avior <f.bouillon@aptatio.com>
2022-12-09 16:08:10 +01:00
5e998d3658 bump: version 2.4.7
Signed-off-by: Avior <github@avior.me>
2022-09-26 19:51:44 +02:00
ed883c06eb fix: Angular not liking JSON imports (#204) 2022-09-26 19:52:27 +02:00
1ecaa048eb Create FUNDING.yml 2022-08-25 10:15:40 +02:00
39cd15ead3 refactor: Upgrade actions (#129) 2022-05-05 14:12:24 +02:00
ca5ae0aa57 refactor: Upgrade dependencies (#128)
* refactor: removed babel

Signed-off-by: Avior <github@avior.me>

* refactor: Upgrade deps

Signed-off-by: Avior <github@avior.me>

* refactor: Removed ts-node

Signed-off-by: Avior <github@avior.me>

* revert: refactor: removed babel

Signed-off-by: Avior <github@avior.me>

* build: Support for other nodejs versions

Signed-off-by: Avior <github@avior.me>
2022-05-05 11:45:42 +02:00
cffae6cc28 build: bump @typescript-eslint/eslint-plugin from 5.12.0 to 5.12.1 (#86)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-23 15:29:09 +01:00
5e03f38476 build: bump @typescript-eslint/eslint-plugin from 5.11.0 to 5.12.0 (#80)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-16 10:21:03 +01:00
05134f5b12 build: bump @babel/core from 7.17.2 to 7.17.4 (#81)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-16 10:06:53 +01:00
8a0dec867e build: bump @typescript-eslint/parser from 5.10.2 to 5.11.0 (#72)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 09:55:13 +01:00
75636a9195 build: bump @typescript-eslint/eslint-plugin from 5.10.2 to 5.11.0 (#73)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 09:53:13 +01:00
bd33dafe8a build: bump eslint from 8.8.0 to 8.9.0 (#77)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 09:51:11 +01:00
39fb14070d build: bump @babel/core from 7.17.0 to 7.17.2 (#76)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 09:48:48 +01:00
6ae3b09dc9 build: bump ts-node from 10.4.0 to 10.5.0 (#70)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 09:46:45 +01:00
8d13d1dba4 build: bump jest from 27.5.0 to 27.5.1 (#75)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 09:44:36 +01:00
840c8c3106 build: bump esbuild from 0.14.19 to 0.14.21 (#74)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-11 15:13:39 +01:00
ee4f1be353 build: bump @babel/preset-env from 7.16.8 to 7.16.11 (#52)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-07 12:05:57 +01:00
7e4c0eae42 build: bump jest from 27.4.7 to 27.5.0 (#68)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-07 10:41:40 +01:00
3d08ab4bfa build: bump esbuild from 0.14.18 to 0.14.19 (#69)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-07 10:16:32 +01:00
3441cc2c60 build: bump @babel/core from 7.16.12 to 7.17.0 (#66)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-03 10:38:38 +01:00
9b2e09d766 build: bump esbuild from 0.14.17 to 0.14.18 (#67)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-03 10:27:09 +01:00
3ebde59a84 build: bump @typescript-eslint/parser from 5.10.0 to 5.10.2 (#64)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-02 10:33:11 +01:00
e18cbabf70 build: bump @typescript-eslint/eslint-plugin from 5.10.0 to 5.10.2 (#63)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-02 10:30:35 +01:00
1c6c7dacc4 build: bump esbuild from 0.14.14 to 0.14.17 (#65)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-02 10:06:54 +01:00
445b3a5ea6 build: bump eslint from 8.7.0 to 8.8.0 (#61)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-31 11:47:54 +01:00
7148fc7522 build: bump typescript from 4.5.4 to 4.5.5 (#54)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-28 17:04:04 +01:00
cde8b24230 build: bump @babel/core from 7.16.7 to 7.16.12 (#55)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-28 16:31:19 +01:00
1d21ff650e build: bump esbuild from 0.14.12 to 0.14.14 (#58)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-28 16:22:44 +01:00
749fba9878 Bump version (2.4.6) 2022-01-28 16:16:38 +01:00
4895c5b857 Updated CHANGELOG for latest releases 2022-01-28 16:15:23 +01:00
eda53611b2 build: bump node-fetch from 2.6.6 to 2.6.7 (#59)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-28 16:08:08 +01:00
76ab92a7db build: bump esbuild from 0.14.11 to 0.14.12 (#53)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-24 00:05:16 +01:00
585d893557 build: bump @typescript-eslint/parser from 5.9.1 to 5.10.0 (#48)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-18 11:04:24 +01:00
157c27222e build: bump @typescript-eslint/eslint-plugin from 5.9.1 to 5.10.0 (#49)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-18 11:02:03 +01:00
026d4018f8 build: bump eslint from 8.6.0 to 8.7.0 (#47)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-17 09:59:56 +01:00
ccfae56ced build: bump @typescript-eslint/parser from 5.9.0 to 5.9.1 (#46)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-11 14:44:31 +01:00
87be749603 build: bump @babel/preset-env from 7.16.7 to 7.16.8 (#45)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-11 12:09:25 +01:00
f56e977900 build: bump @typescript-eslint/eslint-plugin from 5.9.0 to 5.9.1 (#44)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-11 11:58:17 +01:00
e5550e474e build: bump esbuild from 0.14.10 to 0.14.11 (#43)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-10 10:02:29 +01:00
a7c24353a2 build: bump jest from 27.4.6 to 27.4.7 (#42)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-06 14:19:46 +01:00
2e5fdd45e4 build: bump jest from 27.4.5 to 27.4.6 (#41)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-05 10:39:31 +01:00
2ab0df81c1 build: bump @typescript-eslint/eslint-plugin from 5.8.1 to 5.9.0 (#40)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-04 10:03:12 +01:00
5fbfa4d84a build: bump @typescript-eslint/parser from 5.8.1 to 5.9.0 (#39)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-04 09:58:42 +01:00
693160865c build: bump @babel/core from 7.16.5 to 7.16.7 (#38)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-04 09:50:57 +01:00
0e735f3a77 build: bump @babel/preset-env from 7.16.5 to 7.16.7 (#35)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-04 09:44:37 +01:00
b97dfb4420 build: bump @babel/preset-typescript from 7.16.5 to 7.16.7 (#34)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-03 14:29:04 +01:00
c18f933e40 build: bump @typescript-eslint/parser from 5.8.0 to 5.8.1 (#31)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-03 12:34:54 +01:00
fb60710e5e build: bump @typescript-eslint/eslint-plugin from 5.8.0 to 5.8.1 (#30)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-03 11:25:33 +01:00
edf994c241 build: bump eslint from 8.5.0 to 8.6.0 (#37)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-03 11:10:16 +01:00
eb905a866a build: bump actions/setup-node from 2.5.0 to 2.5.1 (#33)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-03 10:48:31 +01:00
5f41185d4f build: bump esbuild from 0.14.8 to 0.14.10 (#36)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-03 09:40:50 +01:00
183efdb51e build: bump esbuild from 0.14.7 to 0.14.8 (#29)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-23 14:21:47 +01:00
dbad45d71d build: bump esbuild from 0.14.6 to 0.14.7 (#28)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-22 13:16:34 +01:00
f733634499 build: bump @typescript-eslint/parser from 5.7.0 to 5.8.0 (#26)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.7.0 to 5.8.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.8.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-21 12:04:33 +01:00
9e636c407e build: bump @typescript-eslint/eslint-plugin from 5.7.0 to 5.8.0 (#27)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-21 09:55:21 +01:00
87531f14ff build: bump esbuild from 0.14.5 to 0.14.6 (#25)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-20 15:27:35 +01:00
52342f9dcf build: bump eslint from 8.4.1 to 8.5.0 (#24)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-20 15:12:55 +01:00
2eb68457f0 build: bump codecov/codecov-action from 1.0.13 to 2.1.0 (#17)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1.0.13 to 2.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.13...v2.1.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-15 20:24:03 +00:00
14b4aa7138 build: bump actions/setup-node from 1 to 2.5.0 (#18)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 1 to 2.5.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v1...v2.5.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-15 18:35:16 +00:00
496c04fc4c Bump deps
Signed-off-by: Avior <github@avior.me>
2021-12-15 16:08:37 +01:00
3d8ef329f7 docs: Update multiple documents (#16) 2021-12-15 12:20:36 +01:00
21088c4a02 Bump version 2021-10-11 17:05:41 +02:00
4fdde0a962 Added new Endpoints (#15) 2021-10-11 16:55:42 +02:00
02a8174509 2.4.4 2021-08-12 21:59:29 +02:00
ac570459a3 Added new logo field to serie
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-08-12 21:59:11 +02:00
093df107d2 Fixed Link 2021-07-19 15:07:41 +02:00
d166e0f5cf Fixed Changelogs
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-07-19 14:47:47 +02:00
ef102dc433 2.4.3 2021-07-19 14:46:12 +02:00
324be2a410 Updated docs
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-07-19 14:45:41 +02:00
ad4ad553a4 New try with ESM
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-07-19 14:44:58 +02:00
7c253c98d7 Moved to ESBuild
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-07-19 14:44:42 +02:00
e172465258 2.4.2 2021-07-11 17:48:56 +02:00
9940961e20 Downgraded to ES2015 to have better support browsers
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-07-11 17:48:42 +02:00
f25be8b5f5 2.4.1 2021-07-11 17:19:46 +02:00
641f7861b8 Updated dependencies (#12)
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-07-11 15:18:44 +00:00
3db69e0537 Code Cleanup and Deprecation of unused public things (#11)
* Cleanup

Signed-off-by: Avior <florian.bouillon@delta-wings.net>

* Deprecated Languages interface

Signed-off-by: Avior <florian.bouillon@delta-wings.net>

* Fixed babel

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-07-11 14:52:17 +00:00
1c36d6b93e Added auto publish on tag 2021-06-30 07:05:51 +00:00
10083223e2 Merge branch 'master' of github.com:tcgdex/javascript-sdk 2021-06-29 17:26:24 +02:00
95196ce551 2.4.0 2021-06-29 17:25:25 +02:00
81200aede7 Added SDK support for new languages
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-06-29 17:25:12 +02:00
35642ffd57 Moved to NPM
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-06-29 17:24:59 +02:00
4435f930ec Update README.md 2021-06-24 01:06:06 +02:00
46b74170fa v2.3.1 2021-06-22 21:45:27 +02:00
de916e09eb Cleaned dist folder
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-06-22 21:45:04 +02:00
96bc9149c9 Added a version script
It automaticly update the version number without importing package.json

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-06-22 21:40:28 +02:00
f858bd5c79 Updated documents
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-06-22 21:33:19 +02:00
8a0dac5e27 Changed back to master
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-06-22 21:03:38 +02:00
941fd925b8 Reworked Request (#10)
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-06-22 20:51:33 +02:00
3684c61812 Fixed not actions not running on the branch
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-06-22 20:39:52 +02:00
a2f7018aa4 Add Github actions (#9)
* First try

Signed-off-by: Avior <florian.bouillon@delta-wings.net>

* Removed Nodejs 15.x from tests

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-06-22 20:27:25 +02:00
7014e0c511 Added ESLint
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-06-22 19:54:38 +02:00
b951f6d2d1 Added Tests :D
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-06-22 19:46:00 +02:00
babd4e5f85 v2.3.0-beta.2 2021-06-22 17:11:40 +02:00
efe5957946 Fixed browser context and header error
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-06-22 17:11:01 +02:00
f19298e20d v2.3.0-beta.1 2021-06-22 16:53:20 +02:00
4789c15c7d File reorganisation
Signed-off-by: Avior <github@avior.me>
2021-06-22 16:51:27 +02:00
f28fa11710 v2.2.0 2021-06-19 01:03:32 +02:00
95c48e530e v2.2.0-beta 2021-06-18 22:35:20 +02:00
c3791959be Added a legal field to each cards
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-06-18 22:34:16 +02:00
a3537a1af7 Changed some compilation settings
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-31 15:59:48 +02:00
4da8131d11 Removed full import on package.json
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-31 15:59:26 +02:00
8405302286 Added JSDocs to the base fetch
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-31 15:59:05 +02:00
b1d97a4278 Updated Changelog
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-31 15:17:30 +02:00
b004321f40 v2.1.1 2021-05-31 15:16:28 +02:00
b3d34182a2 Fixed Package build
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-31 15:16:13 +02:00
1b1bcfbb84 Updated CHANGELOG
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-31 14:50:01 +02:00
a593271aba v2.1.0 2021-05-31 14:47:44 +02:00
6e93a70f1e Updated Title
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-31 14:46:25 +02:00
fbf6f2e2cd Updated Documentation
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-31 13:37:15 +02:00
8e3de78b00 Added a new function that globally fetch every endpoints
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-31 12:48:53 +02:00
b845e36784 Added a User-Agent
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-31 12:48:25 +02:00
23da33f81f Updated deps
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-31 12:48:18 +02:00
f7010d5f93 v2.0.3 2021-05-28 11:39:55 +02:00
ed3fbcf5db Fixed regulation Mark name not being correct
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-05-28 11:37:23 +02:00
f62615814d v2.0.2 2021-05-28 11:36:55 +02:00
eec10c548a Fixed name
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-05-28 11:36:20 +02:00
720bc6b43a v2.0.1 2021-05-28 11:28:24 +02:00
3557334076 removed hardcoded values as they depends on language
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-05-28 11:28:00 +02:00
a6e2ee60cc v2.0.0 2021-05-28 11:26:39 +02:00
22589b0be5 Updated interface to support new rotationMark field
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-05-28 11:25:55 +02:00
81d4447d27 Removed translation files
They were moved to the compiler

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-05-28 11:25:31 +02:00
d7ba03749d v2.0.0-beta.6 2021-05-07 10:17:26 +02:00
6c5fc609ae Added URL URLs Normalization
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-05-07 10:16:42 +02:00
4597476e6b v2.0.0-beta.5 2021-05-03 21:57:12 +02:00
2ac98526a1 Fixed Items with accents not being correctly fetched
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-05-03 21:56:42 +02:00
040cb4508a v2.0.0-beta.4 2021-05-02 15:49:34 +02:00
edbcf7f4da Add new cardCount field to set
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-05-02 15:48:26 +02:00
0cc19ec1f3 v2.0.0-beta.3 2021-04-24 19:53:36 +02:00
551c3bbc6b Updated Deps
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-04-24 19:53:08 +02:00
4b644067fa Changed Functions name
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-04-24 18:58:08 +02:00
41d105cda8 v2.0.0-beta.2 2021-04-20 10:40:08 +02:00
73028f4803 Fixed get serie pointing the old endpoint
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-04-20 10:39:45 +02:00
6d7381de7d v2.0.0-beta.1 2021-04-20 10:07:44 +02:00
00e61b370f Fixed interface not being correctly exported
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-04-20 10:07:10 +02:00
3b6c5886ea v2.0.0-beta 2021-04-19 16:59:10 +02:00
96cbea47e2 Added Typing to exports
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-04-19 16:56:44 +02:00
ae65bd4d8e v2.0.0-alpha.3 2021-03-11 11:15:31 +01:00
d5c57fa6c7 Added simple Endpoint for strings
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-03-11 11:15:11 +01:00
d42b0057c7 v2.0.0-alpha.2 2021-03-11 10:40:39 +01:00
b13e554162 V2 added typing for compiler
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-03-11 10:10:44 +01:00
1db0b1ab38 Updated SDK to support new incoming datas
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-02-13 20:04:50 +01:00
97acf4287f v1.7.0 2021-01-31 13:49:49 +01:00
7f0e95d574 Added the new Rarity v1.7.0
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-01-31 13:49:36 +01:00
b7d8fac835 v1.6.1
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-01-31 13:46:57 +01:00
d965aabad7 v1.6.1 2021-01-31 13:28:23 +01:00
e22d63d2ee Merge branch 'master' of github.com:tcgdex/javascript-sdk 2021-01-08 15:21:51 +01:00
5d2b836af6 Publish update
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-01-08 15:21:34 +01:00
dd7e252027 Remove console.warn
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-01-08 15:21:20 +01:00
c4fff9b370 Let the enduser handle not found errors
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-01-08 15:20:19 +01:00
610d2590e8 Update package.json 2021-01-08 11:54:41 +01:00
b180369514 1.5.1 - Because 1.5 already existed
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-01-08 11:44:51 +01:00
17ffd73fb3 Publish Update
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-01-08 11:41:42 +01:00
ec4f5d1a84 Merge branch 'master' of github.com:tcgdex/javascript-sdk 2021-01-08 11:40:50 +01:00
ae7f3077c0 Added raw getSet that don't process Date
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-01-08 11:39:01 +01:00
526c65bc7c Updated deps
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-01-08 11:36:33 +01:00
2c0a12a2e8 Update dependency typescript to v3.9.5 (#4)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-24 10:04:19 +02:00
8ae2b2dcb7 Fix Cross-Origin Request Blocked 2020-06-23 00:10:03 +02:00
6621316e8d Merge branch 'master' of github.com:tcgdex/javascript-sdk 2020-06-23 00:03:35 +02:00
67c4066546 Update dependency @types/node-fetch to v2.5.7 (#3)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-22 23:05:08 +02:00
a3d4533887 Pin dependencies (#2)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-22 23:03:51 +02:00
5dbc361896 Add renovate.json (#1)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-22 23:00:55 +02:00
fdc3074118 Updated Rarities and tags
Fixes #3

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-05-01 23:59:58 +02:00
771c5482af Merge branch 'master' of git.delta-wings.net:tcgdex/javascript-sdk 2020-04-24 23:35:15 +02:00
3b47e86cda Updated API url
Signed-off-by: Avior <florian.bouillon@delta-wings.net>

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-04-24 23:35:03 +02:00
739fe92eae v1.4.1 2020-04-24 23:34:17 +02:00
e182ec5617 Update 'renovate.json' 2020-04-01 08:24:43 +00:00
f779477fc9 Configure Renovate (#1)
Add renovate.json

Co-authored-by: AviorBOT <no-reply@delta-wings.net>
Reviewed-on: https://git.delta-wings.net/tcgdex/javascript-sdk/pulls/1
2020-04-01 07:59:20 +00:00
8b8c20308f v1.4.0 2020-03-25 15:52:36 +01:00
b1dcd5ae5e Fixed warning for translations
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-03-25 15:50:24 +01:00
e9d6ac12e1 Added a default Language setting for global lang
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-03-25 15:50:08 +01:00
5ac1a18f6f Updated sdk to 1.3.0
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-03-18 09:54:20 +01:00
624337467b v1.3.0 2020-03-18 09:54:05 +01:00
eb96cb971c v1.2.1 2020-03-14 20:08:22 +01:00
9902888304 Fix datas not in interface
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-03-14 20:08:00 +01:00
2f1a293e3d v1.2.0 2020-03-14 20:00:43 +01:00
04d13bd450 Updated DB to add items
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-03-14 19:56:59 +01:00
a886302e05 v1.2.0-beta.1 2020-03-11 23:08:33 +01:00
75bc7249f1 Updated DB
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-03-11 23:05:27 +01:00
00316364fa fix error
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-03-11 21:59:31 +01:00
3cdc149845 Add new functions
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-03-11 21:57:40 +01:00
d0088d62cb Fix translation not getting the correct file
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-03-11 11:45:20 +01:00
405cd8542a v1.0.8 2020-03-11 11:14:52 +01:00
53afc67b72 Updated Interfaces
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-03-11 11:02:24 +01:00
593b17b55f v1.0.7 2020-03-11 11:01:12 +01:00
f1f4ef3d94 v1.0.6 2020-03-11 10:32:07 +01:00
5315c9511d Made Better REAADME
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-03-11 10:13:00 +01:00
561ec85545 Modified Function possibilities
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-03-11 10:12:50 +01:00
f7044c7b10 Made lang settings public, Edited function params
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-03-11 10:12:38 +01:00
54 changed files with 17521 additions and 1440 deletions

View File

@ -5,4 +5,8 @@ indent_style = tab
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
insert_final_newline = true
[*.yml]
indent_size = 2
indent_style = space

4
.eslintignore Normal file
View File

@ -0,0 +1,4 @@
dist/
src/tcgdex.browser.ts
__tests__
*.js

5
.eslintrc.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
extends: [
"./node_modules/@dzeio/config/eslint/typescript"
]
}

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto eol=lf

3
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,3 @@
# These are supported funding model platforms
github: [tcgdex]

32
.github/ISSUE_TEMPLATE/bug.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Bug
description: Use this template if you have found a bug in the SDK
title: "bug: "
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this Form!
- type: textarea
id: happening
attributes:
label: What is Hapening
placeholder: "Ex: When using this function the SDK crash..."
validations:
required: true
- type: textarea
id: happen
attributes:
label: Please explain what should happen
description: If you selected Other or new Data Type please put it as the first line
placeholder: "Ex: The SDK should not crash"
validations:
required: true
- type: textarea
id: reproducre
attributes:
label: Please give us a way to reproduce
description: You can list a way or give us access to a minimal Github repo to reproduce it
placeholder: "Ex: https://github.com/tcgdex/javascript-sdk-error-idk"
validations:
required: true

16
.github/ISSUE_TEMPLATE/enhancement.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: Enhancement
description: Use this template if you have an Idea that will enhance the SDK
title: "enhancement: "
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this Form!
- type: textarea
id: explain
attributes:
label: Please explain in more details what idea you have
placeholder: "Ex: I would love to see this or this..."
validations:
required: true

5
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,5 @@
<!--
Thanks for your Pull Request, Please provide the related Issue using "Fix #0" or describe the change(s) you made.
The issue title must follow Conventional Commit (verified by Github Actions) conventionalcommits.org.
More informations at https://github.com/tcgdex/cards-database/blob/master/CONTRIBUTING.md
-->

22
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,22 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: lockfile-only
commit-message:
prefix: build
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: build

44
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Build & Test
on:
push:
branches:
- master
# Run on any pull request
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# Follow current releases https://nodejs.org/en/about/releases/
node-version: [14.x, 16.x, 18.x, 19.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Test
run: npm run test
- name: Upload Coverage
if: matrix.node-version == '16.x'
uses: codecov/codecov-action@v3
with:
# Comma-separated list of files to upload
files: ./coverage/coverage-final.json

26
.github/workflows/code-quality.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Code Quality Checks
on:
push:
branches:
- master
# Run on any pull request
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint

28
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

13
.gitignore vendored
View File

@ -1,5 +1,8 @@
node_modules
# Dist files
*.js
*.d.ts
# Dev Files
node_modules
test.ts
coverage
# Dist files
dist
src/version.js

View File

@ -1 +1,9 @@
*.ts
src
.editorconfig
.gitignore
.npmignore
webpack.config.js
tsconfig.*
yarn.lock
CHANGELOG.md
coverage

274
CHANGELOG.md Normal file
View File

@ -0,0 +1,274 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## 2.4.6 - 2022-01-28
### Fixed
- Updated node-fetch for CVE-2022-0235
## 2.4.5 - 2021-10-11
### Added
- Added new endpoint
## 2.4.4 - 2021-08-12
### Added
- New logo field in serie
## 2.4.3 - 2021-07-19
### Added
- ESM exports are back
## 2.4.2 2021-07-11
### Fixed
- Downgraded to ES2015 to have better suport browsers
### Changed
- Moved browser export from `Webpack` to `esbuild`
## 2.4.1 - 2021-07-11
## Deprecated
- Deprecated `Languages` Type
## 2.4.0 - 2021-06-29
## Added
- Support for new languages
## 2.3.1 - 2021-06-22
### Fixed
- Cleaned dist folder
## 2.3.0-2.3.1 - 2021-06-22
### Added
- Browser specialized build
- [#9](https://github.com/tcgdex/javascript-sdk/pull/9) Build/Unit/ESLint tests and coverage with Codecov using Github Action
### Changed
- [#10](https://github.com/tcgdex/javascript-sdk/pull/10) Simplified Request/Cache manager
## [2.2.0] - 2021-06-19
### Added
- Added new fields
## [2.1.1] - 2021-05-31
### Fixed
- Package building in the wrong version of ECMAScript
## [2.1.0] - 2021-05-31
### Added
- new `fetch` function that manage all the API endpoints
## [2.0.2-2.0.3] - 2021-05-28
### Fixed
- `rotationMark` should have been named `regulationMark`
## [2.0.1] - 2021-05-28
### Changed
- Hardcoded string values are now strings as they depends on the language
## [2.0.0] - 2021-05-28
### Added
- simple string endpoint typing
- Typing is exported through the main.d.ts file
- `cardCount` field in the set interface
- a `rotationMark` to the card interface
### Changed
- Support new incoming datas
- Point the SDK to the new V2
- Renamed `getExpansion(s)` to `getSerie(s)`
- Typing for the new SDK
- Functions now use `fetch` instead of `get` in their names
- URL Normalization is now done by the SDK
### Removed
- TranslationUtil as now translation are managed by the API
- the interfaces folder as every interfaces are now in `interfaces.d.ts`
- `this.gbu`
- Translation files as they are now in the Compiler
## [1.7.0] - 2021-01-31
### Added
- new Rarities
## [1.6.1] - 2021-01-31
### Changed
- tags are now optionnal
## [1.6.0] - 2021-01-08
### Changed
- Errors are now handled to return `undefined`
### Removed
- console.warn when using `getCards`
## [1.5.0] - 2021-01-08
### Added
- getSet can now not transform the API Date to a Javascript Date
## [1.4.2] - 2021-01-08
### Added
- new Tags
### Changed
- rarities to have less strange rarities
-
### Fixed
- CORS blocked
## [1.4.1] - 2020-04-24
### Changed
- Changed API url to the new one
## [1.4.0] - 2020-03-25
### Added
- a `defaultLang` static field to customize the default lang
- a `getLang` function to get the current lang for the SDK
### Fixed
- Warnings for translations
## [1.3.0] - 2020-03-18
### Added
- A cache system
- some informations about differents tags on a card
- lvl on the card interface
### Removed
- cardTypes on the card interface
## [1.2.1] - 2020-03-14
### Fixed
- Fix items datas not in the correct interface
## [1.2.0] - 2020-03-14
### Added
- Added The getCards endpoint to fetch the big list of card with an optionnal filter on the set
- Added The getExpansions endpoint to fetch the list of expansions
- Added Some informations about cardTypes
- Updated DB to add support for items
### Fixed
- Fix translation not getting the correct file
## [1.0.8] - 2020-03-11
### Changed
- Changed typing for some interfaces
## [1.0.1-1.0.7] - 2020-03-11
### Changed
- Renamed the class Name from `TCGDex` to `TCGdex`
- lang argument is now public so it can be changed while the SDK is active
### Added
- some typing for getCard and translationUtil
## [1.0.0] - 2020-03-11
### Added
- the getCard function to use with the fetch a card with it's id
- the getSet function to use with the fetch a set with it's id
- the getExpansion function to use with the fetch an expansion with it's id
- Constructor arg support for multiple langs
- TranslationUtil to go from the SDK value to a text value
[Unreleased]: https://github.com/tcgdex/javascript-sdk/compare/v2.4.3...HEAD
[2.4.3]: https://github.com/tcgdex/javascript-sdk/releases/tag/v2.4.3
[2.4.2]: https://github.com/tcgdex/javascript-sdk/releases/tag/v2.4.2
[2.4.1]: https://github.com/tcgdex/javascript-sdk/releases/tag/v2.4.1
[2.4.0]: https://github.com/tcgdex/javascript-sdk/releases/tag/v2.4.0
[2.3.1]: https://github.com/tcgdex/javascript-sdk/releases/tag/v2.3.1
[2.3.0]: https://github.com/tcgdex/javascript-sdk/releases/tag/v2.3.0
[2.2.0]: https://github.com/tcgdex/javascript-sdk/releases/tag/v2.2.0
[2.1.1]: https://github.com/tcgdex/javascript-sdk/releases/tag/v2.1.1
[2.1.0]: https://github.com/tcgdex/javascript-sdk/releases/tag/v2.1.0
[2.0.2-2.0.3]: https://github.com/tcgdex/javascript-sdk/releases/tag/v2.0.3
[2.0.1]: https://github.com/tcgdex/javascript-sdk/releases/tag/v2.0.1
[2.0.0]: https://github.com/tcgdex/javascript-sdk/releases/tag/v2.0.0
[1.7.0]: https://github.com/tcgdex/javascript-sdk/releases/tag/v1.7.0
[1.6.1]: https://github.com/tcgdex/javascript-sdk/releases/tag/v1.6.1
[1.6.0]: https://github.com/tcgdex/javascript-sdk/releases/tag/1.6.0
[1.5.0]: https://github.com/tcgdex/javascript-sdk/releases/tag/1.5.0
[1.4.2]: https://github.com/tcgdex/javascript-sdk/releases/tag/1.4.2
[1.4.1]: https://github.com/tcgdex/javascript-sdk/releases/tag/1.4.1
[1.4.0]: https://github.com/tcgdex/javascript-sdk/releases/tag/1.4.0
[1.3.0]: https://github.com/tcgdex/javascript-sdk/releases/tag/1.3.0
[1.2.1]: https://github.com/tcgdex/javascript-sdk/releases/tag/1.2.1
[1.2.0]: https://github.com/tcgdex/javascript-sdk/releases/tag/1.2.0
[1.0.8]: https://github.com/tcgdex/javascript-sdk/releases/tag/1.0.8
[1.0.1-1.0.7]: https://github.com/tcgdex/javascript-sdk/releases/tag/1.0.7
[1.0.0]: https://github.com/tcgdex/javascript-sdk/releases/tag/v1.0.0

128
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
the `contact@tcgdex.net` email or on Discord to `Avior#3872`.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

191
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,191 @@
<!-- omit in toc -->
# Contributing to TCGdex
First off, thanks for taking the time to contribute! ❤️
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
>
> - Star the project
> - Tweet about it
> - Refer this project in your project's readme
> - Mention the project at local meetups and tell your friends/colleagues
<!-- omit in toc -->
## Table of Contents
- [Code of Conduct](#code-of-conduct)
- [I Have a Question](#i-have-a-question)
- [I Want To Contribute](#i-want-to-contribute)
- [Reporting Issues](#reporting-issues)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Your First Code Contribution](#your-first-code-contribution)
- [Improving The Documentation](#improving-the-documentation)
- [Styleguides](#styleguides)
- [Coding Guidlines](#coding-guidelines)
- [Commit Messages](#commit-messages)
- [Join The Project Team](#join-the-project-team)
## Code of Conduct
This project and everyone participating in it is governed by the
[TCGdex Code of Conduct](https://github.com/tcgdex/javascript-sdk/blob/master/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable behavior to <contact@tcgdex.net>.
## I Have a Question
> If you want to ask a question, we assume that you have read the available Documentation at <https://www.tcgdex.dev>.
The best way to ask questions is to join our Discord server at <https://discord.gg/NehYTAhsZE>.
You can also ask them on the Github Repository, it is best to search for existing [Issues](https://github.com/tcgdex/javascript-sdk/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in a new issue. It is also advisable to search the internet for answers first.
If you then still feel the need to ask a question and need clarification, we recommend the following:
- Open an [Issue](https://github.com/tcgdex/javascript-sdk/issues/new).
- Provide as much context as you can about what you're running into.
- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
We will then take care of the issue as soon as possible.
<!--
You might want to create a separate issue tag for questions and include it in this description. People should then tag their issues accordingly.
Depending on how large the project is, you may want to outsource the questioning, e.g. to Stack Overflow or Gitter. You may add additional contact and information possibilities:
- IRC
- Slack
- Gitter
- Stack Overflow tag
- Blog
- FAQ
- Roadmap
- E-Mail List
- Forum
-->
## I Want To Contribute
> ### Legal Notice <!-- omit in toc -->
>
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
### Reporting Issues
<!-- omit in toc -->
#### Before Submitting an Issue Report
A good issue report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
- Determine if your issue is not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://www.tcgdex.dev). If you are looking for support, you might want to check [this section](#i-have-a-question)).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already an issue report existing for your bug or error in the [bug tracker](https://github.com/tcgdex/javascript-sdk/issues).
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
- Collect information about the bug:
- Stack trace (Traceback)
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
- Possibly your input and the output
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
<!-- omit in toc -->
#### How Do I Submit a Good Bug Report?
> You must never report security related issues, vulnerabilities or bugs to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <security@tcgdex.net>.
<!-- You may add a PGP key to allow the messages to be sent encrypted as well. -->
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
- Open an [Issue](https://github.com/tcgdex/javascript-sdk/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
- Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section.
Once it's filed:
- The project team will label the issue accordingly.
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution).
<!-- You might want to create an issue template for bugs and errors that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
### Suggesting Enhancements
This section guides you through submitting an enhancement suggestion for TCGdex, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
<!-- omit in toc -->
#### Before Submitting an Enhancement
- Make sure that you are using the latest version.
- Read the [documentation](https://www.tcgdex.dev) carefully and find out if the functionality is already covered, maybe by an individual configuration.
- Perform a [search](https://github.com/tcgdex/javascript-sdk/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
<!-- omit in toc -->
#### How Do I Submit a Good Enhancement Suggestion?
Enhancement suggestions are tracked as [GitHub issues](https://github.com/tcgdex/javascript-sdk/issues).
- Use a **clear and descriptive title** for the issue to identify the suggestion.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. <!-- this should only be included if the project has a GUI -->
- **Explain why this enhancement would be useful** to most TCGdex users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
<!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
### Your First Code Contribution
_note: Follow the different styleguides listed below when contributing_
- Fork 🍴 the project. _see the `fork` button at the top right of the screen_
- make the changes you want in your repository.
- Create a Pull request here https://github.com/tcgdex/javascript-sdk/compare by selecting your repository patch with our `master` branch _If it's not finished put WIP: before_
- we don't like ❌, so if your pull request has its automated checks ending with the red cross, please double check your changes until it show the awesome 🟢, or ask for help !
- If your pull request is ready for review remove WIP: put it s ready for review and we will handle the rest !
### Improving The Documentation
The documentation is updated in the Documentation repository at <https://github.com/tcgdex/documentation>
## Styleguides
### Coding Guidelines
Install the plugin `.editorconfig` in your dev environment if it's not already done and thats it !
for those who don't want to install it the basic are these:
- Respect PSR12
### Commit Messages
We follow the [Conventional Commit specification](conventionalcommits.org) and are using the [Angular format](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit) with some changes.
In short, please name your Pull Requests/Commits following this format
```
<type>(<scope>): <short summary>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
- `type` MUST be one of
- build: Changes affecting the CI at `.github/workflows` or `Dockerfile`
- ci: same as build
- docs: Changes affecting the differents Documents
- feat: a new feature being added
- fix: fixes
- pref: Performance related fixes
- refactor: Misc code changes
- test: same as `ci`
- the field `(<scope>)` is optional
- `short summary` MUST follow thoses rules
- Capitalize the first letter
- use the imperative, present tense: "Change" not "Changed" nor "Changes"
- `<footer>` and `<body>` are both optional
## Attribution
This guide is based on [Contribution Gen]((https://github.com/bttger/contributing-gen)) and was adapted by the TCGdex community !

View File

@ -2,7 +2,7 @@
MIT License
Copyright (c) 2020 TCGdex
Copyright (c) 2021 TCGdex
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

156
README.md
View File

@ -1,8 +1,154 @@
current endpoints
<p align="center">
<a href="https://www.tcgdex.net">
<img src="https://www.tcgdex.net/assets/og.png" width="90%" alt="TCGdex Main Image">
</a>
</p>
<p align="center">
<a href="http://npmjs.com/@tcgdex/sdk">
<img src="https://img.shields.io/npm/v/@tcgdex/sdk?style=flat-square" alt="NOM Version">
</a>
<a href="http://npmjs.com/@tcgdex/sdk">
<img src="https://img.shields.io/npm/dm/@tcgdex/sdk?style=flat-square" alt="NPM Downloads">
</a>
<a href="https://app.codecov.io/gh/tcgdex/javascript-sdk/">
<img src="https://img.shields.io/codecov/c/github/tcgdex/javascript-sdk?style=flat-square&token=FR4BI94N4Q" alt="npm version">
</a>
<a href="https://github.com/tcgdex/javascript-sdk/stargazers">
<img src="https://img.shields.io/github/stars/tcgdex/javascript-sdk?style=flat-square" alt="Github stars">
</a>
<a href="https://github.com/tcgdex/javascript-sdk/actions/workflows/build.yml">
<img src="https://img.shields.io/github/workflow/status/tcgdex/javascript-sdk/Build%20&%20Test?style=flat-square" alt="the TCGdex JAvascript SDK is released under the MIT license." />
</a>
<a href="https://discord.gg/NehYTAhsZE">
<img src="https://img.shields.io/discord/857231041261076491?color=%235865F2&label=Discord&style=flat-square" alt="Discord Link">
</a>
</p>
```js
console.log(await tcgdex.getCard("1", "hgss1"))
console.log(await tcgdex.getSet("hgss1"))
console.log(await tcgdex.getExpansion("hgss"))
# TCGdex JavaScript/TypeScript SDK
The Javascript/Typescript SDK provides a convenient access with the Open Source TCGdex API.
The SDK is available in ESM and CommonJS and should be automaticly chosen.
## Documentation
_The full API/SDK documentation in progress at [API Documentation - TCGdex](https://www.tcgdex.dev)_
### Getting Started
#### How To install
**In the browser**
To use the SDK in the browser, simply add the following script tag to your
HTML pages:
```html
<script src="https://cdn.jsdelivr.net/npm/@tcgdex/sdk@2/dist/tcgdex.browser.js"></script>
```
You cna also download the script from [JSDelivr](https://cdn.jsdelivr.net/npm/@tcgdex/sdk@2/dist/tcgdex.browser.js) by right clicking the link and selecting save link as.
**In Node.js**
Simply type the following into a terminal window:
```bash
npm install @tcgdex/sdk
```
#### Usage
_Note: a complete documentation is available at [TCGdex.dev](https://www.tcgdex.dev)_
**Example: Fetch a Card**
_in Browser_
```html
<script src="https://cdn.jsdelivr.net/npm/@tcgdex/sdk@2.4.9/dist/tcgdex.browser.js"></script>
<script>
// Instantiate the SDK
const tcgdex = new TCGdex('en');
// go into an async context
;(async () => {
// Card will be Furret from the Darkness Ablaze Set
const card = await tcgdex.fetch('cards', 'swsh3-136');
})();
</script>
```
_in NodeJS (in an async context)_
```typescript
// Import the SDK in Typescript
import TCGdex from '@tcgdex/sdk';
// Instantiate the SDK
const tcgdex = new TCGdex('en');
// go into an async context
(async () => {
// Card will be Furret from the Darkness Ablaze Set
const card = await tcgdex.fetch('cards', 'swsh3-136');
// You can also get the same result using
const card = await tcgdex.fetch('sets', 'Darkness Ablaze', 136);
})();
```
**Other Examples**
```javascript
// fetch a Set's informations using the set's name or ID
await tcgdex.fetch('sets', 'Darkness Ablaze')
// Fetch a serie using the serie's name or ID
await tcgdex.fetch('series', 'Sword & Shield')
// Fetch cards possible pokemon cards HP
await tcgdex.fetch('hp');
// Fetch Cards with the specific number of HP
await tcgdex.fetch('hp', 110);
// Fetch cards possible illustrators
await tcgdex.fetch('illustrators');
// Fetch Cards with the specific illustrator
await tcgdex.fetch('illustrators', 'tetsuya koizumi');
```
**Other Endpoints**
_They work like the two (`hp` and `illustrators`) abose_
- categories: the the different cards categories
- energy-types: Fetch different types of energies
- hp: fetch the different cards possible HPs
- illustrators: fetch all the cards illustrators
- rarities: fetch the cards rarities
- retreats: fetch the cards using the retreat count
- stages: fetch differents cards stages
- suffixes: fetch differents cards suffixes
- trainer-types: fetch trainer cards types
- dex-ids: fetch pokemon Global Pokédex IDS
- types: fetch the cards using the Pokémon type(s)
## Contributing
See [CONTRIBUTING.md](https://github.com/tcgdex/javascript-sdk/blob/master/CONTRIBUTING.md)
TL::DR
- Fork
- Commit your changes
- Pull Request on this Repository
## License
This project is licensed under the IT License. A copy of the license is available at [LICENSE.md](https://github.com/tcgdex/javascript-sdk/blob/master/LICENSE.md)

View File

@ -1,14 +0,0 @@
import LangList, { Langs } from "./interfaces/LangList";
type possibilities = "abilityType" | "category" | "rarity" | "tag" | "type"
export default class TranslationUtil {
public static translate(master: possibilities,a: number, lang: Langs): string|undefined {
const trans = require(`./${master}`).default as translations
const tmp = trans[lang]
if (!tmp) return
return tmp[a]
}
}
export type translations = LangList<Array<string>>

66
__tests__/basic.test.js Normal file
View File

@ -0,0 +1,66 @@
const TCGdex = require("../src/tcgdex").default
const fetch = require('node-fetch')
const fakeFetch = (response, status = 200) => jest.fn(() =>
Promise.resolve({
status: status,
json: () => Promise.resolve(response),
})
);
test('Basic test', async () => {
const tcgdex = new TCGdex('en')
TCGdex.fetch = fakeFetch({ok: true})
const res = await tcgdex.fetch('cards', 'basic-test')
expect(res).toEqual({ok: true})
expect(TCGdex.fetch).toHaveBeenCalledTimes(1)
})
test('Cache test', async () => {
const tcgdex = new TCGdex('en')
TCGdex.fetch = fakeFetch({ok: 'a'})
const res1 = await tcgdex.fetch('cards', 'cache-test')
expect(res1).toEqual({ok: 'a'})
TCGdex.fetch = fakeFetch({ok: 'b'})
const res2 = await tcgdex.fetch('cards', 'cache-test')
expect(res2).toEqual({ok: 'a'})
})
test('endpoint errors', async () => {
const tcgdex = new TCGdex('en')
TCGdex.fetch = fakeFetch({ok: 'a'})
await expect(tcgdex.fetch('non existing endpoint')).rejects.toThrow()
await expect(tcgdex.fetch()).rejects.toThrow()
})
test('404 test', async () => {
const tcgdex = new TCGdex('en')
TCGdex.fetch = fakeFetch(undefined, 404)
expect(
await tcgdex.fetch('cards', '404-test')
).not.toBeDefined()
})
test('test real endpoints', async () => {
const tcgdex = new TCGdex('en')
TCGdex.fetch = fetch
const endpoints = [
{endpoint: 'fetchCard', params: ['swsh1-1']},
{endpoint: 'fetchCard', params: ['1', 'Sword & Shield']},
{endpoint: 'fetchCards', params: ['swsh1']},
{endpoint: 'fetchCards', params: []},
{endpoint: 'fetchSet', params: ['swsh1']},
{endpoint: 'fetchSets', params: ['swsh']},
{endpoint: 'fetchSets', params: []},
{endpoint: 'fetchSeries', params: []},
{endpoint: 'fetchSerie', params: ['swsh']},
]
for await (const item of endpoints) {
expect(
await tcgdex[item.endpoint](...item.params)
).toBeDefined()
}
})

7
babel.config.js Normal file
View File

@ -0,0 +1,7 @@
// Babel config for Jest
module.exports = {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
'@babel/preset-typescript'
],
};

View File

@ -1,19 +0,0 @@
import AbilityType, { AbilityTypeSimple } from "./AbilityType";
import LangList from "./LangList";
export interface AbilitySingle extends AbilitySimple {
type: AbilityTypeSimple
text: string
}
export interface AbilitySimple {
// id: number // WIP
name: string
}
export default interface Ability {
id?: number
type: AbilityType
name: LangList<string>
text: LangList<string>
}

View File

@ -1,13 +0,0 @@
export interface AbilityTypeSimple {
id: AbilityType
name: string
}
enum AbilityType {
POKEBODY,
POKEPOWER,
TALENT,
ANCIENTTRAIT
}
export default AbilityType

View File

@ -1,20 +0,0 @@
import Type from "./Type";
import LangList from "./LangList";
export interface AttackSingle extends AttackSimple {
cost?: Array<string>
text?: string
damage?: string|number
}
export interface AttackSimple {
// id: number
name: string
}
export default interface Attack {
cost?: Array<Type>
name: LangList<string>
text?: LangList<string>
damage?: string|number
}

View File

@ -1,130 +0,0 @@
import Type, { TypeSimple } from "./Type";
import Tag, { TagSimple } from "./Tag";
import { RaritySimple, Rarity } from "./Rarity";
import { CategorySimple, Category } from "./Category";
import { IllustratorSimple } from "./Illustrator";
import Ability, { AbilitySingle } from "./Ability";
import Attack, { AttackSingle } from "./Attack";
import { List } from "./General";
import LangList from "./LangList";
import Set from "./Set";
export interface CardSimple {
id: string
name: string
image: string
}
export interface CardSingle {
// General
id: string
localId: number|string
name: string
image?: {
low: string
high?: string
}
tags: Array<TagSimple>
illustrator?: IllustratorSimple
rarity: RaritySimple
category: CategorySimple
set: {
name: string
code: string
}
cardTypes?: {
normal: boolean
reverse: boolean
holo: boolean
firstEd: boolean
}
// Pokémon only
hp?: number
dexId?: number
type?: Array<TypeSimple>
evolveFrom?: string
evolveTo?: Array<string>
abilities?: Array<AbilitySingle>
attacks?: Array<AttackSingle>
weaknesses?: Array<WeakRes>
resistances?: Array<WeakRes>
retreat?: number
// Trainer/Energy only
effect?: string
}
export type CardList = List<CardSimple>
type WeakRes = {
type: TypeSimple
value?: string
}
type Card = {
// global id made of setid and localId
id: string
// set id
localId: string|number
dexId?: number
// Card informations (from top to bottom of card)
name: LangList<string>
hp?: number //optionnal because energy/trainer cards might have not any hp
type?: Array<Type> // ex for multiple https://api.pokemon.com/us/pokemon-tcg/pokemon-cards/ex-series/ex13/17/
image?: {
low: LangList<string>
high?: LangList<string>
}
evolveFrom?: LangList<string>
evolveTo?: Array<LangList<string>>
tags: Array<Tag> // made after
illustrator?: string
abilities?: Array<Ability>
attacks?: Array<Attack>
// If card is trainer or energy effect is here
effect?: LangList<string>
weaknesses?: Array<{
type: Type
value?: string
}>
resistances?: Array<{
type: Type
value?: string
}>
retreat?: number
rarity: Rarity
// Other elements
category: Category
set: {
name: string
code: string
}| Set
/**
* Override Set defaults
*/
cardTypes?: {
normal: boolean
reverse: boolean
holo: boolean
firstEd: boolean
}
}
export default Card

View File

@ -1,24 +0,0 @@
import { List } from "./General"
import { CardSimple } from "./Card"
export enum Category {
POKEMON,
TRAINER,
ENERGY
}
export default Category
export type CategorySingle = {
id: Category
name: string
cards: Array<CardSimple>
}
export type CategorySimple = {
id: Category
name: string
}
export type CategoryList = List<CategorySimple>

View File

@ -1,22 +0,0 @@
import { SetSimple } from "./Set";
import { List } from "./General";
import LangList from "./LangList";
export type ExpansionSingle = {
code: string
name: string
sets: Array<SetSimple>
}
export type ExpansionSimple = {
code: string
name: string
}
export type ExpansionList = List<ExpansionSimple>
export default interface Expansion {
name: LangList<string> | string
code: string
sets?: Array<string>
}

View File

@ -1,4 +0,0 @@
export type List<T> = {
count: number
list: Array<T>
}

View File

@ -1,11 +0,0 @@
import { CardSimple } from "./Card";
import { List } from "./General";
export type HpSingle = {
hp: number
cards: Array<CardSimple>
}
export type HpSimple = number
export type HpList = List<HpSimple>

View File

@ -1,24 +0,0 @@
import { CardSimple } from "./Card";
export type IllustratorSingle = {
id: number,
name: string,
cards: Array<CardSimple>
}
export interface IllustratorSimple {
id: number
name: string
}
export interface IllustratorsList {
count: number
list: Array<IllustratorSimple>
}
interface Illustrator {
id: number
name: string
}
export default Illustrator

View File

@ -1,15 +0,0 @@
type LangList<T> = {
[key in Langs]?: T
}
export type Langs = "en" | "fr"
namespace LangList {
export function insert(from: LangList<any>, el: any, lang: Langs) {
if (typeof from !== "object") from = {}
from[lang] = el
return from
}
}
export default LangList

View File

@ -1,6 +0,0 @@
import { Langs as l } from './LangList'
/**
* @deprecated
*/
export type Langs = l

View File

@ -1,32 +0,0 @@
export enum Rarity {
Common,
Uncommon,
Rare,
// Rare holo
RareHolo,
RareHoloEX,
RareHoloGX,
RareHoloLvX,
// Rare other
RareUltra,
RarePrime,
RareACE,
RareBREAK,
RareRainbow,
// Other
LEGEND,
// V & Vmax
RareV,
RareVMAX,
}
export default Rarity
export interface RaritySimple {
id: Rarity
name: string
}

View File

@ -1,13 +0,0 @@
import { CardSimple } from "./Card";
export type RetreatSimple = number
export interface RetreatSingle {
id: RetreatSimple
cards: Array<CardSimple>
}
export interface RetreatList {
count: number,
list: Array<RetreatSimple>
}

View File

@ -1,158 +0,0 @@
import { CardSimple } from "./Card";
import { List } from "./General";
import LangList from "./LangList";
import Expansion from "./Expansion";
export type SetRequest = SetSingle
export type SetSingle = {
name: string
code: string
expansionCode?: string
tcgoCode?: string
cardCount: {
total: number
official: number
}
releaseDate: Date|string
legal?: {
standard: boolean
expanded: boolean
}
images?: {
symbol?: string
logo?: string
}
list: Array<CardSimple>
}
export type SetSimple = {
code: string
name: string
total: number
}
export type SetList = List<SetSimple>
export default interface Set {
/**
* Display Name
*/
name: LangList<string> | string
/**
* Expansion Object
*/
expansion?: Expansion
/**
* Expansion code
*/
expansionCode?: string
/**
* Set code (Also used as the slug)
*/
code: string
/**
* Trading card online code
*/
tcgoCode?: string
cardCount: {
/**
* total number of cards including secrets
*/
total: number
/**
* number of card indicated at the bottom of each cards
*/
official: number
}
cardTypes?: {
/**
* Default: true
*/
normal: boolean
/**
* Default: true
*/
reverse: boolean
/**
* Default: true
*/
holo: boolean
/**
* Default: false
*/
ed1: boolean
}
/**
* Format of numbering
* ex: SWSH[000] mean that it has SWSH as prefix and start at 000 -> 001 -> 002 -> etc
*
* @type {string}
* @memberof Set
*/
format?: string
/**
* Release date of the set
* in format: yyyy-mm-dd
* ex: 2002-12-22
*
* @type {string}
* @memberof Set
*/
releaseDate: string // date in format yyyy-mm-dd
/**
* Aol Endpoint for scrapping
*/
api?: string
/**
* Competition usage
*/
legal?: {
standard: boolean
expanded: boolean
}
images?: {
/**
* Symbol icon on bottom of card
* available extensions [
* webp
* jpg
* png
* ]
*/
symbol?: string
/**
* Official logo of set
* available extensions [
* webp
* jpg
* png
* ]
*/
logo?: string
}
/**
* Language in which the set is available
*/
availability?: LangList<boolean>
}

View File

@ -1,31 +0,0 @@
enum Tag {
BASIC,
BASICENERGY,
BREAK,
EX,
GX,
ITEM,
LEGEND,
LEVELUP,
MEGA,
RESTORED,
ROCKETSECRETMACHINE,
SP,
SPECIAL,
STADIUM,
STAGE1,
STAGE2,
SUPPORTER,
TAGTEAM,
TECHNICALMACHINE,
TOOL,
V,
VMAX,
}
export default Tag
export interface TagSimple {
id: Tag
name: string
}

View File

@ -1,20 +0,0 @@
enum Type {
COLORLESS,
DARKNESS,
DRAGON,
FAIRY,
FIGHTING,
FIRE,
GRASS,
LIGHTNING,
METAL,
PSYCHIC,
WATER,
}
export interface TypeSimple {
id: Type
name: string
}
export default Type

15881
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +1,70 @@
{
"name": "@tcgdex/sdk",
"version": "1.0.5",
"main": "./tcgdex.js",
"types": "./types/tcgdex.d.ts",
"repository": "https://git.delta-wings.net/tcgdex/javascript-sdk.git",
"version": "2.5.0",
"main": "./dist/tcgdex.node.js",
"module": "./dist/tcgdex.node.mjs",
"types": "./dist/tcgdex.node.d.ts",
"exports": {
".": {
"require": {
"types": "./dist/tcgdex.node.d.ts",
"default": "./dist/tcgdex.node.js"
},
"import": {
"default": "./dist/tcgdex.node.mjs",
"types": "./dist/tcgdex.node.d.mts"
}
}
},
"description": "Communicate with the Open Source TCGdex API in Javascript/Typescript using the SDK",
"repository": "https://github.com/tcgdex/javascript-sdk.git",
"homepage": "https://github.com/tcgdex/javascript-sdk",
"author": "Aviortheking",
"keywords": [
"tcgdex",
"pokemon",
"trading",
"card",
"tcg",
"sdk",
"api",
"typescript",
"javascript",
"typing"
],
"license": "MIT",
"devDependencies": {
"@types/node-fetch": "^2.5.4",
"typescript": "^3.7.5"
"@babel/core": "^7",
"@babel/preset-env": "^7",
"@babel/preset-typescript": "^7",
"@dzeio/config": "^1",
"@types/node-fetch": "^2",
"@typescript-eslint/eslint-plugin": "^5",
"@typescript-eslint/parser": "^5",
"eslint": "^8",
"jest": "^29",
"tsup": "^7",
"typescript": "^5"
},
"engines": {
"node": ">=12"
},
"dependencies": {
"isomorphic-unfetch": "^3.0.0"
"isomorphic-unfetch": "^3",
"unfetch": "^4"
},
"scripts": {
"build": "tsc --project tsconfig.json",
"prepublishOnly": "yarn build"
"prebuild": "node scripts/export-version-number.js",
"build": "tsup ./src/tcgdex.node.ts --format cjs,esm --dts --clean && tsup ./src/tcgdex.browser.ts --format iife --minify --sourcemap",
"prepublishOnly": "npm run build",
"lint": "eslint",
"test": "jest --coverage"
},
"files": [
"*.js",
"*.d.ts",
"**/*.js",
"**/*.d.ts"
]
"dist"
],
"sideEffects": false,
"jest": {
"testTimeout": 30000
}
}

View File

@ -0,0 +1,4 @@
const { version } = require('../package.json')
const fs = require('fs')
fs.writeFileSync('./src/version.js', `export const version = '${version}'`)

31
src/Request.ts Normal file
View File

@ -0,0 +1,31 @@
import TCGdex from './tcgdex'
import { version } from './version'
export default class Request {
// 1 hour of TTL by default
public static ttl = 1000 * 60 * 60
private static cache: Record<string, {response: any, time: number}> = {}
public static async fetch<T>(url: string): Promise<T | undefined> {
let request = this.cache[url]
const now = new Date().getTime()
if (!request || now - request.time > this.ttl) {
const unfetch = TCGdex.fetch
const resp = await unfetch(url, {
headers: {
'user-agent': `@tcgdex/javascript-sdk/${version}`
}
})
if (resp.status !== 200) {
return undefined
}
this.cache[url] = { response: await resp.json(), time: now }
request = this.cache[url]
}
return request.response
}
}

312
src/interfaces.ts Normal file
View File

@ -0,0 +1,312 @@
export type SupportedLanguages = 'en' | 'fr' | 'es' | 'it' | 'pt' | 'de'
/**
* @deprecated This is not used anymore in the API V2
*/
export type Languages<T = string> = Partial<Record<SupportedLanguages, T>>
export interface SerieResume {
id: string
name: string
logo?: string
}
export interface Serie extends SerieResume {
sets: SetList
}
interface variants {
normal?: boolean
reverse?: boolean
holo?: boolean
firstEdition?: boolean
}
export type SetList = Array<SetResume>
export type SerieList = Array<SerieResume>
export type CardList = Array<CardResume>
export interface SetResume {
id: string
name: string
logo?: string
symbol?: string
cardCount: {
/**
* total of number of cards
*/
total: number
/**
* number of cards officialy (on the bottom of each cards)
*/
official: number
}
}
export interface Set extends SetResume {
serie: SerieResume
tcgOnline?: string
variants?: variants
releaseDate: string
/**
* Designate if the set is usable in tournaments
*
* Note: this is specific to the set and if a
* card is banned from the set it will still be true
*/
legal: {
/**
* Ability to play in standard tournaments
*/
standard: boolean
/**
* Ability to play in expanded tournaments
*/
expanded: boolean
}
cardCount: {
/**
* total of number of cards
*/
total: number
/**
* number of cards officialy (on the bottom of each cards)
*/
official: number
/**
* number of cards having a normal version
*/
normal: number
/**
* number of cards having an reverse version
*/
reverse: number
/**
* number of cards having an holo version
*/
holo: number
/**
* Number of possible cards
*/
firstEd?: number
}
cards: CardList
}
export interface CardResume {
id: string
localId: string
/**
* Card Name (Including the suffix if next to card name)
*/
name: string
image?: string
}
export interface Card<SetType extends SetResume = SetResume> extends CardResume {
/**
* Card illustrator
*/
illustrator?: string
/**
* Card Rarity
*
* - None https://www.tcgdex.net/database/sm/smp/SM01
* - Common https://www.tcgdex.net/database/xy/xy9/1
* - Uncommon https://www.tcgdex.net/database/xy/xy9/2
* - Rare https://www.tcgdex.net/database/xy/xy9/3
* - Ultra Rare
* - Secret Rare
*/
rarity: string
/**
* Card Category
*
* - Pokemon
* - Trainer
* - Energy
*/
category: string
/**
* Card Variants (Override Set Variants)
*/
variants?: variants
/**
* Card Set
*/
set: SetType
/**
* Pokemon only elements
*/
/**
* Pokemon Pokedex ID
*/
dexId?: Array<number>
/**
* Pokemon HP
*/
hp?: number
/**
* Pokemon Types
* ex for multiple https://www.tcgdex.net/database/ex/ex13/17
*/
types?: Array<string>
/**
* Pokemon Sub Evolution
*/
evolveFrom?: string
/**
* Pokemon Weight
*/
weight?: string
/**
* Pokemon Description
*/
description?: string
/**
* Level of the Pokemon
*
* NOTE: can be equal to 'X' when the pokemon is a LEVEL-UP one
*/
level?: number | string
/**
* Pokemon Stage
*
* - Basic https://www.tcgdex.net/database/xy/xy9/1
* - BREAK https://www.tcgdex.net/database/xy/xy9/18
* - LEVEL-UP https://www.tcgdex.net/database/dp/dp1/121
* - MEGA https://www.tcgdex.net/database/xy/xy1/2
* - RESTORED https://www.tcgdex.net/database/bw/bw5/53
* - Stage1 https://www.tcgdex.net/database/xy/xy9/2
* - Stage2 https://www.tcgdex.net/database/xy/xy9/3
* - VMAX https://www.tcgdex.net/database/swsh/swsh1/50
*/
stage?: string
/**
* Card Suffix
*
* - EX https://www.tcgdex.net/database/ex/ex2/94
* - GX https://www.tcgdex.net/database/sm/sm12/4
* - V https://www.tcgdex.net/database/swsh/swsh1/1
* - Legend https://www.tcgdex.net/database/hgss/hgss1/114
* - Prime https://www.tcgdex.net/database/hgss/hgss2/85
* - SP https://www.tcgdex.net/database/pl/pl1/7
* - TAG TEAM-GX https://www.tcgdex.net/database/sm/sm12/226
*/
suffix?: string
/**
* Pokemon Held Item
*
* ex https://www.tcgdex.net/database/dp/dp2/75
*/
item?: {
name: string
effect: string
}
/**
* Pokemon Abilities
*
* multi abilities ex https://www.tcgdex.net/database/ex/ex15/10
*/
abilities?: Array<{
type: string
name: string
effect: string
}>
/**
* Pokemon Attacks
*/
attacks?: Array<{
cost?: Array<string>
name: string
effect?: string
damage?: string | number
}>
/**
* Pokemon Weaknesses
*/
weaknesses?: Array<{
type: string
value?: string
}>
resistances?: Array<{
type: string
value?: string
}>
retreat?: number
// Trainer/Energy
effect?: string
// Trainer Only
trainerType?: string
// Energy Only
energyType?: string
/**
* Define the rotation mark on cards >= Sword & Shield
*/
regulationMark?: string
/**
* Card ability to be played in official tournaments
*
* Note: all cards are avaialable to play in unlimited tournaments
*/
legal: {
/**
* Ability to play in standard tournaments
*/
standard: boolean
/**
* Ability to play in expanded tournaments
*/
expanded: boolean
}
}
export type StringEndpointList = Array<string>
export interface StringEndpoint {
name: string
cards: Array<CardResume>
}

11
src/tcgdex.browser.ts Normal file
View File

@ -0,0 +1,11 @@
import TCGdex from './tcgdex'
import unfetch from 'unfetch'
TCGdex.fetch = window.fetch ?? unfetch as any
if (typeof global !== 'undefined') {
global.TCGdex = TCGdex
}
if (typeof window !== 'undefined') {
(window as any).TCGdex = TCGdex
}

7
src/tcgdex.node.ts Normal file
View File

@ -0,0 +1,7 @@
import TCGdex from './tcgdex'
import fetch from 'isomorphic-unfetch'
TCGdex.fetch = fetch as any
export default TCGdex
export * from './tcgdex'

185
src/tcgdex.ts Normal file
View File

@ -0,0 +1,185 @@
import RequestWrapper from './Request'
import { Serie, Set, Card, CardResume, SerieList, SetList, SupportedLanguages, StringEndpoint } from './interfaces'
type Endpoint = 'cards' | 'categories' | 'dex-ids' | 'energy-types' | 'hp' | 'illustrators' | 'rarities' | 'regulation-marks' | 'retreats' | 'series' | 'sets' | 'stages' | 'suffixes' | 'trainer-types' | 'types' | 'variants'
const ENDPOINTS: Array<Endpoint> = ['cards', 'categories', 'dex-ids', 'energy-types', 'hp', 'illustrators', 'rarities', 'regulation-marks', 'retreats', 'series', 'sets', 'stages', 'suffixes', 'trainer-types', 'types', 'variants']
const BASE_URL = 'https://api.tcgdex.net/v2'
export default class TCGdex {
public static fetch: typeof fetch
/**
* @deprecated to change the lang use `this.lang`
*/
public static defaultLang: SupportedLanguages = 'en'
public constructor(public lang?: SupportedLanguages) {}
public getLang(): SupportedLanguages {
return this.lang ?? TCGdex.defaultLang ?? 'en'
}
/**
* Shortcut to easily fetch a card using both it's global id and it's local ID
* @param id the card global/local ID
* @param set the card set name/ID (optionnal)
* @returns the card object
*/
public async fetchCard(id: string | number, set?: string): Promise<Card | undefined> {
const path = set ? ['sets', set] : ['cards']
// @ts-expect-error the base endpoint is 'sets' or 'cards'
return this.fetch(...path, id)
}
/**
* Shortcut to easily fetch cards using an optionnal set name/ID
* @param set the card set name/ID (optionnal)
* @returns a card list
*/
public async fetchCards(set?: string): Promise<Array<CardResume> | undefined> {
if (set) {
const fSet = await this.fetch('sets', set)
return fSet ? fSet.cards : undefined
}
return this.fetch('cards')
}
/**
* @deprecated use `this.fetch('sets', set)`
*/
public async fetchSet(set: string): Promise<Set | undefined> {
return this.fetch('sets', set)
}
/**
* @deprecated use `this.fetch('series', serie)`
*/
public async fetchSerie(serie: string): Promise<Serie | undefined> {
return this.fetch('series', serie)
}
/**
* @deprecated use `this.fetch('series')`
*/
public async fetchSeries(): Promise<SerieList | undefined> {
return this.fetch('series')
}
/**
* Shortcut to easily fetch sets using an optionnal serie name/ID
* @param serie the card set name/ID (optionnal)
* @returns a card list
*/
public async fetchSets(serie?: string): Promise<SetList | undefined> {
if (serie) {
const fSerie = await this.fetch('series', serie)
return fSerie ? fSerie.sets : undefined
}
return this.fetch('sets')
}
/**
* Fetch a card using its global id
* @param endpoint_0 'cards'
* @param endpoint_1 {string} the card global ID
*/
public async fetch(...type: ['cards', string]): Promise<Card | undefined>
/**
* Fetch every cards in the database
* @param endpoint_0 'cards'
*/
public async fetch(type: 'cards'): Promise<Array<CardResume> | undefined>
/**
* Fetch a card using its local id and its set
* @param endpoint_0 'sets'
* @param endpoint_1 {string} the set name or ID
* @param endpoint_2 {string} the card local ID
*/
public async fetch(...endpoint: ['sets', string, string]): Promise<Card | undefined>
/**
* Fetch a set
* @param endpoint_0 'sets'
* @param endpoint_1 {string} the set name or ID
*/
public async fetch(...endpoint: ['sets', string]): Promise<Set | undefined>
/**
* Fetch every sets
* @param endpoint_0 'sets'
*/
public async fetch(endpoint: 'sets'): Promise<SetList | undefined>
/**
* Fetch a serie
* @param endpoint_0 'series'
* @param endpoint_1 {string} the serie name or ID
*/
public async fetch(...endpoint: ['series', string]): Promise<Serie | undefined>
/**
* Fetch every series
* @param endpoint_0 'series'
*/
public async fetch(endpoint: 'series'): Promise<SerieList | undefined>
/**
* Fetch cards depending on a specific filter
* @param endpoint_0 {'categories' | 'dex-ids' | 'energy-types' | 'hp' | 'illustrators' | 'rarities' | 'regulation-marks' | 'retreats' | 'stages' | 'suffixes' | 'trainer-types' | 'types' | 'variants'}
* Possible value 'categories' | 'dex-ids' | 'energy-types' | 'hp' | 'illustrators' | 'rarities' | 'regulation-marks' | 'retreats' | 'stages' | 'suffixes' | 'trainer-types' | 'types' | 'variants'
* @param endpoint_1 {string} the value set while fetching the index
*/
public async fetch(...endpoint: ['categories' | 'dex-ids' | 'energy-types' | 'hp' | 'illustrators' | 'rarities' | 'regulation-marks' | 'retreats' | 'stages' | 'suffixes' | 'trainer-types' | 'types' | 'variants', string]): Promise<StringEndpoint | undefined>
/**
* Fetch cards depending on a specific filter
* @param endpoint_0 {'categories' | 'dex-ids' | 'energy-types' | 'hp' | 'illustrators' | 'rarities' | 'regulation-marks' | 'retreats' | 'stages' | 'suffixes' | 'trainer-types' | 'types' | 'variants'}
* Possible value 'categories' | 'dex-ids' | 'energy-types' | 'hp' | 'illustrators' | 'rarities' | 'regulation-marks' | 'retreats' | 'stages' | 'suffixes' | 'trainer-types' | 'types' | 'variants'
* @param endpoint_1 {string} Fetch the possible values to use depending on the endpoint
*/
public async fetch(endpoint: 'categories' | 'dex-ids' | 'energy-types' | 'hp' | 'illustrators' | 'rarities' | 'regulation-marks' | 'retreats' | 'stages' | 'suffixes' | 'trainer-types' | 'types' | 'variants'): Promise<Array<string> | undefined>
/**
* Fetch The differents endpoints depending on the first argument
* @param endpoint_0 {'hp' | 'retreats' | 'categories' | 'illustrators' | 'rarities' | 'types'}
* Possible value 'cards' | 'categories' | 'hp' | 'illustrators' | 'rarities' | 'retreats' | 'series' | 'sets' | 'types'
* @param endpoint_1 {string} (Optionnal) some details to go from the index file to the item file (mostly the ID/name)
* @param endpoint_2 {string} (Optionnal) only for sets the card local ID to fetch the card through the set
*/
public async fetch(...endpoint: Array<Endpoint | string>): Promise<any | undefined> {
if (endpoint.length === 0) {
throw new Error('endpoint to fetch is empty!')
}
// @ts-expect-error with the precedent check, we KNOW that type is not empty
const baseEndpoint = endpoint.shift().toLowerCase() as Endpoint
if (!ENDPOINTS.includes(baseEndpoint)) {
throw new Error(`unknown endpoint to fetch! (${baseEndpoint})`)
}
return this.makeRequest(baseEndpoint, ...endpoint)
}
/**
* Function to make the request and normalize the whole path
*/
private makeRequest<T = any>(...url: Array<string | number>) {
// Normalize path
const path = url.map((subPath) => encodeURI(
subPath
// Transform numbers to string
.toString()
// replace this special character with an escaped one
.replace('?', '%3F')
// normalize the string
.normalize('NFC')
// remove some special chars by nothing
// eslint-disable-next-line no-misleading-character-class
.replace(/["'\u0300-\u036f]/gu, '')
)).join('/')
return RequestWrapper.fetch<T>(`${BASE_URL}/${this.getLang()}/${path}`)
}
}
export * from './interfaces'

View File

@ -1,66 +0,0 @@
import fetch from 'isomorphic-unfetch'
import { Langs } from './interfaces/Langs'
import { SetSingle, SetRequest } from './interfaces/Set'
import { CardSingle } from './interfaces/Card'
import { ExpansionSingle } from './interfaces/Expansion'
export default class TCGDex {
private lang: Langs = "en"
public constructor(lang?: Langs) {
if (lang) this.lang = lang
}
private getBaseUrl() {
return `https://api.tcgdex.net/${this.lang}`
}
private gbu() {
return this.getBaseUrl()
}
public async getCard(id: string, set?: string): Promise<CardSingle> {
try {
const txt = set ? `sets/${set}` : "cards"
const resp = await fetch(`${this.gbu()}/${txt}/${id}`)
if (resp.status !== 200) throw new Error("Card not found")
try {
return await resp.json()
} catch (e) {
throw e
}
} catch (e) {
throw e
}
}
public async getSet(set: string): Promise<SetSingle> {
try {
const resp = await fetch(`${this.gbu()}/sets/${set}`)
console.log(resp.status)
if (resp.status !== 200) throw new Error("Set not found")
try {
const setTmp: SetRequest = await resp.json();
return Object.assign(setTmp, {releaseDate: new Date(setTmp.releaseDate)}) as SetSingle
} catch (e) {
throw e
}
} catch (e) {
throw e
}
}
public async getExpansion(expansion: string): Promise<ExpansionSingle> {
try {
const resp = await fetch(`${this.gbu()}/expansions/${expansion}`)
if (resp.status !== 200) throw new Error("Expansion not found")
try {
return await resp.json()
} catch (e) {
throw e
}
} catch (e) {
throw e
}
}
}

View File

@ -1,17 +0,0 @@
import { translations } from "../TranslationUtil"
const translations: translations = {
en: [
"Poké-Body",
"Poké-Power",
"Ability",
"Ancient Trait"
],
fr: [
"Poké-Body",
"Poké-Power",
"Talent",
"Trait Ancien"
]
}
export default translations

View File

@ -1,15 +0,0 @@
import { translations } from "../TranslationUtil"
const translations: translations = {
en: [
"Pokémon",
"Trainer",
"Energy"
],
fr: [
"Pokémon",
"Dresseur",
"Énergie"
]
}
export default translations

View File

@ -1,47 +0,0 @@
import { translations } from "../TranslationUtil"
const translations: translations = {
en: [
"Common",
"unCommon",
"Rare",
"Rare Holo",
"Rare Holo EX",
"Rare Holo GX",
"Rare Holo Lv.X",
"Rare Ultra",
"Rare Prime",
"Rare ACE",
"Rare BREAK",
"Rainbow Rare",
"LEGEND",
"V",
"VMax"
],
fr: [
"Commun",
"Non Commun",
"Rare",
"Rare Holo",
"Rare Holo EX",
"Rare Holo GX",
"Rare Holo Lv.X",
"Rare Ultra",
"Rare Prime",
"Rare ACE",
"Rare BREAK",
"Rainbow Rare",
"LEGEND",
"V",
"VMax"
]
}
export default translations

View File

@ -1,53 +0,0 @@
import { translations } from "../TranslationUtil"
const translations: translations = {
en: [
"Basic Pokémon",
"Basic Energy",
"BREAK",
"EX",
"GX",
"Item",
"LEGEND",
"Level-Up",
"MEGA",
"Restored",
"Rocket's Secret Machine",
"SP",
"Special",
"Stadium",
"Stage 1",
"Stage 2",
"Supporter",
"Tag Team",
"Technical Machine",
"Tool",
"Pokémon V",
"Pokémon VMAX"
],
fr: [
"Pokémon de base",
"Energie de base",
"TURBO",
"EX",
"GX",
"Objet",
"LÉGENDE",
"Niveau Sup",
"Méga",
"Restauré",
"Machine secrète dees Rocket",
"SP",
"Spéciale",
"Stadium",
"Niveau 1",
"Niveau 2",
"Supporter",
"ESCOUADE",
"Machine Technique",
"Outil",
"Pokémon V",
"Pokémon VMAX"
]
}
export default translations

View File

@ -1,32 +0,0 @@
import { translations } from "../TranslationUtil";
const trans: translations = {
en: [
"Colorless",
"Darkness",
"Dragon",
"Fairy",
"Fighting",
"Fire",
"Grass",
"Lightning",
"Metal",
"Psychic",
"Water"
],
fr: [
"Incolore",
"Obscurité",
"Dragon",
"Fée",
"Combat",
"Feu",
"Plante",
"Électrique",
"Métal",
"Psy",
"Eau"
]
}
export default trans

View File

@ -1,65 +1,8 @@
{
"include": ["**/*.ts"],
"extends": "./node_modules/@dzeio/config/tsconfig.base",
"include": ["./src/tcgdex.node.ts"],
"compilerOptions": {
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "ESNext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationDir": "types", /* Folder where the declarations are*/
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
// "outDir": "./", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "", /* Specify file to store incremental compilation information */
"removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
/* Additional Checks */
"noUnusedLocals": true, /* Report errors on unused locals. */
"noUnusedParameters": true, /* Report errors on unused parameters. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
"forceConsistentCasingInFileNames": true,
/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
/* Source Map Options */
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
"target": "ES2015",
"rootDir": "./src",
}
}
}

565
yarn.lock
View File

@ -1,565 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@babel/code-frame@^7.5.5", "@babel/code-frame@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e"
integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==
dependencies:
"@babel/highlight" "^7.8.3"
"@babel/core@^7.8.4":
version "7.8.7"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.7.tgz#b69017d221ccdeb203145ae9da269d72cf102f3b"
integrity sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA==
dependencies:
"@babel/code-frame" "^7.8.3"
"@babel/generator" "^7.8.7"
"@babel/helpers" "^7.8.4"
"@babel/parser" "^7.8.7"
"@babel/template" "^7.8.6"
"@babel/traverse" "^7.8.6"
"@babel/types" "^7.8.7"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.1"
json5 "^2.1.0"
lodash "^4.17.13"
resolve "^1.3.2"
semver "^5.4.1"
source-map "^0.5.0"
"@babel/generator@^7.8.6", "@babel/generator@^7.8.7":
version "7.8.7"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.7.tgz#870b3cf7984f5297998152af625c4f3e341400f7"
integrity sha512-DQwjiKJqH4C3qGiyQCAExJHoZssn49JTMJgZ8SANGgVFdkupcUhLOdkAeoC6kmHZCPfoDG5M0b6cFlSN5wW7Ew==
dependencies:
"@babel/types" "^7.8.7"
jsesc "^2.5.1"
lodash "^4.17.13"
source-map "^0.5.0"
"@babel/helper-function-name@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca"
integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==
dependencies:
"@babel/helper-get-function-arity" "^7.8.3"
"@babel/template" "^7.8.3"
"@babel/types" "^7.8.3"
"@babel/helper-get-function-arity@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5"
integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==
dependencies:
"@babel/types" "^7.8.3"
"@babel/helper-module-imports@^7.0.0":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498"
integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==
dependencies:
"@babel/types" "^7.8.3"
"@babel/helper-split-export-declaration@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9"
integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==
dependencies:
"@babel/types" "^7.8.3"
"@babel/helpers@^7.8.4":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.4.tgz#754eb3ee727c165e0a240d6c207de7c455f36f73"
integrity sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w==
dependencies:
"@babel/template" "^7.8.3"
"@babel/traverse" "^7.8.4"
"@babel/types" "^7.8.3"
"@babel/highlight@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797"
integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==
dependencies:
chalk "^2.0.0"
esutils "^2.0.2"
js-tokens "^4.0.0"
"@babel/parser@^7.8.6", "@babel/parser@^7.8.7":
version "7.8.7"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.7.tgz#7b8facf95d25fef9534aad51c4ffecde1a61e26a"
integrity sha512-9JWls8WilDXFGxs0phaXAZgpxTZhSk/yOYH2hTHC0X1yC7Z78IJfvR1vJ+rmJKq3I35td2XzXzN6ZLYlna+r/A==
"@babel/template@^7.8.3", "@babel/template@^7.8.6":
version "7.8.6"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b"
integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==
dependencies:
"@babel/code-frame" "^7.8.3"
"@babel/parser" "^7.8.6"
"@babel/types" "^7.8.6"
"@babel/traverse@^7.8.4", "@babel/traverse@^7.8.6":
version "7.8.6"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff"
integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A==
dependencies:
"@babel/code-frame" "^7.8.3"
"@babel/generator" "^7.8.6"
"@babel/helper-function-name" "^7.8.3"
"@babel/helper-split-export-declaration" "^7.8.3"
"@babel/parser" "^7.8.6"
"@babel/types" "^7.8.6"
debug "^4.1.0"
globals "^11.1.0"
lodash "^4.17.13"
"@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.8.7":
version "7.8.7"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.7.tgz#1fc9729e1acbb2337d5b6977a63979b4819f5d1d"
integrity sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw==
dependencies:
esutils "^2.0.2"
lodash "^4.17.13"
to-fast-properties "^2.0.0"
"@types/estree@*":
version "0.0.42"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.42.tgz#8d0c1f480339efedb3e46070e22dd63e0430dd11"
integrity sha512-K1DPVvnBCPxzD+G51/cxVIoc2X8uUVl1zpJeE6iKcgHMj4+tbat5Xu4TjV7v2QSDbIeAfLi2hIk+u2+s0MlpUQ==
"@types/node-fetch@^2.5.4":
version "2.5.5"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.5.tgz#cd264e20a81f4600a6c52864d38e7fef72485e92"
integrity sha512-IWwjsyYjGw+em3xTvWVQi5MgYKbRs0du57klfTaZkv/B24AEQ/p/IopNeqIYNy3EsfHOpg8ieQSDomPcsYMHpA==
dependencies:
"@types/node" "*"
form-data "^3.0.0"
"@types/node@*":
version "13.9.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.9.0.tgz#5b6ee7a77faacddd7de719017d0bc12f52f81589"
integrity sha512-0ARSQootUG1RljH2HncpsY2TJBfGQIKOOi7kxzUY6z54ePu/ZD+wJA8zI2Q6v8rol2qpG/rvqsReco8zNMPvhQ==
acorn@^7.1.0:
version "7.1.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf"
integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==
ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
dependencies:
color-convert "^1.9.0"
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
buffer-from@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
chalk@^2.0.0:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
dependencies:
ansi-styles "^3.2.1"
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
color-convert@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
dependencies:
color-name "1.1.3"
color-name@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
combined-stream@^1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
dependencies:
delayed-stream "~1.0.0"
commander@^2.20.0:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
commondir@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=
convert-source-map@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442"
integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==
dependencies:
safe-buffer "~5.1.1"
debug@^4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
dependencies:
ms "^2.1.1"
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
estree-walker@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362"
integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==
esutils@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
find-cache-dir@^3.2.0:
version "3.3.1"
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880"
integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==
dependencies:
commondir "^1.0.1"
make-dir "^3.0.2"
pkg-dir "^4.1.0"
find-up@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
dependencies:
locate-path "^5.0.0"
path-exists "^4.0.0"
form-data@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682"
integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"
fs-extra@8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
dependencies:
graceful-fs "^4.2.0"
jsonfile "^4.0.0"
universalify "^0.1.0"
gensync@^1.0.0-beta.1:
version "1.0.0-beta.1"
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269"
integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==
globals@^11.1.0:
version "11.12.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
graceful-fs@^4.1.6, graceful-fs@^4.2.0:
version "4.2.3"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==
has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
isomorphic-unfetch@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.0.0.tgz#de6d80abde487b17de2c400a7ef9e5ecc2efb362"
integrity sha512-V0tmJSYfkKokZ5mgl0cmfQMTb7MLHsBMngTkbLY0eXvKqiVRRoZP04Ly+KhKrJfKtzC9E6Pp15Jo+bwh7Vi2XQ==
dependencies:
node-fetch "^2.2.0"
unfetch "^4.0.0"
jest-worker@^24.9.0:
version "24.9.0"
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5"
integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==
dependencies:
merge-stream "^2.0.0"
supports-color "^6.1.0"
js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
jsesc@^2.5.1:
version "2.5.2"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
json5@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6"
integrity sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==
dependencies:
minimist "^1.2.0"
jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
optionalDependencies:
graceful-fs "^4.1.6"
locate-path@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
dependencies:
p-locate "^4.1.0"
lodash@^4.17.13:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
make-dir@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392"
integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==
dependencies:
semver "^6.0.0"
merge-stream@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
mime-db@1.43.0:
version "1.43.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58"
integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==
mime-types@^2.1.12:
version "2.1.26"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06"
integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==
dependencies:
mime-db "1.43.0"
minimist@^1.2.0:
version "1.2.3"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.3.tgz#3db5c0765545ab8637be71f333a104a965a9ca3f"
integrity sha512-+bMdgqjMN/Z77a6NlY/I3U5LlRDbnmaAk6lDveAPKwSpcPM4tKAuYsvYF8xjhOPXhOYGe/73vVLVez5PW+jqhw==
ms@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
node-fetch@^2.2.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
p-limit@^2.2.0:
version "2.2.2"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e"
integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==
dependencies:
p-try "^2.0.0"
p-locate@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==
dependencies:
p-limit "^2.2.0"
p-try@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
path-exists@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
path-parse@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
pkg-dir@^4.1.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
dependencies:
find-up "^4.0.0"
resolve@1.15.1, resolve@^1.3.2:
version "1.15.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8"
integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==
dependencies:
path-parse "^1.0.6"
rollup-plugin-babel@^4.3.3:
version "4.4.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.4.0.tgz#d15bd259466a9d1accbdb2fe2fff17c52d030acb"
integrity sha512-Lek/TYp1+7g7I+uMfJnnSJ7YWoD58ajo6Oarhlex7lvUce+RCKRuGRSgztDO3/MF/PuGKmUL5iTHKf208UNszw==
dependencies:
"@babel/helper-module-imports" "^7.0.0"
rollup-pluginutils "^2.8.1"
rollup-plugin-terser@^5.2.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-5.3.0.tgz#9c0dd33d5771df9630cd027d6a2559187f65885e"
integrity sha512-XGMJihTIO3eIBsVGq7jiNYOdDMb3pVxuzY0uhOE/FM4x/u9nQgr3+McsjzqBn3QfHIpNSZmFnpoKAwHBEcsT7g==
dependencies:
"@babel/code-frame" "^7.5.5"
jest-worker "^24.9.0"
rollup-pluginutils "^2.8.2"
serialize-javascript "^2.1.2"
terser "^4.6.2"
rollup-plugin-typescript2@^0.26.0:
version "0.26.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.26.0.tgz#cee2b44d51d9623686656d76dc30a73c4de91672"
integrity sha512-lUK7XZVG77tu8dmv1L/0LZFlavED/5Yo6e4iMMl6fdox/yKdj4IFRRPPJEXNdmEaT1nDQQeCi7b5IwKHffMNeg==
dependencies:
find-cache-dir "^3.2.0"
fs-extra "8.1.0"
resolve "1.15.1"
rollup-pluginutils "2.8.2"
tslib "1.10.0"
rollup-pluginutils@2.8.2, rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2:
version "2.8.2"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e"
integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==
dependencies:
estree-walker "^0.6.1"
rollup@^1.31.1:
version "1.32.1"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.32.1.tgz#4480e52d9d9e2ae4b46ba0d9ddeaf3163940f9c4"
integrity sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A==
dependencies:
"@types/estree" "*"
"@types/node" "*"
acorn "^7.1.0"
safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
semver@^5.4.1:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
semver@^6.0.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
serialize-javascript@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61"
integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==
source-map-support@~0.5.12:
version "0.5.16"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042"
integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
source-map@^0.5.0:
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
source-map@^0.6.0, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
supports-color@^5.3.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
dependencies:
has-flag "^3.0.0"
supports-color@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3"
integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==
dependencies:
has-flag "^3.0.0"
terser@^4.6.2:
version "4.6.6"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.6.tgz#da2382e6cafbdf86205e82fb9a115bd664d54863"
integrity sha512-4lYPyeNmstjIIESr/ysHg2vUPRGf2tzF9z2yYwnowXVuVzLEamPN1Gfrz7f8I9uEPuHcbFlW4PLIAsJoxXyJ1g==
dependencies:
commander "^2.20.0"
source-map "~0.6.1"
source-map-support "~0.5.12"
to-fast-properties@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
tslib@1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
tslib@^1.10.0:
version "1.11.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35"
integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==
typescript@^3.7.5:
version "3.8.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
unfetch@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.1.0.tgz#6ec2dd0de887e58a4dee83a050ded80ffc4137db"
integrity sha512-crP/n3eAPUJxZXM9T80/yv0YhkTEx2K1D3h7D1AJM6fzsWZrxdyRuLN0JH/dkZh1LNH8LxCnBzoPFCPbb2iGpg==
universalify@^0.1.0:
version "0.1.2"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==