feat: expose brands list per source via /pipeline/sources API
Each source module now exports a brands[] array: - motousher: 44 brands (full list from brands.js) - dirtstreet: 5 brands (SC Project, Evotech, etc.) - retrorides: 10 bike brands (BMW, Ducati, Aprilia, etc.) - kyt: KYT - brocks-performance: Brock's Performance - yuasa: Yuasa listSources() passes brands[] through in the API response so the frontend can render the per-source brand list without a separate call. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
07fff6ac5a
commit
4b5b7cab9f
@ -206,6 +206,7 @@ async function fetchWebsiteData({ paths: runPaths }) {
|
||||
module.exports = {
|
||||
sourceKey,
|
||||
label,
|
||||
brands: ["Brock's Performance"],
|
||||
defaultBrand: "Brock's Performance",
|
||||
defaultImageBaseUrl: "",
|
||||
envImageBaseUrl: "BROCKS_PERFORMANCE_IMAGE_BASE_URL",
|
||||
|
||||
@ -155,6 +155,7 @@ function convertToShopifyProducts(input, options = {}) {
|
||||
module.exports = {
|
||||
sourceKey,
|
||||
label,
|
||||
brands: BRANDS.map((b) => b.name),
|
||||
defaultBrand: "Dirtstreet",
|
||||
defaultImageBaseUrl: "",
|
||||
envImageBaseUrl: "DIRTSTREET_IMAGE_BASE_URL",
|
||||
|
||||
@ -32,6 +32,7 @@ function listSources() {
|
||||
return Object.values(sources).map((source) => ({
|
||||
sourceKey: source.sourceKey,
|
||||
label: source.label,
|
||||
brands: Array.isArray(source.brands) ? source.brands : [],
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@ function convertToShopifyProducts(input, options = {}) {
|
||||
module.exports = {
|
||||
sourceKey,
|
||||
label,
|
||||
brands: ["KYT"],
|
||||
defaultBrand: "KYT",
|
||||
defaultImageBaseUrl: "https://kytindia.com/server/public/uploads",
|
||||
envImageBaseUrl: "KYT_IMAGE_BASE_URL",
|
||||
|
||||
@ -157,6 +157,7 @@ function convertToShopifyProducts(input, options = {}) {
|
||||
module.exports = {
|
||||
sourceKey,
|
||||
label,
|
||||
brands: BRANDS.map((b) => b.name),
|
||||
defaultBrand: "Motousher",
|
||||
defaultImageBaseUrl: "",
|
||||
envImageBaseUrl: "MOTOUSHER_IMAGE_BASE_URL",
|
||||
|
||||
@ -126,6 +126,7 @@ function convertToShopifyProducts(input, options = {}) {
|
||||
module.exports = {
|
||||
sourceKey,
|
||||
label,
|
||||
brands: ["BMW", "Ducati", "Aprilia", "Honda", "Kawasaki", "Triumph", "Suzuki", "Yamaha", "KTM", "Husqvarna"],
|
||||
defaultBrand: "Retro Rides",
|
||||
defaultImageBaseUrl: "",
|
||||
envImageBaseUrl: "RETRORIDES_IMAGE_BASE_URL",
|
||||
|
||||
@ -135,6 +135,7 @@ function convertToShopifyProducts(input, options = {}) {
|
||||
module.exports = {
|
||||
sourceKey,
|
||||
label,
|
||||
brands: ["Yuasa"],
|
||||
defaultBrand: "Yuasa",
|
||||
defaultImageBaseUrl: "",
|
||||
envImageBaseUrl: "YUASA_IMAGE_BASE_URL",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user