cocoda-sdk 3.4.2 → 3.4.3

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.
@@ -311,14 +311,14 @@ class BaseProvider {
311
311
  if (options.auth && this._auth.key != _.get(this._config, "auth.key")) {
312
312
  return false;
313
313
  }
314
- const userUris = [user.uri].concat(Object.values(user.identities || {}).map((id) => id.uri)).filter((uri) => uri != null);
314
+ const userUris = [user?.uri].concat(Object.values(user?.identities || {}).map((id) => id.uri)).filter(Boolean);
315
315
  if (options.auth && options.identities) {
316
316
  if (_.intersection(userUris, options.identities).length == 0) {
317
317
  return false;
318
318
  }
319
319
  }
320
320
  if (options.auth && options.identityProviders) {
321
- const providers = Object.keys(user && user.identities || {});
321
+ const providers = Object.keys(user?.identities || {});
322
322
  if (_.intersection(providers, options.identityProviders).length == 0) {
323
323
  return false;
324
324
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cocoda-sdk",
3
- "version": "3.4.2",
3
+ "version": "3.4.3",
4
4
  "description": "SDK for Cocoda",
5
5
  "main": "dist/cjs/index.cjs",
6
6
  "module": "dist/esm/index.js",
@@ -54,20 +54,20 @@
54
54
  "devDependencies": {
55
55
  "axios-mock-adapter": "^1.21.2",
56
56
  "clean-jsdoc-theme": "^4.2.6",
57
- "esbuild": "~0.17.8",
57
+ "esbuild": "~0.17.12",
58
58
  "esbuild-plugin-ifdef": "^1.0.1",
59
- "eslint": "^8.34.0",
59
+ "eslint": "^8.36.0",
60
60
  "eslint-config-gbv": "^1.0.4",
61
61
  "glob": "^8.1.0",
62
- "jsdoc": "^4.0.0",
62
+ "jsdoc": "^4.0.2",
63
63
  "license-checker": "^25.0.1",
64
- "lint-staged": "^13.1.2",
64
+ "lint-staged": "^13.2.0",
65
65
  "mocha": "^10.2.0",
66
66
  "mocha-eslint": "^7.0.0",
67
67
  "pre-commit": "^1.2.2"
68
68
  },
69
69
  "dependencies": {
70
- "axios": "^1.3.3",
70
+ "axios": "^1.3.4",
71
71
  "flexsearch": "~0.6.32",
72
72
  "jskos-tools": "^1.0.30",
73
73
  "localforage": "^1.10.0",