@appxdigital/appx-core 0.1.118 → 0.1.119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -51,6 +51,9 @@ function lowerCase(name) {
|
|
|
51
51
|
return name.substring(0, 1).toLowerCase() + name.substring(1);
|
|
52
52
|
}
|
|
53
53
|
async function createAdminJsModule(adminConfig, permissionConfig) {
|
|
54
|
+
var _a;
|
|
55
|
+
// Set tmp dir to avoid dot ".adminjs" since it is not served by default on Express 5
|
|
56
|
+
(_a = process.env).ADMIN_JS_TMP_DIR ?? (_a.ADMIN_JS_TMP_DIR = 'tmp/adminjs');
|
|
54
57
|
// Due to AdminJS only allowing ESM now, we need to use dynamic imports to load the modules, this function can be found within src/backoffice/utils.ts
|
|
55
58
|
const { default: AdminJS } = await (0, utils_1.dynamicImport)('adminjs');
|
|
56
59
|
const { Database, Resource, convertParam } = await (0, utils_1.dynamicImport)('@adminjs/prisma');
|
|
@@ -227,7 +230,6 @@ async function createAdminJsModule(adminConfig, permissionConfig) {
|
|
|
227
230
|
});
|
|
228
231
|
const requestContextLayer = httpAdapter.router.stack.splice(httpAdapter.router.stack.length - 1, 1)[0];
|
|
229
232
|
httpAdapter.router.stack.splice(adminIdx, 0, requestContextLayer);
|
|
230
|
-
console.log(httpAdapter.router);
|
|
231
233
|
}
|
|
232
234
|
},
|
|
233
235
|
};
|
package/package.json
CHANGED