cdp-core 1.0.6 → 1.0.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/cdp_inject.js +3 -3
- package/package.json +1 -1
package/cdp_inject.js
CHANGED
|
@@ -96,7 +96,7 @@ const SOLVER_SCRIPT = `
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
} else if (data.type === 'code') {
|
|
99
|
-
cachedCodeLines = data.answer.split('
|
|
99
|
+
cachedCodeLines = data.answer.split('\n').filter(l => l.trim() !== '');
|
|
100
100
|
currentLineIndex = 0;
|
|
101
101
|
}
|
|
102
102
|
};
|
|
@@ -257,9 +257,9 @@ if (process.argv.includes('--stop')) {
|
|
|
257
257
|
console.log('[cdp] Stopping all background solvers...');
|
|
258
258
|
exec('taskkill /F /IM node.exe', () => process.exit(0));
|
|
259
259
|
} else if (process.argv.includes('--detach')) {
|
|
260
|
-
const out = fs.openSync(path.join(
|
|
260
|
+
const out = fs.openSync(path.join(process.cwd(), 'cdp.log'), 'a');
|
|
261
261
|
const child = require('child_process').spawn('node', [__filename], { detached: true, stdio: ['ignore', out, out] });
|
|
262
262
|
child.unref();
|
|
263
|
-
console.log('[cdp] Launched in background. Logs: ' + path.join(
|
|
263
|
+
console.log('[cdp] Launched in background. Logs: ' + path.join(process.cwd(), 'cdp.log'));
|
|
264
264
|
process.exit(0);
|
|
265
265
|
} else { main(); }
|