Commit Graph

2126 Commits

Author SHA1 Message Date
daedalus
5738589d60 Fix adding a new role on user update (#20913)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-30 00:28:21 +00:00
Pascal Jufer
0d1fd7c77e Remove obsolete temporary theme field permission (#20920) 2023-12-29 11:46:30 +01:00
daedalus
7e6f96f56b Remove admin only restriction for extension read operations (#20914)
* respect users permissions for list/get extensions

* add changeset
2023-12-29 00:22:25 +01:00
daedalus
99ea01aa74 Enable theme overrides permissions to be set on a per role basis (#20899) 2023-12-27 18:58:47 +01:00
Brainslug
60ea729957 Fix invite email error (#20891)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-27 11:33:26 +00:00
Rijk van Zanten
2b9056cc80 Refactor default import logger with useLogger (#20872)
* useLogger

* Rework to useLogger and no globals

* Only export useLogger / createLogger

* Temp remove logger tests

* Refactor logger

* Refactor logger

* Refactor logger

* Refactor logger use

* Fix tests

* Fix logger usage in bootstrap

* Run formatter

* Remove logger tests

Feels drastic, but I'm about to rewrite them into @directus/logger :)

* Fix log operation test
2023-12-26 11:38:38 -05:00
Yasser Lahbibi
7eb22a4f23 feat(ws): register hooks for versioning (#20865)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-26 15:18:09 +00:00
Mahendra Kumar
d24e0f03f0 fix(api): bigInt auto increment not being reset in postgres (#20867)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-26 15:20:43 +01:00
Mahendra Kumar
128a47aff5 fix(graphql):handle nested originalError inside the GraphQLError.originalError in processError method (#20873)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-26 14:32:27 +01:00
Mahendra Kumar
e826f0fb2a fix(api): dont allow setting nullable for primary key while updating a field (#20874)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-26 11:52:21 +00:00
Rijk van Zanten
2c4be084c8 Replace default imports with useEnv (#20863)
* Use useEnv instead of default import

* Don't export default

* Update tests to mock useEnv

* Fix env usages

* Fix test issues

* replace setEnv use

* Fix various tests

* Fix more tests

* Fix more tests

* Fix get-cache-headers tests

* Fix sanitize-query test

* Fix logger tests

* Fix heartbeat tests

* Remove borked integration test

* Fix more tests

* Finish fixing tests
2023-12-24 11:56:06 -05:00
Connor Winston
89e7333a2d Change Schema Snapshot Sort Ordering of Fields/Relations (#20704)
Co-authored-by: Connor <12714889+ConnorSimply@users.noreply.github.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-22 00:03:30 +01:00
daedalus
b32f826aec Fix unique name check for extension locations and extensions within bundles (#20785)
Co-authored-by: Pascal Jufer <5363448+paescuj@users.noreply.github.com>
Co-authored-by: Bryant Gillespie <23302570+bryantgillespie@users.noreply.github.com>
2023-12-21 22:44:05 +01:00
daedalus
ba8bf3a586 Validate custom primary key field on create (#20839)
* ensure custom primaryKey is valid before creating item

* add changeset

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-12-21 15:40:51 -05:00
Rijk van Zanten
c222511f1f Update telemetry (#20825)
* Setup shared redis abstraction

* Install directus/memory

* Add mini useEnv util for test mocking purposes

* Export missing class from directus/memory

* Update readme to include kv

* Uninstall memory

* Setup telemetry lib

* Reduce concurrency

* Finalize reporting

* Add tests for send-report

* Add tests for init

* Add tests for tracker

* Add tests for get-item-count

* Add test for wait time

* Add test for get-user-count

* Add test for get-user-item-count

* Fix type issue

* Throw error on non-ok fetch

* Init telemetry on server startup

* Tweak submission logic

* Fix tests, submit version

* Update config-options reference

* Cool kids don't use + in large numbers

* Add changesets

* Update docs/self-hosted/config-options.md

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

* Use vi stubGlobal

* Update api/src/env.ts

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

* Unstub as well

* Mock telemetry start in app test

* Update api/src/telemetry/types/report.ts

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

* Fix default value in env

* Use toBoolean for env var casting

* Don't rely on knex as

Apparently it doesn't work reliably with count()

* Update api/src/telemetry/lib/init-telemetry.ts

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

* Use getDatabaseClient for consistent clients

* Rename ingress->url

* Send my apologies to the formatting bot

* Fix version

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2023-12-21 14:08:42 -05:00
Rijk van Zanten
545d392e93 Deprecate utils/package.js in favor of directus/version (#20840)
* Deprecate utils/package.js in favor of directus/version

* Add changeset

* Drop version console log

* Make info reactive

* Fix import order

* Update directus/version.js

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

* Fix tests

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-21 13:53:22 -05:00
Brainslug
a8ef790ea2 Merge pull request from GHSA-qw9g-7549-7wg5
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-12-20 18:32:35 -05:00
Brainslug
c3211fcab6 added version to the API 2023-12-20 17:57:43 -05:00
Pascal Jufer
0534cc9407 Fix & enhance 'schema apply' output (#20816) 2023-12-20 16:21:36 +01:00
Nassan Paul
dc997d2dfc fix(#19386): fix cli schema apply display colors (#20792)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-20 14:50:31 +01:00
Azri Kahar
a706292c55 Enable no-constant-binary-expression eslint rule (#20812)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-20 13:24:02 +00:00
Pascal Jufer
98532788d5 Selective Patch Tuesday 🐸 (#20796) 2023-12-20 00:26:15 +01:00
Brainslug
b576c6e5e0 Fixes enabling/disabling extensions (#20677)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-15 17:41:16 +00:00
Wasim Thoufiq
12643385db Fix BigInt primary key routing (#20744)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-14 17:13:47 +00:00
daedalus
f2728506d2 public_favicon should be a system relation (#20724) 2023-12-12 21:12:48 +01:00
Pascal Jufer
5e72ea1b08 Patch Tuesday 🐸 (#20714) 2023-12-12 04:36:50 +01:00
Pascal Jufer
36c08e2265 Remove flaky api storage test (#20701) 2023-12-11 16:13:37 +01:00
Pascal Jufer
81c9156508 Update Vitest to v1 (#20694) 2023-12-10 19:49:45 +01:00
Brainslug
6671f1c603 GraphQL Content Versions (#20499)
* WIP alternative gql approach for versions

* incorrect schema type

* finally got something working

* ran prettier

* prettier

* prettier

* limited _by_version to items scope

* removed debug comments and logs

* fixed singleton versions

* updated docs

* Added breaking change notice

* undid unneed change

* prettier

* Create six-trees-cry.md

* Update api/src/services/graphql/index.ts

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

---------

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2023-12-07 21:35:27 +08:00
Pascal Jufer
a5215d674b Update TypeScript to 5.3.2 (#20571) 2023-11-29 13:54:56 +01:00
Brainslug
abf0cba75d Fixed GraphQL SDL Error (#20535)
* Fixed missing accountability

* Add changeset

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-11-27 10:23:05 -05:00
Azri Kahar
a11fb2b59d Allow configuration to prevent server startup when an extension fails to load (#20495)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-11-23 16:37:57 +00:00
Brainslug
e05d9240de GQL directus_permissions ID nullable (#20511) 2023-11-23 14:18:19 +01:00
Azri Kahar
2ed5ac0871 Fix full permissions & minimal app permissions (#20505)
* revert #8391

* revert #20347

* revert #20347

* undo revert of validation and presets null logic

* add changeset
2023-11-22 14:56:29 -05:00
Pascal Jufer
ba7fac402e Update Prettier v3.1.0 (#20481) 2023-11-20 16:23:22 +01:00
Azri Kahar
091d1a6ade fix default values for system-theme-overrides (#20464) 2023-11-17 23:53:13 +01:00
Pascal Jufer
c6f47f90b2 More accurate OAS based on authenticated user (#20462) 2023-11-17 17:24:18 +01:00
Pascal Jufer
6953ad46ad Fallback to hostname for OAS URL if no PUBLIC_URL specified (#20460)
* Fallback to hostname for OAS URL if no PUBLIC_URL specified

* Add changeset

* Clearer variable name
2023-11-17 16:49:38 +01:00
Brainslug
90422c30d8 OAS based on permissions (#20386) 2023-11-17 00:15:40 +01:00
Rijk van Zanten
8d8b649a1f Theming various (#20426)
* Update the minimal theme

* Remove unused files

* Remove unused default dark theme

* Fix type error

* Fix the order of themes in the picker interface

* Fix account/sign-out not using module foreground color

* Fix module bar interface styling

* Update system match label

* Use half width for default appearance

* Fix preview changed based on appearance

* Add includeNull option to theme selector interface

* Add minimal theme extension docs

* Attempt to make typedoc play nice

* Remove module bar color override

* Add snippet on overrides interface

* Deprecate "normal" style v-notice

* System filter interface background

* Add menu scope

* Use colors consistent with interface previews

* Remove card-face-color usage

* Use consistent hover style in collections & fields

* Deprecate card-face-color

* Remove old --card vars

* Fix revisions divider styling

* Remove duplicate background from overview header

* Fix permissions overview corner overlap

* Make form input height configurable

* Allow overriding public form input height

* Rename text string

* updated data model icon

* Standardize form settings between scopes

* Allow overriding sidebar forms

* Add configurable form gap

* Add configurable input-padding

* Fix list-item padding

* Fix padding in block style

* Add links to defaults

* Apply color match updates

* Default to database icon

* Fix schaling of theme selector interface

* Fix font loading

* Fetch font weights from Google as well

* Use display weight in titles

* Fix color match display font

* Clean up font weights for labels

* Update test to remove normal state

* Remove typo

* Add lowercase dev

* Add changeset

* Remove font-weight

---------

Co-authored-by: Ben Haynes <ben@rngr.org>
2023-11-16 15:36:54 -05:00
daedalus
fdb2e42b29 Add ability to ignore specific paths from the HTTP logger (#20368)
* add changeset

* Add the ability to ignore specific paths from HTTP logger

* fix linting

* Cast env, clean-up, add test

* Use dedicated env config name

* Add docs

* Clean-up

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-11-16 15:31:42 -05:00
Aiden Foxx
a011095aeb [OpenID/OAuth2] Only update user information if payload not empty (#20451) 2023-11-16 19:52:22 +00:00
Pascal Jufer
23c286d9c1 Fail instance on error during extensions syncing (#20450) 2023-11-16 11:19:19 -05:00
Alex Gaillard
3b8d8521bd Update Email Templates to new White Label Style (#20390)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-11-16 14:56:36 +00:00
Rijk van Zanten
7df84c0a89 Add support for EXTENSIONS_LOCATION setting (#20207)
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-11-16 13:29:03 +00:00
Rijk van Zanten
4396ee5166 Add theme-selector (#20413)
* Enable theme fields

* Start adding more default themes

* WIP add theme selector interface

* Restructure, add rules-to-vars util

* Render used vars in local overrides

* Use local theme vars in theme preview

* Render theme option full-width

* Add more test colors

* Only override used variables

* Fix rendering bugs in preview

* Remove test theme

* Add small border to preview

* Add organic theme

* Add changeset

* Don't crash color interface on complex input bg

* Use themable color for disabled input

* Use nav-sidebar theme in v-drawer

* Use border width from the theme in panels

* Use theme border width for panel borders

* Use page background for panel edit buttons

* Fix Active state forselected panel

* Don't use primary for logout hover state

* Fix background color of item duplication fields

* Use form border/background in v-list block

* Use theme border width in hardcoded 2px sections

* fix chip padding

* Rename background-page to background,

rename background to background-normal

* Fix search input styling

* Tweak search input themability

* update icons

* Add border on sidebar section content

* Add color match, start on minimal

* Organize import

* Adjust spacing

* Ignore stylesheet files

* Ignore svg as well

---------

Co-authored-by: Ben Haynes <ben@rngr.org>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-11-14 13:43:43 -05:00
Pascal Jufer
b9532cabe3 App TS fixes (#20421) 2023-11-14 16:42:35 +01:00
Connor
5300443b46 Fix File Limit Erroring Logic and DB Merge Logic (#20392)
* Add Extended Busboy Type

* Change Types and Remove Limit Erroring from Controller

* Change File Upload Logic

* Fix Typescript HELL

* Create perfect-oranges-hear.md

* Update api/src/services/files.ts

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

* Update api/src/services/files.ts

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

* Update api/src/services/files.ts

Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com>

* Change copy to move

* Fix TS

* Fix naming of BusboyFileStream type and Erroring

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com>
2023-11-13 17:59:42 -05:00
Pascal Jufer
976ebf1330 Refactor env mocking (#20384) 2023-11-10 16:32:35 +01:00
Brainslug
fd6eff4a5a Show package version if available (#20303)
* Show package version if available

* Create nice-bottles-flow.md

* Colorize state chip

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-11-08 15:55:43 -05:00