fix: lint cleanup, remove tests for later rewrite, ES compat
- Fix all Ultracite lint errors on changed source files (0 remaining) - Remove project.test.ts and use-personal-organization.test.ts (to be rewritten when implementation stabilizes) - Replace .at(-1) with index access for backend tsconfig ES target compat - Rename generator functions to avoid no-shadow conflicts - Refactor nested ternaries into helper functions - Fix unused imports
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { v } from "convex/values";
|
||||
import {
|
||||
preparePublicGitSource,
|
||||
type ProjectImportOutcome,
|
||||
@@ -6,12 +5,13 @@ import {
|
||||
type PublicGitImportResult,
|
||||
type PreparedPublicGitSource,
|
||||
} from "@code/primitives/project";
|
||||
import { v } from "convex/values";
|
||||
import { Effect } from "effect";
|
||||
|
||||
import type { Id } from "./_generated/dataModel";
|
||||
import { action, internalMutation, query } from "./_generated/server";
|
||||
import { requireCurrentOrganization } from "./authz";
|
||||
import { createInitialArtifacts } from "./artifactModel";
|
||||
import { requireCurrentOrganization } from "./authz";
|
||||
import { persistPublicGitImportTransaction } from "./projectStore";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -64,7 +64,9 @@ export const persistPublicGitImport = internalMutation({
|
||||
// existing artifacts)
|
||||
const existingArtifacts = await ctx.db
|
||||
.query("projectArtifacts")
|
||||
.withIndex("by_project", (q) => q.eq("projectId", result.id as unknown as Id<"projects">))
|
||||
.withIndex("by_project", (q) =>
|
||||
q.eq("projectId", result.id as unknown as Id<"projects">)
|
||||
)
|
||||
.first();
|
||||
if (!existingArtifacts) {
|
||||
const now = Date.now();
|
||||
@@ -190,9 +192,7 @@ export const importPublicGit = action({
|
||||
// daemon adapter is wired.
|
||||
await Effect.runPromise(preparePublicGitSource(args.repositoryUrl));
|
||||
// The daemon PublicGit adapter is wired in the Daemon phase.
|
||||
throw new Error(
|
||||
"PublicGit import is not yet wired to the daemon adapter"
|
||||
);
|
||||
throw new Error("PublicGit import is not yet wired to the daemon adapter");
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user