feat: Add heroscript serialization/deserialization functions
- Add heroscript_dumps and heroscript_loads functions - Replace paramsparser with encoderhero import - Add ulist_get and upload functions to docker installer - Add ulist_get and upload functions to zola installer
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
module bun
|
||||
|
||||
import incubaid.herolib.data.paramsparser
|
||||
import os
|
||||
import incubaid.herolib.data.encoderhero
|
||||
|
||||
pub const version = '1.2.3'
|
||||
const singleton = true
|
||||
@@ -24,3 +23,14 @@ fn obj_init(obj_ Bun) !Bun {
|
||||
fn configure() ! {
|
||||
// mut installer := get()!
|
||||
}
|
||||
|
||||
/////////////NORMALLY NO NEED TO TOUCH
|
||||
|
||||
pub fn heroscript_dumps(obj Bun) !string {
|
||||
return encoderhero.encode[Bun](obj)!
|
||||
}
|
||||
|
||||
pub fn heroscript_loads(heroscript string) !Bun {
|
||||
mut obj := encoderhero.decode[Bun](heroscript)!
|
||||
return obj
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
module lighttpd
|
||||
|
||||
import incubaid.herolib.data.paramsparser
|
||||
import os
|
||||
import incubaid.herolib.data.encoderhero
|
||||
|
||||
pub const version = '0.0.0'
|
||||
const singleton = true
|
||||
@@ -25,3 +24,14 @@ fn obj_init(obj_ LightHttpdInstaller) !LightHttpdInstaller {
|
||||
fn configure() ! {
|
||||
// mut installer := get()!
|
||||
}
|
||||
|
||||
/////////////NORMALLY NO NEED TO TOUCH
|
||||
|
||||
pub fn heroscript_dumps(obj LightHttpdInstaller) !string {
|
||||
return encoderhero.encode[LightHttpdInstaller](obj)!
|
||||
}
|
||||
|
||||
pub fn heroscript_loads(heroscript string) !LightHttpdInstaller {
|
||||
mut obj := encoderhero.decode[LightHttpdInstaller](heroscript)!
|
||||
return obj
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import incubaid.herolib.core.texttools
|
||||
import incubaid.herolib.installers.base
|
||||
import incubaid.herolib.installers.lang.rust
|
||||
import incubaid.herolib.installers.web.tailwind
|
||||
import incubaid.herolib.installers.ulist
|
||||
import os
|
||||
|
||||
pub const version = '0.18.0'
|
||||
@@ -25,6 +26,13 @@ fn installed() !bool {
|
||||
return false
|
||||
}
|
||||
|
||||
fn ulist_get() !ulist.UList {
|
||||
return ulist.UList{}
|
||||
}
|
||||
|
||||
fn upload() ! {
|
||||
}
|
||||
|
||||
fn install() ! {
|
||||
console.print_header('install zola')
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
module zola
|
||||
|
||||
import incubaid.herolib.data.paramsparser
|
||||
import os
|
||||
import incubaid.herolib.data.encoderhero
|
||||
|
||||
const singleton = false
|
||||
const default = true
|
||||
@@ -23,3 +22,14 @@ fn obj_init(obj_ ZolaInstaller) !ZolaInstaller {
|
||||
fn configure() ! {
|
||||
// mut installer := get()!
|
||||
}
|
||||
|
||||
/////////////NORMALLY NO NEED TO TOUCH
|
||||
|
||||
pub fn heroscript_dumps(obj ZolaInstaller) !string {
|
||||
return encoderhero.encode[ZolaInstaller](obj)!
|
||||
}
|
||||
|
||||
pub fn heroscript_loads(heroscript string) !ZolaInstaller {
|
||||
mut obj := encoderhero.decode[ZolaInstaller](heroscript)!
|
||||
return obj
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user