pokemon-io-core 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/api/battle.d.ts +14 -0
  2. package/dist/api/battle.js +2 -0
  3. package/dist/api/room.d.ts +21 -0
  4. package/dist/api/room.js +2 -0
  5. package/dist/core/actions.d.ts +21 -0
  6. package/dist/core/actions.js +1 -0
  7. package/dist/core/amulets.d.ts +18 -0
  8. package/dist/core/amulets.js +1 -0
  9. package/dist/core/battleState.d.ts +37 -0
  10. package/dist/core/battleState.js +1 -0
  11. package/dist/core/engine.d.ts +45 -0
  12. package/dist/core/engine.js +481 -0
  13. package/dist/core/events.d.ts +67 -0
  14. package/dist/core/events.js +1 -0
  15. package/dist/core/fighters.d.ts +11 -0
  16. package/dist/core/fighters.js +1 -0
  17. package/dist/core/ids.d.ts +6 -0
  18. package/dist/core/ids.js +1 -0
  19. package/dist/core/index.d.ts +10 -0
  20. package/dist/core/index.js +10 -0
  21. package/dist/core/items.d.ts +10 -0
  22. package/dist/core/items.js +1 -0
  23. package/dist/core/moves.d.ts +58 -0
  24. package/dist/core/moves.js +1 -0
  25. package/dist/core/status.d.ts +11 -0
  26. package/dist/core/status.js +1 -0
  27. package/dist/core/types.d.ts +14 -0
  28. package/dist/core/types.js +1 -0
  29. package/dist/engine/pokemonBattleService.d.ts +6 -0
  30. package/dist/engine/pokemonBattleService.js +32 -0
  31. package/dist/modules/auth/auth.schemas.d.ts +24 -0
  32. package/dist/modules/auth/auth.schemas.js +26 -0
  33. package/dist/modules/auth/index.d.ts +1 -0
  34. package/dist/modules/auth/index.js +1 -0
  35. package/dist/modules/enfrentamiento/enfrentamiento.enum.d.ts +13 -0
  36. package/dist/modules/enfrentamiento/enfrentamiento.enum.js +15 -0
  37. package/dist/modules/enfrentamiento/enfrentamiento.schemas.d.ts +22 -0
  38. package/dist/modules/enfrentamiento/enfrentamiento.schemas.js +17 -0
  39. package/dist/modules/enfrentamiento/enfrentamiento.types.d.ts +19 -0
  40. package/dist/modules/enfrentamiento/enfrentamiento.types.js +1 -0
  41. package/dist/modules/enfrentamiento/index.d.ts +3 -0
  42. package/dist/modules/enfrentamiento/index.js +3 -0
  43. package/dist/modules/equipos/equipos.enum.d.ts +5 -0
  44. package/dist/modules/equipos/equipos.enum.js +6 -0
  45. package/dist/modules/equipos/equipos.schemas.d.ts +20 -0
  46. package/dist/modules/equipos/equipos.schemas.js +20 -0
  47. package/dist/modules/equipos/equipos.types.d.ts +14 -0
  48. package/dist/modules/equipos/equipos.types.js +1 -0
  49. package/dist/modules/equipos/index.d.ts +3 -0
  50. package/dist/modules/equipos/index.js +3 -0
  51. package/dist/modules/liga/index.d.ts +3 -0
  52. package/dist/modules/liga/index.js +3 -0
  53. package/dist/modules/liga/liga.enum.d.ts +14 -0
  54. package/dist/modules/liga/liga.enum.js +17 -0
  55. package/dist/modules/liga/liga.schemas.d.ts +59 -0
  56. package/dist/modules/liga/liga.schemas.js +41 -0
  57. package/dist/modules/liga/liga.types.d.ts +25 -0
  58. package/dist/modules/liga/liga.types.js +1 -0
  59. package/dist/modules/user/index.d.ts +2 -0
  60. package/dist/modules/user/index.js +2 -0
  61. package/dist/modules/user/user.schemas.d.ts +15 -0
  62. package/dist/modules/user/user.schemas.js +15 -0
  63. package/dist/modules/user/user.types.d.ts +16 -0
  64. package/dist/modules/user/user.types.js +1 -0
  65. package/dist/shared/enums.d.ts +0 -0
  66. package/dist/shared/enums.js +1 -0
  67. package/dist/skins/CombatSkin.d.ts +17 -0
  68. package/dist/skins/CombatSkin.js +1 -0
  69. package/dist/skins/pokemon/fighters.d.ts +2 -0
  70. package/dist/skins/pokemon/fighters.js +37 -0
  71. package/dist/skins/pokemon/index.d.ts +3 -0
  72. package/dist/skins/pokemon/index.js +3 -0
  73. package/dist/skins/pokemon/moves.d.ts +2 -0
  74. package/dist/skins/pokemon/moves.js +83 -0
  75. package/dist/skins/pokemon/pokemonSkin.d.ts +13 -0
  76. package/dist/skins/pokemon/pokemonSkin.js +56 -0
  77. package/dist/skins/pokemon/types.d.ts +12 -0
  78. package/dist/skins/pokemon/types.js +78 -0
  79. package/dist/utils/logger.d.ts +9 -0
  80. package/dist/utils/logger.js +15 -0
  81. package/package.json +55 -0
