Compare commits

...

13 Commits

Author SHA1 Message Date
standardci
3f064176f2 chore(release): publish new version
- @standardnotes/analytics@2.26.3
 - @standardnotes/api-gateway@1.73.7
 - @standardnotes/auth-server@1.137.6
 - @standardnotes/common@1.50.4
 - @standardnotes/domain-core@1.26.3
 - @standardnotes/domain-events-infra@1.12.21
 - @standardnotes/domain-events@2.122.2
 - @standardnotes/event-store@1.11.31
 - @standardnotes/files-server@1.22.10
 - @standardnotes/home-server@1.15.21
 - @standardnotes/predicates@1.6.11
 - @standardnotes/revisions-server@1.30.11
 - @standardnotes/scheduler-server@1.20.35
 - @standardnotes/security@1.12.2
 - @standardnotes/settings@1.21.28
 - @standardnotes/sncrypto-node@1.15.6
 - @standardnotes/syncing-server@1.91.2
 - @standardnotes/time@1.15.3
 - @standardnotes/websockets-server@1.10.28
2023-09-04 08:26:34 +00:00
Karol Sójko
c7b0c7dfa8 fix(websockets): add debug logs 2023-09-04 09:47:20 +02:00
Karol Sójko
df20dd46db fix(revisions): add more verbose logs to the transition 2023-09-04 09:05:54 +02:00
Karol Sójko
6dfd09989e chore: remove unused nodemon 2023-09-04 08:28:02 +02:00
Karol Sójko
fc821709e2 chore: upgrade docker build push action: 2023-09-04 08:24:39 +02:00
Karol Sójko
e986abaab5 chore: upgrade @types/uuid 2023-09-04 08:23:46 +02:00
Karol Sójko
a006fb3119 chore: upgrade typescript eslint plugin 2023-09-04 08:22:42 +02:00
standardci
2af812eaf1 chore(release): publish new version
- @standardnotes/analytics@2.26.2
 - @standardnotes/api-gateway@1.73.6
 - @standardnotes/auth-server@1.137.5
 - @standardnotes/common@1.50.3
 - @standardnotes/domain-core@1.26.2
 - @standardnotes/domain-events-infra@1.12.20
 - @standardnotes/domain-events@2.122.1
 - @standardnotes/event-store@1.11.30
 - @standardnotes/files-server@1.22.9
 - @standardnotes/home-server@1.15.20
 - @standardnotes/predicates@1.6.10
 - @standardnotes/revisions-server@1.30.10
 - @standardnotes/scheduler-server@1.20.34
 - @standardnotes/security@1.12.1
 - @standardnotes/settings@1.21.27
 - @standardnotes/sncrypto-node@1.15.5
 - @standardnotes/syncing-server@1.91.1
 - @standardnotes/time@1.15.2
 - @standardnotes/websockets-server@1.10.27
