Commit Graph

43 Commits

Author SHA1 Message Date
dependabot[bot]
cdfae6e365 Bump tsup from 8.1.2 to 8.2.2 (#23079)
Bumps [tsup](https://github.com/egoist/tsup) from 8.1.2 to 8.2.2.
- [Release notes](https://github.com/egoist/tsup/releases)
- [Changelog](https://github.com/egoist/tsup/blob/dev/.releaserc.json)
- [Commits](https://github.com/egoist/tsup/compare/v8.1.2...v8.2.2)

---
updated-dependencies:
- dependency-name: tsup
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 13:06:47 +02:00
dependabot[bot]
b77a3857e6 Bump tsup from 8.1.0 to 8.1.2 (#23060)
Bumps [tsup](https://github.com/egoist/tsup) from 8.1.0 to 8.1.2.
- [Release notes](https://github.com/egoist/tsup/releases)
- [Changelog](https://github.com/egoist/tsup/blob/dev/.releaserc.json)
- [Commits](https://github.com/egoist/tsup/compare/v8.1.0...v8.1.2)

---
updated-dependencies:
- dependency-name: tsup
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-19 09:28:52 +02:00
Pascal Jufer
ce6463a4cd Clean-up error handler & fix message for unknown API errors (#22379)
Co-authored-by: Hannes Küttner <4376726+hanneskuettner@users.noreply.github.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2024-07-15 12:15:52 +02:00
Brainslug
844d4e7f33 v10.13.0 (#22903) 2024-07-02 17:38:58 +02:00
Hannes Küttner
97af4d1507 Fix primary key unique constraint error extraction for MySQL (#22434)
* Fix primary key unique constraint error extraction for MySQL

* Add changeset

* Add changeset

* Add comment about MariaDB

* Drop 5.7 special case

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2024-06-14 15:42:31 -04:00
dependabot[bot]
2333f812b3 Bump tsup from 8.0.2 to 8.1.0 (#22678)
Bumps [tsup](https://github.com/egoist/tsup) from 8.0.2 to 8.1.0.
- [Release notes](https://github.com/egoist/tsup/releases)
- [Changelog](https://github.com/egoist/tsup/blob/dev/.releaserc.json)
- [Commits](https://github.com/egoist/tsup/compare/v8.0.2...v8.1.0)

---
updated-dependencies:
- dependency-name: tsup
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-06 14:53:54 +02:00
Brainslug
e469b49583 release 10.12 (#22652) 2024-06-04 17:34:36 +02:00
ian
f5dcd85082 Add user limits (#22479)
* Limit users

* Add defaults

* Allow specifying of reason for limit exceeded error

* Update config options doc

* Make existing tests pass

* Update extensions limit error

* Update usage of regular expression

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>

* Rename typo

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>

* Rename files

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>

* Use first() and remove redundant +=

* Fix incorrect api access count

* Rework to account for passing of unchanged access values

* Fix increased counts in updateMany

* Consistent error message

* Simplify unnecessary find

* Add tests

* Rename UserCount to AccessTypeCount

* renamed env var

* prettier

* Add changeset

* fix limit checking for batch and status updates

* test and prettier

* removed obsolete check

* updated error

* fixed error usage in extenions service

* Use randomUUID from '@directus/random'

* Fix payload check in updateMany

* implemented RolesService.updateBatch from its parent

* resolved unit test error

* updated type

* fixed existing role query

* Temporary activation of blackbox tests

* Move to separate fn, to make skippable for non-existent role

* Revert "Temporary activation of blackbox tests"

This reverts commit 4c4ac846d6.

* Revert "Move to separate fn, to make skippable for non-existent role"

This reverts commit 1d90a82e39.

* Add user limits - extension (#22642)

* adressing existing users issue

* migrated changes from pascal

* only check the role for active users

* only count active users

* updated incorrect if

* default to count zero

* Undid abstraction to separate function

* fixed updating through user counting error

* prettier

* simplified fallback query

* prettier

* Added try catch to be safee

* updated db mocking for tests

* removed extra check to satisfy implementation tests

---------

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-06-04 17:00:17 +02:00
Brainslug
b7794870f5 release update (#22594) 2024-05-28 17:01:27 +00:00
Rijk van Zanten
0d6c6b90b0 v10.11.0 2024-05-07 18:01:38 -04:00
Pascal Jufer
cf83f33939 Patch Tuesday 🐸 (Light Edition) (#22376) 2024-05-03 11:19:23 +02:00
Pascal Jufer
ae9c64125c Specific error type mapping in isDirectusError function (#22346)
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
2024-05-03 09:53:22 +02:00
Pascal Jufer
160b982928 Patch Tuesday 🐸 (#22063)
Co-authored-by: Hannes Küttner <4376726+hanneskuettner@users.noreply.github.com>
2024-04-30 10:49:20 +02:00
Pascal Jufer
081cd5a35f Update copyright year in remaining licenses (#22030) 2024-03-31 19:58:03 -04:00
dependabot[bot]
502ba82b8c Bump @vitest/coverage-v8 from 1.3.1 to 1.4.0 (#21975)
Bumps [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v1.4.0/packages/coverage-v8)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 07:08:42 +01:00
Rijk van Zanten
9d88df621f v10.10.0 2024-03-05 16:45:58 -05:00
Pascal Jufer
82b23a57d4 Add the Directus Marketplace (#21674)
* Add support for MIGRATIONS_PATH (#20627)

* Deprecate "local" extension types (#20624)

* No longer resolve local non-package extensions

* Remove local extensions from watcher

* Install fs-extra for app dev

* Replace usage of get-extensions

* Rename create functions to match behavior

* Drop extensions prefix from cli create

* Drop name requirement from cli add

* Drop extensions name regex checks

* Don't rely on regex for extension identification

* Add changeset

* Fix build for @directus/extensions

* Don't ensure nested dirs

* Load npm dependency by name prefix

* Throw more helpful error when pkg json is missing

* Fix dependency loading paths

* Only load local extensions if extensions path exists

* Fix merge conflict

* Remove unused fs-extra

* Only sync extensions if location is defined

* `extensions` -> `localExtensions`

* Fix resolving of package extensions

- consistent usage of term "package extensions"
- enhance error messages

* Fix syncing extension from storage

* Revert-revert change from #20627

---------

Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>

* Add back `MIGRATIONS_PATH` to `@directus/env` (#21053)

* Setup browse endpoint for browsing Directus extensions (#21033)

* Rename tag directus-custom to directus-extension

* Devil's in the details

* [WIP] Start on search lib

* Setup extensions-registry package

* Update pnpm lock

* Move registry search fn to new package

* Squash bugs

* Remove unused deps

* Remove unused dep in `extensions`

* Add tests for validate-limit

* Finish test coverage

* Remove unused constant

* Add back lodash-es 😇

* Install extensions-registry

* Add default keywords

* Expose registry endpoint in rest api

* Add describe module

* Reinstal pnpm

* Drop reliance on author field

The problem is that there's no requirement for it to be a valid(ated) user. Publisher is the only field we can rely on being an existing NPM user.

* Update convertSearchResult test after author change

* Format

* Allow anything after the route

To support packages with scopes

* Add test for describe

* Add more tests

* Throw unprocessablecontenterror instead of error

* Install errors pkg

* Finish test coverage

* Don't require description

* Don't wrap individual keywords

* Run formatter

* Add changeset

* Update packages/extensions-registry/src/modules/search/utils/validate-text.ts

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>

* Return sandbox information

* Drop support for directus-custom keyword

* Set type to null for multiple tags

* Restart api for new registry

* Add version utility

* Add out-of-date error

* Add assertion for api versions

* Finish new list method

* Add describe

* Use updated registry functions

* Fix controller usage

* Return output in data flag to be consistent

* Add tests for the describe module

* Add tests for list module

* Finish tests for extensions-registry package

* Remove vscode shenanigans

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>

* Project Forum: Browse UX (#21276)

* Render marketplace route in-app

* Update api list integration

* Add support for limit/offset in list

* Boilerplate route for drawer

* Render extension readme in drawer

* Render extension detail as separate page

* Setup markup for extension banner

* Render readme with markdown styling

* Boilerplate metadata block

* Use v-list for extension metadata metrics

* Render compatibility metric

* Show downloads and publish date

* Refactor to individual files

* Fix missing import

* Add size metric

* Show author on metadat

* Show verified badge

* Finish metadata

* Run formatter

* Style forum detail banner (#21290)

* Style banner contents

* Add background art

* Add banner styles to default dark mode theme

* Undo base style change to avoid conflict

* Add beta chip badge to settings nav (#21296)

* Add layout styling for detail page (#21297)

* Render metadata as grid if size allows

* Finish layout for detail page

* Fix alignment of count

* Fix search-input active state

* Finalize forum header

* Add marketplace banner

* Style registry filter

* Change v-list-item height to min-height

Allows rows for forum registry to grow

* Finalize styling for extension list item

* Finalize styling for registry

* Don't rely on format util

* Forum account detail page (#21299)

* Add support for author describe endpoint

* Boilerplate author page

* Add author endpoint

* Update naming to account

* Render github name on registry list

* Render user's name + avatar on detail

* Load account data on account page

* Restructure module

* Render account banner on account page

* Render account metadata

* Finish account detail page

* Run formatter

* Add sidebar info detail sections

* install extensions from registry (#21070)

* added an endpoint to install extensions from registries

* add changeset

* Revert format/lint scripts

* Update pnpm-lock

* Remove unused dependency

* Add download module to extensions-registry abstraction

* Download from extension registry instead of direct npm

* Throw on error

* Install based on version ID rather than name

* Install based on ID in body

Allows us to extend it in the future if need be

* Download to tmp path instead of extensions

* Save to extensions manager flattened

* Use const for package folder name

* Run more in try/catch to avoid server exit

* Remove changeset

* Undo docs updates

We'll do all docs in a single PR :)

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>

* Manage extensions by directus_extensions primary key instead of npm package name (#21300)

* Add marketplace migration

* Include bundle info

* Rename name to folder

* Store name as folder

* [WIP] Change name to ID

* Update API to use UUIDs for extensions

* Update app to use extensions id

* Run formatter

* Add changeset

* Update generate-app-entrypoint to use updated format

* Fix graphql usage

* Format

* Add forum uninstall endpoint (#21301)

* Bootstrap uninstall

* Finish uninstall endpoint

* Use shared extensions store state for managing extensions in settings (#21317)

* Use extensionsstore for extensions management

* Use shared store for extensions state and modification

* Remove unused emit

* Adds install/uninstall GUI elements for project forum (#21319)

* Use warning color for incompatible

* Styling tweaks

* Transition optional background color

* Add keys for installing

* Add install button to extension detail

* Finish install button

* Add uninstall option to extensions item

* Empty local cached extensions on start

* Add (hopefully) temporary hack to await reload

* Add install / uninstall buttons

* Update lockfile

* Fix bundle entries not rendering properly

* Clean up spinner styling

* Properly wait for reload to be done

* Run formatter

* Fix registry name

* Fix local extension loading

* Render location/company in byline

* Rearchitect metadata to unstyled listitems

* Add max-width to page container

* Only allow admins to install/uninstall extensions

* Remove unused link

* Disable eslint for map use

* Run formatter

* Add no-results indicator (#21389)

* Add no-results indicator

* add error state as well

* Standardize trailing slash

* Standardize pk check

* Resolve unnecessary check

* Move all deps to dev deps in app

* Optimize exec order

* Pull data from top level package

* Redesign filter bar

* Reset page count on filter change

* Use default padding on top of page

Feels weird now, but there's a theme-update coming that'll make this make sense :)

* Show first/last in pagination

* Auto-format package name

* Use updated registry api return names

* Add sorting by total downloads

* Add sparkline for downloads

* Add a bit of padding

* Finalize sparkline styling

* Run formatterg

* Add sandbox flag in list call

* Add MARKETPLACE_TRUST env var

* Set sandbox requirement on download

* Render list item badge

* Fix padding

* Show license in gui

* Add support for multiple maintainers

* Add activity tracking for install

* Make incompatibility notice friendlier

* Tweak margin of sparkline

* Update default CSP headers to include github content

* Make extension readme selectable

* Consistent icon, add tooltips

* Reduce size of install button

* Run formatter

* Render readme anchors with target blank

* Add min width to v-select components

* Fix background on search input

* Reduce padding on marketplace pages

* Fix showing no results

* Be consistent

* Render type filter menu in full height

* Clean up compatibility notice

* Hide count result when search count is 0

* Use v-show instead

* Bump no results notice down a bit

* Cleanup size of install buttons

* Use buttons for install / author

* Fix sparkline rendering

* Add better loading state for extension detail page

* Add spinners

* Render proper error message in case readme is missing

* Use heart logo for marketplace

* Add image border shadow

* Add loading banner on account page

* Show reload warning as persistent notification

* Only show one notification

* Update snapshot

* Add padding to verified icon

* Base extensions id on package id, show installed badge

* Sync pagination / search / filter with URL

Special shoutout to Tim

* Next max ext (#21541)

* Add limit exceeded error

* Add limit exceeded translation

* Add extensions_limit env var

* Load extensions limit in app

* Don't allow installing unknown versions

* Don't require installed flag

* Return bundled entries in describe

* Update chip to match style

* Prevent install on limit reached

* Run formatter

* Fix bundle loading

* Resolve npm extensions by package manifest (#21478)

* Merge main into next (#21669)

* Clean-up deps

* Don't export type (as long as not used anywhere)

* Update semver to latest

* Relax compatibility notice

* Use more suitable icon for version

* Re-render download charts on color-scheme change

* Link extensions to marketplace

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Mahendra Kumar <22556323+mahendraHegde@users.noreply.github.com>
2024-03-04 14:34:59 -05:00
dependabot[bot]
09baade4e9 Bump vitest from 1.3.0 to 1.3.1 (#21559)
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v1.3.1/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-26 11:28:04 +01:00
dependabot[bot]
6e537f0e76 Bump @vitest/coverage-v8 from 1.2.2 to 1.3.1 (#21512)
Bumps [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) from 1.2.2 to 1.3.1.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v1.3.1/packages/coverage-v8)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 02:16:48 +01:00
dependabot[bot]
01d3b3f524 Bump vitest from 1.2.2 to 1.3.0 (#21468)
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 1.2.2 to 1.3.0.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v1.3.0/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-19 09:59:45 +01:00
Rijk van Zanten
bad22bf1ff v10.9.2 2024-02-14 11:21:02 -05:00
dependabot[bot]
42c3d83b14 Bump tsup from 8.0.1 to 8.0.2 (#21410)
Bumps [tsup](https://github.com/egoist/tsup) from 8.0.1 to 8.0.2.
- [Release notes](https://github.com/egoist/tsup/releases)
- [Changelog](https://github.com/egoist/tsup/blob/dev/.releaserc.json)
- [Commits](https://github.com/egoist/tsup/compare/v8.0.1...v8.0.2)

---
updated-dependencies:
- dependency-name: tsup
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-13 09:07:07 +01:00
Rijk van Zanten
d3874a8f19 v10.9.0 2024-02-06 14:29:32 -05:00
Pascal Jufer
2584bd5330 Update vitest to v1.2.2 (#21216) 2024-01-28 13:43:53 +01:00
dependabot[bot]
9dda56c924 Bump vitest from 1.1.0 to 1.1.1 (#20931)
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v1.1.1/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-02 00:57:30 +01:00
Rijk van Zanten
c45cd69dd7 v10.8.3 2023-12-21 14:19:08 -05:00
Pascal Jufer
98532788d5 Selective Patch Tuesday 🐸 (#20796) 2023-12-20 00:26:15 +01:00
Pascal Jufer
5e72ea1b08 Patch Tuesday 🐸 (#20714) 2023-12-12 04:36:50 +01:00
Pascal Jufer
1a07d7355d Update TypeScript to 5.3.3 (#20710) 2023-12-11 20:39:34 +01:00
Pascal Jufer
81c9156508 Update Vitest to v1 (#20694) 2023-12-10 19:49:45 +01:00
Pascal Jufer
d30bb69490 Clean-up deps (#20581) 2023-11-30 00:46:09 +01:00
Pascal Jufer
a5215d674b Update TypeScript to 5.3.2 (#20571) 2023-11-29 13:54:56 +01:00
Pascal Jufer
ba7fac402e Update Prettier v3.1.0 (#20481) 2023-11-20 16:23:22 +01:00
Pascal Jufer
454ecdbefe Update Vitest to v0.34.6 (#20477) 2023-11-20 13:04:56 +01:00
Rijk van Zanten
9e5b9a78a7 v10.7.0 2023-10-23 10:21:13 -04:00
Pascal Jufer
e987c1990e 10.6.4 (#20102) 2023-10-20 18:55:45 +00:00
Boegie19
d82bb9c823 move api/errors to @directus/errors package (#20054)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-10-18 18:19:22 +02:00
Pascal Jufer
e1dd6fa037 Update TS related dependencies and configurations (#19866) 2023-09-29 14:45:47 +02:00
rijkvanzanten
373cc9f4fa v10.5.0 2023-07-25 17:36:33 -04:00
Pascal Jufer
e583c6b6ea Add tsconfig for Vue & CJS (#19197)
* Add tsconfig for Vue

* Delete tsconfig.json

* Use vue tsconfig for composables

* Add changeset

* Update changeset

* Update changeset
2023-07-18 17:36:16 -04:00
Connor
92621429ee Linting and Formatting Upgrade (#18892)
* add docs to eslint

* update prettier ignore

* fix vitepress linting

* eslint ignore fixes

* prettier run

* update prettier ignore

* fix formatting

* enable linting of markdown files

* revert format command change

* fix irregular whitespace

* update dictionary

* (Changelog) Create four-boxes-shake.md

* Rework ESLint / Prettier setup

- Disable js/ts/vue files for Prettier to ensure linting/formatting is
  only happening via ESLint
- Rework formatting of code blocks in md files
  - Disable formatting of code blocks in md files under '/docs' by Prettier
  - Instead use "eslint-plugin-markdown" to format & __lint__ js*/ts*/vue such code blocks
  - Replace unmaintained "eslint-plugin-md" plugin by official "eslint-plugin-markdown" plugin
  - I'll check whether we can use this to format other code blocks
    (json, html, ...) as well
- Restructure, clean-up and apply some fixes to the ESLint config
  (Note: Not ready for flat config yet since not supported by
  vscode-eslint)
- Enable cache for ESLint / Prettier in scripts
- Clean-up ignore file
  - Explicit folder declaration (.../)
  - Don't ignore all 'extensions' folders in ESLint (only
    '/api/extensions/')
  - Enable formatting in '/.github' folder

* Fix all formatting issues with Prettier

* Update md files under /docs/.typedocs

* Fix lint issues in vue/js files

* ESLint / Prettier config revision v2

Enable Prettier for md code blocks, but only as warnings since it can
get into the way with Vitepress md extensions like '[!code ...]'
comments

* Remove prettier-ignore comments

* Make spellchecker happy

* Remove changeset

* Revert lint setup for code blocks

There are many cases in the docs where linting / formatting of code
blocks doesn't make
sense:
- Code block is only an excerpt - linter fails
- Code block contains special comments (e.g. markdown extensions) which
  needs to remain at the same place - formatting would break it
- ...

* Apply lint issues / formatting from temp lint setup

* Run formatter

* Fix merge failure

* Simplify & modernize ESLint / Prettier setup

No longer run Prettier via ESLint. Nowadays, this is the recommended
setup. There's no real need to run it this way, it's just an additional
layer.

Add VS Code settings to make the work with the new setup easier.

* Remove unused eslint disable directives

* Make editorconfig more useful

* Fix formatting issues reported by editorconfig

* Format files with Prettier

* Enable formatting of source translations file

* Format source translations file

* Remove unnecessary console error

* Remove unnecessary line

* Only ignore md files under .changeset

* Add CI reporter for Prettier

* Fail job on wrongly formatted files

* Fix format

* Test Prettier action on changed/added file

* Use simple CI format check for now & no cache

* Revert "Test Prettier action on changed/added file"

This reverts commit 4f7d8826ad.

* Introduce code blocks check for docs

* Fix code block issues

* Ignore auto-generated packages dir

* Fix comment position

* Also lint `/app/.storybook`

* Reformat modified files

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-06-29 11:54:01 +02:00
rijkvanzanten
2239ef8db7 v10.4.0 2023-06-27 17:43:26 -04:00
Rijk van Zanten
ca3e7f521f Upgrade previous "Extensions" system to new "Errors" model (#18797)
* Typecheck across packages that are built with esbuild

* Boilerplate new Errors package

* No need, tsup checks with --dts

* Switch to tsup

* Setup dev script

* Add readme

* More boilerplaty things

* Finish createError function

* Install @directus/random

* Downgrade node types

* Add utility function to check if an error is a DirectusError

* Use new is-error check

* Install errors package

* Add failed validation common error

* Export common errors

* Move joi convertion to utils

* Export failed validation

* Use new failed validation error in validate-batch

* Enhance typing output of createError

* Remove outdir (handled by tsup now)

* Replace Exception with Error

* Replace exception in test

* Remove exceptions from app

* Remove exceptions from app

* Remove failed validation exception from users service

* Remove old failed validation exception from shared

* Remove exceptions package in favor of errors

* Uninstall exceptions

* Replace baseexception check

* Migrate content too large error

* Critical detail

* Replace ForbiddenException

* WIP remove exceptions

* Add ForbiddenError to errors

* HitRateLimitError

* Move validation related error/helper to new validation package

* Add index

* Add docs

* Install random

* Convert TokenExpired

* Convert user-suspended

* Convert invalid-credentials

* Move UnsupportedMediaType

* Replace wrong imports for forbidden

* Convert invalid-ip

* Move invalid provider

* Move InvalidOtp

* Convert InvalidToken

* Move MethodNotAllowed

* Convert range not satisfiable

* Move unexpect response

* Move UnprocessableContent

* Move IllegalAssetTransformation

* Move RouteNotFound

* Finalize not found

* Various db errors

* Move value too long

* Move not null

* Move record-not-unique

* Move value out of range

* Finish db errors

* Service unavailable

* GQL errors

* Update packages/validation/src/errors/failed-validation.ts

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>

* Update packages/validation/src/errors/failed-validation.ts

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>

* InvalidQuery

* Add test for invalid query message constructor

* Invalid Payload

* Finalize exceptions move

* Improve type of isDirectusError

* Various fixes

* Fix build in api

* Update websocket exceptions use

* Allow optional reason for invalid config

* Update errors usage in utils

* Remove unused package from errors

* Update lockfile

* Update api/src/auth/drivers/ldap.ts

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>

* Update packages/validation/src/utils/joi-to-error-extensions.ts

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>

* Put error codes in shared enum

* Replace instanceof checks in api

* Fix tests I think

* Tweak override names

* Fix linter warnings

* Set snapshots

* Start fixing BB tests

* Fix blackbox tests

* Add changeset

* Update changeset

* Update extension docs to use new createError abstraction

* 🙄

* Fix graphql validation error name

* 🥳

* use ErrorCode.Forbidden

* fix blackbox auth login test

* Add license files

* Rename preMutationException to preMutationError

* Remove unused ms dep & sort package.json

* Remove periods from error messages for consistency

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>

* Add optional code check

* Use updated error code checker

* Rename InvalidConfigError to InvalidProviderConfigError

---------

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: ian <licitdev@gmail.com>
2023-06-27 17:22:26 -04:00