@checksum-ai/runtime 1.0.73 → 1.0.75
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/checksumlib.js +3 -3
- package/cli.js +3 -3
- package/index.js +48 -48
- package/package.json +1 -1
- package/scripts/patch.js +10 -2
- package/test-run-monitor.js +3 -33
- package/.DS_Store +0 -0
package/package.json
CHANGED
package/scripts/patch.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
const fs = require("fs");
|
|
2
|
+
const { join } = require("path");
|
|
2
3
|
|
|
3
4
|
// Args
|
|
4
5
|
const on = process.argv[2] !== "off";
|
|
5
6
|
const fromRoot = process.argv[3] === "root";
|
|
7
|
+
const projectRoot = process.env.PROJECT_ROOT ?? "";
|
|
6
8
|
|
|
7
9
|
// Amends the file with the given entry point text and append text
|
|
8
10
|
// When "on" is true, the append text is added to the entry point,
|
|
@@ -85,7 +87,10 @@ function replaceContent(filePath, originalContent, newContent) {
|
|
|
85
87
|
|
|
86
88
|
// Remove conditions for injecting Playwright scripts
|
|
87
89
|
function alwaysInjectScripts() {
|
|
88
|
-
const file =
|
|
90
|
+
const file = join(
|
|
91
|
+
projectRoot,
|
|
92
|
+
"node_modules/playwright-core/lib/server/browserContext.js"
|
|
93
|
+
);
|
|
89
94
|
const originalContent =
|
|
90
95
|
"if ((0, _utils.debugMode)() === 'console') await this.extendInjectedScript(consoleApiSource.source);";
|
|
91
96
|
|
|
@@ -97,7 +102,10 @@ function alwaysInjectScripts() {
|
|
|
97
102
|
|
|
98
103
|
// Add implementation for generateSelectorAndLocator and inject to Playwright console API
|
|
99
104
|
function addGenerateSelectorAndLocator() {
|
|
100
|
-
const file =
|
|
105
|
+
const file = join(
|
|
106
|
+
projectRoot,
|
|
107
|
+
"node_modules/playwright-core/lib/generated/consoleApiSource.js"
|
|
108
|
+
);
|
|
101
109
|
|
|
102
110
|
const entryPointText1 = "this._generateLocator(element, language),\\n ";
|
|
103
111
|
const appendText1 =
|