adminforth 2.58.4 → 2.58.5

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.
@@ -19,7 +19,7 @@ export const admin = new AdminForth({
19
19
  loginBackgroundImage: 'https://images.unsplash.com/photo-1534239697798-120952b76f2b?q=80&w=3389&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
20
20
  loginBackgroundPosition: '1/2',
21
21
  loginPromptHTML: async () => {
22
- const adminforthUserExists = await admin.resource("adminuser").count(Filters.EQ('email', 'adminforth')) > 0;
22
+ const adminforthUserExists = (await admin.resource("adminuser").count(Filters.EQ('email', 'adminforth'))) > 0;
23
23
  if (adminforthUserExists) {
24
24
  return "Please use <b>adminforth</b> as username and <b>adminforth</b> as password"
25
25
  }
@@ -82,7 +82,7 @@ if (fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
82
82
  admin.express.serve(app);
83
83
 
84
84
  admin.discoverDatabases().then(async () => {
85
- if (await admin.resource('adminuser').count() === 0) {
85
+ if ((await admin.resource('adminuser').count()) === 0) {
86
86
  await admin.resource('adminuser').create({
87
87
  email: 'adminforth',
88
88
  password_hash: await AdminForth.Utils.generatePasswordHash('adminforth'),
@@ -159,6 +159,7 @@ async function syncResourceColumns(filePath, content, discoveredColumns) {
159
159
  tabWidth: 2,
160
160
  useTabs: false,
161
161
  trailingComma: true,
162
+ wrapColumn: 1,
162
163
  }).code;
163
164
 
164
165
  await fs.writeFile(filePath, newContent, "utf-8");
@@ -104,6 +104,7 @@ export async function injectResourceIntoIndex({
104
104
  tabWidth: 2,
105
105
  useTabs: false,
106
106
  trailingComma: true,
107
+ wrapColumn: 1
107
108
  }).code;
108
109
  await fs.writeFile(indexFilePath, newCode, "utf-8");
109
110
  console.log(`✅ Injected resource "${resourceId}" into index`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.58.4",
3
+ "version": "2.58.5",
4
4
  "description": "OpenSource Agent-Native forth-generation admin panel",
5
5
  "keywords": [
6
6
  "adminforth",