Skip to content

Commit

Permalink
Merge branch 'main' into improvement/tenant-removal
Browse files Browse the repository at this point in the history
  • Loading branch information
epipav committed Jan 15, 2025
2 parents 5c521ee + 0341e55 commit bb79476
Show file tree
Hide file tree
Showing 130 changed files with 1,086 additions and 11,134 deletions.
48 changes: 0 additions & 48 deletions .github/workflows/CI-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,51 +58,3 @@ jobs:

- name: Check app linting, format and typescript
run: ./scripts/lint_apps.sh

##tests-main:
## needs: lint-format
## runs-on: ubuntu-latest
## defaults:
## run:
## shell: bash
## working-directory: ./backend
##
## steps:
## - name: Check out repository code
## uses: actions/checkout@v2
##
## - name: Setup Node
## uses: actions/setup-node@v3
## with:
## node-version: 20
##
## - name: Install dependencies
## run: cd .. && corepack enable && pnpm i --frozen-lockfile
##
## - name: Run tests
## working-directory: ./backend
## run: SERVICE=test pnpm test -- --testPathIgnorePatterns=serverless

## tests-serverless:
## needs: lint-format
## runs-on: ubuntu-latest
## defaults:
## run:
## shell: bash
## working-directory: ./backend
##
## steps:
## - name: Check out repository code
## uses: actions/checkout@v2
##
## - name: Setup Node
## uses: actions/setup-node@v3
## with:
## node-version: 20
##
## - name: Install dependencies
## run: cd .. && corepack enable && pnpm i --frozen-lockfile
##
## - name: Run tests
## working-directory: ./backend
## run: SERVICE=test pnpm test -- --testPathPattern="serverless\/"
23 changes: 0 additions & 23 deletions .github/workflows/api-docs.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions backend/.env.test

This file was deleted.

4 changes: 0 additions & 4 deletions backend/config/test.json

This file was deleted.

79 changes: 0 additions & 79 deletions backend/docker-compose.test.yaml

This file was deleted.

41 changes: 0 additions & 41 deletions backend/jest.config.js

This file was deleted.

6 changes: 3 additions & 3 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"start:job-generator": "SERVICE=job-generator TS_NODE_TRANSPILE_ONLY=true tsx src/bin/job-generator.ts",
"start:job-generator:dev": "nodemon --watch \"src/**/*.ts\" --watch ../services/libs -e ts,json --exec \"pnpm run start:job-generator\"",
"start:job-generator:dev:local": "set -a && . ./.env.dist.local && . ./.env.override.local && set +a && pnpm run start:job-generator:dev",
"start:discord-ws": "SERVICE=discord-ws TS_NODE_TRANSPILE_ONLY=true tsx src/bin/discord-ws.ts",
"start:discord-ws:dev": "nodemon --watch \"src/**/*.ts\" --watch ../services/libs -e ts,json --exec \"pnpm run start:discord-ws\"",
"start:discord-ws:dev:local": "set -a && . ./.env.dist.local && . ./.env.override.local && set +a && pnpm run start:discord-ws:dev",
"build": "tsc && cp package*json dist/ && cp .sequelizerc dist/.sequelizerc ",
"test": "../scripts/cli scaffold up-test && jest --clearCache && set -a && . ./.env.dist.local && . ./.env.test && set +a && NODE_ENV=test SERVICE=test jest --runInBand --verbose --forceExit",
"sequelize-cli:source": "pnpm run build && npx sequelize --config src/database/sequelize-cli-config.ts --migrations-source-path src/database/migrations",
Expand Down Expand Up @@ -136,7 +139,6 @@
"@types/config": "^3.3.0",
"@types/cron": "^2.0.0",
"@types/html-to-text": "^8.1.1",
"@types/jest": "^29.5.1",
"@types/node": "~18.0.4",
"@types/sanitize-html": "^2.6.2",
"@types/superagent": "^4.1.15",
Expand All @@ -151,13 +153,11 @@
"eslint-config-airbnb-typescript": "^16.1.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.4",
"jest": "^29.5.0",
"node-mocks-http": "1.9.0",
"nodemon": "2.0.4",
"prettier": "^3.3.3",
"rdme": "^7.2.0",
"supertest": "^6.2.2",
"ts-jest": "^29.1.0",
"tsx": "^4.7.1",
"typescript": "^5.6.3"
},
Expand Down
6 changes: 6 additions & 0 deletions backend/src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ setImmediate(async () => {
// increase security.
app.use(helmet())

app.use(
bodyParser.json({
limit: '5mb',
}),
)

app.use(bodyParser.urlencoded({ limit: '5mb', extended: true }))

app.use((req, res, next) => {
Expand Down
8 changes: 0 additions & 8 deletions backend/src/conf/configTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,10 @@ export interface SlackAlertingConfiguration {
url: string
}

export interface SampleDataConfiguration {
tenantId: string
}

export interface IntegrationProcessingConfiguration {
maxRetries: number
}

export interface WeeklyEmailsConfiguration {
enabled: string // true - enabled, anything else - disabled
}

export interface IOpenSearchConfig {
node: string
username: string
Expand Down
8 changes: 0 additions & 8 deletions backend/src/conf/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import {
OrganizationEnrichmentConfiguration,
S3Configuration,
SSOConfiguration,
SampleDataConfiguration,
SegmentConfiguration,
ServiceType,
SlackAlertingConfiguration,
Expand All @@ -40,7 +39,6 @@ import {
StackExchangeConfiguration,
TenantMode,
TwitterConfiguration,
WeeklyEmailsConfiguration,
} from './configTypes'

// TODO-kube
Expand Down Expand Up @@ -140,15 +138,9 @@ export const STACKEXCHANGE_CONFIG: StackExchangeConfiguration =
export const SLACK_ALERTING_CONFIG: SlackAlertingConfiguration =
config.get<SlackAlertingConfiguration>('slackAlerting')

export const SAMPLE_DATA_CONFIG: SampleDataConfiguration =
config.get<SampleDataConfiguration>('sampleData')

export const INTEGRATION_PROCESSING_CONFIG: IntegrationProcessingConfiguration =
config.get<IntegrationProcessingConfiguration>('integrationProcessing')

export const WEEKLY_EMAILS_CONFIG: WeeklyEmailsConfiguration =
config.get<WeeklyEmailsConfiguration>('weeklyEmails')

export const CROWD_ANALYTICS_CONFIG: CrowdAnalyticsConfiguration =
config.get<CrowdAnalyticsConfiguration>('crowdAnalytics')

Expand Down
1 change: 0 additions & 1 deletion backend/src/database/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ async function models(queryTimeoutMilliseconds: number, databaseHostnameOverride
require('./automationExecution').default,
require('./organization').default,
require('./memberAttributeSettings').default,
require('./note').default,
require('./segment').default,
require('./customView').default,
require('./customViewOrder').default,
Expand Down
49 changes: 0 additions & 49 deletions backend/src/database/models/note.ts

This file was deleted.

Loading

0 comments on commit bb79476

Please sign in to comment.