Commit Graph

2558 Commits

Author SHA1 Message Date
ian
94e8153baf Sanitize column only when applying snapshot diff (#18579)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-05-15 13:41:57 +02:00
Brainslug
af55402680 Adding a maximum for query limit (#17309)
* Adding a maximum for query limit

* fixed bad env check

* using the getEnv function to make it better testable

* updated sanitize-query tests

* added tests for the validate query function

* Added DEFAULT_QUERY_LIMIT as fallback instead

* make the linter happy

* accept infinity as max_query_limit

* fixed merge conflicts

* added missing import

* moved docs PR into main repo

* added missing import

* renamed vars

* basic page size limiting

* Update app/src/layouts/cards/cards.vue

* Update app/src/layouts/map/map.vue

* Update app/src/layouts/tabular/tabular.vue

* Update app/src/layouts/tabular/tabular.vue

* Create paginate util

* extracted page size logic to composable and implemented default usage in app

* updated paginate utility

* using the new fetch-all utility

* removed limit: -1 for api calls that do not support it

* fix linter

* removed console log

* making the linter happy

* Create loud-flowers-yawn.md

* Add tests for no / unlimited limit

* Cover all cases for max limit in sanitizeQuery

* Get rid of non-null assertion

* added test for composable

* Update var names in documentation

* replace hardcoded limit default with env var

* update default page size behavior

* fixed test

* update server info api reference

* include queryLimit in graphql server info

* use configured max limit in calendar layout

* use configured max limit in kanban layout

* account for max query limit in use-revisions

---------

Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2023-05-12 21:59:03 +08:00
rijkvanzanten
703c5d9c69 v10.1.0 2023-05-11 17:22:00 -04:00
Brainslug
110413e473 clear item cache when permissions change (#18526)
* clear item cache when permissions change

* Create slow-timers-fold.md

* Add tests

---------

Co-authored-by: ian <licitdev@gmail.com>
2023-05-12 01:18:40 +08:00
Rijk van Zanten
20912f1645 Revert "Use vitest run instead of --watch=false (#18540)" (#18542)
This reverts commit 97f0af669e.
2023-05-10 13:33:28 -04:00
Rijk van Zanten
97f0af669e Use vitest run instead of --watch=false (#18540) 2023-05-10 13:24:30 -04:00
Rijk van Zanten
50e2c4220d Standardize TSConfig use (#18538)
* Use tsconfig.prod.json in packages

* Use prod tsconfig in api

* Install node types in storage
2023-05-10 13:22:30 -04:00
Rijk van Zanten
b56fc107a5 Add Pressure-based rate limiter (#17873)
* Start setting up @directus/pressure

* Build pressure middleware

* Add basic readme

* Install @directus/pressure

* Fix this binding

* Experiment

* Add defaults util

* Cleanup

* Fix export

* Use directus defaults

* Start tests

* Add random-utils package

* Finish testing for monitor

* Add prod deployment

* Stop building test files in prod

* My favorite

* Integrate pressure handler

* Add decent defaults

* Add retry header + custom error support

* Clean-up merge conflict & sort imports

* Fix build

* Remove default value for retry after

* Verify sampleInterval value

* ran eslint

* updated package lock

* updated vitest

* Create slimy-zebras-jam.md

* Added basic docs for config options

* updated pnpm lock and changeset

* Update & align new packages

* Update .changeset/slimy-zebras-jam.md

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
2023-05-10 14:17:53 +00:00
Tim Spickermann
d633e11631 Fix field presets for relational fields are not working (#16560)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2023-05-05 17:19:46 +02:00
Brainslug
4d1d0e61dd Updated vitest (#18483)
* updated vitest to 0.31.0

* Create late-tables-call.md
2023-05-04 11:29:54 -04:00
Arthur Yidi
13433b6ea7 Graceful database shutdown for bootstrap CLI (#18465)
* graceful shutdown for boostrap cli

changeset

sign contributors

* Update changeset

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-05-04 13:20:23 +02:00
Brainslug
a9f397de1f Prevent parsing non-decimal values in search (#18383)
* prevent parsing non-decimal values in search

* Create rare-deers-clap.md

* Adjust format of changeset

* Add explaining comment to return logic of validateNumber

* remove float with zeros check

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-05-03 09:42:28 -04:00
Brainslug
c74b5da7b9 Improved flows error class handling (#18421)
* improved flows error handling

* Create gentle-cars-watch.md

* updated changeset
2023-05-03 09:40:45 -04:00
Rijk van Zanten
44b4863788 Require curly brackets in if statements when they're multi-line (#18387)
* Enable Curly rule

* Fix curly misuse
2023-05-02 16:02:43 -04:00
Brainslug
1fba5ebf94 Load cjs custom migrations (#18385) 2023-05-02 21:10:19 +02:00
ian
69061c1284 Add Cache option for Flows webhook trigger (#18277)
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-05-02 15:17:07 +00:00
Brainslug
06ff0c2ef9 Fixes _offset=0 in deep filters (#18382) 2023-05-02 12:34:50 +02:00
Jan Arends
8b8858da9a Support multipart/form-data to apply schema diffs (#18321)
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-05-02 10:24:46 +00:00
Nicola Krumschmidt
af2ce35d67 Add shared javascript file ext constant (#18350)
* Add shared javascript file ext constant

* Add changeset
2023-04-27 17:18:02 -04:00
Aiden Foxx
2f3fb229bc Correctly set user "auth_data" after auth.update hook (#18310) 2023-04-26 21:01:03 +02:00
Brainslug
2ced6b0a0b Prevent thumbnail duplication (#18316) 2023-04-26 20:39:20 +02:00
Rijk van Zanten
2bc226d16f Change license to BSL-1.1 (#18330)
* Change license to BSL1.1

* Mark major version

* Fix formatting

* Remove duplicate heading

* Update formatting

* Copy paste error

* Update license

* Update license

* Format covenants

* Update readme.md

* Update licenses for packages

* Update readme.md

* Update contributors.yml

OG... but to be clear, rijkvanzanten is the one who really built all of this ❤️

* Tweak license in openapi

* Update packages/specs/src/openapi.yaml

* Add MIT license headers

* Use v10 in examples

* Update additional examples

* Update generate-extensions-entrypoint.test.ts

* Update tests to use latest v9 and v10 versions

* use lowercase for naming consistency

* change casing for api license

* Update migrations doc

* Update dictionary

* Consistent ordering of license field in app/package.json

* Use major version in specs again (but as string)

So it's valid for all v10 versions

* Consolidate readme's

---------

Co-authored-by: Ben Haynes <ben@directus.io>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2023-04-26 14:10:42 -04:00
rijkvanzanten
381f1c9d8e v9.26.0 2023-04-24 16:40:53 -04:00
ian
f850bcbacd Revert "enabling auto-purge to prevent schema cache issues out-of-the-box (#18303)" (#18308)
This reverts commit 4ccfd2a4ae.
2023-04-24 11:56:52 -04:00
Brainslug
4ccfd2a4ae enabling auto-purge to prevent schema cache issues out-of-the-box (#18303) 2023-04-24 08:40:26 -04:00
Jonathan Schneider
67c4df0e78 [Feat] Flow: Add Mail Templates (#15829)
* add mail templates to flow (proposal)

* add template placeholder to base

* add translations

* add test

* update lint

* accept cla

* fix mail operation unit test

* eslint fix

* Fix linting

* Add test for custom template and data

* Fix import for ts 5

* Another ts type fix

---------

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-04-21 15:41:35 -04:00
Nicola Krumschmidt
b69f380275 Fix extension reloading for local bundle extensions (#18287)
Fixes #17694
2023-04-21 14:23:53 -04:00
Pascal Jufer
17afb9a3bc Patch Tuesday 🐸 (#18260)
* Update `@directus/api` deps (minor)

 @aws-sdk/client-ses          3.292.0  →   3.316.0
 @godaddy/terminus             4.11.2  →    4.12.0
 @rollup/plugin-alias           4.0.3  →     4.0.4
 @rollup/plugin-node-resolve   15.0.1  →    15.0.2
 @types/node                  18.15.3  →  18.15.11
 @vitest/coverage-c8           0.29.3  →    0.30.1
 axios                          1.3.4  →     1.3.6
 fs-extra                      11.1.0  →    11.1.1
 helmet                         6.0.1  →     6.1.5
 ioredis                        5.3.1  →     5.3.2
 joi                           17.8.4  →    17.9.1
 liquidjs                      10.6.1  →    10.7.0
 marked                        4.2.12  →     4.3.0
 nanoid                         3.3.4  →     3.3.6
 rollup                        3.19.1  →    3.20.6
 sharp                         0.31.3  →    0.32.0
 vitest                        0.29.3  →    0.30.1
 vm2                           3.9.16  →    3.9.17

* Update `@directus/api` deps (major)

 @rollup/plugin-alias     4.0.4  →     5.0.0
 @types/inquirer          8.2.6  →     9.0.3
 @types/node           18.15.11  →  18.15.12
 camelcase                6.3.0  →     7.0.1
 chalk                    4.1.2  →     5.2.0
 commander                9.5.0  →    10.0.1
 execa                    5.1.1  →     7.1.1
 icc                      2.0.0  →     3.0.0
 inquirer                 8.2.5  →     9.1.5
 ~ldapjs                   2.3.3  →     3.0.2~
 nanoid                   3.3.6  →     4.0.2
 ~openapi3-ts              3.2.0  →     4.1.1~
 ora                      5.4.1  →     6.3.0
 strip-bom-stream         4.0.0  →     5.0.0
 tedious                 15.1.3  →    16.0.0
 typescript               4.9.5  →     5.0.4

* Update `@directus/app` deps

 @babel/core                             7.21.3  →    7.21.4
 @babel/preset-env                       7.20.2  →    7.21.4
 @fortawesome/fontawesome-svg-core        6.3.0  →     6.4.0
 @fortawesome/free-brands-svg-icons       6.3.0  →     6.4.0
 @fullcalendar/core                       6.1.4  →     6.1.5
 @fullcalendar/daygrid                    6.1.4  →     6.1.5
 @fullcalendar/interaction                6.1.4  →     6.1.5
 @fullcalendar/list                       6.1.4  →     6.1.5
 @fullcalendar/timegrid                   6.1.4  →     6.1.5
 @pinia/testing                          0.0.15  →    0.0.16
 @popperjs/core                          2.11.6  →    2.11.7
 @storybook/addon-actions            7.0.0-rc.4  →     7.0.6
 @storybook/addon-backgrounds        7.0.0-rc.4  →     7.0.6
 @storybook/addon-docs               7.0.0-rc.4  →     7.0.6
 @storybook/addon-essentials         7.0.0-rc.4  →     7.0.6
 @storybook/addon-links              7.0.0-rc.4  →     7.0.6
 @storybook/addon-mdx-gfm            7.0.0-rc.4  →     7.0.6
 @storybook/addon-measure            7.0.0-rc.4  →     7.0.6
 @storybook/addon-outline            7.0.0-rc.4  →     7.0.6
 @storybook/client-api               7.0.0-rc.4  →     7.0.6
 @storybook/client-logger            7.0.0-rc.4  →     7.0.6
 @storybook/vue3                     7.0.0-rc.4  →     7.0.6
 @storybook/vue3-vite                7.0.0-rc.4  →     7.0.6
 @types/diff                              5.0.2  →     5.0.3
 @types/dompurify                         3.0.0  →     3.0.2
 @types/lodash                         4.14.191  →  4.14.194
 @vitejs/plugin-vue                       4.0.0  →     4.1.0
 @vue/test-utils                          2.3.1  →     2.3.2
 apexcharts                              3.37.1  →    3.39.0
 axios                                    1.3.4  →     1.3.6
 dompurify                                3.0.1  →     3.0.2
 happy-dom                                8.9.0  →     9.8.4
 marked                                  4.2.12  →     4.3.0
 nanoid                                   4.0.1  →     4.0.2
 pinia                                   2.0.33  →    2.0.34
 sass                                    1.59.3  →    1.62.0
 storybook                           7.0.0-rc.4  →     7.0.6
 typescript                               4.9.5  →     5.0.4
 vite                                     4.1.4  →     4.2.2
 vitest                                  0.29.3  →    0.30.1
 webpack                                 5.76.2  →    5.80.0

* Update root deps

* Update `@directus/composables` deps

* Update `@directus/constant` deps

* Update `create-directus-extension` deps

* Update `@directus/exceptions` deps

* tsconfig workaround: ignoreDeprecations

* Update `@directus/extensions-sdk` deps

* Update `@directus/schema` deps

* Update `@directus/storage` deps

* Update `@directus/storage-driver-azure` deps

* Update `@directus/storage-driver-cloudinary` deps

* Update `@directus/storage-driver-gcs` deps

* Update `@directus/storage-driver-local` deps

* Update `@directus/storage-driver-s3` deps

* Update `@directus/types` deps

* Update `@directus/update-check` deps

* Update `@directus/utils` deps

* tsconfig workaround in schema: ignoreDeprecations

* tsconfig workaround in remaining packages: ignoreDeprecations

* Update `tests-blackbox` deps

* Revert "tsconfig workaround: ignoreDeprecations"

This reverts commit 5d97da55e3.

* Revert tsconfig override

* Update tsconfig

* Fix imports in @directus/utils

* Fix imports in composables

* Fix imports in extensions-sdk

* Fix imports in @directus/api

* Move RateLimiterAbstract to types import as well

* Bump pnpm to 8.3.1

* Update `docs` deps

> [...] the @vueuse/head package will be deprecated. If you're setting up this package on a new project, you should use the @unhead/vue package directly [...]

* Remove obselete dep `concurrently` from extensions-sdk

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

* New day, new updates

Also forgot to include minor updates of deps in `tests-blackbox` in previous
commit

* Fix `api` tests

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2023-04-21 12:59:27 -04:00
Brainslug
ac66c49a82 updated vm2 to mitigate https://github.com/patriksimek/vm2/security/advisories/GHSA-ch3r-j5x3-6q2m (#18274) 2023-04-20 17:09:54 +02:00
rijkvanzanten
835b0de89d v9.25.2 2023-04-20 10:49:53 -04:00
Nicola Krumschmidt
054188d810 Fix extension reloading (#18257)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-19 22:45:36 +02:00
Rijk van Zanten
8ffb92ffa1 Remove cache flushing on startup (#18238)
* Remove cache flushing on startup

* Flush caches on migrate

* Add current API version to cache key

* Fix expect hashes in test
2023-04-19 12:26:01 -04:00
Rijk van Zanten
12e38da419 Don't fail on format=auto without accept header (#18235) 2023-04-18 17:12:46 -04:00
bicouy0
84cb5028c7 Vary on accept when auto converting assets (#18228) (#18229) 2023-04-18 09:10:08 -04:00
Rijk van Zanten
c48309ab68 Last eslint tweak (#18198)
* Should be there now

* Format
2023-04-14 17:40:50 -04:00
rijkvanzanten
37658802b7 One more 2023-04-14 17:30:56 -04:00
Rijk van Zanten
bdb1a919e2 White space rules (#18197)
* White space rules

* Auto-fix whitespace linter warnings
2023-04-14 17:21:56 -04:00
rijkvanzanten
c301cfbc82 v9.25.1 2023-04-13 16:32:58 -04:00
rijkvanzanten
ac1251cc57 Move readme to new wrapper package 2023-04-13 16:27:04 -04:00
rijkvanzanten
4f540b03d0 v9.25.0 2023-04-13 13:32:44 -04:00
Connor
2bcd0e4ba4 Only show message on just request/exec flow operations (#18167)
* Only show message on just request/exec flow operations

* Add ConnorSimply to contributors

* Change to instanceof BaseException
2023-04-13 11:33:19 -04:00
Brainslug
0bb02cb78c security update in the vm2 dependency (#18162) 2023-04-13 12:47:42 +02:00
David Zacharias
d7930029f7 Resend user invites (#18147)
* Support for re-sending user invites. Close #1799

* Reuse getUserByEmail in user service.

* Add mockImplementation to spies on ItemsServices

* Signed contributors list.

* Fix invite tests

* Fix comments

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-12 13:42:53 -04:00
Hannes Küttner
ebba7a68e7 Migrate to Material Symbols (#18004)
* Migrate to Material Symbols

* Fix lint issues

* Use canonical `bookmark` icon

* Update `copy` icon name

* Replace `highlight_alt` with `select` icon

* Add directus_presets default icon migration

* Fix lint (again)

* Add spaces around icon group names

* Replace missing _outline icons

* Replace `arrow_backward` with `arrow_back`

* Update migrations

* Sign CLA

* merge migrations

* Revert group name display tweak

* Fix hover color + grid centering

* Update app/src/interfaces/file-image/file-image.vue

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-12 13:12:37 -04:00
Nitwel
898b580707 Autoconvert assets if browser supports it (#18012)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-12 15:08:51 +00:00
Nitwel
7f6511d6dc Fix too many SQL Variables (#18001)
* Fix too many SQL Variables

* run linter

* Use lodash' chunk instead of custom for loop

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-12 02:28:49 +00:00
Pascal Helfenstein
b220413819 Add register and update hooks for oauth2 and openid drivers (#18131)
* Add register and update hooks for oauth2 and openid drivers

* Add register and update hooks for ldap and saml drivers

* Update contributors.yml

Add username nicam to contributors.yml

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-11 19:47:40 -04:00
Rijk van Zanten
bce0c1c002 Use lodash set to format error (#18143) 2023-04-11 19:25:42 -04:00
Julius Berger
b207af25ea Add support for AVIF image format (#17303)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2023-04-11 21:57:38 +00:00
Pascal Jufer
5205a8a17a Handle webhook request errors correctly (#18080) 2023-04-11 16:49:02 -04:00