@tinywork/glass 0.0.18 → 0.0.20
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/dist/index.d.ts +7 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import https from 'node:https';
|
|
|
6
6
|
import querystring from 'node:querystring';
|
|
7
7
|
import axios from 'axios';
|
|
8
8
|
import { BrowserWindow, type MenuItemConstructorOptions, type Session } from 'electron';
|
|
9
|
+
type ResourceType = 'Fetch/XHR' | 'JS' | 'CSS' | 'Img' | 'Media' | 'Font' | 'Doc' | 'WS' | 'Wasm' | 'Other';
|
|
9
10
|
export type DocSchema = {
|
|
10
11
|
apiId: string;
|
|
11
12
|
groupId: string;
|
|
@@ -30,16 +31,17 @@ export type GroupSchema = {
|
|
|
30
31
|
status: boolean;
|
|
31
32
|
};
|
|
32
33
|
export type NetLog = {
|
|
33
|
-
body: any;
|
|
34
|
-
statusCode: number;
|
|
35
|
-
responseHeaders: string[][];
|
|
36
|
-
response: any;
|
|
37
34
|
uid: string;
|
|
38
35
|
url: string;
|
|
39
36
|
realUrl: string;
|
|
40
37
|
method: string;
|
|
41
38
|
requestHeaders: string[][];
|
|
42
39
|
query: string;
|
|
40
|
+
body: any;
|
|
41
|
+
statusCode?: number;
|
|
42
|
+
responseHeaders?: string[][];
|
|
43
|
+
resourceType?: ResourceType;
|
|
44
|
+
response?: any;
|
|
43
45
|
};
|
|
44
46
|
export interface IProgress {
|
|
45
47
|
update: (option: {
|
|
@@ -81,6 +83,7 @@ export interface IGlassContext {
|
|
|
81
83
|
type?: 'success' | 'info' | 'error';
|
|
82
84
|
}) => Promise<void>;
|
|
83
85
|
showProgress: () => IProgress;
|
|
86
|
+
postMessage: (message: Partial<NetLog>) => Promise<void>;
|
|
84
87
|
}
|
|
85
88
|
export interface IGlassExtension {
|
|
86
89
|
install?(context: IGlassContext): Promise<void>;
|