Skip to content

Commit

Permalink
Fixed merge loop, refactor authors
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Feb 27, 2024
1 parent 9a7280c commit 95ae90e
Show file tree
Hide file tree
Showing 14 changed files with 186 additions and 154 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake .
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ docs/.vitepress/cache
*.iml
*.tsbuildinfo
.running
.direnv
147 changes: 43 additions & 104 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@holochain-syn/client",
"version": "0.11.3",
"version": "0.11.4",
"main": "./dist/index.js",
"module": "./dist/index.js",
"type": "module",
Expand Down
15 changes: 13 additions & 2 deletions packages/client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ export class SynClient extends ZomeClient<SynSignal> {
return new EntryRecord(record);
}


public async getAuthorsForDocument(documentHash: AnyDhtHash): Promise<Array<Link>> {
return this.callZome('get_authors_for_document', documentHash);
}

public async tagDocument(
documentHash: AnyDhtHash,
tag: string
Expand Down Expand Up @@ -86,7 +91,7 @@ export class SynClient extends ZomeClient<SynSignal> {
signal.type === 'EntryCreated' &&
signal.app_entry.type === 'Commit' &&
cleanNodeDecoding(commit.document_hash).toString() ===
cleanNodeDecoding(signal.app_entry.document_hash).toString()
cleanNodeDecoding(signal.app_entry.document_hash).toString()
) {
unsubs();

Expand Down Expand Up @@ -118,7 +123,13 @@ export class SynClient extends ZomeClient<SynSignal> {
public async getCommitsForDocument(
documentHash: AnyDhtHash
): Promise<Array<Link>> {
return this.callZome('get_commits_for_document', documentHash);
const commits: Array<Link> = await this.callZome('get_commits_for_document', documentHash);

if (commits.length > 600) {
console.warn(`THERE ARE ${commits.length} FOR THIS DOCUMENT. THIS SHOULDN'T HAPPEN! REPORT TO THE SYN DEVS ABOUT THIS (guillemcordoba)`);
}

return commits;
}

/** Workspaces */
Expand Down
2 changes: 1 addition & 1 deletion packages/store/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@holochain-syn/store",
"version": "0.11.3",
"version": "0.11.4",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"type": "module",
Expand Down
Loading

0 comments on commit 95ae90e

Please sign in to comment.