mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
corrected file endings or removed them where possible
This commit is contained in:
parent
198bb2ddd9
commit
c436cb52b1
@ -2,17 +2,17 @@ module.exports = {
|
|||||||
verbose: true,
|
verbose: true,
|
||||||
collectCoverage: true,
|
collectCoverage: true,
|
||||||
collectCoverageFrom: [
|
collectCoverageFrom: [
|
||||||
'**/*.js',
|
'**/*.ts',
|
||||||
'!**/node_modules/**',
|
'!**/node_modules/**',
|
||||||
'!**/test/**',
|
'!**/test/**',
|
||||||
'!**/build/**',
|
'!**/build/**',
|
||||||
'!**/src/**/?(*.)+(spec|test).js?(x)'
|
'!**/src/**/?(*.)+(spec|test).ts?(x)'
|
||||||
],
|
],
|
||||||
coverageThreshold: {
|
coverageThreshold: {
|
||||||
global: {
|
global: {
|
||||||
lines: 57,
|
lines: 57,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
testMatch: ['**/src/**/?(*.)+(spec|test).js?(x)'],
|
testMatch: ['**/src/**/?(*.)+(spec|test).ts?(x)'],
|
||||||
setupFilesAfterEnv: ['<rootDir>/test/setup.js']
|
setupFilesAfterEnv: ['<rootDir>/test/setup.ts']
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import dotenv from 'dotenv'
|
import dotenv from 'dotenv'
|
||||||
import emails from './emails.js'
|
import emails from './emails'
|
||||||
import metadata from './metadata.js'
|
import metadata from './metadata'
|
||||||
|
|
||||||
// Load env file
|
// Load env file
|
||||||
if (require.resolve) {
|
if (require.resolve) {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// this file is duplicated in `backend/src/config/logos.js` and `webapp/constants/logos.js` and replaced on rebranding
|
// this file is duplicated in `backend/src/config/logos` and `webapp/constants/logos.js` and replaced on rebranding
|
||||||
// this are the paths in the webapp
|
// this are the paths in the webapp
|
||||||
export default {
|
export default {
|
||||||
LOGO_HEADER_PATH: '/img/custom/logo-horizontal.svg',
|
LOGO_HEADER_PATH: '/img/custom/logo-horizontal.svg',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// this file is duplicated in `backend/src/config/metadata.js` and `webapp/constants/metadata.js` and replaced on rebranding
|
// this file is duplicated in `backend/src/config/metadata` and `webapp/constants/metadata.js` and replaced on rebranding
|
||||||
export default {
|
export default {
|
||||||
APPLICATION_NAME: 'ocelot.social',
|
APPLICATION_NAME: 'ocelot.social',
|
||||||
APPLICATION_SHORT_NAME: 'ocelot',
|
APPLICATION_SHORT_NAME: 'ocelot',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// this file is duplicated in `backend/src/constants/metadata.js` and `webapp/constants/metadata.js`
|
// this file is duplicated in `backend/src/constants/metadata` and `webapp/constants/metadata.js`
|
||||||
export const CATEGORIES_MIN = 1
|
export const CATEGORIES_MIN = 1
|
||||||
export const CATEGORIES_MAX = 3
|
export const CATEGORIES_MAX = 3
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
// this file is duplicated in `backend/src/constants/group.js` and `webapp/constants/group.js`
|
// this file is duplicated in `backend/src/constants/group` and `webapp/constants/group.js`
|
||||||
export const DESCRIPTION_WITHOUT_HTML_LENGTH_MIN = 50 // with removed HTML tags
|
export const DESCRIPTION_WITHOUT_HTML_LENGTH_MIN = 50 // with removed HTML tags
|
||||||
export const DESCRIPTION_EXCERPT_HTML_LENGTH = 250 // with removed HTML tags
|
export const DESCRIPTION_EXCERPT_HTML_LENGTH = 250 // with removed HTML tags
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// this file is duplicated in `backend/src/config/metadata.js` and `webapp/constants/metadata.js`
|
// this file is duplicated in `backend/src/config/metadata` and `webapp/constants/metadata.js`
|
||||||
export default {
|
export default {
|
||||||
NONCE_LENGTH: 5,
|
NONCE_LENGTH: 5,
|
||||||
INVITE_CODE_LENGTH: 6,
|
INVITE_CODE_LENGTH: 6,
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import { hashSync } from 'bcryptjs'
|
|||||||
import { Factory } from 'rosie'
|
import { Factory } from 'rosie'
|
||||||
import { faker } from '@faker-js/faker'
|
import { faker } from '@faker-js/faker'
|
||||||
import { getDriver, getNeode } from './neo4j'
|
import { getDriver, getNeode } from './neo4j'
|
||||||
import CONFIG from '../config/index.js'
|
import CONFIG from '../config/index'
|
||||||
import generateInviteCode from '../schema/resolvers/helpers/generateInviteCode.js'
|
import generateInviteCode from '../schema/resolvers/helpers/generateInviteCode'
|
||||||
|
|
||||||
const neode = getNeode()
|
const neode = getNeode()
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import CONFIG from '../../../config'
|
import CONFIG from '../../../config'
|
||||||
import { cleanHtml } from '../../../middleware/helpers/cleanHtml.js'
|
import { cleanHtml } from '../../../middleware/helpers/cleanHtml'
|
||||||
import nodemailer from 'nodemailer'
|
import nodemailer from 'nodemailer'
|
||||||
import { htmlToText } from 'nodemailer-html-to-text'
|
import { htmlToText } from 'nodemailer-html-to-text'
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import CONFIG from '../../../config'
|
import CONFIG from '../../../config'
|
||||||
import logosWebapp from '../../../config/logos.js'
|
import logosWebapp from '../../../config/logos'
|
||||||
import {
|
import {
|
||||||
signupTemplate,
|
signupTemplate,
|
||||||
emailVerificationTemplate,
|
emailVerificationTemplate,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import mustache from 'mustache'
|
import mustache from 'mustache'
|
||||||
import CONFIG from '../../../config'
|
import CONFIG from '../../../config'
|
||||||
import metadata from '../../../config/metadata.js'
|
import metadata from '../../../config/metadata'
|
||||||
import logosWebapp from '../../../config/logos.js'
|
import logosWebapp from '../../../config/logos'
|
||||||
|
|
||||||
import * as templates from './templates'
|
import * as templates from './templates'
|
||||||
import * as templatesEN from './templates/en'
|
import * as templatesEN from './templates/en'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import LanguageDetect from 'languagedetect'
|
import LanguageDetect from 'languagedetect'
|
||||||
import { removeHtmlTags } from '../helpers/cleanHtml.js'
|
import { removeHtmlTags } from '../helpers/cleanHtml'
|
||||||
|
|
||||||
const setPostLanguage = (text) => {
|
const setPostLanguage = (text) => {
|
||||||
const lngDetector = new LanguageDetect()
|
const lngDetector = new LanguageDetect()
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import walkRecursive from '../helpers/walkRecursive'
|
import walkRecursive from '../helpers/walkRecursive'
|
||||||
import { cleanHtml } from '../middleware/helpers/cleanHtml.js'
|
import { cleanHtml } from '../middleware/helpers/cleanHtml'
|
||||||
|
|
||||||
// exclamation mark separetes field names, that should not be sanitized
|
// exclamation mark separetes field names, that should not be sanitized
|
||||||
const fields = [
|
const fields = [
|
||||||
|
|||||||
@ -2,37 +2,37 @@
|
|||||||
// module that is not browser-compatible. Node's `fs` module is server-side only
|
// module that is not browser-compatible. Node's `fs` module is server-side only
|
||||||
declare var Cypress: any | undefined
|
declare var Cypress: any | undefined
|
||||||
export default {
|
export default {
|
||||||
Image: typeof Cypress !== 'undefined' ? require('./Image.js') : require('./Image.js').default,
|
Image: typeof Cypress !== 'undefined' ? require('./Image') : require('./Image').default,
|
||||||
Badge: typeof Cypress !== 'undefined' ? require('./Badge.js') : require('./Badge.js').default,
|
Badge: typeof Cypress !== 'undefined' ? require('./Badge') : require('./Badge').default,
|
||||||
User: typeof Cypress !== 'undefined' ? require('./User.js') : require('./User.js').default,
|
User: typeof Cypress !== 'undefined' ? require('./User') : require('./User').default,
|
||||||
Group: typeof Cypress !== 'undefined' ? require('./Group.js') : require('./Group.js').default,
|
Group: typeof Cypress !== 'undefined' ? require('./Group') : require('./Group').default,
|
||||||
EmailAddress:
|
EmailAddress:
|
||||||
typeof Cypress !== 'undefined'
|
typeof Cypress !== 'undefined'
|
||||||
? require('./EmailAddress.js')
|
? require('./EmailAddress')
|
||||||
: require('./EmailAddress.js').default,
|
: require('./EmailAddress').default,
|
||||||
UnverifiedEmailAddress:
|
UnverifiedEmailAddress:
|
||||||
typeof Cypress !== 'undefined'
|
typeof Cypress !== 'undefined'
|
||||||
? require('./UnverifiedEmailAddress.js')
|
? require('./UnverifiedEmailAddress')
|
||||||
: require('./UnverifiedEmailAddress.js').default,
|
: require('./UnverifiedEmailAddress').default,
|
||||||
SocialMedia:
|
SocialMedia:
|
||||||
typeof Cypress !== 'undefined'
|
typeof Cypress !== 'undefined'
|
||||||
? require('./SocialMedia.js')
|
? require('./SocialMedia')
|
||||||
: require('./SocialMedia.js').default,
|
: require('./SocialMedia').default,
|
||||||
Post: typeof Cypress !== 'undefined' ? require('./Post.js') : require('./Post.js').default,
|
Post: typeof Cypress !== 'undefined' ? require('./Post') : require('./Post').default,
|
||||||
Comment:
|
Comment:
|
||||||
typeof Cypress !== 'undefined' ? require('./Comment.js') : require('./Comment.js').default,
|
typeof Cypress !== 'undefined' ? require('./Comment') : require('./Comment').default,
|
||||||
Category:
|
Category:
|
||||||
typeof Cypress !== 'undefined' ? require('./Category.js') : require('./Category.js').default,
|
typeof Cypress !== 'undefined' ? require('./Category') : require('./Category').default,
|
||||||
Tag: typeof Cypress !== 'undefined' ? require('./Tag.js') : require('./Tag.js').default,
|
Tag: typeof Cypress !== 'undefined' ? require('./Tag') : require('./Tag').default,
|
||||||
Location:
|
Location:
|
||||||
typeof Cypress !== 'undefined' ? require('./Location.js') : require('./Location.js').default,
|
typeof Cypress !== 'undefined' ? require('./Location') : require('./Location').default,
|
||||||
Donations:
|
Donations:
|
||||||
typeof Cypress !== 'undefined' ? require('./Donations.js') : require('./Donations.js').default,
|
typeof Cypress !== 'undefined' ? require('./Donations') : require('./Donations').default,
|
||||||
Report: typeof Cypress !== 'undefined' ? require('./Report.js') : require('./Report.js').default,
|
Report: typeof Cypress !== 'undefined' ? require('./Report') : require('./Report').default,
|
||||||
Migration:
|
Migration:
|
||||||
typeof Cypress !== 'undefined' ? require('./Migration.js') : require('./Migration.js').default,
|
typeof Cypress !== 'undefined' ? require('./Migration') : require('./Migration').default,
|
||||||
InviteCode:
|
InviteCode:
|
||||||
typeof Cypress !== 'undefined'
|
typeof Cypress !== 'undefined'
|
||||||
? require('./InviteCode.js')
|
? require('./InviteCode')
|
||||||
: require('./InviteCode.js').default,
|
: require('./InviteCode').default,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import scrape from './embeds/scraper.js'
|
import scrape from './embeds/scraper'
|
||||||
import { undefinedToNullResolver } from './helpers/Resolver'
|
import { undefinedToNullResolver } from './helpers/Resolver'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { getMutedUsers } from '../users.js'
|
import { getMutedUsers } from '../users'
|
||||||
import { mergeWith, isArray } from 'lodash'
|
import { mergeWith, isArray } from 'lodash'
|
||||||
|
|
||||||
export const filterForMutedUsers = async (params, context) => {
|
export const filterForMutedUsers = async (params, context) => {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
import { fileLoader, mergeResolvers } from 'merge-graphql-schemas'
|
import { fileLoader, mergeResolvers } from 'merge-graphql-schemas'
|
||||||
|
|
||||||
const resolversArray = fileLoader(path.join(__dirname, './!(*.spec).js'))
|
const resolversArray = fileLoader(path.join(__dirname, './!(*.spec).ts'))
|
||||||
export default mergeResolvers(resolversArray)
|
export default mergeResolvers(resolversArray)
|
||||||
|
|||||||
@ -5,7 +5,7 @@ type FILED {
|
|||||||
submitter: User
|
submitter: User
|
||||||
}
|
}
|
||||||
|
|
||||||
# this list equals the strings of an array in file "webapp/constants/modals.js"
|
# this list equals the strings of an array in file "webapp/constants/modals"
|
||||||
enum ReasonCategory {
|
enum ReasonCategory {
|
||||||
other
|
other
|
||||||
discrimination_etc
|
discrimination_etc
|
||||||
|
|||||||
@ -107,5 +107,5 @@
|
|||||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||||
},
|
},
|
||||||
"include": ["./src/**/*"],
|
"include": ["./src/**/*"],
|
||||||
"exclude": ["./src/**/*.spec.ts", "./src/**/*.spec.js"]
|
"exclude": ["./src/**/*.spec.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user