Skip to content

Commit 846e7a7

Browse files
committed
feat: first version of working client and server
1 parent e072545 commit 846e7a7

18 files changed

+816
-381
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Nillion
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

biome.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.0.0-beta.4/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"includes": [
11+
"**/*.ts",
12+
"**/*.mjs",
13+
"**/*.json",
14+
"!**/src/gen-proto",
15+
"!**/scripts",
16+
"!**/nilvm"
17+
]
18+
},
19+
"formatter": {
20+
"enabled": true,
21+
"indentStyle": "space",
22+
"formatWithErrors": true
23+
},
24+
"assist": { "actions": { "source": { "organizeImports": "on" } } },
25+
"linter": {
26+
"enabled": true,
27+
"rules": {
28+
"recommended": true,
29+
"correctness": {
30+
"recommended": true,
31+
"noUnusedImports": "error",
32+
"noUnusedVariables": "error"
33+
},
34+
"style": {
35+
"noParameterAssign": "error",
36+
"useAsConstAssertion": "error",
37+
"useDefaultParameterLast": "error",
38+
"useEnumInitializers": "error",
39+
"useSelfClosingElements": "error",
40+
"useConst": "error",
41+
"useSingleVarDeclarator": "error",
42+
"noUnusedTemplateLiteral": "error",
43+
"useNumberNamespace": "error",
44+
"noInferrableTypes": "error",
45+
"noUselessElse": "error"
46+
},
47+
"nursery": {
48+
"noImportCycles": "error"
49+
}
50+
}
51+
},
52+
"javascript": {
53+
"formatter": {
54+
"quoteStyle": "double",
55+
"trailingCommas": "all"
56+
}
57+
},
58+
"overrides": [
59+
{
60+
"includes": ["**/tests/**/*.ts"],
61+
"linter": {
62+
"rules": {
63+
"style": {
64+
"noNonNullAssertion": "off"
65+
}
66+
}
67+
}
68+
}
69+
]
70+
}

jest.config.ts

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

package.json

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,24 @@
55
"type": "module",
66
"main": "dist/index.js",
77
"types": "dist/index.d.ts",
8+
"exports": {
9+
".": {
10+
"types": "./dist/lib.d.ts",
11+
"import": "./dist/lib.js"
12+
},
13+
"./package.json": "./package.json"
14+
},
815
"scripts": {
916
"build": "tsup",
1017
"dev": "tsup --watch",
11-
"test": "jest",
12-
"test:watch": "jest --watch",
13-
"lint": "eslint src --ext .ts",
14-
"lint:fix": "eslint src --ext .ts --fix",
18+
"test": "vitest run",
19+
"test:watch": "vitest",
20+
"test:coverage": "vitest run --coverage",
21+
"test:coverage:watch": "vitest --coverage",
22+
"fmt": "biome format --write .",
23+
"lint": "biome lint .",
24+
"lint:fix": "biome lint --write .",
25+
"ci": "biome check .",
1526
"prepublishOnly": "pnpm run build"
1627
},
1728
"keywords": [
@@ -27,19 +38,23 @@
2738
"url": "https://github.com/NillionNetwork/nilai-ts.git"
2839
},
2940
"files": [
30-
"dist"
41+
"dist",
42+
"LICENSE",
43+
"README.md"
3144
],
32-
"packageManager": "pnpm@10.11.1",
45+
"packageManager": "pnpm@10.12.1",
3346
"devDependencies": {
34-
"@types/jest": "^30.0.0",
47+
"@biomejs/biome": "2.0.0",
3548
"@types/node": "^24.0.3",
3649
"@typescript-eslint/eslint-plugin": "^8.34.0",
3750
"@typescript-eslint/parser": "^8.34.0",
51+
"@vitest/coverage-v8": "^3.2.4",
52+
"dotenv": "^16.5.0",
3853
"eslint": "^9.29.0",
39-
"jest": "^30.0.0",
40-
"ts-jest": "^29.4.0",
4154
"tsup": "^8.5.0",
42-
"typescript": "^5.8.3"
55+
"typescript": "^5.8.3",
56+
"vite-tsconfig-paths": "^5.1.4",
57+
"vitest": "^2.1.9"
4358
},
4459
"dependencies": {
4560
"@nillion/nuc": "0.1.0-rc.8",

0 commit comments

Comments
 (0)