Commit Graph

7 Commits

Author SHA1 Message Date
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
rijkvanzanten
06014b85dd Undo move of extensions sdk 2022-07-12 15:18:50 +02:00
Rijk van Zanten
84e6277f87 Move external packages to separate repos (#14335)
* Move format title to dedicated repo

* Move CLI as well

* Move create-directus-extension

* Move create-directus-project

* Move extensions sdk

* Move gatsby-source-directus

* Move sdk

* Remove sdk from jest config

* Regen package-lock

* Add missing tmp types

* Fix test import names

* Missed one
2022-07-09 15:23:44 +02:00
Nicola Krumschmidt
6a06aa42a0 Use Composition API in extension templates (#8721)
This also includes a few other cleanups.
2021-10-12 09:22:49 -04:00
Nicola Krumschmidt
46f00d6202 Drop support for display handler functions in favor of functional components and make the routes module config required (#8475)
* Make routes in ModuleConfig required

* Make Panel options nullable

* Clean up InterfaceConfig and LayoutConfig types

* Remove DisplayHandlerFunction and rename handler to component

* Use template interpolation when registering extensions
2021-10-01 11:52:57 -04:00
Nicola Krumschmidt
2a82927423 Add support for typescript extensions to extension-sdk (#6881)
* Add support for scaffolding typescript extensions to extensions-sdk

* Add support for building typescript extensions to extensions-sdk

* Fix type issues in extension templates

* Expose types of extensions-sdk

* Add language option to create-directus-extension
2021-08-30 10:57:43 -04:00
Nicola Krumschmidt
d2ca0d094c Rename extension-sdk to extensions-sdk (#7282)
While it is never nice to rename an already published package,
this allows us to reserve the "@directus/extension-" prefix for official extensions.
2021-08-27 13:48:19 -04:00