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
2 changes: 1 addition & 1 deletion .github/workflows/add-documentation-to-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
YARN_ENABLE_GLOBAL_CACHE: 'false'
strategy:
matrix:
node-version: [ 20.20.2 ]
node-version: [ 24.18.0 ]
mongodb-version: [ 7.0.21 ]
steps:
- name: Harden Runner
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api-after-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- 6379:6379
strategy:
matrix:
node-version: [ 20.20.2 ]
node-version: [ 24.18.0 ]
mongodb-version: [ 7.0.21 ]
steps:
- name: Harden Runner
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/api-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
- 6379:6379
strategy:
matrix:
node-version: [20.20.2]
mongodb-version: [7.0.21]
node-version: [ 24.18.0 ]
mongodb-version: [ 7.0.21 ]
steps:
- name: Harden Runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api-schedule-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- 6379:6379
strategy:
matrix:
node-version: [ 20.20.2 ]
node-version: [ 24.18.0 ]
mongodb-version: [ 7.0.21 ]
steps:
- name: Harden Runner
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api-schedule-vm0033.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- 6379:6379
strategy:
matrix:
node-version: [ 20.20.2 ]
node-version: [ 24.18.0 ]
mongodb-version: [ 7.0.21 ]
steps:
- name: Harden Runner
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
YARN_ENABLE_GLOBAL_CACHE: 'false'
strategy:
matrix:
node-version: [ 20.20.2 ]
node-version: [ 24.18.0 ]
steps:
- name: Harden Runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ui-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- 6379:6379
strategy:
matrix:
node-version: [20.20.2]
mongodb-version: [7.0.21]
node-version: [ 24.18.0 ]
mongodb-version: [ 7.0.21 ]
steps:
- name: Harden Runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,11 @@ To get a local copy up and running quickly, follow the steps below. Please refer

