Compare commits

..

5 Commits

11 changed files with 44 additions and 19 deletions

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.16.35](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.16.34...@standardnotes/home-server@1.16.35) (2023-10-09)
**Note:** Version bump only for package @standardnotes/home-server
## [1.16.34](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.16.33...@standardnotes/home-server@1.16.34) (2023-10-06)
**Note:** Version bump only for package @standardnotes/home-server
## [1.16.33](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.16.32...@standardnotes/home-server@1.16.33) (2023-10-06)
**Note:** Version bump only for package @standardnotes/home-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/home-server",
"version": "1.16.33",
"version": "1.16.35",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.40.2](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.40.1...@standardnotes/revisions-server@1.40.2) (2023-10-09)
### Bug Fixes
* logs in transition ([29e8de3](https://github.com/standardnotes/server/commit/29e8de32383e911bbb431d3fd0da68faefa32d3d))
## [1.40.1](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.40.0...@standardnotes/revisions-server@1.40.1) (2023-10-06)
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/revisions-server",
"version": "1.40.1",
"version": "1.40.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -159,9 +159,9 @@ export class TransitionRevisionsFromPrimaryToSecondaryDatabaseForUser implements
}
this.logger.info(
`[${
userUuid.value
}] Removing revision ${revision.id.toString()} in primary database as it is not identical to revision in secondary database`,
`[${userUuid.value}] Removing revision ${revision.id.toString()} in primary database: ${JSON.stringify(
revisionInPrimary,
)} as it is not identical to revision in secondary database: ${JSON.stringify(revision)}`,
)
await this.primaryRevisionsRepository.removeOneByUuid(
@@ -205,8 +205,8 @@ export class TransitionRevisionsFromPrimaryToSecondaryDatabaseForUser implements
}
private async allowForPrimaryDatabaseToCatchUp(): Promise<void> {
const twoSecondsInMilliseconds = 2_000
await this.timer.sleep(twoSecondsInMilliseconds)
const delay = 1_000
await this.timer.sleep(delay)
}
private async checkIntegrityBetweenPrimaryAndSecondaryDatabase(userUuid: Uuid): Promise<Result<boolean>> {

View File

@@ -3,6 +3,19 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.112.3](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.112.2...@standardnotes/syncing-server@1.112.3) (2023-10-09)
### Bug Fixes
* logs in transition ([29e8de3](https://github.com/standardnotes/syncing-server-js/commit/29e8de32383e911bbb431d3fd0da68faefa32d3d))
## [1.112.2](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.112.1...@standardnotes/syncing-server@1.112.2) (2023-10-06)
### Bug Fixes
* **syncing-server:** calling auth server for user key params ([51ca822](https://github.com/standardnotes/syncing-server-js/commit/51ca8229b8d5ebb3b4573a2a9da12dd8f15bf2ec))
* **syncing-server:** error log on email backup requested ([a6a19a3](https://github.com/standardnotes/syncing-server-js/commit/a6a19a391e0495a0f362b98d0f3a34e4f6539863))
## [1.112.1](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.112.0...@standardnotes/syncing-server@1.112.1) (2023-10-06)
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/syncing-server",
"version": "1.112.1",
"version": "1.112.3",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -1,5 +1,5 @@
import { KeyParamsData } from '@standardnotes/responses'
export interface AuthHttpServiceInterface {
getUserKeyParams(dto: { email?: string; uuid?: string; authenticated: boolean }): Promise<KeyParamsData>
getUserKeyParams(userUuid: string): Promise<KeyParamsData>
}

View File

@@ -42,13 +42,12 @@ export class EmailBackupRequestedEventHandler implements DomainEventHandlerInter
): Promise<void> {
let authParams: KeyParamsData
try {
authParams = await this.authHttpService.getUserKeyParams({
uuid: event.payload.userUuid,
authenticated: false,
})
authParams = await this.authHttpService.getUserKeyParams(event.payload.userUuid)
} catch (error) {
this.logger.error(
`Could not get user key params from auth service for user ${event.payload.userUuid}: ${JSON.stringify(error)}`,
`Could not get user key params from auth service for user ${event.payload.userUuid}: ${
(error as Error).message
}`,
)
return

View File

@@ -99,8 +99,8 @@ export class TransitionItemsFromPrimaryToSecondaryDatabaseForUser implements Use
}
private async allowForPrimaryDatabaseToCatchUp(): Promise<void> {
const twoSecondsInMilliseconds = 2_000
await this.timer.sleep(twoSecondsInMilliseconds)
const delay = 1_000
await this.timer.sleep(delay)
}
private async migrateItemsForUser(userUuid: Uuid, timestamp: number): Promise<Result<void>> {

View File

@@ -9,15 +9,14 @@ export class AuthHttpService implements AuthHttpServiceInterface {
private authServerUrl: string,
) {}
async getUserKeyParams(dto: { email?: string; uuid?: string; authenticated: boolean }): Promise<KeyParamsData> {
async getUserKeyParams(userUuid: string): Promise<KeyParamsData> {
const keyParamsResponse = await this.httpClient.request({
method: 'GET',
timeout: 10000,
headers: {
Accept: 'application/json',
},
url: `${this.authServerUrl}/users/params`,
params: dto,
url: `${this.authServerUrl}/users/params?uuid=${userUuid}`,
validateStatus:
/* istanbul ignore next */
(status: number) => status >= 200 && status < 500,