Merge branch 'master' of github.com:Ocelot-Social-Community/Ocelot-Social

This commit is contained in:
Markus 2023-10-13 11:20:51 +02:00
commit c79b01ce68
50 changed files with 3441 additions and 5631 deletions

View File

@ -2,6 +2,7 @@ backend: &backend
- '.github/workflows/test-backend.yml'
- 'backend/**/*'
- 'neo4j/**/*'
- 'package.json'
docker: &docker
- 'docker-compose.*'
@ -9,3 +10,4 @@ docker: &docker
webapp: &webapp
- '.github/workflows/test-webapp.yml'
- 'webapp/**/*'
- 'package.json'

View File

@ -22,7 +22,7 @@ jobs:
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Cleanup
run: |

View File

@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup env
run: |
echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup env
run: |
echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
@ -96,7 +96,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup env
run: |
echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
@ -145,7 +145,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup env
run: |
echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
@ -243,7 +243,7 @@ jobs:
needs: [upload_to_dockerhub]
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full History for changelog
- name: Setup env
@ -283,7 +283,7 @@ jobs:
needs: [github_tag]
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full History for changelog
- name: Setup env

View File

@ -11,7 +11,7 @@ jobs:
backend: ${{ steps.changes.outputs.backend }}
docker: ${{ steps.changes.outputs.docker }}
steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4
- name: Check for backend file changes
uses: dorny/paths-filter@v2.11.1
@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Neo4J | Build 'community' image
run: |
@ -37,7 +37,7 @@ jobs:
- name: Cache docker images
id: cache-neo4j
uses: actions/cache/save@v3.3.1
uses: actions/cache/save@v3.3.2
with:
path: /tmp/neo4j.tar
key: ${{ github.run_id }}-backend-neo4j-cache
@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: backend | Build 'test' image
run: |
@ -58,7 +58,7 @@ jobs:
- name: Cache docker images
id: cache-backend
uses: actions/cache/save@v3.3.1
uses: actions/cache/save@v3.3.2
with:
path: /tmp/backend.tar
key: ${{ github.run_id }}-backend-cache
@ -70,7 +70,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: backend | Lint
run: cd backend && yarn && yarn run lint
@ -84,17 +84,17 @@ jobs:
checks: write
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Restore Neo4J cache
uses: actions/cache/restore@v3.3.1
uses: actions/cache/restore@v3.3.2
with:
path: /tmp/neo4j.tar
key: ${{ github.run_id }}-backend-neo4j-cache
fail-on-cache-miss: true
- name: Restore Backend cache
uses: actions/cache/restore@v3.3.1
uses: actions/cache/restore@v3.3.2
with:
path: /tmp/backend.tar
key: ${{ github.run_id }}-backend-cache
@ -127,6 +127,7 @@ jobs:
if: ${{ needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.docker == 'true' }}
needs: [files-changed, unit_test_backend]
runs-on: ubuntu-latest
permissions: write-all
continue-on-error: true
steps:
- name: Delete cache

View File

@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Copy env files
run: |
@ -36,7 +36,7 @@ jobs:
- name: Cache docker images
id: cache
uses: actions/cache/save@v3.3.1
uses: actions/cache/save@v3.3.2
with:
path: |
/opt/cucumber-json-formatter
@ -58,7 +58,7 @@ jobs:
job: [1, 2, 3, 4, 5, 6, 7, 8]
steps:
- name: Restore cache
uses: actions/cache/restore@v3.3.1
uses: actions/cache/restore@v3.3.2
id: cache
with:
path: |
@ -101,6 +101,7 @@ jobs:
name: Cleanup
needs: [docker_preparation, fullstack_tests]
runs-on: ubuntu-latest
permissions: write-all
continue-on-error: true
steps:
- name: Delete cache

View File

@ -11,7 +11,7 @@ jobs:
docker: ${{ steps.changes.outputs.docker }}
webapp: ${{ steps.changes.outputs.webapp }}
steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4
- name: Check for frontend file changes
uses: dorny/paths-filter@v2.11.1
@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check translation files
run: |
@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Webapp | Build 'test' image
run: |
@ -50,7 +50,7 @@ jobs:
docker save "ocelotsocialnetwork/webapp:test" > /tmp/webapp.tar
- name: Cache docker image
uses: actions/cache/save@v3.3.1
uses: actions/cache/save@v3.3.2
with:
path: /tmp/webapp.tar
key: ${{ github.run_id }}-webapp-cache
@ -62,7 +62,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: webapp | Lint
run: cd webapp && yarn && yarn run lint
@ -76,10 +76,10 @@ jobs:
checks: write
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Restore webapp cache
uses: actions/cache/restore@v3.3.1
uses: actions/cache/restore@v3.3.2
with:
path: /tmp/webapp.tar
key: ${{ github.run_id }}-webapp-cache
@ -103,6 +103,7 @@ jobs:
if: ${{ needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.webapp == 'true' }}
needs: [files-changed, unit_test_webapp]
runs-on: ubuntu-latest
permissions: write-all
continue-on-error: true
steps:
- name: Delete cache

