@smoothdeploy/playwright-core 1.58.1-beta-1770756789000 → 1.58.1

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.
Files changed (33) hide show
  1. package/package.json +1 -1
  2. package/lib/server/bidi/third_party/bidiDeserializer.js +0 -98
  3. package/lib/server/chromium/videoRecorder.js +0 -115
  4. package/lib/server/trace/test/inMemorySnapshotter.js +0 -87
  5. package/lib/vite/traceViewer/assets/codeMirrorModule-8UJPCtp4.js +0 -16884
  6. package/lib/vite/traceViewer/assets/codeMirrorModule-BNr6yhVP.js +0 -25
  7. package/lib/vite/traceViewer/assets/codeMirrorModule-BtSt7Qcn.js +0 -25
  8. package/lib/vite/traceViewer/assets/codeMirrorModule-DkmsYcws.js +0 -32
  9. package/lib/vite/traceViewer/assets/codeMirrorModule-DySgctgr.js +0 -16884
  10. package/lib/vite/traceViewer/assets/defaultSettingsView-CtEsdeVH.js +0 -266
  11. package/lib/vite/traceViewer/assets/defaultSettingsView-D-QZZQWH.js +0 -266
  12. package/lib/vite/traceViewer/assets/defaultSettingsView-D4fm31R-.js +0 -34087
  13. package/lib/vite/traceViewer/assets/defaultSettingsView-JtyB0yzL.js +0 -34087
  14. package/lib/vite/traceViewer/assets/defaultSettingsView-tEZf-LNj.js +0 -266
  15. package/lib/vite/traceViewer/assets/xtermModule-DDw6eROI.js +0 -6168
  16. package/lib/vite/traceViewer/codeMirrorModule.C3UTv-Ge.css +0 -1
  17. package/lib/vite/traceViewer/codeMirrorModule.DuST8d_k.css +0 -344
  18. package/lib/vite/traceViewer/defaultSettingsView.5FCqBwKs.css +0 -3986
  19. package/lib/vite/traceViewer/defaultSettingsView.ConWv5KN.css +0 -1
  20. package/lib/vite/traceViewer/index.BQs8gGhY.js +0 -249
  21. package/lib/vite/traceViewer/index.BoLn624r.js +0 -2
  22. package/lib/vite/traceViewer/index.Bq_EaK8x.js +0 -249
  23. package/lib/vite/traceViewer/index.C4Y3Aw8n.css +0 -1
  24. package/lib/vite/traceViewer/index.C8YVh4B5.js +0 -2
  25. package/lib/vite/traceViewer/index.DM2kY0Ok.js +0 -2
  26. package/lib/vite/traceViewer/index.G-7UhDxt.css +0 -164
  27. package/lib/vite/traceViewer/uiMode.-Kflt2XM.css +0 -1440
  28. package/lib/vite/traceViewer/uiMode.BTRKnokb.js +0 -5
  29. package/lib/vite/traceViewer/uiMode.CIWF23si.js +0 -1829
  30. package/lib/vite/traceViewer/uiMode.DItQ2Rvo.js +0 -5
  31. package/lib/vite/traceViewer/uiMode.Wi-DvIEY.js +0 -1829
  32. package/lib/vite/traceViewer/uiMode.zEH1ejvz.js +0 -5
  33. package/lib/vite/traceViewer/xtermModule.BKlWQB97.css +0 -218
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smoothdeploy/playwright-core",
3
- "version": "1.58.1-beta-1770756789000",
3
+ "version": "1.58.1",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,98 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var bidiDeserializer_exports = {};
20
- __export(bidiDeserializer_exports, {
21
- BidiDeserializer: () => BidiDeserializer
22
- });
23
- module.exports = __toCommonJS(bidiDeserializer_exports);
24
- /**
25
- * @license
26
- * Copyright 2024 Google Inc.
27
- * Modifications copyright (c) Microsoft Corporation.
28
- * SPDX-License-Identifier: Apache-2.0
29
- */
30
- class BidiDeserializer {
31
- static deserialize(result) {
32
- if (!result)
33
- return void 0;
34
- switch (result.type) {
35
- case "array":
36
- return result.value?.map((value) => {
37
- return BidiDeserializer.deserialize(value);
38
- });
39
- case "set":
40
- return result.value?.reduce((acc, value) => {
41
- return acc.add(BidiDeserializer.deserialize(value));
42
- }, /* @__PURE__ */ new Set());
43
- case "object":
44
- return result.value?.reduce((acc, tuple) => {
45
- const { key, value } = BidiDeserializer._deserializeTuple(tuple);
46
- acc[key] = value;
47
- return acc;
48
- }, {});
49
- case "map":
50
- return result.value?.reduce((acc, tuple) => {
51
- const { key, value } = BidiDeserializer._deserializeTuple(tuple);
52
- return acc.set(key, value);
53
- }, /* @__PURE__ */ new Map());
54
- case "promise":
55
- return {};
56
- case "regexp":
57
- return new RegExp(result.value.pattern, result.value.flags);
58
- case "date":
59
- return new Date(result.value);
60
- case "undefined":
61
- return void 0;
62
- case "null":
63
- return null;
64
- case "number":
65
- return BidiDeserializer._deserializeNumber(result.value);
66
- case "bigint":
67
- return BigInt(result.value);
68
- case "boolean":
69
- return Boolean(result.value);
70
- case "string":
71
- return result.value;
72
- }
73
- throw new Error(`Deserialization of type ${result.type} not supported.`);
74
- }
75
- static _deserializeNumber(value) {
76
- switch (value) {
77
- case "-0":
78
- return -0;
79
- case "NaN":
80
- return NaN;
81
- case "Infinity":
82
- return Infinity;
83
- case "-Infinity":
84
- return -Infinity;
85
- default:
86
- return value;
87
- }
88
- }
89
- static _deserializeTuple([serializedKey, serializedValue]) {
90
- const key = typeof serializedKey === "string" ? serializedKey : BidiDeserializer.deserialize(serializedKey);
91
- const value = BidiDeserializer.deserialize(serializedValue);
92
- return { key, value };
93
- }
94
- }
95
- // Annotate the CommonJS export names for ESM import in node:
96
- 0 && (module.exports = {
97
- BidiDeserializer
98
- });
@@ -1,115 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var videoRecorder_exports = {};
20
- __export(videoRecorder_exports, {
21
- VideoRecorder: () => VideoRecorder
22
- });
23
- module.exports = __toCommonJS(videoRecorder_exports);
24
- var import_utils = require("../../utils");
25
- var import_page = require("../page");
26
- var import_processLauncher = require("../utils/processLauncher");
27
- const fps = 25;
28
- class VideoRecorder {
29
- constructor(page, ffmpegPath) {
30
- this._process = null;
31
- this._gracefullyClose = null;
32
- this._lastWritePromise = Promise.resolve();
33
- this._firstFrameTimestamp = 0;
34
- this._lastFrame = null;
35
- this._lastWriteNodeTime = 0;
36
- this._frameQueue = [];
37
- this._isStopped = false;
38
- this._ffmpegPath = ffmpegPath;
39
- page.on(import_page.Page.Events.ScreencastFrame, (frame) => this.writeFrame(frame.buffer, frame.frameSwapWallTime / 1e3));
40
- }
41
- static async launch(page, ffmpegPath, options) {
42
- if (!options.outputFile.endsWith(".webm"))
43
- throw new Error("File must have .webm extension");
44
- const recorder = new VideoRecorder(page, ffmpegPath);
45
- await recorder._launch(options);
46
- return recorder;
47
- }
48
- async _launch(options) {
49
- const w = options.width;
50
- const h = options.height;
51
- const args = `-loglevel error -f image2pipe -avioflags direct -fpsprobesize 0 -probesize 32 -analyzeduration 0 -c:v mjpeg -i pipe:0 -y -an -r ${fps} -c:v vp8 -qmin 0 -qmax 50 -crf 8 -deadline realtime -speed 8 -b:v 1M -threads 1 -vf pad=${w}:${h}:0:0:gray,crop=${w}:${h}:0:0`.split(" ");
52
- args.push(options.outputFile);
53
- const { launchedProcess, gracefullyClose } = await (0, import_processLauncher.launchProcess)({
54
- command: this._ffmpegPath,
55
- args,
56
- stdio: "stdin",
57
- log: (message) => import_utils.debugLogger.log("browser", message),
58
- tempDirectories: [],
59
- attemptToGracefullyClose: async () => {
60
- import_utils.debugLogger.log("browser", "Closing stdin...");
61
- launchedProcess.stdin.end();
62
- },
63
- onExit: (exitCode, signal) => {
64
- import_utils.debugLogger.log("browser", `ffmpeg onkill exitCode=${exitCode} signal=${signal}`);
65
- }
66
- });
67
- launchedProcess.stdin.on("finish", () => {
68
- import_utils.debugLogger.log("browser", "ffmpeg finished input.");
69
- });
70
- launchedProcess.stdin.on("error", () => {
71
- import_utils.debugLogger.log("browser", "ffmpeg error.");
72
- });
73
- this._process = launchedProcess;
74
- this._gracefullyClose = gracefullyClose;
75
- }
76
- writeFrame(frame, timestamp) {
77
- (0, import_utils.assert)(this._process);
78
- if (this._isStopped)
79
- return;
80
- if (!this._firstFrameTimestamp)
81
- this._firstFrameTimestamp = timestamp;
82
- const frameNumber = Math.floor((timestamp - this._firstFrameTimestamp) * fps);
83
- if (this._lastFrame) {
84
- const repeatCount = frameNumber - this._lastFrame.frameNumber;
85
- for (let i = 0; i < repeatCount; ++i)
86
- this._frameQueue.push(this._lastFrame.buffer);
87
- this._lastWritePromise = this._lastWritePromise.then(() => this._sendFrames());
88
- }
89
- this._lastFrame = { buffer: frame, timestamp, frameNumber };
90
- this._lastWriteNodeTime = (0, import_utils.monotonicTime)();
91
- }
92
- async _sendFrames() {
93
- while (this._frameQueue.length)
94
- await this._sendFrame(this._frameQueue.shift());
95
- }
96
- async _sendFrame(frame) {
97
- return new Promise((f) => this._process.stdin.write(frame, f)).then((error) => {
98
- if (error)
99
- import_utils.debugLogger.log("browser", `ffmpeg failed to write: ${String(error)}`);
100
- });
101
- }
102
- async stop() {
103
- if (this._isStopped || !this._lastFrame)
104
- return;
105
- const addTime = Math.max(((0, import_utils.monotonicTime)() - this._lastWriteNodeTime) / 1e3, 1);
106
- this.writeFrame(Buffer.from([]), this._lastFrame.timestamp + addTime);
107
- this._isStopped = true;
108
- await this._lastWritePromise;
109
- await this._gracefullyClose();
110
- }
111
- }
112
- // Annotate the CommonJS export names for ESM import in node:
113
- 0 && (module.exports = {
114
- VideoRecorder
115
- });
@@ -1,87 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var inMemorySnapshotter_exports = {};
20
- __export(inMemorySnapshotter_exports, {
21
- InMemorySnapshotter: () => InMemorySnapshotter
22
- });
23
- module.exports = __toCommonJS(inMemorySnapshotter_exports);
24
- var import_snapshotStorage = require("../../../../../trace-viewer/src/sw/snapshotStorage");
25
- var import_utils = require("../../../utils");
26
- var import_harTracer = require("../../har/harTracer");
27
- var import_snapshotter = require("../recorder/snapshotter");
28
- class InMemorySnapshotter {
29
- constructor(context) {
30
- this._blobs = /* @__PURE__ */ new Map();
31
- this._snapshotReadyPromises = /* @__PURE__ */ new Map();
32
- this._snapshotCount = 0;
33
- this._snapshotter = new import_snapshotter.Snapshotter(context, this);
34
- this._harTracer = new import_harTracer.HarTracer(context, null, this, { content: "attach", includeTraceInfo: true, recordRequestOverrides: false, waitForContentOnStop: false });
35
- this._storage = new import_snapshotStorage.SnapshotStorage();
36
- }
37
- async initialize() {
38
- await this._snapshotter.start();
39
- this._harTracer.start({ omitScripts: true });
40
- }
41
- async reset() {
42
- await this._snapshotter.reset();
43
- await this._harTracer.flush();
44
- this._harTracer.stop();
45
- this._harTracer.start({ omitScripts: true });
46
- }
47
- async dispose() {
48
- this._snapshotter.dispose();
49
- await this._harTracer.flush();
50
- this._harTracer.stop();
51
- }
52
- async captureSnapshot(page, callId, snapshotName) {
53
- if (this._snapshotReadyPromises.has(snapshotName))
54
- throw new Error("Duplicate snapshot name: " + snapshotName);
55
- this._snapshotter.captureSnapshot(page, callId, snapshotName).catch(() => {
56
- });
57
- const promise = new import_utils.ManualPromise();
58
- this._snapshotReadyPromises.set(snapshotName, promise);
59
- return promise;
60
- }
61
- onEntryStarted(entry) {
62
- }
63
- onEntryFinished(entry) {
64
- this._storage.addResource("", entry);
65
- }
66
- onContentBlob(sha1, buffer) {
67
- this._blobs.set(sha1, buffer);
68
- }
69
- onSnapshotterBlob(blob) {
70
- this._blobs.set(blob.sha1, blob.buffer);
71
- }
72
- onFrameSnapshot(snapshot) {
73
- ++this._snapshotCount;
74
- const renderer = this._storage.addFrameSnapshot("", snapshot, []);
75
- this._snapshotReadyPromises.get(snapshot.snapshotName || "")?.resolve(renderer);
76
- }
77
- async resourceContentForTest(sha1) {
78
- return this._blobs.get(sha1);
79
- }
80
- snapshotCount() {
81
- return this._snapshotCount;
82
- }
83
- }
84
- // Annotate the CommonJS export names for ESM import in node:
85
- 0 && (module.exports = {
86
- InMemorySnapshotter
87
- });