From d7d715fd031e64304ec9a76b367744729725cf4d Mon Sep 17 00:00:00 2001 From: Matthias Meister Date: Fri, 3 Apr 2026 19:59:50 +0200 Subject: [PATCH] fix(convex): rename helper modules to valid convex paths --- convex/_generated/api.d.ts | 6 ++++++ convex/ai.ts | 2 +- convex/{ai-utils.ts => ai_utils.ts} | 0 ...{batch-validation-utils.ts => batch_validation_utils.ts} | 0 convex/nodes.ts | 2 +- convex/polar.ts | 2 +- convex/{polar-utils.ts => polar_utils.ts} | 0 tests/convex/ai-utils.test.ts | 2 +- tests/convex/batch-validation-utils.test.ts | 2 +- tests/convex/polar-utils.test.ts | 2 +- 10 files changed, 12 insertions(+), 6 deletions(-) rename convex/{ai-utils.ts => ai_utils.ts} (100%) rename convex/{batch-validation-utils.ts => batch_validation_utils.ts} (100%) rename convex/{polar-utils.ts => polar_utils.ts} (100%) diff --git a/convex/_generated/api.d.ts b/convex/_generated/api.d.ts index aec5304..613d3c0 100644 --- a/convex/_generated/api.d.ts +++ b/convex/_generated/api.d.ts @@ -9,7 +9,9 @@ */ import type * as ai from "../ai.js"; +import type * as ai_utils from "../ai_utils.js"; import type * as auth from "../auth.js"; +import type * as batch_validation_utils from "../batch_validation_utils.js"; import type * as canvases from "../canvases.js"; import type * as credits from "../credits.js"; import type * as edges from "../edges.js"; @@ -22,6 +24,7 @@ import type * as nodes from "../nodes.js"; import type * as openrouter from "../openrouter.js"; import type * as pexels from "../pexels.js"; import type * as polar from "../polar.js"; +import type * as polar_utils from "../polar_utils.js"; import type * as presets from "../presets.js"; import type * as storage from "../storage.js"; import type * as users from "../users.js"; @@ -34,7 +37,9 @@ import type { declare const fullApi: ApiFromModules<{ ai: typeof ai; + ai_utils: typeof ai_utils; auth: typeof auth; + batch_validation_utils: typeof batch_validation_utils; canvases: typeof canvases; credits: typeof credits; edges: typeof edges; @@ -47,6 +52,7 @@ declare const fullApi: ApiFromModules<{ openrouter: typeof openrouter; pexels: typeof pexels; polar: typeof polar; + polar_utils: typeof polar_utils; presets: typeof presets; storage: typeof storage; users: typeof users; diff --git a/convex/ai.ts b/convex/ai.ts index ab93c95..5cb6b3e 100644 --- a/convex/ai.ts +++ b/convex/ai.ts @@ -12,7 +12,7 @@ import { IMAGE_MODELS, } from "./openrouter"; import type { Id } from "./_generated/dataModel"; -import { assertNodeBelongsToCanvasOrThrow } from "./ai-utils"; +import { assertNodeBelongsToCanvasOrThrow } from "./ai_utils"; const MAX_IMAGE_RETRIES = 2; diff --git a/convex/ai-utils.ts b/convex/ai_utils.ts similarity index 100% rename from convex/ai-utils.ts rename to convex/ai_utils.ts diff --git a/convex/batch-validation-utils.ts b/convex/batch_validation_utils.ts similarity index 100% rename from convex/batch-validation-utils.ts rename to convex/batch_validation_utils.ts diff --git a/convex/nodes.ts b/convex/nodes.ts index 3ec0817..fc35755 100644 --- a/convex/nodes.ts +++ b/convex/nodes.ts @@ -3,7 +3,7 @@ import { v } from "convex/values"; import { requireAuth } from "./helpers"; import type { Doc, Id } from "./_generated/dataModel"; import { isAdjustmentNodeType } from "../lib/canvas-node-types"; -import { validateBatchNodesForUserOrThrow } from "./batch-validation-utils"; +import { validateBatchNodesForUserOrThrow } from "./batch_validation_utils"; import { getCanvasConnectionValidationMessage, validateCanvasConnectionPolicy, diff --git a/convex/polar.ts b/convex/polar.ts index 284e538..1f344ae 100644 --- a/convex/polar.ts +++ b/convex/polar.ts @@ -6,7 +6,7 @@ import { buildSubscriptionRevokedIdempotencyKey, buildTopUpPaidIdempotencyKey, registerWebhookEventOnce, -} from "./polar-utils"; +} from "./polar_utils"; type DbCtx = Pick; diff --git a/convex/polar-utils.ts b/convex/polar_utils.ts similarity index 100% rename from convex/polar-utils.ts rename to convex/polar_utils.ts diff --git a/tests/convex/ai-utils.test.ts b/tests/convex/ai-utils.test.ts index da1f2ec..9301203 100644 --- a/tests/convex/ai-utils.test.ts +++ b/tests/convex/ai-utils.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { assertNodeBelongsToCanvasOrThrow } from "@/convex/ai-utils"; +import { assertNodeBelongsToCanvasOrThrow } from "@/convex/ai_utils"; describe("assertNodeBelongsToCanvasOrThrow", () => { it("accepts matching node/canvas relation", () => { diff --git a/tests/convex/batch-validation-utils.test.ts b/tests/convex/batch-validation-utils.test.ts index 3e8173a..d57d1ab 100644 --- a/tests/convex/batch-validation-utils.test.ts +++ b/tests/convex/batch-validation-utils.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "vitest"; import type { Id } from "@/convex/_generated/dataModel"; -import { validateBatchNodesForUserOrThrow } from "@/convex/batch-validation-utils"; +import { validateBatchNodesForUserOrThrow } from "@/convex/batch_validation_utils"; describe("validateBatchNodesForUserOrThrow", () => { it("rejects mixed canvas ids in one batch", async () => { diff --git a/tests/convex/polar-utils.test.ts b/tests/convex/polar-utils.test.ts index b0e82df..3397cac 100644 --- a/tests/convex/polar-utils.test.ts +++ b/tests/convex/polar-utils.test.ts @@ -5,7 +5,7 @@ import { buildTopUpPaidIdempotencyKey, registerWebhookEventOnce, type WebhookEventRepo, -} from "@/convex/polar-utils"; +} from "@/convex/polar_utils"; describe("polar idempotency helpers", () => { it("builds stable idempotency keys", () => {