Compare commits

..

97 Commits

Author SHA1 Message Date
Mo
a6082a38b8 feat: delete outbound invites 2023-07-26 05:24:20 -05:00
Mo
2410f90fb6 new: return replacebility_identifier for asym messages 2023-07-21 15:07:19 -05:00
Mo
58daf930fb feat: revisions migration 2023-06-28 10:41:56 -05:00
Mo
7840c8f353 chore: remove unused endpoint 2023-06-28 09:17:54 -05:00
Mo
d5280648b5 fix: delete shared vault after deleting its users 2023-06-23 14:19:37 -05:00
Mo
c9e37f852c fix: include server item in some vault conflict types 2023-06-19 16:46:23 -05:00
Mo
c565e83ece refactor: remove specified items key id from shared vaults 2023-06-19 16:28:37 -05:00
Mo
74b94b4028 feat: replace existing invite before sending new 2023-06-16 14:06:20 -05:00
Mo
baa5ca92d4 feat: asymmetric message replaceability identifier 2023-06-12 10:32:23 -05:00
Mo
eef73c07db chore: build 2023-06-12 09:43:38 -05:00
Mo
a1e089b269 chore: lint 2023-06-12 08:29:35 -05:00
Mo
e2aea4d5c3 fix: asymmetric messages migration 2023-06-12 06:12:39 -05:00
Mo
315dea4620 chore: yarn 2023-06-12 05:10:09 -05:00
Mo
52a9913269 chore: lint 2023-06-11 21:15:55 -05:00
Mo
7d3235c514 refactor: remove sender public key from asymmetric messages 2023-06-11 16:04:13 -05:00
Mo
950af121cd feat: asymmetric messages 2023-06-07 11:19:16 -05:00
Mo
781e2a4685 refactor: remove invite type from vault invites 2023-06-07 10:55:06 -05:00
Mo
9610e47f78 refactor(wip): remove contacts model 2023-06-07 10:46:10 -05:00
Mo
f5ff7d9c97 feat: contact signing key 2023-06-07 06:48:48 -05:00
Mo
5bf9c4cff6 feat(wip): deterministic keypairs 2023-06-06 17:14:47 -05:00
Mo
d040429575 feat(wip): signing keypair 2023-06-06 13:27:31 -05:00
Mo
911d84d7c1 feat(wip): signing keypair 2023-06-05 16:22:59 -05:00
Mo
3a855ded95 chore: types 2023-06-05 15:43:26 -05:00
Mo
f5b6e943cb chore: add user event when vault is deleted 2023-06-04 16:14:49 -05:00
Mo
cad48d727a fix: types 2023-06-04 15:35:07 -05:00
Mo
ce900df132 refactor: remove key system identifier from shared vaults 2023-06-04 05:48:50 -05:00
Mo
97bcfb6ff2 fix: optional vault save operation 2023-06-03 17:25:28 -05:00
Mo
2fcfe05b04 refactor: remove removed shared vault user 2023-06-03 17:12:30 -05:00
Mo
f86740b295 feat(wip): user event syncing 2023-06-03 10:33:30 -05:00
Mo
f204454773 feat(wip): user events 2023-06-03 10:20:35 -05:00
Mo
19e14a88a7 refactor: shared vault filter 2023-06-03 06:54:54 -05:00
Mo
c077ad7037 refactor: rename groups to shared vaults 2023-06-02 20:12:36 -05:00
Mo
51e52ed9ff fix: group filter 2023-06-02 07:20:49 -05:00
Mo
dfa53647f3 chore: types 2023-06-01 15:11:16 -05:00
Mo
914fd1b26c chore: types 2023-06-01 09:28:14 -05:00
Mo
0b824a493d refactor: service dependencies 2023-06-01 08:58:29 -05:00
Mo
07ae120e2a refactor(wip): vault system identifier 2023-05-31 16:07:13 -05:00
Mo
9323ca79c6 refactor: rename vaults to groups 2023-05-31 11:42:36 -05:00
Mo
ed48350d3e feat: on the fly vault creation during sync 2023-05-31 09:01:26 -05:00
Mo
9953860a61 chore: remove unused permission 2023-05-31 08:12:36 -05:00
Mo
cc236c60ec fix: vault owner cannot delete own vault user 2023-05-30 17:30:04 -05:00
Mo
a56973e9cd feat: removed_vault_user model 2023-05-30 13:58:07 -05:00
Mo
706daa8f15 refactor: make item.userUuid non-null again 2023-05-30 09:56:46 -05:00
Mo
c752775a1c wip: vault sync filter 2023-05-30 08:18:01 -05:00
Mo
5bdbf54495 wip: vault files 2023-05-29 12:45:40 -05:00
Mo
9db1381ebf feat: vault files 2023-05-29 05:59:09 -05:00
Mo
94deab2ee0 refactor: vault files 2023-05-28 14:11:31 -05:00
Mo
690f18708a feat: created_by_uuid 2023-05-28 12:31:54 -05:00
Mo
4a87114f91 chore: lint 2023-05-28 11:09:15 -05:00
Mo
cd92f7827c refactor: rename groups to vaults 2023-05-28 10:30:10 -05:00
Mo
fc0f25e740 chore: permissions 2023-05-27 15:22:02 -05:00
Mo
f27f5c9b37 refactor: remove item links 2023-05-26 09:10:20 -05:00
Mo
86f57581df feat: group files 2023-05-26 09:00:46 -05:00
Mo
829bdf96ce feat: last edited by uuid 2023-05-25 14:01:32 -05:00
Mo
86dbfda80a fix: non admin user should be able to remove their own items from group 2023-05-25 09:25:19 -05:00
Mo
7854f6f9ec fix: item deletion 2023-05-25 04:57:58 -05:00
Mo
379fc2d39b feat: snjs version sync filter 2023-05-25 04:29:13 -05:00
Mo
1cadd8addf fix: patch user endpoint 2023-05-25 04:01:47 -05:00
Mo
a0127a6b9f wip: e2e tests 2023-05-24 06:59:10 -05:00
Mo
df818b757b fix: event handler 2023-05-23 11:32:20 -05:00
Mo
f874abab1e chore: lint 2023-05-23 08:54:54 -05:00
Mo
3be78dab85 wip: e2e tests 2023-05-23 06:05:25 -05:00
Mo
d5f15b85e6 chore: lint 2023-05-22 16:49:46 -05:00
Mo
6af3a2d9bc chore: lint 2023-05-22 11:53:51 -05:00
Mo
bb632cabd3 wip: e2e tests 2023-05-22 09:16:14 -05:00
Mo
5cf0617403 wip: e2e tests 2023-05-22 07:29:12 -05:00
Mo
42aa572375 chore: lint 2023-05-21 14:04:48 -05:00
Mo
27befd6c70 wip: group keys 2023-05-21 07:07:17 -05:00
Mo
16671c3f48 wip: set up invites 2023-05-20 07:27:13 -05:00
Mo
0bbefbf899 wip: add group invites model 2023-05-19 15:42:48 -05:00
Mo
1841c800e6 refactor: rename group user endpoints 2023-05-19 15:22:47 -05:00
Mo
e439830818 refactor: rename group user key to group user 2023-05-19 15:12:36 -05:00
Mo
c416ed6078 wip: default rotation 2023-05-19 12:59:28 -05:00
Mo
417b0257cf wip: e2e tests 2023-05-19 08:27:02 -05:00
Mo
50e95448f0 wip: e2e tests 2023-05-18 14:59:54 -05:00
Mo
ca24a6051b wip: meta response public key 2023-05-18 11:01:02 -05:00
Mo
c578e2742f wip: group deletion 2023-05-18 08:11:02 -05:00
Mo
6ad3d66007 wip: e2e tests 2023-05-17 14:39:03 -05:00
Mo
f6d80d89f4 wip: e2e tests 2023-05-17 11:37:36 -05:00
Mo
a01e35f2c2 wip: e2e tests 2023-05-17 08:09:31 -05:00
Mo
b5d40b2b70 wip: e2e tests 2023-05-17 05:57:05 -05:00
Mo
412827bb4f wip: proto complete 2023-05-16 15:13:08 -05:00
Mo
301ca6386f refactor: move user key factory out of directory due to ide issues with rename 2023-05-16 08:20:56 -05:00
Mo
245d809068 refactor: group user to group user key 2023-05-16 08:05:23 -05:00
Mo
ff030391a4 wip: usecases 2023-05-16 07:36:25 -05:00
Mo
8ffeae8642 wip: remove group_item entity in favor or item.group_uuid 2023-05-15 09:35:20 -05:00
Mo
6120591998 refactor: rename item shares to item links 2023-05-14 13:04:46 -05:00
Mo
d532e052d6 refactor: remove public key from share model 2023-05-14 06:34:30 -05:00
Mo
1de21a7ba9 refactor: better error handling 2023-05-13 08:32:07 -05:00
Mo
432c15ca94 feat: random share token 2023-05-12 10:34:43 -05:00
Mo
5ca7132c2d refactor: authentication 2023-05-12 10:28:18 -05:00
Mo
d97fb09517 fix: missing import 2023-05-12 06:28:59 -05:00
Mo
96420e9942 feat: share durations 2023-05-11 16:49:04 -05:00
Mo
297bfedf6a feat: file sharing 2023-05-11 08:11:45 -05:00
Mo
cb014a98cf fix: remove authentication for getting shared item 2023-05-10 13:28:01 -05:00
Mo
dbd0acab2c fix: functionality 2023-05-10 07:19:02 -05:00
Mo
add91d8c0c feat(wip): item shares 2023-05-10 05:40:22 -05:00
2808 changed files with 592963 additions and 52061 deletions

