* Implement logs websocket
* Update docs
* Remove commented test code
* fixed controller shared logic
* fixed controller type
* Added shutdown callback
* Expose allowed log levels
* Use a different event
* Add log level filtering
* Return log_level when subscribed
* Remove unused import
* Limit logs websocket to `strict` auth mode (#23023)
* simplify logging handler
* enforce strict mode
* Update logs handler
* Update docs
---------
Co-authored-by: ian <licitdev@gmail.com>
* Add unique nodeId as uid
* Create logStream only when required
* Add admin requirement check
* Extract isValidLogLevel as util
* Remove authentication and path from server info
* Remove hostname and pid from logs if not raw
* Fix nodeId implementation
* Support custom log levels
* Fix build
* Fix test
* Remove unused constants and util
* Display websocket logs details in server info for admins only
* Expose log level value in server info
* Stream raw logs to websocket
* Retain hostname and pid field in raw logs
* Add separate env var for logs streaming
* Reset attempts after reconnection failure
* Remove obsolete accountability refreshing
* Run handler only when enabled
* Add changeset
* Allow wss protocol
* Rename to logs-stream
* Add unit tests
* Add explicit check for the remaining client
* Updated json stringification in log-streaming
* prettier
---------
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
* Docs: Unify Project/project capitalalization in Introduction
Stumbled over the capitalized "Project" when reading though the Introduction, so quickly unified document to use lower case "project" in all places that do not refer to the "Project" concepts of Directus or Directus Cloud specifically.
* sign CLA
* API: Compute schema once and share among other nodes
From #23328
* Compute schema once and share among other nodes
* Add compress/decompress
* Remove weirdness
* Make timeout configurable
* Remove compression/decompression
This was putting back the issues again.
I guess it's because the transformation to async
It seems useBus is already doing compression
So I believe there's no need for double compression.
* Add changeset
---------
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* Fix formatting issue
---------
Co-authored-by: José Varela <varela@directus.io>
* feat(api): add index support
Co-Authored-By: Mahendra Kumar <22556323+mahendraHegde@users.noreply.github.com>
* fix(primary key): do not all mutating unique or index
* feat(app): add index selection
* refactor `dopIndex` to use array entry
* add docs
* add changeset
* add missing properties from field object spec
* simplify index checks
* formatting
* fix mssql index query
* fix additional fields being returned in schema
* fix oracle indexing
* only set nullable/not nullable if specifically requested
* Update app/src/lang/translations/en-US.yaml
Co-authored-by: Hannes Küttner <kuettner.hannes@gmail.com>
* Revert "only set nullable/not nullable if specifically requested"
This reverts commit 4726dbb8cf.
* make changeset more explicit
---------
Co-authored-by: Mahendra Kumar <22556323+mahendraHegde@users.noreply.github.com>
Co-authored-by: Daniel Biegler <DanielBiegler@users.noreply.github.com>
Co-authored-by: Hannes Küttner <kuettner.hannes@gmail.com>
* Tip to the "Creating Extensions" section
Adds tip about automatic reloading extensions using the EXTENSIONS_AUTO_RELOAD environment variable.
fixes: #23382
* signed the CLA
* Contribution name in docs
* Added cloud callout in sidebar
* Linter got mad for one newline, I will obey the linter.
---------
Co-authored-by: Bryant Gillespie <bryant@hireclockwork.com>
* Allow cast file or default to string
* adopted test
* do not default to string
* added test
* combined tests for reading config from a file
* better function name
* adopted file name
* reference fixes
* another reference fix
* fixed references for mocks
* additional test for type casting of default configs
* replaced equal check with toHaveBeenCalled
* new test file with fewer mocks
* a word regarding this in the docs
* enhanced new test
* test casting to string although string contains comma
* formatting in docs
* tiny tweak regarding readability
* changeset
* added another default type for config variable
* final comments
---------
Co-authored-by: Jan Arends <jan.arends@mailbox.org>
* Update server.ts | Issue 23142
Fix Problem on server.ts to only accept integer Values as port. Some hosters require the port to be a string forwarding to a specific file as socket.
* Update contributors.yml
* Update server.ts
* Update server.ts
* Add changset
* Resolve formatting error
* move unix socket to separate variable
* add docs
* update changeset
* do not add protocol to address
* add correct casing for `Unix`
* do not add protocol prefix if listening on socket
* add missing package bumps to changes
* Update server.ts
Changed listenOptions initialization
* formatting
* remove port override note
* update doc wording to be inline with host and add ignore
* add tests
---------
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com>
* Update date fields on directus_files
* Add changeset
* Use knex update instead of raw
---------
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* updated relational fields to use the complete schema
* prettier
* Create few-horses-join.md
* Revert "updated relational fields to use the complete schema"
This reverts commit ac839c0ec8.
* Added type test for the core collection fallback
* fixed core collection fallback
* QoL set default schema for core collections
* prettier
* removed docs reference
---------
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* 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>