Unit tests cover InMemoryFileOps (read/write/stat/list/rename/remove, seek, misuse guards, constructor seed) and InMemoryState. No WASM needed. Integration tests spin up three real Tailscale nodes against a headscale control server, verifying initIPN WASM loading, /localapi/v0/status, and two-node TCP dial/listen. Credentials loaded from .env.local (gitignored). All IPN instances share one Go WASM runtime (factory compiled once); shutdown() on any one exits the runtime, so a single before()/after() pair wraps the suite. test:coverage script added for consistency with other packages. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
39 lines
1.2 KiB
JSON
39 lines
1.2 KiB
JSON
{
|
|
"name": "@webnet/tsconnect",
|
|
"version": "0.1.0",
|
|
"description": "Tailscale Connect WebAssembly SDK",
|
|
"type": "module",
|
|
"main": "out/index.js",
|
|
"types": "out/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./out/index.d.ts",
|
|
"default": "./out/index.js"
|
|
},
|
|
"./helpers": {
|
|
"types": "./out/helpers.d.ts",
|
|
"default": "./out/helpers.js"
|
|
},
|
|
"./main.wasm": "./dist/main.wasm",
|
|
"./cacert.pem": "./dist/cacert.pem"
|
|
},
|
|
"files": [
|
|
"dist/",
|
|
"out/"
|
|
],
|
|
"scripts": {
|
|
"build": "bash build.sh && tsc --project tsconfig.json",
|
|
"test": "tsx --env-file-if-exists=../../.env.local --test --test-force-exit --test-timeout=180000 'src/**/*.test.ts'",
|
|
"test:coverage": "c8 --src src --exclude 'src/**/*.test.ts' --exclude 'dist/*.js' --reporter text --reporter lcov node --enable-source-maps --import tsx --test-timeout=180000 --test-force-exit --test --env-file-if-exists=../../.env.local 'src/**/*.test.ts'",
|
|
"asset-sizes": "./scripts/asset-sizes.sh",
|
|
"update-ca-bundle": "./scripts/update-ca-bundle.sh",
|
|
"typecheck": "tsc --project tsconfig.json --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@webnet/transport": "*"
|
|
},
|
|
"devDependencies": {
|
|
"typescript": "^6.0.2"
|
|
}
|
|
}
|