Commit Graph

7 Commits

Author SHA1 Message Date
Nicola Krumschmidt
ec3832d337 Make directus:extension.hidden optional (#8593)
This field will be used in conjunction with pack extensions
to be able to hide extensions that are only usable as part of a pack.
There is no need to make the field required, though.
2021-10-06 17:52:57 +02:00
Jay Cammarano
2be2c36dc2 Unit tests for get-extensions.ts (#8470)
* root removed

* get extensions passing, 95% coverage

* removed root

* fixed root on listExtensionsChildren
2021-10-01 11:01:33 -04:00
Jay Cammarano
e7b4153028 Tests for listFolders, resolvePackage (#8356)
* listFolders test passing 100% coverage

* added tmp package

* listFolders test updated to use random temp folder

* add package tmp to workspace

* tmp as dev dependency

* direct imports

* resolve-packages passing 100% coverage

* fixed tmpdir location in list-folders

* Pin tmp

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-09-28 19:10:08 -04:00
Jay Cammarano
732e631ccc Tests for validatePayload, generateExtensionsEntry, and ensureExtensionsDir (#8353)
* Passing tests

* filter operators working

* generateExtensionsEntry tests passing, 100% cov

* validatePayload tests passing, 100% coverage

* fixed typo

* changed folder to remove conflicts w/ other tests

* removed unfinished test

* remove => removeSync

* using tmp package for folder gen

* added tmp to workspace

* reset timers after use

* Update packages/shared/src/utils/node/generate-extensions-entry.test.ts

Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>

* Update packages/shared/src/utils/node/generate-extensions-entry.test.ts

Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>

* tmp => dev dependancy

* moved before/after into describe

* moved rootdir var into describe

* removed unused file

* explicit imports

Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
2021-09-28 18:58:48 -04:00
Nicola Krumschmidt
aca8c1078e Only loads app extensions if SERVE_APP is true (#7275)
This also ensures API/App only load their respective extensions in dev.
2021-08-09 09:44:27 -04:00
Rijk van Zanten
92e1ee77bd Add support for Conditional Fields (#6864)
* Add conditions field to directus_fields

* Add conditions configuration

* Apply conditional overrides

* Handle conditions in nested groups

* Fix reverse mutating conditions

* Start on filter setup interface

* Move field types/constants to shared

* [WIP] Updated client side filter validation

* Support logical operators in client validation step

* Use new validation util in conditions check

* Add nesting in filter seutp

* Add filter rule setup configurator

* Fixes that should've been done in the merge

* Strip out filter-settings interface

TBD in a new PR

* Move browser to index
2021-07-26 18:02:24 -04:00
Nicola Krumschmidt
32972f4c01 Move define extension functions to shared and expose them through extension-sdk (#6880)
* Move defineInterface to shared

* Split up utils into node and browser utils

* Move defineDisplay to shared

* Move defineLayout to shared

* Move defineModule to shared

* Add defineEndpoint and defineHook to define-extensions

* Expose define extension functions through extension-sdk

* Make route type of defineEndpoint more specific

* Simplify define extension functions

* Deduplicate types and local types definition

* Do not allow functional components in display handler

* Make interface options nullable

* Deduplicate extension types definition

* Fix utils/node exports
2021-07-22 17:02:29 +02:00