Skip to content

Commit

Permalink
Merge remote-tracking branch 'main' into graph-email
Browse files Browse the repository at this point in the history
  • Loading branch information
sbliven committed Jan 27, 2025
2 parents 792d00d + b64bafb commit 73947de
Show file tree
Hide file tree
Showing 78 changed files with 4,756 additions and 785 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ updates:
labels:
- "dependencies"
- "npm"
groups:
nestjs:
patterns:
- "@nestjs*"
update-types:
- "minor"
- "patch"
- "major"
3 changes: 3 additions & 0 deletions .github/workflows/release-and-publish-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ jobs:
env:
MONGODB_URI: "mongodb://localhost:27017/scicat"
JWT_SECRET: thisIsTheJwtSecret
# It disables the content property on some of the endpoints as the sdk generator complains about it.
# We want to keep it when the app is running to improve the swagger documentation and usage.
SDK_PACKAGE_SWAGGER_HELPERS_DISABLED: true
run: |
npm install -g wait-on && npm install
npm run start & wait-on http://localhost:3000/api/v3/health --timeout 200000
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/upload-sdk-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
env:
MONGODB_URI: "mongodb://localhost:27017/scicat"
JWT_SECRET: thisIsTheJwtSecret
# It disables the content property on some of the endpoints as the sdk generator complains about it.
# We want to keep it when the app is running to improve the swagger documentation and usage.
SDK_PACKAGE_SWAGGER_HELPERS_DISABLED: true
run: |
npm install -g wait-on && npm install
npm run start & wait-on http://localhost:3000/api/v3/health --timeout 200000
Expand Down
13 changes: 12 additions & 1 deletion nest-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"plugins": ["@nestjs/swagger"]
"plugins": [{
"name": "@nestjs/swagger",
"options": {
"dtoFileNameSuffix": [
".dto.ts",
"sample.schema.ts",
"proposal.schema.ts",
"measurement-period.schema.ts"
],
"introspectComments": true
}
}]
}
}
150 changes: 62 additions & 88 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
"chai-http": "^5.1.1",
"concurrently": "^9.0.0",
"eslint": "^9.0.0",
"eslint-config-loopback": "^13.1.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-prettier": "^5.0.0",
"globals": "^15.12.0",
Expand Down
2 changes: 0 additions & 2 deletions src/admin/admin.module.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { Module } from "@nestjs/common";
import { AdminService } from "./admin.service";
import { AdminController } from "./admin.controller";
import { ConfigModule } from "@nestjs/config";

@Module({
controllers: [AdminController],
imports: [ConfigModule],
providers: [AdminService],
exports: [AdminService],
})
Expand Down
11 changes: 6 additions & 5 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ import { MetricsModule } from "./metrics/metrics.module";

@Module({
imports: [
AttachmentsModule,
AuthModule,
CaslModule,
CommonModule,
ConfigModule.forRoot({
load: [configuration],
isGlobal: true,
cache: true,
}),
AuthModule,
CaslModule,
AttachmentsModule,
CommonModule,
// NOTE: `ConditionalModule.registerWhen` directly uses `process.env` as it does not support
// dependency injection for `ConfigService`. This approach ensures compatibility while
// leveraging environment variables for conditional module loading.
Expand Down Expand Up @@ -124,7 +126,6 @@ import { MetricsModule } from "./metrics/metrics.module";
inject: [ConfigService, HttpService],
}),
MongooseModule.forRootAsync({
imports: [ConfigModule],
useFactory: async (configService: ConfigService) => ({
uri: configService.get<string>("mongodbUri"),
}),
Expand Down
Loading

0 comments on commit 73947de

Please sign in to comment.