mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 15:05:19 +00:00
Board "Acompanhe de perto" (S1+S2) ganha o feed automático do perfil oficial: loader irmão src/utilities/socialFeed/instagramFeed.ts (Graph API /media com children p/ carrossel + username, unstable_cache tag social-feed + revalidate 300, snapshot cru pré-exclusão persistido via SQL direto, refresh de token automático com retry 1x — refresh endpoint só renova tokens de Instagram Login, page tokens caem no fail-closed), global SocialFeedSettings estendida (instagramEnabled/AccessToken/UserId/MaxItems + snapshot hidden; excludedItems já cobria a plataforma desde a S2). Requisito nº 1 — picker de exclusão no admin (primeiro componente custom do repo, campo ui + importmap): lista os posts do snapshot com thumbnail e toggle "Não exibir" que escreve em excludedItems. Card com coverAspect square (1:1 do rascunho), badge Instagram, título = legenda com fallback para post sem legenda, clique no permalink (noopener), link "Seguir no Instagram →" derivado do username. Os feeds externos mudam para o subfolder socialFeed/ (pin da S2 previa). Migration 20260818_192948_add_instagram_social_feed_fields (não destrutiva). Stub IG no webServer (porta dev+2000, helper socialStub.ts) + 3 e2e novos no describe serial + kill switch estendido + smoke do picker no admin. Closes #20
26 lines
1.2 KiB
JavaScript
26 lines
1.2 KiB
JavaScript
import { withPayload } from '@payloadcms/next/withPayload'
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const allowedImageHost = process.env.NEXT_PUBLIC_SITE_URL || 'https://jorgesolla.com.br'
|
|
|
|
const nextConfig = {
|
|
distDir: process.env.NEXT_DIST_DIR || '.next',
|
|
...(process.env.NEXT_OUTPUT_STANDALONE === '1' ? { output: 'standalone' } : {}),
|
|
images: {
|
|
remotePatterns: [
|
|
new URL(`${allowedImageHost}/**`),
|
|
// YouTube video thumbnails (campaign home content board, S2) come from
|
|
// the platform's CDN — see `src/utilities/socialFeed/youtubeFeed.ts`.
|
|
new URL('https://i.ytimg.com/**'),
|
|
// Instagram media thumbnails (campaign home content board, S3) come from
|
|
// the Graph API's CDN (hosts vary per region) —
|
|
// see `src/utilities/socialFeed/instagramFeed.ts`.
|
|
new URL('https://*.cdninstagram.com/**'),
|
|
// e2e-only: the YouTube/Instagram stubs (tests/e2e/*-stub.mjs) serve the
|
|
// fixture thumbnails locally so specs never touch the real network.
|
|
{ protocol: 'http', hostname: 'localhost', pathname: '/thumbs/**' },
|
|
],
|
|
},
|
|
}
|
|
|
|
export default withPayload(nextConfig, { devBundleServerPackages: false })
|