mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
Migrates client SDK References to App Router. (Management and CLI API references aren't migrated yet, nor are self-hosting config references.) Some notes: Big changes to the way crawler pages are built and individual section URLs (e.g., javascript/select) are served. All of these used to be SSG-generated pages, but the number of heavy pages was just too much to handle -- slow as molasses and my laptop sounded like it was taking off, and CI sometimes refuses to build it all at all. Tried various tricks with caching and pre-generating data but no dice. So I changed to only building one copy of each SDK+version page, then serving the sub-URLs through a response rewrite. That's for the actual user-visible pages. For the bot pages, each sub-URL needs to be its own page, but prebuilding it doesn't work, and rendering on demand from React components is too slow (looking for super-fast response here for SEO). Instead I changed to using an API route that serves very minimal, hand-crafted HTML. It looks ugly, but it's purely for the search bots. You can test what bots see by running curl --user-agent "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" <URL_OF_PAGE> Also added some smoke tests to run against prod for the crawler routes, since we don't keep an eye on those regularly, and Vercel config changes could surprise-break them. Tested the meta images on Open Graph and all seems to work fine. With this approach, full production builds are really fast: ~5 minutes Starts using the new type spec handling, which is better at finding params automatically, so I could remove some of the manually written ones from the spec files.
115 lines
3.7 KiB
JSON
115 lines
3.7 KiB
JSON
{
|
|
"name": "docs",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"predev": "npm run codegen:references",
|
|
"dev": "next dev --port 3001",
|
|
"dev:secrets:pull": "AWS_PROFILE=supabase-dev node ../../scripts/getSecrets.js -n local/docs",
|
|
"prebuild": "npm run codegen:references",
|
|
"build": "next build",
|
|
"build:analyze": "ANALYZE=true next build",
|
|
"start": "next start",
|
|
"lint": "next lint",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest --exclude \"**/*.smoke.test.ts\"",
|
|
"test:smoke": "npm run codegen:references && vitest -t \"prod smoke test\"",
|
|
"build:sitemap": "node ./internals/generate-sitemap.mjs",
|
|
"embeddings": "tsx scripts/search/generate-embeddings.ts",
|
|
"embeddings:refresh": "npm run embeddings -- --refresh",
|
|
"last-changed": "tsx scripts/last-changed.ts",
|
|
"last-changed:reset": "npm run last-changed -- --reset",
|
|
"codegen:references": "tsx features/docs/Reference.generated.script.ts",
|
|
"codemod:frontmatter": "node ./scripts/codemod/mdx-meta.mjs && prettier --write \"content/**/*.mdx\"",
|
|
"postbuild": "node ./internals/generate-sitemap.mjs"
|
|
},
|
|
"dependencies": {
|
|
"@code-hike/mdx": "^0.9.0",
|
|
"@har-sdk/openapi-sampler": "^2.2.0",
|
|
"@mdx-js/loader": "^2.1.5",
|
|
"@mdx-js/react": "^2.3.0",
|
|
"@next/bundle-analyzer": "^14.2.3",
|
|
"@next/mdx": "^14.2.3",
|
|
"@octokit/auth-app": "^6.0.3",
|
|
"@octokit/core": "^5.1.0",
|
|
"@octokit/graphql": "^7.0.2",
|
|
"@octokit/plugin-paginate-graphql": "^4.0.0",
|
|
"@radix-ui/react-accordion": "^1.1.2",
|
|
"@supabase/auth-helpers-react": "^0.4.2",
|
|
"@supabase/supabase-js": "^2.44.3",
|
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
"@tanstack/react-query": "^5.13.4",
|
|
"common": "*",
|
|
"common-tags": "^1.8.2",
|
|
"config": "*",
|
|
"eslint-config-supabase": "*",
|
|
"framer-motion": "^11.0.3",
|
|
"github-slugger": "^2.0.0",
|
|
"gray-matter": "^4.0.3",
|
|
"hast-util-has-property": "^2.0.1",
|
|
"icons": "*",
|
|
"isbot": "^5.1.2",
|
|
"jsrsasign": "^11.0.0",
|
|
"katex": "^0.16.10",
|
|
"lodash": "^4.17.21",
|
|
"markdown-toc": "^1.2.0",
|
|
"mdast": "^3.0.0",
|
|
"mdast-util-from-markdown": "^1.2.0",
|
|
"mdast-util-mdx": "^2.0.0",
|
|
"mdast-util-to-markdown": "^1.5.0",
|
|
"mdast-util-to-string": "^3.1.1",
|
|
"micromark-extension-mdxjs": "^1.0.0",
|
|
"next": "^14.2.3",
|
|
"next-mdx-remote": "^4.4.1",
|
|
"next-plugin-yaml": "^1.0.1",
|
|
"next-seo": "^6.5.0",
|
|
"next-themes": "^0.3.0",
|
|
"openai": "^4.20.1",
|
|
"openapi-fetch": "^0.8.2",
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.2.0",
|
|
"react-error-boundary": "^4.0.12",
|
|
"react-intersection-observer": "^9.5.3",
|
|
"react-markdown": "^8.0.3",
|
|
"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",
|
|
"shared-data": "*",
|
|
"ui": "*",
|
|
"ui-patterns": "*",
|
|
"unist-builder": "^3.0.1",
|
|
"unist-util-filter": "^4.0.1",
|
|
"unist-util-visit": "^4.1.2",
|
|
"uuid": "^9.0.1",
|
|
"valtio": "^1.12.0",
|
|
"yaml": "^2.4.5"
|
|
},
|
|
"devDependencies": {
|
|
"@aws-sdk/client-secrets-manager": "^3.410.0",
|
|
"@types/hast": "^2.3.4",
|
|
"@types/jsrsasign": "^10.5.12",
|
|
"@types/node": "^20.11.16",
|
|
"@types/react": "^18.2.24",
|
|
"@types/unist": "^2.0.6",
|
|
"acorn": "^8.11.3",
|
|
"api-types": "*",
|
|
"cheerio": "^1.0.0-rc.12",
|
|
"config": "*",
|
|
"dotenv": "^16.0.3",
|
|
"ejs": "^3.1.10",
|
|
"globby": "^13.2.2",
|
|
"nextjs-node-loader": "^1.1.5",
|
|
"npm-run-all": "^4.1.5",
|
|
"openapi-types": "^12.1.3",
|
|
"simple-git": "^3.24.0",
|
|
"tsconfig": "*",
|
|
"tsx": "^4.6.2",
|
|
"typescript": "^5.5.0",
|
|
"vite-tsconfig-paths": "^4.3.2",
|
|
"vitest": "^2.0.2"
|
|
}
|
|
}
|