@balena/sbvr-types
Advanced tools
Comparing version 9.0.0-build-joshbwlng-bigint-string-45d3cd6262f094a0c43ffe308dccab4968c074be-1 to 9.0.1-build-joshbwlng-balena-lint-0ca39ea460932eadec4440c7ca70d84fe8e5ef41-1
@@ -7,4 +7,9 @@ # Change Log | ||
# v9.0.1 | ||
## (2024-07-31) | ||
* Update @balena/lint to v8.2.7 [Josh Bowling] | ||
# v9.0.0 | ||
## (2024-07-05) | ||
## (2024-07-19) | ||
@@ -11,0 +16,0 @@ * Update BigInteger and BigSerial TsTypes [Josh Bowling] |
@@ -14,3 +14,3 @@ import * as TypeUtils from '../type-utils'; | ||
export declare const validate: TypeUtils.Validate<Types['Write'], DbWriteType>; | ||
export declare const compare: (value: string, result: string) => Promise<boolean>; | ||
export declare const compare: (value: string, result: string) => boolean; | ||
export {}; |
@@ -37,3 +37,3 @@ "use strict"; | ||
}); | ||
const compare = async (value, result) => { | ||
const compare = (value, result) => { | ||
return sha256(value) === result; | ||
@@ -40,0 +40,0 @@ }; |
@@ -15,3 +15,3 @@ "use strict"; | ||
if (data != null) { | ||
return new Date('Thu, 01 Jan 1970 ' + data).toISOString(); | ||
return new Date(`Thu, 01 Jan 1970 ${data}`).toISOString(); | ||
} | ||
@@ -18,0 +18,0 @@ return data; |
@@ -89,3 +89,3 @@ "use strict"; | ||
exports.fetchProcessing = fetchProcessing; | ||
exports.validate = TypeUtils.validate.checkRequired(async (value) => { | ||
exports.validate = TypeUtils.validate.checkRequired((value) => { | ||
if (typeof value !== 'object') { | ||
@@ -92,0 +92,0 @@ throw new Error(`is not an object: ${typeof value}`); |
{ | ||
"name": "@balena/sbvr-types", | ||
"version": "9.0.0-build-joshbwlng-bigint-string-45d3cd6262f094a0c43ffe308dccab4968c074be-1", | ||
"version": "9.0.1-build-joshbwlng-balena-lint-0ca39ea460932eadec4440c7ca70d84fe8e5ef41-1", | ||
"description": "SBVR type definitions.", | ||
@@ -24,3 +24,3 @@ "main": "out", | ||
"@balena/abstract-sql-compiler": "^9.2.0", | ||
"@balena/lint": "^8.0.2", | ||
"@balena/lint": "^8.2.7", | ||
"@types/bcrypt": "^5.0.2", | ||
@@ -55,4 +55,4 @@ "@types/chai": "^4.3.16", | ||
"versionist": { | ||
"publishedAt": "2024-07-05T00:50:33.150Z" | ||
"publishedAt": "2024-07-31T22:33:53.342Z" | ||
} | ||
} |
@@ -85,4 +85,4 @@ import type { SbvrType } from './type-utils'; | ||
validateSync: (value: string) => string; | ||
compare: (str: string, hash: string) => Promise<boolean>; | ||
compare: (str: string, hash: string) => Promise<boolean> | boolean; | ||
}; | ||
}; |
@@ -46,4 +46,4 @@ // We are using the P-H-C storing format: | ||
export const compare = async (value: string, result: string) => { | ||
export const compare = (value: string, result: string) => { | ||
return sha256(value) === result; | ||
}; |
@@ -20,3 +20,3 @@ import * as TypeUtils from '../type-utils'; | ||
// We append the date of the epoch so that we can parse this as a valid date. | ||
return new Date('Thu, 01 Jan 1970 ' + data).toISOString(); | ||
return new Date(`Thu, 01 Jan 1970 ${data}`).toISOString(); | ||
} | ||
@@ -23,0 +23,0 @@ return data; |
@@ -119,3 +119,3 @@ import * as TypeUtils from '../type-utils'; | ||
export const validate: TypeUtils.Validate<Types['Write'], DbWriteType> = | ||
TypeUtils.validate.checkRequired(async (value: WebResource) => { | ||
TypeUtils.validate.checkRequired((value: WebResource) => { | ||
if (typeof value !== 'object') { | ||
@@ -122,0 +122,0 @@ throw new Error(`is not an object: ${typeof value}`); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
151707