-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved config and git functionality out of app
- Loading branch information
Showing
32 changed files
with
745 additions
and
834 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import std/[json, options] | ||
import scripting_api, misc/myjsonutils | ||
|
||
## This file is auto generated, don't modify. | ||
|
||
|
||
proc config_logOptions_void_ConfigService_wasm(arg: cstring): cstring {.importc.} | ||
proc logOptions*() {.gcsafe, raises: [].} = | ||
var argsJson = newJArray() | ||
let argsJsonString = $argsJson | ||
let res {.used.} = config_logOptions_void_ConfigService_wasm( | ||
argsJsonString.cstring) | ||
|
||
|
||
proc config_setOption_void_ConfigService_string_JsonNode_bool_wasm(arg: cstring): cstring {. | ||
importc.} | ||
proc setOption*(option: string; value: JsonNode; override: bool = true) {. | ||
gcsafe, raises: [].} = | ||
var argsJson = newJArray() | ||
argsJson.add option.toJson() | ||
argsJson.add value.toJson() | ||
argsJson.add override.toJson() | ||
let argsJsonString = $argsJson | ||
let res {.used.} = config_setOption_void_ConfigService_string_JsonNode_bool_wasm( | ||
argsJsonString.cstring) | ||
|
||
|
||
proc config_getFlag_bool_ConfigService_string_bool_wasm(arg: cstring): cstring {. | ||
importc.} | ||
proc getFlag*(flag: string; default: bool = false): bool {.gcsafe, raises: [].} = | ||
var argsJson = newJArray() | ||
argsJson.add flag.toJson() | ||
argsJson.add default.toJson() | ||
let argsJsonString = $argsJson | ||
let res {.used.} = config_getFlag_bool_ConfigService_string_bool_wasm( | ||
argsJsonString.cstring) | ||
try: | ||
result = parseJson($res).jsonTo(typeof(result)) | ||
except: | ||
raiseAssert(getCurrentExceptionMsg()) | ||
|
||
|
||
proc config_setFlag_void_ConfigService_string_bool_wasm(arg: cstring): cstring {. | ||
importc.} | ||
proc setFlag*(flag: string; value: bool) {.gcsafe, raises: [].} = | ||
var argsJson = newJArray() | ||
argsJson.add flag.toJson() | ||
argsJson.add value.toJson() | ||
let argsJsonString = $argsJson | ||
let res {.used.} = config_setFlag_void_ConfigService_string_bool_wasm( | ||
argsJsonString.cstring) | ||
|
||
|
||
proc config_toggleFlag_void_ConfigService_string_wasm(arg: cstring): cstring {. | ||
importc.} | ||
proc toggleFlag*(flag: string) {.gcsafe, raises: [].} = | ||
var argsJson = newJArray() | ||
argsJson.add flag.toJson() | ||
let argsJsonString = $argsJson | ||
let res {.used.} = config_toggleFlag_void_ConfigService_string_wasm( | ||
argsJsonString.cstring) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import std/[json, options] | ||
import scripting_api, misc/myjsonutils | ||
|
||
## This file is auto generated, don't modify. | ||
|
||
|
||
proc vcs_chooseGitActiveFiles_void_VCSService_bool_wasm(arg: cstring): cstring {. | ||
importc.} | ||
proc chooseGitActiveFiles*(all: bool = false) {.gcsafe, raises: [].} = | ||
var argsJson = newJArray() | ||
argsJson.add all.toJson() | ||
let argsJsonString = $argsJson | ||
let res {.used.} = vcs_chooseGitActiveFiles_void_VCSService_bool_wasm( | ||
argsJsonString.cstring) | ||
|
Oops, something went wrong.