DocumentPayload is an opaque object type over the same runtime Uint8Array, keyed by a string property, and types CultCacheEnvelope.payload, CultNetRawDocumentRecord.payload and CultMeshRealtimeFrame.payload. decodeDocumentPayload(definition, payload) and encodeDocumentPayload(definition, value) are the only reader and writer; documentPayloadFromBytes and documentPayloadBytes are the two named escapes at the edges where bytes enter and leave. resolveDocumentFormatter leaves the package index. The cache, cultnet replication, the mesh read paths, the provider command (now a CultCache document), and the browser's decodeCultNetPayload (definition required, cultcache-ts/document entry) all go through the owner. Compile-fail fixtures per payload-carrying package pin the type with expect-error lines. check-typescript-tests-wired.mjs fails when a test file is run by no script; cultcache-ts now runs dist-test/test/*.test.js, and the portability workflow runs the check and the cache suite. Builds in every package (tsc, src and tests); the suites run once, at the end of the pass. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
70 lines
1.9 KiB
JSON
70 lines
1.9 KiB
JSON
{
|
|
"name": "@gamecult/cultcache-ts",
|
|
"version": "0.14.0",
|
|
"description": "CultCache-style typed persistence for TypeScript with schema-backed polymorphic MessagePack storage.",
|
|
"main": "dist/index.js",
|
|
"types": "dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"require": "./dist/index.js",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./document": {
|
|
"types": "./dist/document.d.ts",
|
|
"require": "./dist/document.js",
|
|
"default": "./dist/document.js"
|
|
},
|
|
"./inspection": {
|
|
"types": "./dist/cult-cache-inspector.d.ts",
|
|
"require": "./dist/cult-cache-inspector.js",
|
|
"default": "./dist/cult-cache-inspector.js"
|
|
}
|
|
},
|
|
"typesVersions": {
|
|
"*": {
|
|
"document": [
|
|
"dist/document.d.ts"
|
|
]
|
|
}
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "node ../../node_modules/typescript/bin/tsc -p tsconfig.json",
|
|
"prepack": "node ../../node_modules/typescript/bin/tsc -p tsconfig.json",
|
|
"typecheck": "node ../../node_modules/typescript/bin/tsc -p tsconfig.json --pretty false",
|
|
"test": "node ../../node_modules/typescript/bin/tsc -p tsconfig.json && node ../../node_modules/typescript/bin/tsc -p tsconfig.test.json && node --test dist-test/test/*.test.js"
|
|
},
|
|
"keywords": [
|
|
"messagepack",
|
|
"schema",
|
|
"cache",
|
|
"persistence",
|
|
"zod",
|
|
"typescript"
|
|
],
|
|
"author": "metacratic",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/GameCult/CultLib.git",
|
|
"directory": "packages/cultcache-ts"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/GameCult/CultLib/issues"
|
|
},
|
|
"homepage": "https://github.com/GameCult/CultLib/tree/main/packages/cultcache-ts#readme",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"dependencies": {
|
|
"@msgpack/msgpack": "^3.1.3",
|
|
"zod": "^3.25.76"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^24.0.0",
|
|
"typescript": "^5.9.0"
|
|
}
|
|
}
|