diff --git a/KEYBINDINGS.md b/KEYBINDINGS.md index 6957657158..695546fe84 100644 --- a/KEYBINDINGS.md +++ b/KEYBINDINGS.md @@ -26,7 +26,7 @@ To get autocomplete and hover docs in editors like VS Code, associate the file e "json.schemas": [ { "fileMatch": ["**/.t3/keybindings.json", "**/keybindings.json"], - "url": "https://t3.chat/schemas/keybindings.schema.json" + "url": "https://t3.codes/schemas/keybindings.json" } ] } @@ -35,7 +35,7 @@ To get autocomplete and hover docs in editors like VS Code, associate the file e If you want a pinned schema instead of the latest stable one, use a versioned URL such as: ```text -https://t3.chat/schemas/keybindings/0.0.15.schema.json +https://t3.codes/schemas/keybindings/0.0.15.json ``` ## Defaults diff --git a/apps/marketing/public/schemas/keybindings.schema.json b/apps/marketing/public/schemas/keybindings.json similarity index 100% rename from apps/marketing/public/schemas/keybindings.schema.json rename to apps/marketing/public/schemas/keybindings.json diff --git a/apps/marketing/public/schemas/keybindings/0.0.15.schema.json b/apps/marketing/public/schemas/keybindings/0.0.15.json similarity index 100% rename from apps/marketing/public/schemas/keybindings/0.0.15.schema.json rename to apps/marketing/public/schemas/keybindings/0.0.15.json diff --git a/apps/marketing/public/schemas/server-settings.schema.json b/apps/marketing/public/schemas/settings.json similarity index 100% rename from apps/marketing/public/schemas/server-settings.schema.json rename to apps/marketing/public/schemas/settings.json diff --git a/apps/marketing/public/schemas/server-settings/0.0.15.schema.json b/apps/marketing/public/schemas/settings/0.0.15.json similarity index 100% rename from apps/marketing/public/schemas/server-settings/0.0.15.schema.json rename to apps/marketing/public/schemas/settings/0.0.15.json diff --git a/apps/server/src/serverSettings.test.ts b/apps/server/src/serverSettings.test.ts index 232286aa14..6226c28162 100644 --- a/apps/server/src/serverSettings.test.ts +++ b/apps/server/src/serverSettings.test.ts @@ -226,7 +226,7 @@ it.layer(NodeServices.layer)("server settings", (it) => { serverConfig.settingsPath, `${JSON.stringify( { - $schema: "https://t3.chat/schemas/server-settings/0.0.15.schema.json", + $schema: "https://t3.codes/schemas/settings/0.0.15.json", providers: { codex: { binaryPath: "/usr/local/bin/codex", @@ -250,7 +250,7 @@ it.layer(NodeServices.layer)("server settings", (it) => { const raw = yield* fileSystem.readFileString(serverConfig.settingsPath); assert.deepEqual(JSON.parse(raw), { - $schema: "https://t3.chat/schemas/server-settings/0.0.15.schema.json", + $schema: "https://t3.codes/schemas/settings/0.0.15.json", providers: { codex: { binaryPath: "/usr/local/bin/codex", diff --git a/docs/release.md b/docs/release.md index cd890c2cf0..ad0cc10e14 100644 --- a/docs/release.md +++ b/docs/release.md @@ -17,8 +17,8 @@ This document covers how to run desktop releases from one tag, first without sig - Includes Electron auto-update metadata (for example `latest*.yml` and `*.blockmap`) in release assets. - Publishes the CLI package (`apps/server`, npm package `t3`) with OIDC trusted publishing. - Signing is optional and auto-detected per platform from secrets. -- Refreshes the marketing-site JSON Schemas for `settings.json` and `keybindings.json` at `/schemas/server-settings.schema.json` and `/schemas/keybindings.schema.json`. -- Commits immutable versioned JSON Schema copies at `/schemas/server-settings/.schema.json` and `/schemas/keybindings/.schema.json`. +- Refreshes the marketing-site JSON Schemas for `settings.json` and `keybindings.json` at `/schemas/settings.json` and `/schemas/keybindings.json`. +- Commits immutable versioned JSON Schema copies at `/schemas/settings/.json` and `/schemas/keybindings/.json`. ## Desktop auto-update notes diff --git a/scripts/lib/keybindings-schema.ts b/scripts/lib/keybindings-schema.ts index 84c5743f29..0995506d06 100644 --- a/scripts/lib/keybindings-schema.ts +++ b/scripts/lib/keybindings-schema.ts @@ -6,13 +6,12 @@ import { writeJsonSchemaArtifacts, } from "./json-schema"; -export const KEYBINDINGS_SCHEMA_RELATIVE_PATH = - "apps/marketing/public/schemas/keybindings.schema.json"; +export const KEYBINDINGS_SCHEMA_RELATIVE_PATH = "apps/marketing/public/schemas/keybindings.json"; export const KEYBINDINGS_VERSIONED_SCHEMA_DIRECTORY_RELATIVE_PATH = "apps/marketing/public/schemas/keybindings"; export const getVersionedKeybindingsSchemaRelativePath = (version: string) => - `${KEYBINDINGS_VERSIONED_SCHEMA_DIRECTORY_RELATIVE_PATH}/${version}.schema.json`; + `${KEYBINDINGS_VERSIONED_SCHEMA_DIRECTORY_RELATIVE_PATH}/${version}.json`; export function buildKeybindingsJsonSchema(): Record { const schema = buildJsonSchemaDocument(KeybindingsConfig, { diff --git a/scripts/lib/server-settings-schema.ts b/scripts/lib/server-settings-schema.ts index f82da1382d..b1407ee8f8 100644 --- a/scripts/lib/server-settings-schema.ts +++ b/scripts/lib/server-settings-schema.ts @@ -8,13 +8,12 @@ import { writeJsonSchemaArtifacts, } from "./json-schema"; -export const SERVER_SETTINGS_SCHEMA_RELATIVE_PATH = - "apps/marketing/public/schemas/server-settings.schema.json"; +export const SERVER_SETTINGS_SCHEMA_RELATIVE_PATH = "apps/marketing/public/schemas/settings.json"; export const SERVER_SETTINGS_VERSIONED_SCHEMA_DIRECTORY_RELATIVE_PATH = - "apps/marketing/public/schemas/server-settings"; + "apps/marketing/public/schemas/settings"; export const getVersionedServerSettingsSchemaRelativePath = (version: string) => - `${SERVER_SETTINGS_VERSIONED_SCHEMA_DIRECTORY_RELATIVE_PATH}/${version}.schema.json`; + `${SERVER_SETTINGS_VERSIONED_SCHEMA_DIRECTORY_RELATIVE_PATH}/${version}.json`; export function buildServerSettingsJsonSchema(): Record { const schema = buildJsonSchemaDocument(ServerSettings, { diff --git a/scripts/release-smoke.ts b/scripts/release-smoke.ts index 6e550d3a4a..4f0a94db0e 100644 --- a/scripts/release-smoke.ts +++ b/scripts/release-smoke.ts @@ -114,21 +114,18 @@ try { "Expected bun.lock to contain the smoke version.", ); - const latestSchemaPath = resolve( - tempRoot, - "apps/marketing/public/schemas/server-settings.schema.json", - ); + const latestSchemaPath = resolve(tempRoot, "apps/marketing/public/schemas/settings.json"); const versionedSchemaPath = resolve( tempRoot, - "apps/marketing/public/schemas/server-settings/9.9.9-smoke.0.schema.json", + "apps/marketing/public/schemas/settings/9.9.9-smoke.0.json", ); const latestKeybindingsSchemaPath = resolve( tempRoot, - "apps/marketing/public/schemas/keybindings.schema.json", + "apps/marketing/public/schemas/keybindings.json", ); const versionedKeybindingsSchemaPath = resolve( tempRoot, - "apps/marketing/public/schemas/keybindings/9.9.9-smoke.0.schema.json", + "apps/marketing/public/schemas/keybindings/9.9.9-smoke.0.json", ); if (!existsSync(latestSchemaPath)) { throw new Error( diff --git a/scripts/update-release-package-versions.test.ts b/scripts/update-release-package-versions.test.ts index 43bf7568c7..39a7e2e4b5 100644 --- a/scripts/update-release-package-versions.test.ts +++ b/scripts/update-release-package-versions.test.ts @@ -33,10 +33,16 @@ describe("updateReleasePackageVersions", () => { expect(packageJson.version).toBe("1.2.3"); } + expect( + JSON.parse( + readFileSync(resolve(rootDir, "apps/marketing/public/schemas/settings.json"), "utf8"), + ), + ).toMatchObject({ title: "T3 Code Server Settings" }); + expect( JSON.parse( readFileSync( - resolve(rootDir, "apps/marketing/public/schemas/server-settings.schema.json"), + resolve(rootDir, "apps/marketing/public/schemas/settings/1.2.3.json"), "utf8", ), ), @@ -44,26 +50,14 @@ describe("updateReleasePackageVersions", () => { expect( JSON.parse( - readFileSync( - resolve(rootDir, "apps/marketing/public/schemas/server-settings/1.2.3.schema.json"), - "utf8", - ), - ), - ).toMatchObject({ title: "T3 Code Server Settings" }); - - expect( - JSON.parse( - readFileSync( - resolve(rootDir, "apps/marketing/public/schemas/keybindings.schema.json"), - "utf8", - ), + readFileSync(resolve(rootDir, "apps/marketing/public/schemas/keybindings.json"), "utf8"), ), ).toMatchObject({ title: "T3 Code Keybindings" }); expect( JSON.parse( readFileSync( - resolve(rootDir, "apps/marketing/public/schemas/keybindings/1.2.3.schema.json"), + resolve(rootDir, "apps/marketing/public/schemas/keybindings/1.2.3.json"), "utf8", ), ),