all.js 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. // Generated by IcedCoffeeScript 1.7.1-c
  2. (function() {
  3. var ArgumentParser, Base, Config, E, Main, PackageJson, SubParserWrapper, add_option_dict, check_node_async, colors, colors_base, db, env, gpgw, iced, init_env, ispawn, keyring, log, make_esc, platform_info, proxyca, req, run, session, tor, version_info, __iced_k, __iced_k_noop, _ref, _ref1,
  4. __slice = [].slice;
  5. iced = require('iced-runtime').iced;
  6. __iced_k = __iced_k_noop = function() {};
  7. Base = require('./base').Base;
  8. log = require('../log');
  9. ArgumentParser = require('argparse').ArgumentParser;
  10. add_option_dict = require('./argparse').add_option_dict;
  11. PackageJson = require('../package').PackageJson;
  12. E = require('../err').E;
  13. make_esc = require('iced-error').make_esc;
  14. _ref = require('../env'), env = _ref.env, init_env = _ref.init_env;
  15. Config = require('../config').Config;
  16. req = require('../req');
  17. session = require('../session');
  18. db = require('../db');
  19. gpgw = require('gpg-wrapper');
  20. keyring = require('../keyring');
  21. _ref1 = require('../version'), platform_info = _ref1.platform_info, version_info = _ref1.version_info;
  22. proxyca = require('../proxyca');
  23. tor = require('../tor');
  24. colors = require('../colors');
  25. check_node_async = require('badnode').check_node_async;
  26. ispawn = require('iced-spawn');
  27. colors_base = require('colors');
  28. exports.SubParserWrapper = SubParserWrapper = (function() {
  29. function SubParserWrapper(subparsers) {
  30. this.subparsers = subparsers;
  31. this._lookup = {};
  32. }
  33. SubParserWrapper.prototype.addParser = function() {
  34. var args, sub, _ref2;
  35. args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
  36. return this._last_sub = sub = (_ref2 = this.subparsers).addParser.apply(_ref2, args);
  37. };
  38. SubParserWrapper.prototype.add_lookup = function(names) {
  39. var n, _i, _len;
  40. for (_i = 0, _len = names.length; _i < _len; _i++) {
  41. n = names[_i];
  42. this._lookup[n] = this._last_sub;
  43. }
  44. return this._last_sub = null;
  45. };
  46. SubParserWrapper.prototype.lookup = function(n) {
  47. return this._lookup[n];
  48. };
  49. return SubParserWrapper;
  50. })();
  51. Main = (function() {
  52. function Main() {
  53. this.commands = {};
  54. this.pkjson = new PackageJson();
  55. }
  56. Main.prototype.arg_parse_init = function() {
  57. var err;
  58. err = null;
  59. this.ap = new ArgumentParser({
  60. addHelp: true,
  61. version: this.pkjson.version(),
  62. description: 'keybase.io command line client',
  63. prog: this.pkjson.bin()
  64. });
  65. if (!this.add_subcommands()) {
  66. err = new E.InitError("cannot initialize subcommands");
  67. }
  68. return err;
  69. };
  70. Main.prototype.lookup_parser = function(n) {
  71. return this._spw.lookup(n);
  72. };
  73. Main.prototype.add_subcommands = function() {
  74. var list, m, mod, n, names, obj, subparsers, _i, _j, _len, _len1;
  75. add_option_dict(this.ap, Base.OPTS);
  76. list = ["btc", "cert", "dir", "config", "decrypt", "encrypt", "help", "id", "join", "keygen", "list_signatures", "list_tracking", "login", "logout", "pull", "push", "prove", "reset", "revoke", "revoke_sig", "search", "sign", "status", "switch", "track", "untrack", "update", "verify", "version"];
  77. subparsers = this.ap.addSubparsers({
  78. title: 'subcommands',
  79. dest: 'subcommand_name'
  80. });
  81. this._spw = new SubParserWrapper(subparsers);
  82. this.commands = {};
  83. for (_i = 0, _len = list.length; _i < _len; _i++) {
  84. m = list[_i];
  85. mod = require("./" + m);
  86. obj = new mod.Command(this);
  87. names = obj.add_subcommand_parser(this._spw);
  88. this._spw.add_lookup(names);
  89. for (_j = 0, _len1 = names.length; _j < _len1; _j++) {
  90. n = names[_j];
  91. this.commands[n] = obj;
  92. }
  93. }
  94. return true;
  95. };
  96. Main.prototype.parse_args = function(cb) {
  97. var err;
  98. this.cmd = null;
  99. err = this.arg_parse_init();
  100. if (err == null) {
  101. this.argv = this.ap.parseArgs(process.argv.slice(2));
  102. this.cmd = this.commands[this.argv.subcommand_name];
  103. if (this.cmd == null) {
  104. log.error("Subcommand not found: " + argv.subcommand_name);
  105. err = new E.ArgsError("" + argv.subcommand_name + " not found");
  106. } else {
  107. err = this.cmd.set_argv(this.argv);
  108. }
  109. }
  110. return cb(err);
  111. };
  112. Main.prototype.load_config = function(cb) {
  113. var esc, res, ___iced_passed_deferral, __iced_deferrals, __iced_k;
  114. __iced_k = __iced_k_noop;
  115. ___iced_passed_deferral = iced.findDeferral(arguments);
  116. esc = make_esc(cb, "load_config");
  117. (function(_this) {
  118. return (function(__iced_k) {
  119. if (_this.cmd.use_config()) {
  120. (function(__iced_k) {
  121. __iced_deferrals = new iced.Deferrals(__iced_k, {
  122. parent: ___iced_passed_deferral,
  123. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  124. funcname: "Main.load_config"
  125. });
  126. env().maybe_fallback_to_layout_v1(esc(__iced_deferrals.defer({
  127. assign_fn: (function() {
  128. return function() {
  129. return res = arguments[0];
  130. };
  131. })(),
  132. lineno: 149
  133. })));
  134. __iced_deferrals._fulfill();
  135. })(function() {
  136. if (res) {
  137. log.debug("| Fallback to layout_v1");
  138. }
  139. _this.config = new Config(env().get_config_filename(), _this.cmd.config_opts());
  140. (function(__iced_k) {
  141. __iced_deferrals = new iced.Deferrals(__iced_k, {
  142. parent: ___iced_passed_deferral,
  143. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  144. funcname: "Main.load_config"
  145. });
  146. _this.config.open(esc(__iced_deferrals.defer({
  147. lineno: 153
  148. })));
  149. __iced_deferrals._fulfill();
  150. })(__iced_k);
  151. });
  152. } else {
  153. return __iced_k();
  154. }
  155. });
  156. })(this)((function(_this) {
  157. return function() {
  158. return cb(null);
  159. };
  160. })(this));
  161. };
  162. Main.prototype.load_session = function(cb) {
  163. var err, ___iced_passed_deferral, __iced_deferrals, __iced_k;
  164. __iced_k = __iced_k_noop;
  165. ___iced_passed_deferral = iced.findDeferral(arguments);
  166. err = null;
  167. (function(_this) {
  168. return (function(__iced_k) {
  169. if (_this.cmd.use_session()) {
  170. (function(__iced_k) {
  171. __iced_deferrals = new iced.Deferrals(__iced_k, {
  172. parent: ___iced_passed_deferral,
  173. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  174. funcname: "Main.load_session"
  175. });
  176. session.load(__iced_deferrals.defer({
  177. assign_fn: (function() {
  178. return function() {
  179. return err = arguments[0];
  180. };
  181. })(),
  182. lineno: 161
  183. }));
  184. __iced_deferrals._fulfill();
  185. })(__iced_k);
  186. } else {
  187. return __iced_k();
  188. }
  189. });
  190. })(this)((function(_this) {
  191. return function() {
  192. return cb(err);
  193. };
  194. })(this));
  195. };
  196. Main.prototype.main = function() {
  197. var err, msg, rc, ___iced_passed_deferral, __iced_deferrals, __iced_k;
  198. __iced_k = __iced_k_noop;
  199. ___iced_passed_deferral = iced.findDeferral(arguments);
  200. (function(_this) {
  201. return (function(__iced_k) {
  202. __iced_deferrals = new iced.Deferrals(__iced_k, {
  203. parent: ___iced_passed_deferral,
  204. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  205. funcname: "Main.main"
  206. });
  207. _this.run(__iced_deferrals.defer({
  208. assign_fn: (function() {
  209. return function() {
  210. err = arguments[0];
  211. return rc = arguments[1];
  212. };
  213. })(),
  214. lineno: 167
  215. }));
  216. __iced_deferrals._fulfill();
  217. });
  218. })(this)((function(_this) {
  219. return function() {
  220. if (typeof rc === "undefined" || rc === null) {
  221. rc = 0;
  222. }
  223. if (typeof err !== "undefined" && err !== null) {
  224. msg = err instanceof gpgw.E.GpgError ? "`gpg` exited with code " + err.rc : err.message;
  225. }
  226. return process.exit(typeof err !== "undefined" && err !== null ? -2 : rc);
  227. };
  228. })(this));
  229. };
  230. Main.prototype.end_of_life = function(cb) {
  231. var bold, msg, red;
  232. bold = colors_base.bold, red = colors_base.red;
  233. msg = function(m) {
  234. return console.error(bold(red(m)));
  235. };
  236. msg("The Keybase Node.js client is no longer supported.");
  237. msg("Please upgrade to our new and improved client via:");
  238. msg("");
  239. msg(" https://keybase.io/download");
  240. msg("");
  241. msg("To uninstall this now-deprecated client:");
  242. msg("");
  243. msg(" npm uninstall -g keybase-installer");
  244. msg(" npm uninstall -g keybase");
  245. msg("");
  246. msg("Thank you!");
  247. return cb(new Error("end of the line"));
  248. };
  249. Main.prototype.run = function(cb) {
  250. var esc, rc, ___iced_passed_deferral, __iced_deferrals, __iced_k;
  251. __iced_k = __iced_k_noop;
  252. ___iced_passed_deferral = iced.findDeferral(arguments);
  253. esc = make_esc(cb, "run");
  254. (function(_this) {
  255. return (function(__iced_k) {
  256. __iced_deferrals = new iced.Deferrals(__iced_k, {
  257. parent: ___iced_passed_deferral,
  258. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  259. funcname: "Main.run"
  260. });
  261. _this.end_of_life(esc(__iced_deferrals.defer({
  262. lineno: 199
  263. })));
  264. __iced_deferrals._fulfill();
  265. });
  266. })(this)((function(_this) {
  267. return function() {
  268. (function(__iced_k) {
  269. __iced_deferrals = new iced.Deferrals(__iced_k, {
  270. parent: ___iced_passed_deferral,
  271. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  272. funcname: "Main.run"
  273. });
  274. _this.setup(esc(__iced_deferrals.defer({
  275. lineno: 200
  276. })));
  277. __iced_deferrals._fulfill();
  278. })(function() {
  279. (function(__iced_k) {
  280. __iced_deferrals = new iced.Deferrals(__iced_k, {
  281. parent: ___iced_passed_deferral,
  282. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  283. funcname: "Main.run"
  284. });
  285. _this.cmd.run(esc(__iced_deferrals.defer({
  286. assign_fn: (function() {
  287. return function() {
  288. return rc = arguments[0];
  289. };
  290. })(),
  291. lineno: 201
  292. })));
  293. __iced_deferrals._fulfill();
  294. })(function() {
  295. return cb(null, rc);
  296. });
  297. });
  298. };
  299. })(this));
  300. };
  301. Main.prototype.config_logger = function() {
  302. var p;
  303. p = log["package"]();
  304. if (this.argv.debug) {
  305. p.env().set_level(p.DEBUG);
  306. } else if (this.argv.quiet) {
  307. p.env().set_level(p.ERROR);
  308. }
  309. if (env().get_no_color()) {
  310. p.env().set_use_color(false);
  311. }
  312. return gpgw.set_log(log.warn);
  313. };
  314. Main.prototype.init_keyring = function() {
  315. return keyring.init();
  316. };
  317. Main.prototype.load_db = function(cb) {
  318. var err, ___iced_passed_deferral, __iced_deferrals, __iced_k;
  319. __iced_k = __iced_k_noop;
  320. ___iced_passed_deferral = iced.findDeferral(arguments);
  321. err = null;
  322. (function(_this) {
  323. return (function(__iced_k) {
  324. if (_this.cmd.use_db()) {
  325. (function(__iced_k) {
  326. __iced_deferrals = new iced.Deferrals(__iced_k, {
  327. parent: ___iced_passed_deferral,
  328. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  329. funcname: "Main.load_db"
  330. });
  331. db.open(__iced_deferrals.defer({
  332. assign_fn: (function() {
  333. return function() {
  334. return err = arguments[0];
  335. };
  336. })(),
  337. lineno: 226
  338. }));
  339. __iced_deferrals._fulfill();
  340. })(__iced_k);
  341. } else {
  342. return __iced_k();
  343. }
  344. });
  345. })(this)((function(_this) {
  346. return function() {
  347. return cb(err);
  348. };
  349. })(this));
  350. };
  351. Main.prototype.cleanup_previous_crash = function(cb) {
  352. var err;
  353. err = null;
  354. return cb(err);
  355. };
  356. Main.prototype.startup_message = function(cb) {
  357. var err, info, p, ___iced_passed_deferral, __iced_deferrals, __iced_k;
  358. __iced_k = __iced_k_noop;
  359. ___iced_passed_deferral = iced.findDeferral(arguments);
  360. p = log["package"]();
  361. log.debug("+ startup message");
  362. (function(_this) {
  363. return (function(__iced_k) {
  364. if (p.env().get_level() === p.DEBUG) {
  365. log.debug("| CLI version: " + ((new PackageJson).version()));
  366. log.debug("| Platform info: " + (JSON.stringify(platform_info())));
  367. (function(__iced_k) {
  368. __iced_deferrals = new iced.Deferrals(__iced_k, {
  369. parent: ___iced_passed_deferral,
  370. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  371. funcname: "Main.startup_message"
  372. });
  373. version_info(_this._gpg_version, __iced_deferrals.defer({
  374. assign_fn: (function() {
  375. return function() {
  376. err = arguments[0];
  377. return info = arguments[1];
  378. };
  379. })(),
  380. lineno: 243
  381. }));
  382. __iced_deferrals._fulfill();
  383. })(function() {
  384. return __iced_k(typeof err !== "undefined" && err !== null ? log.error("Error fetching version info: " + err.message) : log.debug("| Version info: " + (JSON.stringify(info))));
  385. });
  386. } else {
  387. return __iced_k();
  388. }
  389. });
  390. })(this)((function(_this) {
  391. return function() {
  392. log.debug("- startup message");
  393. return cb(null);
  394. };
  395. })(this));
  396. };
  397. Main.prototype.init_gpg = function(cb) {
  398. var c, cmd, e2, err, tty, ___iced_passed_deferral, __iced_deferrals, __iced_k;
  399. __iced_k = __iced_k_noop;
  400. ___iced_passed_deferral = iced.findDeferral(arguments);
  401. err = null;
  402. (function(_this) {
  403. return (function(__iced_k) {
  404. if (_this.cmd.use_gpg()) {
  405. c = env().get_gpg_cmd();
  406. log.debug("+ testing GPG command-line client " + (c != null ? c : '<default: gpg2 or gpg>'));
  407. (function(__iced_k) {
  408. __iced_deferrals = new iced.Deferrals(__iced_k, {
  409. parent: ___iced_passed_deferral,
  410. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  411. funcname: "Main.init_gpg"
  412. });
  413. gpgw.find_and_set_cmd(c, __iced_deferrals.defer({
  414. assign_fn: (function(__slot_1) {
  415. return function() {
  416. err = arguments[0];
  417. __slot_1._gpg_version = arguments[1];
  418. return cmd = arguments[2];
  419. };
  420. })(_this),
  421. lineno: 258
  422. }));
  423. __iced_deferrals._fulfill();
  424. })(function() {
  425. if (err != null) {
  426. err = new E.GpgError(err.message);
  427. } else if (c != null) {
  428. log.debug("| Using the supplied GPG cmd: '" + c + "'");
  429. } else if ((c == null) && cmd) {
  430. log.debug("| using GPG command: " + cmd);
  431. env().set_gpg_cmd(cmd);
  432. }
  433. log.debug("- tested GPG command-line client -> " + err);
  434. (function(__iced_k) {
  435. if (err == null) {
  436. (function(__iced_k) {
  437. __iced_deferrals = new iced.Deferrals(__iced_k, {
  438. parent: ___iced_passed_deferral,
  439. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  440. funcname: "Main.init_gpg"
  441. });
  442. gpgw.pinentry_init(__iced_deferrals.defer({
  443. assign_fn: (function() {
  444. return function() {
  445. e2 = arguments[0];
  446. return tty = arguments[1];
  447. };
  448. })(),
  449. lineno: 268
  450. }));
  451. __iced_deferrals._fulfill();
  452. })(function() {
  453. return __iced_k(typeof e2 !== "undefined" && e2 !== null ? log.debug("Warning on pinentry init: " + (e2.toString())) : typeof tty !== "undefined" && tty !== null ? log.debug("Setting GPG_TTY=" + tty) : log.debug("No tty to set"));
  454. });
  455. } else {
  456. return __iced_k();
  457. }
  458. })(__iced_k);
  459. });
  460. } else {
  461. return __iced_k();
  462. }
  463. });
  464. })(this)((function(_this) {
  465. return function() {
  466. return cb(err);
  467. };
  468. })(this));
  469. };
  470. Main.prototype.init_tor = function(cb) {
  471. var err, px;
  472. err = null;
  473. if (tor.enabled()) {
  474. px = tor.proxy();
  475. if (this.cmd.needs_cookies() && tor.strict()) {
  476. err = new E.TorStrictError("Cannot run this command in strict Tor mode");
  477. } else {
  478. log.warn("In Tor mode: strict=" + (colors.bold(JSON.stringify(!!tor.strict()))) + "; proxy=" + px.hostname + ":" + px.port);
  479. log.warn("Tor support is in " + (colors.bold('alpha')) + "; please be careful and report any issues");
  480. }
  481. }
  482. return cb(err);
  483. };
  484. Main.prototype.init_proxy_cas = function(cb) {
  485. var err, ___iced_passed_deferral, __iced_deferrals, __iced_k;
  486. __iced_k = __iced_k_noop;
  487. ___iced_passed_deferral = iced.findDeferral(arguments);
  488. (function(_this) {
  489. return (function(__iced_k) {
  490. __iced_deferrals = new iced.Deferrals(__iced_k, {
  491. parent: ___iced_passed_deferral,
  492. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  493. funcname: "Main.init_proxy_cas"
  494. });
  495. proxyca.init(__iced_deferrals.defer({
  496. assign_fn: (function() {
  497. return function() {
  498. return err = arguments[0];
  499. };
  500. })(),
  501. lineno: 293
  502. }));
  503. __iced_deferrals._fulfill();
  504. });
  505. })(this)((function(_this) {
  506. return function() {
  507. return cb(err);
  508. };
  509. })(this));
  510. };
  511. Main.prototype.setup = function(cb) {
  512. var esc, ___iced_passed_deferral, __iced_deferrals, __iced_k;
  513. __iced_k = __iced_k_noop;
  514. ___iced_passed_deferral = iced.findDeferral(arguments);
  515. esc = make_esc(cb, "setup");
  516. (function(_this) {
  517. return (function(__iced_k) {
  518. __iced_deferrals = new iced.Deferrals(__iced_k, {
  519. parent: ___iced_passed_deferral,
  520. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  521. funcname: "Main.setup"
  522. });
  523. check_node_async(null, esc(__iced_deferrals.defer({
  524. lineno: 302
  525. })));
  526. __iced_deferrals._fulfill();
  527. });
  528. })(this)((function(_this) {
  529. return function() {
  530. init_env();
  531. (function(__iced_k) {
  532. __iced_deferrals = new iced.Deferrals(__iced_k, {
  533. parent: ___iced_passed_deferral,
  534. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  535. funcname: "Main.setup"
  536. });
  537. _this.parse_args(esc(__iced_deferrals.defer({
  538. lineno: 305
  539. })));
  540. __iced_deferrals._fulfill();
  541. })(function() {
  542. env().set_argv(_this.argv);
  543. _this.config_logger();
  544. (function(__iced_k) {
  545. __iced_deferrals = new iced.Deferrals(__iced_k, {
  546. parent: ___iced_passed_deferral,
  547. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  548. funcname: "Main.setup"
  549. });
  550. _this.load_config(esc(__iced_deferrals.defer({
  551. lineno: 308
  552. })));
  553. __iced_deferrals._fulfill();
  554. })(function() {
  555. env().set_config(_this.config);
  556. (function(__iced_k) {
  557. __iced_deferrals = new iced.Deferrals(__iced_k, {
  558. parent: ___iced_passed_deferral,
  559. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  560. funcname: "Main.setup"
  561. });
  562. _this.init_tor(esc(__iced_deferrals.defer({
  563. lineno: 310
  564. })));
  565. __iced_deferrals._fulfill();
  566. })(function() {
  567. (function(__iced_k) {
  568. __iced_deferrals = new iced.Deferrals(__iced_k, {
  569. parent: ___iced_passed_deferral,
  570. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  571. funcname: "Main.setup"
  572. });
  573. _this.init_gpg(esc(__iced_deferrals.defer({
  574. lineno: 311
  575. })));
  576. __iced_deferrals._fulfill();
  577. })(function() {
  578. _this.init_keyring();
  579. (function(__iced_k) {
  580. __iced_deferrals = new iced.Deferrals(__iced_k, {
  581. parent: ___iced_passed_deferral,
  582. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  583. funcname: "Main.setup"
  584. });
  585. _this.init_proxy_cas(esc(__iced_deferrals.defer({
  586. lineno: 313
  587. })));
  588. __iced_deferrals._fulfill();
  589. })(function() {
  590. (function(__iced_k) {
  591. __iced_deferrals = new iced.Deferrals(__iced_k, {
  592. parent: ___iced_passed_deferral,
  593. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  594. funcname: "Main.setup"
  595. });
  596. _this.startup_message(esc(__iced_deferrals.defer({
  597. lineno: 315
  598. })));
  599. __iced_deferrals._fulfill();
  600. })(function() {
  601. (function(__iced_k) {
  602. __iced_deferrals = new iced.Deferrals(__iced_k, {
  603. parent: ___iced_passed_deferral,
  604. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  605. funcname: "Main.setup"
  606. });
  607. _this.load_db(esc(__iced_deferrals.defer({
  608. lineno: 316
  609. })));
  610. __iced_deferrals._fulfill();
  611. })(function() {
  612. (function(__iced_k) {
  613. __iced_deferrals = new iced.Deferrals(__iced_k, {
  614. parent: ___iced_passed_deferral,
  615. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  616. funcname: "Main.setup"
  617. });
  618. _this.cleanup_previous_crash(esc(__iced_deferrals.defer({
  619. lineno: 317
  620. })));
  621. __iced_deferrals._fulfill();
  622. })(function() {
  623. (function(__iced_k) {
  624. __iced_deferrals = new iced.Deferrals(__iced_k, {
  625. parent: ___iced_passed_deferral,
  626. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  627. funcname: "Main.setup"
  628. });
  629. _this.load_session(esc(__iced_deferrals.defer({
  630. lineno: 318
  631. })));
  632. __iced_deferrals._fulfill();
  633. })(function() {
  634. (function(__iced_k) {
  635. __iced_deferrals = new iced.Deferrals(__iced_k, {
  636. parent: ___iced_passed_deferral,
  637. filename: "/Users/max/src/keybase/node-client/src/command/all.iced",
  638. funcname: "Main.setup"
  639. });
  640. _this.cmd.assertions(esc(__iced_deferrals.defer({
  641. lineno: 319
  642. })));
  643. __iced_deferrals._fulfill();
  644. })(function() {
  645. env().set_session(_this.session);
  646. return cb(null);
  647. });
  648. });
  649. });
  650. });
  651. });
  652. });
  653. });
  654. });
  655. });
  656. });
  657. };
  658. })(this));
  659. };
  660. return Main;
  661. })();
  662. exports.run = run = function() {
  663. return (new Main).main();
  664. };
  665. }).call(this);