id.js 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // Generated by IcedCoffeeScript 1.7.1-c
  2. (function() {
  3. var Base, Command, E, TrackSubSubCommand, add_option_dict, iced, log, __iced_k, __iced_k_noop,
  4. __hasProp = {}.hasOwnProperty,
  5. __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
  6. iced = require('iced-runtime').iced;
  7. __iced_k = __iced_k_noop = function() {};
  8. Base = require('./base').Base;
  9. log = require('../log');
  10. add_option_dict = require('./argparse').add_option_dict;
  11. E = require('../err').E;
  12. TrackSubSubCommand = require('../tracksubsub').TrackSubSubCommand;
  13. exports.Command = Command = (function(_super) {
  14. __extends(Command, _super);
  15. Command.prototype.OPTS = {
  16. a: {
  17. alias: "assert",
  18. help: "provide a key assertion"
  19. }
  20. };
  21. function Command(_arg) {
  22. this.args = _arg.args, this.opts = _arg.opts, this.tmp_keyring = _arg.tmp_keyring, this.batch = _arg.batch, this.track_local = _arg.track_local, this.ran_keypull = _arg.ran_keypull;
  23. this.opts || (this.opts = {});
  24. this.qring = null;
  25. }
  26. Command.prototype.is_batch = function() {
  27. return this.opts.batch || this.batch;
  28. };
  29. Command.prototype.add_subcommand_parser = function(scp) {
  30. var name, opts, sub;
  31. opts = {
  32. aliases: ["identify"],
  33. help: "Identify a user, but don't accept or reject trust"
  34. };
  35. name = "id";
  36. sub = scp.addParser(name, opts);
  37. add_option_dict(sub, this.OPTS);
  38. sub.addArgument(["them"], {
  39. nargs: 1,
  40. help: "the username to id"
  41. });
  42. return opts.aliases.concat([name]);
  43. };
  44. Command.prototype.run = function(cb) {
  45. var err, tssc, ___iced_passed_deferral, __iced_deferrals, __iced_k;
  46. __iced_k = __iced_k_noop;
  47. ___iced_passed_deferral = iced.findDeferral(arguments);
  48. tssc = new TrackSubSubCommand({
  49. args: {
  50. them: this.argv.them[0]
  51. },
  52. opts: this.argv
  53. });
  54. (function(_this) {
  55. return (function(__iced_k) {
  56. __iced_deferrals = new iced.Deferrals(__iced_k, {
  57. parent: ___iced_passed_deferral,
  58. filename: "/home/max/src/keybase/node-client/src/command/id.iced",
  59. funcname: "Command.run"
  60. });
  61. tssc.id(__iced_deferrals.defer({
  62. assign_fn: (function() {
  63. return function() {
  64. return err = arguments[0];
  65. };
  66. })(),
  67. lineno: 43
  68. }));
  69. __iced_deferrals._fulfill();
  70. });
  71. })(this)((function(_this) {
  72. return function() {
  73. return cb(err);
  74. };
  75. })(this));
  76. };
  77. return Command;
  78. })(Base);
  79. }).call(this);