mirror of
https://github.com/supabase/supabase.git
synced 2026-07-02 15:34:36 +08:00
## Problem We need a local-only UI to inspect client and server telemetry events and override flags during development without touching non-local env behavior. This work is intended to be shared across Studio, Docs, and WWW. ## Changes - Introduced a shared `dev-tools` package with the Dev Telemetry Toolbar UI, trigger, and provider. - Wired the toolbar into Studio, Docs, and WWW app shells (local-only gating). - Added a local-only `devTelemetry()` opt-in with storage gating and SSE subscription. - Wired client PostHog events into a local listener and re-exported types. - Added local flag override cookie support in the UI and CODEOWNERS for the new package. - Added unit tests covering local/non-local behavior and flag utilities. ## Testing Manual (local only): - Start each app locally: `pnpm dev:studio`, `pnpm dev:docs`, `pnpm dev:www` - Open the app, run `devTelemetry()` in the browser console - Click around and confirm both client and server events appear (client will be page views only) - Verify feature flag overrides (PostHog + ConfigCat) persist and restore correctly - Confirm dismissing the toolbar clears local storage and hides the trigger Unblocked by https://github.com/supabase/platform/pull/29172 Resolves GROWTH-591 Demo: [github.com/user-attachments/assets/60b376db-7440-4ada-82f5-d1bd4af4db3b](https://github.com/user-attachments/assets/60b376db-7440-4ada-82f5-d1bd4af4db3b) Screenshots: <img width="1368" height="972" alt="1" src="https://github.com/user-attachments/assets/d2f20a0c-191f-4118-bb5e-15b25f5a54a9" /> <img width="1423" height="790" alt="2" src="https://github.com/user-attachments/assets/115598e2-7287-49bf-9ed7-71ecc679dee3" /> <img width="1433" height="882" alt="3" src="https://github.com/user-attachments/assets/51f666f2-9efc-410f-baec-378bdee9dbfe" /> <img width="608" height="483" alt="4" src="https://github.com/user-attachments/assets/584d6cf5-1b2f-4cee-9e6a-d55ce2e3bae5" /> <img width="628" height="305" alt="5" src="https://github.com/user-attachments/assets/991a9b39-578a-4565-b110-537a02040a53" /> <img width="659" height="447" alt="6" src="https://github.com/user-attachments/assets/95ef405c-fffa-44af-bf6a-f974b780e3fc" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Developer Toolbar (local only): view client/server telemetry, inspect events, and manage/override feature flags with persistent overrides, filtering, and clear/reload. * Client-side telemetry hooks: surface structured events to dev tooling for realtime inspection. * **Bug Fixes** * Fixed end-of-file newline in shared code. * **Chores** * Added dev-tools package, integrated provider and trigger across Studio, Docs, and marketing sites, and added CODEOWNERS entry. * **Tests** * Added comprehensive tests and test setup for the DevToolbar. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
173 lines
6.6 KiB
JSON
173 lines
6.6 KiB
JSON
{
|
|
"name": "docs",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "next build",
|
|
"build:analyze": "ANALYZE=true next build",
|
|
"build:llms": "tsx --conditions=react-server ./scripts/llms.ts",
|
|
"build:sitemap": "tsx ./internals/generate-sitemap.ts",
|
|
"clean": "rimraf .next .turbo node_modules features/docs/generated examples __generated__",
|
|
"codegen:examples": "shx cp -r ../../examples ./examples",
|
|
"codegen:graphql": "tsx --conditions=react-server ./scripts/graphqlSchema.ts && graphql-codegen --config codegen.ts",
|
|
"codegen:references": "tsx features/docs/Reference.generated.script.ts",
|
|
"codemod:frontmatter": "node ./scripts/codemod/mdx-meta.mjs && prettier --cache --write \"content/**/*.mdx\"",
|
|
"dev": "concurrently --kill-others \"next dev --port 3001\" \"pnpm run dev:watch:troubleshooting\"",
|
|
"dev:secrets:pull": "AWS_PROFILE=supa-dev node ../../scripts/getSecrets.js -n local/docs",
|
|
"dev:watch:troubleshooting": "node ./scripts/troubleshooting/watch.mjs",
|
|
"embeddings": "tsx --conditions=react-server scripts/search/generate-embeddings.ts",
|
|
"embeddings:nimbus": "ENABLED_FEATURES_OVERRIDE_DISABLE_ALL=true pnpm run embeddings",
|
|
"embeddings:refresh": "pnpm run embeddings --refresh",
|
|
"embeddings:nimbus:refresh": "ENABLED_FEATURES_OVERRIDE_DISABLE_ALL=true pnpm run embeddings:refresh",
|
|
"last-changed": "tsx scripts/last-changed.ts",
|
|
"last-changed:reset": "pnpm run last-changed -- --reset",
|
|
"lint": "eslint .",
|
|
"lint:mdx": "supa-mdx-lint content --config ../../supa-mdx-lint.config.toml",
|
|
"postbuild": "pnpm run build:sitemap && pnpm run build:llms && ./../../scripts/upload-static-assets.sh",
|
|
"prebuild": "pnpm run codegen:graphql && pnpm run codegen:references && pnpm run codegen:examples",
|
|
"predev": "pnpm run codegen:graphql && pnpm run codegen:references && pnpm run codegen:examples",
|
|
"preembeddings": "pnpm run codegen:references",
|
|
"preinstall": "npx only-allow pnpm",
|
|
"presync": "pnpm run codegen:graphql",
|
|
"pretest": "pnpm run codegen:examples",
|
|
"pretypecheck": "pnpm run codegen:graphql && next typegen",
|
|
"start": "next start",
|
|
"sync": "tsx --conditions=react-server ./resources/rootSync.ts",
|
|
"test": "pnpm supabase start && pnpm run test:local && pnpm supabase stop",
|
|
"test:local": "vitest --exclude \"**/*.smoke.test.ts\"",
|
|
"test:local:unwatch": "vitest --exclude \"**/*.smoke.test.ts\" --run",
|
|
"test:smoke": "pnpm run codegen:references && vitest -t \"prod smoke test\"",
|
|
"troubleshooting:sync": "node features/docs/Troubleshooting.script.mjs",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@har-sdk/openapi-sampler": "^2.2.0",
|
|
"@mdx-js/loader": "^2.1.5",
|
|
"@mdx-js/react": "^2.3.0",
|
|
"@next/bundle-analyzer": "15.3.1",
|
|
"@next/mdx": "15.3.1",
|
|
"@octokit/auth-app": "^7.0.0",
|
|
"@octokit/core": "^6.0.0",
|
|
"@octokit/graphql": "^8.0.0",
|
|
"@octokit/plugin-paginate-graphql": "^4.0.0",
|
|
"@radix-ui/react-accordion": "^1.1.2",
|
|
"@radix-ui/react-collapsible": "^1.0.3",
|
|
"@sentry/nextjs": "catalog:",
|
|
"@supabase/supabase-js": "catalog:",
|
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
"@tanstack/react-query": "^5.13.4",
|
|
"acorn": "^8.11.3",
|
|
"acorn-typescript": "^1.4.13",
|
|
"ai-commands": "workspace:*",
|
|
"common": "workspace:*",
|
|
"common-tags": "^1.8.2",
|
|
"config": "workspace:*",
|
|
"dev-tools": "workspace:*",
|
|
"eslint-config-supabase": "workspace:*",
|
|
"framer-motion": "^11.0.3",
|
|
"github-slugger": "^2.0.0",
|
|
"graphql": "^16.10.0",
|
|
"graphql-validation-complexity": "^0.4.2",
|
|
"gray-matter": "^4.0.3",
|
|
"hast-util-has-property": "^2.0.1",
|
|
"hast-util-to-html": "^9.0.5",
|
|
"icons": "workspace:*",
|
|
"isbot": "^5.1.2",
|
|
"js-yaml": "^3.14.2",
|
|
"jsrsasign": "^11.0.0",
|
|
"katex": "^0.16.21",
|
|
"libpg-query": "15.2.0",
|
|
"lodash-es": "catalog:",
|
|
"lucide-react": "*",
|
|
"mdast": "^3.0.0",
|
|
"mdast-util-from-markdown": "^1.2.0",
|
|
"mdast-util-gfm": "^2.0.2",
|
|
"mdast-util-mdx": "^2.0.0",
|
|
"mdast-util-mdx-jsx": "^2.0.0",
|
|
"mdast-util-to-hast": "^12.3.0",
|
|
"mdast-util-to-markdown": "^1.5.0",
|
|
"mdast-util-to-string": "^3.1.1",
|
|
"micromark-extension-gfm": "^2.0.3",
|
|
"micromark-extension-mdxjs": "^1.0.0",
|
|
"next": "catalog:",
|
|
"next-mdx-remote": "^4.4.1",
|
|
"next-plugin-yaml": "^1.0.1",
|
|
"next-themes": "^0.3.0",
|
|
"nuqs": "^1.19.1",
|
|
"openai": "^4.75.1",
|
|
"openapi-fetch": "0.12.4",
|
|
"react": "catalog:",
|
|
"react-copy-to-clipboard": "^5.1.0",
|
|
"react-dom": "catalog:",
|
|
"react-error-boundary": "^4.0.12",
|
|
"react-intersection-observer": "^9.5.3",
|
|
"react-markdown": "^8.0.3",
|
|
"react-use": "^17.5.0",
|
|
"rehype-katex": "^7.0.0",
|
|
"rehype-slug": "^5.1.0",
|
|
"remark": "^14.0.2",
|
|
"remark-emoji": "^3.1.2",
|
|
"remark-gfm": "^3.0.1",
|
|
"remark-math": "^6.0.0",
|
|
"server-only": "^0.0.1",
|
|
"shared-data": "workspace:*",
|
|
"ui": "workspace:*",
|
|
"ui-patterns": "workspace:*",
|
|
"unist-builder": "^3.0.1",
|
|
"unist-util-filter": "^4.0.1",
|
|
"unist-util-visit": "^4.1.2",
|
|
"uuid": "^9.0.1",
|
|
"valtio": "catalog:",
|
|
"yaml": "^2.8.1",
|
|
"zod": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@graphiql/toolkit": "^0.9.1",
|
|
"@graphql-codegen/cli": "5.0.5",
|
|
"@graphql-codegen/typescript": "4.1.6",
|
|
"@graphql-codegen/typescript-resolvers": "4.5.0",
|
|
"@supabase/supa-mdx-lint": "0.3.1",
|
|
"@testing-library/react": "^16.0.0",
|
|
"@types/common-tags": "^1.8.4",
|
|
"@types/estree": "1.0.5",
|
|
"@types/graphql-validation-complexity": "^0.4.4",
|
|
"@types/hast": "^2.3.4",
|
|
"@types/jsrsasign": "^10.5.12",
|
|
"@types/lodash-es": "^4.17.12",
|
|
"@types/mdast": "^3.0.0",
|
|
"@types/node": "catalog:",
|
|
"@types/react": "catalog:",
|
|
"@types/react-copy-to-clipboard": "^5.0.4",
|
|
"@types/react-dom": "catalog:",
|
|
"@types/unist": "^2.0.6",
|
|
"@types/uuid": "^10.0.0",
|
|
"amaro": "^1.1.5",
|
|
"api-types": "workspace:*",
|
|
"cheerio": "^1.0.0-rc.12",
|
|
"chokidar": "^4.0.3",
|
|
"concurrently": "^9.1.2",
|
|
"config": "workspace:*",
|
|
"dotenv": "^16.0.3",
|
|
"ejs": "^3.1.10",
|
|
"globby": "^13.2.2",
|
|
"graphiql": "^4.0.2",
|
|
"openapi-types": "^12.1.3",
|
|
"postcss": "^8.5.3",
|
|
"shiki": "^3.2.1",
|
|
"shx": "^0.4.0",
|
|
"simple-git": "^3.24.0",
|
|
"slugify": "^1.6.6",
|
|
"smol-toml": "^1.3.1",
|
|
"tailwindcss": "catalog:",
|
|
"tsconfig": "workspace:*",
|
|
"tsx": "catalog:",
|
|
"twoslash": "^0.3.1",
|
|
"typescript": "catalog:",
|
|
"unist-util-visit-parents": "5.1.3",
|
|
"vite": "catalog:",
|
|
"vite-tsconfig-paths": "^4.3.2",
|
|
"vitest": "catalog:"
|
|
}
|
|
}
|