295 Commits

Author SHA1 Message Date
rijkvanzanten
51b1daec58 v9.21.1 2022-11-28 15:09:00 -05:00
Pascal Jufer
ad69b4b264 Fixup: Re-add entrypoint type definition files in @directus/shared (#16641) 2022-11-28 14:50:29 -05:00
Pascal Jufer
62b4a2413c Re-add entrypoint type definition files in '@directus/shared' (#16606) 2022-11-24 15:37:13 -05:00
Pascal Jufer
47db8e5d2f Clean-up dependencies (#16481)
* Clean-up api

- Remove unnecessary deps
- rimraf -> del-cli

* Clean-up app

- bytes -> pretty-bytes
- Remove ms as we already have pretty-ms
- Remove other unnecessary deps
- Add storybook build to gitignore

* Clean-up drive packages

- Simplify cleanup scripts
- rimraf -> del-cli
- Remove unnecessary deps

* Clean-up schema

- Remove unnecessary dep (lodash)
- Replace 'npm-watch' with native watch mode

* Clean-up shared

- Remove unnecessary dep (c8, adding @vitest/coverage-c8 will be addressed in
  other PR)
- rimraf -> del-cli
- npm-run-all -> concurrently

* Clean-up root

- Add missing eslint-plugin-jest dep
- listr -> listr2

* Make build output a bit friendlier

* Remove cleanup scripts

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-11-18 17:02:41 +00:00
rijkvanzanten
ba00c28bf3 v9.21.0 2022-11-17 16:31:59 -05:00
Azri Kahar
ed53673b0f Fix condition operation passing even when the checked field isn't present in the payload (#16483)
* use requireAll in validatePayload for condition

* add/update tests
2022-11-17 10:55:43 -05:00
Rijk van Zanten
0bb34f0f0d Patch Tuesday 🐸 (#16475)
* Update monorepo root

* Update API dependencies

* Use unranged version

* Update app deps

* Upgrade packages dependencies

* Fix shared build

* Fix type warning in api

* Fix test runner

* Get rekt by ya boy comma-,

* Fix missing unit deprecation for sass color.mix()

Co-authored-by: ian <licitdev@gmail.com>
2022-11-17 08:51:42 -05:00
Azri Kahar
6f8f5219af fix list-folders test on Windows (#16484) 2022-11-17 08:17:44 -05:00
Nicola Krumschmidt
7bf90efa62 Add support for a package extension bundle type (#15672)
* Add bundle type to constants and types

* Add support for API bundle extensions

* Rename generateExtensionsEntry to generateExtensionsEntrypoint

* Add support for App bundle extensions

* Refactor App extension registration

* Replace extensions inject with useExtensions()

* Replace getInterfaces() with useExtensions()

* Replace getDisplays() with useExtensions()

* Replace getLayouts() with useExtensions()

* Replace getModules() with useExtensions()

* Replace getPanels() with useExtensions()

* Replace getOperations() with useExtensions()

* Add useExtension() composable

* Replace useExtensions() with useExtension() where applicable

* Remove interface getters

* Remove display getters

* Remove layout getters

* Remove module getter

* Remove panel getters

* Remove operation getters

* Rename extension register.ts files to index.ts

* Perform module pre register check in parallel

* Remove Refs from AppExtensionConfigs type

* Remove old extension shims

* Ensure registration of modules is awaited when hydrating

* Add support for scaffolding package extensions

* Add support for building bundle extensions

* Add JsonValue type

* Use json for complex command line flags

* Load internal extensions if custom ones are not available

* Fix extension manifest validation for pack extensions

* Fix tests in shared

* Add SplitEntrypoint type

* Move command specific utils to helpers

* Add SDK version getter

* Move extension dev deps generation to helpers

* Move template path to getter util

* Move template copying to a helper

* Only rename copied template files

* Add directus-extension add command

* Convert provided extension source path to url

* Replace deprecated import.meta.globEager

* Mock URL.createObjectURL to make App unit tests pass

* Update rollup-plugin-typescript2

* indentation

* sort vite glob imported modules

* fix unintentional wrong commit

* Simplify app extension import logic

* reinstall @rollup/plugin-virtual

* add test for getInterfaces() expected sort order

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2022-11-16 11:28:52 -05:00
Pascal Jufer
adeabdfe7b Clean-up and unify all package.json files (#16447)
* Clean-up & unify all package.json files

* Sort all package.json files the same way

Using 'sort-package-json'

* Add funding link to packages
2022-11-15 11:35:28 -05:00
Pascal Jufer
df495edae0 Exclude unnecessary files from packages (#16374)
* Exclude unnecessary files from packages

* Add back 'copyfiles' in api to copy yaml and liquid files to dist

* Exclude declaration maps and all declaration files for drive packages

Excluding all declaration map files from published packages

Since the "drive" packages are only expected to be used internally, it's
enough to have the declaration files present when developing locally - no
need to include the types in the published packages

* Remove unnecessary entries in "files" field of app/package.json

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-11-15 09:51:04 -05:00
ian
13d8dde534 v9.20.4 2022-11-03 11:01:46 +00:00
rijkvanzanten
c70211c48d v9.20.3 2022-11-02 12:12:52 -04:00
rijkvanzanten
d09d087fc9 v9.20.2 2022-11-02 08:56:09 -04:00
rijkvanzanten
b5d7db2ea0 v9.20.1 2022-11-01 21:36:16 -04:00
rijkvanzanten
15613d5853 v9.20.0 2022-11-01 19:08:33 -04:00
rijkvanzanten
7a5560cf97 v9.19.2 2022-10-24 09:56:51 -04:00
rijkvanzanten
228a5ca15f v9.19.1 2022-10-22 13:10:18 -04:00
rijkvanzanten
d286bd7fb7 v9.19.0 2022-10-21 15:40:44 -04:00
Rijk van Zanten
2d104e933b Patch Tuesday 🐸 (#16052)
* Update API non-majors

* Update major changes

* Temp fix for type warning in sdk

* Resolve missing new keyword in GraphQLNonNull use

* Lock versions in api

* Update and lock versions in shared

* Update lockfile

* Fix build type errors in api

* Update app patches/minors

* Upgrade major versions

* Lock versions

* Upgrade root deps

* Update packages

* Switch from pino-colada to pino-pretty

* Update snapshots

* Fix globby sync usage

* Remove globals from jest config

* No ranges

* Revert "Remove globals from jest config"

This reverts commit e249e2c8fe.

* Revert "Upgrade root deps"

This reverts commit 62add28a85.

* Update non-jest stuff

* We'll keep trying

* Update globby to latest minor only

* Test on all vendors

* Revert test on all vendors

* Fix linting

* Preserve request log format

* Preserve existing timestamp format and allow configuration

* Use lodash merge to allow for nested objects

Co-authored-by: ian <licitdev@gmail.com>
2022-10-20 09:31:17 -04:00
Nicola Krumschmidt
13f4ec027d Replace raw templates deeply when applying data to options (#15946)
* Add JsonValue type

* Replace raw templates deeply when applying data to options

* Add tests for applyOptionsData

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-10-18 23:03:06 +02:00
Nitwel
924b4199e6 Make watch be triggered immediately (#15758)
* Make watch be triggered immediately

* Fix linter warning

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-10-14 22:52:13 -04:00
Nicola Krumschmidt
215a47c19b Allow usage of tupels of arbitrary length with DeepPartial (#15947) 2022-10-12 14:17:08 -04:00
Roger Stringer
3761abf1f0 adds missing graphQL operators (#15760)
* missing icontains for strings, missing eq, neq for geo, missing in, nin for dates

* fix unit test

* fix unit test part 2

* Update packages/shared/src/utils/get-filter-operators-for-type.ts

Co-authored-by: ian <licitdev@gmail.com>

* fix tests?

* fix tests?

Co-authored-by: ian <licitdev@gmail.com>
2022-09-27 10:16:37 -07:00
rijkvanzanten
cb3d775c4e v9.18.1 2022-09-22 17:12:51 -04:00
Maxim
efdeded18a Implemented an option to filter m2a fields using graphql. (#15162)
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-09-22 13:00:52 +02:00
rijkvanzanten
8f5750c5c1 v9.18.0 2022-09-19 09:39:58 -04:00
Nicola Krumschmidt
d68a8768fa Add a pathToRelativeUrl util function (#15578) 2022-09-14 15:01:31 -04:00
Azri Kahar
9b24233aa4 Handle Date objects in compress util (#15547) 2022-09-13 13:41:17 -04:00
rijkvanzanten
7e3ece5d9f v9.17.4 2022-09-06 16:59:25 -04:00
rijkvanzanten
2cb00e8809 v9.17.3 2022-09-06 14:16:25 -04:00
rijkvanzanten
a04b733504 v9.17.2 2022-09-06 10:54:03 -04:00
rijkvanzanten
a17a0f4fb9 v9.17.1 2022-09-05 11:38:28 -04:00
rijkvanzanten
200c2dd2c7 v9.17.0 2022-09-02 16:17:56 -04:00
Nitwel
5fe28db539 Add Components Package (#15094)
* move components without dependencies to packages

* make every components use vue script setup

* move components and utils from shared to @directus/components

* fix imports

* move over some more components

* get rid of unnecessary isEmpty and notEmpty

* move pagination

* fix missing !

* move groupable components

* move text-overflow and useElementSize

* fix icons not being shown

* add first unit tests

* remove capitalizeFirst

* simple cleanup

* add css-var unit test

* move over most other components

* make every component use script setup

* add some more unit tests

* add more tests and burn v-switch to the ground. 🔥

* add checkbox tests

* start with next test

* add storybook

* add more pages to storybook

* add final stories

* fix stories actions

* improve action fix

* cleaning props and adding tests

* unit tests -.-

* add some documentation to components

* Add docs to each prop

* clean storybook paths

* add more unit tests

* apply v-select fix

* update lock file

* small tweaks

* move back to shared

* fix imports

* fix imports

* cleaning

* stories to typescript

* Fix version number

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-09-01 16:07:31 -04:00
Rijk van Zanten
f834605a13 Move get-with-arrays to shared (#15332)
* Move get-with-arrays to shared, add fallback

* Just fallback to undefineds, let the usage handle fallbacks
2022-08-30 17:21:07 -04:00
Gerard Lamusse
60c5f80dd6 Don't throw error if entry is null or undefined (#15276)
* Don't throw error if entry is null or undefined

* Rely on defaultValue rather than null

* Drop custom getter

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-08-30 16:35:22 -04:00
ian
a971455216 Add origin to accountability (#15273)
* Add origin to accountability

* Remove origin column from seeds
2022-08-30 14:15:44 -04:00
rijkvanzanten
f21f8c4707 v9.16.1 2022-08-19 09:13:10 -04:00
rijkvanzanten
58f6a6fcde v9.16.0 2022-08-18 16:55:44 -04:00
Rijk van Zanten
a21b28b423 Add "Run Script" operation (#15101)
* [WIP] Start working on script operation

* WIP Remove npx-import experiment

* Don't break on string value in options scope

* WIP Add module whitelist

* Mission critical import cleanup work

* Add translated labels

* Use nodeVM for everything

Keeps the export function callback structure consistent

* Tweak wording

* WIP start on tests

* Improve typing in shared define types

* Add missing base reactive properties in server store

* Add tests for exec index in app

* Add tests

* Optimize error handling
2022-08-18 15:39:25 -04:00
Gerard Lamusse
1fedc5bdfd Fix validatePayload for _or containing _and (#14951)
* Fix validatePayload for _or containing _and

* Remove comment

* Update unit test

Co-authored-by: ian <licitdev@gmail.com>
2022-08-17 16:53:31 +08:00
Rijk van Zanten
6d08672c88 Update knex-schema-inspector to 2.0.4 (#15047) 2022-08-12 11:02:17 -04:00
Rijk van Zanten
42f5f61cd0 Fix decompression when floats are used, but no integers are present (#14985)
Fixes #14980
2022-08-09 12:10:21 -04:00
rijkvanzanten
1ebda96a69 v9.15.1 2022-08-05 14:50:06 -04:00
rijkvanzanten
3270df00c1 9.15.0 2022-08-04 18:19:19 -04:00
José Varela
cc343fdf91 Improve cache performance by compressing records (#14833)
* Utils to compress/decompress data
Gzip was chosen because we want smaller data but quick algorithm since this will be ran for every request

* Compress system cache

* Decompress system cache

* Set/Get compressed cache for individual requests

* Switch from gzip to snappy, use json compression too

* Fix cache exp set/get

* Remove unused import

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-08-04 17:35:27 -04:00
Rijk van Zanten
1300f5c3de Add compress/decompress utility functions (#14855)
* install coverage tool

* Add compressor function

* 🧹

* Finish compressor/decompressor

* Finish tests
2022-08-04 15:36:34 -04:00
Rijk van Zanten
855db5638f Tests/shared (#14836)
* Move from jest to vitest

* Move test files, cleanup imports
2022-08-03 17:26:17 -04:00
ian
3dedf1cb3f Check for allowed filter operators when applying filter (#14829)
* Check for allowed filter operators when applying filter

* Add hash type to GraphQL

* Add tests

* Specify text type
2022-08-03 14:14:19 -04:00