mirror of
https://github.com/standardnotes/app
synced 2026-09-13 00:45:26 -04:00
Compare commits
110
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca01b2dc95 | ||
|
|
dbf918523c | ||
|
|
fe8521eff7 | ||
|
|
48e7820100 | ||
|
|
2af610c7bf | ||
|
|
896372f04d | ||
|
|
2ff120d29c | ||
|
|
dcd64408a1 | ||
|
|
983b122537 | ||
|
|
520bede842 | ||
|
|
2ecd6cf5cd | ||
|
|
daab6e12cf | ||
|
|
a3e1a1f366 | ||
|
|
7f7ff6a8ce | ||
|
|
aab67ff5d8 | ||
|
|
3d0c08e283 | ||
|
|
fab0e9a27b | ||
|
|
daea46d764 | ||
|
|
9407b61787 | ||
|
|
a977e7f754 | ||
|
|
1e2c26ffeb | ||
|
|
c3996be0fa | ||
|
|
6759457f39 | ||
|
|
7b0e4d0edc | ||
|
|
cac8f4adf5 | ||
|
|
c80424b3ee | ||
|
|
26f8815a4d | ||
|
|
557036dd27 | ||
|
|
7eb0098fff | ||
|
|
f0566c7d07 | ||
|
|
bea266a69a | ||
|
|
e079e0ec86 | ||
|
|
5fc98b9de5 | ||
|
|
94be549f30 | ||
|
|
1275a2e148 | ||
|
|
9ebb095aaa | ||
|
|
5517c96822 | ||
|
|
a07fa23c70 | ||
|
|
7c9cc821a2 | ||
|
|
327abbf5ae | ||
|
|
09ba8fb99b | ||
|
|
6978b56960 | ||
|
|
ab2707d122 | ||
|
|
2a0fdeedd6 | ||
|
|
b17b25666b | ||
|
|
9157dc1364 | ||
|
|
464af45b50 | ||
|
|
56642422e4 | ||
|
|
43fc95a7ac | ||
|
|
57265d1d4e | ||
|
|
6f6600ebd6 | ||
|
|
2ed68ada6b | ||
|
|
53785c7100 | ||
|
|
ada155a8c9 | ||
|
|
d6a3e69d8c | ||
|
|
e50cc591c0 | ||
|
|
5311f1e098 | ||
|
|
7ca2fa8eab | ||
|
|
51c095efa9 | ||
|
|
0eb30598df | ||
|
|
4907011ff2 | ||
|
|
98dff43ab5 | ||
|
|
5fc8f6e6a0 | ||
|
|
95c0352464 | ||
|
|
725a40b833 | ||
|
|
0447b450d7 | ||
|
|
dfa994ee8d | ||
|
|
126e9abd9c | ||
|
|
5faeaaf330 | ||
|
|
22d6fcf973 | ||
|
|
2e364dc016 | ||
|
|
986985b7de | ||
|
|
7c5f5c82a1 | ||
|
|
25c0d655ab | ||
|
|
bf3f6cec43 | ||
|
|
4385315dae | ||
|
|
ec69e8041f | ||
|
|
6724e1d79c | ||
|
|
60c9afad95 | ||
|
|
d4c8ee51f1 | ||
|
|
8d42e8bde3 | ||
|
|
59130e8d85 | ||
|
|
422506da0b | ||
|
|
9ad779c89a | ||
|
|
3290f76e97 | ||
|
|
5d551e1463 | ||
|
|
b73402850d | ||
|
|
dcc69b3e52 | ||
|
|
fcd853a311 | ||
|
|
2d5e98bb21 | ||
|
|
9430bf4507 | ||
|
|
5e661c95da | ||
|
|
152d2f5b84 | ||
|
|
53d1c7fe4b | ||
|
|
cdd90bf393 | ||
|
|
fc9dc60030 | ||
|
|
a195b93cb8 | ||
|
|
b1666ffa21 | ||
|
|
c3890fe50d | ||
|
|
4ee5ad8595 | ||
|
|
13925e6e8c | ||
|
|
e18731d9e6 | ||
|
|
29575999d4 | ||
|
|
c543bfee72 | ||
|
|
00db5ef0ed | ||
|
|
35d4e7ff2d | ||
|
|
e7ecabc972 | ||
|
|
973bb990c6 | ||
|
|
2fc3d04ba9 | ||
|
|
42321fbe2b |
@@ -199,6 +199,16 @@ jobs:
|
||||
draft: false
|
||||
files: packages/desktop/dist/*
|
||||
|
||||
- name: Publish Snap
|
||||
continue-on-error: true
|
||||
run: |
|
||||
sudo snap install snapcraft --classic
|
||||
snapcraft upload dist/standard-notes-${{ env.APP_VERSION }}-linux-amd64.snap --release stable,candidate,beta,edge
|
||||
|
||||
Notify:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [Publish]
|
||||
steps:
|
||||
- name: Notify Release Update
|
||||
uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
@@ -206,8 +216,4 @@ jobs:
|
||||
repository: ${{ secrets.RELEASES_EVENT_RECEIVING_REPO }}
|
||||
event-type: releases-updated-event
|
||||
|
||||
- name: Publish Snap
|
||||
continue-on-error: true
|
||||
run: |
|
||||
sudo snap install snapcraft --classic
|
||||
snapcraft upload dist/standard-notes-${{ env.APP_VERSION }}-linux-amd64.snap --release stable,candidate,beta,edge
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ jobs:
|
||||
github_token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
workflow_file_name: e2e-test-suite.yml
|
||||
wait_interval: 30
|
||||
client_payload: '{"snjs_image_tag": "${{ github.sha }}"}'
|
||||
client_payload: '{"snjs_image_tag": "${{ github.sha }}", "author": "${{ github.actor }}", "ref_name": "app:${{ github.ref }}"}'
|
||||
propagate_failure: true
|
||||
trigger_workflow: true
|
||||
wait_workflow: true
|
||||
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
github_token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
workflow_file_name: e2e-test-suite.yml
|
||||
wait_interval: 30
|
||||
client_payload: '{"snjs_image_tag": "${{ github.sha }}"}'
|
||||
client_payload: '{"snjs_image_tag": "${{ github.sha }}", "author": "${{ github.actor }}", "ref_name": "app:${{ github.ref }}"}'
|
||||
propagate_failure: true
|
||||
trigger_workflow: true
|
||||
wait_workflow: true
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -27,7 +27,7 @@
|
||||
"build:services": "yarn workspaces foreach -pt --topological-dev --verbose -R --from @standardnotes/services run build",
|
||||
"build:api": "yarn workspaces foreach -pt --topological-dev --verbose -R --from @standardnotes/api run build",
|
||||
"e2e": "lerna run start:test-server --scope=@standardnotes/snjs",
|
||||
"e2e:test": "yarn dlx mocha-headless-chrome --timeout 1800000 -f http://localhost:9001/mocha/test.html",
|
||||
"e2e:test": "yarn dlx mocha-headless-chrome --timeout 3600000 -f http://localhost:9001/mocha/test.html",
|
||||
"reset": "find . -type dir -name node_modules | xargs rm -rf && rm -rf yarn.lock && yarn install",
|
||||
"release:prod": "lerna version --conventional-commits --yes -m \"chore(release): publish\"",
|
||||
"publish:prod": "lerna publish from-git --yes --no-verify-access --loglevel verbose",
|
||||
|
||||
@@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.56](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api
|
||||
|
||||
## [1.26.55](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api
|
||||
|
||||
## [1.26.54](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api
|
||||
|
||||
## [1.26.53](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api
|
||||
|
||||
## [1.26.52](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/api",
|
||||
"version": "1.26.52",
|
||||
"version": "1.26.56",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
@@ -36,7 +36,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@standardnotes/common": "^1.50.0",
|
||||
"@standardnotes/domain-core": "^1.25.0",
|
||||
"@standardnotes/domain-core": "^1.28.0",
|
||||
"@standardnotes/models": "workspace:*",
|
||||
"@standardnotes/responses": "workspace:*",
|
||||
"@standardnotes/utils": "workspace:*",
|
||||
|
||||
@@ -3,6 +3,118 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.1.228](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.227](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.226](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-16)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.225](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.224](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.223](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.222](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.221](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.220](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.219](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-14)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.218](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-14)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.217](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.216](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.215](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.214](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.213](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.212](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-11)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.211](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-11)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.210](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.209](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.208](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.207](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.206](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.205](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.204](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.203](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.202](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-04)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.201](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
## [1.1.200](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/clipper
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@standardnotes/clipper",
|
||||
"description": "Web clipper browser extension for Standard Notes",
|
||||
"version": "1.1.200",
|
||||
"version": "1.1.228",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build-mv2": "yarn clean && webpack --config ./webpack.config.prod.js",
|
||||
|
||||
@@ -3,6 +3,118 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [3.108.160](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.159](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.158](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-16)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.157](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.156](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.155](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.154](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.153](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.152](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.151](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-14)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.150](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-14)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.149](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.148](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.147](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.146](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.145](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.144](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-11)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.143](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-11)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.142](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.141](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.140](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.139](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.138](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.137](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.136](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.135](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.134](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-04)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.133](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.108.132](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@standardnotes/desktop",
|
||||
"main": "./app/dist/index.js",
|
||||
"version": "3.108.132",
|
||||
"version": "3.108.160",
|
||||
"license": "CC BY-NC-SA 4.0",
|
||||
"author": "Standard Notes.",
|
||||
"private": true,
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron/remote": "^2.0.9",
|
||||
"@standardnotes/domain-core": "^1.25.0",
|
||||
"@standardnotes/domain-core": "^1.28.0",
|
||||
"@standardnotes/electron-clear-data": "1.1.1",
|
||||
"@standardnotes/web": "workspace:*",
|
||||
"axios": "^1.1.3",
|
||||
|
||||
@@ -3,6 +3,26 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.21.78](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/encryption
|
||||
|
||||
## [1.21.77](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/encryption
|
||||
|
||||
## [1.21.76](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/encryption
|
||||
|
||||
## [1.21.75](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/encryption
|
||||
|
||||
## [1.21.74](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/encryption
|
||||
|
||||
## [1.21.73](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/encryption
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/encryption",
|
||||
"version": "1.21.73",
|
||||
"version": "1.21.78",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
@@ -29,7 +29,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@standardnotes/common": "^1.50.0",
|
||||
"@standardnotes/domain-core": "^1.25.0",
|
||||
"@standardnotes/domain-core": "^1.28.0",
|
||||
"@standardnotes/models": "workspace:*",
|
||||
"@standardnotes/responses": "workspace:*",
|
||||
"@standardnotes/sncrypto-common": "workspace:*",
|
||||
|
||||
+28
-49
@@ -17,6 +17,7 @@ import {
|
||||
} from './../../../../Types/EncryptedParameters'
|
||||
import { DecryptedParameters } from '../../../../Types/DecryptedParameters'
|
||||
import { DeriveHashingKeyUseCase } from '../Hash/DeriveHashingKey'
|
||||
import { V004Components } from '../../V004AlgorithmTypes'
|
||||
|
||||
export class GenerateDecryptedParametersUseCase {
|
||||
private base64DataUsecase = new CreateConsistentBase64JsonPayloadUseCase(this.crypto)
|
||||
@@ -39,7 +40,7 @@ export class GenerateDecryptedParametersUseCase {
|
||||
}
|
||||
}
|
||||
|
||||
const contentResult = this.decryptContent(encrypted, contentKeyResult.contentKey)
|
||||
const contentResult = this.decryptContent(encrypted, contentKeyResult.decrypted)
|
||||
if (!contentResult) {
|
||||
return {
|
||||
uuid: encrypted.uuid,
|
||||
@@ -54,17 +55,17 @@ export class GenerateDecryptedParametersUseCase {
|
||||
hashingKey,
|
||||
{
|
||||
additionalData: contentKeyResult.components.additionalData,
|
||||
plaintext: contentKeyResult.contentKey,
|
||||
plaintext: contentKeyResult.decrypted,
|
||||
},
|
||||
{
|
||||
additionalData: contentResult.components.additionalData,
|
||||
plaintext: contentResult.content,
|
||||
plaintext: contentResult.decrypted,
|
||||
},
|
||||
)
|
||||
|
||||
return {
|
||||
uuid: encrypted.uuid,
|
||||
content: JSON.parse(contentResult.content),
|
||||
content: JSON.parse(contentResult.decrypted),
|
||||
signatureData: signatureVerificationResult,
|
||||
}
|
||||
}
|
||||
@@ -72,34 +73,7 @@ export class GenerateDecryptedParametersUseCase {
|
||||
private decryptContent(encrypted: EncryptedOutputParameters, contentKey: string) {
|
||||
const contentComponents = deconstructEncryptedPayloadString(encrypted.content)
|
||||
|
||||
const contentAuthenticatedData = this.stringToAuthenticatedDataUseCase.execute(
|
||||
contentComponents.authenticatedData,
|
||||
{
|
||||
u: encrypted.uuid,
|
||||
v: encrypted.version,
|
||||
ksi: encrypted.key_system_identifier,
|
||||
svu: encrypted.shared_vault_uuid,
|
||||
},
|
||||
)
|
||||
|
||||
const authenticatedDataString = this.base64DataUsecase.execute(contentAuthenticatedData)
|
||||
|
||||
const content = this.crypto.xchacha20Decrypt(
|
||||
contentComponents.ciphertext,
|
||||
contentComponents.nonce,
|
||||
contentKey,
|
||||
authenticatedDataString,
|
||||
)
|
||||
|
||||
if (!content) {
|
||||
return null
|
||||
}
|
||||
|
||||
return {
|
||||
content,
|
||||
components: contentComponents,
|
||||
authenticatedDataString,
|
||||
}
|
||||
return this.decrypt(encrypted, contentComponents, contentKey)
|
||||
}
|
||||
|
||||
private decryptContentKey(
|
||||
@@ -108,32 +82,37 @@ export class GenerateDecryptedParametersUseCase {
|
||||
) {
|
||||
const contentKeyComponents = deconstructEncryptedPayloadString(encrypted.enc_item_key)
|
||||
|
||||
const contentKeyAuthenticatedData = this.stringToAuthenticatedDataUseCase.execute(
|
||||
contentKeyComponents.authenticatedData,
|
||||
{
|
||||
u: encrypted.uuid,
|
||||
v: encrypted.version,
|
||||
ksi: encrypted.key_system_identifier,
|
||||
svu: encrypted.shared_vault_uuid,
|
||||
},
|
||||
)
|
||||
return this.decrypt(encrypted, contentKeyComponents, key.itemsKey)
|
||||
}
|
||||
|
||||
const authenticatedDataString = this.base64DataUsecase.execute(contentKeyAuthenticatedData)
|
||||
private decrypt(encrypted: EncryptedOutputParameters, components: V004Components, key: string) {
|
||||
const rawAuthenticatedData = this.stringToAuthenticatedDataUseCase.executeRaw(components.authenticatedData)
|
||||
|
||||
const contentKey = this.crypto.xchacha20Decrypt(
|
||||
contentKeyComponents.ciphertext,
|
||||
contentKeyComponents.nonce,
|
||||
key.itemsKey,
|
||||
const doesRawContainLegacyUppercaseUuid = /[A-Z]/.test(rawAuthenticatedData.u)
|
||||
|
||||
const authenticatedData = this.stringToAuthenticatedDataUseCase.execute(components.authenticatedData, {
|
||||
u: doesRawContainLegacyUppercaseUuid ? encrypted.uuid.toUpperCase() : encrypted.uuid,
|
||||
v: encrypted.version,
|
||||
ksi: encrypted.key_system_identifier,
|
||||
svu: encrypted.shared_vault_uuid,
|
||||
})
|
||||
|
||||
const authenticatedDataString = this.base64DataUsecase.execute(authenticatedData)
|
||||
|
||||
const decrypted = this.crypto.xchacha20Decrypt(
|
||||
components.ciphertext,
|
||||
components.nonce,
|
||||
key,
|
||||
authenticatedDataString,
|
||||
)
|
||||
|
||||
if (!contentKey) {
|
||||
if (!decrypted) {
|
||||
return null
|
||||
}
|
||||
|
||||
return {
|
||||
contentKey,
|
||||
components: contentKeyComponents,
|
||||
decrypted,
|
||||
components: components,
|
||||
authenticatedDataString,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,4 +16,9 @@ export class StringToAuthenticatedDataUseCase {
|
||||
...override,
|
||||
})
|
||||
}
|
||||
|
||||
executeRaw(rawAuthenticatedData: string): RootKeyEncryptedAuthenticatedData | ItemAuthenticatedData {
|
||||
const base = JSON.parse(this.crypto.base64Decode(rawAuthenticatedData))
|
||||
return base
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.59.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/features
|
||||
|
||||
## [1.59.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/features
|
||||
|
||||
## [1.59.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/features
|
||||
|
||||
## [1.59.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-08-11)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/features
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/features",
|
||||
"version": "1.59.15",
|
||||
"version": "1.59.18",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@standardnotes/common": "^1.50.0",
|
||||
"@standardnotes/domain-core": "^1.25.0",
|
||||
"@standardnotes/domain-core": "^1.28.0",
|
||||
"reflect-metadata": "^0.1.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -41,6 +41,8 @@ export class NativeFeatureIdentifier extends ValueObject<NativeFeatureIdentifier
|
||||
|
||||
Clipper: 'org.standardnotes.clipper',
|
||||
|
||||
SharedVaults: 'org.standardnotes.shared-vaults',
|
||||
|
||||
DeprecatedMarkdownVisualEditor: 'org.standardnotes.markdown-visual-editor',
|
||||
DeprecatedBoldEditor: 'org.standardnotes.bold-editor',
|
||||
DeprecatedMarkdownBasicEditor: 'org.standardnotes.simple-markdown-editor',
|
||||
|
||||
@@ -65,5 +65,11 @@ export function serverFeatures(): ServerFeatureDescription[] {
|
||||
permission_name: PermissionName.ListedCustomDomain,
|
||||
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||
},
|
||||
{
|
||||
name: 'Shared Vaults',
|
||||
identifier: NativeFeatureIdentifier.TYPES.SharedVaults,
|
||||
permission_name: PermissionName.SharedVaults,
|
||||
availableInRoles: [RoleName.NAMES.VaultsUser],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
@@ -38,4 +38,5 @@ export enum PermissionName {
|
||||
SubscriptionSharing = 'server:subscription-sharing',
|
||||
SuperEditor = 'editor:super-editor',
|
||||
Clipper = 'app:clipper',
|
||||
SharedVaults = 'server:shared-vaults',
|
||||
}
|
||||
|
||||
@@ -3,6 +3,26 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.28.89](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/filepicker
|
||||
|
||||
## [1.28.88](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/filepicker
|
||||
|
||||
## [1.28.87](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/filepicker
|
||||
|
||||
## [1.28.86](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/filepicker
|
||||
|
||||
## [1.28.85](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/filepicker
|
||||
|
||||
## [1.28.84](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/filepicker
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/filepicker",
|
||||
"version": "1.28.84",
|
||||
"version": "1.28.89",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
|
||||
@@ -3,6 +3,26 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.17.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/files
|
||||
|
||||
## [1.17.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/files
|
||||
|
||||
## [1.17.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/files
|
||||
|
||||
## [1.17.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/files
|
||||
|
||||
## [1.17.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/files
|
||||
|
||||
## [1.17.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/files
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/files",
|
||||
"version": "1.17.3",
|
||||
"version": "1.17.8",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
|
||||
@@ -3,6 +3,118 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [3.56.139](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.138](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.137](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-16)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.136](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.135](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.134](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.133](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.132](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.131](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.130](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-14)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.129](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-14)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.128](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.127](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.126](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.125](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.124](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.123](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-11)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.122](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-11)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.121](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.120](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.119](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.118](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.117](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.116](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.115](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.114](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.113](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-04)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.112](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.56.111](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/mobile",
|
||||
"version": "3.56.111",
|
||||
"version": "3.56.139",
|
||||
"author": "Standard Notes.",
|
||||
"private": true,
|
||||
"license": "CC BY-NC-SA 4.0",
|
||||
|
||||
@@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.47.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/models
|
||||
|
||||
## [1.47.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/models
|
||||
|
||||
## [1.47.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/models
|
||||
|
||||
## [1.47.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/models
|
||||
|
||||
## [1.47.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/models
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/models",
|
||||
"version": "1.47.10",
|
||||
"version": "1.47.14",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
@@ -20,7 +20,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@standardnotes/common": "^1.50.0",
|
||||
"@standardnotes/domain-core": "^1.25.0",
|
||||
"@standardnotes/domain-core": "^1.28.0",
|
||||
"@standardnotes/features": "workspace:*",
|
||||
"@standardnotes/responses": "workspace:*",
|
||||
"@standardnotes/sncrypto-common": "workspace:^",
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ExclusiveVaultCriteriaValidator } from '../../Display/Validator/Exclusi
|
||||
import { HiddenContentCriteriaValidator } from '../../Display/Validator/HiddenContentCriteriaValidator'
|
||||
import { CustomFilterCriteriaValidator } from '../../Display/Validator/CustomFilterCriteriaValidator'
|
||||
import { AnyDisplayOptions, VaultDisplayOptions } from '../../Display'
|
||||
import { isExclusioanaryOptionsValue } from '../../Display/VaultDisplayOptionsTypes'
|
||||
import { isExclusionaryOptionsValue } from '../../Display/VaultDisplayOptionsTypes'
|
||||
import { ContentType } from '@standardnotes/domain-core'
|
||||
|
||||
type AllNotesUuidSignifier = undefined
|
||||
@@ -83,7 +83,7 @@ export class ItemCounter implements SNIndex {
|
||||
|
||||
if (this.vaultDisplayOptions) {
|
||||
const options = this.vaultDisplayOptions.getOptions()
|
||||
if (isExclusioanaryOptionsValue(options)) {
|
||||
if (isExclusionaryOptionsValue(options)) {
|
||||
filters.push(new ExcludeVaultsCriteriaValidator([...options.exclude, ...options.locked], element))
|
||||
} else {
|
||||
filters.push(new ExclusiveVaultCriteriaValidator(options.exclusive, element))
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ExcludeVaultsCriteriaValidator } from './Validator/ExcludeVaultsCriteri
|
||||
import { ExclusiveVaultCriteriaValidator } from './Validator/ExclusiveVaultCriteriaValidator'
|
||||
import { HiddenContentCriteriaValidator } from './Validator/HiddenContentCriteriaValidator'
|
||||
import { VaultDisplayOptions } from './VaultDisplayOptions'
|
||||
import { isExclusioanaryOptionsValue } from './VaultDisplayOptionsTypes'
|
||||
import { isExclusionaryOptionsValue } from './VaultDisplayOptionsTypes'
|
||||
|
||||
export class ItemDisplayController<I extends DisplayItem, O extends AnyDisplayOptions = GenericDisplayOptions> {
|
||||
private sortMap: UuidToSortedPositionMap = {}
|
||||
@@ -61,7 +61,7 @@ export class ItemDisplayController<I extends DisplayItem, O extends AnyDisplayOp
|
||||
|
||||
if (this.vaultOptions) {
|
||||
const options = this.vaultOptions.getOptions()
|
||||
if (isExclusioanaryOptionsValue(options)) {
|
||||
if (isExclusionaryOptionsValue(options)) {
|
||||
filters.push(new ExcludeVaultsCriteriaValidator([...options.exclude, ...options.locked], element))
|
||||
} else {
|
||||
filters.push(new ExclusiveVaultCriteriaValidator(options.exclusive, element))
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { VaultListingInterface } from '../../Syncable/VaultListing/VaultListingInterface'
|
||||
import { uniqueArray } from '@standardnotes/utils'
|
||||
import {
|
||||
ExclusioanaryOptions,
|
||||
ExclusionaryOptions,
|
||||
ExclusiveOptions,
|
||||
VaultDisplayOptionsPersistable,
|
||||
isExclusioanaryOptionsValue,
|
||||
isExclusionaryOptionsValue,
|
||||
} from './VaultDisplayOptionsTypes'
|
||||
import { KeySystemIdentifier } from '../../Syncable/KeySystemRootKey/KeySystemIdentifier'
|
||||
|
||||
@@ -13,14 +13,14 @@ function KeySystemIdentifiers(vaults: VaultListingInterface[]): KeySystemIdentif
|
||||
}
|
||||
|
||||
export class VaultDisplayOptions {
|
||||
constructor(private readonly options: ExclusioanaryOptions | ExclusiveOptions) {}
|
||||
constructor(private readonly options: ExclusionaryOptions | ExclusiveOptions) {}
|
||||
|
||||
public getOptions(): ExclusioanaryOptions | ExclusiveOptions {
|
||||
public getOptions(): ExclusionaryOptions | ExclusiveOptions {
|
||||
return this.options
|
||||
}
|
||||
|
||||
public getExclusivelyShownVault(): KeySystemIdentifier {
|
||||
if (isExclusioanaryOptionsValue(this.options)) {
|
||||
if (isExclusionaryOptionsValue(this.options)) {
|
||||
throw new Error('Not in exclusive display mode')
|
||||
}
|
||||
|
||||
@@ -28,11 +28,11 @@ export class VaultDisplayOptions {
|
||||
}
|
||||
|
||||
public isInExclusiveDisplayMode(): boolean {
|
||||
return !isExclusioanaryOptionsValue(this.options)
|
||||
return !isExclusionaryOptionsValue(this.options)
|
||||
}
|
||||
|
||||
public isVaultExplicitelyExcluded(vault: VaultListingInterface): boolean {
|
||||
if (isExclusioanaryOptionsValue(this.options)) {
|
||||
public isVaultExplicitlyExcluded(vault: VaultListingInterface): boolean {
|
||||
if (isExclusionaryOptionsValue(this.options)) {
|
||||
return this.options.exclude.some((excludedVault) => excludedVault === vault.systemIdentifier)
|
||||
} else if (this.options.exclusive) {
|
||||
return this.options.exclusive !== vault.systemIdentifier
|
||||
@@ -42,18 +42,18 @@ export class VaultDisplayOptions {
|
||||
}
|
||||
|
||||
isVaultExclusivelyShown(vault: VaultListingInterface): boolean {
|
||||
return !isExclusioanaryOptionsValue(this.options) && this.options.exclusive === vault.systemIdentifier
|
||||
return !isExclusionaryOptionsValue(this.options) && this.options.exclusive === vault.systemIdentifier
|
||||
}
|
||||
|
||||
isVaultDisabledOrLocked(vault: VaultListingInterface): boolean {
|
||||
if (isExclusioanaryOptionsValue(this.options)) {
|
||||
if (isExclusionaryOptionsValue(this.options)) {
|
||||
const matchingLocked = this.options.locked.find((lockedVault) => lockedVault === vault.systemIdentifier)
|
||||
if (matchingLocked) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return this.isVaultExplicitelyExcluded(vault)
|
||||
return this.isVaultExplicitlyExcluded(vault)
|
||||
}
|
||||
|
||||
getPersistableValue(): VaultDisplayOptionsPersistable {
|
||||
@@ -61,7 +61,7 @@ export class VaultDisplayOptions {
|
||||
}
|
||||
|
||||
newOptionsByIntakingLockedVaults(lockedVaults: VaultListingInterface[]): VaultDisplayOptions {
|
||||
if (isExclusioanaryOptionsValue(this.options)) {
|
||||
if (isExclusionaryOptionsValue(this.options)) {
|
||||
return new VaultDisplayOptions({ exclude: this.options.exclude, locked: KeySystemIdentifiers(lockedVaults) })
|
||||
} else {
|
||||
return new VaultDisplayOptions({ exclusive: this.options.exclusive })
|
||||
@@ -76,7 +76,7 @@ export class VaultDisplayOptions {
|
||||
vaults: VaultListingInterface[],
|
||||
lockedVaults: VaultListingInterface[],
|
||||
): VaultDisplayOptions {
|
||||
if (isExclusioanaryOptionsValue(this.options)) {
|
||||
if (isExclusionaryOptionsValue(this.options)) {
|
||||
return new VaultDisplayOptions({
|
||||
exclude: uniqueArray([...this.options.exclude, ...KeySystemIdentifiers(vaults)]),
|
||||
locked: KeySystemIdentifiers(lockedVaults),
|
||||
@@ -93,7 +93,7 @@ export class VaultDisplayOptions {
|
||||
vault: VaultListingInterface,
|
||||
lockedVaults: VaultListingInterface[],
|
||||
): VaultDisplayOptions {
|
||||
if (isExclusioanaryOptionsValue(this.options)) {
|
||||
if (isExclusionaryOptionsValue(this.options)) {
|
||||
return new VaultDisplayOptions({
|
||||
exclude: this.options.exclude.filter((excludedVault) => excludedVault !== vault.systemIdentifier),
|
||||
locked: KeySystemIdentifiers(lockedVaults),
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { KeySystemIdentifier } from '../../Syncable/KeySystemRootKey/KeySystemIdentifier'
|
||||
|
||||
export type ExclusioanaryOptions = { exclude: KeySystemIdentifier[]; locked: KeySystemIdentifier[] }
|
||||
export type ExclusionaryOptions = { exclude: KeySystemIdentifier[]; locked: KeySystemIdentifier[] }
|
||||
export type ExclusiveOptions = { exclusive: KeySystemIdentifier }
|
||||
|
||||
export function isExclusioanaryOptionsValue(
|
||||
options: ExclusioanaryOptions | ExclusiveOptions,
|
||||
): options is ExclusioanaryOptions {
|
||||
export function isExclusionaryOptionsValue(
|
||||
options: ExclusionaryOptions | ExclusiveOptions,
|
||||
): options is ExclusionaryOptions {
|
||||
return 'exclude' in options || 'locked' in options
|
||||
}
|
||||
|
||||
export type VaultDisplayOptionsPersistable = ExclusioanaryOptions | ExclusiveOptions
|
||||
export type VaultDisplayOptionsPersistable = ExclusionaryOptions | ExclusiveOptions
|
||||
|
||||
@@ -3,6 +3,118 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.4.512](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.511](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.510](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-16)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.509](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.508](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.507](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.506](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.505](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.504](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.503](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-14)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.502](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-14)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.501](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.500](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.499](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.498](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.497](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.496](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-11)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.495](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-11)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.494](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.493](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.492](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.491](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.490](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.489](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.488](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.487](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.486](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-04)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.485](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.484](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/releases",
|
||||
"version": "1.4.484",
|
||||
"version": "1.4.512",
|
||||
"license": "CC BY-NC-SA 4.0",
|
||||
"main": "dist/releases.json",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.13.42](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/responses
|
||||
|
||||
## [1.13.41](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/responses
|
||||
|
||||
## [1.13.40](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/responses
|
||||
|
||||
## [1.13.39](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/responses
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/responses",
|
||||
"version": "1.13.39",
|
||||
"version": "1.13.42",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
|
||||
@@ -3,6 +3,54 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.64.20](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.64.19](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.64.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.64.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.64.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.64.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.64.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.64.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.64.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.64.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.64.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.64.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-04)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.64.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/services",
|
||||
"version": "1.64.8",
|
||||
"version": "1.64.20",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
@@ -18,7 +18,7 @@
|
||||
"dependencies": {
|
||||
"@standardnotes/api": "workspace:^",
|
||||
"@standardnotes/common": "^1.50.0",
|
||||
"@standardnotes/domain-core": "^1.25.0",
|
||||
"@standardnotes/domain-core": "^1.28.0",
|
||||
"@standardnotes/encryption": "workspace:^",
|
||||
"@standardnotes/features": "workspace:^",
|
||||
"@standardnotes/files": "workspace:^",
|
||||
|
||||
@@ -60,19 +60,19 @@ export class WebSocketsService extends AbstractService<WebSocketsServiceEvent, D
|
||||
}
|
||||
|
||||
private onWebSocketMessage(messageEvent: MessageEvent) {
|
||||
const eventData: DomainEventInterface = JSON.parse(messageEvent.data)
|
||||
const eventData = JSON.parse(messageEvent.data)
|
||||
switch (eventData.type) {
|
||||
case 'USER_ROLES_CHANGED':
|
||||
void this.notifyEvent(WebSocketsServiceEvent.UserRoleMessageReceived, eventData)
|
||||
break
|
||||
case 'NOTIFICATION_ADDED_FOR_USER':
|
||||
void this.notifyEvent(WebSocketsServiceEvent.NotificationAddedForUser, eventData)
|
||||
void this.notifyEvent(WebSocketsServiceEvent.NotificationAddedForUser, eventData.payload)
|
||||
break
|
||||
case 'MESSAGE_SENT_TO_USER':
|
||||
void this.notifyEvent(WebSocketsServiceEvent.MessageSentToUser, eventData)
|
||||
void this.notifyEvent(WebSocketsServiceEvent.MessageSentToUser, eventData.payload)
|
||||
break
|
||||
case 'USER_INVITED_TO_SHARED_VAULT':
|
||||
void this.notifyEvent(WebSocketsServiceEvent.UserInvitedToSharedVault, eventData)
|
||||
void this.notifyEvent(WebSocketsServiceEvent.UserInvitedToSharedVault, eventData.payload)
|
||||
break
|
||||
default:
|
||||
break
|
||||
|
||||
@@ -13,8 +13,6 @@ import {
|
||||
MfaServiceInterface,
|
||||
GenerateUuid,
|
||||
CreateDecryptedBackupFile,
|
||||
GetTransitionStatus,
|
||||
StartTransition,
|
||||
} from '@standardnotes/services'
|
||||
import { VaultLockServiceInterface } from './../VaultLock/VaultLockServiceInterface'
|
||||
import { HistoryServiceInterface } from './../History/HistoryServiceInterface'
|
||||
@@ -78,8 +76,6 @@ export interface ApplicationInterface {
|
||||
get generateUuid(): GenerateUuid
|
||||
get getHost(): GetHost
|
||||
get setHost(): SetHost
|
||||
get getTransitionStatus(): GetTransitionStatus
|
||||
get startTransition(): StartTransition
|
||||
|
||||
// Services
|
||||
get alerts(): AlertService
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
export enum InternalFeature {
|
||||
Vaults = 'vaults',
|
||||
HomeServer = 'home-server',
|
||||
Transition = 'transition',
|
||||
}
|
||||
|
||||
@@ -87,7 +87,6 @@ export interface ItemManagerInterface extends AbstractService {
|
||||
removeItemsFromMemory(items: AnyItemInterface[]): void
|
||||
getDirtyItems(): (DecryptedItemInterface | DeletedItemInterface)[]
|
||||
getTagLongTitle(tag: SNTag): string
|
||||
getSortedTagsForItem(item: DecryptedItemInterface<ItemContent>): SNTag[]
|
||||
itemsReferencingItem<I extends DecryptedItemInterface = DecryptedItemInterface>(
|
||||
itemToLookupUuidFor: { uuid: string },
|
||||
contentType?: string,
|
||||
@@ -118,6 +117,7 @@ export interface ItemManagerInterface extends AbstractService {
|
||||
getDisplayableTags(): SNTag[]
|
||||
getTagChildren(itemToLookupUuidFor: SNTag): SNTag[]
|
||||
getTagParent(itemToLookupUuidFor: SNTag): SNTag | undefined
|
||||
getDisplayableTagParent(itemToLookupUuidFor: SNTag): SNTag | undefined
|
||||
isValidTagParent(parentTagToLookUpUuidFor: SNTag, childToLookUpUuidFor: SNTag): boolean
|
||||
isSmartViewTitle(title: string): boolean
|
||||
getDisplayableComponents(): ComponentInterface[]
|
||||
@@ -130,6 +130,9 @@ export interface ItemManagerInterface extends AbstractService {
|
||||
getDisplayableNotesAndFiles(): (SNNote | FileItem)[]
|
||||
setPrimaryItemDisplayOptions(options: NotesAndFilesDisplayControllerOptions): void
|
||||
getTagPrefixTitle(tag: SNTag): string | undefined
|
||||
getNoteLinkedFiles(note: SNNote): FileItem[]
|
||||
getItemLinkedFiles(item: DecryptedItemInterface): FileItem[]
|
||||
getItemLinkedNotes(item: DecryptedItemInterface): SNNote[]
|
||||
getSortedTagsForItem(item: DecryptedItemInterface<ItemContent>): SNTag[]
|
||||
getUnsortedTagsForItem(item: DecryptedItemInterface<ItemContent>): SNTag[]
|
||||
conflictsOf(uuid: string): AnyItemInterface[]
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import {
|
||||
SharedVaultListingInterface,
|
||||
VaultListingInterface,
|
||||
KeySystemRootKeyStorageMode,
|
||||
EmojiString,
|
||||
IconType,
|
||||
} from '@standardnotes/models'
|
||||
import { AbstractService } from '../Service/AbstractService'
|
||||
import { SharedVaultServiceEvent, SharedVaultServiceEventPayload } from './SharedVaultServiceEvent'
|
||||
@@ -14,6 +16,7 @@ export interface SharedVaultServiceInterface
|
||||
createSharedVault(dto: {
|
||||
name: string
|
||||
description?: string
|
||||
iconString: IconType | EmojiString
|
||||
userInputtedPassword: string | undefined
|
||||
storagePreference?: KeySystemRootKeyStorageMode
|
||||
}): Promise<VaultListingInterface | ClientDisplayableError>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Result, SyncUseCaseInterface } from '@standardnotes/domain-core'
|
||||
import { GetHost } from './GetHost'
|
||||
|
||||
export class IsApplicationUsingThirdPartyHost implements SyncUseCaseInterface<boolean> {
|
||||
private readonly APPLICATION_DEFAULT_HOSTS = ['api.standardnotes.com', 'sync.standardnotes.org']
|
||||
private readonly APPLICATION_DEFAULT_HOSTS = ['api.standardnotes.com', 'sync.standardnotes.org', 'localhost:3123']
|
||||
|
||||
private readonly FILES_DEFAULT_HOSTS = ['files.standardnotes.com']
|
||||
|
||||
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
import { HttpServiceInterface } from '@standardnotes/api'
|
||||
|
||||
import { GetTransitionStatus } from './GetTransitionStatus'
|
||||
|
||||
describe('GetTransitionStatus', () => {
|
||||
let httpService: HttpServiceInterface
|
||||
|
||||
const createUseCase = () => new GetTransitionStatus(httpService)
|
||||
|
||||
beforeEach(() => {
|
||||
httpService = {
|
||||
get: jest.fn(),
|
||||
} as unknown as HttpServiceInterface
|
||||
})
|
||||
|
||||
it('should get transition status', async () => {
|
||||
const useCase = createUseCase()
|
||||
;(httpService.get as jest.Mock).mockResolvedValueOnce({ status: 200, data: { status: 'TO-DO' } })
|
||||
|
||||
const result = await useCase.execute()
|
||||
|
||||
expect(result.isFailed()).toBe(false)
|
||||
expect(result.getValue()).toBe('TO-DO')
|
||||
})
|
||||
|
||||
it('should fail to get transition status', async () => {
|
||||
const useCase = createUseCase()
|
||||
;(httpService.get as jest.Mock).mockResolvedValueOnce({ status: 400 })
|
||||
|
||||
const result = await useCase.execute()
|
||||
|
||||
expect(result.isFailed()).toBe(true)
|
||||
})
|
||||
})
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
import { Result, UseCaseInterface } from '@standardnotes/domain-core'
|
||||
import { HttpServiceInterface } from '@standardnotes/api'
|
||||
import { HttpStatusCode } from '@standardnotes/responses'
|
||||
|
||||
export class GetTransitionStatus implements UseCaseInterface<'TO-DO' | 'STARTED' | 'FINISHED' | 'FAILED'> {
|
||||
constructor(private httpService: HttpServiceInterface) {}
|
||||
|
||||
async execute(): Promise<Result<'TO-DO' | 'STARTED' | 'FINISHED' | 'FAILED'>> {
|
||||
const response = await this.httpService.get('/v1/users/transition-status')
|
||||
|
||||
if (response.status !== HttpStatusCode.Success) {
|
||||
return Result.fail('Failed to get transition status')
|
||||
}
|
||||
|
||||
return Result.ok((response.data as { status: 'TO-DO' | 'STARTED' | 'FINISHED' | 'FAILED' }).status)
|
||||
}
|
||||
}
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
import { HttpServiceInterface } from '@standardnotes/api'
|
||||
|
||||
import { StartTransition } from './StartTransition'
|
||||
|
||||
describe('StartTransition', () => {
|
||||
let httpService: HttpServiceInterface
|
||||
|
||||
const createUseCase = () => new StartTransition(httpService)
|
||||
|
||||
beforeEach(() => {
|
||||
httpService = {
|
||||
post: jest.fn(),
|
||||
} as unknown as HttpServiceInterface
|
||||
})
|
||||
|
||||
it('should start transition', async () => {
|
||||
const useCase = createUseCase()
|
||||
;(httpService.post as jest.Mock).mockResolvedValueOnce({ status: 200 })
|
||||
|
||||
const result = await useCase.execute()
|
||||
|
||||
expect(result.isFailed()).toBe(false)
|
||||
})
|
||||
|
||||
it('should fail to start transition', async () => {
|
||||
const useCase = createUseCase()
|
||||
;(httpService.post as jest.Mock).mockResolvedValueOnce({ status: 400 })
|
||||
|
||||
const result = await useCase.execute()
|
||||
|
||||
expect(result.isFailed()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -1,17 +0,0 @@
|
||||
import { HttpServiceInterface } from '@standardnotes/api'
|
||||
import { Result, UseCaseInterface } from '@standardnotes/domain-core'
|
||||
import { HttpStatusCode } from '@standardnotes/responses'
|
||||
|
||||
export class StartTransition implements UseCaseInterface<void> {
|
||||
constructor(private httpService: HttpServiceInterface) {}
|
||||
|
||||
async execute(): Promise<Result<void>> {
|
||||
const response = await this.httpService.post('/v1/items/transition')
|
||||
|
||||
if (response.status !== HttpStatusCode.Success) {
|
||||
return Result.fail('Failed to start transition')
|
||||
}
|
||||
|
||||
return Result.ok()
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,15 @@ export class AuthorizeVaultDeletion implements UseCaseInterface<boolean> {
|
||||
|
||||
const password = value.value as string
|
||||
|
||||
if (this.vaultLocks.isVaultLocked(vault)) {
|
||||
const unlocked = await this.vaultLocks.unlockNonPersistentVault(vault, password)
|
||||
if (unlocked) {
|
||||
this.challenges.completeChallenge(challenge)
|
||||
resolve(Result.ok(true))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
const validPassword = this._validateVaultPassword.execute(vault, password).getValue()
|
||||
if (!validPassword) {
|
||||
this.challenges.setValidationStatusForChallenge(challenge, value, false)
|
||||
|
||||
@@ -5,13 +5,13 @@ import { isClientDisplayableError } from '@standardnotes/responses'
|
||||
import {
|
||||
DecryptedItemInterface,
|
||||
EmojiString,
|
||||
FileItem,
|
||||
IconType,
|
||||
KeySystemIdentifier,
|
||||
KeySystemRootKeyStorageMode,
|
||||
SharedVaultListingInterface,
|
||||
VaultListingInterface,
|
||||
VaultListingMutator,
|
||||
isFile,
|
||||
isNote,
|
||||
} from '@standardnotes/models'
|
||||
import { VaultServiceInterface } from './VaultServiceInterface'
|
||||
@@ -151,22 +151,27 @@ export class VaultService
|
||||
throw new Error('Attempting to add item to locked vault')
|
||||
}
|
||||
|
||||
let linkedFiles: FileItem[] = []
|
||||
if (isNote(item)) {
|
||||
linkedFiles = this.items.getNoteLinkedFiles(item)
|
||||
if (isNote(item) || isFile(item)) {
|
||||
const linkedFiles = this.items.getItemLinkedFiles(item)
|
||||
const linkedNotes = this.items.getItemLinkedNotes(item)
|
||||
const linkedTags = this.items.getUnsortedTagsForItem(item)
|
||||
|
||||
if (linkedFiles.length > 0) {
|
||||
const confirmed = await this.alerts.confirmV2({
|
||||
title: 'Linked files will be moved to vault',
|
||||
text: `This note has ${linkedFiles.length} linked files. They will also be moved to the vault. Do you want to continue?`,
|
||||
})
|
||||
if (!confirmed) {
|
||||
return undefined
|
||||
}
|
||||
const areAnyLinkedItemsInOtherVaults = [...linkedFiles, ...linkedNotes, ...linkedTags].some((linkedItem) => {
|
||||
return linkedItem.key_system_identifier !== vault.systemIdentifier
|
||||
})
|
||||
|
||||
if (areAnyLinkedItemsInOtherVaults) {
|
||||
this.alerts
|
||||
.alertV2({
|
||||
title: 'Cannot move item to vault',
|
||||
text: 'This item is linked to other items that are not in the same vault. Please move those items to this vault first.',
|
||||
})
|
||||
.catch(console.error)
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
await this._moveItemsToVault.execute({ vault, items: [item, ...linkedFiles] })
|
||||
await this._moveItemsToVault.execute({ vault, items: [item] })
|
||||
|
||||
return this.items.findSureItem(item.uuid)
|
||||
}
|
||||
@@ -243,7 +248,12 @@ export class VaultService
|
||||
}
|
||||
|
||||
getItemVault(item: DecryptedItemInterface): VaultListingInterface | undefined {
|
||||
if (this.items.isTemplateItem(item)) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
const latestItem = this.items.findItem(item.uuid)
|
||||
|
||||
if (!latestItem) {
|
||||
throw new Error('Cannot find latest version of item to get vault for')
|
||||
}
|
||||
|
||||
@@ -119,6 +119,9 @@ export class VaultInviteService
|
||||
await this.processInboundInvites(event.payload as SyncEventReceivedSharedVaultInvitesData)
|
||||
break
|
||||
case ApplicationEvent.Launched:
|
||||
if (!this.session.isSignedIn()) {
|
||||
return
|
||||
}
|
||||
void this.downloadInboundInvites()
|
||||
break
|
||||
case WebSocketsServiceEvent.UserInvitedToSharedVault:
|
||||
@@ -188,7 +191,7 @@ export class VaultInviteService
|
||||
public async getInvitableContactsForSharedVault(
|
||||
sharedVault: SharedVaultListingInterface,
|
||||
): Promise<TrustedContactInterface[]> {
|
||||
const users = await this.vaultUsers.getSharedVaultUsers(sharedVault)
|
||||
const users = await this.vaultUsers.getSharedVaultUsersFromServer(sharedVault)
|
||||
if (!users) {
|
||||
return []
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import { UserServiceInterface } from '../../User/UserServiceInterface'
|
||||
import { Result, SharedVaultUserPermission, SyncUseCaseInterface } from '@standardnotes/domain-core'
|
||||
import { SharedVaultListingInterface } from '@standardnotes/models'
|
||||
import { VaultUserCache } from '../VaultUserCache'
|
||||
|
||||
export class IsReadonlyVaultMember implements SyncUseCaseInterface<boolean> {
|
||||
constructor(
|
||||
private users: UserServiceInterface,
|
||||
private cache: VaultUserCache,
|
||||
) {}
|
||||
|
||||
execute(vault: SharedVaultListingInterface): Result<boolean> {
|
||||
if (!vault.sharing) {
|
||||
return Result.ok(true)
|
||||
}
|
||||
|
||||
if (!vault.sharing.ownerUserUuid) {
|
||||
throw new Error(`Shared vault ${vault.sharing.sharedVaultUuid} does not have an owner user uuid`)
|
||||
}
|
||||
|
||||
const user = this.users.sureUser
|
||||
const vaultUsers = this.cache.get(vault.sharing.sharedVaultUuid)
|
||||
const userPermission = vaultUsers?.find((vaultUser) => vaultUser.user_uuid === user.uuid)?.permission
|
||||
|
||||
return Result.ok(userPermission === SharedVaultUserPermission.PERMISSIONS.Read)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import { UserServiceInterface } from '../../User/UserServiceInterface'
|
||||
import { Result, SharedVaultUserPermission, SyncUseCaseInterface } from '@standardnotes/domain-core'
|
||||
import { SharedVaultListingInterface } from '@standardnotes/models'
|
||||
import { VaultUserCache } from '../VaultUserCache'
|
||||
|
||||
export class IsVaultAdmin implements SyncUseCaseInterface<boolean> {
|
||||
constructor(
|
||||
private users: UserServiceInterface,
|
||||
private cache: VaultUserCache,
|
||||
) {}
|
||||
|
||||
execute(vault: SharedVaultListingInterface): Result<boolean> {
|
||||
if (!vault.sharing) {
|
||||
return Result.ok(true)
|
||||
}
|
||||
|
||||
if (!vault.sharing.ownerUserUuid) {
|
||||
throw new Error(`Shared vault ${vault.sharing.sharedVaultUuid} does not have an owner user uuid`)
|
||||
}
|
||||
|
||||
const user = this.users.sureUser
|
||||
const vaultUsers = this.cache.get(vault.sharing.sharedVaultUuid)
|
||||
const userPermission = vaultUsers?.find((vaultUser) => vaultUser.user_uuid === user.uuid)?.permission
|
||||
|
||||
return Result.ok(
|
||||
userPermission === SharedVaultUserPermission.PERMISSIONS.Admin || vault.sharing.ownerUserUuid === user.uuid,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -5,21 +5,31 @@ import { InternalEventBusInterface } from './../Internal/InternalEventBusInterfa
|
||||
import { RemoveVaultMember } from './UseCase/RemoveSharedVaultMember'
|
||||
import { VaultServiceInterface } from '../Vault/VaultServiceInterface'
|
||||
import { GetVaultUsers } from './UseCase/GetVaultUsers'
|
||||
import { SharedVaultListingInterface } from '@standardnotes/models'
|
||||
import { SharedVaultListingInterface, VaultListingInterface } from '@standardnotes/models'
|
||||
import { VaultUserServiceInterface } from './VaultUserServiceInterface'
|
||||
import { ClientDisplayableError, SharedVaultUserServerHash, isClientDisplayableError } from '@standardnotes/responses'
|
||||
import { AbstractService } from './../Service/AbstractService'
|
||||
import { VaultUserServiceEvent } from './VaultUserServiceEvent'
|
||||
import { Result } from '@standardnotes/domain-core'
|
||||
import { IsVaultOwner } from './UseCase/IsVaultOwner'
|
||||
import { InternalEventInterface } from '../Internal/InternalEventInterface'
|
||||
import { InternalEventHandlerInterface } from '../Internal/InternalEventHandlerInterface'
|
||||
import { ApplicationEvent } from '../Event/ApplicationEvent'
|
||||
import { IsReadonlyVaultMember } from './UseCase/IsReadonlyVaultMember'
|
||||
import { IsVaultAdmin } from './UseCase/IsVaultAdmin'
|
||||
|
||||
export class VaultUserService extends AbstractService<VaultUserServiceEvent> implements VaultUserServiceInterface {
|
||||
export class VaultUserService
|
||||
extends AbstractService<VaultUserServiceEvent>
|
||||
implements VaultUserServiceInterface, InternalEventHandlerInterface
|
||||
{
|
||||
constructor(
|
||||
private vaults: VaultServiceInterface,
|
||||
private vaultLocks: VaultLockServiceInterface,
|
||||
private _getVaultUsers: GetVaultUsers,
|
||||
private _removeVaultMember: RemoveVaultMember,
|
||||
private _isVaultOwner: IsVaultOwner,
|
||||
private _isVaultAdmin: IsVaultAdmin,
|
||||
private _isReadonlyVaultMember: IsReadonlyVaultMember,
|
||||
private _getVault: GetVault,
|
||||
private _leaveVault: LeaveVault,
|
||||
eventBus: InternalEventBusInterface,
|
||||
@@ -37,7 +47,23 @@ export class VaultUserService extends AbstractService<VaultUserServiceEvent> imp
|
||||
;(this._leaveVault as unknown) = undefined
|
||||
}
|
||||
|
||||
public async getSharedVaultUsers(
|
||||
async handleEvent(event: InternalEventInterface): Promise<void> {
|
||||
if (event.type === ApplicationEvent.CompletedFullSync) {
|
||||
this.vaults.getVaults().forEach((vault) => {
|
||||
if (!vault.isSharedVaultListing()) {
|
||||
return
|
||||
}
|
||||
this._getVaultUsers
|
||||
.execute({
|
||||
sharedVaultUuid: vault.sharing.sharedVaultUuid,
|
||||
readFromCache: false,
|
||||
})
|
||||
.catch(console.error)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
public async getSharedVaultUsersFromServer(
|
||||
sharedVault: SharedVaultListingInterface,
|
||||
): Promise<SharedVaultUserServerHash[] | undefined> {
|
||||
const result = await this._getVaultUsers.execute({
|
||||
@@ -51,12 +77,23 @@ export class VaultUserService extends AbstractService<VaultUserServiceEvent> imp
|
||||
return result.getValue()
|
||||
}
|
||||
|
||||
public isCurrentUserSharedVaultAdmin(sharedVault: SharedVaultListingInterface): boolean {
|
||||
public isCurrentUserSharedVaultOwner(sharedVault: SharedVaultListingInterface): boolean {
|
||||
return this._isVaultOwner.execute(sharedVault).getValue()
|
||||
}
|
||||
|
||||
public isCurrentUserSharedVaultAdmin(sharedVault: SharedVaultListingInterface): boolean {
|
||||
return this._isVaultAdmin.execute(sharedVault).getValue()
|
||||
}
|
||||
|
||||
public isCurrentUserReadonlyVaultMember(vault: VaultListingInterface): boolean {
|
||||
if (!vault.isSharedVaultListing()) {
|
||||
return false
|
||||
}
|
||||
return this._isReadonlyVaultMember.execute(vault).getValue()
|
||||
}
|
||||
|
||||
async removeUserFromSharedVault(sharedVault: SharedVaultListingInterface, userUuid: string): Promise<Result<void>> {
|
||||
if (!this.isCurrentUserSharedVaultAdmin(sharedVault)) {
|
||||
if (!this.isCurrentUserSharedVaultOwner(sharedVault)) {
|
||||
throw new Error('Only vault admins can remove users')
|
||||
}
|
||||
|
||||
@@ -101,4 +138,17 @@ export class VaultUserService extends AbstractService<VaultUserServiceEvent> imp
|
||||
|
||||
void this.notifyEvent(VaultUserServiceEvent.UsersChanged)
|
||||
}
|
||||
|
||||
getFormattedMemberPermission(permission: string): string {
|
||||
switch (permission) {
|
||||
case 'admin':
|
||||
return 'Admin'
|
||||
case 'write':
|
||||
return 'Read / Write'
|
||||
case 'read':
|
||||
return 'Read-only'
|
||||
default:
|
||||
return 'Unknown'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
import { ApplicationServiceInterface } from './../Service/ApplicationServiceInterface'
|
||||
import { SharedVaultListingInterface } from '@standardnotes/models'
|
||||
import { SharedVaultListingInterface, VaultListingInterface } from '@standardnotes/models'
|
||||
import { ClientDisplayableError, SharedVaultUserServerHash } from '@standardnotes/responses'
|
||||
import { VaultUserServiceEvent } from './VaultUserServiceEvent'
|
||||
import { Result } from '@standardnotes/domain-core'
|
||||
|
||||
export interface VaultUserServiceInterface extends ApplicationServiceInterface<VaultUserServiceEvent, unknown> {
|
||||
getSharedVaultUsers(sharedVault: SharedVaultListingInterface): Promise<SharedVaultUserServerHash[] | undefined>
|
||||
getSharedVaultUsersFromServer(
|
||||
sharedVault: SharedVaultListingInterface,
|
||||
): Promise<SharedVaultUserServerHash[] | undefined>
|
||||
isCurrentUserSharedVaultOwner(sharedVault: SharedVaultListingInterface): boolean
|
||||
isCurrentUserSharedVaultAdmin(sharedVault: SharedVaultListingInterface): boolean
|
||||
isCurrentUserReadonlyVaultMember(vault: VaultListingInterface): boolean
|
||||
removeUserFromSharedVault(sharedVault: SharedVaultListingInterface, userUuid: string): Promise<Result<void>>
|
||||
leaveSharedVault(sharedVault: SharedVaultListingInterface): Promise<ClientDisplayableError | void>
|
||||
isVaultUserOwner(user: SharedVaultUserServerHash): boolean
|
||||
getFormattedMemberPermission(permission: string): string
|
||||
}
|
||||
|
||||
@@ -187,8 +187,6 @@ export * from './Sync/SyncOptions'
|
||||
export * from './Sync/SyncQueueStrategy'
|
||||
export * from './Sync/SyncServiceInterface'
|
||||
export * from './Sync/SyncSource'
|
||||
export * from './UseCase/Transition/GetTransitionStatus/GetTransitionStatus'
|
||||
export * from './UseCase/Transition/StartTransition/StartTransition'
|
||||
export * from './UseCase/ChangeAndSaveItem'
|
||||
export * from './UseCase/DiscardItemsLocally'
|
||||
export * from './UseCase/GenerateUuid'
|
||||
|
||||
@@ -3,6 +3,58 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.202.76](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.202.75](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.202.74](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.202.73](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-15)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.202.72](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-13)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.202.71](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.202.70](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-12)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.202.69](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-08)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.202.68](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.202.67](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-07)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.202.66](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-06)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.202.65](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-05)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.202.64](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-04)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.202.63](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-09-01)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
@@ -80,8 +80,6 @@ import {
|
||||
GenerateUuid,
|
||||
CreateDecryptedBackupFile,
|
||||
CreateEncryptedBackupFile,
|
||||
GetTransitionStatus,
|
||||
StartTransition,
|
||||
WebSocketsService,
|
||||
} from '@standardnotes/services'
|
||||
import {
|
||||
@@ -1140,14 +1138,6 @@ export class SNApplication implements ApplicationInterface, AppGroupManagedAppli
|
||||
return this.dependencies.get<SetHost>(TYPES.SetHost)
|
||||
}
|
||||
|
||||
get getTransitionStatus(): GetTransitionStatus {
|
||||
return this.dependencies.get<GetTransitionStatus>(TYPES.GetTransitionStatus)
|
||||
}
|
||||
|
||||
get startTransition(): StartTransition {
|
||||
return this.dependencies.get<StartTransition>(TYPES.StartTransition)
|
||||
}
|
||||
|
||||
public get legacyApi(): LegacyApiService {
|
||||
return this.dependencies.get<LegacyApiService>(TYPES.LegacyApiService)
|
||||
}
|
||||
|
||||
@@ -140,8 +140,6 @@ import {
|
||||
CreateDecryptedBackupFile,
|
||||
CreateEncryptedBackupFile,
|
||||
SyncLocalVaultsWithRemoteSharedVaults,
|
||||
GetTransitionStatus,
|
||||
StartTransition,
|
||||
WebSocketsService,
|
||||
} from '@standardnotes/services'
|
||||
import { ItemManager } from '../../Services/Items/ItemManager'
|
||||
@@ -155,7 +153,6 @@ import {
|
||||
AuthenticatorApiService,
|
||||
AuthenticatorServer,
|
||||
HttpService,
|
||||
HttpServiceInterface,
|
||||
RevisionApiService,
|
||||
RevisionServer,
|
||||
SharedVaultInvitesServer,
|
||||
@@ -175,6 +172,8 @@ import { EncryptionOperators } from '@standardnotes/encryption'
|
||||
import { AsymmetricMessagePayload, AsymmetricMessageSharedVaultInvite } from '@standardnotes/models'
|
||||
import { PureCryptoInterface } from '@standardnotes/sncrypto-common'
|
||||
import { AuthorizeVaultDeletion } from '@standardnotes/services/src/Domain/Vault/UseCase/AuthorizeVaultDeletion'
|
||||
import { IsVaultAdmin } from '@standardnotes/services/src/Domain/VaultUser/UseCase/IsVaultAdmin'
|
||||
import { IsReadonlyVaultMember } from '@standardnotes/services/src/Domain/VaultUser/UseCase/IsReadonlyVaultMember'
|
||||
|
||||
export class Dependencies {
|
||||
private factory = new Map<symbol, () => unknown>()
|
||||
@@ -338,6 +337,17 @@ export class Dependencies {
|
||||
return new IsVaultOwner(this.get<UserService>(TYPES.UserService))
|
||||
})
|
||||
|
||||
this.factory.set(TYPES.IsVaultAdmin, () => {
|
||||
return new IsVaultAdmin(this.get<UserService>(TYPES.UserService), this.get<VaultUserCache>(TYPES.VaultUserCache))
|
||||
})
|
||||
|
||||
this.factory.set(TYPES.IsReadonlyVaultMember, () => {
|
||||
return new IsReadonlyVaultMember(
|
||||
this.get<UserService>(TYPES.UserService),
|
||||
this.get<VaultUserCache>(TYPES.VaultUserCache),
|
||||
)
|
||||
})
|
||||
|
||||
this.factory.set(TYPES.DecryptBackupFile, () => {
|
||||
return new DecryptBackupFile(
|
||||
this.get<EncryptionService>(TYPES.EncryptionService),
|
||||
@@ -847,6 +857,8 @@ export class Dependencies {
|
||||
this.get<GetVaultUsers>(TYPES.GetVaultUsers),
|
||||
this.get<RemoveVaultMember>(TYPES.RemoveVaultMember),
|
||||
this.get<IsVaultOwner>(TYPES.IsVaultOwner),
|
||||
this.get<IsVaultAdmin>(TYPES.IsVaultAdmin),
|
||||
this.get<IsReadonlyVaultMember>(TYPES.IsReadonlyVaultMember),
|
||||
this.get<GetVault>(TYPES.GetVault),
|
||||
this.get<LeaveVault>(TYPES.LeaveVault),
|
||||
this.get<InternalEventBus>(TYPES.InternalEventBus),
|
||||
@@ -1027,14 +1039,6 @@ export class Dependencies {
|
||||
)
|
||||
})
|
||||
|
||||
this.factory.set(TYPES.GetTransitionStatus, () => {
|
||||
return new GetTransitionStatus(this.get<HttpServiceInterface>(TYPES.HttpService))
|
||||
})
|
||||
|
||||
this.factory.set(TYPES.StartTransition, () => {
|
||||
return new StartTransition(this.get<HttpServiceInterface>(TYPES.HttpService))
|
||||
})
|
||||
|
||||
this.factory.set(TYPES.ListRevisions, () => {
|
||||
return new ListRevisions(this.get<RevisionManager>(TYPES.RevisionManager))
|
||||
})
|
||||
|
||||
@@ -7,12 +7,14 @@ import {
|
||||
NotificationServiceEvent,
|
||||
SessionEvent,
|
||||
SyncEvent,
|
||||
WebSocketsServiceEvent,
|
||||
} from '@standardnotes/services'
|
||||
import { Dependencies } from './Dependencies'
|
||||
import { TYPES } from './Types'
|
||||
|
||||
export function RegisterApplicationServicesEvents(container: Dependencies, events: InternalEventBusInterface): void {
|
||||
events.addEventHandler(container.get(TYPES.AsymmetricMessageService), SyncEvent.ReceivedAsymmetricMessages)
|
||||
events.addEventHandler(container.get(TYPES.AsymmetricMessageService), WebSocketsServiceEvent.MessageSentToUser)
|
||||
events.addEventHandler(container.get(TYPES.DiskStorageService), ApplicationEvent.ApplicationStageChanged)
|
||||
events.addEventHandler(container.get(TYPES.FeaturesService), ApiServiceEvent.MetaReceived)
|
||||
events.addEventHandler(container.get(TYPES.FeaturesService), ApplicationEvent.ApplicationStageChanged)
|
||||
@@ -21,6 +23,7 @@ export function RegisterApplicationServicesEvents(container: Dependencies, event
|
||||
events.addEventHandler(container.get(TYPES.KeySystemKeyManager), ApplicationEvent.ApplicationStageChanged)
|
||||
events.addEventHandler(container.get(TYPES.MigrationService), ApplicationEvent.ApplicationStageChanged)
|
||||
events.addEventHandler(container.get(TYPES.NotificationService), SyncEvent.ReceivedNotifications)
|
||||
events.addEventHandler(container.get(TYPES.NotificationService), WebSocketsServiceEvent.NotificationAddedForUser)
|
||||
events.addEventHandler(container.get(TYPES.PreferencesService), ApplicationEvent.ApplicationStageChanged)
|
||||
events.addEventHandler(container.get(TYPES.ProtectionService), ApplicationEvent.ApplicationStageChanged)
|
||||
events.addEventHandler(container.get(TYPES.ProtectionService), ApplicationEvent.Started)
|
||||
@@ -39,6 +42,8 @@ export function RegisterApplicationServicesEvents(container: Dependencies, event
|
||||
events.addEventHandler(container.get(TYPES.UserService), AccountEvent.SignedInOrRegistered)
|
||||
events.addEventHandler(container.get(TYPES.VaultInviteService), ApplicationEvent.Launched)
|
||||
events.addEventHandler(container.get(TYPES.VaultInviteService), SyncEvent.ReceivedSharedVaultInvites)
|
||||
events.addEventHandler(container.get(TYPES.VaultInviteService), WebSocketsServiceEvent.UserInvitedToSharedVault)
|
||||
events.addEventHandler(container.get(TYPES.VaultUserService), ApplicationEvent.CompletedFullSync)
|
||||
|
||||
if (container.get(TYPES.FilesBackupService)) {
|
||||
events.addEventHandler(container.get(TYPES.FilesBackupService), ApplicationEvent.ApplicationStageChanged)
|
||||
|
||||
@@ -152,6 +152,8 @@ export const TYPES = {
|
||||
EncryptTypeAPayloadWithKeyLookup: Symbol.for('EncryptTypeAPayloadWithKeyLookup'),
|
||||
DecryptBackupFile: Symbol.for('DecryptBackupFile'),
|
||||
IsVaultOwner: Symbol.for('IsVaultOwner'),
|
||||
IsVaultAdmin: Symbol.for('IsVaultAdmin'),
|
||||
IsReadonlyVaultMember: Symbol.for('IsReadonlyVaultMember'),
|
||||
RemoveItemsFromMemory: Symbol.for('RemoveItemsFromMemory'),
|
||||
ReencryptTypeAItems: Symbol.for('ReencryptTypeAItems'),
|
||||
DecryptErroredPayloads: Symbol.for('DecryptErroredPayloads'),
|
||||
@@ -171,8 +173,6 @@ export const TYPES = {
|
||||
AuthorizeVaultDeletion: Symbol.for('AuthorizeVaultDeletion'),
|
||||
CreateDecryptedBackupFile: Symbol.for('CreateDecryptedBackupFile'),
|
||||
CreateEncryptedBackupFile: Symbol.for('CreateEncryptedBackupFile'),
|
||||
GetTransitionStatus: Symbol.for('GetTransitionStatus'),
|
||||
StartTransition: Symbol.for('StartTransition'),
|
||||
|
||||
// Mappers
|
||||
SessionStorageMapper: Symbol.for('SessionStorageMapper'),
|
||||
|
||||
@@ -259,6 +259,20 @@ describe('FeaturesService', () => {
|
||||
expect(triggeredEvents).not.toContain(FeaturesEvent.DidPurchaseSubscription)
|
||||
})
|
||||
|
||||
it('should not notify of subscription purchase if new roles are not paid', async () => {
|
||||
storageService.getValue = jest.fn().mockReturnValue(roles)
|
||||
|
||||
featureService.initializeFromDisk()
|
||||
|
||||
const spy = jest.spyOn(featureService, 'notifyEvent' as never)
|
||||
|
||||
const newRoles = [...roles, 'TRANSITION_USER']
|
||||
await featureService.updateOnlineRolesWithNewValues(newRoles)
|
||||
|
||||
const triggeredEvents = spy.mock.calls.map((call) => call[0])
|
||||
expect(triggeredEvents).not.toContain(FeaturesEvent.DidPurchaseSubscription)
|
||||
})
|
||||
|
||||
it('saves new roles to storage if a role has been added', async () => {
|
||||
storageService.getValue = jest.fn().mockReturnValue(roles)
|
||||
|
||||
|
||||
@@ -360,7 +360,10 @@ export class FeaturesService
|
||||
|
||||
const isInitialLoadRolesChange = previousRoles.length === 0
|
||||
if (!isInitialLoadRolesChange) {
|
||||
if (this.onlineRolesIncludePaidSubscription()) {
|
||||
const changedRoles = roles.filter((role) => !previousRoles.includes(role))
|
||||
const changedRolesIncludePaidSubscription = this.rolesIncludePaidSubscription(changedRoles)
|
||||
|
||||
if (changedRolesIncludePaidSubscription) {
|
||||
await this.notifyEvent(FeaturesEvent.DidPurchaseSubscription)
|
||||
}
|
||||
}
|
||||
@@ -395,10 +398,14 @@ export class FeaturesService
|
||||
return !isNativeFeature
|
||||
}
|
||||
|
||||
onlineRolesIncludePaidSubscription(): boolean {
|
||||
const unpaidRoles = [RoleName.NAMES.CoreUser]
|
||||
private rolesIncludePaidSubscription(roles: string[]) {
|
||||
const paidRoles = [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser]
|
||||
|
||||
return this.onlineRoles.some((role) => !unpaidRoles.includes(role))
|
||||
return roles.some((role) => paidRoles.includes(role))
|
||||
}
|
||||
|
||||
onlineRolesIncludePaidSubscription(): boolean {
|
||||
return this.rolesIncludePaidSubscription(this.onlineRoles)
|
||||
}
|
||||
|
||||
public rolesBySorting(roles: string[]): string[] {
|
||||
|
||||
@@ -640,6 +640,18 @@ export class ItemManager extends Services.AbstractService implements Services.It
|
||||
return undefined
|
||||
}
|
||||
|
||||
getDisplayableTagParent(itemToLookupUuidFor: Models.SNTag): Models.SNTag | undefined {
|
||||
const tag = this.findItem<Models.SNTag>(itemToLookupUuidFor.uuid)
|
||||
if (!tag) {
|
||||
return undefined
|
||||
}
|
||||
const parentId = tag.parentId
|
||||
if (parentId) {
|
||||
return this.tagDisplayController.items().find((displayableTag) => displayableTag.uuid === parentId)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
public getTagPrefixTitle(tag: Models.SNTag): string | undefined {
|
||||
const hierarchy = this.getTagParentChain(tag)
|
||||
|
||||
@@ -740,6 +752,12 @@ export class ItemManager extends Services.AbstractService implements Services.It
|
||||
)
|
||||
}
|
||||
|
||||
public getUnsortedTagsForItem(item: Models.DecryptedItemInterface<Models.ItemContent>): Models.SNTag[] {
|
||||
return this.itemsReferencingItem(item).filter((ref) => {
|
||||
return ref?.content_type === ContentType.TYPES.Tag
|
||||
}) as Models.SNTag[]
|
||||
}
|
||||
|
||||
public isSmartViewTitle(title: string): boolean {
|
||||
return title.startsWith(Models.SMART_TAG_DSL_PREFIX)
|
||||
}
|
||||
@@ -860,8 +878,14 @@ export class ItemManager extends Services.AbstractService implements Services.It
|
||||
return this.findItems(this.collection.uuidsOfItemsWithConflicts()).filter(Models.isNote).length
|
||||
}
|
||||
|
||||
getNoteLinkedFiles(note: Models.SNNote): Models.FileItem[] {
|
||||
return this.itemsReferencingItem(note).filter(Models.isFile)
|
||||
getItemLinkedFiles(item: Models.DecryptedItemInterface): Models.FileItem[] {
|
||||
return item.content_type === ContentType.TYPES.File
|
||||
? this.referencesForItem(item).filter(Models.isFile)
|
||||
: this.itemsReferencingItem(item).filter(Models.isFile)
|
||||
}
|
||||
|
||||
getItemLinkedNotes(item: Models.DecryptedItemInterface<Models.ItemContent>): Models.SNNote[] {
|
||||
return this.referencesForItem(item).filter(Models.isNote)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -82,6 +82,29 @@ describe('001 protocol operations', () => {
|
||||
expect(decrypted.content.text).to.equal('Decryptable Sentence')
|
||||
})
|
||||
|
||||
it('should decrypt string with case-insensitive uuid check for aad', async () => {
|
||||
/** If the server returns a lowercase uuid for the item, but the encrypted payload uses uppercase uuids, should still decrypt */
|
||||
const uppercaseUuid = '959B042A-3892-461E-8C50-477C10C7C40A'
|
||||
const lowercaseUuid = '959b042a-3892-461e-8c50-477c10c7c40a'
|
||||
|
||||
const payload = new DecryptedPayload({
|
||||
uuid: uppercaseUuid,
|
||||
content_type: ContentType.TYPES.Note,
|
||||
content: FillItemContent({
|
||||
title: 'hello',
|
||||
text: 'world',
|
||||
}),
|
||||
})
|
||||
|
||||
const key = await protocol001.createItemsKey()
|
||||
const params = await protocol001.generateEncryptedParametersAsync(payload, key)
|
||||
|
||||
params.uuid = lowercaseUuid
|
||||
|
||||
const decrypted = await protocol001.generateDecryptedParametersAsync(params, key)
|
||||
expect(decrypted.content).to.eql(payload.content)
|
||||
})
|
||||
|
||||
it('properly encrypts and decrypts', async () => {
|
||||
const text = 'hello world'
|
||||
const key = _key.masterKey
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user