Files
streetmerchant/src/store/model/index.ts
T
manybot 8a70f14743 feat(store): add amazon-de (#167)
Co-authored-by: Jef LeCompte <jeffreylec@gmail.com>
Co-authored-by: fuckingrobot <fuckingrobot@users.noreply.github.com>
2020-09-23 22:16:15 -04:00

58 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import {Adorama} from './adorama';
import {Amazon} from './amazon';
import {AmazonCa} from './amazon-ca';
import {AmazonDe} from './amazon-de';
import {Asus} from './asus';
import {BAndH} from './bandh';
import {BestBuy} from './bestbuy';
import {BestBuyCa} from './bestbuy-ca';
import {Config} from '../../config';
import {Evga} from './evga';
import {EvgaEu} from './evga-eu';
import {Logger} from '../../logger';
import {MicroCenter} from './microcenter';
import {Newegg} from './newegg';
import {NeweggCa} from './newegg-ca';
import {Nvidia} from './nvidia';
import {NvidiaApi} from './nvidia-api';
import {OfficeDepot} from './officedepot';
import {Store} from './store';
import {Zotac} from './zotac';
const masterList = new Map([
[Adorama.name, Adorama],
[Amazon.name, Amazon],
[AmazonCa.name, AmazonCa],
[AmazonDe.name, AmazonDe],
[Asus.name, Asus],
[BAndH.name, BAndH],
[BestBuy.name, BestBuy],
[BestBuyCa.name, BestBuyCa],
[Evga.name, Evga],
[EvgaEu.name, EvgaEu],
[MicroCenter.name, MicroCenter],
[Newegg.name, Newegg],
[NeweggCa.name, NeweggCa],
[Nvidia.name, Nvidia],
[NvidiaApi.name, NvidiaApi],
[OfficeDepot.name, OfficeDepot],
[Zotac.name, Zotac]
]);
const list = new Map();
for (const name of Config.store.stores) {
if (masterList.has(name)) {
list.set(name, masterList.get(name));
} else {
const logString = `No store named ${name}, skipping.`;
Logger.warn(logString);
}
}
Logger.info(` selected stores: ${Array.from(list.keys()).join(', ')}`);
export const Stores = Array.from(list.values()) as Store[];
export * from './store';