Refactor project and add pkldoc
This commit is contained in:
parent
1c9add29fa
commit
6c75b0ab72
10 changed files with 36 additions and 10 deletions
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"schemaVersion": 1,
|
|
||||||
"resolvedDependencies": {}
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
amends "./lib/controller.pkl"
|
amends "./emgauwa/controller.pkl"
|
||||||
|
|
||||||
server {
|
server {
|
||||||
host = "127.0.0.1"
|
host = "127.0.0.1"
|
||||||
|
|
@ -14,5 +14,6 @@ permissions {
|
||||||
|
|
||||||
logging {
|
logging {
|
||||||
level = "INFO"
|
level = "INFO"
|
||||||
file = "stdout"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
midnight = "00:00"
|
||||||
|
|
|
||||||
3
core.pkl
3
core.pkl
|
|
@ -1,4 +1,4 @@
|
||||||
amends "./lib/core.pkl"
|
amends "./emgauwa/core.pkl"
|
||||||
|
|
||||||
server {
|
server {
|
||||||
host = "127.0.0.1"
|
host = "127.0.0.1"
|
||||||
|
|
@ -14,5 +14,4 @@ permissions {
|
||||||
|
|
||||||
logging {
|
logging {
|
||||||
level = "INFO"
|
level = "INFO"
|
||||||
file = "stdout"
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,6 @@ amends "pkl:Project"
|
||||||
package {
|
package {
|
||||||
name = "emgauwa"
|
name = "emgauwa"
|
||||||
baseUri = "package://emgauwa.app/pkl/\(name)"
|
baseUri = "package://emgauwa.app/pkl/\(name)"
|
||||||
version = "0.1.1"
|
version = "0.2.2"
|
||||||
packageZipUrl = "https://emgauwa.app/pkl/\(name)@\(version).zip"
|
packageZipUrl = "https://emgauwa.app/pkl/\(name)@\(version).zip"
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
|
module emgauwa.common
|
||||||
|
|
||||||
class ServerConfig {
|
class ServerConfig {
|
||||||
host: String
|
host: String
|
||||||
port: UInt16
|
port: UInt16
|
||||||
|
token: String
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set to a user and a group to drop privileges to after binding to the port
|
/// Set to a user and a group to drop privileges to after binding to the port
|
||||||
|
|
@ -11,5 +14,4 @@ class PermissionsConfig {
|
||||||
|
|
||||||
class LoggingConfig {
|
class LoggingConfig {
|
||||||
level: "TRACE"|"DEBUG"|"INFO"|"WARN"|"ERROR"|"FATAL"
|
level: "TRACE"|"DEBUG"|"INFO"|"WARN"|"ERROR"|"FATAL"
|
||||||
file: String
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
module emgauwa.controller
|
||||||
|
|
||||||
import "./common.pkl"
|
import "./common.pkl"
|
||||||
|
|
||||||
server: common.ServerConfig
|
server: common.ServerConfig
|
||||||
|
|
@ -8,6 +10,8 @@ permissions: common.PermissionsConfig
|
||||||
|
|
||||||
logging: common.LoggingConfig
|
logging: common.LoggingConfig
|
||||||
|
|
||||||
|
midnight: String(matches(Regex(#"([01]?[0-9]|2[0-3]):[0-5][0-9]"#)))
|
||||||
|
|
||||||
class RelayConfig {
|
class RelayConfig {
|
||||||
number: Number
|
number: Number
|
||||||
driver: "null"|"gpio"|"piface"
|
driver: "null"|"gpio"|"piface"
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
module emgauwa.core
|
||||||
|
|
||||||
import "./common.pkl"
|
import "./common.pkl"
|
||||||
|
|
||||||
server: common.ServerConfig
|
server: common.ServerConfig
|
||||||
13
emgauwa/doc-package-info.pkl
Normal file
13
emgauwa/doc-package-info.pkl
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
/// Emgauwa is a project to manage the automated switching of relays.
|
||||||
|
amends "pkl:DocPackageInfo"
|
||||||
|
|
||||||
|
name = "Emgauwa"
|
||||||
|
version = "0.2.2"
|
||||||
|
importUri = "https://emgauwa.app/"
|
||||||
|
|
||||||
|
sourceCode = "https://git.serguzim.me/emgauwa/pkl"
|
||||||
|
sourceCodeUrlScheme = "\(sourceCode)/src/tag/v\(version)/lib%{path}#L%{line}"
|
||||||
|
issueTracker = "https://git.serguzim.me/emgauwa/pkl/issues"
|
||||||
|
authors {
|
||||||
|
"tobias@msrg.cc"
|
||||||
|
}
|
||||||
3
emgauwa/docsite-info.pkl
Normal file
3
emgauwa/docsite-info.pkl
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
amends "pkl:DocsiteInfo"
|
||||||
|
|
||||||
|
title = "Emgauwa"
|
||||||
6
release
Executable file
6
release
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/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