@@ -0,0 +1,41 @@
1
+ import { z } from "zod";
2
+ import { EstadoLiga, TipoFutbolin } from "./liga.enum.js";
3
+ const ConfiguracionLigaSchema = z.object({
4
+ partidosPorEnfrentamiento: z
5
+ .number()
6
+ .int()
7
+ .min(1, "Debe haber al menos un partido por enfrentamiento")
8
+ .default(3),
9
+ golesParaGanar: z
10
+ .number()
11
+ .int()
12
+ .min(1, "Debe haber al menos un gol para ganar")
13
+ .default(10),
14
+ idaYVuelta: z.boolean().default(false),
15
+ });
16
+ export const CrearLigaSchema = z.object({
17
+ nombre: z.string().min(3, "El nombre es obligatorio").trim(),
18
+ descripcion: z.string().optional(),
19
+ tipoFutbolin: z.enum(TipoFutbolin),
20
+ estadoLiga: z.enum(EstadoLiga).default(EstadoLiga.SinEmpezar),
21
+ premio: z.string().optional(),
22
+ normas: z.string().optional(),
23
+ ubicaciones: z.array(z.string()).default([]),
24
+ configuracion: ConfiguracionLigaSchema.optional(),
25
+ });
26
+ export const InscribirEquipoSchema = z.object({
27
+ equipoId: z.string().min(1, "Se requiere el ID del equipo"),
28
+ });
29
+ export const InscribirEquipoParamsSchema = z.object({ id: z.string() });
30
+ export const AprobarInscripcionSchema = z.object({
31
+ aprobar: z.boolean(),
32
+ });
33
+ export const CambiarEstadoLigaSchema = z.object({
34
+ nuevoEstado: z.enum(EstadoLiga),
35
+ });
36
+ export const GetLigaParamsSchema = z.object({ id: z.string() });
37
+ export const GetEquiposLigaParamsSchema = z.object({ id: z.string() });
38
+ export const AprobarInscripcionParamsSchema = z.object({ id: z.string(), equipoId: z.string() });
39
+ export const CambiarEstadoLigaParamsSchema = z.object({ id: z.string() });
40
+ export const MarcarPagadoParamsSchema = z.object({ id: z.string(), equipoId: z.string() });
41
+ export const GetClasificacionParamsSchema = z.object({ id: z.string() });
@@ -0,0 +1,25 @@
1
+ import { EquipoDTO } from "../equipos";
2
+ import { EstadoEquipoEnLiga, EstadoLiga, TipoFutbolin } from "./liga.enum.js";
3
+ export interface LigaDTO {
4
+ id: string;
5
+ nombre: string;
6
+ descripcion: string;
7
+ tipoFutbolin: TipoFutbolin;
8
+ estadoLiga: EstadoLiga;
9
+ ubicaciones: string[];
10
+ premio: string;
11
+ normas: string;
12
+ configuracion: ConfiguracionLigaDTO;
13
+ equipos: EquipoEnLigaDTO[];
14
+ createdBy: string;
15
+ }
16
+ export interface EquipoEnLigaDTO {
17
+ equipo: EquipoDTO;
18
+ pagado: boolean;
19
+ estado: EstadoEquipoEnLiga;
20
+ }
21
+ export interface ConfiguracionLigaDTO {
22
+ partidosPorEnfrentamiento: number;
23
+ golesParaGanar: number;
24
+ idaYVuelta: boolean;
25
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './user.types.js';
2
+ export * from './user.schemas.js';
@@ -0,0 +1,2 @@
1
+ export * from './user.types.js';
2
+ export * from './user.schemas.js';
@@ -0,0 +1,15 @@
1
+ import { z } from "zod";
2
+ export declare const GetUserByIdParamsSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ }, z.core.$strip>;
5
+ export type GetUserByIdParams = z.infer<typeof GetUserByIdParamsSchema>;
6
+ export declare const UpdateUserSchema: z.ZodObject<{
7
+ nombre: z.ZodOptional<z.ZodString>;
8
+ telefono: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ export type UpdateUserBody = z.infer<typeof UpdateUserSchema>;
11
+ export declare const BuscarUsuariosQuery: z.ZodObject<{
12
+ q: z.ZodString;
13
+ limit: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
14
+ }, z.core.$strip>;
15
+ export type BuscarUsuariosQueryType = z.infer<typeof BuscarUsuariosQuery>;
@@ -0,0 +1,15 @@
1
+ import { z } from "zod";
2
+ export const GetUserByIdParamsSchema = z.object({
3
+ id: z.string().min(1, "El id de usuario es obligatorio"),
4
+ });
5
+ export const UpdateUserSchema = z.object({
6
+ nombre: z.string().min(1, "El nombre es obligatorio").optional(),
7
+ telefono: z.string().optional(),
8
+ });
9
+ export const BuscarUsuariosQuery = z.object({
10
+ q: z.string().min(1, "El parámetro 'q' es requerido"),
11
+ limit: z
12
+ .string()
13
+ .transform((v) => parseInt(v))
14
+ .refine((v) => !isNaN(v) && v > 0 && v <= 50, "Limit inválido")
15
+ });
@@ -0,0 +1,16 @@
1
+ export interface UserDTO {
2
+ id: string;
3
+ username: string;
4
+ nombre: string;
5
+ email: string;
6
+ movil: string;
7
+ verified: boolean;
8
+ admin: boolean;
9
+ createdAt: Date;
10
+ }
11
+ export interface SearchUserDTO {
12
+ id: string;
13
+ username: string;
14
+ nombre: string;
15
+ email: string;
16
+ }
@@ -0,0 +1 @@
1
+ export {};
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,17 @@
1
+ import type { TypeDefinition, TypeEffectivenessMatrix, MoveDefinition, ItemDefinition, AmuletDefinition, StatusDefinition } from "../core";
2
+ import type { PlayerBattleConfig } from "../core/engine";
3
+ export interface FighterLoadout {
4
+ fighterId: string | null;
5
+ itemIds: string[];
6
+ amuletId: string | null;
7
+ }
8
+ export interface CombatSkin {
9
+ readonly id: string;
10
+ getTypes(): TypeDefinition[];
11
+ getTypeEffectiveness(): TypeEffectivenessMatrix;
12
+ getMoves(): MoveDefinition[];
13
+ getItems(): ItemDefinition[];
14
+ getAmulets(): AmuletDefinition[];
15
+ getStatuses(): StatusDefinition[];
16
+ buildPlayerConfig(loadout: FighterLoadout): PlayerBattleConfig;
17
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { FighterDefinition } from "../../core";
2
+ export declare const POKEMON_FIGHTERS: FighterDefinition[];
@@ -0,0 +1,37 @@
1
+ import { POKEMON_TYPE_IDS } from "./types";
2
+ const makeStats = (offense, defense, speed, crit) => ({
3
+ offense,
4
+ defense,
5
+ speed,
6
+ crit
7
+ });
8
+ export const POKEMON_FIGHTERS = [
9
+ {
10
+ id: "pikachu",
11
+ name: "Pikachu",
12
+ classId: POKEMON_TYPE_IDS.electric,
13
+ baseStats: makeStats(55, 40, 90, 15),
14
+ recommendedMoves: ["tackle", "thunder_shock"]
15
+ },
16
+ {
17
+ id: "charizard",
18
+ name: "Charizard",
19
+ classId: POKEMON_TYPE_IDS.fire,
20
+ baseStats: makeStats(84, 78, 100, 10),
21
+ recommendedMoves: ["tackle", "ember"]
22
+ },
23
+ {
24
+ id: "blastoise",
25
+ name: "Blastoise",
26
+ classId: POKEMON_TYPE_IDS.water,
27
+ baseStats: makeStats(83, 100, 78, 8),
28
+ recommendedMoves: ["tackle", "water_gun"]
29
+ },
30
+ {
31
+ id: "venusaur",
32
+ name: "Venusaur",
33
+ classId: POKEMON_TYPE_IDS.grass,
34
+ baseStats: makeStats(82, 83, 80, 8),
35
+ recommendedMoves: ["tackle", "vine_whip"]
36
+ }
37
+ ];
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./moves";
3
+ export * from "./fighters";
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./moves";
3
+ export * from "./fighters";
@@ -0,0 +1,2 @@
1
+ import type { MoveDefinition } from "../../core";
2
+ export declare const POKEMON_MOVES: MoveDefinition[];
@@ -0,0 +1,83 @@
1
+ import { POKEMON_TYPE_IDS } from "./types";
2
+ export const POKEMON_MOVES = [
3
+ {
4
+ id: "tackle",
5
+ name: "Placaje",
6
+ typeId: POKEMON_TYPE_IDS.normal,
7
+ kind: "damage",
8
+ basePower: 40,
9
+ accuracy: 100,
10
+ maxPP: 35,
11
+ priority: 0,
12
+ target: "enemy",
13
+ effects: [
14
+ {
15
+ kind: "damage"
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ id: "ember",
21
+ name: "Ascuas",
22
+ typeId: POKEMON_TYPE_IDS.fire,
23
+ kind: "damage",
24
+ basePower: 40,
25
+ accuracy: 100,
26
+ maxPP: 25,
27
+ priority: 0,
28
+ target: "enemy",
29
+ effects: [
30
+ {
31
+ kind: "damage"
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ id: "water_gun",
37
+ name: "Pistola Agua",
38
+ typeId: POKEMON_TYPE_IDS.water,
39
+ kind: "damage",
40
+ basePower: 40,
41
+ accuracy: 100,
42
+ maxPP: 25,
43
+ priority: 0,
44
+ target: "enemy",
45
+ effects: [
46
+ {
47
+ kind: "damage"
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ id: "vine_whip",
53
+ name: "Látigo Cepa",
54
+ typeId: POKEMON_TYPE_IDS.grass,
55
+ kind: "damage",
56
+ basePower: 45,
57
+ accuracy: 100,
58
+ maxPP: 25,
59
+ priority: 0,
60
+ target: "enemy",
61
+ effects: [
62
+ {
63
+ kind: "damage"
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ id: "thunder_shock",
69
+ name: "Impactrueno",
70
+ typeId: POKEMON_TYPE_IDS.electric,
71
+ kind: "damage",
72
+ basePower: 40,
73
+ accuracy: 100,
74
+ maxPP: 30,
75
+ priority: 0,
76
+ target: "enemy",
77
+ effects: [
78
+ {
79
+ kind: "damage"
80
+ }
81
+ ]
82
+ }
83
+ ];
@@ -0,0 +1,13 @@
1
+ import type { CombatSkin, FighterLoadout } from "../CombatSkin";
2
+ import type { MoveDefinition } from "../../core";
3
+ import { PlayerBattleConfig } from "../../core/engine";
4
+ export declare class PokemonSkin implements CombatSkin {
5
+ readonly id = "pokemon";
6
+ getTypes(): import("../../core").TypeDefinition[];
7
+ getTypeEffectiveness(): import("../../core").TypeEffectivenessMatrix;
8
+ getMoves(): MoveDefinition[];
9
+ getItems(): never[];
10
+ getAmulets(): never[];
11
+ getStatuses(): never[];
12
+ buildPlayerConfig(loadout: FighterLoadout): PlayerBattleConfig;
13
+ }
@@ -0,0 +1,56 @@
1
+ import { POKEMON_TYPES, POKEMON_TYPE_MATRIX, POKEMON_MOVES, POKEMON_FIGHTERS } from "./index";
2
+ const MAX_HP_DEFAULT = 100;
3
+ const findPokemonById = (id) => {
4
+ const lower = id.toLowerCase();
5
+ return (POKEMON_FIGHTERS.find((f) => f.id.toLowerCase() === lower || f.name.toLowerCase() === lower) ?? null);
6
+ };
7
+ const findMovesForFighter = (fighter) => {
8
+ const moveIds = fighter.recommendedMoves ?? [];
9
+ const moves = POKEMON_MOVES.filter((m) => moveIds.includes(m.id));
10
+ if (moves.length >= 4) {
11
+ return moves.slice(0, 4);
12
+ }
13
+ const result = [...moves];
14
+ const filler = POKEMON_MOVES.find((m) => m.id === "tackle");
15
+ while (result.length < 4 && filler) {
16
+ result.push(filler);
17
+ }
18
+ return result;
19
+ };
20
+ export class PokemonSkin {
21
+ id = "pokemon";
22
+ getTypes() {
23
+ return POKEMON_TYPES;
24
+ }
25
+ getTypeEffectiveness() {
26
+ return POKEMON_TYPE_MATRIX;
27
+ }
28
+ getMoves() {
29
+ return POKEMON_MOVES;
30
+ }
31
+ getItems() {
32
+ return []; // más adelante
33
+ }
34
+ getAmulets() {
35
+ return []; // más adelante
36
+ }
37
+ getStatuses() {
38
+ return []; // más adelante
39
+ }
40
+ buildPlayerConfig(loadout) {
41
+ if (!loadout.fighterId) {
42
+ throw new Error("FighterId is required in FighterLoadout");
43
+ }
44
+ const fighter = findPokemonById(loadout.fighterId);
45
+ if (!fighter) {
46
+ throw new Error(`Unknown fighterId for Pokemon skin: ${loadout.fighterId}`);
47
+ }
48
+ return {
49
+ fighter,
50
+ maxHp: MAX_HP_DEFAULT,
51
+ moves: findMovesForFighter(fighter),
52
+ items: [], // luego mapearemos loadout.itemIds
53
+ amulet: null // loadout.amuletId
54
+ };
55
+ }
56
+ }
@@ -0,0 +1,12 @@
1
+ import type { TypeDefinition, TypeEffectivenessMatrix, TypeId } from "../../core";
2
+ export declare const POKEMON_TYPE_IDS: {
3
+ readonly normal: "normal";
4
+ readonly fire: "fire";
5
+ readonly water: "water";
6
+ readonly grass: "grass";
7
+ readonly electric: "electric";
8
+ };
9
+ export type PokemonTypeId = (typeof POKEMON_TYPE_IDS)[keyof typeof POKEMON_TYPE_IDS];
10
+ export declare const POKEMON_TYPES: TypeDefinition[];
11
+ export declare const POKEMON_TYPE_MATRIX: TypeEffectivenessMatrix;
12
+ export declare const getPokemonTypeEffectiveness: (attackerTypeId: TypeId, defenderTypeId: TypeId) => number;
@@ -0,0 +1,78 @@
1
+ export const POKEMON_TYPE_IDS = {
2
+ normal: "normal",
3
+ fire: "fire",
4
+ water: "water",
5
+ grass: "grass",
6
+ electric: "electric"
7
+ };
8
+ export const POKEMON_TYPES = [
9
+ {
10
+ id: POKEMON_TYPE_IDS.normal,
11
+ displayName: "Normal",
12
+ color: "#A8A77A"
13
+ },
14
+ {
15
+ id: POKEMON_TYPE_IDS.fire,
16
+ displayName: "Fuego",
17
+ color: "#EE8130"
18
+ },
19
+ {
20
+ id: POKEMON_TYPE_IDS.water,
21
+ displayName: "Agua",
22
+ color: "#6390F0"
23
+ },
24
+ {
25
+ id: POKEMON_TYPE_IDS.grass,
26
+ displayName: "Planta",
27
+ color: "#7AC74C"
28
+ },
29
+ {
30
+ id: POKEMON_TYPE_IDS.electric,
31
+ displayName: "Eléctrico",
32
+ color: "#F7D02C"
33
+ }
34
+ ];
35
+ // Matriz muy simplificada, inspirada en Pokémon
36
+ export const POKEMON_TYPE_MATRIX = {
37
+ [POKEMON_TYPE_IDS.normal]: {
38
+ [POKEMON_TYPE_IDS.normal]: 1,
39
+ [POKEMON_TYPE_IDS.fire]: 1,
40
+ [POKEMON_TYPE_IDS.water]: 1,
41
+ [POKEMON_TYPE_IDS.grass]: 1,
42
+ [POKEMON_TYPE_IDS.electric]: 1
43
+ },
44
+ [POKEMON_TYPE_IDS.fire]: {
45
+ [POKEMON_TYPE_IDS.normal]: 1,
46
+ [POKEMON_TYPE_IDS.fire]: 0.5,
47
+ [POKEMON_TYPE_IDS.water]: 0.5,
48
+ [POKEMON_TYPE_IDS.grass]: 2,
49
+ [POKEMON_TYPE_IDS.electric]: 1
50
+ },
51
+ [POKEMON_TYPE_IDS.water]: {
52
+ [POKEMON_TYPE_IDS.normal]: 1,
53
+ [POKEMON_TYPE_IDS.fire]: 2,
54
+ [POKEMON_TYPE_IDS.water]: 0.5,
55
+ [POKEMON_TYPE_IDS.grass]: 0.5,
56
+ [POKEMON_TYPE_IDS.electric]: 1
57
+ },
58
+ [POKEMON_TYPE_IDS.grass]: {
59
+ [POKEMON_TYPE_IDS.normal]: 1,
60
+ [POKEMON_TYPE_IDS.fire]: 0.5,
61
+ [POKEMON_TYPE_IDS.water]: 2,
62
+ [POKEMON_TYPE_IDS.grass]: 0.5,
63
+ [POKEMON_TYPE_IDS.electric]: 1
64
+ },
65
+ [POKEMON_TYPE_IDS.electric]: {
66
+ [POKEMON_TYPE_IDS.normal]: 1,
67
+ [POKEMON_TYPE_IDS.fire]: 1,
68
+ [POKEMON_TYPE_IDS.water]: 2,
69
+ [POKEMON_TYPE_IDS.grass]: 0.5,
70
+ [POKEMON_TYPE_IDS.electric]: 0.5
71
+ }
72
+ };
73
+ export const getPokemonTypeEffectiveness = (attackerTypeId, defenderTypeId) => {
74
+ const row = POKEMON_TYPE_MATRIX[attackerTypeId];
75
+ if (!row)
76
+ return 1;
77
+ return row[defenderTypeId] ?? 1;
78
+ };
@@ -0,0 +1,9 @@
1
+ export interface Logger {
2
+ info(message: string): void;
3
+ error(message: string, error?: unknown): void;
4
+ }
5
+ export declare class ConsoleLogger implements Logger {
6
+ info(message: string): void;
7
+ error(message: string, error?: unknown): void;
8
+ }
9
+ export declare const logger: ConsoleLogger;
@@ -0,0 +1,15 @@
1
+ export class ConsoleLogger {
2
+ info(message) {
3
+ // Podríamos mejorar formateo más adelante
4
+ console.log(`[INFO] ${message}`);
5
+ }
6
+ error(message, error) {
7
+ if (error) {
8
+ console.error(`[ERROR] ${message}`, error);
9
+ }
10
+ else {
11
+ console.error(`[ERROR] ${message}`);
12
+ }
13
+ }
14
+ }
15
+ export const logger = new ConsoleLogger();
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "pokemon-io-core",
3
+ "version": "0.0.1",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "type": "module",
7
+ "private": false,
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "types": "./dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "import": "./dist/index.js",
18
+ "types": "./dist/index.d.ts"
19
+ },
20
+ "./core": {
21
+ "import": "./dist/core/index.js",
22
+ "types": "./dist/core/index.d.ts"
23
+ }
24
+ },
25
+ "typesVersions": {
26
+ "*": {
27
+ "api": [
28
+ "dist/api/*"
29
+ ],
30
+ "core": [
31
+ "dist/core/*"
32
+ ],
33
+ "skins": [
34
+ "dist/skins/*"
35
+ ],
36
+ "engine": [
37
+ "dist/engine/*"
38
+ ]
39
+ }
40
+ },
41
+ "scripts": {
42
+ "build": "tsc -p .",
43
+ "prepublishOnly": "pnpm run build",
44
+ "publish": "npm publish --access public"
45
+ },
46
+ "keywords": [],
47
+ "author": "",
48
+ "license": "ISC",
49
+ "dependencies": {
50
+ "tsup": "^8.5.1"
51
+ },
52
+ "devDependencies": {
53
+ "typescript": "^5.8.3"
54
+ }
55
+ }