@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.
- package/.eslintrc.js +2 -4
- package/bin/outdated-with-suppression.sh +20 -0
- package/bin/suppress-outdated.sh +15 -0
- package/dependencies-report.json +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/AccountLockedError.html +4 -3
- package/docs/classes/AuthenticationError.html +4 -3
- package/docs/classes/Base64.html +2 -2
- package/docs/classes/Buffer.html +2 -2
- package/docs/classes/ConfigurationNotSetError.html +4 -3
- package/docs/classes/ConfigurationSetNotFoundError.html +4 -3
- package/docs/classes/DecodeError.html +4 -3
- package/docs/classes/DefaultConfigurationManager.html +6 -6
- package/docs/classes/DefaultLogger.html +13 -7
- package/docs/classes/DefaultSudoKeyArchive.html +13 -13
- package/docs/classes/DefaultSudoKeyManager.html +31 -27
- package/docs/classes/FatalError.html +4 -3
- package/docs/classes/IllegalArgumentError.html +4 -3
- package/docs/classes/IllegalStateError.html +4 -3
- package/docs/classes/InsufficientEntitlementsError.html +4 -3
- package/docs/classes/InvalidOwnershipProofError.html +4 -3
- package/docs/classes/InvalidTokenError.html +4 -3
- package/docs/classes/KeyArchiveDecodingError.html +4 -3
- package/docs/classes/KeyArchiveIncorrectPasswordError.html +4 -3
- package/docs/classes/KeyArchiveMissingError.html +4 -3
- package/docs/classes/KeyArchiveNoPasswordRequiredError.html +4 -3
- package/docs/classes/KeyArchivePasswordRequiredError.html +4 -3
- package/docs/classes/KeyArchiveTypeError.html +4 -3
- package/docs/classes/KeyArchiveUnknownKeyTypeError.html +4 -3
- package/docs/classes/KeyArchiveVersionError.html +4 -3
- package/docs/classes/KeyNotFoundError.html +4 -3
- package/docs/classes/KeyStoreNotExportableError.html +4 -3
- package/docs/classes/LimitExceededError.html +4 -3
- package/docs/classes/NoEntitlementsError.html +4 -3
- package/docs/classes/NotAuthorizedError.html +4 -3
- package/docs/classes/NotRegisteredError.html +4 -3
- package/docs/classes/NotSignedInError.html +4 -3
- package/docs/classes/OperationNotImplementedError.html +4 -3
- package/docs/classes/RegisterError.html +4 -3
- package/docs/classes/RequestFailedError.html +6 -5
- package/docs/classes/ServiceError.html +4 -3
- package/docs/classes/SignOutError.html +4 -3
- package/docs/classes/SudoCryptoProviderDefaults.html +1 -1
- package/docs/classes/UnknownGraphQLError.html +6 -4
- package/docs/classes/UnrecognizedAlgorithmError.html +4 -3
- package/docs/classes/UserNotConfirmedError.html +4 -3
- package/docs/classes/VersionMismatchError.html +4 -3
- package/docs/enums/CachePolicy.html +2 -2
- package/docs/enums/EncryptionAlgorithm.html +2 -2
- package/docs/enums/KeyArchiveKeyType.html +2 -2
- package/docs/enums/KeyDataKeyFormat.html +3 -3
- package/docs/enums/KeyDataKeyType.html +2 -2
- package/docs/enums/ListOperationResultStatus.html +4 -4
- package/docs/enums/PublicKeyFormat.html +1 -1
- package/docs/index.html +1 -1
- package/docs/interfaces/AsymmetricEncryptionOptions.html +2 -2
- package/docs/interfaces/BooleanFilter.html +2 -2
- package/docs/interfaces/ConfigurationManager.html +5 -5
- package/docs/interfaces/KeyData.html +2 -2
- package/docs/interfaces/ListOperationFailureResult.html +2 -2
- package/docs/interfaces/ListOperationPartialResult.html +4 -4
- package/docs/interfaces/ListOperationSuccessResult.html +3 -3
- package/docs/interfaces/ListOutput.html +2 -2
- package/docs/interfaces/Logger.html +13 -7
- package/docs/interfaces/Owner.html +1 -1
- package/docs/interfaces/PublicKey.html +1 -1
- package/docs/interfaces/StringFilter.html +2 -2
- package/docs/interfaces/SudoCryptoProvider.html +39 -31
- package/docs/interfaces/SudoKeyArchive.html +10 -10
- package/docs/interfaces/SudoKeyManager.html +39 -31
- package/docs/interfaces/SymmetricEncryptionOptions.html +2 -2
- package/docs/modules.html +4 -4
- package/github/.eslintrc.js +2 -4
- package/github/bin/outdated-with-suppression.sh +20 -0
- package/github/bin/suppress-outdated.sh +15 -0
- package/github/docs/assets/search.js +1 -1
- package/github/docs/classes/AccountLockedError.html +4 -3
- package/github/docs/classes/AuthenticationError.html +4 -3
- package/github/docs/classes/Base64.html +2 -2
- package/github/docs/classes/Buffer.html +2 -2
- package/github/docs/classes/ConfigurationNotSetError.html +4 -3
- package/github/docs/classes/ConfigurationSetNotFoundError.html +4 -3
- package/github/docs/classes/DecodeError.html +4 -3
- package/github/docs/classes/DefaultConfigurationManager.html +6 -6
- package/github/docs/classes/DefaultLogger.html +13 -7
- package/github/docs/classes/DefaultSudoKeyArchive.html +13 -13
- package/github/docs/classes/DefaultSudoKeyManager.html +31 -27
- package/github/docs/classes/FatalError.html +4 -3
- package/github/docs/classes/IllegalArgumentError.html +4 -3
- package/github/docs/classes/IllegalStateError.html +4 -3
- package/github/docs/classes/InsufficientEntitlementsError.html +4 -3
- package/github/docs/classes/InvalidOwnershipProofError.html +4 -3
- package/github/docs/classes/InvalidTokenError.html +4 -3
- package/github/docs/classes/KeyArchiveDecodingError.html +4 -3
- package/github/docs/classes/KeyArchiveIncorrectPasswordError.html +4 -3
- package/github/docs/classes/KeyArchiveMissingError.html +4 -3
- package/github/docs/classes/KeyArchiveNoPasswordRequiredError.html +4 -3
- package/github/docs/classes/KeyArchivePasswordRequiredError.html +4 -3
- package/github/docs/classes/KeyArchiveTypeError.html +4 -3
- package/github/docs/classes/KeyArchiveUnknownKeyTypeError.html +4 -3
- package/github/docs/classes/KeyArchiveVersionError.html +4 -3
- package/github/docs/classes/KeyNotFoundError.html +4 -3
- package/github/docs/classes/KeyStoreNotExportableError.html +4 -3
- package/github/docs/classes/LimitExceededError.html +4 -3
- package/github/docs/classes/NoEntitlementsError.html +4 -3
- package/github/docs/classes/NotAuthorizedError.html +4 -3
- package/github/docs/classes/NotRegisteredError.html +4 -3
- package/github/docs/classes/NotSignedInError.html +4 -3
- package/github/docs/classes/OperationNotImplementedError.html +4 -3
- package/github/docs/classes/RegisterError.html +4 -3
- package/github/docs/classes/RequestFailedError.html +6 -5
- package/github/docs/classes/ServiceError.html +4 -3
- package/github/docs/classes/SignOutError.html +4 -3
- package/github/docs/classes/SudoCryptoProviderDefaults.html +1 -1
- package/github/docs/classes/UnknownGraphQLError.html +6 -4
- package/github/docs/classes/UnrecognizedAlgorithmError.html +4 -3
- package/github/docs/classes/UserNotConfirmedError.html +4 -3
- package/github/docs/classes/VersionMismatchError.html +4 -3
- package/github/docs/enums/CachePolicy.html +2 -2
- package/github/docs/enums/EncryptionAlgorithm.html +2 -2
- package/github/docs/enums/KeyArchiveKeyType.html +2 -2
- package/github/docs/enums/KeyDataKeyFormat.html +3 -3
- package/github/docs/enums/KeyDataKeyType.html +2 -2
- package/github/docs/enums/ListOperationResultStatus.html +4 -4
- package/github/docs/enums/PublicKeyFormat.html +1 -1
- package/github/docs/index.html +1 -1
- package/github/docs/interfaces/AsymmetricEncryptionOptions.html +2 -2
- package/github/docs/interfaces/BooleanFilter.html +2 -2
- package/github/docs/interfaces/ConfigurationManager.html +5 -5
- package/github/docs/interfaces/KeyData.html +2 -2
- package/github/docs/interfaces/ListOperationFailureResult.html +2 -2
- package/github/docs/interfaces/ListOperationPartialResult.html +4 -4
- package/github/docs/interfaces/ListOperationSuccessResult.html +3 -3
- package/github/docs/interfaces/ListOutput.html +2 -2
- package/github/docs/interfaces/Logger.html +13 -7
- package/github/docs/interfaces/Owner.html +1 -1
- package/github/docs/interfaces/PublicKey.html +1 -1
- package/github/docs/interfaces/StringFilter.html +2 -2
- package/github/docs/interfaces/SudoCryptoProvider.html +39 -31
- package/github/docs/interfaces/SudoKeyArchive.html +10 -10
- package/github/docs/interfaces/SudoKeyManager.html +39 -31
- package/github/docs/interfaces/SymmetricEncryptionOptions.html +2 -2
- package/github/docs/modules.html +4 -4
- package/github/package.json +13 -10
- package/github/src/errors/error.ts +17 -8
- package/github/src/logging/logger.ts +65 -6
- package/github/src/sudoKeyManager/sudoCryptoProvider.ts +14 -0
- package/github/src/sudoKeyManager/sudoKeyManager.ts +22 -0
- package/github/test/logging/logger.spec.ts +122 -0
- package/github/test/sudoKeyManager/sudoKeyManager.spec.ts +37 -0
- package/github/yarn.lock +566 -687
- package/lib/errors/error.d.ts +3 -2
- package/lib/errors/error.js +30 -20
- package/lib/logging/logger.d.ts +30 -0
- package/lib/logging/logger.js +12 -0
- package/lib/sudoKeyManager/sudoCryptoProvider.d.ts +12 -0
- package/lib/sudoKeyManager/sudoKeyManager.d.ts +14 -0
- package/lib/sudoKeyManager/sudoKeyManager.js +8 -0
- package/package.json +13 -10
- package/src/errors/error.ts +17 -8
- package/src/logging/logger.ts +65 -6
- package/src/sudoKeyManager/sudoCryptoProvider.ts +14 -0
- package/src/sudoKeyManager/sudoKeyManager.ts +22 -0
- package/test/logging/logger.spec.ts +122 -0
- package/test/sudoKeyManager/sudoKeyManager.spec.ts +37 -0
- package/yarn.lock +566 -687
package/.eslintrc.js
CHANGED
|
@@ -63,10 +63,7 @@ module.exports = {
|
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
files: [
|
|
66
|
-
'
|
|
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
|