@checksum-ai/runtime 1.0.11 → 1.0.13
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 +2 -2
- package/postinstall.js +0 -33
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checksum-ai/runtime",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Checksum.ai test runtime",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"postinstall": "postinstall.js"
|
|
7
|
+
"postinstall": "node postinstall.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@playwright/test": "1.37.0",
|
package/postinstall.js
CHANGED
|
@@ -20,36 +20,3 @@ try {
|
|
|
20
20
|
console.log("Failed adding checksum scripts to package.json, ", e);
|
|
21
21
|
process.exit(1);
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
(async () => {
|
|
25
|
-
try {
|
|
26
|
-
console.log("Installing checksum files and folders");
|
|
27
|
-
await execCmd("npm run checksum init");
|
|
28
|
-
} catch (e) {
|
|
29
|
-
console.log("Failed installing checksum files and folders, ", e);
|
|
30
|
-
process.exit(1);
|
|
31
|
-
}
|
|
32
|
-
})();
|
|
33
|
-
|
|
34
|
-
async function execCmd(cmdString) {
|
|
35
|
-
const child = await childProcess.spawn(cmdString, {
|
|
36
|
-
shell: true,
|
|
37
|
-
stdio: "inherit",
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
const exitPromise = new Promise((resolve, reject) => {
|
|
41
|
-
child.on("exit", (code) => {
|
|
42
|
-
if (code === 0) {
|
|
43
|
-
resolve(true);
|
|
44
|
-
} else {
|
|
45
|
-
reject(
|
|
46
|
-
new Error(
|
|
47
|
-
`Checsum failed execution with code: ${code} for command: "${cmdString}`
|
|
48
|
-
)
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
return exitPromise;
|
|
55
|
-
}
|