* add embed hook definitions
* inject embeds in the App html
* fixed typo
* removed unnecessary env parameter
* Added comment marking the custom embeds
* attempt to add test for createApp
* mock db in app test
* temporarily set log style to raw in test
* one more round
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
* add forced uppercase for UUIDs in MS SQL
* test whether mssql returned uuid is uppercase
* use once just for slight better correctness
* once is actually not enough
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
* applied the same role fix too users invite
* added same fix when saving permissions
* Prevent loading users unecessarily on the permission page
* Added proper `deep` query typing
* fixed typing for tests
* apply similar fix for navigation folder
* fix: adds missing Query and x-metadata to /components/schemas
* test: adds Query and x-metadata to specifications.test.ts
* refactor: moves oas schemas to be always included to constants.ts
* refactor: renames OAS_INCLUDE_SCHEMAS to OAS_REQUIRED_SCHEMAS
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
* Use node16 module-resolution
* Lets not mess with apply-query rn
* I love CJS. Death to CJS.
* Use CJS require in hook import
* Fix type export in schema
* Clean up defaults usage
* Use require instead of import for migrations
* Use a vitest compatible dynamic import
* Uno mas
* Cleanup type export
* force logger in sync mode when running on the CLI
* using the sync logger for all cli commands
* using cli logger for app initialization
* using pino pretty for log formatting
* installed deps
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
* Propagate mutation options for schema apply
* Fix unit test
* Add bypassCache flag and remove flushCaches calls
* remove accountability option from getSchema
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
* Remove relation for legacy permission without allowed field
* Remove deprecated formatError and improve error handling
* Add unit test
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* 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>
* 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>
* build: ➕ add vitest and update test scripts
* build: 🔧 add vitest config
* build: ✅ Migrate tests to vitest
Remove jest references from test api test files and replace with vitest equivalents.
Tests: 13 tests are failing.
* build: 🚚 move vite.config.ts to api/src folder
* build: 🔥 remove unused vitest.config from api root
* build: ✅ import vitest modules for tests
* build: ✅ add type conversion for actual object
* Finish switch from Jest to Vitest in API
* Replace some leftovers
* Load "sharp" before tests
* Try with cjs
* Temporary enable verbose reporter
* Try with globalSetup
* Fix path to globalSetup
* Provide default export in globalSetup
* Final clean-up
* Remove @vitest/ui & update vitest to 0.25.0
* Add vitest c8 coverage dependency
* Update vitest to v0.25.1
* Replace unnecessary Vitest workaround
* Rework new tests
* Resolve build errors
Co-authored-by: Dorian C Brown <brown.3794@gmail.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* allow admin to update `provider` & `external_id`
* remove unused external_id field
* test for provider and external_identifier
* remove unused test code
* Check original field name when aliased
* Rename to aliasMap
* Extract original field name
* Refactor for legibility
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* Fix linting
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Fix date functions for databases not in UTC timezone
* Fix passing raw date objects to DB
* Add unit test
* Use global timezone for mysql and maria
* Fix unit test timezone inconsistency as date object is in local timezone
* Date and datetime fields should be in local timezone
* Fix missing padStart in local string
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* use a different constraint name whyen recreating constraints for cockroachdb
* implement cockroach specific logic in the appropriate helper
Co-authored-by: ian <licitdev@gmail.com>
* fix email base template footer link
* fix logo box to be square
* clean up unused classes & attributes
* only add url if user has app access
* add test for notifications service
* re-add database mock
* attempt to fix mock in test
* mock PUBLIC_URL
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* Update last payload when triggering array values
* Reuse keyedData when triggering other flows
* Expose flows data chain variables in run script operation
* Fix unit test
* Separate context for child flows
* Remove global variables from run script operation
* Simplify by using omit
* Default virtual fields as alias type
* Make the condition more verbose instead of defaulting
* Remove unnecessary optional chaining
* Add tests
* Revert to alias defaulting in #d06d62
* Shift condition up
* 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>
* Allow both POST and GET responses in OAuth flow
* Be more explicit about which method we fetch OAuth data from
* Removed unnecessary error handling in OAuth router
* Fixed method check in OAuth router
* Simplified method check
* Added POST support to OpenID flow
* Prefer redirect on OpenID POST to retain LAX cookie policy
* Prefer redirect on OAuth2 POST to retain LAX cookie policy
* Update api/src/auth/drivers/oauth2.ts
* Update api/src/auth/drivers/openid.ts
* remove request header check in files POST
* basic test
* it's filename_download instead of file_download
* unused vars begone
* make type required when creating file via JSON
* fix blackbox test
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* Prevent changing to or from alias type
* Prevent infinite delete loop
* Display error when saving
* More validation for M2M and M2A
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
* 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>