@intuned/runtime-dev 1.6.0-dev-52-8 → 1.6.0-dev-52-10

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.
@@ -46,11 +46,16 @@ async function getProductionPlaywrightConstructs({
46
46
  const executablePath = playwright.chromium.executablePath();
47
47
  const chromium127Path = executablePath.replace("chromium-1117", "chromium-1124");
48
48
  const isChrome127There = await (0, _fsExtra.exists)(chromium127Path);
49
- const userAgent = `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${isChrome127There ? 127 : 125}.0.0.0 Safari/537.36`;
49
+ const userAgent = `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/Chrome/136.0.7103.25 Safari/537.36`;
50
50
  const userDataDir = await createUserDirWithPreferences();
51
- const context = await playwright.chromium.launchPersistentContext("", {
51
+ const context = await playwright.chromium.launchPersistentContext(userDataDir, {
52
52
  headless,
53
- viewport: null
53
+ viewport: null,
54
+ ignoreDefaultArgs: [...getChromiumLaunchArgsToIgnore(), "--headless"],
55
+ proxy,
56
+ executablePath: isChrome127There ? chromium127Path : executablePath,
57
+ args: extraArgs,
58
+ downloadsPath
54
59
  });
55
60
  context.once("close", async () => {
56
61
  try {
@@ -77,6 +82,7 @@ async function getProductionPlaywrightConstructs({
77
82
  let page = context.pages().at(0);
78
83
  if (page) {
79
84
  const scriptString = await (0, _fsExtra.readFile)(assetsFile, "utf8");
85
+ await page.evaluate(scriptString);
80
86
  } else {
81
87
  page = await context.newPage();
82
88
  }
@@ -106,6 +112,7 @@ async function getPlaywrightConstructsForMode(mode, cdpAddress, authSession) {
106
112
  if (pages.length > 0) {
107
113
  page = pages[0];
108
114
  const scriptString = await fs.readFile(assetsFile, "utf8");
115
+ await page.evaluate(scriptString);
109
116
  } else {
110
117
  page = await context.newPage();
111
118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "version": "1.6.0-dev-52-8",
3
+ "version": "1.6.0-dev-52-10",
4
4
  "description": "Intuned runtime",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",