185 Commits

Author SHA1 Message Date
Pascal Jufer
20a06a6c0e Clean-up lint / format set-up (#16380)
* Format json & all yaml files and update ignore files

* Fix resulting formatting issues
2022-11-09 07:26:54 -08:00
ian
7899f6a267 Remove dev dependencies when running blackbox tests (#16271)
* 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
2022-11-03 09:15:48 -04:00
Pascal Jufer
f5c564ddfd Fix "Create release" job (#16261) 2022-11-01 21:11:51 -04:00
Roger Stringer
53a3194d5c Add support for SAML Part 2 (#16145)
* 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>
2022-11-01 22:09:31 +00:00
Pascal Jufer
92466dd2a9 Replace depreacted "create-release" action (#16144)
* Replace depreacted "create-release" action

* Fix indentation

* Target is not required as the tag will already exist

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-10-24 12:26:47 -04:00
Pascal Jufer
5507ca3f41 Fix path for packages in package.json used for Docker image (#16141)
* Use basename to get relative path for packages

* Revert "Revert "Small `Release` workflow clean-up (#16083)" (#16120)"

This reverts commit c2ee8c24ef.
2022-10-24 09:47:03 -04:00
Rijk van Zanten
c2ee8c24ef Revert "Small Release workflow clean-up (#16083)" (#16120)
This reverts commit dbfedb56fe.
2022-10-22 13:05:22 -04:00
Pascal Jufer
dbfedb56fe Small Release workflow clean-up (#16083)
* Consistent usage of `if` statements

Brackets are not required in `if` statements, see https://docs.github.com/en/actions/learn-github-actions/expressions#about-expressions

* Use prepare action to setup pnpm in publish-npm job
2022-10-20 12:34:19 -04:00
ian
98daa7dbac Update upload-artifact action to v3 (#16081) 2022-10-20 11:29:53 -04: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
ian
6cdd0eead4 Fix CodeQL threadflow steps (#15873)
* Upload SARIF artifact

* Test removal of empty object

* Fix polynomial-redos

* Revert fail-fast change

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-10-12 16:01:13 -04:00
ian
bf8eec7df8 Update pull_request_template.md (#15577) 2022-09-14 13:05:41 -04:00
Rijk van Zanten
08ac07c639 Update pull_request_template.md 2022-09-12 21:04:15 -04:00
Rijk van Zanten
019aa7b39d Delete .kodiak.toml
Kill it! 

@paescuj Crowdin is syncing multiple times a day now, which means that kodiak is merging the PRs multiple times a day. This is starting to create a _huge_ amount of additional PRs that's crowding (pun intended) up the PR list quite a bit. Instead of auto-merging it through, I'm gonna make it part of the release flow to just merge the language updates all at once in a single PR per release to ensure that we don't end up with 500 PRs per release 🙂
2022-08-09 17:24:27 -04:00
ian
4bcf601524 Run blackbox tests when shared package / workflow is updated (#14954) 2022-08-08 13:52:27 -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
Pascal Jufer
29619f723b Use native concurrency option to cancel outdated workflow runs (#14943) 2022-08-08 10:16:43 -04:00
Azri Kahar
333badc344 Tweak add-to-project GitHub action (#14934)
* ignore crowdin updates PRs

* update version

* out of beta!
2022-08-08 09:56:18 -04:00
rijkvanzanten
3d03291c31 Rerun workflow on workflow change 2022-07-21 16:23:36 -04:00
rijkvanzanten
2910ee286b Try with pnpm 2022-07-21 16:22:16 -04:00
rijkvanzanten
9833294743 Oracle (╯°□°)╯︵ ┻━┻ 2022-07-21 16:03:30 -04:00
rijkvanzanten
54f80376c8 Don't cache npm in node checkout 2022-07-21 15:30:26 -04:00
ian
9d738d12ce Fix incorrect cancel workflow version (#14533) 2022-07-20 13:05:43 -04:00
ian
bcb33a798b Cancel all previous workflows in the branch (#14525) 2022-07-20 10:42:14 -04:00
ian
3770661bde Run blackbox tests when updated (#14484)
* Run blackbox tests when updated

* Run tests when dependencies are updated
2022-07-18 11:55:33 -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
ian
c691c4c7b2 Switch blackbox tests workflow target to core repo (#14461) 2022-07-15 13:19:59 -04:00
ian
8d1966ab04 Blackbox testing (#13200)
* Add black box tests

* Revert docker compose file

* Update workflow

* Try use workflow from dev repo

* Increase seedDB() timeout

* Disable other checks for now

* Change DB sequence

* Update jest moduleNameMapper

* Update workflow's docker-compose.yml path

* Slice array first

* Remove differentiation of status code

* Delete field only after foreign key constraints are removed

* Add checks for different types of primary key

* Test global query filter for all field types

* Increase timeout for m2o seeding

* Add case insensitive string operators

* Update filter check to run on relational fields

* Enable time field checks

* Add seeded random and fix relational seeding

* Add casting for integer and bigInteger

* Minor fixes

* Reduce bigInt values

* Separate seeding of DB structure from values

* Add primaryKey seeding function

* Use automatic IDs except for string pk

* Try fix ci

* Update package-lock.json

* Update common.test for concealed user tokens

* Use dynamic field type for m2o.test relational fields

* Temporary disable missing nicontains for string type

* Add support for alias type filtering

* Fix relational filter operator checks

* Add initial o2m test

* Remove integer pk limit

* Add empty checks for string and uuid null

* Limit generated integer value to 4 bytes

* Patch timezone tests for MSSQL

* Remove sample query filter test

* Fix timezone test for sqlite

* Fix MSSQL uuids

* Fix MSSQL timestamp inaccuracy

* Cast datetime schema to milliseconds for comparison

* Fix MySQL / Maria timestamp inaccuracy

* Fix MySQL / Maria between operator inconsistency for float type

* Fix missing time datatype in Oracle

* Skip filter testing on Oracle

* Enable o2m filter tests for other collections

* Run tests only on SQLite for PRs unless the Full Tests label exists

* Try fix actions

* Refactor github actions

* Update tests flow setup to use getURL()

* Start postgres docker

* Reinstate package-lock

* Fix geometry test

* Remove .gitkeep files

* Add todo.md

* Rename black box to blackbox

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-07-15 15:25:32 +00:00
ian
48a476d1ef Update pull_request_template.md (#14095)
Add improvement to the Type of Change
2022-06-24 14:49:17 -04:00
Rijk van Zanten
c059f7c219 Upgrade codeql to v2 (#13876)
https://github.blog/changelog/2022-04-27-code-scanning-deprecation-of-codeql-action-v1/
2022-06-13 16:46:13 -04:00
Pascal Jufer
221398a49f Auto approve pull requests from Crowdin via label (#13824) 2022-06-10 11:09:49 -04:00
Eron Donevan Powell
feea827685 Docs: getting-started > Introduction (#13055)
* created self-hosted section, moved installation guides, and re-edited first draft of the cloud quickstart guide

* refactored step 1 into two steps

* added media

* pre-mgmt submission proofread

* pulled down on wrong branch.
Revert "pre-mgmt submission proofread"
This reverts commit dfd678d083.

* first draft, halfway done

* first draft done

* added directus cloud section, first draft

* second draft, applied ben's desired edits

* moved resources out of intro and into separate page

* tiny tweaks

* heavily edited whats directus and tidied up lower sections

* link checked and proofedited with grammarly

* Update docs/getting-started/resources.md

* Update docs/getting-started/introduction.md

* Auto-format indentation

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-06-06 18:04:50 -04:00
rijkvanzanten
4d63fba50a Increase node mem allocation in release flow
Should fix the build issue where rollup runs out of memory when building the app
2022-06-03 10:33:52 -04:00
Rijk van Zanten
d175290657 Don't auto-add Bug (Potential) label
We don't really rely on the label, and often remove it after the fact
2022-06-02 13:42:45 -04:00
Rijk van Zanten
a98df4066d Update .kodiak.toml
Don't want it to approve _all_ my PRs immediately
2022-06-01 14:05:58 -04:00
Jay Cammarano
4e5fbf1b0c Use pull_request_target instead of pull_request for auto-project-assign (#13648)
* Changes the token to fallback to github.token

* pull_request_target

* Update .github/workflows/add-to-project.yml

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

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2022-06-01 14:04:53 -04:00
Pascal Jufer
a66bbedb59 Auto approve pull requests from Crowdin (#13633) 2022-05-31 12:03:32 +00:00
Rijk van Zanten
374e0f47f5 Update pull_request_template.md 2022-05-26 16:39:01 -04:00
Rijk van Zanten
24365e04a0 Create pull_request_template.md 2022-05-26 16:36:37 -04:00
Jay Cammarano
1d5a32c5d6 add to project (#13581) 2022-05-26 14:13:34 -04:00
Nicola Krumschmidt
ed97f8bf97 Remove workaround in release flow (#13455)
This forces the release workflow to use `node@16.15` which includes `npm@8.5`.
2022-05-25 12:22:27 -04:00
Rijk van Zanten
24c3046873 Delete CODEOWNERS
Prefer assigning reviewers on a case by case, than have me auto-assigned everywhere all the time
2022-05-16 11:21:48 -04:00
Rijk van Zanten
8ee9194dea Update bug_report.yml 2022-04-05 09:54:03 -04:00
Rijk van Zanten
6392f9428c Update bug_report.yml 2022-04-05 09:53:42 -04:00
Rijk van Zanten
fff3201c4a Update bug_report.yml 2022-04-05 09:53:12 -04:00
Rijk van Zanten
27d78e9fbe Update CODEOWNERS 2022-04-01 13:46:07 -04:00
rijkvanzanten
7d372c7aee Fix file name reference 2022-03-03 16:32:36 -05:00
Rijk van Zanten
eea9f45624 Add authenticate hook to implement custom auth checks against current request (#11942)
* Add "authenticate" filter hook that allows custom auth check

* Start on test

* Update Jest, restructure API tests, start implementing authenticate test

* Move access token verify to util function

* Ensure jest can show inline warnings on correct lines

* Update is-directus-jwt to use jsonwebtoken decode + add tests

* Remove unused package

* Tweak and finish + test authenticate

* Tweak test

* Add authenticate filter to docs

* Don't scan tests for codeql

* No seriously, ignore tests
2022-03-03 16:29:13 -05:00
Rijk van Zanten
588a5410af Delete renovate.json 2022-02-17 19:53:46 -05:00