noninteractive 0.3.13 → 0.3.15
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/bin/noninteractive.js +6 -3
- package/package.json +1 -1
package/bin/noninteractive.js
CHANGED
|
@@ -166,6 +166,7 @@ function runDaemon(sessionName, executable, args) {
|
|
|
166
166
|
let processExited = false;
|
|
167
167
|
let exitCode = null;
|
|
168
168
|
const detectedUrls = new Set;
|
|
169
|
+
const reportedUrls = new Set;
|
|
169
170
|
const waiters = [];
|
|
170
171
|
function notifyWaiters() {
|
|
171
172
|
let w = waiters.shift();
|
|
@@ -254,13 +255,15 @@ function runDaemon(sessionName, executable, args) {
|
|
|
254
255
|
});
|
|
255
256
|
function respondWithOutput(socket) {
|
|
256
257
|
readInterceptedUrls();
|
|
257
|
-
const
|
|
258
|
+
const newUrls = Array.from(detectedUrls).filter((u) => !reportedUrls.has(u));
|
|
259
|
+
for (const u of newUrls)
|
|
260
|
+
reportedUrls.add(u);
|
|
258
261
|
socket.end(JSON.stringify({
|
|
259
262
|
ok: true,
|
|
260
263
|
output: outputBuffer,
|
|
261
264
|
exited: processExited,
|
|
262
265
|
exitCode,
|
|
263
|
-
...
|
|
266
|
+
...newUrls.length > 0 ? { urls: newUrls } : {}
|
|
264
267
|
}));
|
|
265
268
|
}
|
|
266
269
|
function waitForNewOutput(socket, sinceLength, timeout) {
|
|
@@ -344,7 +347,7 @@ var init_daemon = __esm(() => {
|
|
|
344
347
|
var require_package = __commonJS((exports, module) => {
|
|
345
348
|
module.exports = {
|
|
346
349
|
name: "noninteractive",
|
|
347
|
-
version: "0.3.
|
|
350
|
+
version: "0.3.15",
|
|
348
351
|
type: "module",
|
|
349
352
|
bin: {
|
|
350
353
|
noninteractive: "./bin/noninteractive.js"
|