### Update streetmerchant with git pull, npm install, and npm run start Source: https://www.jef.buzz/streetmerchant/faq/ Run these commands to get the latest code. If you have local changes, this will likely fail. ```bash git pull origin main npm install npm run start ``` -------------------------------- ### Start and Stop with docker-compose Source: https://www.jef.buzz/streetmerchant/getting-started/ Commands to start and stop streetmerchant using docker-compose. Use -d for detached mode and --build to build the image. ```bash # To start # Use `-d` if you want to run in detached mode # Use `--build` if you want to build the image before running (default image is latest in GitHub Container Registry). docker-compose up # To break down docker-compose down ``` -------------------------------- ### Set WEB_PORT for web dashboard Source: https://www.jef.buzz/streetmerchant/getting-started/ Set the WEB_PORT environment variable in your dotenv file to enable the web dashboard. After starting the app, open http://localhost:8080 to access the dashboard. ```dotenv WEB_PORT=8080 ``` -------------------------------- ### Set PUPPETEER_EXECUTABLE_PATH in dotenv Source: https://www.jef.buzz/streetmerchant/help/troubleshoot/ Use this environment variable to specify a custom Chrome executable path for puppeteer.launch. This is a last-case scenario for captcha issues. The path varies by OS and install location; use full paths. ```dotenv PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable ``` -------------------------------- ### Fix macOS code signing for Puppeteer Chromium Source: https://www.jef.buzz/streetmerchant/help/troubleshoot/ Run this command to sign the Chromium app bundled with Puppeteer to avoid macOS popups. The version number (mac-800071) may differ; start from ./node_modules/puppeteer/.local-chromium and autocomplete. ```bash sudo codesign --force --deep --sign - ./node_modules/puppeteer/.local-chromium/mac-800071/chrome-mac/Chromium.app ``` -------------------------------- ### Terraform init, plan, and apply commands Source: https://www.jef.buzz/streetmerchant/reference/terraform/ Commands to initialize, plan, and apply the Terraform configuration for the streetmerchant Fargate deployment. Run these from the terraform directory after setting up your tfvars file and AWS credentials. ```bash cd ./terraform terraform init terraform plan terraform apply ``` -------------------------------- ### Add postinstall and tsc scripts to package.json Source: https://www.jef.buzz/streetmerchant/getting-started/ Paste these lines under the "posttest" config in package.json to add postinstall and tsc scripts. ```json "postinstall": "npm run tsc", "tsc": "tsc", ``` -------------------------------- ### Run Docker Nightly and Test Notifications Source: https://www.jef.buzz/streetmerchant/getting-started/ Commands to run the nightly Docker image and test notifications. Requires a dotenv file. ```bash # to run docker nightly docker run -it --rm \ --env-file ./dotenv \ ghcr.io/jef/streetmerchant:nightly # to test notifications docker run -it --rm \ --env-file ./dotenv \ ghcr.io/jef/streetmerchant:nightly test:notification:production ``` -------------------------------- ### Heroku login command Source: https://www.jef.buzz/streetmerchant/getting-started/ Run this command in the terminal to log into Heroku. Follow the prompts to complete login. ```bash heroku login # Follow the steps to login ``` -------------------------------- ### Update src/config.ts to add new series to maxPrice and showOnlySeries Source: https://www.jef.buzz/streetmerchant/help/general/ Adds 'new series' to the maxPrice series map and the showOnlySeries array. Use -1 for no max price or add MAX_PRICE_SERIES_NEW_SERIES environment variable. ```diff --- a/src/config.ts +++ b/src/config.ts @@ -308,6 +308,7 @@ const store = { country: envOrString(process.env.COUNTRY, 'usa'), maxPrice: { series: { + 'new series': -1, '3060ti': envOrNumber(process.env.MAX_PRICE_SERIES_3060TI), 3070: envOrNumber(process.env.MAX_PRICE_SERIES_3070), 3080: envOrNumber(process.env.MAX_PRICE_SERIES_3080), @@ -337,6 +338,7 @@ const store = { }; }), showOnlySeries: envOrArray(process.env.SHOW_ONLY_SERIES, [ + 'new series', '3060ti', '3070', '3080', ``` -------------------------------- ### Update src/store/model/index.ts to import and register NewStore Source: https://www.jef.buzz/streetmerchant/help/general/ Adds the NewStore import and registration to the storeList map. This is required for the new store to be recognized. ```diff --- a/src/store/model/index.ts +++ b/src/store/model/index.ts @@ -48,6 +48,7 @@ import {MicroCenter} from './microcenter'; import {Mindfactory} from './mindfactory'; import {Newegg} from './newegg'; import {NeweggCa} from './newegg-ca'; +import {NewStore} from './new-store'; import {Notebooksbilliger} from './notebooksbilliger'; import {Novatech} from './novatech'; import {Nvidia} from './nvidia'; @@ -123,6 +124,7 @@ export const storeList = new Map([ [Mindfactory.name, Mindfactory], [Newegg.name, Newegg], [NeweggCa.name, NeweggCa], + [NewStore.name, NewStore], [Notebooksbilliger.name, Notebooksbilliger], [Novatech.name, Novatech], [Nvidia.name, Nvidia], ``` -------------------------------- ### Add WEB_PORT to docker-compose Source: https://www.jef.buzz/streetmerchant/getting-started/ Add this ports mapping to docker-compose when using WEB_PORT. Replace with your dotenv value. ```yaml ports: - ":" ``` -------------------------------- ### Update src/store/model/store.ts to add new brand, series, and model Source: https://www.jef.buzz/streetmerchant/help/general/ Adds 'new brand', 'new series', and 'new model' to the respective type unions. Required when adding new models or series. ```diff --- a/src/store/model/store.ts +++ b/src/store/model/store.ts @@ -23,6 +23,7 @@ export type Brand = | 'kfa2' | 'microsoft' | 'msi' + | 'new brand' | 'nvidia' | 'palit' | 'pny' @@ -37,6 +38,7 @@ export type Series = | '3070' | '3080' | '3090' + | 'new series' | 'rx6800' | 'rx6800xt' | 'rx6900xt' @@ -83,6 +85,7 @@ export type Model = | 'ichill x2' | 'ichill x3' | 'ichill x4' + | 'new model' | 'nitro+' | 'nitro oc se' | 'nitro oc' ``` -------------------------------- ### Reset local changes and update streetmerchant Source: https://www.jef.buzz/streetmerchant/faq/ Use these commands to discard local changes before pulling the latest code. The 'git checkout .' command clears modifications. ```bash git checkout . git pull origin main npm install npm run start ``` -------------------------------- ### Replace const args in src/index.ts Source: https://www.jef.buzz/streetmerchant/getting-started/ Replace the existing const args with this array to disable sandboxing for Puppeteer on Heroku. ```typescript const args: string[] = [ '--no-sandbox', '--disable-setuid-sandbox' ]; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.