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!
* feat: use TUS for file uploads in dashboard
* handle upload progress
* add fallback for mime types
* lowercase extensions
* add note about mime
* Handle file size 0 and make check for nbsp replacement
* Fix NaN in progress
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* fix: update Permission params
* fix: upgrade check permission hook to support project level role
* fix: usePermissionsLoaded
* fix: Permission params can be undefined
* Scaffold new access management UI
* Add validation
* Update roles view
* Add tooltip
* Add button to apply role to all projects
* Update UI to select projects first instead of roles
* Merge master update UI
* Midway trying to implementation project level perms API
* First pass implementating updating project level permissions
* Add client side validation for assigning/removing roles
* Midway implementing new invites
* Integrate most of the project level permissions functionality
* fix: filter out org-level permissions before checking
* Add relevant UI guards in org level pages for project role POV
* Minor refactors
* Small refactors
* More fixes
* Moar refactors
* More fixes
* More fixes
* Refactor update role logic and smack some test cases on it
* Fixes
* Fix type issue
* Fix type
* more fixes, refactors, adding checks...
* MORE fixes
* Add perms checking for replicas
* Add ButtonTooltip component and use them to prevent repetition of pointer events auto for buttons with tooltips
* Convert all buttons with tooltips to use ButtonTooltip
* refactor
* PRettier
* Small fix
* Remove commented out code in organization-invitation-accept-mutation
* fix: switch to use the platform oauth authorizations routes
* Add perms checking for org audit logs and org oauth apps
* PRettier
* Fix incorrect URL for oauth app flow
* Fix incorrect URL for oauth app flow
* Fix
* Add perms checking for warehouse related UI
* Update roles helper icon
* remove unused lib
* Update package lock... again
* Update package lock... again
* Smalllll update
* Update some checks
* Add gate for project level permissions
* Last fix
* update codegen
* Update warehouse endpoint routes
* Fix
---------
Co-authored-by: phamhieu <phamhieu1998@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
* 🐛 fix: wrap column around quotes for creating index sql command
* Fix the package.lock.
---------
Co-authored-by: Girish Savlesha <girish.savlesh@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Add the new realtime js library under an alias.
* Add a isChannelPrivate property to realtime config.
* Use the aliased realtime-js library to connect to the realtime server.
* Add a new switch to enable users to connect to a private channel.
* Hide the public/private switch behind a feature flag.
* Fix an import.
* Add description to the switch.
* Small updates, add documentation button in choose channel popover
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Bump the version of turbo to 2.0.3.
* Fix the breaking changes in turbo config.
* Make the npm version more loose.
* Fix the build command for the database-design app.
* Try adding some env vars to the turbo for www.
* Add more missing env vars.
* Bump the turbo version to 2.0.4.
* Remove SUPABASE_SERVICE_ROLE_KEY from docs#build since it's used by other scripts, not by build.
* Add all apps to the turbo config. Sort the configs by name.
* Add eslint-config-turbo to all apps.
* Add environment vars to all apps in the turbo configs. These were reported by the eslint-turbo config.
* 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.
* Revert "Add storybook dependency back so that prod studio works. (#27174)"
This reverts commit 118b4123a8.
* Remove the fallbackNodePolyfills flag since it disables the process.env functionality in Nextjs.
* chore: libpg-query types
* feat: improved rls ai tests
* feat: simplify assertitions for sql expressions
* refactor: split ai logic into separate files
* feat(rls-ai): test select, insert, update, delete policies
* feat: adds withMetadata wrapper for failed tests
* chore: remove custom libpg-query types
* feat(rls-ai): make tests concurrent
* fix(rls-ai): rules for 'using' and 'with check'
* feat(rls-ai): discourages restrictive policies
* feat(ai): makes withMetadata util sync or async
* refactor(ai): moves withMetadata to generic test utils
* feat(rls-ai): test joined table
* feat(rls-ai): test mfa
* chore(ai): make all tests concurrent
* fix(ai): chatSql function rename in studio
* refactor(ai): isolate logic into separate files
* chore(ai): remove trailing comma in tsconfig
* chore(ai): remove unused dep
* Reset some of the package versions to the versions from master.
* chore(ai): remove unused imports
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Introduces the first (very small) slice of the new command menu as a `ui-pattern`.
This slice just handles state for available commands. It isn't hooked up to anything yet.
* Fix tests in tests/unit, tests/components and files under tests, looking into tests/pages
* Fix tests under pages/projects root
* Fix
* Comment out broken tests that im stuck with
* Fix api-report.test
* Fix storage-report-test
* chore: fix some tests
* chore: remove logging
* Fix LogsPreviewer.test.js
* Fix most of logs-query-test
* Skip broken tests instead of false positiving them
* Replace jest with vitest
* Rename all *.test.js to *.test.ts
* Configure vitest to work with jsx
* fix vitest issues, fix tests, skip broken tests, add msw, add next-router-mock
* uncomment file
* add tests for msw and nrm
* Fix failing tests
* fix tests in RowEditor
* fix datepicker tests
* fix type errors and comment out tests that need some refactoring
* leave 1 test so test script works
* rm clog and aaaaa
* rename script
* move msw to studio
* add pckg json which i forgot in last commit
* rm consolelog
* move vitest ui dep
* Move next-router-mock to studio.
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: TzeYiing <ty@tzeyiing.com>
Co-authored-by: Kamil Ogórek <kamil.ogorek@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* feat: add https auth hook support
* fix: commit changes
* fix: add enterprise hook config
* fix: add descriptionText
* Revert the changes to the ui components.
* Refactor the whole hooks page into a table with adding/editing hook in a side panel.
* Dele te unused file.
* Rename all web strings to HTTPS.
* Put all fields in the hook card in a copyable and revealable input.
* Start nudges
* Nudges
* Add validation for both types of hooks.
* Reorganize the layouts for the both types of hooks.
* Move the button for enabling a hook in the side panel.
* Move the button for deleting a hook in the side panel.
* Minor redesign of the hook card.
* Add a link to upgrade to enterprise.
* Fix type errors.
* Simplify function selector.
* Add checked prop to the toggle.
* Wait when deleting a hook.
* Use the new RadioGroup.
* Add a flag for https hooks.
* Minor CSS fixes.
* Change the page to use scaffold containers.
* Minor fixes.
* Convert the description to markdown. Fix. the generate secret onClick handler.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
* add contentlayer2 to www
* remove authorURL from blog post meta
* latest blog posts in Developers dropdown menu
* parse blog slug in contentlayer
* change next config plugins order
* contentlayer build in www package.json
* contentlayer2
* contentlayer2 build on typecheck in www
* remove comment
* Update package-lock.json
* revert npm package version
* Update package-lock.json
---------
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
* Use Sentry Error boundary.
* Add a button for throwing error to test the sentry error boundary.
* trigger an error during rendering.
* Move the throwing of error.
* Fix the error boundary state.
* Try to throw an error from the project list.
* Revert to using react error boundary.
* Minor fixes.
* Add an example page for throwing an exception to be caught by Sentry. Remove the error filter from the Sentry client config.
* Remove config for allowing errors only from our code.
* When capturing an exception with Sentry, add a tag if the exception is in the boundary.
* Minor fixes.
* Remove testing code.
* Move forgotten code.
* Add a function for anonymized user id.
* Set the sentry user id by anonymizing the actual user id.
* Don't send Sentry reports if the user hasn't consented to the telemetry.
* Add a helper function whether the studio can send telemetry data.
* Reuse the helper function in the _app file.
* Support more granular updates via events for spinning up replica
* Add duration estimates as tooltips
* Show granular error message if error happens during replica set up
* Add support for hours in duration estimates
* Test custom error boundary
* Test
* Test
* Add error boundary to catch full page crashes
* Update apps/studio/components/ui/ErrorBoundaryState.tsx
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
---------
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
* 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>