...
This commit is contained in:
@@ -90,7 +90,7 @@ fn do() ! {
|
|||||||
herocmds.cmd_docusaurus(mut cmd)
|
herocmds.cmd_docusaurus(mut cmd)
|
||||||
herocmds.cmd_web(mut cmd)
|
herocmds.cmd_web(mut cmd)
|
||||||
herocmds.cmd_sshagent(mut cmd)
|
herocmds.cmd_sshagent(mut cmd)
|
||||||
herocmds.cmd_doctree(mut cmd)
|
herocmds.cmd_atlas(mut cmd)
|
||||||
|
|
||||||
cmd.setup()
|
cmd.setup()
|
||||||
cmd.parse(os.args)
|
cmd.parse(os.args)
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
module herocmds
|
module herocmds
|
||||||
|
|
||||||
import incubaid.herolib.ui.console
|
import incubaid.herolib.ui.console
|
||||||
import incubaid.herolib.data.doctree
|
import incubaid.herolib.data.atlas
|
||||||
import incubaid.herolib.core.playcmds
|
import incubaid.herolib.core.playcmds
|
||||||
import incubaid.herolib.develop.gittools
|
import incubaid.herolib.develop.gittools
|
||||||
import incubaid.herolib.web.docusaurus
|
import incubaid.herolib.web.docusaurus
|
||||||
import os
|
import os
|
||||||
import cli { Command, Flag }
|
import cli { Command, Flag }
|
||||||
|
|
||||||
pub fn cmd_doctree(mut cmdroot Command) Command {
|
pub fn cmd_atlas(mut cmdroot Command) Command {
|
||||||
mut cmd_run := Command{
|
mut cmd_run := Command{
|
||||||
name: 'doctree'
|
name: 'atlas'
|
||||||
description: 'Scan and export doctree collections.'
|
description: 'Scan and export atlas collections.'
|
||||||
required_args: 0
|
required_args: 0
|
||||||
execute: cmd_doctree_execute
|
execute: cmd_atlas_execute
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd_run.add_flag(Flag{
|
cmd_run.add_flag(Flag{
|
||||||
@@ -29,7 +29,7 @@ pub fn cmd_doctree(mut cmdroot Command) Command {
|
|||||||
required: false
|
required: false
|
||||||
name: 'url'
|
name: 'url'
|
||||||
abbrev: 'u'
|
abbrev: 'u'
|
||||||
description: 'Git URL where doctree source is.'
|
description: 'Git URL where atlas source is.'
|
||||||
})
|
})
|
||||||
|
|
||||||
cmd_run.add_flag(Flag{
|
cmd_run.add_flag(Flag{
|
||||||
@@ -37,7 +37,7 @@ pub fn cmd_doctree(mut cmdroot Command) Command {
|
|||||||
required: false
|
required: false
|
||||||
name: 'path'
|
name: 'path'
|
||||||
abbrev: 'p'
|
abbrev: 'p'
|
||||||
description: 'Path where doctree collections are located.'
|
description: 'Path where atlas collections are located.'
|
||||||
})
|
})
|
||||||
|
|
||||||
cmd_run.add_flag(Flag{
|
cmd_run.add_flag(Flag{
|
||||||
@@ -45,7 +45,7 @@ pub fn cmd_doctree(mut cmdroot Command) Command {
|
|||||||
required: false
|
required: false
|
||||||
name: 'name'
|
name: 'name'
|
||||||
abbrev: 'n'
|
abbrev: 'n'
|
||||||
description: 'DocTree instance name (default: "default").'
|
description: 'Atlas instance name (default: "default").'
|
||||||
})
|
})
|
||||||
|
|
||||||
cmd_run.add_flag(Flag{
|
cmd_run.add_flag(Flag{
|
||||||
@@ -112,7 +112,7 @@ pub fn cmd_doctree(mut cmdroot Command) Command {
|
|||||||
return cmdroot
|
return cmdroot
|
||||||
}
|
}
|
||||||
|
|
||||||
fn cmd_doctree_execute(cmd Command) ! {
|
fn cmd_atlas_execute(cmd Command) ! {
|
||||||
// ---------- FLAGS ----------
|
// ---------- FLAGS ----------
|
||||||
mut reset := cmd.flags.get_bool('reset') or { false }
|
mut reset := cmd.flags.get_bool('reset') or { false }
|
||||||
mut update := cmd.flags.get_bool('update') or { false }
|
mut update := cmd.flags.get_bool('update') or { false }
|
||||||
@@ -138,27 +138,27 @@ fn cmd_doctree_execute(cmd Command) ! {
|
|||||||
path = os.getwd()
|
path = os.getwd()
|
||||||
}
|
}
|
||||||
|
|
||||||
doctree_path := gittools.path(
|
atlas_path := gittools.path(
|
||||||
git_url: url
|
git_url: url
|
||||||
path: path
|
path: path
|
||||||
git_reset: reset
|
git_reset: reset
|
||||||
git_pull: update
|
git_pull: update
|
||||||
)!
|
)!
|
||||||
|
|
||||||
console.print_header('Running DocTree for: ${doctree_path.path}')
|
console.print_header('Running Atlas for: ${atlas_path.path}')
|
||||||
|
|
||||||
// Run HeroScript if exists
|
// Run HeroScript if exists
|
||||||
playcmds.run(
|
playcmds.run(
|
||||||
heroscript_path: doctree_path.path
|
heroscript_path: atlas_path.path
|
||||||
reset: reset
|
reset: reset
|
||||||
emptycheck: false
|
emptycheck: false
|
||||||
)!
|
)!
|
||||||
|
|
||||||
// Create or get doctree instance
|
// Create or get atlas instance
|
||||||
mut a := if doctree.exists(name) {
|
mut a := if atlas.exists(name) {
|
||||||
doctree.get(name)!
|
atlas.get(name)!
|
||||||
} else {
|
} else {
|
||||||
doctree.new(name: name)!
|
atlas.new(name: name)!
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default behavior: scan and export if no flags specified
|
// Default behavior: scan and export if no flags specified
|
||||||
@@ -170,13 +170,13 @@ fn cmd_doctree_execute(cmd Command) ! {
|
|||||||
// Execute operations
|
// Execute operations
|
||||||
if scan {
|
if scan {
|
||||||
console.print_header('Scanning collections...')
|
console.print_header('Scanning collections...')
|
||||||
a.scan(path: doctree_path.path)!
|
a.scan(path: atlas_path.path)!
|
||||||
console.print_green('✓ Scan complete: ${a.collections.len} collection(s) found')
|
console.print_green('✓ Scan complete: ${a.collections.len} collection(s) found')
|
||||||
}
|
}
|
||||||
|
|
||||||
if export {
|
if export {
|
||||||
if destination == '' {
|
if destination == '' {
|
||||||
destination = '${doctree_path.path}/output'
|
destination = '${atlas_path.path}/output'
|
||||||
}
|
}
|
||||||
|
|
||||||
console.print_header('Exporting collections to: ${destination}')
|
console.print_header('Exporting collections to: ${destination}')
|
||||||
@@ -203,14 +203,14 @@ fn cmd_doctree_execute(cmd Command) ! {
|
|||||||
// Run dev server if -dev flag is set
|
// Run dev server if -dev flag is set
|
||||||
if dev {
|
if dev {
|
||||||
console.print_header('Starting development server...')
|
console.print_header('Starting development server...')
|
||||||
console.print_item('DocTree export directory: ${destination}')
|
console.print_item('Atlas export directory: ${destination}')
|
||||||
console.print_item('Looking for docusaurus configuration in: ${doctree_path.path}')
|
console.print_item('Looking for docusaurus configuration in: ${atlas_path.path}')
|
||||||
|
|
||||||
// Run the docusaurus dev server using the exported doctree content
|
// Run the docusaurus dev server using the exported atlas content
|
||||||
// This will look for a .heroscript file in the doctree_path that configures docusaurus
|
// This will look for a .heroscript file in the atlas_path that configures docusaurus
|
||||||
// with use_doctree:true and doctree_export_dir pointing to the destination
|
// with use_atlas:true and atlas_export_dir pointing to the destination
|
||||||
playcmds.run(
|
playcmds.run(
|
||||||
heroscript_path: doctree_path.path
|
heroscript_path: atlas_path.path
|
||||||
reset: reset
|
reset: reset
|
||||||
)!
|
)!
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ fn cmd_docusaurus_execute(cmd Command) ! {
|
|||||||
// ---------- FLAGS ----------
|
// ---------- FLAGS ----------
|
||||||
mut open_ := cmd.flags.get_bool('open') or { false }
|
mut open_ := cmd.flags.get_bool('open') or { false }
|
||||||
mut buildpublish := cmd.flags.get_bool('buildpublish') or { false }
|
mut buildpublish := cmd.flags.get_bool('buildpublish') or { false }
|
||||||
_ := cmd.flags.get_bool('builddevpublish') or { false }
|
mut builddevpublish := cmd.flags.get_bool('builddevpublish') or { false }
|
||||||
mut dev := cmd.flags.get_bool('dev') or { false }
|
mut dev := cmd.flags.get_bool('dev') or { false }
|
||||||
mut reset := cmd.flags.get_bool('reset') or { false }
|
mut reset := cmd.flags.get_bool('reset') or { false }
|
||||||
mut update := cmd.flags.get_bool('update') or { false }
|
mut update := cmd.flags.get_bool('update') or { false }
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
module playcmds
|
module playcmds
|
||||||
|
|
||||||
import incubaid.herolib.core.playbook { PlayBook }
|
import incubaid.herolib.core.playbook { PlayBook }
|
||||||
import incubaid.herolib.data.doctree
|
import incubaid.herolib.data.atlas
|
||||||
import incubaid.herolib.biz.bizmodel
|
import incubaid.herolib.biz.bizmodel
|
||||||
import incubaid.herolib.threefold.incatokens
|
import incubaid.herolib.mycelium.incatokens
|
||||||
import incubaid.herolib.web.site
|
import incubaid.herolib.web.site
|
||||||
import incubaid.herolib.virt.hetznermanager
|
import incubaid.herolib.virt.hetznermanager
|
||||||
import incubaid.herolib.virt.heropods
|
import incubaid.herolib.virt.heropods
|
||||||
@@ -71,7 +71,7 @@ pub fn run(args_ PlayArgs) ! {
|
|||||||
site.play(mut plbook)!
|
site.play(mut plbook)!
|
||||||
|
|
||||||
incatokens.play(mut plbook)!
|
incatokens.play(mut plbook)!
|
||||||
doctree.play(mut plbook)!
|
atlas.play(mut plbook)!
|
||||||
docusaurus.play(mut plbook)!
|
docusaurus.play(mut plbook)!
|
||||||
hetznermanager.play(mut plbook)!
|
hetznermanager.play(mut plbook)!
|
||||||
hetznermanager.play2(mut plbook)!
|
hetznermanager.play2(mut plbook)!
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ module playmacros
|
|||||||
|
|
||||||
import incubaid.herolib.ui.console
|
import incubaid.herolib.ui.console
|
||||||
import incubaid.herolib.core.playbook { Action, PlayBook }
|
import incubaid.herolib.core.playbook { Action, PlayBook }
|
||||||
import incubaid.herolib.threefold.grid4.gridsimulator
|
import incubaid.herolib.mycelium.grid4.gridsimulator
|
||||||
import incubaid.herolib.threefold.grid4.farmingsimulator
|
import incubaid.herolib.mycelium.grid4.farmingsimulator
|
||||||
import incubaid.herolib.biz.bizmodel
|
import incubaid.herolib.biz.bizmodel
|
||||||
import incubaid.herolib.biz.spreadsheet
|
import incubaid.herolib.biz.spreadsheet
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
module deploy
|
module deploy
|
||||||
|
|
||||||
import incubaid.herolib.threefold.grid3.models as grid_models
|
import incubaid.herolib.mycelium.grid3.models as grid_models
|
||||||
import incubaid.herolib.data.paramsparser
|
import incubaid.herolib.data.paramsparser
|
||||||
import incubaid.herolib.threefold.grid
|
import incubaid.herolib.mycelium.grid
|
||||||
import incubaid.herolib.data.encoder
|
import incubaid.herolib.data.encoder
|
||||||
import incubaid.herolib.ui.console
|
import incubaid.herolib.ui.console
|
||||||
import rand
|
import rand
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
module deployer
|
module deployer
|
||||||
|
|
||||||
import incubaid.herolib.threefold.grid3.gridproxy
|
import incubaid.herolib.mycelium.grid3.gridproxy
|
||||||
import incubaid.herolib.threefold.grid3.gridproxy.model as proxy_models
|
import incubaid.herolib.mycelium.grid3.gridproxy.model as proxy_models
|
||||||
|
|
||||||
@[params]
|
@[params]
|
||||||
pub struct ContractGetArgs {
|
pub struct ContractGetArgs {
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import os
|
|||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
import log
|
import log
|
||||||
import incubaid.herolib.threefold.grid3.models
|
import incubaid.herolib.mycelium.grid3.models
|
||||||
import incubaid.herolib.threefold.grid3.griddriver
|
import incubaid.herolib.mycelium.grid3.griddriver
|
||||||
import incubaid.herolib.ui.console
|
import incubaid.herolib.ui.console
|
||||||
|
|
||||||
@[heap]
|
@[heap]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module deployer
|
module deployer
|
||||||
|
|
||||||
import incubaid.herolib.threefold.grid3.models as grid_models
|
import incubaid.herolib.mycelium.grid3.models as grid_models
|
||||||
import incubaid.herolib.ui.console
|
import incubaid.herolib.ui.console
|
||||||
import compress.zlib
|
import compress.zlib
|
||||||
import encoding.hex
|
import encoding.hex
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// This file should only contains any functions, helpers that related to the deployment setup.
|
// This file should only contains any functions, helpers that related to the deployment setup.
|
||||||
module deployer
|
module deployer
|
||||||
|
|
||||||
import incubaid.herolib.threefold.grid3.models as grid_models
|
import incubaid.herolib.mycelium.grid3.models as grid_models
|
||||||
import incubaid.herolib.ui.console
|
import incubaid.herolib.ui.console
|
||||||
import rand
|
import rand
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
module deployer
|
module deployer
|
||||||
|
|
||||||
import incubaid.herolib.threefold.grid3.gridproxy
|
import incubaid.herolib.mycelium.grid3.gridproxy
|
||||||
import incubaid.herolib.threefold.grid3.gridproxy.model as gridproxy_models
|
import incubaid.herolib.mycelium.grid3.gridproxy.model as gridproxy_models
|
||||||
|
|
||||||
// TODO: put all code in relation to filtering in file filter.v
|
// TODO: put all code in relation to filtering in file filter.v
|
||||||
@[params]
|
@[params]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module deployer
|
module deployer
|
||||||
|
|
||||||
import incubaid.herolib.threefold.grid3.models as grid_models
|
import incubaid.herolib.mycelium.grid3.models as grid_models
|
||||||
import incubaid.herolib.ui.console
|
import incubaid.herolib.ui.console
|
||||||
import json
|
import json
|
||||||
import rand
|
import rand
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
module deployer
|
module deployer
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import incubaid.herolib.threefold.grid3.models
|
import incubaid.herolib.mycelium.grid3.models
|
||||||
|
|
||||||
// TODO: decode/encode the params/result here
|
// TODO: decode/encode the params/result here
|
||||||
pub fn (mut d Deployer) rmb_deployment_changes(dst u32, contract_id u64) !string {
|
pub fn (mut d Deployer) rmb_deployment_changes(dst u32, contract_id u64) !string {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
module deployer
|
module deployer
|
||||||
|
|
||||||
import incubaid.herolib.threefold.grid3.gridproxy
|
import incubaid.herolib.mycelium.grid3.gridproxy
|
||||||
import incubaid.herolib.threefold.grid3.models as grid_models
|
import incubaid.herolib.mycelium.grid3.models as grid_models
|
||||||
import incubaid.herolib.threefold.grid3.gridproxy.model as gridproxy_models
|
import incubaid.herolib.mycelium.grid3.gridproxy.model as gridproxy_models
|
||||||
import rand
|
import rand
|
||||||
import incubaid.herolib.ui.console
|
import incubaid.herolib.ui.console
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module deployer
|
module deployer
|
||||||
|
|
||||||
import incubaid.herolib.threefold.grid3.models as grid_models
|
import incubaid.herolib.mycelium.grid3.models as grid_models
|
||||||
// import incubaid.herolib.ui.console
|
// import incubaid.herolib.ui.console
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import net.http
|
|||||||
import json
|
import json
|
||||||
import x.json2
|
import x.json2
|
||||||
import log
|
import log
|
||||||
import incubaid.herolib.threefold.grid3.models
|
import incubaid.herolib.mycelium.grid3.models
|
||||||
|
|
||||||
pub struct GraphQl {
|
pub struct GraphQl {
|
||||||
url string
|
url string
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ module deployer2
|
|||||||
import json
|
import json
|
||||||
import log
|
import log
|
||||||
import incubaid.herolib.builder
|
import incubaid.herolib.builder
|
||||||
import incubaid.herolib.threefold.grid3.models
|
import incubaid.herolib.mycelium.grid3.models
|
||||||
|
|
||||||
struct VMSpecs {
|
struct VMSpecs {
|
||||||
deployment_name string
|
deployment_name string
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
module griddriver
|
module griddriver
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import incubaid.herolib.threefold.grid3.models
|
import incubaid.herolib.mycelium.grid3.models
|
||||||
|
|
||||||
pub fn (mut c Client) sign_deployment(hash string) !string {
|
pub fn (mut c Client) sign_deployment(hash string) !string {
|
||||||
res := os.execute("griddriver sign --substrate \"${c.substrate}\" --mnemonics \"${c.mnemonic}\" --hash \"${hash}\"")
|
res := os.execute("griddriver sign --substrate \"${c.substrate}\" --mnemonics \"${c.mnemonic}\" --hash \"${hash}\"")
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Easily access Threefold grid APIs from vlang. gridproxy is v module include the
|
|||||||
### import the client
|
### import the client
|
||||||
|
|
||||||
```v
|
```v
|
||||||
import incubaid.herolib.threefold.grid3.gridproxy
|
import incubaid.herolib.mycelium.grid3.gridproxy
|
||||||
|
|
||||||
// create a client for the testnet, with API cache disabled
|
// create a client for the testnet, with API cache disabled
|
||||||
// you can pass true as second arg to enable cache
|
// you can pass true as second arg to enable cache
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ module gridproxy
|
|||||||
// client library for threefold gridproxy API.
|
// client library for threefold gridproxy API.
|
||||||
import json
|
import json
|
||||||
import math
|
import math
|
||||||
import incubaid.herolib.threefold.grid3.gridproxy.model { Bill, Contract, ContractFilter, ContractIterator, Farm, FarmFilter, FarmIterator, GridStat, Node, NodeFilter, NodeIterator, NodeStats, Node_, StatFilter, Twin, TwinFilter, TwinIterator }
|
import incubaid.herolib.mycelium.grid3.gridproxy.model { Bill, Contract, ContractFilter, ContractIterator, Farm, FarmFilter, FarmIterator, GridStat, Node, NodeFilter, NodeIterator, NodeStats, Node_, StatFilter, Twin, TwinFilter, TwinIterator }
|
||||||
import incubaid.herolib.ui.console
|
import incubaid.herolib.ui.console
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
module gridproxy
|
module gridproxy
|
||||||
|
|
||||||
import incubaid.herolib.core.httpconnection
|
import incubaid.herolib.core.httpconnection
|
||||||
import incubaid.herolib.threefold.grid3.gridproxy.model
|
import incubaid.herolib.mycelium.grid3.gridproxy.model
|
||||||
// import incubaid.herolib.installers.threefold.griddriver
|
// import incubaid.herolib.installers.threefold.griddriver
|
||||||
|
|
||||||
@[heap]
|
@[heap]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module gridproxy
|
module gridproxy
|
||||||
|
|
||||||
import incubaid.herolib.threefold.grid3.gridproxy.model { Contract, ContractFilter, Farm, FarmFilter, Node, NodeFilter, ResourceFilter, Twin }
|
import incubaid.herolib.mycelium.grid3.gridproxy.model { Contract, ContractFilter, Farm, FarmFilter, Node, NodeFilter, ResourceFilter, Twin }
|
||||||
|
|
||||||
// fetch specific twin information by twin id.
|
// fetch specific twin information by twin id.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module gridproxy
|
module gridproxy
|
||||||
|
|
||||||
import incubaid.herolib.threefold.grid3.gridproxy.model
|
import incubaid.herolib.mycelium.grid3.gridproxy.model
|
||||||
import time
|
import time
|
||||||
|
|
||||||
const cache = false
|
const cache = false
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ module datamodelsimulator
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
import incubaid.herolib.core.pathlib
|
import incubaid.herolib.core.pathlib
|
||||||
import incubaid.herolib.threefold.grid4.datamodel { Node }
|
import incubaid.herolib.mycelium.grid4.datamodel { Node }
|
||||||
|
|
||||||
// load the cloudboxes from a path
|
// load the cloudboxes from a path
|
||||||
pub fn load(path string) ![]Node {
|
pub fn load(path string) ![]Node {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module datamodelsimulator
|
module datamodelsimulator
|
||||||
|
|
||||||
import incubaid.herolib.threefold.grid4.datamodel { NodeCapacity }
|
import incubaid.herolib.mycelium.grid4.datamodel { NodeCapacity }
|
||||||
import time
|
import time
|
||||||
|
|
||||||
// NodeTotalSim represents the aggregated data for a node simulation, including hardware specs, pricing, and location.
|
// NodeTotalSim represents the aggregated data for a node simulation, including hardware specs, pricing, and location.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module datamodel
|
module datamodel
|
||||||
|
|
||||||
import incubaid.herolib.threefold.grid4.datamodel { Node }
|
import incubaid.herolib.mycelium.grid4.datamodel { Node }
|
||||||
|
|
||||||
pub struct NodeSim {
|
pub struct NodeSim {
|
||||||
Node
|
Node
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module datamodelsimulator
|
module datamodelsimulator
|
||||||
|
|
||||||
import incubaid.herolib.threefold.grid4.datamodel { Node }
|
import incubaid.herolib.mycelium.grid4.datamodel { Node }
|
||||||
import incubaid.herolib.core.playbook { PlayBook }
|
import incubaid.herolib.core.playbook { PlayBook }
|
||||||
|
|
||||||
// this play script should never be called from hero directly its called by gridsimulator
|
// this play script should never be called from hero directly its called by gridsimulator
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import incubaid.herolib.develop.gittools
|
|||||||
import incubaid.herolib.core.texttools
|
import incubaid.herolib.core.texttools
|
||||||
import incubaid.herolib.core.playbook
|
import incubaid.herolib.core.playbook
|
||||||
import incubaid.herolib.ui.console
|
import incubaid.herolib.ui.console
|
||||||
import incubaid.herolib.threefold.grid4.datamodel
|
import incubaid.herolib.mycelium.grid4.datamodel
|
||||||
|
|
||||||
@[heap]
|
@[heap]
|
||||||
pub struct Simulator {
|
pub struct Simulator {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ module farmingsimulator
|
|||||||
|
|
||||||
import incubaid.herolib.ui.console
|
import incubaid.herolib.ui.console
|
||||||
import incubaid.herolib.core.playbook { PlayBook }
|
import incubaid.herolib.core.playbook { PlayBook }
|
||||||
// import incubaid.herolib.threefold.grid4.farmingsimulator
|
// import incubaid.herolib.mycelium.grid4.farmingsimulator
|
||||||
|
|
||||||
pub fn play(mut plbook PlayBook) ! {
|
pub fn play(mut plbook PlayBook) ! {
|
||||||
// mut sheet_name := ''
|
// mut sheet_name := ''
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import incubaid.herolib.develop.gittools
|
|||||||
import incubaid.herolib.core.texttools
|
import incubaid.herolib.core.texttools
|
||||||
import incubaid.herolib.core.playbook
|
import incubaid.herolib.core.playbook
|
||||||
import incubaid.herolib.ui.console
|
import incubaid.herolib.ui.console
|
||||||
import incubaid.herolib.threefold.grid4.datamodel
|
import incubaid.herolib.mycelium.grid4.datamodel
|
||||||
|
|
||||||
__global (
|
__global (
|
||||||
grid_simulators shared map[string]&Simulator
|
grid_simulators shared map[string]&Simulator
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
module gridsimulator
|
module gridsimulator
|
||||||
|
|
||||||
import incubaid.herolib.core.playbook { PlayBook }
|
import incubaid.herolib.core.playbook { PlayBook }
|
||||||
import incubaid.herolib.threefold.grid4.datamodel
|
import incubaid.herolib.mycelium.grid4.datamodel
|
||||||
|
|
||||||
pub fn play(mut plbook PlayBook) ! {
|
pub fn play(mut plbook PlayBook) ! {
|
||||||
// first make sure we find a run action to know the name
|
// first make sure we find a run action to know the name
|
||||||
|
|||||||
Reference in New Issue
Block a user