cozy-harvest-lib 6.15.2 → 7.1.1

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,73 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [7.1.1](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@7.1.0...cozy-harvest-lib@7.1.1) (2022-01-28)
7
+
8
+ **Note:** Version bump only for package cozy-harvest-lib
9
+
10
+
11
+
12
+
13
+
14
+ # [7.1.0](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@7.0.1...cozy-harvest-lib@7.1.0) (2022-01-20)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * Setup visibility in the router ([8d67b3d](https://github.com/cozy/cozy-libs/commit/8d67b3d))
20
+
21
+
22
+ ### Features
23
+
24
+ * Do not allow multi accounts features for clientSide konnectors ([1a9d157](https://github.com/cozy/cozy-libs/commit/1a9d157))
25
+
26
+
27
+
28
+
29
+
30
+ ## [7.0.1](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@7.0.0...cozy-harvest-lib@7.0.1) (2022-01-07)
31
+
32
+ **Note:** Version bump only for package cozy-harvest-lib
33
+
34
+
35
+
36
+
37
+
38
+ # [7.0.0](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@6.15.2...cozy-harvest-lib@7.0.0) (2022-01-07)
39
+
40
+
41
+ ### Features
42
+
43
+ * **eslint:** Propose Eslint plugin promise ([1fded18](https://github.com/cozy/cozy-libs/commit/1fded18))
44
+
45
+
46
+ ### BREAKING CHANGES
47
+
48
+ * **eslint:** Most errors are not auto fixable,
49
+ if needed, use // disable-next-line
50
+
51
+ Or insert in .eslintrc:
52
+ {
53
+ "rules": {
54
+ "promise/always-return": "warn",
55
+ "promise/no-return-wrap": "warn",
56
+ "promise/param-names": "warn",
57
+ "promise/catch-or-return": "warn",
58
+ "promise/no-native": "warn",
59
+ "promise/no-nesting": "warn",
60
+ "promise/no-promise-in-callback": "warn",
61
+ "promise/no-callback-in-promise": "warn",
62
+ "promise/avoid-new": "warn",
63
+ "promise/no-new-statics": "warn",
64
+ "promise/no-return-in-finally": "warn",
65
+ "promise/valid-params": "warn"
66
+ }
67
+ }
68
+
69
+
70
+
71
+
72
+
6
73
  ## [6.15.2](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@6.15.1...cozy-harvest-lib@6.15.2) (2022-01-06)
7
74
 
8
75
  **Note:** Version bump only for package cozy-harvest-lib
package/dist/cli/cli.js CHANGED
@@ -334,11 +334,13 @@ var main = /*#__PURE__*/function () {
334
334
  return function main() {
335
335
  return _ref5.apply(this, arguments);
336
336
  };
337
- }();
337
+ }(); // eslint-disable-next-line promise/catch-or-return
338
+
338
339
 
339
340
  main().catch(function (e) {
340
341
  logger.error(e);
341
342
  process.exit(1);
342
- }).then(function () {
343
+ }) // eslint-disable-next-line promise/always-return
344
+ .then(function () {
343
345
  process.exit(0);
344
346
  });
@@ -60,7 +60,8 @@ export var OAuthForm = /*#__PURE__*/function (_PureComponent) {
60
60
  if (konnectorPolicy.fetchExtraOAuthUrlParams) {
61
61
  this.setState({
62
62
  needExtraParams: true
63
- });
63
+ }); // eslint-disable-next-line promise/catch-or-return
64
+
64
65
  konnectorPolicy.fetchExtraOAuthUrlParams({
65
66
  flow: flow,
66
67
  account: account,
@@ -82,7 +82,9 @@ var Routes = function Routes(_ref) {
82
82
  konnector: konnector,
83
83
  accountId: match.params.accountId,
84
84
  accountsAndTriggers: accountsAndTriggers,
85
- onDismiss: onDismiss
85
+ onDismiss: onDismiss,
86
+ showNewAccountButton: !konnector.clientSide,
87
+ showAccountSelection: !konnector.clientSide
86
88
  });
87
89
  }
88
90
  }), /*#__PURE__*/React.createElement(Route, {
@@ -319,7 +319,8 @@ export var ConnectionFlow = /*#__PURE__*/function () {
319
319
 
320
320
  if (this.jobWatcher) {
321
321
  this.jobWatcher.disableSuccessTimer();
322
- }
322
+ } // eslint-disable-next-line promise/param-names
323
+
323
324
 
324
325
  return new Promise(function (rawResolve) {
325
326
  var accountId = _this.account._id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-harvest-lib",
3
- "version": "6.15.2",
3
+ "version": "7.1.1",
4
4
  "description": "Provides logic, modules and components for Cozy's harvest applications.",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy",
@@ -53,10 +53,10 @@
53
53
  "babel-plugin-inline-react-svg": "^1.1.0",
54
54
  "babel-preset-cozy-app": "^2.0.1",
55
55
  "cozy-client": "17.6.1",
56
- "cozy-device-helper": "^1.15.0",
56
+ "cozy-device-helper": "^1.16.1",
57
57
  "cozy-flags": "^2.8.3",
58
58
  "cozy-keys-lib": "3.8.0",
59
- "cozy-realtime": "^3.14.4",
59
+ "cozy-realtime": "^4.0.2",
60
60
  "cozy-ui": "^57.6.0",
61
61
  "enzyme": "3.11.0",
62
62
  "enzyme-adapter-react-16": "1.15.6",
@@ -85,5 +85,5 @@
85
85
  "react-router-dom": "^5.0.1"
86
86
  },
87
87
  "sideEffects": false,
88
- "gitHead": "ae2860cf5033fcca9974d08b38a58310db5bd3c5"
88
+ "gitHead": "bee23139882151ec2e55d817755fbfbb5798d4b2"
89
89
  }
package/src/cli/cli.js CHANGED
@@ -201,11 +201,13 @@ const main = async () => {
201
201
  await args.handler(args, client)
202
202
  }
203
203
 
204
+ // eslint-disable-next-line promise/catch-or-return
204
205
  main()
205
206
  .catch(e => {
206
207
  logger.error(e)
207
208
  process.exit(1)
208
209
  })
210
+ // eslint-disable-next-line promise/always-return
209
211
  .then(() => {
210
212
  process.exit(0)
211
213
  })
@@ -33,6 +33,7 @@ export class OAuthForm extends PureComponent {
33
33
 
34
34
  if (konnectorPolicy.fetchExtraOAuthUrlParams) {
35
35
  this.setState({ needExtraParams: true })
36
+ // eslint-disable-next-line promise/catch-or-return
36
37
  konnectorPolicy
37
38
  .fetchExtraOAuthUrlParams({
38
39
  flow,
@@ -85,6 +85,8 @@ const Routes = ({ konnectorRoot, konnector, onDismiss, datacardOptions }) => {
85
85
  accountId={match.params.accountId}
86
86
  accountsAndTriggers={accountsAndTriggers}
87
87
  onDismiss={onDismiss}
88
+ showNewAccountButton={!konnector.clientSide}
89
+ showAccountSelection={!konnector.clientSide}
88
90
  />
89
91
  )}
90
92
  />
@@ -255,6 +255,7 @@ export class ConnectionFlow {
255
255
  this.jobWatcher.disableSuccessTimer()
256
256
  }
257
257
 
258
+ // eslint-disable-next-line promise/param-names
258
259
  return new Promise(rawResolve => {
259
260
  const accountId = this.account._id
260
261
  assert(accountId, 'Cannot wait for two fa on account without id')