Compare commits

..

125 Commits

Author SHA1 Message Date
standardci
2597324876 chore(release): publish new version
- @standardnotes/analytics@2.34.2
 - @standardnotes/api-gateway@1.87.2
 - @standardnotes/auth-server@1.174.2
 - @standardnotes/domain-events-infra@1.22.2
 - @standardnotes/domain-events@2.138.0
 - @standardnotes/files-server@1.36.2
 - @standardnotes/home-server@1.22.2
 - @standardnotes/revisions-server@1.51.2
 - @standardnotes/scheduler-server@1.27.7
 - @standardnotes/syncing-server@1.127.0
 - @standardnotes/websockets-server@1.21.0
2023-11-28 08:53:10 +00:00
Karol Sójko
69b404f5d4 feat: send event to client upon items change on server (#941)
* feat(websockets): persist connections in mysql

* fix: add sending event to client upon items changed on server

* fix payload

* fix: add cathcing errors

* fix: send changed items event only on a 10% dice roll
2023-11-28 09:31:42 +01:00
standardci
e94b0d0b02 chore(release): publish new version
- @standardnotes/analytics@2.34.1
 - @standardnotes/api-gateway@1.87.1
 - @standardnotes/auth-server@1.174.1
 - @standardnotes/common@1.52.1
 - @standardnotes/domain-core@1.41.1
 - @standardnotes/domain-events-infra@1.22.1
 - @standardnotes/domain-events@2.137.1
 - @standardnotes/files-server@1.36.1
 - @standardnotes/grpc@1.3.1
 - @standardnotes/home-server@1.22.1
 - @standardnotes/predicates@1.8.1
 - @standardnotes/revisions-server@1.51.1
 - @standardnotes/scheduler-server@1.27.6
 - @standardnotes/security@1.17.1
 - @standardnotes/settings@1.23.1
 - @standardnotes/sncrypto-node@1.16.1
 - @standardnotes/syncing-server@1.126.1
 - @standardnotes/time@1.18.1
 - @standardnotes/websockets-server@1.20.4
2023-11-27 09:14:33 +00:00
Karol Sójko
ed1bf37287 fix: repository config in package.json files 2023-11-27 09:53:23 +01:00
standardci
3946f56261 chore(release): publish new version
- @standardnotes/analytics@2.34.0
 - @standardnotes/api-gateway@1.87.0
 - @standardnotes/auth-server@1.174.0
 - @standardnotes/common@1.52.0
 - @standardnotes/domain-core@1.41.0
 - @standardnotes/domain-events-infra@1.22.0
 - @standardnotes/domain-events@2.137.0
 - @standardnotes/files-server@1.36.0
 - @standardnotes/grpc@1.3.0
 - @standardnotes/home-server@1.22.0
 - @standardnotes/predicates@1.8.0
 - @standardnotes/revisions-server@1.51.0
 - @standardnotes/scheduler-server@1.27.5
 - @standardnotes/security@1.17.0
 - @standardnotes/settings@1.23.0
 - @standardnotes/sncrypto-node@1.16.0
 - @standardnotes/syncing-server@1.126.0
 - @standardnotes/time@1.18.0
 - @standardnotes/websockets-server@1.20.3
2023-11-27 08:43:38 +00:00
Karol Sójko
fc53dab007 feat: allow github publish action permission to mint id-token 2023-11-27 09:22:22 +01:00
Karol Sójko
e836abdef7 feat: add npm provenance to published packages 2023-11-27 09:20:10 +01:00
standardci
826482b1f0 chore(release): publish new version
- @standardnotes/analytics@2.33.4
 - @standardnotes/api-gateway@1.86.6
 - @standardnotes/auth-server@1.173.2
 - @standardnotes/domain-events-infra@1.21.4
 - @standardnotes/domain-events@2.136.0
 - @standardnotes/files-server@1.35.2
 - @standardnotes/home-server@1.21.11
 - @standardnotes/revisions-server@1.50.2
 - @standardnotes/scheduler-server@1.27.4
 - @standardnotes/syncing-server@1.125.2
 - @standardnotes/websockets-server@1.20.2
2023-11-23 09:34:26 +00:00
Karol Sójko
45bd00919c feat(domain-events): add email campaign send out requested event 2023-11-23 10:13:00 +01:00
standardci
4e1bae6daf chore(release): publish new version
- @standardnotes/api-gateway@1.86.5
 - @standardnotes/auth-server@1.173.1
 - @standardnotes/home-server@1.21.10
 - @standardnotes/syncing-server@1.125.1
2023-11-22 11:46:47 +00:00
Karol Sójko
8f23c8ab3f fix: error handling on gRPC (#937) 2023-11-22 12:25:42 +01:00
standardci
4d32f26631 chore(release): publish new version
- @standardnotes/analytics@2.33.3
 - @standardnotes/api-gateway@1.86.4
 - @standardnotes/auth-server@1.173.0
 - @standardnotes/domain-events-infra@1.21.3
 - @standardnotes/domain-events@2.135.0
 - @standardnotes/files-server@1.35.1
 - @standardnotes/home-server@1.21.9
 - @standardnotes/revisions-server@1.50.1
 - @standardnotes/scheduler-server@1.27.3
 - @standardnotes/syncing-server@1.125.0
 - @standardnotes/websockets-server@1.20.1
2023-11-22 10:22:09 +00:00
Karol Sójko
c11abe1bd3 feat: add verifiying if user has no items before mass deleting spam accounts (#936) 2023-11-22 11:00:56 +01:00
standardci
4d12566b0d chore(release): publish new version
- @standardnotes/home-server@1.21.8
 - @standardnotes/syncing-server@1.124.3
2023-11-21 14:59:47 +00:00
Karol Sójko
2200dca69d fix(syncing-server): front load themes and user prefs as high priority load items (#935) 2023-11-21 15:38:28 +01:00
standardci
d41dd3bdda chore(release): publish new version
- @standardnotes/api-gateway@1.86.3
 - @standardnotes/home-server@1.21.7
2023-11-21 08:42:31 +00:00
Karol Sójko
c5c24b3ac9 fix(api-gateway): add meta field to grpc sync calls (#934) 2023-11-21 09:21:54 +01:00
standardci
462ade2145 chore(release): publish new version
- @standardnotes/api-gateway@1.86.2
 - @standardnotes/auth-server@1.172.2
 - @standardnotes/home-server@1.21.6
 - @standardnotes/syncing-server@1.124.2
2023-11-20 14:22:00 +00:00
Karol Sójko
bfef16ce37 fix: define grpc max message size 2023-11-20 15:00:48 +01:00
standardci
aa4351c8e9 chore(release): publish new version
- @standardnotes/api-gateway@1.86.1
 - @standardnotes/auth-server@1.172.1
 - @standardnotes/home-server@1.21.5
 - @standardnotes/syncing-server@1.124.1
2023-11-20 13:14:28 +00:00
Karol Sójko
2dff6a2ed3 fix: setting gzip as default compression on grpc calls (#933) 2023-11-20 13:52:54 +01:00
standardci
7808cc8ed2 chore(release): publish new version
- @standardnotes/api-gateway@1.86.0
 - @standardnotes/auth-server@1.172.0
 - @standardnotes/grpc@1.2.0
 - @standardnotes/home-server@1.21.4
 - @standardnotes/syncing-server@1.124.0
2023-11-20 10:29:07 +00:00
Karol Sójko
5b84f078c6 feat(grpc): add syncing protocol buffers (#930)
* feat(grpc): add syncing protocol buffers

* wip

* feat: syncing implementation

* fix: sendign metadata

* fix: grpc sync request mapping

* fix grpc response mapper
2023-11-20 11:08:16 +01:00
standardci
cf5f44a4a5 chore(release): publish new version
- @standardnotes/api-gateway@1.85.1
 - @standardnotes/home-server@1.21.3
2023-11-16 12:17:57 +00:00
Karol Sójko
ed05ea553f fix(api-gateway): remove overly verbose debug messages 2023-11-16 12:57:07 +01:00
standardci
4418c38878 chore(release): publish new version
- @standardnotes/api-gateway@1.85.0
 - @standardnotes/auth-server@1.171.0
 - @standardnotes/home-server@1.21.2
2023-11-16 11:31:52 +00:00
Karol Sójko
6391a01b57 feat: add debug logs for grpc communication 2023-11-16 12:10:51 +01:00
standardci
9dbcec198d chore(release): publish new version
- @standardnotes/api-gateway@1.84.1
 - @standardnotes/home-server@1.21.1
2023-11-16 10:25:54 +00:00
Karol Sójko
78fbeb595f fix(api-gateway): bindings 2023-11-16 11:04:44 +01:00
standardci
d894a87e87 chore(release): publish new version
- @standardnotes/api-gateway@1.84.0
 - @standardnotes/auth-server@1.170.0
 - @standardnotes/files-server@1.35.0
 - @standardnotes/grpc@1.1.0
 - @standardnotes/home-server@1.21.0
 - @standardnotes/revisions-server@1.50.0
 - @standardnotes/syncing-server@1.123.0
 - @standardnotes/websockets-server@1.20.0
2023-11-16 09:31:37 +00:00
Karol Sójko
4f62cac213 feat: add grpc sessions validation server (#928)
* feat: add grpc sessions validation server

* feat: add client implementation on api gateway

* fix: response codes

* fix: errored response

* feat: add configuring grpc as optional service proxy

* fix env vars

* fix linter issue
2023-11-16 10:10:42 +01:00
standardci
ce081274da chore(release): publish new version
- @standardnotes/api-gateway@1.83.5
 - @standardnotes/home-server@1.20.5
2023-11-14 14:18:46 +00:00
Karol Sójko
fd997f4849 fix(api-gateway): remove unused imports 2023-11-14 14:57:41 +01:00
Karol Sójko
3ddd671c47 fix(api-gateway): remove the verify body function 2023-11-14 14:55:55 +01:00
standardci
c19de13cac chore(release): publish new version
- @standardnotes/api-gateway@1.83.4
 - @standardnotes/home-server@1.20.4
2023-11-14 13:30:24 +00:00
Karol Sójko
f65809ef30 fix(api-gateway): checking for buffer length 2023-11-14 14:09:10 +01:00
Karol Sójko
2823ed8612 fix(api-gateway): buffer encoding 2023-11-14 14:07:55 +01:00
Karol Sójko
420bf9ec54 fix(api-gateway): add verification if json is valid on request 2023-11-14 14:04:58 +01:00
standardci
5f67e5efda chore(release): publish new version
- @standardnotes/analytics@2.33.2
 - @standardnotes/api-gateway@1.83.3
 - @standardnotes/auth-server@1.169.2
 - @standardnotes/domain-events-infra@1.21.2
 - @standardnotes/domain-events@2.134.2
 - @standardnotes/files-server@1.34.2
 - @standardnotes/home-server@1.20.3
 - @standardnotes/revisions-server@1.49.2
 - @standardnotes/scheduler-server@1.27.2
 - @standardnotes/syncing-server@1.122.2
 - @standardnotes/websockets-server@1.19.2
2023-11-13 10:51:57 +00:00
Karol Sójko
daed1a77a0 fix(api-gateway): add application version to the error logs 2023-11-13 11:23:18 +01:00
Karol Sójko
b39eb09d91 fix(api-gateway): add request method to the debug logs 2023-11-13 11:15:02 +01:00
Karol Sójko
f6ec8626e5 fix(domain-events): remove unused event 2023-11-13 11:02:11 +01:00
standardci
97b12f2131 chore(release): publish new version
- @standardnotes/analytics@2.33.1
 - @standardnotes/api-gateway@1.83.2
 - @standardnotes/auth-server@1.169.1
 - @standardnotes/domain-events-infra@1.21.1
 - @standardnotes/domain-events@2.134.1
 - @standardnotes/files-server@1.34.1
 - @standardnotes/home-server@1.20.2
 - @standardnotes/revisions-server@1.49.1
 - @standardnotes/scheduler-server@1.27.1
 - @standardnotes/syncing-server@1.122.1
 - @standardnotes/websockets-server@1.19.1
2023-11-13 10:00:24 +00:00
Karol Sójko
8e4e36513a fix: remove unused even-store from code base (#925)
* fix: remove unused even-store from code base

* fix lock
2023-11-13 10:37:42 +01:00
Karol Sójko
c8bf4ab3a0 fix(api-gateway): debug log on error thrown body representation 2023-11-13 09:56:54 +01:00
standardci
3fa01a328b chore(release): publish new version
- @standardnotes/api-gateway@1.83.1
 - @standardnotes/home-server@1.20.1
2023-11-13 08:35:23 +00:00
Karol Sójko
60686dcdbd fix(api-gateway): add debug logs for errors on parsing 2023-11-13 07:39:34 +01:00
standardci
fddd17e531 chore(release): publish new version
- @standardnotes/api-gateway@1.83.0
 - @standardnotes/auth-server@1.169.0
 - @standardnotes/files-server@1.34.0
 - @standardnotes/home-server@1.20.0
 - @standardnotes/revisions-server@1.49.0
 - @standardnotes/syncing-server@1.122.0
 - @standardnotes/websockets-server@1.19.0
2023-11-10 14:39:08 +00:00
Karol Sójko
f99750169f fix(api-gateway): add more info on error logs 2023-11-10 15:13:54 +01:00
Karol Sójko
daad76d0dd feat: add keep-alive connections to subservices (#924)
* feat: add keep-alive connections to subservices

* fix: defaults
2023-11-10 14:52:44 +01:00
standardci
b3542e2fab chore(release): publish new version
- @standardnotes/api-gateway@1.82.1
 - @standardnotes/home-server@1.19.1
2023-11-10 12:21:41 +00:00
Karol Sójko
a9b1543e20 fix(api-gateway): websockets calls logs severity 2023-11-10 12:59:42 +01:00
standardci
e6d8e5c5f2 chore(release): publish new version
- @standardnotes/analytics@2.33.0
 - @standardnotes/api-gateway@1.82.0
 - @standardnotes/auth-server@1.168.0
 - @standardnotes/domain-events-infra@1.21.0
 - @standardnotes/domain-events@2.134.0
 - @standardnotes/event-store@1.14.0
 - @standardnotes/files-server@1.33.0
 - @standardnotes/home-server@1.19.0
 - @standardnotes/revisions-server@1.48.0
 - @standardnotes/scheduler-server@1.27.0
 - @standardnotes/syncing-server@1.121.0
 - @standardnotes/websockets-server@1.18.0
2023-11-10 11:46:24 +00:00
Karol Sójko
c24353cc24 feat: add graceful shutdown procedures upon SIGTERM (#923) 2023-11-10 12:20:21 +01:00
standardci
4855e1d5f5 chore(release): publish new version
- @standardnotes/api-gateway@1.81.14
 - @standardnotes/home-server@1.18.32
2023-11-10 10:04:31 +00:00
Karol Sójko
5d3fb9a537 fix(api-gateway): add logs about calling web sockets with minimal format 2023-11-10 10:32:47 +01:00
standardci
b55d80a7cd chore(release): publish new version
- @standardnotes/api-gateway@1.81.13
 - @standardnotes/home-server@1.18.31
2023-11-09 14:29:28 +00:00
Karol Sójko
16f92bdc99 fix(api-gateway): add possibility to configure keep-alive timeout (#920) 2023-11-09 15:02:32 +01:00
standardci
4c5738416a chore(release): publish new version
- @standardnotes/home-server@1.18.30
 - @standardnotes/syncing-server@1.120.5
 - @standardnotes/websockets-server@1.17.8
2023-11-09 13:26:30 +00:00
Karol Sójko
45d4920e0f fix: remove unused axios dep in subservices 2023-11-09 14:03:44 +01:00
standardci
94e738532a chore(release): publish new version
- @standardnotes/api-gateway@1.81.12
 - @standardnotes/home-server@1.18.29
 - @standardnotes/websockets-server@1.17.7
2023-11-09 11:18:35 +00:00
Karol Sójko
c4ae12d53f fix: reduce websockets api communication data (#919) 2023-11-09 11:44:31 +01:00
standardci
4ff78452f9 chore(release): publish new version
- @standardnotes/auth-server@1.167.2
 - @standardnotes/home-server@1.18.28
 - @standardnotes/syncing-server@1.120.4
2023-11-08 15:38:47 +00:00
Karol Sójko
9465f2ecd8 fix: add logs about sending websocket events to clients 2023-11-08 16:10:44 +01:00
standardci
93c2f1f12f chore(release): publish new version
- @standardnotes/auth-server@1.167.1
 - @standardnotes/home-server@1.18.27
2023-11-08 12:15:35 +00:00
Karol Sójko
ca8a3fc77d fix(auth): path to delete accounts script 2023-11-08 12:30:12 +01:00
standardci
00936e06bc chore(release): publish new version
- @standardnotes/auth-server@1.167.0
 - @standardnotes/home-server@1.18.26
2023-11-08 10:48:51 +00:00
Karol Sójko
a6dea50d74 feat: script to mass delete accounts from CSV source (#913) 2023-11-08 11:21:00 +01:00
standardci
28b04e6a4a chore(release): publish new version
- @standardnotes/auth-server@1.166.0
 - @standardnotes/home-server@1.18.25
2023-11-07 14:49:54 +00:00
Karol Sójko
d228a86f48 feat(auth): add triggering post setting update actions (#905)
* feat(auth): add triggering post setting update actions

* feat(auth): refactor email backups

* fix: add extra logs for backups

* fix: specs
2023-11-07 15:14:51 +01:00
standardci
0cb234aa47 chore(release): publish new version
- @standardnotes/api-gateway@1.81.11
 - @standardnotes/home-server@1.18.24
2023-11-07 11:28:36 +00:00
Karol Sójko
6b554c28b7 fix(api-gateway): remove calling both auth and payments on account deletion request 2023-11-07 12:02:40 +01:00
standardci
8a0accd8ea chore(release): publish new version
- @standardnotes/analytics@2.32.6
 - @standardnotes/api-gateway@1.81.10
 - @standardnotes/auth-server@1.165.4
 - @standardnotes/domain-events-infra@1.20.4
 - @standardnotes/domain-events@2.133.1
 - @standardnotes/event-store@1.13.19
 - @standardnotes/files-server@1.32.5
 - @standardnotes/home-server@1.18.23
 - @standardnotes/revisions-server@1.47.5
 - @standardnotes/scheduler-server@1.26.6
 - @standardnotes/syncing-server@1.120.3
 - @standardnotes/websockets-server@1.17.6
2023-11-07 11:00:09 +00:00
Karol Sójko
d66ae62cf4 fix: account deletion event (#904)
* fix: account deletion event

* fix: feature service binding
2023-11-07 11:34:10 +01:00
standardci
b01d1c659d chore(release): publish new version
- @standardnotes/analytics@2.32.5
 - @standardnotes/api-gateway@1.81.9
 - @standardnotes/auth-server@1.165.3
 - @standardnotes/domain-events-infra@1.20.3
 - @standardnotes/event-store@1.13.18
 - @standardnotes/files-server@1.32.4
 - @standardnotes/home-server@1.18.22
 - @standardnotes/revisions-server@1.47.4
 - @standardnotes/scheduler-server@1.26.5
 - @standardnotes/syncing-server@1.120.2
 - @standardnotes/websockets-server@1.17.5
2023-11-07 08:52:34 +00:00
Karol Sójko
751f3b2547 fix: remove open telemetry from code (#903) 2023-11-07 09:15:31 +01:00
standardci
11514e3836 chore(release): publish new version
- @standardnotes/home-server@1.18.21
 - @standardnotes/syncing-server@1.120.1
2023-11-06 15:00:46 +00:00
Karol Sójko
71689c1497 fix(syncing-server): return cursor token upon transfer limit breached (#902)
* fix(syncing-server): return cursor token upon transfer limit breached

* fix e2e env vars
2023-11-06 15:38:28 +01:00
standardci
2742075edc chore(release): publish new version
- @standardnotes/auth-server@1.165.2
 - @standardnotes/home-server@1.18.20
2023-11-03 17:04:35 +00:00
Karol Sójko
7f16232f8b fix(auth): change log severity on user authentication 2023-11-03 17:36:29 +01:00
standardci
0b0703e6d1 chore(release): publish new version
- @standardnotes/api-gateway@1.81.8
 - @standardnotes/auth-server@1.165.1
 - @standardnotes/home-server@1.18.19
2023-11-03 16:27:17 +00:00
Karol Sójko
3e376c44e3 fix: retry attempts on session validation and more verbose logs (#898) 2023-11-03 11:23:02 +01:00
standardci
bfe2d4bb4a chore(release): publish new version
- @standardnotes/auth-server@1.165.0
 - @standardnotes/home-server@1.18.18
 - @standardnotes/syncing-server@1.120.0
2023-11-02 12:01:26 +00:00
Karol Sójko
7253a0a1d9 feat: add shared vault invitation email notifications (#897) 2023-11-02 12:35:01 +01:00
standardci
f2c5810023 chore(release): publish new version
- @standardnotes/home-server@1.18.17
2023-11-02 07:13:07 +00:00
Karol Sójko
2e5b9105b8 fix(home-server): remove unused dep 2023-11-02 07:42:10 +01:00
Karol Sójko
d14411d72e chore: upgrade deps 2023-11-02 07:40:27 +01:00
standardci
5226513b26 chore(release): publish new version
- @standardnotes/auth-server@1.164.2
 - @standardnotes/home-server@1.18.16
2023-11-01 14:18:52 +00:00
Mo
334449f8aa chore: update change email copy 2023-11-01 08:50:37 -05:00
dependabot[bot]
7f43d0c69d chore(deps): bump docker/login-action from 2 to 3 (#832)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-01 13:33:03 +01:00
dependabot[bot]
6f18276e7a chore(deps): bump crazy-max/ghaction-import-gpg from 5 to 6 (#818)
Bumps [crazy-max/ghaction-import-gpg](https://github.com/crazy-max/ghaction-import-gpg) from 5 to 6.
- [Release notes](https://github.com/crazy-max/ghaction-import-gpg/releases)
- [Commits](https://github.com/crazy-max/ghaction-import-gpg/compare/v5...v6)

---
updated-dependencies:
- dependency-name: crazy-max/ghaction-import-gpg
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-01 13:32:41 +01:00
dependabot[bot]
9ff18a18a5 chore(deps): bump aws-actions/amazon-ecr-login from 1 to 2 (#873)
Bumps [aws-actions/amazon-ecr-login](https://github.com/aws-actions/amazon-ecr-login) from 1 to 2.
- [Release notes](https://github.com/aws-actions/amazon-ecr-login/releases)
- [Changelog](https://github.com/aws-actions/amazon-ecr-login/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws-actions/amazon-ecr-login/compare/v1...v2)

---
updated-dependencies:
- dependency-name: aws-actions/amazon-ecr-login
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-01 13:31:49 +01:00
dependabot[bot]
999e72fb1f chore(deps): bump ua-parser-js from 1.0.35 to 1.0.37 (#891)
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 1.0.35 to 1.0.37.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/1.0.37/changelog.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/1.0.35...1.0.37)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-01 13:31:11 +01:00
standardci
4733e663a3 chore(release): publish new version
- @standardnotes/auth-server@1.164.1
 - @standardnotes/home-server@1.18.15
2023-11-01 11:51:38 +00:00
Karol Sójko
b48eeb16c3 fix(auth): creating valet tokens for shared subscription users (#895)
* fix(auth): creating valet tokens for shared subscription users

* fix(auth): updating storage quota
2023-11-01 12:18:44 +01:00
standardci
0aa2584e82 chore(release): publish new version
- @standardnotes/auth-server@1.164.0
 - @standardnotes/home-server@1.18.14
2023-11-01 08:55:15 +00:00
Karol Sójko
eb8c704d84 feat(auth): add sending email to old email address when the address is changed (#894) 2023-11-01 09:28:00 +01:00
standardci
e93fa14703 chore(release): publish new version
- @standardnotes/api-gateway@1.81.7
 - @standardnotes/files-server@1.32.3
 - @standardnotes/home-server@1.18.13
 - @standardnotes/syncing-server@1.119.4
2023-10-31 14:16:00 +00:00
Karol Sójko
16a6815b69 fix: add fallback methods for 404 requests (#893)
* fix: add fallback methods for 404 requests

* fix: remove fallback controllers exports

* fix: have only one fallback controller expored
2023-10-31 14:44:33 +01:00
standardci
b08e9731b8 chore(release): publish new version
- @standardnotes/auth-server@1.163.2
 - @standardnotes/home-server@1.18.12
2023-10-30 12:23:43 +00:00
Karol Sójko
9bd4fb2d79 fix(auth): checking permissions to update setting only when directly performed by user (#892) 2023-10-30 12:51:31 +01:00
standardci
647aeda1de chore(release): publish new version
- @standardnotes/auth-server@1.163.1
 - @standardnotes/home-server@1.18.11
2023-10-30 11:20:27 +00:00
Karol Sójko
78ff748d91 fix(auth): add more information on the listed creation error 2023-10-30 11:52:26 +01:00
standardci
31f8cf1169 chore(release): publish new version
- @standardnotes/api-gateway@1.81.6
 - @standardnotes/home-server@1.18.10
2023-10-27 10:03:28 +00:00
Karol Sójko
14bcf7b6c9 fix(api-gateway): logs for errors reaching service 2023-10-27 11:36:52 +02:00
standardci
74adddd1e7 chore(release): publish new version
- @standardnotes/analytics@2.32.4
 - @standardnotes/api-gateway@1.81.5
 - @standardnotes/auth-server@1.163.0
 - @standardnotes/domain-core@1.40.0
 - @standardnotes/event-store@1.13.17
 - @standardnotes/files-server@1.32.2
 - @standardnotes/home-server@1.18.9
 - @standardnotes/revisions-server@1.47.3
 - @standardnotes/scheduler-server@1.26.4
 - @standardnotes/settings@1.22.0
 - @standardnotes/syncing-server@1.119.3
 - @standardnotes/websockets-server@1.17.4
2023-10-26 13:52:56 +00:00
Karol Sójko
0e43bc0042 feat: extract setting name to domain-core package 2023-10-26 15:18:11 +02:00
standardci
b40d539611 chore(release): publish new version
- @standardnotes/api-gateway@1.81.4
 - @standardnotes/home-server@1.18.8
2023-10-26 11:53:47 +00:00
Karol Sójko
654663d17f fix(api-gateway): retry attempts and logs 2023-10-26 13:27:27 +02:00
standardci
75830c3a98 chore(release): publish new version
- @standardnotes/analytics@2.32.3
 - @standardnotes/api-gateway@1.81.3
 - @standardnotes/auth-server@1.162.0
 - @standardnotes/domain-core@1.39.0
 - @standardnotes/event-store@1.13.16
 - @standardnotes/files-server@1.32.1
 - @standardnotes/home-server@1.18.7
 - @standardnotes/revisions-server@1.47.2
 - @standardnotes/scheduler-server@1.26.3
 - @standardnotes/settings@1.21.47
 - @standardnotes/syncing-server@1.119.2
 - @standardnotes/websockets-server@1.17.3
2023-10-26 11:13:35 +00:00
Karol Sójko
1b5078eb96 feat: refactor settings (#890)
* feat: refactor settings

* fix verify mfa specs and data source metadata

* fix: compound index field names

* fix metadata binding for typeorm repository

* fix responses to preserve e2e

* fixes for e2e

* fix recovery codes e2e

* add missing specs
2023-10-26 12:42:30 +02:00
standardci
a5e019e290 chore(release): publish new version
- @standardnotes/auth-server@1.161.0
 - @standardnotes/home-server@1.18.6
2023-10-23 12:29:33 +00:00
Karol Sójko
a812f3400a feat(auth): remove axios http calls to payments server (#889)
* feat(auth): remove axios http calls to payments server

* fix: remove unused variable

* fix: remove another unused variable
2023-10-23 14:01:22 +02:00
Karol Sójko
15af5635f0 fix: allow to cancel previous subscription when activating premium features in e2e tests 2023-10-23 11:44:35 +02:00
standardci
cee6d62791 chore(release): publish new version
- @standardnotes/api-gateway@1.81.2
 - @standardnotes/home-server@1.18.5
2023-10-20 10:13:15 +00:00
Karol Sójko
6aee51bd45 fix(api-gateway): add session validation retry attempts on timedout requests 2023-10-20 11:46:29 +02:00
standardci
599a84e634 chore(release): publish new version
- @standardnotes/api-gateway@1.81.1
 - @standardnotes/home-server@1.18.4
2023-10-20 08:52:56 +00:00
Karol Sójko
1c3d19cca4 fix(api-gateway): logs severity on retry attempts 2023-10-20 10:21:10 +02:00
standardci
9986e8e7ce chore(release): publish new version
- @standardnotes/home-server@1.18.3
 - @standardnotes/revisions-server@1.47.1
 - @standardnotes/syncing-server@1.119.1
2023-10-20 08:12:46 +00:00
Karol Sójko
e19f7a7b7f fix: merge mysql and mysql-legacy together (#883) 2023-10-20 09:42:10 +02:00
Karol Sójko
d570146378 fix: publishing workflow 2023-10-20 09:40:54 +02:00
standardci
8a9e4370e5 chore(release): publish new version
- @standardnotes/api-gateway@1.81.0
 - @standardnotes/home-server@1.18.2
2023-10-20 07:40:07 +00:00
Karol Sójko
ce357679e9 feat(api-gateway): add retry attempts on timedout requests (#885) 2023-10-20 09:24:01 +02:00
standardci
acab402747 chore(release): publish new version
- @standardnotes/api-gateway@1.80.1
 - @standardnotes/home-server@1.18.1
2023-10-19 18:17:41 +00:00
Karol Sójko
e385926046 fix(api-gateway): stringify error in service proxy 2023-10-19 20:01:18 +02:00
618 changed files with 19989 additions and 13702 deletions

2
.github/ci.env vendored
View File

@@ -26,3 +26,5 @@ MYSQL_ROOT_PASSWORD=changeme123
AUTH_JWT_SECRET=f95259c5e441f5a4646d76422cfb3df4c4488842901aa50b6c51b8be2e0040e9
AUTH_SERVER_ENCRYPTION_SERVER_KEY=1087415dfde3093797f9a7ca93a49e7d7aa1861735eb0d32aae9c303b8c3d060
VALET_TOKEN_SECRET=4b886819ebe1e908077c6cae96311b48a8416bd60cc91c03060e15bdf6b30d1f
SYNCING_SERVER_CONTENT_SIZE_TRANSFER_LIMIT=1000000

View File

@@ -61,13 +61,6 @@ updates:
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/event-store"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/files"
schedule:

View File

@@ -55,7 +55,7 @@ jobs:
run: yarn build
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
@@ -69,7 +69,7 @@ jobs:
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
uses: aws-actions/amazon-ecr-login@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@master

View File

@@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

View File

@@ -70,6 +70,7 @@ jobs:
echo "ACCESS_TOKEN_AGE=4" >> packages/home-server/.env
echo "REFRESH_TOKEN_AGE=10" >> packages/home-server/.env
echo "REVISIONS_FREQUENCY=2" >> packages/home-server/.env
echo "CONTENT_SIZE_TRANSFER_LIMIT=1000000" >> packages/home-server/.env
echo "DB_HOST=localhost" >> packages/home-server/.env
echo "DB_PORT=3306" >> packages/home-server/.env
echo "DB_DATABASE=standardnotes" >> packages/home-server/.env

View File

@@ -17,6 +17,8 @@ jobs:
name: (Self Hosting) E2E Test Suite
strategy:
fail-fast: false
matrix:
service_proxy_type: [http, grpc]
runs-on: ubuntu-latest
services:
@@ -42,6 +44,7 @@ jobs:
env:
DB_TYPE: mysql
CACHE_TYPE: redis
SERVICE_PROXY_TYPE: ${{ matrix.service_proxy_type }}
- name: Wait for server to start
run: docker/is-available.sh http://localhost:3123 $(pwd)/logs

View File

@@ -4,6 +4,9 @@ on:
push:
branches: [ main ]
permissions:
id-token: write
jobs:
build:
if: contains(github.event.head_commit.message, 'chore(release)') == false
@@ -112,13 +115,13 @@ jobs:
suite: 'vaults'
publish-self-hosting:
needs: [ test, lint, e2e-base ]
needs: [ test, lint, e2e-base, e2e-vaults ]
name: Publish Self Hosting Docker Image
uses: standardnotes/server/.github/workflows/common-self-hosting.yml@main
secrets: inherit
publish-services:
needs: [ test, lint, e2e-base ]
needs: [ test, lint, e2e-base, e2e-vaults ]
runs-on: ubuntu-latest
@@ -143,7 +146,7 @@ jobs:
git config --global user.email "ci@standardnotes.com"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

1090
.pnp.cjs generated

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -22,6 +22,7 @@ services:
environment:
DB_TYPE: "${DB_TYPE}"
CACHE_TYPE: "${CACHE_TYPE}"
SERVICE_PROXY_TYPE: "${SERVICE_PROXY_TYPE}"
container_name: server-ci
ports:
- 3123:3000

View File

@@ -14,10 +14,18 @@ if [ -z "$SYNCING_SERVER_PORT" ]; then
export SYNCING_SERVER_PORT=3101
fi
if [ -z "$SYNCING_SERVER_GRPC_PORT" ]; then
export SYNCING_SERVER_GRPC_PORT=50052
fi
if [ -z "$AUTH_SERVER_PORT" ]; then
export AUTH_SERVER_PORT=3103
fi
if [ -z "$AUTH_SERVER_GRPC_PORT" ]; then
export AUTH_SERVER_GRPC_PORT=50051
fi
export FILES_SERVER_PORT=3104
if [ -z "$REVISIONS_SERVER_PORT" ]; then
@@ -352,7 +360,9 @@ export API_GATEWAY_NODE_ENV=production
export API_GATEWAY_VERSION=local
export API_GATEWAY_SYNCING_SERVER_JS_URL=http://localhost:$SYNCING_SERVER_PORT
export API_GATEWAY_SYNCING_SERVER_GRPC_URL=0.0.0.0:$SYNCING_SERVER_GRPC_PORT
export API_GATEWAY_AUTH_SERVER_URL=http://localhost:$AUTH_SERVER_PORT
export API_GATEWAY_AUTH_SERVER_GRPC_URL=0.0.0.0:$AUTH_SERVER_GRPC_PORT
export API_GATEWAY_REVISIONS_SERVER_URL=http://localhost:$REVISIONS_SERVER_PORT
if [ -z "$PUBLIC_FILES_SERVER_URL" ]; then
export PUBLIC_FILES_SERVER_URL=http://localhost:3125

View File

@@ -39,5 +39,13 @@
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
},
"packageManager": "yarn@4.0.0-rc.51"
"packageManager": "yarn@4.0.0-rc.51",
"dependenciesMeta": {
"grpc-tools@1.12.4": {
"unplugged": true
},
"grpc_tools_node_protoc_ts@5.3.3": {
"unplugged": true
}
}
}

View File

@@ -3,6 +3,62 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.34.2](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.34.1...@standardnotes/analytics@2.34.2) (2023-11-28)
**Note:** Version bump only for package @standardnotes/analytics
## [2.34.1](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.34.0...@standardnotes/analytics@2.34.1) (2023-11-27)
### Bug Fixes
* repository config in package.json files ([ed1bf37](https://github.com/standardnotes/server/commit/ed1bf37287af23a25b8388ada95f0acdec8f71ea))
# [2.34.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.33.4...@standardnotes/analytics@2.34.0) (2023-11-27)
### Features
* add npm provenance to published packages ([e836abd](https://github.com/standardnotes/server/commit/e836abdef73d246940d8fffd9e65e17c64cd35c8))
## [2.33.4](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.33.3...@standardnotes/analytics@2.33.4) (2023-11-23)
**Note:** Version bump only for package @standardnotes/analytics
## [2.33.3](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.33.2...@standardnotes/analytics@2.33.3) (2023-11-22)
**Note:** Version bump only for package @standardnotes/analytics
## [2.33.2](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.33.1...@standardnotes/analytics@2.33.2) (2023-11-13)
**Note:** Version bump only for package @standardnotes/analytics
## [2.33.1](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.33.0...@standardnotes/analytics@2.33.1) (2023-11-13)
**Note:** Version bump only for package @standardnotes/analytics
# [2.33.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.32.6...@standardnotes/analytics@2.33.0) (2023-11-10)
### Features
* add graceful shutdown procedures upon SIGTERM ([#923](https://github.com/standardnotes/server/issues/923)) ([c24353c](https://github.com/standardnotes/server/commit/c24353cc24ebf4b40ff9a2cec8e37cfdef109e37))
## [2.32.6](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.32.5...@standardnotes/analytics@2.32.6) (2023-11-07)
**Note:** Version bump only for package @standardnotes/analytics
## [2.32.5](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.32.4...@standardnotes/analytics@2.32.5) (2023-11-07)
### Bug Fixes
* remove open telemetry from code ([#903](https://github.com/standardnotes/server/issues/903)) ([751f3b2](https://github.com/standardnotes/server/commit/751f3b25476c5be3d663ad8540c43266acd39493))
## [2.32.4](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.32.3...@standardnotes/analytics@2.32.4) (2023-10-26)
**Note:** Version bump only for package @standardnotes/analytics
## [2.32.3](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.32.2...@standardnotes/analytics@2.32.3) (2023-10-26)
**Note:** Version bump only for package @standardnotes/analytics
## [2.32.2](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.32.1...@standardnotes/analytics@2.32.2) (2023-10-19)
**Note:** Version bump only for package @standardnotes/analytics

View File

@@ -1,11 +1,5 @@
import 'reflect-metadata'
import { OpenTelemetrySDK, OpenTelemetryTracer } from '@standardnotes/domain-events-infra'
import { EmailLevel, ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.AnalyticsScheduledTask })
sdk.start()
import { Logger } from 'winston'
import { DomainEventPublisherInterface } from '@standardnotes/domain-events'
@@ -22,6 +16,7 @@ import { CalculateMonthlyRecurringRevenue } from '../src/Domain/UseCase/Calculat
import { getBody, getSubject } from '../src/Domain/Email/DailyAnalyticsReport'
import { TimerInterface } from '@standardnotes/time'
import { StatisticMeasureName } from '../src/Domain/Statistics/StatisticMeasureName'
import { EmailLevel } from '@standardnotes/domain-core'
const requestReport = async (
analyticsStore: AnalyticsStoreInterface,
@@ -275,9 +270,6 @@ void container.load().then((container) => {
logger.info(`Sending report to following admins: ${adminEmails}`)
const tracer = new OpenTelemetryTracer()
tracer.startSpan(ServiceIdentifier.NAMES.AnalyticsScheduledTask, 'report')
Promise.resolve(
requestReport(
analyticsStore,
@@ -293,15 +285,11 @@ void container.load().then((container) => {
.then(() => {
logger.info('Usage report generation complete')
tracer.stopSpan()
process.exit(0)
})
.catch((error) => {
logger.error(`Could not finish usage report generation: ${error.message}`)
tracer.stopSpanWithError(error)
process.exit(1)
})
})

View File

@@ -1,11 +1,5 @@
import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.AnalyticsWorker })
sdk.start()
import { Logger } from 'winston'
import { DomainEventSubscriberInterface } from '@standardnotes/domain-events'
import * as dayjs from 'dayjs'
@@ -28,5 +22,11 @@ void container.load().then((container) => {
const subscriber = container.get<DomainEventSubscriberInterface>(TYPES.DomainEventSubscriber)
process.on('SIGTERM', () => {
logger.info('SIGTERM received. Stopping worker...')
subscriber.stop()
logger.info('Worker stopped.')
})
subscriber.start()
})

View File

@@ -6,12 +6,12 @@ COMMAND=$1 && shift 1
case "$COMMAND" in
'start-worker' )
echo "[Docker] Starting Worker..."
node docker/entrypoint-worker.js
exec node docker/entrypoint-worker.js
;;
'report' )
echo "[Docker] Starting Usage Report Generation..."
node docker/entrypoint-report.js
exec node docker/entrypoint-report.js
;;
* )

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/analytics",
"version": "2.32.2",
"version": "2.34.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -10,7 +10,13 @@
"author": "Standard Notes",
"types": "dist/src/index.d.ts",
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"type": "git",
"url": "git@github.com:standardnotes/server.git",
"directory": "packages/analytics"
},
"license": "AGPL-3.0-or-later",
"scripts": {

View File

@@ -7,7 +7,7 @@ import {
DomainEventPublisherInterface,
DomainEventSubscriberInterface,
} from '@standardnotes/domain-events'
import { MapperInterface, ServiceIdentifier } from '@standardnotes/domain-core'
import { MapperInterface } from '@standardnotes/domain-core'
// eslint-disable-next-line @typescript-eslint/no-var-requires
const Mixpanel = require('mixpanel')
@@ -16,9 +16,9 @@ import TYPES from './Types'
import { AppDataSource } from './DataSource'
import { DomainEventFactory } from '../Domain/Event/DomainEventFactory'
import {
SNSOpenTelemetryDomainEventPublisher,
SNSDomainEventPublisher,
SQSDomainEventSubscriber,
SQSEventMessageHandler,
SQSOpenTelemetryDomainEventSubscriber,
} from '@standardnotes/domain-events-infra'
import { Timer, TimerInterface } from '@standardnotes/time'
import { PeriodKeyGeneratorInterface } from '../Domain/Time/PeriodKeyGeneratorInterface'
@@ -139,9 +139,7 @@ export class ContainerConfigLoader {
container
.bind<DomainEventPublisherInterface>(TYPES.DomainEventPublisher)
.toConstantValue(
new SNSOpenTelemetryDomainEventPublisher(container.get(TYPES.SNS), container.get(TYPES.SNS_TOPIC_ARN)),
)
.toConstantValue(new SNSDomainEventPublisher(container.get(TYPES.SNS), container.get(TYPES.SNS_TOPIC_ARN)))
if (env.get('MIXPANEL_TOKEN', true)) {
container.bind<Mixpanel>(TYPES.MixpanelClient).toConstantValue(Mixpanel.init(env.get('MIXPANEL_TOKEN', true)))
}
@@ -242,8 +240,7 @@ export class ContainerConfigLoader {
container
.bind<DomainEventSubscriberInterface>(TYPES.DomainEventSubscriber)
.toConstantValue(
new SQSOpenTelemetryDomainEventSubscriber(
ServiceIdentifier.NAMES.AnalyticsWorker,
new SQSDomainEventSubscriber(
container.get<SQSClient>(TYPES.SQS),
container.get<string>(TYPES.SQS_QUEUE_URL),
container.get<DomainEventMessageHandlerInterface>(TYPES.DomainEventMessageHandler),

View File

@@ -6,7 +6,9 @@ VERSION=development
PORT=3000
SYNCING_SERVER_JS_URL=http://syncing_server_js:3000
SYNCING_SERVER_GRPC_URL=http://syncing_server_js:50052
AUTH_SERVER_URL=http://auth:3000
AUTH_SERVER_GRPC_URL=http://auth:50051
WEB_SOCKET_SERVER_URL=http://websockets:3000
PAYMENTS_SERVER_URL=http://payments:3000
FILES_SERVER_URL=http://files:3000

View File

@@ -3,6 +3,230 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.87.2](https://github.com/standardnotes/server/compare/@standardnotes/api-gateway@1.87.1...@standardnotes/api-gateway@1.87.2) (2023-11-28)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.87.1](https://github.com/standardnotes/server/compare/@standardnotes/api-gateway@1.87.0...@standardnotes/api-gateway@1.87.1) (2023-11-27)
### Bug Fixes
* repository config in package.json files ([ed1bf37](https://github.com/standardnotes/server/commit/ed1bf37287af23a25b8388ada95f0acdec8f71ea))
# [1.87.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.86.6...@standardnotes/api-gateway@1.87.0) (2023-11-27)
### Features
* add npm provenance to published packages ([e836abd](https://github.com/standardnotes/api-gateway/commit/e836abdef73d246940d8fffd9e65e17c64cd35c8))
## [1.86.6](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.86.5...@standardnotes/api-gateway@1.86.6) (2023-11-23)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.86.5](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.86.4...@standardnotes/api-gateway@1.86.5) (2023-11-22)
### Bug Fixes
* error handling on gRPC ([#937](https://github.com/standardnotes/api-gateway/issues/937)) ([8f23c8a](https://github.com/standardnotes/api-gateway/commit/8f23c8ab3f03e9c23adfb31a33c5805492bc2f5b))
## [1.86.4](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.86.3...@standardnotes/api-gateway@1.86.4) (2023-11-22)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.86.3](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.86.2...@standardnotes/api-gateway@1.86.3) (2023-11-21)
### Bug Fixes
* **api-gateway:** add meta field to grpc sync calls ([#934](https://github.com/standardnotes/api-gateway/issues/934)) ([c5c24b3](https://github.com/standardnotes/api-gateway/commit/c5c24b3ac9dbd559d96adc56270d724a3156ebd4))
## [1.86.2](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.86.1...@standardnotes/api-gateway@1.86.2) (2023-11-20)
### Bug Fixes
* define grpc max message size ([bfef16c](https://github.com/standardnotes/api-gateway/commit/bfef16ce3757b57ea1cb0cb7417d6bc935a52321))
## [1.86.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.86.0...@standardnotes/api-gateway@1.86.1) (2023-11-20)
### Bug Fixes
* setting gzip as default compression on grpc calls ([#933](https://github.com/standardnotes/api-gateway/issues/933)) ([2dff6a2](https://github.com/standardnotes/api-gateway/commit/2dff6a2ed3d105ca65996d47321a811e22e25099))
# [1.86.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.85.1...@standardnotes/api-gateway@1.86.0) (2023-11-20)
### Features
* **grpc:** add syncing protocol buffers ([#930](https://github.com/standardnotes/api-gateway/issues/930)) ([5b84f07](https://github.com/standardnotes/api-gateway/commit/5b84f078c6ae6330706895f7c57b67ff8c8d18ae))
## [1.85.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.85.0...@standardnotes/api-gateway@1.85.1) (2023-11-16)
### Bug Fixes
* **api-gateway:** remove overly verbose debug messages ([ed05ea5](https://github.com/standardnotes/api-gateway/commit/ed05ea553f605234cd8803e633f3c07429877dbb))
# [1.85.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.84.1...@standardnotes/api-gateway@1.85.0) (2023-11-16)
### Features
* add debug logs for grpc communication ([6391a01](https://github.com/standardnotes/api-gateway/commit/6391a01b5703db23b566710d0520c1197c46144b))
## [1.84.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.84.0...@standardnotes/api-gateway@1.84.1) (2023-11-16)
### Bug Fixes
* **api-gateway:** bindings ([78fbeb5](https://github.com/standardnotes/api-gateway/commit/78fbeb595f9e213688bcb2a031fba2aa3974cc6a))
# [1.84.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.83.5...@standardnotes/api-gateway@1.84.0) (2023-11-16)
### Features
* add grpc sessions validation server ([#928](https://github.com/standardnotes/api-gateway/issues/928)) ([4f62cac](https://github.com/standardnotes/api-gateway/commit/4f62cac213a6b5f503040ef6319e5198967974ce))
## [1.83.5](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.83.4...@standardnotes/api-gateway@1.83.5) (2023-11-14)
### Bug Fixes
* **api-gateway:** remove the verify body function ([3ddd671](https://github.com/standardnotes/api-gateway/commit/3ddd671c4797482a396844e804b4b45b82dbff2d))
* **api-gateway:** remove unused imports ([fd997f4](https://github.com/standardnotes/api-gateway/commit/fd997f4849ed01ef3ae4baf52b5895012fa711d4))
## [1.83.4](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.83.3...@standardnotes/api-gateway@1.83.4) (2023-11-14)
### Bug Fixes
* **api-gateway:** add verification if json is valid on request ([420bf9e](https://github.com/standardnotes/api-gateway/commit/420bf9ec5460a9693cc382e9164b4bdbb9b769a1))
* **api-gateway:** buffer encoding ([2823ed8](https://github.com/standardnotes/api-gateway/commit/2823ed8612cb9797d43e847edac5e2bdc0fe7426))
* **api-gateway:** checking for buffer length ([f65809e](https://github.com/standardnotes/api-gateway/commit/f65809ef3052d05df2e3f012a9b6340d18a6deae))
## [1.83.3](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.83.2...@standardnotes/api-gateway@1.83.3) (2023-11-13)
### Bug Fixes
* **api-gateway:** add application version to the error logs ([daed1a7](https://github.com/standardnotes/api-gateway/commit/daed1a77a02559a8487896b6fb8299befe8a2d96))
* **api-gateway:** add request method to the debug logs ([b39eb09](https://github.com/standardnotes/api-gateway/commit/b39eb09d91f0ea9482d27578faecdf57ed2ea48e))
## [1.83.2](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.83.1...@standardnotes/api-gateway@1.83.2) (2023-11-13)
### Bug Fixes
* **api-gateway:** debug log on error thrown body representation ([c8bf4ab](https://github.com/standardnotes/api-gateway/commit/c8bf4ab3a0ab757092077fc594e3ca7e090116b4))
## [1.83.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.83.0...@standardnotes/api-gateway@1.83.1) (2023-11-13)
### Bug Fixes
* **api-gateway:** add debug logs for errors on parsing ([60686dc](https://github.com/standardnotes/api-gateway/commit/60686dcdbd59c0d99cd1857a82ad62baed088b25))
# [1.83.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.82.1...@standardnotes/api-gateway@1.83.0) (2023-11-10)
### Bug Fixes
* **api-gateway:** add more info on error logs ([f997501](https://github.com/standardnotes/api-gateway/commit/f99750169f4d24cdc7530184af2230c687f3e166))
### Features
* add keep-alive connections to subservices ([#924](https://github.com/standardnotes/api-gateway/issues/924)) ([daad76d](https://github.com/standardnotes/api-gateway/commit/daad76d0ddae34c59dce45eedc4a055c4a11456d))
## [1.82.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.82.0...@standardnotes/api-gateway@1.82.1) (2023-11-10)
### Bug Fixes
* **api-gateway:** websockets calls logs severity ([a9b1543](https://github.com/standardnotes/api-gateway/commit/a9b1543e204afeab1fa2e008327c39cf306a247c))
# [1.82.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.14...@standardnotes/api-gateway@1.82.0) (2023-11-10)
### Features
* add graceful shutdown procedures upon SIGTERM ([#923](https://github.com/standardnotes/api-gateway/issues/923)) ([c24353c](https://github.com/standardnotes/api-gateway/commit/c24353cc24ebf4b40ff9a2cec8e37cfdef109e37))
## [1.81.14](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.13...@standardnotes/api-gateway@1.81.14) (2023-11-10)
### Bug Fixes
* **api-gateway:** add logs about calling web sockets with minimal format ([5d3fb9a](https://github.com/standardnotes/api-gateway/commit/5d3fb9a537f6971cfe8ae3c5ea449806cc4de8a0))
## [1.81.13](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.12...@standardnotes/api-gateway@1.81.13) (2023-11-09)
### Bug Fixes
* **api-gateway:** add possibility to configure keep-alive timeout ([#920](https://github.com/standardnotes/api-gateway/issues/920)) ([16f92bd](https://github.com/standardnotes/api-gateway/commit/16f92bdc990ded5c3f1fe5af1e6e4a113a9954de))
## [1.81.12](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.11...@standardnotes/api-gateway@1.81.12) (2023-11-09)
### Bug Fixes
* reduce websockets api communication data ([#919](https://github.com/standardnotes/api-gateway/issues/919)) ([c4ae12d](https://github.com/standardnotes/api-gateway/commit/c4ae12d53fc166879f90a4c5dbad1ab1cb4797e2))
## [1.81.11](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.10...@standardnotes/api-gateway@1.81.11) (2023-11-07)
### Bug Fixes
* **api-gateway:** remove calling both auth and payments on account deletion request ([6b554c2](https://github.com/standardnotes/api-gateway/commit/6b554c28b731a9080d7ad2942d3fa05c01dcabf2))
## [1.81.10](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.9...@standardnotes/api-gateway@1.81.10) (2023-11-07)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.81.9](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.8...@standardnotes/api-gateway@1.81.9) (2023-11-07)
### Bug Fixes
* remove open telemetry from code ([#903](https://github.com/standardnotes/api-gateway/issues/903)) ([751f3b2](https://github.com/standardnotes/api-gateway/commit/751f3b25476c5be3d663ad8540c43266acd39493))
## [1.81.8](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.7...@standardnotes/api-gateway@1.81.8) (2023-11-03)
### Bug Fixes
* retry attempts on session validation and more verbose logs ([#898](https://github.com/standardnotes/api-gateway/issues/898)) ([3e376c4](https://github.com/standardnotes/api-gateway/commit/3e376c44e3a6c336dcff3d8ef5eb3ab040d9a561))
## [1.81.7](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.6...@standardnotes/api-gateway@1.81.7) (2023-10-31)
### Bug Fixes
* add fallback methods for 404 requests ([#893](https://github.com/standardnotes/api-gateway/issues/893)) ([16a6815](https://github.com/standardnotes/api-gateway/commit/16a6815b69e344573ae07682f3bac1d44d715d79))
## [1.81.6](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.5...@standardnotes/api-gateway@1.81.6) (2023-10-27)
### Bug Fixes
* **api-gateway:** logs for errors reaching service ([14bcf7b](https://github.com/standardnotes/api-gateway/commit/14bcf7b6c9403c3413e7579f58ea17168d14dce7))
## [1.81.5](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.4...@standardnotes/api-gateway@1.81.5) (2023-10-26)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.81.4](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.3...@standardnotes/api-gateway@1.81.4) (2023-10-26)
### Bug Fixes
* **api-gateway:** retry attempts and logs ([654663d](https://github.com/standardnotes/api-gateway/commit/654663d17f6eee15f7bf2bc7f40e6c37a3d8e53c))
## [1.81.3](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.2...@standardnotes/api-gateway@1.81.3) (2023-10-26)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.81.2](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.1...@standardnotes/api-gateway@1.81.2) (2023-10-20)
### Bug Fixes
* **api-gateway:** add session validation retry attempts on timedout requests ([6aee51b](https://github.com/standardnotes/api-gateway/commit/6aee51bd45c25e85d01075a9c8d2854b32dd6e3c))
## [1.81.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.81.0...@standardnotes/api-gateway@1.81.1) (2023-10-20)
### Bug Fixes
* **api-gateway:** logs severity on retry attempts ([1c3d19c](https://github.com/standardnotes/api-gateway/commit/1c3d19cca43a7a3eba2b0d05c820de5112edf89e))
# [1.81.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.80.1...@standardnotes/api-gateway@1.81.0) (2023-10-20)
### Features
* **api-gateway:** add retry attempts on timedout requests ([#885](https://github.com/standardnotes/api-gateway/issues/885)) ([ce35767](https://github.com/standardnotes/api-gateway/commit/ce357679e9bc704ab562e9d6ca192f49a794a664))
## [1.80.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.80.0...@standardnotes/api-gateway@1.80.1) (2023-10-19)
### Bug Fixes
* **api-gateway:** stringify error in service proxy ([e385926](https://github.com/standardnotes/api-gateway/commit/e38592604644e0f52df0865ffae5b7e79d1d3d07))
# [1.80.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.79.14...@standardnotes/api-gateway@1.80.0) (2023-10-19)
### Features

View File

@@ -1,11 +1,5 @@
import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.ApiGateway })
sdk.start()
import '../src/Controller/LegacyController'
import '../src/Controller/HealthCheckController'
@@ -96,8 +90,15 @@ void container.load().then((container) => {
const logger: winston.Logger = container.get(TYPES.ApiGateway_Logger)
server.setErrorConfig((app) => {
app.use((error: Record<string, unknown>, _request: Request, response: Response, _next: NextFunction) => {
logger.error(error.stack)
app.use((error: Record<string, unknown>, request: Request, response: Response, _next: NextFunction) => {
logger.error(
`[URL: |${request.method}| ${request.url}][SNJS: ${request.headers['x-snjs-version']}][Application: ${request.headers['x-application-version']}] Error thrown: ${error.stack}`,
)
logger.debug(
`[URL: |${request.method}| ${request.url}][SNJS: ${request.headers['x-snjs-version']}][Application: ${
request.headers['x-application-version']
}] Request body: ${JSON.stringify(request.body)}`,
)
response.status(500).send({
error: {
@@ -108,9 +109,18 @@ void container.load().then((container) => {
})
})
const serverInstance = server.build()
const serverInstance = server.build().listen(env.get('PORT'))
serverInstance.listen(env.get('PORT'))
const keepAliveTimeout = env.get('HTTP_KEEP_ALIVE_TIMEOUT', true) ? +env.get('HTTP_KEEP_ALIVE_TIMEOUT', true) : 5000
serverInstance.keepAliveTimeout = keepAliveTimeout
process.on('SIGTERM', () => {
logger.info('SIGTERM signal received: closing HTTP server')
serverInstance.close(() => {
logger.info('HTTP server closed')
})
})
logger.info(`Server started on port ${process.env.PORT}`)
})

View File

@@ -6,7 +6,7 @@ COMMAND=$1 && shift 1
case "$COMMAND" in
'start-web' )
echo "Starting Web..."
node docker/entrypoint-server.js
exec node docker/entrypoint-server.js
;;
* )

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