mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
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:
@@ -2,13 +2,13 @@ import { Router } from 'express';
|
||||
import asyncHandler from '../utils/async-handler';
|
||||
import { RouteNotFoundException } from '../exceptions';
|
||||
import { getExtensionManager } from '../extensions';
|
||||
import { respond } from '../middleware/respond';
|
||||
import { depluralize, isIn } from '@directus/shared/utils';
|
||||
import { Plural } from '@directus/shared/types';
|
||||
import { APP_OR_HYBRID_EXTENSION_TYPES } from '@directus/shared/constants';
|
||||
import ms from 'ms';
|
||||
import env from '../env';
|
||||
import { getCacheControlHeader } from '../utils/get-cache-headers';
|
||||
import { respond } from '../middleware/respond';
|
||||
import { depluralize, isIn } from '@directus/shared/utils';
|
||||
import { Plural } from '@directus/shared/types';
|
||||
import { EXTENSION_TYPES } from '@directus/shared/constants';
|
||||
|
||||
const router = Router();
|
||||
|
||||
@@ -17,7 +17,7 @@ router.get(
|
||||
asyncHandler(async (req, res, next) => {
|
||||
const type = depluralize(req.params.type as Plural<string>);
|
||||
|
||||
if (!isIn(type, APP_OR_HYBRID_EXTENSION_TYPES)) {
|
||||
if (!isIn(type, EXTENSION_TYPES)) {
|
||||
throw new RouteNotFoundException(req.path);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user