feat: upgrade to node 20.1.0 (#590)

* feat: upgrade node to 20.0.0

* fix(auth): webauthn usage

* fix: remove better-sqlite3 driver and unplug newrelic

* fix: add sqlite3 lib to packages

* chore: upgrade aws-sdk and localstack

* fix: specs and node types

* tmp: check if installing yarn helps linter and test cancellation issues

* Revert "tmp: check if installing yarn helps linter and test cancellation issues"

This reverts commit eacb4e28d1.

* fix: run tests separately

* tmp: downgrade yarn release

* Revert "tmp: downgrade yarn release"

This reverts commit a277454dbe.

* feat: upgrade to node 20.1.0

* Revert "fix: run tests separately"

This reverts commit 5755f2caf9.
This commit is contained in:
Karol Sójko
2023-05-08 12:16:18 +02:00
committed by GitHub
parent 9fcadf8fbb
commit 8fbb94d15a
1619 changed files with 124608 additions and 529888 deletions
@@ -8,8 +8,11 @@ import { AuthenticatorChallenge } from '../../Authenticator/AuthenticatorChallen
import { FeatureIdentifier } from '@standardnotes/features'
import { FeatureServiceInterface } from '../../Feature/FeatureServiceInterface'
import { UserRepositoryInterface } from '../../User/UserRepositoryInterface'
import { AuthenticatorTransportFuture, PublicKeyCredentialCreationOptionsJSON } from '@simplewebauthn/typescript-types'
export class GenerateAuthenticatorRegistrationOptions implements UseCaseInterface<Record<string, unknown>> {
export class GenerateAuthenticatorRegistrationOptions
implements UseCaseInterface<PublicKeyCredentialCreationOptionsJSON>
{
constructor(
private authenticatorRepository: AuthenticatorRepositoryInterface,
private authenticatorChallengeRepository: AuthenticatorChallengeRepositoryInterface,
@@ -19,7 +22,9 @@ export class GenerateAuthenticatorRegistrationOptions implements UseCaseInterfac
private featureService: FeatureServiceInterface,
) {}
async execute(dto: GenerateAuthenticatorRegistrationOptionsDTO): Promise<Result<Record<string, unknown>>> {
async execute(
dto: GenerateAuthenticatorRegistrationOptionsDTO,
): Promise<Result<PublicKeyCredentialCreationOptionsJSON>> {
const userUuidOrError = Uuid.create(dto.userUuid)
if (userUuidOrError.isFailed()) {
return Result.fail(`Could not generate authenticator registration options: ${userUuidOrError.getError()}`)
@@ -59,7 +64,7 @@ export class GenerateAuthenticatorRegistrationOptions implements UseCaseInterfac
excludeCredentials: authenticators.map((authenticator) => ({
id: authenticator.props.credentialId,
type: 'public-key',
transports: authenticator.props.transports,
transports: authenticator.props.transports as AuthenticatorTransportFuture[],
})),
})