Compare commits

..

103 Commits

Author SHA1 Message Date
standardci
a986ee1ccb chore(release): publish new version
- @standardnotes/api-gateway@1.26.2
 - @standardnotes/auth-server@1.40.0
 - @standardnotes/common@1.36.0
 - @standardnotes/domain-events-infra@1.8.19
 - @standardnotes/domain-events@2.64.0
 - @standardnotes/event-store@1.3.24
 - @standardnotes/files-server@1.6.10
 - @standardnotes/predicates@1.4.6
 - @standardnotes/scheduler-server@1.10.38
 - @standardnotes/security@1.4.4
 - @standardnotes/syncing-server@1.9.0
 - @standardnotes/workspace-server@1.1.2
2022-10-07 09:24:41 +00:00
Karol Sójko
868b7d149a feat: add user protocol version to the user registration event 2022-10-07 11:22:56 +02:00
standardci
b1763b539e chore(release): publish new version
- @standardnotes/auth-server@1.39.2
2022-10-06 13:40:42 +00:00
Karol Sójko
d21517abe6 fix(auth): add warning logs for unrecognized payment type 2022-10-06 13:30:47 +02:00
Karol Sójko
7ef6765d5b chore: upgrade dependabot 2022-10-06 13:05:37 +02:00
Karol Sójko
11492977c9 Merge pull request #157 from standardnotes/dependabot/github_actions/crazy-max/ghaction-import-gpg-5
chore(deps): bump crazy-max/ghaction-import-gpg from 4 to 5
2022-10-06 12:48:55 +02:00
standardci
4c45f1d2e5 chore(release): publish new version
- @standardnotes/analytics@1.35.1
 - @standardnotes/api-gateway@1.26.1
 - @standardnotes/auth-server@1.39.1
 - @standardnotes/common@1.35.1
 - @standardnotes/domain-events-infra@1.8.18
 - @standardnotes/domain-events@2.63.1
 - @standardnotes/event-store@1.3.23
 - @standardnotes/files-server@1.6.9
 - @standardnotes/predicates@1.4.5
 - @standardnotes/scheduler-server@1.10.37
 - @standardnotes/security@1.4.3
 - @standardnotes/settings@1.17.1
 - @standardnotes/sncrypto-node@1.11.1
 - @standardnotes/syncing-server@1.8.21
 - @standardnotes/time@1.11.1
 - @standardnotes/workspace-server@1.1.1
2022-10-06 10:47:41 +00:00
Karol Sójko
55702bfcfa chore(deps): upgrade jest and ts-jest 2022-10-06 12:43:30 +02:00
Karol Sójko
1236a594b5 chore(deps): upgrade helmet 2022-10-06 12:02:34 +02:00
standardci
9cf746f6af chore(release): publish new version
- @standardnotes/auth-server@1.39.0
 - @standardnotes/workspace-server@1.1.0
2022-10-06 09:56:05 +00:00
Karol Sójko
44a9ade3fc feat: add workspace microservice 2022-10-06 11:54:22 +02:00
standardci
7064bd4c4c chore(release): publish new version
- @standardnotes/auth-server@1.38.1
2022-10-05 12:28:08 +00:00
Karol Sójko
a02a26ebdc fix(auth): group typeorm annotations 2022-10-05 14:26:36 +02:00
standardci
b92af6cec6 chore(release): publish new version
- @standardnotes/auth-server@1.38.0
2022-10-05 12:16:16 +00:00
Karol Sójko
3091177700 feat(auth): add groups model and database structure 2022-10-05 14:14:22 +02:00
standardci
be8838d338 chore(release): publish new version
- @standardnotes/analytics@1.35.0
 - @standardnotes/api-gateway@1.26.0
 - @standardnotes/auth-server@1.37.1
 - @standardnotes/domain-events-infra@1.8.17
 - @standardnotes/domain-events@2.63.0
 - @standardnotes/event-store@1.3.22
 - @standardnotes/files-server@1.6.8
 - @standardnotes/scheduler-server@1.10.36
 - @standardnotes/syncing-server@1.8.20