View File

@@ -15,7 +15,6 @@ DB_TYPE=mysql
REDIS_PORT=6379
REDIS_HOST=cache
CACHE_TYPE=redis
########
# KEYS #

10
.github/ci.env vendored
View File

@@ -4,14 +4,12 @@ DB_USERNAME=std_notes_user
DB_PASSWORD=changeme123
DB_DATABASE=standard_notes_db
DB_PORT=3306
DB_DEBUG_LEVEL=all
DB_SQLITE_DATABASE_PATH=standard_notes_db
REDIS_PORT=6379
REDIS_HOST=cache
AUTH_SERVER_ACCESS_TOKEN_AGE=4
AUTH_SERVER_REFRESH_TOKEN_AGE=10
AUTH_SERVER_EPHEMERAL_SESSION_AGE=300
SYNCING_SERVER_REVISIONS_FREQUENCY=2
SYNCING_SERVER_REVISIONS_FREQUENCY=5
AUTH_SERVER_LOG_LEVEL=debug
SYNCING_SERVER_LOG_LEVEL=debug
FILES_SERVER_LOG_LEVEL=debug
@@ -23,12 +21,6 @@ MYSQL_USER=std_notes_user
MYSQL_PASSWORD=changeme123
MYSQL_ROOT_PASSWORD=changeme123
MONGO_HOST=secondary_db
MONGO_PORT=27017
MONGO_USERNAME=standardnotes
MONGO_PASSWORD=standardnotes
MONGO_DATABASE=standardnotes
AUTH_JWT_SECRET=f95259c5e441f5a4646d76422cfb3df4c4488842901aa50b6c51b8be2e0040e9
AUTH_SERVER_ENCRYPTION_SERVER_KEY=1087415dfde3093797f9a7ca93a49e7d7aa1861735eb0d32aae9c303b8c3d060
VALET_TOKEN_SECRET=4b886819ebe1e908077c6cae96311b48a8416bd60cc91c03060e15bdf6b30d1f

