UNPKG

appsync-testing

Version:

![GitHub Actions Build (main)](https://img.shields.io/github/workflow/status/WealthWizardsEngineering/appsync-testing/Pipeline/main?logo=github) ![npm](https://img.shields.io/npm/v/appsync-testing?color=red&logo=npm)

43 lines (33 loc) 1.29 kB
'use strict'; var followRedirects = require('follow-redirects'); var fs = require('fs'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs); var version = "0.2.16"; var types = { darwin: 'macos-11', linux: 'ubuntu-18.04' }; async function postinstall() { var bridge = fs__default["default"].createWriteStream("dist/bridge"); var platform = process.platform; var type = types[platform]; if (type === undefined) { console.error("Sorry, appsync-testing does not currently support the ".concat(platform, ", please raise a GitHub issue \uD83D\uDE4F")); process.exit(1); } var url = "https://github.com/WealthWizardsEngineering/appsync-testing/releases/download/v".concat(version, "/").concat(type, "-bridge"); await new Promise(function (resolve, reject) { followRedirects.https.get(url, function (res) { res.pipe(bridge); bridge.on('finish', resolve); bridge.on('error', function (error) { reject(error.message); fs__default["default"].unlinkSync('dist/bridge'); }); }); }); fs__default["default"].chmodSync('dist/bridge', '755'); } postinstall(); //# sourceMappingURL=postinstall.js.map