@noldova/desktop.electron 0.0.2 → 0.0.3
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/api/index.d.ts +166 -29
- package/api/index.js.map +1 -1
- package/interfaces/i-frame-navigation.js +9 -0
- package/interfaces/i-frame-navigation.js.map +1 -0
- package/models/feed-source.js +4 -2
- package/models/feed-source.js.map +1 -1
- package/package.json +4 -4
- package/resources.js +87 -0
- package/resources.js.map +1 -1
- package/services/electron-web-view-session.js +19 -0
- package/services/electron-web-view-session.js.map +1 -1
- package/services/feed-provider.js +4 -3
- package/services/feed-provider.js.map +1 -1
- package/services/feed-updater.js +7 -4
- package/services/feed-updater.js.map +1 -1
- package/services/main-process-log.js +9 -7
- package/services/main-process-log.js.map +1 -1
- package/services/main-process-recovery.js +1 -0
- package/services/main-process-recovery.js.map +1 -1
- package/services/main-process.js +17 -2
- package/services/main-process.js.map +1 -1
- package/services/open-web-view.js +50 -19
- package/services/open-web-view.js.map +1 -1
- package/services/runtime-events.js +4 -0
- package/services/runtime-events.js.map +1 -1
- package/services/squirrel-handoff.js +1 -1
- package/services/squirrel-handoff.js.map +1 -1
- package/services/update-controller.js +2 -2
- package/services/update-controller.js.map +1 -1
- package/services/web-view-bridge.js +40 -2
- package/services/web-view-bridge.js.map +1 -1
- package/services/web-view-favicon.js +115 -0
- package/services/web-view-favicon.js.map +1 -0
- package/services/web-view-host.js +16 -5
- package/services/web-view-host.js.map +1 -1
- package/services/web-view-origin-check.js +32 -25
- package/services/web-view-origin-check.js.map +1 -1
- package/services/open-web-view.resources.js +0 -13
- package/services/open-web-view.resources.js.map +0 -1
- package/services/web-view-origin-check.resources.js +0 -46
- package/services/web-view-origin-check.resources.js.map +0 -1
package/api/index.d.ts
CHANGED
|
@@ -2108,6 +2108,21 @@ export interface IPreventableEvent {
|
|
|
2108
2108
|
preventDefault(): void;
|
|
2109
2109
|
}
|
|
2110
2110
|
|
|
2111
|
+
/**
|
|
2112
|
+
* A frame about to navigate, as Electron's `will-frame-navigate` event describes it, which a listener may cancel.
|
|
2113
|
+
*/
|
|
2114
|
+
export interface IFrameNavigation extends IPreventableEvent {
|
|
2115
|
+
/**
|
|
2116
|
+
* The address the frame navigates to.
|
|
2117
|
+
*/
|
|
2118
|
+
readonly url: string;
|
|
2119
|
+
|
|
2120
|
+
/**
|
|
2121
|
+
* Whether the page's own frame navigates, rather than one of its frames.
|
|
2122
|
+
*/
|
|
2123
|
+
readonly isMainFrame: boolean;
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2111
2126
|
/**
|
|
2112
2127
|
* The frame an IPC message came from.
|
|
2113
2128
|
*/
|
|
@@ -3040,6 +3055,12 @@ export interface IWindowOpenDetails {
|
|
|
3040
3055
|
* The referrer the engine would send with it; its address is empty when the page sends none.
|
|
3041
3056
|
*/
|
|
3042
3057
|
readonly referrer: { readonly url: string };
|
|
3058
|
+
|
|
3059
|
+
/**
|
|
3060
|
+
* How the engine would open it: `default`, `foreground-tab`, `background-tab`, `new-window` or `other`.
|
|
3061
|
+
* Electron always gives it; without it, the request's event carries none.
|
|
3062
|
+
*/
|
|
3063
|
+
readonly disposition?: string;
|
|
3043
3064
|
}
|
|
3044
3065
|
|
|
3045
3066
|
/**
|
|
@@ -3352,21 +3373,41 @@ export interface IWebViewContents {
|
|
|
3352
3373
|
* Listens for a frame about to navigate, which the listener may cancel.
|
|
3353
3374
|
*
|
|
3354
3375
|
* @param event The event's name.
|
|
3355
|
-
* @param listener Receives the cancellable
|
|
3376
|
+
* @param listener Receives the cancellable navigation, with its address and whether the page's own frame navigates.
|
|
3356
3377
|
* @returns Electron's own return value, which the main process does not use.
|
|
3357
3378
|
* @example
|
|
3358
3379
|
* ```ts
|
|
3359
3380
|
* import type { IWebViewContents } from "@noldova/desktop.electron";
|
|
3360
3381
|
*
|
|
3361
3382
|
* export function stayOnOrigin(contents: IWebViewContents, origin: string): void {
|
|
3362
|
-
* contents.on("will-frame-navigate",
|
|
3363
|
-
* if (URL.parse(url)?.origin !== origin)
|
|
3364
|
-
*
|
|
3383
|
+
* contents.on("will-frame-navigate", t => {
|
|
3384
|
+
* if (t.isMainFrame && URL.parse(t.url)?.origin !== origin)
|
|
3385
|
+
* t.preventDefault();
|
|
3365
3386
|
* });
|
|
3366
3387
|
* }
|
|
3367
3388
|
* ```
|
|
3368
3389
|
*/
|
|
3369
|
-
on(event: "will-frame-navigate", listener: (
|
|
3390
|
+
on(event: "will-frame-navigate", listener: (navigation: IFrameNavigation) => void): unknown;
|
|
3391
|
+
|
|
3392
|
+
/**
|
|
3393
|
+
* Listens for a navigation starting in the page or in one of its frames, including one the engine refuses itself before any check, such as the page's own `about:srcdoc`.
|
|
3394
|
+
*
|
|
3395
|
+
* @param event The event's name.
|
|
3396
|
+
* @param listener Receives the navigation, which says whether the page itself starts it.
|
|
3397
|
+
* @returns Electron's own return value, which the main process does not use.
|
|
3398
|
+
* @example
|
|
3399
|
+
* ```ts
|
|
3400
|
+
* import type { IWebViewContents } from "@noldova/desktop.electron";
|
|
3401
|
+
*
|
|
3402
|
+
* export function count(contents: IWebViewContents, starts: { count: number }): void {
|
|
3403
|
+
* contents.on("did-start-navigation", t => {
|
|
3404
|
+
* if (t.isMainFrame)
|
|
3405
|
+
* starts.count++;
|
|
3406
|
+
* });
|
|
3407
|
+
* }
|
|
3408
|
+
* ```
|
|
3409
|
+
*/
|
|
3410
|
+
on(event: "did-start-navigation", listener: (navigation: IWindowNavigation) => void): unknown;
|
|
3370
3411
|
|
|
3371
3412
|
/**
|
|
3372
3413
|
* Listens for a webview being attached to the page, which the listener may cancel.
|
|
@@ -3466,6 +3507,15 @@ export interface IWebViewContents {
|
|
|
3466
3507
|
* @returns Electron's own return value, which the main process does not use.
|
|
3467
3508
|
*/
|
|
3468
3509
|
on(event: "zoom-changed", listener: (event: unknown, direction: string) => void): unknown;
|
|
3510
|
+
|
|
3511
|
+
/**
|
|
3512
|
+
* Listens for the page naming its icons, after a navigation or when it changes them.
|
|
3513
|
+
*
|
|
3514
|
+
* @param event The event's name.
|
|
3515
|
+
* @param listener Receives Electron's event and the icons' addresses, in the page's order.
|
|
3516
|
+
* @returns Electron's own return value, which the main process does not use.
|
|
3517
|
+
*/
|
|
3518
|
+
on(event: "page-favicon-updated", listener: (event: unknown, favicons: string[]) => void): unknown;
|
|
3469
3519
|
}
|
|
3470
3520
|
|
|
3471
3521
|
/**
|
|
@@ -3631,6 +3681,24 @@ export interface IWebViewSession {
|
|
|
3631
3681
|
*/
|
|
3632
3682
|
resolveHostAsync(host: string): Promise<readonly string[]>;
|
|
3633
3683
|
|
|
3684
|
+
/**
|
|
3685
|
+
* Fetches a page's icon in the session, with its cookies and cache, without following a redirect; the session's own request checks still judge the request.
|
|
3686
|
+
*
|
|
3687
|
+
* @param url The icon's address.
|
|
3688
|
+
* @param byteLimit The most bytes it reads.
|
|
3689
|
+
* @param signal Stops the request and the read when it aborts.
|
|
3690
|
+
* @returns The icon's bytes, or null when the answer isn't a success or holds more than `byteLimit` bytes; it rejects when the request fails or `signal` aborts.
|
|
3691
|
+
* @example
|
|
3692
|
+
* ```ts
|
|
3693
|
+
* import type { IWebViewSession } from "@noldova/desktop.electron";
|
|
3694
|
+
*
|
|
3695
|
+
* export function readIconAsync(session: IWebViewSession): Promise<Uint8Array | null> {
|
|
3696
|
+
* return session.readIconAsync("https://example.com/favicon.ico", 1_048_576, AbortSignal.timeout(10_000));
|
|
3697
|
+
* }
|
|
3698
|
+
* ```
|
|
3699
|
+
*/
|
|
3700
|
+
readIconAsync(url: string, byteLimit: number, signal: AbortSignal): Promise<Uint8Array | null>;
|
|
3701
|
+
|
|
3634
3702
|
/**
|
|
3635
3703
|
* Clears the session's cookies, storage and cache.
|
|
3636
3704
|
*
|
|
@@ -4479,6 +4547,22 @@ export interface IMainProcessLog {
|
|
|
4479
4547
|
* ```
|
|
4480
4548
|
*/
|
|
4481
4549
|
write(text: string): void;
|
|
4550
|
+
|
|
4551
|
+
/**
|
|
4552
|
+
* Writes every line still waiting at once, before the main process exits.
|
|
4553
|
+
*
|
|
4554
|
+
* @example
|
|
4555
|
+
* ```ts
|
|
4556
|
+
* import type { IMainProcessLog } from "@noldova/desktop.electron";
|
|
4557
|
+
*
|
|
4558
|
+
* export function recordAndExit(log: IMainProcessLog, exit: () => void): void {
|
|
4559
|
+
* log.write("The main process is exiting.");
|
|
4560
|
+
* log.flush();
|
|
4561
|
+
* exit();
|
|
4562
|
+
* }
|
|
4563
|
+
* ```
|
|
4564
|
+
*/
|
|
4565
|
+
flush(): void;
|
|
4482
4566
|
}
|
|
4483
4567
|
|
|
4484
4568
|
/**
|
|
@@ -7190,15 +7274,16 @@ export declare class WebViewOriginCheck {
|
|
|
7190
7274
|
*
|
|
7191
7275
|
* @param localOrigins The origins the app's settings mark as local addresses, which may connect to a loopback or private address; none by
|
|
7192
7276
|
* default.
|
|
7193
|
-
* @param neverAllowedPorts The loopback ports of the app's own endpoints, refused even when an allowed origin names them
|
|
7277
|
+
* @param neverAllowedPorts The loopback ports of the app's own endpoints, refused even when an allowed origin names them, or a function
|
|
7278
|
+
* read at each check that answers them, or `null` while they are unknown, when every loopback port is refused; none by default.
|
|
7194
7279
|
* @example
|
|
7195
7280
|
* ```ts
|
|
7196
7281
|
* import { WebViewOriginCheck } from "@noldova/desktop.electron";
|
|
7197
7282
|
*
|
|
7198
|
-
* export const check: WebViewOriginCheck = new WebViewOriginCheck([], [4600]);
|
|
7283
|
+
* export const check: WebViewOriginCheck = new WebViewOriginCheck([], () => new Set([4600]));
|
|
7199
7284
|
* ```
|
|
7200
7285
|
*/
|
|
7201
|
-
public constructor(localOrigins?: readonly string[], neverAllowedPorts?: readonly number[]);
|
|
7286
|
+
public constructor(localOrigins?: readonly string[], neverAllowedPorts?: readonly number[] | (() => ReadonlySet<number> | null));
|
|
7202
7287
|
|
|
7203
7288
|
/**
|
|
7204
7289
|
* Classifies an IP address, judging an IPv6 address that carries an IPv4 address, IPv4-mapped, IPv4-compatible or NAT64, as that IPv4
|
|
@@ -8107,11 +8192,6 @@ export interface IUpdateSetup {
|
|
|
8107
8192
|
* Checks for a newer version and downloads it.
|
|
8108
8193
|
*/
|
|
8109
8194
|
export interface IUpdater {
|
|
8110
|
-
/**
|
|
8111
|
-
* The only file a download may give: the target's package in the updater's cache for the installation.
|
|
8112
|
-
*/
|
|
8113
|
-
readonly packagePath: string;
|
|
8114
|
-
|
|
8115
8195
|
/**
|
|
8116
8196
|
* The file the last download in this process gave, or `null` before one has and while a download runs.
|
|
8117
8197
|
*/
|
|
@@ -8136,6 +8216,8 @@ export interface IUpdater {
|
|
|
8136
8216
|
/**
|
|
8137
8217
|
* Downloads the version the last check found and checks it against the release.
|
|
8138
8218
|
*
|
|
8219
|
+
* @param version The version the last check found, which names the only file the download may give,
|
|
8220
|
+
* {@link IUpdater.formatPackagePath}.
|
|
8139
8221
|
* @param onProgress Receives the progress as a whole percentage.
|
|
8140
8222
|
* @returns A promise of the downloaded file; it rejects with an {@link UpdateException} that gives the reason.
|
|
8141
8223
|
* @example
|
|
@@ -8143,11 +8225,28 @@ export interface IUpdater {
|
|
|
8143
8225
|
* import type { IUpdater } from "@noldova/desktop.electron";
|
|
8144
8226
|
*
|
|
8145
8227
|
* export function downloadAsync(updater: IUpdater): Promise<string> {
|
|
8146
|
-
* return updater.downloadAsync(t => console.log(`${t}%`));
|
|
8228
|
+
* return updater.downloadAsync("1.3.0", t => console.log(`${t}%`));
|
|
8147
8229
|
* }
|
|
8148
8230
|
* ```
|
|
8149
8231
|
*/
|
|
8150
|
-
downloadAsync(onProgress: (percent: number) => void): Promise<string>;
|
|
8232
|
+
downloadAsync(version: string, onProgress: (percent: number) => void): Promise<string>;
|
|
8233
|
+
|
|
8234
|
+
/**
|
|
8235
|
+
* Gives the only file a download of a version may give: the version's released package in the updater's cache for
|
|
8236
|
+
* the installation.
|
|
8237
|
+
*
|
|
8238
|
+
* @param version The version.
|
|
8239
|
+
* @returns The package's path.
|
|
8240
|
+
* @example
|
|
8241
|
+
* ```ts
|
|
8242
|
+
* import type { IUpdater } from "@noldova/desktop.electron";
|
|
8243
|
+
*
|
|
8244
|
+
* export function isPackage(updater: IUpdater, file: string): boolean {
|
|
8245
|
+
* return file === updater.formatPackagePath("1.3.0");
|
|
8246
|
+
* }
|
|
8247
|
+
* ```
|
|
8248
|
+
*/
|
|
8249
|
+
formatPackagePath(version: string): string;
|
|
8151
8250
|
|
|
8152
8251
|
/**
|
|
8153
8252
|
* Cancels the download in progress, if any.
|
|
@@ -8683,7 +8782,8 @@ export declare class FeedSource {
|
|
|
8683
8782
|
*/
|
|
8684
8783
|
public readonly channelFile: string;
|
|
8685
8784
|
/**
|
|
8686
|
-
* The package
|
|
8785
|
+
* The package's name without a version, `<product>-<platform>-<arch>.<ext>`, which a feed whose files carry no version
|
|
8786
|
+
* lists for every version.
|
|
8687
8787
|
*/
|
|
8688
8788
|
public readonly packageFile: string;
|
|
8689
8789
|
/**
|
|
@@ -8695,24 +8795,33 @@ export declare class FeedSource {
|
|
|
8695
8795
|
* given another.
|
|
8696
8796
|
*/
|
|
8697
8797
|
public readonly timeout: (milliseconds: number) => AbortSignal;
|
|
8798
|
+
/**
|
|
8799
|
+
* Names the package of a version as the update information lists it and the feed serves it,
|
|
8800
|
+
* `<product>-<version>-<platform>-<arch>.<ext>` for a source {@link FeedSource.create} makes.
|
|
8801
|
+
*/
|
|
8802
|
+
public readonly formatReleasedFile: (version: string) => string;
|
|
8698
8803
|
|
|
8699
8804
|
/**
|
|
8700
8805
|
* Creates the source.
|
|
8701
8806
|
*
|
|
8702
8807
|
* @param feed The feed's URL, ending in `/`.
|
|
8703
8808
|
* @param channelFile The update information's file.
|
|
8704
|
-
* @param packageFile The package
|
|
8809
|
+
* @param packageFile The package's name without a version.
|
|
8705
8810
|
* @param fetchAsync Fetches a URL anonymously, following redirects, until the signal aborts; the signal aborts when the
|
|
8706
8811
|
* feed hasn't answered with the whole information file within 30 seconds.
|
|
8707
8812
|
* @param timeout Gives the signal that aborts a fetch after the milliseconds it takes; `AbortSignal.timeout` by default.
|
|
8813
|
+
* @param formatReleasedFile Names the package of the version the update information names, as it lists it; by default
|
|
8814
|
+
* `packageFile` for every version.
|
|
8708
8815
|
* @example
|
|
8709
8816
|
* ```ts
|
|
8710
8817
|
* import { FeedSource } from "@noldova/desktop.electron";
|
|
8711
8818
|
*
|
|
8712
|
-
* export const source: FeedSource = new FeedSource("http://127.0.0.1:8080/", "latest-linux-x64.yml", "Noldova Desktop Sample-linux-x64.AppImage", (url, signal) => fetch(url, { signal })
|
|
8819
|
+
* export const source: FeedSource = new FeedSource("http://127.0.0.1:8080/", "latest-linux-x64.yml", "Noldova Desktop Sample-linux-x64.AppImage", (url, signal) => fetch(url, { signal }),
|
|
8820
|
+
* undefined, version => `Noldova Desktop Sample-${version}-linux-x64.AppImage`);
|
|
8713
8821
|
* ```
|
|
8714
8822
|
*/
|
|
8715
|
-
public constructor(feed: string, channelFile: string, packageFile: string, fetchAsync: (url: string, signal: AbortSignal) => Promise<IFeedResponse>, timeout?: (milliseconds: number) => AbortSignal
|
|
8823
|
+
public constructor(feed: string, channelFile: string, packageFile: string, fetchAsync: (url: string, signal: AbortSignal) => Promise<IFeedResponse>, timeout?: (milliseconds: number) => AbortSignal,
|
|
8824
|
+
formatReleasedFile?: (version: string) => string);
|
|
8716
8825
|
|
|
8717
8826
|
/**
|
|
8718
8827
|
* Creates the source of a platform and processor: Windows' installer, macOS's ZIP or Linux's AppImage, or its Debian
|
|
@@ -9102,11 +9211,6 @@ export declare class FeedProvider extends Provider<UpdateInfo> {
|
|
|
9102
9211
|
* a prerelease suffix, installs nothing by itself and gives each failure its reason.
|
|
9103
9212
|
*/
|
|
9104
9213
|
export declare class FeedUpdater implements IUpdater {
|
|
9105
|
-
/**
|
|
9106
|
-
* The target's package in electron-updater's cache folder for the installation, the only file a download may give.
|
|
9107
|
-
*/
|
|
9108
|
-
public readonly packagePath: string;
|
|
9109
|
-
|
|
9110
9214
|
/**
|
|
9111
9215
|
* The file the last download in this process gave, or `null` before one has and while a download runs.
|
|
9112
9216
|
*/
|
|
@@ -9165,20 +9269,39 @@ export declare class FeedUpdater implements IUpdater {
|
|
|
9165
9269
|
* Downloads the version the last check found; electron-updater checks its SHA-512, and then the updater checks its
|
|
9166
9270
|
* publisher, deleting a file that fails.
|
|
9167
9271
|
*
|
|
9272
|
+
* @param version The version the last check found.
|
|
9168
9273
|
* @param onProgress Receives the progress as a whole percentage.
|
|
9169
9274
|
* @returns A promise of the downloaded file; it rejects with an {@link UpdateException} that gives the reason, by
|
|
9170
9275
|
* default that the download was interrupted, and with an unexpected error when the file is not
|
|
9171
|
-
* {@link FeedUpdater.
|
|
9276
|
+
* {@link FeedUpdater.formatPackagePath} for the version.
|
|
9172
9277
|
* @example
|
|
9173
9278
|
* ```ts
|
|
9174
9279
|
* import type { FeedUpdater } from "@noldova/desktop.electron";
|
|
9175
9280
|
*
|
|
9176
9281
|
* export function downloadAsync(updater: FeedUpdater): Promise<string> {
|
|
9177
|
-
* return updater.downloadAsync(t => console.log(`${t}%`));
|
|
9282
|
+
* return updater.downloadAsync("1.3.0", t => console.log(`${t}%`));
|
|
9178
9283
|
* }
|
|
9179
9284
|
* ```
|
|
9180
9285
|
*/
|
|
9181
|
-
public downloadAsync(onProgress: (percent: number) => void): Promise<string>;
|
|
9286
|
+
public downloadAsync(version: string, onProgress: (percent: number) => void): Promise<string>;
|
|
9287
|
+
|
|
9288
|
+
/**
|
|
9289
|
+
* Gives the only file a download of a version may give: the name electron-updater keeps it under, the last part of
|
|
9290
|
+
* the address {@link FeedProvider} gives, the source's {@link FeedSource.formatReleasedFile} for the version, in the
|
|
9291
|
+
* `pending` folder of its cache folder for the installation.
|
|
9292
|
+
*
|
|
9293
|
+
* @param version The version.
|
|
9294
|
+
* @returns The package's path.
|
|
9295
|
+
* @example
|
|
9296
|
+
* ```ts
|
|
9297
|
+
* import type { FeedUpdater } from "@noldova/desktop.electron";
|
|
9298
|
+
*
|
|
9299
|
+
* export function isPackage(updater: FeedUpdater, file: string): boolean {
|
|
9300
|
+
* return file === updater.formatPackagePath("1.3.0");
|
|
9301
|
+
* }
|
|
9302
|
+
* ```
|
|
9303
|
+
*/
|
|
9304
|
+
public formatPackagePath(version: string): string;
|
|
9182
9305
|
|
|
9183
9306
|
/**
|
|
9184
9307
|
* Cancels the download in progress, if any.
|
|
@@ -10550,8 +10673,8 @@ export declare class MainProcessLog implements IMainProcessLog {
|
|
|
10550
10673
|
public openAsync(): Promise<void>;
|
|
10551
10674
|
|
|
10552
10675
|
/**
|
|
10553
|
-
* Records a line, stamped with the time and redacted, on standard error and, once open, in the file
|
|
10554
|
-
* cannot take a line, later lines go to standard error only, and the log records why there.
|
|
10676
|
+
* Records a line, stamped with the time and redacted, on standard error at once and, once open, in the file without
|
|
10677
|
+
* waiting for the disk. When the file cannot take a line, later lines go to standard error only, and the log records why there.
|
|
10555
10678
|
*
|
|
10556
10679
|
* @param text What happened.
|
|
10557
10680
|
* @example
|
|
@@ -10598,6 +10721,20 @@ export declare class MainProcessLog implements IMainProcessLog {
|
|
|
10598
10721
|
* ```
|
|
10599
10722
|
*/
|
|
10600
10723
|
public writeShared(text: string): void;
|
|
10724
|
+
|
|
10725
|
+
/**
|
|
10726
|
+
* Writes the lines still waiting for the file at once, in order, as when the main process is about to quit or exit.
|
|
10727
|
+
*
|
|
10728
|
+
* @example
|
|
10729
|
+
* ```ts
|
|
10730
|
+
* import type { MainProcessLog } from "@noldova/desktop.electron";
|
|
10731
|
+
*
|
|
10732
|
+
* export function finish(log: MainProcessLog): void {
|
|
10733
|
+
* log.flush();
|
|
10734
|
+
* }
|
|
10735
|
+
* ```
|
|
10736
|
+
*/
|
|
10737
|
+
public flush(): void;
|
|
10601
10738
|
}
|
|
10602
10739
|
|
|
10603
10740
|
/**
|
package/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.electron/src/api/index.ts"],"names":[],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.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
package/models/feed-source.js
CHANGED
|
@@ -13,12 +13,14 @@ export class FeedSource {
|
|
|
13
13
|
packageFile;
|
|
14
14
|
fetchAsync;
|
|
15
15
|
timeout;
|
|
16
|
-
|
|
16
|
+
formatReleasedFile;
|
|
17
|
+
constructor(feed, channelFile, packageFile, fetchAsync, timeout = t => AbortSignal.timeout(t), formatReleasedFile = () => packageFile) {
|
|
17
18
|
this.feed = feed;
|
|
18
19
|
this.channelFile = channelFile;
|
|
19
20
|
this.packageFile = packageFile;
|
|
20
21
|
this.fetchAsync = fetchAsync;
|
|
21
22
|
this.timeout = timeout;
|
|
23
|
+
this.formatReleasedFile = formatReleasedFile;
|
|
22
24
|
}
|
|
23
25
|
static create(feed, productName, platform, architecture, fetchAsync, isDebianPackage = false) {
|
|
24
26
|
const target = Resources.updateTargets.get(platform);
|
|
@@ -26,7 +28,7 @@ export class FeedSource {
|
|
|
26
28
|
return null;
|
|
27
29
|
const [name, extension] = target;
|
|
28
30
|
const packageExtension = isDebianPackage && platform === Resources.linuxPlatform ? Resources.debianPackageExtension : extension;
|
|
29
|
-
return new FeedSource(feed, Resources.formatChannelFile(name, architecture), Resources.formatPackageFile(productName, name, architecture, packageExtension), fetchAsync);
|
|
31
|
+
return new FeedSource(feed, Resources.formatChannelFile(name, architecture), Resources.formatPackageFile(productName, name, architecture, packageExtension), fetchAsync, undefined, t => Resources.formatReleasedPackageFile(productName, t, name, architecture, packageExtension));
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
//# sourceMappingURL=feed-source.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feed-source.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.electron/src/models/feed-source.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAG/B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,UAA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,IAAI,CAAC;QACd,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,MAAM,CAAC;QACjC,MAAM,gBAAgB,GAAG,eAAe,IAAI,QAAQ,KAAK,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC,CAAC,SAAS,CAAC;QAChI,OAAO,IAAI,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE,SAAS,CAAC,iBAAiB,CAAC,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,CAAC,EAAE,UAAU,EACrK,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,yBAAyB,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC/G,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noldova/desktop.electron",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Noldova Desktop's Electron main process and preload: it starts and connects to the runtime, opens the window, and owns the tray, notifications from the operating system, the menu bar on macOS, shutdown and updates.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"registry": "https://registry.npmjs.org/"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@noldova/desktop.protocol": "0.0.
|
|
36
|
-
"@noldova/desktop.runtime": "0.0.
|
|
35
|
+
"@noldova/desktop.protocol": "0.0.3",
|
|
36
|
+
"@noldova/desktop.runtime": "0.0.3",
|
|
37
37
|
"electron-updater": "6.8.9"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
}
|
|
78
78
|
]
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "4d7955e6086c27667752d6692ecfd1771be5a753"
|
|
81
81
|
}
|
package/resources.js
CHANGED
|
@@ -78,7 +78,10 @@ export class Resources {
|
|
|
78
78
|
static clearSelection = "clearSelection";
|
|
79
79
|
static foundInPageEvent = "found-in-page";
|
|
80
80
|
static zoomChangedEvent = "zoom-changed";
|
|
81
|
+
static pageFaviconUpdatedEvent = "page-favicon-updated";
|
|
82
|
+
static imageField = "image";
|
|
81
83
|
static factorField = "factor";
|
|
84
|
+
static isControlledField = "isControlled";
|
|
82
85
|
static matchesField = "matches";
|
|
83
86
|
static activeField = "active";
|
|
84
87
|
static textField = "text";
|
|
@@ -185,6 +188,8 @@ export class Resources {
|
|
|
185
188
|
static webViewZoneSeparator = "%";
|
|
186
189
|
static blankPage = "about:blank";
|
|
187
190
|
static sourceDocument = "about:srcdoc";
|
|
191
|
+
static sourceDocumentPath = "srcdoc";
|
|
192
|
+
static aboutScheme = "about:";
|
|
188
193
|
static webViewPartitionPrefix = "persist:";
|
|
189
194
|
static webViewPartitionSeparator = ".";
|
|
190
195
|
static webViewsPerPane = 32;
|
|
@@ -206,6 +211,7 @@ export class Resources {
|
|
|
206
211
|
static codeField = "code";
|
|
207
212
|
static modifiersField = "modifiers";
|
|
208
213
|
static originField = "origin";
|
|
214
|
+
static dispositionField = "disposition";
|
|
209
215
|
static altModifier = 1;
|
|
210
216
|
static ctrlModifier = 2;
|
|
211
217
|
static metaModifier = 4;
|
|
@@ -271,6 +277,7 @@ export class Resources {
|
|
|
271
277
|
static viewField = "view";
|
|
272
278
|
static moduleField = "module";
|
|
273
279
|
static partitionField = "partition";
|
|
280
|
+
static keysField = "keys";
|
|
274
281
|
static isAttachedField = "isAttached";
|
|
275
282
|
static timeoutField = "timeoutMilliseconds";
|
|
276
283
|
static downloadRequest = "download";
|
|
@@ -422,9 +429,11 @@ export class Resources {
|
|
|
422
429
|
static downloadProgressEvent = "download-progress";
|
|
423
430
|
static pendingUpdateFolder = "pending";
|
|
424
431
|
static updaterCacheFolderField = "updaterCacheDirName";
|
|
432
|
+
static releaseVersionPattern = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/u;
|
|
425
433
|
static updateVersionPattern = /^(0|[1-9]\d{0,8})\.(0|[1-9]\d{0,8})\.(0|[1-9]\d{0,8})(?:-internal\.(0|[1-9]\d{0,8}))?$/u;
|
|
426
434
|
static sha512Algorithm = "sha512";
|
|
427
435
|
static base64Encoding = "base64";
|
|
436
|
+
static latin1Encoding = "latin1";
|
|
428
437
|
static lineBreak = "\n";
|
|
429
438
|
static updateInfoInvalid = "The release's information is invalid.";
|
|
430
439
|
static updateDownloadMismatch = "The download doesn't match the release.";
|
|
@@ -902,6 +911,55 @@ export class Resources {
|
|
|
902
911
|
static nameAssignment = "=";
|
|
903
912
|
static lineBreaks = /\s*[\r\n]+\s*/g;
|
|
904
913
|
static lineJoin = " ";
|
|
914
|
+
static isEndedField = "isEnded";
|
|
915
|
+
static isTimedOutField = "isTimedOut";
|
|
916
|
+
static targetClosedError = "target closed";
|
|
917
|
+
static ipv4Version = 4;
|
|
918
|
+
static ipv6Version = 6;
|
|
919
|
+
static ipv4Separator = ".";
|
|
920
|
+
static ipv6Separator = ":";
|
|
921
|
+
static ipv6ZeroRun = "::";
|
|
922
|
+
static hextetRadix = 16;
|
|
923
|
+
static mappedMarkerHextet = 5;
|
|
924
|
+
static mappedIpv4Marker = 0xffff;
|
|
925
|
+
static embeddedIpv4Hextet = 6;
|
|
926
|
+
static nat64PrefixHextets = 2;
|
|
927
|
+
static byteBits = 8;
|
|
928
|
+
static byteMask = 0xff;
|
|
929
|
+
static nat64First = 0x64;
|
|
930
|
+
static nat64Second = 0xff9b;
|
|
931
|
+
static uniqueLocalMask = 0xfe00;
|
|
932
|
+
static uniqueLocalPrefix = 0xfc00;
|
|
933
|
+
static linkLocalMask = 0xffc0;
|
|
934
|
+
static linkLocalPrefix = 0xfe80;
|
|
935
|
+
static loopbackFirst = 127;
|
|
936
|
+
static privateClassAFirst = 10;
|
|
937
|
+
static privateClassBFirst = 172;
|
|
938
|
+
static privateClassBSecondLow = 16;
|
|
939
|
+
static privateClassBSecondHigh = 31;
|
|
940
|
+
static privateClassCFirst = 192;
|
|
941
|
+
static privateClassCSecond = 168;
|
|
942
|
+
static sharedAddressFirst = 100;
|
|
943
|
+
static sharedAddressSecondLow = 64;
|
|
944
|
+
static sharedAddressSecondHigh = 127;
|
|
945
|
+
static linkLocalFirst = 169;
|
|
946
|
+
static linkLocalSecond = 254;
|
|
947
|
+
static faviconDecodeWorld = 1997;
|
|
948
|
+
static faviconDecodeTimeout = 2000;
|
|
949
|
+
static faviconFetchTimeout = 10_000;
|
|
950
|
+
static faviconCandidateLimit = 4;
|
|
951
|
+
static faviconByteLimit = 1_048_576;
|
|
952
|
+
static faviconSide = 64;
|
|
953
|
+
static faviconPngLimit = 16_384;
|
|
954
|
+
static faviconBase64Limit = 21_848;
|
|
955
|
+
static faviconHeaderStart = 12;
|
|
956
|
+
static faviconWidthOffset = 16;
|
|
957
|
+
static faviconHeightOffset = 20;
|
|
958
|
+
static faviconHeaderEnd = 24;
|
|
959
|
+
static faviconHeaderType = "IHDR";
|
|
960
|
+
static faviconPngPrefix = "data:image/png;base64,";
|
|
961
|
+
static faviconPngSignature = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];
|
|
962
|
+
static faviconBase64Pattern = /^[A-Za-z0-9+/]+={0,2}$/u;
|
|
905
963
|
static get updateUnderWay() {
|
|
906
964
|
return `Another update of ${Resources.applicationName} is under way.`;
|
|
907
965
|
}
|
|
@@ -1013,6 +1071,12 @@ export class Resources {
|
|
|
1013
1071
|
static formatFileFilterName(extensions) {
|
|
1014
1072
|
return extensions.map(t => `*.${t}`).join(", ");
|
|
1015
1073
|
}
|
|
1074
|
+
static formatWebViewPortsUnread(reason) {
|
|
1075
|
+
return `The runtime's blocked loopback ports could not be read, so web views refuse every loopback address: ${reason}`;
|
|
1076
|
+
}
|
|
1077
|
+
static formatWebViewPortsInvalid(reason) {
|
|
1078
|
+
return `The runtime sent blocked loopback ports that are not valid, so they were not acknowledged: ${reason}`;
|
|
1079
|
+
}
|
|
1016
1080
|
static formatWebViewsUnreadable(reason) {
|
|
1017
1081
|
return `The modules' web view declarations could not be read, so no web view opens: ${reason}`;
|
|
1018
1082
|
}
|
|
@@ -1539,11 +1603,34 @@ export class Resources {
|
|
|
1539
1603
|
static formatPackageFile(productName, platform, architecture, extension) {
|
|
1540
1604
|
return `${productName}-${platform}-${architecture}.${extension}`;
|
|
1541
1605
|
}
|
|
1606
|
+
static formatReleasedPackageFile(productName, version, platform, architecture, extension) {
|
|
1607
|
+
return `${productName}-${version}-${platform}-${architecture}.${extension}`;
|
|
1608
|
+
}
|
|
1542
1609
|
static formatUpdateCacheFolder(slug, installationId) {
|
|
1543
1610
|
return `${slug}${Resources.updateCacheSuffix}${installationId}`;
|
|
1544
1611
|
}
|
|
1545
1612
|
static formatWindowSize(name, minimum) {
|
|
1546
1613
|
return `The window ${name} is a whole number of at least ${minimum} pixels.`;
|
|
1547
1614
|
}
|
|
1615
|
+
static formatIpv4(first, second, third, fourth) {
|
|
1616
|
+
return `${first}.${second}.${third}.${fourth}`;
|
|
1617
|
+
}
|
|
1618
|
+
static formatSubdomainSuffix(hostname) {
|
|
1619
|
+
return `.${hostname}`;
|
|
1620
|
+
}
|
|
1621
|
+
static formatFaviconDecodeScript(source) {
|
|
1622
|
+
return `(async () => {
|
|
1623
|
+
const bitmap = await createImageBitmap(new Blob([Uint8Array.from(atob("${source}"), t => t.charCodeAt(0))]));
|
|
1624
|
+
const scale = Math.min(1, ${Resources.faviconSide} / Math.max(bitmap.width, bitmap.height));
|
|
1625
|
+
const canvas = new OffscreenCanvas(Math.max(1, Math.round(bitmap.width * scale)), Math.max(1, Math.round(bitmap.height * scale)));
|
|
1626
|
+
canvas.getContext("2d").drawImage(bitmap, 0, 0, canvas.width, canvas.height);
|
|
1627
|
+
bitmap.close();
|
|
1628
|
+
const png = new Uint8Array(await (await canvas.convertToBlob({ type: "image/png" })).arrayBuffer());
|
|
1629
|
+
let text = "";
|
|
1630
|
+
for (const value of png)
|
|
1631
|
+
text += String.fromCharCode(value);
|
|
1632
|
+
return btoa(text);
|
|
1633
|
+
})().catch(() => null)`;
|
|
1634
|
+
}
|
|
1548
1635
|
}
|
|
1549
1636
|
//# sourceMappingURL=resources.js.map
|