Commit Graph

2524 Commits

Author SHA1 Message Date
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
Rijk van Zanten
b7f352eec2 Fix updating payload on request.error filter (#18137)
Fixes #17002
2023-04-11 16:14:44 -04:00
José Varela
54f5081e69 Users: Verify JWT on accept invitation (#16711)
* Adds ability to verify JWT with meaningful errors

* Fix tests

* Apply verify JWT to accept invitation

* Update per review

* Add joselcvarela to contributors

He's a core team member; already signed the CLA outside of GH

---------

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2023-04-11 15:49:26 -04:00
Pascal Jufer
dcc246e165 Introduce new directus wrapper package (#18134)
* Maybe?

* Maybe maybe

* ESM & version update

* Adjust Dockerfile to new wrapper package

* Clean-up api package.json file

* Update directus/package.json

* Update directus/package.json

* Update directus/package.json

* Regen pnpm lock

* Declare engines in new wrapper package

* Use wrapper version in app-settings

---------

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2023-04-11 15:25:58 -04:00
Pascal Jufer
15b91dee34 Blackbox tests restructuring (#18122)
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-11 18:28:37 +02:00
Pascal Jufer
b4e9afcc88 Provide filename via Content-Disposition when accessing asset (#16809)
* Provide filename via Content-Disposition when accessing asset

* Remove unused const

---------

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2023-04-11 11:52:09 -04:00
Diego Leme
aaa0397c3a Block refresh token of suspended users (#17927)
* Block refresh token of suspended users

* Add diegoleme as contributor

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-11 09:22:00 -04:00
ian
b9087c1aca Move activity Action enum from types to constants package (#18126)
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2023-04-11 08:30:48 +00:00
bicouy0
d9d9901b02 serve rollup output chunks (#18084)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-11 00:09:00 +02:00
Rijk van Zanten
54abbd1970 Update keyv/redis (#18119) 2023-04-10 15:22:22 -04:00
Azri Kahar
dd3202ce38 Fix diff validation and apply (#18048)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: ian <licitdev@gmail.com>
2023-04-10 17:53:51 +02:00
Pascal Jufer
3dff09346a Remove wrong info that SAML metadata options can be URLs (#18116)
* Improve typings in saml auth driver

* Remove wrong info that SAML metadata options can be URLs
2023-04-10 09:11:36 -04:00
Brainslug
e56a6715be security update in the vm2 dependency (#18112) 2023-04-08 19:32:55 +02:00
Rijk van Zanten
9ec6606694 Bro thats like just your opinion bro (#18106) 2023-04-07 16:28:57 -04:00
ian
fdf0fa2fb8 Add max batch mutation (#17535)
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-04-07 18:25:25 +02:00
Azri Kahar
9bafaef939 Fix falsy default values when reading singleton collection (#18101)
* fix falsy default value for readSingleton

* add unit test

* opt to check null only

* sign CLA
2023-04-07 21:29:36 +08:00
Pascal Jufer
99e6c7f8fd Clean-up configs (#18093)
* Consolidate gitignore config

* Remove editorconfig in subfolders

* Remove obsolete jest config
2023-04-07 17:29:28 +08:00
Romain Lenzotti
949c4794d5 Fix missing payload.iss when authorization_response_iss_parameter_supported OpenID metadata is true (#18009)
* Fix missing payload.iss when authorization_response_iss_parameter_supported OpenID metadata is true

* Add github usernamt to contributings.yml

* Fix github username case

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-06 12:30:36 -04:00
Brainslug
bc8457e996 Windows compatibility for running migrations (#18082)
* Prepend the file:// prefix for windows compatibility in migrations

* cla
2023-04-06 09:04:18 -04:00
Brainslug
b01896314f Go back to tsx for api scripts for Windows compatibility (#18066)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-04-05 22:23:11 +00:00
Nitwel
3219bfe38f Fix status on shutdown (#18010)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
2023-04-05 14:50:15 +00:00
Rijk van Zanten
2983e61870 The Great TypeScript Modernization Program Season 3 Episode 6: The Big One (#18014)
* Step 1

* Step 2

* False sense of confidence

* Couple more before dinner

* Update schema package

* Update format-title

* Upgrade specs file

* Close

* Replace ts-node-dev with tsx, and various others

* Replace lodash with lodash-es

* Add lodash-es types

* Update knex import

* More fun is had

* FSE

* Consolidate repos

* Various tweaks and fixes

* Fix specs

* Remove dependency on knex-schema-inspector

* Fix wrong imports of inspector

* Move shared exceptions to new package

* Move constants to separate module

* Move types to new types package

* Use directus/types

* I believe this is no longer needed

* [WIP] Start moving utils to esm

* ESMify Shared

* Move shared utils to  @directus/utils

* Use @directus/utils instead of @directus/shared/utils

* It runs!

* Use correct schemaoverview type

* Fix imports

* Fix the thing

* Start on new update-checker lib

* Use new update-check package

* Swap out directus/shared in app

* Pushing through the last bits now

* Dangerously make extensions SDK ESM

* Use @directus/types in tests

* Copy util function to test

* Fix linter config

* Add missing import

* Hot takes

* Fix build

* Curse these default exports

* No tests in constants

* Add tests

* Remove tests from types

* Add tests for exceptions

* Fix test

* Fix app tests

* Fix import in test

* Fix various tests

* Fix specs export

* Some more tests

* Remove broken integration tests

These were broken beyond repair.. They were also written before we really knew what we we're doing with tests, so I think it's better to say goodbye and start over with these

* Regenerate lockfile

* Fix imports from merge

* I create my own problems

* Make sharp play nice

* Add vitest config

* Install missing blackbox dep

* Consts shouldn't be in types

tsk tsk tsk tsk

* Fix type/const usage in extensions-sdk

* cursed.default

* Reduce circular deps

* Fix circular dep in items service

* vvv

* Trigger testing for all vendors

* Add workaround for rollup

* Prepend the file protocol for the ESM loader to be compatible with Windows
"WARN: Only URLs with a scheme in: file and data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'"

* Fix postgres

* Schema package updates

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

* Resolve cjs/mjs extensions

* Clean-up eslint config

* fixed extension concatination

* using string interpolation for consistency

* Revert MySQL optimisation

* Revert testing for all vendors

* Replace tsx with esbuild-kit/esm-loader

Is a bit faster and we can rely on the built-in `watch` and `inspect`
functionalities of Node.js

Note: The possibility to watch other files (.env in our case) might be
added in the future, see https://github.com/nodejs/node/issues/45467

* Use exact version for esbuild-kit/esm-loader

* Fix import

---------

Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-04-04 17:41:56 -04:00
rijkvanzanten
517e7cb55c v9.24.0 2023-04-04 17:13:31 -04:00
rijkvanzanten
952da7b898 Simplify util 2023-04-04 17:07:02 -04:00
Azri Kahar
f900e59dcb Add missing fields to GraphQL server info (#17922)
* add rate limiter, rate limiter global and flows

* fix project fields in server info

* add graphql for /utils/random/string

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-03 18:07:52 -04:00
ian
f705fedf09 Fix cache skipping when PUBLIC_URL is relative (#18029)
* Fix cache skipping when PUBLIC_URL is relative

* Add test

* Update api/src/utils/should-skip-cache.test.ts

---------

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2023-04-03 09:59:21 -04:00
Azri Kahar
b8dc4cde9c add missing .toString() password reset url (#18032) 2023-04-03 09:58:46 -04:00
Nitwel
ba69f30a01 Do not override metadata (#17972)
* Do not override metadata

* Update test

---------

Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-03-28 11:20:21 -04:00
Nitwel
529b9aaa67 Only check for undefined and null (#17976)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-03-28 10:53:45 -04:00
Rijk van Zanten
cb74665693 noUnusedParameters: true (#17935) 2023-03-24 16:56:18 -04:00
Rijk van Zanten
2bc039607b TS Config Modernization Program Part 4 of almost done (#17934)
* noUncheckedIndexedAccess: true !!!!!!!?!!!!!!!!!!?

* Fix duplicate non-null assertion
2023-03-24 16:43:54 -04:00
rijkvanzanten
6b9982eae2 v9.23.4 2023-03-24 11:34:21 -04:00
Azri Kahar
e0cf496797 Fix auth expires value larger than 32-bit integer for GraphQL (#17908)
* verify blackbox test catches this error

* use GraphQLBigInt for auth expires field

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-03-24 10:18:59 -04:00
Brainslug
73bbfaf058 Fix cookie redaction in logs (#17914)
* removed incorrect redaction logic

* updated paths that werent working

* Added new redaction function

* Reverting unintentional change

* don't force lowercase provider names

* extracted cookieNames

* set cookie based on driver settings suggested by ian

* add unit test

* redact the entire cookie header

* updated the tests

* move redact text to constants

---------

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-03-24 14:04:22 +00:00
Rijk van Zanten
80f4807a09 TS Config Modernization Program Part 3 of many (#17904)
* noImplicitOverride: true

* noImplicitReturns: true

* noPropertyAccessFromIndexSignature: true
2023-03-23 16:47:55 -04:00