Consume starpod from npm instead of maintaining a fork - #30
Conversation
* Extract the site engine into a starpod Astro integration package (spike) Monorepo spike: packages/starpod is now an installable Astro integration that injects every route, adds the preact/sitemap/tailwind/rehype wiring, exposes the user's config via virtual:starpod/config, and applies the Vercel markdown content negotiation in astro:build:done. The root site consumes it via workspace:*. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Fix type resolution, hook ordering, and renderer resolution in the integration spike - tsconfig paths + vitest alias so starpod/src/* imports resolve for TS and tests (TS does not resolve the exports wildcard the way Vite does) - Vercel markdown negotiation moves to a process exit handler: the adapter's astro:build:done runs after the integration's and rewrites config.json - @astrojs/preact becomes a direct site dependency: Astro resolves the renderer client entrypoint from the project root, so the consumer must depend on it (matches how framework renderers are normally installed) - Tighten the vercel-md-negotiation type declarations to match its tests Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Production-ready integration: hook-time negotiation, opt-in DB, overrides, bundled assets - Vercel markdown negotiation now runs inside astro:build:done using the hook's own assets map (the adapter writes config.json before user hooks but copies static files after them, so the filesystem can't be scanned) - @astrojs/preact and preact become peerDependencies; the package ships a tsconfig.json (nearest-tsconfig JSX settings for installed copies) and widens the preset's JSX exclude so starpod's own .tsx transforms when it lives in node_modules - starpod(config, options): options.database gates the Drizzle/Turso guests+sponsors layer (default off; sections simply don't render), options.components overrides built-ins via virtual modules, and options.customCss loads site stylesheets after the built-in ones - Engine assets (player icons, platform logos, dots, avatars) move into the package and are bundled by Vite instead of expected in consumer public/; host/guest/sponsor image lookups fall back gracefully when a site has not provided photos yet - Normalize rss-to-json's dual CJS interop shape (externalized vs bundled) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Add create-starpod scaffolder npm create starpod: prompts for name/RSS/database (or flags --name --rss --database --yes) and generates a ready-to-build consumer project: renderer deps declared directly, tsconfig with starpod/src/* paths for tests, content config, .env.example, optional db/ folder with empty data files, seed script, and drizzle config, plus the fast-xml-parser pin and sharp that real feeds need. Smoke-tested against the local package with a component override and customCss. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Fold the scaffolder into the starpod package as a CLI Drops the separate create-starpod package: the starpod package now ships a bin, so `npx starpod new my-podcast` scaffolds a project with the same prompts and flags. One published package instead of two; the trade-off is losing the `npm create starpod` alias, which requires a package named create-starpod. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * De-Whiskey the engine: custom sponsor pages, config nav links, config-driven host order The sponsor page is no longer part of the engine — sponsorship pitches are bespoke marketing, so a consumer who wants one adds a normal Astro page to their own src/pages/ built from the package's exported Layout and components. whiskey.fm's page moves back into the site as the reference implementation, and the scaffolded README documents the pattern. - New optional `links` config renders extra nav entries after About and Contact (replaces the hardcoded whiskey.fund Store link) - CreatorsAndGuests sorts configured hosts first in config order instead of a hardcoded name list (past hosts recorded in the database follow, then guests alphabetically — old whiskey.fm episodes may order Chuck after Adam now) - AdPackageCard stays in the package as a generic building block Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Validate the Starpod config and fail helpfully without one defineStarpodConfig now parses the config with valibot and throws a single readable error listing every problem with its field path; the integration validates too, so configs that skip the helper are still checked. Calling starpod() with no config — what `astro add starpod` generates — throws setup instructions instead of crashing mid-build. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Bless a stable export surface for custom pages starpod/layout, starpod/components/AdPackageCard, and starpod/rss are the supported imports for site-authored pages (the reference sponsor page and scaffolded README now use them). starpod/src/* remains available for tests but is internal API with no stability guarantees. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Document the integration model: package README and repo README rewrite The package README is the npm landing page: quickstart for new and existing projects, config reference, integration options, custom pages, transcripts, database setup, and the API stability policy (src/* is internal; the blessed subpath exports are the stable surface). The repo README keeps its ATProto and LLM discovery docs but replaces the fork-model getting-started with the integration story and documents the workspace layout. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Add CI scaffold smoke test and npm release workflow The scaffold job builds a freshly generated consumer project against the local package on every push — covering the installed-from-npm code path (node_modules JSX transform, CJS interop, bundled assets, dependency pins) that the workspace build can't see, and asserting the agent endpoints and negotiation routes exist in the output. The release workflow publishes starpod to npm with provenance on a starpod@* tag or manual dispatch; it needs an NPM_TOKEN repository secret. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Publish via npm OIDC trusted publishing instead of a token secret npm handles the OIDC exchange natively (id-token: write stays; the workflow upgrades npm since Node 22 bundles 10.x and trusted publishing needs 11.5.1+), and provenance comes automatically with trusted-publisher releases. Requires the one-time trusted publisher setup on npmjs.com. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Set up release-plan for automated releases Generated by create-release-plan-setup: plan-release.yml opens and updates a Prepare Release PR (changelog + .release-plan.json) from labeled PRs, and publish.yml releases to npm via OIDC trusted publishing with provenance when that PR merges — no token secret. Replaces the hand-rolled tag-based release workflow. RELEASE.md documents the flow; every merged PR needs one of the changelog labels. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# Conflicts: # package.json # packages/starpod/src/lib/collections.ts # packages/starpod/src/lib/topic-keywords.ts # packages/starpod/src/pages/api/checkout.ts # pnpm-lock.yaml # tsconfig.json
…test The workspace repo resolves starpod's .tsx files outside node_modules where the tsconfig JSX settings apply; installed from npm they resolve inside node_modules, so the transform must be configured explicitly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
starpod@1.0.1's Layout restores the site-wide <link rel="site.standard.publication"> tag (gated on STANDARD_SITE_DID and STANDARD_SITE_PUBLICATION_RKEY) that the forked Layout emitted before converting to the npm package. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedToo many files! This PR contains 112 files, which is 12 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (26)
📒 Files selected for processing (112)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Collection detail pages get their linked Collections middle crumb back (with aria-current and the full BreadcrumbList schema), and the legacy mask-icon/msapplication-TileColor tags are gone upstream, closing the last parity gaps from the fork conversion. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
What
Converts this repo from an upstream fork into a consumer of the published
starpodnpm package (currently^1.0.1). 138 files changed, +415/−8,507.The integration now generates the entire core site — episode pages, player, search, transcripts, LLM endpoints, and the Vercel
Accept: text/markdownnegotiation step (the oldscripts/vercel-md-negotiation.mjsbuild step is gone). What remains here is only whiskey.fm-specific:starpod.config.ts+astro.config.mjswiring:starpod(starpodConfig, { database: true, components: { InfoCard }, customCss })AdPackageCardvariant withproductId), collections pages/lib/data, transcripts, images, db seed data, ATProto publishing scriptsInfoCardoverride (Collections/Store/Sponsor nav links) andsrc/styles/custom.cssvia the integration's override optionsnode_modules/starpod/src; standalone scripts pass the config explicitly (getAllEpisodes(starpodConfig))packages/, workspace file, release-plan, package CI jobs); rewrote README and CLAUDE.mdOne consumer-side fix worth noting: Vitest needs an explicit
esbuild: { jsx: 'automatic', jsxImportSource: 'preact' }because starpod's.tsxsources resolve insidenode_modules, where tsconfig-based JSX detection doesn't reach (the upstream workspace never hits this since its symlink escapesnode_modules).Parity status
All fork parity gaps are closed as of
starpod@1.1.0: 1.0.1 restored the site-widesite.standard.publicationtag (shipshapecode/starpod#64), and 1.1.0 generalizes breadcrumbs — collection detail pages renderHome > Collections > <title>witharia-currentand the full BreadcrumbList schema — while dropping the legacymask-icon/msapplication-TileColortags upstream, so no color config is needed.Verification
pnpm build(astro check + full production build, markdown-negotiation routes emitted by the integration)🤖 Generated with Claude Code