* 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>
* Refactor storage logic to testable setup
* Add tests to get storage config
* Add tests for register drivers
* Tests for index
* Organize imports
* Add missing getStorage
* Setup boilerplate for cloudinary drive
* Add build script
* Add cloudinary configuration
* WIP tweaks for R&D
* Start storage abstraction v2
* Make storage manager single file
* Add test coverage
* Organize imports
* Setup local driver boilerplate
* [WIP] Start on local driver 2.0
* Add more methods
* Lunchtime
* Add put method
* Add list method
* [WIP] Try using storage in api
* Use node16 module-resolution
* Lets not mess with apply-query rn
* I love CJS. Death to CJS.
* Use dynamic imports
* Make things work
* Add path normalizer
* Add azure storage driver
* Update lock
* Start on tests
* Add getBuffer test
* Add getStat tests
* Add tests for exists
* Add tests for move
* Add tests for copy
* Add tests for put
* Add tests for delete
* Add test coverage for list
* Add removeLeading option to normalizePath
* Use removeLeading option
* Start on gcs
* Add fullpath test
* Add getStream
* Add getBuffer
* Add getStat
* Add exists
* Add move
* Add copy
* Add put
* Add delete
* Finish DriverGCS
* Cleanup tests a bit
* Start s3
* Add getStream
* Add getBuffer
* Please Wryn
* Add #exists
* Use randomize data
* No more hardcoded values 🙅♀️
* Add tests for copy
* Add tests for put
* Add put/copy/delete
* Add tests for delete
* WIP list
* Remove duplicate fullPath check
* Finish AWS tests
* Listen to wryn
* Mission critical tweak
* Add randomization, cleanup tests
* Check src vs dest full path
* Start on Cloudinary
* Add parameter signature helper
* Fix ESM building of shared
* Fix ESM building of shared
* Improve tests
* Update pnpm
* Remove old build commands
* Generated d.ts files
* Fix export naming
* Move ESM only utils to new @directus/utils
* Update lockfile
* Fix type exports
* Implement getStream
* Cleanup tests
* Simplify api
* Simplify API
* Simplify api
* Simplify API
* Add read/stat
* Cleanup / add exists
* Add move
* Add write
* Move uploadChunk to separate method
* Add test for #uploadChunk
* Add tests for write
* Add copy
* Add delete
* Add list
* Add list error handling
* Remove old drive packages
* Start updating API usage of storage
* Use Readable instead of NodeJS.ReadableStream
* Use readable instead of buffer
* Restore shared to main
* Update lockfile
* Use a streaming pipeline for sharp metadata
* Add basic e2e test for local upload and delete
* Fix integer filesize in SQLite
* fixed environment mocking in unit tests
* applied the same env mocking to other tests
* Update api/src/storage/register-drivers.ts
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
* Use sha256 by default
* Add base read test for /assets
* Replace exifr with exif-reader
* Fix tests for storage/index
* Install faking lib for tests
* Add test for register-drivers
* Add tests for register-locations
* Finish tests
* Organize imports
* Resolve Azris comments
* Fix outdated tests
Certainly not the cleanest, but I need to do a bigger pass on all these tests to get them up to date with the latest team requirements. Gonna do that in a separate PR..
* Test for sha256
* Attempt 1 at fixing toString errorr
I'm not seeing this issue locally, so we'll spam a couple commits here to get things going
* Use node 18 in tests?!
* Fix localhost resolution with 127.0.0.1
* Mock getEnv()
* Use @directus/tsconfig instead of duplicated conf
* Does this fix it?
* OK fun detour
* Recreate lockfile
* Update config files
* Use multipart uploads in S3
* Cleanup imports
* File Storage 2.0: Make metadata extraction backward-compatible (#16868)
* Reinstall packages using pnpm instead of manually removing them (#16871)
* Added extra environment setting for sharp processing of invalid images (#16811)
* Added extra environment setting for sharp processing of invalid images
* renamed environment var to `ASSETS_INVALID_IMAGE_SENSITIVITY_LEVEL`
* Remove unused excludes from tsconfig
* Remove copy/paste leftover
* Update packages/utils/readme.md
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
* Update packages/utils/package.json
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
* Use pnpm instead of npm
* Setup workspace
* Replace scripts / lerna root stuff
* Add todo file
* Update lock, start updating packages
* Update todo
* [WIP] Keep going on module resolution in pnpm
* Fix final missing deps/types for complete build
* [WIP] Replace npm commands with pnpm alternatives
* Update jest config for v28
* Fix missing package under schema
* Update workflow
* Run CI on fork
* Use local reference
* Remove version from local workflow
* Add build to prepare
* Add Node's max old space size flag to linter
* Idemdito for codeql
* Hyphens? Underscores?
* Bang
* Only build one thing at a time
* Underscores after all?
* Match 7gb of GH
* Set env on prepare
* Jest is driving me nuts
* Downgrade jest
* Add root jest
* We'll get there, eventually.
* 🥳
* Het houdt niet op, niet vanzelf
* attempt to fix e2e
* fix unit test & shared import
* add `debug: true` to CodeQL action
* Fix dev call in shared
* Add missing cross-env
* Add missing geo-json dependency for app
* add flag to prepare action to skip build
* remove debug flag from codeql action
* fix invalid env syntax
* add tslib to app dependencies for tests
* another attempt
* Added missing rimraf dependency for the api prebuild/cleanup scripts
* Added missing ts-node dependency for the api cli script
* update E2E tests readme to use pnpm
* Undo move of extensions sdk
* Fixes nested groups in accordions not rendering fields (#14369)
* initial fix for nested groups in accordions
* removed debug code
* Fix strict relative dates showing "incorrect" (#14390)
* Set rounding method of relative formatted date to floor when strict option is selected
* Add round fn as an option
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Don't use locales in generated camelCased values from env (#14401)
Ref https://github.com/directus/directus/discussions/14122
* Fix list panel descending sort (#14396)
* fix list panel descending sort
* Handle missing or explicit desc value
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Fix query primary field for system tables (#14402)
* New Crowdin updates (#14403)
* Update source file en-US.yaml
* New translations en-US.yaml (Spanish, Chile)
* New translations en-US.yaml (Spanish, Latin America)
* New translations en-US.yaml (Greek)
* New translations en-US.yaml (Italian)
* New translations en-US.yaml (French, Canada)
* Fix/wysiwyg context menu (#14404)
* New translations en-US.yaml (Polish) (#14407)
* Encoded the url using encodeURIComponent, so that the url gets sanitzed and so, we did not get 404 error. (#14418)
* Encoded the url using encodeURIComponent, so that the url gets sanitized and we did not get 404 error.
* Added required changes as stated by the reviewer
* Used encodeURI instead of encodeURIComponent to encode the params only
* Solved linting error
* Solved linting errors
* checked with npm run lint, no linting errors found
* fix generateJoi error due to empty permissions when creating new role (#14416)
* fix empty permissions when creating new role
* basic test
* move logic up
* additional test
* Update api/tests/utils/filter-items.test.ts
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: ian <licitdev@gmail.com>
* Recreate lockfile
* Fix build of extensions-sdk
* Add missing dependency
* Add some more missing deps
* Update blackbox to use pnpm
* Update workflow to use main
* Update pack to work with pnpm
* Simplify commands
* Remove todo file (completed)
* ADd missing types dep
* Use local test version
* Remove version from local reference
* Call super with context
* Add missing dep
* Simplify workflows
Ref https://github.com/directus/organization/issues/135
* Simplify some more
* Linter is on root
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: brainslug <tim@brainslug.nl>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Gerard Lamusse <gerardlamo@gmail.com>
Co-authored-by: José Varela <joselcvarela@gmail.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Zeel Pathak <60271095+zeel-pathak@users.noreply.github.com>
With the introduction of support for _FILE env vars (#6101) we should respect those when checking the KEY & SECRET variables.
Additionally, I've revised the entrypoint script with the help of [ShellCheck](https://www.shellcheck.net/).
* Update Docker image to execute as a non-root user (#5801)
* Move scripts to /usr/local/bin and change mode directly in Git
* Sync versions with api/package.json, remove yargs as it is already
installed globally
* No need for multi-stage image - move installation of Directus to actual
image
* Move WORKDIR instruction after USER instruction so we don't need to RUN
chmod
* Don't cache apk packages
* Add some comments and move EXPOSE and SHELL to bottom
Co-authored-by: Tien Tran <76130324+t7tran@users.noreply.github.com>