From 18ca7da76da3791056592372ba63afb3025d1cc4 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 1 Jul 2024 23:14:23 +0300 Subject: [PATCH] update napi bindings --- BUILDING.md | 8 ++++++++ bindings/node/index.d.ts | 35 ++++++++++++++++++----------------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 6b1d8c8..47ade45 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -39,3 +39,11 @@ source venv/bin/activate # May take sometime on first use pip3 install . ```` + +## Node Bindings + +```console +bun install -g @napi-rs/cli +cd bindings/python +napi build +``` diff --git a/bindings/node/index.d.ts b/bindings/node/index.d.ts index f1765f8..f761bfc 100644 --- a/bindings/node/index.d.ts +++ b/bindings/node/index.d.ts @@ -13,21 +13,22 @@ export interface CookieObject { httpOnly: boolean sameSite: number } -export function version(): string -export function anyBrowser(dbPath: string, domains?: Array | undefined | null, keyPath?: string | undefined | null): Array +export declare function version(): string +export declare function anyBrowser(dbPath: string, domains?: Array | undefined | null, keyPath?: string | undefined | null): Array /** Common browsers */ -export function firefox(domains?: Array | undefined | null): Array -export function librewolf(domains?: Array | undefined | null): Array -export function chrome(domains?: Array | undefined | null): Array -export function brave(domains?: Array | undefined | null): Array -export function edge(domains?: Array | undefined | null): Array -export function opera(domains?: Array | undefined | null): Array -export function operaGx(domains?: Array | undefined | null): Array -export function chromium(domains?: Array | undefined | null): Array -export function vivaldi(domains?: Array | undefined | null): Array -export function firefoxBased(dbPath: string, domains?: Array | undefined | null): Array -export function load(domains?: Array | undefined | null): Array -/** MacOS browsers */ -export function safari(domains?: Array | undefined | null): Array -/** Unix browsers */ -export function chromiumBased(dbPath: string, domains?: Array | undefined | null): Array +export declare function firefox(domains?: Array | undefined | null): Array +export declare function librewolf(domains?: Array | undefined | null): Array +export declare function chrome(domains?: Array | undefined | null): Array +export declare function brave(domains?: Array | undefined | null): Array +export declare function arc(domains?: Array | undefined | null): Array +export declare function edge(domains?: Array | undefined | null): Array +export declare function opera(domains?: Array | undefined | null): Array +export declare function operaGx(domains?: Array | undefined | null): Array +export declare function chromium(domains?: Array | undefined | null): Array +export declare function vivaldi(domains?: Array | undefined | null): Array +export declare function firefoxBased(dbPath: string, domains?: Array | undefined | null): Array +export declare function load(domains?: Array | undefined | null): Array +/** Windows only browsers */ +export declare function octoBrowser(domains?: Array | undefined | null): Array +export declare function internetExplorer(domains?: Array | undefined | null): Array +export declare function chromiumBased(keyPath: string, dbPath: string, domains?: Array | undefined | null): Array