autoclaw 1.0.28 → 1.0.29
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/tools/screenshot.js +1 -2
- package/package.json +1 -1
package/dist/tools/screenshot.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { chromium } from 'playwright';
|
|
2
2
|
import * as fs from 'fs';
|
|
3
3
|
import * as os from 'os';
|
|
4
|
+
import * as child_process from 'child_process';
|
|
4
5
|
// Helper to check for common CJK and Emoji font paths on Linux
|
|
5
6
|
const checkLinuxFonts = () => {
|
|
6
7
|
if (os.platform() !== 'linux')
|
|
@@ -21,7 +22,6 @@ const checkLinuxFonts = () => {
|
|
|
21
22
|
const hasEmoji = commonEmojiFontFiles.some(path => fs.existsSync(path));
|
|
22
23
|
// Also check if fc-list finds fonts (if available) - secondary check
|
|
23
24
|
try {
|
|
24
|
-
const child_process = require('child_process');
|
|
25
25
|
const cjkOutput = child_process.execSync('fc-list :lang=zh', { stdio: 'pipe' }).toString();
|
|
26
26
|
const emojiOutput = child_process.execSync('fc-list :family=Emoji', { stdio: 'pipe' }).toString(); // Approximate check
|
|
27
27
|
return {
|
|
@@ -35,7 +35,6 @@ const checkLinuxFonts = () => {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
const installFonts = (missing) => {
|
|
38
|
-
const child_process = require('child_process');
|
|
39
38
|
try {
|
|
40
39
|
let installCmd = '';
|
|
41
40
|
if (fs.existsSync('/etc/alpine-release')) {
|