@rbxts/scribe-telemetry 2.6.0 → 2.7.0
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/Scribe-source-map.json +1 -1
- package/index.d.ts +6 -1
- package/init.luau +18 -0
- package/package.json +2 -2
package/Scribe-source-map.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.
|
|
1
|
+
{"version":"2.7.0","format":1,"description":"Segments are [packedLine, sourceLine]. Use the last segment at or before the packed line, then add its line offset.","files":{"addons/telemetry/ScribeTelemetry/Config.luau":{"sourceSha256":"d2c9b8060f2c26bcf59436e209f39a65c9ed69c167eb81930859826ab63dc10c","packedSha256":"d2c9b8060f2c26bcf59436e209f39a65c9ed69c167eb81930859826ab63dc10c","segments":[[1,1]],"packagePath":"Config.luau"},"addons/telemetry/ScribeTelemetry/Diagnostics.luau":{"sourceSha256":"81d2b4ddb797654a4643a7161408fd4040a9057d2f267a4f143fad5876e03780","packedSha256":"81d2b4ddb797654a4643a7161408fd4040a9057d2f267a4f143fad5876e03780","segments":[[1,1]],"packagePath":"Diagnostics.luau"},"addons/telemetry/ScribeTelemetry/Format.luau":{"sourceSha256":"d2b7917dd2518e838bab3ac0d819420d6b93bf488e68f9ca3764d7720f57fa2f","packedSha256":"d2b7917dd2518e838bab3ac0d819420d6b93bf488e68f9ca3764d7720f57fa2f","segments":[[1,1]],"packagePath":"Format.luau"},"addons/telemetry/ScribeTelemetry/LeaderboardMonitor.luau":{"sourceSha256":"25dd1f55847e94f3b5d46074008fca3141196eb35e3ed5a083038bd7a83fa1fd","packedSha256":"25dd1f55847e94f3b5d46074008fca3141196eb35e3ed5a083038bd7a83fa1fd","segments":[[1,1]],"packagePath":"LeaderboardMonitor.luau"},"addons/telemetry/ScribeTelemetry/Preview.luau":{"sourceSha256":"e5e5813ab3b8e24c181ebf8c7ac7d18d1d2183b2d1af95cff248ee754870ae6e","packedSha256":"e5e5813ab3b8e24c181ebf8c7ac7d18d1d2183b2d1af95cff248ee754870ae6e","segments":[[1,1]],"packagePath":"Preview.luau"},"addons/telemetry/ScribeTelemetry/Router.luau":{"sourceSha256":"f45b51bde5e33b2de1ab23338518caec54a1a4a8b642a3eff3e5b11d0669adb9","packedSha256":"f45b51bde5e33b2de1ab23338518caec54a1a4a8b642a3eff3e5b11d0669adb9","segments":[[1,1]],"packagePath":"Router.luau"},"addons/telemetry/ScribeTelemetry/Sanitize.luau":{"sourceSha256":"41846d913c9ee350053778121521e2aca3fbd53e3845d4394e79bfededfefd5c","packedSha256":"41846d913c9ee350053778121521e2aca3fbd53e3845d4394e79bfededfefd5c","segments":[[1,1]],"packagePath":"Sanitize.luau"},"addons/telemetry/ScribeTelemetry/Transport.luau":{"sourceSha256":"ac306390638dc90cbe097b6d037ac5cf88c8b7882f82efd741628ea4b48c05cf","packedSha256":"ac306390638dc90cbe097b6d037ac5cf88c8b7882f82efd741628ea4b48c05cf","segments":[[1,1]],"packagePath":"Transport.luau"},"addons/telemetry/ScribeTelemetry/init.luau":{"sourceSha256":"b00fa59c0fdfbb06c0beeb8b9ba87f2c2edc13351c83255722935ec9eb915ad8","packedSha256":"b00fa59c0fdfbb06c0beeb8b9ba87f2c2edc13351c83255722935ec9eb915ad8","segments":[[1,1]],"packagePath":"init.luau"}}}
|
package/index.d.ts
CHANGED
|
@@ -132,10 +132,15 @@ declare namespace ScribeTelemetry {
|
|
|
132
132
|
Leaderboards: LeaderboardStats;
|
|
133
133
|
}
|
|
134
134
|
interface Handle<Destination extends string = string> {
|
|
135
|
+
/** Queues a test message; returns false and a reason if refused. */
|
|
135
136
|
Test(destination: Destination): LuaTuple<[boolean, string | undefined]>;
|
|
137
|
+
/** Queues sample embeds without mentions or real incidents; defaults to all previews. */
|
|
136
138
|
Preview(destination: Destination, kind?: PreviewKind): LuaTuple<[boolean, string | undefined]>;
|
|
139
|
+
/** Waits up to five seconds by default; returns whether the queues drained. */
|
|
137
140
|
Flush(timeout?: number): boolean;
|
|
141
|
+
/** Returns reporting, delivery and queue statistics. */
|
|
138
142
|
GetStats(): Stats<Destination>;
|
|
143
|
+
/** Stops reporting and discards queued reports; safe to repeat. */
|
|
139
144
|
Stop(): void;
|
|
140
145
|
}
|
|
141
146
|
type ScribeModule = Pick<typeof Scribe,
|
|
@@ -143,7 +148,7 @@ declare namespace ScribeTelemetry {
|
|
|
143
148
|
> & { readonly OnStatusChanged: Pick<typeof Scribe.OnStatusChanged, "Connect"> }
|
|
144
149
|
& Partial<Pick<typeof Scribe, "Version" | "GetBudgetSnapshot" | "GetLeaderboardSnapshot" | "GetProfileKeyPrefix" | "RegisterAddon">>;
|
|
145
150
|
|
|
146
|
-
/**
|
|
151
|
+
/** Starts webhook reporting; stop any existing handle for this Scribe module first. */
|
|
147
152
|
function Start<Destination extends string>(scribe: ScribeModule, options: Options<Destination>): Handle<Destination>;
|
|
148
153
|
}
|
|
149
154
|
|
package/init.luau
CHANGED
|
@@ -27,10 +27,25 @@ export type Stats = Transport.Stats & {
|
|
|
27
27
|
Leaderboards: { State: string, Monitored: number, Omitted: number, SnapshotAge: number?, LastError: string? },
|
|
28
28
|
}
|
|
29
29
|
export type Handle = {
|
|
30
|
+
--[[
|
|
31
|
+
Queues a test message; returns false and a reason if refused.
|
|
32
|
+
]]
|
|
30
33
|
Test: (self: Handle, destination: string) -> (boolean, string?),
|
|
34
|
+
--[[
|
|
35
|
+
Queues sample reports without triggering real failures or mentions.
|
|
36
|
+
]]
|
|
31
37
|
Preview: (self: Handle, destination: string, kind: PreviewKind?) -> (boolean, string?),
|
|
38
|
+
--[[
|
|
39
|
+
Waits for queued reports to drain, up to the timeout in seconds.
|
|
40
|
+
]]
|
|
32
41
|
Flush: (self: Handle, timeout: number?) -> boolean,
|
|
42
|
+
--[[
|
|
43
|
+
Returns delivery, queue and monitoring statistics.
|
|
44
|
+
]]
|
|
33
45
|
GetStats: (self: Handle) -> Stats,
|
|
46
|
+
--[[
|
|
47
|
+
Stops monitoring and discards queued reports; safe to call twice.
|
|
48
|
+
]]
|
|
34
49
|
Stop: (self: Handle) -> (),
|
|
35
50
|
}
|
|
36
51
|
export type LogEntry = {
|
|
@@ -166,6 +181,9 @@ end
|
|
|
166
181
|
local Handle = {}
|
|
167
182
|
Handle.__index = Handle
|
|
168
183
|
|
|
184
|
+
--[[
|
|
185
|
+
Starts Discord webhook reporting for this Scribe module.
|
|
186
|
+
]]
|
|
169
187
|
function ScribeTelemetry.Start(Scribe: ScribeModule, options: Options): Handle
|
|
170
188
|
for _, name in { "AddLogSink", "GetStatus", "GetMetrics", "GetPercentiles" } do
|
|
171
189
|
if type(Scribe) ~= "table" or type((Scribe :: any)[name]) ~= "function" then
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rbxts/scribe-telemetry",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Optional telemetry addon for Scribe",
|
|
5
5
|
"main": "init.luau",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"homepage": "https://scribe.ericplane.dev/",
|
|
13
13
|
"author": "ericplane",
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@rbxts/scribe": "^2.
|
|
15
|
+
"@rbxts/scribe": "^2.7.0"
|
|
16
16
|
},
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|