@krate/app 0.0.0-stage → 0.5.0-rc.11
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 +201 -0
- package/README.md +88 -2
- package/dist/automation.d.ts +11 -0
- package/dist/automation.d.ts.map +1 -0
- package/dist/automation.js +27 -0
- package/dist/badge.d.ts +13 -0
- package/dist/badge.d.ts.map +1 -0
- package/dist/badge.js +34 -0
- package/dist/chrome.d.ts +90 -0
- package/dist/chrome.d.ts.map +1 -0
- package/dist/chrome.js +133 -0
- package/dist/client.d.ts +26 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +545 -0
- package/dist/clipboard.d.ts +19 -0
- package/dist/clipboard.d.ts.map +1 -0
- package/dist/clipboard.js +51 -0
- package/dist/cookies.d.ts +44 -0
- package/dist/cookies.d.ts.map +1 -0
- package/dist/cookies.js +45 -0
- package/dist/crash.d.ts +35 -0
- package/dist/crash.d.ts.map +1 -0
- package/dist/crash.js +28 -0
- package/dist/db.d.ts +14 -0
- package/dist/db.d.ts.map +1 -0
- package/dist/db.js +23 -0
- package/dist/dialog.d.ts +36 -0
- package/dist/dialog.d.ts.map +1 -0
- package/dist/dialog.js +23 -0
- package/dist/downloads.d.ts +35 -0
- package/dist/downloads.d.ts.map +1 -0
- package/dist/downloads.js +30 -0
- package/dist/driver.d.ts +190 -0
- package/dist/driver.d.ts.map +1 -0
- package/dist/driver.js +637 -0
- package/dist/errors.d.ts +7 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +11 -0
- package/dist/events.d.ts +6 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +47 -0
- package/dist/extension.d.ts +10 -0
- package/dist/extension.d.ts.map +1 -0
- package/dist/extension.js +25 -0
- package/dist/fakehost.d.ts +18 -0
- package/dist/fakehost.d.ts.map +1 -0
- package/dist/fakehost.js +199 -0
- package/dist/fs.d.ts +26 -0
- package/dist/fs.d.ts.map +1 -0
- package/dist/fs.js +38 -0
- package/dist/host.d.ts +4 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +25 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/kv.d.ts +6 -0
- package/dist/kv.d.ts.map +1 -0
- package/dist/kv.js +19 -0
- package/dist/lifecycle.d.ts +22 -0
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/lifecycle.js +85 -0
- package/dist/login.d.ts +10 -0
- package/dist/login.d.ts.map +1 -0
- package/dist/login.js +8 -0
- package/dist/media.d.ts +50 -0
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +70 -0
- package/dist/menu.d.ts +71 -0
- package/dist/menu.d.ts.map +1 -0
- package/dist/menu.js +114 -0
- package/dist/mock.d.ts +14 -0
- package/dist/mock.d.ts.map +1 -0
- package/dist/mock.js +47 -0
- package/dist/notify.d.ts +25 -0
- package/dist/notify.d.ts.map +1 -0
- package/dist/notify.js +32 -0
- package/dist/offscreen.d.ts +24 -0
- package/dist/offscreen.d.ts.map +1 -0
- package/dist/offscreen.js +27 -0
- package/dist/os.d.ts +20 -0
- package/dist/os.d.ts.map +1 -0
- package/dist/os.js +43 -0
- package/dist/page.d.ts +69 -0
- package/dist/page.d.ts.map +1 -0
- package/dist/page.js +61 -0
- package/dist/permission.d.ts +5 -0
- package/dist/permission.d.ts.map +1 -0
- package/dist/permission.js +18 -0
- package/dist/port.d.ts +35 -0
- package/dist/port.d.ts.map +1 -0
- package/dist/port.js +159 -0
- package/dist/power.d.ts +19 -0
- package/dist/power.d.ts.map +1 -0
- package/dist/power.js +35 -0
- package/dist/remote.d.ts +156 -0
- package/dist/remote.d.ts.map +1 -0
- package/dist/remote.js +115 -0
- package/dist/screen.d.ts +25 -0
- package/dist/screen.d.ts.map +1 -0
- package/dist/screen.js +23 -0
- package/dist/shortcut.d.ts +2 -0
- package/dist/shortcut.d.ts.map +1 -0
- package/dist/shortcut.js +44 -0
- package/dist/testing.d.ts +6 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +9 -0
- package/dist/theme.d.ts +12 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +13 -0
- package/dist/tray.d.ts +18 -0
- package/dist/tray.d.ts.map +1 -0
- package/dist/tray.js +23 -0
- package/dist/types.d.ts +16 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/updater.d.ts +36 -0
- package/dist/updater.d.ts.map +1 -0
- package/dist/updater.js +58 -0
- package/dist/window.d.ts +154 -0
- package/dist/window.d.ts.map +1 -0
- package/dist/window.js +205 -0
- package/dist/wire.d.ts +26 -0
- package/dist/wire.d.ts.map +1 -0
- package/dist/wire.js +328 -0
- package/dist/worker-host.d.ts +6 -0
- package/dist/worker-host.d.ts.map +1 -0
- package/dist/worker-host.js +36 -0
- package/dist/worker.d.ts +62 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +86 -0
- package/package.json +188 -3
package/dist/cookies.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Cookies and site data. Needs the "cookies" permission.
|
|
2
|
+
//
|
|
3
|
+
// Cookies are addressed by URL (default: the app origin). WebKit (Linux and
|
|
4
|
+
// macOS) keeps no cookies for the app's own custom scheme, so there these
|
|
5
|
+
// calls reject with code "unsupported" unless you pass the URL of an http(s)
|
|
6
|
+
// site, for example the API your pages fetch; on Windows the app origin is an
|
|
7
|
+
// https origin and has cookies. clearSiteData works everywhere.
|
|
8
|
+
import { call } from "./index.js";
|
|
9
|
+
/** list resolves to the cookies that would be sent to the URL. */
|
|
10
|
+
function cookiesList(url = "") {
|
|
11
|
+
return call("krate/cookies.list", [url]);
|
|
12
|
+
}
|
|
13
|
+
/** get resolves to the cookie with this name, or null. */
|
|
14
|
+
function cookiesGet(name, url = "") {
|
|
15
|
+
return call("krate/cookies.get", [name, url]);
|
|
16
|
+
}
|
|
17
|
+
/** set stores a cookie. */
|
|
18
|
+
function cookiesSet(cookie, url = "") {
|
|
19
|
+
const expires = cookie.expires instanceof Date ? cookie.expires.getTime() : (cookie.expires ?? null);
|
|
20
|
+
return call("krate/cookies.set", [
|
|
21
|
+
{
|
|
22
|
+
name: cookie.name,
|
|
23
|
+
value: cookie.value,
|
|
24
|
+
domain: cookie.domain ?? "",
|
|
25
|
+
path: cookie.path ?? "",
|
|
26
|
+
expires,
|
|
27
|
+
secure: cookie.secure ?? false,
|
|
28
|
+
httpOnly: cookie.httpOnly ?? false,
|
|
29
|
+
sameSite: cookie.sameSite ?? "",
|
|
30
|
+
},
|
|
31
|
+
url,
|
|
32
|
+
]);
|
|
33
|
+
}
|
|
34
|
+
/** delete removes the cookies with this name. */
|
|
35
|
+
function cookiesDelete(name, url = "") {
|
|
36
|
+
return call("krate/cookies.delete", [name, url]);
|
|
37
|
+
}
|
|
38
|
+
export { cookiesDelete as delete };
|
|
39
|
+
/** clearSiteData removes cookies, cache and storage; with no options, all of it. */
|
|
40
|
+
function cookiesClearSiteData(options = {}) {
|
|
41
|
+
return call("krate/cookies.clearSiteData", [
|
|
42
|
+
{ cookies: options.cookies ?? false, cache: options.cache ?? false, storage: options.storage ?? false },
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
45
|
+
export { cookiesList as list, cookiesGet as get, cookiesSet as set, cookiesClearSiteData as clearSiteData };
|
package/dist/crash.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type SubscribeOptions } from "./events.js";
|
|
2
|
+
export type CrashKind = "panic" | "fatal" | "webview";
|
|
3
|
+
export interface CrashSummary {
|
|
4
|
+
id: string;
|
|
5
|
+
kind: CrashKind;
|
|
6
|
+
time: string;
|
|
7
|
+
reason: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CrashReport extends CrashSummary {
|
|
10
|
+
appId: string;
|
|
11
|
+
appVersion: string;
|
|
12
|
+
os: string;
|
|
13
|
+
arch: string;
|
|
14
|
+
osVersion: string;
|
|
15
|
+
goVersion: string;
|
|
16
|
+
shellVersion: string;
|
|
17
|
+
process: string;
|
|
18
|
+
window?: string;
|
|
19
|
+
view?: string;
|
|
20
|
+
stack?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface CrashEvent {
|
|
23
|
+
kind: CrashKind;
|
|
24
|
+
reason: string;
|
|
25
|
+
window: string;
|
|
26
|
+
view: string;
|
|
27
|
+
reportId: string;
|
|
28
|
+
reloaded: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare function listCrashReports(): Promise<CrashSummary[]>;
|
|
31
|
+
export declare function readCrashReport(id: string): Promise<CrashReport>;
|
|
32
|
+
export declare function deleteCrashReport(id: string): Promise<void>;
|
|
33
|
+
export declare function setCrashAutoReload(on: boolean): Promise<void>;
|
|
34
|
+
export declare function onCrash(fn: (e: CrashEvent) => void, opts?: SubscribeOptions): () => void;
|
|
35
|
+
//# sourceMappingURL=crash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crash.d.ts","sourceRoot":"","sources":["../src/crash.ts"],"names":[],"mappings":"AAQA,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAEtD,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAEhB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IAErB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IAEb,QAAQ,EAAE,MAAM,CAAC;IAEjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAE1D;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAEhE;AAGD,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3D;AAKD,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7D;AAED,wBAAgB,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,MAAM,IAAI,CAExF"}
|
package/dist/crash.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Crash reports and crash events. Needs the "crash" permission.
|
|
2
|
+
//
|
|
3
|
+
// The shell writes a JSON report under <logDir>/crashes when a Go panic or a
|
|
4
|
+
// fatal runtime error ends the shell or the Go host, and when a webview
|
|
5
|
+
// process crashes. Reports from a run that ended in a crash are listed on the
|
|
6
|
+
// next launch, so the app can upload them. Nothing leaves the machine by
|
|
7
|
+
// itself.
|
|
8
|
+
import { call } from "./index.js";
|
|
9
|
+
import { subscribe } from "./events.js";
|
|
10
|
+
export function listCrashReports() {
|
|
11
|
+
return call("krate/crash.list", []);
|
|
12
|
+
}
|
|
13
|
+
export function readCrashReport(id) {
|
|
14
|
+
return call("krate/crash.read", [id]);
|
|
15
|
+
}
|
|
16
|
+
// remove deletes a report (deleting a missing one succeeds).
|
|
17
|
+
export function deleteCrashReport(id) {
|
|
18
|
+
return call("krate/crash.delete", [id]);
|
|
19
|
+
}
|
|
20
|
+
// setAutoReload makes the shell reload a webview whose process crashed. It
|
|
21
|
+
// gives up on a window that crashes again within seconds, so a broken page
|
|
22
|
+
// cannot loop.
|
|
23
|
+
export function setCrashAutoReload(on) {
|
|
24
|
+
return call("krate/crash.setAutoReload", [on]);
|
|
25
|
+
}
|
|
26
|
+
export function onCrash(fn, opts) {
|
|
27
|
+
return subscribe("krate/crash.events", fn, opts);
|
|
28
|
+
}
|
package/dist/db.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type DbValue = null | number | string | boolean | Uint8Array | Date;
|
|
2
|
+
export type Row = Record<string, unknown>;
|
|
3
|
+
export interface ExecResult {
|
|
4
|
+
rowsAffected: number;
|
|
5
|
+
lastInsertId: number;
|
|
6
|
+
}
|
|
7
|
+
export interface Statement {
|
|
8
|
+
sql: string;
|
|
9
|
+
params?: DbValue[];
|
|
10
|
+
}
|
|
11
|
+
export declare function query<T = Row>(sql: string, ...params: DbValue[]): Promise<T[]>;
|
|
12
|
+
export declare function exec(sql: string, ...params: DbValue[]): Promise<ExecResult>;
|
|
13
|
+
export declare function transaction(statements: Statement[]): Promise<ExecResult[]>;
|
|
14
|
+
//# sourceMappingURL=db.d.ts.map
|
package/dist/db.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,IAAI,CAAC;AAC3E,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;CACpB;AAED,wBAAgB,KAAK,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAE9E;AAED,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAE3E;AAID,wBAAgB,WAAW,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAE1E"}
|
package/dist/db.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// SQLite database app.db in the app data directory (WAL mode). Host ids
|
|
2
|
+
// krate/db.*; permission db.
|
|
3
|
+
//
|
|
4
|
+
// Parameters bind to ? placeholders. Values are null, number, string,
|
|
5
|
+
// Uint8Array (blob), boolean (stored as 0 or 1) and Date (stored as an ISO
|
|
6
|
+
// string). Rows hold null, number, string, Uint8Array and Date for columns
|
|
7
|
+
// the driver parses as dates. Integers beyond 2^53 lose precision in
|
|
8
|
+
// JavaScript; cast them to TEXT in SQL if the exact value matters.
|
|
9
|
+
//
|
|
10
|
+
// ATTACH, DETACH and VACUUM are rejected from the UI (code "forbidden_sql").
|
|
11
|
+
// Errors carry code "sql_error", "constraint" or "busy".
|
|
12
|
+
import { call } from "./index.js";
|
|
13
|
+
export function query(sql, ...params) {
|
|
14
|
+
return call("krate/db.query", params.length ? [sql, params] : [sql]);
|
|
15
|
+
}
|
|
16
|
+
export function exec(sql, ...params) {
|
|
17
|
+
return call("krate/db.exec", params.length ? [sql, params] : [sql]);
|
|
18
|
+
}
|
|
19
|
+
// Runs the statements in one transaction: all or nothing. On failure the
|
|
20
|
+
// error message names the failing statement ("statement 1: ...").
|
|
21
|
+
export function transaction(statements) {
|
|
22
|
+
return call("krate/db.transaction", [statements]);
|
|
23
|
+
}
|
package/dist/dialog.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface Filter {
|
|
2
|
+
name: string;
|
|
3
|
+
patterns: string[];
|
|
4
|
+
}
|
|
5
|
+
export interface OpenOptions {
|
|
6
|
+
title?: string;
|
|
7
|
+
dir?: string;
|
|
8
|
+
filters?: Filter[];
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
showHidden?: boolean;
|
|
11
|
+
window?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface SaveOptions {
|
|
14
|
+
title?: string;
|
|
15
|
+
dir?: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
filters?: Filter[];
|
|
18
|
+
overwrite?: boolean;
|
|
19
|
+
window?: string;
|
|
20
|
+
}
|
|
21
|
+
export type MessageKind = "info" | "warning" | "error" | "question";
|
|
22
|
+
export interface MessageOptions {
|
|
23
|
+
kind?: MessageKind;
|
|
24
|
+
title?: string;
|
|
25
|
+
message: string;
|
|
26
|
+
detail?: string;
|
|
27
|
+
buttons?: string[];
|
|
28
|
+
default?: number;
|
|
29
|
+
window?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function openFile(o?: OpenOptions): Promise<string[]>;
|
|
32
|
+
export declare function openFolder(o?: OpenOptions): Promise<string[]>;
|
|
33
|
+
export declare function saveFile(o?: SaveOptions): Promise<string | null>;
|
|
34
|
+
export declare function message(o: MessageOptions): Promise<number>;
|
|
35
|
+
export declare function confirm(title: string, text: string): Promise<boolean>;
|
|
36
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../src/dialog.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IAEb,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MA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AO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE3E"}
|
package/dist/dialog.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Native file and message dialogs. Needs the "dialog" permission.
|
|
2
|
+
import { call } from "./index.js";
|
|
3
|
+
import { clean } from "./events.js";
|
|
4
|
+
const KINDS = { info: 0, warning: 1, error: 2, question: 3 };
|
|
5
|
+
// openFile resolves to the chosen paths, or [] when the user cancels.
|
|
6
|
+
export function openFile(o = {}) {
|
|
7
|
+
return call("krate/dialog.openFile", [clean({ ...o })]);
|
|
8
|
+
}
|
|
9
|
+
export function openFolder(o = {}) {
|
|
10
|
+
return call("krate/dialog.openFolder", [clean({ ...o })]);
|
|
11
|
+
}
|
|
12
|
+
// saveFile resolves to the chosen path, or null when the user cancels.
|
|
13
|
+
export function saveFile(o = {}) {
|
|
14
|
+
return call("krate/dialog.saveFile", [clean({ ...o })]);
|
|
15
|
+
}
|
|
16
|
+
// message resolves to the index of the pressed button, or -1.
|
|
17
|
+
export function message(o) {
|
|
18
|
+
const { kind, ...rest } = o;
|
|
19
|
+
return call("krate/dialog.message", [clean({ ...rest, kind: kind ? KINDS[kind] : undefined })]);
|
|
20
|
+
}
|
|
21
|
+
export async function confirm(title, text) {
|
|
22
|
+
return (await message({ kind: "question", title, message: text, buttons: ["No", "Yes"], default: 1 })) === 1;
|
|
23
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type SubscribeOptions } from "./events.js";
|
|
2
|
+
export type DownloadState = "started" | "progress" | "completed" | "cancelled" | "failed";
|
|
3
|
+
export interface DownloadInfo {
|
|
4
|
+
id: number;
|
|
5
|
+
/** The view that started it. */
|
|
6
|
+
view: string;
|
|
7
|
+
url: string;
|
|
8
|
+
/** The file being written; the final path once completed. Empty before the destination is chosen. */
|
|
9
|
+
path: string;
|
|
10
|
+
state: DownloadState;
|
|
11
|
+
received: number;
|
|
12
|
+
/** Size in bytes, -1 when unknown. */
|
|
13
|
+
total: number;
|
|
14
|
+
/** Set when state is "failed". */
|
|
15
|
+
error: string;
|
|
16
|
+
}
|
|
17
|
+
export type DownloadEvent = DownloadInfo;
|
|
18
|
+
export interface DownloadOptions {
|
|
19
|
+
/** Absolute folder to save to. Empty means every download asks. */
|
|
20
|
+
dir?: string;
|
|
21
|
+
/** With `dir`: ask with the save dialog, starting in `dir`, instead of saving silently. */
|
|
22
|
+
ask?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** configure sets where downloads are saved. */
|
|
25
|
+
declare function downloadsConfigure(options: DownloadOptions): Promise<void>;
|
|
26
|
+
/** list resolves to the running downloads and the most recent finished ones. */
|
|
27
|
+
declare function downloadsList(): Promise<DownloadInfo[]>;
|
|
28
|
+
/** cancel stops a running download. */
|
|
29
|
+
declare function downloadsCancel(id: number): Promise<void>;
|
|
30
|
+
/** onEvent calls fn for every download event until the returned function is called. */
|
|
31
|
+
declare function downloadsOnEvent(fn: (e: DownloadEvent) => void, opts?: SubscribeOptions): () => void;
|
|
32
|
+
/** onDone calls fn once for each download that completes, with its final path. */
|
|
33
|
+
declare function downloadsOnDone(fn: (e: DownloadInfo) => void, opts?: SubscribeOptions): () => void;
|
|
34
|
+
export { downloadsConfigure as configure, downloadsList as list, downloadsCancel as cancel, downloadsOnEvent as onEvent, downloadsOnDone as onDone };
|
|
35
|
+
//# sourceMappingURL=downloads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"downloads.d.ts","sourceRoot":"","sources":["../src/downloads.ts"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAM/D,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE1F,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,qGAAqG;IACrG,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC;AAEzC,MAAM,WAAW,eAAe;IAC9B,mEAAmE;IACnE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2FAA2F;IAC3F,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,gDAAgD;AAChD,iBAAS,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnE;AAED,gFAAgF;AAChF,iBAAS,aAAa,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAEhD;AAED,uCAAuC;AACvC,iBAAS,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAElD;AAED,uFAAuF;AACvF,iBAAS,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,MAAM,IAAI,CAE7F;AAED,kFAAkF;AAClF,iBAAS,eAAe,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,IAAI,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,MAAM,IAAI,CAI3F;AAED,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,aAAa,IAAI,IAAI,EAAE,eAAe,IAAI,MAAM,EAAE,gBAAgB,IAAI,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Downloads started by the page (a link with the download attribute, a blob
|
|
2
|
+
// URL, a navigation to a file response). Needs the "downloads" permission.
|
|
3
|
+
// By default each download asks where to save with the native save dialog;
|
|
4
|
+
// configure({dir}) saves silently into a folder under a free file name.
|
|
5
|
+
import { call } from "./index.js";
|
|
6
|
+
import { subscribe } from "./events.js";
|
|
7
|
+
/** configure sets where downloads are saved. */
|
|
8
|
+
function downloadsConfigure(options) {
|
|
9
|
+
return call("krate/downloads.configure", [{ dir: options.dir ?? "", ask: options.ask ?? false }]);
|
|
10
|
+
}
|
|
11
|
+
/** list resolves to the running downloads and the most recent finished ones. */
|
|
12
|
+
function downloadsList() {
|
|
13
|
+
return call("krate/downloads.list");
|
|
14
|
+
}
|
|
15
|
+
/** cancel stops a running download. */
|
|
16
|
+
function downloadsCancel(id) {
|
|
17
|
+
return call("krate/downloads.cancel", [id]);
|
|
18
|
+
}
|
|
19
|
+
/** onEvent calls fn for every download event until the returned function is called. */
|
|
20
|
+
function downloadsOnEvent(fn, opts) {
|
|
21
|
+
return subscribe("krate/downloads.events", fn, opts);
|
|
22
|
+
}
|
|
23
|
+
/** onDone calls fn once for each download that completes, with its final path. */
|
|
24
|
+
function downloadsOnDone(fn, opts) {
|
|
25
|
+
return downloadsOnEvent((e) => {
|
|
26
|
+
if (e.state === "completed")
|
|
27
|
+
fn(e);
|
|
28
|
+
}, opts);
|
|
29
|
+
}
|
|
30
|
+
export { downloadsConfigure as configure, downloadsList as list, downloadsCancel as cancel, downloadsOnEvent as onEvent, downloadsOnDone as onDone };
|
package/dist/driver.d.ts
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { type ChildProcess } from "node:child_process";
|
|
2
|
+
/** Environment variable that names the krate-shell binary (set by `krate native test`). */
|
|
3
|
+
export declare const SHELL_ENV = "KRATE_TEST_SHELL";
|
|
4
|
+
/** Environment variable that names the built app directory (set by `krate native test`). */
|
|
5
|
+
export declare const APP_ENV = "KRATE_TEST_APP";
|
|
6
|
+
export interface LaunchOptions {
|
|
7
|
+
/** Shell binary. Default: $KRATE_TEST_SHELL. */
|
|
8
|
+
shell?: string;
|
|
9
|
+
/** Built app directory. Default: $KRATE_TEST_APP. */
|
|
10
|
+
appDir?: string;
|
|
11
|
+
/** Extra environment for the shell and the host code it runs. */
|
|
12
|
+
env?: Record<string, string>;
|
|
13
|
+
/**
|
|
14
|
+
* Give the app an empty data, config and cache directory (default true), so
|
|
15
|
+
* its database, kv store and settings start fresh and never touch yours.
|
|
16
|
+
*/
|
|
17
|
+
isolate?: boolean;
|
|
18
|
+
/** How long to wait for the app to start and its main page to load, in milliseconds (default 60000). */
|
|
19
|
+
startTimeout?: number;
|
|
20
|
+
/** Default timeout of waitFor and the actions that wait, in milliseconds (default 5000). */
|
|
21
|
+
timeout?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface WaitOptions {
|
|
24
|
+
/** Milliseconds (default: the launch timeout, 5000). */
|
|
25
|
+
timeout?: number;
|
|
26
|
+
/** Polling interval in milliseconds (default 50). */
|
|
27
|
+
interval?: number;
|
|
28
|
+
}
|
|
29
|
+
/** One webview. A window's primary view has the window's id. */
|
|
30
|
+
export interface ViewInfo {
|
|
31
|
+
id: string;
|
|
32
|
+
window: string;
|
|
33
|
+
primary: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface WindowInfo {
|
|
36
|
+
id: string;
|
|
37
|
+
views: ViewInfo[];
|
|
38
|
+
}
|
|
39
|
+
export interface PressOptions {
|
|
40
|
+
/** Focus this element first. */
|
|
41
|
+
selector?: string;
|
|
42
|
+
}
|
|
43
|
+
/** An error from a host function the app (or an SDK id) answered with. */
|
|
44
|
+
export declare class HostCallError extends Error {
|
|
45
|
+
code: string;
|
|
46
|
+
data: unknown;
|
|
47
|
+
constructor(code: string, message: string, data: unknown);
|
|
48
|
+
}
|
|
49
|
+
declare class Channel {
|
|
50
|
+
readonly proc: ChildProcess;
|
|
51
|
+
private pending;
|
|
52
|
+
private tail;
|
|
53
|
+
private ready;
|
|
54
|
+
exited: boolean;
|
|
55
|
+
exitInfo: string;
|
|
56
|
+
stderr: string[];
|
|
57
|
+
constructor(proc: ChildProcess);
|
|
58
|
+
tailLog(): string;
|
|
59
|
+
private onLine;
|
|
60
|
+
waitReady(timeoutMs: number): Promise<void>;
|
|
61
|
+
send(cmd: string): Promise<string>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Calls fn (in the test process, not the page) until it returns a truthy value
|
|
65
|
+
* and returns that value. A throw counts as "not yet"; the last one is the
|
|
66
|
+
* failure's reason when the time runs out. Use it for conditions that mix
|
|
67
|
+
* pages and host events.
|
|
68
|
+
*/
|
|
69
|
+
export declare function poll<T>(fn: () => T | Promise<T>, opts?: WaitOptions): Promise<NonNullable<Awaited<T>>>;
|
|
70
|
+
/** One webview of the app. Get one from App.page, App.window(id).view() or App.waitForView. */
|
|
71
|
+
export declare class Page {
|
|
72
|
+
private readonly app;
|
|
73
|
+
readonly id: string;
|
|
74
|
+
constructor(app: App, id: string);
|
|
75
|
+
private run;
|
|
76
|
+
/**
|
|
77
|
+
* Runs a function (or an expression string, not statements) in the page and returns its
|
|
78
|
+
* JSON value; a returned promise is awaited. The function is serialized, so
|
|
79
|
+
* it cannot use variables of the test: pass them as arguments, which must be
|
|
80
|
+
* JSON values.
|
|
81
|
+
*/
|
|
82
|
+
evaluate<R = unknown, A extends unknown[] = unknown[]>(fn: string | ((...args: A) => R | Promise<R>), ...args: A): Promise<Awaited<R>>;
|
|
83
|
+
/** The current address of the page. */
|
|
84
|
+
url(): Promise<string>;
|
|
85
|
+
title(): Promise<string>;
|
|
86
|
+
/** Whether an element matches the selector right now. */
|
|
87
|
+
exists(selector: string): Promise<boolean>;
|
|
88
|
+
/** How many elements match the selector right now. */
|
|
89
|
+
count(selector: string): Promise<number>;
|
|
90
|
+
private actionable;
|
|
91
|
+
/** Clicks the first match: pointer and mouse events, then click. Waits for it to be visible and enabled. */
|
|
92
|
+
click(selector: string, opts?: WaitOptions): Promise<void>;
|
|
93
|
+
/** Sets a text field, select or editable element to text and fires input and change. */
|
|
94
|
+
fill(selector: string, text: string, opts?: WaitOptions): Promise<void>;
|
|
95
|
+
/** Types text into an element one key at a time. */
|
|
96
|
+
type(selector: string, text: string, opts?: WaitOptions): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Sends a key to the focused element (or to options.selector): "Enter",
|
|
99
|
+
* "Escape", "Tab", "a", "Control+a", "Shift+Tab". It dispatches keydown,
|
|
100
|
+
* keypress and keyup, and does the default action of the common keys (text
|
|
101
|
+
* insertion, Backspace, Enter submitting a form or activating a button,
|
|
102
|
+
* Space on buttons, Tab moving focus). It is not real keyboard input.
|
|
103
|
+
*/
|
|
104
|
+
press(key: string, opts?: PressOptions): Promise<void>;
|
|
105
|
+
/** The textContent of the first match. Waits for the element to exist. */
|
|
106
|
+
text(selector: string, opts?: WaitOptions): Promise<string>;
|
|
107
|
+
/** The value of an input, textarea or select. */
|
|
108
|
+
value(selector: string, opts?: WaitOptions): Promise<string>;
|
|
109
|
+
/**
|
|
110
|
+
* Waits until a selector matches an element, or until a predicate function
|
|
111
|
+
* (run in the page, may be async) returns a truthy value, and returns that
|
|
112
|
+
* value (undefined for a selector).
|
|
113
|
+
*/
|
|
114
|
+
waitFor<R = unknown>(target: string | (() => R | Promise<R>), opts?: WaitOptions): Promise<R | undefined>;
|
|
115
|
+
/** The errors the page threw so far: uncaught errors, unhandled rejections and errors the Krate runtime caught. */
|
|
116
|
+
errors(): Promise<string[]>;
|
|
117
|
+
/**
|
|
118
|
+
* Calls a host function as the page would (`<module id>.<Export>` for the
|
|
119
|
+
* app's own functions, or an SDK id such as "krate/kv.get"). Arguments and
|
|
120
|
+
* the result must be plain JSON values; streams are not supported. It runs
|
|
121
|
+
* with this view's permissions. Rejects with a HostCallError.
|
|
122
|
+
*/
|
|
123
|
+
call<R = unknown>(fn: string, ...args: unknown[]): Promise<R>;
|
|
124
|
+
/**
|
|
125
|
+
* Not available yet: the platform layer has no webview capture API. Use
|
|
126
|
+
* evaluate() to assert on the DOM instead. Rejects.
|
|
127
|
+
*/
|
|
128
|
+
screenshot(): Promise<Uint8Array>;
|
|
129
|
+
}
|
|
130
|
+
/** A window and its views. */
|
|
131
|
+
export declare class AppWindow {
|
|
132
|
+
private readonly app;
|
|
133
|
+
readonly id: string;
|
|
134
|
+
constructor(app: App, id: string);
|
|
135
|
+
views(): Promise<ViewInfo[]>;
|
|
136
|
+
/** The window's view with this id; the primary view without an id. */
|
|
137
|
+
view(id?: string): Page;
|
|
138
|
+
}
|
|
139
|
+
/** Fake native events, delivered to the app as the platform would. */
|
|
140
|
+
export interface Emitter {
|
|
141
|
+
/** A tray icon event; kind "menu" with the item id for a tray menu item. */
|
|
142
|
+
tray(kind?: "click" | "middle-click" | "right-click" | "menu", id?: string): Promise<void>;
|
|
143
|
+
/** A menu item use. */
|
|
144
|
+
menu(id: string, opts?: {
|
|
145
|
+
window?: string;
|
|
146
|
+
checked?: boolean;
|
|
147
|
+
}): Promise<void>;
|
|
148
|
+
/**
|
|
149
|
+
* The global shortcut the app registered for this accelerator, written as
|
|
150
|
+
* the app wrote it ("CmdOrCtrl+Shift+K"). Fails if none is registered.
|
|
151
|
+
*/
|
|
152
|
+
shortcut(accelerator: string): Promise<void>;
|
|
153
|
+
}
|
|
154
|
+
/** A running app. */
|
|
155
|
+
export declare class App {
|
|
156
|
+
private readonly ch;
|
|
157
|
+
private readonly cleanup;
|
|
158
|
+
/** Default timeout of the waits, in milliseconds. */
|
|
159
|
+
timeout: number;
|
|
160
|
+
readonly emit: Emitter;
|
|
161
|
+
private closed;
|
|
162
|
+
/** @internal use launch() */
|
|
163
|
+
constructor(ch: Channel, timeout: number, cleanup: () => void);
|
|
164
|
+
/** @internal */
|
|
165
|
+
send(cmd: string): Promise<string>;
|
|
166
|
+
/** Lines the shell and the host code wrote to stderr (the last 500). */
|
|
167
|
+
logs(): string[];
|
|
168
|
+
/** Every open view of every window, windows in creation order, primary views first. */
|
|
169
|
+
views(): Promise<ViewInfo[]>;
|
|
170
|
+
/** The open windows with their views. */
|
|
171
|
+
windows(): Promise<WindowInfo[]>;
|
|
172
|
+
/** A window by id ("main" is the first). It does not check that it is open. */
|
|
173
|
+
window(id?: string): AppWindow;
|
|
174
|
+
/** A view by id ("main" is the first window's primary view). It does not check that it is open. */
|
|
175
|
+
page(id?: string): Page;
|
|
176
|
+
/** Waits for a window (or view) to open, for example after the app opens a new window. */
|
|
177
|
+
waitForView(id: string, opts?: WaitOptions): Promise<Page>;
|
|
178
|
+
/** Waits until n views are open (counting every window's views). */
|
|
179
|
+
waitForViewCount(n: number, opts?: WaitOptions): Promise<ViewInfo[]>;
|
|
180
|
+
/** Quits the app and removes its isolated data. Safe to call twice. */
|
|
181
|
+
close(): Promise<void>;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Starts the app and resolves when it is ready. Under `krate native test` the
|
|
185
|
+
* shell and the built app come from the environment; outside it pass
|
|
186
|
+
* options.shell and options.appDir.
|
|
187
|
+
*/
|
|
188
|
+
export declare function launch(options?: LaunchOptions): Promise<App>;
|
|
189
|
+
export {};
|
|
190
|
+
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../src/driver.ts"],"names":[],"mappings":"AAKA,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAM9D,2FAA2F;AAC3F,eAAO,MAAM,SAAS,qBAAqB,CAAC;AAC5C,4FAA4F;AAC5F,eAAO,MAAM,OAAO,mBAAmB,CAAC;AAExC,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wGAAwG;IACxG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,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