adminforth 2.58.4 → 2.58.6

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`);
@@ -11,14 +11,14 @@ export interface EmailAdapter {
11
11
  * @param from - The sender's email address
12
12
  * @param to - The recipient's email address
13
13
  * @param text - The plain text version of the email
14
- * @param html - The HTML version of the email
14
+ * @param html - The optional HTML version of the email
15
15
  * @param subject - The subject of the email
16
16
  */
17
17
  sendEmail(
18
18
  from: string,
19
19
  to: string,
20
20
  text: string,
21
- html: string,
21
+ html: string | undefined,
22
22
  subject: string
23
23
  ): Promise<{
24
24
  error?: string;
@@ -9,10 +9,10 @@ export interface EmailAdapter {
9
9
  * @param from - The sender's email address
10
10
  * @param to - The recipient's email address
11
11
  * @param text - The plain text version of the email
12
- * @param html - The HTML version of the email
12
+ * @param html - The optional HTML version of the email
13
13
  * @param subject - The subject of the email
14
14
  */
15
- sendEmail(from: string, to: string, text: string, html: string, subject: string): Promise<{
15
+ sendEmail(from: string, to: string, text: string, html: string | undefined, subject: string): Promise<{
16
16
  error?: string;
17
17
  ok?: boolean;
18
18
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"EmailAdapter.d.ts","sourceRoot":"","sources":["../../../types/adapters/EmailAdapter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAE3B;;;OAGG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B;;;;;;;OAOG;IACH,SAAS,CACP,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;QACT,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,OAAO,CAAC;KACd,CAAC,CAAC;CACJ"}
1
+ {"version":3,"file":"EmailAdapter.d.ts","sourceRoot":"","sources":["../../../types/adapters/EmailAdapter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAE3B;;;OAGG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B;;;;;;;OAOG;IACH,SAAS,CACP,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;QACT,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,OAAO,CAAC;KACd,CAAC,CAAC;CACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.58.4",
3
+ "version": "2.58.6",
4
4
  "description": "OpenSource Agent-Native forth-generation admin panel",
5
5
  "keywords": [
6
6
  "adminforth",