mirror of
https://github.com/standardnotes/server
synced 2026-01-20 05:04:28 -05:00
Compare commits
13 Commits
@standardn
...
@standardn
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f064176f2 | ||
|
|
c7b0c7dfa8 | ||
|
|
df20dd46db | ||
|
|
6dfd09989e | ||
|
|
fc821709e2 | ||
|
|
e986abaab5 | ||
|
|
a006fb3119 | ||
|
|
2af812eaf1 | ||
|
|
d13c975f94 | ||
|
|
1f7e4dd184 | ||
|
|
8b04216998 | ||
|
|
27ff25b70e | ||
|
|
dc3a41e4bb |
2
.github/workflows/common-deploy.yml
vendored
2
.github/workflows/common-deploy.yml
vendored
@@ -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 }}
|
||||
|
||||
4
.github/workflows/common-docker-image.yml
vendored
4
.github/workflows/common-docker-image.yml
vendored
@@ -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 }}
|
||||
|
||||
4
.github/workflows/common-e2e.yml
vendored
4
.github/workflows/common-e2e.yml
vendored
@@ -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]
|
||||
|
||||
2
.github/workflows/common-self-hosting.yml
vendored
2
.github/workflows/common-self-hosting.yml
vendored
@@ -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: .
|
||||
|
||||
BIN
.yarn/cache/@eslint-community-regexpp-npm-4.8.0-92ece47e3d-f6bfb776ff.zip
vendored
Normal file
BIN
.yarn/cache/@eslint-community-regexpp-npm-4.8.0-92ece47e3d-f6bfb776ff.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@pkgr-utils-npm-2.4.2-5333ff17f3-b400d4fe07.zip
vendored
Normal file
BIN
.yarn/cache/@pkgr-utils-npm-2.4.2-5333ff17f3-b400d4fe07.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@types-uuid-npm-9.0.3-988861045e-a5357c6447.zip
vendored
Normal file
BIN
.yarn/cache/@types-uuid-npm-9.0.3-988861045e-a5357c6447.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-eslint-plugin-npm-6.5.0-f2e890b07d-971ee3f9d2.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-eslint-plugin-npm-6.5.0-f2e890b07d-971ee3f9d2.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-parser-npm-6.5.0-2185874d65-0b789509e3.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-parser-npm-6.5.0-2185874d65-0b789509e3.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-scope-manager-npm-6.5.0-950a5168ee-25551c323f.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-scope-manager-npm-6.5.0-950a5168ee-25551c323f.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-type-utils-npm-6.5.0-805fdd8cb3-1c542cc1dd.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-type-utils-npm-6.5.0-805fdd8cb3-1c542cc1dd.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-types-npm-6.5.0-bab6e93f93-0e0d8fd4bd.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-types-npm-6.5.0-bab6e93f93-0e0d8fd4bd.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-typescript-estree-npm-6.5.0-a2645bd83f-fe858d8cb3.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-typescript-estree-npm-6.5.0-a2645bd83f-fe858d8cb3.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-utils-npm-6.5.0-653e9ae1c1-5bddf2feb9.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-utils-npm-6.5.0-653e9ae1c1-5bddf2feb9.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-visitor-keys-npm-6.5.0-f5e0d86a48-58846a7361.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-visitor-keys-npm-6.5.0-f5e0d86a48-58846a7361.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/big-integer-npm-1.6.51-1a244d8e1f-fc20ceb6b1.zip
vendored
Normal file
BIN
.yarn/cache/big-integer-npm-1.6.51-1a244d8e1f-fc20ceb6b1.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/bplist-parser-npm-0.2.0-91a681e495-d8a4607229.zip
vendored
Normal file
BIN
.yarn/cache/bplist-parser-npm-0.2.0-91a681e495-d8a4607229.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/bundle-name-npm-3.0.0-d7e52ba2a3-4cb6c319b9.zip
vendored
Normal file
BIN
.yarn/cache/bundle-name-npm-3.0.0-d7e52ba2a3-4cb6c319b9.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/default-browser-id-npm-3.0.0-f65ceaa214-14d2d42e1d.zip
vendored
Normal file
BIN
.yarn/cache/default-browser-id-npm-3.0.0-f65ceaa214-14d2d42e1d.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/default-browser-npm-4.0.0-e9e9c8aba0-ac1138a297.zip
vendored
Normal file
BIN
.yarn/cache/default-browser-npm-4.0.0-e9e9c8aba0-ac1138a297.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/define-lazy-prop-npm-3.0.0-6bb0fc1510-73a8f71f62.zip
vendored
Normal file
BIN
.yarn/cache/define-lazy-prop-npm-3.0.0-6bb0fc1510-73a8f71f62.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/eslint-plugin-prettier-npm-5.0.0-2f21113cba-c0bcb4e169.zip
vendored
Normal file
BIN
.yarn/cache/eslint-plugin-prettier-npm-5.0.0-2f21113cba-c0bcb4e169.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/fast-glob-npm-3.3.1-8045ff8f4d-e266590623.zip
vendored
Normal file
BIN
.yarn/cache/fast-glob-npm-3.3.1-8045ff8f4d-e266590623.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/is-docker-npm-2.2.1-3f18a53aff-4a6decb5f3.zip
vendored
Normal file
BIN
.yarn/cache/is-docker-npm-2.2.1-3f18a53aff-4a6decb5f3.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/is-docker-npm-3.0.0-1570e32177-91077b4db2.zip
vendored
Normal file
BIN
.yarn/cache/is-docker-npm-3.0.0-1570e32177-91077b4db2.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/is-inside-container-npm-1.0.0-f2c9e9bb96-8dc4c40610.zip
vendored
Normal file
BIN
.yarn/cache/is-inside-container-npm-1.0.0-f2c9e9bb96-8dc4c40610.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/is-wsl-npm-2.2.0-2ba10d6393-44a5dd51a5.zip
vendored
Normal file
BIN
.yarn/cache/is-wsl-npm-2.2.0-2ba10d6393-44a5dd51a5.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/open-npm-9.1.0-d104a17ec5-e1ac0dd901.zip
vendored
Normal file
BIN
.yarn/cache/open-npm-9.1.0-d104a17ec5-e1ac0dd901.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/prettier-npm-3.0.3-fced695dae-467e8febce.zip
vendored
Normal file
BIN
.yarn/cache/prettier-npm-3.0.3-fced695dae-467e8febce.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/run-applescript-npm-5.0.0-ea4b8840dd-5967da9f76.zip
vendored
Normal file
BIN
.yarn/cache/run-applescript-npm-5.0.0-ea4b8840dd-5967da9f76.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/synckit-npm-0.8.5-40a594eb38-4f8cad99ec.zip
vendored
Normal file
BIN
.yarn/cache/synckit-npm-0.8.5-40a594eb38-4f8cad99ec.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/titleize-npm-3.0.0-7deac2f3a3-8468b57b8e.zip
vendored
Normal file
BIN
.yarn/cache/titleize-npm-3.0.0-7deac2f3a3-8468b57b8e.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/ts-api-utils-npm-1.0.2-0fe6a86036-7513f3da1f.zip
vendored
Normal file
BIN
.yarn/cache/ts-api-utils-npm-1.0.2-0fe6a86036-7513f3da1f.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/tslib-npm-2.6.2-4fc8c068d9-e565469129.zip
vendored
Normal file
BIN
.yarn/cache/tslib-npm-2.6.2-4fc8c068d9-e565469129.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
@@ -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}`)
|
||||
|
||||
@@ -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}`)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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') {
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user