Compare commits

...

57 Commits

Author SHA1 Message Date
standardci
0057a5d6ff chore(release): publish new version
- @standardnotes/analytics@2.28.2
 - @standardnotes/api-gateway@1.77.2
 - @standardnotes/auth-server@1.152.2
 - @standardnotes/domain-events-infra@1.14.9
 - @standardnotes/event-store@1.12.12
 - @standardnotes/files-server@1.26.4
 - @standardnotes/home-server@1.16.36
 - @standardnotes/revisions-server@1.40.3
 - @standardnotes/scheduler-server@1.22.2
 - @standardnotes/syncing-server@1.112.4
 - @standardnotes/websockets-server@1.12.1
2023-10-09 08:12:19 +00:00
Karol Sójko
b736dab3c1 fix: remove xray sdk in favor of opentelemetry 2023-10-09 09:53:34 +02:00
standardci
951d965304 chore(release): publish new version
- @standardnotes/home-server@1.16.35
 - @standardnotes/revisions-server@1.40.2
 - @standardnotes/syncing-server@1.112.3
2023-10-09 06:45:04 +00:00
Karol Sójko
29e8de3238 fix: logs in transition 2023-10-09 08:26:18 +02:00
standardci
eeeacabaa8 chore(release): publish new version
- @standardnotes/home-server@1.16.34
 - @standardnotes/syncing-server@1.112.2
2023-10-06 14:30:24 +00:00
Karol Sójko
51ca8229b8 fix(syncing-server): calling auth server for user key params 2023-10-06 15:56:10 +02:00
Karol Sójko
a6a19a391e fix(syncing-server): error log on email backup requested 2023-10-06 15:44:11 +02:00
standardci
f6cdb7916c chore(release): publish new version
- @standardnotes/auth-server@1.152.1
 - @standardnotes/home-server@1.16.33
 - @standardnotes/revisions-server@1.40.1
 - @standardnotes/syncing-server@1.112.1
2023-10-06 13:34:07 +00:00
Karol Sójko
eafb064d79 fix(syncing-server): increase axios timeout on calling auth 2023-10-06 15:18:26 +02:00
Karol Sójko
ba050681f7 fix(syncing-server): logs on request backup handler 2023-10-06 15:16:38 +02:00
Karol Sójko
4780629549 fix(revisions): casting creation date from MongoDB 2023-10-06 15:14:11 +02:00
Karol Sójko
79a44aa51f fix(auth): checking for transition role when triggering transition 2023-10-06 14:56:45 +02:00
standardci
dd72769841 chore(release): publish new version
- @standardnotes/auth-server@1.152.0
 - @standardnotes/home-server@1.16.32
 - @standardnotes/revisions-server@1.40.0
 - @standardnotes/syncing-server@1.112.0
2023-10-06 11:22:47 +00:00
Karol Sójko
d8f1c66fd5 fix: enable TransitionRequestedEventHandler 2023-10-06 13:02:37 +02:00
Karol Sójko
afe9967d26 fix(auth): strip user from transition role after migration 2023-10-06 12:59:18 +02:00
Karol Sójko
27bea444cc feat: switch transition direction 2023-10-06 12:48:08 +02:00
standardci
7a571dec0a chore(release): publish new version
- @standardnotes/home-server@1.16.31
 - @standardnotes/syncing-server@1.111.5
2023-10-06 08:48:31 +00:00
Karol Sójko
8c57f505be fix(syncing-server): add more logs on successfull email backups requested 2023-10-06 10:28:50 +02:00
standardci
973612bf4f chore(release): publish new version
- @standardnotes/analytics@2.28.1
 - @standardnotes/auth-server@1.151.2
 - @standardnotes/home-server@1.16.30
 - @standardnotes/scheduler-server@1.22.1
 - @standardnotes/syncing-server@1.111.4
2023-10-06 08:01:50 +00:00
Karol Sójko
702a1286eb fix(syncing-server): error log on email backup request handler 2023-10-06 09:40:27 +02:00
Karol Sójko
a45b5b69b5 fix: add xray-sdk to background processors 2023-10-06 09:33:15 +02:00
standardci
321353f26c chore(release): publish new version
- @standardnotes/analytics@2.28.0
 - @standardnotes/api-gateway@1.77.1
 - @standardnotes/auth-server@1.151.1
 - @standardnotes/domain-core@1.35.0
 - @standardnotes/domain-events-infra@1.14.8
 - @standardnotes/event-store@1.12.11
 - @standardnotes/files-server@1.26.3
 - @standardnotes/home-server@1.16.29
 - @standardnotes/revisions-server@1.39.5
 - @standardnotes/scheduler-server@1.22.0
 - @standardnotes/settings@1.21.43
 - @standardnotes/syncing-server@1.111.3
 - @standardnotes/websockets-server@1.12.0
2023-10-06 05:44:00 +00:00
Karol Sójko
db4607d4aa chore: upgrade sqs-consumer 2023-10-06 07:26:59 +02:00
Karol Sójko
f0531d68cb feat: add xray to analytics scheduler and websockets 2023-10-06 07:23:06 +02:00
Karol Sójko
8a00d159a6 Revert "fix: naming of segments for sqs handlers"
This reverts commit d244cc0d5f.
2023-10-06 06:50:14 +02:00
Karol Sójko
d244cc0d5f fix: naming of segments for sqs handlers 2023-10-05 18:06:17 +02:00
standardci
6a2aa4b148 chore(release): publish new version
- @standardnotes/api-gateway@1.77.0
 - @standardnotes/auth-server@1.151.0
 - @standardnotes/home-server@1.16.28
2023-10-05 14:42:25 +00:00
Karol Sójko
3ee49416f8 feat: setting xray segment user on api-gateway level 2023-10-05 16:25:09 +02:00
standardci
ae1e86e19f chore(release): publish new version
- @standardnotes/home-server@1.16.27
 - @standardnotes/revisions-server@1.39.4
2023-10-05 13:20:33 +00:00
Karol Sójko
9f76e389e2 fix(revisions): capture mysql to xray 2023-10-05 13:22:39 +02:00
standardci
6e2240e60c chore(release): publish new version
- @standardnotes/analytics@2.27.10
 - @standardnotes/api-gateway@1.76.2
 - @standardnotes/auth-server@1.150.9
 - @standardnotes/domain-events-infra@1.14.7
 - @standardnotes/event-store@1.12.10
 - @standardnotes/files-server@1.26.2
 - @standardnotes/home-server@1.16.26
 - @standardnotes/revisions-server@1.39.3
 - @standardnotes/scheduler-server@1.21.10
 - @standardnotes/syncing-server@1.111.2
 - @standardnotes/websockets-server@1.11.10
2023-10-05 07:17:33 +00:00
Karol Sójko
cd37c951bb Revert "fix(domain-events-infra): setting user metadata on workers"
This reverts commit c4b6f17ebc.
2023-10-05 09:00:47 +02:00
standardci
c4c3dfb823 chore(release): publish new version
- @standardnotes/analytics@2.27.9
 - @standardnotes/api-gateway@1.76.1
 - @standardnotes/auth-server@1.150.8
 - @standardnotes/domain-events-infra@1.14.6
 - @standardnotes/event-store@1.12.9
 - @standardnotes/files-server@1.26.1
 - @standardnotes/home-server@1.16.25
 - @standardnotes/revisions-server@1.39.2
 - @standardnotes/scheduler-server@1.21.9
 - @standardnotes/syncing-server@1.111.1
 - @standardnotes/websockets-server@1.11.9
