@danielx/civet 0.11.6 → 0.11.7
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 +289 -0
- package/dist/browser.js +246 -124
- package/dist/civet +12 -8
- package/dist/main.js +344 -166
- package/dist/main.mjs +344 -166
- package/dist/ts-diagnostic.js +1 -1
- package/dist/ts-diagnostic.mjs +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/unplugin/astro.mjs +3 -3
- package/dist/unplugin/esbuild.d.ts +1 -1
- package/dist/unplugin/esbuild.mjs +3 -3
- package/dist/unplugin/farm.mjs +3 -3
- package/dist/unplugin/rolldown.d.ts +1 -1
- package/dist/unplugin/rolldown.mjs +3 -3
- package/dist/unplugin/rollup.d.ts +1 -1
- package/dist/unplugin/rollup.mjs +3 -3
- package/dist/unplugin/rspack.d.ts +1 -1
- package/dist/unplugin/rspack.mjs +3 -3
- package/dist/unplugin/unplugin.d.ts +27 -3
- package/dist/unplugin/unplugin.js +20 -9
- package/dist/unplugin/unplugin.mjs +24 -13
- package/dist/unplugin/vite.d.ts +1 -1
- package/dist/unplugin/vite.mjs +3 -3
- package/dist/unplugin/webpack.d.ts +1 -1
- package/dist/unplugin/webpack.mjs +3 -3
- package/package.json +7 -6
package/dist/civet
CHANGED
|
@@ -56,6 +56,7 @@ async function version() {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
var encoding = "utf8";
|
|
59
|
+
var epipeStdoutHandlerInstalled = false;
|
|
59
60
|
async function parseArgs(args, isTTY = process.stdin.isTTY) {
|
|
60
61
|
const options = {};
|
|
61
62
|
const isRun = () => !(options.ast || options.compile || options.typecheck || options.emitDeclaration);
|
|
@@ -603,14 +604,17 @@ You can override this behavior via: --civet rewriteCivetImports=.ext
|
|
|
603
604
|
if (options.repl) {
|
|
604
605
|
return repl(args, options);
|
|
605
606
|
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
607
|
+
if (!epipeStdoutHandlerInstalled) {
|
|
608
|
+
epipeStdoutHandlerInstalled = true;
|
|
609
|
+
process.stdout.on("error", (e) => {
|
|
610
|
+
if (["EPIPE", "EOF"].includes(e.code)) {
|
|
611
|
+
return process.exit(0);
|
|
612
|
+
} else {
|
|
613
|
+
console.error(e);
|
|
614
|
+
return process.exit(1);
|
|
615
|
+
}
|
|
616
|
+
});
|
|
617
|
+
}
|
|
614
618
|
let errors = 0;
|
|
615
619
|
for await (let { filename, error, content, stdin } of readFiles(filenames, options.eval)) {
|
|
616
620
|
if (error) {
|