2022-10-05 08:04:23 +00:00
Karol Sójko
84e8a5cc6e feat(api-gateway): include increments count in statistics measures report 2022-10-05 10:02:55 +02:00
standardci
d5db578bfd chore(release): publish new version
- @standardnotes/api-gateway@1.25.0
2022-10-05 07:55:03 +00:00
Karol Sójko
7429f5c8e9 feat(api-gateway): add detailed payments statistics to report 2022-10-05 09:53:25 +02:00
standardci
8c6cf9651d chore(release): publish new version
- @standardnotes/api-gateway@1.24.5
 - @standardnotes/auth-server@1.37.0
 - @standardnotes/common@1.35.0
 - @standardnotes/domain-events-infra@1.8.16
 - @standardnotes/domain-events@2.62.0
 - @standardnotes/event-store@1.3.21
 - @standardnotes/files-server@1.6.7
 - @standardnotes/predicates@1.4.4
 - @standardnotes/scheduler-server@1.10.35
 - @standardnotes/security@1.4.2
 - @standardnotes/syncing-server@1.8.19
2022-10-04 13:17:02 +00:00
Karol Sójko
8668fec33d feat(auth): add detailed income stats 2022-10-04 15:15:32 +02:00
standardci
76e34131fb chore(release): publish new version
- @standardnotes/api-gateway@1.24.4
 - @standardnotes/auth-server@1.36.4
 - @standardnotes/common@1.34.0
 - @standardnotes/domain-events-infra@1.8.15
 - @standardnotes/domain-events@2.61.1
 - @standardnotes/event-store@1.3.20
 - @standardnotes/files-server@1.6.6
 - @standardnotes/predicates@1.4.3
 - @standardnotes/scheduler-server@1.10.34
 - @standardnotes/security@1.4.1
 - @standardnotes/syncing-server@1.8.18
2022-10-04 12:17:15 +00:00
Karol Sójko
3c40ee4b4a feat(common): add subscription billing frequency 2022-10-04 14:15:45 +02:00
standardci
5abd7ae32c chore(release): publish new version
- @standardnotes/analytics@1.34.0
 - @standardnotes/api-gateway@1.24.3
 - @standardnotes/auth-server@1.36.3
 - @standardnotes/syncing-server@1.8.17
2022-10-04 11:26:29 +00:00
Karol Sójko
09b3f9a0d7 fix(auth): turn down severity of logs for predicate verification 2022-10-04 13:24:58 +02:00
Karol Sójko
19455ba6a7 feat(analytics): add new statistics measures for income 2022-10-04 13:24:58 +02:00
standardci
7d042689f0 chore(release): publish new version
- @standardnotes/api-gateway@1.24.2
2022-10-03 12:49:37 +00:00
Karol Sójko
f43fbf1584 fix(api-gateway): report churn values for empty months 2022-10-03 14:47:45 +02:00
standardci
24c0cb8366 chore(release): publish new version
- @standardnotes/api-gateway@1.24.1
2022-10-03 12:15:56 +00:00
Karol Sójko
2236cc3828 fix: add debug logs for churn calculation 2022-10-03 14:14:27 +02:00
standardci
039d44718a chore(release): publish new version
- @standardnotes/analytics@1.33.0
 - @standardnotes/api-gateway@1.24.0
 - @standardnotes/auth-server@1.36.2
 - @standardnotes/domain-events-infra@1.8.14
 - @standardnotes/domain-events@2.61.0
 - @standardnotes/event-store@1.3.19
 - @standardnotes/files-server@1.6.5
 - @standardnotes/scheduler-server@1.10.33
 - @standardnotes/syncing-server@1.8.16
2022-10-03 11:22:13 +00:00
Karol Sójko
f075cd8c4d feat: add calculating monthly churn rate 2022-10-03 13:19:53 +02:00
standardci
ea0f3e8999 chore(release): publish new version
- @standardnotes/auth-server@1.36.1
2022-10-03 08:40:15 +00:00
Karol Sójko
e7736bba25 fix(auth): counting active subscriptions 2022-10-03 10:38:31 +02:00
standardci
fdf8809e13 chore(release): publish new version
- @standardnotes/auth-server@1.36.0
2022-10-03 08:33:51 +00:00
Karol Sójko
6a9d479f71 feat(auth): disallow v1 sign in for users with 004 protocol version 2022-10-03 10:31:58 +02:00
standardci
82c9637f37 chore(release): publish new version
- @standardnotes/api-gateway@1.23.0
2022-09-30 12:02:50 +00:00
Karol Sójko
dfab849f48 feat(api-gateway): add churn metrics to the report 2022-09-30 14:01:15 +02:00
standardci
ad60b95537 chore(release): publish new version
- @standardnotes/analytics@1.32.0
 - @standardnotes/api-gateway@1.22.6
 - @standardnotes/auth-server@1.35.0
 - @standardnotes/syncing-server@1.8.15
