mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-10-21 23:01:26 +02:00
feat: audit UI and trash
This commit is contained in:
1 parent
9965b75125
commit
d93afc2bd5
168 files changed
+19440
-5843
No files matched your search
+15
-2
@@ -96,6 +96,13 @@ export interface RunProfileOptions {
|
||||
headless?: boolean;
|
||||
}
|
||||
|
||||
export interface BatchRunOptions extends RunProfileOptions {
|
||||
/** Pause between the starts of two launches (0 to 60000). Defaults to the app's setting. */
|
||||
delayMs?: number;
|
||||
/** How many profiles may be starting at once (1 to 20). Defaults to the app's setting. */
|
||||
concurrency?: number;
|
||||
}
|
||||
|
||||
/** Drop every property the caller left `undefined`. */
|
||||
function body(fields: Record<string, unknown>): Record<string, unknown> {
|
||||
const result: Record<string, unknown> = {};
|
||||
@@ -413,12 +420,18 @@ export class DonutClient {
|
||||
*/
|
||||
batchRunProfiles(
|
||||
profileIds: string[],
|
||||
options: RunProfileOptions = {},
|
||||
options: BatchRunOptions = {},
|
||||
): Promise<BatchRunResponse> {
|
||||
return this.#request(
|
||||
"POST",
|
||||
"/v1/profiles/batch/run",
|
||||
body({ profile_ids: profileIds, url: options.url, headless: options.headless }),
|
||||
body({
|
||||
profile_ids: profileIds,
|
||||
url: options.url,
|
||||
headless: options.headless,
|
||||
delay_ms: options.delayMs,
|
||||
concurrency: options.concurrency,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
export { DEFAULT_HOST, DEFAULT_PORT, DonutClient, RunSession } from "./client.mts";
|
||||
export type { DonutClientOptions, RunProfileOptions } from "./client.mts";
|
||||
export type { BatchRunOptions, DonutClientOptions, RunProfileOptions } from "./client.mts";
|
||||
export { OMITTED, OPERATIONS } from "./coverage.mts";
|
||||
export type { OperationKey } from "./coverage.mts";
|
||||
export {
|
||||
|
||||
Reference in new issue
Block a user