Compare commits

..

4 Commits

30 changed files with 172 additions and 20 deletions

43
.pnp.cjs generated
View File

@@ -6186,6 +6186,7 @@ const RAW_RUNTIME_STATE =
["@types/express", "npm:4.17.17"],\
["@types/ioredis", "npm:5.0.0"],\
["@types/jest", "npm:29.5.2"],\
["@types/mysql", "npm:2.15.22"],\
["@types/newrelic", "npm:9.14.0"],\
["@types/node", "npm:20.5.7"],\
["@typescript-eslint/eslint-plugin", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:6.5.0"],\
@@ -6201,6 +6202,7 @@ const RAW_RUNTIME_STATE =
["ioredis", "npm:5.3.2"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.5.0"],\
["mongodb", "virtual:365b8c88cdf194291829ee28b79556e2328175d26a621363e703848100bea0042e9500db2a1206c9bbc3a4a76a1d169639ef774b2ea3a1a98584a9936b58c6be#npm:6.0.0"],\
["mysql", "npm:2.18.1"],\
["mysql2", "npm:3.3.3"],\
["newrelic", "npm:11.0.0"],\
["prettier", "npm:3.0.3"],\
@@ -8336,6 +8338,13 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["bignumber.js", [\
["npm:9.0.0", {\
"packageLocation": "./.yarn/cache/bignumber.js-npm-9.0.0-ce190bcd7c-7406d0d11d.zip/node_modules/bignumber.js/",\
"packageDependencies": [\
["bignumber.js", "npm:9.0.0"]\
],\
"linkType": "HARD"\
}],\
["npm:9.1.1", {\
"packageLocation": "./.yarn/cache/bignumber.js-npm-9.1.1-5929e8d8dc-1f771bfa88.zip/node_modules/bignumber.js/",\
"packageDependencies": [\
@@ -13718,6 +13727,19 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["mysql", [\
["npm:2.18.1", {\
"packageLocation": "./.yarn/cache/mysql-npm-2.18.1-8fdb56201f-87d80e3747.zip/node_modules/mysql/",\
"packageDependencies": [\
["mysql", "npm:2.18.1"],\
["bignumber.js", "npm:9.0.0"],\
["readable-stream", "npm:2.3.7"],\
["safe-buffer", "npm:5.1.2"],\
["sqlstring", "npm:2.3.1"]\
],\
"linkType": "HARD"\
}]\
]],\
["mysql2", [\
["npm:3.3.3", {\
"packageLocation": "./.yarn/cache/mysql2-npm-3.3.3-d2fe8cf512-4bf7ace8f1.zip/node_modules/mysql2/",\
@@ -15255,6 +15277,20 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["readable-stream", [\
["npm:2.3.7", {\
"packageLocation": "./.yarn/cache/readable-stream-npm-2.3.7-77b22a9818-d04c677c17.zip/node_modules/readable-stream/",\
"packageDependencies": [\
["readable-stream", "npm:2.3.7"],\
["core-util-is", "npm:1.0.3"],\
["inherits", "npm:2.0.4"],\
["isarray", "npm:1.0.0"],\
["process-nextick-args", "npm:2.0.1"],\
["safe-buffer", "npm:5.1.2"],\
["string_decoder", "npm:1.1.1"],\
["util-deprecate", "npm:1.0.2"]\
],\
"linkType": "HARD"\
}],\
["npm:2.3.8", {\
"packageLocation": "./.yarn/cache/readable-stream-npm-2.3.8-67a94c2cb1-8500dd3a90.zip/node_modules/readable-stream/",\
"packageDependencies": [\
@@ -16022,6 +16058,13 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["sqlstring", [\
["npm:2.3.1", {\
"packageLocation": "./.yarn/cache/sqlstring-npm-2.3.1-2d4ffafe98-bc09237002.zip/node_modules/sqlstring/",\
"packageDependencies": [\
["sqlstring", "npm:2.3.1"]\
],\
"linkType": "HARD"\
}],\
["npm:2.3.3", {\
"packageLocation": "./.yarn/cache/sqlstring-npm-2.3.3-2db6939570-4e5a25af2d.zip/node_modules/sqlstring/",\
"packageDependencies": [\

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.27.10](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.27.9...@standardnotes/analytics@2.27.10) (2023-10-05)
**Note:** Version bump only for package @standardnotes/analytics
## [2.27.9](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.27.8...@standardnotes/analytics@2.27.9) (2023-10-05)
**Note:** Version bump only for package @standardnotes/analytics

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/analytics",
"version": "2.27.9",
"version": "2.27.10",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.76.2](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.76.1...@standardnotes/api-gateway@1.76.2) (2023-10-05)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.76.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.76.0...@standardnotes/api-gateway@1.76.1) (2023-10-05)
**Note:** Version bump only for package @standardnotes/api-gateway

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api-gateway",
"version": "1.76.1",
"version": "1.76.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.150.9](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.150.8...@standardnotes/auth-server@1.150.9) (2023-10-05)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.150.8](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.150.7...@standardnotes/auth-server@1.150.8) (2023-10-05)
**Note:** Version bump only for package @standardnotes/auth-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/auth-server",
"version": "1.150.8",
"version": "1.150.9",
"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.14.7](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.14.6...@standardnotes/domain-events-infra@1.14.7) (2023-10-05)
### Reverts
* Revert "fix(domain-events-infra): setting user metadata on workers" ([cd37c95](https://github.com/standardnotes/server/commit/cd37c951bbec0f1bf6443792db961efd27380eac))
## [1.14.6](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.14.5...@standardnotes/domain-events-infra@1.14.6) (2023-10-05)
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-events-infra",
"version": "1.14.6",
"version": "1.14.7",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -36,7 +36,7 @@ export class SQSXRayEventMessageHandler implements DomainEventMessageHandlerInte
const xRaySegment = new Segment(this.serviceName)
if (domainEvent.meta.correlation.userIdentifierType === 'uuid') {
xRaySegment.addMetadata('userUuid', domainEvent.meta.correlation.userIdentifier)
xRaySegment.setUser(domainEvent.meta.correlation.userIdentifier)
}
await captureAsyncFunc(

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.12.10](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.12.9...@standardnotes/event-store@1.12.10) (2023-10-05)
**Note:** Version bump only for package @standardnotes/event-store
## [1.12.9](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.12.8...@standardnotes/event-store@1.12.9) (2023-10-05)
**Note:** Version bump only for package @standardnotes/event-store

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/event-store",
"version": "1.12.9",
"version": "1.12.10",
"description": "Event Store Service",
"private": true,
"main": "dist/src/index.js",

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.26.2](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.26.1...@standardnotes/files-server@1.26.2) (2023-10-05)
**Note:** Version bump only for package @standardnotes/files-server
## [1.26.1](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.26.0...@standardnotes/files-server@1.26.1) (2023-10-05)
**Note:** Version bump only for package @standardnotes/files-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files-server",
"version": "1.26.1",
"version": "1.26.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

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.27](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.16.26...@standardnotes/home-server@1.16.27) (2023-10-05)
**Note:** Version bump only for package @standardnotes/home-server
## [1.16.26](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.16.25...@standardnotes/home-server@1.16.26) (2023-10-05)
**Note:** Version bump only for package @standardnotes/home-server
## [1.16.25](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.16.24...@standardnotes/home-server@1.16.25) (2023-10-05)
**Note:** Version bump only for package @standardnotes/home-server

View File

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

View File

@@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.39.4](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.39.3...@standardnotes/revisions-server@1.39.4) (2023-10-05)
### Bug Fixes
* **revisions:** capture mysql to xray ([9f76e38](https://github.com/standardnotes/server/commit/9f76e389e21de4cf9629cd40849704ffb0e51fe9))
## [1.39.3](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.39.2...@standardnotes/revisions-server@1.39.3) (2023-10-05)
**Note:** Version bump only for package @standardnotes/revisions-server
## [1.39.2](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.39.1...@standardnotes/revisions-server@1.39.2) (2023-10-05)
**Note:** Version bump only for package @standardnotes/revisions-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/revisions-server",
"version": "1.39.2",
"version": "1.39.4",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -44,6 +44,7 @@
"inversify-express-utils": "^6.4.3",
"ioredis": "^5.3.2",
"mongodb": "^6.0.0",
"mysql": "^2.18.1",
"mysql2": "^3.0.1",
"reflect-metadata": "0.1.13",
"sqlite3": "^5.1.6",
@@ -56,6 +57,7 @@
"@types/express": "^4.17.14",
"@types/ioredis": "^5.0.0",
"@types/jest": "^29.5.1",
"@types/mysql": "^2",
"@types/node": "^20.5.7",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",

View File

@@ -1,3 +1,5 @@
import * as mysqlDriver from 'mysql'
import { captureMySQL } from 'aws-xray-sdk'
import { DataSource, EntityTarget, LoggerOptions, MongoRepository, ObjectLiteral, Repository } from 'typeorm'
import { MysqlConnectionOptions } from 'typeorm/driver/mysql/MysqlConnectionOptions'
@@ -117,9 +119,15 @@ export class AppDataSource {
restoreNodeTimeout: 5,
}
let driver = undefined
if (!isConfiguredForHomeServerOrSelfHosting) {
driver = captureMySQL(mysqlDriver)
}
const mySQLDataSourceOptions: MysqlConnectionOptions = {
...commonDataSourceOptions,
type: 'mysql',
driver,
charset: 'utf8mb4',
supportBigNumbers: true,
bigNumberStrings: false,

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.21.10](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.21.9...@standardnotes/scheduler-server@1.21.10) (2023-10-05)
**Note:** Version bump only for package @standardnotes/scheduler-server
## [1.21.9](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.21.8...@standardnotes/scheduler-server@1.21.9) (2023-10-05)
**Note:** Version bump only for package @standardnotes/scheduler-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/scheduler-server",
"version": "1.21.9",
"version": "1.21.10",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.111.2](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.111.1...@standardnotes/syncing-server@1.111.2) (2023-10-05)
**Note:** Version bump only for package @standardnotes/syncing-server
## [1.111.1](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.111.0...@standardnotes/syncing-server@1.111.1) (2023-10-05)
**Note:** Version bump only for package @standardnotes/syncing-server

View File

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

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.11.10](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.11.9...@standardnotes/websockets-server@1.11.10) (2023-10-05)
**Note:** Version bump only for package @standardnotes/websockets-server
## [1.11.9](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.11.8...@standardnotes/websockets-server@1.11.9) (2023-10-05)
**Note:** Version bump only for package @standardnotes/websockets-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/websockets-server",
"version": "1.11.9",
"version": "1.11.10",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -5077,6 +5077,7 @@ __metadata:
"@types/express": "npm:^4.17.14"
"@types/ioredis": "npm:^5.0.0"
"@types/jest": "npm:^29.5.1"
"@types/mysql": "npm:^2"
"@types/newrelic": "npm:^9.14.0"
"@types/node": "npm:^20.5.7"
"@typescript-eslint/eslint-plugin": "npm:^6.5.0"
@@ -5092,6 +5093,7 @@ __metadata:
ioredis: "npm:^5.3.2"
jest: "npm:^29.5.0"
mongodb: "npm:^6.0.0"
mysql: "npm:^2.18.1"
mysql2: "npm:^3.0.1"
newrelic: "npm:^11.0.0"
prettier: "npm:^3.0.3"
@@ -5757,7 +5759,7 @@ __metadata:
languageName: node
linkType: hard
"@types/mysql@npm:*":
"@types/mysql@npm:*, @types/mysql@npm:^2":
version: 2.15.22
resolution: "@types/mysql@npm:2.15.22"
dependencies:
@@ -6833,6 +6835,13 @@ __metadata:
languageName: node
linkType: hard
"bignumber.js@npm:9.0.0":
version: 9.0.0
resolution: "bignumber.js@npm:9.0.0"
checksum: 7406d0d11dfdd2183e19be745f0d5913e3773ded5fbca2a310221e719f15fd8ec6b8d7991031a6081a6276a8e12e27d58ead60f73dcbb9d697ebe9e2dd0ad7e0
languageName: node
linkType: hard
"bignumber.js@npm:^9.0.0":
version: 9.1.1
resolution: "bignumber.js@npm:9.1.1"
@@ -11592,6 +11601,18 @@ __metadata:
languageName: node
linkType: hard
"mysql@npm:^2.18.1":
version: 2.18.1
resolution: "mysql@npm:2.18.1"
dependencies:
bignumber.js: "npm:9.0.0"
readable-stream: "npm:2.3.7"
safe-buffer: "npm:5.1.2"
sqlstring: "npm:2.3.1"
checksum: 87d80e374717d7767d3e609f7f5e09987fa4dee208ba346ff269fffd2500719dcf2f65ac86c8e77649c3d52b86811a88e33cfd06e7e4a48cec53ecd4ac85c08d
languageName: node
linkType: hard
"mz@npm:^2.4.0":
version: 2.7.0
resolution: "mz@npm:2.7.0"
@@ -12960,6 +12981,21 @@ __metadata:
languageName: node
linkType: hard
"readable-stream@npm:2.3.7":
version: 2.3.7
resolution: "readable-stream@npm:2.3.7"
dependencies:
core-util-is: "npm:~1.0.0"
inherits: "npm:~2.0.3"
isarray: "npm:~1.0.0"
process-nextick-args: "npm:~2.0.0"
safe-buffer: "npm:~5.1.1"
string_decoder: "npm:~1.1.1"
util-deprecate: "npm:~1.0.1"
checksum: d04c677c1705e3fc6283d45859a23f4c05243d0c0f1fc08cb8f995b4d69f0eb7f38ec0ec102f0ee20535c5d999ee27449f40aa2edf6bf30c24d0cc8f8efeb6d7
languageName: node
linkType: hard
"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.0.2, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0, readable-stream@npm:^3.6.1":
version: 3.6.2
resolution: "readable-stream@npm:3.6.2"
@@ -13244,6 +13280,13 @@ __metadata:
languageName: node
linkType: hard
"safe-buffer@npm:5.1.2, safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1":
version: 5.1.2
resolution: "safe-buffer@npm:5.1.2"
checksum: 7eb5b48f2ed9a594a4795677d5a150faa7eb54483b2318b568dc0c4fc94092a6cce5be02c7288a0500a156282f5276d5688bce7259299568d1053b2150ef374a
languageName: node
linkType: hard
"safe-buffer@npm:5.2.1, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0":
version: 5.2.1
resolution: "safe-buffer@npm:5.2.1"
@@ -13251,13 +13294,6 @@ __metadata:
languageName: node
linkType: hard
"safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1":
version: 5.1.2
resolution: "safe-buffer@npm:5.1.2"
checksum: 7eb5b48f2ed9a594a4795677d5a150faa7eb54483b2318b568dc0c4fc94092a6cce5be02c7288a0500a156282f5276d5688bce7259299568d1053b2150ef374a
languageName: node
linkType: hard
"safe-stable-stringify@npm:^2.3.1":
version: 2.4.3
resolution: "safe-stable-stringify@npm:2.4.3"
@@ -13688,6 +13724,13 @@ __metadata:
languageName: node
linkType: hard
"sqlstring@npm:2.3.1":
version: 2.3.1
resolution: "sqlstring@npm:2.3.1"
checksum: bc09237002da7e1172098e7d47401ea0ae45c1e4b224619f7ee2905dc921321f5ccc8c5e076994890df01b4a3363b2b5ea295b7a10d32a35181ef25bad158093
languageName: node
linkType: hard
"sqlstring@npm:^2.3.2":
version: 2.3.3
resolution: "sqlstring@npm:2.3.3"