Compare commits
3 Commits
cardModal_
...
1ed2c4fcfe
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ed2c4fcfe | |||
| 81b223ae65 | |||
|
|
493d0a72fa |
3
.gitignore
vendored
@@ -28,3 +28,6 @@ public/cards/*
|
||||
|
||||
# anything test
|
||||
test.*
|
||||
|
||||
# any logs
|
||||
*.log
|
||||
|
||||
107
package-lock.json
generated
@@ -100,6 +100,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure-rest/core-client/-/core-client-2.5.1.tgz",
|
||||
"integrity": "sha512-EHaOXW0RYDKS5CFffnixdyRPak5ytiCtU7uXDcP/uiY+A6jFRwNGzzJBiznkCzvi5EYpY+YWinieqHb0oY916A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@azure/abort-controller": "^2.1.2",
|
||||
"@azure/core-auth": "^1.10.0",
|
||||
@@ -117,6 +118,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz",
|
||||
"integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.6.2"
|
||||
},
|
||||
@@ -129,6 +131,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.10.1.tgz",
|
||||
"integrity": "sha512-ykRMW8PjVAn+RS6ww5cmK9U2CyH9p4Q88YJwvUslfuMmN98w/2rdGRLPqJYObapBCdzBVeDgYWdJnFPFb7qzpg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@azure/abort-controller": "^2.1.2",
|
||||
"@azure/core-util": "^1.13.0",
|
||||
@@ -162,6 +165,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.3.2.tgz",
|
||||
"integrity": "sha512-Tf6ltdKzOJEgxZeWLCjMxrxbodB/ZeCbzzA1A2qHbhzAjzjHoBVSUeSl/baT/oHAxhc4qdqVaDKnc2+iE932gw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@azure/abort-controller": "^2.1.2"
|
||||
},
|
||||
@@ -178,6 +182,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.7.2.tgz",
|
||||
"integrity": "sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@azure/abort-controller": "^2.0.0",
|
||||
"@azure/core-util": "^1.2.0",
|
||||
@@ -193,6 +198,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.6.2.tgz",
|
||||
"integrity": "sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.6.2"
|
||||
},
|
||||
@@ -224,6 +230,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.3.1.tgz",
|
||||
"integrity": "sha512-9MWKevR7Hz8kNzzPLfX4EAtGM2b8mr50HPDBvio96bURP/9C+HjdH3sBlLSNNrvRAr5/k/svoH457gB5IKpmwQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.6.2"
|
||||
},
|
||||
@@ -236,6 +243,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.13.1.tgz",
|
||||
"integrity": "sha512-XPArKLzsvl0Hf0CaGyKHUyVgF7oDnhKoP85Xv6M4StF/1AhfORhZudHtOyf2s+FcbuQ9dPRAjB8J2KvRRMUK2A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@azure/abort-controller": "^2.1.2",
|
||||
"@typespec/ts-http-runtime": "^0.3.0",
|
||||
@@ -273,6 +281,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure/keyvault-common/-/keyvault-common-2.0.0.tgz",
|
||||
"integrity": "sha512-wRLVaroQtOqfg60cxkzUkGKrKMsCP6uYXAOomOIysSMyt1/YM0eUn9LqieAWM8DLcU4+07Fio2YGpPeqUbpP9w==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@azure/abort-controller": "^2.0.0",
|
||||
"@azure/core-auth": "^1.3.0",
|
||||
@@ -292,6 +301,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure/keyvault-keys/-/keyvault-keys-4.10.0.tgz",
|
||||
"integrity": "sha512-eDT7iXoBTRZ2n3fLiftuGJFD+yjkiB1GNqzU2KbY1TLYeXeSPVTVgn2eJ5vmRTZ11978jy2Kg2wI7xa9Tyr8ag==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@azure-rest/core-client": "^2.3.3",
|
||||
"@azure/abort-controller": "^2.1.2",
|
||||
@@ -315,6 +325,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.3.0.tgz",
|
||||
"integrity": "sha512-fCqPIfOcLE+CGqGPd66c8bZpwAji98tZ4JI9i/mlTNTlsIWslCfpg48s/ypyLxZTump5sypjrKn2/kY7q8oAbA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@typespec/ts-http-runtime": "^0.3.0",
|
||||
"tslib": "^2.6.2"
|
||||
@@ -328,6 +339,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-4.28.2.tgz",
|
||||
"integrity": "sha512-6vYUMvs6kJxJgxaCmHn/F8VxjLHNh7i9wzfwPGf8kyBJ8Gg2yvBXx175Uev8LdrD1F5C4o7qHa2CC4IrhGE1XQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@azure/msal-common": "15.14.2"
|
||||
},
|
||||
@@ -340,6 +352,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-15.14.2.tgz",
|
||||
"integrity": "sha512-n8RBJEUmd5QotoqbZfd+eGBkzuFI1KX6jw2b3WcpSyGjwmzoeI/Jb99opIBPHpb8y312NB+B6+FGi2ZVSR8yfA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
@@ -349,6 +362,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-3.8.7.tgz",
|
||||
"integrity": "sha512-a+Xnrae+uwLnlw68bplS1X4kuJ9F/7K6afuMFyRkNIskhjgDezl5Fhrx+1pmAlDmC0VaaAxjRQMp1OmcqVwkIg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@azure/msal-common": "15.14.2",
|
||||
"jsonwebtoken": "^9.0.0",
|
||||
@@ -1335,7 +1349,8 @@
|
||||
"version": "5.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@js-joda/core/-/core-5.7.0.tgz",
|
||||
"integrity": "sha512-WBu4ULVVxySLLzK1Ppq+OdfP+adRS4ntmDQT915rzDJ++i95gc2jZkM5B6LWEAwN3lGXpfie3yPABozdD3K3Vg==",
|
||||
"license": "BSD-3-Clause"
|
||||
"license": "BSD-3-Clause",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@js-temporal/polyfill": {
|
||||
"version": "0.5.1",
|
||||
@@ -1657,7 +1672,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
|
||||
"integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/popperjs"
|
||||
@@ -2087,7 +2101,8 @@
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@tediousjs/connection-string/-/connection-string-0.5.0.tgz",
|
||||
"integrity": "sha512-7qSgZbincDDDFyRweCIEvZULFAw5iz/DeunhvuxpL31nfntX3P4Yd4HkHBRg9H8CdqY1e5WFN1PZIz/REL9MVQ==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/bootstrap": {
|
||||
"version": "5.2.10",
|
||||
@@ -2164,7 +2179,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.2.1.tgz",
|
||||
"integrity": "sha512-CPrnr8voK8vC6eEtyRzvMpgp3VyVRhgclonE7qYi6P9sXwYb59ucfrnmFBTaP0yUi8Gk4yZg/LlTJULGxvTNsg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~7.16.0"
|
||||
}
|
||||
@@ -2174,6 +2188,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.23.tgz",
|
||||
"integrity": "sha512-wwXrtQvbMHxCbBgjHaMGEmImFTQxxpfMOR/ZoQnXxB1woqkUbdLGFDgauo00Py9IudiaqSeiBiulSV9i6XIPig==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
@@ -2189,6 +2204,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.3.tgz",
|
||||
"integrity": "sha512-91fp6CAAJSRtH5ja95T1FHSKa8aPW9/Zw6cta81jlZTUw/+Vq8jM/AfF/14h2b71wwR84JUTW/3Y8QPhDAawFA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"http-proxy-agent": "^7.0.0",
|
||||
"https-proxy-agent": "^7.0.0",
|
||||
@@ -2209,6 +2225,7 @@
|
||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"event-target-shim": "^5.0.0"
|
||||
},
|
||||
@@ -2233,6 +2250,7 @@
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
|
||||
"integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
@@ -2516,13 +2534,15 @@
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/bl": {
|
||||
"version": "6.1.6",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-6.1.6.tgz",
|
||||
"integrity": "sha512-jLsPgN/YSvPUg9UX0Kd73CXpm2Psg9FxMeCSXnk3WBO3CMT10JMwijubhGfHCnFu6TPn1ei3b975dxv7K2pWVg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/readable-stream": "^4.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
@@ -2596,6 +2616,7 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"base64-js": "^1.3.1",
|
||||
"ieee754": "^1.2.1"
|
||||
@@ -2605,13 +2626,15 @@
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
|
||||
"integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==",
|
||||
"license": "BSD-3-Clause"
|
||||
"license": "BSD-3-Clause",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/bundle-name": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz",
|
||||
"integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"run-applescript": "^7.0.0"
|
||||
},
|
||||
@@ -2936,6 +2959,7 @@
|
||||
"resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.0.tgz",
|
||||
"integrity": "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"bundle-name": "^4.1.0",
|
||||
"default-browser-id": "^5.0.0"
|
||||
@@ -2952,6 +2976,7 @@
|
||||
"resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz",
|
||||
"integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
@@ -2964,6 +2989,7 @@
|
||||
"resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",
|
||||
"integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
@@ -3352,6 +3378,7 @@
|
||||
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
|
||||
"integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"safe-buffer": "^5.0.1"
|
||||
}
|
||||
@@ -3492,6 +3519,7 @@
|
||||
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
||||
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
@@ -3507,6 +3535,7 @@
|
||||
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
|
||||
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.8.x"
|
||||
}
|
||||
@@ -3959,6 +3988,7 @@
|
||||
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
|
||||
"integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"agent-base": "^7.1.0",
|
||||
"debug": "^4.3.4"
|
||||
@@ -3972,6 +4002,7 @@
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
|
||||
"integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"agent-base": "^7.1.2",
|
||||
"debug": "4"
|
||||
@@ -4014,7 +4045,8 @@
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "BSD-3-Clause"
|
||||
"license": "BSD-3-Clause",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/immutable": {
|
||||
"version": "5.1.4",
|
||||
@@ -4036,7 +4068,8 @@
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"license": "ISC"
|
||||
"license": "ISC",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/iron-webcrypto": {
|
||||
"version": "1.2.1",
|
||||
@@ -4151,7 +4184,6 @@
|
||||
"integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"jiti": "lib/jiti-cli.mjs"
|
||||
}
|
||||
@@ -4160,7 +4192,8 @@
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz",
|
||||
"integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/js-yaml": {
|
||||
"version": "4.1.1",
|
||||
@@ -4186,6 +4219,7 @@
|
||||
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz",
|
||||
"integrity": "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"jws": "^4.0.1",
|
||||
"lodash.includes": "^4.3.0",
|
||||
@@ -4208,6 +4242,7 @@
|
||||
"resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz",
|
||||
"integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"buffer-equal-constant-time": "^1.0.1",
|
||||
"ecdsa-sig-formatter": "1.0.11",
|
||||
@@ -4219,6 +4254,7 @@
|
||||
"resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz",
|
||||
"integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"jwa": "^2.0.1",
|
||||
"safe-buffer": "^5.0.1"
|
||||
@@ -4237,43 +4273,50 @@
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
|
||||
"integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lodash.isboolean": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
|
||||
"integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lodash.isinteger": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
|
||||
"integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lodash.isnumber": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
|
||||
"integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lodash.isplainobject": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
|
||||
"integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lodash.isstring": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
|
||||
"integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lodash.once": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
|
||||
"integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/loglevel": {
|
||||
"version": "1.9.2",
|
||||
@@ -5202,6 +5245,7 @@
|
||||
"resolved": "https://registry.npmjs.org/mssql/-/mssql-11.0.1.tgz",
|
||||
"integrity": "sha512-KlGNsugoT90enKlR8/G36H0kTxPthDhmtNUCwEHvgRza5Cjpjoj+P2X6eMpFUDN7pFrJZsKadL4x990G8RBE1w==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@tediousjs/connection-string": "^0.5.0",
|
||||
"commander": "^11.0.0",
|
||||
@@ -5222,6 +5266,7 @@
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
},
|
||||
@@ -5234,6 +5279,7 @@
|
||||
"resolved": "https://registry.npmjs.org/tedious/-/tedious-18.6.2.tgz",
|
||||
"integrity": "sha512-g7jC56o3MzLkE3lHkaFe2ZdOVFBahq5bsB60/M4NYUbocw/MCrS89IOEQUFr+ba6pb8ZHczZ/VqCyYeYq0xBAg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@azure/core-auth": "^1.7.2",
|
||||
"@azure/identity": "^4.2.1",
|
||||
@@ -5255,7 +5301,6 @@
|
||||
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.16.3.tgz",
|
||||
"integrity": "sha512-+3XhQEt4FEFuvGV0JjIDj4eP2OT/oIj/54dYvqhblnSzlfcxVOuj+cd15Xz6hsG4HU1a+A5+BA9gm0618C4z7A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"aws-ssl-profiles": "^1.1.2",
|
||||
"denque": "^2.1.0",
|
||||
@@ -5305,7 +5350,8 @@
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz",
|
||||
"integrity": "sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/neotraverse": {
|
||||
"version": "0.6.18",
|
||||
@@ -5408,6 +5454,7 @@
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz",
|
||||
"integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"default-browser": "^5.2.1",
|
||||
"define-lazy-prop": "^3.0.0",
|
||||
@@ -5566,6 +5613,7 @@
|
||||
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
|
||||
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">= 0.6.0"
|
||||
}
|
||||
@@ -5610,6 +5658,7 @@
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
|
||||
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"abort-controller": "^3.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
@@ -5865,14 +5914,14 @@
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
|
||||
"integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "4.57.1",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.57.1.tgz",
|
||||
"integrity": "sha512-oQL6lgK3e2QZeQ7gcgIkS2YZPg5slw37hYufJ3edKlfQSGGm8ICoxswK15ntSzF/a8+h7ekRy7k7oWc3BQ7y8A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/estree": "1.0.8"
|
||||
},
|
||||
@@ -5917,6 +5966,7 @@
|
||||
"resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz",
|
||||
"integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
@@ -5942,7 +5992,8 @@
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
@@ -5955,7 +6006,6 @@
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.97.3.tgz",
|
||||
"integrity": "sha512-fDz1zJpd5GycprAbu4Q2PV/RprsRtKC/0z82z0JLgdytmcq0+ujJbJ/09bPGDxCLkKY3Np5cRAOcWiVkLXJURg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"chokidar": "^4.0.0",
|
||||
"immutable": "^5.0.2",
|
||||
@@ -6127,7 +6177,8 @@
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
|
||||
"integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==",
|
||||
"license": "BSD-3-Clause"
|
||||
"license": "BSD-3-Clause",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/sqlstring": {
|
||||
"version": "2.3.3",
|
||||
@@ -6143,6 +6194,7 @@
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
@@ -6223,6 +6275,7 @@
|
||||
"resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.2.tgz",
|
||||
"integrity": "sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
@@ -6232,6 +6285,7 @@
|
||||
"resolved": "https://registry.npmjs.org/tedious/-/tedious-19.2.1.tgz",
|
||||
"integrity": "sha512-pk1Q16Yl62iocuQB+RWbg6rFUFkIyzqOFQ6NfysCltRvQqKwfurgj8v/f2X+CKvDhSL4IJ0cCOfCHDg9PWEEYA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@azure/core-auth": "^1.7.2",
|
||||
"@azure/identity": "^4.2.1",
|
||||
@@ -6342,7 +6396,6 @@
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
@@ -6646,6 +6699,7 @@
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
||||
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"uuid": "dist/bin/uuid"
|
||||
}
|
||||
@@ -6697,7 +6751,6 @@
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz",
|
||||
"integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.4.4",
|
||||
@@ -6842,6 +6895,7 @@
|
||||
"resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz",
|
||||
"integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"is-wsl": "^3.1.0"
|
||||
},
|
||||
@@ -6911,7 +6965,6 @@
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
|
||||
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
|
||||
1
public/vendors/ebay.svg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 122 48.592" id="gh-logo" aria-labelledby="ebayLogoTitle"><title id="ebayLogoTitle">eBay Home</title><g><path fill="#F02D2D" d="M24.355 22.759c-.269-5.738-4.412-7.838-8.826-7.813-4.756.026-8.544 2.459-9.183 7.915zM6.234 26.93c.364 5.553 4.208 8.814 9.476 8.785 3.648-.021 6.885-1.524 7.952-4.763l6.306-.035c-1.187 6.568-8.151 8.834-14.145 8.866C4.911 39.844.043 33.865-.002 25.759c-.05-8.927 4.917-14.822 15.765-14.884 8.628-.048 14.978 4.433 15.033 14.291l.01 1.625z"></path><path fill="#0968F6" d="M46.544 35.429c5.688-.032 9.543-4.148 9.508-10.32s-3.947-10.246-9.622-10.214-9.543 4.148-9.509 10.32 3.974 10.245 9.623 10.214zM30.652.029l6.116-.034.085 15.369c2.978-3.588 7.1-4.65 11.167-4.674 6.817-.037 14.412 4.518 14.468 14.454.045 8.29-5.941 14.407-14.422 14.454-4.463.026-8.624-1.545-11.218-4.681a33.237 33.237 0 01-.19 3.731l-5.994.034c.09-1.915.185-4.364.174-6.322z"></path><path fill="#FFBD14" d="M77.282 25.724c-5.548.216-8.985 1.229-8.965 4.883.013 2.365 1.94 4.919 6.7 4.891 6.415-.035 9.826-3.556 9.794-9.289v-.637c-2.252.02-5.039.054-7.529.152zm13.683 7.506c.01 1.778.071 3.538.232 5.1l-5.688.032a33.381 33.381 0 01-.225-3.825c-3.052 3.8-6.708 4.909-11.783 4.938-7.532.042-11.585-3.915-11.611-8.518-.037-6.665 5.434-9.049 14.954-9.318 2.6-.072 5.529-.1 7.945-.116v-.637c-.026-4.463-2.9-6.285-7.854-6.257-3.68.021-6.368 1.561-6.653 4.2l-6.434.035c.645-6.566 7.53-8.269 13.595-8.3 7.263-.04 13.406 2.508 13.448 10.192z"></path><path fill="#92C821" d="M91.939 19.852l-4.5-8.362 7.154-.04 10.589 20.922 10.328-21.02 6.486-.048-18.707 37.251-6.85.039 5.382-10.348-9.887-18.393"></path></g></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
BIN
public/vendors/tcgplayer.webp
vendored
Normal file
|
After Width: | Height: | Size: 658 B |
@@ -1,31 +1,41 @@
|
||||
import 'dotenv/config';
|
||||
import { drizzle } from 'drizzle-orm/mysql2';
|
||||
import mysql from 'mysql2/promise';
|
||||
import * as schema from '../src/db/schema.ts';
|
||||
import { db, poolConnection } from '../src/db/index.ts';
|
||||
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { eq } from 'drizzle-orm';
|
||||
import chalk from 'chalk';
|
||||
//import util from 'util';
|
||||
|
||||
|
||||
async function syncTcgplayer() {
|
||||
|
||||
const productLines = [
|
||||
{ name: "pokemon", energyType: ["Water", "Fire", "Grass", "Lightning", "Psychic", "Fighting", "Darkness", "Metal", "Fairy", "Dragon", "Colorless", "Energy"] },
|
||||
{ name: "pokemon-japan", cardType: ["Water", "Fire", "Grass", "Lightning", "Psychic", "Fighting", "Darkness", "Metal", "Fairy", "Dragon", "Colorless", "Energy"] }
|
||||
];
|
||||
const productLines = [ "pokemon", "pokemon-japan" ];
|
||||
|
||||
// work from the available sets within the product line
|
||||
for (const productLine of productLines) {
|
||||
for (const [key, values] of Object.entries(productLine)) {
|
||||
if (key === "name") continue;
|
||||
for (const value of values) {
|
||||
console.log(`Syncing product line "${productLine.name}" with ${key} "${value}"...`);
|
||||
await syncProductLineEnergyType(productLine.name, key, value);
|
||||
}
|
||||
const d = {"algorithm":"sales_dismax","from":0,"size":1,"filters":{"term":{"productLineName":[productLine]}},"settings":{"useFuzzySearch":false}};
|
||||
|
||||
const response = await fetch('https://mp-search-api.tcgplayer.com/v1/search/request?q=&isList=false', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json',},
|
||||
body: JSON.stringify(d),
|
||||
});
|
||||
if (!response.ok) {
|
||||
console.error('Error notifying sync completion:', response.statusText);
|
||||
process.exit(1);
|
||||
}
|
||||
const data = await response.json();
|
||||
|
||||
const setNames = data.results[0].aggregations.setName;
|
||||
for (const setName of setNames) {
|
||||
console.log(chalk.blue(`Syncing product line "${productLine}" with setName "${setName.urlValue}"...`));
|
||||
await syncProductLine(productLine, "setName", setName.urlValue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
console.log(chalk.green('✓ All TCGPlayer data synchronized successfully!'));
|
||||
}
|
||||
|
||||
@@ -33,6 +43,14 @@ function sleep(ms: number) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
function cleanProductName(name: string): string {
|
||||
// remove TCGPlayer crap
|
||||
name = name.replace(/ - .*$/, '');
|
||||
name = name.replace(/ \[.*\]/, '');
|
||||
name = name.replace(/ \(.*\)/, '');
|
||||
return name.trim();
|
||||
}
|
||||
|
||||
async function fileExists(path: string): Promise<boolean> {
|
||||
try {
|
||||
await fs.access(path);
|
||||
@@ -42,7 +60,15 @@ async function fileExists(path: string): Promise<boolean> {
|
||||
}
|
||||
}
|
||||
|
||||
async function syncProductLineEnergyType(productLine: string, field: string, fieldValue: string) {
|
||||
function getNumberOrNull(value: any): number | null {
|
||||
const number = Number(value); // Attempt to convert the value to a number
|
||||
if (Number.isNaN(number)) {
|
||||
return null; // Return null if the result is NaN
|
||||
}
|
||||
return number; // Otherwise, return the number
|
||||
}
|
||||
|
||||
async function syncProductLine(productLine: string, field: string, fieldValue: string) {
|
||||
let start = 0;
|
||||
let size = 50;
|
||||
let total = 1000000;
|
||||
@@ -50,13 +76,12 @@ async function syncProductLineEnergyType(productLine: string, field: string, fie
|
||||
while (start < total) {
|
||||
console.log(` Fetching items ${start} to ${start + size} of ${total}...`);
|
||||
|
||||
|
||||
let d = {
|
||||
const d = {
|
||||
"algorithm":"sales_dismax",
|
||||
"from":start,
|
||||
"size":size,
|
||||
"filters":{
|
||||
"term":{"productLineName":[productLine]},
|
||||
"term":{"productLineName":[productLine], [field]:[fieldValue]} ,
|
||||
"range":{},
|
||||
"match":{}
|
||||
},
|
||||
@@ -83,7 +108,6 @@ async function syncProductLineEnergyType(productLine: string, field: string, fie
|
||||
},
|
||||
"sort":{}
|
||||
};
|
||||
d.filters.term[field] = [fieldValue];
|
||||
|
||||
//console.log(util.inspect(d, { depth: null }));
|
||||
//process.exit(1);
|
||||
@@ -104,20 +128,30 @@ async function syncProductLineEnergyType(productLine: string, field: string, fie
|
||||
const data = await response.json();
|
||||
total = data.results[0].totalResults;
|
||||
|
||||
//console.log(data);
|
||||
|
||||
const poolConnection = mysql.createPool({
|
||||
uri: process.env.DATABASE_URL,
|
||||
});
|
||||
|
||||
const db = drizzle(poolConnection, { schema, mode: 'default' });
|
||||
|
||||
for (const item of data.results[0].results) {
|
||||
|
||||
// Check if productId already exists and skip if it does (to avoid hitting the API too much)
|
||||
if (allProductIds.has(item.productId)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
console.log(chalk.blue(` - ${item.productName} (ID: ${item.productId})`));
|
||||
|
||||
// Get product detail
|
||||
const detailResponse = await fetch(`https://mp-search-api.tcgplayer.com/v2/product/${item.productId}/details`, {
|
||||
method: 'GET',
|
||||
});
|
||||
if (!detailResponse.ok) {
|
||||
console.error('Error fetching product details:', detailResponse.statusText);
|
||||
process.exit(1);
|
||||
}
|
||||
const detailData = await detailResponse.json();
|
||||
|
||||
|
||||
await db.insert(schema.cards).values({
|
||||
productId: item.productId,
|
||||
productName: item.productName,
|
||||
originalProductName: item.productName,
|
||||
productName: cleanProductName(item.productName),
|
||||
rarityName: item.rarityName,
|
||||
productLineName: item.productLineName,
|
||||
productLineUrlName: item.productLineUrlName,
|
||||
@@ -137,7 +171,7 @@ async function syncProductLineEnergyType(productLine: string, field: string, fie
|
||||
cardTypeB: item.customAttributes.cardTypeB || null,
|
||||
energyType: item.customAttributes.energyType?.[0] || null,
|
||||
flavorText: item.customAttributes.flavorText || null,
|
||||
hp: item.customAttributes.hp || 0,
|
||||
hp: getNumberOrNull(item.customAttributes.hp),
|
||||
number: item.customAttributes.number || '',
|
||||
releaseDate: item.customAttributes.releaseDate ? new Date(item.customAttributes.releaseDate) : null,
|
||||
resistance: item.customAttributes.resistance || null,
|
||||
@@ -150,9 +184,11 @@ async function syncProductLineEnergyType(productLine: string, field: string, fie
|
||||
maxFulfillableQuantity: item.maxFulfillableQuantity,
|
||||
medianPrice: item.medianPrice,
|
||||
totalListings: item.totalListings,
|
||||
Artist: detailData.formattedAttributes.Artist || null,
|
||||
}).onDuplicateKeyUpdate({
|
||||
set: {
|
||||
productName: item.productName,
|
||||
originalProductName: item.productName,
|
||||
productName: cleanProductName(item.productName),
|
||||
rarityName: item.rarityName,
|
||||
productLineName: item.productLineName,
|
||||
productLineUrlName: item.productLineUrlName,
|
||||
@@ -172,7 +208,7 @@ async function syncProductLineEnergyType(productLine: string, field: string, fie
|
||||
cardTypeB: item.customAttributes.cardTypeB || null,
|
||||
energyType: item.customAttributes.energyType?.[0] || null,
|
||||
flavorText: item.customAttributes.flavorText || null,
|
||||
hp: item.customAttributes.hp || 0,
|
||||
hp: getNumberOrNull(item.customAttributes.hp),
|
||||
number: item.customAttributes.number || '',
|
||||
releaseDate: item.customAttributes.releaseDate ? new Date(item.customAttributes.releaseDate) : null,
|
||||
resistance: item.customAttributes.resistance || null,
|
||||
@@ -185,30 +221,12 @@ async function syncProductLineEnergyType(productLine: string, field: string, fie
|
||||
maxFulfillableQuantity: item.maxFulfillableQuantity,
|
||||
medianPrice: item.medianPrice,
|
||||
totalListings: item.totalListings,
|
||||
Artist: detailData.formattedAttributes.Artist || null,
|
||||
},
|
||||
});
|
||||
|
||||
// before we fetch details, check if the card already exists in the skus table with a recent calculatedAt date. If it does, we can skip fetching details and pricing for this card to reduce API calls.
|
||||
const existingSkus = await db.select().from(schema.skus).where(eq(schema.skus.productId, item.productId));
|
||||
const hasRecentSku = existingSkus.some(sku => sku.calculatedAt && (new Date().getTime() - new Date(sku.calculatedAt).getTime()) < 7 * 24 * 60 * 60 * 1000);
|
||||
if (hasRecentSku) {
|
||||
console.log(chalk.blue(' Skipping details and pricing fetch since we have recent SKU data'));
|
||||
await sleep(100);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Get product detail
|
||||
const detailResponse = await fetch(`https://mp-search-api.tcgplayer.com/v2/product/${item.productId}/details`, {
|
||||
method: 'GET',
|
||||
});
|
||||
|
||||
if (!detailResponse.ok) {
|
||||
console.error('Error fetching product details:', detailResponse.statusText);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const detailData = await detailResponse.json();
|
||||
|
||||
// set is...
|
||||
await db.insert(schema.sets).values({
|
||||
setId: detailData.setId,
|
||||
setCode: detailData.setCode,
|
||||
@@ -223,33 +241,7 @@ async function syncProductLineEnergyType(productLine: string, field: string, fie
|
||||
});
|
||||
|
||||
// skus are...
|
||||
const skuArray = detailData.skus.map((sku: any) => sku.sku);
|
||||
//console.log(detailData.skus);
|
||||
//console.log(skuArray);
|
||||
// get pricing for skus
|
||||
const skuResponse = await fetch('https://mpgateway.tcgplayer.com/v1/pricepoints/marketprice/skus/search', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ skuIds: skuArray }),
|
||||
});
|
||||
|
||||
if (!skuResponse.ok) {
|
||||
console.error('Error fetching SKU pricing:', skuResponse.statusText);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const skuData = await skuResponse.json();
|
||||
|
||||
let skuMap = new Map();
|
||||
for (const skuItem of skuData) {
|
||||
skuMap.set(skuItem.skuId, skuItem);
|
||||
}
|
||||
|
||||
for (const skuItem of detailData.skus) {
|
||||
const pricing = skuMap.get(skuItem.sku);
|
||||
//console.log(pricing);
|
||||
|
||||
await db.insert(schema.skus).values({
|
||||
skuId: skuItem.sku,
|
||||
@@ -257,21 +249,11 @@ async function syncProductLineEnergyType(productLine: string, field: string, fie
|
||||
condition: skuItem.condition,
|
||||
language: skuItem.language,
|
||||
variant: skuItem.variant,
|
||||
calculatedAt: pricing?.calculatedAt ? new Date(pricing.calculatedAt) : null,
|
||||
highestPrice: pricing?.highestPrice || null,
|
||||
lowestPrice: pricing?.lowestPrice || null,
|
||||
marketPrice: pricing?.marketPrice || null,
|
||||
priceCount: pricing?.priceCount || 0,
|
||||
}).onDuplicateKeyUpdate({
|
||||
set: {
|
||||
condition: skuItem.condition,
|
||||
language: skuItem.language,
|
||||
variant: skuItem.variant,
|
||||
calculatedAt: pricing?.calculatedAt ? new Date(pricing.calculatedAt) : null,
|
||||
highestPrice: pricing?.highestPrice || null,
|
||||
lowestPrice: pricing?.lowestPrice || null,
|
||||
marketPrice: pricing?.marketPrice || null,
|
||||
priceCount: pricing?.priceCount || 0,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -284,7 +266,8 @@ async function syncProductLineEnergyType(productLine: string, field: string, fie
|
||||
const buffer = await imageResponse.arrayBuffer();
|
||||
await fs.writeFile(imagePath, Buffer.from(buffer));
|
||||
} else {
|
||||
console.error('Error fetching product image:', imageResponse.statusText);
|
||||
console.error(chalk.yellow(`Error fetching ${item.productId}: ${item.productName} image:`, imageResponse.statusText));
|
||||
await fs.appendFile('missing_images.log', `${item.productId}: ${item.productName}\n`, 'utf-8');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,12 +276,14 @@ async function syncProductLineEnergyType(productLine: string, field: string, fie
|
||||
|
||||
}
|
||||
|
||||
|
||||
await poolConnection.end();
|
||||
|
||||
start += size;
|
||||
}
|
||||
}
|
||||
|
||||
// clear the log file
|
||||
await fs.rm('missing_images.log', { force: true });
|
||||
|
||||
syncTcgplayer();
|
||||
const allProductIds = new Set(await db.select({ productId: schema.cards.productId }).from(schema.cards).then(rows => rows.map(row => row.productId)));
|
||||
|
||||
await syncTcgplayer();
|
||||
await poolConnection.end();
|
||||
|
||||
@@ -8,9 +8,9 @@ async function createCollection(client: Client) {
|
||||
// Delete the collection if it already exists to ensure a clean slate
|
||||
try {
|
||||
const response = await client.collections('cards').delete();
|
||||
console.log(`Collection "cards" deleted successfully:`, response);
|
||||
//console.log(`Collection "cards" deleted successfully:`, response);
|
||||
} catch (error) {
|
||||
console.error(`Error deleting collection "cards":`, error);
|
||||
//console.error(`Error deleting collection "cards":`, error);
|
||||
}
|
||||
|
||||
// Create the collection with the specified schema
|
||||
@@ -30,6 +30,7 @@ async function createCollection(client: Client) {
|
||||
{ name: 'cardType', type: 'string', facet: true },
|
||||
{ name: 'energyType', type: 'string', facet: true },
|
||||
{ name: 'number', type: 'string' },
|
||||
{ name: 'Artist', type: 'string' },
|
||||
],
|
||||
default_sorting_field: 'productId',
|
||||
});
|
||||
@@ -59,6 +60,7 @@ async function preloadSearchIndex() {
|
||||
cardType: card.cardType || "",
|
||||
energyType: card.energyType || "",
|
||||
number: card.number,
|
||||
Artist: card.Artist || "",
|
||||
})), { action: 'upsert' });
|
||||
|
||||
console.log(chalk.green('Search index preloaded with Pokémon cards.'));
|
||||
@@ -23,16 +23,16 @@
|
||||
// @import 'bootstrap/scss/badge';
|
||||
// @import 'bootstrap/scss/breadcrumb';
|
||||
// @import 'bootstrap/scss/button-group';
|
||||
// @import 'bootstrap/scss/buttons';
|
||||
// @import 'bootstrap/scss/card';
|
||||
@import 'bootstrap/scss/buttons';
|
||||
@import 'bootstrap/scss/card';
|
||||
// @import 'bootstrap/scss/carousel';
|
||||
// @import 'bootstrap/scss/close';
|
||||
@import 'bootstrap/scss/close';
|
||||
// @import 'bootstrap/scss/dropdown';
|
||||
// @import 'bootstrap/scss/forms';
|
||||
@import 'bootstrap/scss/grid';
|
||||
// @import 'bootstrap/scss/list-group';
|
||||
@import 'bootstrap/scss/modal';
|
||||
// @import 'bootstrap/scss/navbar';
|
||||
@import 'bootstrap/scss/navbar';
|
||||
// @import 'bootstrap/scss/offcanvas';
|
||||
// @import 'bootstrap/scss/pagination';
|
||||
// @import 'bootstrap/scss/placeholders';
|
||||
@@ -42,7 +42,7 @@
|
||||
// @import 'bootstrap/scss/tables';
|
||||
// @import 'bootstrap/scss/toasts';
|
||||
// @import 'bootstrap/scss/tooltip';
|
||||
// @import 'bootstrap/scss/transitions';
|
||||
@import 'bootstrap/scss/transitions';
|
||||
|
||||
// Optional helpers
|
||||
// @import 'bootstrap/scss/helpers';
|
||||
|
||||
@@ -30,6 +30,107 @@
|
||||
// ----------------------
|
||||
// Card
|
||||
// ----------------------
|
||||
|
||||
.tcg-card {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.modal-xl {
|
||||
@media (min-width: 768px) {
|
||||
max-width: 90vw;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
max-width: 85vw;
|
||||
}
|
||||
@media (min-width: 1400px) {
|
||||
max-width: 75vw;
|
||||
}
|
||||
}
|
||||
|
||||
.card-modal {
|
||||
background-color: rgba(1, 11, 18, .8);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.nav-link:hover, .nav-link:focus {
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
|
||||
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link {
|
||||
color: rgba(0, 0, 0, .94);
|
||||
}
|
||||
|
||||
.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus {
|
||||
border-color: rgba(0, 0, 0, .0);
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
font-weight: 600;
|
||||
color: rgba(255,255,255,67);
|
||||
transition: margin-top 0.2s cubic-bezier(0.5, 0, 0.3, 1),
|
||||
padding-top 0.2s cubic-bezier(0.5, 0, 0.3, 1),
|
||||
padding-bottom 0.2s cubic-bezier(0.5, 0, 0.3, 1);
|
||||
}
|
||||
.nav-link:hover, .nav-link:focus {
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
}
|
||||
.nav-link.nm, .nav-link.nm:hover, .nav-link.nm:focus {
|
||||
border-bottom: 3px solid rgba(156, 204, 102, 1);
|
||||
}
|
||||
.nav-link.nm:hover, .nav-link.nm:focus {
|
||||
background-color: rgba(156, 204, 102, .67);
|
||||
}
|
||||
.nav-link.nm.active {
|
||||
background-color: rgba(156, 204, 102, 1);
|
||||
border-bottom: 3px solid rgba(156, 204, 102, 1);
|
||||
}
|
||||
.nav-link.lp, .nav-link.lp:hover, .nav-link.lp:focus {
|
||||
border-bottom: 3px solid rgba(211, 225, 86, 1);
|
||||
}
|
||||
.nav-link.lp:hover, .nav-link.lp:focus {
|
||||
background-color: rgba(211, 225, 86, .67);
|
||||
}
|
||||
.nav-link.lp.active {
|
||||
background-color: rgba(211, 225, 86, 1);
|
||||
border-bottom: 3px solid rgba(211, 225, 86, 1);
|
||||
}
|
||||
.nav-link.mp, .nav-link.mp:hover, .nav-link.mp:focus {
|
||||
border-bottom: 3px solid rgba(255, 238, 87, 1);
|
||||
}
|
||||
.nav-link.mp:hover, .nav-link.mp:focus {
|
||||
background-color: rgba(255, 238, 87, .67);
|
||||
}
|
||||
.nav-link.mp.active {
|
||||
background-color: rgba(255, 238, 87, 1);
|
||||
border-bottom: 3px solid rgba(255, 238, 87, 1);
|
||||
}
|
||||
.nav-link.hp, .nav-link.hp:hover, .nav-link.hp:focus {
|
||||
border-bottom: 3px solid rgba(255, 201, 41, 1);
|
||||
}
|
||||
.nav-link.hp:hover, .nav-link.hp:focus {
|
||||
background-color: rgba(255, 201, 41, .67);
|
||||
}
|
||||
.nav-link.hp.active {
|
||||
background-color: rgba(255, 201, 41, 1);
|
||||
border-bottom: 3px solid rgba(255, 201, 41, 1);
|
||||
}
|
||||
.nav-link.dmg, .nav-link.dmg:hover, .nav-link.dmg:focus {
|
||||
border-bottom: 3px solid rgba(255, 167, 36, 1);
|
||||
}
|
||||
.nav-link.dmg:hover, .nav-link.dmg:focus {
|
||||
background-color: rgba(255, 167, 36, .67);
|
||||
}
|
||||
.nav-link.dmg.active {
|
||||
background-color: rgba(255, 167, 36, 1);
|
||||
border-bottom: 3px solid rgba(255, 167, 36, 1);
|
||||
}
|
||||
|
||||
.dark-callout {
|
||||
@media (min-width: 768px) {
|
||||
background-color: rgba(44, 48, 59, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.card-image {
|
||||
aspect-ratio: 23/32;
|
||||
object-fit: cover;
|
||||
@@ -42,6 +143,12 @@
|
||||
margin-top: -0.25rem;
|
||||
}
|
||||
|
||||
.energy-icon svg {
|
||||
width: 100%;
|
||||
max-height: 16px;
|
||||
margin-top: -0.25rem;
|
||||
}
|
||||
|
||||
// ----------------------
|
||||
// Pricing
|
||||
// ----------------------
|
||||
@@ -117,7 +224,7 @@
|
||||
// Sticky Bar
|
||||
// ----------------------
|
||||
.sticky {
|
||||
background-color: hsl(195, 4%, 22%);
|
||||
background-color: hsl(205, 89%, 4%);
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
|
||||
@@ -4,12 +4,13 @@ import { isConditionalExpression } from 'typescript';
|
||||
import { client } from '../db/typesense.ts';
|
||||
import { db } from '../db';
|
||||
import RarityIcon from './RarityIcon.astro';
|
||||
import EnergyIcon from './EnergyIcon.astro';
|
||||
//import * as schema from '../db/schema.ts';
|
||||
|
||||
const { query } = Astro.props;
|
||||
const searchResults = await client.collections('cards').documents().search({
|
||||
q: query,
|
||||
query_by: 'productLineName,productName,setName,number,rarityName',
|
||||
query_by: 'productLineName,productName,setName,number,rarityName,Artist',
|
||||
per_page: 250,
|
||||
});
|
||||
const productIds = searchResults.hits?.map((hit: any) => hit.document.productId) ?? [];
|
||||
@@ -38,7 +39,7 @@ const formatPrice = (price:any) => {
|
||||
const order = ["Near Mint", "Lightly Played", "Moderately Played", "Heavily Played", "Damaged"];
|
||||
---
|
||||
{pokemon.map((card) => (
|
||||
<div class="col">
|
||||
<div class="col tcg-card" data-bs-toggle="modal" data-bs-target="#cardModal">
|
||||
<img src={`/cards/${card.productId}.jpg`} alt={card.productName} loading="lazy" decoding="async" class="img-fluid rounded-3 mb-2 card-image w-100" onerror="this.onerror=null;this.src='/cards/noImage.webp'"/>
|
||||
<div class="row row-cols-5 gx-1 price-row mb-2">
|
||||
{card.prices
|
||||
@@ -55,8 +56,8 @@ const order = ["Near Mint", "Lightly Played", "Moderately Played", "Heavily Play
|
||||
))}
|
||||
</div>
|
||||
<div class="h5 my-0">{card.productName}</div>
|
||||
<div class="d-flex flex-row lh-1">
|
||||
<div class="copy-small d-none d-lg-flex flex-grow-1">{card.set?.setCode}</div>
|
||||
<div class="d-flex flex-row lh-1 mt-1">
|
||||
<div class="copy-small flex-grow-1">{card.set?.setCode}</div>
|
||||
<div class="copy-small">{card.number}</div>
|
||||
<RarityIcon rarity={card.rarityName} />
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,184 @@
|
||||
---
|
||||
import Card from '../components/Card.astro';
|
||||
import ebay from "/vendors/ebay.svg?raw";
|
||||
---
|
||||
|
||||
---
|
||||
<!-- Modal -->
|
||||
<div class="modal fade card-modal" id="cardModal" tabindex="-1" aria-labelledby="cardModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-fullscreen-md-down modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header border-0">
|
||||
<h4 class="card-title">Card title | <span class="text-secondary">Card Number</span> Energy</h4>
|
||||
<button type="button" class="btn-close" aria-label="Close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body pt-0">
|
||||
<div class="container-fluid">
|
||||
<div class="card mb-2 border-0">
|
||||
<div class="row g-4">
|
||||
<div class="col-sm-12 col-md-3">
|
||||
<h6 class="text-secondary">Set name | Set Symbol</h6>
|
||||
<img src="/cards/noImage.webp" class="card-image img-fluid rounded" alt="...">
|
||||
<div class="d-flex flex-row justify-content-between mt-2">
|
||||
<div>Illustrator</div>
|
||||
<div>Rarity</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-7">
|
||||
<nav>
|
||||
<div class="nav nav-tabs nav-sm-fill border-0" id="nav-tab" role="tablist">
|
||||
<button class="nav-link nm active" id="nav-nm" data-bs-toggle="tab" data-bs-target="#nav-nm" type="button" role="tab" aria-controls="nav-nm" aria-selected="true"><span class="d-none d-md-inline">Near Mint</span><span class="d-md-none">NM</span></button>
|
||||
<button class="nav-link lp" id="nav-lp" data-bs-toggle="tab" data-bs-target="#nav-lp" type="button" role="tab" aria-controls="nav-lp" aria-selected="false"><span class="d-none d-md-inline">Lightly Played</span><span class="d-md-none">LP</span></button>
|
||||
<button class="nav-link mp" id="nav-mp" data-bs-toggle="tab" data-bs-target="#nav-mp" type="button" role="tab" aria-controls="nav-mp" aria-selected="false"><span class="d-none d-md-inline">Moderately Played</span><span class="d-md-none">MP</span></button>
|
||||
<button class="nav-link hp" id="nav-hp" data-bs-toggle="tab" data-bs-target="#nav-hp" type="button" role="tab" aria-controls="nav-hp" aria-selected="false"><span class="d-none d-md-inline">Heavily Played</span><span class="d-md-none">HP</span></button>
|
||||
<button class="nav-link dmg" id="nav-dmg" data-bs-toggle="tab" data-bs-target="#nav-dmg" type="button" role="tab" aria-controls="nav-dmg" aria-selected="false"><span class="d-none d-md-inline">Damaged</span><span class="d-md-none">DMG</span></button>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="tab-content" id="nav-tabContent">
|
||||
<div class="tab-pane fade show active" id="nav-nm" role="tabpanel" aria-labelledby="nav-nm" tabindex="0">
|
||||
<div class="row g-2 mt-2">
|
||||
<div class="d-inline-flex flex-row flex-md-column flex-wrap flex-md-nowrap mt-2 col-sm-4 col-md-3">
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Market Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Lowest Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Highest Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Volatility</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2 flex-fill">
|
||||
<h6>Latest Sales</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-column mt-2 col-xs-8 col-md-9">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-lp" role="tabpanel" aria-labelledby="nav-lp" tabindex="0">
|
||||
<div class="row g-2 mt-2">
|
||||
<div class="d-flex flex-column mt-2 col-3">
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Market Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Lowest Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Highest Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Volatility</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2 flex-fill">
|
||||
<h6>Latest Sales</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-mp" role="tabpanel" aria-labelledby="nav-mp" tabindex="0">
|
||||
<div class="row g-2 mt-2">
|
||||
<div class="d-flex flex-column mt-2 col-3">
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Market Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Lowest Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Highest Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Volatility</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2 flex-fill">
|
||||
<h6>Latest Sales</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-hp" role="tabpanel" aria-labelledby="nav-hp" tabindex="0">
|
||||
<div class="row g-2 mt-2">
|
||||
<div class="d-flex flex-column mt-2 col-3">
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Market Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Lowest Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Highest Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Volatility</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2 flex-fill">
|
||||
<h6>Latest Sales</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-dmg" role="tabpanel" aria-labelledby="nav-dmg" tabindex="0">
|
||||
<div class="row g-2 mt-2">
|
||||
<div class="d-flex flex-column mt-2 col-3">
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Market Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Lowest Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Highest Price</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2">
|
||||
<h6>Volatility</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="dark-callout rounded p-2 mb-2 flex-fill">
|
||||
<h6>Latest Sales</h6>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-2">
|
||||
<button type="button" class="btn btn-secondary mb-2 w-100"><img src="/vendors/tcgplayer.webp"> TCGPlayer</button>
|
||||
<button type="button" class="btn btn-secondary mb-2 w-100"><span set:html={ebay} /></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end my-0"><small class="text-body-secondary">Prices last updated</small></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
33
src/components/EnergyIcon.astro
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
import grass from "/src/svg/energy/grass.svg?raw";
|
||||
import fairy from "/src/svg/energy/fairy.svg?raw";
|
||||
import dark from "/src/svg/energy/dark.svg?raw";
|
||||
import dragon from "/src/svg/energy/dragon.svg?raw";
|
||||
import fire from "/src/svg/energy/fire.svg?raw";
|
||||
import water from "/src/svg/energy/water.svg?raw";
|
||||
import electric from "/src/svg/energy/electric.svg?raw";
|
||||
import steel from "/src/svg/energy/steel.svg?raw";
|
||||
import colorless from "/src/svg/energy/colorless.svg?raw";
|
||||
import fighting from "/src/svg/energy/fighting.svg?raw";
|
||||
import psychic from "/src/svg/energy/psychic.svg?raw";
|
||||
|
||||
const { energy } = Astro.props;
|
||||
|
||||
const energyMap = {
|
||||
"Grass": grass,
|
||||
"Fairy": fairy,
|
||||
"Dark": dark,
|
||||
"Dragon": dragon,
|
||||
"Fire": fire,
|
||||
"Water": water,
|
||||
"Steel": steel,
|
||||
"Colorless": colorless,
|
||||
"Fighting": fighting,
|
||||
"Psychic": psychic,
|
||||
"Electric": electric,
|
||||
};
|
||||
|
||||
const svg = energyMap[energy as keyof typeof energyMap] ?? "";
|
||||
---
|
||||
|
||||
<div class="energy-icon ps-2" set:html={svg}></div>
|
||||
@@ -11,7 +11,7 @@ const { query } = Astro.props;
|
||||
<input type="text" name="q" class="form-control w-100 search-box" placeholder="Search cards..." value={query} />
|
||||
</div>
|
||||
<div class="my-2">
|
||||
<input type="submit" class="btn btn-primary w-100 search-button" value="Search" />
|
||||
<input type="submit" class="w-100 search-button" value="Search" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -2,6 +2,7 @@ import { mysqlTable, int, varchar, boolean, decimal, datetime, index } from "dri
|
||||
|
||||
export const cards = mysqlTable("cards", {
|
||||
productId: int().primaryKey(),
|
||||
originalProductName: varchar({ length: 255 }).default("").notNull(),
|
||||
productName: varchar({ length: 255 }).notNull(),
|
||||
productLineName: varchar({ length: 255 }).default("").notNull(),
|
||||
productLineUrlName: varchar({ length: 255 }).default("").notNull(),
|
||||
@@ -11,17 +12,17 @@ export const cards = mysqlTable("cards", {
|
||||
rarityName: varchar({ length: 100 }).default("").notNull(),
|
||||
sealed: boolean().default(false).notNull(),
|
||||
sellerListable: boolean().default(false).notNull(),
|
||||
setId: int().default(0).notNull(),
|
||||
shippingCategoryId: int().default(0).notNull(),
|
||||
setId: int(),
|
||||
shippingCategoryId: int(),
|
||||
duplicate: boolean().default(false).notNull(),
|
||||
foilOnly: boolean().default(false).notNull(),
|
||||
maxFulfillableQuantity: int().default(0).notNull(),
|
||||
totalListings: int().default(0).notNull(),
|
||||
score: decimal({ precision: 10, scale: 2, mode: 'number' }).default(0).notNull(),
|
||||
lowestPrice: decimal({ precision: 10, scale: 2, mode: 'number' }).default(0).notNull(),
|
||||
lowestPriceWithShipping: decimal({ precision: 10, scale: 2, mode: 'number' }).default(0).notNull(),
|
||||
marketPrice: decimal({ precision: 10, scale: 2, mode: 'number' }).default(0).notNull(),
|
||||
medianPrice: decimal({ precision: 10, scale: 2, mode: 'number' }).default(0).notNull(),
|
||||
maxFulfillableQuantity: int(),
|
||||
totalListings: int(),
|
||||
score: decimal({ precision: 10, scale: 2, mode: 'number' }),
|
||||
lowestPrice: decimal({ precision: 10, scale: 2, mode: 'number' }),
|
||||
lowestPriceWithShipping: decimal({ precision: 10, scale: 2, mode: 'number' }),
|
||||
marketPrice: decimal({ precision: 10, scale: 2, mode: 'number' }),
|
||||
medianPrice: decimal({ precision: 10, scale: 2, mode: 'number' }),
|
||||
attack1: varchar({ length: 1024 }),
|
||||
attack2: varchar({ length: 1024 }),
|
||||
attack3: varchar({ length: 1024 }),
|
||||
@@ -30,13 +31,14 @@ export const cards = mysqlTable("cards", {
|
||||
cardTypeB: varchar({ length: 100 }),
|
||||
energyType: varchar({ length: 100 }),
|
||||
flavorText: varchar({ length: 1000 }),
|
||||
hp: int().default(0).notNull(),
|
||||
hp: int(),
|
||||
number: varchar({ length: 50 }).default("").notNull(),
|
||||
releaseDate: datetime(),
|
||||
resistance: varchar({ length: 100 }),
|
||||
retreatCost: varchar({ length: 100 }),
|
||||
stage: varchar({ length: 100 }),
|
||||
weakness: varchar({ length: 100 }),
|
||||
Artist: varchar({ length: 255 }),
|
||||
});
|
||||
|
||||
export const sets = mysqlTable("sets", {
|
||||
|
||||
@@ -16,7 +16,7 @@ import '/src/assets/css/main.scss';
|
||||
<script>
|
||||
// Import only what you need
|
||||
// import 'bootstrap/js/dist/alert';
|
||||
// import 'bootstrap/js/dist/button';
|
||||
import 'bootstrap/js/dist/button';
|
||||
// import 'bootstrap/js/dist/carousel';
|
||||
// import 'bootstrap/js/dist/collapse';
|
||||
// import 'bootstrap/js/dist/dropdown';
|
||||
@@ -24,7 +24,7 @@ import '/src/assets/css/main.scss';
|
||||
// import 'bootstrap/js/dist/offcanvas';
|
||||
// import 'bootstrap/js/dist/popover';
|
||||
// import 'bootstrap/js/dist/scrollspy';
|
||||
// import 'bootstrap/js/dist/tab';
|
||||
import 'bootstrap/js/dist/tab';
|
||||
// import 'bootstrap/js/dist/toast';
|
||||
// import 'bootstrap/js/dist/tooltip';
|
||||
</script>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import Layout from '../layouts/Main.astro';
|
||||
import CardGrid from "../components/CardGrid.astro";
|
||||
import Card from "../components/Card.astro";
|
||||
import CardModal from '../components/CardModal.astro';
|
||||
import StickyFilter from '../components/StickyFilter.astro';
|
||||
|
||||
export const prerender = false;
|
||||
@@ -20,6 +21,8 @@ const query = searchParams.get('q') || '*';
|
||||
<CardGrid>
|
||||
<Card slot="Card" query={query}></Card>
|
||||
</CardGrid>
|
||||
<CardModal>
|
||||
</CardModal>
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
1
src/svg/energy/colorless.svg
Normal file
|
After Width: | Height: | Size: 109 KiB |
1
src/svg/energy/dark.svg
Normal file
|
After Width: | Height: | Size: 95 KiB |
1
src/svg/energy/dragon.svg
Normal file
|
After Width: | Height: | Size: 117 KiB |
1
src/svg/energy/electric.svg
Normal file
|
After Width: | Height: | Size: 104 KiB |
1
src/svg/energy/fairy.svg
Normal file
|
After Width: | Height: | Size: 126 KiB |
1
src/svg/energy/fighting.svg
Normal file
|
After Width: | Height: | Size: 120 KiB |
1
src/svg/energy/fire.svg
Normal file
|
After Width: | Height: | Size: 137 KiB |
1
src/svg/energy/grass.svg
Normal file
|
After Width: | Height: | Size: 138 KiB |
1
src/svg/energy/psychic.svg
Normal file
|
After Width: | Height: | Size: 136 KiB |
1
src/svg/energy/steel.svg
Normal file
|
After Width: | Height: | Size: 107 KiB |
1
src/svg/energy/water.svg
Normal file
|
After Width: | Height: | Size: 101 KiB |