@vivantel/rag-core 0.1.0 → 1.1.3
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.
- package/README.md +62 -62
- package/dist/config-loader.d.ts.map +1 -1
- package/dist/config-loader.js +0 -2
- package/dist/config-loader.js.map +1 -1
- package/dist/core/chunk-processor.d.ts.map +1 -1
- package/dist/core/chunk-processor.js +27 -20
- package/dist/core/chunk-processor.js.map +1 -1
- package/dist/core/embedder.d.ts.map +1 -1
- package/dist/core/embedder.js +10 -3
- package/dist/core/embedder.js.map +1 -1
- package/dist/core/git-tracker.d.ts.map +1 -1
- package/dist/core/git-tracker.js +9 -59
- package/dist/core/git-tracker.js.map +1 -1
- package/dist/core/orchestrator.d.ts.map +1 -1
- package/dist/core/orchestrator.js +22 -1
- package/dist/core/orchestrator.js.map +1 -1
- package/dist/core/uploader.d.ts.map +1 -1
- package/dist/core/uploader.js +13 -4
- package/dist/core/uploader.js.map +1 -1
- package/dist/strategies/chunk/token.js +1 -1
- package/dist/strategies/chunk/token.js.map +1 -1
- package/package.json +110 -102
- package/.github/config/release-please.json +0 -38
- package/.github/dependabot.yaml +0 -28
- package/.github/workflows/ci.yaml +0 -119
- package/.github/workflows/publish.yaml +0 -151
- package/.github/workflows/release.yaml +0 -150
- package/.versionrc.json +0 -19
- package/CHANGELOG.md +0 -21
- package/bin/rag-update.ts +0 -49
- package/eslint.config.js +0 -25
- package/src/config-loader.ts +0 -21
- package/src/core/chunk-processor.test.ts +0 -36
- package/src/core/chunk-processor.ts +0 -92
- package/src/core/embedder.ts +0 -189
- package/src/core/git-tracker.test.ts +0 -64
- package/src/core/git-tracker.ts +0 -202
- package/src/core/orchestrator.test.ts +0 -53
- package/src/core/orchestrator.ts +0 -97
- package/src/core/uploader.ts +0 -123
- package/src/core/utils.ts +0 -27
- package/src/helpers/create-chunker.test.ts +0 -31
- package/src/helpers/create-chunker.ts +0 -40
- package/src/index.test.ts +0 -33
- package/src/index.ts +0 -30
- package/src/interfaces/chunker.ts +0 -59
- package/src/interfaces/embedder.ts +0 -36
- package/src/interfaces/index.test.ts +0 -9
- package/src/interfaces/index.ts +0 -3
- package/src/interfaces/vector-store.ts +0 -71
- package/src/strategies/chunk/index.ts +0 -4
- package/src/strategies/chunk/markdown-headers.test.ts +0 -37
- package/src/strategies/chunk/markdown-headers.ts +0 -106
- package/src/strategies/chunk/semantic.test.ts +0 -21
- package/src/strategies/chunk/semantic.ts +0 -80
- package/src/strategies/chunk/token.test.ts +0 -41
- package/src/strategies/chunk/token.ts +0 -72
- package/src/strategies/chunk/whole-file.test.ts +0 -24
- package/src/strategies/chunk/whole-file.ts +0 -35
- package/tsconfig.json +0 -21
- package/typedoc.json +0 -11
- package/vitest.config.ts +0 -19
package/package.json
CHANGED
|
@@ -1,102 +1,110 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@vivantel/rag-core",
|
|
3
|
-
"version": "
|
|
4
|
-
"type": "module",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"clean": "rm -rf dist
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"update
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"watch
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"git",
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@vivantel/rag-core",
|
|
3
|
+
"version": "1.1.3",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/vivantel/rag_core"
|
|
8
|
+
},
|
|
9
|
+
"description": "Core RAG pipeline tools - universal chunking, embedding, vector store interfaces",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"main": "dist/index.js",
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
16
|
+
"bin": {
|
|
17
|
+
"rag-update": "./dist/bin/rag-update.js"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"audit:fix": "npm audit fix",
|
|
21
|
+
"audit:report": "npm audit --json > npm-audit-report.json",
|
|
22
|
+
"audit": "npm audit",
|
|
23
|
+
"build:clean": "rm -rf dist && npm run build",
|
|
24
|
+
"build:verbose": "tsc --listEmittedFiles",
|
|
25
|
+
"build": "tsc && echo \"✅ Build completed successfully\"",
|
|
26
|
+
"check:full": "npm run check && npm run test:coverage && npm run type-coverage",
|
|
27
|
+
"check:quick": "npm run type-check && npm run lint",
|
|
28
|
+
"check": "npm run type-check && npm run lint && npm run format:check && npm run audit",
|
|
29
|
+
"clean:cache": "npm cache clean --force",
|
|
30
|
+
"clean:rebuild": "npm run clean && npm install && npm run build",
|
|
31
|
+
"clean": "rm -rf dist node_modules coverage docs",
|
|
32
|
+
"dev:debug": "tsx --inspect-brk src/index.ts",
|
|
33
|
+
"dev": "tsx watch src/index.ts",
|
|
34
|
+
"docs:generate": "typedoc",
|
|
35
|
+
"docs:open": "npm run docs:generate && open docs/index.html",
|
|
36
|
+
"docs:serve": "npm run docs:generate && npx http-server docs -p 8080",
|
|
37
|
+
"fix:aggressive": "npm run fix:all && npm run update:apply && npm run clean:rebuild",
|
|
38
|
+
"fix:all": "npm run fix && npm run audit:fix",
|
|
39
|
+
"fix": "npm run lint:fix && npm run format",
|
|
40
|
+
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
41
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
42
|
+
"help": "echo 'Available commands:' && grep -E '^\\s+\"[a-z]' package.json | sed 's/\"//g' | sed 's/://g' | column -t",
|
|
43
|
+
"info": "echo 'Node: $(node --version) | npm: $(npm --version)' && npm list --depth=0",
|
|
44
|
+
"lint:fix": "eslint src/ --fix",
|
|
45
|
+
"lint:strict": "eslint src/ --max-warnings 0",
|
|
46
|
+
"lint": "eslint src/",
|
|
47
|
+
"outdated:report": "npm outdated --json > npm-outdated-report.json",
|
|
48
|
+
"outdated": "npm outdated",
|
|
49
|
+
"postpublish": "echo \"✅ Published to npm\"",
|
|
50
|
+
"postversion": "git push && git push --tags",
|
|
51
|
+
"precommit": "npm run type-check && npm run format:check && npm run lint && npm audit",
|
|
52
|
+
"prepublishOnly": "npm run build && npm test",
|
|
53
|
+
"prepush": "npm run test:run && npm run audit && npm run format:check",
|
|
54
|
+
"release:major": "npm version major && npm publish",
|
|
55
|
+
"release:minor": "npm version minor && npm publish",
|
|
56
|
+
"release:patch": "npm version patch && npm publish",
|
|
57
|
+
"release:pre": "npm version prerelease && npm publish --tag next",
|
|
58
|
+
"status": "npm run outdated && npm run audit",
|
|
59
|
+
"test:coverage": "vitest --coverage --config vitest.config.ts",
|
|
60
|
+
"test:debug": "vitest --inspect-brk --config vitest.config.ts",
|
|
61
|
+
"test:run": "vitest run --config vitest.config.ts",
|
|
62
|
+
"test:update": "vitest -u --config vitest.config.ts",
|
|
63
|
+
"test:watch": "vitest watch --config vitest.config.ts",
|
|
64
|
+
"test": "vitest run --config vitest.config.ts",
|
|
65
|
+
"type-check:watch": "tsc --noEmit --watch",
|
|
66
|
+
"type-check": "tsc --noEmit",
|
|
67
|
+
"type-coverage:report": "type-coverage --detail",
|
|
68
|
+
"type-coverage": "type-coverage --at-least 90",
|
|
69
|
+
"update:apply": "npx npm-check-updates -u && npm install",
|
|
70
|
+
"update:check": "npx npm-check-updates",
|
|
71
|
+
"update": "npm update",
|
|
72
|
+
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md",
|
|
73
|
+
"watch:test": "vitest --watch --config vitest.config.ts",
|
|
74
|
+
"watch": "tsc --watch"
|
|
75
|
+
},
|
|
76
|
+
"keywords": [
|
|
77
|
+
"rag",
|
|
78
|
+
"embeddings",
|
|
79
|
+
"vector",
|
|
80
|
+
"git",
|
|
81
|
+
"pipeline"
|
|
82
|
+
],
|
|
83
|
+
"author": "Vivantel",
|
|
84
|
+
"license": "MIT",
|
|
85
|
+
"dependencies": {
|
|
86
|
+
"commander": "^15.0.0",
|
|
87
|
+
"dotenv": "^17.4.2",
|
|
88
|
+
"glob": "^13.0.6",
|
|
89
|
+
"simple-git": "^3.25.0"
|
|
90
|
+
},
|
|
91
|
+
"devDependencies": {
|
|
92
|
+
"@eslint/js": "^10.0.1",
|
|
93
|
+
"@types/node": "^25.9.1",
|
|
94
|
+
"eslint": "^10.4.1",
|
|
95
|
+
"prettier": "^3.8.3",
|
|
96
|
+
"tsx": "^4.11.0",
|
|
97
|
+
"typedoc": "^0.28.19",
|
|
98
|
+
"typedoc-plugin-markdown": "^4.11.0",
|
|
99
|
+
"typescript": "^6.0.3",
|
|
100
|
+
"typescript-eslint": "^8.60.0",
|
|
101
|
+
"vitest": "^4.1.7"
|
|
102
|
+
},
|
|
103
|
+
"engines": {
|
|
104
|
+
"node": ">=18.0.0"
|
|
105
|
+
},
|
|
106
|
+
"vitest": {
|
|
107
|
+
"environment": "node",
|
|
108
|
+
"globals": false
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"release-type": "node",
|
|
3
|
-
"bootstrap-sha": "main",
|
|
4
|
-
"separate-pull-requests": true,
|
|
5
|
-
"include-component-in-tag": false,
|
|
6
|
-
"tag-separator": "@",
|
|
7
|
-
"packages": {
|
|
8
|
-
".": {
|
|
9
|
-
"package-name": "@vivantel/rag-core",
|
|
10
|
-
"changelog-path": "CHANGELOG.md",
|
|
11
|
-
"release-type": "node",
|
|
12
|
-
"bump-minor-pre-major": true,
|
|
13
|
-
"bump-patch-for-minor-pre-major": true,
|
|
14
|
-
"draft": false,
|
|
15
|
-
"prerelease": false
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"plugins": [
|
|
19
|
-
{
|
|
20
|
-
"type": "node-workspace",
|
|
21
|
-
"merge": false
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"type": "sentence-case",
|
|
25
|
-
"pull-request-title-pattern": "chore: release ${version}"
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
"changelog-sections": [
|
|
29
|
-
{"type": "feat", "section": "Features", "hidden": false},
|
|
30
|
-
{"type": "fix", "section": "Bug Fixes", "hidden": false},
|
|
31
|
-
{"type": "perf", "section": "Performance Improvements", "hidden": false},
|
|
32
|
-
{"type": "refactor", "section": "Code Refactoring", "hidden": false},
|
|
33
|
-
{"type": "docs", "section": "Documentation", "hidden": false},
|
|
34
|
-
{"type": "style", "section": "Styles", "hidden": true},
|
|
35
|
-
{"type": "test", "section": "Tests", "hidden": true},
|
|
36
|
-
{"type": "chore", "section": "Miscellaneous Chores", "hidden": true}
|
|
37
|
-
]
|
|
38
|
-
}
|
package/.github/dependabot.yaml
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: "npm"
|
|
4
|
-
directory: "/"
|
|
5
|
-
schedule:
|
|
6
|
-
interval: "weekly"
|
|
7
|
-
day: "monday"
|
|
8
|
-
groups:
|
|
9
|
-
production-dependencies:
|
|
10
|
-
dependency-type: "production"
|
|
11
|
-
development-dependencies:
|
|
12
|
-
dependency-type: "development"
|
|
13
|
-
open-pull-requests-limit: 10
|
|
14
|
-
versioning-strategy: auto
|
|
15
|
-
labels:
|
|
16
|
-
- "dependencies"
|
|
17
|
-
- "automated"
|
|
18
|
-
commit-message:
|
|
19
|
-
prefix: "chore"
|
|
20
|
-
include: "scope"
|
|
21
|
-
|
|
22
|
-
- package-ecosystem: "github-actions"
|
|
23
|
-
directory: "/"
|
|
24
|
-
schedule:
|
|
25
|
-
interval: "weekly"
|
|
26
|
-
labels:
|
|
27
|
-
- "dependencies"
|
|
28
|
-
- "ci"
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [master, develop]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [master]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
build-and-test:
|
|
11
|
-
name: Build & Test
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
|
|
14
|
-
strategy:
|
|
15
|
-
matrix:
|
|
16
|
-
node-version: [22, 24, 26]
|
|
17
|
-
fail-fast: false
|
|
18
|
-
|
|
19
|
-
steps:
|
|
20
|
-
- name: Checkout code
|
|
21
|
-
uses: actions/checkout@v6
|
|
22
|
-
with:
|
|
23
|
-
fetch-depth: 0
|
|
24
|
-
|
|
25
|
-
- name: Setup Node.js
|
|
26
|
-
uses: actions/setup-node@v6
|
|
27
|
-
with:
|
|
28
|
-
node-version: ${{ matrix.node-version }}
|
|
29
|
-
cache: "npm"
|
|
30
|
-
|
|
31
|
-
- name: Install dependencies
|
|
32
|
-
run: npm ci
|
|
33
|
-
|
|
34
|
-
- name: Type check
|
|
35
|
-
run: npm run type-check
|
|
36
|
-
|
|
37
|
-
- name: Lint
|
|
38
|
-
run: npm run lint
|
|
39
|
-
|
|
40
|
-
- name: Run tests
|
|
41
|
-
run: npm test
|
|
42
|
-
|
|
43
|
-
- name: Build
|
|
44
|
-
run: npm run build
|
|
45
|
-
|
|
46
|
-
- name: Upload build artifacts
|
|
47
|
-
uses: actions/upload-artifact@v4
|
|
48
|
-
with:
|
|
49
|
-
name: dist-node-${{ matrix.node-version }}
|
|
50
|
-
path: dist/
|
|
51
|
-
retention-days: 7
|
|
52
|
-
|
|
53
|
-
code-quality:
|
|
54
|
-
name: Code Quality
|
|
55
|
-
runs-on: ubuntu-latest
|
|
56
|
-
|
|
57
|
-
steps:
|
|
58
|
-
- name: Checkout code
|
|
59
|
-
uses: actions/checkout@v6
|
|
60
|
-
|
|
61
|
-
- name: Setup Node.js
|
|
62
|
-
uses: actions/setup-node@v6
|
|
63
|
-
with:
|
|
64
|
-
node-version: "lts/*"
|
|
65
|
-
cache: "npm"
|
|
66
|
-
|
|
67
|
-
- name: Install dependencies
|
|
68
|
-
run: npm ci
|
|
69
|
-
|
|
70
|
-
- name: Check formatting
|
|
71
|
-
run: npx prettier --check "src/**/*.ts"
|
|
72
|
-
|
|
73
|
-
- name: Run lint with fix check
|
|
74
|
-
run: npx eslint src/ --max-warnings 0
|
|
75
|
-
|
|
76
|
-
- name: Type coverage
|
|
77
|
-
run: npx type-coverage --at-least 90
|
|
78
|
-
|
|
79
|
-
- name: Audit dependencies
|
|
80
|
-
run: npm audit --audit-level=moderate
|
|
81
|
-
|
|
82
|
-
security:
|
|
83
|
-
name: Security Scan
|
|
84
|
-
runs-on: ubuntu-latest
|
|
85
|
-
permissions:
|
|
86
|
-
contents: read
|
|
87
|
-
security-events: write
|
|
88
|
-
actions: read
|
|
89
|
-
|
|
90
|
-
steps:
|
|
91
|
-
- name: Checkout code
|
|
92
|
-
uses: actions/checkout@v6
|
|
93
|
-
|
|
94
|
-
- name: Setup Node.js
|
|
95
|
-
uses: actions/setup-node@v6
|
|
96
|
-
with:
|
|
97
|
-
node-version: "lts/*"
|
|
98
|
-
|
|
99
|
-
- name: Run Trivy vulnerability scanner
|
|
100
|
-
uses: aquasecurity/trivy-action@v0.36.0
|
|
101
|
-
with:
|
|
102
|
-
scan-type: "fs"
|
|
103
|
-
scan-ref: "."
|
|
104
|
-
format: "sarif"
|
|
105
|
-
output: "trivy-results.sarif"
|
|
106
|
-
|
|
107
|
-
- name: Upload Trivy results to GitHub Security tab
|
|
108
|
-
uses: github/codeql-action/upload-sarif@v4
|
|
109
|
-
with:
|
|
110
|
-
sarif_file: "trivy-results.sarif"
|
|
111
|
-
|
|
112
|
-
- name: Run npm audit
|
|
113
|
-
run: npm audit --json > npm-audit.json || true
|
|
114
|
-
|
|
115
|
-
- name: Upload npm audit results
|
|
116
|
-
uses: actions/upload-artifact@v4
|
|
117
|
-
with:
|
|
118
|
-
name: npm-audit
|
|
119
|
-
path: npm-audit.json
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
name: Publish
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
|
|
8
|
-
permissions:
|
|
9
|
-
contents: write
|
|
10
|
-
pull-requests: write
|
|
11
|
-
issues: write
|
|
12
|
-
packages: write
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
release-please:
|
|
16
|
-
name: Release Please
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
|
|
19
|
-
outputs:
|
|
20
|
-
release_created: ${{ steps.release.outputs.release_created }}
|
|
21
|
-
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
22
|
-
version: ${{ steps.release.outputs.version }}
|
|
23
|
-
|
|
24
|
-
steps:
|
|
25
|
-
- name: Run Release Please
|
|
26
|
-
id: release
|
|
27
|
-
uses: googleapis/release-please-action@v5
|
|
28
|
-
with:
|
|
29
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
-
release-type: node
|
|
31
|
-
package-name: '@vivantel/rag-core'
|
|
32
|
-
config-file: .github/config/release-please.json
|
|
33
|
-
manifest-file: .release-please-manifest.json
|
|
34
|
-
|
|
35
|
-
publish-npm:
|
|
36
|
-
name: Publish to npm
|
|
37
|
-
needs: release-please
|
|
38
|
-
if: ${{ needs.release-please.outputs.release_created == 'true' }}
|
|
39
|
-
runs-on: ubuntu-latest
|
|
40
|
-
|
|
41
|
-
permissions:
|
|
42
|
-
contents: read
|
|
43
|
-
id-token: write # для npm provenance
|
|
44
|
-
|
|
45
|
-
steps:
|
|
46
|
-
- name: Checkout code
|
|
47
|
-
uses: actions/checkout@v6
|
|
48
|
-
with:
|
|
49
|
-
ref: ${{ needs.release-please.outputs.tag_name }}
|
|
50
|
-
|
|
51
|
-
- name: Setup Node.js
|
|
52
|
-
uses: actions/setup-node@v6
|
|
53
|
-
with:
|
|
54
|
-
node-version: 'lts/*'
|
|
55
|
-
registry-url: 'https://registry.npmjs.org'
|
|
56
|
-
cache: 'npm'
|
|
57
|
-
|
|
58
|
-
- name: Install dependencies
|
|
59
|
-
run: npm ci
|
|
60
|
-
|
|
61
|
-
- name: Build
|
|
62
|
-
run: npm run build
|
|
63
|
-
|
|
64
|
-
- name: Run tests
|
|
65
|
-
run: npm test
|
|
66
|
-
|
|
67
|
-
- name: Check package size
|
|
68
|
-
run: npx package-size
|
|
69
|
-
|
|
70
|
-
- name: Publish to npm
|
|
71
|
-
run: npm publish --provenance --access public
|
|
72
|
-
env:
|
|
73
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
74
|
-
|
|
75
|
-
- name: Create GitHub Release
|
|
76
|
-
uses: softprops/action-gh-release@v2
|
|
77
|
-
with:
|
|
78
|
-
tag_name: ${{ needs.release-please.outputs.tag_name }}
|
|
79
|
-
name: Release ${{ needs.release-please.outputs.version }}
|
|
80
|
-
body_path: CHANGELOG.md
|
|
81
|
-
draft: false
|
|
82
|
-
prerelease: false
|
|
83
|
-
generate_release_notes: true
|
|
84
|
-
env:
|
|
85
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
86
|
-
|
|
87
|
-
create-github-package:
|
|
88
|
-
name: Publish to GitHub Packages
|
|
89
|
-
needs: release-please
|
|
90
|
-
if: ${{ needs.release-please.outputs.release_created == 'true' }}
|
|
91
|
-
runs-on: ubuntu-latest
|
|
92
|
-
|
|
93
|
-
permissions:
|
|
94
|
-
contents: read
|
|
95
|
-
packages: write
|
|
96
|
-
|
|
97
|
-
steps:
|
|
98
|
-
- name: Checkout code
|
|
99
|
-
uses: actions/checkout@v6
|
|
100
|
-
with:
|
|
101
|
-
ref: ${{ needs.release-please.outputs.tag_name }}
|
|
102
|
-
|
|
103
|
-
- name: Setup Node.js
|
|
104
|
-
uses: actions/setup-node@v6
|
|
105
|
-
with:
|
|
106
|
-
node-version: 'lts/*'
|
|
107
|
-
registry-url: 'https://npm.pkg.github.com'
|
|
108
|
-
cache: 'npm'
|
|
109
|
-
|
|
110
|
-
- name: Install dependencies
|
|
111
|
-
run: npm ci
|
|
112
|
-
|
|
113
|
-
- name: Build
|
|
114
|
-
run: npm run build
|
|
115
|
-
|
|
116
|
-
- name: Publish to GitHub Packages
|
|
117
|
-
run: npm publish
|
|
118
|
-
env:
|
|
119
|
-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
120
|
-
|
|
121
|
-
update-docs:
|
|
122
|
-
name: Update Documentation
|
|
123
|
-
needs: release-please
|
|
124
|
-
if: ${{ needs.release-please.outputs.release_created == 'true' }}
|
|
125
|
-
runs-on: ubuntu-latest
|
|
126
|
-
|
|
127
|
-
steps:
|
|
128
|
-
- name: Checkout code
|
|
129
|
-
uses: actions/checkout@v6
|
|
130
|
-
with:
|
|
131
|
-
ref: ${{ needs.release-please.outputs.tag_name }}
|
|
132
|
-
|
|
133
|
-
- name: Setup Node.js
|
|
134
|
-
uses: actions/setup-node@v6
|
|
135
|
-
with:
|
|
136
|
-
node-version: 'lts/*'
|
|
137
|
-
cache: 'npm'
|
|
138
|
-
|
|
139
|
-
- name: Install dependencies
|
|
140
|
-
run: npm ci
|
|
141
|
-
|
|
142
|
-
- name: Generate API documentation
|
|
143
|
-
run: npm run docs:generate
|
|
144
|
-
|
|
145
|
-
- name: Deploy to GitHub Pages
|
|
146
|
-
uses: peaceiris/actions-gh-pages@v4
|
|
147
|
-
with:
|
|
148
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
149
|
-
publish_dir: ./docs/api
|
|
150
|
-
destination_dir: ${{ needs.release-please.outputs.version }}
|
|
151
|
-
keep_files: false
|