aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/warpc/js/greet.bundle.js
diff options
context:
space:
mode:
Diffstat (limited to 'internal/warpc/js/greet.bundle.js')
-rw-r--r--internal/warpc/js/greet.bundle.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/warpc/js/greet.bundle.js b/internal/warpc/js/greet.bundle.js
index f6776cf53..09320b1a5 100644
--- a/internal/warpc/js/greet.bundle.js
+++ b/internal/warpc/js/greet.bundle.js
@@ -1,2 +1,2 @@
-(()=>{function s(r){let e=[],c=new Uint8Array(1024);for(;;){let n=0;try{n=Javy.IO.readSync(0,c)}catch(o){if(o.message.includes("os error 29"))break;throw new Error("Error reading from stdin")}if(n<0)throw new Error("Error reading from stdin");if(n===0)break;if(e=[...e,...c.subarray(0,n)],!e.includes(10))continue;let t=0;for(let o=0;t<e.length;t++)if(e[t]===10){let u=e.splice(o,t+1),d=new Uint8Array(u),a;try{a=JSON.parse(new TextDecoder().decode(d))}catch(l){throw new Error(`Error parsing JSON '${new TextDecoder().decode(d)}' from stdin: ${l.message}`)}r(a),o=t+1}e=e.slice(t)}}function f(r){let i=new TextEncoder().encode(JSON.stringify(r)+`
-`),e=new Uint8Array(i);Javy.IO.writeSync(1,e)}var w=function(r){f({header:r.header,data:{greeting:"Hello "+r.data.name+"!"}})};console.log("Greet module loaded");s(w);})();
+(()=>{function s(r){let e=[],a=new Uint8Array(1024);for(;;){let n=0;try{n=Javy.IO.readSync(0,a)}catch(o){if(o.message.includes("os error 29"))break;throw new Error("Error reading from stdin")}if(n<0)throw new Error("Error reading from stdin");if(n===0)break;if(e=[...e,...a.subarray(0,n)],!e.includes(10))continue;let t=0;for(let o=0;t<e.length;t++)if(e[t]===10){let u=e.splice(o,t+1),i=new Uint8Array(u),d;try{d=JSON.parse(new TextDecoder().decode(i))}catch(w){throw new Error(`Error parsing JSON '${new TextDecoder().decode(i)}' from stdin: ${w.message}`)}r(d),o=t+1}e=e.slice(t)}}function f(r){let c=new TextEncoder().encode(JSON.stringify(r)+`
+`),e=new Uint8Array(c);Javy.IO.writeSync(1,e)}var p=function(r){f({header:r.header,data:{greeting:"Hello "+r.data.name+"!"}})};console.log("Greet module loaded");s(p);})();