Commit Graph

172 Commits

Author SHA1 Message Date
Kevin Grüneberg
56e2096f2f chore: cleanup deps (#34433) 2025-03-26 13:38:02 +01:00
Charis
311232b3e1 feat(docs): ts hover annotations on code blocks (#34327) 2025-03-21 15:48:32 -04:00
Ivan Vasilov
f03335ccb5 chore: Bump vulnerable packages (#34122)
* Bump vite to v6 to get the newest esbuild.

* Bump tsx to get the newest esbuild.

* Fix lodash version.

* Make the www app use the catalog version of next.
2025-03-12 09:53:25 +01:00
Ivan Vasilov
eca4cc15a2 chore: Bump vulnerable deps (#33915)
* Consolidate different versions of postcss. Remove @mertasan/tailwindcss-variables from ui package.

* Bump vitest in pg-meta to remove a vulnerable version of vite.

* Bump dompurify.

* Bump all octokit deps to solve 2 vulns.

* Fix warnings about destructuring json imports.

* Remove a console.log in docs.

* Fix the changelog page to use an ESM import.

* Stabilize the generate-sitemap script output.

* Try another fix for the changelog.
2025-03-03 12:18:14 +01:00
Charis
46a0e80a10 feat: llms.txt (#33780)
* feat: llms.txt

* feat: split llms.txt into multiple files

We have too many docs, so the concatenated text file uses an unreasonable amount of tokens. Chunk it up a little so it's more usable.
2025-02-24 15:18:51 -05:00
Charis
a820c56ed0 chore: docs linting (#33574) 2025-02-21 14:13:00 -05:00
Alaister Young
f255627391 chore(docs): static assets cdn (#33347)
* chore(docs): static assets cdn

* r2 env vars

* embed asset url directly
2025-02-05 15:58:07 +00:00
Charis
83a6b6695e fix: typos + add more spelling exceptions (#33328)
Update apps/docs/content/troubleshooting/supabase--your-network-ipv4-and-ipv6-compatibility-cHe3BP.mdx
Update supa-mdx-lint/Rule003Spelling.toml
2025-02-04 15:40:54 -05:00
Charis
2d55512553 chore: activate spelling and admonitions lints for docs (#33292) 2025-02-04 13:18:31 -05:00
Charis
a255acb5ea chore: add auto-troubleshooting-template to local dev (#33128)
Small DX improvement for writing troubleshooting guides. When a new troubleshooting guide is created, it is auto-populated with the tempalte (as long as docs dev is running).
2025-01-27 21:29:29 +00:00
Ivan Vasilov
dbd6c3866d chore: Bump all versions of vitest to the v3+. Fix a vuln in vite (#33041)
* Bump all versions of vitest to the v3+.

* Bump vite to a non-vulnerable version (5.4.12).
2025-01-27 13:03:44 +01:00
dependabot[bot]
78dee45ae4 chore(deps): bump katex from 0.16.10 to 0.16.21 (#32876)
Bumps [katex](https://github.com/KaTeX/KaTeX) from 0.16.10 to 0.16.21.
- [Release notes](https://github.com/KaTeX/KaTeX/releases)
- [Changelog](https://github.com/KaTeX/KaTeX/blob/main/CHANGELOG.md)
- [Commits](https://github.com/KaTeX/KaTeX/compare/v0.16.10...v0.16.21)

---
updated-dependencies:
- dependency-name: katex
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 21:49:07 -05:00
Ivan Vasilov
616edd8b5e chore: Fix the turbo tasks for docs app (#32941)
* Separate turbo config for docs app into its own separate file. Add a task dependency for codegen tasks.

* Fix the clean command. Remove the prebuild command cause it's already covered by turbo.
2025-01-20 16:04:05 -05:00
Nicolas
51d4f053db fix(dashboard): Fixed broken link in the 'secure foreign table' popover (#31855)
dashboard: fix broken link
2025-01-20 14:11:20 +00:00
Alaister Young
9d534c9f5a fix: response error codes (#30581)
* fix: response error codes

* upgrade docs

* remove request url modification middleware

* move api routes for self-hosted to platform folder

* remove some lib/common/fetch usage

* docs: use middleware for openapi-fetch (#30600)

Get rid of the unauthedAllowedPost function (I don't think there's any harm in letting any requests that require authentication to just 403, they should be disabled at the React Query level and if not they will fail gracefully enough...)

* fix local count query

* add default values for clone mutation

* fix ts and codegen

* add missing lodash dep to playwright tests

* Fix the playwright tests to match the new folder structure for selfhosted variant.

* remove unused import

* Remove unused state

* remove unused sql debug mutation

* remove unused export

* fix notifications query

* fix jwt updating status

* fix typescript

* save sql snippet after renaming

* update codegen & fix ts error

* override array querySerializer

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-01-20 11:27:38 +08:00
Kang Ming
4278bd4ec1 fix: bump auth-js version to v2.67.3 (#31217)
* fix: bump auth-js version to v2.67.3

* chore: add supabase/auth and supabase/dashboard as codeowners

* Revert "chore: add supabase/auth and supabase/dashboard as codeowners"

This reverts commit 57fc5776ba.

* bump supabase-js version

* import user type from single gotrue

* fix auth-js version in studio

* remove auth-js dep in studio

* fix ts

* use catalog versions

* fix ts

* Bump realtime-js version to avoid having 2 versions.

* Add @supabase/realtime-js to the pnpm catalog.

* upgrade realtime-js

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-01-17 14:54:21 +08:00
Charis
699f708b0c fix: make examples available for isr (#32610)
The examples folder needs to be explicitly included in the Vercel Serverless bundle. Because it's at the root of the monorepo rather than being within the `app/docs` folder, we copy it over pre-build (and pre-dev).

Test the examples/prompts fix by re-enabling revalidations on graphql pages. Added a temp version of the fetch function so we can gradually reenable and monitor Vercel error rates over time.
2025-01-14 18:38:21 -05:00
Alaister Young
6d732a2a4b chore: remove auth-helpers (deprecated) (#32541)
* chore: remove auth-helpers (deprecated)

* type supabase client in feedback

* small adjustments to error and loading state handling for docs search

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-01-06 18:08:44 +08:00
Ivan Vasilov
06aa80e9f0 chore: Bump next to non-vulnerable version (#31277)
* Add next to pnpm catalog and use that next version from all apps and packages.

* Remove vite direct dependency.

* Set the @types/node to version 20.

* Stabilize supports-color by adding it in the main package.json. This will make it appear in all packages that have it as optional.

* Use built-in matchers for vitest in @testing-library/jest-dom.

* Add libpg-query as a dependency to docs.

* Remove nextjs-node-loader for the built-in external packages feature on nextjs.

* Clean up extra comment.
2025-01-03 13:25:00 +01:00
dependabot[bot]
53c7214aff chore(deps-dev): bump smol-toml from 1.3.0 to 1.3.1 (#31275)
Bumps [smol-toml](https://github.com/squirrelchat/smol-toml) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/squirrelchat/smol-toml/releases)
- [Commits](https://github.com/squirrelchat/smol-toml/commits)

---
updated-dependencies:
- dependency-name: smol-toml
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-20 14:03:01 +01:00
Ivan Vasilov
dd572efb0d chore: Switch repo to use pnpm (#29928)
* Fix some missing and duplicate dependencies.

* Fix the types for jest in ai-commands package.

* Replace all npm commands with pnpm. Add pnpm files and workspace links.

* Fix rimraf to work with pnpm.

* Refactor the github actions to work with pnpm.

* Delete package-lock.json.

* Fix the tailwind configs to not include node_modules.

* Fix random files.

* Add preinstall scripts to all packages.

* Fix the Dockerfile to work with pnpm.

* Update the DEVELOPERS documentation.
2024-12-20 13:07:20 +01:00
Charis
ba269fe7d7 chore: add docs linter v2 (#31175)
Adds the npm package and package.json script to run docs linter v2 locally.
2024-12-16 15:04:35 -05:00
Charis
2fb8b9f74c feat(docs): ai prompts section (#30342)
Co-authored-by: Francesco Sansalvadore <f.sansalvadore@gmail.com>
2024-11-26 13:43:04 -05:00
Charis
4a82aabaf0 feat(docs): sync troubleshooting (#29933)
When a troubleshooting entry is created or updated in this repo, sync it to GitHub. This creates a new troubleshooting discussion if one does not exist, and updates the content on an existing troubleshooting discussion if it has changed.

To preserve the connections between GitHub discussions and Markdown files, record the discussion ID and URL to the database. The database ID is then written to the Markdown file, and a new PR is generated to commit the new Markdown with ID.

There is currently no mechanism to delete outdated discussions. That will be a follow-up.
2024-10-29 12:58:46 -04:00
Ivan Vasilov
9dd7deb990 chore: Add a clean script to all packages/apps (#29926)
Add a clean command.
2024-10-18 16:25:13 +02:00
Charis
a29dc5de4b feat(docs): main troubleshooting page (#29120)
* feat(docs): main troubleshooting page

* feat(docs): global troubleshooting page layout

* feat(docs): global troubleshooting page filter logic

* enhance(docs): troubleshooting page ui & filters

Improve UX and accessibility of global troubleshooting search page.

- Implement TroubleshootingFilterStateProvider for managing filter state
- Add TroubleshootingFilterEmptyState component
- Improve TroubleshootingFilter UI with applied filters display
- Update TroubleshootingPreview component with better layout and accessibility
- Add TroubleshootingEntryAssociatedErrors component for displaying related errors
- Refactor Troubleshooting utils and schemas
- Update troubleshooting content template

* feat(docs): individual troubleshooting pages

Add individual pages for detailed information on troubleshooting
entries. Small fixes to UI for troubleshooting displays.

- Wrap GlobalTroubleshootingPage with SidebarSkeleton
- Add TroubleshootingErrorListDetailed component for detailed error display
- Implement TroubleshootingBackLink component for navigation
- Update TroubleshootingPreview to use Next.js Link and include parent page
- Refactor Footer component to accept className prop
- Add hideFooter option to SidebarSkeleton
- Minor updates to TopNavBar and other utility functions

* fix: minor styling issues

* tweak(troubleshooting docs): use breadcrumbs

* tweak(troubleshooting docs): use sidebar for filter

* enhance(troubleshooting docs): navigation, keywords

Better navigation for individual troubleshooting entries, using a
version of the sidebar + keywords handling via search params for good
linking behavior

Details:

- Add TroubleshootingSidebar to TroubleshootingPage
- Implement query state management for keywords using nuqs
- Improve accessibility and styling of troubleshooting components
- Update empty state handling and related keywords display
- Upgrade nuqs package to version 1.19.1

* fix(docs): wrap useSearchParams in Suspense

* seo(docs): add canonical link to troubleshooting

* enhance(docs,troubleshooting): auto-reveal errors

On troubleshooting search pages, if the searched term matches a hidden
error, auto-reveal it when searching. When the search term is cleared,
hide programmatically-opened errors while preserving user-opened ones.

* enhance(docs,troubleshooting): search bar

Add search bar to individual troubleshooting pages

* fix(docs): breadcrumb links

Fix breadcrumb linking so it uses next/link instead of reloading entire
app on navigation.

* fix(docs): typo

* enh(docs): new troubleshooting design

* enh(docs): use new multi-select

* enh(docs): troubleshooting responsive styles

* Update apps/docs/content/troubleshooting/monitor-supavisor-postgres-connections.mdx
2024-10-02 17:10:12 +00:00
Ivan Vasilov
cb1e3a8170 chore: Prep work for pnpm (#29610)
* Add all missing libraries in the packages/apps.

* Add all missing Vitest imports to the tests.

* Add some missing exports to ui.

* Fix the admonition export.

* Fix various minor bugs.

* Migrate the ui package to use vitest.
2024-10-01 11:29:37 +02:00
Charis
d2a988e158 fix(docs): footnotes (#29564)
* deps(docs): add mdast gfm support

* fix(docs): footnotes
2024-09-27 19:35:19 +00:00
Charis
c2fe11850d feat: embed code samples from github (#29519)
Add the ability to embed code samples from GitHub into tutorials, so we can have a single source of truth for the source code.

Introduces the <$CodeSample /> syntax, which is a special syntax and not a real React component (see the directives/README.md for why on earth I did it this way -- in this specific case, CodeHike adjusts the MDX syntax tree before it gets compiled, and we need to adjust it ourselves before CodeHike sees it, so we need to get down to the level of manipulating the AST in order to make this work with CodeHike).

Adjusted one of the example tutorials to use this new feature as a test.
2024-09-26 15:54:57 -04:00
Ivan Vasilov
dfdc688592 chore: Bump next, vite and dompurify to non-vulnerable versions (#29476)
* Bump dompurify to non-vulnerable version.

* Bump next package to non-vulnerable version.

* Bump vite to non-vulnerable version.

* Bump path-to-regexp.

* Bump rollup to a non-vulnerable version.

* Revert vite bump.
2024-09-24 16:09:59 +02:00
Charis
11e19ff29f refactor(docs): convert self-hosting to app router (#29268)
* chore(docs,refs): prebuild self-hosted ref data

Pregenerate self-hosted ref data files, in the style of the client lib,
Management API, and CLI references. Preparatory step for migrating the
self-hosted references to App Router.

* refactor(docs): convert self-hosting to app router

Convert self-hosting reference pages to App Router.

* fix(docs,sitemap)
2024-09-13 09:45:55 -04:00
Charis
66e363e29d fix: last-changed script to handle toml frontmatter (#29208)
toml frontmatter was introduced in the troubleshooting entries, script
needed to be adapted to handle it
2024-09-13 09:35:27 -04:00
Charis
c757fcab20 fix,feat(sitemap): add all pages + priority (#29083)
Pages were missing from the sitemap after the reorganization. Added them
back in.

Also added an optional priority that can be specified by including
`sitemapPriority` in content metadata. Used on the deprecated Auth
Helpers pages to see if we can tweak the relative SEO ranking for them.
2024-09-04 11:16:51 -04:00
Ivan Vasilov
05a542ccea chore: Migrate all feather icons to lucide icons (#29038)
* Add lucide-react to docs (to make the autocomplete work).

* Migrate the docs app icons.

* Migrate the ui-patterns.

* Remove the old icons from ui package.

* Migrate the www app from react-feather icons.

* Migrate all of studio icons.

* Migrate the only component in design-system.

* Fix an old import in ui package. Revert an import in docs app.

* Fix some pages in www.

* Remove unneeded files used in generation of icons.

* Fix a prettier error.

* Fix more issues in www.

* Fix an issue in Log Date picker.

* Replace all string sizes with number sizes because the icons grew in some cases.

* Fix more imports in security page.

* Fix an extra import.

* Remove the size prop from all icons if they're in a button and they match the button size.

* Minor fixes for docs and www.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-09-04 19:46:21 +08:00
Charis
fc164b5d07 Refactor/app router refs (#28095)
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.
2024-08-13 16:12:59 -04:00
Kevin Grüneberg
14e29dc0a0 chore: remove mermaid, use static SVG (#28083) 2024-07-19 18:36:00 +08:00
Charis
7c20407302 refactor(docs): type spec parsing + testing setup (#27931)
This produces more complete type information (unions, following type alias refererences that aren't successfully dereferenced at an earlier stage, etc.), in a format that is much easier to query from UI components. Also adds a snapshot test for easier future iteration.

I had a lot of trouble configuring Jest for the snapshot tests (something to do with imports and compile targets), and there are zero other tests in this directory right now, so I just tore out the test setup and replaced it with Vitest. Much faster!
2024-07-17 10:48:26 -04:00
Joshen Lim
f18a0c20b5 Bump supabase js to 2.44.3 (#27898)
Bump supabase js to 22.4.3
2024-07-10 17:30:46 +08:00
Alaister Young
9d06a27e91 chore: update supabase-js (2.44.2) (#27768) 2024-07-10 10:23:05 +02:00
Charis
f4779d4844 refactor: migrate guides to app router (#23101)
Migrate guides to App Router.
2024-07-03 10:25:06 -04:00
Ivan Vasilov
491f9803e0 chore: Bump typescript to version 5.5 (#27590)
Bump typescript to 5.5 in all apps and packages.
2024-06-28 12:26:57 +02:00
Ivan Vasilov
3738cebbd7 feat: Unify ESLint configs for Next.js apps (#27275)
* Move the eslint preset into a separate package.

* Import the next package into all apps. Remove redundant packages.

* Import the new eslint rules.

* Update the package-lock.
2024-06-17 12:17:01 +02:00
Charis
c281dd0eb1 ci(docs): update last_changed table action (#27038)
Keeps track of fine-grained (per section) edit times for docs content.

Once daily, a GitHub Action runs that:

- Checks whether content hashes have changed for each section
- Updates the table that tracks content edit times if the hashes have changed

Note: The cron job isn't scheduled yet. I'll run the Action manually a few times to validate it, then turn it on in another PR.
2024-06-06 15:20:05 -04:00
Charis
cb8b43ff8e feat(docs): track last-changed date (#27016)
Add a table to track the last-changed date for docs content, and a
script to seed the database with last-changed dates based on Git commit
dates.
2024-06-05 09:51:45 -04:00
Francesco Sansalvadore
7f42a81dce Chore/custom html elements cleanup (#26836)
* clean up CustomHTMLElements duplication

* save file

* docs --passWithNoTests

* update CustomHTMLElements.utils.test file to tsx
2024-05-30 10:45:57 +02:00
dependabot[bot]
1d633cdf0f chore(deps-dev): bump ejs from 3.1.9 to 3.1.10 (#23634)
Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](https://github.com/mde/ejs/compare/v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-05-29 06:18:27 +00:00
Hieu
c5a88a9fc4 feat: render mgmt api body params (#26319)
* feat: render body parameters

* feat: api parameters render

* fix: update mgmt api spec to latest

* fix: body param format and support content type selection

* fix: prettier errors

* fix: use Options to render accepted enum values

* fix: prettier again

* fix: merge conflict

* fix: expose new api routes

* fix: prettier again

* refactor: ApiBodyParam

* fix: add missing apis

* chore: tidy up

* feat: improve api response with sample + schema tabs

* fix: support show/hide object param schema

* fix: show no content text

* refactor: use collapsible for hidden content

* Update apps/docs/components/reference/ApiOperationSection.tsx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/components/ApiSchemaOption.tsx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* fix: resolve comments

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2024-05-21 13:30:34 +07:00
Kevin Grüneberg
10c1bc7959 chore: bump next/turbo (#23285) 2024-04-26 13:08:38 +08:00
Jonathan Summers-Muir
c73af5ec8f move to shared types (#23210)
* move to shared types

* Rename the package to api-types.

* Fix a forgotten dependency.

* Add more forgotten deps.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-04-24 11:03:17 +02:00
Kevin Grüneberg
efde463826 chore: upgrade to next 14.2 (#22662) 2024-04-16 14:13:55 +08:00