1. **[Git](https://git-scm.com/downloads)** – source-control tooling
2. **[Docker](https://www.docker.com/)** – one-command build & run (recommended)
3. **[MongoDB v6](https://www.mongodb.com/)**, **[Node.js v20.19](https://nodejs.org/en/download)**, and **[NATS 2.9.25](https://nats.io/)** – auto-provisioned when using Docker Compose
3. **[MongoDB v6](https://www.mongodb.com/)**, **[Node.js v24.15+](https://nodejs.org/en/download)**, and **[NATS 2.9.25](https://nats.io/)** – auto-provisioned when using Docker Compose
4. **[IPFS storage](https://docs.ipfs.tech/concepts/what-is-ipfs/)** (choose one):

- **[Storacha account](https://storacha.network/)** – IPFS pinning service (formerly Web3.Storage)
- **[Filebase account](https://filebase.com/)** – S3-compatible IPFS pinning
- Local IPFS node (e.g., **[Kubo](https://github.com/ipfs/kubo)**) – auto-provisioned when using Docker Compose

5. **[Valkey](https://valkey.io)** – in-memory cache & message broker (auto-provisioned by the Docker stack)

When building the reference implementation, you can [manually build every component](#manual-installation) or run a single command with Docker.
Expand Down Expand Up @@ -124,7 +122,7 @@ When building the reference implementation, you can [manually build every compon

- [Docker](https://www.docker.com)

If you build with docker [MongoDB V6](https://www.mongodb.com), [Node.js v20.20](https://nodejs.org), [Yarn](https://yarnpkg.com/getting-started/install) and [Nats 2.9.25](https://nats.io/) will be installed and configured automatically.
If you build with docker [MongoDB V6](https://www.mongodb.com), [Node.js v24.15+](https://nodejs.org/en/download), [Yarn](https://yarnpkg.com/getting-started/install) and [Nats 2.9.25](https://nats.io/) will be installed and configured automatically.

### Installation

Expand Down Expand Up @@ -407,7 +405,7 @@ If you want to manually build every component with debug information, then build
### Prerequisites for manual installation

- [MongoDB V6](https://www.mongodb.com)
- [Node.js v20.20](https://nodejs.org)
- [Node.js v24.15+](https://nodejs.org/en/download)
- [Yarn](https://yarnpkg.com/getting-started/install)
- [Nats 2.9.25](https://nats.io/)
- [Valkey](https://valkey.io)
Expand Down
2 changes: 1 addition & 1 deletion ai-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
# Stage 0: Use node image for base image for all stages
ARG NODE_VERSION=20.20.2-alpine
ARG NODE_VERSION=24.18.0-alpine

# JS compile: run on the builder's native arch (fast, output is arch-agnostic)
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION} AS base
Expand Down
16 changes: 9 additions & 7 deletions ai-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,12 @@
"@mikro-orm/mongodb": "6.6.15",
"@nestjs/common": "^11.1.24",
"@nestjs/core": "^11.1.24",
"@types/express": "^5.0.1",
"@types/node": "^22.15.19",
"dotenv": "^16.3.1",
"dotenv": "^16.6.1",
"express": "5.2.1",
"faiss-node": "0.5.1",
"langchain": "1.5.0",
"module-alias": "2.2.3",
"prebuild": "13.0.1",
"rxjs": "^7.8.1",
"typescript": "^5.8.3"
"rxjs": "7.8.2"
},
"imports": {
"#constants": "./dist/constants/index.js"
Expand All @@ -39,8 +35,14 @@
"test": "mocha tests/**/*.test.mjs --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ai-service.xml --exit"
},
"devDependencies": {
"@types/express": "5.0.6",
"@types/glob": "^8.1.0",
"nodemon": "^3.0.1"
"@types/node": "24.13.2",
"nodemon": "3.1.11",
"typescript": "^5.8.3"
},
"engines": {
"node": ">=24.15.0"
},
"type": "module"
}
2 changes: 1 addition & 1 deletion ai-service/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { aiSuggestionsAPI } from './api/service/ai-suggestions-service.js';
import { AISuggestionsDB } from './helpers/ai-suggestions-db.js';
import { AIManager } from './ai-manager.js';
import { ApplicationState, JwtServicesValidator, MessageBrokerChannel, mongoForLoggingInitialization, OldSecretManager, PinoLogger, pinoLoggerInitialization } from '@guardian/common';
import * as process from 'process';
import * as process from 'node:process';
import { ApplicationStates } from '@guardian/interfaces';

Promise.all([
Expand Down
2 changes: 1 addition & 1 deletion ai-service/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dotenv from 'dotenv';
import 'reflect-metadata'
import fs from 'fs';
import fs from 'node:fs';

dotenv.config();

Expand Down
3 changes: 1 addition & 2 deletions ai-service/src/helpers/api-response.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AISuggestionService } from './suggestions.js';
import { ApplicationState, MessageResponse } from '@guardian/common';
import { MessageResponse } from '@guardian/common';

/**
* API response
Expand All @@ -8,7 +8,6 @@ import { ApplicationState, MessageResponse } from '@guardian/common';
* @constructor
*/
export function ApiResponse<T>(event: any, handleFunc: (msg) => Promise<MessageResponse<T>>): void {
const state = new ApplicationState();
new AISuggestionService().registerListener(event, async (msg) => {
return await handleFunc(msg);
})
Expand Down
4 changes: 2 additions & 2 deletions ai-service/src/helpers/files-manager-helper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';

import { GroupCategories } from './general-helper.js';
import { PolicyDescription } from '../models/models.js';
Expand Down
17 changes: 10 additions & 7 deletions ai-service/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
{
"compileOnSave": true,
"compilerOptions": {
"skipLibCheck": true,
"declaration": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"inlineSourceMap": true,
"lib": [
"es6"
"ES2023"
],
"module": "NodeNext",
"moduleResolution": "nodenext",
"moduleResolution": "NodeNext",
"noUnusedLocals": true,
"noUnusedParameters": false,
"outDir": "dist/",
"target": "es2022",
"paths": {
"#constants/*": [
"./src/constants/*"
]
}
},
"rootDir": "./src",
"skipLibCheck": true,
"sourceMap": true,
"strict": false,
"target": "ES2023"
},
"exclude": [
"node_modules",
Expand Down
23 changes: 14 additions & 9 deletions ai-service/tsconfig.production.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
{
"compileOnSave": true,
"compilerOptions": {
"skipLibCheck": true,
"declaration": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"inlineSourceMap": false,
"lib": [
"es6"
"ES2023"
],
"module": "NodeNext",
"moduleResolution": "nodenext",
"moduleResolution": "NodeNext",
"noUnusedLocals": true,
"noUnusedParameters": false,
"outDir": "dist/",
"target": "es2022",
"paths": {
"#constants/*": ["./src/constants/*"]
}
"#constants/*": [
"./src/constants/*"
]
},
"rootDir": "./src",
"skipLibCheck": true,
"sourceMap": false,
"strict": false,
"target": "ES2023"
},
"exclude": [
"node_modules",
Expand All @@ -26,4 +31,4 @@
"include": [
"src/**/*.ts"
]
}
}
2 changes: 1 addition & 1 deletion analytics-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
# Stage 0: Use node image for base image for all stages
ARG NODE_VERSION=20.20.2-alpine
ARG NODE_VERSION=24.18.0-alpine

# JS compile: run on the builder's native arch (fast, output is arch-agnostic)
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION} AS base
Expand Down
28 changes: 15 additions & 13 deletions analytics-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,34 @@
"@nestjs/microservices": "^11.1.24",
"@nestjs/platform-express": "^11.1.24",
"@nestjs/swagger": "^11.4.4",
"@types/express-fileupload": "^1.4.1",
"class-transformer": "^0.5.1",
"class-validator": "0.15.1",
"cron": "^4.3.0",
"dotenv": "^16.0.0",
"dotenv": "^16.6.1",
"excel4node": "^1.8.2",
"express": "5.2.1",
"express-fileupload": "^1.4.0",
"hpp": "^0.2.3",
"jszip": "^3.7.1",
"prom-client": "^14.1.1",
"express-fileupload": "1.5.2",
"hpp": "0.2.3",
"jszip": "3.10.1",
"prom-client": "15.1.3",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1"
"rxjs": "7.8.2"
},
"description": "",
"devDependencies": {
"@types/express": "^5.0.1",
"@types/express": "5.0.6",
"@types/express-fileupload": "1.5.1",
"@types/glob": "^8.1.0",
"@types/jszip": "^3.4.1",
"@types/node": "^22.15.19",
"mocha": "^9.2.0",
"mocha-junit-reporter": "^2.0.2",
"nodemon": "^2.0.12",
"@types/node": "24.13.2",
"mocha": "10.8.2",
"mocha-junit-reporter": "2.2.1",
"nodemon": "3.1.11",
"tslint": "^6.1.3",
"typescript": "^5.8.3"
},
"engines": {
"node": ">=24.15.0"
},
"files": [
"dist"
],
Expand Down
2 changes: 1 addition & 1 deletion analytics-service/src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MiddlewareConsumer, Module } from '@nestjs/common';
import { ClientsModule, Transport } from '@nestjs/microservices';
import hpp from 'hpp';
import process from 'process';
import process from 'node:process';
import express from 'express';
import fileUpload from 'express-fileupload';
import { AnalyticsApi } from './api/analytics.js';
Expand Down
2 changes: 1 addition & 1 deletion analytics-service/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { NestFactory } from '@nestjs/core';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { CronJob } from 'cron';
import express from 'express';
import process from 'process';
import process from 'node:process';
import { ReportService } from './analytics/report.service.js';
import { AppModule } from './app.module.js';
import { SwaggerModule } from '@nestjs/swagger';
Expand Down
2 changes: 1 addition & 1 deletion analytics-service/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dotenv from 'dotenv';
import 'reflect-metadata'
import fs from 'fs';
import fs from 'node:fs';

dotenv.config();

Expand Down
29 changes: 15 additions & 14 deletions analytics-service/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
{
"compileOnSave": true,
"compilerOptions": {
"baseUrl": "./src",
"declaration": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"inlineSourceMap": true,
"skipLibCheck": true,
"lib": [
"es5",
"es6"
"ES2023"
],
"module": "ESNext",
"moduleResolution": "node",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noUnusedLocals": true,
"noUnusedParameters": false,
"outDir": "dist/",
"paths": {
"@api/*": [
"api/*"
"./src/api/*"
],
"@entity/*": [
"entity/*"
"./src/entity/*"
],
"@helpers/*": [
"helpers/*"
"./src/helpers/*"
],
"@interfaces/*": [
"interfaces/*"
"./src/interfaces/*"
],
"@middlewares/*": [
"middlewares/*"
"./src/middlewares/*"
]
},
"target": "es2022"
"rootDir": "./src",
"skipLibCheck": true,
"sourceMap": true,
"strict": false,
"target": "ES2023"
},
"exclude": [
"node_modules",
Expand Down
Loading
Loading