@checksum-ai/runtime 1.0.21 → 1.0.22

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": "@checksum-ai/runtime",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Checksum.ai test runtime",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,28 @@
1
+ #!/bin/bash
2
+
3
+ file="../../../playwright-core/lib/server/browserContext.js"
4
+ if [ "$2" == "root" ]; then
5
+ file="./backend/$file"
6
+ else
7
+ file="./$file"
8
+ fi
9
+
10
+ line_number=108
11
+ original_line="if ((0, _utils.debugMode)() === 'console') await this.extendInjectedScript(consoleApiSource.source);"
12
+ fixed_line="await this.extendInjectedScript(consoleApiSource.source);"
13
+
14
+
15
+ if [ "$1" == "off" ]; then
16
+ new_line=" $original_line"
17
+ else
18
+ new_line=" $fixed_line"
19
+ fi
20
+
21
+
22
+ # use sed to change the line
23
+ # The exact syntax of the sed command depends on the OS unfortunately - specifically the -i parameter differs on linux v.s. mac
24
+ if [ "$(uname)" == "Darwin" ]; then
25
+ sed -i .bak "${line_number}s/.*/${new_line}/" $file
26
+ elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
27
+ sed -i "${line_number}s/.*/${new_line}/" $file
28
+ fi