pokenode-ts 1.13.2 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
- ## [1.13.2](https://github.com/Gabb-c/pokenode-ts/compare/v1.13.1...v1.13.2) (2022-05-20)
1
+ # [1.16.0](https://github.com/Gabb-c/pokenode-ts/compare/v1.15.0...v1.16.0) (2022-07-15)
2
2
 
3
3
 
4
- ### Bug Fixes
4
+ ### Features
5
5
 
6
- * **models:** typo in chainlink [#463](https://github.com/Gabb-c/pokenode-ts/issues/463) ([61f98d0](https://github.com/Gabb-c/pokenode-ts/commit/61f98d0ea416ac153cbfbacba8de5b915e2d6b55))
6
+ * **constants:** update evolution triggers ([5af33dc](https://github.com/Gabb-c/pokenode-ts/commit/5af33dc1615a98cda6126d5a304f705e31ee2838))
7
+ * **constants:** update versions and version groups ([73e259d](https://github.com/Gabb-c/pokenode-ts/commit/73e259d67c71fedb61fdf6a0220d2f77d8e9bb28))
8
+ * **constants:** updatevitems ([79599e6](https://github.com/Gabb-c/pokenode-ts/commit/79599e687995da637bb1255910f88f931e647557))
package/README.md CHANGED
@@ -15,9 +15,9 @@ A lightweight Node.js wrapper for the PokéAPI with built-in types. An easy way
15
15
 
16
16
  ## Features
17
17
 
18
- - [Bulit-in typings](https://gabb-c.github.io/pokenode-ts/#/typings/berry-typings?id=berries)
19
- - [Axios with auto-cache requests](https://gabb-c.github.io/pokenode-ts/#/getting-started/cache)
20
- - [Logging configuration](https://gabb-c.github.io/pokenode-ts/#/getting-started/logs)
18
+ - [Built-in typings](https://pokenode-ts-docs-gabb-c.vercel.app/docs/typings/berry-typings)
19
+ - [Axios with auto-cache requests](https://pokenode-ts-docs-gabb-c.vercel.app/docs/guides/cache)
20
+ - [Logging configuration](https://pokenode-ts-docs-gabb-c.vercel.app/docs/guides/logs)
21
21
 
22
22
  ## Installation
23
23
 
@@ -29,7 +29,7 @@ yarn add pokenode-ts # Recommended
29
29
 
30
30
  ## Basic Example
31
31
 
32
- Using a client, like [PokemonClient](https://gabb-c.github.io/pokenode-ts/#/clients/pokemon-client):
32
+ Using a client, like [PokemonClient](https://pokenode-ts-docs-gabb-c.vercel.app/docs/clients/pokemon-client):
33
33
 
34
34
  ```js
35
35
  import { PokemonClient } from 'pokenode-ts';
@@ -9,7 +9,7 @@ const base_1 = require("../structures/base");
9
9
  *
10
10
  * Client used to access the Machine Endpoints:
11
11
  * - [Machines](https://pokeapi.co/docs/v2#machines)
12
- * ---
12
+ *
13
13
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#machines-section)
14
14
  */
15
15
  class MachineClient extends base_1.BaseClient {
@@ -7,5 +7,10 @@ var EvolutionTriggers;
7
7
  EvolutionTriggers[EvolutionTriggers["TRADE"] = 2] = "TRADE";
8
8
  EvolutionTriggers[EvolutionTriggers["USE_ITEM"] = 3] = "USE_ITEM";
9
9
  EvolutionTriggers[EvolutionTriggers["SHED"] = 4] = "SHED";
10
- EvolutionTriggers[EvolutionTriggers["OTHER"] = 5] = "OTHER";
10
+ EvolutionTriggers[EvolutionTriggers["SPIN"] = 5] = "SPIN";
11
+ EvolutionTriggers[EvolutionTriggers["TOWER_OF_DARKNESS"] = 6] = "TOWER_OF_DARKNESS";
12
+ EvolutionTriggers[EvolutionTriggers["TOWER_OF_WATER"] = 7] = "TOWER_OF_WATER";
13
+ EvolutionTriggers[EvolutionTriggers["THREE_CRITICAL_HITS"] = 8] = "THREE_CRITICAL_HITS";
14
+ EvolutionTriggers[EvolutionTriggers["TAKE_DAMAGE"] = 9] = "TAKE_DAMAGE";
15
+ EvolutionTriggers[EvolutionTriggers["OTHER"] = 10] = "OTHER";
11
16
  })(EvolutionTriggers = exports.EvolutionTriggers || (exports.EvolutionTriggers = {}));
@@ -79,6 +79,11 @@ var Versions;
79
79
  Versions[Versions["LETS_GO_EEVEE"] = 32] = "LETS_GO_EEVEE";
80
80
  Versions[Versions["SWORD"] = 33] = "SWORD";
81
81
  Versions[Versions["SHIELD"] = 34] = "SHIELD";
82
+ Versions[Versions["THE_ISLE_OF_ARMOR"] = 35] = "THE_ISLE_OF_ARMOR";
83
+ Versions[Versions["THE_CROWN_TUNDRA"] = 36] = "THE_CROWN_TUNDRA";
84
+ Versions[Versions["BRILLIANT_DIAMOND"] = 37] = "BRILLIANT_DIAMOND";
85
+ Versions[Versions["SHINING_PEARL"] = 38] = "SHINING_PEARL";
86
+ Versions[Versions["LEGENDS_ARCEUS"] = 39] = "LEGENDS_ARCEUS";
82
87
  })(Versions = exports.Versions || (exports.Versions = {}));
83
88
  var VersionGroups;
84
89
  (function (VersionGroups) {
@@ -102,4 +107,8 @@ var VersionGroups;
102
107
  VersionGroups[VersionGroups["ULTRA_SUN_ULTRA_MOON"] = 18] = "ULTRA_SUN_ULTRA_MOON";
103
108
  VersionGroups[VersionGroups["LETS_GO"] = 19] = "LETS_GO";
104
109
  VersionGroups[VersionGroups["SWORD_SHIELD"] = 20] = "SWORD_SHIELD";
110
+ VersionGroups[VersionGroups["THE_ISLE_OF_ARMOR"] = 21] = "THE_ISLE_OF_ARMOR";
111
+ VersionGroups[VersionGroups["THE_CROWN_TUNDRA"] = 22] = "THE_CROWN_TUNDRA";
112
+ VersionGroups[VersionGroups["BRILLIANT_DIAMOND_AND_SHINING_PEARL"] = 23] = "BRILLIANT_DIAMOND_AND_SHINING_PEARL";
113
+ VersionGroups[VersionGroups["LEGENDS_ARCEUS"] = 24] = "LEGENDS_ARCEUS";
105
114
  })(VersionGroups = exports.VersionGroups || (exports.VersionGroups = {}));
@@ -59,6 +59,11 @@ var ItemCategories;
59
59
  ItemCategories[ItemCategories["MEGA_STONES"] = 44] = "MEGA_STONES";
60
60
  ItemCategories[ItemCategories["MEMORIES"] = 45] = "MEMORIES";
61
61
  ItemCategories[ItemCategories["Z_CRYSTALS"] = 46] = "Z_CRYSTALS";
62
+ ItemCategories[ItemCategories["SPECIES_CANDIES"] = 47] = "SPECIES_CANDIES";
63
+ ItemCategories[ItemCategories["CATCHING_BONUS"] = 48] = "CATCHING_BONUS";
64
+ ItemCategories[ItemCategories["DYNAMAX_CRISTALS"] = 49] = "DYNAMAX_CRISTALS";
65
+ ItemCategories[ItemCategories["NATURE_MINTS"] = 50] = "NATURE_MINTS";
66
+ ItemCategories[ItemCategories["CURRY_INGREDIENTS"] = 51] = "CURRY_INGREDIENTS";
62
67
  })(ItemCategories = exports.ItemCategories || (exports.ItemCategories = {}));
63
68
  var ItemFlingEffects;
64
69
  (function (ItemFlingEffects) {
@@ -11,6 +11,7 @@ var Regions;
11
11
  Regions[Regions["KALOS"] = 6] = "KALOS";
12
12
  Regions[Regions["ALOLA"] = 7] = "ALOLA";
13
13
  Regions[Regions["GALAR"] = 8] = "GALAR";
14
+ Regions[Regions["HISUI"] = 9] = "HISUI";
14
15
  })(Regions = exports.Regions || (exports.Regions = {}));
15
16
  var PalParkAreas;
16
17
  (function (PalParkAreas) {
@@ -24,6 +24,7 @@ var MoveAilmtents;
24
24
  MoveAilmtents[MoveAilmtents["PERISH_SONG"] = 20] = "PERISH_SONG";
25
25
  MoveAilmtents[MoveAilmtents["INGRAIN"] = 21] = "INGRAIN";
26
26
  MoveAilmtents[MoveAilmtents["SILENCE"] = 24] = "SILENCE";
27
+ MoveAilmtents[MoveAilmtents["TAR_SHOT"] = 42] = "TAR_SHOT";
27
28
  })(MoveAilmtents = exports.MoveAilmtents || (exports.MoveAilmtents = {}));
28
29
  var MoveBattleStyles;
29
30
  (function (MoveBattleStyles) {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Generated by dts-bundle-generator v6.9.0
1
+ // Generated by dts-bundle-generator v6.12.0
2
2
 
3
3
  import { AxiosInstance } from 'axios';
4
4
  import { IAxiosCacheAdapterOptions } from 'axios-cache-adapter';
@@ -484,7 +484,7 @@ export interface PokemonEntry {
484
484
  /** The index of this Pokémon species entry within the Pokédex */
485
485
  entry_number: number;
486
486
  /** The Pokémon species being encountered */
487
- pokemon_species: NamedAPIResource[];
487
+ pokemon_species: NamedAPIResource;
488
488
  }
489
489
  /**
490
490
  * ## Pokedex
@@ -2697,7 +2697,7 @@ export declare class LocationClient extends BaseClient {
2697
2697
  *
2698
2698
  * Client used to access the Machine Endpoints:
2699
2699
  * - [Machines](https://pokeapi.co/docs/v2#machines)
2700
- * ---
2700
+ *
2701
2701
  * See [PokéAPI Documentation](https://pokeapi.co/docs/v2#machines-section)
2702
2702
  */
2703
2703
  export declare class MachineClient extends BaseClient {
@@ -3487,7 +3487,12 @@ export declare enum EvolutionTriggers {
3487
3487
  TRADE = 2,
3488
3488
  USE_ITEM = 3,
3489
3489
  SHED = 4,
3490
- OTHER = 5
3490
+ SPIN = 5,
3491
+ TOWER_OF_DARKNESS = 6,
3492
+ TOWER_OF_WATER = 7,
3493
+ THREE_CRITICAL_HITS = 8,
3494
+ TAKE_DAMAGE = 9,
3495
+ OTHER = 10
3491
3496
  }
3492
3497
  export declare enum Generations {
3493
3498
  GENERATION_I = 1,
@@ -3563,7 +3568,12 @@ export declare enum Versions {
3563
3568
  LETS_GO_PIKACHU = 31,
3564
3569
  LETS_GO_EEVEE = 32,
3565
3570
  SWORD = 33,
3566
- SHIELD = 34
3571
+ SHIELD = 34,
3572
+ THE_ISLE_OF_ARMOR = 35,
3573
+ THE_CROWN_TUNDRA = 36,
3574
+ BRILLIANT_DIAMOND = 37,
3575
+ SHINING_PEARL = 38,
3576
+ LEGENDS_ARCEUS = 39
3567
3577
  }
3568
3578
  export declare enum VersionGroups {
3569
3579
  RED_BLUE = 1,
@@ -3585,7 +3595,11 @@ export declare enum VersionGroups {
3585
3595
  SUN_MOON = 17,
3586
3596
  ULTRA_SUN_ULTRA_MOON = 18,
3587
3597
  LETS_GO = 19,
3588
- SWORD_SHIELD = 20
3598
+ SWORD_SHIELD = 20,
3599
+ THE_ISLE_OF_ARMOR = 21,
3600
+ THE_CROWN_TUNDRA = 22,
3601
+ BRILLIANT_DIAMOND_AND_SHINING_PEARL = 23,
3602
+ LEGENDS_ARCEUS = 24
3589
3603
  }
3590
3604
  export declare enum Regions {
3591
3605
  KANTO = 1,
@@ -3595,7 +3609,8 @@ export declare enum Regions {
3595
3609
  UNOVA = 5,
3596
3610
  KALOS = 6,
3597
3611
  ALOLA = 7,
3598
- GALAR = 8
3612
+ GALAR = 8,
3613
+ HISUI = 9
3599
3614
  }
3600
3615
  export declare enum PalParkAreas {
3601
3616
  FOREST = 1,
@@ -3625,7 +3640,8 @@ export declare enum MoveAilmtents {
3625
3640
  EMBARGO = 19,
3626
3641
  PERISH_SONG = 20,
3627
3642
  INGRAIN = 21,
3628
- SILENCE = 24
3643
+ SILENCE = 24,
3644
+ TAR_SHOT = 42
3629
3645
  }
3630
3646
  export declare enum MoveBattleStyles {
3631
3647
  ATTACK = 1,
@@ -3887,7 +3903,12 @@ export declare enum ItemCategories {
3887
3903
  MIRACLE_SHOOTER = 43,
3888
3904
  MEGA_STONES = 44,
3889
3905
  MEMORIES = 45,
3890
- Z_CRYSTALS = 46
3906
+ Z_CRYSTALS = 46,
3907
+ SPECIES_CANDIES = 47,
3908
+ CATCHING_BONUS = 48,
3909
+ DYNAMAX_CRISTALS = 49,
3910
+ NATURE_MINTS = 50,
3911
+ CURRY_INGREDIENTS = 51
3891
3912
  }
3892
3913
  export declare enum ItemFlingEffects {
3893
3914
  BADLY_POISON = 1,
package/jest.config.js ADDED
@@ -0,0 +1,25 @@
1
+ // @ts-check
2
+
3
+ /** @type {import('@jest/types').Config.InitialOptions} */
4
+ const jestConfig = {
5
+ displayName: 'pokenode-ts',
6
+ clearMocks: true,
7
+ testEnvironment: 'node',
8
+ transform: {
9
+ '^.+\\.(t|j)sx?$': '@swc/jest',
10
+ },
11
+ collectCoverageFrom: [
12
+ 'src/**/*.ts',
13
+ '!**/*.d.ts',
14
+ '!**/node_modules/**',
15
+ '!**/dist/**',
16
+ '!**/src/models/**',
17
+ '!**/src/constants/**',
18
+ '!**/src/config/**',
19
+ '!**/src/structures/**',
20
+ ],
21
+ testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)'],
22
+ testPathIgnorePatterns: ['/node_modules/', '/dist/'],
23
+ };
24
+
25
+ module.exports = jestConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pokenode-ts",
3
- "version": "1.13.2",
3
+ "version": "1.16.0",
4
4
  "private": false,
5
5
  "description": "A lightweight Node.js wrapper for the PokéAPI with built-in types.",
6
6
  "keywords": [
@@ -44,64 +44,58 @@
44
44
  "test:watch": "jest --watch --verbose --colors --expand --maxWorkers=25%",
45
45
  "types": "dts-bundle-generator --config dts-generator.json"
46
46
  },
47
- "config": {
48
- "commitizen": {
49
- "path": "@commitlint/cz-commitlint"
50
- }
51
- },
52
47
  "dependencies": {
53
48
  "axios": "^0.27.2",
54
49
  "axios-cache-adapter": "^2.7.3",
55
- "pino": "^7.11.0",
56
- "pino-pretty": "^7.6.1",
50
+ "pino": "^8.1.0",
51
+ "pino-pretty": "^8.1.0",
57
52
  "tslib": "^2.4.0"
58
53
  },
59
54
  "devDependencies": {
60
- "@babel/cli": "^7.17.10",
61
- "@babel/core": "^7.18.0",
62
- "@babel/node": "^7.17.10",
63
- "@babel/preset-env": "^7.18.0",
64
- "@babel/preset-typescript": "^7.17.12",
65
- "@commitlint/cli": "^17.0.0",
66
- "@commitlint/config-conventional": "^17.0.0",
55
+ "@babel/cli": "^7.18.6",
56
+ "@babel/core": "^7.18.6",
57
+ "@babel/node": "^7.18.6",
58
+ "@babel/preset-env": "^7.18.6",
59
+ "@babel/preset-typescript": "^7.18.6",
60
+ "@commitlint/cli": "^17.0.3",
61
+ "@commitlint/config-conventional": "^17.0.3",
67
62
  "@semantic-release/changelog": "^6.0.1",
68
63
  "@semantic-release/commit-analyzer": "^9.0.2",
69
64
  "@semantic-release/git": "^10.0.1",
70
- "@semantic-release/github": "^8.0.4",
65
+ "@semantic-release/github": "^8.0.5",
71
66
  "@semantic-release/npm": "^9.0.1",
72
67
  "@semantic-release/release-notes-generator": "^10.0.3",
73
- "@swc/core": "^1.2.187",
68
+ "@swc/core": "^1.2.215",
74
69
  "@swc/jest": "^0.2.21",
75
- "@types/jest": "^27.5.1",
76
- "@types/node": "^17.0.35",
77
- "@typescript-eslint/eslint-plugin": "^5.25.0",
78
- "@typescript-eslint/parser": "^5.25.0",
70
+ "@types/jest": "^28.1.5",
71
+ "@types/node": "^18.0.4",
72
+ "@typescript-eslint/eslint-plugin": "^5.30.6",
73
+ "@typescript-eslint/parser": "^5.30.6",
79
74
  "babel-plugin-module-resolver": "^4.1.0",
80
- "conventional-changelog-conventionalcommits": "^4.6.3",
81
- "dts-bundle-generator": "^6.9.0",
82
- "eslint": "^8.15.0",
75
+ "dts-bundle-generator": "^6.12.0",
76
+ "eslint": "^8.19.0",
83
77
  "eslint-config-airbnb-base": "^15.0.0",
84
78
  "eslint-config-airbnb-typescript": "^17.0.0",
85
79
  "eslint-config-node": "^4.1.0",
86
80
  "eslint-config-prettier": "^8.5.0",
87
81
  "eslint-plugin-eslint-comments": "^3.2.0",
88
82
  "eslint-plugin-import": "^2.26.0",
89
- "eslint-plugin-jest": "^26.2.2",
83
+ "eslint-plugin-jest": "^26.6.0",
90
84
  "eslint-plugin-node": "^11.1.0",
91
- "eslint-plugin-prettier": "^4.0.0",
85
+ "eslint-plugin-prettier": "^4.2.1",
92
86
  "eslint-plugin-promise": "^6.0.0",
93
- "eslint-plugin-unicorn": "^42.0.0",
87
+ "eslint-plugin-unicorn": "^43.0.1",
94
88
  "http-status-codes": "^2.2.0",
95
89
  "husky": "^8.0.1",
96
90
  "is-ci": "^3.0.1",
97
- "jest": "^28.1.0",
98
- "lint-staged": "^12.4.1",
99
- "lockfile-lint": "^4.7.4",
100
- "prettier": "^2.6.2",
101
- "semantic-release": "^19.0.2",
91
+ "jest": "^28.1.3",
92
+ "lint-staged": "^13.0.3",
93
+ "lockfile-lint": "^4.7.6",
94
+ "prettier": "^2.7.1",
95
+ "semantic-release": "^19.0.3",
102
96
  "sort-package-json": "^1.57.0",
103
- "ts-node-dev": "^1.1.8",
104
- "typescript": "^4.6.4"
97
+ "ts-node-dev": "^2.0.0",
98
+ "typescript": "^4.7.4"
105
99
  },
106
100
  "engines": {
107
101
  "node": ">=14"