View File

@@ -30,11 +30,6 @@ updates:
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/packages/domain-core"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/packages/domain-events"
schedule:
@@ -55,11 +50,6 @@ updates:
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/packages/home-server"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/packages/predicates"
schedule:

View File

@@ -24,7 +24,7 @@ jobs:
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
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 }}

View File

@@ -70,7 +70,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
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 }}
@@ -90,7 +90,7 @@ jobs:
uses: docker/setup-buildx-action@master
- name: Publish Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: ${{ steps.bundle-dir.outputs.temp_dir }}

View File

@@ -19,12 +19,15 @@ on:
jobs:
e2e:
name: (Self Hosting) E2E Test Suite
strategy:
fail-fast: false
matrix:
secondary_db_enabled: [true, false]
transition_mode_enabled: [true, false]
database: [ "mysql", "sqlite" ]
include:
- cache: "redis"
database: "mysql"
- cache: "memory"
database: "sqlite"
runs-on: ubuntu-latest
services:
@@ -42,129 +45,14 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Run Server
run: docker compose -f docker-compose.ci.yml up -d
env:
DB_TYPE: mysql
CACHE_TYPE: redis
SECONDARY_DB_ENABLED: ${{ matrix.secondary_db_enabled }}
TRANSITION_MODE_ENABLED: ${{ matrix.transition_mode_enabled }}
DB_TYPE: ${{ matrix.database }}
CACHE_TYPE: ${{ matrix.cache }}
- name: Wait for server to start
run: docker/is-available.sh http://localhost:3123 $(pwd)/logs
- name: Run E2E Test Suite
run: yarn dlx mocha-headless-chrome --timeout 3600000 -f http://localhost:9001/mocha/test.html
- name: Show logs on failure
if: ${{ failure() }}
run: |
echo "# Errors:"
tail -n 100 logs/*.err
echo "# Logs:"
tail -n 100 logs/*.log
e2e-home-server:
name: (Home Server) E2E Test Suite
strategy:
fail-fast: false
matrix:
db_type: [mysql, sqlite]
cache_type: [redis, memory]
secondary_db_enabled: [true, false]
transition_mode_enabled: [true, false]
runs-on: ubuntu-latest
services:
snjs:
image: standardnotes/snjs:${{ inputs.snjs_image_tag }}
ports:
- 9001:9001
cache:
image: redis
ports:
- 6379:6379
db:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: standardnotes
MYSQL_USER: standardnotes
MYSQL_PASSWORD: standardnotes
secondary_db:
image: mongo:5.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: standardnotes
MONGO_INITDB_ROOT_PASSWORD: standardnotes
MONGO_INITDB_DATABASE: standardnotes
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: Install Dependencies
run: yarn install --immutable
- name: Build
run: yarn build
- name: Copy dotenv file
run: cp packages/home-server/.env.sample packages/home-server/.env
- name: Fill in env variables
run: |
sed -i "s/JWT_SECRET=/JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/AUTH_JWT_SECRET=/AUTH_JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/ENCRYPTION_SERVER_KEY=/ENCRYPTION_SERVER_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/PSEUDO_KEY_PARAMS_KEY=/PSEUDO_KEY_PARAMS_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/VALET_TOKEN_SECRET=/VALET_TOKEN_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
echo "ACCESS_TOKEN_AGE=4" >> packages/home-server/.env
echo "REFRESH_TOKEN_AGE=10" >> packages/home-server/.env
echo "REVISIONS_FREQUENCY=2" >> packages/home-server/.env
echo "DB_HOST=localhost" >> packages/home-server/.env
echo "DB_PORT=3306" >> packages/home-server/.env
echo "DB_DATABASE=standardnotes" >> packages/home-server/.env
echo "DB_SQLITE_DATABASE_PATH=homeserver.db" >> packages/home-server/.env
echo "DB_USERNAME=standardnotes" >> packages/home-server/.env
echo "DB_PASSWORD=standardnotes" >> packages/home-server/.env
echo "DB_TYPE=${{ matrix.db_type }}" >> packages/home-server/.env
echo "DB_DEBUG_LEVEL=all" >> packages/home-server/.env
echo "REDIS_URL=redis://localhost:6379" >> packages/home-server/.env
echo "CACHE_TYPE=${{ matrix.cache_type }}" >> packages/home-server/.env
echo "SECONDARY_DB_ENABLED=${{ matrix.secondary_db_enabled }}" >> packages/home-server/.env
echo "TRANSITION_MODE_ENABLED=${{ matrix.transition_mode_enabled }}" >> packages/home-server/.env
echo "MONGO_HOST=localhost" >> packages/home-server/.env
echo "MONGO_PORT=27017" >> packages/home-server/.env
echo "MONGO_DATABASE=standardnotes" >> packages/home-server/.env
echo "MONGO_USERNAME=standardnotes" >> packages/home-server/.env
echo "MONGO_PASSWORD=standardnotes" >> packages/home-server/.env
echo "FILES_SERVER_URL=http://localhost:3123" >> packages/home-server/.env
echo "E2E_TESTING=true" >> packages/home-server/.env
- name: Run Server
run: nohup yarn workspace @standardnotes/home-server start > logs/output.log 2>&1 &
env:
PORT: 3123
- name: Wait for server to start
run: for i in {1..30}; do curl -s http://localhost:3123/healthcheck && break || sleep 1; done
- name: Run E2E Test Suite
run: yarn dlx mocha-headless-chrome --timeout 3600000 -f http://localhost:9001/mocha/test.html
- name: Show logs on failure
if: ${{ failure() }}
run: tail -n 500 logs/output.log
run: yarn dlx mocha-headless-chrome --timeout 1200000 -f http://localhost:9001/mocha/test.html

View File

@@ -35,7 +35,7 @@ jobs:
uses: docker/setup-buildx-action@master
- name: Publish Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .

View File

@@ -1,7 +1,5 @@
name: E2E Test Suite On Self Hosted Server
run-name: E2E Test Suite against ${{ inputs.ref_name }} by ${{ inputs.author }}
on:
schedule:
- cron: '0 */12 * * *'
@@ -11,14 +9,6 @@ on:
type: string
default: latest
description: The Docker image tag used for SNJS container
author:
type: string
default: unknown
description: The author that triggered the workflow
ref_name:
type: string
default: unknown
description: The ref name from which the workflow was triggered
jobs:
e2e:

View File

@@ -25,9 +25,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Build
run: yarn build
@@ -53,9 +50,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build
@@ -85,9 +79,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build

View File

@@ -25,9 +25,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Build
run: yarn build
@@ -53,9 +50,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build
@@ -85,9 +79,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build
@@ -146,9 +137,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build

1
.gitignore vendored
View File

@@ -11,6 +11,7 @@ newrelic_agent.log
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/unplugged
!.yarn/sdks
!.yarn/versions

2
.nvmrc
View File

@@ -1 +1 @@
20.2.0
20.1.0

6538
.pnp.cjs generated

File diff suppressed because it is too large Load Diff

Binary file not shown.

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