1252 Commits

Author SHA1 Message Date
Rijk van Zanten
c45cd69dd7 v10.8.3 2023-12-21 14:19:08 -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
dependabot[bot]
a310ac1acf Bump openapi3-ts from 4.1.2 to 4.2.0 (#20828)
* Bump openapi3-ts from 4.1.2 to 4.2.0

Bumps [openapi3-ts](https://github.com/metadevpro/openapi3-ts) from 4.1.2 to 4.2.0.
- [Release notes](https://github.com/metadevpro/openapi3-ts/releases)
- [Changelog](https://github.com/metadevpro/openapi3-ts/blob/master/Changelog.md)
- [Commits](https://github.com/metadevpro/openapi3-ts/commits)

---
updated-dependencies:
- dependency-name: openapi3-ts
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add changeset

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-21 00:31:13 +00:00
Pascal Jufer
154776e0ab Update date-fns to 3.0.1 (#20800) 2023-12-20 02:44:46 +01:00
Pascal Jufer
98532788d5 Selective Patch Tuesday 🐸 (#20796) 2023-12-20 00:26:15 +01:00
dependabot[bot]
9549fae231 Bump @types/node from 18.16.12 to 18.19.3 (#20777)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.16.12 to 18.19.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 02:42:45 +01:00
Pascal Jufer
a885ccac01 Update Knex to v3 (#20766) 2023-12-16 02:00:10 +01:00
Pascal Jufer
863f1866c1 Update Vite to v5 (#20764) 2023-12-16 00:02:14 +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
daedalus
4607a80290 add a --no-install option to the extensions-sdk cli to skip dep install (#20752)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-15 14:02:49 +00:00
daedalus
9769c10a2e do not remove custom devDependencies on bundle add (#20750)
Co-authored-by: Pascal Jufer <5363448+paescuj@users.noreply.github.com>
2023-12-15 10:48:16 +01:00
dependabot[bot]
c8a1174182 Bump rate-limiter-flexible from 2.4.1 to 2.4.2 (#20755)
Bumps [rate-limiter-flexible](https://github.com/animir/node-rate-limiter-flexible) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/animir/node-rate-limiter-flexible/releases)
- [Commits](https://github.com/animir/node-rate-limiter-flexible/commits)

---
updated-dependencies:
- dependency-name: rate-limiter-flexible
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 02:56:10 +01:00
dependabot[bot]
70adf49654 Bump @rollup/plugin-json from 6.0.1 to 6.1.0 (#20753)
Bumps [@rollup/plugin-json](https://github.com/rollup/plugins/tree/HEAD/packages/json) from 6.0.1 to 6.1.0.
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/json/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/url-v6.1.0/packages/json)

---
updated-dependencies:
- dependency-name: "@rollup/plugin-json"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 02:44:10 +01:00
daedalus
b872cc0a02 filter with implicit logical operator for a field results in infinite loop (#20736)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-14 02:47:07 +01:00
dependabot[bot]
643b44d82a Bump typescript from 5.3.2 to 5.3.3 (#20742)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.3.2 to 5.3.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.2...v5.3.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-14 02:26:47 +01:00
daedalus
aa9bd02a7a do not re-order package entries on bundle add (#20739)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-14 02:26:13 +01:00
Rijk van Zanten
b0f5baa394 Add @directus/memory package (#20514)
* Add analytics table

* Setup memory package boilerplate

* Bootstrap library

* [WIP] setup serialize/deserialize for data

* Finish compress/serialize utils

* Add get/set for local

* Add increments method

* Add delete + comments

* Add pub/sub methods

* Remove erroneous files

* Add has, setMax

* Restructure to 3 subclasses

* WIP add Redis cache

* Add set-max

* Add cacheMulti

* Add tests for redis cache

* Don't compress small values

* Only decompress values that are compressed

* Add test for arr-to-buf

* Add tests for multi-stage cache

* Add test for create

* Finish redis based messenger bus

* Add redis bus to createBus

* Resolve lock file conflict

* Align dev deps versions

* Format files

* Update packages/memory/package.json

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

* It's okay, ESLint

* Add local rate limiter

* Add redis limiter

* Add simple readme

* Add changeset

* 'key value' -> 'key-value'

* Sort package.json

* Remove leftovers

* Move timer calls to corresponding test

* Add KV asbraction based on previous "cache"

* Update cache to use kv

* Add more specific console logs

* Only define setMax if not exists

* Run formatter

* Use parseJSON util

* Fix typo in class docs

* Install directus/utils

* Default to Map if LRU config isn't set

* Ignore errors thrown in handlers

* Create process-id util

* Use pubsub in multi-stage handler

* WIP Update tests

* Update package lock

* Fix formatting errors

* Fix timestamp in test

* Uno mas

* Fix mock order

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-13 11:29:22 -05:00
Daniel Biegler
b232e18156 Add translatable label to themes and field translations (#20641)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-12-12 14:14:56 +01:00
Pascal Jufer
5e72ea1b08 Patch Tuesday 🐸 (#20714) 2023-12-12 04:36:50 +01:00
Pascal Jufer
50843eca55 Update Vue to 3.3.11 (#20711) 2023-12-11 21:33:50 +01:00
Pascal Jufer
1a07d7355d Update TypeScript to 5.3.3 (#20710) 2023-12-11 20:39:34 +01:00
Pascal Jufer
81c9156508 Update Vitest to v1 (#20694) 2023-12-10 19:49:45 +01:00
Pascal Jufer
0587948d18 Replace got in update-check to prevent CLI crash (#20693) 2023-12-10 14:45:51 +01:00
dependabot[bot]
76b7b85303 Bump @rollup/plugin-node-resolve from 15.0.2 to 15.2.3 (#20680)
Bumps [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/HEAD/packages/node-resolve) from 15.0.2 to 15.2.3.
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/node-resolve/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/node-resolve-v15.2.3/packages/node-resolve)

---
updated-dependencies:
- dependency-name: "@rollup/plugin-node-resolve"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-08 13:11:03 +01:00
dependabot[bot]
ae31ef8ac7 Bump @types/express from 4.17.17 to 4.17.21 (#20667)
Bumps [@types/express](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express) from 4.17.17 to 4.17.21.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/express)

---
updated-dependencies:
- dependency-name: "@types/express"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-12-07 13:27:57 +01:00
Pascal Jufer
f39e40dfd1 Add missing translation strings, type & icon for theme extensions (#20644) 2023-12-06 18:47:00 +01:00
Nicola Krumschmidt
e57312a2f2 Add select node to abstract SQL that combines primitive and fn (#20654) 2023-12-06 17:29:00 +01:00
Nicola Krumschmidt
4f2a90c345 Split up abstract sql in root and sub query (#20638)
* Split up abstract sql in root and sub query

* Finish new root/sub query abstract sql mechanism

Co-authored-by: Jan Arends <jaads@users.noreply.github.com>

* playground

* Fix getMappedQueriesStream by closing controller

Co-authored-by: Jan Arends <jaads@users.noreply.github.com>

* Add double nested o2m example to playground

* adopted test to create o2m sub queries

* adopted more tests

* more test fixes

* removed playground again

* Fix tests

Co-authored-by: Jan Arends <jaads@users.noreply.github.com>

* Remove orm dir and move contents to utils

* Add tests for mapResult

* Remove orm export

---------

Co-authored-by: Jan Arends <jaads@users.noreply.github.com>
Co-authored-by: Jan Arends <jan.arends@mailbox.org>
2023-12-06 15:07:11 +00:00
Jan Arends
08bbe27794 Durus: nested type refactoring (#20553)
* initial thoughts

* optional meta data for a2o with json

* added test

* some docs

* Adjust abstract query to support single column any relations

* fix build

* added relational any option to nested one

* applied type refactoring in converter

* improved a2o relation definition

* no pk column name in any json column

* added place for a2o sub query generator

* docs on type

* deleted test

Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>

* docs

* reverted preps

* renamed meta to nesting

* removed reverted prep

* removed unnecessary check

* docs

* renamed meta

Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>

---------

Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
2023-12-04 18:18:55 +00:00
Pascal Jufer
0d5564312f Update Vue to 3.3.9 (#20588)
* Update Vue to 3.3.9, update related deps

* Fix & enhance v-menu test

* Add changeset

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-11-30 09:36:38 -05:00
Pascal Jufer
d30bb69490 Clean-up deps (#20581) 2023-11-30 00:46:09 +01:00
Rijk van Zanten
07acd0aa53 Export defineTheme from extensions-sdk package (#20580) 2023-11-29 21:56:07 +01:00
Pascal Jufer
a5215d674b Update TypeScript to 5.3.2 (#20571) 2023-11-29 13:54:56 +01:00
Rijk van Zanten
afc4b23fc7 v10.8.2 2023-11-22 15:23:38 -05:00
Pascal Jufer
ba7fac402e Update Prettier v3.1.0 (#20481) 2023-11-20 16:23:22 +01:00
Pascal Jufer
454ecdbefe Update Vitest to v0.34.6 (#20477) 2023-11-20 13:04:56 +01:00
Nicola Krumschmidt
d9bd5adeb1 Refactor the file structure in data-sql (#20433)
* Refactor data-sql types file structure

* used types dir directly

* target conversion outside of conditions, file for filter conversion result

* type import only via index file

* removed unused index files

* Refactor data-sql types file structure

* used types dir directly

* target conversion outside of conditions, file for filter conversion result

* type import only via index file

* removed unused index files

* fixed tests

* rename

---------

Co-authored-by: Jan Arends <jan.arends@mailbox.org>
2023-11-17 20:41:25 +01:00
Azri Kahar
985cef5eb5 Fix typo for user last_access field in OAS (#20465) 2023-11-17 18:49:36 +01:00
Pascal Jufer
be4410f948 v10.8.1 (#20463) 2023-11-17 17:38:16 +01:00
Pascal Jufer
c6f47f90b2 More accurate OAS based on authenticated user (#20462) 2023-11-17 17:24:18 +01:00
Pascal Jufer
9b443f881d Theme fixes (#20455)
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2023-11-17 14:47:19 +01:00
Rijk van Zanten
7f5d690c4e v10.8.0 2023-11-16 16:59:46 -05: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
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
Jan Arends
a920cd3978 Durus: Modifiers on o2m (#20411)
* docs

* added todo test

* refactoring

* refactoring

* convert filter

* conversion of all modifiers

* added more modifiers to test

* fixed tests

* test for various things

* Fix joins in nested many generation

---------

Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
2023-11-16 10:01:23 +01:00
Nicola Krumschmidt
d5861365e9 Make modifiers and aliases on abstract queries required (#20393)
* Make modifiers on abstract queries required

Since the properties on the modifiers object are already optional, we can explicitly require the modifiers property

* Require at least one element if sort modifier is present

* Make aliases on abstract queries required

* Remove alias from abstract sql

* Always use aliases when generating alias mapping
2023-11-15 12:02:32 +01:00
Rijk van Zanten
5f899012c7 Make themes an extension type (#20423)
* 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

* Don't require all rules in TS

* Rename theme files

* Add template for theme

* Import directly from util to prevent circular

* Register custom themes on app load

* Ignore stylesheet files

* Ignore svg as well

* Add changeset

* Update test snapshots

---------

Co-authored-by: Ben Haynes <ben@rngr.org>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-11-14 13:58:01 -05: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
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
Azri Kahar
fa2f649889 Fix filter parsing for _in/_nin operators with large arrays (#20356)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-11-11 00:28:59 +00:00