Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11e28502ea |
@@ -4,6 +4,14 @@ Each package and app has its own section and its own tags (`contracts@1.0.0`, `a
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## contracts@1.1.0 - 2026-11-04
|
||||||
|
|
||||||
|
### Contracts
|
||||||
|
|
||||||
|
- Hub protocol v2: optional `requires` on a release (`[{ product, version }]`), the sibling
|
||||||
|
versions it needs. The Hub refuses an update request with `409 REQUIREMENT_NOT_MET` until
|
||||||
|
they're met (Hub 2.0, ROADMAP-v3 §5). Optional, so the schema stays `/1`-compatible.
|
||||||
|
|
||||||
## contracts@1.0.0 - 2026-11-04
|
## contracts@1.0.0 - 2026-11-04
|
||||||
|
|
||||||
### Monorepo
|
### Monorepo
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@crosscode/contracts",
|
"name": "@crosscode/contracts",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"description": "The shared JSON formats used by every Cross Code product: zod schemas, JSON Schema, TypeScript types and sample payloads",
|
"description": "The shared JSON formats used by every Cross Code product: zod schemas, JSON Schema, TypeScript types and sample payloads",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
{
|
{
|
||||||
"licence": "hel1.eyJ2IjoxfQ.c2lnbmF0dXJl",
|
"licence": "hel1.eyJ2IjoxfQ.c2lnbmF0dXJl",
|
||||||
"latestVersion": "2.3.1",
|
"latestVersion": "3.0.0",
|
||||||
"releases": [
|
"releases": [
|
||||||
|
{
|
||||||
|
"version": "3.0.0",
|
||||||
|
"releasedAt": "2026-12-01T10:00:00.000Z",
|
||||||
|
"urgent": false,
|
||||||
|
"notes": "- Sign in with your church account",
|
||||||
|
"requires": [{ "product": "accounts", "version": "1.2.0" }]
|
||||||
|
},
|
||||||
{ "version": "2.3.1", "releasedAt": "2026-11-10T10:00:00.000Z", "urgent": false, "notes": "- Fixed: feed sync after a campus is renamed" }
|
{ "version": "2.3.1", "releasedAt": "2026-11-10T10:00:00.000Z", "urgent": false, "notes": "- Fixed: feed sync after a campus is renamed" }
|
||||||
],
|
],
|
||||||
"notices": [
|
"notices": [
|
||||||
|
|||||||
@@ -36,6 +36,31 @@
|
|||||||
},
|
},
|
||||||
"notes": {
|
"notes": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"requires": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"product": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"events",
|
||||||
|
"website",
|
||||||
|
"app",
|
||||||
|
"accounts"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"product",
|
||||||
|
"version"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
|||||||
@@ -50,6 +50,31 @@
|
|||||||
},
|
},
|
||||||
"notes": {
|
"notes": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"requires": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"product": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"events",
|
||||||
|
"website",
|
||||||
|
"app",
|
||||||
|
"accounts"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"product",
|
||||||
|
"version"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
|||||||
@@ -71,11 +71,21 @@ export function activeMemberBand(count: number): (typeof ACTIVE_MEMBER_BANDS)[nu
|
|||||||
|
|
||||||
const count = z.int().nonnegative();
|
const count = z.int().nonnegative();
|
||||||
|
|
||||||
|
/** A minimum version of a sibling product that a release needs (`— requires accounts 1.2.0`). */
|
||||||
|
export const releaseRequirementSchema = z.object({ product: productSchema, version: semverSchema });
|
||||||
|
export type ReleaseRequirement = z.infer<typeof releaseRequirementSchema>;
|
||||||
|
|
||||||
export const releaseSchema = z.object({
|
export const releaseSchema = z.object({
|
||||||
version: semverSchema,
|
version: semverSchema,
|
||||||
releasedAt: dateTimeSchema,
|
releasedAt: dateTimeSchema,
|
||||||
urgent: z.boolean(),
|
urgent: z.boolean(),
|
||||||
notes: z.string(),
|
notes: z.string(),
|
||||||
|
/**
|
||||||
|
* contracts 1.1.0 (Hub 2.0): the sibling versions this release needs. The Hub refuses an update
|
||||||
|
* request (`409 REQUIREMENT_NOT_MET`) until the church's install of each product runs at least
|
||||||
|
* that version. Optional: absent from Hubs before 2.0 and from protocol v1 replies.
|
||||||
|
*/
|
||||||
|
requires: z.array(releaseRequirementSchema).optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const noticeSchema = z.object({
|
export const noticeSchema = z.object({
|
||||||
|
|||||||
Reference in New Issue
Block a user