2022-09-30 11:49:00 +00:00
Karol Sójko
8a98f746eb feat(auth): add tracking total customers count 2022-09-30 13:47:33 +02:00
standardci
27cfd0ccf6 chore(release): publish new version
- @standardnotes/analytics@1.31.1
 - @standardnotes/api-gateway@1.22.5
 - @standardnotes/auth-server@1.34.1
 - @standardnotes/syncing-server@1.8.14
2022-09-30 09:24:21 +00:00
Karol Sójko
82bb85174d fix(auth): fix calculating new and existing customers churn 2022-09-30 11:22:46 +02:00
standardci
8ceef4acbf chore(release): publish new version
- @standardnotes/analytics@1.31.0
 - @standardnotes/api-gateway@1.22.4
 - @standardnotes/auth-server@1.34.0
 - @standardnotes/syncing-server@1.8.13
2022-09-30 08:39:59 +00:00
Karol Sójko
b6118c17e1 feat(auth): add measuring new customers 2022-09-30 10:38:27 +02:00
standardci
a7fb622e69 chore(release): publish new version
- @standardnotes/analytics@1.30.0
 - @standardnotes/api-gateway@1.22.3
 - @standardnotes/auth-server@1.33.0
 - @standardnotes/syncing-server@1.8.12
2022-09-30 08:30:22 +00:00
Karol Sójko
39337c1c4f feat(auth): add tracking churn activity 2022-09-30 10:28:37 +02:00
standardci
1f970aaf69 chore(release): publish new version
- @standardnotes/auth-server@1.32.13
2022-09-29 12:19:46 +00:00
Karol Sójko
0a5b7e13cd fix(auth): finding previous subscription setting for irreplacable subscription settings 2022-09-29 14:18:16 +02:00
standardci
1ce2b9eb44 chore(release): publish new version
- @standardnotes/auth-server@1.32.12
2022-09-29 11:15:07 +00:00
Karol Sójko
477f146725 fix(auth): reassign not replaceable subscription settings 2022-09-29 13:13:39 +02:00
standardci
d7b02c4da9 chore(release): publish new version
- @standardnotes/auth-server@1.32.11
2022-09-28 13:36:17 +00:00
Karol Sójko
40e673379b fix(auth): prevent replacing files bytes used subscription setting upon renewal 2022-09-28 15:34:43 +02:00
standardci
6ce9a4e834 chore(release): publish new version
- @standardnotes/auth-server@1.32.10
2022-09-28 12:05:17 +00:00
Karol Sójko
c5a07a888a fix(auth): exclude legacy 5 year plans from subscription length statistics 2022-09-28 14:03:49 +02:00
standardci
55587f6207 chore(release): publish new version
- @standardnotes/api-gateway@1.22.2
 - @standardnotes/auth-server@1.32.9
 - @standardnotes/domain-events-infra@1.8.13
 - @standardnotes/domain-events@2.60.7
 - @standardnotes/event-store@1.3.18
 - @standardnotes/files-server@1.6.4
 - @standardnotes/scheduler-server@1.10.32
 - @standardnotes/syncing-server@1.8.11
