@overwolf/ow-electron 39.8.10-beta.1 → 39.8.10-beta.10

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/checksums.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "electron-api.json": "d3c769853e7cac1098c3e33b0f5743ad3f890cf5003e738abb27aa7e9157d944",
3
3
  "electron.d.ts": "a332d5d3fafb45e224218d44c5c471d215dca76889956d5f36f59ec0f8716d10",
4
- "ow-electron-v39.8.10-beta.1-darwin-arm64.zip": "469a72f74a0a52de3555391324d4fc6a4cef26d920208603c2502aedcc92a329",
5
- "ow-electron-v39.8.10-beta.1-darwin-x64.zip": "f3e00cf49ca8779bab61917d78c2a5de630e58945753c89a1f1fe5c6a7cc5ad4",
6
- "ow-electron-v39.8.10-beta.1-linux-arm64.zip": "aa90bc87e7f3452831aa4687e71d2bfb0d1c08ffef9533472383dc3d361ae758",
7
- "ow-electron-v39.8.10-beta.1-linux-armv7l.zip": "6e4d0d96b5ed98b9973868b8ea6234a5511cae866f15e586be7003a753b7afcc",
8
- "ow-electron-v39.8.10-beta.1-linux-x64.zip": "16b0450e045a634067303a27896ba38f98f663b5fbdf5e8d6cb181baff249fff",
9
- "ow-electron-v39.8.10-beta.1-win32-arm64.zip": "bff199e35ef75181dd65db2386df20444e876b8adc604d0778099a2baa3dc0b7",
10
- "ow-electron-v39.8.10-beta.1-win32-ia32.zip": "9d5957e472682389b732e611854fba8a189590fd36b04385c045df1085baad8f",
11
- "ow-electron-v39.8.10-beta.1-win32-x64.zip": "2e3601b11bc2c696127cd5ce708b08b8e2d324a5cc9e3b74cac944e23e2784ac"
4
+ "ow-electron-v39.8.10-beta.10-darwin-arm64.zip": "ee6d5aaede2d638b0ff7470d366093ba7cef508b0b69132c756ced97b08753d5",
5
+ "ow-electron-v39.8.10-beta.10-darwin-x64.zip": "166ad42073185540efd628344e5a229e4d9cb18a4ce1cdc0e3f76618f9c6e442",
6
+ "ow-electron-v39.8.10-beta.10-linux-arm64.zip": "b7f255d4e3c6ac67f18aa11a59bc04194ef5ded9c48249053af96ecaf2ed33f3",
7
+ "ow-electron-v39.8.10-beta.10-linux-armv7l.zip": "6e4d0d96b5ed98b9973868b8ea6234a5511cae866f15e586be7003a753b7afcc",
8
+ "ow-electron-v39.8.10-beta.10-linux-x64.zip": "5a1a3474e6718a9629cdeb425da3936a349a484bd40b0df663aa6354c99c45fa",
9
+ "ow-electron-v39.8.10-beta.10-win32-arm64.zip": "bff199e35ef75181dd65db2386df20444e876b8adc604d0778099a2baa3dc0b7",
10
+ "ow-electron-v39.8.10-beta.10-win32-ia32.zip": "9d5957e472682389b732e611854fba8a189590fd36b04385c045df1085baad8f",
11
+ "ow-electron-v39.8.10-beta.10-win32-x64.zip": "bea45b586ba3cbfc4253bd7f87f18c73089918d7b98ce23af5ced4a4add324c6"
12
12
  }
package/ow-electron.d.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  // Type definitions for ow-electron 39.8.10
2
+ // Note: if your project also has the `electron` package installed as a devDependency,
3
+ // add `"skipLibCheck": true` to your tsconfig.json to avoid duplicate module declaration conflicts.
4
+ /// <reference path="./electron.d.ts" />
2
5
  import { App, BrowserWindow, Event } from 'electron';
3
6
  import { errorMonitor } from 'events';
4
7
 
@@ -76,6 +79,16 @@ declare namespace overwolf {
76
79
  * Overwolf installer provided UTM params
77
80
  */
78
81
  readonly utmParams: any;
82
+
83
+ /**
84
+ * @property returns a unique identifier for the user machine
85
+ */
86
+ readonly muid: string;
87
+
88
+ /**
89
+ * @property returns the ow-electron uid (Overwolf App Id)
90
+ */
91
+ readonly uid: string;
79
92
  }
80
93
 
