Skip to content

Commit

Permalink
chore: update to new fcli (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmd-fl authored Nov 28, 2023
1 parent 9053860 commit 24f8f3e
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 65 deletions.
3 changes: 2 additions & 1 deletion .fluence/schemas/env.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
},
"required": [
"version"
]
],
"additionalProperties": false
}
41 changes: 28 additions & 13 deletions .fluence/schemas/fluence.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
}
},
"required": [],
"nullable": true
"nullable": true,
"additionalProperties": false
},
"properties": {
"Module_name": {
Expand Down Expand Up @@ -161,7 +162,8 @@
}
},
"required": [],
"nullable": true
"nullable": true,
"additionalProperties": false
}
},
"nullable": true,
Expand All @@ -170,7 +172,8 @@
},
"required": [
"get"
]
],
"additionalProperties": false
},
"properties": {
"Service_name": {
Expand Down Expand Up @@ -256,7 +259,8 @@
}
},
"required": [],
"nullable": true
"nullable": true,
"additionalProperties": false
},
"properties": {
"Module_name": {
Expand Down Expand Up @@ -329,7 +333,8 @@
}
},
"required": [],
"nullable": true
"nullable": true,
"additionalProperties": false
}
},
"nullable": true,
Expand All @@ -338,7 +343,8 @@
},
"required": [
"get"
]
],
"additionalProperties": false
}
},
"required": [],
Expand Down Expand Up @@ -387,7 +393,8 @@
}
}
},
"required": []
"required": [],
"additionalProperties": false
},
"aquaInputPath": {
"type": "string",
Expand Down Expand Up @@ -437,7 +444,8 @@
"minItems": 1
}
},
"required": []
"required": [],
"additionalProperties": false
},
"properties": {
"workerName": {
Expand Down Expand Up @@ -469,7 +477,8 @@
"minItems": 1
}
},
"required": []
"required": [],
"additionalProperties": false
}
},
"required": []
Expand Down Expand Up @@ -589,6 +598,7 @@
},
"clock": {
"type": "object",
"additionalProperties": false,
"nullable": true,
"description": "Trigger the spell execution periodically. If you want to disable this property by overriding it in fluence.yaml - pass empty config for it like this: `clock: {}`",
"properties": {
Expand Down Expand Up @@ -629,7 +639,8 @@
},
"required": [
"get"
]
],
"additionalProperties": false
},
"properties": {
"Spell_name": {
Expand Down Expand Up @@ -661,6 +672,7 @@
},
"clock": {
"type": "object",
"additionalProperties": false,
"nullable": true,
"description": "Trigger the spell execution periodically. If you want to disable this property by overriding it in fluence.yaml - pass empty config for it like this: `clock: {}`",
"properties": {
Expand Down Expand Up @@ -701,7 +713,8 @@
},
"required": [
"get"
]
],
"additionalProperties": false
}
},
"required": []
Expand Down Expand Up @@ -757,7 +770,8 @@
"required": [
"contractsEnv",
"relays"
]
],
"additionalProperties": false
},
"defaultSecretKeyName": {
"description": "Secret key with this name will be used by default by js-client inside CLI to run Aqua code",
Expand All @@ -775,5 +789,6 @@
],
"$id": "https://fluence.dev/schemas/fluence.yaml",
"title": "fluence.yaml",
"description": "Defines Fluence Project, most importantly - what exactly you want to deploy and how. You can use `fluence init` command to generate a template for new Fluence project"
"description": "Defines Fluence Project, most importantly - what exactly you want to deploy and how. You can use `fluence init` command to generate a template for new Fluence project",
"additionalProperties": false
}
1 change: 1 addition & 0 deletions .fluence/schemas/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"const": 0
}
},
"additionalProperties": false,
"required": [
"version",
"name"
Expand Down
12 changes: 8 additions & 4 deletions .fluence/schemas/service.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
},
"required": [
"get"
]
],
"additionalProperties": false
},
"properties": {
"facade": {
Expand Down Expand Up @@ -163,7 +164,8 @@
},
"required": [
"get"
]
],
"additionalProperties": false
},
"Other_module_name": {
"type": "object",
Expand Down Expand Up @@ -239,7 +241,8 @@
},
"required": [
"get"
]
],
"additionalProperties": false
}
},
"required": [
Expand All @@ -255,5 +258,6 @@
"version",
"name",
"modules"
]
],
"additionalProperties": false
}
4 changes: 3 additions & 1 deletion .fluence/schemas/spell.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},
"clock": {
"type": "object",
"additionalProperties": false,
"nullable": true,
"description": "Trigger the spell execution periodically. If you want to disable this property by overriding it in fluence.yaml - pass empty config for it like this: `clock: {}`",
"properties": {
Expand Down Expand Up @@ -65,5 +66,6 @@
"version",
"function",
"aquaFilePath"
]
],
"additionalProperties": false
}
19 changes: 13 additions & 6 deletions .fluence/schemas/workers.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$id": "https://fluence.dev/schemas/workers.yaml",
"title": "workers.yaml",
"type": "object",
"additionalProperties": false,
"description": "A result of app deployment. This file is created automatically after successful deployment using `fluence workers deploy` command",
"properties": {
"version": {
Expand Down Expand Up @@ -47,7 +48,8 @@
"dealIdOriginal",
"chainNetwork",
"chainNetworkId"
]
],
"additionalProperties": false
},
"properties": {
"Worker_deployed_using_deals": {
Expand Down Expand Up @@ -86,7 +88,8 @@
"dealIdOriginal",
"chainNetwork",
"chainNetworkId"
]
],
"additionalProperties": false
}
},
"required": [],
Expand Down Expand Up @@ -128,7 +131,8 @@
"host_id",
"spell_id",
"worker_id"
]
],
"additionalProperties": false
}
},
"relayId": {
Expand All @@ -141,7 +145,8 @@
"installation_spells",
"relayId",
"dummyDealId"
]
],
"additionalProperties": false
},
"properties": {
"Worker_deployed_using_direct_hosting": {
Expand Down Expand Up @@ -177,7 +182,8 @@
"host_id",
"spell_id",
"worker_id"
]
],
"additionalProperties": false
}
},
"relayId": {
Expand All @@ -190,7 +196,8 @@
"installation_spells",
"relayId",
"dummyDealId"
]
],
"additionalProperties": false
}
},
"required": [],
Expand Down
25 changes: 7 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
/target

