@devilsdev/rag-pipeline-utils 1.0.0 โ†’ 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/.dockerignore +14 -14
  2. package/.eslintignore +5 -0
  3. package/.eslintrc.json +21 -0
  4. package/.github/workflows/ci.yml +46 -42
  5. package/.github/workflows/release.yml +20 -21
  6. package/CHANGELOG.md +13 -0
  7. package/Dockerfile +22 -22
  8. package/LICENSE +674 -674
  9. package/README.md +117 -116
  10. package/__tests__/fixtures/sample-eval-dataset.json +14 -14
  11. package/__tests__/fixtures/sample.pdf +1 -0
  12. package/__tests__/integration/cli/config-flow.test.js +29 -44
  13. package/__tests__/integration/config/load-config.test.js +52 -52
  14. package/__tests__/unit/core/plugin-registry.test.js +55 -55
  15. package/__tests__/unit/reranker/llm-reranker.test.js +42 -42
  16. package/__tests__/unit/reranker/reranker.snapshot.test.js +17 -17
  17. package/bin/cli.js +168 -168
  18. package/docs-site/docs/Architecture.md +76 -76
  19. package/docs-site/docs/CLI.md +69 -69
  20. package/docs-site/docs/Evaluation.md +61 -61
  21. package/docs-site/docs/FAQ.md +50 -50
  22. package/docs-site/docs/Plugins.md +61 -61
  23. package/docs-site/docs/Usage.md +72 -72
  24. package/jest.config.js +20 -13
  25. package/package.json +4 -2
  26. package/public/src/App.jsx +57 -57
  27. package/release.config.js +36 -23
  28. package/scripts/setup.js +7 -0
  29. package/scripts/test-global-setup.js +18 -0
  30. package/server.js +31 -31
  31. package/src/config/load-config.js +35 -35
  32. package/src/config/validate-schema.js +49 -49
  33. package/src/core/create-pipeline.js +82 -82
  34. package/src/core/plugin-registry.js +61 -61
  35. package/src/dag/dag-engine.js +69 -69
  36. package/src/evaluate/evaluator.js +44 -44
  37. package/src/evaluate/scoring.js +73 -73
  38. package/src/loader/csv-loader.js +30 -30
  39. package/src/loader/directory-loader.js +37 -37
  40. package/src/loader/html-loader.js +57 -57
  41. package/src/loader/markdown-loader.js +58 -58
  42. package/src/reranker/llm-reranker.js +48 -48
  43. package/src/utils/logger.js +29 -29
  44. package/src/utils/retry.js +42 -42
