mirror of
https://github.com/standardnotes/server
synced 2026-01-20 05:04:28 -05:00
Compare commits
45 Commits
@standardn
...
@standardn
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb53e88a4e | ||
|
|
cfd04a5b39 | ||
|
|
e0f2d5e202 | ||
|
|
3035cbc5de | ||
|
|
7c271be310 | ||
|
|
ba373ebc6b | ||
|
|
2450d88a29 | ||
|
|
376a59c182 | ||
|
|
d584ca57f1 | ||
|
|
c50662849b | ||
|
|
82da690139 | ||
|
|
b11a9b0eac | ||
|
|
d7653474c3 | ||
|
|
ce2fd86ca3 | ||
|
|
c9c496c63f | ||
|
|
b1c9f8ca6e | ||
|
|
e84bd73a39 | ||
|
|
c69d1b02fb | ||
|
|
b590d33b88 | ||
|
|
c1e7a3eb7e | ||
|
|
fd743a9d5e | ||
|
|
4c40fd5186 | ||
|
|
2cb470b99e | ||
|
|
b6539f8795 | ||
|
|
6d7de4a8da | ||
|
|
41999f36f0 | ||
|
|
fa2a8da17b | ||
|
|
214684eae7 | ||
|
|
b3a92af04d | ||
|
|
210a314c81 | ||
|
|
46cba52bcb | ||
|
|
bf14ec05f9 | ||
|
|
6f88a96c3e | ||
|
|
e12c9c47a7 | ||
|
|
83085052f8 | ||
|
|
eda618d845 | ||
|
|
8d4280f4ca | ||
|
|
b57816bba4 | ||
|
|
b6db194a22 | ||
|
|
8f708164cd | ||
|
|
ff09ae0a47 | ||
|
|
d21d752029 | ||
|
|
2ea077a7cd | ||
|
|
0d67c55e12 | ||
|
|
8837dca039 |
6
.env.sample
Normal file
6
.env.sample
Normal file
@@ -0,0 +1,6 @@
|
||||
DB_PORT=3306
|
||||
DB_USERNAME=std_notes_user
|
||||
DB_PASSWORD=changeme123
|
||||
DB_DATABASE=standard_notes_db
|
||||
|
||||
REDIS_PORT=6379
|
||||
21
.github/workflows/pr.yml
vendored
Normal file
21
.github/workflows/pr.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Install dependencies
|
||||
run: yarn install --immutable
|
||||
- name: ESLint
|
||||
run: yarn lint
|
||||
- name: Build
|
||||
run: yarn build
|
||||
- name: Test
|
||||
run: yarn test
|
||||
46
.github/workflows/snjs.upgrade.event.yml
vendored
Normal file
46
.github/workflows/snjs.upgrade.event.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Update SNJS Packages
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
types: [snjs-updated-event]
|
||||
|
||||
jobs:
|
||||
SNJSUpdateEvent:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: main
|
||||
token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- name: Setup git config
|
||||
run: |
|
||||
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
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.PASSPHRASE }}
|
||||
git_user_signingkey: true
|
||||
git_commit_gpgsign: true
|
||||
|
||||
- run: yarn install
|
||||
- run: |
|
||||
yarn upgrade:snjs
|
||||
yarn install --no-immutable
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
title: "${{ 'chore(deps): upgrade snjs' }}"
|
||||
body: Updates all packages prefixed with "@standardnotes/"
|
||||
commit-message: "${{ 'chore(deps): upgrade snjs' }}"
|
||||
delete-branch: true
|
||||
committer: standardci <ci@standardnotes.com>
|
||||
author: standardci <ci@standardnotes.com>
|
||||
22
.github/workflows/syncing-server.release.yml
vendored
22
.github/workflows/syncing-server.release.yml
vendored
@@ -185,25 +185,7 @@ jobs:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: DEV - 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_SYNCING_SERVER_WEB_DEV }}
|
||||
revision: "${{ github.sha }}"
|
||||
description: "Automated Deployment via Github Actions"
|
||||
user: "${{ github.actor }}"
|
||||
- name: DEV - 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_SYNCING_SERVER_WORKER_DEV }}
|
||||
revision: "${{ github.sha }}"
|
||||
description: "Automated Deployment via Github Actions"
|
||||
user: "${{ github.actor }}"
|
||||
- name: PROD - Create New Relic deployment marker for Web
|
||||
- name: Create New Relic deployment marker for Web
|
||||
uses: newrelic/deployment-marker-action@v1
|
||||
with:
|
||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
||||
@@ -212,7 +194,7 @@ jobs:
|
||||
revision: "${{ github.sha }}"
|
||||
description: "Automated Deployment via Github Actions"
|
||||
user: "${{ github.actor }}"
|
||||
- name: PROD - Create New Relic deployment marker for Worker
|
||||
- name: Create New Relic deployment marker for Worker
|
||||
uses: newrelic/deployment-marker-action@v1
|
||||
with:
|
||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -18,3 +18,6 @@ newrelic_agent.log
|
||||
|
||||
packages/files/uploads/*
|
||||
!packages/files/uploads/.gitkeep
|
||||
|
||||
data/*
|
||||
!data/.gitkeep
|
||||
|
||||
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.
BIN
.yarn/cache/@sentry-core-npm-7.3.0-8e7d2a21e6-1768568404.zip
vendored
Normal file
BIN
.yarn/cache/@sentry-core-npm-7.3.0-8e7d2a21e6-1768568404.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@sentry-hub-npm-7.3.0-b5d4219eb3-a052a7c940.zip
vendored
Normal file
BIN
.yarn/cache/@sentry-hub-npm-7.3.0-b5d4219eb3-a052a7c940.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@sentry-node-npm-7.3.0-ae73eb5bb5-a92c2d2d1b.zip
vendored
Normal file
BIN
.yarn/cache/@sentry-node-npm-7.3.0-ae73eb5bb5-a92c2d2d1b.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@sentry-types-npm-7.3.0-4a455bc29c-3ddbc3c7eb.zip
vendored
Normal file
BIN
.yarn/cache/@sentry-types-npm-7.3.0-4a455bc29c-3ddbc3c7eb.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@sentry-utils-npm-7.3.0-a4b6fc94f0-2696b1bfad.zip
vendored
Normal file
BIN
.yarn/cache/@sentry-utils-npm-7.3.0-a4b6fc94f0-2696b1bfad.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@standardnotes-common-npm-1.23.1-ed73dbb679-f498f4c469.zip
vendored
Normal file
BIN
.yarn/cache/@standardnotes-common-npm-1.23.1-ed73dbb679-f498f4c469.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@standardnotes-config-npm-2.4.3-f16699e480-b57b49242a.zip
vendored
Normal file
BIN
.yarn/cache/@standardnotes-config-npm-2.4.3-f16699e480-b57b49242a.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@standardnotes-features-npm-1.46.0-32e559e3b6-0653b9b425.zip
vendored
Normal file
BIN
.yarn/cache/@standardnotes-features-npm-1.46.0-32e559e3b6-0653b9b425.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@standardnotes-settings-npm-1.15.0-bfec86ee49-4397d453a1.zip
vendored
Normal file
BIN
.yarn/cache/@standardnotes-settings-npm-1.15.0-bfec86ee49-4397d453a1.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@standardnotes-utils-npm-1.6.12-8fa8d7d09b-e177b1fa51.zip
vendored
Normal file
BIN
.yarn/cache/@standardnotes-utils-npm-1.6.12-8fa8d7d09b-e177b1fa51.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-eslint-plugin-npm-5.30.0-c72e6ffad8-f2fe96082c.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-eslint-plugin-npm-5.30.0-c72e6ffad8-f2fe96082c.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-parser-npm-5.30.0-02dd191940-7067ba4ede.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-parser-npm-5.30.0-02dd191940-7067ba4ede.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-scope-manager-npm-5.30.0-53c13117cb-51246d0f6c.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-scope-manager-npm-5.30.0-53c13117cb-51246d0f6c.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-type-utils-npm-5.30.0-de31c989eb-6185117638.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-type-utils-npm-5.30.0-de31c989eb-6185117638.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-types-npm-5.30.0-1829c252da-f83a506880.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-types-npm-5.30.0-1829c252da-f83a506880.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-typescript-estree-npm-5.30.0-7d89cc3db4-cf8caea435.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-typescript-estree-npm-5.30.0-7d89cc3db4-cf8caea435.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-utils-npm-5.30.0-6128c1c85a-176eda4629.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-utils-npm-5.30.0-6128c1c85a-176eda4629.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@typescript-eslint-visitor-keys-npm-5.30.0-1edc3a593e-bf2219cbb9.zip
vendored
Normal file
BIN
.yarn/cache/@typescript-eslint-visitor-keys-npm-5.30.0-1edc3a593e-bf2219cbb9.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/cint-npm-8.2.1-958b3dddeb-5f32feed16.zip
vendored
Normal file
BIN
.yarn/cache/cint-npm-8.2.1-958b3dddeb-5f32feed16.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/cli-table-npm-0.3.11-f912789cff-59fb61f992.zip
vendored
Normal file
BIN
.yarn/cache/cli-table-npm-0.3.11-f912789cff-59fb61f992.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/colors-npm-1.0.3-6c5d583ab3-234e8d3ab7.zip
vendored
Normal file
BIN
.yarn/cache/colors-npm-1.0.3-6c5d583ab3-234e8d3ab7.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/commander-npm-9.3.0-1393a6e1f6-d421ce66fe.zip
vendored
Normal file
BIN
.yarn/cache/commander-npm-9.3.0-1393a6e1f6-d421ce66fe.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/fast-memoize-npm-2.5.2-f42a7c6940-79fa759719.zip
vendored
Normal file
BIN
.yarn/cache/fast-memoize-npm-2.5.2-f42a7c6940-79fa759719.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/fp-and-or-npm-0.1.3-033d5c60bb-d556ad1fb0.zip
vendored
Normal file
BIN
.yarn/cache/fp-and-or-npm-0.1.3-033d5c60bb-d556ad1fb0.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/get-stdin-npm-8.0.0-920f876bc2-40128b6cd2.zip
vendored
Normal file
BIN
.yarn/cache/get-stdin-npm-8.0.0-920f876bc2-40128b6cd2.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/ini-npm-3.0.0-c2af955701-e92b6b0835.zip
vendored
Normal file
BIN
.yarn/cache/ini-npm-3.0.0-c2af955701-e92b6b0835.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/jju-npm-1.4.0-670678eaa3-3790481bd2.zip
vendored
Normal file
BIN
.yarn/cache/jju-npm-1.4.0-670678eaa3-3790481bd2.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/json-parse-helpfulerror-npm-1.0.3-003666633e-376d85c372.zip
vendored
Normal file
BIN
.yarn/cache/json-parse-helpfulerror-npm-1.0.3-003666633e-376d85c372.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/jsonlines-npm-0.1.1-0b9cdf648d-5408cbdbd3.zip
vendored
Normal file
BIN
.yarn/cache/jsonlines-npm-0.1.1-0b9cdf648d-5408cbdbd3.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/kleur-npm-4.1.5-46b6135f41-1dc476e327.zip
vendored
Normal file
BIN
.yarn/cache/kleur-npm-4.1.5-46b6135f41-1dc476e327.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/npm-check-updates-npm-14.1.1-c02bfe3d02-a3ec52312c.zip
vendored
Normal file
BIN
.yarn/cache/npm-check-updates-npm-14.1.1-c02bfe3d02-a3ec52312c.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/parse-github-url-npm-1.0.2-290c32ecbc-a19b8bc6f8.zip
vendored
Normal file
BIN
.yarn/cache/parse-github-url-npm-1.0.2-290c32ecbc-a19b8bc6f8.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/progress-npm-2.0.3-d1f87e2ac6-f67403fe7b.zip
vendored
Normal file
BIN
.yarn/cache/progress-npm-2.0.3-d1f87e2ac6-f67403fe7b.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/prompts-ncu-npm-2.5.0-5d11c7d5b9-e050961c30.zip
vendored
Normal file
BIN
.yarn/cache/prompts-ncu-npm-2.5.0-5d11c7d5b9-e050961c30.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/rc-config-loader-npm-4.1.0-207fabc6dd-1d07aaf611.zip
vendored
Normal file
BIN
.yarn/cache/rc-config-loader-npm-4.1.0-207fabc6dd-1d07aaf611.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/remote-git-tags-npm-3.0.0-d27b051c92-04d87e4c98.zip
vendored
Normal file
BIN
.yarn/cache/remote-git-tags-npm-3.0.0-d27b051c92-04d87e4c98.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/require-from-string-npm-2.0.2-8557e0db12-a03ef68954.zip
vendored
Normal file
BIN
.yarn/cache/require-from-string-npm-2.0.2-8557e0db12-a03ef68954.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/semver-utils-npm-1.1.4-61f884e528-93fd955a30.zip
vendored
Normal file
BIN
.yarn/cache/semver-utils-npm-1.1.4-61f884e528-93fd955a30.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/source-map-support-npm-0.5.21-09ca99e250-43e98d700d.zip
vendored
Normal file
BIN
.yarn/cache/source-map-support-npm-0.5.21-09ca99e250-43e98d700d.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/spawn-please-npm-1.0.0-5731ea7630-b8e1e1dc14.zip
vendored
Normal file
BIN
.yarn/cache/spawn-please-npm-1.0.0-5731ea7630-b8e1e1dc14.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/yaml-npm-2.1.1-e717f9b915-f48bb20991.zip
vendored
Normal file
BIN
.yarn/cache/yaml-npm-2.1.1-e717f9b915-f48bb20991.zip
vendored
Normal file
Binary file not shown.
0
data/.gitkeep
Normal file
0
data/.gitkeep
Normal file
24
docker-compose.yml
Normal file
24
docker-compose.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
db:
|
||||
image: mysql:5.6
|
||||
environment:
|
||||
MYSQL_DATABASE: '${DB_DATABASE}'
|
||||
MYSQL_USER: '${DB_USERNAME}'
|
||||
MYSQL_PASSWORD: '${DB_PASSWORD}'
|
||||
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
|
||||
expose:
|
||||
- ${DB_PORT}:3306
|
||||
restart: unless-stopped
|
||||
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8 --collation-server=utf8_general_ci
|
||||
volumes:
|
||||
- ./data/mysql:/var/lib/mysql
|
||||
- ./data/import:/docker-entrypoint-initdb.d
|
||||
|
||||
cache:
|
||||
image: redis:6.0-alpine
|
||||
volumes:
|
||||
- ./data/redis/:/data
|
||||
expose:
|
||||
- ${REDIS_PORT}:6379
|
||||
restart: unless-stopped
|
||||
15
package.json
15
package.json
@@ -23,7 +23,7 @@
|
||||
"test:syncing-server": "yarn workspace @standardnotes/syncing-server test",
|
||||
"test:files": "yarn workspace @standardnotes/files-server test",
|
||||
"clean": "yarn workspaces foreach -p --verbose run clean",
|
||||
"setup:env": "yarn workspaces foreach -p --verbose run setup:env",
|
||||
"setup:env": "cp .env.sample .env && yarn workspaces foreach -p --verbose run setup:env",
|
||||
"build": "yarn workspaces foreach -pt -j 10 --verbose run build",
|
||||
"build:auth": "yarn workspace @standardnotes/auth-server build",
|
||||
"build:scheduler": "yarn workspace @standardnotes/scheduler-server build",
|
||||
@@ -38,7 +38,9 @@
|
||||
"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",
|
||||
"release:prod": "lerna version --conventional-graduate --conventional-commits --yes -m \"chore(release): publish new version\""
|
||||
"release:prod": "lerna version --conventional-graduate --conventional-commits --yes -m \"chore(release): publish new version\"",
|
||||
"postversion": "./scripts/push-tags-one-by-one.sh",
|
||||
"upgrade:snjs": "yarn workspaces foreach --verbose run upgrade:snjs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^17.0.2",
|
||||
@@ -47,13 +49,20 @@
|
||||
"@lerna-lite/list": "^1.5.1",
|
||||
"@lerna-lite/run": "^1.5.1",
|
||||
"@types/jest": "^28.1.3",
|
||||
"@types/newrelic": "^7.0.3",
|
||||
"@types/node": "^18.0.0",
|
||||
"@typescript-eslint/parser": "^5.29.0",
|
||||
"eslint": "^8.17.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"ini": "^3.0.0",
|
||||
"npm-check-updates": "^14.1.1",
|
||||
"prettier": "^2.7.1",
|
||||
"ts-node": "^10.8.1",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"packageManager": "yarn@3.2.1"
|
||||
"packageManager": "yarn@3.2.1",
|
||||
"dependencies": {
|
||||
"@sentry/node": "^7.3.0",
|
||||
"newrelic": "^8.14.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,56 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.3.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.3.0...@standardnotes/api-gateway@1.3.1) (2022-06-28)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add origin meta property to daily analytics event ([376a59c](https://github.com/standardnotes/api-gateway/commit/376a59c1827411164a536157fc591a15e0a5b0b2))
|
||||
|
||||
# [1.3.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.2.2...@standardnotes/api-gateway@1.3.0) (2022-06-28)
|
||||
|
||||
### Features
|
||||
|
||||
* remove api metadata decorating html responses ([3035cbc](https://github.com/standardnotes/api-gateway/commit/3035cbc5ded1408bc4b8646563c4992ba5f27c75))
|
||||
|
||||
## [1.2.2](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.2.1...@standardnotes/api-gateway@1.2.2) (2022-06-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api-gateway
|
||||
|
||||
## [1.2.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.2.0...@standardnotes/api-gateway@1.2.1) (2022-06-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* issue with NaN error code responses ([2cb470b](https://github.com/standardnotes/api-gateway/commit/2cb470b99edc2fac8d5c38e4eb16201e55fe8753))
|
||||
|
||||
# [1.2.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.1.6...@standardnotes/api-gateway@1.2.0) (2022-06-27)
|
||||
|
||||
### Features
|
||||
|
||||
* add endpoint to mute marketing emails ([fa2a8da](https://github.com/standardnotes/api-gateway/commit/fa2a8da17bc6588021172adbbc4ecae5bd35f33a))
|
||||
|
||||
## [1.1.6](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.1.5...@standardnotes/api-gateway@1.1.6) (2022-06-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api-gateway
|
||||
|
||||
## [1.1.5](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.1.4...@standardnotes/api-gateway@1.1.5) (2022-06-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* upgrade sentry node sdk ([b6db194](https://github.com/standardnotes/api-gateway/commit/b6db194a22ff1d0afe96c291d545b408c0a5c373))
|
||||
|
||||
## [1.1.4](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.1.3...@standardnotes/api-gateway@1.1.4) (2022-06-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* newrelic deps and setup db and cache for local development purposes ([ff09ae0](https://github.com/standardnotes/api-gateway/commit/ff09ae0a47747eaf7977ce5d3937ad385101eaeb))
|
||||
|
||||
## [1.1.3](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.1.2...@standardnotes/api-gateway@1.1.3) (2022-06-23)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* curl in the final image ([0d67c55](https://github.com/standardnotes/api-gateway/commit/0d67c55e124eed08bca16824750152b895fceca7))
|
||||
|
||||
## [1.1.2](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.1.1...@standardnotes/api-gateway@1.1.2) (2022-06-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api-gateway
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FROM node:16.15.1-alpine AS builder
|
||||
|
||||
# Install dependencies for building native libraries
|
||||
RUN apk add --update git openssh-client curl python3 alpine-sdk
|
||||
RUN apk add --update git openssh-client python3 alpine-sdk
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
@@ -12,6 +12,8 @@ RUN yarn install --immutable
|
||||
|
||||
FROM node:16.15.1-alpine
|
||||
|
||||
RUN apk add --update curl
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
# Copy the installed dependencies from the previous stage.
|
||||
|
||||
@@ -7,7 +7,11 @@ import { Logger } from 'winston'
|
||||
import { ContainerConfigLoader } from '../src/Bootstrap/Container'
|
||||
import TYPES from '../src/Bootstrap/Types'
|
||||
import { Env } from '../src/Bootstrap/Env'
|
||||
import { DomainEventPublisherInterface, DailyAnalyticsReportGeneratedEvent } from '@standardnotes/domain-events'
|
||||
import {
|
||||
DomainEventPublisherInterface,
|
||||
DailyAnalyticsReportGeneratedEvent,
|
||||
DomainEventService,
|
||||
} from '@standardnotes/domain-events'
|
||||
import { AnalyticsActivity, AnalyticsStoreInterface, Period, StatisticsStoreInterface } from '@standardnotes/analytics'
|
||||
|
||||
const requestReport = async (
|
||||
@@ -23,6 +27,7 @@ const requestReport = async (
|
||||
userIdentifier: '',
|
||||
userIdentifierType: 'uuid',
|
||||
},
|
||||
origin: DomainEventService.ApiGateway,
|
||||
},
|
||||
payload: {
|
||||
applicationStatistics: await statisticsStore.getYesterdayApplicationUsage(),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/api-gateway",
|
||||
"version": "1.1.2",
|
||||
"version": "1.3.1",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
@@ -15,18 +15,19 @@
|
||||
"prebuild": "yarn clean",
|
||||
"build": "tsc --rootDir ./",
|
||||
"lint": "eslint . --ext .ts",
|
||||
"setup:env": "cp .env.sample .env",
|
||||
"start": "yarn node dist/bin/server.js",
|
||||
"report": "yarn node dist/bin/report.js"
|
||||
"report": "yarn node dist/bin/report.js",
|
||||
"upgrade:snjs": "yarn ncu -u '@standardnotes/*'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@newrelic/native-metrics": "7.0.2",
|
||||
"@newrelic/winston-enricher": "^2.1.0",
|
||||
"@sentry/node": "^6.16.1",
|
||||
"@standardnotes/analytics": "^1.4.0",
|
||||
"@standardnotes/auth": "3.19.2",
|
||||
"@standardnotes/domain-events": "2.29.0",
|
||||
"@standardnotes/domain-events-infra": "1.4.127",
|
||||
"@standardnotes/time": "^1.7.0",
|
||||
"@sentry/node": "^7.3.0",
|
||||
"@standardnotes/analytics": "^1.6.0",
|
||||
"@standardnotes/auth": "3.19.4",
|
||||
"@standardnotes/domain-events": "2.32.5",
|
||||
"@standardnotes/domain-events-infra": "1.5.5",
|
||||
"@standardnotes/time": "^1.7.1",
|
||||
"aws-sdk": "^2.1160.0",
|
||||
"axios": "0.24.0",
|
||||
"cors": "2.8.5",
|
||||
@@ -37,7 +38,7 @@
|
||||
"inversify-express-utils": "^6.4.3",
|
||||
"ioredis": "^5.0.6",
|
||||
"jsonwebtoken": "8.5.1",
|
||||
"newrelic": "8.6.0",
|
||||
"newrelic": "^8.14.1",
|
||||
"prettyjson": "1.2.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"winston": "3.3.3"
|
||||
@@ -48,13 +49,14 @@
|
||||
"@types/ioredis": "^4.28.10",
|
||||
"@types/jest": "^28.1.3",
|
||||
"@types/jsonwebtoken": "^8.5.0",
|
||||
"@types/newrelic": "^7.0.1",
|
||||
"@types/newrelic": "^7.0.3",
|
||||
"@types/prettyjson": "^0.0.29",
|
||||
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
||||
"eslint": "^8.14.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"jest": "^28.1.1",
|
||||
"nodemon": "^2.0.16",
|
||||
"npm-check-updates": "^14.1.1",
|
||||
"ts-jest": "^28.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,10 @@ export class AuthMiddleware extends BaseMiddleware {
|
||||
response.setHeader('content-type', (error as AxiosError).response?.headers['content-type'] as string)
|
||||
}
|
||||
|
||||
const errorCode = (error as AxiosError).isAxiosError ? +((error as AxiosError).code as string) : 500
|
||||
const errorCode =
|
||||
(error as AxiosError).isAxiosError && !isNaN(+((error as AxiosError).code as string))
|
||||
? +((error as AxiosError).code as string)
|
||||
: 500
|
||||
|
||||
response.status(errorCode).send(errorMessage)
|
||||
|
||||
|
||||
@@ -88,7 +88,10 @@ export class SubscriptionTokenAuthMiddleware extends BaseMiddleware {
|
||||
response.setHeader('content-type', (error as AxiosError).response?.headers['content-type'] as string)
|
||||
}
|
||||
|
||||
const errorCode = (error as AxiosError).isAxiosError ? +((error as AxiosError).code as string) : 500
|
||||
const errorCode =
|
||||
(error as AxiosError).isAxiosError && !isNaN(+((error as AxiosError).code as string))
|
||||
? +((error as AxiosError).code as string)
|
||||
: 500
|
||||
|
||||
response.status(errorCode).send(errorMessage)
|
||||
|
||||
|
||||
@@ -49,4 +49,14 @@ export class ActionsController extends BaseHttpController {
|
||||
request.body,
|
||||
)
|
||||
}
|
||||
|
||||
@httpGet('/marketing-emails/mute/:settingUuid')
|
||||
async muteMarketingEmails(request: Request, response: Response): Promise<void> {
|
||||
await this.httpService.callAuthServer(
|
||||
request,
|
||||
response,
|
||||
`internal/settings/marketing-emails/${request.params.settingUuid}/mute`,
|
||||
request.body,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,10 @@ export class HttpService implements HttpServiceInterface {
|
||||
response.setHeader('content-type', (error as AxiosError).response?.headers['content-type'] as string)
|
||||
}
|
||||
|
||||
const errorCode = (error as AxiosError).isAxiosError ? +((error as AxiosError).code as string) : 500
|
||||
const errorCode =
|
||||
(error as AxiosError).isAxiosError && !isNaN(+((error as AxiosError).code as string))
|
||||
? +((error as AxiosError).code as string)
|
||||
: 500
|
||||
|
||||
response.status(errorCode).send(errorMessage)
|
||||
}
|
||||
@@ -159,6 +162,12 @@ export class HttpService implements HttpServiceInterface {
|
||||
|
||||
this.applyResponseHeaders(serviceResponse, response)
|
||||
|
||||
if (this.responseShouldNotBeDecorated(serviceResponse)) {
|
||||
response.status(serviceResponse.status).send(serviceResponse.data)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
response.status(serviceResponse.status).send({
|
||||
meta: {
|
||||
auth: {
|
||||
@@ -210,6 +219,10 @@ export class HttpService implements HttpServiceInterface {
|
||||
return payload
|
||||
}
|
||||
|
||||
private responseShouldNotBeDecorated(serviceResponse: AxiosResponse): boolean {
|
||||
return serviceResponse.headers['content-type'].toLowerCase().includes('text/html')
|
||||
}
|
||||
|
||||
private applyResponseHeaders(serviceResponse: AxiosResponse, response: Response): void {
|
||||
const returnedHeadersFromUnderlyingService = [
|
||||
'access-control-allow-methods',
|
||||
|
||||
@@ -3,6 +3,70 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.3.4](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.3.3...@standardnotes/auth-server@1.3.4) (2022-06-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/auth-server
|
||||
|
||||
## [1.3.3](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.3.2...@standardnotes/auth-server@1.3.3) (2022-06-28)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* change response type to html for muting marketing emails ([ba373eb](https://github.com/standardnotes/auth/commit/ba373ebc6b3038f7de2fab40f0429a655dbe2499))
|
||||
|
||||
## [1.3.2](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.3.1...@standardnotes/auth-server@1.3.2) (2022-06-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/auth-server
|
||||
|
||||
## [1.3.1](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.3.0...@standardnotes/auth-server@1.3.1) (2022-06-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/auth-server
|
||||
|
||||
# [1.3.0](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.2.1...@standardnotes/auth-server@1.3.0) (2022-06-27)
|
||||
|
||||
### Features
|
||||
|
||||
* add endpoint for muting marketing emails ([6d7de4a](https://github.com/standardnotes/auth/commit/6d7de4a8daaf7569b8f2e031854e8baaff64a469))
|
||||
|
||||
## [1.2.1](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.2.0...@standardnotes/auth-server@1.2.1) (2022-06-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add setting uuid to email requests ([214684e](https://github.com/standardnotes/auth/commit/214684eae733675b7cefa522202e53d9556e5279))
|
||||
|
||||
# [1.2.0](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.1.7...@standardnotes/auth-server@1.2.0) (2022-06-27)
|
||||
|
||||
### Features
|
||||
|
||||
* add docker commands to start sending emails ([210a314](https://github.com/standardnotes/auth/commit/210a314c8199e47e5b6a113bd60401c16bb95291))
|
||||
|
||||
## [1.1.7](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.1.6...@standardnotes/auth-server@1.1.7) (2022-06-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add sending out email campaigns ([bf14ec0](https://github.com/standardnotes/auth/commit/bf14ec05f92d893e7c74a4f29ef7e426bee9d768))
|
||||
|
||||
## [1.1.6](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.1.5...@standardnotes/auth-server@1.1.6) (2022-06-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/auth-server
|
||||
|
||||
## [1.1.5](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.1.4...@standardnotes/auth-server@1.1.5) (2022-06-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* upgrade sentry node sdk ([b6db194](https://github.com/standardnotes/auth/commit/b6db194a22ff1d0afe96c291d545b408c0a5c373))
|
||||
|
||||
## [1.1.4](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.1.3...@standardnotes/auth-server@1.1.4) (2022-06-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* newrelic deps and setup db and cache for local development purposes ([ff09ae0](https://github.com/standardnotes/auth/commit/ff09ae0a47747eaf7977ce5d3937ad385101eaeb))
|
||||
|
||||
## [1.1.3](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.1.2...@standardnotes/auth-server@1.1.3) (2022-06-23)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* curl in the final image ([0d67c55](https://github.com/standardnotes/auth/commit/0d67c55e124eed08bca16824750152b895fceca7))
|
||||
|
||||
## [1.1.2](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.1.1...@standardnotes/auth-server@1.1.2) (2022-06-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/auth-server
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FROM node:16.15.1-alpine AS builder
|
||||
|
||||
# Install dependencies for building native libraries
|
||||
RUN apk add --update git openssh-client curl python3 alpine-sdk
|
||||
RUN apk add --update git openssh-client python3 alpine-sdk
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
@@ -12,6 +12,8 @@ RUN yarn install --immutable
|
||||
|
||||
FROM node:16.15.1-alpine
|
||||
|
||||
RUN apk add --update curl
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
# Copy the installed dependencies from the previous stage.
|
||||
|
||||
147
packages/auth/bin/email.ts
Normal file
147
packages/auth/bin/email.ts
Normal file
@@ -0,0 +1,147 @@
|
||||
import 'reflect-metadata'
|
||||
|
||||
import 'newrelic'
|
||||
|
||||
import { Stream } from 'stream'
|
||||
|
||||
import { Logger } from 'winston'
|
||||
import * as dayjs from 'dayjs'
|
||||
import * as utc from 'dayjs/plugin/utc'
|
||||
|
||||
import { UserRepositoryInterface } from '../src/Domain/User/UserRepositoryInterface'
|
||||
import { ContainerConfigLoader } from '../src/Bootstrap/Container'
|
||||
import TYPES from '../src/Bootstrap/Types'
|
||||
import { Env } from '../src/Bootstrap/Env'
|
||||
import { SettingServiceInterface } from '../src/Domain/Setting/SettingServiceInterface'
|
||||
import { DomainEventFactoryInterface } from '../src/Domain/Event/DomainEventFactoryInterface'
|
||||
import { UserSubscriptionRepositoryInterface } from '../src/Domain/Subscription/UserSubscriptionRepositoryInterface'
|
||||
import { DomainEventPublisherInterface } from '@standardnotes/domain-events'
|
||||
import { MuteMarketingEmailsOption, SettingName } from '@standardnotes/settings'
|
||||
import { EmailMessageIdentifier } from '@standardnotes/common'
|
||||
import { User } from '../src/Domain/User/User'
|
||||
import { EncryptionVersion } from '../src/Domain/Encryption/EncryptionVersion'
|
||||
import { TimerInterface } from '@standardnotes/time'
|
||||
|
||||
const inputArgs = process.argv.slice(2)
|
||||
const emailMessageIdentifier = inputArgs[0]
|
||||
|
||||
const sendEmailCampaign = async (
|
||||
userRepository: UserRepositoryInterface,
|
||||
settingService: SettingServiceInterface,
|
||||
userSubscriptionRepository: UserSubscriptionRepositoryInterface,
|
||||
timer: TimerInterface,
|
||||
domainEventFactory: DomainEventFactoryInterface,
|
||||
domainEventPublisher: DomainEventPublisherInterface,
|
||||
): Promise<void> => {
|
||||
const stream = await userRepository.streamAll()
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
stream
|
||||
.pipe(
|
||||
new Stream.Transform({
|
||||
objectMode: true,
|
||||
transform: async (rawUserData, _encoding, callback) => {
|
||||
let emailsMutedSetting = await settingService.findSettingWithDecryptedValue({
|
||||
userUuid: rawUserData.user_uuid,
|
||||
settingName: SettingName.MuteMarketingEmails,
|
||||
})
|
||||
|
||||
if (emailsMutedSetting === null) {
|
||||
const user = (await userRepository.findOneByUuid(rawUserData.user_uuid)) as User
|
||||
|
||||
const { setting } = await settingService.createOrReplace({
|
||||
user,
|
||||
props: {
|
||||
name: SettingName.MuteMarketingEmails,
|
||||
unencryptedValue: MuteMarketingEmailsOption.NotMuted,
|
||||
serverEncryptionVersion: EncryptionVersion.Default,
|
||||
sensitive: false,
|
||||
},
|
||||
})
|
||||
emailsMutedSetting = setting
|
||||
}
|
||||
|
||||
if (emailsMutedSetting.value === MuteMarketingEmailsOption.Muted) {
|
||||
callback()
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
let activeSubscription = false
|
||||
let subscriptionPlanName = null
|
||||
|
||||
const userSubscription = await userSubscriptionRepository.findOneByUserUuid(rawUserData.user_uuid)
|
||||
if (userSubscription !== null) {
|
||||
activeSubscription =
|
||||
!userSubscription.cancelled && userSubscription.endsAt > timer.getTimestampInMicroseconds()
|
||||
subscriptionPlanName = userSubscription.planName
|
||||
}
|
||||
|
||||
await domainEventPublisher.publish(
|
||||
domainEventFactory.createEmailMessageRequestedEvent({
|
||||
userEmail: rawUserData.user_email,
|
||||
messageIdentifier: emailMessageIdentifier as EmailMessageIdentifier,
|
||||
context: {
|
||||
activeSubscription,
|
||||
subscriptionPlanName,
|
||||
muteEmailsSettingUuid: emailsMutedSetting.uuid,
|
||||
},
|
||||
}),
|
||||
)
|
||||
|
||||
callback()
|
||||
},
|
||||
}),
|
||||
)
|
||||
.on('finish', resolve)
|
||||
.on('error', reject)
|
||||
})
|
||||
}
|
||||
|
||||
const container = new ContainerConfigLoader()
|
||||
void container.load().then((container) => {
|
||||
dayjs.extend(utc)
|
||||
|
||||
const env: Env = new Env()
|
||||
env.load()
|
||||
|
||||
const logger: Logger = container.get(TYPES.Logger)
|
||||
|
||||
logger.info(`Starting email campaign for email ${emailMessageIdentifier} ...`)
|
||||
|
||||
if (!emailMessageIdentifier) {
|
||||
logger.error('No email message identifier passed as argument. Skipped sending.')
|
||||
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const userRepository: UserRepositoryInterface = container.get(TYPES.UserRepository)
|
||||
const settingService: SettingServiceInterface = container.get(TYPES.SettingService)
|
||||
const userSubscriptionRepository: UserSubscriptionRepositoryInterface = container.get(
|
||||
TYPES.UserSubscriptionRepository,
|
||||
)
|
||||
const timer: TimerInterface = container.get(TYPES.Timer)
|
||||
const domainEventFactory: DomainEventFactoryInterface = container.get(TYPES.DomainEventFactory)
|
||||
const domainEventPublisher: DomainEventPublisherInterface = container.get(TYPES.DomainEventPublisher)
|
||||
|
||||
Promise.resolve(
|
||||
sendEmailCampaign(
|
||||
userRepository,
|
||||
settingService,
|
||||
userSubscriptionRepository,
|
||||
timer,
|
||||
domainEventFactory,
|
||||
domainEventPublisher,
|
||||
),
|
||||
)
|
||||
.then(() => {
|
||||
logger.info(`${emailMessageIdentifier} email campaign complete.`)
|
||||
|
||||
process.exit(0)
|
||||
})
|
||||
.catch((error) => {
|
||||
logger.error(`Could not finish ${emailMessageIdentifier} email campaign: ${error.message}`)
|
||||
|
||||
process.exit(1)
|
||||
})
|
||||
})
|
||||
@@ -44,6 +44,12 @@ case "$COMMAND" in
|
||||
yarn workspace @standardnotes/auth-server daily-backup:one_drive
|
||||
;;
|
||||
|
||||
'email-campaign' )
|
||||
echo "Starting Email Campaign Sending..."
|
||||
MESSAGE_IDENTIFIER=$1 && shift 1
|
||||
yarn workspace @standardnotes/auth-server email-campaign $MESSAGE_IDENTIFIER
|
||||
;;
|
||||
|
||||
* )
|
||||
echo "Unknown command"
|
||||
;;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user