Skip to content

Commit 96f1f9f

Browse files
committed
updating package and generated code for 0.5.9 release
1 parent 9e8cfbf commit 96f1f9f

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

AutomergeUniffi/automerge.swift

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,10 @@ public protocol DocProtocol: AnyObject {
416416

417417
func applyEncodedChangesWithPatches(changes: [UInt8]) throws -> [Patch]
418418

419-
func changes() -> [ChangeHash]
420-
421419
func changeByHash(hash: ChangeHash) -> Change?
422420

421+
func changes() -> [ChangeHash]
422+
423423
func commitWith(msg: String?, time: Int64)
424424

425425
func cursor(obj: ObjId, position: UInt64) throws -> Cursor
@@ -525,7 +525,6 @@ public protocol DocProtocol: AnyObject {
525525
func values(obj: ObjId) throws -> [Value]
526526

527527
func valuesAt(obj: ObjId, heads: [ChangeHash]) throws -> [Value]
528-
529528
}
530529

531530
public class Doc:
@@ -607,32 +606,45 @@ public class Doc:
607606
)
608607
}
609608

610-
public func changes() -> [ChangeHash] {
611-
try! FfiConverterSequenceTypeChangeHash.lift(
609+
public func changeByHash(hash: ChangeHash) -> Change? {
610+
try! FfiConverterOptionTypeChange.lift(
612611
try!
613612
rustCall {
614-
uniffi_uniffi_automerge_fn_method_doc_changes(
613+
uniffi_uniffi_automerge_fn_method_doc_change_by_hash(
615614
self.uniffiClonePointer(),
615+
616+
FfiConverterTypeChangeHash.lower(hash),
616617
$0
617618
)
618619
}
619620
)
620621
}
621622

622-
public func changeByHash(hash: ChangeHash) -> Change? {
623-
try! FfiConverterOptionTypeChange.lift(
623+
public func changes() -> [ChangeHash] {
624+
try! FfiConverterSequenceTypeChangeHash.lift(
624625
try!
625626
rustCall {
626-
uniffi_uniffi_automerge_fn_method_doc_change_by_hash(
627+
uniffi_uniffi_automerge_fn_method_doc_changes(
627628
self.uniffiClonePointer(),
628-
629-
FfiConverterTypeChangeHash.lower(hash),
630629
$0
631630
)
632631
}
633632
)
634633
}
635634

635+
public func commitWith(msg: String?, time: Int64) {
636+
try!
637+
rustCall {
638+
uniffi_uniffi_automerge_fn_method_doc_commit_with(
639+
self.uniffiClonePointer(),
640+
641+
FfiConverterOptionString.lower(msg),
642+
FfiConverterInt64.lower(time),
643+
$0
644+
)
645+
}
646+
}
647+
636648
public func cursor(obj: ObjId, position: UInt64) throws -> Cursor {
637649
try FfiConverterTypeCursor.lift(
638650
rustCallWithError(FfiConverterTypeDocError.lift) {
@@ -1238,18 +1250,6 @@ public class Doc:
12381250
}
12391251
)
12401252
}
1241-
public func commitWith(msg: String?, time: Int64) {
1242-
try!
1243-
rustCall {
1244-
uniffi_uniffi_automerge_fn_method_doc_commit_with(
1245-
self.uniffiClonePointer(),
1246-
1247-
FfiConverterOptionString.lower(msg),
1248-
FfiConverterInt64.lower(time),
1249-
$0
1250-
)
1251-
}
1252-
}
12531253

12541254
public func save() -> [UInt8] {
12551255
try! FfiConverterSequenceUInt8.lift(

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ if ProcessInfo.processInfo.environment["LOCAL_BUILD"] != nil {
5757
} else {
5858
FFIbinaryTarget = .binaryTarget(
5959
name: "automergeFFI",
60-
url: "https://github.com/automerge/automerge-swift/releases/download/0.5.8/automergeFFI.xcframework.zip",
61-
checksum: "4ba300561b23f403eaedcc4a473fc761d6dd8f7144b838e4f6a38e9d21a11077"
60+
url: "https://github.com/automerge/automerge-swift/releases/download/0.5.9/automergeFFI.xcframework.zip",
61+
checksum: "49aac4ec08887967fd65be48e0deaafcf96130a842cdfb32d3527b6de1f3382d"
6262
)
6363
}
6464

0 commit comments

Comments
 (0)