Commit Graph

9991 Commits

Author SHA1 Message Date
rijkvanzanten
8ea179248e No emoji please 2023-04-04 17:49:08 -04: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 v9.24.0 2023-04-04 17:13:31 -04:00
Nitwel
3350e5c6ac Don't set edits at start (#17848) 2023-04-04 17:08:04 -04:00
rijkvanzanten
952da7b898 Simplify util 2023-04-04 17:07:02 -04:00
Rijk van Zanten
6badbb7a0e New Crowdin updates (#17936)
* New translations en-US.yaml (French)

* New translations en-US.yaml (Slovak)

* New translations en-US.yaml (Arabic)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Icelandic)

* New translations en-US.yaml (Icelandic)

* New translations en-US.yaml (Icelandic)

* New translations en-US.yaml (Icelandic)

* New translations en-US.yaml (Icelandic)

* New translations en-US.yaml (Persian)

* New translations en-US.yaml (Persian)

* New translations en-US.yaml (English, United Kingdom)

* New translations en-US.yaml (Icelandic)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Dutch)

* New translations en-US.yaml (French, Canada)

* New translations en-US.yaml (Nepali)

* New translations en-US.yaml (Chinese Simplified)

* New translations en-US.yaml (Indonesian)

* New translations en-US.yaml (Thai)

* New translations en-US.yaml (English, United Kingdom)

* New translations en-US.yaml (Ukrainian)

* New translations en-US.yaml (Romanian)

* New translations en-US.yaml (French)

* New translations en-US.yaml (Spanish)

* New translations en-US.yaml (Arabic)

* New translations en-US.yaml (Bulgarian)

* New translations en-US.yaml (Catalan)

* New translations en-US.yaml (Czech)

* New translations en-US.yaml (Danish)

* New translations en-US.yaml (German)

* New translations en-US.yaml (Finnish)

* New translations en-US.yaml (Hungarian)

* New translations en-US.yaml (Italian)

* New translations en-US.yaml (Lithuanian)

* New translations en-US.yaml (Polish)

* New translations en-US.yaml (Russian)

* New translations en-US.yaml (Slovak)

* New translations en-US.yaml (Slovenian)

* New translations en-US.yaml (Swedish)

* New translations en-US.yaml (Turkish)

* New translations en-US.yaml (Chinese Traditional)

* New translations en-US.yaml (Portuguese, Brazilian)

* New translations en-US.yaml (Spanish, Chile)

* New translations en-US.yaml (Spanish, Mexico)

* New translations en-US.yaml (Croatian)

* New translations en-US.yaml (Estonian)

* New translations en-US.yaml (English, Canada)

* New translations en-US.yaml (Breton)

* New translations en-US.yaml (Bosnian)

* New translations en-US.yaml (Serbian (Latin))

* New translations en-US.yaml (Sorani (Kurdish))

* New translations en-US.yaml (Spanish, Latin America)

* Update source file en-US.yaml

* New translations en-US.yaml (Arabic)

* New translations en-US.yaml (Vietnamese)

* New translations en-US.yaml (Italian)

* New translations en-US.yaml (Italian)

