adminforth 1.0.24 → 1.0.25

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.
@@ -4,7 +4,7 @@ import { AdminForthFilterOperators, AdminForthSortDirections, AdminForthTypes }
4
4
 
5
5
 
6
6
  class MongoConnector {
7
- db: any;
7
+ db: MongoClient
8
8
 
9
9
  constructor({ url }) {
10
10
  this.db = new MongoClient(url);
@@ -188,7 +188,7 @@ class MongoConnector {
188
188
  }
189
189
 
190
190
  async close() {
191
- await this.db.end();
191
+ await this.db.close()
192
192
  }
193
193
  }
194
194
 
@@ -197,7 +197,7 @@ class MongoConnector {
197
197
  }
198
198
  close() {
199
199
  return __awaiter(this, void 0, void 0, function* () {
200
- yield this.db.end();
200
+ yield this.db.close();
201
201
  });
202
202
  }
203
203
  }
@@ -116,11 +116,20 @@ class CodeInjector {
116
116
  const src = path.join(__dirname, 'spa', file);
117
117
  const dest = path.join(spaTmpPath, file);
118
118
  yield fsExtra.copy(src, dest);
119
+ if (process.env.HEAVY_DEBUG) {
120
+ console.log('🪲 await fsExtra.copy filtering', src, dest);
121
+ }
119
122
  })));
120
123
  }
121
124
  else {
125
+ if (process.env.HEAVY_DEBUG) {
126
+ console.log(`🪲 await fsExtra.copy from ${path.join(__dirname, 'spa')}, ${spaTmpPath}`);
127
+ }
122
128
  yield fsExtra.copy(path.join(__dirname, 'spa'), spaTmpPath, {
123
129
  filter: (src) => {
130
+ if (process.env.HEAVY_DEBUG) {
131
+ console.log('🪲 await fsExtra.copy filtering', src);
132
+ }
124
133
  return !src.includes('/adminforth/spa/node_modules') && !src.includes('/adminforth/spa/dist');
125
134
  },
126
135
  });
@@ -127,10 +127,22 @@ class CodeInjector {
127
127
  const src = path.join(__dirname, 'spa', file);
128
128
  const dest = path.join(spaTmpPath, file);
129
129
  await fsExtra.copy(src, dest);
130
+ if (process.env.HEAVY_DEBUG) {
131
+ console.log('🪲 await fsExtra.copy filtering', src, dest);
132
+ }
133
+
130
134
  }));
131
135
  } else {
136
+ if (process.env.HEAVY_DEBUG) {
137
+ console.log(`🪲 await fsExtra.copy from ${path.join(__dirname, 'spa')}, ${spaTmpPath}`);
138
+ }
139
+
132
140
  await fsExtra.copy(path.join(__dirname, 'spa'), spaTmpPath, {
133
141
  filter: (src) => {
142
+ if (process.env.HEAVY_DEBUG) {
143
+ console.log('🪲 await fsExtra.copy filtering', src);
144
+ }
145
+
134
146
  return !src.includes('/adminforth/spa/node_modules') && !src.includes('/adminforth/spa/dist');
135
147
  },
136
148
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",