Extension Improvements (#16822)

* add link command and small improvements

* put local bundles into own folder on link

* get rid of packs and add bundle support for local extensions

* make bundle type extensions work locally and remove traces of pack

* fix hot reloading of bundles

* fix app.js not refreshing

* fixed linter errors

* add endpoint to install extensions

* update package.json validation and support top level extensions

* update endpoints

* added some URL escapes and ran linter

* remove installation part

* readd endpoint

* update dependencies

* fix types and validation in extension-sdk

* run linter

* fix linter

* add defaults to manifest

* Added missing constant export

* ensure all the extension folders

* ignore unneeded vite error

* update linking process

* run parser separate

* add await

* fixed linter errors

Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
This commit is contained in:
Nitwel
2023-01-04 15:20:33 +01:00
committed by GitHub
parent 9f06c36e0d
commit 2ac022d286
25 changed files with 382 additions and 607 deletions

View File

@@ -27,7 +27,7 @@ const onDehydrateCallbacks: (() => Promise<void>)[] = [];
export async function loadExtensions(): Promise<void> {
try {
customExtensions = import.meta.env.DEV
? await import('@directus-extensions')
? await import(/* @vite-ignore */ '@directus-extensions')
: await import(/* @vite-ignore */ `${getRootPath()}extensions/sources/index.js`);
} catch (err: any) {
// eslint-disable-next-line no-console