@rbxts/scribe-leaderstats 2.5.0 → 2.6.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/LICENSE +21 -21
- package/Scribe-source-map.json +1 -1
- package/index.d.ts +42 -42
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 ericplane
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ericplane
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/Scribe-source-map.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.
|
|
1
|
+
{"version":"2.6.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/leaderstats/ScribeLeaderstats.luau":{"sourceSha256":"333d4e4272e0a3d8504e9f534f8db488caa256162b348f3b20ef748cd9294a22","packedSha256":"333d4e4272e0a3d8504e9f534f8db488caa256162b348f3b20ef748cd9294a22","segments":[[1,1]],"packagePath":"init.luau"}}}
|
package/index.d.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import type Scribe from "@rbxts/scribe";
|
|
2
|
-
|
|
3
|
-
/** Optional server-side bridge to Roblox's built-in player list. */
|
|
4
|
-
declare namespace ScribeLeaderstats {
|
|
5
|
-
interface DataAPI {
|
|
6
|
-
readonly WaitForData: (this: void, player: Player, timeout?: number) => LuaTuple<[
|
|
7
|
-
{ readonly Get: (this: void) => unknown } | undefined,
|
|
8
|
-
string | undefined,
|
|
9
|
-
]>;
|
|
10
|
-
readonly SessionEnded: Pick<Scribe.Signal<[Player, Scribe.LifecycleReason]>, "Connect">;
|
|
11
|
-
}
|
|
12
|
-
type Join<Key extends string, Path> = Path extends string ? `${Key}.${Path}` : never;
|
|
13
|
-
/** Static, always-present scalar paths. Containers, optional fields and Big values are excluded. */
|
|
14
|
-
type Paths<T, Depth extends unknown[] = []> =
|
|
15
|
-
Depth extends [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown] ? never
|
|
16
|
-
: undefined extends T ? never
|
|
17
|
-
: T extends number | string | boolean ? ""
|
|
18
|
-
: T extends Scribe.BigValue | Scribe.Datatype | buffer | ReadonlyArray<unknown> | ReadonlyMap<unknown, unknown> | ReadonlySet<unknown> ? never
|
|
19
|
-
: T extends object ? {
|
|
20
|
-
[Key in Extract<keyof T, string>]: string extends Key ? never
|
|
21
|
-
: Key extends "" | `${string}.${string}` ? never
|
|
22
|
-
: Paths<T[Key], [...Depth, unknown]> extends infer Path
|
|
23
|
-
? Path extends "" ? Key : Join<Key, Path> : never
|
|
24
|
-
}[Extract<keyof T, string>] : never;
|
|
25
|
-
type Values<Data extends DataAPI> = ReturnType<NonNullable<ReturnType<Data["WaitForData"]>[0]>["Get"]>;
|
|
26
|
-
type Stats<Data extends DataAPI> = { readonly [displayName: string]: Paths<Values<Data>> };
|
|
27
|
-
interface Handle {
|
|
28
|
-
/** Disconnect and remove only the instances created by this handle. Safe to repeat. */
|
|
29
|
-
Stop(): void;
|
|
30
|
-
}
|
|
31
|
-
/** Dependency overrides for isolated tests. Omit in game code. */
|
|
32
|
-
interface Dependencies {
|
|
33
|
-
Players?: Pick<Players, "GetPlayers" | "PlayerAdded" | "PlayerRemoving">;
|
|
34
|
-
NewInstance?: (this: void, className: string) => Instance;
|
|
35
|
-
IsServer?: (this: void) => boolean;
|
|
36
|
-
Warn?: (this: void, message: string) => void;
|
|
37
|
-
}
|
|
38
|
-
/** Every selected stat is public to every client, including ServerOnly/Session paths. */
|
|
39
|
-
function Start<Data extends DataAPI>(data: Data, stats: Stats<NoInfer<Data>>, dependencies?: Dependencies): Handle;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export = ScribeLeaderstats;
|
|
1
|
+
import type Scribe from "@rbxts/scribe";
|
|
2
|
+
|
|
3
|
+
/** Optional server-side bridge to Roblox's built-in player list. */
|
|
4
|
+
declare namespace ScribeLeaderstats {
|
|
5
|
+
interface DataAPI {
|
|
6
|
+
readonly WaitForData: (this: void, player: Player, timeout?: number) => LuaTuple<[
|
|
7
|
+
{ readonly Get: (this: void) => unknown } | undefined,
|
|
8
|
+
string | undefined,
|
|
9
|
+
]>;
|
|
10
|
+
readonly SessionEnded: Pick<Scribe.Signal<[Player, Scribe.LifecycleReason]>, "Connect">;
|
|
11
|
+
}
|
|
12
|
+
type Join<Key extends string, Path> = Path extends string ? `${Key}.${Path}` : never;
|
|
13
|
+
/** Static, always-present scalar paths. Containers, optional fields and Big values are excluded. */
|
|
14
|
+
type Paths<T, Depth extends unknown[] = []> =
|
|
15
|
+
Depth extends [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown] ? never
|
|
16
|
+
: undefined extends T ? never
|
|
17
|
+
: T extends number | string | boolean ? ""
|
|
18
|
+
: T extends Scribe.BigValue | Scribe.Datatype | buffer | ReadonlyArray<unknown> | ReadonlyMap<unknown, unknown> | ReadonlySet<unknown> ? never
|
|
19
|
+
: T extends object ? {
|
|
20
|
+
[Key in Extract<keyof T, string>]: string extends Key ? never
|
|
21
|
+
: Key extends "" | `${string}.${string}` ? never
|
|
22
|
+
: Paths<T[Key], [...Depth, unknown]> extends infer Path
|
|
23
|
+
? Path extends "" ? Key : Join<Key, Path> : never
|
|
24
|
+
}[Extract<keyof T, string>] : never;
|
|
25
|
+
type Values<Data extends DataAPI> = ReturnType<NonNullable<ReturnType<Data["WaitForData"]>[0]>["Get"]>;
|
|
26
|
+
type Stats<Data extends DataAPI> = { readonly [displayName: string]: Paths<Values<Data>> };
|
|
27
|
+
interface Handle {
|
|
28
|
+
/** Disconnect and remove only the instances created by this handle. Safe to repeat. */
|
|
29
|
+
Stop(): void;
|
|
30
|
+
}
|
|
31
|
+
/** Dependency overrides for isolated tests. Omit in game code. */
|
|
32
|
+
interface Dependencies {
|
|
33
|
+
Players?: Pick<Players, "GetPlayers" | "PlayerAdded" | "PlayerRemoving">;
|
|
34
|
+
NewInstance?: (this: void, className: string) => Instance;
|
|
35
|
+
IsServer?: (this: void) => boolean;
|
|
36
|
+
Warn?: (this: void, message: string) => void;
|
|
37
|
+
}
|
|
38
|
+
/** Every selected stat is public to every client, including ServerOnly/Session paths. */
|
|
39
|
+
function Start<Data extends DataAPI>(data: Data, stats: Stats<NoInfer<Data>>, dependencies?: Dependencies): Handle;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export = ScribeLeaderstats;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rbxts/scribe-leaderstats",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Optional leaderstats 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.6.0"
|
|
16
16
|
},
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|