Compare commits

...

16 Commits

Author SHA1 Message Date
standardci
4c0bc82090 chore(release): publish new version
- @standardnotes/analytics@2.34.9
 - @standardnotes/api-gateway@1.89.7
 - @standardnotes/auth-server@1.177.4
 - @standardnotes/common@1.52.2
 - @standardnotes/domain-events-infra@1.22.8
 - @standardnotes/domain-events@2.139.2
 - @standardnotes/files-server@1.37.3
 - @standardnotes/home-server@1.22.28
 - @standardnotes/revisions-server@1.51.9
 - @standardnotes/scheduler-server@1.27.14
 - @standardnotes/security@1.17.3
 - @standardnotes/settings@1.23.2
 - @standardnotes/sncrypto-node@1.16.2
 - @standardnotes/syncing-server@1.129.5
 - @standardnotes/time@1.18.2
 - @standardnotes/websockets-server@1.22.5
2023-12-28 10:26:09 +00:00
Karol Sójko
f3598fa5a1 chore: upgrade reflect-metadata package (#1009) 2023-12-28 11:05:06 +01:00
standardci
8097d7239d chore(release): publish new version
- @standardnotes/analytics@2.34.8
 - @standardnotes/api-gateway@1.89.6
 - @standardnotes/auth-server@1.177.3
 - @standardnotes/domain-events-infra@1.22.7
 - @standardnotes/domain-events@2.139.1
 - @standardnotes/files-server@1.37.2
 - @standardnotes/home-server@1.22.27
 - @standardnotes/revisions-server@1.51.8
 - @standardnotes/scheduler-server@1.27.13
 - @standardnotes/syncing-server@1.129.4
 - @standardnotes/websockets-server@1.22.4
2023-12-26 11:09:32 +00:00
Karol Sójko
7962b245b5 fix: stop revisions propagation (#1008) 2023-12-26 11:40:09 +01:00
standardci
ce0450becf chore(release): publish new version
- @standardnotes/api-gateway@1.89.5
 - @standardnotes/auth-server@1.177.2
 - @standardnotes/home-server@1.22.26
 - @standardnotes/syncing-server@1.129.3
2023-12-22 14:03:05 +00:00
Karol Sójko
0762ed1127 fix: logs severity 2023-12-22 14:42:41 +01:00
standardci
3563a0b64a chore(release): publish new version
- @standardnotes/api-gateway@1.89.4
 - @standardnotes/auth-server@1.177.1
 - @standardnotes/home-server@1.22.25
2023-12-22 11:50:04 +00:00
Karol Sójko
0342cdcfc0 fix(auth): specs issue 2023-12-22 12:19:44 +01:00
Karol Sójko
b1cb6a1d21 fix: case sensitive typo 2023-12-22 12:14:58 +01:00
standardci
615e4184f6 chore(release): publish new version
- @standardnotes/api-gateway@1.89.3
 - @standardnotes/home-server@1.22.24
 - @standardnotes/syncing-server@1.129.2
2023-12-22 10:35:31 +00:00
Karol Sójko
54091f23da fix: add more readonly access debug logs 2023-12-22 11:14:54 +01:00
Karol Sójko
e4a8324db2 fix(api-gateway): add debug log for operating on readonly access 2023-12-22 11:08:46 +01:00
standardci
01bb55be39 chore(release): publish new version
- @standardnotes/api-gateway@1.89.2
 - @standardnotes/home-server@1.22.23
2023-12-21 15:35:54 +00:00
Karol Sójko
e551a364f6 fix(api-gateway): missing readonly access for demo when utilizing grpc workflow (#1005) 2023-12-21 16:14:55 +01:00
standardci
7e65f85377 chore(release): publish new version
- @standardnotes/files-server@1.37.1
 - @standardnotes/home-server@1.22.22
2023-12-14 12:29:00 +00:00
Karol Sójko
e6a21606a3 fix(files): list files command 2023-12-14 13:08:18 +01:00
68 changed files with 656 additions and 66 deletions

37
.pnp.cjs generated
View File

@@ -5502,7 +5502,7 @@ const RAW_RUNTIME_STATE =
["mixpanel", "npm:0.17.0"],\
["mysql2", "npm:3.3.3"],\
["prettier", "npm:3.0.3"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
["typeorm", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:0.3.17"],\
["typescript", "patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058"],\
@@ -5564,7 +5564,7 @@ const RAW_RUNTIME_STATE =
["jsonwebtoken", "npm:9.0.0"],\
["prettier", "npm:3.0.3"],\
["prettyjson", "npm:1.2.5"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
["typescript", "patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058"],\
["winston", "npm:3.9.0"]\
@@ -5626,7 +5626,7 @@ const RAW_RUNTIME_STATE =
["otplib", "npm:12.0.1"],\
["prettier", "npm:3.0.3"],\
["prettyjson", "npm:1.2.5"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["sqlite3", "virtual:31b5a94a105c89c9294c3d524a7f8929fe63ee5a2efadf21951ca4c0cfd2ecf02e8f4ef5a066bbda091f1e3a56e57c6749069a080618c96b22e51131a330fc4a#npm:5.1.6"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
["typeorm", "virtual:31b5a94a105c89c9294c3d524a7f8929fe63ee5a2efadf21951ca4c0cfd2ecf02e8f4ef5a066bbda091f1e3a56e57c6749069a080618c96b22e51131a330fc4a#npm:0.3.17"],\
@@ -5651,7 +5651,7 @@ const RAW_RUNTIME_STATE =
["eslint-plugin-prettier", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.0.0"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.5.0"],\
["prettier", "npm:3.0.3"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
["typescript", "patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058"]\
],\
@@ -5730,7 +5730,7 @@ const RAW_RUNTIME_STATE =
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.5.0"],\
["opentelemetry-instrumentation-typeorm", "virtual:685a6222c3349423674bb7f0684ba34e2ab20912010f352e04dcf707a156e13183fc382e2417cb37a60f3e7b52fd0178c53181674890e1773eb83e190dc13378#npm:0.39.1"],\
["prettier", "npm:3.0.3"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["sqs-consumer", "virtual:685a6222c3349423674bb7f0684ba34e2ab20912010f352e04dcf707a156e13183fc382e2417cb37a60f3e7b52fd0178c53181674890e1773eb83e190dc13378#npm:8.1.0"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
["typescript", "patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058"],\
@@ -5795,7 +5795,7 @@ const RAW_RUNTIME_STATE =
["jsonwebtoken", "npm:9.0.0"],\
["prettier", "npm:3.0.3"],\
["prettyjson", "npm:1.2.5"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
["typescript", "patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058"],\
["uuid", "npm:9.0.0"],\
@@ -5845,7 +5845,7 @@ const RAW_RUNTIME_STATE =
["inversify", "npm:6.0.1"],\
["inversify-express-utils", "npm:6.4.3"],\
["prettier", "npm:3.0.3"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["typescript", "patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058"],\
["winston", "npm:3.9.0"]\
],\
@@ -5934,7 +5934,7 @@ const RAW_RUNTIME_STATE =
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.5.0"],\
["mysql2", "npm:3.3.3"],\
["prettier", "npm:3.0.3"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["sqlite3", "virtual:31b5a94a105c89c9294c3d524a7f8929fe63ee5a2efadf21951ca4c0cfd2ecf02e8f4ef5a066bbda091f1e3a56e57c6749069a080618c96b22e51131a330fc4a#npm:5.1.6"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
["typeorm", "virtual:31b5a94a105c89c9294c3d524a7f8929fe63ee5a2efadf21951ca4c0cfd2ecf02e8f4ef5a066bbda091f1e3a56e57c6749069a080618c96b22e51131a330fc4a#npm:0.3.17"],\
@@ -5970,7 +5970,7 @@ const RAW_RUNTIME_STATE =
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.5.0"],\
["mysql2", "npm:3.3.3"],\
["prettier", "npm:3.0.3"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
["typeorm", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:0.3.17"],\
["typescript", "patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058"],\
@@ -5993,7 +5993,7 @@ const RAW_RUNTIME_STATE =
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.5.0"],\
["jsonwebtoken", "npm:9.0.0"],\
["prettier", "npm:3.0.3"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
["typescript", "patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058"]\
],\
@@ -6034,7 +6034,7 @@ const RAW_RUNTIME_STATE =
["eslint", "npm:8.41.0"],\
["eslint-plugin-prettier", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.0.0"],\
["prettier", "npm:3.0.3"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["typescript", "patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058"]\
],\
"linkType": "SOFT"\
@@ -6064,7 +6064,7 @@ const RAW_RUNTIME_STATE =
["eslint-plugin-prettier", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.0.0"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.5.0"],\
["prettier", "npm:3.0.3"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["regenerator-runtime", "npm:0.13.11"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
["ts-loader", "virtual:251b55e6186f136d0456117ba65ba163d1a38b49e5d09875aa42c66c71e5a9085f9a3cc24c7aae5da7499c53d95e6948b9284db4d7d1f035f288826df740c6bf#npm:9.4.3"],\
@@ -6121,7 +6121,7 @@ const RAW_RUNTIME_STATE =
["mysql2", "npm:3.3.3"],\
["prettier", "npm:3.0.3"],\
["prettyjson", "npm:1.2.5"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["semver", "npm:7.5.4"],\
["sqlite3", "virtual:31b5a94a105c89c9294c3d524a7f8929fe63ee5a2efadf21951ca4c0cfd2ecf02e8f4ef5a066bbda091f1e3a56e57c6749069a080618c96b22e51131a330fc4a#npm:5.1.6"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
@@ -6149,7 +6149,7 @@ const RAW_RUNTIME_STATE =
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.5.0"],\
["microtime", "npm:3.1.1"],\
["prettier", "npm:3.0.3"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
["typescript", "patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058"]\
],\
@@ -6200,7 +6200,7 @@ const RAW_RUNTIME_STATE =
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.5.0"],\
["mysql2", "npm:3.3.3"],\
["prettier", "npm:3.0.3"],\
["reflect-metadata", "npm:0.1.13"],\
["reflect-metadata", "npm:0.2.1"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
["typeorm", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:0.3.17"],\
["typescript", "patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058"],\
@@ -14478,6 +14478,13 @@ const RAW_RUNTIME_STATE =
["reflect-metadata", "npm:0.1.13"]\
],\
"linkType": "HARD"\
}],\
["npm:0.2.1", {\
"packageLocation": "./.yarn/cache/reflect-metadata-npm-0.2.1-7f12b5924d-394b293bd4.zip/node_modules/reflect-metadata/",\
"packageDependencies": [\
["reflect-metadata", "npm:0.2.1"]\
],\
"linkType": "HARD"\
}]\
]],\
["regenerator-runtime", [\

Binary file not shown.

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.
## [2.34.9](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.34.8...@standardnotes/analytics@2.34.9) (2023-12-28)
**Note:** Version bump only for package @standardnotes/analytics
## [2.34.8](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.34.7...@standardnotes/analytics@2.34.8) (2023-12-26)
**Note:** Version bump only for package @standardnotes/analytics
## [2.34.7](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.34.6...@standardnotes/analytics@2.34.7) (2023-12-14)
**Note:** Version bump only for package @standardnotes/analytics

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/analytics",
"version": "2.34.7",
"version": "2.34.9",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -58,7 +58,7 @@
"ioredis": "^5.2.4",
"mixpanel": "^0.17.0",
"mysql2": "^3.0.1",
"reflect-metadata": "^0.1.13",
"reflect-metadata": "^0.2.1",
"typeorm": "^0.3.17",
"winston": "^3.8.1"
}

View File

@@ -3,6 +3,39 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.89.7](https://github.com/standardnotes/server/compare/@standardnotes/api-gateway@1.89.6...@standardnotes/api-gateway@1.89.7) (2023-12-28)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.89.6](https://github.com/standardnotes/server/compare/@standardnotes/api-gateway@1.89.5...@standardnotes/api-gateway@1.89.6) (2023-12-26)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.89.5](https://github.com/standardnotes/server/compare/@standardnotes/api-gateway@1.89.4...@standardnotes/api-gateway@1.89.5) (2023-12-22)
### Bug Fixes
* logs severity ([0762ed1](https://github.com/standardnotes/server/commit/0762ed1127a5de295bd50c14afad31c7fb88a853))
## [1.89.4](https://github.com/standardnotes/server/compare/@standardnotes/api-gateway@1.89.3...@standardnotes/api-gateway@1.89.4) (2023-12-22)
### Bug Fixes
* case sensitive typo ([b1cb6a1](https://github.com/standardnotes/server/commit/b1cb6a1d21479b67d9826b55e1221a803e2f41a7))
## [1.89.3](https://github.com/standardnotes/server/compare/@standardnotes/api-gateway@1.89.2...@standardnotes/api-gateway@1.89.3) (2023-12-22)
### Bug Fixes
* add more readonly access debug logs ([54091f2](https://github.com/standardnotes/server/commit/54091f23da33a5d1df2ecffdfa559e3fa4c562f6))
* **api-gateway:** add debug log for operating on readonly access ([e4a8324](https://github.com/standardnotes/server/commit/e4a8324db26454a7587f37096653ad9565541295))
## [1.89.2](https://github.com/standardnotes/server/compare/@standardnotes/api-gateway@1.89.1...@standardnotes/api-gateway@1.89.2) (2023-12-21)
### Bug Fixes
* **api-gateway:** missing readonly access for demo when utilizing grpc workflow ([#1005](https://github.com/standardnotes/server/issues/1005)) ([e551a36](https://github.com/standardnotes/server/commit/e551a364f63e28c9329dbce492488b9f112e3473))
## [1.89.1](https://github.com/standardnotes/server/compare/@standardnotes/api-gateway@1.89.0...@standardnotes/api-gateway@1.89.1) (2023-12-14)
**Note:** Version bump only for package @standardnotes/api-gateway

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api-gateway",
"version": "1.89.1",
"version": "1.89.7",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -50,7 +50,7 @@
"ioredis": "^5.2.4",
"jsonwebtoken": "^9.0.0",
"prettyjson": "^1.2.5",
"reflect-metadata": "0.1.13",
"reflect-metadata": "^0.2.1",
"winston": "^3.8.1"
},
"devDependencies": {

View File

@@ -74,6 +74,13 @@ export abstract class AuthMiddleware extends BaseMiddleware {
response.locals.session = decodedToken.session
response.locals.roles = decodedToken.roles
response.locals.sharedVaultOwnerContext = decodedToken.shared_vault_owner_context
response.locals.readOnlyAccess = decodedToken.session?.readonly_access ?? false
if (response.locals.readOnlyAccess) {
this.logger.debug('User operates on read-only access', {
codeTag: 'AuthMiddleware',
userId: response.locals.user.uuid,
})
}
response.locals.belongsToSharedVaults = decodedToken.belongs_to_shared_vaults ?? []
} catch (error) {
let detailedErrorMessage = (error as Error).message

View File

@@ -27,7 +27,13 @@ export class GRPCSyncingServerServiceProxy {
const metadata = new Metadata()
metadata.set('x-user-uuid', response.locals.user.uuid)
metadata.set('x-snjs-version', request.headers['x-snjs-version'] as string)
metadata.set('x-read-only-access', response.locals.readonlyAccess ? 'true' : 'false')
metadata.set('x-read-only-access', response.locals.readOnlyAccess ? 'true' : 'false')
if (response.locals.readOnlyAccess) {
this.logger.debug('Syncing with read-only access', {
codeTag: 'GRPCSyncingServerServiceProxy',
userId: response.locals.user.uuid,
})
}
if (response.locals.session) {
metadata.set('x-session-uuid', response.locals.session.uuid)
}

View File

@@ -3,6 +3,29 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.177.4](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.177.3...@standardnotes/auth-server@1.177.4) (2023-12-28)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.177.3](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.177.2...@standardnotes/auth-server@1.177.3) (2023-12-26)
### Bug Fixes
* stop revisions propagation ([#1008](https://github.com/standardnotes/server/issues/1008)) ([7962b24](https://github.com/standardnotes/server/commit/7962b245b51703ff7d33728dee117b2074f2692a))
## [1.177.2](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.177.1...@standardnotes/auth-server@1.177.2) (2023-12-22)
### Bug Fixes
* logs severity ([0762ed1](https://github.com/standardnotes/server/commit/0762ed1127a5de295bd50c14afad31c7fb88a853))
## [1.177.1](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.177.0...@standardnotes/auth-server@1.177.1) (2023-12-22)
### Bug Fixes
* **auth:** specs issue ([0342cdc](https://github.com/standardnotes/server/commit/0342cdcfc06bd3bb0192a428c30c5af15e5eb0d7))
* case sensitive typo ([b1cb6a1](https://github.com/standardnotes/server/commit/b1cb6a1d21479b67d9826b55e1221a803e2f41a7))
# [1.177.0](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.176.5...@standardnotes/auth-server@1.177.0) (2023-12-14)
### Features

View File

@@ -0,0 +1,71 @@
import 'reflect-metadata'
import { Logger } from 'winston'
import { ContainerConfigLoader } from '../src/Bootstrap/Container'
import TYPES from '../src/Bootstrap/Types'
import { Env } from '../src/Bootstrap/Env'
import { DomainEventPublisherInterface } from '@standardnotes/domain-events'
import { DomainEventFactoryInterface } from '../src/Domain/Event/DomainEventFactoryInterface'
import { UserSubscriptionRepositoryInterface } from '../src/Domain/Subscription/UserSubscriptionRepositoryInterface'
import { SubscriptionPlanName } from '@standardnotes/domain-core'
const requestCleanup = async (
userSubscriptionRepository: UserSubscriptionRepositoryInterface,
domainEventFactory: DomainEventFactoryInterface,
domainEventPublisher: DomainEventPublisherInterface,
): Promise<void> => {
const proSubscriptionPlan = SubscriptionPlanName.create(SubscriptionPlanName.NAMES.ProPlan).getValue()
const plusSubscriptionPlan = SubscriptionPlanName.create(SubscriptionPlanName.NAMES.PlusPlan).getValue()
const totalSubscriptions = await userSubscriptionRepository.countByPlanName([
proSubscriptionPlan,
plusSubscriptionPlan,
])
const limitPerPage = 100
const numberOfPages = Math.ceil(totalSubscriptions / limitPerPage)
for (let i = 0; i < numberOfPages; i++) {
const subscriptions = await userSubscriptionRepository.findByPlanName(
[proSubscriptionPlan, plusSubscriptionPlan],
i * limitPerPage,
limitPerPage,
)
for (const subscription of subscriptions) {
await domainEventPublisher.publish(
domainEventFactory.createRevisionsCleanupRequestedEvent({
userUuid: subscription.userUuid,
}),
)
}
}
}
const container = new ContainerConfigLoader('worker')
void container.load().then((container) => {
const env: Env = new Env()
env.load()
const logger: Logger = container.get(TYPES.Auth_Logger)
logger.info('Starting revisions cleanup triggering...')
const domainEventFactory = container.get<DomainEventFactoryInterface>(TYPES.Auth_DomainEventFactory)
const domainEventPublisher = container.get<DomainEventPublisherInterface>(TYPES.Auth_DomainEventPublisher)
const userSubscriptionRepository = container.get<UserSubscriptionRepositoryInterface>(
TYPES.Auth_UserSubscriptionRepository,
)
Promise.resolve(requestCleanup(userSubscriptionRepository, domainEventFactory, domainEventPublisher))
.then(() => {
logger.info('Finished revisions cleanup triggering')
process.exit(0)
})
.catch((error) => {
logger.error(`Failed to trigger revisions cleanup: ${(error as Error).message}`)
process.exit(1)
})
})

View File

@@ -0,0 +1,11 @@
'use strict'
const path = require('path')
const pnp = require(path.normalize(path.resolve(__dirname, '../../..', '.pnp.cjs'))).setup()
const index = require(path.normalize(path.resolve(__dirname, '../dist/bin/revisions_cleanup.js')))
Object.defineProperty(exports, '__esModule', { value: true })
exports.default = index

View File

@@ -44,6 +44,10 @@ case "$COMMAND" in
exec node docker/entrypoint-delete-accounts.js $FILE_NAME $MODE
;;
'revisions-cleanup' )
exec node docker/entrypoint-revisions-cleanup.js
;;
* )
echo "[Docker] Unknown command"
;;

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/auth-server",
"version": "1.177.0",
"version": "1.177.4",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -71,7 +71,7 @@
"mysql2": "^3.0.1",
"otplib": "12.0.1",
"prettyjson": "^1.2.5",
"reflect-metadata": "0.1.13",
"reflect-metadata": "^0.2.1",
"sqlite3": "^5.1.6",
"typeorm": "^0.3.17",
"ua-parser-js": "^1.0.35",

View File

@@ -27,6 +27,7 @@ describe('AuthenticationMethodResolver', () => {
beforeEach(() => {
logger = {} as jest.Mocked<Logger>
logger.debug = jest.fn()
logger.info = jest.fn()
user = {} as jest.Mocked<User>

View File

@@ -36,6 +36,10 @@ export class AuthenticationMethodResolver implements AuthenticationMethodResolve
}
const userUuid = userUuidOrError.getValue()
this.logger.debug('User utilizing JWT authentication method.', {
userId: userUuid.value,
})
return {
type: 'jwt',
user: await this.userRepository.findOneByUuid(userUuid),

View File

@@ -22,6 +22,7 @@ import {
SessionRefreshedEvent,
AccountDeletionVerificationRequestedEvent,
FileQuotaRecalculationRequestedEvent,
RevisionsCleanupRequestedEvent,
} from '@standardnotes/domain-events'
import { Predicate, PredicateVerificationResult } from '@standardnotes/predicates'
import { TimerInterface } from '@standardnotes/time'
@@ -35,6 +36,21 @@ import { KeyParamsData } from '@standardnotes/responses'
export class DomainEventFactory implements DomainEventFactoryInterface {
constructor(@inject(TYPES.Auth_Timer) private timer: TimerInterface) {}
createRevisionsCleanupRequestedEvent(dto: { userUuid: string }): RevisionsCleanupRequestedEvent {
return {
type: 'REVISIONS_CLEANUP_REQUESTED',
createdAt: this.timer.getUTCDate(),
meta: {
correlation: {
userIdentifier: dto.userUuid,
userIdentifierType: 'uuid',
},
origin: DomainEventService.Auth,
},
payload: dto,
}
}
createFileQuotaRecalculationRequestedEvent(dto: { userUuid: string }): FileQuotaRecalculationRequestedEvent {
return {
type: 'FILE_QUOTA_RECALCULATION_REQUESTED',

View File

@@ -20,11 +20,13 @@ import {
SessionRefreshedEvent,
AccountDeletionVerificationRequestedEvent,
FileQuotaRecalculationRequestedEvent,
RevisionsCleanupRequestedEvent,
} from '@standardnotes/domain-events'
import { InviteeIdentifierType } from '../SharedSubscription/InviteeIdentifierType'
import { KeyParamsData } from '@standardnotes/responses'
export interface DomainEventFactoryInterface {
createRevisionsCleanupRequestedEvent(dto: { userUuid: string }): RevisionsCleanupRequestedEvent
createFileQuotaRecalculationRequestedEvent(dto: { userUuid: string }): FileQuotaRecalculationRequestedEvent
createWebSocketMessageRequestedEvent(dto: { userUuid: string; message: JSONString }): WebSocketMessageRequestedEvent
createEmailRequestedEvent(dto: {

View File

@@ -1,3 +1,4 @@
import { SubscriptionPlanName } from '@standardnotes/domain-core'
import { UserSubscription } from './UserSubscription'
import { UserSubscriptionType } from './UserSubscriptionType'
@@ -7,6 +8,8 @@ export interface UserSubscriptionRepositoryInterface {
findOneByUserUuid(userUuid: string): Promise<UserSubscription | null>
findOneByUserUuidAndType(userUuid: string, type: UserSubscriptionType): Promise<UserSubscription | null>
findByUserUuid(userUuid: string): Promise<UserSubscription[]>
countByPlanName(planNames: SubscriptionPlanName[]): Promise<number>
findByPlanName(planNames: SubscriptionPlanName[], offset: number, limit: number): Promise<UserSubscription[]>
findOneByUserUuidAndSubscriptionId(userUuid: string, subscriptionId: number): Promise<UserSubscription | null>
findBySubscriptionIdAndType(subscriptionId: number, type: UserSubscriptionType): Promise<UserSubscription[]>
findBySubscriptionId(subscriptionId: number): Promise<UserSubscription[]>

View File

@@ -6,6 +6,7 @@ import TYPES from '../../Bootstrap/Types'
import { UserSubscription } from '../../Domain/Subscription/UserSubscription'
import { UserSubscriptionRepositoryInterface } from '../../Domain/Subscription/UserSubscriptionRepositoryInterface'
import { UserSubscriptionType } from '../../Domain/Subscription/UserSubscriptionType'
import { SubscriptionPlanName } from '@standardnotes/domain-core'
@injectable()
export class TypeORMUserSubscriptionRepository implements UserSubscriptionRepositoryInterface {
@@ -15,6 +16,27 @@ export class TypeORMUserSubscriptionRepository implements UserSubscriptionReposi
@inject(TYPES.Auth_Timer) private timer: TimerInterface,
) {}
async countByPlanName(planNames: SubscriptionPlanName[]): Promise<number> {
return await this.ormRepository
.createQueryBuilder()
.where('plan_name IN (:...planNames)', {
planNames: planNames.map((planName) => planName.value),
})
.getCount()
}
async findByPlanName(planNames: SubscriptionPlanName[], offset: number, limit: number): Promise<UserSubscription[]> {
return await this.ormRepository
.createQueryBuilder()
.where('plan_name IN (:...planNames)', {
planNames: planNames.map((planName) => planName.value),
})
.orderBy('created_at', 'ASC')
.skip(offset)
.take(limit)
.getMany()
}
async countActiveSubscriptions(): Promise<number> {
return await this.ormRepository
.createQueryBuilder()

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.52.2](https://github.com/standardnotes/server/compare/@standardnotes/common@1.52.1...@standardnotes/common@1.52.2) (2023-12-28)
**Note:** Version bump only for package @standardnotes/common
## [1.52.1](https://github.com/standardnotes/server/compare/@standardnotes/common@1.52.0...@standardnotes/common@1.52.1) (2023-11-27)
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/common",
"version": "1.52.1",
"version": "1.52.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -41,6 +41,6 @@
"typescript": "^5.0.4"
},
"dependencies": {
"reflect-metadata": "^0.1.13"
"reflect-metadata": "^0.2.1"
}
}

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.22.8](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.22.7...@standardnotes/domain-events-infra@1.22.8) (2023-12-28)
**Note:** Version bump only for package @standardnotes/domain-events-infra
## [1.22.7](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.22.6...@standardnotes/domain-events-infra@1.22.7) (2023-12-26)
**Note:** Version bump only for package @standardnotes/domain-events-infra
## [1.22.6](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.22.5...@standardnotes/domain-events-infra@1.22.6) (2023-12-14)
**Note:** Version bump only for package @standardnotes/domain-events-infra

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-events-infra",
"version": "1.22.6",
"version": "1.22.8",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -48,7 +48,7 @@
"@standardnotes/domain-events": "workspace:*",
"ioredis": "^5.2.4",
"opentelemetry-instrumentation-typeorm": "^0.39.1",
"reflect-metadata": "^0.1.13",
"reflect-metadata": "^0.2.1",
"sqs-consumer": "^8.1.0",
"winston": "^3.8.1"
},

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.
## [2.139.2](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.139.1...@standardnotes/domain-events@2.139.2) (2023-12-28)
**Note:** Version bump only for package @standardnotes/domain-events
## [2.139.1](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.139.0...@standardnotes/domain-events@2.139.1) (2023-12-26)
### Bug Fixes
* stop revisions propagation ([#1008](https://github.com/standardnotes/server/issues/1008)) ([7962b24](https://github.com/standardnotes/server/commit/7962b245b51703ff7d33728dee117b2074f2692a))
# [2.139.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.138.2...@standardnotes/domain-events@2.139.0) (2023-12-14)
### Features

View File

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

View File

@@ -0,0 +1,7 @@
import { DomainEventInterface } from './DomainEventInterface'
import { ItemDeletedEventPayload } from './ItemDeletedEventPayload'
export interface ItemDeletedEvent extends DomainEventInterface {
type: 'ITEM_DELETED'
payload: ItemDeletedEventPayload
}

View File

@@ -0,0 +1,4 @@
export interface ItemDeletedEventPayload {
userUuid: string
itemUuid: string
}

View File

@@ -0,0 +1,7 @@
import { DomainEventInterface } from './DomainEventInterface'
import { RevisionsCleanupRequestedEventPayload } from './RevisionsCleanupRequestedEventPayload'
export interface RevisionsCleanupRequestedEvent extends DomainEventInterface {
type: 'REVISIONS_CLEANUP_REQUESTED'
payload: RevisionsCleanupRequestedEventPayload
}

View File

@@ -0,0 +1,3 @@
export interface RevisionsCleanupRequestedEventPayload {
userUuid: string
}

View File

@@ -40,6 +40,8 @@ export * from './Event/FileUploadedEvent'
export * from './Event/FileUploadedEventPayload'
export * from './Event/ItemDumpedEvent'
export * from './Event/ItemDumpedEventPayload'
export * from './Event/ItemDeletedEvent'
export * from './Event/ItemDeletedEventPayload'
export * from './Event/ItemRemovedFromSharedVaultEvent'
export * from './Event/ItemRemovedFromSharedVaultEventPayload'
export * from './Event/ItemRevisionCreationRequestedEvent'
@@ -70,6 +72,8 @@ export * from './Event/PredicateVerifiedEvent'
export * from './Event/PredicateVerifiedEventPayload'
export * from './Event/RefundProcessedEvent'
export * from './Event/RefundProcessedEventPayload'
export * from './Event/RevisionsCleanupRequestedEvent'
export * from './Event/RevisionsCleanupRequestedEventPayload'
export * from './Event/RevisionsCopyRequestedEvent'
export * from './Event/RevisionsCopyRequestedEventPayload'
export * from './Event/SessionCreatedEvent'

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.37.3](https://github.com/standardnotes/server/compare/@standardnotes/files-server@1.37.2...@standardnotes/files-server@1.37.3) (2023-12-28)
**Note:** Version bump only for package @standardnotes/files-server
## [1.37.2](https://github.com/standardnotes/server/compare/@standardnotes/files-server@1.37.1...@standardnotes/files-server@1.37.2) (2023-12-26)
**Note:** Version bump only for package @standardnotes/files-server
## [1.37.1](https://github.com/standardnotes/server/compare/@standardnotes/files-server@1.37.0...@standardnotes/files-server@1.37.1) (2023-12-14)
### Bug Fixes
* **files:** list files command ([e6a2160](https://github.com/standardnotes/server/commit/e6a21606a3070bbfbf2de9e4b10daa50c43c3786))
# [1.37.0](https://github.com/standardnotes/server/compare/@standardnotes/files-server@1.36.6...@standardnotes/files-server@1.37.0) (2023-12-14)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files-server",
"version": "1.37.0",
"version": "1.37.3",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -55,7 +55,7 @@
"ioredis": "^5.2.4",
"jsonwebtoken": "^9.0.0",
"prettyjson": "^1.2.5",
"reflect-metadata": "^0.1.13",
"reflect-metadata": "^0.2.1",
"winston": "^3.8.1"
},
"devDependencies": {

View File

@@ -38,7 +38,8 @@ export class S3FileDownloader implements FileDownloaderInterface {
async listFiles(userUuid: string): Promise<{ name: string; size: number }[]> {
const objectsList = await this.s3Client.send(
new ListObjectsV2Command({
Bucket: `${this.s3BuckeName}/${userUuid}/`,
Bucket: this.s3BuckeName,
Prefix: userUuid,
}),
)

View File

@@ -3,6 +3,34 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.22.28](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.22.27...@standardnotes/home-server@1.22.28) (2023-12-28)
**Note:** Version bump only for package @standardnotes/home-server
## [1.22.27](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.22.26...@standardnotes/home-server@1.22.27) (2023-12-26)
**Note:** Version bump only for package @standardnotes/home-server
## [1.22.26](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.22.25...@standardnotes/home-server@1.22.26) (2023-12-22)
**Note:** Version bump only for package @standardnotes/home-server
## [1.22.25](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.22.24...@standardnotes/home-server@1.22.25) (2023-12-22)
**Note:** Version bump only for package @standardnotes/home-server
## [1.22.24](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.22.23...@standardnotes/home-server@1.22.24) (2023-12-22)
**Note:** Version bump only for package @standardnotes/home-server
## [1.22.23](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.22.22...@standardnotes/home-server@1.22.23) (2023-12-21)
**Note:** Version bump only for package @standardnotes/home-server
## [1.22.22](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.22.21...@standardnotes/home-server@1.22.22) (2023-12-14)
**Note:** Version bump only for package @standardnotes/home-server
## [1.22.21](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.22.20...@standardnotes/home-server@1.22.21) (2023-12-14)
**Note:** Version bump only for package @standardnotes/home-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/home-server",
"version": "1.22.21",
"version": "1.22.28",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -40,7 +40,7 @@
"helmet": "^7.0.0",
"inversify": "^6.0.1",
"inversify-express-utils": "^6.4.3",
"reflect-metadata": "0.1.13",
"reflect-metadata": "^0.2.1",
"winston": "^3.8.1"
},
"devDependencies": {

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.51.9](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.51.8...@standardnotes/revisions-server@1.51.9) (2023-12-28)
**Note:** Version bump only for package @standardnotes/revisions-server
## [1.51.8](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.51.7...@standardnotes/revisions-server@1.51.8) (2023-12-26)
### Bug Fixes
* stop revisions propagation ([#1008](https://github.com/standardnotes/server/issues/1008)) ([7962b24](https://github.com/standardnotes/server/commit/7962b245b51703ff7d33728dee117b2074f2692a))
## [1.51.7](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.51.6...@standardnotes/revisions-server@1.51.7) (2023-12-14)
**Note:** Version bump only for package @standardnotes/revisions-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/revisions-server",
"version": "1.51.7",
"version": "1.51.9",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -48,7 +48,7 @@
"inversify-express-utils": "^6.4.3",
"ioredis": "^5.3.2",
"mysql2": "^3.0.1",
"reflect-metadata": "0.1.13",
"reflect-metadata": "^0.2.1",
"sqlite3": "^5.1.6",
"typeorm": "^0.3.17",
"winston": "^3.8.1"

View File

@@ -52,6 +52,8 @@ import { RemoveRevisionsFromSharedVault } from '../Domain/UseCase/RemoveRevision
import { ItemRemovedFromSharedVaultEventHandler } from '../Domain/Handler/ItemRemovedFromSharedVaultEventHandler'
import { SharedVaultRemovedEventHandler } from '../Domain/Handler/SharedVaultRemovedEventHandler'
import { CreateRevisionFromDump } from '../Domain/UseCase/CreateRevisionFromDump/CreateRevisionFromDump'
import { DeleteRevisions } from '../Domain/UseCase/DeleteRevisions/DeleteRevisions'
import { ItemDeletedEventHandler } from '../Domain/Handler/ItemDeletedEventHandler'
export class ContainerConfigLoader {
constructor(private mode: 'server' | 'worker' = 'server') {}
@@ -226,6 +228,11 @@ export class ContainerConfigLoader {
.toConstantValue(
new DeleteRevision(container.get<RevisionRepositoryInterface>(TYPES.Revisions_SQLRevisionRepository)),
)
container
.bind<DeleteRevisions>(TYPES.Revisions_DeleteRevisions)
.toConstantValue(
new DeleteRevisions(container.get<RevisionRepositoryInterface>(TYPES.Revisions_SQLRevisionRepository)),
)
container
.bind<CopyRevisions>(TYPES.Revisions_CopyRevisions)
.toConstantValue(
@@ -311,6 +318,14 @@ export class ContainerConfigLoader {
container.get<winston.Logger>(TYPES.Revisions_Logger),
),
)
container
.bind<ItemDeletedEventHandler>(TYPES.Revisions_ItemDeletedEventHandler)
.toConstantValue(
new ItemDeletedEventHandler(
container.get<DeleteRevisions>(TYPES.Revisions_DeleteRevisions),
container.get<winston.Logger>(TYPES.Revisions_Logger),
),
)
const eventHandlers: Map<string, DomainEventHandlerInterface> = new Map([
['ITEM_DUMPED', container.get(TYPES.Revisions_ItemDumpedEventHandler)],
@@ -318,6 +333,7 @@ export class ContainerConfigLoader {
['REVISIONS_COPY_REQUESTED', container.get(TYPES.Revisions_RevisionsCopyRequestedEventHandler)],
['ITEM_REMOVED_FROM_SHARED_VAULT', container.get(TYPES.Revisions_ItemRemovedFromSharedVaultEventHandler)],
['SHARED_VAULT_REMOVED', container.get(TYPES.Revisions_SharedVaultRemovedEventHandler)],
['ITEM_DELETED', container.get(TYPES.Revisions_ItemDeletedEventHandler)],
])
if (isConfiguredForHomeServer) {

View File

@@ -33,6 +33,7 @@ const TYPES = {
Revisions_GetRevisionsMetada: Symbol.for('Revisions_GetRevisionsMetada'),
Revisions_GetRevision: Symbol.for('Revisions_GetRevision'),
Revisions_DeleteRevision: Symbol.for('Revisions_DeleteRevision'),
Revisions_DeleteRevisions: Symbol.for('Revisions_DeleteRevisions'),
Revisions_CopyRevisions: Symbol.for('Revisions_CopyRevisions'),
Revisions_GetRequiredRoleToViewRevision: Symbol.for('Revisions_GetRequiredRoleToViewRevision'),
Revisions_RemoveRevisionsFromSharedVault: Symbol.for('Revisions_RemoveRevisionsFromSharedVault'),
@@ -47,6 +48,7 @@ const TYPES = {
Revisions_RevisionsCopyRequestedEventHandler: Symbol.for('Revisions_RevisionsCopyRequestedEventHandler'),
Revisions_ItemRemovedFromSharedVaultEventHandler: Symbol.for('Revisions_ItemRemovedFromSharedVaultEventHandler'),
Revisions_SharedVaultRemovedEventHandler: Symbol.for('Revisions_SharedVaultRemovedEventHandler'),
Revisions_ItemDeletedEventHandler: Symbol.for('Revisions_ItemDeletedEventHandler'),
// Services
Revisions_CrossServiceTokenDecoder: Symbol.for('Revisions_CrossServiceTokenDecoder'),
Revisions_DomainEventSubscriber: Symbol.for('Revisions_DomainEventSubscriber'),

View File

@@ -0,0 +1,21 @@
import { DomainEventHandlerInterface, ItemDeletedEvent } from '@standardnotes/domain-events'
import { Logger } from 'winston'
import { DeleteRevisions } from '../UseCase/DeleteRevisions/DeleteRevisions'
export class ItemDeletedEventHandler implements DomainEventHandlerInterface {
constructor(
private deleteRevisions: DeleteRevisions,
private logger: Logger,
) {}
async handle(event: ItemDeletedEvent): Promise<void> {
const result = await this.deleteRevisions.execute({ itemUuid: event.payload.itemUuid })
if (result.isFailed()) {
this.logger.error(`Could not delete revisions for item ${event.payload.itemUuid}: ${result.getError()}`, {
userId: event.payload.userUuid,
})
}
}
}

View File

@@ -6,6 +6,7 @@ import { RevisionMetadata } from './RevisionMetadata'
export interface RevisionRepositoryInterface {
countByUserUuid(userUuid: Uuid): Promise<number>
removeByUserUuid(userUuid: Uuid): Promise<void>
removeByItemUuid(itemUuid: Uuid): Promise<void>
removeOneByUuid(revisionUuid: Uuid, userUuid: Uuid): Promise<void>
findOneByUuid(revisionUuid: Uuid, userUuid: Uuid, sharedVaultUuids: Uuid[]): Promise<Revision | null>
findByItemUuid(itemUuid: Uuid): Promise<Array<Revision>>

View File

@@ -0,0 +1,32 @@
import { RevisionRepositoryInterface } from '../../Revision/RevisionRepositoryInterface'
import { DeleteRevisions } from './DeleteRevisions'
describe('DeleteRevisions', () => {
let revisionRepository: RevisionRepositoryInterface
const createUseCase = () => new DeleteRevisions(revisionRepository)
beforeEach(() => {
revisionRepository = {} as jest.Mocked<RevisionRepositoryInterface>
revisionRepository.removeByItemUuid = jest.fn()
})
it('should remove revisions by item uuid', async () => {
const useCase = createUseCase()
const itemUuid = '00000000-0000-0000-0000-000000000000'
const result = await useCase.execute({ itemUuid })
expect(result.isFailed()).toBe(false)
expect(revisionRepository.removeByItemUuid).toHaveBeenCalled()
})
it('should return failed result if item uuid is invalid', async () => {
const useCase = createUseCase()
const itemUuid = 'invalid'
const result = await useCase.execute({ itemUuid })
expect(result.isFailed()).toBe(true)
})
})

View File

@@ -0,0 +1,19 @@
import { Result, UseCaseInterface, Uuid } from '@standardnotes/domain-core'
import { RevisionRepositoryInterface } from '../../Revision/RevisionRepositoryInterface'
import { DeleteRevisionsDTO } from './DeleteRevisionsDTO'
export class DeleteRevisions implements UseCaseInterface<void> {
constructor(private revisionRepository: RevisionRepositoryInterface) {}
async execute(dto: DeleteRevisionsDTO): Promise<Result<void>> {
const itemUuidOrError = Uuid.create(dto.itemUuid)
if (itemUuidOrError.isFailed()) {
return Result.fail(`Could not delete revisions: ${itemUuidOrError.getError()}`)
}
const itemUuid = itemUuidOrError.getValue()
await this.revisionRepository.removeByItemUuid(itemUuid)
return Result.ok()
}
}

View File

@@ -0,0 +1,3 @@
export interface DeleteRevisionsDTO {
itemUuid: string
}

View File

@@ -15,6 +15,15 @@ export class SQLRevisionRepository implements RevisionRepositoryInterface {
protected logger: Logger,
) {}
async removeByItemUuid(itemUuid: Uuid): Promise<void> {
await this.ormRepository
.createQueryBuilder()
.delete()
.from('revisions_revisions')
.where('item_uuid = :itemUuid', { itemUuid: itemUuid.value })
.execute()
}
async removeByUserUuid(userUuid: Uuid): Promise<void> {
await this.ormRepository
.createQueryBuilder()

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.27.14](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.27.13...@standardnotes/scheduler-server@1.27.14) (2023-12-28)
**Note:** Version bump only for package @standardnotes/scheduler-server
## [1.27.13](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.27.12...@standardnotes/scheduler-server@1.27.13) (2023-12-26)
**Note:** Version bump only for package @standardnotes/scheduler-server
## [1.27.12](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.27.11...@standardnotes/scheduler-server@1.27.12) (2023-12-14)
**Note:** Version bump only for package @standardnotes/scheduler-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/scheduler-server",
"version": "1.27.12",
"version": "1.27.14",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -40,7 +40,7 @@
"inversify": "^6.0.1",
"ioredis": "^5.2.4",
"mysql2": "^3.0.1",
"reflect-metadata": "^0.1.13",
"reflect-metadata": "^0.2.1",
"typeorm": "^0.3.17",
"winston": "^3.8.1"
},

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.17.3](https://github.com/standardnotes/server/compare/@standardnotes/security@1.17.2...@standardnotes/security@1.17.3) (2023-12-28)
**Note:** Version bump only for package @standardnotes/security
## [1.17.2](https://github.com/standardnotes/server/compare/@standardnotes/security@1.17.1...@standardnotes/security@1.17.2) (2023-11-28)
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/security",
"version": "1.17.2",
"version": "1.17.3",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -32,7 +32,7 @@
},
"dependencies": {
"jsonwebtoken": "^9.0.0",
"reflect-metadata": "^0.1.13"
"reflect-metadata": "^0.2.1"
},
"devDependencies": {
"@types/jest": "^29.5.1",

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.23.2](https://github.com/standardnotes/server/compare/@standardnotes/settings@1.23.1...@standardnotes/settings@1.23.2) (2023-12-28)
**Note:** Version bump only for package @standardnotes/settings
## [1.23.1](https://github.com/standardnotes/server/compare/@standardnotes/settings@1.23.0...@standardnotes/settings@1.23.1) (2023-11-27)
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/settings",
"version": "1.23.1",
"version": "1.23.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -39,6 +39,6 @@
},
"dependencies": {
"@standardnotes/domain-core": "workspace:^",
"reflect-metadata": "^0.1.13"
"reflect-metadata": "^0.2.1"
}
}

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.16.2](https://github.com/standardnotes/server/compare/@standardnotes/sncrypto-node@1.16.1...@standardnotes/sncrypto-node@1.16.2) (2023-12-28)
**Note:** Version bump only for package @standardnotes/sncrypto-node
## [1.16.1](https://github.com/standardnotes/server/compare/@standardnotes/sncrypto-node@1.16.0...@standardnotes/sncrypto-node@1.16.1) (2023-11-27)
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/sncrypto-node",
"version": "1.16.1",
"version": "1.16.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -30,7 +30,7 @@
},
"dependencies": {
"@standardnotes/sncrypto-common": "^1.13.4",
"reflect-metadata": "^0.1.13"
"reflect-metadata": "^0.2.1"
},
"devDependencies": {
"@types/jest": "^29.5.1",

View File

@@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.129.5](https://github.com/standardnotes/server/compare/@standardnotes/syncing-server@1.129.4...@standardnotes/syncing-server@1.129.5) (2023-12-28)
**Note:** Version bump only for package @standardnotes/syncing-server
## [1.129.4](https://github.com/standardnotes/server/compare/@standardnotes/syncing-server@1.129.3...@standardnotes/syncing-server@1.129.4) (2023-12-26)
### Bug Fixes
* stop revisions propagation ([#1008](https://github.com/standardnotes/server/issues/1008)) ([7962b24](https://github.com/standardnotes/server/commit/7962b245b51703ff7d33728dee117b2074f2692a))
## [1.129.3](https://github.com/standardnotes/server/compare/@standardnotes/syncing-server@1.129.2...@standardnotes/syncing-server@1.129.3) (2023-12-22)
### Bug Fixes
* logs severity ([0762ed1](https://github.com/standardnotes/server/commit/0762ed1127a5de295bd50c14afad31c7fb88a853))
## [1.129.2](https://github.com/standardnotes/server/compare/@standardnotes/syncing-server@1.129.1...@standardnotes/syncing-server@1.129.2) (2023-12-22)
### Bug Fixes
* add more readonly access debug logs ([54091f2](https://github.com/standardnotes/server/commit/54091f23da33a5d1df2ecffdfa559e3fa4c562f6))
## [1.129.1](https://github.com/standardnotes/server/compare/@standardnotes/syncing-server@1.129.0...@standardnotes/syncing-server@1.129.1) (2023-12-14)
**Note:** Version bump only for package @standardnotes/syncing-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/syncing-server",
"version": "1.129.1",
"version": "1.129.5",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -57,7 +57,7 @@
"jsonwebtoken": "^9.0.0",
"mysql2": "^3.0.1",
"prettyjson": "^1.2.5",
"reflect-metadata": "0.1.13",
"reflect-metadata": "^0.2.1",
"semver": "^7.5.4",
"sqlite3": "^5.1.6",
"typeorm": "^0.3.17",

View File

@@ -162,6 +162,7 @@ import { SyncResponse } from '@standardnotes/grpc'
import { SyncResponseGRPCMapper } from '../Mapping/gRPC/SyncResponseGRPCMapper'
import { AccountDeletionVerificationRequestedEventHandler } from '../Domain/Handler/AccountDeletionVerificationRequestedEventHandler'
import { SendEventToClients } from '../Domain/UseCase/Syncing/SendEventToClients/SendEventToClients'
import { RevisionsCleanupRequestedEventHandler } from '../Domain/Handler/RevisionsCleanupRequestedEventHandler'
export class ContainerConfigLoader {
private readonly DEFAULT_CONTENT_SIZE_TRANSFER_LIMIT = 10_000_000
@@ -980,6 +981,16 @@ export class ContainerConfigLoader {
container.get<Logger>(TYPES.Sync_Logger),
),
)
container
.bind<RevisionsCleanupRequestedEventHandler>(TYPES.Sync_RevisionsCleanupRequestedEventHandler)
.toConstantValue(
new RevisionsCleanupRequestedEventHandler(
container.get<ItemRepositoryInterface>(TYPES.Sync_SQLItemRepository),
container.get<DomainEventFactoryInterface>(TYPES.Sync_DomainEventFactory),
container.get<DomainEventPublisherInterface>(TYPES.Sync_DomainEventPublisher),
container.get<Logger>(TYPES.Sync_Logger),
),
)
// Services
container.bind<ContentDecoderInterface>(TYPES.Sync_ContentDecoder).toDynamicValue(() => new ContentDecoder())
@@ -1008,6 +1019,7 @@ export class ContainerConfigLoader {
'SHARED_VAULT_REMOVED',
container.get<SharedVaultRemovedEventHandler>(TYPES.Sync_SharedVaultRemovedEventHandler),
],
['REVISIONS_CLEANUP_REQUESTED', container.get(TYPES.Sync_RevisionsCleanupRequestedEventHandler)],
])
if (!isConfiguredForHomeServer) {
container

View File

@@ -97,6 +97,7 @@ const TYPES = {
Sync_SharedVaultFileUploadedEventHandler: Symbol.for('Sync_SharedVaultFileUploadedEventHandler'),
Sync_SharedVaultFileMovedEventHandler: Symbol.for('Sync_SharedVaultFileMovedEventHandler'),
Sync_SharedVaultRemovedEventHandler: Symbol.for('Sync_SharedVaultRemovedEventHandler'),
Sync_RevisionsCleanupRequestedEventHandler: Symbol.for('Sync_RevisionsCleanupRequestedEventHandler'),
// Services
Sync_ContentDecoder: Symbol.for('Sync_ContentDecoder'),
Sync_DomainEventPublisher: Symbol.for('Sync_DomainEventPublisher'),

View File

@@ -4,6 +4,7 @@ import {
DomainEventService,
DuplicateItemSyncedEvent,
EmailRequestedEvent,
ItemDeletedEvent,
ItemDumpedEvent,
ItemRemovedFromSharedVaultEvent,
ItemRevisionCreationRequestedEvent,
@@ -316,6 +317,21 @@ export class DomainEventFactory implements DomainEventFactoryInterface {
}
}
createItemDeletedEvent(dto: { itemUuid: string; userUuid: string }): ItemDeletedEvent {
return {
type: 'ITEM_DELETED',
createdAt: this.timer.getUTCDate(),
meta: {
correlation: {
userIdentifier: dto.userUuid,
userIdentifierType: 'uuid',
},
origin: DomainEventService.SyncingServer,
},
payload: dto,
}
}
createEmailRequestedEvent(dto: {
userEmail: string
messageIdentifier: string

View File

@@ -2,6 +2,7 @@ import {
AccountDeletionVerificationPassedEvent,
DuplicateItemSyncedEvent,
EmailRequestedEvent,
ItemDeletedEvent,
ItemDumpedEvent,
ItemRemovedFromSharedVaultEvent,
ItemRevisionCreationRequestedEvent,
@@ -77,6 +78,7 @@ export interface DomainEventFactoryInterface {
userUuid?: string
}): EmailRequestedEvent
createDuplicateItemSyncedEvent(dto: { itemUuid: string; userUuid: string }): DuplicateItemSyncedEvent
createItemDeletedEvent(dto: { itemUuid: string; userUuid: string }): ItemDeletedEvent
createItemRevisionCreationRequested(dto: { itemUuid: string; userUuid: string }): ItemRevisionCreationRequestedEvent
createItemDumpedEvent(dto: { fileDumpPath: string; userUuid: string }): ItemDumpedEvent
createRevisionsCopyRequestedEvent(

View File

@@ -0,0 +1,56 @@
import {
RevisionsCleanupRequestedEvent,
DomainEventHandlerInterface,
DomainEventPublisherInterface,
} from '@standardnotes/domain-events'
import { Logger } from 'winston'
import { ItemRepositoryInterface } from '../Item/ItemRepositoryInterface'
import { DomainEventFactoryInterface } from '../Event/DomainEventFactoryInterface'
export class RevisionsCleanupRequestedEventHandler implements DomainEventHandlerInterface {
constructor(
private itemRepository: ItemRepositoryInterface,
private domainEventFactory: DomainEventFactoryInterface,
private domainEventPublisher: DomainEventPublisherInterface,
private logger: Logger,
) {}
async handle(event: RevisionsCleanupRequestedEvent): Promise<void> {
const totalDeletedItems = await this.itemRepository.countAll({
userUuid: event.payload.userUuid,
deleted: true,
})
this.logger.info(`Found ${totalDeletedItems} deleted items`, {
userId: event.payload.userUuid,
})
const limitPerPage = 100
const numberOfPages = Math.ceil(totalDeletedItems / limitPerPage)
for (let i = 0; i < numberOfPages; i++) {
const items = await this.itemRepository.findAll({
userUuid: event.payload.userUuid,
deleted: true,
offset: i * limitPerPage,
limit: limitPerPage,
sortOrder: 'ASC',
sortBy: 'created_at_timestamp',
})
for (const item of items) {
await this.domainEventPublisher.publish(
this.domainEventFactory.createItemDeletedEvent({
itemUuid: item.id.toString(),
userUuid: item.props.userUuid.value,
}),
)
}
}
this.logger.info(`Finished processing ${totalDeletedItems} deleted items`, {
userId: event.payload.userUuid,
})
}
}

View File

@@ -109,6 +109,7 @@ describe('UpdateExistingItem', () => {
domainEventFactory.createItemRemovedFromSharedVaultEvent = jest
.fn()
.mockReturnValue({} as jest.Mocked<DomainEventInterface>)
domainEventFactory.createItemDeletedEvent = jest.fn().mockReturnValue({} as jest.Mocked<DomainEventInterface>)
determineSharedVaultOperationOnItem = {} as jest.Mocked<DetermineSharedVaultOperationOnItem>
determineSharedVaultOperationOnItem.execute = jest.fn().mockResolvedValue(

View File

@@ -159,6 +159,7 @@ export class UpdateExistingItem implements UseCaseInterface<Item> {
dto.existingItem.props.keySystemAssociation = undefined
}
let wasMarkedAsDeleted = false
if (dto.itemHash.props.deleted === true) {
dto.existingItem.props.deleted = true
dto.existingItem.props.content = null
@@ -166,6 +167,8 @@ export class UpdateExistingItem implements UseCaseInterface<Item> {
dto.existingItem.props.encItemKey = null
dto.existingItem.props.authHash = null
dto.existingItem.props.itemsKeyId = null
wasMarkedAsDeleted = true
}
await this.itemRepository.update(dto.existingItem)
@@ -196,6 +199,15 @@ export class UpdateExistingItem implements UseCaseInterface<Item> {
)
}
if (wasMarkedAsDeleted) {
await this.domainEventPublisher.publish(
this.domainEventFactory.createItemDeletedEvent({
itemUuid: dto.existingItem.id.toString(),
userUuid: dto.existingItem.props.userUuid.value,
}),
)
}
const notificationsResult = await this.addNotificationsAndPublishEvents(userUuid, sharedVaultOperation, dto)
if (notificationsResult.isFailed()) {
return Result.fail(notificationsResult.getError())

View File

@@ -74,9 +74,17 @@ export class SyncingServer implements ISyncingServer {
}
const apiVersion = call.request.hasApiVersion() ? (call.request.getApiVersion() as string) : ApiVersion.v20161215
const userUuid = call.metadata.get('x-user-uuid').pop() as string
const readOnlyAccess = call.metadata.get('x-read-only-access').pop() === 'true'
if (readOnlyAccess) {
this.logger.debug('Syncing with read-only access', {
codeTag: 'SyncingServer',
userId: userUuid,
})
}
const syncResult = await this.syncItemsUseCase.execute({
userUuid: call.metadata.get('x-user-uuid').pop() as string,
userUuid,
itemHashes,
computeIntegrityHash: call.request.hasComputeIntegrity() ? call.request.getComputeIntegrity() === true : false,
syncToken: call.request.hasSyncToken() ? call.request.getSyncToken() : undefined,
@@ -85,7 +93,7 @@ export class SyncingServer implements ISyncingServer {
contentType: call.request.hasContentType() ? call.request.getContentType() : undefined,
apiVersion,
snjsVersion: call.metadata.get('x-snjs-version').pop() as string,
readOnlyAccess: call.metadata.get('x-read-only-access').pop() === 'true',
readOnlyAccess,
sessionUuid: call.metadata.get('x-session-uuid').pop() as string,
sharedVaultUuids,
isFreeUser: call.metadata.get('x-is-free-user').pop() === 'true',

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.18.2](https://github.com/standardnotes/server/compare/@standardnotes/time@1.18.1...@standardnotes/time@1.18.2) (2023-12-28)
**Note:** Version bump only for package @standardnotes/time
## [1.18.1](https://github.com/standardnotes/server/compare/@standardnotes/time@1.18.0...@standardnotes/time@1.18.1) (2023-11-27)
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/time",
"version": "1.18.1",
"version": "1.18.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -31,7 +31,7 @@
"dependencies": {
"dayjs": "^1.11.6",
"microtime": "^3.1.0",
"reflect-metadata": "^0.1.13"
"reflect-metadata": "^0.2.1"
},
"devDependencies": {
"@types/jest": "^29.5.1",

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.22.5](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.22.4...@standardnotes/websockets-server@1.22.5) (2023-12-28)
**Note:** Version bump only for package @standardnotes/websockets-server
## [1.22.4](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.22.3...@standardnotes/websockets-server@1.22.4) (2023-12-26)
**Note:** Version bump only for package @standardnotes/websockets-server
## [1.22.3](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.22.2...@standardnotes/websockets-server@1.22.3) (2023-12-14)
**Note:** Version bump only for package @standardnotes/websockets-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/websockets-server",
"version": "1.22.3",
"version": "1.22.5",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -43,7 +43,7 @@
"inversify-express-utils": "^6.4.3",
"ioredis": "^5.2.4",
"mysql2": "^3.0.1",
"reflect-metadata": "0.1.13",
"reflect-metadata": "^0.2.1",
"typeorm": "^0.3.17",
"winston": "^3.8.1"
},

View File

@@ -4072,7 +4072,7 @@ __metadata:
mixpanel: "npm:^0.17.0"
mysql2: "npm:^3.0.1"
prettier: "npm:^3.0.3"
reflect-metadata: "npm:^0.1.13"
reflect-metadata: "npm:^0.2.1"
ts-jest: "npm:^29.1.0"
typeorm: "npm:^0.3.17"
typescript: "npm:^5.0.4"
@@ -4116,7 +4116,7 @@ __metadata:
jsonwebtoken: "npm:^9.0.0"
prettier: "npm:^3.0.3"
prettyjson: "npm:^1.2.5"
reflect-metadata: "npm:0.1.13"
reflect-metadata: "npm:^0.2.1"
ts-jest: "npm:^29.1.0"
typescript: "npm:^5.0.4"
winston: "npm:^3.8.1"
@@ -4191,7 +4191,7 @@ __metadata:
otplib: "npm:12.0.1"
prettier: "npm:^3.0.3"
prettyjson: "npm:^1.2.5"
reflect-metadata: "npm:0.1.13"
reflect-metadata: "npm:^0.2.1"
sqlite3: "npm:^5.1.6"
ts-jest: "npm:^29.1.0"
typeorm: "npm:^0.3.17"
@@ -4214,7 +4214,7 @@ __metadata:
eslint-plugin-prettier: "npm:^5.0.0"
jest: "npm:^29.5.0"
prettier: "npm:^3.0.3"
reflect-metadata: "npm:^0.1.13"
reflect-metadata: "npm:^0.2.1"
ts-jest: "npm:^29.1.0"
typescript: "npm:^5.0.4"
languageName: unknown
@@ -4269,7 +4269,7 @@ __metadata:
jest: "npm:^29.5.0"
opentelemetry-instrumentation-typeorm: "npm:^0.39.1"
prettier: "npm:^3.0.3"
reflect-metadata: "npm:^0.1.13"
reflect-metadata: "npm:^0.2.1"
sqs-consumer: "npm:^8.1.0"
ts-jest: "npm:^29.1.0"
typescript: "npm:^5.0.4"
@@ -4349,7 +4349,7 @@ __metadata:
jsonwebtoken: "npm:^9.0.0"
prettier: "npm:^3.0.3"
prettyjson: "npm:^1.2.5"
reflect-metadata: "npm:^0.1.13"
reflect-metadata: "npm:^0.2.1"
ts-jest: "npm:^29.1.0"
typescript: "npm:^5.0.4"
uuid: "npm:^9.0.0"
@@ -4395,7 +4395,7 @@ __metadata:
inversify: "npm:^6.0.1"
inversify-express-utils: "npm:^6.4.3"
prettier: "npm:^3.0.3"
reflect-metadata: "npm:0.1.13"
reflect-metadata: "npm:^0.2.1"
typescript: "npm:^5.0.4"
winston: "npm:^3.8.1"
languageName: unknown
@@ -4478,7 +4478,7 @@ __metadata:
jest: "npm:^29.5.0"
mysql2: "npm:^3.0.1"
prettier: "npm:^3.0.3"
reflect-metadata: "npm:0.1.13"
reflect-metadata: "npm:^0.2.1"
sqlite3: "npm:^5.1.6"
ts-jest: "npm:^29.1.0"
typeorm: "npm:^0.3.17"
@@ -4512,7 +4512,7 @@ __metadata:
jest: "npm:^29.5.0"
mysql2: "npm:^3.0.1"
prettier: "npm:^3.0.3"
reflect-metadata: "npm:^0.1.13"
reflect-metadata: "npm:^0.2.1"
ts-jest: "npm:^29.1.0"
typeorm: "npm:^0.3.17"
typescript: "npm:^5.0.4"
@@ -4533,7 +4533,7 @@ __metadata:
jest: "npm:^29.5.0"
jsonwebtoken: "npm:^9.0.0"
prettier: "npm:^3.0.3"
reflect-metadata: "npm:^0.1.13"
reflect-metadata: "npm:^0.2.1"
ts-jest: "npm:^29.1.0"
typescript: "npm:^5.0.4"
languageName: unknown
@@ -4575,7 +4575,7 @@ __metadata:
eslint: "npm:^8.39.0"
eslint-plugin-prettier: "npm:^5.0.0"
prettier: "npm:^3.0.3"
reflect-metadata: "npm:^0.1.13"
reflect-metadata: "npm:^0.2.1"
typescript: "npm:^5.0.4"
languageName: unknown
linkType: soft
@@ -4602,7 +4602,7 @@ __metadata:
eslint-plugin-prettier: "npm:^5.0.0"
jest: "npm:^29.5.0"
prettier: "npm:^3.0.3"
reflect-metadata: "npm:^0.1.13"
reflect-metadata: "npm:^0.2.1"
regenerator-runtime: "npm:^0.13.9"
ts-jest: "npm:^29.1.0"
ts-loader: "npm:^9.2.6"
@@ -4657,7 +4657,7 @@ __metadata:
mysql2: "npm:^3.0.1"
prettier: "npm:^3.0.3"
prettyjson: "npm:^1.2.5"
reflect-metadata: "npm:0.1.13"
reflect-metadata: "npm:^0.2.1"
semver: "npm:^7.5.4"
sqlite3: "npm:^5.1.6"
ts-jest: "npm:^29.1.0"
@@ -4683,7 +4683,7 @@ __metadata:
jest: "npm:^29.5.0"
microtime: "npm:^3.1.0"
prettier: "npm:^3.0.3"
reflect-metadata: "npm:^0.1.13"
reflect-metadata: "npm:^0.2.1"
ts-jest: "npm:^29.1.0"
typescript: "npm:^5.0.4"
languageName: unknown
@@ -4731,7 +4731,7 @@ __metadata:
jest: "npm:^29.5.0"
mysql2: "npm:^3.0.1"
prettier: "npm:^3.0.3"
reflect-metadata: "npm:0.1.13"
reflect-metadata: "npm:^0.2.1"
ts-jest: "npm:^29.1.0"
typeorm: "npm:^0.3.17"
typescript: "npm:^5.0.4"
@@ -11892,13 +11892,20 @@ __metadata:
languageName: node
linkType: hard
"reflect-metadata@npm:0.1.13, reflect-metadata@npm:^0.1.13":
"reflect-metadata@npm:^0.1.13":
version: 0.1.13
resolution: "reflect-metadata@npm:0.1.13"
checksum: 732570da35d2d96f8fdd5aac60fb263aa92f6512eaded5962b052bd9e90f22a9dec5aaf0d7ff4bfe97646c9530e8444e8435c2d80b24d0bdf938b5d47f6f5b83
languageName: node
linkType: hard
"reflect-metadata@npm:^0.2.1":
version: 0.2.1
resolution: "reflect-metadata@npm:0.2.1"
checksum: 394b293bd4a538b644ed0e8730c5aeb1e08e78972c915b3d2cf3b302241952cfee8f8bd8a0fdf7d8c7fa78d31d0585489061624692e2577d767abd120cad968c
languageName: node
linkType: hard
"regenerator-runtime@npm:^0.13.11, regenerator-runtime@npm:^0.13.9":
version: 0.13.11
resolution: "regenerator-runtime@npm:0.13.11"