Commit Graph

1982 Commits

Author SHA1 Message Date
rijkvanzanten
47a5da78fb v9.5.2 2022-02-18 11:45:07 -05:00
Abdón Rodríguez Davila
3de9bc1ada Update rollup-plugin-styles to v4 (#11689)
* Update rollup-plugin-styles to v4

* Update Rollup packages
2022-02-18 11:25:50 -05:00
Azri Kahar
eb2bb24141 validate first user email during installation (#11682) 2022-02-17 09:18:27 -05:00
ian
773ef6dda9 Prevent creation of relationships on primary keys (#11441)
* Prevent creation of relationships on primary keys

* Use schema instead of schemaInspector
2022-02-16 15:17:33 +00:00
ian
4fd26f2b60 Prevent selection of Foreign Keys for collection sort (#11444) 2022-02-16 09:40:01 -05:00
Aiden Foxx
40ec322998 Merge token claims and userinfo in openid flow (#11656)
* Merge token claims and userinfo in openid flow

* Keep linter happy
2022-02-15 17:54:59 -05:00
Oreille
c0fab454fd Explicitly set column nullable when unspecified (#11572) 2022-02-10 11:41:55 -05:00
ian
4a4b35b19a Add shares to app access minimum permissions (#11560) 2022-02-10 17:37:10 +08:00
Azri Kahar
5bfd424c2d fix directus_notifications permissions fields (#11525) 2022-02-08 16:27:54 -05:00
Nitwel
8af5ddfceb Fix not being able to delete folder in data-model (#11432)
* fix not being able to delete folder in data-model

* add e2e tests

* fix e2e tests

* fix e2e tests
2022-02-04 13:13:42 -05:00
rijkvanzanten
c0c412d30b v9.5.1 2022-02-03 20:41:49 -05:00
Rijk van Zanten
eee8725140 Resolve transaction unreliability issues in schema alterations (#11279)
* Start with test setup

* Reorder operations in transaction

Prevent dead roaches

* Fix test post payload

* Fix tests for real now?
2022-02-03 20:34:00 -05:00
Rijk van Zanten
79ce3c8765 Add parsePreset helper function (#11423) 2022-02-04 00:29:28 +00:00
Oreille
2d0c23d3c2 Prevent MySQL collation errors (#11069)
* Set charater set to utf8mb4

* Don't exit application when misconfigured collation

* Check all table and columns for inconsistencies with database default collation

* Tweak wording

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-02-03 17:49:39 -05:00
Nicola Krumschmidt
35ee3f4151 Add a few missing DefinitelyTyped dependencies (#11381) 2022-02-02 03:47:28 +01:00
Aiden Foxx
4e0c27db73 Fixed issue when updating columns in Oracle (#11359)
* Fixed issue when updating columns in Oracle

* Fix lint error

* Removed optional chaining
2022-01-31 13:47:06 -05:00
Azri Kahar
9ac1bb146c Fix update file endpoint (#11347)
* fix files patch request

* add multipart/data to file Patch request specs
2022-01-31 10:31:21 -05:00
Azri Kahar
cb8b71f263 Remove unused variables for lint checks (#11319) 2022-01-28 12:52:29 +00:00
Jay Cammarano
d8c9257058 Bearer token no longer case sensitive for API authenticatiom (#11307)
* seemingly fixes issues/11300

* Add unit tests for extract-token

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-01-27 14:28:26 -05:00
Rijk van Zanten
bac787aeed Fix PG10 support in knex-schema-inspector (#11268) 2022-01-25 19:51:26 +00:00
Rijk van Zanten
7164dd8ae3 Return empty string as empty array in CSV type (#11256)
* Fix empty strings in CSV being returned wrong

Fixes #11194

* Add tests for CSV
2022-01-25 00:47:57 +00:00
rijkvanzanten
78a25fe953 v9.5.0 2022-01-24 15:53:29 -05:00
rijkvanzanten
eb2af9cfb9 Split up integration / unit tests 2022-01-24 15:11:13 -05: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
Silvio
e88cebd8e6 fix for filtering nested M2M relations (#11159) 2022-01-24 14:01:20 -05:00
Rijk van Zanten
47f71bd60b Update knex-schema-inspector (#11238) 2022-01-24 12:05:54 -05:00
ian
191d72c156 Fix nested transactions on SQLite (#11227)
* Fix nested transactions on SQLite

* Increase MSSQL request timeout
2022-01-24 10:16:32 -05:00
Nicola Krumschmidt
aa5da81fc0 Remove no-break space characters with regular spaces (#11232)
There are quite a few other occurrences all over the translation files,
some of which feel intentionally placed.
2022-01-24 09:43:57 -05:00
Rijk van Zanten
973e2dc6bb Update knex-schema-inspector (#11203) 2022-01-21 09:38:27 -05:00
Rijk van Zanten
88c87f3920 Set CRDB options to avoid inconsistencies between vendors (#11193)
* Set correct CRDB options

* Add missing SETs to pool config for e2e

* How about now

* Better solution for the same problem
2022-01-20 20:18:22 -05:00
rijkvanzanten
3cbe86d3f1 Mark CRDB as beta, mark oracle as ga 2022-01-20 18:29:08 -05:00
Nicola Krumschmidt
889668f972 Remove API extension types from the API (#11191)
There is little value in keeping these types inside the API package.
We should instead focus on improving the types in shared.
2022-01-20 22:19:52 +00:00
Azri Kahar
6368f641e5 Add CSV/JSON Import capability via App (#11050)
* Allow import data to collections via App directly

* clear file input after import

* tweak translations

* reduce vertical gap

* fix clear file input logic

* Change export data button text

* update start import button disabled color

* undo unintended changes to translations quotes

* add docs for importing items sidebar

* update exporting items docs

* Combine import/export sidebar details

* Remove unused import detail

* Fix docs

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-01-20 16:57:29 -05:00
Michael Schramm
75b5f33727 Implement CockroachDB support (#10113)
* base changes for cockroachdb

* allow creating of tables

* allow deleting of fields

* allow deleting of tables

* rebase

* fix migrations

* bump knex-schema-inspector to 1.7.0

* Update package-lock

* Add cockroach to debugging docker-compose file

* Remove unused import

* Tweak name in example.env

* Force nullable primary keys in cockroach

* Tweak shares migration to run on cockroach

* Rename var for clarification

* suggestion for migration helper

* change to schema and update remaining migrations

* Remove custom cockroach schema in favor of sharing with pg

* Fix migrations for CockroachDB

* Hopefully fix Oracle migrations 🤞🏻

* Make ~~aiden~~ oracle happy

* Resolve branching paths in migrations

* Enable tests for cockroach

* Fix test config

* One more config change for good measure

* Adjust test to match cockroach's bigint auto-int structure

* Increase request timeout for mssql

* Update api/src/database/helpers/schema/types.ts

Co-authored-by: Aiden Foxx <aiden.foxx.mail@gmail.com>

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Oreille <33065839+Oreilles@users.noreply.github.com>
Co-authored-by: Aiden Foxx <aiden.foxx.mail@gmail.com>
2022-01-20 14:14:38 -05:00
John Huffsmith
e7ada1f173 Moving schema and relation types into shared package (#11179)
* moving schema and relation types into shared package

* updating SchemaOverview imports

* removing duplicate import
2022-01-20 13:36:19 -05:00
Aiden Foxx
ccd91de8c5 Removed unused session data (#11167) 2022-01-19 18:35:46 +00:00
Nicola Krumschmidt
b96fb77cbf Clean up emitting "items" events (#11163) 2022-01-19 13:17:48 -05:00
Azri Kahar
c40585c9c8 fix onIn values (#11129) 2022-01-19 11:36:16 -05:00
Aiden Foxx
f61ed2fb26 Fixed broken auth SQL on Oracle (#11077)
* Fixed broken auth SQL on Oracle

* Fix JS context issue

* Make linter happy
2022-01-17 16:25:56 -05:00
Aiden Foxx
35564ff36d Removed OpenID token fetching from OAuth flow (#11079)
* Removed OpenID token fetching from OAuth and unified logging

* Removed full-stops from logging
2022-01-17 14:41:59 -05:00
Nicola Krumschmidt
5ba34720e6 Only watch entrypoints of local extensions for changes (#11113)
Ref #11095
2022-01-17 18:24:16 +00:00
Nicola Krumschmidt
d95fc2327c Handle errors while pre-bundling App extensions more gracefully (#11112)
Fixes #11095
2022-01-17 13:14:02 -05:00
Azri Kahar
74bb4a7c9a Add Unsupported Media Type Exception (#11096)
* add unsuported media type exception

* throw error when not multipart/form-data

* use unsupportedMediaType when checking import file

* add `UNSUPPORTED_MEDIA_TYPE` to Error Codes docs
2022-01-17 10:09:26 -05:00
keesvanbemmel
ee7e678f24 Adds possible extra pino logger options through env vars (#10911)
* Added missing data field to sessions yaml

* rebased sessions.yaml

* Added custom pino logger options from env vars

* Added LOGGER_ explanation to docs

* Added similar functionality for pino http, so level of request logs can be set
2022-01-12 10:41:28 -05:00
Joe Innes
987442c03a Allow passing 'version' to Knex (#10960)
* Allow passing 'version' to Knex

* Exclude version from being passed into connection object
2022-01-10 17:23:35 +00:00
Nicola Krumschmidt
c2eefc524f Delete required hooks only once (#10955)
* Add dedicated options object to ExtensionManager

* Delete required hooks only once
2022-01-10 15:27:30 +00:00
rijkvanzanten
65bfe68b0c v9.4.3 2022-01-07 16:11:24 -05:00
Nicola Krumschmidt
42f26dc55f Add extension auto reloading to the API (#10881)
* Add extension auto reloading to the API

This can be enabled by using the `EXTENSIONS_AUTO_RELOAD` env var.

* Add logger message indicating watch mode

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-01-06 20:02:43 +00:00
Rijk van Zanten
e4db9b2f05 Fix refresh token payload structure on shared refresh (#10875)
Fixes #10822
2022-01-05 15:59:27 -05:00
Azri Kahar
60d3e12218 Add CSP directives for MapLibre to work (#10852) 2022-01-05 10:49:45 -05:00