pokenode-ts 1.17.0 → 1.18.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/README.md +0 -11
- package/lib/index.d.ts +4106 -0
- package/lib/index.global.js +133 -0
- package/lib/index.js +14 -0
- package/lib/index.mjs +14 -0
- package/package.json +71 -58
- package/CHANGELOG.md +0 -7
- package/dist/clients/berry.client.js +0 -156
- package/dist/clients/contest.client.js +0 -133
- package/dist/clients/encounter.client.js +0 -163
- package/dist/clients/evolution.client.js +0 -103
- package/dist/clients/game.client.js +0 -210
- package/dist/clients/index.js +0 -15
- package/dist/clients/item.client.js +0 -257
- package/dist/clients/location.client.js +0 -210
- package/dist/clients/machine.client.js +0 -54
- package/dist/clients/main.client.js +0 -48
- package/dist/clients/move.client.js +0 -351
- package/dist/clients/pokemon.client.js +0 -728
- package/dist/clients/utility.client.js +0 -82
- package/dist/config/logger.js +0 -28
- package/dist/constants/base.js +0 -7
- package/dist/constants/berries.js +0 -88
- package/dist/constants/contests.js +0 -11
- package/dist/constants/encounters.js +0 -88
- package/dist/constants/endpoints.js +0 -58
- package/dist/constants/evolutions.js +0 -16
- package/dist/constants/games.js +0 -114
- package/dist/constants/index.js +0 -15
- package/dist/constants/items.js +0 -88
- package/dist/constants/locations.js +0 -23
- package/dist/constants/moves.js +0 -88
- package/dist/constants/pokemons.js +0 -148
- package/dist/constants/utilities.js +0 -19
- package/dist/index.d.ts +0 -3933
- package/dist/index.js +0 -9
- package/dist/models/Berry/berry.js +0 -2
- package/dist/models/Berry/index.js +0 -4
- package/dist/models/Common/description.js +0 -2
- package/dist/models/Common/effect.js +0 -2
- package/dist/models/Common/encounter.js +0 -2
- package/dist/models/Common/flavor-text.js +0 -2
- package/dist/models/Common/generation.js +0 -2
- package/dist/models/Common/index.js +0 -14
- package/dist/models/Common/language.js +0 -2
- package/dist/models/Common/machine.js +0 -2
- package/dist/models/Common/name.js +0 -2
- package/dist/models/Common/resource.js +0 -2
- package/dist/models/Common/verbose.js +0 -2
- package/dist/models/Common/version.js +0 -2
- package/dist/models/Contest/contest.js +0 -2
- package/dist/models/Contest/index.js +0 -4
- package/dist/models/Encounter/encounter.js +0 -2
- package/dist/models/Encounter/index.js +0 -4
- package/dist/models/Evolution/evolution.js +0 -2
- package/dist/models/Evolution/index.js +0 -4
- package/dist/models/Game/generation.js +0 -2
- package/dist/models/Game/index.js +0 -7
- package/dist/models/Game/pokedex.js +0 -2
- package/dist/models/Game/pokemon-entry.js +0 -2
- package/dist/models/Game/version.js +0 -2
- package/dist/models/Item/index.js +0 -4
- package/dist/models/Item/item.js +0 -2
- package/dist/models/Location/encounter.js +0 -2
- package/dist/models/Location/index.js +0 -7
- package/dist/models/Location/location.js +0 -2
- package/dist/models/Location/palpark.js +0 -2
- package/dist/models/Location/region.js +0 -2
- package/dist/models/Machine/index.js +0 -4
- package/dist/models/Machine/machine.js +0 -2
- package/dist/models/Moves/index.js +0 -4
- package/dist/models/Moves/moves.js +0 -2
- package/dist/models/Pokemon/ability.js +0 -2
- package/dist/models/Pokemon/characteristics.js +0 -2
- package/dist/models/Pokemon/egg-group.js +0 -2
- package/dist/models/Pokemon/gender.js +0 -2
- package/dist/models/Pokemon/growth-rates.js +0 -2
- package/dist/models/Pokemon/index.js +0 -13
- package/dist/models/Pokemon/nature.js +0 -2
- package/dist/models/Pokemon/pokeathlon-stat.js +0 -2
- package/dist/models/Pokemon/pokemon.js +0 -2
- package/dist/models/Pokemon/stats.js +0 -2
- package/dist/models/Pokemon/type.js +0 -2
- package/dist/models/index.js +0 -14
- package/dist/structures/base.js +0 -29
- package/dist/structures/index.js +0 -4
- package/jest.config.js +0 -25
package/dist/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Constants = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
tslib_1.__exportStar(require("./models"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./clients"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./constants"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./structures"), exports);
|
|
9
|
-
exports.Constants = tslib_1.__importStar(require("./constants"));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./resource"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./language"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./name"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./description"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./effect"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./encounter"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./flavor-text"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./generation"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./machine"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./verbose"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./version"), exports);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./generation"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./pokedex"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./pokemon-entry"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./version"), exports);
|
package/dist/models/Item/item.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./encounter"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./location"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./palpark"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./region"), exports);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./ability"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./characteristics"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./egg-group"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./gender"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./growth-rates"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./nature"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./pokeathlon-stat"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./stats"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./type"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./pokemon"), exports);
|
package/dist/models/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./Berry"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./Common"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./Contest"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./Encounter"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./Evolution"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./Game"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./Item"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./Location"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./Machine"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./Moves"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./Pokemon"), exports);
|
package/dist/structures/base.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseClient = void 0;
|
|
4
|
-
const axios_cache_adapter_1 = require("axios-cache-adapter");
|
|
5
|
-
const constants_1 = require("../constants");
|
|
6
|
-
const logger_1 = require("../config/logger");
|
|
7
|
-
/**
|
|
8
|
-
* ### Base Client
|
|
9
|
-
*/
|
|
10
|
-
class BaseClient {
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
*/
|
|
14
|
-
constructor(clientOptions) {
|
|
15
|
-
var _a, _b, _c;
|
|
16
|
-
this.api = (0, axios_cache_adapter_1.setup)({
|
|
17
|
-
baseURL: (_a = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.baseURL) !== null && _a !== void 0 ? _a : constants_1.BaseURL.REST,
|
|
18
|
-
headers: {
|
|
19
|
-
'Content-Type': 'application/json',
|
|
20
|
-
},
|
|
21
|
-
cache: Object.assign({ maxAge: ((_b = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.cacheOptions) === null || _b === void 0 ? void 0 : _b.maxAge) || 0 }, clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.cacheOptions),
|
|
22
|
-
});
|
|
23
|
-
this.logger = (0, logger_1.createLogger)(Object.assign({ enabled: !(((_c = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.logOptions) === null || _c === void 0 ? void 0 : _c.enabled) === undefined ||
|
|
24
|
-
(clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.logOptions.enabled) === false) }, clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.logOptions));
|
|
25
|
-
this.api.interceptors.request.use((config) => (0, logger_1.handleRequest)(config, this.logger), (error) => (0, logger_1.handleRequestError)(error, this.logger));
|
|
26
|
-
this.api.interceptors.response.use((response) => (0, logger_1.handleResponse)(response, this.logger), (error) => (0, logger_1.handleResponseError)(error, this.logger));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.BaseClient = BaseClient;
|
package/dist/structures/index.js
DELETED
package/jest.config.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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;
|