onebots 0.4.41 → 0.4.42
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.
- package/lib/server/app.js +2 -2
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +1 -1
- package/package.json +1 -1
package/lib/server/app.js
CHANGED
|
@@ -169,7 +169,7 @@ class App extends koa_1.default {
|
|
|
169
169
|
this.ws.clients.forEach(client => {
|
|
170
170
|
client.send(JSON.stringify({
|
|
171
171
|
event: 'system.log',
|
|
172
|
-
data:
|
|
172
|
+
data: (0, utils_1.readLine)(1, App.logFile)
|
|
173
173
|
}));
|
|
174
174
|
});
|
|
175
175
|
};
|
|
@@ -189,7 +189,7 @@ class App extends koa_1.default {
|
|
|
189
189
|
return adapter.info;
|
|
190
190
|
}),
|
|
191
191
|
app: this.info,
|
|
192
|
-
logs: fs.existsSync(App.logFile) ? await (0, utils_1.readLine)(100, App.logFile
|
|
192
|
+
logs: fs.existsSync(App.logFile) ? await (0, utils_1.readLine)(100, App.logFile) : ''
|
|
193
193
|
}
|
|
194
194
|
}));
|
|
195
195
|
client.on('message', async (raw) => {
|
package/lib/utils.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Dict } from "@zhinjs/shared";
|
|
3
3
|
import * as fs from "fs";
|
|
4
4
|
export declare const version: any;
|
|
5
|
-
export declare function readLine(maxLen: number, ...params: Parameters<typeof fs.createReadStream>): Promise<string
|
|
5
|
+
export declare function readLine(maxLen: number, ...params: Parameters<typeof fs.createReadStream>): Promise<string>;
|
|
6
6
|
export declare function deepMerge(base: any, ...from: any[]): any;
|
|
7
7
|
export declare function transformObj(obj: any, callback: any): any;
|
|
8
8
|
export declare function deepClone<T extends any>(obj: T): T;
|
package/lib/utils.js
CHANGED