@reason-machines/cli-linux-arm64-musl 0.2.330 → 0.2.332
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/ara +1 -1
- package/bin/vm-hands/api-36ywgdp3.js +2 -0
- package/bin/vm-hands/api-credentials-41xjt55r.js +2 -0
- package/bin/vm-hands/ask-relay-76k5tqcx.js +8 -0
- package/bin/vm-hands/connect-cli-asw6s1nn.js +2 -0
- package/bin/vm-hands/{custom-endpoint-device-8yqvpsd7.js → custom-endpoint-device-dt74zv7m.js} +1 -1
- package/bin/vm-hands/desktop-account-a16gh9sj.js +2 -0
- package/bin/vm-hands/{device-workspace-pacdp5tv.js → device-workspace-nqxczwd3.js} +1 -1
- package/bin/vm-hands/hands-worker-source-tc1snvve.js +2 -0
- package/bin/vm-hands/{index-wx03jedr.js → index-g4t2q0ep.js} +1 -1
- package/bin/vm-hands/local-automation-pps1ej8x.js +2 -0
- package/bin/vm-hands/local-capabilities-nasxgqd8.js +2 -0
- package/bin/vm-hands/local-desktop-users-qej2mfhx.js +2 -0
- package/bin/vm-hands/local-display-mac-4pddah9q.js +2 -0
- package/bin/vm-hands/local-display-session-mhheere8.js +2 -0
- package/bin/vm-hands/local-pty-session-kq8bd4pm.js +2 -0
- package/bin/vm-hands/{network-contract-gb6gk8fg.js → network-contract-qxn4pg15.js} +1 -1
- package/bin/vm-hands/package-s8sef5wh.js +2 -0
- package/bin/vm-hands/permissions-g6sk0rv1.js +2 -0
- package/bin/vm-hands/{reason-hands-protocol-469gmb0h.js → reason-hands-protocol-n14gyf7k.js} +1 -1
- package/bin/vm-hands/{status-wdwrnxja.js → status-b7h8djyg.js} +2 -2
- package/bin/vm-hands/version-gp19vrz1.js +2 -0
- package/bin/vm-hands/{vm-hands-entry-lite-40t7d4p5.js → vm-hands-entry-lite-070nd0vy.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-ht03kzr3.js → vm-hands-entry-lite-2yf0rw8q.js} +3 -3
- package/bin/vm-hands/{vm-hands-entry-lite-6g65w75z.js → vm-hands-entry-lite-3dx1yqhd.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-abrbc7gf.js → vm-hands-entry-lite-4b8f37q4.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-ydjye6jz.js → vm-hands-entry-lite-4r3s0ppn.js} +23 -23
- package/bin/vm-hands/{vm-hands-entry-lite-nj8bmc9y.js → vm-hands-entry-lite-5n6vc7je.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-j7ee0rr6.js → vm-hands-entry-lite-5xm2vftq.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-g5w3cema.js → vm-hands-entry-lite-6h3vb0mz.js} +3 -3
- package/bin/vm-hands/{vm-hands-entry-lite-rd9vsaew.js → vm-hands-entry-lite-7kzy7rxj.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-dyqeaqzb.js → vm-hands-entry-lite-983czfdb.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-rnwjp0tk.js → vm-hands-entry-lite-9k57wmkv.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-n5ec0fjy.js → vm-hands-entry-lite-9rr6gh58.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-tav4dt92.js → vm-hands-entry-lite-awwev9zg.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-0yghpjef.js → vm-hands-entry-lite-c64behya.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-8afzattm.js → vm-hands-entry-lite-cnmd8nft.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-dhzcvvt2.js +5 -0
- package/bin/vm-hands/vm-hands-entry-lite-dtcpbbkc.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-ekp1wmw5.js → vm-hands-entry-lite-dw2jf6dx.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-feaxcj0x.js +5 -0
- package/bin/vm-hands/vm-hands-entry-lite-ffgjezmx.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-ngtfq7a3.js → vm-hands-entry-lite-gmwz37w0.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-n8gsyjq7.js → vm-hands-entry-lite-h01d2fbm.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-pbnx8z9g.js → vm-hands-entry-lite-hj6jjk24.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-jz24p4jj.js → vm-hands-entry-lite-jzms4xs2.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-m4vkk8n3.js +343 -0
- package/bin/vm-hands/vm-hands-entry-lite-mm72ht4e.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-669hk342.js → vm-hands-entry-lite-mtp2h66e.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-5a0kyaxa.js → vm-hands-entry-lite-px64jhhn.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-kbz9zfha.js → vm-hands-entry-lite-s64raarx.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-9y8v419y.js → vm-hands-entry-lite-t5h3g60g.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-djy0ww6h.js → vm-hands-entry-lite-tf5mepq5.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-dj69r683.js → vm-hands-entry-lite-wv11sawh.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-e5fatvff.js → vm-hands-entry-lite-y9psseqc.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-zgs6j8wj.js +3 -0
- package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
- package/bin/vm-hands/{vm-hands-executor-rt8r46bt.js → vm-hands-executor-x9zpbtp9.js} +1 -1
- package/bin/vm-hands/vm-hands-op-runner-346cxpn5.js +2 -0
- package/bin/vm-hands/{vm-hands-runtime-h7s6zcvq.js → vm-hands-runtime-twndxmvd.js} +3 -3
- package/bin/vm-hands/worker-sandbox-1m0s1vnq.js +2 -0
- package/package.json +1 -1
- package/bin/vm-hands/connect-cli-4gee1bxs.js +0 -2
- package/bin/vm-hands/desktop-account-s4629ksd.js +0 -2
- package/bin/vm-hands/hands-worker-source-fprvxtp8.js +0 -2
- package/bin/vm-hands/local-automation-5gkaj1mg.js +0 -2
- package/bin/vm-hands/local-capabilities-px6n9wdf.js +0 -2
- package/bin/vm-hands/local-desktop-users-ktbva6me.js +0 -2
- package/bin/vm-hands/local-display-mac-kbbrwa0y.js +0 -2
- package/bin/vm-hands/local-display-session-qqgjsa3g.js +0 -2
- package/bin/vm-hands/local-pty-session-bnhx083p.js +0 -2
- package/bin/vm-hands/package-bzy9agdv.js +0 -2
- package/bin/vm-hands/permissions-tj216d4z.js +0 -2
- package/bin/vm-hands/version-5crmvxxa.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-qq1091m3.js +0 -344
- package/bin/vm-hands/vm-hands-entry-lite-sggk0bqc.js +0 -5
- package/bin/vm-hands/vm-hands-op-runner-m45mtphf.js +0 -2
- package/bin/vm-hands/worker-sandbox-bqwkytj2.js +0 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var j={REASON_API_KEY:"ARA_API_KEY",REASON_API_URL:"ARA_API_URL",REASON_CLI_CHANNEL:"ARA_CLI_CHANNEL",REASON_CLI_LAUNCHER_PATH:"ARA_CLI_LAUNCHER_PATH",REASON_MANAGED_RUNTIME_ROOT:"ARA_MANAGED_RUNTIME_ROOT",REASON_INSTALL_ALIAS_PATH:"ARA_INSTALL_ALIAS_PATH",REASON_INSTALL_DIR:"ARA_INSTALL_DIR",REASON_INSTALL_METHOD:"ARA_INSTALL_METHOD",REASON_INSTALL_PINNED_VERSION:"ARA_INSTALL_PINNED_VERSION",REASON_INSTALL_UPGRADE:"ARA_INSTALL_UPGRADE"},mJ=Object.values(j),UJ=new Set;function m(J,Q){let V=J[Q];if(V?.trim())return V;let Z=J[j[Q]];if(Z?.trim())UJ.add(j[Q]);return Z}function DJ(J,Q){return{[J]:Q,[j[J]]:Q}}import{basename as PJ}from"path";var x=["production","staging"],GJ="https://api.reasonmachines.com",HJ="https://staging-api.reasonmachines.com";var f={production:{api:"https://api.reasonmachines.ai",app:"https://reasonmachines.ai"},staging:{api:"https://staging-api.reasonmachines.ai",app:"https://staging.reasonmachines.ai"}},RJ=new Set(["ara-staging","reason-staging"]);function lJ(J={}){let Q=m(J.env??process.env,"REASON_CLI_CHANNEL")?.trim().toLowerCase();if(Q){if(x.includes(Q))return Q;throw Error(`Unknown Reason CLI channel: ${Q}`)}let V=PJ(J.executablePath??process.execPath).toLowerCase();return RJ.has(V)?"staging":"production"}function I(J){return J==="staging"?HJ:GJ}function iJ(J){return`${I(J)}/mcp/ara`}var s={production:["https://api.ara.so",f.production.api],staging:["https://api-staging.ara.so",f.staging.api]};function y(J){let Q;try{Q=new URL(J).origin}catch{return J}let V=x.find((Z)=>s[Z].includes(Q));return V?I(V):Q}function rJ(J,Q){return J===Q||y(J)===y(Q)}function oJ(J,Q){return x.some((V)=>s[V].includes(J)&&Q===I(V))}function aJ(J,Q){try{let V=new URL(Q);return!V.username&&!V.password&&(V.origin===I(J)||V.origin===f[J].api)}catch{return!1}}function tJ(J){try{let Q=new URL(J).hostname.replace(/^\[|\]$/g,"").toLowerCase();return Q==="localhost"||Q==="127.0.0.1"||Q==="::1"}catch{return!1}}import{randomBytes as VJ}from"crypto";import{chmodSync as ZJ,closeSync as a,constants as FJ,linkSync as $J,lstatSync as A,mkdirSync as XJ,openSync as CJ,readdirSync as H,readFileSync as t,readlinkSync as E,renameSync as _,rmdirSync as KJ,symlinkSync as k,unlinkSync as U}from"fs";import{createRequire as OJ}from"module";import{constants as bJ}from"os";import{basename as O,join as K,sep as jJ}from"path";import{existsSync as N,lstatSync as l,readdirSync as EJ,readFileSync as TJ,readlinkSync as kJ,realpathSync as _J}from"fs";import{join as L,sep as AJ}from"path";function i(J,...Q){let V=L(J,"ara"),Z=L(J,"reason");if(!r(V))return L(Z,...Q);if(!N(Z))return L(V,...Q);return N(L(V,...Q))&&!N(L(Z,...Q))?L(V,...Q):L(Z,...Q)}function r(J){try{let Q=l(J);if(!Q.isSymbolicLink())return Q.isDirectory();return kJ(J)!=="reason"&&N(J)}catch{return!1}}function o(J,Q=[]){if(!r(J))return!1;let V;try{V=[J,...EJ(J,{withFileTypes:!0}).filter((Z)=>Z.isDirectory()).map((Z)=>L(J,Z.name))]}catch{return!1}return V.some((Z)=>["connect","connect-once"].filter(($)=>!Q.includes(L(Z,$))).some(($)=>{let z=L(Z,$,"worker.json");try{l(z)}catch{return!1}try{let q=JSON.parse(TJ(z,"utf8"))?.stateDirectory;if(typeof q!=="string")return!0;let M=(X,B)=>X===B||X.startsWith(B+AJ);return M(q,J)||M(c(q),c(J))}catch{return!0}}))}function c(J){try{return _J(J)}catch{return J}}var v=new Set(["credentials.json","local-device.json","local-device.revoked.json","local-device.auth-migration.json","local-device.json.registration-pending.json","local-daemon.json","local-daemon.json.workspaces.json","local-root-fingerprint-key.json","instances","workspaces"]),g=new Set(["local-device.proxy.json"]),IJ=new Set(["local-device.key","local-device.binding"]),n=new Map;function NJ(J,Q,V){let Z=K(J,"ara");if(/[/\\]\.reason-ssh[/\\][^/\\]+[/\\]installer-home[/\\]\.config$/.test(J))return{state:W(Z)?.isDirectory()?"kept":"absent"};return qJ(Z,K(J,"reason"),{linkAlways:!0,kept:($)=>o($,V??[]),native:Q===void 0?LJ:()=>Q},V!==void 0)}function YQ(J,...Q){return NJ(J),i(J,...Q)}function wQ(J,Q=process.platform){let V=K(J,"Library","Logs");if(Q==="darwin")for(let Z of[""," Staging"," Development"])qJ(K(V,`Ara${Z}`),K(V,`Reason${Z}`),{linkAlways:!1,kept:()=>!1,native:LJ});return K(V,"Reason")}var zJ="config_rename_unavailable:busy";function qJ(J,Q,V,Z=!1){let $=Z?void 0:n.get(J);if($)return $;let z;try{z=SJ(J,Q,V)}catch(q){let M=`config_rename_unavailable:${G(q)??"failed"}`;try{return{state:W(J)?.isDirectory()?"kept":"absent",problem:M}}catch{return{state:"kept",problem:M}}}if(!(z.state==="absent"&&V.linkAlways)&&z.problem!==zJ&&!(z.state==="kept"&&!z.problem))n.set(J,z);return z}function SJ(J,Q,V){vJ(Q,V.native);let Z=!1;for(let $=0;$<8;$+=1){let z=W(J);if(z?.isSymbolicLink())return E(J)===O(Q)?{state:Z?"renamed":"linked"}:{state:"kept"};if(!z){if(u(Q))Y(()=>U(Q),"ENOENT");if(!(Z||V.linkAlways)||!T(Q))return{state:"absent"};let X=C(Q,"link");k(O(Q),X);try{Y(()=>_(X,J),"EISDIR","ENOTEMPTY","EEXIST","ENOTDIR")}finally{Y(()=>U(X),"ENOENT")}continue}if(!z.isDirectory())return{state:"absent"};if(V.kept(J))return e(Q),{state:"kept"};let q=V.native();if(!q)return e(Q),{state:"kept",problem:"config_rename_unavailable:no_native"};let M=fJ(q,J);if(!M)return{state:"kept",problem:zJ};try{if(A(J).isSymbolicLink())continue;let X=uJ(q,J,Q);if(X)return{state:"kept",problem:X};Z=!0}finally{M()}}throw Object.assign(Error("legacy directory rename did not settle"),{code:"unsettled"})}function uJ(J,Q,V){let Z=W(V);if(!Z||u(V)){if(!Z)k(O(V),V);try{J.exchange(Q,V)}catch(X){if(u(V))Y(()=>U(V),"ENOENT");return`config_rename_unavailable:${G(X)??"exchange_failed"}`}return null}if(!Z.isDirectory())return"config_rename_unavailable:ENOTDIR";if(Z.dev!==A(Q).dev)return"config_rename_unavailable:EXDEV";let $=[C(V,"probe"),C(V,"probe")];try{k("a",$[0]),k("b",$[1]),J.exchange($[0],$[1])}catch(X){return`config_rename_unavailable:${G(X)??"exchange_failed"}`}finally{for(let X of $)Y(()=>U(X),"ENOENT")}let z=wJ(V);for(let X of IJ){let B=W(K(V,X)),w=W(K(Q,X));if(B&&w&&B.ino!==w.ino)XJ(`${z}-replaced`,{mode:448,recursive:!0}),_(K(V,X),K(`${z}-replaced`,X))}let q={linked:new Map,unitsKept:new Set};MJ(Q,V,"",q);let M=C(V,"rename");k(O(V),M);try{J.exchange(Q,M)}catch(X){return Y(()=>U(M),"ENOENT"),`config_rename_unavailable:${G(X)??"exchange_failed"}`}return BJ(M,V,q,z),null}function h(J){return J===""||!J.includes(jJ)}function MJ(J,Q,V,Z){let $=h(V)&&S(K(Q,V),K(J,V));if($)Z.unitsKept.add(V);for(let z of H(K(J,V))){if($&&(v.has(z)||g.has(z)))continue;let q=K(V,z),M=K(J,q),X=K(Q,q),B=W(M);if(!B)continue;let w=W(X);if(B.isDirectory()){if(!w)Y(()=>XJ(X,{mode:B.mode&4095}),"EEXIST"),ZJ(X,B.mode&4095);if(T(X))MJ(J,Q,q,Z)}else if(!w){if(B.isSymbolicLink())Y(()=>k(E(M),X),"EEXIST");else if(Y(()=>$J(M,X),"EEXIST","ENOENT"))Z.linked.set(q,B.ino)}}}function vJ(J,Q){let V;try{if(!T(J))return;V=H(J)}catch{return}for(let Z of V){let $=/^\.(rename|link|probe|claim)-(\d+)-[0-9a-f]+$/.exec(Z);if(!$)continue;let z=K(J,Z),q=W(z);if(!q)continue;if(!q.isDirectory()){if(!JJ(Number($[2])))Y(()=>U(z),"ENOENT");continue}let M=Q(),X=null;if(M){try{X=M.lock(z)}catch{continue}if(!X)continue}else if(JJ(Number($[2])))continue;try{let B=C(J,"claim");if(Y(()=>_(z,B),"ENOENT"))BJ(B,J,null,wJ(J))}finally{X?.()}}}function BJ(J,Q,V,Z){for(let[$,z]of V?.linked??[])if(!W(K(J,$))&&W(K(Q,$))?.ino===z)Y(()=>U(K(Q,$)),"ENOENT");if(WJ(J,Q,"",V),Y(()=>KJ(J),"ENOTEMPTY","EEXIST"))return;_(J,Z),ZJ(Z,448)}function WJ(J,Q,V,Z){let $=h(V)&&(Z?Z.unitsKept.has(V):S(K(Q,V),K(J,V)));for(let z of H(K(J,V))){let q=K(V,z),M=K(J,q),X=K(Q,q),B=A(M),w=W(X);if(w&&B.ino===w.ino&&B.dev===w.dev){U(M);continue}if(B.isFile()&&w?.isFile()&&Z?.linked.get(q)===w.ino){_(M,X);continue}if($&&(v.has(z)||g.has(z)))continue;if(!w){if(B.isFile()){if(Y(()=>$J(M,X),"EEXIST"))U(M)}else Y(()=>_(M,X),"EEXIST","ENOTEMPTY");continue}if(B.isDirectory()&&w.isDirectory())WJ(J,Q,q,Z),Y(()=>KJ(M),"ENOTEMPTY","EEXIST")}}function LQ(J){let Q=K(J,"ara"),V=K(J,"reason");if(!T(Q)||!T(V))return null;let Z=["",...H(Q,{withFileTypes:!0}).filter(($)=>$.isDirectory()&&!$.name.startsWith(".")).map(($)=>$.name)];for(let $ of Z){let z=K(Q,$),q=K(V,$);if(!S(z,q)||!S(q,z))continue;if([...v,...g].some((X)=>d(K(z,X),K(q,X))===!1))return $}return null}function UQ(J){let Q=K(J,"ara"),V=K(J,"reason");if(!T(Q)||!T(V))return null;let Z=($)=>{for(let z of H(K(Q,$))){let q=K($,z);if(h($)&&(z==="connect"||z==="connect-once"))continue;let M=A(K(Q,q)),X=W(K(V,q));if(!X||M.ino===X.ino&&M.dev===X.dev)continue;if(M.isDirectory()&&X.isDirectory()&&!X.isSymbolicLink()){let B=Z(q);if(B!==null)return B}else if(M.isSymbolicLink()||X.isSymbolicLink()){if(!(M.isSymbolicLink()&&X.isSymbolicLink()&&E(K(Q,q))===E(K(V,q))))return q}else if(d(K(Q,q),K(V,q))!==!0)return q}return null};return Z("")}function d(J,Q){let V=W(J),Z=W(Q);if(!V&&!Z)return null;if(!V||!Z||V.isDirectory()!==Z.isDirectory())return!1;if(V.ino===Z.ino&&V.dev===Z.dev)return!0;if(V.isDirectory())return[...new Set([...H(J),...H(Q)])].every((z)=>d(K(J,z),K(Q,z))===!0);try{return t(J).equals(t(Q))}catch{return!1}}function S(J,Q){for(let V of v)if(YJ(K(J,V),K(Q,V)))return!0;return!1}function YJ(J,Q){let V=W(J);if(!V)return!1;let Z=W(Q);if(!Z)return!0;if(V.isDirectory()){if(!Z.isDirectory())return!0;return H(J).some(($)=>YJ(K(J,$),K(Q,$)))}if(V.isSymbolicLink())return!Z.isSymbolicLink()||E(J)!==E(Q);return V.ino!==Z.ino||V.dev!==Z.dev}function e(J){if(u(J))Y(()=>U(J),"ENOENT")}function wJ(J){return K(J,`.pre-rename-${new Date().toISOString().replace(/[:.]/g,"-")}-${VJ(3).toString("hex")}`)}function u(J){try{return A(J).isSymbolicLink()&&E(J)===O(J)}catch{return!1}}function T(J){let Q=W(J);return Q!==null&&Q.isDirectory()}function fJ(J,Q){for(let V=0;V<40;V+=1){let Z=J.lock(Q);if(Z)return Z;Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,50)}return null}function C(J,Q){return K(J,`.${Q}-${process.pid}-${VJ(6).toString("hex")}`)}function JJ(J){if(J===process.pid)return!1;try{return process.kill(J,0),!0}catch(Q){return G(Q)==="EPERM"}}function W(J){try{return A(J)}catch(Q){if(G(Q)==="ENOENT"||G(Q)==="ENOTDIR")return null;throw Q}}function Y(J,...Q){try{return J(),!0}catch(V){if(Q.includes(G(V)??""))return!1;throw V}}function G(J){return J instanceof Error&&"code"in J&&typeof J.code==="string"?J.code:void 0}var F,xJ=2,gJ=4,hJ=2,dJ=2,QJ=-100;function LJ(){if(F!==void 0)return F;if(F=null,process.platform!=="linux"&&process.platform!=="darwin")return null;let J;try{J=OJ(import.meta.url)("bun:ffi")}catch{return null}let Q=process.platform==="darwin",V=Q?"__error":"__errno_location",Z=Q?["/usr/lib/libSystem.B.dylib"]:["libc.so.6",`libc.musl-${process.arch==="arm64"?"aarch64":"x86_64"}.so.1`],{FFIType:$}=J;for(let z of Z)try{let q=Q?"renamex_np":"renameat2",X=J.dlopen(z,{flock:{args:[$.i32,$.i32],returns:$.i32},[V]:{args:[],returns:$.ptr},[q]:Q?{args:[$.ptr,$.ptr,$.u32],returns:$.i32}:{args:[$.i32,$.ptr,$.i32,$.ptr,$.u32],returns:$.i32}}).symbols,B=X[V]();if(B===null)continue;let w=(R)=>{let P=J.read.i32(B),D=Object.entries(bJ.errno).find(([,b])=>b===P)?.[0]??`errno_${P}`;return Object.assign(Error(`${R} failed: ${D}`),{code:D})},p=(R)=>Buffer.from(`${R}\x00`,"utf8");return F={exchange(R,P){let D=p(R),b=p(P);if((Q?X[q](J.ptr(D),J.ptr(b),hJ):X[q](QJ,J.ptr(D),QJ,J.ptr(b),dJ))!==0)throw w("exchange")},lock(R){let P=CJ(R,FJ.O_RDONLY);if(X.flock(P,xJ|gJ)===0)return()=>a(P);let D=w("lock");if(a(P),D.code==="EWOULDBLOCK"||D.code==="EAGAIN")return null;throw D}},F}catch{}return null}
|
|
3
|
+
export{m as nh,DJ as oh,x as ph,lJ as qh,I as rh,iJ as sh,y as th,rJ as uh,oJ as vh,aJ as wh,tJ as xh,r as yh,NJ as zh,YQ as Ah,wQ as Bh,LQ as Ch,UQ as Dh,LJ as Eh};
|