version.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Generated by IcedCoffeeScript 1.7.1-c
  2. (function() {
  3. var ArgumentParser, Base, Command, add_option_dict, iced, log, version_info, __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. ArgumentParser = require('argparse').ArgumentParser;
  11. add_option_dict = require('./argparse').add_option_dict;
  12. version_info = require('../version').version_info;
  13. exports.Command = Command = (function(_super) {
  14. __extends(Command, _super);
  15. function Command() {
  16. return Command.__super__.constructor.apply(this, arguments);
  17. }
  18. Command.prototype.add_subcommand_parser = function(scp) {
  19. var name, opts, sub;
  20. opts = {
  21. aliases: ["vers"],
  22. help: "output version information about this client"
  23. };
  24. name = "version";
  25. sub = scp.addParser(name, opts);
  26. return opts.aliases.concat([name]);
  27. };
  28. Command.prototype.run = function(cb) {
  29. var err, lines, ___iced_passed_deferral, __iced_deferrals, __iced_k;
  30. __iced_k = __iced_k_noop;
  31. ___iced_passed_deferral = iced.findDeferral(arguments);
  32. (function(_this) {
  33. return (function(__iced_k) {
  34. __iced_deferrals = new iced.Deferrals(__iced_k, {
  35. parent: ___iced_passed_deferral,
  36. filename: "/Users/max/src/keybase/node-client/src/command/version.iced",
  37. funcname: "Command.run"
  38. });
  39. version_info(null, __iced_deferrals.defer({
  40. assign_fn: (function() {
  41. return function() {
  42. err = arguments[0];
  43. return lines = arguments[1];
  44. };
  45. })(),
  46. lineno: 23
  47. }));
  48. __iced_deferrals._fulfill();
  49. });
  50. })(this)((function(_this) {
  51. return function() {
  52. if ((typeof err === "undefined" || err === null) && (typeof lines !== "undefined" && lines !== null)) {
  53. console.log(lines.join("\n"));
  54. }
  55. return cb(err);
  56. };
  57. })(this));
  58. };
  59. return Command;
  60. })(Base);
  61. }).call(this);