Contracts 1.0.0: generated JSON Schema for every contract

- schemas/: JSON Schema (draft 2020-12) generated from the zod schemas by
  npm run build (scripts/json-schemas.cjs), exported as
  @crosscode/contracts/schemas/*
- Test: files match the zod schemas, every sample passes them (Ajv)
- Version 1.0.0, CHANGELOG and README

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-04 14:30:37 +02:00
co-authored by Claude Opus 5.5
parent ea1575f716
commit 9e94c82502
35 changed files with 4330 additions and 5 deletions
+7 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@crosscode/contracts",
"version": "0.1.0",
"version": "1.0.0",
"description": "The shared JSON formats used by every Cross Code product: zod schemas, JSON Schema, TypeScript types and sample payloads",
"license": "UNLICENSED",
"type": "commonjs",
@@ -28,6 +28,7 @@
"default": "./dist/signing.js"
}
},
"./schemas/*": "./schemas/*",
"./package.json": "./package.json"
},
"files": [
@@ -38,7 +39,7 @@
],
"sideEffects": false,
"scripts": {
"build": "tsup",
"build": "tsup && node scripts/json-schemas.cjs",
"typecheck": "tsc -p tsconfig.json --noEmit",
"test": "jest"
},
@@ -52,5 +53,9 @@
"type": "git",
"url": "https://c-git.crosscode.co.za/joshua/crosscode-platform.git",
"directory": "packages/contracts"
},
"devDependencies": {
"ajv": "^8.20.0",
"ajv-formats": "^3.0.1"
}
}