* New translations en-US.yaml (Persian)
2023-04-04 15:28:41 -04:00
Pascal Jufer
5b256f64c6 Use pnpm 8.1.0, define version via packageManager field, clean-up other version definitions (#17993)
* Use `packageManager` field to define pnpm version in one place

* Update to pnpm 8.1.0 (see also #17990)

* Enforce pnpm >= 8 via `engines`

* Clean-up `engines` & remove `volta`

* Add dedup workaround, consolidate test env prepare steps

* No checkout, no action :-)

* Bump minimal pnpm version to 8.1.0

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-04 15:20:25 -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
e7cf4e09c8 Add cookie logger tests (#17932)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
2023-04-03 16:47:56 +02: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
Rijk van Zanten
bb952f9386 Add optional confirmation dialog with input fields to Manual Trigger in Flows (#17603)
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-03-31 19:37:50 +00:00
Azri Kahar
6d793f8878 add active state to file interface (#18011) 2023-03-31 09:29:16 -04:00
Rijk van Zanten
953c2f95d5 Upgrade pnpm to 8 (#17979) 2023-03-28 13:43:25 -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
Wryn (yage) Wagner
e1a1190975 Dockerfile Improvements (#17965)
* combined layers, optimized layer order

* Revert data volume scoping

---------

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2023-03-28 11:07:26 -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
Nitwel
b3be34850e Fix sorting in m2m table (#17746)
* fix sorting in m2m table

* fix sorting

* run linter

* Update app/src/composables/use-relation-multiple.ts

* improve syntax

---------

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2023-03-28 21:03:21 +08:00
José Varela
89293d92a9 App: Fix saving required relational fields (#17842)
* Fix saving relational fields

* Be more specific on variable name

* Fix missing quotes
2023-03-28 13:03:56 +02:00
Nitwel
75ad4876bf only hide v-select options (#17953) 2023-03-27 10:12:17 -04:00
Nitwel
ac36125439 export types in shared (#17954) 2023-03-27 09:55:37 -04:00
Nitwel
a5b81c7a2d properly apply query param to url (#17956)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-03-27 09:45:44 -04:00
Nitwel
2c3dc1c77c don't move files when folder can't be deleted (#17957) 2023-03-27 15:44:10 +02:00
Azri Kahar
895ef06541 Fix Save and Stay to refresh revisions detail for roles and webhooks (#17891)
* refresh revisions detail in roles page

* refresh revisions detail in webhooks page
2023-03-27 09:25:16 -04:00
Nitwel
02ed12d592 fix collection name on deselect in m2a relation (#17958) 2023-03-27 09:24:10 -04:00
Rijk van Zanten
13a720bb63 Make final docker image lighter (#17933)
* Make final docker image lighter

* Revert max-old-space-size change
2023-03-24 19:38:43 -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
9f9abfa0a0 Use two layers for corepack & fetch 2023-03-24 15:08:58 -04:00
Rijk van Zanten
1d018dd15e Delete changelog.md
Changelog is duplicated between reviews and this file. The releases are the source of truth for release notes
2023-03-24 11:37:39 -04:00
rijkvanzanten
6b9982eae2 v9.23.4 v9.23.4 2023-03-24 11:34:21 -04:00
Rijk van Zanten
495b57f00b Fix npm usage in Docker image (#17923)
* Hacky nonesense

* Update Dockerfile

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

* Copy bin file for `directus`

To be able to use `npx directus ...`

* Add chown for node on files

* Simplify folder / ownership commands

* Enable pnpm

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-03-24 11:33:07 -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
27706f7067 Fix volume names (#17921) 2023-03-24 09:42:12 -04: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 v9.23.3 2023-03-23 14:11:49 -04:00
Pascal Jufer
5d6468b477 Fix publishing of packages to NPM in release workflow (#17900)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-03-23 14:02:55 -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
Rijk van Zanten
59f965cc8d Update release.yml v9.23.2 2023-03-23 13:40:26 -04:00
rijkvanzanten
74508c70b8 v9.23.2 2023-03-23 13:35:11 -04:00
Rijk van Zanten
f6e992a49d New Crowdin updates (#17652)
* New translations en-US.yaml (Swedish)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Danish)

* New translations en-US.yaml (Nepali)

* New translations en-US.yaml (Nepali)

* New translations en-US.yaml (Nepali)

* New translations en-US.yaml (Chinese Simplified)

* New translations en-US.yaml (Chinese Simplified)

* New translations en-US.yaml (Chinese Simplified)

* New translations en-US.yaml (Indonesian)

* New translations en-US.yaml (Indonesian)

* New translations en-US.yaml (Indonesian)

* New translations en-US.yaml (Dutch)

* New translations en-US.yaml (Dutch)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Dutch)

* New translations en-US.yaml (Esperanto)

* New translations en-US.yaml (Thai)

* New translations en-US.yaml (English, United Kingdom)

* New translations en-US.yaml (Thai)

* Update source file en-US.yaml

* New translations en-US.yaml (French, Canada)

* New translations en-US.yaml (Nepali)

* New translations en-US.yaml (Chinese Simplified)

* New translations en-US.yaml (English, United Kingdom)

* New translations en-US.yaml (Ukrainian)

* New translations en-US.yaml (Romanian)

* New translations en-US.yaml (French)

* New translations en-US.yaml (Spanish)

* New translations en-US.yaml (Bulgarian)

* New translations en-US.yaml (Czech)

* New translations en-US.yaml (Danish)

* New translations en-US.yaml (German)

* New translations en-US.yaml (Finnish)

* New translations en-US.yaml (Hungarian)

* New translations en-US.yaml (Italian)

* New translations en-US.yaml (Polish)

* New translations en-US.yaml (Russian)

* New translations en-US.yaml (Slovak)

* New translations en-US.yaml (Swedish)

* New translations en-US.yaml (Turkish)

* New translations en-US.yaml (Chinese Traditional)

* New translations en-US.yaml (Portuguese, Brazilian)

* New translations en-US.yaml (Spanish, Chile)

* New translations en-US.yaml (Spanish, Mexico)

* New translations en-US.yaml (Croatian)

* New translations en-US.yaml (Estonian)

* New translations en-US.yaml (English, Canada)

* New translations en-US.yaml (Faroese)

* New translations en-US.yaml (Bosnian)

* New translations en-US.yaml (Sorani (Kurdish))

* New translations en-US.yaml (Spanish, Latin America)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (French, Canada)

* New translations en-US.yaml (Esperanto)

* New translations en-US.yaml (Nepali)

* New translations en-US.yaml (Chinese Simplified)

* New translations en-US.yaml (English, United Kingdom)

* New translations en-US.yaml (Ukrainian)

* New translations en-US.yaml (French)

* New translations en-US.yaml (Spanish)

* New translations en-US.yaml (Arabic)

* New translations en-US.yaml (Bulgarian)

* New translations en-US.yaml (Danish)

* New translations en-US.yaml (German)

* New translations en-US.yaml (Hungarian)

* New translations en-US.yaml (Italian)

* New translations en-US.yaml (Polish)

* New translations en-US.yaml (Slovak)

* New translations en-US.yaml (Turkish)

* New translations en-US.yaml (Chinese Traditional)

* New translations en-US.yaml (Spanish, Chile)

* New translations en-US.yaml (Spanish, Mexico)

* New translations en-US.yaml (Croatian)

* New translations en-US.yaml (Bosnian)

* New translations en-US.yaml (Spanish, Latin America)

* Update source file en-US.yaml

* New translations en-US.yaml (Esperanto)

* New translations en-US.yaml (Korean)

* New translations en-US.yaml (Greek)

* New translations en-US.yaml (Greek)

* New translations en-US.yaml (Norwegian)
2023-03-23 13:29:17 -04:00
Rijk van Zanten
0d8b3a52c7 Simplify / improve release flow (#17858)
* Remove git-hook

This is already running in GH Actions as well

* Start new Dockerfile

* Remove unused files

* Close, but not quite

* Line break between environment specific commands / operational ones

* Cleanup dockerfile

* Update github release automation

* Update Dockerfile

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

* Update Dockerfile

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

* Improve based on review comments

* Update Dockerfile

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

* Update Dockerfile

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

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-03-23 13:20:14 -04:00
DMehaffy
9fc08c7f38 Remove free plan for cloud from readme (#17896) 2023-03-23 12:12:23 -04:00
Rijk van Zanten
5ea0ecaa2d Update bug_report.yml 2023-03-23 10:13:27 -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