@nyssance/tauri-hasgard 0.6.3 → 0.6.4

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
@@ -1070,6 +1070,17 @@ class HasgardWindow {
1070
1070
  pendingResult: expectBoolean(value.pending_result, "video.pending_result")
1071
1071
  };
1072
1072
  }
1073
+ async heapSnapshot(outputPath) {
1074
+ const value = expectRecord(await this.rpc.call("heap.snapshot", { window: this.label, output_path: outputPath }), "heap.snapshot result");
1075
+ const format = expectString(value.format, "heap.snapshot.format");
1076
+ if (format !== "jsc" && format !== "v8")
1077
+ throw new Error(`heap.snapshot.format: unexpected ${format}`);
1078
+ return {
1079
+ outputPath: expectString(value.output_path, "heap.snapshot.output_path"),
1080
+ byteSize: expectNumber(value.byte_size, "heap.snapshot.byte_size"),
1081
+ format
1082
+ };
1083
+ }
1073
1084
  async screenshotNative(options) {
1074
1085
  const value = expectRecord(await this.rpc.call("screenshot_native", {
1075
1086
  window: this.label,
package/dist/window.d.ts CHANGED
@@ -119,6 +119,16 @@ export declare class HasgardWindow {
119
119
  * The operating-system window id is resolved from this window's label, so
120
120
  * callers do not have to discover it themselves.
121
121
  */
122
+ /**
123
+ * Write a JavaScript heap snapshot of this webview after a full collection:
124
+ * JavaScriptCore's inspector JSON on macOS (`format: "jsc"`), a V8
125
+ * `.heapsnapshot` on Windows (`format: "v8"`). `outputPath` must be absolute.
126
+ */
127
+ heapSnapshot(outputPath: string): Promise<{
128
+ outputPath: string;
129
+ byteSize: number;
130
+ format: "jsc" | "v8";
131
+ }>;
122
132
  screenshotNative(options: NativeScreenshotOptions): Promise<NativeScreenshot>;
123
133
  /**
124
134
  * Scroll the page by wheel.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyssance/tauri-hasgard",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "Playwright Test fixtures for native Tauri Hasgard automation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",