This commit is contained in:
tamaina
2023-02-03 13:45:43 +00:00
commit 8fca24b646
24 changed files with 3444 additions and 0 deletions

1
built/create-temp.js Normal file
View File

@ -0,0 +1 @@
import*as tmp from"tmp";export function createTemp(){return new Promise((res,rej)=>{tmp.file((e,path,fd,cleanup)=>{if(e)return rej(e);res([path,process.env.NODE_ENV==="production"?cleanup:()=>{}])})})}export function createTempDir(){return new Promise((res,rej)=>{tmp.dir({unsafeCleanup:true},(e,path,cleanup)=>{if(e)return rej(e);res([path,process.env.NODE_ENV==="production"?cleanup:()=>{}])})})}