2023-10-05 05:36:39 +00:00
Karol Sójko
c4b6f17ebc fix(domain-events-infra): setting user metadata on workers 2023-10-05 07:16:18 +02:00
standardci
71ce938cb1 chore(release): publish new version
- @standardnotes/api-gateway@1.76.0
 - @standardnotes/files-server@1.26.0
 - @standardnotes/home-server@1.16.24
 - @standardnotes/syncing-server@1.111.0
2023-10-04 18:03:38 +00:00
Karol Sójko
dc76113915 feat(api-gateaway): configure aws-xray-sdk 2023-10-04 19:44:25 +02:00
Karol Sójko
6583ff6cd9 feat: add xray to syncing server and files 2023-10-04 19:39:16 +02:00
standardci
69ea947857 chore(release): publish new version
- @standardnotes/analytics@2.27.8
 - @standardnotes/api-gateway@1.75.13
 - @standardnotes/auth-server@1.150.7
 - @standardnotes/domain-core@1.34.2
 - @standardnotes/domain-events-infra@1.14.5
 - @standardnotes/event-store@1.12.8
 - @standardnotes/files-server@1.25.6
 - @standardnotes/home-server@1.16.23
 - @standardnotes/revisions-server@1.39.1
 - @standardnotes/scheduler-server@1.21.8
 - @standardnotes/settings@1.21.42
 - @standardnotes/syncing-server@1.110.8
 - @standardnotes/websockets-server@1.11.8
2023-10-04 16:36:09 +00:00
Karol Sójko
eab78b3a95 fix: identifying services in workers 2023-10-04 18:13:41 +02:00
standardci
3097f7f063 chore(release): publish new version
- @standardnotes/home-server@1.16.22
 - @standardnotes/revisions-server@1.39.0
2023-10-04 15:42:53 +00:00
Karol Sójko
126989df82 feat(revisions): add aws-xray-sdk 2023-10-04 17:22:40 +02:00
Karol Sójko
a25eb178c5 chore: fix env var replacement 2023-10-04 16:43:48 +02:00
standardci
18dae26b8e chore(release): publish new version
- @standardnotes/analytics@2.27.7
 - @standardnotes/api-gateway@1.75.12
 - @standardnotes/auth-server@1.150.6
 - @standardnotes/domain-events-infra@1.14.4
 - @standardnotes/event-store@1.12.7
 - @standardnotes/files-server@1.25.5
 - @standardnotes/home-server@1.16.21
 - @standardnotes/revisions-server@1.38.10
 - @standardnotes/scheduler-server@1.21.7
 - @standardnotes/syncing-server@1.110.7
 - @standardnotes/websockets-server@1.11.7
2023-10-04 14:30:55 +00:00
Karol Sójko
5bc8157d4d chore: disable vault tests temporarily 2023-10-04 16:09:27 +02:00
Karol Sójko
f29826e917 chore: add filling in the package version 2023-10-04 16:09:15 +02:00
Karol Sójko
ba7cbb989b fix(domain-events-infra): subsegment name 2023-10-04 15:51:33 +02:00
Karol Sójko
d4579ce21e fix(auth): disable users from registering to MongoDB 2023-10-04 15:51:32 +02:00
standardci
ed14d2dfb7 chore(release): publish new version
- @standardnotes/analytics@2.27.6
 - @standardnotes/api-gateway@1.75.11
 - @standardnotes/auth-server@1.150.5
 - @standardnotes/domain-events-infra@1.14.3
 - @standardnotes/event-store@1.12.6
 - @standardnotes/files-server@1.25.4
 - @standardnotes/home-server@1.16.20
 - @standardnotes/revisions-server@1.38.9
 - @standardnotes/scheduler-server@1.21.6
 - @standardnotes/syncing-server@1.110.6
 - @standardnotes/websockets-server@1.11.6
2023-10-04 13:17:42 +00:00
Karol Sójko
64f1fe59c2 fix(domain-events-infra): remove redundant flush 2023-10-04 14:49:49 +02:00
Karol Sójko
207ef9f3e5 fix(domain-events-infra): handling segments 2023-10-04 14:47:45 +02:00
standardci
3ea0435459 chore(release): publish new version
- @standardnotes/analytics@2.27.5
 - @standardnotes/api-gateway@1.75.10
 - @standardnotes/auth-server@1.150.4
 - @standardnotes/domain-events-infra@1.14.2
 - @standardnotes/event-store@1.12.5
 - @standardnotes/files-server@1.25.3
 - @standardnotes/home-server@1.16.19
 - @standardnotes/revisions-server@1.38.8
 - @standardnotes/scheduler-server@1.21.5
 - @standardnotes/syncing-server@1.110.5
 - @standardnotes/websockets-server@1.11.5
2023-10-04 12:38:32 +00:00
Karol Sójko
7668713dd6 fix(domain-events-infra): imports 2023-10-04 14:06:47 +02:00
Karol Sójko
f6bc1c3084 fix(domain-events-infra): handling async functions 2023-10-04 14:01:46 +02:00
standardci
4203ff9a0c chore(release): publish new version
- @standardnotes/auth-server@1.150.3
 - @standardnotes/home-server@1.16.18
2023-10-04 11:48:12 +00:00
Karol Sójko
0281724196 fix(auth): remove ec2 plugin from worker 2023-10-04 13:21:14 +02:00
standardci
94bd319279 chore(release): publish new version
- @standardnotes/auth-server@1.150.2
 - @standardnotes/home-server@1.16.17
2023-10-04 11:09:36 +00:00
Karol Sójko
373cfad1f7 fix(auth): remove ec2 plugin 2023-10-04 12:42:49 +02:00
141 changed files with 1612 additions and 1203 deletions

View File

@@ -38,6 +38,10 @@ jobs:
run: |
jq '(.containerDefinitions[] | select(.name=="${{ inputs.service_name }}-prod") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: Fill in the new package version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="${{ inputs.service_name }}-prod") | .environment[] | select(.name=="npm_package_version")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def-prod
uses: aws-actions/amazon-ecs-render-task-definition@v1

View File

@@ -104,11 +104,11 @@ jobs:
suite: 'base'
secrets: inherit
e2e-vaults:
needs: build
name: E2E Vaults Suite
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
with:
snjs_image_tag: 'latest'
suite: 'vaults'
secrets: inherit
# e2e-vaults:
# needs: build
# name: E2E Vaults Suite
# uses: standardnotes/server/.github/workflows/common-e2e.yml@main
# with:
# snjs_image_tag: 'latest'
# suite: 'vaults'
# secrets: inherit

View File

@@ -104,23 +104,23 @@ jobs:
suite: 'base'
secrets: inherit
e2e-vaults:
needs: build
name: E2E Vaults Suite
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
with:
snjs_image_tag: 'latest'
suite: 'vaults'
secrets: inherit
# e2e-vaults:
# needs: build
# name: E2E Vaults Suite
# uses: standardnotes/server/.github/workflows/common-e2e.yml@main
# with:
# snjs_image_tag: 'latest'
# suite: 'vaults'
# secrets: inherit
publish-self-hosting:
needs: [ test, lint, e2e-base, e2e-vaults ]
needs: [ test, lint, e2e-base ]
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, e2e-vaults ]
needs: [ test, lint, e2e-base ]
runs-on: ubuntu-latest

333
.pnp.cjs generated
View File