2023-09-01 14:54:13 +00:00
Karol Sójko
d13c975f94 chore: upgrade deps (#805)
* chore: upgrade semver

* chore: upgrade configure-aws-credentials@v2

* chore: upgrade prettier deps

* fix: linter issues
2023-09-01 16:14:51 +02:00
standardci
1f7e4dd184 chore(release): publish new version
- @standardnotes/analytics@2.26.1
 - @standardnotes/api-gateway@1.73.5
 - @standardnotes/auth-server@1.137.4
 - @standardnotes/domain-events-infra@1.12.19
 - @standardnotes/domain-events@2.122.0
 - @standardnotes/event-store@1.11.29
 - @standardnotes/files-server@1.22.8
 - @standardnotes/home-server@1.15.19
 - @standardnotes/revisions-server@1.30.9
 - @standardnotes/scheduler-server@1.20.33
 - @standardnotes/syncing-server@1.91.0
 - @standardnotes/websockets-server@1.10.26
2023-09-01 12:28:05 +00:00
Karol Sójko
8b04216998 chore: fix e2e to fail fast 2023-09-01 12:41:31 +02:00
Karol Sójko
27ff25b70e fix: inserting revisions instead of upsert (#803)
* fix: inserting revisions instead of upsert

* fix: specs

* fix: specs
2023-09-01 12:40:47 +02:00
Karol Sójko
dc3a41e4bb feat(syncing-server): add sending invites via websockets (#804)
* feat(domain-events): add user invited to shared vault event

* feat(syncing-server): add sending invites via websockets
2023-09-01 12:39:38 +02:00
158 changed files with 1470 additions and 945 deletions

View File

@@ -24,7 +24,7 @@ jobs:
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v3
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

View File

@@ -70,7 +70,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v3
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -90,7 +90,7 @@ jobs:
uses: docker/setup-buildx-action@master
- name: Publish Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
builder: ${{ steps.buildx.outputs.name }}
context: ${{ steps.bundle-dir.outputs.temp_dir }}

View File

@@ -21,7 +21,7 @@ jobs:
e2e:
name: (Self Hosting) E2E Test Suite
strategy:
fail-fast: false
fail-fast: true
matrix:
secondary_db_enabled: [true, false]
transition_mode_enabled: [true, false]
@@ -70,7 +70,7 @@ jobs:
e2e-home-server:
name: (Home Server) E2E Test Suite
strategy:
fail-fast: false
fail-fast: true
matrix:
db_type: [mysql, sqlite]
cache_type: [redis, memory]

View File

@@ -35,7 +35,7 @@ jobs:
uses: docker/setup-buildx-action@master
- name: Publish Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
builder: ${{ steps.buildx.outputs.name }}
context: .

802
.pnp.cjs generated

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -3,6 +3,20 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.26.3](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.26.2...@standardnotes/analytics@2.26.3) (2023-09-04)
**Note:** Version bump only for package @standardnotes/analytics
## [2.26.2](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.26.1...@standardnotes/analytics@2.26.2) (2023-09-01)
**Note:** Version bump only for package @standardnotes/analytics
## [2.26.1](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.26.0...@standardnotes/analytics@2.26.1) (2023-09-01)
### Bug Fixes
* inserting revisions instead of upsert ([#803](https://github.com/standardnotes/server/issues/803)) ([27ff25b](https://github.com/standardnotes/server/commit/27ff25b70e6b65dfe89aa35582422dce682a4105))
# [2.26.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.25.21...@standardnotes/analytics@2.26.0) (2023-09-01)
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/analytics",
"version": "2.26.0",
"version": "2.26.3",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -29,12 +29,12 @@
"@types/jest": "^29.5.1",
"@types/mixpanel": "^2.14.4",
"@types/node": "^20.5.7",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"eslint": "^8.39.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"prettier": "^3.0.3",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4"
},
@@ -53,7 +53,7 @@
"mixpanel": "^0.17.0",
"mysql2": "^3.0.1",
"reflect-metadata": "^0.1.13",
"typeorm": "^0.3.15",
"typeorm": "^0.3.17",
"winston": "^3.8.1"
},
"optionalDependencies": {

View File

@@ -6,7 +6,10 @@ import { AnalyticsActivity } from '../../Domain/Analytics/AnalyticsActivity'
import { AnalyticsStoreInterface } from '../../Domain/Analytics/AnalyticsStoreInterface'
export class RedisAnalyticsStore implements AnalyticsStoreInterface {
constructor(private periodKeyGenerator: PeriodKeyGeneratorInterface, private redisClient: IORedis.Redis) {}
constructor(
private periodKeyGenerator: PeriodKeyGeneratorInterface,
private redisClient: IORedis.Redis,
) {}
async calculateActivityTotalCountOverTime(activity: AnalyticsActivity, period: Period): Promise<number> {
if (

View File

@@ -8,7 +8,10 @@ import { Period } from '../../Domain/Time/Period'
import { PeriodKeyGeneratorInterface } from '../../Domain/Time/PeriodKeyGeneratorInterface'
export class RedisStatisticsStore implements StatisticsStoreInterface, StatisticMeasureRepositoryInterface {
constructor(private periodKeyGenerator: PeriodKeyGeneratorInterface, private redisClient: IORedis.Redis) {}
constructor(
private periodKeyGenerator: PeriodKeyGeneratorInterface,
private redisClient: IORedis.Redis,
) {}
async save(statisticMeasure: StatisticMeasure): Promise<void> {
const periodKey = this.periodKeyGenerator.getDailyKey(statisticMeasure.props.date)

View File

@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.73.7](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.73.6...@standardnotes/api-gateway@1.73.7) (2023-09-04)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.73.6](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.73.5...@standardnotes/api-gateway@1.73.6) (2023-09-01)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.73.5](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.73.4...@standardnotes/api-gateway@1.73.5) (2023-09-01)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.73.4](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.73.3...@standardnotes/api-gateway@1.73.4) (2023-09-01)
**Note:** Version bump only for package @standardnotes/api-gateway

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api-gateway",
"version": "1.73.4",
"version": "1.73.7",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -54,14 +54,13 @@
"@types/jsonwebtoken": "^9.0.1",
"@types/node": "^20.5.7",
"@types/prettyjson": "^0.0.30",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"eslint": "^8.39.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"nodemon": "^2.0.19",
"npm-check-updates": "^16.13.2",
"prettier": "^2.8.8",
"prettier": "^3.0.3",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4"
},

View File

@@ -4,7 +4,10 @@ import { ServiceContainerInterface, ServiceIdentifier } from '@standardnotes/dom
import { ServiceProxyInterface } from '../Http/ServiceProxyInterface'
export class DirectCallServiceProxy implements ServiceProxyInterface {
constructor(private serviceContainer: ServiceContainerInterface, private filesServerUrl: string) {}
constructor(
private serviceContainer: ServiceContainerInterface,
private filesServerUrl: string,
) {}
async validateSession(headers: {
authorization: string

View File

@@ -3,6 +3,20 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.137.6](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.137.5...@standardnotes/auth-server@1.137.6) (2023-09-04)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.137.5](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.137.4...@standardnotes/auth-server@1.137.5) (2023-09-01)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.137.4](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.137.3...@standardnotes/auth-server@1.137.4) (2023-09-01)
### Bug Fixes
* inserting revisions instead of upsert ([#803](https://github.com/standardnotes/server/issues/803)) ([27ff25b](https://github.com/standardnotes/server/commit/27ff25b70e6b65dfe89aa35582422dce682a4105))
## [1.137.3](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.137.2...@standardnotes/auth-server@1.137.3) (2023-09-01)
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/auth-server",
"version": "1.137.3",
"version": "1.137.6",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -69,7 +69,7 @@
"prettyjson": "^1.2.5",
"reflect-metadata": "0.1.13",
"sqlite3": "^5.1.6",
"typeorm": "^0.3.15",
"typeorm": "^0.3.17",
"ua-parser-js": "^1.0.35",
"uuid": "^9.0.0",
"winston": "^3.8.1"
@@ -84,15 +84,14 @@
"@types/otplib": "^10.0.0",
"@types/prettyjson": "^0.0.30",
"@types/ua-parser-js": "^0.7.36",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"@types/uuid": "^9.0.3",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"eslint": "^8.39.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"nodemon": "^2.0.19",
"npm-check-updates": "^16.13.2",
"prettier": "^2.8.8",
"prettier": "^3.0.3",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4"
},

View File

@@ -1,5 +1,9 @@
export class MFAValidationError extends Error {
constructor(message: string, public tag: string, public payload?: Record<string, unknown>) {
constructor(
message: string,
public tag: string,
public payload?: Record<string, unknown>,
) {
super(message)
Object.setPrototypeOf(this, MFAValidationError.prototype)
}

View File

@@ -6,7 +6,10 @@ import { SettingServiceInterface } from '../Setting/SettingServiceInterface'
import { UserRepositoryInterface } from '../User/UserRepositoryInterface'
export class EmailSubscriptionUnsubscribedEventHandler implements DomainEventHandlerInterface {
constructor(private userRepository: UserRepositoryInterface, private settingsService: SettingServiceInterface) {}
constructor(
private userRepository: UserRepositoryInterface,
private settingsService: SettingServiceInterface,
) {}
async handle(event: EmailSubscriptionUnsubscribedEvent): Promise<void> {
const usernameOrError = Username.create(event.payload.userEmail)

View File

@@ -4,7 +4,10 @@ import { Logger } from 'winston'
import { UpdateStorageQuotaUsedForUser } from '../UseCase/UpdateStorageQuotaUsedForUser/UpdateStorageQuotaUsedForUser'
export class FileRemovedEventHandler implements DomainEventHandlerInterface {
constructor(private updateStorageQuotaUsedForUserUseCase: UpdateStorageQuotaUsedForUser, private logger: Logger) {}
constructor(
private updateStorageQuotaUsedForUserUseCase: UpdateStorageQuotaUsedForUser,
private logger: Logger,
) {}
async handle(event: FileRemovedEvent): Promise<void> {
const result = await this.updateStorageQuotaUsedForUserUseCase.execute({

View File

@@ -4,7 +4,10 @@ import { Logger } from 'winston'
import { UpdateStorageQuotaUsedForUser } from '../UseCase/UpdateStorageQuotaUsedForUser/UpdateStorageQuotaUsedForUser'
export class FileUploadedEventHandler implements DomainEventHandlerInterface {
constructor(private updateStorageQuotaUsedForUserUseCase: UpdateStorageQuotaUsedForUser, private logger: Logger) {}
constructor(
private updateStorageQuotaUsedForUserUseCase: UpdateStorageQuotaUsedForUser,
private logger: Logger,
) {}
async handle(event: FileUploadedEvent): Promise<void> {
const result = await this.updateStorageQuotaUsedForUserUseCase.execute({

View File

@@ -4,7 +4,10 @@ import { Logger } from 'winston'
import { DeleteAccount } from '../UseCase/DeleteAccount/DeleteAccount'
export class PaymentsAccountDeletedEventHandler implements DomainEventHandlerInterface {
constructor(private deleteAccountUseCase: DeleteAccount, private logger: Logger) {}
constructor(
private deleteAccountUseCase: DeleteAccount,
private logger: Logger,
) {}
async handle(event: PaymentsAccountDeletedEvent): Promise<void> {
const result = await this.deleteAccountUseCase.execute({

View File

@@ -4,7 +4,10 @@ import { Logger } from 'winston'
import { UpdateStorageQuotaUsedForUser } from '../UseCase/UpdateStorageQuotaUsedForUser/UpdateStorageQuotaUsedForUser'
export class SharedVaultFileMovedEventHandler implements DomainEventHandlerInterface {
constructor(private updateStorageQuotaUsedForUserUseCase: UpdateStorageQuotaUsedForUser, private logger: Logger) {}
constructor(
private updateStorageQuotaUsedForUserUseCase: UpdateStorageQuotaUsedForUser,
private logger: Logger,
) {}
async handle(event: SharedVaultFileMovedEvent): Promise<void> {
const subtractResult = await this.updateStorageQuotaUsedForUserUseCase.execute({

View File

@@ -4,7 +4,10 @@ import { Logger } from 'winston'
import { UpdateStorageQuotaUsedForUser } from '../UseCase/UpdateStorageQuotaUsedForUser/UpdateStorageQuotaUsedForUser'
export class SharedVaultFileRemovedEventHandler implements DomainEventHandlerInterface {
constructor(private updateStorageQuotaUsedForUserUseCase: UpdateStorageQuotaUsedForUser, private logger: Logger) {}
constructor(
private updateStorageQuotaUsedForUserUseCase: UpdateStorageQuotaUsedForUser,
private logger: Logger,
) {}
async handle(event: SharedVaultFileRemovedEvent): Promise<void> {
const result = await this.updateStorageQuotaUsedForUserUseCase.execute({

View File

@@ -4,7 +4,10 @@ import { Logger } from 'winston'
import { UpdateStorageQuotaUsedForUser } from '../UseCase/UpdateStorageQuotaUsedForUser/UpdateStorageQuotaUsedForUser'
export class SharedVaultFileUploadedEventHandler implements DomainEventHandlerInterface {
constructor(private updateStorageQuotaUsedForUserUseCase: UpdateStorageQuotaUsedForUser, private logger: Logger) {}
constructor(
private updateStorageQuotaUsedForUserUseCase: UpdateStorageQuotaUsedForUser,
private logger: Logger,
) {}
async handle(event: SharedVaultFileUploadedEvent): Promise<void> {
const result = await this.updateStorageQuotaUsedForUserUseCase.execute({

View File

@@ -3,7 +3,10 @@ import { UpdateTransitionStatus } from '../UseCase/UpdateTransitionStatus/Update
import { Logger } from 'winston'
export class TransitionStatusUpdatedEventHandler implements DomainEventHandlerInterface {
constructor(private updateTransitionStatusUseCase: UpdateTransitionStatus, private logger: Logger) {}
constructor(
private updateTransitionStatusUseCase: UpdateTransitionStatus,
private logger: Logger,
) {}
async handle(event: TransitionStatusUpdatedEvent): Promise<void> {
const result = await this.updateTransitionStatusUseCase.execute({

View File

@@ -5,7 +5,10 @@ import { Request, Response } from 'express'
import { GetSetting } from '../../../Domain/UseCase/GetSetting/GetSetting'
export class BaseSubscriptionSettingsController extends BaseHttpController {
constructor(protected doGetSetting: GetSetting, private controllerContainer?: ControllerContainerInterface) {
constructor(
protected doGetSetting: GetSetting,
private controllerContainer?: ControllerContainerInterface,
) {
super()
if (this.controllerContainer !== undefined) {

View File

@@ -8,7 +8,10 @@ import { CreateValetToken } from '../../../Domain/UseCase/CreateValetToken/Creat
import { CreateValetTokenPayload } from '../../../Domain/ValetToken/CreateValetTokenPayload'
export class BaseValetTokenController extends BaseHttpController {
constructor(protected createValetKey: CreateValetToken, private controllerContainer?: ControllerContainerInterface) {
constructor(
protected createValetKey: CreateValetToken,
private controllerContainer?: ControllerContainerInterface,
) {
super()
if (this.controllerContainer !== undefined) {

View File

@@ -4,7 +4,10 @@ import { BaseMiddleware } from 'inversify-express-utils'
import { Logger } from 'winston'
export abstract class ApiGatewayAuthMiddleware extends BaseMiddleware {
constructor(private tokenDecoder: TokenDecoderInterface<CrossServiceTokenData>, private logger: Logger) {
constructor(
private tokenDecoder: TokenDecoderInterface<CrossServiceTokenData>,
private logger: Logger,
) {
super()
}

View File

@@ -7,7 +7,10 @@ import { OfflineSubscriptionTokenRepositoryInterface } from '../../Domain/Auth/O
export class TypeORMOfflineSubscriptionTokenRepository implements OfflineSubscriptionTokenRepositoryInterface {
private readonly PREFIX = 'offline-subscription-token'
constructor(private cacheEntryRepository: CacheEntryRepositoryInterface, private timer: TimerInterface) {}
constructor(
private cacheEntryRepository: CacheEntryRepositoryInterface,
private timer: TimerInterface,
) {}
async getUserEmailByToken(token: string): Promise<string | undefined> {
const userUuid = await this.cacheEntryRepository.findUnexpiredOneByKey(`${this.PREFIX}:${token}`)

View File

@@ -7,7 +7,10 @@ import { SubscriptionTokenRepositoryInterface } from '../../Domain/Subscription/
export class TypeORMSubscriptionTokenRepository implements SubscriptionTokenRepositoryInterface {
private readonly PREFIX = 'subscription-token'
constructor(private cacheEntryRepository: CacheEntryRepositoryInterface, private timer: TimerInterface) {}
constructor(
private cacheEntryRepository: CacheEntryRepositoryInterface,
private timer: TimerInterface,
) {}
async getUserUuidByToken(token: string): Promise<string | undefined> {
const userUuid = await this.cacheEntryRepository.findUnexpiredOneByKey(`${this.PREFIX}:${token}`)

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.50.4](https://github.com/standardnotes/server/compare/@standardnotes/common@1.50.3...@standardnotes/common@1.50.4) (2023-09-04)
**Note:** Version bump only for package @standardnotes/common
## [1.50.3](https://github.com/standardnotes/server/compare/@standardnotes/common@1.50.2...@standardnotes/common@1.50.3) (2023-09-01)
**Note:** Version bump only for package @standardnotes/common
## [1.50.2](https://github.com/standardnotes/server/compare/@standardnotes/common@1.50.1...@standardnotes/common@1.50.2) (2023-08-30)
**Note:** Version bump only for package @standardnotes/common

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/common",
"version": "1.50.2",
"version": "1.50.4",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -25,12 +25,12 @@
"devDependencies": {
"@types/jest": "^29.5.1",
"@types/node": "^20.5.7",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"eslint": "^8.39.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"prettier": "^3.0.3",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4"
},

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.26.3](https://github.com/standardnotes/server/compare/@standardnotes/domain-core@1.26.2...@standardnotes/domain-core@1.26.3) (2023-09-04)
**Note:** Version bump only for package @standardnotes/domain-core
## [1.26.2](https://github.com/standardnotes/server/compare/@standardnotes/domain-core@1.26.1...@standardnotes/domain-core@1.26.2) (2023-09-01)
**Note:** Version bump only for package @standardnotes/domain-core
## [1.26.1](https://github.com/standardnotes/server/compare/@standardnotes/domain-core@1.26.0...@standardnotes/domain-core@1.26.1) (2023-08-30)
**Note:** Version bump only for package @standardnotes/domain-core

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-core",
"version": "1.26.1",
"version": "1.26.3",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -20,6 +20,7 @@
"clean": "rm -fr dist",
"build": "tsc --build",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"test": "jest spec --coverage --passWithNoTests"
},
"dependencies": {
@@ -28,13 +29,13 @@
"devDependencies": {
"@types/jest": "^29.5.1",
"@types/node": "^20.5.7",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"@types/uuid": "^9.0.3",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"eslint": "^8.39.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"prettier": "^3.0.3",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4"
}

View File

@@ -5,7 +5,10 @@ import { UniqueEntityId } from './UniqueEntityId'
export abstract class Entity<T> {
protected readonly _id: UniqueEntityId
constructor(public readonly props: T, id?: UniqueEntityId) {
constructor(
public readonly props: T,
id?: UniqueEntityId,
) {
this._id = id ? id : new UniqueEntityId()
}

View File

@@ -1,7 +1,11 @@
/* istanbul ignore file */
export class Result<T> {
constructor(private isSuccess: boolean, private error?: string, private value?: T) {
constructor(
private isSuccess: boolean,
private error?: string,
private value?: T,
) {
Object.freeze(this)
}

View File

@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.12.21](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.12.20...@standardnotes/domain-events-infra@1.12.21) (2023-09-04)
**Note:** Version bump only for package @standardnotes/domain-events-infra
## [1.12.20](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.12.19...@standardnotes/domain-events-infra@1.12.20) (2023-09-01)
**Note:** Version bump only for package @standardnotes/domain-events-infra
## [1.12.19](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.12.18...@standardnotes/domain-events-infra@1.12.19) (2023-09-01)
**Note:** Version bump only for package @standardnotes/domain-events-infra
## [1.12.18](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.12.17...@standardnotes/domain-events-infra@1.12.18) (2023-09-01)
**Note:** Version bump only for package @standardnotes/domain-events-infra

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-events-infra",
"version": "1.12.18",
"version": "1.12.21",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -20,6 +20,7 @@
"clean": "rm -fr dist",
"build": "tsc --build",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"test": "jest spec --coverage"
},
"dependencies": {
@@ -34,12 +35,12 @@
"devDependencies": {
"@types/ioredis": "^5.0.0",
"@types/jest": "^29.5.1",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"eslint": "^8.39.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"prettier": "^3.0.3",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4"
},

View File

@@ -7,7 +7,10 @@ import {
} from '@standardnotes/domain-events'
export class DirectCallEventMessageHandler implements DomainEventMessageHandlerInterface {
constructor(private handlers: Map<string, DomainEventHandlerInterface>, private logger: Logger) {}
constructor(
private handlers: Map<string, DomainEventHandlerInterface>,
private logger: Logger,
) {}
async handleMessage(messageOrEvent: string | DomainEventInterface): Promise<void> {
if (typeof messageOrEvent === 'string') {

View File

@@ -4,7 +4,10 @@ import * as zlib from 'zlib'
import { DomainEventPublisherInterface, DomainEventInterface } from '@standardnotes/domain-events'
export class RedisDomainEventPublisher implements DomainEventPublisherInterface {
constructor(private redisClient: IORedis.Redis, private eventChannel: string) {}
constructor(
private redisClient: IORedis.Redis,
private eventChannel: string,
) {}
async publish(event: DomainEventInterface): Promise<void> {
const message = zlib.deflateSync(JSON.stringify(event)).toString('base64')

View File

@@ -3,7 +3,10 @@ import * as IORedis from 'ioredis'
import { DomainEventSubscriberInterface } from '@standardnotes/domain-events'
export class RedisDomainEventSubscriber implements DomainEventSubscriberInterface {
constructor(private redisClient: IORedis.Redis, private eventChannel: string) {}
constructor(
private redisClient: IORedis.Redis,
private eventChannel: string,
) {}
start(): void {
void this.redisClient.subscribe(this.eventChannel)

View File

@@ -8,7 +8,10 @@ import {
} from '@standardnotes/domain-events'
export class RedisEventMessageHandler implements DomainEventMessageHandlerInterface {
constructor(private handlers: Map<string, DomainEventHandlerInterface>, private logger: Logger) {}
constructor(
private handlers: Map<string, DomainEventHandlerInterface>,
private logger: Logger,
) {}
async handleMessage(message: string): Promise<void> {
try {

View File

@@ -4,7 +4,10 @@ import { MessageAttributeValue, PublishCommand, PublishCommandInput, SNSClient }
import { DomainEventInterface, DomainEventPublisherInterface } from '@standardnotes/domain-events'
export class SNSDomainEventPublisher implements DomainEventPublisherInterface {
constructor(private snsClient: SNSClient, private topicArn: string) {}
constructor(
private snsClient: SNSClient,
private topicArn: string,
) {}
async publish(event: DomainEventInterface): Promise<void> {
const message: PublishCommandInput = {

Some files were not shown because too many files have changed in this diff Show More