From 9f9c84a800fa065e58eae7ed04003da27d98b87f Mon Sep 17 00:00:00 2001 From: Rijk van Zanten Date: Mon, 25 Jul 2022 17:53:27 -0400 Subject: [PATCH] Fix import logic failing .d.ts files (#9) Fixes #1 --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 8c835ed..2208b3b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -143,10 +143,11 @@ export default async function (argv: string[]): Promise> { loading.state = true; - // no exclusions runtime.addDefaultPlugin(path.join(__dirname, 'cli'), { name: 'directus', hidden: false, + extensionFilePattern: hasTsNode() ? [`*.{js,ts}`, `!*.test.{js,ts}`] : [`*.{js}`, `!*.test.{js}`], + commandFilePattern: hasTsNode() ? [`*.{js,ts}`, `!*.test.{js,ts}`] : [`*.{js}`, `!*.test.{js}`], }); runtime.addPlugin('./node_modules/directus/dist/cli/new', {