do not require URL in data schema

This commit is contained in:
Nate 2025-02-24 23:06:23 -08:00
parent 59a4827f98
commit 8c17b86667
2 changed files with 17 additions and 18 deletions

View file

@ -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",

View file

@ -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",
}),