securityos/node_modules/next/dist/esm/lib/download-swc.js.map

1 line
3.4 KiB
Plaintext

{"version":3,"sources":["../../src/lib/download-swc.ts"],"names":["fs","path","Log","tar","fetch","require","WritableStream","getRegistry","getCacheDirectory","MAX_VERSIONS_TO_CACHE","extractBinary","outputDirectory","pkgName","tarFileName","cacheDirectory","process","env","extractFromTar","x","file","join","cwd","strip","existsSync","info","promises","mkdir","recursive","tempFile","Date","now","registry","downloadUrl","then","res","ok","body","error","Error","status","cacheWriteStream","createWriteStream","pipeTo","write","chunk","close","rename","cacheFiles","readdir","length","sort","a","b","localeCompare","i","unlink","catch","downloadNativeNextSwc","version","bindingsDirectory","triplesABI","triple","substring","downloadWasmSwc","wasmDirectory","variant"],"mappings":"AAAA,OAAOA,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AACvB,YAAYC,SAAS,sBAAqB;AAC1C,OAAOC,SAAS,yBAAwB;AACxC,MAAM,EAAEC,KAAK,EAAE,GAAGC,QAAQ;AAG1B,MAAM,EAAEC,cAAc,EAAE,GAAGD,QAAQ;AAGnC,SAASE,WAAW,QAAQ,yBAAwB;AACpD,SAASC,iBAAiB,QAAQ,gCAA+B;AAEjE,MAAMC,wBAAwB;AAE9B,eAAeC,cACbC,eAAuB,EACvBC,OAAe,EACfC,WAAmB;IAEnB,MAAMC,iBAAiBN,kBACrB,YACAO,QAAQC,GAAG,CAAC,gBAAgB;IAG9B,MAAMC,iBAAiB,IACrBd,IAAIe,CAAC,CAAC;YACJC,MAAMlB,KAAKmB,IAAI,CAACN,gBAAgBD;YAChCQ,KAAKV;YACLW,OAAO;QACT;IAEF,IAAI,CAACtB,GAAGuB,UAAU,CAACtB,KAAKmB,IAAI,CAACN,gBAAgBD,eAAe;QAC1DX,IAAIsB,IAAI,CAAC,CAAC,wBAAwB,EAAEZ,QAAQ,GAAG,CAAC;QAChD,MAAMZ,GAAGyB,QAAQ,CAACC,KAAK,CAACZ,gBAAgB;YAAEa,WAAW;QAAK;QAC1D,MAAMC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