Skip to content

Commit

Permalink
added optional socks configuration for Solr client. Moved config file…
Browse files Browse the repository at this point in the history
… schema to a separate JSON schema file to make it easier to validate the config file in the editor.
  • Loading branch information
theorm committed Dec 12, 2024
1 parent 9b890b1 commit 51bccce
Show file tree
Hide file tree
Showing 16 changed files with 725 additions and 246 deletions.
1 change: 1 addition & 0 deletions config/default.example.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../src/schema/common/config.json",
"callbackUrls": {
"passwordReset": "http://localhost:8080/password-reset"
},
Expand Down
1 change: 1 addition & 0 deletions config/default.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../src/schema/common/config.json",
"isPublicApi": true,
"availablePlans": ["plan-basic", "plan-educational", "plan-researcher"],
"allowedCorsOrigins": [
Expand Down
60 changes: 60 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"feathers-sequelize": "^6.0.1",
"feathers-solr": "^3.1.0",
"feathers-swagger": "3.0.0",
"fetch-socks": "^1.3.2",
"form-data": "^3.0.0",
"generic-pool": "^3.8.2",
"graphology": "^0.16.1",
Expand Down
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ app.configure(rateLimiter)

app.set(
'cacheManager',
cache(app.get('redis'), app.get('cache').enabled, (error: Error) => {
cache(app.get('redis'), app.get('cache')?.enabled, (error: Error) => {
console.error('Cache error. Restarting', error.stack)
process.exit(1)
})
Expand Down
2 changes: 1 addition & 1 deletion src/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class ImlAppJWTStrategy extends JWTStrategy {
const authConfig = (this.app as ImpressoApplication)?.get('imlAuthConfiguration')

const imlOps: JwtVerifyOptions = { ...params.jwt }
if (authConfig != null) {
if (authConfig?.jwtOptions?.audience != null) {
imlOps.audience = authConfig.jwtOptions.audience
}

Expand Down
4 changes: 2 additions & 2 deletions src/celery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Application, HookContext, NextFunction } from '@feathersjs/feathers'
import { createClient } from 'celery-node'
import RedisBackend from 'celery-node/dist/backends/redis'
import debugModule from 'debug'
import { CeleryConfiguration } from './configuration'
import { CeleryConfig } from './configuration'
import { logger } from './logger'
import Job from './models/jobs.model'
import type { LogData } from './services/logs/logs.class'
Expand All @@ -21,7 +21,7 @@ export interface CeleryClient {
run: (task: { task: string; args: any[] }) => Promise<AsyncResult>
}

const getCeleryClient = (config: CeleryConfiguration, app: ImpressoApplication) => {
const getCeleryClient = (config: CeleryConfig, app: ImpressoApplication) => {
const client = createClient(config.brokerUrl, config.backendUrl)
const backend: RedisBackend = client.backend as RedisBackend

Expand Down
Loading

0 comments on commit 51bccce

Please sign in to comment.