waygraph 0.3.1 → 0.3.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/cli.js +6 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1054,10 +1054,16 @@ async function main() {
|
|
|
1054
1054
|
// launched at Chromium's own default size/position, which stayed put
|
|
1055
1055
|
// where it was for a previous, larger monitor and looked chopped off on
|
|
1056
1056
|
// a smaller one. Maximizing fills whatever screen it's actually on.
|
|
1057
|
+
// Same CHROME_PATH/CHROMIUM_PATH rule as Engine.run(mem): prefer the
|
|
1058
|
+
// system/Flatpak Chromium when set, otherwise Playwright's bundled build.
|
|
1059
|
+
// Without this, STEP mode always launched a different-looking browser than
|
|
1060
|
+
// headed Engine runs / waygraph-demo.mjs (which already resolve Flatpak).
|
|
1061
|
+
const executablePath = process.env.CHROME_PATH || process.env.CHROMIUM_PATH || undefined;
|
|
1057
1062
|
const browser = await chromium.launch({
|
|
1058
1063
|
headless: !headed,
|
|
1059
1064
|
slowMo,
|
|
1060
1065
|
args: step ? ["--start-maximized"] : [],
|
|
1066
|
+
...(executablePath ? { executablePath } : {}),
|
|
1061
1067
|
});
|
|
1062
1068
|
const context = await browser.newContext(
|
|
1063
1069
|
step ? { baseURL, viewport: null } : { baseURL, viewport: { width: 1280, height: 720 } },
|