2022-09-28 11:33:44 +00:00
Karol Sójko
0d6b45c795 chore(deps): upgrade @standardnotes/features 2022-09-28 13:31:15 +02:00
standardci
95f64d9952 chore(release): publish new version
- @standardnotes/auth-server@1.32.8
2022-09-27 13:22:13 +00:00
Karol Sójko
54da5def4b fix(auth): ttl for lock counter on login lockout 2022-09-27 15:20:42 +02:00
standardci
d2fc1e057d chore(release): publish new version
- @standardnotes/api-gateway@1.22.1
2022-09-27 10:35:15 +00:00
Karol Sójko
0a90d98c71 fix(api-gateway): remove admin graphql endpoint from being publicly available 2022-09-27 12:33:29 +02:00
standardci
cc269e3b35 chore(release): publish new version
- @standardnotes/auth-server@1.32.7
2022-09-27 08:29:51 +00:00
Karol Sójko
b19093179b fix(auth): allow resending canceled subscription invites 2022-09-27 10:28:13 +02:00
standardci
e2cc0bc003 chore(release): publish new version
- @standardnotes/auth-server@1.32.6
2022-09-22 18:50:24 +00:00
Karol Sójko
644c52ae36 Revert "fix(auth): subscription token ttl"
This reverts commit 6efd336f34.
2022-09-22 20:48:51 +02:00
Karol Sójko
2554273a3f Revert "fix(auth): increase subscription token ttl"
This reverts commit 07def20f6b.
2022-09-22 20:48:51 +02:00
Karol Sójko
a8ee149d7a Revert "tmp(auth): disable expiring of subscription tokens"
This reverts commit 053092031c.
2022-09-22 20:48:51 +02:00
standardci
dcf92d58f9 chore(release): publish new version
- @standardnotes/auth-server@1.32.5
2022-09-22 18:00:23 +00:00
Karol Sójko
053092031c tmp(auth): disable expiring of subscription tokens 2022-09-22 19:58:35 +02:00
standardci
c12e3eb3ec chore(release): publish new version
- @standardnotes/auth-server@1.32.4
2022-09-22 15:30:14 +00:00
Karol Sójko
07def20f6b fix(auth): increase subscription token ttl 2022-09-22 17:28:28 +02:00
standardci
6c2cca66bd chore(release): publish new version
- @standardnotes/auth-server@1.32.3
2022-09-22 14:26:30 +00:00
Karol Sójko
6efd336f34 fix(auth): subscription token ttl 2022-09-22 16:24:33 +02:00
standardci
81eb4be200 chore(release): publish new version
- @standardnotes/auth-server@1.32.2
2022-09-22 13:48:33 +00:00
Karol Sójko
76cee6dbad fix(auth): add throwing an error if the subscription token was not persisted 2022-09-22 15:46:23 +02:00
standardci
dcc35a5738 chore(release): publish new version
- @standardnotes/syncing-server@1.8.10
2022-09-22 12:38:18 +00:00
Karol Sójko
5628de6445 fix(syncing-server-js): binding of sync limit 2022-09-22 14:36:47 +02:00
standardci
53bea47727 chore(release): publish new version
- @standardnotes/auth-server@1.32.1
2022-09-22 12:36:39 +00:00
Karol Sójko
d6cf8d400a fix(auth): settings and subscription settings projection 2022-09-22 14:34:56 +02:00
standardci
b58cc335f2 chore(release): publish new version
- @standardnotes/syncing-server@1.8.9
2022-09-22 11:56:22 +00:00
Karol Sójko
03d1bc611c fix(syncing-server): introduce upper bound for sync items limit as an env var 2022-09-22 13:54:26 +02:00
standardci
a48b09cefe chore(release): publish new version
- @standardnotes/api-gateway@1.22.0
 - @standardnotes/auth-server@1.32.0
2022-09-22 11:27:42 +00:00
Karol Sójko
d3f36c05df feat(auth): remove muting emails by use case in favor of updating user settings 2022-09-22 13:25:31 +02:00
standardci
488ade25ab chore(release): publish new version
- @standardnotes/auth-server@1.31.2
2022-09-21 14:40:45 +00:00
Karol Sójko
413a276d20 fix(auth): response wrapping on web socket connection token creation 2022-09-21 16:39:17 +02:00
standardci
65675a21d6 chore(release): publish new version
- @standardnotes/api-gateway@1.21.1
2022-09-21 13:56:25 +00:00
Karol Sójko
d35de38289 fix(api-gateway): web socket connection routing 2022-09-21 15:54:57 +02:00
standardci
83e1baa978 chore(release): publish new version
- @standardnotes/auth-server@1.31.1
2022-09-21 13:53:16 +00:00
Karol Sójko
875edce5b1 fix(auth): web sockets routes 2022-09-21 15:51:46 +02:00
standardci
1baa504728 chore(release): publish new version
- @standardnotes/api-gateway@1.21.0
 - @standardnotes/auth-server@1.31.0
