Enable production branch for templates in dashboard#99
Open
syd-shields wants to merge 2 commits into
Open
Conversation
…#75) * init * add a build step that turns new ts templates into js in CI * add file filter to build script * add built js templates * add exclude flag * add comments to explain build filters * add build step to run on dev branch in CI * regen templats on each pr merge * include all readme, package json and env examples in build * get paths to build js files first so that the entire repo isn't deleted and rewritten with new build * remove built js files * only build js files to production branch * remove build javascript workflow * before recursing, skip directories whose basename is in DEFAULT_EXCLUDED_DIRS * before recursing, skip directories whose basename is in DEFAULT_EXCLUDED_DIRS * if there are zero playground compatible templates, do not call build-javascript.mjs * add test-production branch support * build js templates * remove built js files * add pkg.type = module to adaptPackageJsonForJavaScript so it's unconditionally set for all generated JS templates * consolidate workflows to one plauground.yml file to remove need to make updates to it twice * write contents to test-production and production branches * use hardcoded branch names instead of unused var * add --no-verify flag to build * add stripLeadingTscBuildCommand to handle when multiple commands exist alongside tsc * add parseBuildOptions to parse CLI flags at once instead of in multiple places to prevent drift
…down/json formats (#98)
syd-shields
commented
May 26, 2026
| if (explicit && String(explicit).trim()) return String(explicit).trim(); | ||
| const fromEnv = process.env.TEMPLATES_API_URL; | ||
| if (typeof fromEnv === "string" && fromEnv.trim()) return fromEnv.trim(); | ||
| return "https://www.browserbase.com/website-api/templates"; |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| return "https://www.browserbase.com/website-api/templates"; | |
| return "https://www.browserbase.com/api/templates"; |
Contributor
Author
There was a problem hiding this comment.
Just want to commit this change to point to the correct URL. Leave a thumbs up or commit the change if it's good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR merges dev into production allowing templates to build in the /javascript directory once this PR merges. The CI process will behave like the test-production branch (ensure build works, on success push updates to the /javascript directory).
Note
Medium Risk
Workflows use
contents: writeand push bot commits to protected branches; generatedjavascript/and template set depend on the live templates API and new validation rules.Overview
Adds playground-focused CI for
productionandtest-production: a reusable workflow runspnpm run ci:playground, which loads playground-runnable templates from the public templates API, transpiles only thosetypescript/folders intojavascript/, validates sources for dashboard rules, and on push auto-commits regeneratedjavascript/withcontents: write.Introduces
scripts/build-javascript.mjs(full or filtered TS→JS mirror, adaptedpackage.jsons) for localbuild:javascript, plus API-drivenplayground-ci,validate-playground-templates, andfetch-playground-typescript-dirswith template-flag→folder aliases. RoottypescriptdevDependency and README clarify thattypescript/is source of truth and full-tree CI builds are gone.CODEOWNERS requires
@browserbase/dashboardonjavascript/, playground scripts, and these workflows. smart-fetch-scraper (TS/Python) only gains comments about Fetch APImarkdown/jsonoutput options.Reviewed by Cursor Bugbot for commit d0fa10a. Bugbot is set up for automated code reviews on this repo. Configure here.