Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Cloud Pi Native Console — direnv config
# Puts Homebrew Node 26 and global pnpm on PATH for this project

export PATH="/usr/local/opt/node@26/bin:/usr/local/bin:$PATH"
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
26.3.0
5 changes: 5 additions & 0 deletions apps/client/.eslintrc-auto-import.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"MaybeRefOrGetter": true,
"PropType": true,
"Ref": true,
"ShallowRef": true,
"Slot": true,
"Slots": true,
"VNode": true,
"WritableComputedRef": true,
"acceptHMRUpdate": true,
Expand All @@ -27,12 +30,14 @@
"getActivePinia": true,
"getCurrentInstance": true,
"getCurrentScope": true,
"getCurrentWatcher": true,
"h": true,
"inject": true,
"isProxy": true,
"isReactive": true,
"isReadonly": true,
"isRef": true,
"isShallow": true,
"mapActions": true,
"mapGetters": true,
"mapState": true,
Expand Down
17 changes: 8 additions & 9 deletions apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
"@types/jsdom": "^21.1.7",
"@types/node": "^24.12.0",
"@unocss/transformer-directives": "^0.65.4",
"@vitejs/plugin-vue": "^6.0.4",
"@vitest/coverage-v8": "^4.1.5",
"@vitejs/plugin-vue": "^6.0.7",
"@vitest/coverage-v8": "^4.1.8",
"@vue/eslint-config-typescript": "^14.7.0",
"chalk": "^5.6.2",
"eslint": "^10.1.0",
Expand All @@ -69,13 +69,12 @@
"stylelint-config-recommended-vue": "^1.6.1",
"stylelint-config-standard": "^40.0.0",
"typescript": "^5.9.3",
"unocss": "^66.6.6",
"unplugin-auto-import": "^0.18.6",
"unplugin-vue-components": "^0.27.5",
"vite": "^7.3.2",
"vite-node": "^6.0.0",
"vite-plugin-pwa": "^1.2.0",
"vitest": "^4.1.5",
"unocss": "^66.7.0",
"unplugin-auto-import": "^21.0.0",
"unplugin-vue-components": "^32.1.0",
"vite": "^8.0.0",
"vite-plugin-pwa": "^1.3.0",
"vitest": "^4.1.8",
"vue-eslint-parser": "^10.4.0",
"vue-tsc": "^2.2.12",
"workbox-window": "^7.4.0"
Expand Down
2 changes: 2 additions & 0 deletions apps/client/src/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ declare global {
const getActivePinia: typeof import('pinia')['getActivePinia']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const getCurrentWatcher: typeof import('vue').getCurrentWatcher
const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject']
const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef']
const isShallow: typeof import('vue').isShallow
const mapActions: typeof import('pinia')['mapActions']
const mapGetters: typeof import('pinia')['mapGetters']
const mapState: typeof import('pinia')['mapState']
Expand Down
6 changes: 6 additions & 0 deletions apps/client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ export default defineConfig({
},
build: {
target: 'ESNext',
cssTarget: 'chrome111',
},
css: {
lightningcss: {
errorRecovery: true,
},
},
optimizeDeps: {
include: [
Expand Down
7 changes: 3 additions & 4 deletions apps/server-nestjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"@types/express": "^5.0.6",
"@types/node": "^22.19.15",
"@types/supertest": "^6.0.3",
"@vitest/coverage-v8": "^4.1.5",
"@vitest/coverage-v8": "^4.1.8",
"eslint": "^9.39.4",
"fastify-plugin": "^5.1.0",
"globals": "^16.5.0",
Expand All @@ -115,9 +115,8 @@
"typescript": "^5.9.3",
"typescript-eslint": "^8.57.0",
"typescript-transform-paths": "^3.5.6",
"vite": "^7.3.2",
"vite-node": "^6.0.0",
"vitest": "^4.1.5"
"vite": "^8.0.0",
"vitest": "^4.1.8"
},
"publishConfig": {
"tag": "latest"
Expand Down
34 changes: 26 additions & 8 deletions apps/server-nestjs/src/modules/healthz/healthz.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import { GitlabHealthService } from '../gitlab/gitlab-health.service'
import { DatabaseHealthService } from '../infrastructure/database/database-health.service'
import { KeycloakHealthService } from '../keycloak/keycloak-health.service'
import { NexusHealthService } from '../nexus/nexus-health.service'
import { RegistryHealthService } from '../registry/registry-health.service'
import { OpenCdsHealthService } from '../opencds/opencds-health.service'
import { RegistryHealthService } from '../registry/registry.health.service'
import { VaultHealthService } from '../vault/vault-health.service'
import { ConfigurationService } from '../infrastructure/configuration/configuration.service'

@Controller('api/v1/healthz')
export class HealthzController {
Expand All @@ -19,19 +21,35 @@ export class HealthzController {
@Inject(NexusHealthService) private readonly nexus: NexusHealthService,
@Inject(RegistryHealthService) private readonly registry: RegistryHealthService,
@Inject(ArgoCDHealthService) private readonly argocd: ArgoCDHealthService,
@Inject(OpenCdsHealthService) private readonly opencds: OpenCdsHealthService,
@Inject(ConfigurationService) private readonly config: ConfigurationService,
) {}

@Get()
@HealthCheck()
check() {
return this.health.check([
const checks = [
() => this.database.check('database'),
() => this.keycloak.check('keycloak'),
() => this.gitlab.check('gitlab'),
() => this.vault.check('vault'),
() => this.nexus.check('nexus'),
() => this.registry.check('registry'),
() => this.argocd.check('argocd'),
])
() => this.opencds.check('opencds'),
]

if (this.config.gitlabUrl) {
checks.push(() => this.gitlab.check('gitlab'))
}
if (this.config.vaultUrl) {
checks.push(() => this.vault.check('vault'))
}
if (this.config.nexusUrl) {
checks.push(() => this.nexus.check('nexus'))
}
if (this.config.harborUrl) {
checks.push(() => this.registry.check('registry'))
}
if (this.config.argocdUrl) {
checks.push(() => this.argocd.check('argocd'))
}

return this.health.check(checks)
}
}
2 changes: 2 additions & 0 deletions apps/server-nestjs/src/modules/healthz/healthz.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { GitlabModule } from '../gitlab/gitlab.module'
import { DatabaseModule } from '../infrastructure/database/database.module'
import { KeycloakModule } from '../keycloak/keycloak.module'
import { NexusModule } from '../nexus/nexus.module'
import { OpenCdsModule } from '../opencds/opencds.module'
import { RegistryModule } from '../registry/registry.module'
import { VaultModule } from '../vault/vault.module'
import { HealthzController } from './healthz.controller'
Expand All @@ -19,6 +20,7 @@ import { HealthzController } from './healthz.controller'
NexusModule,
RegistryModule,
ArgoCDModule,
OpenCdsModule,
],
controllers: [HealthzController],
})
Expand Down
30 changes: 30 additions & 0 deletions apps/server-nestjs/src/modules/opencds/opencds-health.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { Inject, Injectable } from '@nestjs/common'
import { HealthIndicatorService } from '@nestjs/terminus'
import { ConfigurationService } from '../infrastructure/configuration/configuration.service'

@Injectable()
export class OpenCdsHealthService {
constructor(
@Inject(ConfigurationService) private readonly config: ConfigurationService,
@Inject(HealthIndicatorService) private readonly healthIndicator: HealthIndicatorService,
) {}

async check(key: string) {
const indicator = this.healthIndicator.check(key)
if (!this.config.openCdsUrl) return indicator.down('Not configured')

try {
const url = new URL('/api/v1/health', this.config.openCdsUrl).toString()
const headers: Record<string, string> = {}
if (this.config.openCdsApiToken) {
headers.Authorization = `Bearer ${this.config.openCdsApiToken}`
}

const response = await fetch(url, { headers })
if (response.status < 500) return indicator.up({ httpStatus: response.status })
return indicator.down({ httpStatus: response.status })
} catch (error) {
return indicator.down(error instanceof Error ? error.message : String(error))
}
}
}
11 changes: 11 additions & 0 deletions apps/server-nestjs/src/modules/opencds/opencds.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Module } from '@nestjs/common'
import { HealthIndicatorService } from '@nestjs/terminus'
import { ConfigurationModule } from '../infrastructure/configuration/configuration.module'
import { OpenCdsHealthService } from './opencds-health.service'

