* Upgrade tinymce
* Omit 'skin_url' instead of setting it to false
The option expect a string value. Instead of setting it to 'false' we
can just completly omit it.
Otherwise we get the following warning:
> Invalid value passed for the skin_url option. The value must be a string.
Although not explicitly mentioned in the migration doc, the stricter check / warning has
probably been introduced with v6.
* Disable pasting of images
From
https://www.tiny.cloud/docs/tinymce/6/migration-from-5x/#plugins-paste:
> A paste default has changed. The paste_data_images option now defaults to true.
> When paste was a plugin, this option was, by default, set to false, which prevented images being pasted from the local machine
* Update toolbar option names
---------
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
* Step 1
* Step 2
* False sense of confidence
* Couple more before dinner
* Update schema package
* Update format-title
* Upgrade specs file
* Close
* Replace ts-node-dev with tsx, and various others
* Replace lodash with lodash-es
* Add lodash-es types
* Update knex import
* More fun is had
* FSE
* Consolidate repos
* Various tweaks and fixes
* Fix specs
* Remove dependency on knex-schema-inspector
* Fix wrong imports of inspector
* Move shared exceptions to new package
* Move constants to separate module
* Move types to new types package
* Use directus/types
* I believe this is no longer needed
* [WIP] Start moving utils to esm
* ESMify Shared
* Move shared utils to @directus/utils
* Use @directus/utils instead of @directus/shared/utils
* It runs!
* Use correct schemaoverview type
* Fix imports
* Fix the thing
* Start on new update-checker lib
* Use new update-check package
* Swap out directus/shared in app
* Pushing through the last bits now
* Dangerously make extensions SDK ESM
* Use @directus/types in tests
* Copy util function to test
* Fix linter config
* Add missing import
* Hot takes
* Fix build
* Curse these default exports
* No tests in constants
* Add tests
* Remove tests from types
* Add tests for exceptions
* Fix test
* Fix app tests
* Fix import in test
* Fix various tests
* Fix specs export
* Some more tests
* Remove broken integration tests
These were broken beyond repair.. They were also written before we really knew what we we're doing with tests, so I think it's better to say goodbye and start over with these
* Regenerate lockfile
* Fix imports from merge
* I create my own problems
* Make sharp play nice
* Add vitest config
* Install missing blackbox dep
* Consts shouldn't be in types
tsk tsk tsk tsk
* Fix type/const usage in extensions-sdk
* cursed.default
* Reduce circular deps
* Fix circular dep in items service
* vvv
* Trigger testing for all vendors
* Add workaround for rollup
* Prepend the file protocol for the ESM loader to be compatible with Windows
"WARN: Only URLs with a scheme in: file and data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'"
* Fix postgres
* Schema package updates
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
* Resolve cjs/mjs extensions
* Clean-up eslint config
* fixed extension concatination
* using string interpolation for consistency
* Revert MySQL optimisation
* Revert testing for all vendors
* Replace tsx with esbuild-kit/esm-loader
Is a bit faster and we can rely on the built-in `watch` and `inspect`
functionalities of Node.js
Note: The possibility to watch other files (.env in our case) might be
added in the future, see https://github.com/nodejs/node/issues/45467
* Use exact version for esbuild-kit/esm-loader
* Fix import
---------
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
* Create new s3 client for each read
* Temp disable ts while debugging
* Add concurrency test
* Add minio to other tests
* Reduce unavailable count
* Trigger blackbox tests whenever packages are updated
* Prevent minio-mc from exiting
* Decrease requests and increase test timeout
* Spam more requests over longer period
* Increase request timeout
* Run autocannon directly with larger image
* Fix tests
* Lock version
* My favorite file
---------
Co-authored-by: ian <licitdev@gmail.com>
* Expose schema endpoints
* respond with 204
* fix payload for export flag
* allow export as YAML
* use SchemaService
* move getStringFromStream to utils
* clearer exceptions with logs
* check empty request body
* specs
* add bypassCache flag and remove flushCaches calls
* Identify integer typed fields in Oracle
* Fix uuid foreign keys type for Oracle
* Detect autoincrement for CockroachDB
* Bypass cache for fields and relations services
* Add same DB tests
* Test if working for all vendors
* Add schema snapshot testing into sequential flow
* Fix schema re-apply attempts when it's a different database vendor (#14816)
* prevent diffing on certain properties
* fix apply-snapshot test
* prevent updates to autoincrement fields' schema
* sanitize relations
* remove `colleciton.schema.sql` parsing in test
It is now being sanitized by `sanitizeCollection()` function in get-snapshot-diff.ts
* Change concurrency group to not cancel test running on main
* remove multipart for apply & add hash checking
* check incoming version & add force query param
* refine error message & stub for nested hash
* add `vendor` top-level property
as an additional safety net for cross db vendor applies
* sanitize generated schema snapshots
* snapshot joi validation
* diff joi validation
* minor cleanup
* extract applyDiff & use deep-diff applyChange
* use applyDiff in schema service
* Mark vendor as optional
* Update tests to apply diffs
* move force flag check into service
* Patch mssql vendor typo
* Set relation no action in cyclic relations
* Update mysql timestamp default value
* Oracle cannot define no action
* Update oracle timestamp type default values
* add hash checking for outdated diffs
* fix diff service & endpoint
* Add hashes when returning after
* Fix self referencing relations for Oracle
* Add temp fix for CURRENT_TIMESTAMP defaults in Oracle
* clean up driver and database client types
* only require diff hash if not kind N
* update hash comparison logic for create/delete
* Set no action constraint for self referencing M2M in MSSQL
* Add basic hash check tests
* omit default value when hashing auto increments
Specifically for CockroachDB with differing sequences
* add vendor check
* update specs
* Validate vendors with type definition
* Spread the vendors input array
* re-add Export component
* re-add js-yaml to root
* Propagate mutation options for schema apply
* Verify that snapshots differ and clear cache before hash tests
* Fix unit test
* Revert temp fix for CURRENT_TIMESTAMP defaults in Oracle
* Define and reuse type for export format
* Define and reuse list of database clients
* change `were` to `was`
* change `where` to `were`
* add some empty lines for readability
* tweak exception message
* fix test
* use object-hash
* use boolean to check whether file is included
* simplify request content type check
* throw error when multiple files were uploaded
* use nullish coalesce instead of short circuit
* Update api/src/services/schema.ts
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* Remove unnecessary `Omit` on `SnapshotWithHash` type
* Revert "Remove unnecessary `Omit` on `SnapshotWithHash` type"
This reverts commit d22ac771ec.
* check empty snapshot earlier
* use allow-list logic via pick instead of omit
* Update api/src/services/schema.ts
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
* Move to own /schema endpoint controller
* Fix refs to schema endpoint
* move streamToString to utils package
* move get-versioned-hash and add test
* extract kind into an enum
* Fix mysql5 timestamp value
* Fix test collection existing on rerun
* resolve TODO comment in blackbox test
* Drop deep level hashes in diff
These hashes are used only for more accurate error reporting
but are otherwise superfluous, since changes are already
detected by the top level hash.
Therefore we remove them in favor of a simpler diff format and
implementation.
* Revert schema "fix" for createItem, add comment
* Strict diff schema validation
* Revert CrDB auto-increment detection patch in 816c998
* Clear systemCache to expose newly added fields
* Use DiffKind constants
* Extract diff & snapshot validation into own tested utils
* Apply suggestions from @azrikahar
* Update knex-schema-inspector to 3.0.1
Includes the fix for CrDB auto-increment detection (knex/knex-schema-inspector#135)
* Update knex-schema-inspector in packages
* Update lock file
* add test for schema service
* add test for export service
* add relevant tests to modified util functions
* fix csv test to account for os end of line
* fix files controller test
* dedupe test data for schema service
* Align schema specs with docs
* Update api/src/controllers/schema.ts
* Revert testing for all vendors
---------
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
* add link command and small improvements
* put local bundles into own folder on link
* get rid of packs and add bundle support for local extensions
* make bundle type extensions work locally and remove traces of pack
* fix hot reloading of bundles
* fix app.js not refreshing
* fixed linter errors
* add endpoint to install extensions
* update package.json validation and support top level extensions
* update endpoints
* added some URL escapes and ran linter
* remove installation part
* readd endpoint
* update dependencies
* fix types and validation in extension-sdk
* run linter
* fix linter
* add defaults to manifest
* Added missing constant export
* ensure all the extension folders
* ignore unneeded vite error
* update linking process
* run parser separate
* add await
* fixed linter errors
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
* Speed query up by reusing existing aliases which reduces table joins
* Use subquery in top level m2o to remove duplicates
* Fix linting
* Apply distinct on primary key field in subqueries
* Use distinct instead as there are only primary keys
* Apply subquery on top level
* Try remove sub sub query
* Test if working for all vendors
* Add support for _none and _some
* Use subquery only when field depth > 1
* Add tests
* Use original table names for columns with functions (#14690)
* Use original table names for columns with functions
* Extract filter function path parsing as shared util
* Fix filter function path when adding node
* Pass the originalCollectionName into filter functions
* Update unit test
* Replace functions within deep GraphQL
* Fix invalid operator error for _none and _some
* Add filter function tests
* Revert triggering for all vendors
* Simplify aliasMap
* Replace functions in filter within GraphQL aggregate query
* Add API support for filtering of alias field
* Mark schema as optional
* Shift logical operators upwards
* Separate recursive parseFilter
* Rework shifting of logical operators
* Error on invalid usage of _none and _some
* Use inner join to preserve sort order
* Run tests for all vendors
* Reuse aliasMap for sort and filter
* Sort on top level query
* Remove unnecessary limit on wrapper query
* Refactor applyQuery options
* Remove duplicates from nested multi relational sort
* Fix offset in MSSQL requiring OrderBy
* Disable schema cache
* Use inner query only for nested sort or multi relational filter
* Fix MSSQL duplicate order column
* Use inner query only for multi relational
* Additional integration tests
* Order within partition for multi relational sorts
* Rename to directus_row_number
* Fix unit test
* Add base sort and filter tests
* Fix Oracle uppercased rowNumber column
* Fix unit test
* Fix top level query sort with function
* Parse functions in inner query
* Increase clarity with knex.ref()
* Remove sort filter for top level primary key
* Fix unit test
* Bypass queries with groupBy
* Add collection to aliasMap to fix functions in nested sort
* Fix multi relational sort with functions
* Add tests for filter and sort with functions
* Fix accidental deletion of brackets
* Fix top level alias filter node interface
* Update M2M sort tests
* Add M2A tests
* Cast m2a primary key as varchar2 for oracle
* Enable filtering tests for M2A
* Fix prototype polluting assignment in aliasMap
* Remove unnecessary currentKey
* Simplify code to increase readability
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
* Fix linting and missing 'this' error
* Revert optional chaining
* Add mysql5 to tests
* Fix mysql5 missing rowNumber()
* Overcome indexing delays in MySQL5
* Verify MySQL5 sorting is in order as the result count varies between runs
* Skip joining when sorting field already exists
* Simplify variable assignment
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
* Fix linting
* Reduce duplicate logic with vars
* Transform _func fields in GraphQL only for valid functions
* Fix unit test
* Fix unsupported date_part() in CrDB
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Roger Stringer <roger@directus.io>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.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>
* force logger in sync mode when running on the CLI
* using the sync logger for all cli commands
* using cli logger for app initialization
* using pino pretty for log formatting
* installed deps
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
* Update monorepo root
* Update API dependencies
* Use unranged version
* Update app deps
* Upgrade packages dependencies
* Fix shared build
* Fix type warning in api
* Fix test runner
* Get rekt by ya boy comma-,
* Fix missing unit deprecation for sass color.mix()
Co-authored-by: ian <licitdev@gmail.com>
* Add bundle type to constants and types
* Add support for API bundle extensions
* Rename generateExtensionsEntry to generateExtensionsEntrypoint
* Add support for App bundle extensions
* Refactor App extension registration
* Replace extensions inject with useExtensions()
* Replace getInterfaces() with useExtensions()
* Replace getDisplays() with useExtensions()
* Replace getLayouts() with useExtensions()
* Replace getModules() with useExtensions()
* Replace getPanels() with useExtensions()
* Replace getOperations() with useExtensions()
* Add useExtension() composable
* Replace useExtensions() with useExtension() where applicable
* Remove interface getters
* Remove display getters
* Remove layout getters
* Remove module getter
* Remove panel getters
* Remove operation getters
* Rename extension register.ts files to index.ts
* Perform module pre register check in parallel
* Remove Refs from AppExtensionConfigs type
* Remove old extension shims
* Ensure registration of modules is awaited when hydrating
* Add support for scaffolding package extensions
* Add support for building bundle extensions
* Add JsonValue type
* Use json for complex command line flags
* Load internal extensions if custom ones are not available
* Fix extension manifest validation for pack extensions
* Fix tests in shared
* Add SplitEntrypoint type
* Move command specific utils to helpers
* Add SDK version getter
* Move extension dev deps generation to helpers
* Move template path to getter util
* Move template copying to a helper
* Only rename copied template files
* Add directus-extension add command
* Convert provided extension source path to url
* Replace deprecated import.meta.globEager
* Mock URL.createObjectURL to make App unit tests pass
* Update rollup-plugin-typescript2
* indentation
* sort vite glob imported modules
* fix unintentional wrong commit
* Simplify app extension import logic
* reinstall @rollup/plugin-virtual
* add test for getInterfaces() expected sort order
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
* build: ➕ add vitest and update test scripts
* build: 🔧 add vitest config
* build: ✅ Migrate tests to vitest
Remove jest references from test api test files and replace with vitest equivalents.
Tests: 13 tests are failing.
* build: 🚚 move vite.config.ts to api/src folder
* build: 🔥 remove unused vitest.config from api root
* build: ✅ import vitest modules for tests
* build: ✅ add type conversion for actual object
* Finish switch from Jest to Vitest in API
* Replace some leftovers
* Load "sharp" before tests
* Try with cjs
* Temporary enable verbose reporter
* Try with globalSetup
* Fix path to globalSetup
* Provide default export in globalSetup
* Final clean-up
* Remove @vitest/ui & update vitest to 0.25.0
* Add vitest c8 coverage dependency
* Update vitest to v0.25.1
* Replace unnecessary Vitest workaround
* Rework new tests
* Resolve build errors
Co-authored-by: Dorian C Brown <brown.3794@gmail.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* Remove dev dependencies when running blackbox tests
* Install dev dependencies in workspace root to run tests
* Shift dependency to see if tests fail
* Revert dependency shifting test
* Remove specifying of shell
* new saml branch
* put saml info back in
* put saml info back in
* clean up code
* validate saml config
* validate schema
* Add saml auth flow tests
* use RelayState for redirects
* Update tests for RelayState
* Fix linting
* remove validateMeta as samlify does it already
* Fix linting
* change catch on login
* Update api/src/auth/drivers/saml.ts
Co-authored-by: Aiden Foxx <aiden.foxx.mail@gmail.com>
* remove login since not needed here
* clear cookie if set on logout
* empty login method
* invalidate logout in db
* if relayState and login failed, redirect back with a reason
* Cleanup linter warnings
* Remove range from packages
* Opinions opinions opinions opinions
Just a couple personal opinion cleanup pieces
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Aiden Foxx <aiden.foxx.mail@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>