81
94
  interface CMPWindowOptions {
@@ -159,7 +172,7 @@ declare namespace overwolf {
159
172
  /**
160
173
  * A fake enum for all built-in packIge names
161
174
  */
162
- type PackageName = 'gep' | 'overlay' | 'recorder' | 'utility' | string;
175
+ type PackageName = 'gep' | 'overlay' | 'recorder' | 'utility' | 'crn' | string;
163
176
 
164
177
  /**
165
178
  * Package info
@@ -175,7 +188,42 @@ declare namespace overwolf {
175
188
  };
176
189
 
177
190
  /**
178
- * Overwolf Package Manager interface
191
+ * Result returned by `setChannel()`.
192
+ * `error` is `'invalid-package'` when the package is not found on the server,
193
+ * or `'invalid-channel'` when the channel does not exist for that package.
194
+ */
195
+ type SetChannelResult = {
196
+ success: boolean;
197
+ error?: 'invalid-package' | 'invalid-channel';
198
+ };
199
+
200
+ /**
201
+ * Passed to the `ready` callback of `setChannel()`.
202
+ * Identifies the downloaded package that is pending a restart.
203
+ */
204
+ interface ChannelPackageInfo {
205
+ name: string;
206
+ version: string;
207
+ }
208
+
209
+ /**
210
+ * Returned by `getAvailableChannels()`.
211
+ * Maps each package name to the list of channel names available on the server.
212
+ * Packages with no channels defined return an empty array.
213
+ */
214
+ type AvailableChannelsResult = Record<string, string[]>;
215
+
216
+ /**
217
+ * Returned by `getChannel()`.
218
+ * Maps each package name to its currently active channel.
219
+ * `'public'` means the package is on the default public release.
220
+ */
221
+ type CurrentChannelsResult = Record<string, string>;
222
+
223
+ /**
224
+ * Overwolf Package Manager interface.
225
+ *
226
+ * For package-specific API types, see `@overwolf/ow-electron-packages-types`.
179
227
  */
180
228
  interface OverwolfPackageManager extends NodeJS.EventEmitter {
181
229
  /**
@@ -238,6 +286,19 @@ declare namespace overwolf {
238
286
  listener: (event: Event, packageName: PackageName) => void
239
287
  ): this;
240
288
 
289
+ /**
290
+ * Register listener for when an Overwolf Package begins its load sequence.
291
+ * Fires before 'ready'.
292
+ *
293
+ * @param {string} eventName Name of the node event ('loading')
294
+ * @param {(Event, PackageName) => void} listener The listener that will be invoked when this event is fired
295
+ * @returns {this} The current instance of the Overwolf Package Manager
296
+ */
297
+ on(
298
+ eventName: 'loading',
299
+ listener: (event: Event, packageName: PackageName) => void
300
+ ): this;
301
+
241
302
  /**
242
303
  * Relaunch the Overwolf Package Manager. Call it to force all pending Overwolf Package updates.
243
304
  *
@@ -253,180 +314,104 @@ declare namespace overwolf {
253
314
  hasPendingUpdates(): PendingUpdatesResult;
254
315
 
255
316
  /**
256
- * @property returns the path to the application's logs folder.
317
+ * Switches a package to a named release channel and immediately triggers a
318
+ * download of that channel's version.
257
319
  *
258
- * */
259
- readonly logsFolderPath: string;
260
-
261
- /**
262
- * @property {packages.OverwolfGameEventPackage} gep The Game Events Provider Package Instance
263
- * note: available once 'ready' is fired.
264
- */
265
- readonly gep: packages.OverwolfGameEventPackage;
266
- }
267
-
268
- /**
269
- * Game Events game detection Event
270
- */
271
- export interface GepGameLaunchEvent {
272
- enable: () => void;
273
- }
274
-
275
- /**
276
- * Game Events Package interface
277
- */
278
- interface OverwolfGameEventPackage extends NodeJS.EventEmitter {
279
- /**
280
- * Returns an array of supported Game Event Features for a game
320
+ * - Channel preferences are persisted in storage and applied on every subsequent
321
+ * update check, including the next app launch.
322
+ * - Pass `undefined`, `null`, an empty string, or `'public'` to restore the
323
+ * default public release.
324
+ * - The optional `ready` callback is invoked with `{ name, version }` once the
325
+ * download completes and the app must restart to apply the new version.
326
+ * - If the package is already at the requested channel version, `ready` never fires.
327
+ * - Throws if `packageName` is not listed in the app's `package.json`
328
+ * `overwolf.packages` array.
281
329
  *
282
- * @param {number} gameId Game ID of the targeted game
283
- * @returns {Promise<string[]>} Promise resolving to an array of supported game features
284
- */
285
- getFeatures(gameId: number): Promise<string[]>;
286
-
287
- /**
288
- * Sets the requires Game Event Features for a given game ID
330
+ * @param {PackageName} packageName The package to switch.
331
+ * @param {string} [channel] Target channel name. Omit or pass `'public'` /
332
+ * empty string to restore the public release.
333
+ * @param {Function} [ready] Invoked when the download completes and a
334
+ * restart is required.
335
+ * @returns {Promise<SetChannelResult>}
289
336
  *
290
- * @param {number} gameId Game ID of the targeted game
291
- * @param {string[] | undefined} features Array of required Game Event Features
292
- * @returns {Promise<void>} Promise reporting the success of the operation
293
- */
294
- setRequiredFeatures(
295
- gameId: number,
296
- features: string[] | undefined
297
- ): Promise<void>;
298
-
299
- /**
300
- * Returns an array of Game Events supported games
337
+ * @example
338
+ * ```typescript
339
+ * const result = await api.setChannel('overlay', 'pre-release', (pkg) => {
340
+ * console.log(`overlay v${pkg.version} ready - restart required`);
341
+ * api.relaunch();
342
+ * });
343
+ * if (!result.success) console.error('setChannel failed:', result.error);
344
+ * ```
301
345
  *
302
- * @returns {Promise<{
303
- * name: string;
304
- * id: number;
305
- * }[]>} Promise resolving to an array of supported games
346
+ * @example
347
+ * ```typescript
348
+ * // Restore the public release - all four are equivalent
349
+ * await api.setChannel('overlay');
350
+ * await api.setChannel('overlay', undefined);
351
+ * await api.setChannel('overlay', '');
352
+ * await api.setChannel('overlay', 'public');
353
+ * ```
306
354
  */
307
- getSupportedGames(): Promise<{
308
- name: string;
309
- id: number;
310
- }[]>;
355
+ setChannel(
356
+ packageName: PackageName,
357
+ channel?: string | 'public',
358
+ ready?: (packageInfo: ChannelPackageInfo) => void
359
+ ): Promise<SetChannelResult>;
311
360
 
312
361
  /**
313
- * Returns the target game's current Game Info
362
+ * Returns the list of release channels available on the server for one or more packages.
314
363
  *
315
- * @param {number} gameId Game ID of the targeted game
316
- * @returns {Promise<any>} Promise resolving to the targeted game's current Game Info
317
- */
318
- getInfo(gameId: number): Promise<any>;
319
-
320
- /**
321
- * Register listener for Game Info Updates
364
+ * - Pass no arguments to query all packages registered in the app's `overwolf.packages` list.
365
+ * - Pass one or more package names to query a specific subset.
366
+ * - Packages with no channels defined return an empty array `[]`.
367
+ * - Throws if any supplied name is not in the registered packages list.
322
368
  *
323
- * @param {string | symbol} eventName Name of the node event ('new-info-update')
324
- * @param {(Event, any[]) => void} listener The listener that will be invoked when this event is fired
325
- * @returns {this} The current instance of the Overwolf Game Events Package
326
- */
327
- on(
328
- eventName: 'new-info-update',
329
- listener: (event: Event, gameId: number, data: gep.InfoUpdate) => void
330
- ): this;
331
-
332
- /**
333
- * Register listener for New Game Events
369
+ * @param {...PackageName} packageNames Optional package names to query.
370
+ * @returns {Promise<AvailableChannelsResult>}
334
371
  *
335
- * @param {string | symbol} eventName Name of the node event ('new-game-event')
336
- * @param {(Event, any[]) => void} listener The listener that will be invoked when this event is fired
337
- * @returns {this} The current instance of the Overwolf Game Events Package
372
+ * @example
373
+ * ```typescript
374
+ * const channels = await api.getAvailableChannels();
375
+ * // { overlay: ['pre-release', 'beta'], gep: ['pre-release'], utility: [] }
376
+ *
377
+ * const { overlay } = await api.getAvailableChannels('overlay');
378
+ * // overlay: ['pre-release', 'beta']
379
+ * ```
338
380
  */
339
- on(
340
- eventName: 'new-game-event',
341
- listener: (event: Event, gameId: number, data: gep.GameEvent) => void,
342
- ): this;
381
+ getAvailableChannels(...packageNames: PackageName[]): Promise<AvailableChannelsResult>;
343
382
 
344
383
  /**
345
- * Register listener for a game being detected.
346
- * Calling `event.enable()` to start gep for this game.
384
+ * Returns the currently active release channel for one or more packages.
347
385
  *
348
- * @param {string | symbol} eventName Name of the node event ('game-detected')
349
- * @param {(Event, any[]) => void} listener The listener that will be invoked when this event is fired
350
- * @returns {this} The current instance of the Overwolf Game Events Package
351
- */
352
- on(
353
- eventName: 'game-detected',
354
- listener: (event: GepGameLaunchEvent, gameId: number, name: string, ...args: any[]) => void,
355
- ): this;
356
-
357
- /**
358
- * Register listener for a game exit event.
386
+ * - `'public'` means the package is on the default public release.
387
+ * - Pass no arguments to query all registered packages (plus any package with a
388
+ * non-public channel stored, even if not in `package.json`).
389
+ * - Unknown package names are silently omitted from the result (no error thrown).
359
390
  *
360
- * @param {string | symbol} eventName Name of the node event ('game-exit')
361
- * @param {(Event, any[]) => void} listener The listener that will be invoked when this event is fired
362
- * @returns {this} The current instance of the Overwolf Game Events Package
363
- */
364
- on(
365
- eventName: 'game-exit',
366
- listener: (event: Event, gameId: number, name: string, pid: number) => void,
367
- ): this;
368
-
369
- /**
370
- * Register listener for when a detected game is ran as adminstrator.
371
- * If this fires, it means the app must also run as adminstrator in order for Game Events to be detected.
391
+ * @param {...PackageName} packageNames Optional package names to query.
392
+ * @returns {Promise<CurrentChannelsResult>}
372
393
  *
373
- * @param {string | symbol} eventName Name of the node event ('elevated-privileges-required')
374
- * @param {(Event, any[]) => void} listener The listener that will be invoked when this event is fired
375
- * @returns {this} The current instance of the Overwolf Game Events Package
376
- */
377
- on(
378
- eventName: 'elevated-privileges-required',
379
- listener: (event: Event, gameId: number, name: string, pid: number) => void,
380
- ): this;
381
-
382
- /**
383
- * Register listener for errors thrown by the Game Events Provider Package
394
+ * @example
395
+ * ```typescript
396
+ * const current = await api.getChannel();
397
+ * // { overlay: 'pre-release', gep: 'public', utility: 'public' }
384
398
  *
385
- * @param {string | symbol} eventName Name of the node event ('error' or the `errorMonitor` symbol)
386
- * @param {(Event, any[]) => void} listener The listener that will be invoked when this event is fired
387
- * @returns {this} The current instance of the Overwolf Game Events Package
399
+ * const { overlay } = await api.getChannel('overlay');
400
+ * // 'pre-release'
401
+ * ```
388
402
  */
389
- on(
390
- eventName: error,
391
- listener: (event: Event, gameId: number, error: string, ...args: any[]) => void,
392
- ): this;
393
- }
403
+ getChannel(...packageNames: PackageName[]): Promise<CurrentChannelsResult>;
394
404
 
395
- /**
396
- * Namespace for GEP-related interfaces
397
- */
398
- namespace gep {
399
405
  /**
400
- * Interface defining a Game Event's structure
401
- */
402
- interface GameEvent {
403
- /**
404
- * @property {number} gameId The game id of the game the Event comes from
405
- */
406
- gameId: number;
407
- /**
408
- * @property {string} feature The feature the Event belongs to
409
- */
410
- feature: string;
411
- /**
412
- * @property {string} key The name of the Event
413
- */
414
- key: string;
415
- /**
416
- * @property {any} value The value of the Event
417
- */
418
- value: any;
419
- }
406
+ * @property returns the path to the application's logs folder.
407
+ *
408
+ * */
409
+ readonly logsFolderPath: string;
420
410
 
421
411
  /**
422
- * Interface defining an Info Update's structure
412
+ * @property returns the ow-electron phase percentage (used by package manager).
423
413
  */
424
- interface InfoUpdate extends GameEvent {
425
- /**
426
- * @property {string} category The category the Info Item belongs to
427
- */
428
- category: string;
429
- }
414
+ readonly phasePercent: number;
430
415
  }
431
416
  }
432
417
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@overwolf/ow-electron",
3
- "version": "39.8.10-beta.1",
4
- "owElectronVersion": "39.8.10-beta.1",
3
+ "version": "39.8.10-beta.10",
4
+ "owElectronVersion": "39.8.10-beta.10",
5
5
  "electronVersion": "39.8.10",
6
6
  "repository": "https://github.com/electron/electron",
7
7
  "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",