Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
Update types to latest heartwood release
Sebastian Martinez committed 1 year ago
commit 7711476daec3f565c16f0f55d3191df92f138590
parent 30647fb
4 files changed +11 -11
modified http-client/lib/repo/commit.ts
@@ -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,
modified src/views/repos/Changeset.svelte
@@ -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}
modified src/views/repos/Changeset/FileDiff.svelte
@@ -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;
modified src/views/repos/Changeset/FileLocationChange.svelte
@@ -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;