mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge branch 'master' into dependabot/github_actions/actions/cache-3.3.2
This commit is contained in:
commit
1ac404711a
1
.github/workflows/test-backend.yml
vendored
1
.github/workflows/test-backend.yml
vendored
@ -127,6 +127,7 @@ jobs:
|
|||||||
if: ${{ needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.docker == 'true' }}
|
if: ${{ needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.docker == 'true' }}
|
||||||
needs: [files-changed, unit_test_backend]
|
needs: [files-changed, unit_test_backend]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions: write-all
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
- name: Delete cache
|
- name: Delete cache
|
||||||
|
|||||||
1
.github/workflows/test-e2e.yml
vendored
1
.github/workflows/test-e2e.yml
vendored
@ -101,6 +101,7 @@ jobs:
|
|||||||
name: Cleanup
|
name: Cleanup
|
||||||
needs: [docker_preparation, fullstack_tests]
|
needs: [docker_preparation, fullstack_tests]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions: write-all
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
- name: Delete cache
|
- name: Delete cache
|
||||||
|
|||||||
1
.github/workflows/test-webapp.yml
vendored
1
.github/workflows/test-webapp.yml
vendored
@ -103,6 +103,7 @@ jobs:
|
|||||||
if: ${{ needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.webapp == 'true' }}
|
if: ${{ needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.webapp == 'true' }}
|
||||||
needs: [files-changed, unit_test_webapp]
|
needs: [files-changed, unit_test_webapp]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions: write-all
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
- name: Delete cache
|
- name: Delete cache
|
||||||
|
|||||||
20
CHANGELOG.md
20
CHANGELOG.md
@ -4,8 +4,26 @@ 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).
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||||
|
|
||||||
|
#### [3.0.4](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/3.0.3...3.0.4)
|
||||||
|
|
||||||
|
- 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)
|
#### [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)
|
- 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)
|
- 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): filtermenu mobile bug [`#6694`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6694)
|
||||||
@ -13,7 +31,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|||||||
- fix(webapp): fix the group link in the map [`#6698`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6698)
|
- 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)
|
- 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)
|
- Write documentation for DKIM e-mail setting [`9f5d32e`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/9f5d32e527151854f1888614c59e0aa5f2b504d0)
|
||||||
- Refine DKIM config for Nodemailer [`28665bd`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/28665bd175236d2e00299fe895cd5901bfe7e499)
|
- 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)
|
#### [3.0.2](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/3.0.1...3.0.2)
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ocelot-social-backend",
|
"name": "ocelot-social-backend",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"description": "GraphQL Backend for ocelot.social",
|
"description": "GraphQL Backend for ocelot.social",
|
||||||
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
|
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
|
||||||
"author": "ocelot.social Community",
|
"author": "ocelot.social Community",
|
||||||
|
|||||||
@ -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',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,20 +1,24 @@
|
|||||||
import LanguageDetect from 'languagedetect'
|
import LanguageDetect from 'languagedetect'
|
||||||
import { removeHtmlTags } from '../helpers/cleanHtml'
|
import { removeHtmlTags } from '../helpers/cleanHtml'
|
||||||
|
|
||||||
const setPostLanguage = (text) => {
|
const setPostLanguage = (text, defaultLanguage) => {
|
||||||
const lngDetector = new LanguageDetect()
|
const lngDetector = new LanguageDetect()
|
||||||
lngDetector.setLanguageType('iso2')
|
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 {
|
export default {
|
||||||
Mutation: {
|
Mutation: {
|
||||||
CreatePost: async (resolve, root, args, context, info) => {
|
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)
|
return resolve(root, args, context, info)
|
||||||
},
|
},
|
||||||
UpdatePost: async (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)
|
return resolve(root, args, context, info)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -32,7 +32,7 @@ sleep 60
|
|||||||
# database backup
|
# database backup
|
||||||
kubectl --kubeconfig=${KUBECONFIG} -n default exec -it \
|
kubectl --kubeconfig=${KUBECONFIG} -n default exec -it \
|
||||||
$(kubectl --kubeconfig=${KUBECONFIG} -n default get pods | grep ocelot-neo4j | awk '{ print $1 }') \
|
$(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
|
# copy neo4j backup to local drive
|
||||||
kubectl --kubeconfig=${KUBECONFIG} cp \
|
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
|
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
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ocelot-social",
|
"name": "ocelot-social",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"description": "Free and open source software program code available to run social networks.",
|
"description": "Free and open source software program code available to run social networks.",
|
||||||
"author": "ocelot.social Community",
|
"author": "ocelot.social Community",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
13
webapp/jsconfig.json
Normal file
13
webapp/jsconfig.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"~/*": [
|
||||||
|
"./*"
|
||||||
|
],
|
||||||
|
"~*": [
|
||||||
|
"./*"
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ocelot-social/maintenance",
|
"name": "@ocelot-social/maintenance",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"description": "Maintenance page for ocelot.social",
|
"description": "Maintenance page for ocelot.social",
|
||||||
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
|
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
|
||||||
"author": "ocelot.social Community",
|
"author": "ocelot.social Community",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ocelot-social-webapp",
|
"name": "ocelot-social-webapp",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"description": "ocelot.social Frontend",
|
"description": "ocelot.social Frontend",
|
||||||
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
|
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
|
||||||
"author": "ocelot.social Community",
|
"author": "ocelot.social Community",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user