2
.nvmrc
View File

@ -1 +1 @@
v19.4.0
v20.2.0

View File

@ -4,15 +4,101 @@ All notable changes to this project will be documented in this file. Dates are d
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
#### [3.0.2](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/3.0.0...3.0.2)
#### [3.1.2](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/3.1.0...3.1.2)
- fix(other): kubernetes error by degrading node version from v20.7.0 to v20.2.0 [`#6779`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6779)
- fix(backend): cypher statement in user locales unit test [`#6780`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6780)
- chore(release): release v3.1.1 move dkim to secrets and fix search etc. [`#6763`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6763)
- chore(other): move kubrnetes dkim from confmap to secret yaml [`#6761`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6761)
- build(other): bump @babel/preset-env from 7.22.9 to 7.22.20 in /backend [`#6741`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6741)
- build(other): bump @babel/register from 7.22.5 to 7.22.15 [`#6745`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6745)
- chore(other): add tail command as template comment to `docker-compose.yml` [`#6755`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6755)
- chore(other): upgrade node version in '.nvmrc' files to v20.6.0 [`#6758`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6758)
- build(other): bump @babel/plugin-proposal-throw-expressions from 7.8.3 to 7.22.5 in /backend [`#6742`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6742)
- build(other): bump @faker-js/faker from 8.0.2 to 8.1.0 [`#6743`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6743)
- fix(webapp): chat-only show counter if unread messages exist [`#6752`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6752)
- build(other): bump node from 20.6.0-alpine3.17 to 20.7.0-alpine3.17 in /webapp [`#6749`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6749)
- build(other): bump node from 20.6.0-alpine3.17 to 20.7.0-alpine3.17 in /backend [`#6748`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6748)
- fix(backend): post type as array in search posts query [`#6756`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6756)
- refactor(backend): remove redundant package metascraper-audio from backend [`#6724`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6724)
- test(other): update cypress related packages [`#6382`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6382)
- build(other): bump @storybook/vue from 6.3.6 to 7.4.0 in /webapp [`#6708`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6708)
- build(other): bump chai from 4.2.0 to 4.3.8 in /backend [`#6738`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6738)
- build(other): bump eslint-config-prettier from 8.8.0 to 9.0.0 in /backend [`#6737`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6737)
- build(other): bump slug from 6.1.0 to 8.2.3 [`#6716`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6716)
- build(other): bump jsonwebtoken from 8.5.1 to 9.0.2 [`#6707`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6707)
- build(other): bump expect from 29.6.1 to 29.6.4 [`#6699`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6699)
- build(other): bump node from 20.2.0-alpine3.17 to 20.6.0-alpine3.17 in /webapp [`#6709`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6709)
- build(other): bump node from 20.2.0-alpine3.17 to 20.6.0-alpine3.17 in /backend [`#6710`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6710)
- build(other): bump actions/cache from 3.3.1 to 3.3.2 [`#6714`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6714)
- build(other): bump actions/checkout from 3 to 4 [`#6713`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6713)
- Bump @storybook/vue from 6.3.6 to 7.4.0 in /webapp [`8113d47`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/8113d47dfcbfa0a63ae1f035d9d24a4c548d2089)
- Revert "update cypress packages" [`2229baf`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/2229baff6fb74d92ed395fb90a1421f994368a20)
- update cypress packages [`dbedcf9`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/dbedcf901d3040d1a6a8db62170bdea86d020bb1)
#### [3.1.0](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/3.0.4...3.1.0)
> 13 September 2023
- chore(release): release v3.1.0 use of dkim in deployment [`#6733`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6733)
- chore(other): use dkim values in helm script of backend [`#6731`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6731)
- fix(other): add global package.json to workflow file filters [`#6706`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6706)
- Release v3.1.0 [`6276d87`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/6276d87c6a427438c5fbf56c0f7bc414293e671d)
- Fix super fluid spaces [`ecdaf83`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/ecdaf83ac57bd4186f064d891d2570ce2438d47f)
- Use DKIM values in Helm script of backend [`2ea98b1`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/2ea98b1900c1b33712a2456dde6ba3dfb6d95b00)
#### [3.0.4](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/3.0.3...3.0.4)
> 12 September 2023
- chore(other): release v3.0.4 fix group link on map, embed backend shot down and bug on post language detect [`#6725`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6725)
- fix(other): fix backup script for neo4j v4 [`#6662`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6662)
- fix(other): fix workflow cache cleanup fail [`#6722`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6722)
- fix(backend): fix post language detection [`#6720`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6720)
- fix(webapp): add jsconfig.json to navigate in webapp. [`#6645`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6645)
- fix(backend): metascraper crash [`#6704`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6704)
- build(other): bump aws-sdk from 2.652.0 to 2.1425.0 in /backend [`#6651`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6651)
- build(other): bump @babel/preset-env from 7.9.5 to 7.22.9 in /backend [`#6578`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6578)
- build(other): bump @babel/preset-env from 7.22.7 to 7.22.9 [`#6572`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6572)
- build(other): bump dotenv from 8.6.0 to 16.3.1 [`#6483`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6483)
- Bump @babel/preset-env from 7.9.5 to 7.22.9 in /backend [`ae0c6f1`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/ae0c6f12bd86c39b33a2b48c2eeb0eccb880821c)
- Revert "Revert "Revert "update metascraper packages""" [`7fdc5e8`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/7fdc5e8f5ed8e191763acfcd74c510138145f612)
- Revert "Revert "update metascraper packages"" [`d5c1421`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/d5c142129291264d5508b3f32b8500c2451a5f39)
#### [3.0.3](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/3.0.2...3.0.3)
> 4 September 2023
- chore(release): release v3.0.3 fix chat avatar error, adjust layout of filter and enable e-mail dkim [`#6702`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6702)
- build(other): bump @babel/core from 7.22.8 to 7.22.9 [`#6573`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6573)
- feat(backend): implement dkim config for nodemailer [`#6692`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6692)
- fix(webapp): filtermenu mobile bug [`#6694`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6694)
- fix(webapp): fix proxyapiurl in chat rooms for the avatars [`#6693`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6693)
- fix(webapp): fix the group link in the map [`#6698`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6698)
- Bump @babel/core from 7.22.8 to 7.22.9 [`209390a`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/209390a7e026b03ee92f7b1ecb3b1a7b3b2e0232)
- Write documentation for DKIM e-mail setting [`9f5d32e`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/9f5d32e527151854f1888614c59e0aa5f2b504d0)
- Release v3.0.3 [`7d761c2`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/7d761c262a6e7bf6382cc49148c55ac8037db12a)
#### [3.0.2](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/3.0.1...3.0.2)
> 11 August 2023
- chore(release): release v3.0.2 fix chat avatar error and wrong font in network [`#6674`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6674)
- fix(webapp): fix wrong font in whole network comming from chat component [`#6672`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6672)
- fix(webapp): fix 'm.avatar is null' error message [`#6671`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6671)
- Release v3.0.2 [`7bcad81`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/7bcad81785de39115ba03aa37fb26caeff7775f2)
- Remove font 'Quicksand' from the chat [`5b95419`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/5b954197dc93bd5715f657539ca1b9b32d7d557a)
- Fix 'm.avatar is null' error message [`2c12331`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/2c123313ed6267bb1c88470ba7ae3f4f693cfc15)
#### [3.0.1](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/3.0.0...3.0.1)
> 9 August 2023
- chore(release): release v3.0.1 fix chat avatars [`#6667`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6667)
- fix(webapp): try to fix avatars [`#6660`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6660)
- Releasde v3.0.1 fix chat avatars [`0daeb5b`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/0daeb5b957e11d206ceddc3e8b275929e1850d18)
- Remove font 'Quicksand' from the chat [`5b95419`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/5b954197dc93bd5715f657539ca1b9b32d7d557a)
- conditional url replacement [`5c1ab88`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/5c1ab880127a5f4c1b457598fafd3ae9fe1a0d12)
- try to fix avatars [`6f43321`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/6f43321abad945602529b962e536546ab541cd70)
### [3.0.0](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/2.7.0...3.0.0)

