@jsenv/terminal-recorder 1.2.0 → 1.2.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/terminal-recorder",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Record terminal output as .svg, .gif, .webm, .mp4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@jsenv/humanize": "1.2.3",
|
|
36
36
|
"@jsenv/server": "15.2.12",
|
|
37
|
-
"@playwright/browser-
|
|
37
|
+
"@playwright/browser-chromium": "1.45.1",
|
|
38
38
|
"ansi-regex": "6.0.1",
|
|
39
39
|
"he": "1.2.0",
|
|
40
40
|
"playwright": "1.45.1",
|
|
@@ -29,7 +29,7 @@ const startLocalServer = async () => {
|
|
|
29
29
|
return devServer;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
const serverDirectoryUrl = new URL("
|
|
32
|
+
const serverDirectoryUrl = new URL("../dist/", import.meta.url);
|
|
33
33
|
const { startServer, fetchFileSystem } = await import("@jsenv/server");
|
|
34
34
|
const server = await startServer({
|
|
35
35
|
logLevel: "warn",
|
|
@@ -78,9 +78,9 @@ export const startTerminalRecording = async ({
|
|
|
78
78
|
if (!svg && !gif && !video) {
|
|
79
79
|
throw new Error("svg, video or gif must be enabled ");
|
|
80
80
|
}
|
|
81
|
-
const {
|
|
81
|
+
const { chromium } = await import("playwright");
|
|
82
82
|
const server = await startLocalServer();
|
|
83
|
-
const browser = await
|
|
83
|
+
const browser = await chromium.launch({
|
|
84
84
|
// channel: "chrome", // https://github.com/microsoft/playwright/issues/7716#issuecomment-882634893
|
|
85
85
|
headless: !debug,
|
|
86
86
|
// needed because https-localhost fails to trust cert on chrome + linux (ubuntu 20.04)
|