@todesktop/shared 7.186.6 → 7.186.8
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/lib/desktopify.d.ts +1 -0
- package/lib/desktopify2.d.ts +27 -1
- package/package.json +1 -1
- package/src/desktopify.ts +1 -0
- package/src/desktopify2.ts +30 -0
package/lib/desktopify.d.ts
CHANGED
|
@@ -110,6 +110,7 @@ export interface Build {
|
|
|
110
110
|
startedAt: ISODate;
|
|
111
111
|
status: BuildStatus;
|
|
112
112
|
todesktopRuntimeVersionSpecified?: SemanticVersion;
|
|
113
|
+
todesktopRuntimeVersionUsed?: SemanticVersion;
|
|
113
114
|
universalDownloadUrl?: URL;
|
|
114
115
|
url?: URL;
|
|
115
116
|
versionControlInfo?: {
|
package/lib/desktopify2.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { ISwitchableValue } from './toDesktop';
|
|
3
|
-
import { MenuItemConstructorOptions, BrowserWindowConstructorOptions, WebPreferences } from '@todesktop/client-electron-types';
|
|
3
|
+
import { MenuItemConstructorOptions, BrowserWindowConstructorOptions, WebPreferences, NotificationConstructorOptions, MessageBoxOptions } from '@todesktop/client-electron-types';
|
|
4
4
|
import { BaseApp } from './base';
|
|
5
5
|
import { DesktopAppPlugin } from './plugin';
|
|
6
6
|
import { ValidTranslationKeys, ValidTranslationLanguages } from './translation';
|
|
@@ -209,11 +209,37 @@ export interface DesktopifyAppWindow {
|
|
|
209
209
|
*/
|
|
210
210
|
file?: string;
|
|
211
211
|
}
|
|
212
|
+
export declare type AutoUpdateConfiguration = {
|
|
213
|
+
autoUpdater: boolean;
|
|
214
|
+
shouldAutoCheckOnLaunch: boolean;
|
|
215
|
+
simulateLocalAutoUpdates: boolean;
|
|
216
|
+
autoCheckIntervalMins: number;
|
|
217
|
+
updateReadyAction: {
|
|
218
|
+
showInstallAndRestartPrompt: {
|
|
219
|
+
mode: 'always' | 'whenInForeground' | 'never';
|
|
220
|
+
options: Omit<MessageBoxOptions, 'buttons'> & {
|
|
221
|
+
installOnNextLaunchButton: string;
|
|
222
|
+
restartAndInstallButton: string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
showNotification: {
|
|
226
|
+
mode: 'always' | 'whenInBackground' | 'never';
|
|
227
|
+
options: Omit<NotificationConstructorOptions, 'actions'>;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
212
231
|
export interface DesktopifyApp2<Plugin = DesktopAppPlugin> {
|
|
213
232
|
/**
|
|
214
233
|
* Used as appUserModelId on windows
|
|
215
234
|
*/
|
|
216
235
|
appModelId?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Configure auto updates
|
|
238
|
+
*/
|
|
239
|
+
autoUpdates?: AutoUpdateConfiguration;
|
|
240
|
+
/**
|
|
241
|
+
* App identifier
|
|
242
|
+
*/
|
|
217
243
|
id: string;
|
|
218
244
|
/**
|
|
219
245
|
* Last desktopify version that was used to update the app
|
package/package.json
CHANGED
package/src/desktopify.ts
CHANGED
|
@@ -150,6 +150,7 @@ export interface Build {
|
|
|
150
150
|
startedAt: ISODate;
|
|
151
151
|
status: BuildStatus;
|
|
152
152
|
todesktopRuntimeVersionSpecified?: SemanticVersion;
|
|
153
|
+
todesktopRuntimeVersionUsed?: SemanticVersion;
|
|
153
154
|
// TODO: total progress percentage?
|
|
154
155
|
universalDownloadUrl?: URL;
|
|
155
156
|
url?: URL;
|
package/src/desktopify2.ts
CHANGED
|
@@ -3,6 +3,8 @@ import {
|
|
|
3
3
|
MenuItemConstructorOptions,
|
|
4
4
|
BrowserWindowConstructorOptions,
|
|
5
5
|
WebPreferences,
|
|
6
|
+
NotificationConstructorOptions,
|
|
7
|
+
MessageBoxOptions,
|
|
6
8
|
} from '@todesktop/client-electron-types';
|
|
7
9
|
import { BaseApp } from './base';
|
|
8
10
|
import { DesktopAppPlugin } from './plugin';
|
|
@@ -337,11 +339,39 @@ export interface DesktopifyAppWindow {
|
|
|
337
339
|
}
|
|
338
340
|
// TODO: Look into hasMinHeight, etc
|
|
339
341
|
|
|
342
|
+
export type AutoUpdateConfiguration = {
|
|
343
|
+
autoUpdater: boolean;
|
|
344
|
+
shouldAutoCheckOnLaunch: boolean;
|
|
345
|
+
simulateLocalAutoUpdates: boolean;
|
|
346
|
+
autoCheckIntervalMins: number;
|
|
347
|
+
updateReadyAction: {
|
|
348
|
+
showInstallAndRestartPrompt: {
|
|
349
|
+
mode: 'always' | 'whenInForeground' | 'never';
|
|
350
|
+
options: Omit<MessageBoxOptions, 'buttons'> & {
|
|
351
|
+
installOnNextLaunchButton: string;
|
|
352
|
+
restartAndInstallButton: string;
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
showNotification: {
|
|
356
|
+
mode: 'always' | 'whenInBackground' | 'never';
|
|
357
|
+
options: Omit<NotificationConstructorOptions, 'actions'>;
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
|
|
340
362
|
export interface DesktopifyApp2<Plugin = DesktopAppPlugin> {
|
|
341
363
|
/**
|
|
342
364
|
* Used as appUserModelId on windows
|
|
343
365
|
*/
|
|
344
366
|
appModelId?: string;
|
|
367
|
+
/**
|
|
368
|
+
* Configure auto updates
|
|
369
|
+
*/
|
|
370
|
+
autoUpdates?: AutoUpdateConfiguration;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* App identifier
|
|
374
|
+
*/
|
|
345
375
|
id: string;
|
|
346
376
|
/**
|
|
347
377
|
* Last desktopify version that was used to update the app
|