Rename published schema artifacts to .json
- Move server settings and keybindings schema URLs to shorter `.json` paths - Update release tooling, docs, and tests to match the new schema locations
This commit is contained in:
1 parent
8b9cf23ec7
commit
aeaf31ff6d
11 files changed
+24
-35
No files matched your search
+2
-2
@@ -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
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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",
|
||||
|
||||
+2
-2
@@ -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/<version>.schema.json` and `/schemas/keybindings/<version>.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/<version>.json` and `/schemas/keybindings/<version>.json`.
|
||||
|
||||
## Desktop auto-update notes
|
||||
|
||||
|
||||
@@ -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<string, unknown> {
|
||||
const schema = buildJsonSchemaDocument(KeybindingsConfig, {
|
||||
|
||||
@@ -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<string, unknown> {
|
||||
const schema = buildJsonSchemaDocument(ServerSettings, {
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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",
|
||||
),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user