Commit Graph

1373 Commits

Author SHA1 Message Date
Brandon Zylstra
6db5578332 minor grammar fix in data-model.md (#22875)
* minor grammar fix in data-model.md

There was an errant word that I removed.

* Update contributors.yml
2024-07-02 13:07:03 -04:00
Brainslug
3cc349982f TUS changeset (#22901)
* changeset

* updated changeset

* updated docs

* more prettier

* dictionary
2024-07-02 17:23:20 +02:00
Brainslug
266e043c0e Add support for the TUS protocol (#22673)
* WIP initial TUS tests

* WIP further tus integration

* WIP authenticate uploads

* boilerplate stuff

* Migrated handlers

* resolving type errors

* tackle some build errors

* WIP moving resumable uploads to its own package

* added migration and integrated local file storage into directus files

* cleaned up local store

* cleaned up failed experiments

* prettier

* Add tus_data and tus_id to system data

* Improve file upload progress estimation for multiple files

* bypass creating a revision per uploaded chunk

* fixed accidental commit

* Fix pause/resume for multiple uploads

* Null coalesce all the way

* Added directus locking logic

* prettier

* Small tweak (added resume uploads dialog)

* authentication

* Add remove to resumable uploads

* added delete endpoint and cleaned old service setup

* WIP s3 storage adapter

* Less breaking of interfaces, more breaking of text

* Moved local adapter to its own package

* Prettying some things up

* Sort resumable uploads by creation time

* Fix resumable uploads dialog popping up on second file upload

* Move buttons around & properly handle error

* s3

* A few changes

- Make S3 driver work more reliable
- Move common logic to tus driver class
- Respect `folder` when uploading from a different folder
- Implement cleanup for both local and S3

* synced dependencies

* accept presets

* Remove extra code for folder, as this is handled in presets now

* Rename migration to most recent date

* updated lcokfile

* prettier

* dont fully rely on the sudo service

* removed unused import

* Hide partial file uploads from the API

* satisfy linter

* Refactor tus into storage driver

* Fix merge conflicts

* Update pnpm-lock

* Fix typing issue

* nuked tus driver packages

* updated environment vars

* prettier

* Change type import style

* Fix S3 cleanup

* Use `modified_on` instead of tus creation date

* Pass chunk size to storage drivers

* Add sudo service to scheduled job

* Make cleanup work even if no upload was done before

* Remove "Resume Uploads" interface

* Update packages/env/src/constants/defaults.ts

Co-authored-by: ian <licitdev@gmail.com>

* Add config docs

* Add resumable to dictionary

* moved chunk filter to service

* simplify middleware

* use lodash

* Update api/src/services/tus/data-store.ts

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

* move to devDeps

* package lock

* fixed import

* updated test mocking

* Create a new TUS server handler for every request instead of one global one

* Allow for tree-shaking tus-client

* Rename resumable-uploads.ts to tus.ts

* Extract meta data from uploaded file

* Only consider full parts or the final part for bytesUploaded in S3

* Add additional sanity check to S3 driver

* Remove pause/resume functionality

* fixed file replacement

* Remove unused expose

* Reintroduce defineExpose and expose abort

* Broken file replace

* fixed replacement

* prettier

* added filesize in replace

* update metadata extraction

* Remove unused import

* updated package-lock

* extra validation check

* oops

---------

Co-authored-by: Hannes Küttner <kuettner.hannes@gmail.com>
Co-authored-by: Hannes Küttner <4376726+hanneskuettner@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2024-07-02 17:00:59 +02:00
Mohammad Quadri
61466e722e Fix code in "Create A Radio Selector With Icons, SVG, or Images" guide (#22892) 2024-07-02 08:52:38 +02:00
PoHsun611
6a4413c7bd Docs: Fix code issue in Interactive Panel Guide (#22864)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-06-28 11:38:08 +02:00
Rijk van Zanten
d6ce1d88f4 Update note on review process (#22853) 2024-06-26 08:50:36 -04:00
dependabot[bot]
c191be8a85 Bump typedoc-plugin-zod from 1.1.2 to 1.2.0 (#22838)
Bumps [typedoc-plugin-zod](https://github.com/Gerrit0/typedoc-plugin-zod) from 1.1.2 to 1.2.0.
- [Commits](https://github.com/Gerrit0/typedoc-plugin-zod/compare/v1.1.2...v1.2.0)

---
updated-dependencies:
- dependency-name: typedoc-plugin-zod
  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>
2024-06-25 09:29:54 +02:00
Mohammad Quadri
d0b8205990 Fix user register endpoint in documentation (#22832) 2024-06-24 08:29:57 +02:00
Rijk van Zanten
8f0729b5e1 Update data-model.md
Fixes #22821
2024-06-22 13:53:59 -04:00
dependabot[bot]
2c6ae52afc Bump eslint-plugin-react from 7.34.2 to 7.34.3 (#22810)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.34.2 to 7.34.3.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.34.2...v7.34.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  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>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-06-21 04:01:48 +00:00
Pascal Jufer
4510a1742f Add breaking change notice for service integrity change (#22786)
* Add breaking change notice for service integrity change

* Update docs/releases/breaking-changes.md

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2024-06-18 14:10:03 -04:00
ian
9bde775527 Include admin users under the app access limit (#22760)
* Include admin users under the app access limit

* Update test

* Add changeset

* Update docs

* Update polite-elephants-juggle.md

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2024-06-14 09:59:49 -04:00
sharkfabri
9e91405677 Fix email templates path in docs (#22713)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-06-11 10:22:47 +02:00
dependabot[bot]
96f36fca65 Bump eslint-plugin-react from 7.34.1 to 7.34.2 (#22658)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.34.1 to 7.34.2.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.34.1...v7.34.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  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>
2024-06-05 02:38:25 +02:00
ian
f5dcd85082 Add user limits (#22479)
* Limit users

* Add defaults

* Allow specifying of reason for limit exceeded error

* Update config options doc

* Make existing tests pass

* Update extensions limit error

* Update usage of regular expression

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>

* Rename typo

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>

* Rename files

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>

* Use first() and remove redundant +=

* Fix incorrect api access count

* Rework to account for passing of unchanged access values

* Fix increased counts in updateMany

* Consistent error message

* Simplify unnecessary find

* Add tests

* Rename UserCount to AccessTypeCount

* renamed env var

* prettier

* Add changeset

* fix limit checking for batch and status updates

* test and prettier

* removed obsolete check

* updated error

* fixed error usage in extenions service

* Use randomUUID from '@directus/random'

* Fix payload check in updateMany

* implemented RolesService.updateBatch from its parent

* resolved unit test error

* updated type

* fixed existing role query

* Temporary activation of blackbox tests

* Move to separate fn, to make skippable for non-existent role

* Revert "Temporary activation of blackbox tests"

This reverts commit 4c4ac846d6.

* Revert "Move to separate fn, to make skippable for non-existent role"

This reverts commit 1d90a82e39.

* Add user limits - extension (#22642)

* adressing existing users issue

* migrated changes from pascal

* only check the role for active users

* only count active users

* updated incorrect if

* default to count zero

* Undid abstraction to separate function

* fixed updating through user counting error

* prettier

* simplified fallback query

* prettier

* Added try catch to be safee

* updated db mocking for tests

* removed extra check to satisfy implementation tests

---------

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-06-04 17:00:17 +02:00
Brainslug
543b345695 Merge pull request from GHSA-7hmh-pfrp-vcx4
* Add gql parser limit

* Add changeset

* Format docs

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-06-04 15:46:50 +02:00
dependabot[bot]
42dd6fad57 Bump @pnpm/find-workspace-dir from 7.0.0 to 7.0.1 (#22637)
Bumps [@pnpm/find-workspace-dir](https://github.com/pnpm/pnpm) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/pnpm/pnpm/releases)
- [Commits](https://github.com/pnpm/pnpm/compare/v7.0.0...v7.0.1)

---
updated-dependencies:
- dependency-name: "@pnpm/find-workspace-dir"
  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>
2024-06-03 10:15:34 +02:00
Alejandro Cortell Marín
c282141e11 Include import use-directus-token and component navigation (#22633)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-06-02 14:32:03 +00:00
Brainslug
c401a4ea99 Implemented random string command in the SDK (#22604)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-05-29 18:25:39 +00:00
Kevin Lewis
f070e39d5c Document public registration (#22567)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-05-29 10:30:45 +00:00
Daniel Biegler
78db52949c Add support for custom URLs for email verification (#22565)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-05-28 15:30:41 +00:00
Brainslug
9335664aa8 Session token "safety window" when refreshing (#22503)
Co-authored-by: Hannes Küttner <4376726+hanneskuettner@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-05-21 11:50:00 +00:00
Oleksii Bondarenko
d0593f27c5 Fix error message in Hook Twilio guide (#22463)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-05-13 10:46:54 +02:00
Sharkfin
7e7dc85fae add templates directory as volume in docker compose file (#22475)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-05-12 21:14:51 +00:00
Pawan Sharma
a049d75e2b Update glossary docs: Fix item description (#22471)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-05-12 14:21:58 +02:00
Oleksii Bondarenko
b76a6e8fbd Add missing mailService in Stripe Hook extension guide (#22450)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-05-09 23:53:24 +00:00
Brainslug
ffdbb04ccb Added session token note to sso docs. (#22431)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Hannes Küttner <4376726+hanneskuettner@users.noreply.github.com>
2024-05-08 12:41:19 +00:00
Daniel Biegler
438b423171 Add maildev container for debugging emails (#22425)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-05-08 08:31:56 +00:00
Daniel Biegler
c893b9fa65 Add public registration (#22125)
* WIP: add new register dummy-route

* fix notice on register route

* WIP register form

* WIP: registering ui and controller for testing

* fix lint ordering problem

* wip: users service

* add migration, initial style for fields in settings

* redo how emails will be filtered

* WIP add filter in the register handler

* conditionally render register link depending on settings

* WIP: add email validation

* wip add email sending

* make clicking the email link work

* rm console log

* update controller

* dont send emails for existing emails

* add translation

* only show register link when unauthenticated

* add different redirects

* only allow selecting non-admin roles

* redirect to users page

* update translation

* move logic from controller to usersservice

* rm remnant of logic from controller

* add stall time to registration

* update translation

* rm comments

* rm unused var

* add changeset

* update translation for success

* remove sso related stuff from registration

* also allow setting first and last name

* update error check

* add @directus/errors to app

* replace error strings with enum

* rename to public_registration

* rename to public_registration_verify_email

* add notes to fields

* add types package to changeset

* dont stall if no work is being done

* allow null-role and resending of reg. email

* add public registration env vars, rm RATE_LIMITER_GLOBAL_STORE

RATE_LIMITER_GLOBAL_STORE wasnt being used. Lets just stick to RATE_LIMITER_STORE for all rate limiters. TODO: also remove from docs!

* use ratelimiter for registration, use stall time env var

* add registration limiter docs, rm global store variable from docs

* update changeset

* add ignore-notice

Co-authored-by: Hannes Küttner <4376726+hanneskuettner@users.noreply.github.com>

* use and document new `EMAIL_VERIFICATION_TOKEN_TTL`, also doc `REGISTER_STALL_TIME`

* change variable name

Co-authored-by: ian <licitdev@gmail.com>

* apply variable rename to usage

* change backticks to single quote

Co-authored-by: ian <licitdev@gmail.com>

* inline variables

* add fields to server info, update types

- The other ratelimiters also expose points and duration, done
- Add `public_registration_verify_email` so that we can render different success messages

* tiny wording tweak of registration mail

* add new user status 'unverified' and check for it

* add unverified status translation

* decouple email verification and validation

* enable register rate limiter by default and up its config

* add autocomplete=new-password on the registration form

* added sdk functions

* add gql query for new fields

* added register api reference

* updated verify sdk function name

* added reference block for email verify endpoint

* updated reference examples

* WIP: add gql resolvers

* add ratelimiter to mutation

* remove ratelimiter registration point+duration info

* rm points and duration from gql

* Update docs/reference/system/users.md

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

---------

Co-authored-by: Hannes Küttner <4376726+hanneskuettner@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-05-07 23:20:24 +02:00
dependabot[bot]
9ae3f175ab Bump vue from 3.4.26 to 3.4.27 (#22406)
Bumps [vue](https://github.com/vuejs/core) from 3.4.26 to 3.4.27.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/compare/v3.4.26...v3.4.27)

---
updated-dependencies:
- dependency-name: vue
  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>
2024-05-07 07:27:38 +02:00
Rijk van Zanten
ec2604f913 Don't require KEY or SECRET to be set on startup (#22320)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-05-06 13:00:10 +00:00
ian
df254cc093 Add falsy fallback condition to search query (#22342)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Hannes Küttner <4376726+hanneskuettner@users.noreply.github.com>
2024-04-30 11:02:57 +02:00
Pascal Jufer
160b982928 Patch Tuesday 🐸 (#22063)
Co-authored-by: Hannes Küttner <4376726+hanneskuettner@users.noreply.github.com>
2024-04-30 10:49:20 +02:00
Hannes Küttner
31d73c6fa7 [Docs] Prevent icon translation in components and markdown sources (#22313)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-04-25 12:54:47 +00:00
Alex van der Valk
57a39d54f1 docs - add cache auto purge to compose (#22305)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-04-24 09:45:23 +00:00
Brainslug
f4c4457c17 updated credentials (#22257) 2024-04-19 14:06:40 +02:00
Alex van der Valk
5398180c03 add warning in webhooks docs page (#22242) 2024-04-18 15:08:27 +02:00
José Varela
476a2482ad Api: Clear system cache only if specified on /utils/cache/clear (#22234)
* Clear system cache only if specified

* Add changeset

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2024-04-17 17:07:10 -04:00
José Varela
bf47a19428 API: Prevent endless loop on get-schema (#22230)
* Prevent endless loop on `get-schema`

* Make magic value configurable

* Fix linter warning

* Add changeset

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2024-04-17 15:50:27 -04:00
dependabot[bot]
37b053e174 Bump vue from 3.4.22 to 3.4.23 (#22218)
Bumps [vue](https://github.com/vuejs/core) from 3.4.22 to 3.4.23.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/compare/v3.4.22...v3.4.23)

---
updated-dependencies:
- dependency-name: vue
  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>
2024-04-17 08:09:10 +02:00
dependabot[bot]
509fed7c4d Bump vue from 3.3.8 to 3.4.22 (#22202)
Bumps [vue](https://github.com/vuejs/core) from 3.3.8 to 3.4.22.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/compare/v3.3.8...v3.4.22)

---
updated-dependencies:
- dependency-name: vue
  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>
2024-04-16 09:46:12 +02:00
José Varela
75c03bdd99 Api / Graphql : Allow version as singleton argument on singleton (#22184)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-04-12 10:50:32 +00:00
Bryant Gillespie
4638147591 Update reusable-components.md (#22170) 2024-04-11 13:04:51 +00:00
Nico
b983d1fcf0 Add env variables to configure PM2 log paths + documentation (#22155)
* Add env variables to configure PM2 log paths + documentation

* Sign Contributor License Agreement

* Run prettier fix

* Add changeset

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2024-04-10 11:01:45 -04:00
Kimia Abtahi
80187aef13 Fix wrong trigger type hook to correct event in flows.md (#22141) 2024-04-09 16:31:13 +02:00
ian
cea3ea9bc6 Remove v-image deprecation notice (#22106) 2024-04-05 16:17:45 +02:00
dependabot[bot]
aaaf509188 Bump typedoc from 0.25.10 to 0.25.12 (#22058)
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.25.10 to 0.25.12.
- [Release notes](https://github.com/TypeStrong/TypeDoc/releases)
- [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.25.10...v0.25.12)

---
updated-dependencies:
- dependency-name: typedoc
  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>
2024-04-03 08:16:18 +02:00
ian
91e17f9252 Update Twilio hook guide to use the errors package (#22037)
Co-authored-by: Pascal Jufer <paescuj@users.noreply.github.com>
2024-04-01 14:49:54 +02:00
Aprilia
6e435c6300 Fix code in react real-time chat guide (#22035) 2024-04-01 09:35:26 +02:00
Brainslug
988bc8762e [App] Migrate authentication and refreshing to the SDK (#21938)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2024-03-31 14:28:11 +02:00