@portal-hq/utils
Advanced tools
Comparing version 0.3.8 to 1.0.0
@@ -23,2 +23,5 @@ "use strict"; | ||
} | ||
validateOperations() { | ||
throw new Error(`[Portal] KeychainAdapter method validateOperations() cannot be called directly. Please extend KeychainAdapter.`); | ||
} | ||
} | ||
@@ -48,3 +51,6 @@ exports.KeychainAdapter = KeychainAdapter; | ||
} | ||
validateOperations() { | ||
throw new Error(`[Portal] Storage method validateOperations() cannot be called directly. Please extend Storage.`); | ||
} | ||
} | ||
exports.Storage = Storage; |
@@ -46,2 +46,6 @@ "use strict"; | ||
buildResponse() { | ||
// If the response is empty, just return an empty object | ||
if (this.request.status === 204) { | ||
return {}; | ||
} | ||
try { | ||
@@ -48,0 +52,0 @@ // Try parsing the response body into a JSON object |
@@ -20,2 +20,5 @@ export class KeychainAdapter { | ||
} | ||
validateOperations() { | ||
throw new Error(`[Portal] KeychainAdapter method validateOperations() cannot be called directly. Please extend KeychainAdapter.`); | ||
} | ||
} | ||
@@ -44,2 +47,5 @@ export var MpcStatuses; | ||
} | ||
validateOperations() { | ||
throw new Error(`[Portal] Storage method validateOperations() cannot be called directly. Please extend Storage.`); | ||
} | ||
} |
@@ -44,2 +44,6 @@ import { HttpError } from '../errors'; | ||
buildResponse() { | ||
// If the response is empty, just return an empty object | ||
if (this.request.status === 204) { | ||
return {}; | ||
} | ||
try { | ||
@@ -46,0 +50,0 @@ // Try parsing the response body into a JSON object |
{ | ||
"name": "@portal-hq/utils", | ||
"version": "0.3.8", | ||
"version": "1.0.0", | ||
"main": "lib/commonjs/index", | ||
@@ -29,3 +29,3 @@ "module": "lib/esm/index", | ||
}, | ||
"gitHead": "0bcfd2f4399118cf5bb541e3f347778828ad994f" | ||
"gitHead": "eb157f00d5567c5fe28c4f935ea0d1099b7103e5" | ||
} |
@@ -47,2 +47,7 @@ import { | ||
} | ||
validateOperations(): Promise<boolean> { | ||
throw new Error( | ||
`[Portal] KeychainAdapter method validateOperations() cannot be called directly. Please extend KeychainAdapter.`, | ||
) | ||
} | ||
} | ||
@@ -88,2 +93,8 @@ | ||
} | ||
validateOperations(): Promise<boolean> { | ||
throw new Error( | ||
`[Portal] Storage method validateOperations() cannot be called directly. Please extend Storage.`, | ||
) | ||
} | ||
} |
@@ -60,2 +60,7 @@ import { | ||
private buildResponse<T>(): T { | ||
// If the response is empty, just return an empty object | ||
if (this.request.status === 204) { | ||
return {} as T | ||
} | ||
try { | ||
@@ -62,0 +67,0 @@ // Try parsing the response body into a JSON object |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
125522
3662
1