package/.dockerignore CHANGED
@@ -1,14 +1,14 @@
1
- # Ignore test files, fixtures, and local config
2
- __tests__/
3
- coverage/
4
- .env
5
- .env.*
6
- node_modules/
7
- .dockerignore
8
- .git
9
- .gitignore
10
- .vscode
11
- *.log
12
- *.md
13
- /public/
14
- /docs-site/
1
+ # Ignore test files, fixtures, and local config
2
+ __tests__/
3
+ coverage/
4
+ .env
5
+ .env.*
6
+ node_modules/
7
+ .dockerignore
8
+ .git
9
+ .gitignore
10
+ .vscode
11
+ *.log
12
+ *.md
13
+ /public/
14
+ /docs-site/
package/.eslintignore ADDED
@@ -0,0 +1,5 @@
1
+ node_modules
2
+ docs-site
3
+ public
4
+ dist
5
+ coverage
package/.eslintrc.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "env": {
3
+ "es2022": true,
4
+ "node": true,
5
+ "jest": true
6
+ },
7
+ "extends": [
8
+ "eslint:recommended"
9
+ ],
10
+ "parserOptions": {
11
+ "ecmaVersion": "latest",
12
+ "sourceType": "module"
13
+ },
14
+ "rules": {
15
+ "no-unused-vars": "warn",
16
+ "no-console": "off",
17
+ "semi": ["error", "always"],
18
+ "quotes": ["error", "single"]
19
+ }
20
+ }
21
+
@@ -1,42 +1,46 @@
1
- # .github/workflows/ci.yml
2
- # Version: 0.1.0
3
- # Description: GitHub Actions CI pipeline for lint, test, and coverage
4
- # Author: Ali Kahwaji
5
-
6
- name: CI
7
-
8
- on:
9
- push:
10
- branches: [main]
11
- pull_request:
12
- branches: [main]
13
-
14
- jobs:
15
- build:
16
- runs-on: ubuntu-latest
17
-
18
- steps:
19
- - name: ๐Ÿงพ Checkout repository
20
- uses: actions/checkout@v3
21
-
22
- - name: ๐ŸŸข Setup Node.js
23
- uses: actions/setup-node@v3
24
- with:
25
- node-version: 18
26
-
27
- - name: ๐Ÿ“ฆ Install dependencies
28
- run: npm ci
29
-
30
- - name: ๐Ÿงน Lint code
31
- run: npm run lint
32
-
33
- - name: ๐Ÿงช Run tests
34
- run: npm test
35
-
36
- - name: ๐Ÿ“ˆ Upload coverage to Codecov
37
- uses: codecov/codecov-action@v3
38
- with:
39
- token: ${{ secrets.CODECOV_TOKEN }}
40
- files: ./coverage/lcov.info
41
- flags: unit
42
- name: codecov-report
1
+ # .github/workflows/ci.yml
2
+ # Version: 0.1.0
3
+ # Description: GitHub Actions CI pipeline for lint, test, and coverage
4
+ # Author: Ali Kahwaji
5
+
6
+ name: CI & Release
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ pull_request:
13
+ branches:
14
+ - main
15
+
16
+ jobs:
17
+ build-test-release:
18
+ name: Lint, Test, and Release
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - name: โฌ‡๏ธ Checkout code
23
+ uses: actions/checkout@v4
24
+
25
+ - name: ๐ŸŸข Setup Node.js
26
+ uses: actions/setup-node@v4
27
+ with:
28
+ node-version: 20
29
+ cache: 'npm'
30
+ registry-url: 'https://registry.npmjs.org/'
31
+
32
+ - name: ๐Ÿ“ฆ Install dependencies
33
+ run: npm ci
34
+
35
+ - name: ๐Ÿงน Lint
36
+ run: npm run lint
37
+
38
+ - name: โœ… Run tests with coverage
39
+ run: npm test
40
+
41
+ - name: ๐Ÿš€ Semantic Release
42
+ env:
43
+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
44
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
45
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # ๐Ÿ‘ˆ critical for npm publi
46
+ run: npx semantic-release
@@ -1,21 +1,20 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- branches: [main]
6
-
7
- jobs:
8
- release:
9
- runs-on: ubuntu-latest
10
- steps:
11
- - uses: actions/checkout@v3
12
- - uses: actions/setup-node@v3
13
- with:
14
- node-version: 18
15
- registry-url: 'https://registry.npmjs.org'
16
-
17
- - run: npm ci
18
- - run: npx semantic-release
19
- env:
20
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ jobs:
8
+ release:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - uses: actions/setup-node@v3
13
+ with:
14
+ node-version: 18
15
+ registry-url: 'https://registry.npmjs.org/'
16
+ - run: npm ci
17
+ - run: npx semantic-release
18
+ env:
19
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
20
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ ## [1.0.1](https://github.com/DevilsDev/rag-pipeline-utils/compare/v1.0.0...v1.0.1) (2025-04-14)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **ci:** initialize release pipeline and scaffold changelog ([179b486](https://github.com/DevilsDev/rag-pipeline-utils/commit/179b486effb0751b8735a9f849825eb63930ad01))
9
+ * **tests:** add missing sample PDF fixture and pre-test setup script ([de8e2b2](https://github.com/DevilsDev/rag-pipeline-utils/commit/de8e2b2c19034b521fc5ae1cdebbe3884a2fd15f))
10
+
11
+ All notable changes to this project will be documented in this file.
12
+
13
+ The format is based on [Semantic Versioning](https://semver.org/), and this project uses [semantic-release](https://github.com/semantic-release/semantic-release) for automated versioning and changelog generation.
package/Dockerfile CHANGED
@@ -1,22 +1,22 @@
1
- # Version: 0.1.0
2
- # Path: /Dockerfile
3
- # Description: Minimal Docker image for rag-pipeline CLI
4
- # Author: Ali Kahwaji
5
-
6
- FROM node:18-slim
7
-
8
- # Create app directory
9
- WORKDIR /app
10
-
11
- # Copy package files and install deps
12
- COPY package*.json ./
13
- RUN npm ci --omit=dev
14
-
15
- # Copy application source
16
- COPY . .
17
-
18
- # Set default entrypoint
19
- ENTRYPOINT ["node", "./bin/cli.js"]
20
-
21
- # Default help
22
- CMD ["--help"]
1
+ # Version: 0.1.0
2
+ # Path: /Dockerfile
3
+ # Description: Minimal Docker image for rag-pipeline CLI
4
+ # Author: Ali Kahwaji
5
+
6
+ FROM node:18-slim
7
+
8
+ # Create app directory
9
+ WORKDIR /app
10
+
11
+ # Copy package files and install deps
12
+ COPY package*.json ./
13
+ RUN npm ci --omit=dev
14
+
15
+ # Copy application source
16
+ COPY . .
17
+
18
+ # Set default entrypoint
19
+ ENTRYPOINT ["node", "./bin/cli.js"]
20
+
21
+ # Default help
22
+ CMD ["--help"]