Commit Graph

2503 Commits

Author SHA1 Message Date
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
Brainslug
8b0c5f1250 Fixed boolean logic mistake in the _nempty operator (#17903) 2023-03-23 16:24:13 -04:00
rijkvanzanten
21a0b910ac v9.23.3 2023-03-23 14:11:49 -04:00
John Hillegass
3495363039 Merge pull request from GHSA-8vg2-wf3q-mwv7
* fix(api): redact header cookie

This is a quick PoC for a fix. I am not sure if it's the best answer and have not added tests yet. If we feel good about it, I can add tests and open a PR. Please let me know how you'd like to proceed!

* cleaner

* rework to handle multiple inputs and add unit tests

* Added same redacting logic for teh response set-cookie

---------

Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
2023-03-23 18:54:02 +01:00
rijkvanzanten
74508c70b8 v9.23.2 2023-03-23 13:35:11 -04:00
ian
cce33436d1 Rework schema caching to use memory (#17763)
Co-authored-by: Nitwel <mail@nitwel.de>
Co-authored-by: Jan Arends <jaads@users.noreply.github.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-03-23 12:52:06 +01:00
rijkvanzanten
fa44632c71 Update snapshot 2023-03-22 17:48:17 -04:00
rijkvanzanten
fbb4da2e77 Fix test 2023-03-22 17:27:39 -04:00
rijkvanzanten
5247b68afa Updates 6 of 6 2023-03-22 17:23:30 -04:00
rijkvanzanten
fe74c43bc0 Updates 5 of many 2023-03-22 17:02:18 -04:00
rijkvanzanten
f0e0508dd2 Updates 4 of many
This was my favorite so far
2023-03-22 16:55:46 -04:00
rijkvanzanten
71060a51f7 Updates 3 of many 2023-03-22 16:29:36 -04:00
rijkvanzanten
0a137551a8 Updates 2 of many 2023-03-22 16:23:25 -04:00
rijkvanzanten
05034d0e17 Updates 1 of many 2023-03-22 16:13:54 -04:00
rijkvanzanten
e721e33c8b Enable exactOptionalPropertyTypes 2023-03-22 16:13:48 -04:00
Rijk van Zanten
806be3a193 TSConfig Modernization part 2: Enable non-breaking flags (#17889)
* Enable non-breaking flags

* Add explicit src
2023-03-22 15:58:44 -04:00
Rijk van Zanten
1a5f06c791 TSConfig Modernization: Set importsNotUsedAsValues (#17887)
* Set importsNotUsedAsValues

* Fix import
2023-03-22 14:51:27 -04:00
ian
7b256e769c Fix built-in modules for flows exec operation (#17866)
* Fix built-in modules in flows exec

* Tiny ocd patch
2023-03-21 16:46:03 +01:00
Nitwel
022d77d5d9 Fix keep folder on reupload (#17744)
* Fix deleting data on reupload

* only update folder when necessary

* run linter

* fix replacing filename_download and title

* run linter

* fix if statement

* clean up code

* Remove unused import of 'File'

* cleanup code

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-03-21 16:17:19 +01:00
rijkvanzanten
c938e4be34 Remove comment 2023-03-20 16:53:11 -04:00
Nitwel
a9a5e2a26d Fix options being null (#17847) 2023-03-20 13:54:27 +01:00
Pascal Jufer
0293c88aa3 Patch Tuesday 🐸 (#17811)
* Update root deps

* Update `directus` deps

* Update `@directus/app` deps

* Update usage of knex-mock-client

* Update `@directus/shared` deps

* Update `extensions-sdk` deps

* Update `@directus/specs` 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/utils` deps

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2023-03-17 15:15:03 +08:00