Merge pull request #566 from automatisch/fix/dynamic-import-fix

fix: dynamic import statements for get app
This commit is contained in:
Ömer Faruk Aydın
2022-10-07 19:21:41 +03:00
committed by GitHub

View File

@@ -40,7 +40,7 @@ async function getChildrenContentInDirectory<C>(
const filesInSubdirectory = fs.readdirSync(appSubdirectory);
for (const filename of filesInSubdirectory) {
const filePath = join(appSubdirectory, filename, 'index.ts');
const filePath = join(appSubdirectory, filename);
const fileContent = await getFileContent<C>(filePath, stripFuncs);
childrenContent.push(fileContent);
@@ -56,7 +56,7 @@ const getApp = async (appKey: string, stripFuncs = true) => {
const appData: IApp = await getDefaultExport(`../apps/${appKey}`);
appData.auth = await getFileContent<IAuth>(
`../apps/${appKey}/auth/index.ts`,
`../apps/${appKey}/auth`,
stripFuncs
);
appData.triggers = await getChildrenContentInDirectory<ITrigger>(