From 314f533f0bab0a466a276c5895d2f00bf86741f4 Mon Sep 17 00:00:00 2001 From: Vinh Nguyen Date: Tue, 10 Nov 2020 06:47:15 -0700 Subject: [PATCH] feat(store): add xbox series x and s (#732) Co-authored-by: VictorV Co-authored-by: vinhnguyen --- README.md | 1 + src/config.ts | 6 ++++-- src/store/model/amazon.ts | 12 ++++++++++++ src/store/model/bestbuy.ts | 12 ++++++++++++ src/store/model/gamestop.ts | 12 ++++++++++++ src/store/model/newegg.ts | 12 ++++++++++++ src/store/model/store.ts | 4 ++-- src/store/model/target.ts | 12 ++++++++++++ src/store/model/walmart.ts | 12 ++++++++++++ 9 files changed, 79 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6ab5c22..ca3897a 100644 --- a/README.md +++ b/README.md @@ -235,6 +235,7 @@ environment variables are **optional**._ | `gigabyte` | `aorus master`, `aorus xtreme`, `eagle`, `eagle oc`, `gaming`, `gaming oc`, `turbo`, `vision`, `vision oc` | | `inno3d` | `gaming x3`, `ichill x3`, `ichill x4`, `twin x2 oc` | | `kfa2` | `sg oc` | +| `microsoft` | `xboxsx` , `xboxss` | | `msi` | `gaming x trio`, `ventus 2x oc`, `ventus 3x`, `ventus 3x oc` | | `nvidia` | `founders edition` | | `palit` | `gamerock oc`, `gaming pro`, `gaming pro oc` | diff --git a/src/config.ts b/src/config.ts index 23a01ef..9c46deb 100644 --- a/src/config.ts +++ b/src/config.ts @@ -257,7 +257,9 @@ const store = { ryzen5950: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN5950), sonyps5c: -1, sonyps5de: -1, - 'test:series': -1 + 'test:series': -1, + xboxss: -1, + xboxsx: -1 } }, microCenterLocation: envOrArray(process.env.MICROCENTER_LOCATION, ['web']), @@ -269,7 +271,7 @@ const store = { series: envOrString(series) }; }), - showOnlySeries: envOrArray(process.env.SHOW_ONLY_SERIES, ['3070', '3080', '3090', 'ryzen5600', 'ryzen5800', 'ryzen5900', 'ryzen5950', 'sonyps5c', 'sonyps5de']), + showOnlySeries: envOrArray(process.env.SHOW_ONLY_SERIES, ['3070', '3080', '3090', 'ryzen5600', 'ryzen5800', 'ryzen5900', 'ryzen5950', 'sonyps5c', 'sonyps5de', 'xboxsx', 'xboxss']), stores: envOrArray(process.env.STORES, ['nvidia']).map(entry => { const [name, minPageSleep, maxPageSleep] = entry.match(/[^:]+/g) ?? []; return { diff --git a/src/store/model/amazon.ts b/src/store/model/amazon.ts index 4bd754b..cb1da37 100644 --- a/src/store/model/amazon.ts +++ b/src/store/model/amazon.ts @@ -273,6 +273,18 @@ export const Amazon: Store = { model: 'ps5 digital', series: 'sonyps5de', url: 'https://www.amazon.com/dp/B08FC6MR62' + }, + { + brand: 'microsoft', + model: 'xbox series x', + series: 'xboxsx', + url: 'https://www.amazon.com/dp/B08H75RTZ8' + }, + { + brand: 'microsoft', + model: 'xbox series s', + series: 'xboxss', + url: 'https://www.amazon.com/dp/B08G9J44ZN' } ], name: 'amazon' diff --git a/src/store/model/bestbuy.ts b/src/store/model/bestbuy.ts index 6398aca..912ce01 100644 --- a/src/store/model/bestbuy.ts +++ b/src/store/model/bestbuy.ts @@ -269,6 +269,18 @@ export const BestBuy: Store = { model: 'ps5 digital', series: 'sonyps5de', url: 'https://www.bestbuy.com/site/sony-playstation-5-digital-edition-console/6430161.p?skuId=6430161&intl=nosplash' + }, + { + brand: 'microsoft', + model: 'xbox series x', + series: 'xboxsx', + url: 'https://www.bestbuy.com/site/microsoft-xbox-series-x-1tb-console-black/6428324.p?skuId=6428324' + }, + { + brand: 'microsoft', + model: 'xbox series s', + series: 'xboxss', + url: 'https://www.bestbuy.com/site/microsoft-xbox-series-s-512-gb-all-digital-console-disc-free-gaming-white/6430277.p?skuId=6430277' } ], name: 'bestbuy' diff --git a/src/store/model/gamestop.ts b/src/store/model/gamestop.ts index 4aefa69..c287866 100644 --- a/src/store/model/gamestop.ts +++ b/src/store/model/gamestop.ts @@ -45,6 +45,18 @@ export const Gamestop: Store = { model: 'ps5 digital', series: 'sonyps5de', url: 'https://www.gamestop.com/video-games/playstation-5/consoles/products/playstation-5-digital-edition/11108141' + }, + { + brand: 'microsoft', + model: 'xbox series x', + series: 'xboxsx', + url: 'https://www.gamestop.com/video-games/xbox-series-x/consoles/products/xbox-series-x/11108371.html?condition=New' + }, + { + brand: 'microsoft', + model: 'xbox series s', + series: 'xboxss', + url: 'https://www.gamestop.com/video-games/xbox-series-x/consoles/products/xbox-series-s-digital-edition/11108372.html?condition=New' } ], name: 'gamestop', diff --git a/src/store/model/newegg.ts b/src/store/model/newegg.ts index c429712..db8bf9e 100644 --- a/src/store/model/newegg.ts +++ b/src/store/model/newegg.ts @@ -439,6 +439,18 @@ export const Newegg: Store = { model: '5600x', series: 'ryzen5600', url: 'https://www.newegg.com/amd-ryzen-5-5600x/p/N82E16819113666' + }, + { + brand: 'microsoft', + model: 'xbox series x', + series: 'xboxsx', + url: 'https://www.newegg.com/p/N82E16868105273' + }, + { + brand: 'microsoft', + model: 'xbox series s', + series: 'xboxss', + url: 'https://www.newegg.com/p/N82E16868105274' } ], name: 'newegg', diff --git a/src/store/model/store.ts b/src/store/model/store.ts index 599e57a..140b95e 100644 --- a/src/store/model/store.ts +++ b/src/store/model/store.ts @@ -10,10 +10,10 @@ export type Pricing = { euroFormat?: boolean; }; -export type Series = 'test:series' | '3070' | '3080' | '3090' | 'ryzen5950' | 'ryzen5900' | 'ryzen5800' | 'ryzen5600' | 'sonyps5c' | 'sonyps5de'; +export type Series = 'test:series' | '3070' | '3080' | '3090' | 'ryzen5950' | 'ryzen5900' | 'ryzen5800' | 'ryzen5600' | 'sonyps5c' | 'sonyps5de' | 'xboxsx' | 'xboxss'; export type Link = { - brand: 'test:brand' | 'amd' | 'asus' | 'evga' | 'gainward' | 'gigabyte' | 'inno3d' | 'kfa2' | 'msi' | 'nvidia' | 'palit' | 'pny'| 'sony' | 'zotac'; + brand: 'test:brand' | 'amd' | 'asus' | 'evga' | 'gainward' | 'gigabyte' | 'inno3d' | 'kfa2' | 'msi' | 'nvidia' | 'palit' | 'pny'| 'sony' | 'zotac' | 'microsoft'; itemNumber?: string; series: Series; model: string; diff --git a/src/store/model/target.ts b/src/store/model/target.ts index 4e56820..936816e 100644 --- a/src/store/model/target.ts +++ b/src/store/model/target.ts @@ -22,6 +22,18 @@ export const Target: Store = { model: 'ps5 digital', series: 'sonyps5de', url: 'https://www.target.com/p/playstation-5-digital-edition-console/-/A-81114596' + }, + { + brand: 'microsoft', + model: 'xbox series x', + series: 'xboxsx', + url: 'https://www.target.com/p/xbox-series-x-console/-/A-80790841' + }, + { + brand: 'microsoft', + model: 'xbox series s', + series: 'xboxss', + url: 'https://www.target.com/p/xbox-series-s-console/-/A-80790842' } ], name: 'target' diff --git a/src/store/model/walmart.ts b/src/store/model/walmart.ts index 3401207..5ebfbe7 100644 --- a/src/store/model/walmart.ts +++ b/src/store/model/walmart.ts @@ -22,6 +22,18 @@ export const Walmart: Store = { model: 'ps5 digital', series: 'sonyps5de', url: 'https://www.walmart.com/ip/PlayStation5-Console/363472942' + }, + { + brand: 'microsoft', + model: 'xbox series x', + series: 'xboxsx', + url: 'https://www.walmart.com/ip/Xbox-Series-X/443574645' + }, + { + brand: 'microsoft', + model: 'xbox series s', + series: 'xboxss', + url: 'https://www.walmart.com/ip/Xbox-Series-S/606518560' } ], name: 'walmart'