@tinywork/glass 0.0.30 → 0.0.32
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 +10 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -145,6 +145,14 @@ export interface IGlassExtension {
|
|
|
145
145
|
res: http.ServerResponse;
|
|
146
146
|
isLocal?: boolean;
|
|
147
147
|
}): Promise<void>;
|
|
148
|
+
/** 在执行请求用例时触发,用于修改config */
|
|
149
|
+
onRequestExec?(context: IGlassContext, config: {
|
|
150
|
+
url: string;
|
|
151
|
+
method: string;
|
|
152
|
+
headers?: Record<string, any>;
|
|
153
|
+
params?: Record<string, any>;
|
|
154
|
+
data?: any;
|
|
155
|
+
}): Promise<void>;
|
|
148
156
|
/** 在postMessage到页面之前 */
|
|
149
157
|
onMessagePost?(context: IGlassContext, message: Partial<NetLog>): Promise<void>;
|
|
150
158
|
onResponse?(context: IGlassContext, params: {
|
|
@@ -155,6 +163,8 @@ export interface IGlassExtension {
|
|
|
155
163
|
deactivate?(context: IGlassContext): Promise<void>;
|
|
156
164
|
uninstall?(context: IGlassContext): Promise<void>;
|
|
157
165
|
onDocChange?(context: IGlassContext, doc: DocFullSchema | null, originDoc: DocFullSchema | null): Promise<boolean>;
|
|
166
|
+
/** glass cli拉取接口文档 */
|
|
167
|
+
onDocCliUpdate?(context: IGlassContext, id: string): Promise<void>;
|
|
158
168
|
onGroupChange?(context: IGlassContext, group: GroupSchema | null, originGroup: GroupSchema | null): Promise<boolean>;
|
|
159
169
|
getDefaultRule?(context: IGlassContext, docs: DocSchema[], log: NetLog, rule?: {
|
|
160
170
|
id: string;
|