@datacamp/learn-vm-scripts 0.0.3-rc.6 → 0.0.3-rc.8
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/index.cjs +7 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -95420,13 +95420,18 @@ var retryWithExponentialBackoff = async ({
|
|
|
95420
95420
|
throw new Error("Max retries exceeded");
|
|
95421
95421
|
};
|
|
95422
95422
|
var resetChrome = async ({ userDataDir }) => {
|
|
95423
|
-
|
|
95424
|
-
|
|
95423
|
+
try {
|
|
95424
|
+
const stdout = (0, import_node_child_process.execSync)("taskkill /IM chrome.exe /F");
|
|
95425
|
+
console.log("Result from killing chrome.exe:", stdout.toString());
|
|
95426
|
+
} catch (e) {
|
|
95427
|
+
console.error("Error killing chrome.exe:", e);
|
|
95428
|
+
}
|
|
95425
95429
|
await retryWithExponentialBackoff({
|
|
95426
95430
|
fn: () => (0, import_promises3.rm)(userDataDir, { recursive: true, force: true }),
|
|
95427
95431
|
initialDelay: 100,
|
|
95428
95432
|
maxRetries: 10
|
|
95429
95433
|
});
|
|
95434
|
+
console.log("Chrome reset!");
|
|
95430
95435
|
};
|
|
95431
95436
|
|
|
95432
95437
|
// src/startInputWatcher.ts
|
|
@@ -95505,13 +95510,6 @@ var startInputWatcher = async ({
|
|
|
95505
95510
|
console.log("No input");
|
|
95506
95511
|
return;
|
|
95507
95512
|
}
|
|
95508
|
-
if (lastInput != null && newInput === lastInput) {
|
|
95509
|
-
console.log("Input already processed");
|
|
95510
|
-
console.log("Resetting Chrome anyway as a test");
|
|
95511
|
-
await resetChrome({ userDataDir });
|
|
95512
|
-
await outputFileHandle.appendFile(`Done: ${newInput}`);
|
|
95513
|
-
return;
|
|
95514
|
-
}
|
|
95515
95513
|
if (lastInput != null) {
|
|
95516
95514
|
console.log("Resetting Chrome");
|
|
95517
95515
|
await resetChrome({ userDataDir });
|
package/package.json
CHANGED