Update types to latest heartwood release

This commit is contained in:
Sebastian Martinez
2024-08-29 11:02:04 +02:00
parent 30647fbb26
commit 7711476dae
4 changed files with 11 additions and 11 deletions
+5 -5
View File
@@ -142,23 +142,23 @@ const diffChangesetSchema = object({
});
const diffAddedChangesetSchema = diffChangesetSchema.merge(
object({ state: literal("added"), new: diffFileSchema }),
object({ status: literal("added"), new: diffFileSchema }),
);
const diffDeletedChangesetSchema = diffChangesetSchema.merge(
object({ state: literal("deleted"), old: diffFileSchema }),
object({ status: literal("deleted"), old: diffFileSchema }),
);
const diffModifiedChangesetSchema = diffChangesetSchema.merge(
object({
state: literal("modified"),
status: literal("modified"),
new: diffFileSchema,
old: diffFileSchema,
}),
);
const diffCopiedChangesetSchema = object({
state: literal("copied"),
status: literal("copied"),
newPath: string(),
oldPath: string(),
});
@@ -173,7 +173,7 @@ const diffCopiedWithModificationsChangesetSchema =
);
const diffMovedChangesetSchema = object({
state: literal("moved"),
status: literal("moved"),
newPath: string(),
oldPath: string(),
current: diffFileSchema,
+4 -4
View File
@@ -22,8 +22,8 @@
const diffDescription = (diffFiles: Diff["files"]): string =>
Object.entries(
diffFiles.reduce(
(acc, { state }) => {
acc[state]++;
(acc, { status }) => {
acc[status]++;
return acc;
},
{ added: 0, modified: 0, deleted: 0, copied: 0, moved: 0 },
@@ -109,7 +109,7 @@
filePath={path}
oldFilePath={"oldPath" in file ? file.oldPath : undefined}
fileDiff={file.diff}
headerBadgeCaption={file.state}
headerBadgeCaption={file.status}
content={"new" in file ? files[file.new.oid]?.content : undefined}
oldContent={"old" in file
? files[file.old.oid]?.content
@@ -117,7 +117,7 @@
visible={filesVisibility.has(path)} />
{:else}
<FileLocationChange
headerBadgeCaption={file.state}
headerBadgeCaption={file.status}
oldPath={file.oldPath}
newPath={file.newPath}
{repoId}
+1 -1
View File
@@ -28,7 +28,7 @@
export let content: string | undefined = undefined;
export let oldFilePath: string | undefined = undefined;
export let fileDiff: DiffContent;
export let headerBadgeCaption: ChangesetWithDiff["state"];
export let headerBadgeCaption: ChangesetWithDiff["status"];
export let revision: string | undefined = undefined;
export let baseUrl: BaseUrl;
export let repoId: string;
@@ -7,7 +7,7 @@
import Link from "@app/components/Link.svelte";
import FilePath from "@app/components/FilePath.svelte";
export let headerBadgeCaption: ChangesetWithoutDiff["state"];
export let headerBadgeCaption: ChangesetWithoutDiff["status"];
export let newPath: string;
export let oldPath: string;
export let revision: string | undefined = undefined;