fix(convex): rename helper modules to valid convex paths

This commit is contained in:
2026-04-03 19:59:50 +02:00
parent 081bf13e04
commit d7d715fd03
10 changed files with 12 additions and 6 deletions

View File

@@ -9,7 +9,9 @@
*/ */
import type * as ai from "../ai.js"; 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 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 canvases from "../canvases.js";
import type * as credits from "../credits.js"; import type * as credits from "../credits.js";
import type * as edges from "../edges.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 openrouter from "../openrouter.js";
import type * as pexels from "../pexels.js"; import type * as pexels from "../pexels.js";
import type * as polar from "../polar.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 presets from "../presets.js";
import type * as storage from "../storage.js"; import type * as storage from "../storage.js";
import type * as users from "../users.js"; import type * as users from "../users.js";
@@ -34,7 +37,9 @@ import type {
declare const fullApi: ApiFromModules<{ declare const fullApi: ApiFromModules<{
ai: typeof ai; ai: typeof ai;
ai_utils: typeof ai_utils;
auth: typeof auth; auth: typeof auth;
batch_validation_utils: typeof batch_validation_utils;
canvases: typeof canvases; canvases: typeof canvases;
credits: typeof credits; credits: typeof credits;
edges: typeof edges; edges: typeof edges;
@@ -47,6 +52,7 @@ declare const fullApi: ApiFromModules<{
openrouter: typeof openrouter; openrouter: typeof openrouter;
pexels: typeof pexels; pexels: typeof pexels;
polar: typeof polar; polar: typeof polar;
polar_utils: typeof polar_utils;
presets: typeof presets; presets: typeof presets;
storage: typeof storage; storage: typeof storage;
users: typeof users; users: typeof users;

View File

@@ -12,7 +12,7 @@ import {
IMAGE_MODELS, IMAGE_MODELS,
} from "./openrouter"; } from "./openrouter";
import type { Id } from "./_generated/dataModel"; import type { Id } from "./_generated/dataModel";
import { assertNodeBelongsToCanvasOrThrow } from "./ai-utils"; import { assertNodeBelongsToCanvasOrThrow } from "./ai_utils";
const MAX_IMAGE_RETRIES = 2; const MAX_IMAGE_RETRIES = 2;

View File

@@ -3,7 +3,7 @@ import { v } from "convex/values";
import { requireAuth } from "./helpers"; import { requireAuth } from "./helpers";
import type { Doc, Id } from "./_generated/dataModel"; import type { Doc, Id } from "./_generated/dataModel";
import { isAdjustmentNodeType } from "../lib/canvas-node-types"; import { isAdjustmentNodeType } from "../lib/canvas-node-types";
import { validateBatchNodesForUserOrThrow } from "./batch-validation-utils"; import { validateBatchNodesForUserOrThrow } from "./batch_validation_utils";
import { import {
getCanvasConnectionValidationMessage, getCanvasConnectionValidationMessage,
validateCanvasConnectionPolicy, validateCanvasConnectionPolicy,

View File

@@ -6,7 +6,7 @@ import {
buildSubscriptionRevokedIdempotencyKey, buildSubscriptionRevokedIdempotencyKey,
buildTopUpPaidIdempotencyKey, buildTopUpPaidIdempotencyKey,
registerWebhookEventOnce, registerWebhookEventOnce,
} from "./polar-utils"; } from "./polar_utils";
type DbCtx = Pick<MutationCtx, "db">; type DbCtx = Pick<MutationCtx, "db">;

View File

@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { assertNodeBelongsToCanvasOrThrow } from "@/convex/ai-utils"; import { assertNodeBelongsToCanvasOrThrow } from "@/convex/ai_utils";
describe("assertNodeBelongsToCanvasOrThrow", () => { describe("assertNodeBelongsToCanvasOrThrow", () => {
it("accepts matching node/canvas relation", () => { it("accepts matching node/canvas relation", () => {

View File

@@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import type { Id } from "@/convex/_generated/dataModel"; import type { Id } from "@/convex/_generated/dataModel";
import { validateBatchNodesForUserOrThrow } from "@/convex/batch-validation-utils"; import { validateBatchNodesForUserOrThrow } from "@/convex/batch_validation_utils";
describe("validateBatchNodesForUserOrThrow", () => { describe("validateBatchNodesForUserOrThrow", () => {
it("rejects mixed canvas ids in one batch", async () => { it("rejects mixed canvas ids in one batch", async () => {

View File

@@ -5,7 +5,7 @@ import {
buildTopUpPaidIdempotencyKey, buildTopUpPaidIdempotencyKey,
registerWebhookEventOnce, registerWebhookEventOnce,
type WebhookEventRepo, type WebhookEventRepo,
} from "@/convex/polar-utils"; } from "@/convex/polar_utils";
describe("polar idempotency helpers", () => { describe("polar idempotency helpers", () => {
it("builds stable idempotency keys", () => { it("builds stable idempotency keys", () => {