2022-09-21 11:57:48 +00:00
Karol Sójko
965ae79414 feat(auth): add creating cross service token in exchange for web socket connection token 2022-09-21 13:56:17 +02:00
standardci
7a8448c116 chore(release): publish new version
- @standardnotes/auth-server@1.30.1
2022-09-21 09:15:22 +00:00
Karol Sójko
d935157ee8 fix(auth): missing injectable annotation 2022-09-21 11:13:24 +02:00
standardci
9313e6b568 chore(release): publish new version
- @standardnotes/api-gateway@1.20.0
 - @standardnotes/auth-server@1.30.0
 - @standardnotes/domain-events-infra@1.8.12
 - @standardnotes/domain-events@2.60.6
 - @standardnotes/event-store@1.3.17
 - @standardnotes/files-server@1.6.3
 - @standardnotes/scheduler-server@1.10.31
 - @standardnotes/security@1.4.0
 - @standardnotes/syncing-server@1.8.8
2022-09-21 09:00:32 +00:00
Karol Sójko
8033177f48 feat(auth): add creating web socket connection tokens 2022-09-21 10:58:39 +02:00
standardci
11011fa15d chore(release): publish new version
- @standardnotes/syncing-server@1.8.7
2022-09-20 08:01:52 +00:00
Karol Sójko
c2e9f3e72b fix(syncing-server): content size calculation and add syncing upper bound for limit paramter 2022-09-20 09:59:40 +02:00
standardci
f0fb7fd1cd chore(release): publish new version
- @standardnotes/files-server@1.6.2
2022-09-19 11:55:08 +00:00
Karol Sójko
15e342fd51 Merge pull request #224 from standardnotes/fs_dos
fix: add upper bound for FS file chunk upload
2022-09-19 13:53:39 +02:00
Karol Sójko
dfa7e06f87 fix: add upper bound for FS file chunk upload 2022-09-19 13:44:37 +02:00
standardci
a9aef5521b chore(release): publish new version
- @standardnotes/auth-server@1.29.1
 - @standardnotes/files-server@1.6.1
