@weapp-vite/devtools-runtime 0.4.0 → 0.4.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.
package/dist/index.js CHANGED
@@ -87,7 +87,7 @@ async function withMiniProgram(hooks, options, runner) {
87
87
  } catch (error) {
88
88
  throw normalizeError(hooks, error);
89
89
  } finally {
90
- if (miniProgram) await miniProgram.close();
90
+ if (miniProgram) miniProgram.disconnect();
91
91
  }
92
92
  }
93
93
  //#endregion
package/dist/mcp.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import { Element, MiniProgram, Page } from "@weapp-vite/miniprogram-automator";
2
2
 
3
3
  //#region src/mcp.d.ts
4
- type AutomatorMiniProgram = InstanceType<typeof MiniProgram>;
4
+ type AutomatorMiniProgram = InstanceType<typeof MiniProgram> & {
5
+ callWxMethod?: (method: string, ...args: unknown[]) => Promise<unknown>;
6
+ };
5
7
  type AutomatorPage = InstanceType<typeof Page>;
6
8
  type AutomatorElement = InstanceType<typeof Element> & {
7
9
  input?: (value: string) => Promise<void>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@weapp-vite/devtools-runtime",
3
3
  "type": "module",
4
- "version": "0.4.0",
4
+ "version": "0.4.2",
5
5
  "description": "Shared WeChat DevTools runtime automation helpers for weapp-vite packages",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  "registry": "https://registry.npmjs.org/"
39
39
  },
40
40
  "dependencies": {
41
- "@weapp-vite/miniprogram-automator": "1.2.0"
41
+ "@weapp-vite/miniprogram-automator": "1.2.2"
42
42
  },
43
43
  "scripts": {
44
44
  "dev": "tsdown -w --sourcemap",