@platforma-sdk/bootstrap 3.4.0 → 3.4.2

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/dist/index.js CHANGED
@@ -92,7 +92,7 @@ controllers:
92
92
  pureFutureFields: true
93
93
  commandExpressions: true
94
94
  workdirLimits: true
95
- computeLimits: true
95
+ computeLimits: false
96
96
  `}function oe(a,e){return a===void 0?e:a}const Zr=["linux","macos","windows"];function et(a){const e=D.platform();switch(e){case"darwin":return"macos";case"linux":return"linux";case"win32":return"windows";default:throw new Error(`operating system '${e}' is not currently supported by Platforma ecosystem. The list of OSes supported: `+JSON.stringify(Zr))}}const rt=["amd64","arm64"];function pr(a){const e=D.arch();switch(e){case"arm64":return"arm64";case"x64":return"amd64";default:throw new Error(`processor architecture '${e}' is not currently supported by Platforma ecosystem. The list of architectures supported: `+JSON.stringify(rt))}}function tt(a,e){const t=(e==null?void 0:e.version)??ge.getDefaultPlVersion(),r=(e==null?void 0:e.showProgress)??process.stdout.isTTY,s=`pl-${t}-${pr()}.tgz`,n=(e==null?void 0:e.downloadURL)??`https://cdn.platforma.bio/software/pl/${et()}/${s}`,i=(e==null?void 0:e.saveTo)??f.binaries(s);if(m.existsSync(i))return a.info(`Platforma Backend archive download skipped: '${i}' already exists`),Promise.resolve(i);m.mkdirSync(h.dirname(i),{recursive:!0}),a.info(`Downloading Platforma Backend archive:
97
97
  URL: ${n}
98
98
  Save to: ${i}`);const c=Ir.get(n);return new Promise((o,g)=>{c.on("response",d=>{if(!d.statusCode){const b=new Error("failed to download archive: no HTTP status code in response from server");c.destroy(),g(b);return}if(d.statusCode!==200){const b=new Error(`failed to download archive: ${d.statusCode} ${d.statusMessage}`);c.destroy(),g(b);return}const y=parseInt(d.headers["content-length"]||"0",10);let w=0;const p=m.createWriteStream(i);d.pipe(p),d.on("data",b=>{w+=b.length;const P=w/y*100;r&&process.stdout.write(` downloading: ${P.toFixed(2)}%\r`)}),d.on("error",b=>{m.unlinkSync(i),a.error(`Failed to download Platforma Binary: ${b.message}`),c.destroy(),g(b)}),p.on("finish",()=>{p.close(),a.info(" ... download done."),c.destroy(),o(i)})})})}function at(a,e){a.debug("extracting archive...");const t=(e==null?void 0:e.version)??ge.getDefaultPlVersion();a.debug(` version: '${t}'`);const r=`${vr({version:t})}.tgz`,s=(e==null?void 0:e.archivePath)??f.binaries(r);a.debug(` archive path: '${s}'`);const n=(e==null?void 0:e.extractTo)??nt(s);if(a.debug(` target dir: '${n}'`),m.existsSync(n))return a.info(`Platforma Backend binaries unpack skipped: '${n}' exists`),n;if(!m.existsSync(s)){const i=`Platforma Backend binary archive not found at '${s}'`;throw a.error(i),new Error(i)}return m.existsSync(n)||(a.debug(` creating target dir '${n}'`),m.mkdirSync(n,{recursive:!0})),a.info(`Unpacking Platforma Backend archive: