@sudoplatform/sudo-common 5.9.0 → 6.0.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.
Files changed (166) hide show
  1. package/.eslintrc.js +2 -4
  2. package/bin/outdated-with-suppression.sh +20 -0
  3. package/bin/suppress-outdated.sh +15 -0
  4. package/dependencies-report.json +1 -1
  5. package/docs/assets/search.js +1 -1
  6. package/docs/classes/AccountLockedError.html +4 -3
  7. package/docs/classes/AuthenticationError.html +4 -3
  8. package/docs/classes/Base64.html +2 -2
  9. package/docs/classes/Buffer.html +2 -2
  10. package/docs/classes/ConfigurationNotSetError.html +4 -3
  11. package/docs/classes/ConfigurationSetNotFoundError.html +4 -3
  12. package/docs/classes/DecodeError.html +4 -3
  13. package/docs/classes/DefaultConfigurationManager.html +6 -6
  14. package/docs/classes/DefaultLogger.html +13 -7
  15. package/docs/classes/DefaultSudoKeyArchive.html +13 -13
  16. package/docs/classes/DefaultSudoKeyManager.html +31 -27
  17. package/docs/classes/FatalError.html +4 -3
  18. package/docs/classes/IllegalArgumentError.html +4 -3
  19. package/docs/classes/IllegalStateError.html +4 -3
  20. package/docs/classes/InsufficientEntitlementsError.html +4 -3
  21. package/docs/classes/InvalidOwnershipProofError.html +4 -3
  22. package/docs/classes/InvalidTokenError.html +4 -3
  23. package/docs/classes/KeyArchiveDecodingError.html +4 -3
  24. package/docs/classes/KeyArchiveIncorrectPasswordError.html +4 -3
  25. package/docs/classes/KeyArchiveMissingError.html +4 -3
  26. package/docs/classes/KeyArchiveNoPasswordRequiredError.html +4 -3
  27. package/docs/classes/KeyArchivePasswordRequiredError.html +4 -3
  28. package/docs/classes/KeyArchiveTypeError.html +4 -3
  29. package/docs/classes/KeyArchiveUnknownKeyTypeError.html +4 -3
  30. package/docs/classes/KeyArchiveVersionError.html +4 -3
  31. package/docs/classes/KeyNotFoundError.html +4 -3
  32. package/docs/classes/KeyStoreNotExportableError.html +4 -3
  33. package/docs/classes/LimitExceededError.html +4 -3
  34. package/docs/classes/NoEntitlementsError.html +4 -3
  35. package/docs/classes/NotAuthorizedError.html +4 -3
  36. package/docs/classes/NotRegisteredError.html +4 -3
  37. package/docs/classes/NotSignedInError.html +4 -3
  38. package/docs/classes/OperationNotImplementedError.html +4 -3
  39. package/docs/classes/RegisterError.html +4 -3
  40. package/docs/classes/RequestFailedError.html +6 -5
  41. package/docs/classes/ServiceError.html +4 -3
  42. package/docs/classes/SignOutError.html +4 -3
  43. package/docs/classes/SudoCryptoProviderDefaults.html +1 -1
  44. package/docs/classes/UnknownGraphQLError.html +6 -4
  45. package/docs/classes/UnrecognizedAlgorithmError.html +4 -3
  46. package/docs/classes/UserNotConfirmedError.html +4 -3
  47. package/docs/classes/VersionMismatchError.html +4 -3
  48. package/docs/enums/CachePolicy.html +2 -2
  49. package/docs/enums/EncryptionAlgorithm.html +2 -2
  50. package/docs/enums/KeyArchiveKeyType.html +2 -2
  51. package/docs/enums/KeyDataKeyFormat.html +3 -3
  52. package/docs/enums/KeyDataKeyType.html +2 -2
  53. package/docs/enums/ListOperationResultStatus.html +4 -4
  54. package/docs/enums/PublicKeyFormat.html +1 -1
  55. package/docs/index.html +1 -1
  56. package/docs/interfaces/AsymmetricEncryptionOptions.html +2 -2
  57. package/docs/interfaces/BooleanFilter.html +2 -2
  58. package/docs/interfaces/ConfigurationManager.html +5 -5
  59. package/docs/interfaces/KeyData.html +2 -2
  60. package/docs/interfaces/ListOperationFailureResult.html +2 -2
  61. package/docs/interfaces/ListOperationPartialResult.html +4 -4
  62. package/docs/interfaces/ListOperationSuccessResult.html +3 -3
  63. package/docs/interfaces/ListOutput.html +2 -2
  64. package/docs/interfaces/Logger.html +13 -7
  65. package/docs/interfaces/Owner.html +1 -1
  66. package/docs/interfaces/PublicKey.html +1 -1
  67. package/docs/interfaces/StringFilter.html +2 -2
  68. package/docs/interfaces/SudoCryptoProvider.html +39 -31
  69. package/docs/interfaces/SudoKeyArchive.html +10 -10
  70. package/docs/interfaces/SudoKeyManager.html +39 -31
  71. package/docs/interfaces/SymmetricEncryptionOptions.html +2 -2
  72. package/docs/modules.html +4 -4
  73. package/github/.eslintrc.js +2 -4
  74. package/github/bin/outdated-with-suppression.sh +20 -0
  75. package/github/bin/suppress-outdated.sh +15 -0
  76. package/github/docs/assets/search.js +1 -1
  77. package/github/docs/classes/AccountLockedError.html +4 -3
  78. package/github/docs/classes/AuthenticationError.html +4 -3
  79. package/github/docs/classes/Base64.html +2 -2
  80. package/github/docs/classes/Buffer.html +2 -2
  81. package/github/docs/classes/ConfigurationNotSetError.html +4 -3
  82. package/github/docs/classes/ConfigurationSetNotFoundError.html +4 -3
  83. package/github/docs/classes/DecodeError.html +4 -3
  84. package/github/docs/classes/DefaultConfigurationManager.html +6 -6
  85. package/github/docs/classes/DefaultLogger.html +13 -7
  86. package/github/docs/classes/DefaultSudoKeyArchive.html +13 -13
  87. package/github/docs/classes/DefaultSudoKeyManager.html +31 -27
  88. package/github/docs/classes/FatalError.html +4 -3
  89. package/github/docs/classes/IllegalArgumentError.html +4 -3
  90. package/github/docs/classes/IllegalStateError.html +4 -3
  91. package/github/docs/classes/InsufficientEntitlementsError.html +4 -3
  92. package/github/docs/classes/InvalidOwnershipProofError.html +4 -3
  93. package/github/docs/classes/InvalidTokenError.html +4 -3
  94. package/github/docs/classes/KeyArchiveDecodingError.html +4 -3
  95. package/github/docs/classes/KeyArchiveIncorrectPasswordError.html +4 -3
  96. package/github/docs/classes/KeyArchiveMissingError.html +4 -3
  97. package/github/docs/classes/KeyArchiveNoPasswordRequiredError.html +4 -3
  98. package/github/docs/classes/KeyArchivePasswordRequiredError.html +4 -3
  99. package/github/docs/classes/KeyArchiveTypeError.html +4 -3
  100. package/github/docs/classes/KeyArchiveUnknownKeyTypeError.html +4 -3
  101. package/github/docs/classes/KeyArchiveVersionError.html +4 -3
  102. package/github/docs/classes/KeyNotFoundError.html +4 -3
  103. package/github/docs/classes/KeyStoreNotExportableError.html +4 -3
  104. package/github/docs/classes/LimitExceededError.html +4 -3
  105. package/github/docs/classes/NoEntitlementsError.html +4 -3
  106. package/github/docs/classes/NotAuthorizedError.html +4 -3
  107. package/github/docs/classes/NotRegisteredError.html +4 -3
  108. package/github/docs/classes/NotSignedInError.html +4 -3
  109. package/github/docs/classes/OperationNotImplementedError.html +4 -3
  110. package/github/docs/classes/RegisterError.html +4 -3
  111. package/github/docs/classes/RequestFailedError.html +6 -5
  112. package/github/docs/classes/ServiceError.html +4 -3
  113. package/github/docs/classes/SignOutError.html +4 -3
  114. package/github/docs/classes/SudoCryptoProviderDefaults.html +1 -1
  115. package/github/docs/classes/UnknownGraphQLError.html +6 -4
  116. package/github/docs/classes/UnrecognizedAlgorithmError.html +4 -3
  117. package/github/docs/classes/UserNotConfirmedError.html +4 -3
  118. package/github/docs/classes/VersionMismatchError.html +4 -3
  119. package/github/docs/enums/CachePolicy.html +2 -2
  120. package/github/docs/enums/EncryptionAlgorithm.html +2 -2
  121. package/github/docs/enums/KeyArchiveKeyType.html +2 -2
  122. package/github/docs/enums/KeyDataKeyFormat.html +3 -3
  123. package/github/docs/enums/KeyDataKeyType.html +2 -2
  124. package/github/docs/enums/ListOperationResultStatus.html +4 -4
  125. package/github/docs/enums/PublicKeyFormat.html +1 -1
  126. package/github/docs/index.html +1 -1
  127. package/github/docs/interfaces/AsymmetricEncryptionOptions.html +2 -2
  128. package/github/docs/interfaces/BooleanFilter.html +2 -2
  129. package/github/docs/interfaces/ConfigurationManager.html +5 -5
  130. package/github/docs/interfaces/KeyData.html +2 -2
  131. package/github/docs/interfaces/ListOperationFailureResult.html +2 -2
  132. package/github/docs/interfaces/ListOperationPartialResult.html +4 -4
  133. package/github/docs/interfaces/ListOperationSuccessResult.html +3 -3
  134. package/github/docs/interfaces/ListOutput.html +2 -2
  135. package/github/docs/interfaces/Logger.html +13 -7
  136. package/github/docs/interfaces/Owner.html +1 -1
  137. package/github/docs/interfaces/PublicKey.html +1 -1
  138. package/github/docs/interfaces/StringFilter.html +2 -2
  139. package/github/docs/interfaces/SudoCryptoProvider.html +39 -31
  140. package/github/docs/interfaces/SudoKeyArchive.html +10 -10
  141. package/github/docs/interfaces/SudoKeyManager.html +39 -31
  142. package/github/docs/interfaces/SymmetricEncryptionOptions.html +2 -2
  143. package/github/docs/modules.html +4 -4
  144. package/github/package.json +13 -10
  145. package/github/src/errors/error.ts +17 -8
  146. package/github/src/logging/logger.ts +65 -6
  147. package/github/src/sudoKeyManager/sudoCryptoProvider.ts +14 -0
  148. package/github/src/sudoKeyManager/sudoKeyManager.ts +22 -0
  149. package/github/test/logging/logger.spec.ts +122 -0
  150. package/github/test/sudoKeyManager/sudoKeyManager.spec.ts +37 -0
  151. package/github/yarn.lock +566 -687
  152. package/lib/errors/error.d.ts +3 -2
  153. package/lib/errors/error.js +30 -20
  154. package/lib/logging/logger.d.ts +30 -0
  155. package/lib/logging/logger.js +12 -0
  156. package/lib/sudoKeyManager/sudoCryptoProvider.d.ts +12 -0
  157. package/lib/sudoKeyManager/sudoKeyManager.d.ts +14 -0
  158. package/lib/sudoKeyManager/sudoKeyManager.js +8 -0
  159. package/package.json +13 -10
  160. package/src/errors/error.ts +17 -8
  161. package/src/logging/logger.ts +65 -6
  162. package/src/sudoKeyManager/sudoCryptoProvider.ts +14 -0
  163. package/src/sudoKeyManager/sudoKeyManager.ts +22 -0
  164. package/test/logging/logger.spec.ts +122 -0
  165. package/test/sudoKeyManager/sudoKeyManager.spec.ts +37 -0
  166. package/yarn.lock +566 -687
package/.eslintrc.js CHANGED
@@ -63,10 +63,7 @@ module.exports = {
63
63
  },
64
64
  {
65
65
  files: [
66
- '**/*.spec.ts',
67
- '**/test/**/*.ts',
68
- 'integration-tests/**/*.ts',
69
- 'src/utils/testing/**/*.ts',
66
+ 'test/**/*.ts',
70
67
  ],
71
68
  parser: '@typescript-eslint/parser',
72
69
  parserOptions: {
@@ -83,6 +80,7 @@ module.exports = {
83
80
  '@typescript-eslint/no-non-null-assertion': 'off',
84
81
  '@typescript-eslint/no-unsafe-call': 'off',
85
82
  '@typescript-eslint/no-unsafe-assignment': 'off',
83
+ '@typescript-eslint/no-unsafe-argument': 'off',
86
84
  '@typescript-eslint/no-unsafe-member-access': 'off',
87
85
  '@typescript-eslint/restrict-plus-operands': 'off',
88
86
  '@typescript-eslint/restrict-template-expressions': 'off',
@@ -0,0 +1,20 @@
1
+ #!/bin/sh
2
+
3
+ yarn outdated --json | jq -s -c 'map(select(.type == "table").data.body) | .[] | unique_by(.[0]) | .[] | .[0]' | (new=""; while read package_name ; do
4
+ suppression=$(jq ".outdatedSuppressions[$package_name] | select (. != null)" package.json)
5
+ if [ -z "$suppression" ]; then
6
+ echo "New outdated_package ${package_name}:"
7
+ echo "${package_name}" | jq .
8
+ new=1
9
+ elif [ $(date '+%s') -gt "$suppression" ]; then
10
+ echo "Suppression for outdated_package ${package_name} has expired. Please revisit:"
11
+ echo "${package_name}" | jq .
12
+ new=1
13
+ else
14
+ echo "outdated_package ${package_name} is suppressed"
15
+ fi
16
+ done
17
+ if [ -n "${new}" ]; then
18
+ exit 1
19
+ fi
20
+ )
@@ -0,0 +1,15 @@
1
+ #!/bin/sh
2
+ #
3
+ # Insert a package name to suppress in outdated checks.
4
+ #
5
+
6
+ package_name=$1
7
+ PACKAGE_JSON="package.json"
8
+
9
+ if [ -z "$package_name" ]; then
10
+ echo "Usage: yarn suppress-outdated <package name>"
11
+ exit 1
12
+ fi
13
+ cp $PACKAGE_JSON $PACKAGE_JSON.old
14
+ cat $PACKAGE_JSON | jq ".outdatedSuppressions.\"$package_name\" = (now | floor | . + 1209600)" > $PACKAGE_JSON.staging
15
+ mv $PACKAGE_JSON.staging $PACKAGE_JSON
@@ -91,7 +91,7 @@
91
91
  },
92
92
  {
93
93
  "name": "fp-ts",
94
- "version": "2.11.4",
94
+ "version": "2.11.5",
95
95
  "publisher": "Giulio Canti",
96
96
  "repository": "https://github.com/gcanti/fp-ts",
97
97
  "license": "MIT"