@unito/integration-cli 0.55.5 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,7 @@ class Activity extends baseCommand_1.BaseCommand {
28
28
  };
29
29
  async catch(error) {
30
30
  /* istanbul ignore if */
31
- if ((0, errors_1.handleError)(error)) {
31
+ if ((0, errors_1.handleError)(this, error)) {
32
32
  this.exit(-1);
33
33
  }
34
34
  throw error;
@@ -14,7 +14,7 @@ class Dev extends baseCommand_1.BaseCommand {
14
14
  static examples = ['<%= config.bin %> <%= command.id %>'];
15
15
  async catch(error) {
16
16
  /* istanbul ignore if */
17
- if ((0, errors_1.handleError)(error)) {
17
+ if ((0, errors_1.handleError)(this, error)) {
18
18
  this.exit(-1);
19
19
  }
20
20
  throw error;
@@ -23,7 +23,7 @@ class Encrypt extends baseCommand_1.BaseCommand {
23
23
  };
24
24
  async catch(error) {
25
25
  /* istanbul ignore if */
26
- if ((0, errors_1.handleError)(error)) {
26
+ if ((0, errors_1.handleError)(this, error)) {
27
27
  this.exit(-1);
28
28
  }
29
29
  throw error;
@@ -16,7 +16,7 @@ class Init extends baseCommand_1.BaseCommand {
16
16
  };
17
17
  async catch(error) {
18
18
  /* istanbul ignore if */
19
- if ((0, errors_1.handleError)(error)) {
19
+ if ((0, errors_1.handleError)(this, error)) {
20
20
  this.exit(-1);
21
21
  }
22
22
  throw error;
@@ -22,7 +22,7 @@ class Invite extends baseCommand_1.BaseCommand {
22
22
  };
23
23
  async catch(error) {
24
24
  /* istanbul ignore if */
25
- if ((0, errors_1.handleError)(error)) {
25
+ if ((0, errors_1.handleError)(this, error)) {
26
26
  this.exit(-1);
27
27
  }
28
28
  throw error;
@@ -21,7 +21,7 @@ class Login extends baseCommand_1.BaseCommand {
21
21
  };
22
22
  async catch(error) {
23
23
  /* istanbul ignore if */
24
- if ((0, errors_1.handleError)(error)) {
24
+ if ((0, errors_1.handleError)(this, error)) {
25
25
  this.exit(-1);
26
26
  }
27
27
  throw error;
@@ -17,7 +17,7 @@ class Oauth2 extends core_1.Command {
17
17
  };
18
18
  async catch(error) {
19
19
  /* istanbul ignore if */
20
- if ((0, errors_1.handleError)(error)) {
20
+ if ((0, errors_1.handleError)(this, error)) {
21
21
  this.exit(-1);
22
22
  }
23
23
  throw error;
@@ -61,7 +61,7 @@ class Publish extends baseCommand_1.BaseCommand {
61
61
  };
62
62
  async catch(error) {
63
63
  /* istanbul ignore if */
64
- if ((0, errors_1.handleError)(error)) {
64
+ if ((0, errors_1.handleError)(this, error)) {
65
65
  this.exit(-1);
66
66
  }
67
67
  throw error;
@@ -71,7 +71,7 @@ class Test extends baseCommand_1.BaseCommand {
71
71
  };
72
72
  async catch(error) {
73
73
  /* istanbul ignore if */
74
- if ((0, errors_1.handleError)(error)) {
74
+ if ((0, errors_1.handleError)(this, error)) {
75
75
  this.exit(-1);
76
76
  }
77
77
  throw error;
@@ -12,7 +12,7 @@ class Upgrade extends baseCommand_1.BaseCommand {
12
12
  static examples = ['<%= config.bin %> <%= command.id %>'];
13
13
  /* istanbul ignore next */
14
14
  async catch(error) {
15
- if ((0, errors_1.handleError)(error)) {
15
+ if ((0, errors_1.handleError)(this, error)) {
16
16
  this.exit(-1);
17
17
  }
18
18
  throw error;
@@ -1,3 +1,4 @@
1
+ import { Command } from '@oclif/core';
1
2
  export declare class NoIntegrationFoundError extends Error {
2
3
  }
3
4
  export declare class NoConfigurationFileError extends Error {
@@ -35,4 +36,4 @@ export declare class ConfigurationInvalid extends Error {
35
36
  prettyDetails: string;
36
37
  constructor(message: string, details: unknown, prettyDetails: string);
37
38
  }
38
- export declare function handleError(error: Error): boolean;
39
+ export declare function handleError(command: Command, error: Error): boolean;
@@ -71,87 +71,87 @@ class ConfigurationInvalid extends Error {
71
71
  }
72
72
  }
73
73
  exports.ConfigurationInvalid = ConfigurationInvalid;
74
- function handleError(error) {
74
+ function handleError(command, error) {
75
75
  /* istanbul ignore if */
76
76
  if (core_1.ux.action.running) {
77
77
  core_1.ux.action.stop(chalk_1.default.redBright('failed'));
78
78
  }
79
79
  let handled = false;
80
80
  if (error instanceof NoIntegrationFoundError) {
81
- core_1.ux.log(chalk_1.default.redBright('Your directory does not seem to contain an integration :('));
82
- core_1.ux.log(`Make sure you are in the right directory and that you have a ${chalk_1.default.yellowBright(configuration_1.DEFAULT_CONFIGURATION_NAME)} file.`);
81
+ command.logToStderr(chalk_1.default.redBright('Your directory does not seem to contain an integration :('));
82
+ command.logToStderr(`Make sure you are in the right directory and that you have a ${chalk_1.default.yellowBright(configuration_1.DEFAULT_CONFIGURATION_NAME)} file.`);
83
83
  handled = true;
84
84
  }
85
85
  else if (error instanceof NoConfigurationFileError) {
86
- core_1.ux.log(chalk_1.default.redBright('This command requires a configuration file for your integration :('));
87
- core_1.ux.log(`This file should be located at ${chalk_1.default.yellowBright(path_1.default.relative(process.cwd(), (0, configuration_1.getConfigurationPath)()))}.`);
86
+ command.logToStderr(chalk_1.default.redBright('This command requires a configuration file for your integration :('));
87
+ command.logToStderr(`This file should be located at ${chalk_1.default.yellowBright(path_1.default.relative(process.cwd(), (0, configuration_1.getConfigurationPath)()))}.`);
88
88
  handled = true;
89
89
  }
90
90
  else if (error instanceof MissingEnvironmentVariableError) {
91
- core_1.ux.log(chalk_1.default.redBright('This command requires a variable which is missing from your environment :('));
92
- core_1.ux.log(`Make sure the environment variable ${chalk_1.default.yellowBright(error.message)} is defined.`);
91
+ command.logToStderr(chalk_1.default.redBright('This command requires a variable which is missing from your environment :('));
92
+ command.logToStderr(`Make sure the environment variable ${chalk_1.default.yellowBright(error.message)} is defined.`);
93
93
  handled = true;
94
94
  }
95
95
  else if (error instanceof ConfigurationMalformed) {
96
- core_1.ux.log(chalk_1.default.redBright(`Your ${chalk_1.default.yellowBright(configuration_1.DEFAULT_CONFIGURATION_NAME)} was found but its not a valid JSON file!`));
96
+ command.logToStderr(chalk_1.default.redBright(`Your ${chalk_1.default.yellowBright(configuration_1.DEFAULT_CONFIGURATION_NAME)} was found but its not a valid JSON file!`));
97
97
  handled = true;
98
98
  }
99
99
  else if (error instanceof ConfigurationInvalid) {
100
- core_1.ux.log(chalk_1.default.redBright(`Your ${chalk_1.default.yellowBright(configuration_1.DEFAULT_CONFIGURATION_NAME)} is invalid!`));
101
- core_1.ux.log();
102
- core_1.ux.log(error.prettyDetails);
100
+ command.logToStderr(chalk_1.default.redBright(`Your ${chalk_1.default.yellowBright(configuration_1.DEFAULT_CONFIGURATION_NAME)} is invalid!`));
101
+ command.logToStderr();
102
+ command.logToStderr(error.prettyDetails);
103
103
  handled = true;
104
104
  }
105
105
  else if (error instanceof NoRefreshTokenError) {
106
- core_1.ux.log(chalk_1.default.redBright('No refresh token found in your configuration file'));
106
+ command.logToStderr(chalk_1.default.redBright('No refresh token found in your configuration file'));
107
107
  handled = true;
108
108
  }
109
109
  else if (error instanceof FailedToRetrieveAccessTokenError) {
110
- core_1.ux.log(chalk_1.default.redBright('Failed to retrieve access token'));
111
- core_1.ux.log();
112
- core_1.ux.log(error.message);
110
+ command.logToStderr(chalk_1.default.redBright('Failed to retrieve access token'));
111
+ command.logToStderr();
112
+ command.logToStderr(error.message);
113
113
  handled = true;
114
114
  }
115
115
  else if (error instanceof InvalidRequestContentTypeError) {
116
- core_1.ux.log(chalk_1.default.redBright('Invalid request content type'));
116
+ command.logToStderr(chalk_1.default.redBright('Invalid request content type'));
117
117
  handled = true;
118
- core_1.ux.log();
119
- core_1.ux.log(error.message);
118
+ command.logToStderr();
119
+ command.logToStderr(error.message);
120
120
  }
121
121
  else if (error instanceof integrationsPlatform_1.HttpError) {
122
122
  handled = true;
123
- core_1.ux.log();
124
- core_1.ux.log((0, json_colorizer_1.default)(JSON.stringify(error.data, null, 2)));
123
+ command.logToStderr();
124
+ command.logToStderr((0, json_colorizer_1.default)(JSON.stringify(error.data, null, 2)));
125
125
  }
126
126
  else if (error instanceof MissingCredentialsError) {
127
- core_1.ux.log();
128
- core_1.ux.log(chalk_1.default.redBright('The credentials are missing from your configuration file'));
127
+ command.logToStderr();
128
+ command.logToStderr(chalk_1.default.redBright('The credentials are missing from your configuration file'));
129
129
  handled = true;
130
130
  }
131
131
  else if (error instanceof MissingApiKey) {
132
- core_1.ux.log();
133
- core_1.ux.log(chalk_1.default.redBright('Your API key is not set!'));
134
- core_1.ux.log(`Make sure to run the ${chalk_1.default.yellowBright('login')} command first`);
132
+ command.logToStderr();
133
+ command.logToStderr(chalk_1.default.redBright('Your API key is not set!'));
134
+ command.logToStderr(`Make sure to run the ${chalk_1.default.yellowBright('login')} command first`);
135
135
  handled = true;
136
136
  }
137
137
  else if (error instanceof AuthenticationFailed) {
138
- core_1.ux.log();
139
- core_1.ux.log(chalk_1.default.redBright('This command requires that you are logged to Unito!'));
140
- core_1.ux.log(`Make sure to run the ${chalk_1.default.yellowBright('login')} command first`);
138
+ command.logToStderr();
139
+ command.logToStderr(chalk_1.default.redBright('This command requires that you are logged to Unito!'));
140
+ command.logToStderr(`Make sure to run the ${chalk_1.default.yellowBright('login')} command first`);
141
141
  handled = true;
142
142
  }
143
143
  else if (error instanceof DecryptionAuthenticationError) {
144
- core_1.ux.log();
145
- core_1.ux.log(chalk_1.default.yellowBright(`Your configuration contains encrypted ${error.encryptedEntityName}.`));
146
- core_1.ux.log('To use them locally, you must be authenticated to Unito.');
144
+ command.logToStderr();
145
+ command.logToStderr(chalk_1.default.yellowBright(`Your configuration contains encrypted ${error.encryptedEntityName}.`));
146
+ command.logToStderr('To use them locally, you must be authenticated to Unito.');
147
147
  handled = true;
148
148
  }
149
149
  else if (error instanceof EntryDecryptionError) {
150
- core_1.ux.log();
151
- core_1.ux.log(chalk_1.default.yellowBright(`Error decrypting entry:`));
152
- core_1.ux.log(chalk_1.default.redBright(`${error.key}: ${error.value}`));
153
- core_1.ux.log();
154
- core_1.ux.log(`Make sure they were encrypted by the same environement (Currently targeting: ${error.environment}).`);
150
+ command.logToStderr();
151
+ command.logToStderr(chalk_1.default.yellowBright(`Error decrypting entry:`));
152
+ command.logToStderr(chalk_1.default.redBright(`${error.key}: ${error.value}`));
153
+ command.logToStderr();
154
+ command.logToStderr(`Make sure they were encrypted by the same environement (Currently targeting: ${error.environment}).`);
155
155
  handled = true;
156
156
  }
157
157
  return handled;
@@ -53,12 +53,12 @@ describe('encrypt', () => {
53
53
  (0, test_1.expect)(ctx.stdout).to.contains('Encrypted Data:');
54
54
  });
55
55
  test_1.test
56
- .stdout()
56
+ .stderr()
57
57
  .stub(GlobalConfiguration, 'read', () => ({}))
58
58
  .command(['encrypt'])
59
59
  .exit(-1)
60
60
  .it('missing api key', ctx => {
61
- (0, test_1.expect)(ctx.stdout).to.contain('Your API key is not set!\nMake sure to run the login command first');
61
+ (0, test_1.expect)(ctx.stderr).to.contain('Your API key is not set!\nMake sure to run the login command first');
62
62
  });
63
63
  test_1.test
64
64
  .stdout()
@@ -301,7 +301,7 @@ describe('Publish', () => {
301
301
  (0, test_1.expect)(ctx.stdout).to.contain('Foo - Live Preview - 9c88');
302
302
  });
303
303
  test_1.test
304
- .stdout()
304
+ .stderr()
305
305
  .stub(GlobalConfiguration, 'read', () => ({}))
306
306
  .stub(IntegrationConfiguration, 'getConfiguration', () => ({}))
307
307
  .stub(IntegrationsPlatform, 'getIntegrations', () => [])
@@ -309,7 +309,7 @@ describe('Publish', () => {
309
309
  .command(['publish'])
310
310
  .exit(-1)
311
311
  .it('missing api key', ctx => {
312
- (0, test_1.expect)(ctx.stdout).to.contain('Your API key is not set!\nMake sure to run the login command first');
312
+ (0, test_1.expect)(ctx.stderr).to.contain('Your API key is not set!\nMake sure to run the login command first');
313
313
  });
314
314
  test_1.test
315
315
  .stdout()
@@ -4,93 +4,98 @@ const tslib_1 = require("tslib");
4
4
  const chai_1 = require("chai");
5
5
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
6
  const sinon_1 = tslib_1.__importDefault(require("sinon"));
7
- const core_1 = require("@oclif/core");
8
7
  const path_1 = tslib_1.__importDefault(require("path"));
9
8
  const errors_1 = require("../src/errors");
10
9
  const configuration_1 = require("../src/resources/configuration");
10
+ const publish_1 = tslib_1.__importDefault(require("../src/commands/publish"));
11
11
  describe('handleError', () => {
12
- let uxLogStub;
12
+ class DummyCommand extends publish_1.default {
13
+ logToStderr = () => { };
14
+ }
15
+ let command;
16
+ let stdErrStub;
13
17
  beforeEach(() => {
14
- uxLogStub = sinon_1.default.stub(core_1.ux, 'log');
18
+ command = new DummyCommand([], {});
19
+ stdErrStub = sinon_1.default.stub(command, 'logToStderr');
15
20
  });
16
21
  afterEach(() => {
17
22
  sinon_1.default.restore();
18
23
  });
19
24
  it('should handle NoIntegrationFoundError', () => {
20
25
  const error = new errors_1.NoIntegrationFoundError();
21
- const handled = (0, errors_1.handleError)(error);
26
+ const handled = (0, errors_1.handleError)(command, error);
22
27
  (0, chai_1.expect)(handled).to.be.true;
23
- (0, chai_1.expect)(uxLogStub.calledTwice).to.be.true;
24
- (0, chai_1.expect)(uxLogStub.firstCall.args[0]).to.equal(chalk_1.default.redBright('Your directory does not seem to contain an integration :('));
25
- (0, chai_1.expect)(uxLogStub.secondCall.args[0]).to.include('Make sure you are in the right directory');
28
+ (0, chai_1.expect)(stdErrStub.calledTwice).to.be.true;
29
+ (0, chai_1.expect)(stdErrStub.firstCall.args[0]).to.equal(chalk_1.default.redBright('Your directory does not seem to contain an integration :('));
30
+ (0, chai_1.expect)(stdErrStub.secondCall.args[0]).to.include('Make sure you are in the right directory');
26
31
  });
27
32
  it('should handle NoConfigurationFileError', () => {
28
33
  const error = new errors_1.NoConfigurationFileError();
29
- const handled = (0, errors_1.handleError)(error);
34
+ const handled = (0, errors_1.handleError)(command, error);
30
35
  (0, chai_1.expect)(handled).to.be.true;
31
- (0, chai_1.expect)(uxLogStub.calledTwice).to.be.true;
32
- (0, chai_1.expect)(uxLogStub.firstCall.args[0]).to.equal(chalk_1.default.redBright('This command requires a configuration file for your integration :('));
33
- (0, chai_1.expect)(uxLogStub.secondCall.args[0]).to.equal(`This file should be located at ${chalk_1.default.yellowBright(path_1.default.relative(process.cwd(), (0, configuration_1.getConfigurationPath)()))}.`);
36
+ (0, chai_1.expect)(stdErrStub.calledTwice).to.be.true;
37
+ (0, chai_1.expect)(stdErrStub.firstCall.args[0]).to.equal(chalk_1.default.redBright('This command requires a configuration file for your integration :('));
38
+ (0, chai_1.expect)(stdErrStub.secondCall.args[0]).to.equal(`This file should be located at ${chalk_1.default.yellowBright(path_1.default.relative(process.cwd(), (0, configuration_1.getConfigurationPath)()))}.`);
34
39
  });
35
40
  it('should handle MissingEnvironmentVariableError', () => {
36
41
  const error = new errors_1.MissingEnvironmentVariableError('VAR_NAME');
37
- const handled = (0, errors_1.handleError)(error);
42
+ const handled = (0, errors_1.handleError)(command, error);
38
43
  (0, chai_1.expect)(handled).to.be.true;
39
- (0, chai_1.expect)(uxLogStub.calledTwice).to.be.true;
40
- (0, chai_1.expect)(uxLogStub.firstCall.args[0]).to.equal(chalk_1.default.redBright('This command requires a variable which is missing from your environment :('));
41
- (0, chai_1.expect)(uxLogStub.secondCall.args[0]).to.equal(`Make sure the environment variable ${chalk_1.default.yellowBright('VAR_NAME')} is defined.`);
44
+ (0, chai_1.expect)(stdErrStub.calledTwice).to.be.true;
45
+ (0, chai_1.expect)(stdErrStub.firstCall.args[0]).to.equal(chalk_1.default.redBright('This command requires a variable which is missing from your environment :('));
46
+ (0, chai_1.expect)(stdErrStub.secondCall.args[0]).to.equal(`Make sure the environment variable ${chalk_1.default.yellowBright('VAR_NAME')} is defined.`);
42
47
  });
43
48
  it('should return false for unrecognized error', () => {
44
49
  const error = new Error('Unrecognized error');
45
- const handled = (0, errors_1.handleError)(error);
50
+ const handled = (0, errors_1.handleError)(command, error);
46
51
  (0, chai_1.expect)(handled).to.be.false;
47
- (0, chai_1.expect)(uxLogStub.called).to.be.false;
52
+ (0, chai_1.expect)(stdErrStub.called).to.be.false;
48
53
  });
49
54
  it('should handle MissingEnvironmentVariableError', () => {
50
55
  const error = new errors_1.ConfigurationInvalid('VAR_NAME', 'details', 'prettyDetails');
51
- const handled = (0, errors_1.handleError)(error);
56
+ const handled = (0, errors_1.handleError)(command, error);
52
57
  (0, chai_1.expect)(handled).to.be.true;
53
- (0, chai_1.expect)(uxLogStub.calledThrice).to.be.true;
54
- (0, chai_1.expect)(uxLogStub.firstCall.args[0]).to.equal(chalk_1.default.redBright(`Your ${chalk_1.default.yellowBright(path_1.default.basename((0, configuration_1.getConfigurationPath)()))} is invalid!`));
55
- (0, chai_1.expect)(uxLogStub.thirdCall.args[0]).to.equal('prettyDetails');
58
+ (0, chai_1.expect)(stdErrStub.calledThrice).to.be.true;
59
+ (0, chai_1.expect)(stdErrStub.firstCall.args[0]).to.equal(chalk_1.default.redBright(`Your ${chalk_1.default.yellowBright(path_1.default.basename((0, configuration_1.getConfigurationPath)()))} is invalid!`));
60
+ (0, chai_1.expect)(stdErrStub.thirdCall.args[0]).to.equal('prettyDetails');
56
61
  });
57
62
  it('should handle NoRefreshTokenError', () => {
58
63
  const error = new errors_1.NoRefreshTokenError();
59
- const handled = (0, errors_1.handleError)(error);
64
+ const handled = (0, errors_1.handleError)(command, error);
60
65
  (0, chai_1.expect)(handled).to.be.true;
61
- (0, chai_1.expect)(uxLogStub.calledOnce).to.be.true;
62
- (0, chai_1.expect)(uxLogStub.firstCall.args[0]).to.equal(chalk_1.default.redBright('No refresh token found in your configuration file'));
66
+ (0, chai_1.expect)(stdErrStub.calledOnce).to.be.true;
67
+ (0, chai_1.expect)(stdErrStub.firstCall.args[0]).to.equal(chalk_1.default.redBright('No refresh token found in your configuration file'));
63
68
  });
64
69
  it('should handle FailedToRetrieveAccessTokenError', () => {
65
70
  const error = new errors_1.FailedToRetrieveAccessTokenError('Credentials invalid');
66
- const handled = (0, errors_1.handleError)(error);
71
+ const handled = (0, errors_1.handleError)(command, error);
67
72
  (0, chai_1.expect)(handled).to.be.true;
68
- (0, chai_1.expect)(uxLogStub.calledThrice).to.be.true;
69
- (0, chai_1.expect)(uxLogStub.firstCall.args[0]).to.equal(chalk_1.default.redBright('Failed to retrieve access token'));
70
- (0, chai_1.expect)(uxLogStub.thirdCall.args[0]).to.equal('Credentials invalid');
73
+ (0, chai_1.expect)(stdErrStub.calledThrice).to.be.true;
74
+ (0, chai_1.expect)(stdErrStub.firstCall.args[0]).to.equal(chalk_1.default.redBright('Failed to retrieve access token'));
75
+ (0, chai_1.expect)(stdErrStub.thirdCall.args[0]).to.equal('Credentials invalid');
71
76
  });
72
77
  it('should handle InvalidRequestContentTypeError', () => {
73
78
  const error = new errors_1.InvalidRequestContentTypeError('Invalid content type');
74
- const handled = (0, errors_1.handleError)(error);
79
+ const handled = (0, errors_1.handleError)(command, error);
75
80
  (0, chai_1.expect)(handled).to.be.true;
76
- (0, chai_1.expect)(uxLogStub.calledThrice).to.be.true;
77
- (0, chai_1.expect)(uxLogStub.firstCall.args[0]).to.equal(chalk_1.default.redBright('Invalid request content type'));
78
- (0, chai_1.expect)(uxLogStub.thirdCall.args[0]).to.equal('Invalid content type');
81
+ (0, chai_1.expect)(stdErrStub.calledThrice).to.be.true;
82
+ (0, chai_1.expect)(stdErrStub.firstCall.args[0]).to.equal(chalk_1.default.redBright('Invalid request content type'));
83
+ (0, chai_1.expect)(stdErrStub.thirdCall.args[0]).to.equal('Invalid content type');
79
84
  });
80
85
  it('should handle DecryptionAuthenticationError', () => {
81
86
  const error = new errors_1.DecryptionAuthenticationError('secrets');
82
- const handled = (0, errors_1.handleError)(error);
87
+ const handled = (0, errors_1.handleError)(command, error);
83
88
  (0, chai_1.expect)(handled).to.be.true;
84
- (0, chai_1.expect)(uxLogStub.calledThrice).to.be.true;
85
- (0, chai_1.expect)(uxLogStub.secondCall.args[0]).to.equal(chalk_1.default.yellowBright('Your configuration contains encrypted secrets.'));
86
- (0, chai_1.expect)(uxLogStub.thirdCall.args[0]).to.equal('To use them locally, you must be authenticated to Unito.');
89
+ (0, chai_1.expect)(stdErrStub.calledThrice).to.be.true;
90
+ (0, chai_1.expect)(stdErrStub.secondCall.args[0]).to.equal(chalk_1.default.yellowBright('Your configuration contains encrypted secrets.'));
91
+ (0, chai_1.expect)(stdErrStub.thirdCall.args[0]).to.equal('To use them locally, you must be authenticated to Unito.');
87
92
  });
88
93
  it('should handle EntryDecryptionError', () => {
89
94
  const error = new errors_1.EntryDecryptionError('key', 'value', 'staging');
90
- const handled = (0, errors_1.handleError)(error);
95
+ const handled = (0, errors_1.handleError)(command, error);
91
96
  (0, chai_1.expect)(handled).to.be.true;
92
- (0, chai_1.expect)(uxLogStub.called).to.be.true;
93
- (0, chai_1.expect)(uxLogStub.secondCall.args[0]).to.equal(chalk_1.default.yellowBright('Error decrypting entry:'));
94
- (0, chai_1.expect)(uxLogStub.thirdCall.args[0]).to.equal(chalk_1.default.redBright('key: value'));
97
+ (0, chai_1.expect)(stdErrStub.called).to.be.true;
98
+ (0, chai_1.expect)(stdErrStub.secondCall.args[0]).to.equal(chalk_1.default.yellowBright('Error decrypting entry:'));
99
+ (0, chai_1.expect)(stdErrStub.thirdCall.args[0]).to.equal(chalk_1.default.redBright('key: value'));
95
100
  });
96
101
  });
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.55.5",
2
+ "version": "0.56.0",
3
3
  "commands": {
4
4
  "activity": {
5
5
  "id": "activity",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unito/integration-cli",
3
- "version": "0.55.5",
3
+ "version": "0.56.0",
4
4
  "description": "Integration CLI",
5
5
  "bin": {
6
6
  "integration-cli": "./bin/run"