@danielx/civet 0.8.4 → 0.8.5
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/CHANGELOG.md +5 -0
- package/dist/browser.js +475 -236
- package/dist/civet +5 -8
- package/dist/main.js +475 -236
- package/dist/main.mjs +475 -236
- package/package.json +2 -2
package/dist/civet
CHANGED
|
@@ -248,7 +248,6 @@ async function* readFiles(filenames, evalString) {
|
|
|
248
248
|
stdin: true
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
|
-
const results1 = [];
|
|
252
251
|
for (let i2 = 0, len1 = filenames.length; i2 < len1; i2++) {
|
|
253
252
|
let filename = filenames[i2];
|
|
254
253
|
const stdin = filename === "-";
|
|
@@ -275,23 +274,21 @@ async function* readFiles(filenames, evalString) {
|
|
|
275
274
|
});
|
|
276
275
|
} else {
|
|
277
276
|
content = (await (async () => {
|
|
278
|
-
const
|
|
277
|
+
const results1 = [];
|
|
279
278
|
for await (const chunk of process.stdin) {
|
|
280
|
-
|
|
279
|
+
results1.push(chunk);
|
|
281
280
|
}
|
|
282
|
-
return
|
|
281
|
+
return results1;
|
|
283
282
|
})()).join("");
|
|
284
283
|
}
|
|
285
284
|
} else {
|
|
286
285
|
content = await import_promises.default.readFile(filename, { encoding });
|
|
287
286
|
}
|
|
288
|
-
|
|
287
|
+
yield { filename, content, stdin };
|
|
289
288
|
} catch (error) {
|
|
290
|
-
|
|
289
|
+
yield { filename, error, stdin };
|
|
291
290
|
}
|
|
292
291
|
}
|
|
293
|
-
;
|
|
294
|
-
return results1;
|
|
295
292
|
}
|
|
296
293
|
async function repl(args, options) {
|
|
297
294
|
const vm = await import("node:vm");
|