2022-09-19 07:59:14 +00:00
Karol Sójko
a628bdc44e fix(files): uuid validator binding 2022-09-19 09:57:17 +02:00
Karol Sójko
db6f966045 fix(auth): uuid validator binding 2022-09-19 09:57:10 +02:00
dependabot[bot]
d133c5aacd chore(deps): bump crazy-max/ghaction-import-gpg from 4 to 5
Bumps [crazy-max/ghaction-import-gpg](https://github.com/crazy-max/ghaction-import-gpg) from 4 to 5.
- [Release notes](https://github.com/crazy-max/ghaction-import-gpg/releases)
- [Changelog](https://github.com/crazy-max/ghaction-import-gpg/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crazy-max/ghaction-import-gpg/compare/v4...v5)

---
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>
2022-09-12 06:31:27 +00:00
303 changed files with 5055 additions and 2131 deletions

View File

@@ -85,6 +85,11 @@ updates:
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/packages/workspace"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:

View File

@@ -24,7 +24,7 @@ jobs:
git config --global user.name "standardci"
git config --global user.email "ci@standardnotes.com"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v4
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

206
.github/workflows/workspace.release.yml vendored Normal file
View File

@@ -0,0 +1,206 @@
name: Workspace Server
concurrency:
group: workspace
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/workspace-server*'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build
run: yarn build
- name: Lint
run: yarn lint:workspace
- name: Test
run: yarn test:workspace
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish Docker image for E2E testing
run: |
yarn docker build @standardnotes/workspace-server -t standardnotes/workspace:${{ github.sha }}
docker push standardnotes/workspace:${{ github.sha }}
- name: Run E2E test suite
uses: convictional/trigger-workflow-and-wait@v1.6.3
with:
owner: standardnotes
repo: e2e
github_token: ${{ secrets.CI_PAT_TOKEN }}
workflow_file_name: testing-with-stable-client.yml
wait_interval: 30
client_payload: '{"workspace_image_tag": "${{ github.sha }}"}'
propagate_failure: true
trigger_workflow: true
wait_workflow: true
publish-aws-ecr:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build locally
run: yarn build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: workspace
IMAGE_TAG: ${{ github.sha }}
run: |
yarn docker build @standardnotes/workspace-server -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:latest
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
publish-docker-hub:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build locally
run: yarn build
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish Docker image as stable
run: |
yarn docker build @standardnotes/workspace-server -t standardnotes/workspace:latest
docker push standardnotes/workspace:latest
deploy-web:
needs: publish-aws-ecr
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Download task definition
run: |
aws ecs describe-task-definition --task-definition workspace-prod --query taskDefinition > task-definition.json
- name: Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="workspace-prod") | .environment[] | select(.name=="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
with:
task-definition: task-definition.json
container-name: workspace-prod
image: ${{ secrets.AWS_ECR_REGISTRY }}/workspace:${{ github.sha }}
- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
service: workspace-prod
cluster: prod
wait-for-service-stability: true
deploy-worker:
needs: publish-aws-ecr
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Download task definition
run: |
aws ecs describe-task-definition --task-definition workspace-worker-prod --query taskDefinition > task-definition.json
- name: Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="workspace-worker-prod") | .environment[] | select(.name=="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
with:
task-definition: task-definition.json
container-name: workspace-worker-prod
image: ${{ secrets.AWS_ECR_REGISTRY }}/workspace:${{ github.sha }}
- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
service: workspace-worker-prod
cluster: prod
wait-for-service-stability: true
newrelic:
needs: [ deploy-web, deploy-worker ]
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WORKSPACE_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WORKSPACE_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

1219
.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.

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

@@ -2,11 +2,6 @@ module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.ts$',
globals: {
'ts-jest': {
tsconfig: './linter.tsconfig.json',
},
},
testTimeout: 20000,
coverageThreshold: {
global: {

View File

@@ -18,12 +18,14 @@
"lint:files": "yarn workspace @standardnotes/files-server lint",
"lint:api-gateway": "yarn workspace @standardnotes/api-gateway lint",
"lint:event-store": "yarn workspace @standardnotes/event-store lint",
"lint:workspace": "yarn workspace @standardnotes/workspace-server lint",
"test": "yarn workspaces foreach -p -j 10 --verbose run test",
"test:auth": "yarn workspace @standardnotes/auth-server test",
"test:scheduler": "yarn workspace @standardnotes/scheduler-server test",
"test:syncing-server": "yarn workspace @standardnotes/syncing-server test",
"test:files": "yarn workspace @standardnotes/files-server test",
"test:event-store": "yarn workspace @standardnotes/event-store test",
"test:workspace": "yarn workspace @standardnotes/workspace-server test",
"clean": "yarn workspaces foreach -p --verbose run clean",
"setup:env": "cp .env.sample .env && yarn workspaces foreach -p --verbose run setup:env",
"build": "yarn workspaces foreach -pt -j 10 --verbose run build",
@@ -32,6 +34,7 @@
"build:syncing-server": "yarn workspace @standardnotes/syncing-server build",
"build:files": "yarn workspace @standardnotes/files-server build",
"build:api-gateway": "yarn workspace @standardnotes/api-gateway build",
"build:workspace": "yarn workspace @standardnotes/workspace-server build",
"start:auth": "yarn workspace @standardnotes/auth-server start",
"start:auth-worker": "yarn workspace @standardnotes/auth-server worker",
"start:scheduler": "yarn workspace @standardnotes/scheduler-server worker",
@@ -40,6 +43,7 @@
"start:files": "yarn workspace @standardnotes/files-server start",
"start:files-worker": "yarn workspace @standardnotes/files-server worker",
"start:api-gateway": "yarn workspace @standardnotes/api-gateway start",
"start:workspace": "yarn workspace @standardnotes/workspace-server start",
"release": "lerna version --conventional-graduate --conventional-commits --yes -m \"chore(release): publish new version\"",
"publish": "lerna publish from-git --yes --no-verify-access --loglevel verbose",
"postversion": "./scripts/push-tags-one-by-one.sh",
@@ -51,7 +55,7 @@
"@lerna-lite/cli": "^1.5.1",
"@lerna-lite/list": "^1.5.1",
"@lerna-lite/run": "^1.5.1",
"@types/jest": "^28.1.4",
"@types/jest": "^29.1.1",
"@types/newrelic": "^7.0.3",
"@types/node": "^18.0.0",
"@typescript-eslint/parser": "^5.29.0",

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.35.1](https://github.com/standardnotes/server/compare/@standardnotes/analytics@1.35.0...@standardnotes/analytics@1.35.1) (2022-10-06)
**Note:** Version bump only for package @standardnotes/analytics
# [1.35.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@1.34.0...@standardnotes/analytics@1.35.0) (2022-10-05)
### Features
* **api-gateway:** include increments count in statistics measures report ([84e8a5c](https://github.com/standardnotes/server/commit/84e8a5cc6e6ba216f1c0737a7a93aba581eced0f))
# [1.34.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@1.33.0...@standardnotes/analytics@1.34.0) (2022-10-04)
### Features
* **analytics:** add new statistics measures for income ([19455ba](https://github.com/standardnotes/server/commit/19455ba6a7d84a389830c728c3dfea550b156985))
# [1.33.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@1.32.0...@standardnotes/analytics@1.33.0) (2022-10-03)
### Features
* add calculating monthly churn rate ([f075cd8](https://github.com/standardnotes/server/commit/f075cd8c4dfc411ba513dfec21bb84c03b238254))
# [1.32.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@1.31.1...@standardnotes/analytics@1.32.0) (2022-09-30)
### Features
* **auth:** add tracking total customers count ([8a98f74](https://github.com/standardnotes/server/commit/8a98f746eb13c25f7940286aca594e2304232bdf))
## [1.31.1](https://github.com/standardnotes/server/compare/@standardnotes/analytics@1.31.0...@standardnotes/analytics@1.31.1) (2022-09-30)
### Bug Fixes
* **auth:** fix calculating new and existing customers churn ([82bb851](https://github.com/standardnotes/server/commit/82bb85174d94a5e03f364604a1c07a9b1633920d))
# [1.31.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@1.30.0...@standardnotes/analytics@1.31.0) (2022-09-30)
### Features
* **auth:** add measuring new customers ([b6118c1](https://github.com/standardnotes/server/commit/b6118c17e176ba0acc93b95a38e32748ac851410))
# [1.30.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@1.29.1...@standardnotes/analytics@1.30.0) (2022-09-30)
### Features
* **auth:** add tracking churn activity ([39337c1](https://github.com/standardnotes/server/commit/39337c1c4f799f39672eeb8c9d050e7cbb19878a))
## [1.29.1](https://github.com/standardnotes/server/compare/@standardnotes/analytics@1.29.0...@standardnotes/analytics@1.29.1) (2022-09-16)
### Bug Fixes

View File

@@ -1,11 +1,10 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const base = require('../../jest.config');
const base = require('../../jest.config')
const { defaults: tsjPreset } = require('ts-jest/presets')
module.exports = {
...base,
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
},
transform: {
...tsjPreset.transform,
},
};
}

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/analytics",
"version": "1.29.1",
"version": "1.35.1",
"engines": {
"node": ">=14.0.0 <17.0.0"
},
@@ -27,12 +27,12 @@
},
"devDependencies": {
"@types/ioredis": "^4.28.10",
"@types/jest": "^28.1.4",
"@types/jest": "^29.1.1",
"@typescript-eslint/eslint-plugin": "^5.30.0",
"eslint-plugin-prettier": "^4.2.1",
"ioredis": "^5.2.0",
"jest": "^28.1.2",
"ts-jest": "^28.0.5"
"jest": "^29.1.2",
"ts-jest": "^29.0.3"
},
"dependencies": {
"reflect-metadata": "^0.1.13"

View File

@@ -11,9 +11,12 @@ export enum AnalyticsActivity {
SubscriptionRenewed = 'subscription-renewed',
SubscriptionRefunded = 'subscription-refunded',
SubscriptionCancelled = 'subscription-cancelled',
SubscriptionExpired = 'subscription-expired',
EmailUnbackedUpData = 'email-unbacked-up-data',
EmailBackup = 'email-backup',
LimitedDiscountOfferPurchased = 'limited-discount-offer-purchased',
PaymentFailed = 'payment-failed',
PaymentSuccess = 'payment-success',
NewCustomersChurn = 'new-customers-churn',
ExistingCustomersChurn = 'existing-customers-churn',
}

View File

@@ -12,7 +12,7 @@ export interface AnalyticsStoreInterface {
secondActivity: AnalyticsActivity
secondActivityPeriodKey: string
}): Promise<number>
calculateActivityTotalCount(activity: AnalyticsActivity, period: Period): Promise<number>
calculateActivityTotalCount(activity: AnalyticsActivity, periodOrPeriodKey: Period | string): Promise<number>
calculateActivityChangesTotalCount(
activity: AnalyticsActivity,
period: Period,

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