@Module({
imports: [ConfigurationModule],
providers: [HealthIndicatorService, OpenCdsHealthService],
exports: [OpenCdsHealthService],
})
export class OpenCdsModule {}
2 changes: 2 additions & 0 deletions docker/docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ services:
condition: service_started
keycloak:
condition: service_healthy
opencds-mockoon:
condition: service_healthy
env_file:
- ../apps/server-nestjs/.env.docker
environment:
Expand Down
2 changes: 2 additions & 0 deletions docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ services:
condition: service_healthy
postgres:
condition: service_started
opencds-mockoon:
condition: service_healthy
env_file:
- ../apps/server-nestjs/.env.docker
develop:
Expand Down
2 changes: 2 additions & 0 deletions docker/docker-compose.integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ services:
depends_on:
postgres:
condition: service_started
opencds-mockoon:
condition: service_healthy
ports:
- 3001:3001
volumes:
Expand Down
4 changes: 2 additions & 2 deletions plugins/argocd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"nodemon": "^3.1.14",
"rimraf": "^6.1.3",
"typescript": "^5.9.3",
"vite": "^7.3.2",
"vitest": "^4.1.5"
"vite": "^8.0.0",
"vitest": "^4.1.8"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down
4 changes: 2 additions & 2 deletions plugins/gitlab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"nodemon": "^3.1.14",
"rimraf": "^6.1.3",
"typescript": "^5.9.3",
"vite": "^7.3.2",
"vitest": "^4.1.5"
"vite": "^8.0.0",
"vitest": "^4.1.8"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down
4 changes: 2 additions & 2 deletions plugins/harbor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"rimraf": "^6.1.3",
"swagger-typescript-api": "^13.3.1",
"typescript": "^5.9.3",
"vite": "^7.3.2",
"vitest": "^4.1.5"
"vite": "^8.0.0",
"vitest": "^4.1.8"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down
4 changes: 2 additions & 2 deletions plugins/keycloak/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"nodemon": "^3.1.14",
"rimraf": "^6.1.3",
"typescript": "^5.9.3",
"vite": "^7.3.2",
"vitest": "^4.1.5"
"vite": "^8.0.0",
"vitest": "^4.1.8"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down
4 changes: 2 additions & 2 deletions plugins/nexus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"nodemon": "^3.1.14",
"rimraf": "^6.1.3",
"typescript": "^5.9.3",
"vite": "^7.3.2",
"vitest": "^4.1.5"
"vite": "^8.0.0",
"vitest": "^4.1.8"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down
4 changes: 2 additions & 2 deletions plugins/sonarqube/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"nodemon": "^3.1.14",
"rimraf": "^6.1.3",
"typescript": "^5.9.3",
"vite": "^7.3.2",
"vitest": "^4.1.5"
"vite": "^8.0.0",
"vitest": "^4.1.8"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down
4 changes: 2 additions & 2 deletions plugins/vault/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"nodemon": "^3.1.14",
"rimraf": "^6.1.3",
"typescript": "^5.9.3",
"vite": "^7.3.2",
"vitest": "^4.1.5"
"vite": "^8.0.0",
"vitest": "^4.1.8"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down
Loading
Loading