nothing-browser 0.1.1 → 0.1.2

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.
@@ -1,29 +0,0 @@
1
- // piggy/dialog/index.d.ts
2
- import { PiggyClient } from "../client";
3
-
4
- export interface DialogState {
5
- pending: boolean;
6
- type: string;
7
- message: string;
8
- defaultValue: string;
9
- }
10
-
11
- export declare class DialogClient {
12
- constructor(client: PiggyClient);
13
-
14
- accept(tabId?: string, text?: string): Promise<void>;
15
- dismiss(tabId?: string): Promise<void>;
16
- status(tabId?: string): Promise<DialogState>;
17
- setAutoAction(tabId?: string, action: "accept" | "dismiss" | ""): Promise<void>;
18
- upload(selector: string, filePath: string, tabId?: string): Promise<void>;
19
-
20
- onDialog(
21
- tabId: string,
22
- handler: (data: { dialogType: string; message: string; defaultValue: string; tabId: string }) => void
23
- ): () => void;
24
-
25
- waitAndAccept(tabId?: string, text?: string, timeoutMs?: number): Promise<DialogState>;
26
- waitAndDismiss(tabId?: string, timeoutMs?: number): Promise<DialogState>;
27
- }
28
-
29
- export declare function createDialogAPI(client: PiggyClient): DialogClient;
@@ -1,7 +0,0 @@
1
- export declare function randomDelay(min: number, max: number): Promise<void>;
2
- /**
3
- * Simulates human typing by introducing ~2 random typos and correcting them.
4
- * Returns an array of { char, isBackspace } actions to replay.
5
- */
6
- export declare function humanTypeSequence(text: string): string[];
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CA0CxD"}
@@ -1,7 +0,0 @@
1
- import { PiggyClient } from "../client";
2
- export declare let humanMode: boolean;
3
- export declare function setClient(c: PiggyClient | null): void;
4
- export declare function setHumanMode(v: boolean): void;
5
- export declare function createSiteObject(name: string, registeredUrl: string, client: PiggyClient, tabId: string): any;
6
- export declare function createExposedAPI<T extends Record<string, (data: any) => any>>(site: any, apiName: string, handlers: T): Promise<void>;
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAOxC,eAAO,IAAI,SAAS,SAAQ,CAAC;AAE7B,wBAAgB,SAAS,CAAC,CAAC,EAAE,WAAW,GAAG,IAAI,QAAuB;AACtE,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,QAAoB;AAgB3D,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,OAmcvG;AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CASrI"}
@@ -1,58 +0,0 @@
1
- // piggy/server/index.d.ts
2
- import { Elysia } from "elysia";
3
-
4
- export type BeforeMiddleware = (ctx: {
5
- params: Record<string, string>;
6
- query: Record<string, string>;
7
- body: any;
8
- headers: Record<string, string>;
9
- set: any;
10
- }) => void | Promise<void>;
11
-
12
- export type RouteHandler = (
13
- params: Record<string, string>,
14
- query: Record<string, string>,
15
- body: any
16
- ) => Promise<any>;
17
-
18
- export interface RouteParameter {
19
- name: string;
20
- in: "query" | "path" | "header" | "cookie";
21
- description?: string;
22
- required?: boolean;
23
- schema?: Record<string, any>;
24
- }
25
-
26
- export interface RouteDetail {
27
- tags?: string[];
28
- summary?: string;
29
- description?: string;
30
- deprecated?: boolean;
31
- hide?: boolean;
32
- parameters?: RouteParameter[];
33
- }
34
-
35
- export interface RouteConfig {
36
- path: string;
37
- method: "GET" | "POST" | "PUT" | "DELETE";
38
- handler: RouteHandler;
39
- ttl: number;
40
- before: BeforeMiddleware[];
41
- detail?: RouteDetail;
42
- }
43
-
44
- export declare const routeRegistry: Map<string, RouteConfig>;
45
- export declare const keepAliveSites: Set<string>;
46
-
47
- export declare function startServer(
48
- port: number,
49
- hostname?: string,
50
- openapiOpts?: {
51
- title?: string;
52
- version?: string;
53
- description?: string;
54
- path?: string;
55
- }
56
- ): Promise<Elysia>;
57
-
58
- export declare function stopServer(): void;
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,IAAI,EAAE,GAAG,CAAC;IACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,GAAG,EAAE,GAAG,CAAC;CACV,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE3B,MAAM,MAAM,YAAY,GAAG,CACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,IAAI,EAAE,GAAG,KACN,OAAO,CAAC,GAAG,CAAC,CAAC;AAElB,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC1C,OAAO,EAAE,YAAY,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B;AAED,eAAO,MAAM,aAAa,0BAAiC,CAAC;AAC5D,eAAO,MAAM,cAAc,aAAoB,CAAC;AAmBhD,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,SAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAoFrF;AAED,wBAAgB,UAAU,SAGzB"}