Skip to content
Snippets Groups Projects
Commit d228bde2 authored by Jono Wenger's avatar Jono Wenger
Browse files

Rename client version functions and make GetVersion return the current xxDK WASM version

parent 9f176d2a
Branches
Tags
1 merge request!60Revert "Fail a test to be sure it works"
...@@ -170,8 +170,9 @@ func main() { ...@@ -170,8 +170,9 @@ func main() {
// wasm/version.go // wasm/version.go
js.Global().Set("GetVersion", js.FuncOf(wasm.GetVersion)) js.Global().Set("GetVersion", js.FuncOf(wasm.GetVersion))
js.Global().Set("GetGitVersion", js.FuncOf(wasm.GetGitVersion)) js.Global().Set("GetClientVersion", js.FuncOf(wasm.GetClientVersion))
js.Global().Set("GetDependencies", js.FuncOf(wasm.GetDependencies)) js.Global().Set("GetClientGitVersion", js.FuncOf(wasm.GetClientGitVersion))
js.Global().Set("GetClientDependencies", js.FuncOf(wasm.GetClientDependencies))
<-make(chan bool) <-make(chan bool)
os.Exit(0) os.Exit(0)
......
...@@ -11,29 +11,41 @@ package wasm ...@@ -11,29 +11,41 @@ package wasm
import ( import (
"gitlab.com/elixxir/client/bindings" "gitlab.com/elixxir/client/bindings"
"gitlab.com/elixxir/xxdk-wasm/utils"
"syscall/js" "syscall/js"
) )
// GetVersion returns the [xxdk.SEMVER]. // GetVersion returns the current xxDK WASM semantic version.
// //
// Returns: // Returns:
// - Version (string). // - Current version (string).
func GetVersion(js.Value, []js.Value) interface{} { func GetVersion(js.Value, []js.Value) interface{} {
return utils.SEMVER
}
// GetClientVersion returns the current client xxDK semantic version
// ([xxdk.SEMVER]).
//
// Returns:
// - Current version (string).
func GetClientVersion(js.Value, []js.Value) interface{} {
return bindings.GetVersion() return bindings.GetVersion()
} }
// GetGitVersion returns the [xxdk.GITVERSION]. // GetClientGitVersion returns the current client xxDK git version
// ([xxdk.GITVERSION]).
// //
// Returns: // Returns:
// - Git version (string). // - Git version (string).
func GetGitVersion(js.Value, []js.Value) interface{} { func GetClientGitVersion(js.Value, []js.Value) interface{} {
return bindings.GetGitVersion() return bindings.GetGitVersion()
} }
// GetDependencies returns the [xxdk.DEPENDENCIES]. // GetClientDependencies returns the client's dependencies
// ([xxdk.DEPENDENCIES]).
// //
// Returns: // Returns:
// - Git dependencies (string). // - Dependency list (string).
func GetDependencies(js.Value, []js.Value) interface{} { func GetClientDependencies(js.Value, []js.Value) interface{} {
return bindings.GetDependencies() return bindings.GetDependencies()
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment