Fix crosscheck harness to resolve TS SDK build relative to repo

The TS runner imported the built SDK via a hardcoded dev-machine path
(/sessions/.../ts-sdk-build/dist/index.js), so the harness only ran on the
author's box. Resolve it relative to the file instead.
This commit is contained in:
Keysat
2026-06-18 14:45:56 -05:00
parent 6e45e3f3e4
commit 178e4677a4
+4 -2
View File
@@ -1,12 +1,14 @@
import { readFileSync } from 'node:fs' import { readFileSync } from 'node:fs'
import { // Resolve the built TS SDK relative to this file so the harness runs on any
// machine. Build it first: `cd licensing-client-ts && npm run build` (see README).
const {
Verifier, Verifier,
PublicKey, PublicKey,
hashFingerprint, hashFingerprint,
parseLicenseKey, parseLicenseKey,
isExpiredAt, isExpiredAt,
hasEntitlement, hasEntitlement,
} from '/sessions/hopeful-determined-edison/ts-sdk-build/dist/index.js' } = await import(new URL('../../licensing-client-ts/dist/index.js', import.meta.url))
const vector = JSON.parse(readFileSync(new URL('./vector.json', import.meta.url), 'utf8')) const vector = JSON.parse(readFileSync(new URL('./vector.json', import.meta.url), 'utf8'))