rust-cli.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory();
  4. else if(typeof define === 'function' && define.amd)
  5. define([], factory);
  6. else if(typeof exports === 'object')
  7. exports["tauri"] = factory();
  8. else
  9. root["tauri"] = factory();
  10. })(this, function() {
  11. return /******/ (() => { // webpackBootstrap
  12. /******/ var __webpack_modules__ = ({
  13. /***/ "../cli.rs/Cargo.toml":
  14. /*!****************************!*\
  15. !*** ../cli.rs/Cargo.toml ***!
  16. \****************************/
  17. /***/ ((module) => {
  18. module.exports = {
  19. "workspace": {},
  20. "package": {
  21. "name": "tauri-cli",
  22. "version": "1.0.0-beta.5",
  23. "authors": [
  24. "Tauri Programme within The Commons Conservancy"
  25. ],
  26. "edition": "2018",
  27. "categories": [
  28. "gui",
  29. "web-programming"
  30. ],
  31. "license": "Apache-2.0 OR MIT",
  32. "homepage": "https://tauri.studio",
  33. "repository": "https://github.com/tauri-apps/tauri",
  34. "description": "Command line interface for building Tauri apps",
  35. "include": [
  36. "src/",
  37. "/templates",
  38. "MergeModules/",
  39. "*.json",
  40. "*.rs"
  41. ]
  42. },
  43. "bin": [
  44. {
  45. "name": "cargo-tauri",
  46. "path": "src/main.rs"
  47. }
  48. ],
  49. "dependencies": {
  50. "clap": {
  51. "version": "3.0.0-beta.2",
  52. "features": [
  53. "yaml"
  54. ]
  55. },
  56. "anyhow": "1.0",
  57. "tauri-bundler": {
  58. "version": "1.0.0-beta.3",
  59. "path": "../bundler"
  60. },
  61. "colored": "2.0",
  62. "once_cell": "1.8",
  63. "serde": {
  64. "version": "1.0",
  65. "features": [
  66. "derive"
  67. ]
  68. },
  69. "serde_json": "1.0",
  70. "serde_with": "1.9",
  71. "notify": "4.0",
  72. "shared_child": "0.3",
  73. "toml_edit": "0.2",
  74. "json-patch": "0.2",
  75. "schemars": "0.8",
  76. "toml": "0.5",
  77. "valico": "3.6",
  78. "handlebars": "4.1",
  79. "include_dir": "0.6",
  80. "minisign": "0.6",
  81. "base64": "0.13.0",
  82. "ureq": "2.1",
  83. "os_info": "3.0",
  84. "semver": "1.0",
  85. "regex": "1.5",
  86. "lazy_static": "1",
  87. "libc": "0.2",
  88. "terminal_size": "0.1",
  89. "unicode-width": "0.1",
  90. "tempfile": "3",
  91. "zeroize": "1.3"
  92. },
  93. "target": {
  94. "cfg(windows)": {
  95. "dependencies": {
  96. "winapi": {
  97. "version": "0.3",
  98. "features": [
  99. "winbase",
  100. "winuser",
  101. "consoleapi",
  102. "processenv",
  103. "wincon"
  104. ]
  105. },
  106. "encode_unicode": "0.3"
  107. }
  108. },
  109. "cfg(target_os = \"linux\")": {
  110. "dependencies": {
  111. "heck": "0.3"
  112. }
  113. }
  114. },
  115. "build-dependencies": {
  116. "schemars": "0.8",
  117. "serde": {
  118. "version": "1.0",
  119. "features": [
  120. "derive"
  121. ]
  122. },
  123. "serde_json": "1.0",
  124. "serde_with": "1.9"
  125. }
  126. }
  127. /***/ }),
  128. /***/ "./src/helpers/download-binary.ts":
  129. /*!****************************************!*\
  130. !*** ./src/helpers/download-binary.ts ***!
  131. \****************************************/
  132. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  133. "use strict";
  134. var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
  135. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  136. return new (P || (P = Promise))(function (resolve, reject) {
  137. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  138. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  139. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  140. step((generator = generator.apply(thisArg, _arguments || [])).next());
  141. });
  142. };
  143. var __generator = (this && this.__generator) || function (thisArg, body) {
  144. var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
  145. return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
  146. function verb(n) { return function (v) { return step([n, v]); }; }
  147. function step(op) {
  148. if (f) throw new TypeError("Generator is already executing.");
  149. while (_) try {
  150. if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
  151. if (y = 0, t) op = [op[0] & 2, t.value];
  152. switch (op[0]) {
  153. case 0: case 1: t = op; break;
  154. case 4: _.label++; return { value: op[1], done: false };
  155. case 5: _.label++; y = op[1]; op = [0]; continue;
  156. case 7: op = _.ops.pop(); _.trys.pop(); continue;
  157. default:
  158. if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
  159. if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
  160. if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
  161. if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
  162. if (t[2]) _.ops.pop();
  163. _.trys.pop(); continue;
  164. }
  165. op = body.call(thisArg, _);
  166. } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
  167. if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
  168. }
  169. };
  170. var __importDefault = (this && this.__importDefault) || function (mod) {
  171. return (mod && mod.__esModule) ? mod : { "default": mod };
  172. };
  173. Object.defineProperty(exports, "__esModule", ({ value: true }));
  174. exports.downloadRustup = exports.downloadCli = void 0;
  175. var stream_1 = __importDefault(__webpack_require__(/*! stream */ "stream"));
  176. var util_1 = __webpack_require__(/*! util */ "util");
  177. var fs_1 = __importDefault(__webpack_require__(/*! fs */ "fs"));
  178. var got_1 = __importDefault(__webpack_require__(/*! got */ "got"));
  179. var path_1 = __importDefault(__webpack_require__(/*! path */ "path"));
  180. var pipeline = util_1.promisify(stream_1.default.pipeline);
  181. // Webpack reads the file at build-time, so this becomes a static var
  182. // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires, @typescript-eslint/no-unsafe-member-access
  183. var tauriCliManifest = __webpack_require__(/*! ../../../cli.rs/Cargo.toml */ "../cli.rs/Cargo.toml");
  184. var downloads = {};
  185. function downloadBinaryRelease(tag, asset, outPath) {
  186. return __awaiter(this, void 0, void 0, function () {
  187. var url, removeDownloadedCliIfNeeded;
  188. return __generator(this, function (_a) {
  189. switch (_a.label) {
  190. case 0:
  191. url = "https://github.com/tauri-apps/binary-releases/releases/download/" + tag + "/" + asset;
  192. removeDownloadedCliIfNeeded = function () {
  193. try {
  194. if (!(url in downloads)) {
  195. // eslint-disable-next-line security/detect-non-literal-fs-filename
  196. fs_1.default.unlinkSync(outPath);
  197. }
  198. }
  199. finally {
  200. process.exit();
  201. }
  202. };
  203. // on exit, we remove the `tauri-cli` file if the download didn't complete
  204. process.on('exit', removeDownloadedCliIfNeeded);
  205. process.on('SIGINT', removeDownloadedCliIfNeeded);
  206. process.on('SIGTERM', removeDownloadedCliIfNeeded);
  207. process.on('SIGHUP', removeDownloadedCliIfNeeded);
  208. process.on('SIGBREAK', removeDownloadedCliIfNeeded);
  209. // TODO: Check hash of download
  210. // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, security/detect-non-literal-fs-filename
  211. return [4 /*yield*/, pipeline(got_1.default.stream(url), fs_1.default.createWriteStream(outPath)).catch(function (e) {
  212. try {
  213. // eslint-disable-next-line security/detect-non-literal-fs-filename
  214. fs_1.default.unlinkSync(outPath);
  215. }
  216. catch (_a) { }
  217. throw e;
  218. })
  219. // eslint-disable-next-line security/detect-object-injection
  220. ];
  221. case 1:
  222. // TODO: Check hash of download
  223. // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, security/detect-non-literal-fs-filename
  224. _a.sent();
  225. // eslint-disable-next-line security/detect-object-injection
  226. downloads[url] = true;
  227. // eslint-disable-next-line security/detect-non-literal-fs-filename
  228. fs_1.default.chmodSync(outPath, 448);
  229. console.log('Download Complete');
  230. return [2 /*return*/];
  231. }
  232. });
  233. });
  234. }
  235. function downloadCli() {
  236. return __awaiter(this, void 0, void 0, function () {
  237. var version, platform, extension, outPath;
  238. return __generator(this, function (_a) {
  239. switch (_a.label) {
  240. case 0:
  241. version = tauriCliManifest.package.version;
  242. platform = process.platform;
  243. if (platform === 'win32') {
  244. platform = 'windows';
  245. }
  246. else if (platform === 'linux') {
  247. platform = 'linux';
  248. }
  249. else if (platform === 'darwin') {
  250. platform = 'macos';
  251. }
  252. else {
  253. throw Error('Unsupported platform');
  254. }
  255. extension = platform === 'windows' ? '.exe' : '';
  256. outPath = path_1.default.join(__dirname, "../../bin/tauri-cli" + extension);
  257. console.log('Downloading Rust CLI...');
  258. return [4 /*yield*/, downloadBinaryRelease("tauri-cli-v" + version, "tauri-cli_" + platform + extension, outPath)];
  259. case 1:
  260. _a.sent();
  261. return [2 /*return*/];
  262. }
  263. });
  264. });
  265. }
  266. exports.downloadCli = downloadCli;
  267. function downloadRustup() {
  268. return __awaiter(this, void 0, void 0, function () {
  269. var assetName;
  270. return __generator(this, function (_a) {
  271. switch (_a.label) {
  272. case 0:
  273. assetName = process.platform === 'win32' ? 'rustup-init.exe' : 'rustup-init.sh';
  274. console.log('Downloading Rustup...');
  275. return [4 /*yield*/, downloadBinaryRelease('rustup', assetName, path_1.default.join(__dirname, "../../bin/" + assetName))];
  276. case 1: return [2 /*return*/, _a.sent()];
  277. }
  278. });
  279. });
  280. }
  281. exports.downloadRustup = downloadRustup;
  282. /***/ }),
  283. /***/ "./src/helpers/logger.ts":
  284. /*!*******************************!*\
  285. !*** ./src/helpers/logger.ts ***!
  286. \*******************************/
  287. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  288. "use strict";
  289. // Copyright 2019-2021 Tauri Programme within The Commons Conservancy
  290. // SPDX-License-Identifier: Apache-2.0
  291. // SPDX-License-Identifier: MIT
  292. var __importDefault = (this && this.__importDefault) || function (mod) {
  293. return (mod && mod.__esModule) ? mod : { "default": mod };
  294. };
  295. Object.defineProperty(exports, "__esModule", ({ value: true }));
  296. var chalk_1 = __importDefault(__webpack_require__(/*! chalk */ "chalk"));
  297. var ms_1 = __importDefault(__webpack_require__(/*! ms */ "ms"));
  298. var prevTime;
  299. exports.default = (function (banner, color) {
  300. if (color === void 0) { color = chalk_1.default.green; }
  301. return function (msg) {
  302. var curr = +new Date();
  303. var diff = curr - (prevTime || curr);
  304. prevTime = curr;
  305. if (msg) {
  306. console.log(
  307. // TODO: proper typings for color and banner
  308. // eslint-disable-next-line @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-call
  309. " " + color(String(banner)) + " " + msg + " " + chalk_1.default.green("+" + ms_1.default(diff)));
  310. }
  311. else {
  312. console.log();
  313. }
  314. };
  315. });
  316. /***/ }),
  317. /***/ "./src/helpers/rust-cli.ts":
  318. /*!*********************************!*\
  319. !*** ./src/helpers/rust-cli.ts ***!
  320. \*********************************/
  321. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  322. "use strict";
  323. // Copyright 2019-2021 Tauri Programme within The Commons Conservancy
  324. // SPDX-License-Identifier: Apache-2.0
  325. // SPDX-License-Identifier: MIT
  326. var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
  327. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  328. return new (P || (P = Promise))(function (resolve, reject) {
  329. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  330. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  331. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  332. step((generator = generator.apply(thisArg, _arguments || [])).next());
  333. });
  334. };
  335. var __generator = (this && this.__generator) || function (thisArg, body) {
  336. var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
  337. return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
  338. function verb(n) { return function (v) { return step([n, v]); }; }
  339. function step(op) {
  340. if (f) throw new TypeError("Generator is already executing.");
  341. while (_) try {
  342. if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
  343. if (y = 0, t) op = [op[0] & 2, t.value];
  344. switch (op[0]) {
  345. case 0: case 1: t = op; break;
  346. case 4: _.label++; return { value: op[1], done: false };
  347. case 5: _.label++; y = op[1]; op = [0]; continue;
  348. case 7: op = _.ops.pop(); _.trys.pop(); continue;
  349. default:
  350. if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
  351. if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
  352. if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
  353. if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
  354. if (t[2]) _.ops.pop();
  355. _.trys.pop(); continue;
  356. }
  357. op = body.call(thisArg, _);
  358. } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
  359. if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
  360. }
  361. };
  362. var __spreadArray = (this && this.__spreadArray) || function (to, from) {
  363. for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
  364. to[j] = from[i];
  365. return to;
  366. };
  367. Object.defineProperty(exports, "__esModule", ({ value: true }));
  368. exports.runOnRustCli = void 0;
  369. var fs_1 = __webpack_require__(/*! fs */ "fs");
  370. var path_1 = __webpack_require__(/*! path */ "path");
  371. var spawn_1 = __webpack_require__(/*! ./spawn */ "./src/helpers/spawn.ts");
  372. var download_binary_1 = __webpack_require__(/*! ./download-binary */ "./src/helpers/download-binary.ts");
  373. var currentTauriCliVersion = function () {
  374. // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
  375. var tauriCliManifest =
  376. // eslint-disable-next-line @typescript-eslint/no-var-requires
  377. __webpack_require__(/*! ../../../cli.rs/Cargo.toml */ "../cli.rs/Cargo.toml");
  378. return tauriCliManifest.package.version;
  379. };
  380. function runOnRustCli(command, args) {
  381. return __awaiter(this, void 0, void 0, function () {
  382. var targetPath, targetCliPath, resolveCb, rejectCb, pid, promise, onClose, cliPath, localCliPath;
  383. return __generator(this, function (_a) {
  384. switch (_a.label) {
  385. case 0:
  386. targetPath = path_1.resolve(__dirname, '../..');
  387. targetCliPath = path_1.join(targetPath, 'bin/tauri-cli' + (process.platform === 'win32' ? '.exe' : ''));
  388. promise = new Promise(function (resolve, reject) {
  389. resolveCb = resolve;
  390. rejectCb = function () { return reject(new Error()); };
  391. });
  392. onClose = function (code, pid) {
  393. if (code === 0) {
  394. resolveCb();
  395. }
  396. else {
  397. rejectCb();
  398. }
  399. };
  400. if (!fs_1.existsSync(targetCliPath)) return [3 /*break*/, 1];
  401. pid = spawn_1.spawn(targetCliPath, __spreadArray(['tauri', command], args), process.cwd(), onClose);
  402. return [3 /*break*/, 4];
  403. case 1:
  404. if (true) return [3 /*break*/, 3];
  405. return [4 /*yield*/, download_binary_1.downloadCli()];
  406. case 2:
  407. _a.sent();
  408. pid = spawn_1.spawn(targetCliPath, __spreadArray(['tauri', command], args), process.cwd(), onClose);
  409. return [3 /*break*/, 4];
  410. case 3:
  411. if (fs_1.existsSync(path_1.resolve(targetPath, '../bundler'))) {
  412. cliPath = path_1.resolve(targetPath, '../cli.rs');
  413. spawn_1.spawnSync('cargo', ['build', '--release'], cliPath);
  414. localCliPath = path_1.resolve(targetPath, '../cli.rs/target/release/cargo-tauri');
  415. pid = spawn_1.spawn(localCliPath, __spreadArray(['tauri', command], args), process.cwd(), onClose);
  416. }
  417. else {
  418. spawn_1.spawnSync('cargo', [
  419. 'install',
  420. '--root',
  421. targetPath,
  422. 'tauri-cli',
  423. '--version',
  424. currentTauriCliVersion()
  425. ], process.cwd());
  426. pid = spawn_1.spawn(targetCliPath, __spreadArray(['tauri', command], args), process.cwd(), onClose);
  427. }
  428. _a.label = 4;
  429. case 4: return [2 /*return*/, { pid: pid, promise: promise }];
  430. }
  431. });
  432. });
  433. }
  434. exports.runOnRustCli = runOnRustCli;
  435. /***/ }),
  436. /***/ "./src/helpers/spawn.ts":
  437. /*!******************************!*\
  438. !*** ./src/helpers/spawn.ts ***!
  439. \******************************/
  440. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  441. "use strict";
  442. // Copyright 2019-2021 Tauri Programme within The Commons Conservancy
  443. // SPDX-License-Identifier: Apache-2.0
  444. // SPDX-License-Identifier: MIT
  445. var __importDefault = (this && this.__importDefault) || function (mod) {
  446. return (mod && mod.__esModule) ? mod : { "default": mod };
  447. };
  448. Object.defineProperty(exports, "__esModule", ({ value: true }));
  449. exports.spawnSync = exports.spawn = void 0;
  450. var cross_spawn_1 = __importDefault(__webpack_require__(/*! cross-spawn */ "cross-spawn"));
  451. var logger_1 = __importDefault(__webpack_require__(/*! ./logger */ "./src/helpers/logger.ts"));
  452. var chalk_1 = __importDefault(__webpack_require__(/*! chalk */ "chalk"));
  453. var log = logger_1.default('app:spawn');
  454. var warn = logger_1.default('app:spawn', chalk_1.default.red);
  455. /*
  456. Returns pid, takes onClose
  457. */
  458. var spawn = function (cmd, params, cwd, onClose) {
  459. var _a;
  460. log("Running \"" + cmd + " " + params.join(' ') + "\"");
  461. log();
  462. // TODO: move to execa?
  463. var runner = cross_spawn_1.default(cmd, params, {
  464. stdio: 'inherit',
  465. cwd: cwd,
  466. env: process.env
  467. });
  468. runner.on('close', function (code) {
  469. var _a;
  470. log();
  471. if (code) {
  472. // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
  473. log("Command \"" + cmd + "\" failed with exit code: " + code);
  474. }
  475. // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
  476. onClose && onClose(code !== null && code !== void 0 ? code : 0, (_a = runner.pid) !== null && _a !== void 0 ? _a : 0);
  477. });
  478. return (_a = runner.pid) !== null && _a !== void 0 ? _a : 0;
  479. };
  480. exports.spawn = spawn;
  481. /*
  482. Returns nothing, takes onFail
  483. */
  484. var spawnSync = function (cmd, params, cwd, onFail) {
  485. log("[sync] Running \"" + cmd + " " + params.join(' ') + "\"");
  486. log();
  487. var runner = cross_spawn_1.default.sync(cmd, params, {
  488. stdio: 'inherit',
  489. cwd: cwd
  490. });
  491. // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
  492. if (runner.status || runner.error) {
  493. warn();
  494. // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
  495. warn("\u26A0\uFE0F Command \"" + cmd + "\" failed with exit code: " + runner.status);
  496. if (runner.status === null) {
  497. warn("\u26A0\uFE0F Please globally install \"" + cmd + "\"");
  498. }
  499. // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
  500. onFail && onFail();
  501. process.exit(1);
  502. }
  503. };
  504. exports.spawnSync = spawnSync;
  505. /***/ }),
  506. /***/ "chalk":
  507. /*!************************!*\
  508. !*** external "chalk" ***!
  509. \************************/
  510. /***/ ((module) => {
  511. "use strict";
  512. module.exports = require("chalk");;
  513. /***/ }),
  514. /***/ "cross-spawn":
  515. /*!******************************!*\
  516. !*** external "cross-spawn" ***!
  517. \******************************/
  518. /***/ ((module) => {
  519. "use strict";
  520. module.exports = require("cross-spawn");;
  521. /***/ }),
  522. /***/ "fs":
  523. /*!*********************!*\
  524. !*** external "fs" ***!
  525. \*********************/
  526. /***/ ((module) => {
  527. "use strict";
  528. module.exports = require("fs");;
  529. /***/ }),
  530. /***/ "got":
  531. /*!**********************!*\
  532. !*** external "got" ***!
  533. \**********************/
  534. /***/ ((module) => {
  535. "use strict";
  536. module.exports = require("got");;
  537. /***/ }),
  538. /***/ "ms":
  539. /*!*********************!*\
  540. !*** external "ms" ***!
  541. \*********************/
  542. /***/ ((module) => {
  543. "use strict";
  544. module.exports = require("ms");;
  545. /***/ }),
  546. /***/ "path":
  547. /*!***********************!*\
  548. !*** external "path" ***!
  549. \***********************/
  550. /***/ ((module) => {
  551. "use strict";
  552. module.exports = require("path");;
  553. /***/ }),
  554. /***/ "stream":
  555. /*!*************************!*\
  556. !*** external "stream" ***!
  557. \*************************/
  558. /***/ ((module) => {
  559. "use strict";
  560. module.exports = require("stream");;
  561. /***/ }),
  562. /***/ "util":
  563. /*!***********************!*\
  564. !*** external "util" ***!
  565. \***********************/
  566. /***/ ((module) => {
  567. "use strict";
  568. module.exports = require("util");;
  569. /***/ })
  570. /******/ });
  571. /************************************************************************/
  572. /******/ // The module cache
  573. /******/ var __webpack_module_cache__ = {};
  574. /******/
  575. /******/ // The require function
  576. /******/ function __webpack_require__(moduleId) {
  577. /******/ // Check if module is in cache
  578. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  579. /******/ if (cachedModule !== undefined) {
  580. /******/ return cachedModule.exports;
  581. /******/ }
  582. /******/ // Create a new module (and put it into the cache)
  583. /******/ var module = __webpack_module_cache__[moduleId] = {
  584. /******/ // no module.id needed
  585. /******/ // no module.loaded needed
  586. /******/ exports: {}
  587. /******/ };
  588. /******/
  589. /******/ // Execute the module function
  590. /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  591. /******/
  592. /******/ // Return the exports of the module
  593. /******/ return module.exports;
  594. /******/ }
  595. /******/
  596. /************************************************************************/
  597. /******/
  598. /******/ // startup
  599. /******/ // Load entry module and return exports
  600. /******/ // This entry module is referenced by other modules so it can't be inlined
  601. /******/ var __webpack_exports__ = __webpack_require__("./src/helpers/rust-cli.ts");
  602. /******/
  603. /******/ return __webpack_exports__;
  604. /******/ })()
  605. ;
  606. });
  607. //# sourceMappingURL=rust-cli.js.map