From 8c17b86667acbd87db588385ce0935f9c6a6d760 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 24 Feb 2025 23:06:23 -0800 Subject: [PATCH] do not require URL in data schema --- packages/config-yaml/package.json | 2 +- .../config-yaml/src/schemas/data/index.ts | 33 +++++++++---------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/packages/config-yaml/package.json b/packages/config-yaml/package.json index 75d11129a..0fb970562 100644 --- a/packages/config-yaml/package.json +++ b/packages/config-yaml/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/config-yaml", - "version": "1.0.50", + "version": "1.0.51", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/config-yaml/src/schemas/data/index.ts b/packages/config-yaml/src/schemas/data/index.ts index 2a2742cb8..d1155f389 100644 --- a/packages/config-yaml/src/schemas/data/index.ts +++ b/packages/config-yaml/src/schemas/data/index.ts @@ -1,43 +1,42 @@ import { z } from "zod"; -import { autocompleteEventAllSchema } from "./autocomplete/index.js"; import { requestOptionsSchema } from "../models.js"; +import { autocompleteEventAllSchema } from "./autocomplete/index.js"; import { autocompleteEventSchema_0_1_0, autocompleteEventSchema_0_1_0_noCode, } from "./autocomplete/v0.1.0.js"; -import { - quickEditEventSchema_0_1_0, - quickEditEventSchema_0_1_0_noCode, -} from "./quickEdit/v0.1.0.js"; import { autocompleteEventSchema_0_2_0, autocompleteEventSchema_0_2_0_noCode, } from "./autocomplete/v0.2.0.js"; -import { quickEditEventAllSchema } from "./quickEdit/index.js"; import { chatFeedbackEventAllSchema } from "./chatFeedback/index.js"; -import { tokensGeneratedEventAllSchema } from "./tokensGenerated/index.js"; import { chatFeedbackEventSchema_0_1_0, chatFeedbackEventSchema_0_1_0_noCode, } from "./chatFeedback/v0.1.0.js"; -import { - tokensGeneratedEventSchema_0_1_0, - tokensGeneratedEventSchema_0_1_0_noCode, -} from "./tokensGenerated/v0.1.0.js"; import { chatFeedbackEventSchema_0_2_0, chatFeedbackEventSchema_0_2_0_noCode, } from "./chatFeedback/v0.2.0.js"; -import { - tokensGeneratedEventSchema_0_2_0, - tokensGeneratedEventSchema_0_2_0_noCode, -} from "./tokensGenerated/v0.2.0.js"; import { chatInteractionEventAllSchema } from "./chatInteraction/index.js"; import { chatInteractionEventSchema_0_2_0, chatInteractionEventSchema_0_2_0_noCode, } from "./chatInteraction/v0.2.0.js"; -import { editInteractionEventAllSchema } from "./editInteraction/index.js"; +import { quickEditEventAllSchema } from "./quickEdit/index.js"; +import { + quickEditEventSchema_0_1_0, + quickEditEventSchema_0_1_0_noCode, +} from "./quickEdit/v0.1.0.js"; +import { tokensGeneratedEventAllSchema } from "./tokensGenerated/index.js"; +import { + tokensGeneratedEventSchema_0_1_0, + tokensGeneratedEventSchema_0_1_0_noCode, +} from "./tokensGenerated/v0.1.0.js"; +import { + tokensGeneratedEventSchema_0_2_0, + tokensGeneratedEventSchema_0_2_0_noCode, +} from "./tokensGenerated/v0.2.0.js"; const semverRegex = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9A-Za-z-][0-9A-Za-z-]*))*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/; @@ -46,7 +45,7 @@ const dataLevel = z.union([z.literal("all"), z.literal("noCode")]); export const dataSchema = z.object({ name: z.string(), - destination: z.string().url(), + destination: z.string(), schema: z.string().regex(semverRegex, { message: "Version must follow semver format, e.g. 0.2.0", }),