Compare commits

...
Author SHA1 Message Date
StandardNotes CI 3f028656f2 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
2022-07-11 14:15:54 +00:00
StandardNotes CI 5706b4d162 chore(release): components 2022-07-11 14:15:40 +00:00
Aman Harwara 9d230d4b81 fix: focus mode & dynamic panels on small screens (#1246) 2022-07-11 19:21:03 +05:30
Moandjohnnymatthews b025e394c1 feat(docs): improve docker page (#1240)
* Adds improvements to Docker install process.

* Remvoes 'up' status - no longer used.

* style(docs): minor adjustments

Co-authored-by: johnnymatthews <[email protected]>
2022-07-09 07:22:27 -05:00
Mo 6764f3267b chore(web-server): remove legacy capistrano configs (#1239) 2022-07-09 07:12:48 -05:00
StandardNotes CI 97cb721909 chore(release): publish
- @standardnotes/[email protected]
2022-07-09 11:53:06 +00:00
Mo 4ad21c4f61 fix(docs): improve getting started self host page (#1238) 2022-07-09 06:31:42 -05:00
Mo a5ccaf1331 chore: snjs e2e pr workflow 2022-07-09 06:20:34 -05:00
StandardNotes CI 3c4ba61fee chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2022-07-09 10:58:11 +00:00
Aman Harwara 5393eb71fe feat: release Files view (#1236) 2022-07-09 16:07:20 +05:30
StandardNotes CI 0aef604167 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2022-07-08 21:03:13 +00:00
Aman Harwara c6932ba733 fix(desktop): don't shift sections on macOS if window is small (#1235) 2022-07-09 02:07:42 +05:30
StandardNotes CI fc6e36e761 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2022-07-08 19:29:54 +00:00
Aman Harwara 66f97f0612 feat(web): mobile-friendly (responsive) preferences UI (#1234) 2022-07-09 00:38:44 +05:30
StandardNotes CI 961d1fb8d4 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
2022-07-08 14:38:30 +00:00
Aman Harwara f349744fdb fix: subtag duplication (#1227) 2022-07-08 19:47:18 +05:30
Karol Sójko c737132b50 fix: add running locally e2e 2022-07-08 16:08:37 +02:00
StandardNotes CI 1809c51e54 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
2022-07-08 09:56:33 +00:00
Karol Sójko 3e4e7fd0e0 feat: add building of SNJS Docker image for e2e testing purposes (#1225)
* feat: add building of SNJS Docker image for e2e testing purposes

* fix: contents of snjs package

* feat: add running e2e test suite

* fix: include mocha directory in the snjs yarn package

* fix: add triggering e2e tests with specific image tag

* fix: mocha tests url

* fix: add tests before publishing new version

* fix: temporary skip linter errors

* Revert "fix: temporary skip linter errors"

This reverts commit c989536930a291677f6ef8cad402feb13f066b8c.

* fix: replace test libraries with unpkg CDN versions

* fix: update yarn lock and remove cached libs

* fix: add missing library to mocha tests

* fix: restore chai-as-promised built version

* fix: serving sncrypto-web in mocha test suite

* fix: add copy of sncrypto-web to gitignore files
2022-07-08 11:36:12 +02:00
StandardNotes CI 0d16e6faaa chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
2022-07-07 21:26:06 +00:00
Mo 3d49b95bc5 fix(web): themes inside editors urls 2022-07-07 16:16:47 -05:00
StandardNotes CI dc48b504db chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
2022-07-07 20:44:07 +00:00
Mo 6001c0d7a1 chore: remove non-functional reject_build_waiting_for_review fastlane flag 2022-07-07 15:34:37 -05:00
StandardNotes CI bcb6a94fb6 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
2022-07-07 19:14:03 +00:00
Mo 1990a9d2e6 chore: mobile workflow 2022-07-07 14:04:49 -05:00
Mo 2448672a61 chore: fix mobile lint 2022-07-07 13:54:26 -05:00
StandardNotes CI 306a2129a2 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2022-07-07 18:21:27 +00:00
Mo d9014615f0 fix(mobile): component viewer in mobile web 2022-07-07 13:08:52 -05:00
StandardNotes CI f484a2a920 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
2022-07-07 17:37:37 +00:00
Mo 2f9a54bef3 chore(mobile): upgrade fastlane 2022-07-07 12:27:41 -05:00
StandardNotes CI 3a20abc989 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2022-07-07 17:05:03 +00:00
Mo 9a3cdfbc1a chore: mobile web bridge concept (#1228) 2022-07-07 11:55:07 -05:00
StandardNotes CI a59065d1d6 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2022-07-07 12:32:27 +00:00
Mo 2988c71334 chore: add workflow to test web server build (#1226) 2022-07-07 07:22:30 -05:00
Mo 516b4edb6c chore: mobile workflow 2022-07-07 07:21:05 -05:00
StandardNotes CI 6e2911105b chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2022-07-07 11:12:12 +00:00
Mo 7017032893 Revert "chore: deps (#1222)"
This reverts commit ff9215c916.
2022-07-07 06:02:38 -05:00
StandardNotes CI 573c67d41c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2022-07-07 10:30:27 +00:00
Aman Harwara 50c024e643 feat: add selected file size in context menu (#1224) 2022-07-07 15:51:16 +05:30
StandardNotes CI 6ebac52cb0 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].7
2022-07-06 22:30:21 +00:00
Mo ff9215c916 chore: deps (#1222) 2022-07-06 17:21:07 -05:00
Mo 2415088561 chore: fix mobile gitignore 2022-07-06 17:12:21 -05:00
136 changed files with 1489 additions and 1279 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Install dependencies
run: yarn install
run: yarn install --immutable
- name: Build
run: yarn build:all
- name: ESLint
+40 -2
View File
@@ -36,12 +36,45 @@ jobs:
git_user_signingkey: true
git_commit_gpgsign: true
- name: Install Dependencies
- name: Install dependencies
run: yarn install --immutable
- name: Build packages
- name: Build
run: yarn build:all
- name: ESLint
run: yarn lint
- name: Build Android
run: yarn android:bundle
- name: Test
run: yarn test
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish SNJS Docker image for E2E testing
run: |
yarn docker build @standardnotes/snjs -t standardnotes/snjs:${{ github.sha }}
docker push standardnotes/snjs:${{ github.sha }}
- name: Run E2E test suite
uses: convictional/[email protected]
with:
owner: standardnotes
repo: e2e
github_token: ${{ secrets.CI_PAT_TOKEN }}
workflow_file_name: testing-with-stable-server.yml
wait_interval: 30
client_payload: '{"image_tag": "${{ github.sha }}"}'
propagate_failure: true
trigger_workflow: true
wait_workflow: true
- name: Bump version
run: yarn release:prod
@@ -49,3 +82,8 @@ jobs:
run: yarn publish:prod
env:
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_TOKEN }}
- name: Publish SNJS Docker image as stable
run: |
docker tag standardnotes/snjs:${{ github.sha }} standardnotes/snjs:latest
docker push standardnotes/snjs:latest
+51
View File
@@ -0,0 +1,51 @@
name: SNJS PR — E2E Tests
on:
pull_request:
branches:
- main
paths:
- 'packages/api/**'
- 'packages/encryption/**'
- 'packages/features/**'
- 'packages/filepicker/**'
- 'packages/files/**'
- 'packages/models/**'
- 'packages/responses/**'
- 'packages/services/**'
- 'packages/sncrypto-common/**'
- 'packages/sncrypto-web/**'
- 'packages/snjs/**'
- 'packages/utils/**'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: yarn install --immutable
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish SNJS Docker image for E2E testing
run: |
yarn docker build @standardnotes/snjs -t standardnotes/snjs:${{ github.sha }}
docker push standardnotes/snjs:${{ github.sha }}
docker tag standardnotes/snjs:${{ github.sha }} standardnotes/snjs:test
docker push standardnotes/snjs:test
- name: Run E2E test suite
uses: convictional/[email protected]
with:
owner: standardnotes
repo: e2e
github_token: ${{ secrets.CI_PAT_TOKEN }}
workflow_file_name: testing-with-stable-server.yml
wait_interval: 30
client_payload: '{"image_tag": "${{ github.sha }}"}'
propagate_failure: true
trigger_workflow: true
wait_workflow: true
+20
View File
@@ -0,0 +1,20 @@
name: Web Server PR
on:
pull_request:
branches:
- main
paths:
- 'packages/web-server/**'
jobs:
TestDockerBuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Copy default configuration
run: yarn workspace @standardnotes/web-server run sample:env
- name: Test build of the image
run: docker build -t standardnotes/web:test-build .
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
+2
View File
@@ -24,5 +24,7 @@ plugins:
spec: "@yarnpkg/plugin-workspace-tools"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
- path: .yarn/plugins/@yarnpkg/plugin-docker-build.cjs
spec: "https://github.com/Dcard/yarn-plugins/releases/latest/download/plugin-docker-build.js"
yarnPath: .yarn/releases/yarn-3.2.1.cjs
+15
View File
@@ -71,3 +71,18 @@ You can configure the `DEFAULT_SYNC_SERVER` environment variable to set the defa
```
DEFAULT_SYNC_SERVER=https://sync.myserver
```
## Running E2E tests
In order to run a stable server environment for E2E tests that will is up to date with what we have on production please checkout locally the [e2e repository](https://github.com/standardnotes/e2e).
To start the server type in the e2e repository:
```
yarn install --immutable
yarn test:stable-server
```
Then once the whole server infra is up and ready for your tests you can run the e2e suite in the local browser by typing (make sure you have built all the packages beforehand):
```
yarn start:server:e2e
```
+1
View File
@@ -31,6 +31,7 @@
"build:snjs": "yarn workspaces foreach -pt --verbose -R --from @standardnotes/snjs --exclude @standardnotes/components-meta run build",
"start:server:web": "lerna run start --scope=@standardnotes/web-server",
"start:server:web:localhost": "lerna run start:no-binding --scope=@standardnotes/web-server",
"start:server:e2e": "lerna run start:test-server --scope=@standardnotes/snjs",
"prepare": "husky install",
"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\"",
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/api
## [1.4.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/api
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api",
"version": "1.4.4",
"version": "1.4.5",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+6
View File
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.7.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-11)
### Bug Fixes
* focus mode & dynamic panels on small screens ([#1246](https://github.com/standardnotes/app/issues/1246)) ([9d230d4](https://github.com/standardnotes/app/commit/9d230d4b81c92b826ef9e8b89cd7192f5b4c8b13))
## [2.7.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
### Bug Fixes
@@ -1,23 +1,22 @@
#navigation {
flex: none !important;
width: 10px !important;
transition: width 0.25s;
}
#navigation:hover {
flex: initial;
width: 200px !important;
transition: width 0.25s;
}
#items-column {
flex: none !important;
width: 270px !important;
transition: width 0.25s;
}
#items-column:hover {
flex: initial;
width: 380px !important;
transition: width 0.25s;
@media screen and (min-width: 768px) {
#navigation {
flex: none !important;
width: 10px !important;
transition: width 0.25s;
}
#navigation:hover {
flex: initial;
width: 200px !important;
transition: width 0.25s;
}
#items-column {
flex: none !important;
width: 270px !important;
transition: width 0.25s;
}
#items-column:hover {
flex: initial;
width: 380px !important;
transition: width 0.25s;
}
}
+3 -3
View File
@@ -30,9 +30,9 @@
"binary": "5a00749f8930a41541589f704fff2b6e1d84224305750c7880e941085a8fef62"
},
"org.standardnotes.theme-dynamic": {
"version": "1.1.0",
"base64": "1214db7ca8962d7f56937c16463ca3131f2073a718f993e47c1dfcf233eefab8",
"binary": "6da8d19f03e724b058950eb6869e4fe9c6ba5e57d995e268aecc823a235af43d"
"version": "1.1.1",
"base64": "74f26661963f857a0dfa2d37d22c371c231bdf468c4cc8662b5bb25337a9b262",
"binary": "8353de29ec88472a87fd24349844569e9e468893de40c1fafbb0a237fd7410dd"
},
"org.standardnotes.code-editor": {
"version": "1.3.17",
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/components-meta",
"version": "2.7.3",
"version": "2.7.4",
"private": true,
"author": "Standard Notes.",
"main": "dist",
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-11)
### Bug Fixes
* focus mode & dynamic panels on small screens ([#1246](https://github.com/standardnotes/app/issues/1246)) ([9d230d4](https://github.com/standardnotes/app/commit/9d230d4b81c92b826ef9e8b89cd7192f5b4c8b13))
# [1.1.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
### Bug Fixes
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/dynamic-theme",
"version": "1.1.0",
"version": "1.1.1",
"main": "dist/dist.css",
"private": true,
"sn": {
@@ -1,23 +1,25 @@
#navigation {
flex: none !important;
width: 10px !important;
transition: width 0.25s;
}
@media screen and (min-width: 768px) {
#navigation {
flex: none !important;
width: 10px !important;
transition: width 0.25s;
}
#navigation:hover {
flex: initial;
width: 200px !important;
transition: width 0.25s;
}
#navigation:hover {
flex: initial;
width: 200px !important;
transition: width 0.25s;
}
#items-column {
flex: none !important;
width: 270px !important;
transition: width 0.25s;
}
#items-column {
flex: none !important;
width: 270px !important;
transition: width 0.25s;
}
#items-column:hover {
flex: initial;
width: 380px !important;
transition: width 0.25s;
#items-column:hover {
flex: initial;
width: 380px !important;
transition: width 0.25s;
}
}
+50
View File
@@ -3,6 +3,56 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.23.71](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-11)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.70](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-09)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.69](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
### Bug Fixes
* **desktop:** don't shift sections on macOS if window is small ([#1235](https://github.com/standardnotes/app/issues/1235)) ([c6932ba](https://github.com/standardnotes/app/commit/c6932ba733e0a67220ce56bec72431240518f7d8))
## [3.23.68](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.67](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.66](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.65](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.64](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.63](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.62](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.61](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.60](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.59](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/desktop
@@ -9,12 +9,14 @@
transition: 0.15s padding ease;
}
.mac-desktop #app.collapsed-notes.collapsed-navigation #editor-column {
padding-top: 18px;
}
@media screen and (min-width: 768px) {
.mac-desktop #app.collapsed-notes.collapsed-navigation #editor-column {
padding-top: 18px;
}
.mac-desktop #app.collapsed-navigation #items-column {
padding-top: 18px;
.mac-desktop #app.collapsed-navigation #items-column {
padding-top: 18px;
}
}
panel-resizer {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/desktop",
"main": "./app/dist/index.js",
"version": "3.23.59",
"version": "3.23.71",
"license": "AGPL-3.0-or-later",
"author": "Standard Notes.",
"private": true,
+12
View File
@@ -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.
# [0.1.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-11)
### Features
* **docs:** improve docker page ([#1240](https://github.com/standardnotes/app/issues/1240)) ([b025e39](https://github.com/standardnotes/app/commit/b025e394c129a53f41cb5835943901cf40fc92b6))
## [0.0.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-09)
### Bug Fixes
* **docs:** improve getting started self host page ([#1238](https://github.com/standardnotes/app/issues/1238)) ([4ad21c4](https://github.com/standardnotes/app/commit/4ad21c4f61e26dfe3284c5def1baebb7a497d200))
## [0.0.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-05)
**Note:** Version bump only for package @standardnotes/docs
+178 -68
View File
@@ -17,113 +17,223 @@ hide_title: false
hide_table_of_contents: false
---
## Requirements
This guide walks you through the process of installing the self-hosted backend of Standard Notes. In this example, we used a server running Ubuntu 20.04, with 2GB RAM and 1 CPU.
These instructions make the following assumptions:
Due to mounted volumes, we recommend running the setup as a root user. If you wish to run it as a non-root user, please see Docker's [post-installation steps for Linux](https://docs.docker.com/engine/install/linux-postinstall#manage-docker-as-a-non-root-user).
- The machine you will be running the infrastructure on has at least 2GB of memory.
- You've just finished setting up a Linux server (say, Ubuntu 20.04 64-bit) and have installed [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) on it.
- Due to mounted volumes we recommend running the setup as a root user. If you wish to run it as non-root user please remember about the [post-installation steps for Linux](https://docs.docker.com/engine/install/linux-postinstall#manage-docker-as-a-non-root-user).
- You've configured your security groups to allow for incoming SSH connections from your local IP.
- You've configured your security groups to allow for incoming TCP connections on port 80 and 443 from at least your local IP.
- You've configured a domain name (or subdomain) to point to your server's IP address.
## Prerequisities
## Getting started
1. Update your `apt` repositories and upgrade any out-of-date packages:
> **Note** If you are a user with an already existing legacy database of the Syncing Server, we've prepared a [Migrating from Legacy guide](./legacy-migration.md).
```shell
sudo apt update -y && sudo apt upgrade -y
```
SSH into your server and follow the steps below:
2. Install Docker Engine:
1. Make sure you are in your home directory and clone the [Standard Notes Standalone Infrastructure](https://github.com/standardnotes/standalone) project:
```shell
# Remove any old Docker installations.
sudo apt-get remove docker docker-engine docker.io containerd runc
```bash
$ cd ~
$ git clone --single-branch --branch main https://github.com/standardnotes/standalone.git
$ cd standalone
```
# Install dependencies.
sudo apt install git ca-certificates curl gnupg lsb-release -y
1. Initialize default configuration files by typing:
# Add Docker's GPG key.
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
```bash
$ ./server.sh setup
```
# Set the Docker repo.
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
1. Customize your configuration
# Install Docker Engine.
sudo apt update -y
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
```
There are 5 environment variables that need to be filled in with generated secret keys:
3. Verify that Docker is installed:
- `AUTH_JWT_SECRET` in the `.env` file
- `JWT_SECRET`, `LEGACY_JWT_SECRET`, `PSEUDO_KEY_PARAMS_KEY`, and `ENCRYPTION_SERVER_KEY` in the `docker/auth.env` file
```shell
sudo docker run hello-world
```
You can generate values for them by using:
This should output something like:
```bash
$ openssl rand -hex 32
```
```plaintext
...
> **Note** The server must be restarted any time environment variables are changed.
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete
Digest: sha256:13e367d31ae85359f42d637adf6da428f76d75dc9afeb3c21faea0d976f5c651
Status: Downloaded newer image for hello-world:latest
1. (Optional) Customize the port
Hello from Docker!
This message shows that your installation appears to be working correctly.
By default the syncing server will run on port 3000. If you have a different service running on that port, you can customize the port on which you want to run the infrastructure on. To do so, edit the `EXPOSED_PORT` variable in the `.env` file.
...
```
2. Simply run:
4. Verify that Docker Compose is correctly installed:
```bash
$ ./server.sh start
```
```shell
docker compose version
```
This should load all the microservices that the infrastructure consists of.
This should output something like:
> **Note** The first run might take a few minutes as there are Docker images that need be pulled and built as well as migrations to be run for initializing the database.
```plaintext
Docker Compose version v2.6.0
```
3. Wait for the infrastructure to bootstrap
5. Enable the `ufw` firewall:
It takes a moment for the infrastructure to bootstrap and all the microservices to start. You can observe the process by typing:
```shell
sudo ufw enable
```
```bash
$ ./server.sh logs
```
Enter `y` when prompted.
> **Note** You can safely escape from logs with CTRL+C
6. Enable SSH connections:
> **Note** Microservices depend on each other and start sequentially in our setup. In the logs you will likely observe that one service is waiting for another to start with lines like: "XYZ is unavailable yet - waiting for it to start" where XYZ is the dependent service name. This is expected.
```shell
sudo ufw allow ssh
```
Everything should be up and running once you observe that the `API Gateway` service has started by seeing the following line as one of the last ones in logs:
This should output something like:
```
api-gateway_1 | {"message":"Server started on port 3000","level":"info"}
```
```plaintext
Skipping adding existing rule
Skipping adding existing rule (v6)
```
You can also check the state of all services via:
7. Allow incoming TPC connections on ports `80` and `443`:
```bash
$ ./server.sh status
```
```shell
sudo ufw allow http
sudo ufw allow https
```
All services should be in `Up` state at this stage.
8. Check the status of your `ufw` settings:
4. Test your access to the server locally:
```shell
ufw status verbose
```
You should be able now to check that the syncing server is running by checking `http://localhost:3000/healthcheck`:
This should output something like:
```bash
$ curl http://localhost:3000/healthcheck
OK
```
```plaintext
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip
> **Note** If you changed the `EXPOSED_PORT` variable you will have to check `http://localhost:{EXPOSED_PORT}/healthcheck`.
To Action From
-- ------ ----
22/tcp ALLOW IN Anywhere
80/tcp ALLOW IN Anywhere
443/tcp ALLOW IN Anywhere
22/tcp (v6) ALLOW IN Anywhere (v6)
80/tcp (v6) ALLOW IN Anywhere (v6)
443/tcp (v6) ALLOW IN Anywhere (v6)
```
5. You're done!
9. Configure a domain name (or subdomain) to point to your server's IP address. Consult your domain registration provider for how to configure your domain name.
## Securing Your Server
## Install Standard Notes
In order to start using your new server with the Standard Notes app at https://app.standardnotes.com you will have to configure an HTTPS reverse proxy.
1. Clone the `standalone` repo:
Unless you already have an HTTP/HTTPS server running that will serve as a reverse proxy to the standalone infrastructure, head over to [Securing HTTP traffic of your Sync server](./https-support.md).
```shell
cd ~
git clone --single-branch --branch main https://github.com/standardnotes/standalone.git
cd standalone
```
1. Initialize default configuration files:
```shell
./server.sh setup
```
This will output something like:
```plaintext
Initializing default configuration
Default configuration files created as .env and docker/*.env files. Feel free to modify values if needed.
```
1. Generate random values for the necessary environment variables:
```shell
sed -i "s/auth_jwt_secret/$(openssl rand -hex 32)/g" .env
sed -i "s/secret/$(openssl rand -hex 32)/g" docker/auth.env
sed -i "s/legacy_jwt_secret/$(openssl rand -hex 32)/g" docker/auth.env
sed -i "s/secret_key/$(openssl rand -hex 32)/g" docker/auth.env
sed -i "s/server_key/$(openssl rand -hex 32)/g" docker/auth.env
```
**Note:** If you are running `sed` on macOS or BSD, change instances of `sed -i` to `sed -i ''`.
1. (Optional) Restart the server:
```shell
reboot
```
1. (Optional) By default, the syncing server will run on port `3000`. If you have a different service running on that port, you can customize the port on which you want to run the infrastructure by editing the `EXPOSED_PORT` variable in the `.env` file.
1. Once the server has finished rebooting, log back into the server and start the Standard Notes server process:
```shell
cd standalone
./server.sh start
```
Docker will start outputting lots of information about the containers it is pulling in and installing. This process took about 8 minutes on a Ubuntu 20.04 server with 2GB RAM and 1 CPU.
1. Once Docker has finished installing, the Standard Notes install script will output:
```plaintext
Infrastructure started. Give it a moment to warm up. If you wish, please run the './server.sh logs' command to see details.
```
1. Check the status of your server:
```shell
./server.sh status
```
This will output something like:
```plaintext
Services State:
NAME COMMAND SERVICE STATUS PORTS
api-gateway-standalone "./wait-for.sh auth …" api-gateway running 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp
auth-standalone "./wait-for.sh db 33…" auth running
auth-worker-standalone "./wait-for.sh db 33…" auth-worker running
cache-standalone "docker-entrypoint.s…" cache running 6379/tcp
db-standalone "docker-entrypoint.s…" db running 3306/tcp
files-standalone "./wait-for.sh db 33…" files running 0.0.0.0:3125->3000/tcp, :::3125->3000/tcp
syncing-server-js-standalone "./wait-for.sh db 33…" syncing-server-js running
syncing-server-js-worker-standalone "./wait-for.sh db 33…" syncing-server-js-worker running
```
Your Standard Notes server is ready once all the services have a `STATUS` of `Up`. This process took about 11 minutes on a Ubuntu 20.04 server with 2GB RAM and 1 CPU.
1. You should be able now to check that the syncing server is running by checking `http://localhost:3000/healthcheck`. You must do this on the server:
```bash
curl http://localhost:3000/healthcheck
OK
```
If you changed the `EXPOSED_PORT` variable, check `http://localhost:{EXPOSED_PORT}/healthcheck`.
1. You're done!
## Securing your server
To start using your new server with the Standard Notes app at `app.standardnotes.com,` you have to configure an HTTPS reverse proxy. Head over to [Securing HTTP traffic of your Sync server](./https-support.md) for more information on how to set up a reverse proxy.
## Using your new server
In the account menu, choose `Advanced options` and enter the address of your new server in `Custom sync server`.
Then, register for a new account or log into an existing account and begin using your private new secure Standard Notes server!
In the account menu, choose `Advanced options` and enter the address of your new server in `Custom sync server`. Then, register for a new account or log in to an existing account and begin using your private new secure Standard Notes server!
@@ -16,28 +16,57 @@ hide_title: false
hide_table_of_contents: false
---
Our self-hosted server infrastructure consists of several different microservices that are responsible for different sets of functionality. Our self-hosted server is only intended as the backend that processes and stores your data; it does not include self-hosting the web application, which is an optional process that must be done separately. You will be able to use our existing [web](https://app.standardnotes.com) and desktop app with your self-hosted server.
Our self-hosted server infrastructure consists of different microservices responsible for varying functionality. The self-hosted server works as the _backend_ that processes and stores your data; it does not include the web application.
## Get Started
The web application is an optional process that you must spin up separately. However, you can use the [existing web app](https://app.standardnotes.com) or the official Standard Notes desktop app with your self-hosted server.
👉 **[Using our automated docker-compose setup with accompanying scripts](./docker.md)** 👈
:::tip Quick start
If you'd like to learn more about each of the particular services, head over to [Infrastructure Overview](./infrastructure-overview.md).
The fastest and easiest way to get up and running is to use our automated Docker setup. All you need is a Linux server and the latest version of [Docker](https://docs.docker.com/get-started).
> **Note** Our setup also provides a running MySQL database and a Redis cache node. You do not have to provision these services on your own. For users that have been self-hosting a legacy version of our server, we've prepared a [Migrating from Legacy guide](./legacy-migration.md).
[Check out our Docker instructions page to get started ](./docker.md)
### Recommendations
:::
We highly recommend you use our Docker setup to host your syncing server. Docker containers are isolated software environments that you can control and manage.
## Infrastructure overview
If you are new to Docker, please see the [official Docker documentation](https://docs.docker.com/get-started) on how to get started. Ensure you [install Docker-Compose](https://docs.docker.com/compose/install/) following the documentation. Your Linux distribution may not have the most up to date docker-compose and will fail to load.
### API Gateway
We recommend avoiding setting up your syncing server from scratch with Nginx unless you are proficient with Nginx. Setting up the full architecture can be challenging without full knowledge of how the syncing server and its microservices function.
The main entry point of the architecture. The API Gateway is a router and proxy for all services which are otherwise inaccessible directly. All requests from client applications go through the API Gateway to reach a target underlying service. This service is configured with your reverse proxy for public HTTPS support.
### Issues
### Syncing Server
If you have any issues with setting up your syncing server, please [open an issue on GitHub](https://github.com/standardnotes/standalone/issues).
Responsible for user data and syncing operations.
### Syncing Server Worker
Responsible for asynchronous tasks the Syncing Server may offload for background processing, including email backups, revision history, and more.
### Auth
Responsible for authorization and authentication mechanisms within Standard Notes.
### Auth Worker
Responsible for asynchronous tasks related to the domain of authentication and authorization, including account deletion requests and post-registration tasks.
### Database
The database is where data is stored.
### Cache
A Redis cache node is used to store temporary data for performance optimization and auto-expiring features. In self-hosted mode, Redis is used as a communication queue between services and workers.
## Troubleshooting
If you run into any issues setting up your server, please [open an issue on GitHub](https://github.com/standardnotes/standalone/issues) or reach out on the [Standard Notes Discord](https://standardnotes.com/discord).
## Web application
If you would like to self-host the actual Standard Notes web application, visit the [repository for the web app on GitHub](https://github.com/standardnotes/web).
If you would like to self-host the actual Standard Notes web application, visit the [repository for the Standard Notes web app on GitHub](https://github.com/standardnotes/app/tree/main/packages/web).
## Self-hosting without Docker?
Configuring the full Standard Notes architecture manually can be challenging without detailed study. We do not offer support for this method of self-hosting. [The only supported self-hosting method is to use Docker →](./docker.md)
@@ -1,53 +0,0 @@
---
slug: infrastructure-overview
id: infrastructure-overview
title: Infrastructure Overview
sidebar_label: Infrastructure Overview
description: Standard Notes Infrastructure Overview.
keywords:
- standard notes
- docs
- notes app
- end-to-end encryption
- self-hosting
- sync server
image: /img/logo.png
hide_title: false
hide_table_of_contents: false
---
## Services
The Syncing Server infrastructure consists of a few different microservices that are responsible for different sets of functionality.
### Syncing Server JS
Syncing Server JS is a TypeScript implementation of our Syncing Server. This is the core of our business logic that is responsible for all operations on user data.
### Syncing Server JS Worker
Syncing Server JS Worker is responsible for all asynchronous tasks that the Syncing Server JS may offload for background processing. This includes for example processing of email backups, resolving issues with note duplicates, sending notes to extensions server, and more.
### Auth
This server is responsible for all authorization and authentication mechanisms. Auth is where all account-related metadata is handled and processed.
### Auth Worker
Similar to Syncing Server JS Worker, Auth Worker is responsible for all asynchronous tasks related to the domain of authentication and authorization. For example, processing account deletion requests and users' post-registration tasks.
### API Gateway
This is the main "entry point" of the entire architecture. API Gateway serves as a router and proxy to all services which are inaccessible directly. All requests from client applications will have to go through API Gateway in order to reach a certain underlying service.
This service will be paired with your reverse proxy for [HTTPS support](./https-support.md)
### DB
MySQL database server. This is where all data is stored.
### Cache
Redis cache node where all temporary data is persisted for performance optimization and auto-expiring features.
In self-host mode, Redis is used by default as a communication queue between services and their workers.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/docs",
"version": "0.0.2",
"version": "0.1.0",
"license": "AGPL-3.0-or-later",
"author": "Standard Notes.",
"private": true,
-1
View File
@@ -4,7 +4,6 @@ module.exports = {
{
'Self Hosting': [
'self-hosting/getting-started',
'self-hosting/infrastructure-overview',
'self-hosting/docker',
'self-hosting/configuration-options',
'self-hosting/legacy-migration',
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.13.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/encryption
## [1.13.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/encryption
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/encryption",
"version": "1.13.3",
"version": "1.13.4",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+14
View File
@@ -3,6 +3,20 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.21.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.21.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
### Reverts
* Revert "chore: deps (#1222)" ([7017032](https://github.com/standardnotes/app/commit/701703289330baee4a5082df42bb787694fe7509)), closes [#1222](https://github.com/standardnotes/app/issues/1222)
## [1.21.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.21.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/filepicker
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/filepicker",
"version": "1.21.2",
"version": "1.21.5",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+12
View File
@@ -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.8.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/files
## [1.8.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/files
## [1.8.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/files
## [1.8.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/files
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files",
"version": "1.8.3",
"version": "1.8.6",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+3 -2
View File
@@ -21,8 +21,6 @@ DerivedData
*.ipa
*.xcuserstate
html/Web.bundle/src/web-src
.env
# Android/IntelliJ
@@ -52,6 +50,9 @@ android-release.bundle.map
app-release.aab
*.bundle
!Web.bundle
html/Web.bundle/src/web-src
html/Web.bundle/src/components
ios-release.bundle.map
# fastlane
+66
View File
@@ -3,6 +3,72 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.30.26](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-11)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.25](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-09)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.24](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.23](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.22](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.21](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.20](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.19](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
### Bug Fixes
* **mobile:** component viewer in mobile web ([d901461](https://github.com/standardnotes/app/commit/d9014615f0a146733fbf7d494d0d201068817086))
## [3.30.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/mobile
+33 -32
View File
@@ -17,20 +17,20 @@ GEM
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.569.0)
aws-sdk-core (3.130.0)
aws-partitions (1.603.0)
aws-sdk-core (3.131.2)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.55.0)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.57.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.113.0)
aws-sdk-s3 (1.114.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.4.0)
aws-sigv4 (1.5.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.0.3)
@@ -86,7 +86,7 @@ GEM
escape (0.0.4)
ethon (0.15.0)
ffi (>= 1.15.0)
excon (0.92.1)
excon (0.92.3)
faraday (1.10.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
@@ -106,8 +106,8 @@ GEM
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.3)
multipart-post (>= 1.2, < 3)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
@@ -116,7 +116,7 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.6)
fastlane (2.205.0)
fastlane (2.207.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
@@ -160,9 +160,9 @@ GEM
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.16.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-core (0.4.2)
google-apis-androidpublisher_v3 (0.24.0)
google-apis-core (>= 0.7, < 2.a)
google-apis-core (0.7.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
@@ -171,19 +171,19 @@ GEM
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.10.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-playcustomapp_v1 (0.7.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-storage_v1 (0.11.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-iamcredentials_v1 (0.13.0)
google-apis-core (>= 0.7, < 2.a)
google-apis-playcustomapp_v1 (0.10.0)
google-apis-core (>= 0.7, < 2.a)
google-apis-storage_v1 (0.17.0)
google-apis-core (>= 0.7, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.2.0)
google-cloud-storage (1.36.1)
google-cloud-storage (1.37.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
@@ -191,7 +191,7 @@ GEM
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.1.2)
googleauth (1.2.0)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
@@ -199,14 +199,14 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.4)
http-cookie (1.0.5)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
jmespath (1.6.1)
json (2.6.1)
jwt (2.3.0)
json (2.6.2)
jwt (2.4.1)
memoist (0.16.2)
mini_magick (4.11.0)
mini_mime (1.1.2)
@@ -221,9 +221,9 @@ GEM
optparse (0.1.1)
os (1.1.4)
plist (3.6.0)
public_suffix (4.0.6)
public_suffix (4.0.7)
rake (13.0.6)
representable (3.1.1)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
@@ -234,9 +234,9 @@ GEM
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.16.1)
signet (0.17.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.0)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.8)
@@ -257,14 +257,14 @@ GEM
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.1)
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
webrick (1.7.0)
word_wrap (1.0.0)
xcode-install (2.8.0)
claide (>= 0.9.1, < 1.1.0)
fastlane (>= 2.1.0, < 3.0.0)
xcodeproj (1.21.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
@@ -278,6 +278,7 @@ GEM
zeitwerk (2.5.4)
PLATFORMS
arm64-darwin-21
ruby
DEPENDENCIES
-29
View File
@@ -1,29 +0,0 @@
import React from 'react'
import { Platform } from 'react-native'
import { WebView } from 'react-native-webview'
export const MobileWebAppContainer = () => {
const sourceUri = (Platform.OS === 'android' ? 'file:///android_asset/' : '') + 'Web.bundle/loader.html'
const params = 'platform=' + Platform.OS
const injectedJS = `
if (!window.location.search) {
var link = document.getElementById('web-bundle-progress-bar');
link.href = './src/index.html?${params}';
link.click();
}`
/* eslint-disable @typescript-eslint/no-empty-function */
return (
<WebView
source={{ uri: sourceUri }}
originWhitelist={['*']}
onLoad={() => {}}
onError={(err) => console.error('An error has occurred', err)}
onHttpError={() => console.error('An HTTP error occurred')}
onMessage={() => {}}
allowFileAccess={true}
injectedJavaScript={injectedJS}
/>
)
/* eslint-enable @typescript-eslint/no-empty-function */
}
@@ -0,0 +1,15 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
class WebProcessDeviceInterface {
constructor(messageSender) {
this.appVersion = '1.2.3'
this.environment = 1
this.databases = []
this.messageSender = messageSender
}
setApplication() {}
sendMessage(functionName, args) {
return this.messageSender.sendMessage(functionName, args)
}
}
@@ -0,0 +1,31 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
class WebProcessMessageSender {
constructor() {
this.pendingMessages = []
window.addEventListener('message', this.handleMessageFromReactNative.bind(this))
}
handleMessageFromReactNative(event) {
const message = event.data
try {
const parsed = JSON.parse(message)
const { messageId, returnValue } = parsed
const pendingMessage = this.pendingMessages.find((m) => m.messageId === messageId)
pendingMessage.resolve(returnValue)
this.pendingMessages.splice(this.pendingMessages.indexOf(pendingMessage), 1)
} catch (error) {
console.log('Error parsing message from React Native', message, error)
}
}
sendMessage(functionName, args) {
const messageId = Math.random()
window.ReactNativeWebView.postMessage(JSON.stringify({ functionName: functionName, args: args, messageId }))
return new Promise((resolve) => {
this.pendingMessages.push({
messageId,
resolve,
})
})
}
}
+5 -5
View File
@@ -1,6 +1,6 @@
# frozen_string_literal: true
fastlane_version '2.181.0'
fastlane_version '2.207.0'
platform :ios do
def sign_ios(type = 'appstore')
@@ -41,7 +41,7 @@ platform :ios do
key_id: ENV['APPSTORE_CONNECT_KEY_ID'],
issuer_id: ENV['APPSTORE_CONNECT_KEY_ISSUER_ID'],
key_filepath: 'ios/Authkey.p8',
in_house: false # optional but may be required if using match/sigh
in_house: false
)
is_prod = scheme == 'StandardNotes'
@@ -60,12 +60,12 @@ platform :ios do
build_number: build_number,
submit_for_review: true,
automatic_release: false,
force: true, # Skip HTMl report verification
force: true,
skip_metadata: true,
skip_screenshots: true,
skip_binary_upload: true,
release_notes: {
'default': "Fixes and improvements.",
'default': 'Fixes and improvements.'
}
)
end
@@ -122,7 +122,7 @@ platform :android do
end
def deploy_android(variant, versionCode, track = 'beta')
sh("yarn run android:bundle")
sh('yarn run android:bundle')
build_android(variant, versionCode)
upload_to_play_store(
track: track,
@@ -0,0 +1 @@
<a id="web-bundle-progress-bar" href="#"/></a>
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<link rel="stylesheet" href="web-src/app.css" />
<script>
window.defaultSyncServer = "https://api.standardnotes.com";
window.defaultFilesHost = "https://files.standardnotes.com";
window.enabledUnfinishedFeatures = "" === 'true';
window.websocketUrl = "";
window.purchaseUrl = "https://standardnotes.com/purchase";
window.plansUrl = "https://standardnotes.com/plans";
window.dashboardUrl = "https://standardnotes.com/dashboard";
</script>
<script src="web-src/app.js"></script>
</head>
<body>
</body>
</html>
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/mobile",
"version": "3.30.10",
"version": "3.30.26",
"author": "Standard Notes.",
"private": true,
"license": "AGPL-3.0-or-later",
@@ -22,7 +22,7 @@
"start": "react-native start",
"tsc": "tsc --noEmit",
"upgrade:snjs": "ncu -u '@standardnotes/*'",
"web:bundle": "mkdir -p html/Web.bundle/src/web-src/ && cp -r ../web/dist/. html/Web.bundle/src/web-src/"
"web:bundle": "mkdir -p html/Web.bundle/src/web-src/ && cp -r ../web/dist/. html/Web.bundle/src/web-src/ && mkdir -p html/Web.bundle/src/components/assets && cp -r ../components/dist/assets/. html/Web.bundle/src/components/assets/"
},
"installConfig": {
"hoistingLimits": "workspaces"
+7 -2
View File
@@ -1,16 +1,17 @@
import { AppStateEventType, AppStateType, TabletModeChangeData } from '@Lib/ApplicationState'
import { useHasEditor, useIsLocked } from '@Lib/SnjsHelperHooks'
import { ScreenStatus } from '@Lib/StatusManager'
import { IsDev } from '@Lib/Utils'
import { CompositeNavigationProp, RouteProp } from '@react-navigation/native'
import { createStackNavigator, StackNavigationProp } from '@react-navigation/stack'
import { HeaderTitleView } from '@Root/Components/HeaderTitleView'
import { IoniconsHeaderButton } from '@Root/Components/IoniconsHeaderButton'
import { Compose } from '@Root/Screens/Compose/Compose'
import { Root } from '@Root/Screens/Root'
import { SCREEN_COMPOSE, SCREEN_NOTES, SCREEN_VIEW_PROTECTED_NOTE } from '@Root/Screens/screens'
import { MainSideMenu } from '@Root/Screens/SideMenu/MainSideMenu'
import { NoteSideMenu } from '@Root/Screens/SideMenu/NoteSideMenu'
import { ViewProtectedNote } from '@Root/Screens/ViewProtectedNote/ViewProtectedNote'
import { Root } from '@Screens/Root'
import { UuidString } from '@standardnotes/snjs'
import { ICON_MENU } from '@Style/Icons'
import { ThemeService } from '@Style/ThemeService'
@@ -22,8 +23,12 @@ import { HeaderButtons, Item } from 'react-navigation-header-buttons'
import { ThemeContext } from 'styled-components'
import { HeaderTitleParams } from './App'
import { ApplicationContext } from './ApplicationContext'
import { MobileWebAppContainer } from './MobileWebAppContainer'
import { ModalStackNavigationProp } from './ModalStack'
const IS_DEBUGGING_WEB_APP = false
const DEFAULT_TO_WEB_APP = IsDev && IS_DEBUGGING_WEB_APP
export type AppStackNavigatorParamList = {
[SCREEN_NOTES]: HeaderTitleParams
[SCREEN_COMPOSE]: HeaderTitleParams & {
@@ -196,7 +201,7 @@ export const AppStackComponent = (props: ModalStackNavigationProp<'AppStack'>) =
</HeaderButtons>
),
})}
component={Root}
component={DEFAULT_TO_WEB_APP ? MobileWebAppContainer : Root}
/>
<AppStack.Screen
name={SCREEN_COMPOSE}
@@ -0,0 +1,135 @@
import { MobileDeviceInterface } from '@Lib/Interface'
import React, { useMemo, useRef } from 'react'
import { Platform } from 'react-native'
import { WebView, WebViewMessageEvent } from 'react-native-webview'
export const MobileWebAppContainer = () => {
const sourceUri = (Platform.OS === 'android' ? 'file:///android_asset/' : '') + 'Web.bundle/src/index.html'
const webViewRef = useRef<WebView>(null)
const device = useMemo(() => new MobileDeviceInterface(), [])
const functions = Object.getOwnPropertyNames(Object.getPrototypeOf(device))
const baselineFunctions: Record<string, any> = {
isDeviceDestroyed: `(){
return false
}`,
}
let stringFunctions = ''
for (const [key, value] of Object.entries(baselineFunctions)) {
stringFunctions += `${key}${value}`
}
for (const functionName of functions) {
if (functionName === 'constructor' || baselineFunctions[functionName]) {
continue
}
stringFunctions += `
${functionName}(...args) {
return this.sendMessage('${functionName}', args);
}
`
}
const WebProcessDeviceInterface = `
class WebProcessDeviceInterface {
constructor(messageSender) {
this.appVersion = '1.2.3'
this.environment = 1
this.databases = []
this.messageSender = messageSender
}
setApplication() {}
sendMessage(functionName, args) {
return this.messageSender.sendMessage(functionName, args)
}
${stringFunctions}
}
`
const WebProcessMessageSender = `
class WebProcessMessageSender {
constructor() {
this.pendingMessages = []
window.addEventListener('message', this.handleMessageFromReactNative.bind(this))
}
handleMessageFromReactNative(event) {
const message = event.data
try {
const parsed = JSON.parse(message)
const { messageId, returnValue } = parsed
const pendingMessage = this.pendingMessages.find((m) => m.messageId === messageId)
pendingMessage.resolve(returnValue)
this.pendingMessages.splice(this.pendingMessages.indexOf(pendingMessage), 1)
} catch (error) {
console.log('Error parsing message from React Native', message, error)
}
}
sendMessage(functionName, args) {
const messageId = Math.random()
window.ReactNativeWebView.postMessage(JSON.stringify({ functionName: functionName, args: args, messageId }))
return new Promise((resolve) => {
this.pendingMessages.push({
messageId,
resolve,
})
})
}
}
`
const injectedJS = `
console.log = (...args) => {
window.ReactNativeWebView.postMessage('[web log] ' + args.join(' '));
}
${WebProcessDeviceInterface}
${WebProcessMessageSender}
const messageSender = new WebProcessMessageSender();
window.reactNativeDevice = new WebProcessDeviceInterface(messageSender);
true;
`
const onMessage = (event: WebViewMessageEvent) => {
const message = event.nativeEvent.data
try {
const functionData = JSON.parse(message)
void onFunctionMessage(functionData.functionName, functionData.messageId, functionData.args)
} catch (error) {
console.log('onGeneralMessage', JSON.stringify(message))
}
}
const onFunctionMessage = async (functionName: string, messageId: string, args: any) => {
const returnValue = await (device as any)[functionName](...args)
console.log(`Native device function ${functionName} called`)
webViewRef.current?.postMessage(JSON.stringify({ messageId, returnValue }))
}
/* eslint-disable @typescript-eslint/no-empty-function */
return (
<WebView
ref={webViewRef}
source={{ uri: sourceUri }}
originWhitelist={['*']}
onLoad={() => {}}
onError={(err) => console.error('An error has occurred', err)}
onHttpError={() => console.error('An HTTP error occurred')}
onMessage={onMessage}
allowFileAccess={true}
allowUniversalAccessFromFileURLs={true}
injectedJavaScript={injectedJS}
/>
)
/* eslint-enable @typescript-eslint/no-empty-function */
}
+1 -1
View File
@@ -30,11 +30,11 @@ import React, { memo, useContext } from 'react'
import { Platform } from 'react-native'
import { HeaderButtons, Item } from 'react-navigation-header-buttons'
import { ThemeContext } from 'styled-components'
import { MobileWebAppContainer } from '../MobileWebAppContainer'
import { HeaderTitleParams, TEnvironment } from './App'
import { ApplicationContext } from './ApplicationContext'
import { AppStackComponent } from './AppStack'
import { HistoryStack } from './HistoryStack'
import { MobileWebAppContainer } from './MobileWebAppContainer'
export type ModalStackNavigatorParamList = {
AppStack: undefined
+12 -1
View File
@@ -24,5 +24,16 @@
"@Root/*": ["./*"]
}
},
"exclude": ["node_modules", "babel.config.js", "metro.config.js", "jest.config.js"]
"exclude": [
"node_modules",
"babel.config.js",
"metro.config.js",
"jest.config.js",
"e2e",
"html",
"android",
"WebFrame",
"ios",
"fastlane"
]
}
+6
View File
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.15.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
### Bug Fixes
* subtag duplication ([#1227](https://github.com/standardnotes/app/issues/1227)) ([f349744](https://github.com/standardnotes/app/commit/f349744fdb51849778e88b643adb518b7ed82811))
## [1.15.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/models
+3 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/models",
"version": "1.15.3",
"version": "1.15.4",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -28,7 +28,8 @@
"@typescript-eslint/eslint-plugin": "^5.30.0",
"eslint-plugin-prettier": "*",
"jest": "^27.5.1",
"ts-jest": "^27.1.3"
"ts-jest": "^27.1.3",
"typescript": "*"
},
"dependencies": {
"@standardnotes/common": "^1.23.1",
+64
View File
@@ -3,6 +3,70 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.92](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-11)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.91](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-09)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.90](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.89](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.88](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.87](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.86](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.85](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.84](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.83](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.82](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.81](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.80](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.79](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.78](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.77](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.76](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/releases
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/releases",
"version": "1.2.76",
"version": "1.2.92",
"license": "AGPL-3.0-or-later",
"main": "dist/releases.json",
"types": "dist/index.d.ts",
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.16.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/services
## [1.16.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/services
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/services",
"version": "1.16.3",
"version": "1.16.4",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+1
View File
@@ -0,0 +1 @@
mocha/vendor/sncrypto-web.js
+30
View File
@@ -3,6 +3,36 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.124.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/snjs
# [2.124.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
### Features
* add building of SNJS Docker image for e2e testing purposes ([#1225](https://github.com/standardnotes/app/issues/1225)) ([3e4e7fd](https://github.com/standardnotes/app/commit/3e4e7fd0e0b06a9412b9e30833d98eb992a3806a))
## [2.123.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
### Bug Fixes
* **web:** themes inside editors urls ([3d49b95](https://github.com/standardnotes/app/commit/3d49b95bc593d67e949b2eec4a086ff25275eadf))
## [2.123.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
### Bug Fixes
* **mobile:** component viewer in mobile web ([d901461](https://github.com/standardnotes/app/commit/d9014615f0a146733fbf7d494d0d201068817086))
## [2.123.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/snjs
## [2.123.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/snjs
## [2.123.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/snjs
+25
View File
@@ -0,0 +1,25 @@
FROM node:16.15.1-alpine AS builder
# Install dependencies for building native libraries
RUN apk add --update git openssh-client python3 alpine-sdk
WORKDIR /workspace
# docker-build plugin copies everything needed for `yarn install` to `manifests` folder.
COPY manifests ./
RUN yarn install --immutable
FROM node:16.15.1-alpine
RUN apk add --update curl
WORKDIR /workspace
# Copy the installed dependencies from the previous stage.
COPY --from=builder /workspace ./
# docker-build plugin runs `yarn pack` in all workspace dependencies and copies them to `packs` folder.
COPY packs ./
CMD [ "yarn", "start:test-server" ]
+29
View File
@@ -0,0 +1,29 @@
/* Used for running mocha tests */
const connect = require('connect')
const serveStatic = require('serve-static')
const fs = require('fs')
const isDev = process.argv[2] === '--dev'
const port = isDev ? 9002 : 9001
const snCryptoDistFilePath = `${__dirname}/../sncrypto-web/dist/sncrypto-web.js`
if (!fs.existsSync(snCryptoDistFilePath)) {
console.error(
`Could not find sncrypto dist file under: ${snCryptoDistFilePath}. Please consider building the project first`,
)
process.exit(1)
}
fs.copyFileSync(snCryptoDistFilePath, `${__dirname}/mocha/vendor/sncrypto-web.js`)
connect()
.use(serveStatic(__dirname))
.listen(port, () => {
const url = `http://localhost:${port}/mocha/test.html`
console.log(`Test Server Started on ${url}`)
if (!isDev) {
const start = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'start' : 'xdg-open'
require('child_process').exec(start + ' ' + url)
}
})
@@ -285,7 +285,8 @@ export class SNComponentManager extends AbstractService<ComponentManagerEvent, E
if (!isWeb) {
throw Error('Mobile must override urlForComponent to handle native paths')
}
return `${window.location.origin}/components/assets/${component.identifier}/${nativeFeature.index_path}`
const baseUrlRequiredForThemesInsideEditors = window.location.origin
return `${baseUrlRequiredForThemesInsideEditors}/components/assets/${component.identifier}/${nativeFeature.index_path}`
}
let url = component.hosted_url || component.legacy_url
+6 -6
View File
@@ -4,13 +4,13 @@
<meta charset="utf-8">
<title>Mocha Tests</title>
<link href="assets/mocha.css" rel="stylesheet" />
<script src="../../../.yarn/unplugged/chai-npm-4.3.6-dba90e4b0b/node_modules/chai/chai.js"></script>
<script src="https://unpkg.com/[email protected]/chai.js"></script>
<script src="./vendor/chai-as-promised-built.js"></script>
<script src="../../../.yarn/unplugged/regenerator-runtime-npm-0.13.9-6d02340eec/node_modules/regenerator-runtime/runtime.js"></script>
<script src="../../../.yarn/unplugged/mocha-npm-9.2.2-f7735febb8/node_modules/mocha/mocha.js"></script>
<script src="../../../.yarn/unplugged/chai-subset-npm-1.6.0-3cee47a65d/node_modules/chai-subset/lib/chai-subset.js"></script>
<script src="../../sncrypto-web/dist//sncrypto-web.js"></script>
<script src="../../../.yarn/unplugged/sinon-npm-13.0.2-8544b59862/node_modules/sinon/pkg/sinon.js"></script>
<script src="https://unpkg.com/regenerator-runtime@0.13.9/runtime.js"></script>
<script src="https://unpkg.com/[email protected]/mocha.js"></script>
<script src="https://unpkg.com/[email protected]/lib/chai-subset.js"></script>
<script src="https://unpkg.com/[email protected]/pkg/sinon.js"></script>
<script src="./vendor/sncrypto-web.js"></script>
<script src="../dist/snjs.js"></script>
<script>
const urlParams = new URLSearchParams(window.location.search);
+5 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/snjs",
"version": "2.123.2",
"version": "2.124.1",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -8,12 +8,15 @@
"author": "Standard Notes",
"types": "dist/@types",
"files": [
"dist"
"dist",
"mocha",
"e2e-server.js"
],
"license": "AGPL-3.0-or-later",
"private": true,
"scripts": {
"start": "webpack -w --config webpack.dev.js",
"start:test-server": "yarn node e2e-server.js",
"clean": "rm -fr dist",
"prebuild": "yarn clean",
"build": "yarn tsc && webpack --config webpack.prod.js",
@@ -37,9 +40,6 @@
"@typescript-eslint/eslint-plugin": "^5.30.0",
"babel-jest": "^28.1.2",
"babel-loader": "^8.2.3",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"chai-subset": "^1.6.0",
"circular-dependency-plugin": "^5.2.2",
"crypto-js": "^4.1.1",
"docdash": "^1.2.0",
@@ -52,13 +52,9 @@
"jsdom": "^19.0.0",
"libsodium-wrappers": "^0.7.9",
"lodash": "^4.17.21",
"mocha": "^9.2.1",
"mocha-headless-chrome": "^4.0.0",
"nock": "^13.2.4",
"otplib": "^12.0.1",
"regenerator-runtime": "^0.13.9",
"script-loader": "^0.7.2",
"sinon": "^13.0.1",
"ts-jest": "^28.0.5",
"ts-loader": "^9.2.6",
"ts-node": "^10.8.1",
+54
View File
@@ -3,6 +3,60 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.94](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-11)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.93](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-09)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.92](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.91](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.90](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.89](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-08)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.88](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.87](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.86](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.85](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.84](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
### Reverts
* Revert "chore: deps (#1222)" ([7017032](https://github.com/standardnotes/app/commit/701703289330baee4a5082df42bb787694fe7509)), closes [#1222](https://github.com/standardnotes/app/issues/1222)
## [1.2.83](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.82](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.81](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web-server
-36
View File
@@ -1,36 +0,0 @@
# Load DSL and set up stages
require "capistrano/setup"
# Include default deployment tasks
require "capistrano/deploy"
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
require "capistrano/scm/git-with-submodules"
install_plugin Capistrano::SCM::Git::WithSubmodules
# Include tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
#
# https://github.com/capistrano/rvm
# https://github.com/capistrano/rbenv
# https://github.com/capistrano/chruby
# https://github.com/capistrano/bundler
# https://github.com/capistrano/rails
# https://github.com/capistrano/passenger
#
require 'capistrano/rvm'
# require 'capistrano/rbenv'
# require 'capistrano/chruby'
require 'capistrano/bundler'
require 'capistrano/rails/assets'
# require 'capistrano/rails/migrations'
require 'capistrano/passenger'
# require 'capistrano/sidekiq'
# require "whenever/capistrano" # Update crontab on deploy
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
+7 -44
View File
@@ -1,53 +1,16 @@
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'dotenv-rails'
gem 'lograge', '~> 0.11.2'
gem 'newrelic_rpm', '~> 7.0'
gem 'non-stupid-digest-assets'
gem 'rack-cors', require: 'rack/cors'
gem 'rails', '5.1.7'
gem 'sass'
gem "non-stupid-digest-assets"
gem 'secure_headers'
gem 'uglifier'
gem 'rack-cors', :require => 'rack/cors'
gem 'dotenv-rails'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Used for 'respond_to' feature
gem 'responders', '~> 2.0'
gem 'tzinfo-data'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '3.5.1'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'puma'
gem 'haml'
# Deployment tools
gem 'capistrano'
gem 'capistrano-bundler'
gem 'capistrano-passenger', '>= 0.2.0'
gem 'capistrano-rails'
gem 'capistrano-rvm'
gem 'capistrano-sidekiq'
gem 'capistrano-git-with-submodules', '~> 2.0'
gem 'spring'
gem 'web-console', '3.5.1'
end
gem "lograge", "~> 0.11.2"
gem "newrelic_rpm", "~> 7.0"
-76
View File
@@ -38,52 +38,21 @@ GEM
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
airbrussh (1.4.0)
sshkit (>= 1.6.1, != 1.7.0)
arel (8.0.0)
bindex (0.8.1)
builder (3.2.4)
byebug (11.1.3)
capistrano (3.16.0)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capistrano-bundler (2.0.1)
capistrano (~> 3.1)
capistrano-git-with-submodules (2.0.4)
capistrano (~> 3.7)
capistrano-passenger (0.2.1)
capistrano (~> 3.0)
capistrano-rails (1.6.1)
capistrano (~> 3.1)
capistrano-bundler (>= 1.1, < 3)
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
capistrano-sidekiq (2.0.0)
capistrano (>= 3.9.0)
capistrano-bundler
sidekiq (>= 6.0)
concurrent-ruby (1.1.9)
connection_pool (2.2.5)
crass (1.0.6)
dotenv (2.7.6)
dotenv-rails (2.7.6)
dotenv (= 2.7.6)
railties (>= 3.2)
erubi (1.10.0)
execjs (2.8.1)
ffi (1.15.5)
ffi (1.15.5-x64-mingw32)
globalid (1.0.0)
activesupport (>= 5.0)
haml (5.2.2)
temple (>= 0.8.0)
tilt
i18n (1.10.0)
concurrent-ruby (~> 1.0)
json (1.8.6)
lograge (0.11.2)
actionpack (>= 4)
activesupport (>= 4)
@@ -98,9 +67,6 @@ GEM
mini_mime (1.1.2)
mini_portile2 (2.7.1)
minitest (5.15.0)
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (6.1.0)
newrelic_rpm (7.2.0)
nio4r (2.5.8)
nokogiri (1.13.1)
@@ -146,29 +112,9 @@ GEM
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (13.0.6)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
rdoc (4.3.0)
redis (4.6.0)
request_store (1.5.1)
rack (>= 1.4)
responders (2.4.1)
actionpack (>= 4.2.0, < 6.0)
railties (>= 4.2.0, < 6.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sdoc (0.4.2)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
secure_headers (6.3.3)
sidekiq (6.4.1)
connection_pool (>= 2.2.2)
rack (~> 2.0)
redis (>= 4.2.0)
spring (3.1.1)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
@@ -177,19 +123,10 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sshkit (1.21.2)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
temple (0.8.2)
thor (1.2.1)
thread_safe (0.3.6)
tilt (2.0.10)
tzinfo (1.2.9)
thread_safe (~> 0.1)
tzinfo-data (1.2021.5)
tzinfo (>= 1.0.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
web-console (3.5.1)
actionview (>= 5.0)
activemodel (>= 5.0)
@@ -207,28 +144,15 @@ PLATFORMS
DEPENDENCIES
byebug
capistrano
capistrano-bundler
capistrano-git-with-submodules (~> 2.0)
capistrano-passenger (>= 0.2.0)
capistrano-rails
capistrano-rvm
capistrano-sidekiq
dotenv-rails
haml
lograge (~> 0.11.2)
newrelic_rpm (~> 7.0)
non-stupid-digest-assets
puma
rack-cors
rails (= 5.1.7)
responders (~> 2.0)
sass
sdoc (~> 0.4.0)
secure_headers
spring
tzinfo-data
uglifier
web-console (= 3.5.1)
BUNDLED WITH
+1 -2
View File
@@ -1,5 +1,4 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
# Add your own tasks in files placed in lib/tasks ending in .rakeand they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
-20
View File
@@ -1,5 +1,4 @@
require_relative 'boot'
# require 'rails/all'
require "active_model/railtie"
require "action_controller/railtie"
@@ -24,10 +23,6 @@ module Web
end
end
# config.action_dispatch.default_headers = {
# 'X-Frame-Options' => 'ALLOWALL'
# }
SecureHeaders::Configuration.default do |config|
# Handled by server
config.x_frame_options = SecureHeaders::OPT_OUT
@@ -59,8 +54,6 @@ module Web
}
end
# config.middleware.use Rack::Deflater
config.middleware.insert_before(Rack::Sendfile, Rack::Deflater)
# Disable auto creation of additional resources with "rails generate"
@@ -74,18 +67,5 @@ module Web
end
config.action_mailer.default_url_options = { host: ENV['APP_HOST'] }
# SMTP settings
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => ENV['SMTP_HOST'],
:port => ENV['SMTP_PORT'],
:domain => ENV['SMTP_DOMAIN'],
:user_name => ENV['SMTP_USERNAME'],
:password => ENV['SMTP_PASSWORD'],
:authentication => 'login',
:enable_starttls_auto => true # detects and uses STARTTLS
}
end
end
@@ -1,15 +0,0 @@
default: &default
key_path: /path/to/key.pem
repo_url: https://github.com/sn-project/sn-web-client.git
user: ssh_username
staging:
<<: *default
server: staging.yourdomain.com
branch: staging
deploy_to: ~/sn-staging-client
production:
<<: *default
server: yourdomain.com
deploy_to: ~/sn-prod-client
-49
View File
@@ -1,49 +0,0 @@
CAP_CONFIG = YAML.load_file("config/cap.yml")
set :application, 'standard-notes'
set :repo_url, CAP_CONFIG["default"]["repo_url"]
# Default branch is :master
set :branch, `git rev-parse --abbrev-ref main`.chomp
# Default deploy_to directory is /var/www/my_app_name
# set :deploy_to, '/var/www/my_app_name'
# Default value for :format is :airbrussh.
# set :format, :airbrussh
# You can configure the Airbrussh format using :format_options.
# These are the defaults.
# set :format_options, command_output: true, log_file: 'log/capistrano.log', color: :auto, truncate: :auto
# Default value for :pty is false
# set :pty, true
# Default value for :linked_files is []
# set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml')
set :linked_files, fetch(:linked_files, []).push('.env')
# Default value for linked_dirs is []
# set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'public/system')
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'public/system', 'public/uploads')
# Default value for keep_releases is 5
# set :keep_releases, 5
namespace :deploy do
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 5 do
# Here we can do anything such as:
within release_path do
end
end
end
end
set :ssh_options, {
keys: %W( #{CAP_CONFIG['default']['key_path']} ),
forward_agent: false,
auth_methods: %w(publickey)
}

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