4652a92c29
Embed Six Flags API IDs directly in the park registry and snapshot coaster lists from park-meta.json into a TypeScript module. This eliminates the Playwright-based discovery script, RCDB scraper, and runtime dependency on park-meta.json — preparing for the backend API transition. - Add apiId field to Park type and all 24 park entries - Create lib/coaster-data.ts with hardcoded coaster lists - Update page components to use park.apiId and new getCoasterSet() - Remove scripts/discover.ts, lib/scrapers/rcdb.ts, lib/park-meta.ts - Remove data/park-meta.json from shared volume - Remove playwright devDependency and discover npm script - Simplify scripts/scrape.ts (no RCDB, no discovery checks) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
326 lines
9.2 KiB
TypeScript
326 lines
9.2 KiB
TypeScript
import type { Park } from "./scrapers/types";
|
|
|
|
/**
|
|
* All parks listed on https://www.sixflags.com/select-park
|
|
* Slugs verified from that page — used in:
|
|
* https://www.sixflags.com/{slug}/park-hours?date=YYYY-MM-DD
|
|
*
|
|
* Includes former Cedar Fair parks now under the Six Flags Entertainment Group umbrella.
|
|
*/
|
|
export const PARKS: Park[] = [
|
|
// ── Six Flags branded parks ──────────────────────────────────────────────
|
|
{
|
|
id: "greatadventure",
|
|
apiId: 905,
|
|
name: "Six Flags Great Adventure",
|
|
shortName: "Great Adventure",
|
|
chain: "sixflags",
|
|
slug: "greatadventure",
|
|
region: "Northeast",
|
|
location: { lat: 40.1376, lng: -74.4388, city: "Jackson", state: "NJ" },
|
|
timezone: "America/New_York",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "magicmountain",
|
|
apiId: 906,
|
|
name: "Six Flags Magic Mountain",
|
|
shortName: "Magic Mountain",
|
|
chain: "sixflags",
|
|
slug: "magicmountain",
|
|
region: "West & International",
|
|
location: { lat: 34.4252, lng: -118.5973, city: "Valencia", state: "CA" },
|
|
timezone: "America/Los_Angeles",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "greatamerica",
|
|
apiId: 910,
|
|
name: "Six Flags Great America",
|
|
shortName: "Great America",
|
|
chain: "sixflags",
|
|
slug: "greatamerica",
|
|
region: "Midwest",
|
|
location: { lat: 42.3702, lng: -87.9358, city: "Gurnee", state: "IL" },
|
|
timezone: "America/Chicago",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "overgeorgia",
|
|
apiId: 902,
|
|
name: "Six Flags Over Georgia",
|
|
shortName: "Over Georgia",
|
|
chain: "sixflags",
|
|
slug: "overgeorgia",
|
|
region: "Southeast",
|
|
location: { lat: 33.7718, lng: -84.5494, city: "Austell", state: "GA" },
|
|
timezone: "America/New_York",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "overtexas",
|
|
apiId: 901,
|
|
name: "Six Flags Over Texas",
|
|
shortName: "Over Texas",
|
|
chain: "sixflags",
|
|
slug: "overtexas",
|
|
region: "Texas & South",
|
|
location: { lat: 32.7554, lng: -97.0639, city: "Arlington", state: "TX" },
|
|
timezone: "America/Chicago",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "stlouis",
|
|
apiId: 903,
|
|
name: "Six Flags St. Louis",
|
|
shortName: "St. Louis",
|
|
chain: "sixflags",
|
|
slug: "stlouis",
|
|
region: "Midwest",
|
|
location: { lat: 38.5153, lng: -90.6751, city: "Eureka", state: "MO" },
|
|
timezone: "America/Chicago",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "fiestatexas",
|
|
apiId: 914,
|
|
name: "Six Flags Fiesta Texas",
|
|
shortName: "Fiesta Texas",
|
|
chain: "sixflags",
|
|
slug: "fiestatexas",
|
|
region: "Texas & South",
|
|
location: { lat: 29.6054, lng: -98.622, city: "San Antonio", state: "TX" },
|
|
timezone: "America/Chicago",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "newengland",
|
|
apiId: 935,
|
|
name: "Six Flags New England",
|
|
shortName: "New England",
|
|
chain: "sixflags",
|
|
slug: "newengland",
|
|
region: "Northeast",
|
|
location: { lat: 42.037, lng: -72.6151, city: "Agawam", state: "MA" },
|
|
timezone: "America/New_York",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "discoverykingdom",
|
|
apiId: 936,
|
|
name: "Six Flags Discovery Kingdom",
|
|
shortName: "Discovery Kingdom",
|
|
chain: "sixflags",
|
|
slug: "discoverykingdom",
|
|
region: "West & International",
|
|
location: { lat: 38.136, lng: -122.2314, city: "Vallejo", state: "CA" },
|
|
timezone: "America/Los_Angeles",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "mexico",
|
|
apiId: 960,
|
|
name: "Six Flags Mexico",
|
|
shortName: "Mexico",
|
|
chain: "sixflags",
|
|
slug: "mexico",
|
|
region: "West & International",
|
|
location: { lat: 19.2982, lng: -99.2146, city: "Mexico City", state: "Mexico" },
|
|
timezone: "America/Mexico_City",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "greatescape",
|
|
apiId: 924,
|
|
name: "Six Flags Great Escape",
|
|
shortName: "Great Escape",
|
|
chain: "sixflags",
|
|
slug: "greatescape",
|
|
region: "Northeast",
|
|
location: { lat: 43.3537, lng: -73.6776, city: "Queensbury", state: "NY" },
|
|
timezone: "America/New_York",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "darienlake",
|
|
apiId: 945,
|
|
name: "Six Flags Darien Lake",
|
|
shortName: "Darien Lake",
|
|
chain: "sixflags",
|
|
slug: "darienlake",
|
|
region: "Northeast",
|
|
location: { lat: 42.9915, lng: -78.3895, city: "Darien Center", state: "NY" },
|
|
timezone: "America/New_York",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
// ── Former Cedar Fair theme parks ─────────────────────────────────────────
|
|
{
|
|
id: "cedarpoint",
|
|
apiId: 1,
|
|
name: "Cedar Point",
|
|
shortName: "Cedar Point",
|
|
chain: "sixflags",
|
|
slug: "cedarpoint",
|
|
region: "Midwest",
|
|
location: { lat: 41.4784, lng: -82.6832, city: "Sandusky", state: "OH" },
|
|
timezone: "America/New_York",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "knotts",
|
|
apiId: 4,
|
|
name: "Knott's Berry Farm",
|
|
shortName: "Knott's",
|
|
chain: "sixflags",
|
|
slug: "knotts",
|
|
region: "West & International",
|
|
location: { lat: 33.8442, lng: -117.9989, city: "Buena Park", state: "CA" },
|
|
timezone: "America/Los_Angeles",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "canadaswonderland",
|
|
apiId: 40,
|
|
name: "Canada's Wonderland",
|
|
shortName: "Canada's Wonderland",
|
|
chain: "sixflags",
|
|
slug: "canadaswonderland",
|
|
region: "Northeast",
|
|
location: { lat: 43.8426, lng: -79.5396, city: "Vaughan", state: "ON" },
|
|
timezone: "America/Toronto",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "carowinds",
|
|
apiId: 30,
|
|
name: "Carowinds",
|
|
shortName: "Carowinds",
|
|
chain: "sixflags",
|
|
slug: "carowinds",
|
|
region: "Southeast",
|
|
location: { lat: 35.1043, lng: -80.9394, city: "Charlotte", state: "NC" },
|
|
timezone: "America/New_York",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "kingsdominion",
|
|
apiId: 25,
|
|
name: "Kings Dominion",
|
|
shortName: "Kings Dominion",
|
|
chain: "sixflags",
|
|
slug: "kingsdominion",
|
|
region: "Southeast",
|
|
location: { lat: 37.8357, lng: -77.4463, city: "Doswell", state: "VA" },
|
|
timezone: "America/New_York",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "kingsisland",
|
|
apiId: 20,
|
|
name: "Kings Island",
|
|
shortName: "Kings Island",
|
|
chain: "sixflags",
|
|
slug: "kingsisland",
|
|
region: "Midwest",
|
|
location: { lat: 39.3442, lng: -84.2696, city: "Mason", state: "OH" },
|
|
timezone: "America/New_York",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "valleyfair",
|
|
apiId: 14,
|
|
name: "Valleyfair",
|
|
shortName: "Valleyfair",
|
|
chain: "sixflags",
|
|
slug: "valleyfair",
|
|
region: "Midwest",
|
|
location: { lat: 44.7227, lng: -93.4691, city: "Shakopee", state: "MN" },
|
|
timezone: "America/Chicago",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "worldsoffun",
|
|
apiId: 6,
|
|
name: "Worlds of Fun",
|
|
shortName: "Worlds of Fun",
|
|
chain: "sixflags",
|
|
slug: "worldsoffun",
|
|
region: "Midwest",
|
|
location: { lat: 39.1947, lng: -94.5194, city: "Kansas City", state: "MO" },
|
|
timezone: "America/Chicago",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "miadventure",
|
|
apiId: 12,
|
|
name: "Michigan's Adventure",
|
|
shortName: "Michigan's Adventure",
|
|
chain: "sixflags",
|
|
slug: "miadventure",
|
|
region: "Midwest",
|
|
location: { lat: 43.3281, lng: -86.2694, city: "Muskegon", state: "MI" },
|
|
timezone: "America/Detroit",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "dorneypark",
|
|
apiId: 8,
|
|
name: "Dorney Park",
|
|
shortName: "Dorney Park",
|
|
chain: "sixflags",
|
|
slug: "dorneypark",
|
|
region: "Northeast",
|
|
location: { lat: 40.5649, lng: -75.6063, city: "Allentown", state: "PA" },
|
|
timezone: "America/New_York",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "cagreatamerica",
|
|
apiId: 35,
|
|
name: "California's Great America",
|
|
shortName: "CA Great America",
|
|
chain: "sixflags",
|
|
slug: "cagreatamerica",
|
|
region: "West & International",
|
|
location: { lat: 37.3979, lng: -121.9751, city: "Santa Clara", state: "CA" },
|
|
timezone: "America/Los_Angeles",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
{
|
|
id: "frontiercity",
|
|
apiId: 943,
|
|
name: "Frontier City",
|
|
shortName: "Frontier City",
|
|
chain: "sixflags",
|
|
slug: "frontiercity",
|
|
region: "Texas & South",
|
|
location: { lat: 35.5739, lng: -97.4731, city: "Oklahoma City", state: "OK" },
|
|
timezone: "America/Chicago",
|
|
website: "https://www.sixflags.com",
|
|
},
|
|
];
|
|
|
|
export const PARK_MAP = new Map<string, Park>(PARKS.map((p) => [p.id, p]));
|
|
|
|
export const REGIONS = [
|
|
"Northeast",
|
|
"Southeast",
|
|
"Midwest",
|
|
"Texas & South",
|
|
"West & International",
|
|
] as const;
|
|
|
|
export type Region = (typeof REGIONS)[number];
|
|
|
|
export function groupByRegion(parks: Park[]): Map<Region, Park[]> {
|
|
const map = new Map<Region, Park[]>(REGIONS.map((r) => [r, []]));
|
|
for (const park of parks) {
|
|
map.get(park.region as Region)!.push(park);
|
|
}
|
|
// Remove empty regions
|
|
for (const [region, list] of map) {
|
|
if (list.length === 0) map.delete(region);
|
|
}
|
|
return map;
|
|
}
|