Merge pull request #566 from automatisch/fix/dynamic-import-fix
fix: dynamic import statements for get app
This commit is contained in:
@@ -40,7 +40,7 @@ async function getChildrenContentInDirectory<C>(
|
|||||||
const filesInSubdirectory = fs.readdirSync(appSubdirectory);
|
const filesInSubdirectory = fs.readdirSync(appSubdirectory);
|
||||||
|
|
||||||
for (const filename of filesInSubdirectory) {
|
for (const filename of filesInSubdirectory) {
|
||||||
const filePath = join(appSubdirectory, filename, 'index.ts');
|
const filePath = join(appSubdirectory, filename);
|
||||||
const fileContent = await getFileContent<C>(filePath, stripFuncs);
|
const fileContent = await getFileContent<C>(filePath, stripFuncs);
|
||||||
|
|
||||||
childrenContent.push(fileContent);
|
childrenContent.push(fileContent);
|
||||||
@@ -56,7 +56,7 @@ const getApp = async (appKey: string, stripFuncs = true) => {
|
|||||||
const appData: IApp = await getDefaultExport(`../apps/${appKey}`);
|
const appData: IApp = await getDefaultExport(`../apps/${appKey}`);
|
||||||
|
|
||||||
appData.auth = await getFileContent<IAuth>(
|
appData.auth = await getFileContent<IAuth>(
|
||||||
`../apps/${appKey}/auth/index.ts`,
|
`../apps/${appKey}/auth`,
|
||||||
stripFuncs
|
stripFuncs
|
||||||
);
|
);
|
||||||
appData.triggers = await getChildrenContentInDirectory<ITrigger>(
|
appData.triggers = await getChildrenContentInDirectory<ITrigger>(
|
||||||
|
Reference in New Issue
Block a user