mirror of
https://github.com/standardnotes/server
synced 2026-01-17 05:04:27 -05:00
Compare commits
111 Commits
@standardn
...
@standardn
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f58f90667c | ||
|
|
a388e1a802 | ||
|
|
8811d10a73 | ||
|
|
c7a394cd1a | ||
|
|
b7615a7f2e | ||
|
|
1ca70c1e50 | ||
|
|
253cbb1d0c | ||
|
|
e38a16404c | ||
|
|
f17a1f875c | ||
|
|
2237e0f5df | ||
|
|
0df471585f | ||
|
|
95aac1a7bf | ||
|
|
c078bc958d | ||
|
|
49c27924ea | ||
|
|
c9dd8e7338 | ||
|
|
5ef90cc75b | ||
|
|
063c61d96c | ||
|
|
0cb5e36b20 | ||
|
|
319bab5b34 | ||
|
|
90a4f2111f | ||
|
|
3aba202970 | ||
|
|
c8974b7fa2 | ||
|
|
3654a19586 | ||
|
|
5f0929c1aa | ||
|
|
c0fa83bce6 | ||
|
|
c201ee42a0 | ||
|
|
e6a4cc3098 | ||
|
|
39f2fe2ba1 | ||
|
|
72ce190996 | ||
|
|
527dd1b61b | ||
|
|
af8feaadfe | ||
|
|
3164f76662 | ||
|
|
d6e531d4b6 | ||
|
|
af76878dad | ||
|
|
28cce39fe7 | ||
|
|
a8b806af08 | ||
|
|
fa0b0294b4 | ||
|
|
58ab410b0a | ||
|
|
51c8b20506 | ||
|
|
1e62a3760e | ||
|
|
2f569d4104 | ||
|
|
f23e444ed0 | ||
|
|
e6e9a32f03 | ||
|
|
8237df33a7 | ||
|
|
624b574013 | ||
|
|
d762bc89d1 | ||
|
|
f0cbec07b8 | ||
|
|
8c1f583968 | ||
|
|
b28636fa73 | ||
|
|
092054fd44 | ||
|
|
9391917d08 | ||
|
|
5cf008f53d | ||
|
|
231194bd53 | ||
|
|
2707e87554 | ||
|
|
4b40c59e7e | ||
|
|
f2e8579f95 | ||
|
|
57118c85e3 | ||
|
|
8ddc7b0a58 | ||
|
|
bc63d0aeea | ||
|
|
9def26e809 | ||
|
|
74ac709bb5 | ||
|
|
1f749fad49 | ||
|
|
13c85d4331 | ||
|
|
77d2099cdb | ||
|
|
56a312f217 | ||
|
|
aa2b3dac49 | ||
|
|
1a8daef79d | ||
|
|
a83d133f93 | ||
|
|
b0d01dffd9 | ||
|
|
b74e7ce86d | ||
|
|
671f7a7074 | ||
|
|
55fd873b37 | ||
|
|
32c667b22d | ||
|
|
a6b062f638 | ||
|
|
f9183b4c62 | ||
|
|
c7d575a0ff | ||
|
|
a575e62519 | ||
|
|
3761d60f41 | ||
|
|
fd629d43ba | ||
|
|
76b1cb0f5a | ||
|
|
2f94abc9f7 | ||
|
|
c70040fe5d | ||
|
|
4b8a9e448a | ||
|
|
1e4c7d0f31 | ||
|
|
ec75795a02 | ||
|
|
ad26b64b28 | ||
|
|
9e4715ebbd | ||
|
|
cc612296d0 | ||
|
|
1148b3948c | ||
|
|
c7e605fd60 | ||
|
|
4ab32c670e | ||
|
|
2d810568a8 | ||
|
|
b8353aa817 | ||
|
|
7924f63e28 | ||
|
|
b3b617ea0b | ||
|
|
18a5071618 | ||
|
|
fea58029b9 | ||
|
|
e748723209 | ||
|
|
8a47d81936 | ||
|
|
7ae9f5694d | ||
|
|
9031379469 | ||
|
|
dc71e6777f | ||
|
|
89eb798fa8 | ||
|
|
4304e068b9 | ||
|
|
126bc6de6a | ||
|
|
c2b9107f13 | ||
|
|
1471f4a839 | ||
|
|
b0b3c6671d | ||
|
|
6ddb8fb6c2 | ||
|
|
66da49b0df | ||
|
|
750cd26c36 |
@@ -15,6 +15,7 @@ DB_TYPE=mysql
|
||||
|
||||
REDIS_PORT=6379
|
||||
REDIS_HOST=cache
|
||||
CACHE_TYPE=redis
|
||||
|
||||
########
|
||||
# KEYS #
|
||||
|
||||
1
.github/ci.env
vendored
1
.github/ci.env
vendored
@@ -4,6 +4,7 @@ DB_USERNAME=std_notes_user
|
||||
DB_PASSWORD=changeme123
|
||||
DB_DATABASE=standard_notes_db
|
||||
DB_PORT=3306
|
||||
DB_SQLITE_DATABASE_PATH=standard_notes_db
|
||||
REDIS_PORT=6379
|
||||
REDIS_HOST=cache
|
||||
AUTH_SERVER_ACCESS_TOKEN_AGE=4
|
||||
|
||||
92
.github/workflows/common-e2e.yml
vendored
92
.github/workflows/common-e2e.yml
vendored
@@ -19,15 +19,7 @@ on:
|
||||
|
||||
jobs:
|
||||
e2e:
|
||||
strategy:
|
||||
matrix:
|
||||
database: [ "mysql", "sqlite" ]
|
||||
include:
|
||||
- cache: "redis"
|
||||
database: "mysql"
|
||||
- cache: "memory"
|
||||
database: "sqlite"
|
||||
|
||||
name: (Docker) E2E Test Suite
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
@@ -45,14 +37,92 @@ jobs:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Install
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Run Server
|
||||
run: docker compose -f docker-compose.ci.yml up -d
|
||||
env:
|
||||
DB_TYPE: ${{ matrix.database }}
|
||||
CACHE_TYPE: ${{ matrix.cache }}
|
||||
DB_TYPE: mysql
|
||||
CACHE_TYPE: redis
|
||||
|
||||
- name: Wait for server to start
|
||||
run: docker/is-available.sh http://localhost:3123 $(pwd)/logs
|
||||
|
||||
- name: Run E2E Test Suite
|
||||
run: yarn dlx mocha-headless-chrome --timeout 1200000 -f http://localhost:9001/mocha/test.html
|
||||
|
||||
e2e-home-server:
|
||||
name: (Home Server) E2E Test Suite
|
||||
strategy:
|
||||
matrix:
|
||||
db_type: [mysql, sqlite]
|
||||
cache_type: [redis, memory]
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
snjs:
|
||||
image: standardnotes/snjs:${{ inputs.snjs_image_tag }}
|
||||
ports:
|
||||
- 9001:9001
|
||||
cache:
|
||||
image: redis
|
||||
ports:
|
||||
- 6379:6379
|
||||
db:
|
||||
image: mysql
|
||||
ports:
|
||||
- 3306:3306
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: standardnotes
|
||||
MYSQL_USER: standardnotes
|
||||
MYSQL_PASSWORD: standardnotes
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
- name: Copy dotenv file
|
||||
run: cp packages/home-server/.env.sample packages/home-server/.env
|
||||
|
||||
- name: Fill in env variables
|
||||
run: |
|
||||
sed -i "s/JWT_SECRET=/JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
|
||||
sed -i "s/AUTH_JWT_SECRET=/AUTH_JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
|
||||
sed -i "s/ENCRYPTION_SERVER_KEY=/ENCRYPTION_SERVER_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
|
||||
sed -i "s/PSEUDO_KEY_PARAMS_KEY=/PSEUDO_KEY_PARAMS_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
|
||||
sed -i "s/VALET_TOKEN_SECRET=/VALET_TOKEN_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
|
||||
echo "ACCESS_TOKEN_AGE=4" >> packages/home-server/.env
|
||||
echo "REFRESH_TOKEN_AGE=7" >> packages/home-server/.env
|
||||
echo "REVISIONS_FREQUENCY=5" >> packages/home-server/.env
|
||||
echo "DB_HOST=db" >> packages/home-server/.env
|
||||
echo "DB_PORT=3306" >> packages/home-server/.env
|
||||
echo "DB_USERNAME=standardnotes" >> packages/home-server/.env
|
||||
echo "DB_PASSWORD=standardnotes" >> packages/home-server/.env
|
||||
echo "DB_TYPE=${{ matrix.db_type }}" >> packages/home-server/.env
|
||||
echo "REDIS_URL=redis://cache" >> packages/home-server/.env
|
||||
echo "CACHE_TYPE=${{ matrix.cache_type }}" >> packages/home-server/.env
|
||||
|
||||
- name: Run Server
|
||||
run: nohup yarn workspace @standardnotes/home-server start &
|
||||
env:
|
||||
PORT: 3123
|
||||
|
||||
- name: Wait for server to start
|
||||
run: for i in {1..30}; do curl -s http://localhost:3123/healthcheck && break || sleep 1; done
|
||||
|
||||
- name: Run E2E Test Suite
|
||||
run: yarn dlx mocha-headless-chrome --timeout 1200000 -f http://localhost:9001/mocha/test.html?skip_paid_features=true
|
||||
|
||||
9
.github/workflows/pr.yml
vendored
9
.github/workflows/pr.yml
vendored
@@ -25,6 +25,9 @@ jobs:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Install
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
@@ -50,6 +53,9 @@ jobs:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Install
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build
|
||||
@@ -79,6 +85,9 @@ jobs:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Install
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build
|
||||
|
||||
12
.github/workflows/publish.yml
vendored
12
.github/workflows/publish.yml
vendored
@@ -25,6 +25,9 @@ jobs:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Install
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
@@ -50,6 +53,9 @@ jobs:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Install
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build
|
||||
@@ -79,6 +85,9 @@ jobs:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Install
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build
|
||||
@@ -137,6 +146,9 @@ jobs:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Install
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -11,7 +11,6 @@ newrelic_agent.log
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/unplugged
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@aws-sdk-client-s3-npm-3.342.0-a2692091c5-9f3b9171dd.zip
vendored
Normal file
BIN
.yarn/cache/@aws-sdk-client-s3-npm-3.342.0-a2692091c5-9f3b9171dd.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@aws-sdk-client-sns-npm-3.342.0-94ce02a19b-8d7ccac0ed.zip
vendored
Normal file
BIN
.yarn/cache/@aws-sdk-client-sns-npm-3.342.0-94ce02a19b-8d7ccac0ed.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@aws-sdk-client-sqs-npm-3.342.0-f4e06f69ac-e08dd27f26.zip
vendored
Normal file
BIN
.yarn/cache/@aws-sdk-client-sqs-npm-3.342.0-f4e06f69ac-e08dd27f26.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@aws-sdk-client-sso-npm-3.342.0-be2d1dcabe-78748ec6a8.zip
vendored
Normal file
BIN
.yarn/cache/@aws-sdk-client-sso-npm-3.342.0-be2d1dcabe-78748ec6a8.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@aws-sdk-client-sso-oidc-npm-3.342.0-ead49d3554-083c2beff3.zip
vendored
Normal file
BIN
.yarn/cache/@aws-sdk-client-sso-oidc-npm-3.342.0-ead49d3554-083c2beff3.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@aws-sdk-client-sts-npm-3.342.0-ccdc6f5bcc-14475bf1b4.zip
vendored
Normal file
BIN
.yarn/cache/@aws-sdk-client-sts-npm-3.342.0-ccdc6f5bcc-14475bf1b4.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@aws-sdk-eventstream-codec-npm-3.342.0-599f1c19f8-b735b3ea18.zip
vendored
Normal file
BIN
.yarn/cache/@aws-sdk-eventstream-codec-npm-3.342.0-599f1c19f8-b735b3ea18.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
BIN
.yarn/cache/@aws-sdk-middleware-signing-npm-3.342.0-e6a817dad1-ccbede8d93.zip
vendored
Normal file
BIN
.yarn/cache/@aws-sdk-middleware-signing-npm-3.342.0-e6a817dad1-ccbede8d93.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
BIN
.yarn/cache/@aws-sdk-util-retry-npm-3.342.0-969adc3ffe-ef695eb274.zip
vendored
Normal file
BIN
.yarn/cache/@aws-sdk-util-retry-npm-3.342.0-969adc3ffe-ef695eb274.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-core-npm-7.22.1-4ec1915241-8fd937c298.zip
vendored
Normal file
BIN
.yarn/cache/@babel-core-npm-7.22.1-4ec1915241-8fd937c298.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-generator-npm-7.22.3-da14afacf5-29543a50bb.zip
vendored
Normal file
BIN
.yarn/cache/@babel-generator-npm-7.22.3-da14afacf5-29543a50bb.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user