@overlayed/app 0.7.2 → 0.8.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/dist/index.d.ts +44 -12
- package/dist/index.js +533 -444
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,37 @@ creation_time: number;
|
|
|
28
28
|
|
|
29
29
|
declare type BaseEvent = typeof BaseEvent.infer;
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* A `Brand` is a type that takes at minimum two type parameters. Given a base
|
|
33
|
+
* type `Base` and some unique and arbitrary branding type `Branding`, it
|
|
34
|
+
* produces a type based on but distinct from `Base`. The resulting branded
|
|
35
|
+
* type is not directly assignable from the base type, and not mutually
|
|
36
|
+
* assignable with another branded type derived from the same base type.
|
|
37
|
+
*
|
|
38
|
+
* Take care that the branding type is unique. Two branded types that share the
|
|
39
|
+
* same base type and branding type are considered the same type! There are two
|
|
40
|
+
* ways to avoid this.
|
|
41
|
+
*
|
|
42
|
+
* The first way is to supply a third type parameter, `ReservedName`, with a
|
|
43
|
+
* string literal type that is not `__type__`, which is the default.
|
|
44
|
+
*
|
|
45
|
+
* The second way is to define a branded type in terms of its surrounding
|
|
46
|
+
* interface, thereby forming a recursive type. This is possible because there
|
|
47
|
+
* are no constraints on what the branding type must be. It does not have to
|
|
48
|
+
* be a string literal type, even though it often is.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```
|
|
52
|
+
* type Path = Brand<string, 'path'>;
|
|
53
|
+
* type UserId = Brand<number, 'user'>;
|
|
54
|
+
* type DifferentUserId = Brand<number, 'user', '__kind__'>;
|
|
55
|
+
* interface Post { id: Brand<number, Post> }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
declare type Brand<Base, Branding, ReservedName extends string = "__type__"> = Base & {
|
|
59
|
+
[K in ReservedName]: Branding;
|
|
60
|
+
} & { __witness__: Base };
|
|
61
|
+
|
|
31
62
|
declare type CustomLoggerScope = ReturnType<typeof Logger.prototype.scope>;
|
|
32
63
|
|
|
33
64
|
declare type ErrorEvents = ErrorPipeServerError | ErrorInvalidConfigFile;
|
|
@@ -79,7 +110,7 @@ declare type FatalEvents = FatalElevationMismatch;
|
|
|
79
110
|
|
|
80
111
|
export declare type GameLaunchManagerEvents = {
|
|
81
112
|
gameCloseInternal: (args: {
|
|
82
|
-
ravenGame:
|
|
113
|
+
ravenGame: GameModel;
|
|
83
114
|
process: Process;
|
|
84
115
|
}) => MaybePromise<void>;
|
|
85
116
|
gameLaunch: (args: {
|
|
@@ -93,11 +124,18 @@ export declare type GameLaunchManagerEvents = {
|
|
|
93
124
|
game: string;
|
|
94
125
|
}) => MaybePromise<void>;
|
|
95
126
|
gameReadyInternal: (args: {
|
|
96
|
-
ravenGame:
|
|
127
|
+
ravenGame: GameModel;
|
|
97
128
|
process: Process;
|
|
98
129
|
}) => MaybePromise<void>;
|
|
99
130
|
};
|
|
100
131
|
|
|
132
|
+
declare interface GameModel {
|
|
133
|
+
name: string;
|
|
134
|
+
identifier: Brand<string, GameModel>;
|
|
135
|
+
modules: string[];
|
|
136
|
+
executables: string[];
|
|
137
|
+
}
|
|
138
|
+
|
|
101
139
|
declare interface GameModule<TEvents extends Record<string, BaseEvent> = Record<string, BaseEvent>, TKey extends string = string> {
|
|
102
140
|
key: TKey;
|
|
103
141
|
events: Module<GameModuleEvent<TEvents>>;
|
|
@@ -371,16 +409,6 @@ export declare interface OverridesManagerScope {
|
|
|
371
409
|
setKeyInputBlock: (key: number, block: boolean) => void;
|
|
372
410
|
}
|
|
373
411
|
|
|
374
|
-
declare interface RavenGame {
|
|
375
|
-
name: string;
|
|
376
|
-
identifier: RavenGameIdentifier;
|
|
377
|
-
executables: string[];
|
|
378
|
-
dlls_to_inject: string[];
|
|
379
|
-
version_pattern: string;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
declare type RavenGameIdentifier = "siege" | "valorant";
|
|
383
|
-
|
|
384
412
|
export class RenderInterface {
|
|
385
413
|
constructor(name: String, options?: { maxWindowCount?: number; eventQueueSize?: number; access?: AccessLevel }); // default: { maxWindowCount: 10, eventQueueSize: 200, access: AccessLevel.Default }
|
|
386
414
|
|
|
@@ -509,6 +537,10 @@ export interface RenderWindowConstructorOptions extends Electron.BrowserWindowCo
|
|
|
509
537
|
hasCursorOverride?: boolean; // default: true
|
|
510
538
|
}
|
|
511
539
|
|
|
540
|
+
export declare function setFetchLatestTokenCallback(newFetchLatestToken: () => Promise<unknown> | undefined): void;
|
|
541
|
+
|
|
542
|
+
export declare function setUpdaterTokenResolver(newTokenResolver: () => string | undefined): void;
|
|
543
|
+
|
|
512
544
|
export const enum VirtualKey {
|
|
513
545
|
LeftButton = 0x01,
|
|
514
546
|
RightButton = 0x02,
|