Skip to content

Commit

Permalink
Merge pull request #56 from nujarum/dev-2.0.3
Browse files Browse the repository at this point in the history
feat: updates for v2.0.3
  • Loading branch information
nujarum committed Aug 27, 2023
2 parents 2b32a5c + 6d39535 commit 6989034
Show file tree
Hide file tree
Showing 9 changed files with 195 additions and 180 deletions.
2 changes: 1 addition & 1 deletion dist/async/index.mjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import{once as p}from"node:events";import{createRequire as f}from"node:module";import{Worker as u}from"node:worker_threads";import{getCallerUrl as g,execArgv as w}from"#_internal";const i=import.meta.url,y=f(i),k=y.resolve("#worker/async");async function j(r,a){const[t]=await v([r],a);return t}async function v(r,a){const t=Array.isArray(r)?r:[...r];if(t.length<1)return[];const c=[...new Set(t)];a??=g(i);const m=new u(k,{execArgv:w,workerData:{names:c,parent:a}});try{const[n]=await p(m,"message"),o=c.reduce((e,s,l)=>(e[s]=n[l],e),Object.create(null));return t.map(e=>o[e])}catch(n){const{message:o,name:e,stack:s}=Object(n);throw Object.assign(new Error,{message:o,name:e,stack:s})}finally{m.terminate()}}export{j as importMetaResolve,v as importMetaResolveAll};
import{once as u}from"node:events";import{createRequire as p}from"node:module";import{Worker as f}from"node:worker_threads";import{getCallerUrl as g,execArgv as w}from"#_internal";const l=import.meta.url,y=p(l),k=y.resolve("#worker/async");async function j(r,a){const[t]=await v([r],a);return t}async function v(r,a){const t=Array.isArray(r)?r:[...r];if(t.length<1)return[];const m=[...new Set(t)];a??=g(l);const i=new f(k,{execArgv:w,workerData:{names:m,parent:a}});try{const[n]=await u(i,"message"),s=m.reduce((e,o,c)=>(e[o]=n[c],e),Object.create(null));return t.map(e=>s[e])}catch(n){const{cause:s,message:e,name:o,stack:c}=Object(n);throw Object.assign(new Error,{cause:s,message:e,name:o,stack:c})}finally{i.terminate()}}export{j as importMetaResolve,v as importMetaResolveAll};
//# sourceMappingURL=index.mjs.map
2 changes: 1 addition & 1 deletion dist/async/index.mjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/sync/index.mjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import{Worker as g}from"node:worker_threads";import{createRequire as h}from"node:module";import{getCallerUrl as v,execArgv as b}from"#_internal";const u=import.meta.url,k=h(u),x=new TextDecoder,S=k.resolve("#worker/sync");function j(r,o){const[t]=M([r],o);return t}function M(r,o){const t=Array.isArray(r)?r:[...r],l=t.length;if(l<1)return[];const s=[...new Set(t)];o??=v(u);let n;try{const a=new SharedArrayBuffer(l+1<<10),i=new Int32Array(a);let c;if(n=new g(S,{execArgv:b,workerData:{buffer:a,names:s,parent:o}}).once("error",e=>c=e),Atomics.wait(i,0,0,1e3),c)throw c;const m=i[0],w=new Uint8Array(a,4,Math.abs(m)),f=x.decode(w);if(!(0<m))throw Object.assign(new Error,JSON.parse(f||"null"));const p=f.split("\0"),A=s.reduce((e,y,d)=>(e[y]=p[d],e),Object.create(null));return t.map(e=>A[e])}finally{n==null||n.terminate()}}export{j as importMetaResolve,M as importMetaResolveAll};
import{Worker as h}from"node:worker_threads";import{createRequire as d}from"node:module";import{getCallerUrl as g,execArgv as v}from"#_internal";const f=import.meta.url,b=d(f),k=new TextDecoder,x=b.resolve("#worker/sync");function j(r,n){const[t]=S([r],n);return t}function S(r,n){const t=Array.isArray(r)?r:[...r];if(t.length<1)return[];const o=[...new Set(t)];n??=g(f);let a;try{const l=new SharedArrayBuffer(o.length+1<<10),s=new Int32Array(l);let c;if(a=new h(x,{execArgv:v,workerData:{buffer:l,names:o,parent:n}}).once("error",e=>c=e),Atomics.wait(s,0,0,1e3),c)throw c;const i=s[0],u=new Uint8Array(l,4,Math.abs(i)),m=k.decode(u);if(!(0<i))throw Object.assign(new Error,JSON.parse(m||"null"));const p=m.split("\0"),w=o.reduce((e,A,y)=>(e[A]=p[y],e),Object.create(null));return t.map(e=>w[e])}finally{a==null||a.terminate()}}export{j as importMetaResolve,S as importMetaResolveAll};
//# sourceMappingURL=index.mjs.map

0 comments on commit 6989034

Please sign in to comment.