@wayward/types 2.15.5-beta.dev.20260530.1 → 2.15.5-beta.dev.20260601.1
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/definitions/game/multiplayer/Multiplayer.d.ts +2 -0
- package/definitions/game/multiplayer/packets/server/DesyncPacket.d.ts +2 -0
- package/definitions/server/error/middleware/ReportError.d.ts +8 -0
- package/definitions/server/error/util/SendDiscordMessage.d.ts +2 -0
- package/definitions/test/suite/unitTests/server/error/ReportError.spec.d.ts +13 -0
- package/definitions/utilities/log/ErrorReportAttachments.d.ts +30 -0
- package/definitions/utilities/log/ErrorReporting.d.ts +4 -0
- package/package.json +1 -1
|
@@ -212,6 +212,8 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
212
212
|
private synchronizationCheck;
|
|
213
213
|
private logSyncCheckErrors;
|
|
214
214
|
private sendDesyncPacket;
|
|
215
|
+
private getDiagnosticModList;
|
|
216
|
+
private formatDiagnosticModList;
|
|
215
217
|
processDesyncPacket(connection: IConnection, desyncPacket: DesyncPacket): void;
|
|
216
218
|
private sendPacketInternal;
|
|
217
219
|
private onStateChange;
|
|
@@ -20,6 +20,8 @@ export default class DesyncPacket extends ServerPacket {
|
|
|
20
20
|
checkBefore: boolean;
|
|
21
21
|
shouldDisconnect: boolean;
|
|
22
22
|
logs: string;
|
|
23
|
+
clientLoadedMods: string[];
|
|
24
|
+
clientAllMods: string[];
|
|
23
25
|
getDebugInfo(): string;
|
|
24
26
|
isSyncCheckEnabled(): boolean;
|
|
25
27
|
isAllowedWhenPaused(): boolean;
|
|
@@ -11,3 +11,11 @@
|
|
|
11
11
|
import Middleware from "@wayward/server/core/Middleware";
|
|
12
12
|
declare const _default: Middleware<[message?: string]>;
|
|
13
13
|
export default _default;
|
|
14
|
+
interface IParsedReportRequest {
|
|
15
|
+
body?: unknown;
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function parseReportRequest(req: NodeJS.ReadableStream & {
|
|
19
|
+
headers: Record<string, string | string[] | undefined>;
|
|
20
|
+
}): Promise<IParsedReportRequest>;
|
|
21
|
+
export declare function parseReportBody(contentType: string, rawBody: Uint8Array): Promise<IParsedReportRequest>;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
|
+
import ErrorReportAttachments from "@wayward/utilities/log/ErrorReportAttachments";
|
|
11
12
|
export interface IDiscordMessage {
|
|
12
13
|
color?: number;
|
|
13
14
|
author?: string;
|
|
@@ -15,5 +16,6 @@ export interface IDiscordMessage {
|
|
|
15
16
|
url?: string;
|
|
16
17
|
description?: string;
|
|
17
18
|
footer?: string;
|
|
19
|
+
attachments?: ErrorReportAttachments.IAttachment[];
|
|
18
20
|
}
|
|
19
21
|
export default function (message: IDiscordMessage): Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2025 Unlok
|
|
3
|
+
* https://www.unlok.ca
|
|
4
|
+
*
|
|
5
|
+
* Credits & Thanks:
|
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
|
7
|
+
*
|
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
|
10
|
+
*/
|
|
11
|
+
import type { TestConfig } from "@wayward/test";
|
|
12
|
+
import type { IPaths } from "@wayward/test/interfaces";
|
|
13
|
+
export default function (paths: IPaths, config: TestConfig): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2025 Unlok
|
|
3
|
+
* https://www.unlok.ca
|
|
4
|
+
*
|
|
5
|
+
* Credits & Thanks:
|
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
|
7
|
+
*
|
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
|
10
|
+
*/
|
|
11
|
+
declare namespace ErrorReportAttachments {
|
|
12
|
+
const MAX_ATTACHMENTS = 4;
|
|
13
|
+
const MAX_ATTACHMENT_BYTES: number;
|
|
14
|
+
const MAX_TOTAL_ATTACHMENT_BYTES: number;
|
|
15
|
+
interface IAttachment {
|
|
16
|
+
filename: string;
|
|
17
|
+
contentType: string;
|
|
18
|
+
contents: string;
|
|
19
|
+
}
|
|
20
|
+
interface IValidationResult {
|
|
21
|
+
attachments: IAttachment[];
|
|
22
|
+
error?: string;
|
|
23
|
+
totalBytes: number;
|
|
24
|
+
}
|
|
25
|
+
function validate(attachments: readonly IAttachment[] | undefined): IValidationResult;
|
|
26
|
+
function isAcceptedContentType(contentType: string): boolean;
|
|
27
|
+
function isSafeFilename(filename: string): boolean;
|
|
28
|
+
function byteLength(contents: string): number;
|
|
29
|
+
}
|
|
30
|
+
export default ErrorReportAttachments;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { CallsiteMatcher } from "@wayward/utilities/Errors";
|
|
12
12
|
import Log, { type ILog } from "@wayward/utilities/Log";
|
|
13
|
+
import ErrorReportAttachments from "@wayward/utilities/log/ErrorReportAttachments";
|
|
13
14
|
import Version from "@wayward/utilities/Version";
|
|
14
15
|
declare namespace ErrorReporting {
|
|
15
16
|
export interface ICallerOptions {
|
|
@@ -28,6 +29,7 @@ declare namespace ErrorReporting {
|
|
|
28
29
|
stack?: string;
|
|
29
30
|
shouldNotifyPlayer?: boolean;
|
|
30
31
|
shouldSendRemote?: boolean;
|
|
32
|
+
attachments?: ErrorReportAttachments.IAttachment[];
|
|
31
33
|
}
|
|
32
34
|
export interface IEvents {
|
|
33
35
|
logError(report: IReport): any;
|
|
@@ -41,6 +43,7 @@ declare namespace ErrorReporting {
|
|
|
41
43
|
error?: Error;
|
|
42
44
|
stack?: string;
|
|
43
45
|
source: string[];
|
|
46
|
+
attachments?: ErrorReportAttachments.IAttachment[];
|
|
44
47
|
private hash?;
|
|
45
48
|
private oncePerSessionAllowed?;
|
|
46
49
|
constructor(options: ICaptureOptions);
|
|
@@ -57,6 +60,7 @@ declare namespace ErrorReporting {
|
|
|
57
60
|
logWarning(source: string | string[]): this;
|
|
58
61
|
logWarning(log: ILog): this;
|
|
59
62
|
notifyPlayer(): this;
|
|
63
|
+
attachText(filename: string, contents: string, contentType?: string): this;
|
|
60
64
|
sendToServer(remoteId?: string): this;
|
|
61
65
|
private shouldExecute;
|
|
62
66
|
private snapshot;
|
package/package.json
CHANGED