mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 05:17:35 +00:00
feat(amd): add env vars and series filtering (#696)
Co-authored-by: Jef LeCompte <jeffreylec@gmail.com>
This commit is contained in:
@@ -17,6 +17,10 @@ LOW_BANDWIDTH=
|
|||||||
MAX_PRICE_SERIES_3070=
|
MAX_PRICE_SERIES_3070=
|
||||||
MAX_PRICE_SERIES_3080=
|
MAX_PRICE_SERIES_3080=
|
||||||
MAX_PRICE_SERIES_3090=
|
MAX_PRICE_SERIES_3090=
|
||||||
|
MAX_PRICE_SERIES_5950x=
|
||||||
|
MAX_PRICE_SERIES_5900x=
|
||||||
|
MAX_PRICE_SERIES_5800x=
|
||||||
|
MAX_PRICE_SERIES_5600x=
|
||||||
MICROCENTER_LOCATION=
|
MICROCENTER_LOCATION=
|
||||||
MQTT_BROKER_ADDRESS=
|
MQTT_BROKER_ADDRESS=
|
||||||
MQTT_BROKER_PORT=
|
MQTT_BROKER_PORT=
|
||||||
|
|||||||
@@ -99,6 +99,10 @@ environment variables are **optional**._
|
|||||||
| `MAX_PRICE_SERIES_3070` | Maximum price allowed for a match, applies 3070 series cards (does not apply to these sites: Nvidia, Asus, EVGA) | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - Cards above `1234` will be skipped. |
|
| `MAX_PRICE_SERIES_3070` | Maximum price allowed for a match, applies 3070 series cards (does not apply to these sites: Nvidia, Asus, EVGA) | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - Cards above `1234` will be skipped. |
|
||||||
| `MAX_PRICE_SERIES_3080` | Maximum price allowed for a match, applies 3080 series cards (does not apply to these sites: Nvidia, Asus, EVGA) | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - Cards above `1234` will be skipped. |
|
| `MAX_PRICE_SERIES_3080` | Maximum price allowed for a match, applies 3080 series cards (does not apply to these sites: Nvidia, Asus, EVGA) | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - Cards above `1234` will be skipped. |
|
||||||
| `MAX_PRICE_SERIES_3090` | Maximum price allowed for a match, applies 3090 series cards (does not apply to these sites: Nvidia, Asus, EVGA) | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - Cards above `1234` will be skipped. |
|
| `MAX_PRICE_SERIES_3090` | Maximum price allowed for a match, applies 3090 series cards (does not apply to these sites: Nvidia, Asus, EVGA) | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - Cards above `1234` will be skipped. |
|
||||||
|
| `MAX_PRICE_SERIES_5950` | Maximum price allowed for a match, applies AMD 5950 series cpus | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - CPUs above `1234` will be skipped. |
|
||||||
|
| `MAX_PRICE_SERIES_5900` | Maximum price allowed for a match, applies AMD 5900 series cpus | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - CPUs above `1234` will be skipped. |
|
||||||
|
| `MAX_PRICE_SERIES_5800` | Maximum price allowed for a match, applies AMD 5800 series cpus | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - CPUs above `1234` will be skipped. |
|
||||||
|
| `MAX_PRICE_SERIES_5600` | Maximum price allowed for a match, applies AMD 5600 series cpus | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - CPUs above `1234` will be skipped. |
|
||||||
| `MICROCENTER_LOCATION` | Specific MicroCenter location(s) to search | Comma separated, e.g.: `marietta,duluth`, default: `web` |
|
| `MICROCENTER_LOCATION` | Specific MicroCenter location(s) to search | Comma separated, e.g.: `marietta,duluth`, default: `web` |
|
||||||
| `NVIDIA_ADD_TO_CART_ATTEMPTS` | The maximum number of times the `nvidia-api` add to cart feature will be attempted before failing | Default: `10` |
|
| `NVIDIA_ADD_TO_CART_ATTEMPTS` | The maximum number of times the `nvidia-api` add to cart feature will be attempted before failing | Default: `10` |
|
||||||
| `NVIDIA_SESSION_TTL` | The time in milliseconds to keep the cart active while using `nvidia-api` | Default: `60000` |
|
| `NVIDIA_SESSION_TTL` | The time in milliseconds to keep the cart active while using `nvidia-api` | Default: `60000` |
|
||||||
|
|||||||
+4
-1
@@ -251,6 +251,9 @@ const store = {
|
|||||||
3070: envOrNumber(process.env.MAX_PRICE_SERIES_3070),
|
3070: envOrNumber(process.env.MAX_PRICE_SERIES_3070),
|
||||||
3080: envOrNumber(process.env.MAX_PRICE_SERIES_3080),
|
3080: envOrNumber(process.env.MAX_PRICE_SERIES_3080),
|
||||||
3090: envOrNumber(process.env.MAX_PRICE_SERIES_3090),
|
3090: envOrNumber(process.env.MAX_PRICE_SERIES_3090),
|
||||||
|
5600: envOrNumber(process.env.MAX_PRICE_SERIES_5600x),
|
||||||
|
5800: envOrNumber(process.env.MAX_PRICE_SERIES_5800x),
|
||||||
|
5900: envOrNumber(process.env.MAX_PRICE_SERIES_5900x),
|
||||||
5950: envOrNumber(process.env.MAX_PRICE_SERIES_5950x)
|
5950: envOrNumber(process.env.MAX_PRICE_SERIES_5950x)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -263,7 +266,7 @@ const store = {
|
|||||||
series: envOrString(series)
|
series: envOrString(series)
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
showOnlySeries: envOrArray(process.env.SHOW_ONLY_SERIES, ['3070', '3080', '3090']),
|
showOnlySeries: envOrArray(process.env.SHOW_ONLY_SERIES, ['3070', '3080', '3090', 'ryzen5600', 'ryzen5800', 'ryzen5900', 'ryzen5950']),
|
||||||
stores: envOrArray(process.env.STORES, ['nvidia']).map(entry => {
|
stores: envOrArray(process.env.STORES, ['nvidia']).map(entry => {
|
||||||
const [name, minPageSleep, maxPageSleep] = entry.match(/[^:]+/g) ?? [];
|
const [name, minPageSleep, maxPageSleep] = entry.match(/[^:]+/g) ?? [];
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user