mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-07 17:02:16 +02:00
chore: cleanup
This commit is contained in:
parent
f8337cc8a3
commit
1bf58a44a0
261
package-lock.json
generated
261
package-lock.json
generated
@ -1097,53 +1097,6 @@
|
|||||||
"url": "https://github.com/sponsors/nzakas"
|
"url": "https://github.com/sponsors/nzakas"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@isaacs/cliui": {
|
|
||||||
"version": "8.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
|
||||||
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
|
||||||
"string-width": "^5.1.2",
|
|
||||||
"string-width-cjs": "npm:string-width@^4.2.0",
|
|
||||||
"strip-ansi": "^7.0.1",
|
|
||||||
"strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
|
|
||||||
"wrap-ansi": "^8.1.0",
|
|
||||||
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@isaacs/cliui/node_modules/ansi-regex": {
|
|
||||||
"version": "6.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
|
|
||||||
"integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@isaacs/cliui/node_modules/strip-ansi": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-regex": "^6.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@inquirer/confirm": {
|
"node_modules/@inquirer/confirm": {
|
||||||
"version": "3.1.9",
|
"version": "3.1.9",
|
||||||
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/@inquirer/confirm/-/confirm-3.1.9.tgz",
|
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/@inquirer/confirm/-/confirm-3.1.9.tgz",
|
||||||
@ -1230,6 +1183,13 @@
|
|||||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@inquirer/core/node_modules/emoji-regex": {
|
||||||
|
"version": "8.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||||
|
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@inquirer/core/node_modules/has-flag": {
|
"node_modules/@inquirer/core/node_modules/has-flag": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/has-flag/-/has-flag-4.0.0.tgz",
|
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/has-flag/-/has-flag-4.0.0.tgz",
|
||||||
@ -1239,6 +1199,21 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@inquirer/core/node_modules/string-width": {
|
||||||
|
"version": "4.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||||
|
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"emoji-regex": "^8.0.0",
|
||||||
|
"is-fullwidth-code-point": "^3.0.0",
|
||||||
|
"strip-ansi": "^6.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@inquirer/core/node_modules/supports-color": {
|
"node_modules/@inquirer/core/node_modules/supports-color": {
|
||||||
"version": "7.2.0",
|
"version": "7.2.0",
|
||||||
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/supports-color/-/supports-color-7.2.0.tgz",
|
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/supports-color/-/supports-color-7.2.0.tgz",
|
||||||
@ -1251,6 +1226,21 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@inquirer/core/node_modules/wrap-ansi": {
|
||||||
|
"version": "6.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
|
||||||
|
"integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-styles": "^4.0.0",
|
||||||
|
"string-width": "^4.1.0",
|
||||||
|
"strip-ansi": "^6.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@inquirer/figures": {
|
"node_modules/@inquirer/figures": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/@inquirer/figures/-/figures-1.0.3.tgz",
|
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/@inquirer/figures/-/figures-1.0.3.tgz",
|
||||||
@ -1269,6 +1259,53 @@
|
|||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@isaacs/cliui": {
|
||||||
|
"version": "8.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
||||||
|
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"string-width": "^5.1.2",
|
||||||
|
"string-width-cjs": "npm:string-width@^4.2.0",
|
||||||
|
"strip-ansi": "^7.0.1",
|
||||||
|
"strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
|
||||||
|
"wrap-ansi": "^8.1.0",
|
||||||
|
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@isaacs/cliui/node_modules/ansi-regex": {
|
||||||
|
"version": "6.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
|
||||||
|
"integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@isaacs/cliui/node_modules/strip-ansi": {
|
||||||
|
"version": "7.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
|
||||||
|
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": "^6.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@istanbuljs/schema": {
|
"node_modules/@istanbuljs/schema": {
|
||||||
"version": "0.1.3",
|
"version": "0.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
|
||||||
@ -1401,6 +1438,31 @@
|
|||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@open-draft/deferred-promise": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@open-draft/logger": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"is-node-process": "^1.2.0",
|
||||||
|
"outvariant": "^1.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@open-draft/until": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@pkgjs/parseargs": {
|
"node_modules/@pkgjs/parseargs": {
|
||||||
"version": "0.11.0",
|
"version": "0.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
|
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
|
||||||
@ -1695,6 +1757,12 @@
|
|||||||
"eslint": ">=8.40.0"
|
"eslint": ">=8.40.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/cookie": {
|
||||||
|
"version": "0.6.0",
|
||||||
|
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/@types/cookie/-/cookie-0.6.0.tgz",
|
||||||
|
"integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/@types/eslint": {
|
"node_modules/@types/eslint": {
|
||||||
"version": "8.56.11",
|
"version": "8.56.11",
|
||||||
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.11.tgz",
|
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.11.tgz",
|
||||||
@ -1706,12 +1774,6 @@
|
|||||||
"@types/json-schema": "*"
|
"@types/json-schema": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/cookie": {
|
|
||||||
"version": "0.6.0",
|
|
||||||
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/@types/cookie/-/cookie-0.6.0.tgz",
|
|
||||||
"integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/@types/estree": {
|
"node_modules/@types/estree": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
||||||
@ -1765,6 +1827,13 @@
|
|||||||
"undici-types": "~5.26.4"
|
"undici-types": "~5.26.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/statuses": {
|
||||||
|
"version": "2.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.5.tgz",
|
||||||
|
"integrity": "sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@types/tough-cookie": {
|
"node_modules/@types/tough-cookie": {
|
||||||
"version": "4.0.5",
|
"version": "4.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz",
|
||||||
@ -1778,6 +1847,13 @@
|
|||||||
"integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==",
|
"integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/wrap-ansi": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||||
"version": "8.0.0-alpha.58",
|
"version": "8.0.0-alpha.58",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.0.0-alpha.58.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.0.0-alpha.58.tgz",
|
||||||
@ -2422,6 +2498,29 @@
|
|||||||
"node": ">= 16"
|
"node": ">= 16"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/cli-spinners": {
|
||||||
|
"version": "2.9.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz",
|
||||||
|
"integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/cli-width": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "ISC",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 12"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/cliui": {
|
"node_modules/cliui": {
|
||||||
"version": "8.0.1",
|
"version": "8.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
|
||||||
@ -2532,6 +2631,16 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/cookie": {
|
||||||
|
"version": "0.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
|
||||||
|
"integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/cross-fetch": {
|
"node_modules/cross-fetch": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz",
|
||||||
@ -3460,6 +3569,16 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/graphql": {
|
||||||
|
"version": "16.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz",
|
||||||
|
"integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/has-flag": {
|
"node_modules/has-flag": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||||
@ -4921,6 +5040,13 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
|
"node_modules/path-to-regexp": {
|
||||||
|
"version": "6.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz",
|
||||||
|
"integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/path-type": {
|
"node_modules/path-type": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
|
||||||
@ -5171,10 +5297,9 @@
|
|||||||
},
|
},
|
||||||
"node_modules/require-directory": {
|
"node_modules/require-directory": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/require-directory/-/require-directory-2.1.1.tgz",
|
||||||
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
|
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
@ -5189,15 +5314,6 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/require-directory": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/require-directory/-/require-directory-2.1.1.tgz",
|
|
||||||
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/requires-port": {
|
"node_modules/requires-port": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||||
@ -5462,6 +5578,13 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/strict-event-emitter": {
|
||||||
|
"version": "0.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz",
|
||||||
|
"integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/string-width": {
|
"node_modules/string-width": {
|
||||||
"version": "5.1.2",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
|
||||||
@ -6433,16 +6556,6 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/y18n": {
|
|
||||||
"version": "5.0.8",
|
|
||||||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
|
|
||||||
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "ISC",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/y18n": {
|
"node_modules/y18n": {
|
||||||
"version": "5.0.8",
|
"version": "5.0.8",
|
||||||
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/y18n/-/y18n-5.0.8.tgz",
|
"resolved": "https://snilabs.jfrog.io/snilabs/api/npm/sni-npm/y18n/-/y18n-5.0.8.tgz",
|
||||||
|
22
src/main.ts
22
src/main.ts
@ -8,14 +8,13 @@ import InputTextPlugin from "phaser3-rex-plugins/plugins/inputtext-plugin.js";
|
|||||||
import TransitionImagePackPlugin from "phaser3-rex-plugins/templates/transitionimagepack/transitionimagepack-plugin.js";
|
import TransitionImagePackPlugin from "phaser3-rex-plugins/templates/transitionimagepack/transitionimagepack-plugin.js";
|
||||||
import { LoadingScene } from "./loading-scene";
|
import { LoadingScene } from "./loading-scene";
|
||||||
|
|
||||||
async function enableApiMocking() {
|
async function enableApiMocking(): Promise<ServiceWorkerRegistration | void> {
|
||||||
if (Number(import.meta.env.VITE_MOCK_API) === 0) {
|
if (Number(import.meta.env.VITE_MOCK_API) === 1) {
|
||||||
return;
|
const { worker } = await import("./mocks/msw/msw-browser");
|
||||||
|
return worker.start({ onUnhandledRequest: "bypass" });
|
||||||
}
|
}
|
||||||
const { worker } = await import("./mocks/browser");
|
|
||||||
// `worker.start()` returns a Promise that resolves
|
return Promise.resolve();
|
||||||
// once the Service Worker is up and ready to intercept requests.
|
|
||||||
return worker.start({ onUnhandledRequest: "bypass" });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Catch global errors and display them in an alert so users can report the issue.
|
// Catch global errors and display them in an alert so users can report the issue.
|
||||||
@ -128,9 +127,9 @@ declare module "phaser" {
|
|||||||
* @param x The relative x position
|
* @param x The relative x position
|
||||||
* @param y The relative y position
|
* @param y The relative y position
|
||||||
*/
|
*/
|
||||||
setPositionRelative(guideObject: any, x: number, y: number): void;
|
setPositionRelative(guideObject: any, x: number, y: number): void;
|
||||||
}
|
}
|
||||||
interface Text {
|
interface Text {
|
||||||
/**
|
/**
|
||||||
* Sets this object's position relative to another object with a given offset
|
* Sets this object's position relative to another object with a given offset
|
||||||
* @param guideObject {@linkcode Phaser.GameObjects.GameObject} to base the position off of
|
* @param guideObject {@linkcode Phaser.GameObjects.GameObject} to base the position off of
|
||||||
@ -173,8 +172,7 @@ enableApiMocking()
|
|||||||
.then((jsonResponse) => {
|
.then((jsonResponse) => {
|
||||||
startGame();
|
startGame();
|
||||||
game["manifest"] = jsonResponse.manifest;
|
game["manifest"] = jsonResponse.manifest;
|
||||||
})
|
}).catch(() => {
|
||||||
.catch(() => {
|
|
||||||
// Manifest not found (likely local build)
|
// Manifest not found (likely local build)
|
||||||
startGame();
|
startGame();
|
||||||
});
|
});
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
import { setupWorker } from "msw/browser";
|
|
||||||
import { handlers } from "./handlers";
|
|
||||||
|
|
||||||
export const worker = setupWorker(...handlers);
|
|
File diff suppressed because it is too large
Load Diff
@ -1,59 +0,0 @@
|
|||||||
import { randInt } from "#app/utils.js";
|
|
||||||
import { http, HttpResponse } from "msw";
|
|
||||||
import systemClientSession from "./data/system-client-session.json";
|
|
||||||
|
|
||||||
export const handlers = [
|
|
||||||
http.post("https://api.pokerogue.net/account/login", async () => {
|
|
||||||
return HttpResponse.json({
|
|
||||||
token: "this-is-your-session-token",
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
http.get("https://api.pokerogue.net/account/info", async () => {
|
|
||||||
return HttpResponse.json({
|
|
||||||
username: "guest",
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
http.get("https://api.pokerogue.net/savedata/system", async () => {
|
|
||||||
return HttpResponse.json(systemClientSession);
|
|
||||||
}),
|
|
||||||
http.get("https://api.pokerogue.net/savedata/session", async () => {
|
|
||||||
return HttpResponse.text();
|
|
||||||
}),
|
|
||||||
http.get("https://api.pokerogue.net/daily/rankingpagecount", async () => {
|
|
||||||
return HttpResponse.text("1");
|
|
||||||
}),
|
|
||||||
http.get("https://api.pokerogue.net/daily/rankings", async () => {
|
|
||||||
const rankings = [...Array(9)]
|
|
||||||
.map((_, i) => ({
|
|
||||||
username: `Player ${i + 1}`,
|
|
||||||
score: randInt(99999),
|
|
||||||
wave: randInt(99),
|
|
||||||
}))
|
|
||||||
.sort((a, b) => (a.score > b.score ? -1 : 1))
|
|
||||||
.map((rank, i) => ({ ...rank, rank: i + 1 }));
|
|
||||||
return HttpResponse.json(rankings);
|
|
||||||
}),
|
|
||||||
http.get("https://api.pokerogue.net/game/titlestats", async () => {
|
|
||||||
const playerCount = randInt(999999);
|
|
||||||
return HttpResponse.json({
|
|
||||||
playerCount,
|
|
||||||
battleCount: randInt(999999, playerCount),
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
http.get("https://api.pokerogue.net/account/logout", async () => {
|
|
||||||
return HttpResponse.text();
|
|
||||||
}),
|
|
||||||
http.post(
|
|
||||||
"https://api.pokerogue.net/account/register",
|
|
||||||
async ({ request }) => {
|
|
||||||
console.log(request);
|
|
||||||
return new HttpResponse("This is just localhost!", {
|
|
||||||
status: 500,
|
|
||||||
statusText: "Internal Server Error",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
),
|
|
||||||
http.post("https://api.pokerogue.net/savedata/update", async () => {
|
|
||||||
return HttpResponse.text(); // right?
|
|
||||||
}),
|
|
||||||
];
|
|
43
src/mocks/msw/handlers/get-handlers.ts
Normal file
43
src/mocks/msw/handlers/get-handlers.ts
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
import { randInt } from "#app/utils.js";
|
||||||
|
import { http, HttpResponse } from "msw";
|
||||||
|
import everythingPrsv from "../test/utils/saves/everything.prsv?raw";
|
||||||
|
|
||||||
|
const baseUrl = import.meta.env.VITE_SERVER_URL ?? "https://api.pokerogue.net";
|
||||||
|
|
||||||
|
export const getHandlers = [
|
||||||
|
http.get(`${baseUrl}/account/info`, async () => {
|
||||||
|
return HttpResponse.json({
|
||||||
|
username: "guest",
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
http.get(`${baseUrl}/savedata/system`, async () => {
|
||||||
|
return HttpResponse.text(everythingPrsv);
|
||||||
|
}),
|
||||||
|
http.get(`${baseUrl}/savedata/session`, async () => {
|
||||||
|
return HttpResponse.text();
|
||||||
|
}),
|
||||||
|
http.get(`${baseUrl}/daily/rankingpagecount`, async () => {
|
||||||
|
return HttpResponse.text("1");
|
||||||
|
}),
|
||||||
|
http.get(`${baseUrl}/daily/rankings`, async () => {
|
||||||
|
const rankings = [...Array(9)]
|
||||||
|
.map((_, i) => ({
|
||||||
|
username: `Player ${i + 1}`,
|
||||||
|
score: randInt(99999),
|
||||||
|
wave: randInt(99),
|
||||||
|
}))
|
||||||
|
.sort((a, b) => (a.score > b.score ? -1 : 1))
|
||||||
|
.map((rank, i) => ({ ...rank, rank: i + 1 }));
|
||||||
|
return HttpResponse.json(rankings);
|
||||||
|
}),
|
||||||
|
http.get(`${baseUrl}/game/titlestats`, async () => {
|
||||||
|
const playerCount = randInt(999999);
|
||||||
|
return HttpResponse.json({
|
||||||
|
playerCount,
|
||||||
|
battleCount: randInt(999999, playerCount),
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
http.get(`${baseUrl}/account/logout`, async () => {
|
||||||
|
return HttpResponse.text();
|
||||||
|
}),
|
||||||
|
];
|
24
src/mocks/msw/handlers/post-handlers.ts
Normal file
24
src/mocks/msw/handlers/post-handlers.ts
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { http, HttpResponse } from "msw";
|
||||||
|
|
||||||
|
const baseUrl = import.meta.env.VITE_SERVER_URL ?? "https://api.pokerogue.net";
|
||||||
|
|
||||||
|
export const postHandlers = [
|
||||||
|
http.post(`${baseUrl}/account/login`, async () => {
|
||||||
|
return HttpResponse.json({
|
||||||
|
token: "this-is-your-session-token",
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
http.post(
|
||||||
|
`${baseUrl}/account/register`,
|
||||||
|
async ({ request }) => {
|
||||||
|
console.log(request);
|
||||||
|
return new HttpResponse("This is just localhost!", {
|
||||||
|
status: 500,
|
||||||
|
statusText: "Internal Server Error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
),
|
||||||
|
http.post(`${baseUrl}/savedata/update`, async () => {
|
||||||
|
return HttpResponse.text(); // right?
|
||||||
|
}),
|
||||||
|
];
|
5
src/mocks/msw/msw-browser.ts
Normal file
5
src/mocks/msw/msw-browser.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { setupWorker } from "msw/browser";
|
||||||
|
import { getHandlers } from "./handlers/get-handlers";
|
||||||
|
import { postHandlers } from "./handlers/post-handlers";
|
||||||
|
|
||||||
|
export const worker = setupWorker(...getHandlers, ...postHandlers);
|
25
src/utils.ts
25
src/utils.ts
@ -270,12 +270,11 @@ export const localServerUrl = import.meta.env.VITE_SERVER_URL ?? `http://${windo
|
|||||||
// Set the server URL based on whether it's local or not
|
// Set the server URL based on whether it's local or not
|
||||||
export const apiUrl = localServerUrl ?? "https://api.pokerogue.net";
|
export const apiUrl = localServerUrl ?? "https://api.pokerogue.net";
|
||||||
// used to disable api calls when isLocal is true and a server is not found
|
// used to disable api calls when isLocal is true and a server is not found
|
||||||
export const isLocalServerConnected = true;
|
export let isLocalServerConnected = true;
|
||||||
|
|
||||||
export const isBeta = import.meta.env.MODE === "beta"; // this checks to see if the env mode is development. Technically this gives the same value for beta AND for dev envs
|
export const isBeta = import.meta.env.MODE === "beta"; // this checks to see if the env mode is development. Technically this gives the same value for beta AND for dev envs
|
||||||
|
|
||||||
export function setCookie(cName: string, cValue: string): void {
|
export function setCookie(cName: string, cValue: string): void {
|
||||||
console.log("setCookie: ", cName, cValue);
|
|
||||||
const expiration = new Date();
|
const expiration = new Date();
|
||||||
expiration.setTime(new Date().getTime() + 3600000 * 24 * 30 * 3/*7*/);
|
expiration.setTime(new Date().getTime() + 3600000 * 24 * 30 * 3/*7*/);
|
||||||
document.cookie = `${cName}=${cValue};Secure;SameSite=Strict;Domain=${window.location.hostname};Path=/;Expires=${expiration.toUTCString()}`;
|
document.cookie = `${cName}=${cValue};Secure;SameSite=Strict;Domain=${window.location.hostname};Path=/;Expires=${expiration.toUTCString()}`;
|
||||||
@ -306,8 +305,22 @@ export function getCookie(cName: string): string {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When locally running the game, "pings" the local server
|
||||||
|
* with a GET request to verify if a server is running,
|
||||||
|
* sets isLocalServerConnected based on results
|
||||||
|
*/
|
||||||
|
export function localPing() {
|
||||||
|
if (isLocal) {
|
||||||
|
apiFetch("game/titlestats")
|
||||||
|
.then(resolved => isLocalServerConnected = true,
|
||||||
|
rejected => isLocalServerConnected = false
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export function apiFetch(path: string, authed: boolean = false): Promise<Response> {
|
export function apiFetch(path: string, authed: boolean = false): Promise<Response> {
|
||||||
return new Promise((resolve, reject) => {
|
return (isLocal && isLocalServerConnected) || !isLocal ? new Promise((resolve, reject) => {
|
||||||
const request = {};
|
const request = {};
|
||||||
if (authed) {
|
if (authed) {
|
||||||
const sId = getCookie(sessionIdKey);
|
const sId = getCookie(sessionIdKey);
|
||||||
@ -318,11 +331,11 @@ export function apiFetch(path: string, authed: boolean = false): Promise<Respons
|
|||||||
fetch(`${apiUrl}/${path}`, request)
|
fetch(`${apiUrl}/${path}`, request)
|
||||||
.then(response => resolve(response))
|
.then(response => resolve(response))
|
||||||
.catch(err => reject(err));
|
.catch(err => reject(err));
|
||||||
});
|
}) : new Promise(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function apiPost(path: string, data?: any, contentType: string = "application/json", authed: boolean = false): Promise<Response> {
|
export function apiPost(path: string, data?: any, contentType: string = "application/json", authed: boolean = false): Promise<Response> {
|
||||||
return new Promise((resolve, reject) => {
|
return (isLocal && isLocalServerConnected) || !isLocal ? new Promise((resolve, reject) => {
|
||||||
const headers = {
|
const headers = {
|
||||||
"Accept": contentType,
|
"Accept": contentType,
|
||||||
"Content-Type": contentType,
|
"Content-Type": contentType,
|
||||||
@ -336,7 +349,7 @@ export function apiPost(path: string, data?: any, contentType: string = "applica
|
|||||||
fetch(`${apiUrl}/${path}`, { method: "POST", headers: headers, body: data })
|
fetch(`${apiUrl}/${path}`, { method: "POST", headers: headers, body: data })
|
||||||
.then(response => resolve(response))
|
.then(response => resolve(response))
|
||||||
.catch(err => reject(err));
|
.catch(err => reject(err));
|
||||||
});
|
}) : new Promise(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Alias for the constructor of a class */
|
/** Alias for the constructor of a class */
|
||||||
|
Loading…
Reference in New Issue
Block a user