Skip to content

Commit 2d7d2e8

Browse files
refactor(major): TS migration
1 parent 6bcf10f commit 2d7d2e8

38 files changed

Lines changed: 2712 additions & 5050 deletions

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
push:
55
branches: [main]
66
paths:
7-
- 'lib/index.d.ts'
8-
- 'lib/Branch.js'
7+
- 'src/types.ts'
8+
- 'src/Branch.ts'
99
- 'package.json'
1010
- 'typedoc.json'
1111
- 'README.md'

.github/workflows/gpu-test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
paths:
77
- 'liblloyal'
88
- 'llama.cpp'
9-
- 'lib/**'
109
- 'src/**'
1110
- 'test/**'
1211
- 'CMakeLists.txt'

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ jobs:
218218
export LD_LIBRARY_PATH="${PKG_BIN}:${LD_LIBRARY_PATH:-}"
219219
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
220220
node -e "
221-
const { loadBinary } = require('./lib');
221+
const { loadBinary } = require('./dist');
222222
const addon = loadBinary();
223223
console.log('✓ Platform package loaded successfully');
224224
console.log(' Exports:', Object.keys(addon));
@@ -255,7 +255,7 @@ jobs:
255255
Write-Host "VULKAN_SDK: $env:VULKAN_SDK"
256256
Write-Host "CUDA_PATH: $env:CUDA_PATH"
257257
node -e "
258-
const { loadBinary } = require('./lib');
258+
const { loadBinary } = require('./dist');
259259
const addon = loadBinary();
260260
console.log('✓ Platform package loaded successfully');
261261
console.log(' Exports:', Object.keys(addon));

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ jobs:
141141
echo "📦 Package contents:"
142142
cat package-contents.txt
143143
144-
# Verify lib/ JavaScript is included
145-
if ! grep -q "package/lib/index.js" package-contents.txt; then
146-
echo "❌ ERROR: lib/index.js not in package!"
144+
# Verify dist/ JavaScript is included
145+
if ! grep -q "package/dist/index.js" package-contents.txt; then
146+
echo "❌ ERROR: dist/index.js not in package!"
147147
exit 1
148148
fi
149149

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Build outputs
22
build/
3+
dist/
34
prebuilds/
45
*.node
56
/include/

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ tests/
3434
examples/
3535
docs/
3636

37-
# C++ source files (users get prebuilt binaries, not source)
37+
# C++ and TS source files (users get prebuilt binaries + compiled JS, not source)
3838
src/
39+
tsconfig.json
3940

4041
# Test models (too large for npm)
4142
models/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ See [`examples/grammar/`](./examples/grammar/) for the full branch fork pattern.
218218

219219
Full API documentation: **[lloyal-ai.github.io/lloyal.node](https://lloyal-ai.github.io/lloyal.node/)**
220220

221-
Generated from [`lib/index.d.ts`](./lib/index.d.ts) with TypeDoc.
221+
Generated from [`src/types.ts`](./src/types.ts) with TypeDoc.
222222

223223
---
224224

examples/best-of-n/README.md

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)