From ed081cdccae02dca4478ce84104b13ba1640aaba Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 23 May 2023 23:43:36 -0300 Subject: [PATCH] fmt [skip ci] --- plugins/http/guest-js/index.ts | 8 +- plugins/notification/guest-js/index.ts | 26 +++--- plugins/shell/guest-js/index.ts | 12 +-- plugins/store/guest-js/index.ts | 4 +- plugins/stronghold/guest-js/index.ts | 4 +- plugins/window/guest-js/index.ts | 120 ++++++++++++------------- 6 files changed, 87 insertions(+), 87 deletions(-) diff --git a/plugins/http/guest-js/index.ts b/plugins/http/guest-js/index.ts index fa3f8f9b..60378402 100644 --- a/plugins/http/guest-js/index.ts +++ b/plugins/http/guest-js/index.ts @@ -115,7 +115,7 @@ class Body { * @param data The body data. * * @returns The body object ready to be used on the POST and PUT requests. - * + * * @since 2.0.0 */ static form(data: Record | FormData): Body { @@ -168,7 +168,7 @@ class Body { * @param data The body JSON object. * * @returns The body object ready to be used on the POST and PUT requests. - * + * * @since 2.0.0 */ static json(data: Record): Body { @@ -186,7 +186,7 @@ class Body { * @param value The body string. * * @returns The body object ready to be used on the POST and PUT requests. - * + * * @since 2.0.0 */ static text(value: string): Body { @@ -204,7 +204,7 @@ class Body { * @param bytes The body byte array. * * @returns The body object ready to be used on the POST and PUT requests. - * + * * @since 2.0.0 */ static bytes( diff --git a/plugins/notification/guest-js/index.ts b/plugins/notification/guest-js/index.ts index 0f79249b..7de70375 100644 --- a/plugins/notification/guest-js/index.ts +++ b/plugins/notification/guest-js/index.ts @@ -165,22 +165,22 @@ enum ScheduleEvery { type ScheduleData = | { - kind: "At"; - data: { - date: Date; - repeating: boolean; - }; - } + kind: "At"; + data: { + date: Date; + repeating: boolean; + }; + } | { - kind: "Interval"; - data: ScheduleInterval; - } + kind: "Interval"; + data: ScheduleInterval; + } | { - kind: "Every"; - data: { - interval: ScheduleEvery; + kind: "Every"; + data: { + interval: ScheduleEvery; + }; }; - }; class Schedule { kind: string; diff --git a/plugins/shell/guest-js/index.ts b/plugins/shell/guest-js/index.ts index 665291dd..32c34f6e 100644 --- a/plugins/shell/guest-js/index.ts +++ b/plugins/shell/guest-js/index.ts @@ -115,7 +115,7 @@ interface ChildProcess { * @param args Program arguments. * @param options Configuration for the process spawn. * @returns A promise resolving to the process id. - * + * * @since 2.0.0 */ async function execute( @@ -257,7 +257,7 @@ class EventEmitter> { * to each. * * @returns `true` if the event had listeners, `false` otherwise. - * + * * @since 2.0.0 */ emit(eventName: N, arg: E[typeof eventName]): boolean { @@ -354,7 +354,7 @@ class Child { * ``` * * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async write(data: IOPayload): Promise { @@ -369,7 +369,7 @@ class Child { * Kills the child process. * * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async kill(): Promise { @@ -512,7 +512,7 @@ class Command extends EventEmitter { * Executes the command as a child process, returning a handle to it. * * @returns A promise resolving to the child process handle. - * + * * @since 2.0.0 */ async spawn(): Promise { @@ -552,7 +552,7 @@ class Command extends EventEmitter { * ``` * * @returns A promise resolving to the child process output. - * + * * @since 2.0.0 */ async execute(): Promise> { diff --git a/plugins/store/guest-js/index.ts b/plugins/store/guest-js/index.ts index ab8dc983..4df455f8 100644 --- a/plugins/store/guest-js/index.ts +++ b/plugins/store/guest-js/index.ts @@ -179,7 +179,7 @@ export class Store { * @param key * @param cb * @returns A promise resolving to a function to unlisten to the event. - * + * * @since 2.0.0 */ async onKeyChange( @@ -197,7 +197,7 @@ export class Store { * Listen to changes on the store. * @param cb * @returns A promise resolving to a function to unlisten to the event. - * + * * @since 2.0.0 */ async onChange( diff --git a/plugins/stronghold/guest-js/index.ts b/plugins/stronghold/guest-js/index.ts index e8c991d0..1a87a4b0 100644 --- a/plugins/stronghold/guest-js/index.ts +++ b/plugins/stronghold/guest-js/index.ts @@ -239,7 +239,7 @@ class ProcedureExecutor { * Gets the Ed25519 public key of a SLIP10 private key. * @param privateKeyLocation The location of the private key. Must be the `outputLocation` of a previous call to `deriveSLIP10`. * @returns A promise resolving to the public key hex string. - * + * * @since 2.0.0 */ async getEd25519PublicKey(privateKeyLocation: Location): Promise { @@ -262,7 +262,7 @@ class ProcedureExecutor { * @param privateKeyLocation The location of the record where the private key is stored. Must be the `outputLocation` of a previous call to `deriveSLIP10`. * @param msg The message to sign. * @returns A promise resolving to the signature hex string. - * + * * @since 2.0.0 */ async signEd25519( diff --git a/plugins/window/guest-js/index.ts b/plugins/window/guest-js/index.ts index 6085133d..4b88f194 100644 --- a/plugins/window/guest-js/index.ts +++ b/plugins/window/guest-js/index.ts @@ -306,7 +306,7 @@ class WebviewWindowHandle { * @param handler Event handler. * @returns A promise resolving to a function to unlisten to the event. * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted. - * + * * @since 2.0.0 */ async listen( @@ -341,7 +341,7 @@ class WebviewWindowHandle { * @param handler Event handler. * @returns A promise resolving to a function to unlisten to the event. * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted. - * + * * @since 2.0.0 */ async once(event: string, handler: EventCallback): Promise { @@ -410,7 +410,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns The window's monitor scale factor. - * + * * @since 2.0.0 * */ async scaleFactor(): Promise { @@ -428,7 +428,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns The window's inner position. - * + * * @since 2.0.0 * */ async innerPosition(): Promise { @@ -451,7 +451,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns The window's outer position. - * + * * @since 2.0.0 * */ async outerPosition(): Promise { @@ -475,7 +475,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns The window's inner size. - * + * * @since 2.0.0 */ async innerSize(): Promise { @@ -499,7 +499,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns The window's outer size. - * + * * @since 2.0.0 */ async outerSize(): Promise { @@ -522,7 +522,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns Whether the window is in fullscreen mode or not. - * + * * @since 2.0.0 * */ async isFullscreen(): Promise { @@ -556,7 +556,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns Whether the window is maximized or not. - * + * * @since 2.0.0 * */ async isMaximized(): Promise { @@ -574,7 +574,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns Whether the window is decorated or not. - * + * * @since 2.0.0 * */ async isDecorated(): Promise { @@ -592,7 +592,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns Whether the window is resizable or not. - * + * * @since 2.0.0 * */ async isResizable(): Promise { @@ -610,7 +610,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns Whether the window is visible or not. - * + * * @since 2.0.0 * */ async isVisible(): Promise { @@ -649,7 +649,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns The window theme. - * + * * @since 2.0.0 * */ async theme(): Promise { @@ -670,7 +670,7 @@ class WindowManager extends WebviewWindowHandle { * * @param resizable * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async center(): Promise { @@ -699,7 +699,7 @@ class WindowManager extends WebviewWindowHandle { * * @param resizable * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async requestUserAttention( @@ -730,7 +730,7 @@ class WindowManager extends WebviewWindowHandle { * * @param resizable * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setResizable(resizable: boolean): Promise { @@ -750,7 +750,7 @@ class WindowManager extends WebviewWindowHandle { * * @param title The new title * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setTitle(title: string): Promise { @@ -769,7 +769,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async maximize(): Promise { @@ -787,7 +787,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async unmaximize(): Promise { @@ -805,7 +805,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async toggleMaximize(): Promise { @@ -823,7 +823,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async minimize(): Promise { @@ -841,7 +841,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async unminimize(): Promise { @@ -859,7 +859,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async show(): Promise { @@ -877,7 +877,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async hide(): Promise { @@ -895,7 +895,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async close(): Promise { @@ -914,7 +914,7 @@ class WindowManager extends WebviewWindowHandle { * * @param decorations Whether the window should have borders and bars. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setDecorations(decorations: boolean): Promise { @@ -962,7 +962,7 @@ class WindowManager extends WebviewWindowHandle { * * @param alwaysOnTop Whether the window should always be on top of other windows or not. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setAlwaysOnTop(alwaysOnTop: boolean): Promise { @@ -1001,7 +1001,7 @@ class WindowManager extends WebviewWindowHandle { * * @param size The logical or physical inner size. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setSize(size: LogicalSize | PhysicalSize): Promise { @@ -1033,7 +1033,7 @@ class WindowManager extends WebviewWindowHandle { * * @param size The logical or physical inner size, or `null` to unset the constraint. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setMinSize( @@ -1049,12 +1049,12 @@ class WindowManager extends WebviewWindowHandle { label: this.label, value: size ? { - type: size.type, - data: { - width: size.width, - height: size.height, - }, - } + type: size.type, + data: { + width: size.width, + height: size.height, + }, + } : null, }); } @@ -1069,7 +1069,7 @@ class WindowManager extends WebviewWindowHandle { * * @param size The logical or physical inner size, or `null` to unset the constraint. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setMaxSize( @@ -1085,12 +1085,12 @@ class WindowManager extends WebviewWindowHandle { label: this.label, value: size ? { - type: size.type, - data: { - width: size.width, - height: size.height, - }, - } + type: size.type, + data: { + width: size.width, + height: size.height, + }, + } : null, }); } @@ -1105,7 +1105,7 @@ class WindowManager extends WebviewWindowHandle { * * @param position The new position, in logical or physical pixels. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setPosition( @@ -1142,7 +1142,7 @@ class WindowManager extends WebviewWindowHandle { * * @param fullscreen Whether the window should go to fullscreen or not. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setFullscreen(fullscreen: boolean): Promise { @@ -1161,7 +1161,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setFocus(): Promise { @@ -1187,7 +1187,7 @@ class WindowManager extends WebviewWindowHandle { * * @param icon Icon bytes or path to the icon file. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setIcon(icon: string | Uint8Array): Promise { @@ -1211,7 +1211,7 @@ class WindowManager extends WebviewWindowHandle { * * @param skip true to hide window icon, false to show it. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setSkipTaskbar(skip: boolean): Promise { @@ -1239,7 +1239,7 @@ class WindowManager extends WebviewWindowHandle { * * @param grab `true` to grab the cursor icon, `false` to release it. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setCursorGrab(grab: boolean): Promise { @@ -1265,7 +1265,7 @@ class WindowManager extends WebviewWindowHandle { * * @param visible If `false`, this will hide the cursor. If `true`, this will show the cursor. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setCursorVisible(visible: boolean): Promise { @@ -1285,7 +1285,7 @@ class WindowManager extends WebviewWindowHandle { * * @param icon The new cursor icon. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setCursorIcon(icon: CursorIcon): Promise { @@ -1305,7 +1305,7 @@ class WindowManager extends WebviewWindowHandle { * * @param position The new cursor position. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setCursorPosition( @@ -1343,7 +1343,7 @@ class WindowManager extends WebviewWindowHandle { * * @param ignore `true` to ignore the cursor events; `false` to process them as usual. * @returns A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async setIgnoreCursorEvents(ignore: boolean): Promise { @@ -1362,7 +1362,7 @@ class WindowManager extends WebviewWindowHandle { * ``` * * @return A promise indicating the success or failure of the operation. - * + * * @since 2.0.0 */ async startDragging(): Promise { @@ -1718,7 +1718,7 @@ class WebviewWindow extends WindowManager { * * * @param label The unique webview window label. Must be alphanumeric: `a-zA-Z-/:_`. * @returns The WebviewWindow instance to communicate with the webview. - * + * * @since 2.0.0 */ constructor(label: WindowLabel, options: WindowOptions = {}) { @@ -1747,7 +1747,7 @@ class WebviewWindow extends WindowManager { * * @param label The webview window label. * @returns The WebviewWindow instance to communicate with the webview or null if the webview doesn't exist. - * + * * @since 2.0.0 */ static getByLabel(label: string): WebviewWindow | null { @@ -1892,11 +1892,11 @@ function mapMonitor(m: Monitor | null): Monitor | null { return m === null ? null : { - name: m.name, - scaleFactor: m.scaleFactor, - position: mapPhysicalPosition(m.position), - size: mapPhysicalSize(m.size), - }; + name: m.name, + scaleFactor: m.scaleFactor, + position: mapPhysicalPosition(m.position), + size: mapPhysicalSize(m.size), + }; } function mapPhysicalPosition(m: PhysicalPosition): PhysicalPosition {