adminforth 1.0.1 → 1.0.2

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.
@@ -13,6 +13,9 @@ class MongoConnector {
13
13
  (async () => {
14
14
  try {
15
15
  await this.db.connect();
16
+ this.db.on('error', (err) => {
17
+ console.log('Mongo error: ', err.message)
18
+ });
16
19
  console.log('Connected to Mongo');
17
20
  } catch (e) {
18
21
  console.error('ERROR: Failed to connect to Mongo', e);
@@ -227,7 +227,6 @@ class PostgresConnector {
227
227
  data: rows.map((row) => {
228
228
  const newRow = {};
229
229
  for (const [key, value] of Object.entries(row)) {
230
- console.log('key', key, value, resource.dataSourceColumns.find((col) => col.name == key));
231
230
  newRow[key] = this.getFieldValue(resource.dataSourceColumns.find((col) => col.name == key), value);
232
231
  }
233
232
  return newRow;
@@ -189,7 +189,6 @@ class SQLiteConnector {
189
189
  const q = `SELECT ${columns} FROM ${tableName} ${where} ${orderBy} LIMIT ? OFFSET ?`;
190
190
  const stmt = this.db.prepare(q);
191
191
  const d = [...filterValues, limit, offset];
192
- console.log('⚙️⚙️⚙️ running request against data', d);
193
192
  const rows = stmt.all(d);
194
193
 
195
194
  const total = this.db.prepare(`SELECT COUNT(*) FROM ${tableName} ${where}`).get([...filterValues])['COUNT(*)'];
package/index.js CHANGED
@@ -158,7 +158,6 @@ class AdminForth {
158
158
  const newBulkActions = bulkActions.map((action) => {
159
159
  return Object.assign(action, {id: uuid()});
160
160
  });
161
- console.log('newBulkActions', newBulkActions);
162
161
  bulkActions = newBulkActions;
163
162
  }
164
163
  });
@@ -113,7 +113,6 @@ class CodeInjector {
113
113
  } else {
114
114
  await fsExtra.copy(path.join(__dirname, 'spa'), spaTmpPath, {
115
115
  filter: (src) => {
116
- console.log('🛫🛫🛫🛫🛫src', src)
117
116
  return !src.includes('/adminforth/spa/node_modules') && !src.includes('/adminforth/spa/dist');
118
117
  },
119
118
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -30,7 +30,7 @@
30
30
  "sass": "^1.77.2",
31
31
  "tailwindcss": "^3.4.3",
32
32
  "typescript": "~5.4.0",
33
- "vite": "^5.2.8",
33
+ "vite": "^5.2.12",
34
34
  "vue-tsc": "^2.0.11"
35
35
  }
36
36
  },
@@ -3852,9 +3852,9 @@
3852
3852
  "dev": true
3853
3853
  },
3854
3854
  "node_modules/vite": {
3855
- "version": "5.2.11",
3856
- "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.11.tgz",
3857
- "integrity": "sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==",
3855
+ "version": "5.2.12",
3856
+ "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.12.tgz",
3857
+ "integrity": "sha512-/gC8GxzxMK5ntBwb48pR32GGhENnjtY30G4A0jemunsBkiEZFw60s8InGpN8gkhHEkjnRK1aSAxeQgwvFhUHAA==",
3858
3858
  "dev": true,
3859
3859
  "dependencies": {
3860
3860
  "esbuild": "^0.20.1",
package/spa/package.json CHANGED
@@ -34,7 +34,7 @@
34
34
  "sass": "^1.77.2",
35
35
  "tailwindcss": "^3.4.3",
36
36
  "typescript": "~5.4.0",
37
- "vite": "^5.2.8",
37
+ "vite": "^5.2.12",
38
38
  "vue-tsc": "^2.0.11"
39
39
  }
40
40
  }
@@ -11,14 +11,14 @@ export const useModalStore = defineStore('modal', () => {
11
11
  cancelText: 'cancelText',
12
12
  });
13
13
  const isOpened = ref(false);
14
- const onAcceptFunction = ref(()=>{});
14
+ const onAcceptFunction: any = ref(()=>{});
15
15
  function togleModal() {
16
16
  isOpened.value = !isOpened.value;
17
17
  }
18
- function setOnAcceptFunction(func) {
18
+ function setOnAcceptFunction(func: Function) {
19
19
  onAcceptFunction.value = func;
20
20
  }
21
- function setModalContent(content) {
21
+ function setModalContent(content: string) {
22
22
  modalContent.value = content;
23
23
  }
24
24
  function resetmodalState() {
@@ -5,16 +5,16 @@ import vue from '@vitejs/plugin-vue'
5
5
 
6
6
 
7
7
  const customLogger = {
8
- info(msg) {
8
+ info(msg: string) {
9
9
  // Filter out the lines containing '➜ Local:' or '➜ Network:'
10
10
  if (!msg.includes('➜')) {
11
11
  console.log(msg);
12
12
  }
13
13
  },
14
- warn(msg) {
14
+ warn(msg: string) {
15
15
  console.warn(msg);
16
16
  },
17
- error(msg) {
17
+ error(msg: string) {
18
18
  console.error(msg);
19
19
  },
20
20
  clear() {