@@ -1605,13 +1605,6 @@ const RAW_RUNTIME_STATE =
["@aws-sdk/service-error-classification", "npm:3.342.0"]\
],\
"linkType": "HARD"\
}],\
["npm:3.370.0", {\
"packageLocation": "./.yarn/cache/@aws-sdk-service-error-classification-npm-3.370.0-0d5b615252-500f067ba1.zip/node_modules/@aws-sdk/service-error-classification/",\
"packageDependencies": [\
["@aws-sdk/service-error-classification", "npm:3.370.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["@aws-sdk/shared-ini-file-loader", [\
@@ -1795,15 +1788,6 @@ const RAW_RUNTIME_STATE =
["tslib", "npm:2.5.2"]\
],\
"linkType": "HARD"\
}],\
["npm:3.418.0", {\
"packageLocation": "./.yarn/cache/@aws-sdk-types-npm-3.418.0-451c0cadd0-627955c2c9.zip/node_modules/@aws-sdk/types/",\
"packageDependencies": [\
["@aws-sdk/types", "npm:3.418.0"],\
["@smithy/types", "npm:2.3.4"],\
["tslib", "npm:2.5.2"]\
],\
"linkType": "HARD"\
}]\
]],\
["@aws-sdk/url-parser", [\
@@ -5504,14 +5488,6 @@ const RAW_RUNTIME_STATE =
["tslib", "npm:2.5.2"]\
],\
"linkType": "HARD"\
}],\
["npm:2.3.4", {\
"packageLocation": "./.yarn/cache/@smithy-types-npm-2.3.4-7d0b3a2a2f-8a5ad3b47e.zip/node_modules/@smithy/types/",\
"packageDependencies": [\
["@smithy/types", "npm:2.3.4"],\
["tslib", "npm:2.5.2"]\
],\
"linkType": "HARD"\
}]\
]],\
["@smithy/url-parser", [\
@@ -5859,7 +5835,6 @@ const RAW_RUNTIME_STATE =
["@types/uuid", "npm:9.0.3"],\
["@typescript-eslint/eslint-plugin", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:6.5.0"],\
["@typescript-eslint/parser", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:6.5.0"],\
["aws-xray-sdk", "npm:3.5.2"],\
["axios", "npm:1.4.0"],\
["bcryptjs", "npm:2.4.3"],\
["cors", "npm:2.8.5"],\
@@ -5963,7 +5938,6 @@ const RAW_RUNTIME_STATE =
["@types/newrelic", "npm:9.14.0"],\
["@typescript-eslint/eslint-plugin", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:6.5.0"],\
["@typescript-eslint/parser", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:6.5.0"],\
["aws-xray-sdk", "npm:3.5.2"],\
["eslint", "npm:8.41.0"],\
["eslint-plugin-prettier", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.0.0"],\
["ioredis", "npm:5.3.2"],\
@@ -5971,7 +5945,7 @@ const RAW_RUNTIME_STATE =
["newrelic", "npm:11.0.0"],\
["prettier", "npm:3.0.3"],\
["reflect-metadata", "npm:0.1.13"],\
["sqs-consumer", "virtual:685a6222c3349423674bb7f0684ba34e2ab20912010f352e04dcf707a156e13183fc382e2417cb37a60f3e7b52fd0178c53181674890e1773eb83e190dc13378#npm:6.2.1"],\
["sqs-consumer", "virtual:685a6222c3349423674bb7f0684ba34e2ab20912010f352e04dcf707a156e13183fc382e2417cb37a60f3e7b52fd0178c53181674890e1773eb83e190dc13378#npm:7.3.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"],\
["winston", "npm:3.9.0"]\
@@ -6635,16 +6609,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["@types/cls-hooked", [\
["npm:4.3.6", {\
"packageLocation": "./.yarn/cache/@types-cls-hooked-npm-4.3.6-8787b64e86-f5b9864348.zip/node_modules/@types/cls-hooked/",\
"packageDependencies": [\
["@types/cls-hooked", "npm:4.3.6"],\
["@types/node", "npm:20.2.5"]\
],\
"linkType": "HARD"\
}]\
]],\
["@types/concat-stream", [\
["npm:1.6.1", {\
"packageLocation": "./.yarn/cache/@types-concat-stream-npm-1.6.1-42cd06b019-7d211e7433.zip/node_modules/@types/concat-stream/",\
@@ -6904,16 +6868,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["@types/mysql", [\
["npm:2.15.22", {\
"packageLocation": "./.yarn/cache/@types-mysql-npm-2.15.22-d643eb999e-6be0aac58f.zip/node_modules/@types/mysql/",\
"packageDependencies": [\
["@types/mysql", "npm:2.15.22"],\
["@types/node", "npm:20.2.5"]\
],\
"linkType": "HARD"\
}]\
]],\
["@types/newrelic", [\
["npm:9.14.0", {\
"packageLocation": "./.yarn/cache/@types-newrelic-npm-9.14.0-4668da51a1-3a54ea75a4.zip/node_modules/@types/newrelic/",\
@@ -6982,18 +6936,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["@types/pg", [\
["npm:8.10.3", {\
"packageLocation": "./.yarn/cache/@types-pg-npm-8.10.3-3fc3365c7b-22d4836bd9.zip/node_modules/@types/pg/",\
"packageDependencies": [\
["@types/pg", "npm:8.10.3"],\
["@types/node", "npm:20.2.5"],\
["pg-protocol", "npm:1.6.0"],\
["pg-types", "npm:4.0.1"]\
],\
"linkType": "HARD"\
}]\
]],\
["@types/prettier", [\
["npm:2.7.3", {\
"packageLocation": "./.yarn/cache/@types-prettier-npm-2.7.3-497316f37c-cda84c19ac.zip/node_modules/@types/prettier/",\
@@ -8004,16 +7946,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["async-hook-jl", [\
["npm:1.7.6", {\
"packageLocation": "./.yarn/cache/async-hook-jl-npm-1.7.6-9999815029-f61a3bd4c3.zip/node_modules/async-hook-jl/",\
"packageDependencies": [\
["async-hook-jl", "npm:1.7.6"],\
["stack-chain", "npm:1.3.7"]\
],\
"linkType": "HARD"\
}]\
]],\
["asynckit", [\
["npm:0.4.0", {\
"packageLocation": "./.yarn/cache/asynckit-npm-0.4.0-c718858525-3ce727cbc7.zip/node_modules/asynckit/",\
@@ -8023,112 +7955,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["atomic-batcher", [\
["npm:1.0.2", {\
"packageLocation": "./.yarn/cache/atomic-batcher-npm-1.0.2-6fcd3a3097-025e334f1f.zip/node_modules/atomic-batcher/",\
"packageDependencies": [\
["atomic-batcher", "npm:1.0.2"]\
],\
"linkType": "HARD"\
}]\
]],\
["aws-xray-sdk", [\
["npm:3.5.2", {\
"packageLocation": "./.yarn/cache/aws-xray-sdk-npm-3.5.2-15fc4e54ee-576d0d5ccb.zip/node_modules/aws-xray-sdk/",\
"packageDependencies": [\
["aws-xray-sdk", "npm:3.5.2"],\
["aws-xray-sdk-core", "npm:3.5.2"],\
["aws-xray-sdk-express", "virtual:15fc4e54eec18d85ce3f22aa2405619072c35fbd500ad809cce2c9e4ead8a191fcc189cef6a5d76df3bea5576f09735fc4d32f086db561623afc56dd36794c8f#npm:3.5.2"],\
["aws-xray-sdk-mysql", "virtual:15fc4e54eec18d85ce3f22aa2405619072c35fbd500ad809cce2c9e4ead8a191fcc189cef6a5d76df3bea5576f09735fc4d32f086db561623afc56dd36794c8f#npm:3.5.2"],\
["aws-xray-sdk-postgres", "virtual:15fc4e54eec18d85ce3f22aa2405619072c35fbd500ad809cce2c9e4ead8a191fcc189cef6a5d76df3bea5576f09735fc4d32f086db561623afc56dd36794c8f#npm:3.5.2"]\
],\
"linkType": "HARD"\
}]\
]],\
["aws-xray-sdk-core", [\
["npm:3.5.2", {\
"packageLocation": "./.yarn/cache/aws-xray-sdk-core-npm-3.5.2-9083a0c00f-a643998187.zip/node_modules/aws-xray-sdk-core/",\
"packageDependencies": [\
["aws-xray-sdk-core", "npm:3.5.2"],\
["@aws-sdk/service-error-classification", "npm:3.370.0"],\
["@aws-sdk/types", "npm:3.418.0"],\
["@types/cls-hooked", "npm:4.3.6"],\
["atomic-batcher", "npm:1.0.2"],\
["cls-hooked", "npm:4.2.2"],\
["semver", "npm:7.5.4"]\
],\
"linkType": "HARD"\
}]\
]],\
["aws-xray-sdk-express", [\
["npm:3.5.2", {\
"packageLocation": "./.yarn/cache/aws-xray-sdk-express-npm-3.5.2-c4574a664b-62a07d0f3b.zip/node_modules/aws-xray-sdk-express/",\
"packageDependencies": [\
["aws-xray-sdk-express", "npm:3.5.2"]\
],\
"linkType": "SOFT"\
}],\
["virtual:15fc4e54eec18d85ce3f22aa2405619072c35fbd500ad809cce2c9e4ead8a191fcc189cef6a5d76df3bea5576f09735fc4d32f086db561623afc56dd36794c8f#npm:3.5.2", {\
"packageLocation": "./.yarn/__virtual__/aws-xray-sdk-express-virtual-36027c3d91/0/cache/aws-xray-sdk-express-npm-3.5.2-c4574a664b-62a07d0f3b.zip/node_modules/aws-xray-sdk-express/",\
"packageDependencies": [\
["aws-xray-sdk-express", "virtual:15fc4e54eec18d85ce3f22aa2405619072c35fbd500ad809cce2c9e4ead8a191fcc189cef6a5d76df3bea5576f09735fc4d32f086db561623afc56dd36794c8f#npm:3.5.2"],\
["@types/aws-xray-sdk-core", null],\
["@types/express", "npm:4.17.17"],\
["aws-xray-sdk-core", "npm:3.5.2"]\
],\
"packagePeers": [\
"@types/aws-xray-sdk-core",\
"aws-xray-sdk-core"\
],\
"linkType": "HARD"\
}]\
]],\
["aws-xray-sdk-mysql", [\
["npm:3.5.2", {\
"packageLocation": "./.yarn/cache/aws-xray-sdk-mysql-npm-3.5.2-095483ab95-f910a96630.zip/node_modules/aws-xray-sdk-mysql/",\
"packageDependencies": [\
["aws-xray-sdk-mysql", "npm:3.5.2"]\
],\
"linkType": "SOFT"\
}],\
["virtual:15fc4e54eec18d85ce3f22aa2405619072c35fbd500ad809cce2c9e4ead8a191fcc189cef6a5d76df3bea5576f09735fc4d32f086db561623afc56dd36794c8f#npm:3.5.2", {\
"packageLocation": "./.yarn/__virtual__/aws-xray-sdk-mysql-virtual-d8a5f29b75/0/cache/aws-xray-sdk-mysql-npm-3.5.2-095483ab95-f910a96630.zip/node_modules/aws-xray-sdk-mysql/",\
"packageDependencies": [\
["aws-xray-sdk-mysql", "virtual:15fc4e54eec18d85ce3f22aa2405619072c35fbd500ad809cce2c9e4ead8a191fcc189cef6a5d76df3bea5576f09735fc4d32f086db561623afc56dd36794c8f#npm:3.5.2"],\
["@types/aws-xray-sdk-core", null],\
["@types/mysql", "npm:2.15.22"],\
["aws-xray-sdk-core", "npm:3.5.2"]\
],\
"packagePeers": [\
"@types/aws-xray-sdk-core",\
"aws-xray-sdk-core"\
],\
"linkType": "HARD"\
}]\
]],\
["aws-xray-sdk-postgres", [\
["npm:3.5.2", {\
"packageLocation": "./.yarn/cache/aws-xray-sdk-postgres-npm-3.5.2-3a7e7bcc42-f2d6da22c7.zip/node_modules/aws-xray-sdk-postgres/",\
"packageDependencies": [\
["aws-xray-sdk-postgres", "npm:3.5.2"]\
],\
"linkType": "SOFT"\
}],\
["virtual:15fc4e54eec18d85ce3f22aa2405619072c35fbd500ad809cce2c9e4ead8a191fcc189cef6a5d76df3bea5576f09735fc4d32f086db561623afc56dd36794c8f#npm:3.5.2", {\
"packageLocation": "./.yarn/__virtual__/aws-xray-sdk-postgres-virtual-c6edb063fc/0/cache/aws-xray-sdk-postgres-npm-3.5.2-3a7e7bcc42-f2d6da22c7.zip/node_modules/aws-xray-sdk-postgres/",\
"packageDependencies": [\
["aws-xray-sdk-postgres", "virtual:15fc4e54eec18d85ce3f22aa2405619072c35fbd500ad809cce2c9e4ead8a191fcc189cef6a5d76df3bea5576f09735fc4d32f086db561623afc56dd36794c8f#npm:3.5.2"],\
["@types/aws-xray-sdk-core", null],\
["@types/pg", "npm:8.10.3"],\
["aws-xray-sdk-core", "npm:3.5.2"]\
],\
"packagePeers": [\
"@types/aws-xray-sdk-core",\
"aws-xray-sdk-core"\
],\
"linkType": "HARD"\
}]\
]],\
["axios", [\
["npm:0.21.4", {\
"packageLocation": "./.yarn/cache/axios-npm-0.21.4-e278873748-da644592cb.zip/node_modules/axios/",\
@@ -8919,18 +8745,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["cls-hooked", [\
["npm:4.2.2", {\
"packageLocation": "./.yarn/cache/cls-hooked-npm-4.2.2-db33b9b95f-59081fcc0f.zip/node_modules/cls-hooked/",\
"packageDependencies": [\
["cls-hooked", "npm:4.2.2"],\
["async-hook-jl", "npm:1.7.6"],\
["emitter-listener", "npm:1.1.2"],\
["semver", "npm:5.7.2"]\
],\
"linkType": "HARD"\
}]\
]],\
["cluster-key-slot", [\
["npm:1.1.2", {\
"packageLocation": "./.yarn/cache/cluster-key-slot-npm-1.1.2-0571a28825-516ed8b5e1.zip/node_modules/cluster-key-slot/",\
@@ -9821,16 +9635,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["emitter-listener", [\
["npm:1.1.2", {\
"packageLocation": "./.yarn/cache/emitter-listener-npm-1.1.2-0fe118d0b3-697f53c308.zip/node_modules/emitter-listener/",\
"packageDependencies": [\
["emitter-listener", "npm:1.1.2"],\
["shimmer", "npm:1.2.1"]\
],\
"linkType": "HARD"\
}]\
]],\
["emittery", [\
["npm:0.13.1", {\
"packageLocation": "./.yarn/cache/emittery-npm-0.13.1-cb6cd1bb03-fbe214171d.zip/node_modules/emittery/",\
@@ -14203,15 +14007,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["obuf", [\
["npm:1.1.2", {\
"packageLocation": "./.yarn/cache/obuf-npm-1.1.2-8db5fae8dd-53ff4ab3a1.zip/node_modules/obuf/",\
"packageDependencies": [\
["obuf", "npm:1.1.2"]\
],\
"linkType": "HARD"\
}]\
]],\
["on-finished", [\
["npm:2.4.1", {\
"packageLocation": "./.yarn/cache/on-finished-npm-2.4.1-907af70f88-8e81472c50.zip/node_modules/on-finished/",\
@@ -14672,49 +14467,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["pg-int8", [\
["npm:1.0.1", {\
"packageLocation": "./.yarn/cache/pg-int8-npm-1.0.1-5cd67f3e22-a1e3a05a69.zip/node_modules/pg-int8/",\
"packageDependencies": [\
["pg-int8", "npm:1.0.1"]\
],\
"linkType": "HARD"\
}]\
]],\
["pg-numeric", [\
["npm:1.0.2", {\
"packageLocation": "./.yarn/cache/pg-numeric-npm-1.0.2-9026ec3427-8899f8200c.zip/node_modules/pg-numeric/",\
"packageDependencies": [\
["pg-numeric", "npm:1.0.2"]\
],\
"linkType": "HARD"\
}]\
]],\
["pg-protocol", [\
["npm:1.6.0", {\
"packageLocation": "./.yarn/cache/pg-protocol-npm-1.6.0-089a4b1d3c-995864cc2a.zip/node_modules/pg-protocol/",\
"packageDependencies": [\
["pg-protocol", "npm:1.6.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["pg-types", [\
["npm:4.0.1", {\
"packageLocation": "./.yarn/cache/pg-types-npm-4.0.1-8f922557d3-2c686ef361.zip/node_modules/pg-types/",\
"packageDependencies": [\
["pg-types", "npm:4.0.1"],\
["pg-int8", "npm:1.0.1"],\
["pg-numeric", "npm:1.0.2"],\
["postgres-array", "npm:3.0.2"],\
["postgres-bytea", "npm:3.0.0"],\
["postgres-date", "npm:2.0.1"],\
["postgres-interval", "npm:3.0.0"],\
["postgres-range", "npm:1.1.3"]\
],\
"linkType": "HARD"\
}]\
]],\
["picocolors", [\
["npm:1.0.0", {\
"packageLocation": "./.yarn/cache/picocolors-npm-1.0.0-d81e0b1927-a2e8092dd8.zip/node_modules/picocolors/",\
@@ -14786,52 +14538,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["postgres-array", [\
["npm:3.0.2", {\
"packageLocation": "./.yarn/cache/postgres-array-npm-3.0.2-da6a3f1fed-0159517e4e.zip/node_modules/postgres-array/",\
"packageDependencies": [\
["postgres-array", "npm:3.0.2"]\
],\
"linkType": "HARD"\
}]\
]],\
["postgres-bytea", [\
["npm:3.0.0", {\
"packageLocation": "./.yarn/cache/postgres-bytea-npm-3.0.0-5de4c664f6-f5c01758fd.zip/node_modules/postgres-bytea/",\
"packageDependencies": [\
["postgres-bytea", "npm:3.0.0"],\
["obuf", "npm:1.1.2"]\
],\
"linkType": "HARD"\
}]\
]],\
["postgres-date", [\
["npm:2.0.1", {\
"packageLocation": "./.yarn/cache/postgres-date-npm-2.0.1-00e0e0bc9e-908eacec35.zip/node_modules/postgres-date/",\
"packageDependencies": [\
["postgres-date", "npm:2.0.1"]\
],\
"linkType": "HARD"\
}]\
]],\
["postgres-interval", [\
["npm:3.0.0", {\
"packageLocation": "./.yarn/cache/postgres-interval-npm-3.0.0-936c769b98-c7a1cf006d.zip/node_modules/postgres-interval/",\
"packageDependencies": [\
["postgres-interval", "npm:3.0.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["postgres-range", [\
["npm:1.1.3", {\
"packageLocation": "./.yarn/cache/postgres-range-npm-1.1.3-46f68e1a9e-356a46d97e.zip/node_modules/postgres-range/",\
"packageDependencies": [\
["postgres-range", "npm:1.1.3"]\
],\
"linkType": "HARD"\
}]\
]],\
["prelude-ls", [\
["npm:1.2.1", {\
"packageLocation": "./.yarn/cache/prelude-ls-npm-1.2.1-3e4d272a55-0b9d2c7680.zip/node_modules/prelude-ls/",\
@@ -15591,13 +15297,6 @@ const RAW_RUNTIME_STATE =
],\
"linkType": "HARD"\
}],\
["npm:5.7.2", {\
"packageLocation": "./.yarn/cache/semver-npm-5.7.2-938ee91eaa-fca14418a1.zip/node_modules/semver/",\
"packageDependencies": [\
["semver", "npm:5.7.2"]\
],\
"linkType": "HARD"\
}],\
["npm:6.3.0", {\
"packageLocation": "./.yarn/cache/semver-npm-6.3.0-b3eace8bfd-8dd72e7c7c.zip/node_modules/semver/",\
"packageDependencies": [\
@@ -15742,15 +15441,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["shimmer", [\
["npm:1.2.1", {\
"packageLocation": "./.yarn/cache/shimmer-npm-1.2.1-8b50bf3206-aa0d6252ad.zip/node_modules/shimmer/",\
"packageDependencies": [\
["shimmer", "npm:1.2.1"]\
],\
"linkType": "HARD"\
}]\
]],\
["side-channel", [\
["npm:1.0.4", {\
"packageLocation": "./.yarn/cache/side-channel-npm-1.0.4-e1f38b9e06-c4998d9fc5.zip/node_modules/side-channel/",\
@@ -16027,17 +15717,17 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["sqs-consumer", [\
["npm:6.2.1", {\
"packageLocation": "./.yarn/cache/sqs-consumer-npm-6.2.1-857abd3d30-a903daa836.zip/node_modules/sqs-consumer/",\
["npm:7.3.0", {\
"packageLocation": "./.yarn/cache/sqs-consumer-npm-7.3.0-a47c08ef71-367ea2a6f3.zip/node_modules/sqs-consumer/",\
"packageDependencies": [\
["sqs-consumer", "npm:6.2.1"]\
["sqs-consumer", "npm:7.3.0"]\
],\
"linkType": "SOFT"\
}],\
["virtual:685a6222c3349423674bb7f0684ba34e2ab20912010f352e04dcf707a156e13183fc382e2417cb37a60f3e7b52fd0178c53181674890e1773eb83e190dc13378#npm:6.2.1", {\
"packageLocation": "./.yarn/__virtual__/sqs-consumer-virtual-603a7c5831/0/cache/sqs-consumer-npm-6.2.1-857abd3d30-a903daa836.zip/node_modules/sqs-consumer/",\
["virtual:685a6222c3349423674bb7f0684ba34e2ab20912010f352e04dcf707a156e13183fc382e2417cb37a60f3e7b52fd0178c53181674890e1773eb83e190dc13378#npm:7.3.0", {\
"packageLocation": "./.yarn/__virtual__/sqs-consumer-virtual-bf07118bf0/0/cache/sqs-consumer-npm-7.3.0-a47c08ef71-367ea2a6f3.zip/node_modules/sqs-consumer/",\
"packageDependencies": [\
["sqs-consumer", "virtual:685a6222c3349423674bb7f0684ba34e2ab20912010f352e04dcf707a156e13183fc382e2417cb37a60f3e7b52fd0178c53181674890e1773eb83e190dc13378#npm:6.2.1"],\
["sqs-consumer", "virtual:685a6222c3349423674bb7f0684ba34e2ab20912010f352e04dcf707a156e13183fc382e2417cb37a60f3e7b52fd0178c53181674890e1773eb83e190dc13378#npm:7.3.0"],\
["@aws-sdk/client-sqs", "npm:3.342.0"],\
["@types/aws-sdk__client-sqs", null],\
["debug", "virtual:ac3d8e680759ce54399273724d44e041d6c9b73454d191d411a8c44bb27e22f02aaf6ed9d3ad0ac1c298eac4833cff369c9c7b84c573016112c4f84be2cd8543#npm:4.3.4"]\
@@ -16075,15 +15765,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["stack-chain", [\
["npm:1.3.7", {\
"packageLocation": "./.yarn/cache/stack-chain-npm-1.3.7-c803ef2abb-6420637b76.zip/node_modules/stack-chain/",\
"packageDependencies": [\
["stack-chain", "npm:1.3.7"]\
],\
"linkType": "HARD"\
}]\
]],\
["stack-trace", [\
["npm:0.0.10", {\
"packageLocation": "./.yarn/cache/stack-trace-npm-0.0.10-9460b173e1-7bd633f0e9.zip/node_modules/stack-trace/",\

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -3,6 +3,48 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.28.2](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.28.1...@standardnotes/analytics@2.28.2) (2023-10-09)
### Bug Fixes
* remove xray sdk in favor of opentelemetry ([b736dab](https://github.com/standardnotes/server/commit/b736dab3c1f76c9e03c4bc7bbf153dcb3309b7cb))
## [2.28.1](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.28.0...@standardnotes/analytics@2.28.1) (2023-10-06)
### Bug Fixes
* add xray-sdk to background processors ([a45b5b6](https://github.com/standardnotes/server/commit/a45b5b69b5d68c2e696c30f0ba5ad22d313321e6))
# [2.28.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.27.10...@standardnotes/analytics@2.28.0) (2023-10-06)
### Features
* add xray to analytics scheduler and websockets ([f0531d6](https://github.com/standardnotes/server/commit/f0531d68cb77036222f2a34602819f11e6a2697d))
## [2.27.10](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.27.9...@standardnotes/analytics@2.27.10) (2023-10-05)
**Note:** Version bump only for package @standardnotes/analytics
## [2.27.9](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.27.8...@standardnotes/analytics@2.27.9) (2023-10-05)
**Note:** Version bump only for package @standardnotes/analytics
## [2.27.8](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.27.7...@standardnotes/analytics@2.27.8) (2023-10-04)
**Note:** Version bump only for package @standardnotes/analytics
## [2.27.7](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.27.6...@standardnotes/analytics@2.27.7) (2023-10-04)
**Note:** Version bump only for package @standardnotes/analytics
## [2.27.6](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.27.5...@standardnotes/analytics@2.27.6) (2023-10-04)
**Note:** Version bump only for package @standardnotes/analytics
## [2.27.5](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.27.4...@standardnotes/analytics@2.27.5) (2023-10-04)
**Note:** Version bump only for package @standardnotes/analytics
## [2.27.4](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.27.3...@standardnotes/analytics@2.27.4) (2023-10-03)
**Note:** Version bump only for package @standardnotes/analytics

View File

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

View File

@@ -18,7 +18,6 @@ import {
SNSDomainEventPublisher,
SQSDomainEventSubscriberFactory,
SQSEventMessageHandler,
SQSNewRelicEventMessageHandler,
} from '@standardnotes/domain-events-infra'
import { Timer, TimerInterface } from '@standardnotes/time'
import { PeriodKeyGeneratorInterface } from '../Domain/Time/PeriodKeyGeneratorInterface'
@@ -244,11 +243,7 @@ export class ContainerConfigLoader {
container
.bind<DomainEventMessageHandlerInterface>(TYPES.DomainEventMessageHandler)
.toConstantValue(
env.get('NEW_RELIC_ENABLED', true) === 'true'
? new SQSNewRelicEventMessageHandler(eventHandlers, container.get(TYPES.Logger))
: new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Logger)),
)
.toConstantValue(new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Logger)))
container
.bind<DomainEventSubscriberFactoryInterface>(TYPES.DomainEventSubscriberFactory)
.toConstantValue(

View File

@@ -3,6 +3,52 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.77.2](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.77.1...@standardnotes/api-gateway@1.77.2) (2023-10-09)
### Bug Fixes
* remove xray sdk in favor of opentelemetry ([b736dab](https://github.com/standardnotes/api-gateway/commit/b736dab3c1f76c9e03c4bc7bbf153dcb3309b7cb))
## [1.77.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.77.0...@standardnotes/api-gateway@1.77.1) (2023-10-06)
**Note:** Version bump only for package @standardnotes/api-gateway
# [1.77.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.76.2...@standardnotes/api-gateway@1.77.0) (2023-10-05)
### Features
* setting xray segment user on api-gateway level ([3ee4941](https://github.com/standardnotes/api-gateway/commit/3ee49416f8e19207540141d98baa7f68880929bd))
## [1.76.2](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.76.1...@standardnotes/api-gateway@1.76.2) (2023-10-05)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.76.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.76.0...@standardnotes/api-gateway@1.76.1) (2023-10-05)
**Note:** Version bump only for package @standardnotes/api-gateway
# [1.76.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.75.13...@standardnotes/api-gateway@1.76.0) (2023-10-04)
### Features
* **api-gateaway:** configure aws-xray-sdk ([dc76113](https://github.com/standardnotes/api-gateway/commit/dc7611391515dd49a8e9b7ce8ac5e128cd7af0a8))
## [1.75.13](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.75.12...@standardnotes/api-gateway@1.75.13) (2023-10-04)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.75.12](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.75.11...@standardnotes/api-gateway@1.75.12) (2023-10-04)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.75.11](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.75.10...@standardnotes/api-gateway@1.75.11) (2023-10-04)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.75.10](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.75.9...@standardnotes/api-gateway@1.75.10) (2023-10-04)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.75.9](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.75.8...@standardnotes/api-gateway@1.75.9) (2023-10-03)
**Note:** Version bump only for package @standardnotes/api-gateway

View File

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

View File

@@ -3,6 +3,84 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.152.2](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.152.1...@standardnotes/auth-server@1.152.2) (2023-10-09)
### Bug Fixes
* remove xray sdk in favor of opentelemetry ([b736dab](https://github.com/standardnotes/server/commit/b736dab3c1f76c9e03c4bc7bbf153dcb3309b7cb))
## [1.152.1](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.152.0...@standardnotes/auth-server@1.152.1) (2023-10-06)
### Bug Fixes
* **auth:** checking for transition role when triggering transition ([79a44aa](https://github.com/standardnotes/server/commit/79a44aa51f15311fcaf76c39f93d1934ec1d135d))
# [1.152.0](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.151.2...@standardnotes/auth-server@1.152.0) (2023-10-06)
### Bug Fixes
* **auth:** strip user from transition role after migration ([afe9967](https://github.com/standardnotes/server/commit/afe9967d26b5be02d1dc76a740df614d81a6984e))
### Features
* switch transition direction ([27bea44](https://github.com/standardnotes/server/commit/27bea444cce4964feda04bad64e5f12a07415e0c))
## [1.151.2](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.151.1...@standardnotes/auth-server@1.151.2) (2023-10-06)
### Bug Fixes
* add xray-sdk to background processors ([a45b5b6](https://github.com/standardnotes/server/commit/a45b5b69b5d68c2e696c30f0ba5ad22d313321e6))
## [1.151.1](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.151.0...@standardnotes/auth-server@1.151.1) (2023-10-06)
**Note:** Version bump only for package @standardnotes/auth-server
# [1.151.0](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.150.9...@standardnotes/auth-server@1.151.0) (2023-10-05)
### Features
* setting xray segment user on api-gateway level ([3ee4941](https://github.com/standardnotes/server/commit/3ee49416f8e19207540141d98baa7f68880929bd))
## [1.150.9](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.150.8...@standardnotes/auth-server@1.150.9) (2023-10-05)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.150.8](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.150.7...@standardnotes/auth-server@1.150.8) (2023-10-05)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.150.7](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.150.6...@standardnotes/auth-server@1.150.7) (2023-10-04)
### Bug Fixes
* identifying services in workers ([eab78b3](https://github.com/standardnotes/server/commit/eab78b3a95ec82cb779d069d172169bfa92368c9))
## [1.150.6](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.150.5...@standardnotes/auth-server@1.150.6) (2023-10-04)
### Bug Fixes
* **auth:** disable users from registering to MongoDB ([d4579ce](https://github.com/standardnotes/server/commit/d4579ce21ed34ba433deb1fe2ff25c073fbe9622))
## [1.150.5](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.150.4...@standardnotes/auth-server@1.150.5) (2023-10-04)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.150.4](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.150.3...@standardnotes/auth-server@1.150.4) (2023-10-04)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.150.3](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.150.2...@standardnotes/auth-server@1.150.3) (2023-10-04)
### Bug Fixes
* **auth:** remove ec2 plugin from worker ([0281724](https://github.com/standardnotes/server/commit/02817241965db06cc02e9cca1d068446db0dee4e))
## [1.150.2](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.150.1...@standardnotes/auth-server@1.150.2) (2023-10-04)
### Bug Fixes
* **auth:** remove ec2 plugin ([373cfad](https://github.com/standardnotes/server/commit/373cfad1f7c26d3a0ec2a69e720bbce535170359))
## [1.150.1](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.150.0...@standardnotes/auth-server@1.150.1) (2023-10-03)
**Note:** Version bump only for package @standardnotes/auth-server

View File

@@ -24,13 +24,11 @@ import { urlencoded, json, Request, Response, NextFunction } from 'express'
import * as winston from 'winston'
import * as dayjs from 'dayjs'
import * as utc from 'dayjs/plugin/utc'
import * as AWSXRay from 'aws-xray-sdk'
import { InversifyExpressServer } from 'inversify-express-utils'
import { ContainerConfigLoader } from '../src/Bootstrap/Container'
import TYPES from '../src/Bootstrap/Types'
import { Env } from '../src/Bootstrap/Env'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const container = new ContainerConfigLoader()
void container.load().then((container) => {
@@ -39,20 +37,9 @@ void container.load().then((container) => {
const env: Env = new Env()
env.load()
const isConfiguredForAWSProduction =
env.get('MODE', true) !== 'home-server' && env.get('MODE', true) !== 'self-hosted'
if (isConfiguredForAWSProduction) {
AWSXRay.config([AWSXRay.plugins.EC2Plugin, AWSXRay.plugins.ECSPlugin])
}
const server = new InversifyExpressServer(container)
server.setConfig((app) => {
if (isConfiguredForAWSProduction) {
app.use(AWSXRay.express.openSegment(ServiceIdentifier.NAMES.Auth))
}
app.use((_request: Request, response: Response, next: NextFunction) => {
response.setHeader('X-Auth-Version', container.get(TYPES.Auth_VERSION))
next()
@@ -79,10 +66,6 @@ void container.load().then((container) => {
const serverInstance = server.build()
if (isConfiguredForAWSProduction) {
serverInstance.use(AWSXRay.express.closeSegment())
}
serverInstance.listen(env.get('PORT'))
logger.info(`Server started on port ${process.env.PORT}`)

View File

@@ -49,7 +49,7 @@ const requestTransition = async (
itemsTransitionStatus?.value === TransitionStatus.STATUSES.Verified &&
revisionsTransitionStatus?.value === TransitionStatus.STATUSES.Verified
if (userHasTransitionRole && bothTransitionStatusesAreVerified) {
if (!userHasTransitionRole && bothTransitionStatusesAreVerified) {
continue
}

View File

@@ -8,7 +8,6 @@ import { Env } from '../src/Bootstrap/Env'
import { DomainEventSubscriberFactoryInterface } from '@standardnotes/domain-events'
import * as dayjs from 'dayjs'
import * as utc from 'dayjs/plugin/utc'
import * as AWSXRay from 'aws-xray-sdk'
const container = new ContainerConfigLoader('worker')
void container.load().then((container) => {
@@ -17,14 +16,6 @@ void container.load().then((container) => {
const env: Env = new Env()
env.load()
const isConfiguredForAWSProduction =
env.get('MODE', true) !== 'home-server' && env.get('MODE', true) !== 'self-hosted'
if (isConfiguredForAWSProduction) {
AWSXRay.enableManualMode()
AWSXRay.config([AWSXRay.plugins.EC2Plugin, AWSXRay.plugins.ECSPlugin])
}
const logger: Logger = container.get(TYPES.Auth_Logger)
logger.info('Starting worker...')

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/auth-server",
"version": "1.150.1",
"version": "1.152.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -54,7 +54,6 @@
"@standardnotes/sncrypto-common": "^1.13.4",
"@standardnotes/sncrypto-node": "workspace:*",
"@standardnotes/time": "workspace:*",
"aws-xray-sdk": "^3.5.2",
"axios": "^1.1.3",
"bcryptjs": "2.4.3",
"cors": "2.8.5",

View File

@@ -1,6 +1,5 @@
import * as winston from 'winston'
import Redis from 'ioredis'
import { captureAWSv3Client } from 'aws-xray-sdk'
import { SNSClient, SNSClientConfig } from '@aws-sdk/client-sns'
import { SQSClient, SQSClientConfig } from '@aws-sdk/client-sqs'
import { Container } from 'inversify'
@@ -93,7 +92,6 @@ import {
SNSDomainEventPublisher,
SQSDomainEventSubscriberFactory,
SQSEventMessageHandler,
SQSXRayEventMessageHandler,
} from '@standardnotes/domain-events-infra'
import { GetUserSubscription } from '../Domain/UseCase/GetUserSubscription/GetUserSubscription'
import { ChangeCredentials } from '../Domain/UseCase/ChangeCredentials/ChangeCredentials'
@@ -321,8 +319,6 @@ export class ContainerConfigLoader {
logger.debug('Database initialized')
const isConfiguredForHomeServer = env.get('MODE', true) === 'home-server'
const isConfiguredForSelfHosting = env.get('MODE', true) === 'self-hosted'
const isConfiguredForAWSProduction = !isConfiguredForHomeServer && !isConfiguredForSelfHosting
const isConfiguredForInMemoryCache = env.get('CACHE_TYPE', true) === 'memory'
if (!isConfiguredForInMemoryCache) {
@@ -353,10 +349,7 @@ export class ContainerConfigLoader {
secretAccessKey: env.get('SNS_SECRET_ACCESS_KEY', true),
}
}
let snsClient = new SNSClient(snsConfig)
if (isConfiguredForAWSProduction && this.mode === 'server') {
snsClient = captureAWSv3Client(snsClient)
}
const snsClient = new SNSClient(snsConfig)
container.bind<SNSClient>(TYPES.Auth_SNS).toConstantValue(snsClient)
const sqsConfig: SQSClientConfig = {
@@ -371,10 +364,7 @@ export class ContainerConfigLoader {
secretAccessKey: env.get('SQS_SECRET_ACCESS_KEY', true),
}
}
let sqsClient = new SQSClient(sqsConfig)
if (isConfiguredForAWSProduction && this.mode === 'server') {
sqsClient = captureAWSv3Client(sqsClient)
}
const sqsClient = new SQSClient(sqsConfig)
container.bind<SQSClient>(TYPES.Auth_SQS).toConstantValue(sqsClient)
}
@@ -746,7 +736,6 @@ export class ContainerConfigLoader {
.toConstantValue(
new RequiredCrossServiceTokenMiddleware(
container.get<TokenDecoderInterface<CrossServiceTokenData>>(TYPES.Auth_CrossServiceTokenDecoder),
isConfiguredForAWSProduction && this.mode === 'server',
container.get<winston.Logger>(TYPES.Auth_Logger),
),
)
@@ -755,7 +744,6 @@ export class ContainerConfigLoader {
.toConstantValue(
new OptionalCrossServiceTokenMiddleware(
container.get<TokenDecoderInterface<CrossServiceTokenData>>(TYPES.Auth_CrossServiceTokenDecoder),
isConfiguredForAWSProduction && this.mode === 'server',
container.get<winston.Logger>(TYPES.Auth_Logger),
),
)
@@ -1235,11 +1223,7 @@ export class ContainerConfigLoader {
} else {
container
.bind<DomainEventMessageHandlerInterface>(TYPES.Auth_DomainEventMessageHandler)
.toConstantValue(
isConfiguredForAWSProduction
? new SQSXRayEventMessageHandler(eventHandlers, container.get(TYPES.Auth_Logger))
: new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Auth_Logger)),
)
.toConstantValue(new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Auth_Logger)))
container
.bind<DomainEventSubscriberFactoryInterface>(TYPES.Auth_DomainEventSubscriberFactory)

View File

@@ -118,6 +118,40 @@ describe('RoleService', () => {
})
})
describe('removing roles', () => {
beforeEach(() => {
user = {
uuid: '123',
email: 'test@test.com',
roles: Promise.resolve([basicRole]),
} as jest.Mocked<User>
userRepository.findOneByUuid = jest.fn().mockReturnValue(user)
userRepository.save = jest.fn().mockReturnValue(user)
})
it('should remove a role from a user', async () => {
await createService().removeRoleFromUser(
Uuid.create('00000000-0000-0000-0000-000000000000').getValue(),
RoleName.create(RoleName.NAMES.CoreUser).getValue(),
)
user.roles = Promise.resolve([])
expect(userRepository.save).toHaveBeenCalledWith(user)
})
it('should not remove a role from a user if the user could not be found', async () => {
userRepository.findOneByUuid = jest.fn().mockReturnValue(null)
await createService().removeRoleFromUser(
Uuid.create('00000000-0000-0000-0000-000000000000').getValue(),
RoleName.create(RoleName.NAMES.CoreUser).getValue(),
)
expect(userRepository.save).not.toHaveBeenCalled()
})
})
describe('adding roles based on subscription', () => {
beforeEach(() => {
user = {

View File

@@ -65,6 +65,17 @@ export class RoleService implements RoleServiceInterface {
await this.addToExistingRoles(user, roleName.value)
}
async removeRoleFromUser(userUuid: Uuid, roleName: RoleName): Promise<void> {
const user = await this.userRepository.findOneByUuid(userUuid)
if (user === null) {
this.logger.error(`Could not find user with uuid ${userUuid.value} to remove role ${roleName.value}`)
return
}
await this.removeUserRole(user, roleName.value)
}
async addUserRoleBasedOnSubscription(user: User, subscriptionName: SubscriptionName): Promise<void> {
const roleName = this.roleToSubscriptionMap.getRoleNameForSubscriptionName(subscriptionName)
@@ -108,9 +119,15 @@ export class RoleService implements RoleServiceInterface {
return
}
await this.removeUserRole(user, roleName)
}
private async removeUserRole(user: User, roleName: string): Promise<void> {
const currentRoles = await user.roles
user.roles = Promise.resolve(currentRoles.filter((role) => role.name !== roleName))
await this.userRepository.save(user)
await this.webSocketsClientService.sendUserRolesChangedEvent(user)
}

View File

@@ -5,6 +5,7 @@ import { User } from '../User/User'
export interface RoleServiceInterface {
addRoleToUser(userUuid: Uuid, roleName: RoleName): Promise<void>
removeRoleFromUser(userUuid: Uuid, roleName: RoleName): Promise<void>
addUserRoleBasedOnSubscription(user: User, subscriptionName: string): Promise<void>
setOfflineUserRole(offlineUserSubscription: OfflineUserSubscription): Promise<void>
removeUserRoleBasedOnSubscription(user: User, subscriptionName: string): Promise<void>

View File

@@ -84,14 +84,11 @@ describe('Register', () => {
expect(settingService.applyDefaultSettingsUponRegistration).toHaveBeenCalled()
})
it('should register a new user with default role and transition role', async () => {
it('should register a new user with default set of roles', async () => {
const role = new Role()
role.name = RoleName.NAMES.CoreUser
const transitionRole = new Role()
transitionRole.name = RoleName.NAMES.TransitionUser
roleRepository.findOneByName = jest.fn().mockReturnValueOnce(role).mockReturnValueOnce(transitionRole)
roleRepository.findOneByName = jest.fn().mockReturnValueOnce(role)
expect(
await createUseCase().execute({
@@ -120,7 +117,7 @@ describe('Register', () => {
version: '004',
createdAt: new Date(1),
updatedAt: new Date(1),
roles: Promise.resolve([role, transitionRole]),
roles: Promise.resolve([role]),
})
})

View File

@@ -77,10 +77,6 @@ export class Register implements UseCaseInterface {
if (defaultRole) {
roles.push(defaultRole)
}
const transitionRole = await this.roleRepository.findOneByName(RoleName.NAMES.TransitionUser)
if (transitionRole) {
roles.push(transitionRole)
}
user.roles = Promise.resolve(roles)
Object.assign(user, registrationFields)

View File

@@ -21,7 +21,7 @@ describe('UpdateTransitionStatus', () => {
transitionStatusRepository.getStatus = jest.fn().mockResolvedValue(null)
roleService = {} as jest.Mocked<RoleServiceInterface>
roleService.addRoleToUser = jest.fn()
roleService.removeRoleFromUser = jest.fn()
})
it('should add TRANSITION_USER role', async () => {
@@ -35,7 +35,7 @@ describe('UpdateTransitionStatus', () => {
})
expect(result.isFailed()).toBeFalsy()
expect(roleService.addRoleToUser).toHaveBeenCalledWith(
expect(roleService.removeRoleFromUser).toHaveBeenCalledWith(
Uuid.create('00000000-0000-0000-0000-000000000000').getValue(),
RoleName.create(RoleName.NAMES.TransitionUser).getValue(),
)

View File

@@ -32,7 +32,7 @@ export class UpdateTransitionStatus implements UseCaseInterface<void> {
await this.transitionStatusRepository.updateStatus(dto.userUuid, dto.transitionType, transitionStatus)
if (dto.transitionType === 'items' && transitionStatus.value === TransitionStatus.STATUSES.Verified) {
await this.roleService.addRoleToUser(userUuid, RoleName.create(RoleName.NAMES.TransitionUser).getValue())
await this.roleService.removeRoleFromUser(userUuid, RoleName.create(RoleName.NAMES.TransitionUser).getValue())
}
return Result.ok()

View File

@@ -2,12 +2,10 @@ import { CrossServiceTokenData, TokenDecoderInterface } from '@standardnotes/sec
import { NextFunction, Request, Response } from 'express'
import { BaseMiddleware } from 'inversify-express-utils'
import { Logger } from 'winston'
import { Segment, getSegment } from 'aws-xray-sdk'
export abstract class ApiGatewayAuthMiddleware extends BaseMiddleware {
constructor(
private tokenDecoder: TokenDecoderInterface<CrossServiceTokenData>,
private isConfiguredForAWSProduction: boolean,
private logger: Logger,
) {
super()
@@ -41,13 +39,6 @@ export abstract class ApiGatewayAuthMiddleware extends BaseMiddleware {
response.locals.session = token.session
response.locals.readOnlyAccess = token.session?.readonly_access ?? false
if (this.isConfiguredForAWSProduction) {
const segment = getSegment()
if (segment instanceof Segment) {
segment.setUser(token.user.uuid)
}
}
return next()
} catch (error) {
return next(error)

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