aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bun.js/webcore/streams.zig6
-rw-r--r--src/js/out/WebCoreJSBuiltins.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/bun.js/webcore/streams.zig b/src/bun.js/webcore/streams.zig
index 0e14fedee..03b1dcdc9 100644
--- a/src/bun.js/webcore/streams.zig
+++ b/src/bun.js/webcore/streams.zig
@@ -4579,12 +4579,12 @@ pub fn NewReadyWatcher(
return this.is_fifo;
}
- if (this.poll_ref != null) {
- return true;
+ if (this.poll_ref) |_poll_ref| {
+ return _poll_ref.flags.contains(.fifo);
}
if (comptime @hasField(Context, "mode")) {
- return std.os.S.ISFIFO(this.mode) or std.os.S.ISCHR(this.mode);
+ return std.os.S.ISFIFO(this.mode);
}
return false;
diff --git a/src/js/out/WebCoreJSBuiltins.cpp b/src/js/out/WebCoreJSBuiltins.cpp
index 47e2bb3ca..395d2d8bd 100644
--- a/src/js/out/WebCoreJSBuiltins.cpp
+++ b/src/js/out/WebCoreJSBuiltins.cpp
@@ -646,9 +646,9 @@ const char* const s_processObjectInternalsBindingCode = "(function (u){\"use str
const JSC::ConstructAbility s_processObjectInternalsGetStdioWriteStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_processObjectInternalsGetStdioWriteStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_processObjectInternalsGetStdioWriteStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_processObjectInternalsGetStdioWriteStreamCodeLength = 4535;
+const int s_processObjectInternalsGetStdioWriteStreamCodeLength = 4505;
static const JSC::Intrinsic s_processObjectInternalsGetStdioWriteStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_processObjectInternalsGetStdioWriteStreamCode = "(function (X,Z){\"use strict\";var N=(K)=>{var j=@requireMap.get(K);if(j)return j.exports;return @internalRequire(K)},I={path:\"node:process\",require:N};function x(K){var{Duplex:j,eos:B,destroy:G}=N(\"node:stream\"),L=class Q extends j{#B;#$;#N=!0;#O=!0;#K;#G;#j;#H;#J;#L;get isTTY(){return this.#L\?\?=N(\"node:tty\").isatty(K)}get fd(){return K}constructor(H){super({readable:!0,writable:!0});this.#K=`/dev/fd/${H}`}#M(H){const J=this.#G;if(this.#G=null,J)J(H);else if(H)this.destroy(H);else if(!this.#N&&!this.#O)this.destroy()}_destroy(H,J){if(!H&&this.#G!==null){var O=class P extends Error{code;name;constructor(V=\"The operation was aborted\",M=void 0){if(M!==void 0&&typeof M!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(M,null,2)}`);super(V,M);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};H=new O}if(this.#j=null,this.#H=null,this.#G===null)J(H);else{if(this.#G=J,this.#B)G(this.#B,H);if(this.#$)G(this.#$,H)}}_write(H,J,O){if(!this.#B){var{createWriteStream:P}=N(\"node:fs\"),V=this.#B=P(this.#K);V.on(\"finish\",()=>{if(this.#H){const M=this.#H;this.#H=null,M()}}),V.on(\"drain\",()=>{if(this.#j){const M=this.#j;this.#j=null,M()}}),B(V,(M)=>{if(this.#O=!1,M)G(V,M);this.#M(M)})}if(V.write(H,J))O();else this.#j=O}_final(H){this.#B&&this.#B.end(),this.#H=H}#Q(){var{createReadStream:H}=N(\"node:fs\"),J=this.#$=H(this.#K);return J.on(\"readable\",()=>{if(this.#J){const O=this.#J;this.#J=null,O()}else this.read()}),J.on(\"end\",()=>{this.push(null)}),B(J,(O)=>{if(this.#N=!1,O)G(J,O);this.#M(O)}),J}_read(){var H=this.#$;if(!H)H=this.#Q();while(!0){const J=H.read();if(J===null||!this.push(J))return}}};return new L(K)}var{EventEmitter:q}=N(\"node:events\");function T(K){if(!K)return!0;var j=K.toLowerCase();return j===\"utf8\"||j===\"utf-8\"||j===\"buffer\"||j===\"binary\"}var Y,U=[0,0],D=class K extends q{#B;#$;#N;#O;bytesWritten=0;setDefaultEncoding(j){if(this.#$||!T(j))return this.#j(),this.#$.setDefaultEncoding(j)}#K(){switch(this.#B){case 1:{var j=@Bun.stdout.writer({highWaterMark:0});return j.unref(),j}case 2:{var j=@Bun.stderr.writer({highWaterMark:0});return j.unref(),j}default:throw new Error(\"Unsupported writer\")}}#G(){return this.#N\?\?=this.#K()}constructor(j){super();this.#B=j}get fd(){return this.#B}ref(){this.#G().ref()}unref(){this.#G().unref()}on(j,B){if(j===\"close\"||j===\"finish\")return this.#j(),this.#$.on(j,B);if(j===\"drain\")return super.on(\"drain\",B);if(j===\"error\")return super.on(\"error\",B);return super.on(j,B)}get _writableState(){return this.#j(),this.#$._writableState}get _readableState(){return this.#j(),this.#$._readableState}pipe(j){return this.#j(),this.#$.pipe(j)}unpipe(j){return this.#j(),this.#$.unpipe(j)}#j(){if(this.#$)return;this.#$=x(this.#B);const j=this.eventNames();for(let B of j)this.#$.on(B,(...G)=>{this.emit(B,...G)})}#H(j){var B=this.#G();const G=B.write(j);this.bytesWritten+=G;const L=B.flush(!1);return console.log({flushResult:L}),!!(G||L)}#J(j,B){if(!T(B))return this.#j(),this.#$.write(j,B);return this.#H(j)}#L(j,B){if(B)this.emit(\"error\",B);try{j(B\?B:null)}catch(G){this.emit(\"error\",G)}}#M(j,B,G){if(!T(B))return this.#j(),this.#$.write(j,B,G);var L=this.#G();const Q=L.write(j),H=L.flush(!0);if(H\?.then)return H.then(()=>{this.#L(G),this.emit(\"drain\")},(J)=>this.#L(G,J)),!1;return queueMicrotask(()=>{this.#L(G)}),!!(Q||H)}get isTTY(){return!1}write(j,B,G){const L=this._write(j,B,G);if(L)this.emit(\"drain\");return L}get hasColors(){return @Bun.tty[this.#B].hasColors}_write(j,B,G){var L=this.#$;if(L)return L.write(j,B,G);switch(arguments.length){case 0:{var Q=new Error(\"Invalid arguments\");throw Q.code=\"ERR_INVALID_ARG_TYPE\",Q}case 1:return this.#H(j);case 2:if(typeof B===\"function\")return this.#M(j,\"\",B);else if(typeof B===\"string\")return this.#J(j,B);default:{if(typeof B!==\"undefined\"&&typeof B!==\"string\"||typeof G!==\"undefined\"&&typeof G!==\"function\"){var Q=new Error(\"Invalid arguments\");throw Q.code=\"ERR_INVALID_ARG_TYPE\",Q}if(typeof G===\"undefined\")return this.#J(j,B);return this.#M(j,B,G)}}}destroy(){return this}end(){return this}};if(Z(X,U)){var C=class K extends D{get isTTY(){return!0}cursorTo(j,B,G){return(Y\?\?=N(\"node:readline\")).cursorTo(this,j,B,G)}moveCursor(j,B,G){return(Y\?\?=N(\"node:readline\")).moveCursor(this,j,B,G)}clearLine(j,B){return(Y\?\?=N(\"node:readline\")).clearLine(this,j,B)}clearScreenDown(j){return(Y\?\?=N(\"node:readline\")).clearScreenDown(this,j)}getWindowSize(){if(Z(X,U)===!0)return[U[0],U[1]]}get columns(){if(Z(X,U)===!0)return U[0]}get rows(){if(Z(X,U)===!0)return U[1]}};return new C(X)}return new D(X)})\n";
+const char* const s_processObjectInternalsGetStdioWriteStreamCode = "(function (X,Z){\"use strict\";var N=(J)=>{var L=@requireMap.get(J);if(L)return L.exports;return @internalRequire(J)},I={path:\"node:process\",require:N};function q(J){var{Duplex:L,eos:j,destroy:B}=N(\"node:stream\"),K=class Q extends L{#j;#$;#N=!0;#O=!0;#J;#B;#L;#G;#H;#K;get isTTY(){return this.#K\?\?=N(\"node:tty\").isatty(J)}get fd(){return J}constructor(G){super({readable:!0,writable:!0});this.#J=`/dev/fd/${G}`}#M(G){const H=this.#B;if(this.#B=null,H)H(G);else if(G)this.destroy(G);else if(!this.#N&&!this.#O)this.destroy()}_destroy(G,H){if(!G&&this.#B!==null){var O=class P extends Error{code;name;constructor(V=\"The operation was aborted\",M=void 0){if(M!==void 0&&typeof M!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(M,null,2)}`);super(V,M);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};G=new O}if(this.#L=null,this.#G=null,this.#B===null)H(G);else{if(this.#B=H,this.#j)B(this.#j,G);if(this.#$)B(this.#$,G)}}_write(G,H,O){if(!this.#j){var{createWriteStream:P}=N(\"node:fs\"),V=this.#j=P(this.#J);V.on(\"finish\",()=>{if(this.#G){const M=this.#G;this.#G=null,M()}}),V.on(\"drain\",()=>{if(this.#L){const M=this.#L;this.#L=null,M()}}),j(V,(M)=>{if(this.#O=!1,M)B(V,M);this.#M(M)})}if(V.write(G,H))O();else this.#L=O}_final(G){this.#j&&this.#j.end(),this.#G=G}#Q(){var{createReadStream:G}=N(\"node:fs\"),H=this.#$=G(this.#J);return H.on(\"readable\",()=>{if(this.#H){const O=this.#H;this.#H=null,O()}else this.read()}),H.on(\"end\",()=>{this.push(null)}),j(H,(O)=>{if(this.#N=!1,O)B(H,O);this.#M(O)}),H}_read(){var G=this.#$;if(!G)G=this.#Q();while(!0){const H=G.read();if(H===null||!this.push(H))return}}};return new K(J)}var{EventEmitter:x}=N(\"node:events\");function Y(J){if(!J)return!0;var L=J.toLowerCase();return L===\"utf8\"||L===\"utf-8\"||L===\"buffer\"||L===\"binary\"}var T,U=[0,0],D=class J extends x{#j;#$;#N;#O;bytesWritten=0;setDefaultEncoding(L){if(this.#$||!Y(L))return this.#L(),this.#$.setDefaultEncoding(L)}#J(){switch(this.#j){case 1:{var L=@Bun.stdout.writer({highWaterMark:0});return L.unref(),L}case 2:{var L=@Bun.stderr.writer({highWaterMark:0});return L.unref(),L}default:throw new Error(\"Unsupported writer\")}}#B(){return this.#N\?\?=this.#J()}constructor(L){super();this.#j=L}get fd(){return this.#j}ref(){this.#B().ref()}unref(){this.#B().unref()}on(L,j){if(L===\"close\"||L===\"finish\")return this.#L(),this.#$.on(L,j);if(L===\"drain\")return super.on(\"drain\",j);if(L===\"error\")return super.on(\"error\",j);return super.on(L,j)}get _writableState(){return this.#L(),this.#$._writableState}get _readableState(){return this.#L(),this.#$._readableState}pipe(L){return this.#L(),this.#$.pipe(L)}unpipe(L){return this.#L(),this.#$.unpipe(L)}#L(){if(this.#$)return;this.#$=q(this.#j);const L=this.eventNames();for(let j of L)this.#$.on(j,(...B)=>{this.emit(j,...B)})}#G(L){var j=this.#B();const B=j.write(L);this.bytesWritten+=B;const K=j.flush(!1);return!!(B||K)}#H(L,j){if(!Y(j))return this.#L(),this.#$.write(L,j);return this.#G(L)}#K(L,j){if(j)this.emit(\"error\",j);try{L(j\?j:null)}catch(B){this.emit(\"error\",B)}}#M(L,j,B){if(!Y(j))return this.#L(),this.#$.write(L,j,B);var K=this.#B();const Q=K.write(L),G=K.flush(!0);if(G\?.then)return G.then(()=>{this.#K(B),this.emit(\"drain\")},(H)=>this.#K(B,H)),!1;return queueMicrotask(()=>{this.#K(B)}),!!(Q||G)}get isTTY(){return!1}write(L,j,B){const K=this._write(L,j,B);if(K)this.emit(\"drain\");return K}get hasColors(){return @Bun.tty[this.#j].hasColors}_write(L,j,B){var K=this.#$;if(K)return K.write(L,j,B);switch(arguments.length){case 0:{var Q=new Error(\"Invalid arguments\");throw Q.code=\"ERR_INVALID_ARG_TYPE\",Q}case 1:return this.#G(L);case 2:if(typeof j===\"function\")return this.#M(L,\"\",j);else if(typeof j===\"string\")return this.#H(L,j);default:{if(typeof j!==\"undefined\"&&typeof j!==\"string\"||typeof B!==\"undefined\"&&typeof B!==\"function\"){var Q=new Error(\"Invalid arguments\");throw Q.code=\"ERR_INVALID_ARG_TYPE\",Q}if(typeof B===\"undefined\")return this.#H(L,j);return this.#M(L,j,B)}}}destroy(){return this}end(){return this}};if(Z(X,U)){var C=class J extends D{get isTTY(){return!0}cursorTo(L,j,B){return(T\?\?=N(\"node:readline\")).cursorTo(this,L,j,B)}moveCursor(L,j,B){return(T\?\?=N(\"node:readline\")).moveCursor(this,L,j,B)}clearLine(L,j){return(T\?\?=N(\"node:readline\")).clearLine(this,L,j)}clearScreenDown(L){return(T\?\?=N(\"node:readline\")).clearScreenDown(this,L)}getWindowSize(){if(Z(X,U)===!0)return[U[0],U[1]]}get columns(){if(Z(X,U)===!0)return U[0]}get rows(){if(Z(X,U)===!0)return U[1]}};return new C(X)}return new D(X)})\n";
// getStdinStream
const JSC::ConstructAbility s_processObjectInternalsGetStdinStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;