Skip to content

Commit bb79476

Browse files
committed
Merge branch 'main' into improvement/tenant-removal
2 parents 5c521ee + 0341e55 commit bb79476

File tree

130 files changed

+1086
-11134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+1086
-11134
lines changed

.github/workflows/CI-node.yaml

-48
Original file line numberDiff line numberDiff line change
@@ -58,51 +58,3 @@ jobs:
5858

5959
- name: Check app linting, format and typescript
6060
run: ./scripts/lint_apps.sh
61-
62-
##tests-main:
63-
## needs: lint-format
64-
## runs-on: ubuntu-latest
65-
## defaults:
66-
## run:
67-
## shell: bash
68-
## working-directory: ./backend
69-
##
70-
## steps:
71-
## - name: Check out repository code
72-
## uses: actions/checkout@v2
73-
##
74-
## - name: Setup Node
75-
## uses: actions/setup-node@v3
76-
## with:
77-
## node-version: 20
78-
##
79-
## - name: Install dependencies
80-
## run: cd .. && corepack enable && pnpm i --frozen-lockfile
81-
##
82-
## - name: Run tests
83-
## working-directory: ./backend
84-
## run: SERVICE=test pnpm test -- --testPathIgnorePatterns=serverless
85-
86-
## tests-serverless:
87-
## needs: lint-format
88-
## runs-on: ubuntu-latest
89-
## defaults:
90-
## run:
91-
## shell: bash
92-
## working-directory: ./backend
93-
##
94-
## steps:
95-
## - name: Check out repository code
96-
## uses: actions/checkout@v2
97-
##
98-
## - name: Setup Node
99-
## uses: actions/setup-node@v3
100-
## with:
101-
## node-version: 20
102-
##
103-
## - name: Install dependencies
104-
## run: cd .. && corepack enable && pnpm i --frozen-lockfile
105-
##
106-
## - name: Run tests
107-
## working-directory: ./backend
108-
## run: SERVICE=test pnpm test -- --testPathPattern="serverless\/"

.github/workflows/api-docs.yaml

-23
This file was deleted.

backend/.env.test

-16
This file was deleted.

backend/config/test.json

-4
This file was deleted.

backend/docker-compose.test.yaml

-79
This file was deleted.

backend/jest.config.js

-41
This file was deleted.

backend/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"start:job-generator": "SERVICE=job-generator TS_NODE_TRANSPILE_ONLY=true tsx src/bin/job-generator.ts",
99
"start:job-generator:dev": "nodemon --watch \"src/**/*.ts\" --watch ../services/libs -e ts,json --exec \"pnpm run start:job-generator\"",
1010
"start:job-generator:dev:local": "set -a && . ./.env.dist.local && . ./.env.override.local && set +a && pnpm run start:job-generator:dev",
11+
"start:discord-ws": "SERVICE=discord-ws TS_NODE_TRANSPILE_ONLY=true tsx src/bin/discord-ws.ts",
12+
"start:discord-ws:dev": "nodemon --watch \"src/**/*.ts\" --watch ../services/libs -e ts,json --exec \"pnpm run start:discord-ws\"",
13+
"start:discord-ws:dev:local": "set -a && . ./.env.dist.local && . ./.env.override.local && set +a && pnpm run start:discord-ws:dev",
1114
"build": "tsc && cp package*json dist/ && cp .sequelizerc dist/.sequelizerc ",
1215
"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",
1316
"sequelize-cli:source": "pnpm run build && npx sequelize --config src/database/sequelize-cli-config.ts --migrations-source-path src/database/migrations",
@@ -136,7 +139,6 @@
136139
"@types/config": "^3.3.0",
137140
"@types/cron": "^2.0.0",
138141
"@types/html-to-text": "^8.1.1",
139-
"@types/jest": "^29.5.1",
140142
"@types/node": "~18.0.4",
141143
"@types/sanitize-html": "^2.6.2",
142144
"@types/superagent": "^4.1.15",
@@ -151,13 +153,11 @@
151153
"eslint-config-airbnb-typescript": "^16.1.4",
152154
"eslint-config-prettier": "^8.5.0",
153155
"eslint-plugin-import": "^2.25.4",
154-
"jest": "^29.5.0",
155156
"node-mocks-http": "1.9.0",
156157
"nodemon": "2.0.4",
157158
"prettier": "^3.3.3",
158159
"rdme": "^7.2.0",
159160
"supertest": "^6.2.2",
160-
"ts-jest": "^29.1.0",
161161
"tsx": "^4.7.1",
162162
"typescript": "^5.6.3"
163163
},

backend/src/api/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ setImmediate(async () => {
151151
// increase security.
152152
app.use(helmet())
153153

154+
app.use(
155+
bodyParser.json({
156+
limit: '5mb',
157+
}),
158+
)
159+
154160
app.use(bodyParser.urlencoded({ limit: '5mb', extended: true }))
155161

156162
app.use((req, res, next) => {

backend/src/conf/configTypes.ts

-8
Original file line numberDiff line numberDiff line change
@@ -162,18 +162,10 @@ export interface SlackAlertingConfiguration {
162162
url: string
163163
}
164164

165-
export interface SampleDataConfiguration {
166-
tenantId: string
167-
}
168-
169165
export interface IntegrationProcessingConfiguration {
170166
maxRetries: number
171167
}
172168

173-
export interface WeeklyEmailsConfiguration {
174-
enabled: string // true - enabled, anything else - disabled
175-
}
176-
177169
export interface IOpenSearchConfig {
178170
node: string
179171
username: string

backend/src/conf/index.ts

-8
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import {
3030
OrganizationEnrichmentConfiguration,
3131
S3Configuration,
3232
SSOConfiguration,
33-
SampleDataConfiguration,
3433
SegmentConfiguration,
3534
ServiceType,
3635
SlackAlertingConfiguration,
@@ -40,7 +39,6 @@ import {
4039
StackExchangeConfiguration,
4140
TenantMode,
4241
TwitterConfiguration,
43-
WeeklyEmailsConfiguration,
4442
} from './configTypes'
4543

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

143-
export const SAMPLE_DATA_CONFIG: SampleDataConfiguration =
144-
config.get<SampleDataConfiguration>('sampleData')
145-
146141
export const INTEGRATION_PROCESSING_CONFIG: IntegrationProcessingConfiguration =
147142
config.get<IntegrationProcessingConfiguration>('integrationProcessing')
148143

149-
export const WEEKLY_EMAILS_CONFIG: WeeklyEmailsConfiguration =
150-
config.get<WeeklyEmailsConfiguration>('weeklyEmails')
151-
152144
export const CROWD_ANALYTICS_CONFIG: CrowdAnalyticsConfiguration =
153145
config.get<CrowdAnalyticsConfiguration>('crowdAnalytics')
154146

backend/src/database/models/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ async function models(queryTimeoutMilliseconds: number, databaseHostnameOverride
135135
require('./automationExecution').default,
136136
require('./organization').default,
137137
require('./memberAttributeSettings').default,
138-
require('./note').default,
139138
require('./segment').default,
140139
require('./customView').default,
141140
require('./customViewOrder').default,

backend/src/database/models/note.ts

-49
This file was deleted.

0 commit comments

Comments
 (0)