Commit Graph

45 Commits

Author SHA1 Message Date
Rijk van Zanten
3cafcb142f Tweak CI (#25488)
* Cleanup ci

* Run on push to main, only stylelint changed files

* Run formatter

* Fenagle stylelint into working

* Use stylelintignore
2025-07-17 19:05:07 -04:00
Rijk van Zanten
b8cc796f4c Upgrade Node.js runtime version to 22 (#24140)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2025-01-08 13:26:14 +01:00
Pascal Jufer
206a7cae0b Update dependencies (#21428) 2024-02-14 12:12:50 +01:00
Pascal Jufer
86aedeb27c Patch Tuesday 🐸 (#21221)
* Update root deps

* Update `@directus/api` deps

* Update `@directus/app` deps

* Update `docs` deps

* Update `@directus/components` deps

* Update `@directus/composables` deps

* Update `create-directus-extension` deps

* Update `create-directus-project` deps

* Update `@directus/data` deps

* Update `@directus/data-driver-postgres` deps

* Update `@directus/data-sql` deps

* Update `@directus/env` deps

* Update `@directus/extensions` deps

* Update `@directus/extensions-sdk` deps

* Update `@directus/memory` deps

* Update `@directus/random` deps

* Update `@directus/release-notes-generator` deps

* Update `@directus/storage` deps

* Update `@directus/storage-driver-cloudinary` deps

* Update `@directus/storage-driver-local` deps

* Update `@directus/storage-driver-s3` deps

* Update `@directus/storage-driver-supabase` deps

* Update `@directus/stores` deps

* Update `@directus/themes` deps

* Update `@directus/update-check` deps

* Update `@directus/utils` deps

* Update `@directus/validation` deps

* Update `tests/blackbox` deps

* Add changeset

* Bump pnpm to 8.15.0

* Update GH actions
2024-01-28 22:56:34 +01:00
Pascal Jufer
eb9655ac1e Update GitHub actions in workflows (#20705) 2023-12-11 17:41:34 +01:00
Pascal Jufer
b6f7dcaa0b Consider OS release for pnpm cache in GH workflows (#19973) 2023-10-10 10:27:50 +02:00
Pascal Jufer
15b91dee34 Blackbox tests restructuring (#18122)
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-11 18:28:37 +02:00
Pascal Jufer
5b256f64c6 Use pnpm 8.1.0, define version via packageManager field, clean-up other version definitions (#17993)
* 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>
2023-04-04 15:20:25 -04:00
Pascal Jufer
4d7e81f295 Switch back to latest pnpm version in workflows (#17809) 2023-03-16 11:52:24 +01:00
Pascal Jufer
1c7320e68c Use pnpm 7.29.1 for now to circument dep regression (#17787) 2023-03-14 21:30:15 +08:00
Pascal Jufer
59dcd30e6e Use npm auth set-up from 'setup-node' action (#17656) 2023-03-01 08:07:16 +01:00
Rijk van Zanten
00865fbd84 File Storage 2.0 (#16825)
* 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>
2022-12-21 10:04:03 -05:00
Pascal Jufer
2939eb1d96 Prepare Action: Set output via newer file method (#16080) 2022-10-20 23:13:50 +08:00
ian
83b6027cc3 Run blackbox tests in parallel (#16048)
* Run blackbox tests in parallel

* Add slight delay for updates in timezone tests

* Revert trigger on PR
2022-10-19 10:04:32 -04:00
Pascal Jufer
3e8d965642 Clean-up GitHub workflows (#14945)
* Clean-up GitHub workflows

* Remove checkout step from 'prepare' action instead
2022-08-08 10:34:39 -04:00
Rijk van Zanten
27cc3e1bec Move repo to pnpm based workflow (#14350)
* 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>
2022-07-15 17:41:49 -04:00
Sean Goff
b67b9d824a Build improvements (#6759)
* test

* ci improvements

* fix image names

* improve docs

* Update .github/workflows/release.yml

Co-authored-by: Pascal Jufer <paescuj@users.noreply.github.com>

* Update docker/pack.js

Co-authored-by: Pascal Jufer <paescuj@users.noreply.github.com>

* improvements proposed by @paescuj

* improve Dockerfile comment

* fix .PHONY

* rm tarballs before building final image

Co-authored-by: Pascal Jufer <paescuj@users.noreply.github.com>
2021-07-14 16:40:38 -04:00
Pascal Jufer
a6288e674d Docker image: Respect KEY_FILE/SECRET_FILE env vars (#6713)
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/).
2021-07-12 14:00:31 +02:00
Pascal Jufer
edd52c7c2a Small Makefile change (for manual image build) (#6741)
* Enhancement: Use latest Git tag for version
* Fix: correct dir in PHONY
2021-07-11 09:46:13 +02:00
Pascal Jufer
b2d1805330 Docker image: Ensure exact version of directus (#6659)
See #6633
2021-07-07 12:05:18 +02:00
Pascal Jufer
eabf120662 Enhance docker image build process (#6601) 2021-07-02 11:51:15 +02:00
renovate[bot]
78e830f795 chore(deps): update node.js to v16 (#6336)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-17 11:27:34 -04:00
Pascal Jufer
ae65918d1e Optimize Docker image for Directus (#6081) 2021-06-04 12:47:38 -04:00
Tien Tran
b90e182db2 Reduce the image layers by combining RUN statements; and fix permission issue #6023 (#6044) 2021-06-03 17:35:42 -04:00
Pascal Jufer
a1ff311a66 Clean-up docker image (#5877)
* 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>
2021-06-02 10:15:07 -04:00
WoLfulus
43f4e63179 enable latest (#4705) 2021-03-27 16:17:55 -04:00
Nicola Krumschmidt
08293b8570 Update Knex to version 0.95.0 (#4374)
* Update Knex to version 0.95.0

* Fix formatting in schema dialects

* Fix Knex imports

* Update package-lock

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-03-03 19:37:44 -05:00
Nicola Krumschmidt
fe479784af Unpin sqlite3 and update to version 5.0.2 (#4175) 2021-02-19 11:08:36 -05:00
WoLfulus
048a4b15a4 Pin sqlite3 version in Docker and update other dependencies 2021-01-19 08:21:35 -03:00
WoLfulus
1de4a87d56 Update makefile 2021-01-14 13:12:42 -03:00
WoLfulus
024ee4db60 Remove out of place example, add retries for npm install build step 2021-01-14 13:07:13 -03:00
WoLfulus
46990d3874 Fix bootstrap command 2020-12-09 00:40:55 -03:00
WoLfulus
f43bf3c784 Adds bootstrap command to docker 2020-12-08 00:24:38 -03:00
rijkvanzanten
d44f99331c Fix links to next repo 2020-11-18 20:34:14 -05:00
WoLfulus
c38507d32e Add port remove volumes 2020-11-03 18:05:06 -03:00
WoLfulus
6912983bc5 Added wait for database server on bootstrap 2020-11-03 17:54:01 -03:00
rijkvanzanten
23458b5b9f Last port change, promise 2020-10-02 16:26:40 -04:00
rijkvanzanten
1524c3e398 Change default port to 8805 2020-10-02 14:56:39 -04:00
WoLfulus
5d6269ab5b Fix registry address for DockerHub 2020-10-02 14:12:56 -03:00
WoLfulus
102b5b2a65 Fix database install log leaking 2020-10-02 12:22:31 -03:00
WoLfulus
03b9327565 Added push to docker hub 2020-10-01 14:44:04 -03:00
WoLfulus
4cc11371f1 move makefile 2020-09-25 11:36:39 -03:00
WoLfulus
a151a1a515 several pipeline fixes 2020-09-25 11:36:25 -03:00
WoLfulus
5617c29d63 small fixes 2020-09-25 11:36:25 -03:00
WoLfulus
4501659865 add actions and workflows 2020-09-25 11:36:25 -03:00