Skip to content

Commit 3cf26a2

Browse files
Merge pull request #1 from crispthinking/feature/pr-workflow-test
feat: update CI configuration and enhance README with new features and contributing guidelines
2 parents f17a010 + 18362ae commit 3cf26a2

13 files changed

Lines changed: 2399 additions & 1344 deletions

File tree

.github/workflows/nodejs.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
name: Node.js CI
22

3-
on: [push]
3+
on:
4+
push:
5+
pull_request:
46

57
jobs:
68
build:
9+
environment: dev
710
runs-on: ubuntu-latest
8-
911
steps:
1012
- uses: actions/checkout@v4
1113
- uses: volta-cli/action@v4
1214
- run: npm ci --no-audit
1315
- run: npm run lint --if-present
1416
- run: npm run prettier:check --if-present
1517
- run: npm test
18+
env:
19+
VITE_ATHENA_CLIENT_ID: ${{ secrets.VITE_ATHENA_CLIENT_ID }}
20+
VITE_ATHENA_CLIENT_SECRET: ${{ secrets.VITE_ATHENA_CLIENT_SECRET }}
21+
VITE_ATHENA_DEPLOYMENT_ID: ${{ secrets.VITE_ATHENA_DEPLOYMENT_ID }}
22+
VITE_ATHENA_AFFILIATE: ${{ secrets.VITE_ATHENA_AFFILIATE }}
23+
VITE_OAUTH_ISSUER: ${{ secrets.VITE_OAUTH_ISSUER }}
1624
- run: npm run build --if-present

.github/workflows/typedoc.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Deploy TypeDoc on GitHub pages
2+
3+
on:
4+
push:
5+
branches:
6+
main
7+
8+
env:
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: volta-cli/action@v4
18+
- run: npm ci --no-audit
19+
- run: npm run build --if-present
20+
- run: npm run build:documentation
21+
22+
- name: Deploy to GitHub pages
23+
uses: JamesIves/github-pages-deploy-action@v4
24+
with:
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
branch: gh-pages
27+
folder: docs
28+
clean: true

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
# Athena NodeJS SDK
2+
3+
This repository contains the NodeJS SDK.
4+
5+
## Overview
6+
Athena is a gRPC-based image classification service designed for CSAM (Child Sexual Abuse Material) detection by Crisp. The service provides real-time image classification through bidirectional streaming with session-based deployment management and multi-affiliate support.
7+
8+
## Features
9+
10+
- **Real-time Classification**: Bidirectional streaming for immediate image processing
11+
- **Session Management**: Deployment-based grouping enables collaborative processing
12+
- **Multi-format Support**: Supports JPEG, PNG, WebP, TIFF, and many other image formats
13+
- **Compression**: Optional Brotli compression for bandwidth optimization
14+
- **Error Handling**: Comprehensive error codes and detailed error messages
15+
- **Monitoring**: Active deployment tracking and backlog monitoring
16+
17+
## Contributing
18+
119
## Regenerating the TypeScript gRPC Client
220

321
This project uses [`@protobuf-ts/plugin`](https://github.com/timostamm/protobuf-ts) to generate TypeScript-native gRPC clients and message types for use with `@grpc/grpc-js`.

__tests__/unit/main.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('classifierHelper', () => {
1111
deploymentId: process.env.VITE_ATHENA_DEPLOYMENT_ID,
1212
affiliate: process.env.VITE_ATHENA_AFFILIATE,
1313
authentication: {
14-
issuerUrl: 'https://crispthinking.auth0.com/',
14+
issuerUrl: process.env.VITE_OAUTH_ISSUER,
1515
clientId: process.env.VITE_ATHENA_CLIENT_ID,
1616
clientSecret: process.env.VITE_ATHENA_CLIENT_SECRET,
1717
scope: 'manage:classify'
@@ -39,7 +39,7 @@ describe('classifyImage function', () => {
3939
deploymentId: process.env.VITE_ATHENA_DEPLOYMENT_ID,
4040
affiliate: process.env.VITE_ATHENA_AFFILIATE,
4141
authentication: {
42-
issuerUrl: 'https://crispthinking.auth0.com/',
42+
issuerUrl: process.env.VITE_OAUTH_ISSUER,
4343
clientId: process.env.VITE_ATHENA_CLIENT_ID,
4444
clientSecret: process.env.VITE_ATHENA_CLIENT_SECRET,
4545
scope: 'manage:classify'

0 commit comments

Comments
 (0)