wechaty-web-panel 1.2.3 → 1.2.4

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.
@@ -5,7 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getRoomRecordContent = exports.removeRecord = exports.getRoomRecord = exports.addRoomRecord = void 0;
7
7
  const nedb_js_1 = __importDefault(require("./nedb.js"));
8
- const rdb = (0, nedb_js_1.default)('./room.db');
8
+ const path_1 = __importDefault(require("path"));
9
+ const os_1 = __importDefault(require("os"));
10
+ const baseDir = path_1.default.join(os_1.default.homedir(), path_1.default.sep, ".wechaty", "wechaty-panel-cache", path_1.default.sep);
11
+ const dbpath = baseDir + 'room.db';
12
+ const rdb = (0, nedb_js_1.default)(dbpath);
9
13
  /**
10
14
  * 记录群聊天记录 记录格式
11
15
  * { roomName: '群名', roomId: '', content: '内容', contact: '用户名', wxid: '', time: '时间' }
@@ -6,7 +6,7 @@ exports.packageJson = void 0;
6
6
  */
7
7
  exports.packageJson = {
8
8
  "name": "wechaty-web-panel",
9
- "version": "1.2.3",
9
+ "version": "1.2.4",
10
10
  "description": "",
11
11
  "exports": {
12
12
  ".": {
@@ -1,5 +1,9 @@
1
1
  import nedb from './nedb.js';
2
- const rdb = nedb('./room.db');
2
+ import path from "path";
3
+ import os from "os";
4
+ const baseDir = path.join(os.homedir(), path.sep, ".wechaty", "wechaty-panel-cache", path.sep);
5
+ const dbpath = baseDir + 'room.db';
6
+ const rdb = nedb(dbpath);
3
7
  /**
4
8
  * 记录群聊天记录 记录格式
5
9
  * { roomName: '群名', roomId: '', content: '内容', contact: '用户名', wxid: '', time: '时间' }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const packageJson = {
5
5
  "name": "wechaty-web-panel",
6
- "version": "1.2.3",
6
+ "version": "1.2.4",
7
7
  "description": "",
8
8
  "exports": {
9
9
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wechaty-web-panel",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {