683 Commits

Author SHA1 Message Date
rijkvanzanten
6d1e5b3432 v9.14.2 2022-07-21 15:17:56 -04:00
Christopher Kapic
090671ea1e Update Knex version to fix CockroachDB relationships showing multiple times (#14509)
* update knex version

* Update all knex uses

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-07-19 10:44:14 -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
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
Zeel Pathak
4127db78ea 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
2022-07-14 12:43:53 +02:00
rijkvanzanten
01af7e2ab9 Unbreak builds
And unbreak them on M1 too
2022-07-11 18:57:00 +02:00
Rijk van Zanten
288e7d62b9 Move docs folder to dedicated repo (#14192)
* Move docs to https://github.com/directus/docs

* Update included docs
2022-06-29 13:47:45 -04:00
Rijk van Zanten
6955c538a3 Upgrade API & Schema dependencies (#13845)
Fixes #13837
2022-06-10 15:59:52 -04:00
Rijk van Zanten
3a614d0058 Only render first 10000 items on calendar layout view (#13724)
* Update fullcalendar

* Update eslint
2022-06-03 17:49:54 -04:00
Nicola Krumschmidt
3ce0bbd0da Remove npmrc files which prevent lockfile creation in workspaces (#13444)
* Remove npmrc files which prevent lockfile creation in workspaces

Since `v8.5.0` npm will detect that it is running inside a workspace and issue commands at the root package.

* Require a minimum npm version of 8.5.0
2022-05-25 15:15:45 -04:00
Nicola Krumschmidt
aeb919ba7f Update knex to version 2.0.0 (#13051)
* Update knex to version 2.0.0

Fixes #10842

* Remove unused optional dependencies

* Update sqlite3 to version 5.0.6

* Fix returning primary key when inserting items into database
2022-05-03 10:20:49 -04:00
Rijk van Zanten
bd0668429f Deprecate use of faker (#12934)
* Deprecate use of faker

* Attempt to fix e2e

* uno mas

* eindelijk gerepareerd?
2022-04-21 16:29:03 -04:00
Rijk van Zanten
6a3eb823c3 Update base theme of the App (#11952)
* Add migration to remove default value from project_color

* Upgrade the default theme

* Do a pass over the header buttons

* Do another pass over --warning uses

* Little things

* Tweak smoke

* Use updated map

* Use dark system elements in dark mode

* Remove outdated files, update toasts

* Use correct delete button style for role

* Use primary for created point

* Tweak spacing in revisions section

* Use primary for sidebar sections

* Various color tweaks and changes

* Update base color palette

* Update "css reset" code

* Remove splashscreens, add default favicon

* Add primary highlight to datamodel page

* dark mode color update

* fix sign out hover color

* Does this help?!

* This fixes some loading issues

Fixes https://github.com/directus/directus/issues/10707

* Calculate default pretty background?

* Fix public view with logo

* Fix responsiveness of login page

* adjust notification group width to be equal

* Do an absolute pointless task that doesn't do anything

It was suggested that it could fix the stylelint error in tests, but alas

* Remove stylelint

Doesn't seem to play nice with script setup and other changes

Co-authored-by: Ben Haynes <ben@rngr.org>
2022-03-04 18:53:39 -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
Eron Donevan Powell
1bc7da6967 Docs: update CSS and pics (#11634)
* .gitignored package-lock.json that was created in the docs subfolder

* tweaked color names, except the ones in in vue files

* converted terminal screencaps into markdown

* updated images in 'Content'

* updated user-directory images

* updated media in file-library

* moved picsto cloud in reference>files

* updated images in config > datamodels > relationships

* updated primary colors in app-overview.svg

* updated insights images

* swapped quickstart-guide media and touched up copy

* Update last colors, remove linting from docs temporarily

* Fix theme color

* Update homepage header image

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-02-21 15:32:09 -05:00
Rijk van Zanten
4e68cd2df4 Upgrade E2E test setup (#11272) 2022-01-25 21:37:39 +00:00
Jay Cammarano
ef9b30c0e1 Integration tests set up and examples (#10419)
* tsconfig loosened to match api

* integration test folder and script

* .env mock isn't needed

* mock-env, locations of tests

* I was wrong.

* Updated progress

* schemas => getSchema(), exported getColumnPreprocessor()

* change imports to allow build

* add MockClient as DB Client (should mock getDBClient())

* move authservice into. not used elsewhere

* test passing

* remove unneeded test for this PR

* removed unneded fields from rawItem

* formatting

* createOne test passing

* typo

* removed int specific jest.config

* use systemSchema over getSchema()

* this.knex over getDatabase()

* mock getDatabaseClient

* removed unused mock-env

* formatting

* removed unused collections from schema

* response => responseOnce

* more direct

* unused var

* more tests please!

* test for: createOne no permissions

* removed broken test for now

* clean up

* readOne tests what does into db and returned

* added bindings check

* added into db sql check

* moved tests outside src

* changed ts config

* cli test location changed

* removed looking for tests in src

* readding it for e2e tests? Seems fishy

* Integration tests for ItemsService user tables (#11208)

* renamed ItemsService test to match src file name

* add user table schema

* system/user tables use .each, formatting needed

* format system and user better in title

* tables/table=> schemas/schema

* filter _eq test passing

* comment for later and formatting

* everything in it's right place

* future proofing as more fields are added

* removed duplicate test

* formatting

* readMany() filter: _or

Co-authored-by: Jay Cammarano <jaycammarano@gmail.com>

* added knex check before getDatabase()

* Move util test to tests folder

Co-authored-by: Jay Cammarano <jaycammarano@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-01-24 19:55:08 +00:00
Oreille
9dda9caddb Enable end-to-end tests for Oracle and SQLite (#11094)
* Enable end-to-end tests for Oracle and SQLite

* Add Oracle back to allVendors

* Use yum

* Use dnf

* Actually use yum

* Actually use dnf

* Actually use yum

* Try again

* Try manual install

* Fix env declaration

* Bump knex version (because https://github.com/knex/knex/issues/4844)

* Set max pool size for Oracle

* Add awaitDatabaseConnection

* Cache install and build step

* Run different tests sequentially

* Fix workflow name

* Show test results

* Fix names

* Fix success check

* Fix outputs

* Add oracle driver install

* Fix env

* Revert to previous structure to benchmark performance

* Only build specs and drive packages for unit tests

* Don't install everything to run linters

* Use this branch

* Fix missing lint dep

* Revert "Don't install everything to run linters", also build shared package

* Skip app build for tests

* Don't serve app for e2e tests

* Change time fields to timestamp becaues of inconsistencies between vendors

* Make npm ci faster

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-01-19 13:00:44 -05:00
renovate[bot]
054c085f74 Update Node.js to v16.13.2 (#11086)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-17 14:34:35 -05:00
Jay Cammarano
00a838f020 Docs for testing the API (#10275)
* mock-knex

* test on the migrations run started.

* test passing for run.up()

* reorganize /tests/ to allow integration tests

* e2e setup changes

* e2e jest.config moved

* e2e paths fixed, integration config

* add nonadmin role and user seed+migration

* auth/login w/ documentation (docs will be moved)

* update user seed

* add postgres10 to the ci?

* argon2 saves the day

* items tests passing with postgres10 support

* removed comments

* move generateHash out of directus_users

Co-authored-by: Jay Cammarano <jaycammarano@gmail.com>
2021-12-10 14:58:51 -05:00
renovate[bot]
b2dffeb4de Update Node.js to v16.13.1 (#10319)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-06 10:08:54 -05:00
renovate[bot]
241dc13c65 Update NPM dependencies (non-major) (#9968)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-22 10:05:40 -05:00
renovate[bot]
ad3a503f25 Update NPM dependencies (non-major) (#9585)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-09 11:18:41 -05:00
renovate[bot]
39918a1c6b Update NPM dependencies (non-major) (#9506)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-06 16:15:32 -04:00
renovate[bot]
88f1684803 Update dependency knex to v0.95.13 (#9378)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-02 20:10:00 -04:00
renovate[bot]
a58bedafb5 Update typescript-eslint monorepo to v5.3.0 (#9317)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-01 18:06:35 +00:00
renovate[bot]
366eb3e775 Update dependency knex to v0.95.12 (#9208)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-01 14:04:25 -04:00
renovate[bot]
195e46fe32 Update dependency npm to v8.1.2 (#9221)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-01 12:43:09 -04:00
Rijk van Zanten
41abc23922 Update package.json 2021-10-29 17:26:27 -04:00
Rijk van Zanten
58f1c7621f Update package.json 2021-10-29 17:25:32 -04:00
renovate[bot]
641ee9f97c Update dependency simple-git-hooks to v2.7.0 (#9195)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-27 18:32:52 -04:00
renovate[bot]
d4af01bf5a Update dependency lint-staged to v11.2.6 (#9175) 2021-10-26 19:58:22 -04:00
renovate[bot]
ccc8042df8 Update Node.js to v16.13.0 (#9174)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-26 18:33:34 +00:00
renovate[bot]
76ba6f1bc6 Update dependency stylelint to v14.0.1 (#9168)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-26 12:52:00 -04:00
renovate[bot]
93481302e6 Update dependency lint-staged to v11.2.5 (#9155)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-26 09:49:06 -04:00
renovate[bot]
01e091e27f Update typescript-eslint monorepo to v5.2.0 (#9133)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-26 06:18:51 +00:00
renovate[bot]
8f7b8e863f Update dependency oracledb to v5.3.0 (#9042)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-26 06:13:37 +00:00
renovate[bot]
1c0d17d48e Update dependency eslint to v8.1.0 (#9091)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-26 06:10:11 +00:00
renovate[bot]
1d2f139bb6 Update dependency ts-node to v10.4.0 (#9083)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-26 03:25:06 +00:00
renovate[bot]
1a1eca43dd Pin dependency stylelint-config-standard to 23.0.0 (#9140)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 22:35:22 -04:00
renovate[bot]
54ba54d3d6 Update dependency stylelint to v14 (#9016)
* Update dependency stylelint to v14

* Update dependency stylelint-scss to v4

* Update dependency stylelint-order to v5

* Undo command change

* Update stylelint command

* Use modern color syntax

Who knew this was already supported everywhere? Awesome!!

* Update stylelint-config-standard

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-10-25 22:26:57 -04:00
renovate[bot]
8e89110ac2 Update dependency stylelint-config-standard to v23 (#9026)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 21:36:26 -04:00
renovate[bot]
24bbe3114c Update dependency axios to v0.24.0 (#9132)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 20:52:06 -04:00
renovate[bot]
ade9d0c822 Update dependency lint-staged to v11.2.4 (#9100)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 20:38:09 -04:00
renovate[bot]
3402869a45 Update Node.js to v16.12.0 (#9137)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 20:29:45 -04:00
renovate[bot]
a257f324c0 Update dependency rollup to v2.58.3 (#9114)
* Update dependency rollup to v2.58.3

* node version

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jay Cammarano <jay.cammarano@gmail.com>
2021-10-25 18:45:12 -04:00
renovate[bot]
667341ad99 Update dependency npm to v8 (#8625)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 16:15:13 -04:00
renovate[bot]
f8587497d8 Update dependency ts-node to v10.3.1 (#9025)
* Update dependency ts-node to v10.3.1

* Update package-lock

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-10-21 15:10:39 -04:00
renovate[bot]
cce1c05b4c Pin dependencies (#8980)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 16:42:15 -04:00
Jay Cammarano
a379c77280 E2E Factories and Testing Migration and Seeding (#8912)
* added faker

* added factories and tests

* removed unnecessary factory

* new schema

* seedTable test

* included all dbs in db relevant tests

* json string for insert in dbs that aren't postgres

* added organizer

* polished up geometry types

* added raw option to seedTable return

* forgot await disonnect

* createMany func with test

* remove an only

* createMany w/ options for relations and tests

* tests for json field

* removed an only

* json support

* factories working, ignore tests leaving for future
2021-10-20 17:24:34 +00:00