import { ShopifyStoreConnector, type ConnectorMeta } from '@rareindex/connectors'; /** * ShopifyStoreConnector pinned to the shop's home market. * * Shopify Markets localises `products.json` prices by the requester's IP as soon as the request carries an * Accept-Language header: a Canadian crawler reading a US shop gets CAD-converted prices while the JSON has no * currency field — the listing would be silently mislabelled as USD (§192). The market pin (public * `localization=` cookie) now lives in the SDK adapter itself (`config.market`, default `meta.regions[0]`); * this subclass only enforces that a market is known for the g3 fleet. */ export class MarketPinnedShopifyConnector extends ShopifyStoreConnector { constructor(meta: ConnectorMeta) { super(meta); if (!this.market) throw new Error(`${meta.id}: config.market (or regions[0]) must be an ISO-3166 alpha-2 country code`); } }