Refactor project
This commit is contained in:
parent
6c75b0ab72
commit
f09bfe9db3
12 changed files with 77 additions and 70 deletions
11
.release
Executable file
11
.release
Executable file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
pkl eval core_example.pkl >/dev/null
|
||||||
|
pkl eval controller_example.pkl >/dev/null
|
||||||
|
|
||||||
|
pkldoc -o "$PWD/.out/docs" *.pkl
|
||||||
|
pkl project package --output-path="$PWD/.out" --skip-publish-check --overwrite
|
||||||
|
|
||||||
|
rclone copy -L .out/ scaleway:emgauwa-website.serguzim.me/
|
||||||
|
|
@ -1,19 +1,22 @@
|
||||||
amends "./emgauwa/controller.pkl"
|
module emgauwa.controller
|
||||||
|
|
||||||
server {
|
import "./common.pkl"
|
||||||
host = "127.0.0.1"
|
|
||||||
port = 4419
|
server: common.ServerConfig
|
||||||
|
|
||||||
|
database: String
|
||||||
|
|
||||||
|
permissions: common.PermissionsConfig
|
||||||
|
|
||||||
|
logging: common.LoggingConfig
|
||||||
|
|
||||||
|
midnight: String(matches(Regex(#"([01]?[0-9]|2[0-3]):[0-5][0-9]"#)))
|
||||||
|
|
||||||
|
class RelayConfig {
|
||||||
|
number: Number
|
||||||
|
driver: "null"|"gpio"|"piface"
|
||||||
|
pin: Number
|
||||||
|
inverted: Boolean
|
||||||
|
pulse: Number(this >= 0)|Null = null
|
||||||
}
|
}
|
||||||
|
relays: Listing<RelayConfig>
|
||||||
database = "sqlite://emgauwa-controller.sqlite"
|
|
||||||
|
|
||||||
permissions {
|
|
||||||
user = "" // read("env:USER")
|
|
||||||
group = "" // read("env:USER")
|
|
||||||
}
|
|
||||||
|
|
||||||
logging {
|
|
||||||
level = "INFO"
|
|
||||||
}
|
|
||||||
|
|
||||||
midnight = "00:00"
|
|
||||||
|
|
|
||||||
20
controller_example.pkl
Normal file
20
controller_example.pkl
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
amends "./controller.pkl"
|
||||||
|
|
||||||
|
server {
|
||||||
|
host = "127.0.0.1"
|
||||||
|
port = 4419
|
||||||
|
token = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
database = "sqlite://emgauwa-controller.sqlite"
|
||||||
|
|
||||||
|
permissions {
|
||||||
|
user = "" // read("env:USER")
|
||||||
|
group = "" // read("env:USER")
|
||||||
|
}
|
||||||
|
|
||||||
|
logging {
|
||||||
|
level = "INFO"
|
||||||
|
}
|
||||||
|
|
||||||
|
midnight = "00:00"
|
||||||
23
core.pkl
23
core.pkl
|
|
@ -1,17 +1,14 @@
|
||||||
amends "./emgauwa/core.pkl"
|
module emgauwa.core
|
||||||
|
|
||||||
server {
|
import "./common.pkl"
|
||||||
host = "127.0.0.1"
|
|
||||||
port = 4419
|
|
||||||
}
|
|
||||||
|
|
||||||
database = "sqlite://emgauwa-core.sqlite"
|
server: common.ServerConfig
|
||||||
|
|
||||||
permissions {
|
database: String
|
||||||
user = "" // read("env:USER")
|
|
||||||
group = "" // read("env:USER")
|
|
||||||
}
|
|
||||||
|
|
||||||
logging {
|
permissions: common.PermissionsConfig
|
||||||
level = "INFO"
|
|
||||||
}
|
logging: common.LoggingConfig
|
||||||
|
|
||||||
|
/// Leave empty to allow all origins (will always respond with Origin and not "*")
|
||||||
|
origins: Listing<String>
|
||||||
|
|
|
||||||
18
core_example.pkl
Normal file
18
core_example.pkl
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
amends "./core.pkl"
|
||||||
|
|
||||||
|
server {
|
||||||
|
host = "127.0.0.1"
|
||||||
|
port = 4419
|
||||||
|
token = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
database = "sqlite://emgauwa-core.sqlite"
|
||||||
|
|
||||||
|
permissions {
|
||||||
|
user = "" // read("env:USER")
|
||||||
|
group = "" // read("env:USER")
|
||||||
|
}
|
||||||
|
|
||||||
|
logging {
|
||||||
|
level = "INFO"
|
||||||
|
}
|
||||||
|
|
@ -6,7 +6,7 @@ version = "0.2.2"
|
||||||
importUri = "https://emgauwa.app/"
|
importUri = "https://emgauwa.app/"
|
||||||
|
|
||||||
sourceCode = "https://git.serguzim.me/emgauwa/pkl"
|
sourceCode = "https://git.serguzim.me/emgauwa/pkl"
|
||||||
sourceCodeUrlScheme = "\(sourceCode)/src/tag/v\(version)/lib%{path}#L%{line}"
|
sourceCodeUrlScheme = "\(sourceCode)/src/tag/v\(version)%{path}#L%{line}"
|
||||||
issueTracker = "https://git.serguzim.me/emgauwa/pkl/issues"
|
issueTracker = "https://git.serguzim.me/emgauwa/pkl/issues"
|
||||||
authors {
|
authors {
|
||||||
"tobias@msrg.cc"
|
"tobias@msrg.cc"
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
module emgauwa.controller
|
|
||||||
|
|
||||||
import "./common.pkl"
|
|
||||||
|
|
||||||
server: common.ServerConfig
|
|
||||||
|
|
||||||
database: String
|
|
||||||
|
|
||||||
permissions: common.PermissionsConfig
|
|
||||||
|
|
||||||
logging: common.LoggingConfig
|
|
||||||
|
|
||||||
midnight: String(matches(Regex(#"([01]?[0-9]|2[0-3]):[0-5][0-9]"#)))
|
|
||||||
|
|
||||||
class RelayConfig {
|
|
||||||
number: Number
|
|
||||||
driver: "null"|"gpio"|"piface"
|
|
||||||
pin: Number
|
|
||||||
inverted: Boolean
|
|
||||||
pulse: Number(this >= 0)|Null = null
|
|
||||||
}
|
|
||||||
relays: Listing<RelayConfig>
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
module emgauwa.core
|
|
||||||
|
|
||||||
import "./common.pkl"
|
|
||||||
|
|
||||||
server: common.ServerConfig
|
|
||||||
|
|
||||||
database: String
|
|
||||||
|
|
||||||
permissions: common.PermissionsConfig
|
|
||||||
|
|
||||||
logging: common.LoggingConfig
|
|
||||||
|
|
||||||
/// Leave empty to allow all origins (will always respond with Origin and not "*")
|
|
||||||
origins: Listing<String>
|
|
||||||
6
release
6
release
|
|
@ -1,6 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
pkldoc -o "$PWD/.out/docs" emgauwa/*
|
|
||||||
pkl project package --output-path="$PWD/.out" --working-dir=emgauwa --skip-publish-check
|
|
||||||
|
|
||||||
rclone copy -L .out/ scaleway:emgauwa-website.serguzim.me/
|
|
||||||
Loading…
Reference in a new issue