decrypt_and_verify.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. // Generated by IcedCoffeeScript 1.7.1-c
  2. (function() {
  3. var Base, Command, DecryptAndVerifyEngine, E, MyEngine, TrackSubSubCommand, chain, colors, dict_union, env, iced, log, make_esc, __iced_k, __iced_k_noop, _ref,
  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. E = require('../err').E;
  11. _ref = require('iced-error'), chain = _ref.chain, make_esc = _ref.make_esc;
  12. env = require('../env').env;
  13. dict_union = require('../util').dict_union;
  14. colors = require('../colors');
  15. DecryptAndVerifyEngine = require('../dve').DecryptAndVerifyEngine;
  16. TrackSubSubCommand = require('../tracksubsub').TrackSubSubCommand;
  17. MyEngine = (function(_super) {
  18. __extends(MyEngine, _super);
  19. function MyEngine(_arg) {
  20. var argv;
  21. argv = _arg.argv, this.cmd = _arg.cmd;
  22. MyEngine.__super__.constructor.call(this, {
  23. argv: argv
  24. });
  25. }
  26. MyEngine.prototype.do_output = function(out, cb) {
  27. return this.cmd.do_output(out, cb);
  28. };
  29. MyEngine.prototype.is_batch = function(out, cb) {
  30. return this.cmd.is_batch();
  31. };
  32. MyEngine.prototype.do_keypull = function(cb) {
  33. return this.cmd.do_keypull(cb);
  34. };
  35. MyEngine.prototype.patch_gpg_args = function(args) {
  36. return this.cmd.patch_gpg_args(args);
  37. };
  38. MyEngine.prototype.get_files = function(args) {
  39. return this.cmd.get_files(args);
  40. };
  41. return MyEngine;
  42. })(DecryptAndVerifyEngine);
  43. exports.Command = Command = (function(_super) {
  44. __extends(Command, _super);
  45. function Command() {
  46. return Command.__super__.constructor.apply(this, arguments);
  47. }
  48. Command.OPTS = dict_union(DecryptAndVerifyEngine.OPTS, {
  49. s: {
  50. alias: 'signed',
  51. action: 'storeTrue',
  52. help: "assert signed"
  53. },
  54. S: {
  55. alias: 'signed-by',
  56. help: "assert signed by the given user"
  57. },
  58. '6': {
  59. alias: "base64",
  60. action: "storeTrue",
  61. help: "output result as base64-encoded data"
  62. },
  63. m: {
  64. alias: "message",
  65. help: "provide the message on the command line"
  66. }
  67. });
  68. Command.prototype.run = function(cb) {
  69. var eng, err_dummy, esc, ___iced_passed_deferral, __iced_deferrals, __iced_k;
  70. __iced_k = __iced_k_noop;
  71. ___iced_passed_deferral = iced.findDeferral(arguments);
  72. esc = make_esc(cb, "Command::run");
  73. eng = new MyEngine({
  74. argv: this.argv,
  75. cmd: this
  76. });
  77. (function(_this) {
  78. return (function(__iced_k) {
  79. __iced_deferrals = new iced.Deferrals(__iced_k, {
  80. parent: ___iced_passed_deferral,
  81. filename: "/Users/max/src/keybase/node-client/src/command/decrypt_and_verify.iced",
  82. funcname: "Command.run"
  83. });
  84. eng.global_init(esc(__iced_deferrals.defer({
  85. lineno: 51
  86. })));
  87. __iced_deferrals._fulfill();
  88. });
  89. })(this)((function(_this) {
  90. return function() {
  91. (function(__iced_k) {
  92. __iced_deferrals = new iced.Deferrals(__iced_k, {
  93. parent: ___iced_passed_deferral,
  94. filename: "/Users/max/src/keybase/node-client/src/command/decrypt_and_verify.iced",
  95. funcname: "Command.run"
  96. });
  97. eng.run(esc(__iced_deferrals.defer({
  98. lineno: 52
  99. })));
  100. __iced_deferrals._fulfill();
  101. })(function() {
  102. (function(__iced_k) {
  103. __iced_deferrals = new iced.Deferrals(__iced_k, {
  104. parent: ___iced_passed_deferral,
  105. filename: "/Users/max/src/keybase/node-client/src/command/decrypt_and_verify.iced",
  106. funcname: "Command.run"
  107. });
  108. eng.global_cleanup(__iced_deferrals.defer({
  109. assign_fn: (function() {
  110. return function() {
  111. return err_dummy = arguments[0];
  112. };
  113. })(),
  114. lineno: 53
  115. }));
  116. __iced_deferrals._fulfill();
  117. })(function() {
  118. return cb(null);
  119. });
  120. });
  121. };
  122. })(this));
  123. };
  124. return Command;
  125. })(Base);
  126. }).call(this);