@@ -117,7 +117,7 @@ export class Resource<C extends OptionalClass = any> {
117117
118118 throw new Error (
119119 'Invalid subject given to resource, must be a string, found ' +
120- typeof subject ,
120+ typeof subject ,
121121 ) ;
122122 }
123123
@@ -547,9 +547,10 @@ export class Resource<C extends OptionalClass = any> {
547547 public getCommitsCollectionSubject ( ) : string {
548548 // For DID subjects (or other non-HTTP URIs) we can't derive the server
549549 // origin from the subject itself — use the store's server URL instead.
550- const base = this . subject . startsWith ( 'did:' ) || this . subject . startsWith ( '_' )
551- ? this . store . getServerUrl ( )
552- : this . subject ;
550+ const base =
551+ this . subject . startsWith ( 'did:' ) || this . subject . startsWith ( '_' )
552+ ? this . store . getServerUrl ( )
553+ : this . subject ;
553554 const url = new URL ( '/commits' , base ) ;
554555 url . searchParams . append ( 'property' , commits . properties . subject ) ;
555556 url . searchParams . append ( 'value' , this . subject ) ;
@@ -599,9 +600,8 @@ export class Resource<C extends OptionalClass = any> {
599600 const commitsCollection = await this . store . fetchResourceFromServer (
600601 this . getCommitsCollectionSubject ( ) ,
601602 ) ;
602- const commitList = ( commitsCollection . get (
603- collections . properties . members ,
604- ) ?? [ ] ) as string [ ] ;
603+ const commitList = ( commitsCollection . get ( collections . properties . members ) ??
604+ [ ] ) as string [ ] ;
605605
606606 const builtVersions : Version [ ] = [ ] ;
607607
@@ -841,7 +841,7 @@ export class Resource<C extends OptionalClass = any> {
841841 // the serialization signed here matches what the server will produce when
842842 // it verifies the signature. The server stores commit resources at
843843 // `{origin}/commits/{signature}`.
844- const commitUrl = `${ this . store . getServerUrl ( ) } /commits/ ${ this . _lastLocalSignature } ` ;
844+ const commitUrl = `did:ad:commit: ${ this . _lastLocalSignature } ` ;
845845 this . commitBuilder . setPreviousCommit ( commitUrl ) ;
846846 } else {
847847 const lastCommit = this . get ( properties . commit . lastCommit ) ?. toString ( ) ;
@@ -895,7 +895,9 @@ export class Resource<C extends OptionalClass = any> {
895895 }
896896
897897 const endpoint = this . getCommitEndpoint ( ) ;
898- const wasNew = this . _pendingCommits . length > 0 && this . _pendingCommits [ 0 ] . previousCommit === undefined ;
898+ const wasNew =
899+ this . _pendingCommits . length > 0 &&
900+ this . _pendingCommits [ 0 ] . previousCommit === undefined ;
899901
900902 let lastCommitId : string | undefined ;
901903
@@ -1000,7 +1002,9 @@ export class Resource<C extends OptionalClass = any> {
10001002 } ) ;
10011003
10021004 // Keep a backup of the commit builder in case push fails.
1003- const oldCommitBuilder = hasChanges ? this . commitBuilder . clone ( ) : undefined ;
1005+ const oldCommitBuilder = hasChanges
1006+ ? this . commitBuilder . clone ( )
1007+ : undefined ;
10041008 const wasNew = this . new ;
10051009
10061010 try {
0 commit comments