@tinywork/glass 0.0.41 → 0.0.43
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 +4 -2
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -239,7 +239,7 @@ export interface IGlassExtension {
|
|
|
239
239
|
onDocCliUpdate?(context: IGlassContext, id: string): Promise<void>;
|
|
240
240
|
onGroupChange?(context: IGlassContext, group: GroupSchema | null, originGroup: GroupSchema | null): Promise<boolean>;
|
|
241
241
|
/** 右键请求日志 */
|
|
242
|
-
onNetLogContextMenu?(context: IGlassContext, log: NetLog, menus?: MenuItemConstructorOptions): Promise<void>;
|
|
242
|
+
onNetLogContextMenu?(context: IGlassContext, log: NetLog, menus?: MenuItemConstructorOptions[]): Promise<void>;
|
|
243
243
|
getDefaultRule?(context: IGlassContext, docs: DocSchema[], log: NetLog, rule?: {
|
|
244
244
|
id: string;
|
|
245
245
|
mode: 'None';
|
|
@@ -256,4 +256,6 @@ export interface IGlassExtension {
|
|
|
256
256
|
/** 根据doc或者log来初始化case */
|
|
257
257
|
getDefaultCase?(context: IGlassContext, docs: DocSchema[], log?: NetLog, defaultCase?: Partial<Case>): Promise<void>;
|
|
258
258
|
}
|
|
259
|
-
|
|
259
|
+
declare const writeText: (text: string, type?: "selection" | "clipboard") => void;
|
|
260
|
+
declare const openExternal: (url: string, options?: Electron.OpenExternalOptions) => Promise<void>;
|
|
261
|
+
export { fs, qs, path, http, https, axios, crypto, BrowserWindow, openExternal, writeText, type Session, type MenuItemConstructorOptions, };
|
package/dist/index.js
CHANGED
|
@@ -5,5 +5,7 @@ import https from 'node:https';
|
|
|
5
5
|
import crypto from 'node:crypto';
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import qs from 'qs';
|
|
8
|
-
import { BrowserWindow } from 'electron';
|
|
9
|
-
|
|
8
|
+
import { BrowserWindow, shell, clipboard, } from 'electron';
|
|
9
|
+
const writeText = clipboard.writeText;
|
|
10
|
+
const openExternal = shell.openExternal;
|
|
11
|
+
export { fs, qs, path, http, https, axios, crypto, BrowserWindow, openExternal, writeText, };
|