# recommended by Fluence Labs:
.idea
.DS_Store
/.fluence/secrets
/.fluence/env.yaml
/.fluence/schemas
/.fluence/tmp
**/node_modules
**/target/
.repl_history
.vscode/settings.json
src/ts/src/aqua
src/js/src/aqua

src/air
src/distro/decider-spell/

# builtin package artifacts
connector/
connector.tar.gz
decider.json

*.wasm

**/target
/.vscode/settings.json
/src/ts/src/aqua
/src/js/src/aqua
26 changes: 5 additions & 21 deletions fluence.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# yaml-language-server: $schema=.fluence/schemas/fluence.json

# Defines Fluence Project, most importantly - what exactly you want to deploy and how. You can use `fluence init` command to generate a template for new Fluence project

# Documentation: https://github.com/fluencelabs/fluence-cli/tree/main/docs/configs/fluence.md
# Documentation: https://github.com/fluencelabs/cli/tree/main/docs/configs/fluence.md
# Defines Fluence Project
# Most importantly - what exactly you want to deploy and how
# You can use `fluence init` command to generate a template for new Fluence project

# config version
version: 5

# This is like the "main" Aqua file, but
Expand Down Expand Up @@ -44,21 +46,3 @@ spells:
decider:
# path to directory containing 'spell.yaml'
get: src/aqua

# Here I define where to deploy workers.
hosts:
# this is the _worker_ name
decider:
peerIds:
# that's where to deploy it
- 12D3KooWJDiLFLmWstcFpAofWkYJzuvwuquNTQQkB9xzKjRyqqFJ
services:
- chain_connector
spells:
- decider

relays:
- /ip4/127.0.0.1/tcp/9999/ws/p2p/12D3KooWJDiLFLmWstcFpAofWkYJzuvwuquNTQQkB9xzKjRyqqFJ
# - /dns4/stage.fluence.dev/tcp/19001/wss/p2p/12D3KooWHCJbJKGDfCgHSoCuK9q4STyRnVveqLoXAPBbXHTZx9Cv

contractsEnv: testnet
6 changes: 5 additions & 1 deletion src/aqua/spell.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# yaml-language-server: $schema=../../.fluence/schemas/spell.json
yaml-language-server: $schema=../../../.fluence/schemas/spell.yaml.json
#
# Defines a spell. You can use `fluence spell new` command to generate a template for new spell
# Documentation: https://github.com/fluencelabs/fluence-cli/tree/main/docs/configs/spell.md
version: 0

aquaFilePath: ./decider/poll.aqua

function: main

clock:
periodSec: 20
endDelaySec: 1800

initArgs:
chain:
api_endpoint: http://127.0.0.1:8545
Expand Down

0 comments on commit 24f8f3e

Please sign in to comment.