View File

@ -8,9 +8,11 @@
[ocelot.social](https://ocelot.social) is free and open source software program code to run social networks. Its development is supported by a community of programmers and interested network operators.
<!-- markdownlint-disable MD033 -->
<p align="center">
<a href="https://ocelot.social" target="_blank"><img src="webapp/static/img/custom/logo-squared.svg" alt="ocelot.social" width="40%" height="40%"></a>
</p>
<!-- markdownlint-enable MD033 -->
Our goal is to enable people to participate fairly and equally in online social networks. The equality of opportunity applies both to the fundamental equality of all people and to the possibility of letting their diverse voices be heard.

View File

@ -16,7 +16,7 @@
* [Frontend tests](webapp/testing.md)
* [Backend tests](backend/testing.md)
* [Docker More Closely](DOCKER_MORE_CLOSELY.md)
* [Deployment](https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/blob/master/deployment/README.md)
* [Deployment](deployment/README.md)
* [Contributing](CONTRIBUTING.md)
* [Feature Specification](cypress/features.md)
* [Code of conduct](CODE_OF_CONDUCT.md)

View File

@ -5,11 +5,19 @@ NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=letmein
GRAPHQL_URI=http://localhost:4000
CLIENT_URI=http://localhost:3000
# EMail
EMAIL_SUPPORT="devops@ocelot.social"
EMAIL_DEFAULT_SENDER="devops@ocelot.social"
SMTP_HOST=
SMTP_PORT=
SMTP_IGNORE_TLS=true
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_SECURE="false" # true for 465, false for other ports
SMTP_DKIM_DOMAINNAME=
SMTP_DKIM_KEYSELECTOR=
SMTP_DKIM_PRIVATKEY=
JWT_SECRET="b/&&7b78BF&fv/Vd"
JWT_EXPIRES="2y"
@ -28,7 +36,4 @@ AWS_ENDPOINT=
AWS_REGION=
AWS_BUCKET=
EMAIL_DEFAULT_SENDER="devops@ocelot.social"
EMAIL_SUPPORT="devops@ocelot.social"
CATEGORIES_ACTIVE=false

View File

@ -1,6 +1,6 @@
{
"name": "ocelot-social-backend",
"version": "3.0.2",
"version": "3.1.2",
"description": "GraphQL Backend for ocelot.social",
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
"author": "ocelot.social Community",
@ -26,8 +26,8 @@
"@babel/cli": "~7.8.4",
"@babel/core": "~7.9.0",
"@babel/node": "~7.8.7",
"@babel/plugin-proposal-throw-expressions": "^7.8.3",
"@babel/preset-env": "~7.9.5",
"@babel/plugin-proposal-throw-expressions": "^7.22.5",
"@babel/preset-env": "~7.22.20",
"@babel/register": "^7.9.0",
"@sentry/node": "^5.15.4",
"apollo-cache-inmemory": "~1.6.5",
@ -36,7 +36,7 @@
"apollo-link-http": "~1.5.17",
"apollo-server": "~2.14.2",
"apollo-server-express": "^2.14.2",
"aws-sdk": "^2.652.0",
"aws-sdk": "^2.1425.0",
"babel-core": "~7.0.0-0",
"babel-eslint": "~10.1.0",
"babel-jest": "~25.2.6",
@ -61,7 +61,6 @@
"lodash": "~4.17.14",
"merge-graphql-schemas": "^1.7.8",
"metascraper": "^5.33.5",
"metascraper-audio": "^5.34.4",
"metascraper-author": "^5.33.5",
"metascraper-date": "^5.33.5",
"metascraper-description": "^5.33.5",
@ -101,10 +100,10 @@
"@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1",
"apollo-server-testing": "~2.11.0",
"chai": "~4.2.0",
"chai": "~4.3.8",
"cucumber": "~6.0.5",
"eslint": "^8.37.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard": "^17.0.0",
"eslint-import-resolver-typescript": "^3.5.4",
"eslint-plugin-import": "^2.27.5",

View File

@ -40,6 +40,8 @@ const server = {
JWT_EXPIRES: env.JWT_EXPIRES || '2y',
}
const hasDKIMData = env.SMTP_DKIM_DOMAINNAME && env.SMTP_DKIM_KEYSELECTOR && env.SMTP_DKIM_PRIVATKEY
const smtp = {
SMTP_HOST: env.SMTP_HOST,
SMTP_PORT: env.SMTP_PORT,
@ -47,6 +49,10 @@ const smtp = {
SMTP_SECURE: env.SMTP_SECURE === 'true',
SMTP_USERNAME: env.SMTP_USERNAME,
SMTP_PASSWORD: env.SMTP_PASSWORD,
SMTP_DKIM_DOMAINNAME: hasDKIMData && env.SMTP_DKIM_DOMAINNAME,
SMTP_DKIM_KEYSELECTOR: hasDKIMData && env.SMTP_DKIM_KEYSELECTOR,
// PEM format: https://docs.progress.com/bundle/datadirect-hybrid-data-pipeline-installation-46/page/PEM-file-format.html
SMTP_DKIM_PRIVATKEY: hasDKIMData && env.SMTP_DKIM_PRIVATKEY.replace(/\\n/g, '\n'), // replace all "\n" in .env string by real line break
}
const neo4j = {

View File

@ -5,6 +5,8 @@ import { htmlToText } from 'nodemailer-html-to-text'
const hasEmailConfig = CONFIG.SMTP_HOST && CONFIG.SMTP_PORT
const hasAuthData = CONFIG.SMTP_USERNAME && CONFIG.SMTP_PASSWORD
const hasDKIMData =
CONFIG.SMTP_DKIM_DOMAINNAME && CONFIG.SMTP_DKIM_KEYSELECTOR && CONFIG.SMTP_DKIM_PRIVATKEY
let sendMailCallback: any = async () => {}
if (!hasEmailConfig) {
@ -44,6 +46,11 @@ if (!hasEmailConfig) {
user: CONFIG.SMTP_USERNAME,
pass: CONFIG.SMTP_PASSWORD,
},
dkim: hasDKIMData && {
domainName: CONFIG.SMTP_DKIM_DOMAINNAME,
keySelector: CONFIG.SMTP_DKIM_KEYSELECTOR,
privateKey: CONFIG.SMTP_DKIM_PRIVATKEY,
},
})
transporter.use(

View File

@ -131,4 +131,25 @@ describe('languagesMiddleware', () => {
},
})
})
describe('detects no language', () => {
it('has default language', async () => {
variables = {
...variables,
content: '',
}
await expect(
mutate({
mutation: createPostMutation,
variables,
}),
).resolves.toMatchObject({
data: {
CreatePost: {
language: 'en',
},
},
})
})
})
})

View File

@ -1,20 +1,24 @@
import LanguageDetect from 'languagedetect'
import { removeHtmlTags } from '../helpers/cleanHtml'
const setPostLanguage = (text) => {
const setPostLanguage = (text, defaultLanguage) => {
const lngDetector = new LanguageDetect()
lngDetector.setLanguageType('iso2')
return lngDetector.detect(removeHtmlTags(text), 1)[0][0]
let languages = lngDetector.detect(removeHtmlTags(text), 1)
if (!(Array.isArray(languages) && languages.length > 0)) {
languages = [[defaultLanguage, 1.0]]
}
return languages[0][0]
}
export default {
Mutation: {
CreatePost: async (resolve, root, args, context, info) => {
args.language = await setPostLanguage(args.content)
args.language = await setPostLanguage(args.content, context.user.locale)
return resolve(root, args, context, info)
},
UpdatePost: async (resolve, root, args, context, info) => {
args.language = await setPostLanguage(args.content)
args.language = await setPostLanguage(args.content, context.user.locale)
return resolve(root, args, context, info)
},
},

View File

@ -20,7 +20,6 @@ const metascraper = Metascraper([
require('metascraper-publisher')(),
require('metascraper-title')(),
require('metascraper-url')(),
require('metascraper-audio')(),
require('metascraper-soundcloud')(),
require('metascraper-video')(),
require('metascraper-youtube')(),

View File

@ -110,7 +110,13 @@ const searchResultPromise = async (session, setup, params) => {
}
const searchResultCallback = (result) => {
return result.records.map((r) => r.get('result'))
const response = result.records.map((r) => r.get('result'))
if (Array.isArray(response) && response.length && response[0].__typename === 'Post') {
response.forEach((post) => {
post.postType = [post.postType]
})
}
return response
}
const countResultCallback = (result) => {

View File

@ -208,7 +208,7 @@ describe('userMiddleware', () => {
}
await mutate({ mutation: updateUserMutation, variables })
const locations = await neode.cypher(
`MATCH (city:Location)-[:IS_IN]->(state:Location)-[:IS_IN]->(country:Location) return city {.*}, state {.*}, country {.*}`,
`MATCH (city:Location)-[:IS_IN]->(district:Location)-[:IS_IN]->(state:Location)-[:IS_IN]->(country:Location) return city {.*}, state {.*}, country {.*}`,
)
expect(
locations.records.map((record) => {

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
import { When } from "@badeball/cypress-cucumber-preprocessor";
When("I comment the following:", async text => {
When("I comment the following:", text => {
const comment = text.replace("\n", " ")
cy.task('pushValue', { name: 'lastComment', value: comment })
cy.get(".editor .ProseMirror").type(comment);

View File

@ -1,6 +1,6 @@
import { When } from "@badeball/cypress-cucumber-preprocessor";
When("I choose {string} as the title", async title => {
When("I choose {string} as the title", title => {
const lastPost = {}
lastPost.title = title.replace("\n", " ");
cy.task('pushValue', { name: 'lastPost', value: lastPost })

View File

@ -1,6 +1,6 @@
import { Then } from "@badeball/cypress-cucumber-preprocessor";
Then("the post was saved successfully", async () => {
Then("the post was saved successfully", () => {
cy.task('getValue', 'lastPost').then(lastPost => {
cy.get(".base-card > .title").should("contain", lastPost.title);
cy.get(".content").should("contain", lastPost.content);

View File

@ -1,6 +1,6 @@
import { When } from "@badeball/cypress-cucumber-preprocessor";
When("I choose the following text as content:", async text => {
When("I choose the following text as content:", text => {
cy.task('getValue', 'lastPost').then(lastPost => {
lastPost.content = text.replace("\n", " ");
cy.task('pushValue', { name: 'lastPost', value: lastPost })

View File

@ -6,11 +6,11 @@
[![Open Source Helpers](https://www.codetriage.com/ocelot-social-community/ocelot-social-deploy-rebranding/badges/users.svg)](https://www.codetriage.com/ocelot-social-community/ocelot-social-deploy-rebranding)
This repository is an in use template to rebrand, configure, and deploy [ocelot.social](https://github.com/Ocelot-Social-Community/Ocelot-Social) networks.
The forked original repository is [Ocelot-Social-Deploy-Rebranding](https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding).
The forked original repository is [stage.ocelot.social](https://github.com/Ocelot-Social-Community/stage.ocelot.social).
<!-- markdownlint-disable MD033 -->
<p align="center">
<a href="https://ocelot.social" target="_blank"><img src="branding/static/img/custom/logo-squared.svg" alt="Ocelot-Social" width="40%" height="40%"></a>
<a href="https://ocelot.social" target="_blank"><img src="../webapp/static/img/custom/logo-squared.svg" alt="ocelot.social" width="40%" height="40%"></a>
</p>
<!-- markdownlint-enable MD033 -->
@ -47,7 +47,8 @@ Since all deployment methods described here depend on [Docker](https://docker.co
The next step is:
- [Configure And Branding](/branding/README.md)
- [Set Environment Variables and Configurations](./deployment-values.md)
- [Configure And Branding](./configurations/stage.ocelot.social/branding/README.md)
### Optional: Locally Testing Configuration And Branding
@ -99,7 +100,7 @@ See the login details and browser addresses above.
### Deployment
Afterwards you can [deploy](/deployment/README.md) it on your server:
Afterwards you can [deploy](/deployment/deployment.md) it on your server:
- [Kubernetes with Helm](/deployment/kubernetes/README.md)

View File

@ -1,6 +1,13 @@
# Todo For Next Update
When you overtake this deploy and rebrand repo to your network you have to recognize the following changes and doings:
When you introduce a new version and branding and deploy it on your network, you need to consider the following changes and actions:
## Version >= 3.3.0 with 'ocelotDockerVersionTag' 3.3.0-XXX
- We have the new option to configure DKIM for sent e-mails in environment variables (`.env` or `values.yaml`), see [here](deployment.md):
- `SMTP_DKIM_DOMAINNAME=`
- `SMTP_DKIM_KEYSELECTOR=`
- `SMTP_DKIM_PRIVATKEY=`
## Version >= 2.7.0 with 'ocelotDockerVersionTag' 2.7.0-470

View File

@ -0,0 +1,38 @@
# Deployment Values
For each deployment, you need to set the environment variables and configurations.
Here is some specific information on how to set the values.
## E-Mails
You need to set environment variables to send registration and invitation information or notifications to users, for example.
### SPF and DKIM
More and more e-mail providers require settings for authorization and verification of e-mail senders.
### SPF
Sometimes it is enough to create an SPF record in your DNS.
### DKIM
However, if you need DKIM authorization and verification, you must set the appropriate environment variables:
```bash
SMTP_DKIM_DOMAINNAME=<your e-mail sender domain>
SMTP_DKIM_KEYSELECTOR=2017
SMTP_DKIM_PRIVATKEY="-----BEGIN RSA PRIVATE KEY-----\n<your base64 encoded privat key data>\n-----END RSA PRIVATE KEY-----\n"
```
You can find out how DKIM works here:
<https://www.ionos.com/digitalguide/e-mail/e-mail-security/dkim-domainkeys/>
To create the private and public DKIM key, see here:
<https://knowledge.ondmarc.redsift.com/en/articles/2141592-generating-2048-bits-dkim-public-and-private-keys-using-openssl-on-a-mac>
Information about the required PEM format can be found here:
<https://docs.progress.com/bundle/datadirect-hybrid-data-pipeline-installation-46/page/PEM-file-format.html>

View File

@ -32,7 +32,7 @@ sleep 60
# database backup
kubectl --kubeconfig=${KUBECONFIG} -n default exec -it \
$(kubectl --kubeconfig=${KUBECONFIG} -n default get pods | grep ocelot-neo4j | awk '{ print $1 }') \
-- neo4j-admin dump --to=/var/lib/neo4j/$BACKUP_DATE-neo4j-dump
-- neo4j-admin dump --database=graph.db --to=/var/lib/neo4j/$BACKUP_DATE-neo4j-dump
# copy neo4j backup to local drive
kubectl --kubeconfig=${KUBECONFIG} cp \
default/$(kubectl --kubeconfig=${KUBECONFIG} -n default get pods | grep ocelot-neo4j |awk '{ print $1 }'):/var/lib/neo4j/$BACKUP_DATE-neo4j-dump $BACKUP_FOLDER/neo4j-dump

View File

@ -21,6 +21,8 @@ data:
SMTP_PORT: "{{ .Values.BACKEND.SMTP_PORT }}"
SMTP_IGNORE_TLS: "{{ .Values.BACKEND.SMTP_IGNORE_TLS }}"
SMTP_SECURE: "{{ .Values.BACKEND.SMTP_SECURE }}"
SMTP_DKIM_DOMAINNAME: "{{ .Values.BACKEND.SMTP_DKIM_DOMAINNAME }}"
SMTP_DKIM_KEYSELECTOR: "{{ .Values.BACKEND.SMTP_DKIM_KEYSELECTOR }}"
GRAPHQL_URI: "http://{{ .Release.Name }}-backend:4000"
NEO4J_URI: "bolt://{{ .Release.Name }}-neo4j:7687"
#REDIS_DOMAIN: ---toBeSet(IP)---

View File

@ -16,6 +16,7 @@ stringData:
PRIVATE_KEY_PASSPHRASE: "{{ .Values.BACKEND.PRIVATE_KEY_PASSPHRASE }}"
SMTP_USERNAME: "{{ .Values.BACKEND.SMTP_USERNAME }}"
SMTP_PASSWORD: "{{ .Values.BACKEND.SMTP_PASSWORD }}"
SMTP_DKIM_PRIVATKEY: "{{ .Values.BACKEND.SMTP_DKIM_PRIVATKEY }}"
#NEO4J_USERNAME: ""
#NEO4J_PASSWORD: ""
#REDIS_PASSWORD: ---toBeSet---

View File

@ -117,6 +117,8 @@ services:
# TODO: clarify if that is the only thing needed to unlock the Enterprise version
# - NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
# TODO: Remove the playground from production
# bring the database in offline mode to export or load dumps
# command: ["tail", "-f", "/dev/null"]
networks:
external-net:

View File

@ -16,11 +16,11 @@ ENV BUILD_COMMIT=$BBUILD_COMMIT
# Labels
LABEL org.label-schema.build-date="${BUILD_DATE}"
LABEL org.label-schema.name="ocelot.social:backend"
LABEL org.label-schema.name="ocelot.social:neo4j"
LABEL org.label-schema.description="Neo4J database of the Social Network Software ocelot.social with preinstalled database constraints and indices"
LABEL org.label-schema.usage="https://github.com/Ocelot-Social-Community/Ocelot-Social/blob/master/README.md"
LABEL org.label-schema.url="https://ocelot.social"
LABEL org.label-schema.vcs-url="https://github.com/Ocelot-Social-Community/Ocelot-Social/tree/master/backend"
LABEL org.label-schema.vcs-url="https://github.com/Ocelot-Social-Community/Ocelot-Social/tree/master/neo4j"
LABEL org.label-schema.vcs-ref="${BUILD_COMMIT}"
LABEL org.label-schema.vendor="ocelot.social Community"
LABEL org.label-schema.version="${BUILD_VERSION}"

View File

@ -51,6 +51,18 @@ in `backend/.env`.
Start Neo4J and confirm the database is running at [http://localhost:7474](http://localhost:7474).
## Operations on Neo4j
### Import Neo4j Dump Locally in Docker
To import a dump into Neo4j running in a Docker container:
- we need to set `command: ["tail", "-f", "/dev/null"]` in the Neo4j block of `docker-compose.yml` on top level so the Neo4j database is in maintenance mode
- copy the dump into the running Docker container: `docker cp /path/to/dump <docker-image>:/existing-directory-in-docker/`
- connect to the Docker containers Neo4j terminal: `docker exec -it neo4j bash`
- to load the dump into the database we need the following command in this terminal: `neo4j-admin load --expand-commands --database=graph.db --from /backups/neo4j-dump --force`
- leave the terminal by entering: `exit`
## Commands
Here we describe some rarely used Cypher commands for Neo4j that are needed from time to time:

View File

@ -1,6 +1,6 @@
{
"name": "ocelot-social",
"version": "3.0.2",
"version": "3.1.2",
"description": "Free and open source software program code available to run social networks.",
"author": "ocelot.social Community",
"license": "MIT",
@ -34,30 +34,30 @@
"release": "yarn version --no-git-tag-version --no-commit-hooks --no-commit && auto-changelog --latest-version $(node -p -e \"require('./package.json').version\") && cd backend && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../package.json').version\") && cd ../webapp && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../package.json').version\") && cd ../webapp/maintenance/source && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../../../package.json').version\")"
},
"devDependencies": {
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.4",
"@babel/register": "^7.12.10",
"@badeball/cypress-cucumber-preprocessor": "^15.1.4",
"@babel/core": "^7.22.9",
"@babel/preset-env": "^7.22.9",
"@babel/register": "^7.22.15",
"@badeball/cypress-cucumber-preprocessor": "^18.0.6",
"@cypress/browserify-preprocessor": "^3.0.2",
"@faker-js/faker": "8.0.2",
"@faker-js/faker": "8.1.0",
"auto-changelog": "^2.3.0",
"bcryptjs": "^2.4.3",
"cross-env": "^7.0.3",
"cucumber": "^6.0.5",
"cypress": "^12.17.0",
"cypress": "^13.2.0",
"cypress-network-idle": "^1.14.2",
"date-fns": "^2.25.0",
"dotenv": "^8.2.0",
"expect": "^29.5.0",
"dotenv": "^16.3.1",
"expect": "^29.6.4",
"graphql-request": "^2.0.0",
"import": "^0.0.6",
"jsonwebtoken": "^8.5.1",
"jsonwebtoken": "^9.0.2",
"mock-socket": "^9.0.3",
"multiple-cucumber-html-reporter": "^3.4.0",
"neo4j-driver": "^4.3.4",
"neode": "^0.4.8",
"rosie": "^2.1.0",
"slug": "^6.0.0",
"slug": "^8.2.3",
"wait-on": "^7.0.1"
},
"resolutions": {

View File

@ -22,11 +22,11 @@ ENV PORT="3000"
# Labels
LABEL org.label-schema.build-date="${BUILD_DATE}"
LABEL org.label-schema.name="ocelot.social:backend"
LABEL org.label-schema.name="ocelot.social:webapp"
LABEL org.label-schema.description="Web Frontend of the Social Network Software ocelot.social"
LABEL org.label-schema.usage="https://github.com/Ocelot-Social-Community/Ocelot-Social/blob/master/README.md"
LABEL org.label-schema.url="https://ocelot.social"
LABEL org.label-schema.vcs-url="https://github.com/Ocelot-Social-Community/Ocelot-Social/tree/master/backend"
LABEL org.label-schema.vcs-url="https://github.com/Ocelot-Social-Community/Ocelot-Social/tree/master/webapp"
LABEL org.label-schema.vcs-ref="${BUILD_COMMIT}"
LABEL org.label-schema.vendor="ocelot.social Community"
LABEL org.label-schema.version="${BUILD_VERSION}"

View File

@ -1,7 +1,7 @@
##################################################################################
# BASE ###########################################################################
##################################################################################
FROM node:20.3.0-alpine3.17 as base
FROM node:20.2.0-alpine3.17 as base
# ENVs
## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame
@ -22,11 +22,11 @@ ENV PORT="3000"
# Labels
LABEL org.label-schema.build-date="${BUILD_DATE}"
LABEL org.label-schema.name="ocelot.social:backend"
LABEL org.label-schema.name="ocelot.social:maintenance"
LABEL org.label-schema.description="Maintenance page of the Social Network Software ocelot.social"
LABEL org.label-schema.usage="https://github.com/Ocelot-Social-Community/Ocelot-Social/blob/master/README.md"
LABEL org.label-schema.url="https://ocelot.social"
LABEL org.label-schema.vcs-url="https://github.com/Ocelot-Social-Community/Ocelot-Social/tree/master/backend"
LABEL org.label-schema.vcs-url="https://github.com/Ocelot-Social-Community/Ocelot-Social/tree/master/webapp"
LABEL org.label-schema.vcs-ref="${BUILD_COMMIT}"
LABEL org.label-schema.vendor="ocelot.social Community"
LABEL org.label-schema.version="${BUILD_VERSION}"

View File

@ -334,9 +334,7 @@ export default {
;[...this.messages, ...Message].forEach((m) => {
if (m.senderId !== this.currentUser.id) m.seen = true
m.date = new Date(m.date).toDateString()
if (!m.avatar?.startsWith('/api/')) {
m.avatar = this.$filters.proxyApiUrl(m.avatar)
}
m.avatar = this.$filters.proxyApiUrl(m.avatar)
msgs[m.indexId] = m
})
this.messages = msgs.filter(Boolean)

View File

@ -80,10 +80,6 @@ export default {
@media only screen and (max-width: 630px) {
flex-direction: column;
> .title {
text-align: center;
}
// > .sidebar {
// max-width: none;
// }

View File

@ -2,7 +2,7 @@
<filter-menu-section
:title="$t('filter-menu.post-type')"
:divider="false"
class="following-filter post-type-filter"
class="post-type-filter"
>
<template #filter-follower>
<li class="item all-item">
@ -65,9 +65,10 @@ export default {
<style lang="scss">
.post-type-filter {
& .filter-list {
display: grid;
grid-template-columns: repeat(3, 10%);
padding-left: 0px;
display: flex;
flex-basis: 100%;
flex-grow: 1;
padding-left: $space-base;
}
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<span class="counter-icon">
<base-icon :name="icon" />
<span :class="counterClass">{{ cappedCount }}</span>
<span v-if="count > 0" :class="counterClass">{{ cappedCount }}</span>
</span>
</template>

View File

@ -53,6 +53,16 @@ export const searchPosts = gql`
shoutedCount
clickedCount
viewedTeaserCount
postType
eventStart
eventEnd
eventVenue
eventLocationName
eventLocation {
lng
lat
}
eventIsOnline
author {
...user
}

13
webapp/jsconfig.json Normal file
View File

@ -0,0 +1,13 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": [
"./*"
],
"~*": [
"./*"
],
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@ocelot-social/maintenance",
"version": "3.0.2",
"version": "3.1.2",
"description": "Maintenance page for ocelot.social",
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
"author": "ocelot.social Community",

View File

@ -1,6 +1,6 @@
{
"name": "ocelot-social-webapp",
"version": "3.0.2",
"version": "3.1.2",
"description": "ocelot.social Frontend",
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
"author": "ocelot.social Community",
@ -75,7 +75,7 @@
"@storybook/addon-a11y": "^6.3.6",
"@storybook/addon-actions": "^5.3.21",
"@storybook/addon-notes": "^5.3.18",
"@storybook/vue": "~6.3.6",
"@storybook/vue": "~7.4.0",
"@vue/cli-shared-utils": "~4.3.1",
"@vue/eslint-config-prettier": "~6.0.0",
"@vue/server-test-utils": "~1.0.0-beta.31",

View File

@ -270,7 +270,7 @@ export default {
},
group: {
linkTitle: '&' + e.features[0].properties.slug,
link: `/group/${e.features[0].properties.id}/${e.features[0].properties.slug}`,
link: `/groups/${e.features[0].properties.id}/${e.features[0].properties.slug}`,
},
event: {
linkTitle: e.features[0].properties.slug,

View File

@ -98,6 +98,7 @@ export default ({ app = {} }) => {
proxyApiUrl: (input) => {
const url = input && (input.url || input)
if (!url) return url
if (url.startsWith('/api/')) return url
return url.startsWith('/') ? url.replace('/', '/api/') : url
},
})

File diff suppressed because it is too large Load Diff

2385
yarn.lock

File diff suppressed because it is too large Load Diff