Compare commits
54 Commits
feature/do
...
feature/1-
| Author | SHA1 | Date | |
|---|---|---|---|
| c33428f3e1 | |||
| fc98b48601 | |||
| bf30e8eeb6 | |||
| fa9f282194 | |||
| 64400c07c7 | |||
| b3d6d21ea5 | |||
| a0bdc34792 | |||
| 659bb5da63 | |||
| 24e1ade129 | |||
| 88dc0e47b1 | |||
| 0ae02c8950 | |||
| e053f51bf3 | |||
| f3bfd8c114 | |||
| 2ed789aa46 | |||
| 131bf15240 | |||
| fd1fe0d896 | |||
| 5996db8d80 | |||
| 2df54930bb | |||
| f7a1f84730 | |||
| bb82dad4cf | |||
| 303309fff9 | |||
| 6d2f76eb72 | |||
| 451015d2f2 | |||
| 1a009bac61 | |||
| cc65ce3e7c | |||
| 926944e8dd | |||
| 78e2acb325 | |||
| 958856dcc0 | |||
| deb30aacea | |||
| 9075b34ca3 | |||
| 7325e3a0c9 | |||
| 34e8ad4eb4 | |||
| 8a6dacf1c8 | |||
|
|
8a65a5e596 | ||
| 47996b81bc | |||
| a2f9622aaa | |||
| 5b3ef929c4 | |||
| d706ba9f56 | |||
| bb4b2ad3f5 | |||
| bd77f0daff | |||
| cd439006bb | |||
| 77eda0841b | |||
| 21b6434145 | |||
| ff4b237651 | |||
| 4b11b0ada2 | |||
| 7e40620df6 | |||
| 4025bf9c7f | |||
| d7a387cf45 | |||
| e56a9fc1b5 | |||
| 948df90006 | |||
| 161ce02042 | |||
| 97ab59a424 | |||
| c3761464ee | |||
| fb32fcfdb1 |
@@ -1,6 +0,0 @@
|
|||||||
**
|
|
||||||
!src
|
|
||||||
!Cargo.toml
|
|
||||||
!Cargo.lock
|
|
||||||
!flake.nix
|
|
||||||
!flake.lock
|
|
||||||
|
Before Width: | Height: | Size: 18 MiB After Width: | Height: | Size: 18 MiB |
23
.github/workflows/docker.yml
vendored
23
.github/workflows/docker.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["main", "feature/docker"]
|
|
||||||
pull_request:
|
|
||||||
branches: ["main"]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: hustcer/setup-nu@v3
|
|
||||||
|
|
||||||
- name: Get Cargo version
|
|
||||||
run: version=$(nu -c "cargo metadata --format-version=1 --no-deps | from json | get packages | first | get version")
|
|
||||||
- name: Build docker image
|
|
||||||
run: docker build -t docki:$version .
|
|
||||||
40
.github/workflows/docker_deploy.yml
vendored
Normal file
40
.github/workflows/docker_deploy.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: Deploy Docker Image to Github Container Registry
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
paths:
|
||||||
|
- "Cargo.toml"
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
contents: read
|
||||||
|
attestations: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: hustcer/setup-nu@v3
|
||||||
|
- uses: cachix/install-nix-action@v31
|
||||||
|
with:
|
||||||
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
|
|
||||||
|
- run: nix build .#docker
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
export CARGO_VERSION=$(nu -c "cargo metadata --format-version=1 --no-deps | from json | get packages | first | get version")
|
||||||
|
echo "CARGO_VERSION=$CARGO_VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- run: docker load -i result
|
||||||
|
- name: Log in to registry
|
||||||
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||||
|
- run: docker tag docki:latest "ghcr.io/quirinecker/docki:$CARGO_VERSION"
|
||||||
|
- run: docker tag docki:latest "ghcr.io/quirinecker/docki:latest"
|
||||||
|
- run: docker push ghcr.io/quirinecker/docki:$CARGO_VERSION
|
||||||
|
- run: docker push ghcr.io/quirinecker/docki:latest
|
||||||
29
.github/workflows/rust.yml
vendored
29
.github/workflows/rust.yml
vendored
@@ -1,29 +0,0 @@
|
|||||||
name: Rust
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "main" ]
|
|
||||||
paths:
|
|
||||||
- 'Cargo.toml'
|
|
||||||
pull_request:
|
|
||||||
branches: [ "main" ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Build
|
|
||||||
run: cargo build --verbose
|
|
||||||
- name: Run tests
|
|
||||||
run: cargo test --verbose
|
|
||||||
- name: Publish to crates.io
|
|
||||||
env:
|
|
||||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
|
||||||
run: |
|
|
||||||
cargo publish --verbose
|
|
||||||
26
.github/workflows/rust_deploy.yml
vendored
Normal file
26
.github/workflows/rust_deploy.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: Deploy Rust to Crates.io
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
paths:
|
||||||
|
- "Cargo.toml"
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --verbose
|
||||||
|
- name: Run tests
|
||||||
|
run: cargo test --verbose
|
||||||
|
- name: Publish to crates.io
|
||||||
|
env:
|
||||||
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
||||||
|
run: |
|
||||||
|
cargo publish --verbose
|
||||||
24
.github/workflows/rust_test.yml
vendored
Normal file
24
.github/workflows/rust_test.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: Test Rust
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main", "develop"]
|
||||||
|
paths:
|
||||||
|
- "./src/**"
|
||||||
|
- "./Cargo.toml"
|
||||||
|
pull_request:
|
||||||
|
branches: ["main", "develop"]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --verbose
|
||||||
|
- name: Run tests
|
||||||
|
run: cargo test --verbose
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,6 +1,6 @@
|
|||||||
/target
|
/target
|
||||||
dist
|
dist
|
||||||
/docs
|
|
||||||
res/test/docs/slides/revealjs
|
res/test/docs/slides/revealjs
|
||||||
|
res/test/asciidocs/slides/revealjs
|
||||||
res/test/result
|
res/test/result
|
||||||
result
|
result
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
workflow:
|
|
||||||
rules:
|
|
||||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"'
|
|
||||||
|
|
||||||
default:
|
|
||||||
image: 'quirinecker/rust-openssl'
|
|
||||||
|
|
||||||
build:
|
|
||||||
script:
|
|
||||||
- cargo build
|
|
||||||
|
|
||||||
test:
|
|
||||||
script:
|
|
||||||
- cargo test
|
|
||||||
|
|
||||||
# publish:
|
|
||||||
# script:
|
|
||||||
# - export CARGO_REGISTRY_TOKEN=$CARGO_TOKEN
|
|
||||||
# - cargo publish
|
|
||||||
|
|
||||||
473
Cargo.lock
generated
473
Cargo.lock
generated
@@ -98,6 +98,12 @@ version = "1.0.69"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800"
|
checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "arraydeque"
|
||||||
|
version = "0.5.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "arrayref"
|
name = "arrayref"
|
||||||
version = "0.3.6"
|
version = "0.3.6"
|
||||||
@@ -117,7 +123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5"
|
checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -304,13 +310,13 @@ checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-trait"
|
name = "async-trait"
|
||||||
version = "0.1.66"
|
version = "0.1.89"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b84f9ebcc6c1f5b8cb160f6990096a5c127f423fcb6e1ccc46c370cbdfb75dfc"
|
checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 2.0.110",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -394,6 +400,15 @@ version = "1.3.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bitflags"
|
||||||
|
version = "2.10.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
|
||||||
|
dependencies = [
|
||||||
|
"serde_core",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "blake3"
|
name = "blake3"
|
||||||
version = "0.3.8"
|
version = "0.3.8"
|
||||||
@@ -542,7 +557,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
|
checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty",
|
"atty",
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
"clap_derive 3.2.18",
|
"clap_derive 3.2.18",
|
||||||
"clap_lex 0.2.4",
|
"clap_lex 0.2.4",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
@@ -558,7 +573,7 @@ version = "4.1.8"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5"
|
checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
"clap_derive 4.1.8",
|
"clap_derive 4.1.8",
|
||||||
"clap_lex 0.3.2",
|
"clap_lex 0.3.2",
|
||||||
"is-terminal",
|
"is-terminal",
|
||||||
@@ -586,7 +601,7 @@ dependencies = [
|
|||||||
"proc-macro-error",
|
"proc-macro-error",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -599,7 +614,7 @@ dependencies = [
|
|||||||
"proc-macro-error",
|
"proc-macro-error",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -630,17 +645,6 @@ dependencies = [
|
|||||||
"unicode-width",
|
"unicode-width",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "colored"
|
|
||||||
version = "2.0.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd"
|
|
||||||
dependencies = [
|
|
||||||
"atty",
|
|
||||||
"lazy_static",
|
|
||||||
"winapi 0.3.9",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "concurrent-queue"
|
name = "concurrent-queue"
|
||||||
version = "2.1.0"
|
version = "2.1.0"
|
||||||
@@ -650,6 +654,46 @@ dependencies = [
|
|||||||
"crossbeam-utils",
|
"crossbeam-utils",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "config"
|
||||||
|
version = "0.15.18"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "180e549344080374f9b32ed41bf3b6b57885ff6a289367b3dbc10eea8acc1918"
|
||||||
|
dependencies = [
|
||||||
|
"async-trait",
|
||||||
|
"convert_case",
|
||||||
|
"json5",
|
||||||
|
"pathdiff",
|
||||||
|
"ron",
|
||||||
|
"rust-ini",
|
||||||
|
"serde-untagged",
|
||||||
|
"serde_core",
|
||||||
|
"serde_json",
|
||||||
|
"toml",
|
||||||
|
"winnow",
|
||||||
|
"yaml-rust2",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "const-random"
|
||||||
|
version = "0.1.18"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359"
|
||||||
|
dependencies = [
|
||||||
|
"const-random-macro",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "const-random-macro"
|
||||||
|
version = "0.1.16"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"
|
||||||
|
dependencies = [
|
||||||
|
"getrandom 0.2.8",
|
||||||
|
"once_cell",
|
||||||
|
"tiny-keccak",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "const_fn"
|
name = "const_fn"
|
||||||
version = "0.4.9"
|
version = "0.4.9"
|
||||||
@@ -662,6 +706,15 @@ version = "0.1.5"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
|
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "convert_case"
|
||||||
|
version = "0.6.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca"
|
||||||
|
dependencies = [
|
||||||
|
"unicode-segmentation",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cookie"
|
name = "cookie"
|
||||||
version = "0.14.4"
|
version = "0.14.4"
|
||||||
@@ -738,6 +791,12 @@ dependencies = [
|
|||||||
"cfg-if 1.0.0",
|
"cfg-if 1.0.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crunchy"
|
||||||
|
version = "0.2.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crypto-common"
|
name = "crypto-common"
|
||||||
version = "0.1.6"
|
version = "0.1.6"
|
||||||
@@ -775,7 +834,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096"
|
checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -811,7 +870,7 @@ dependencies = [
|
|||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"scratch",
|
"scratch",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -828,7 +887,7 @@ checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -857,20 +916,31 @@ version = "1.0.4"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
|
checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dlv-list"
|
||||||
|
version = "0.5.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f"
|
||||||
|
dependencies = [
|
||||||
|
"const-random",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "docki"
|
name = "docki"
|
||||||
version = "1.2.1"
|
version = "1.2.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"clap 4.1.8",
|
"clap 4.1.8",
|
||||||
"clap_complete",
|
"clap_complete",
|
||||||
"colored",
|
"config",
|
||||||
"futures",
|
"futures",
|
||||||
"home",
|
"home",
|
||||||
"live-server",
|
"live-server",
|
||||||
"notify 5.1.0",
|
"notify 5.1.0",
|
||||||
|
"nu-ansi-term",
|
||||||
"regex",
|
"regex",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
|
"serde",
|
||||||
"text_io",
|
"text_io",
|
||||||
"tokio",
|
"tokio",
|
||||||
"zip-extract",
|
"zip-extract",
|
||||||
@@ -878,9 +948,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "encoding_rs"
|
name = "encoding_rs"
|
||||||
version = "0.8.32"
|
version = "0.8.35"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394"
|
checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if 1.0.0",
|
"cfg-if 1.0.0",
|
||||||
]
|
]
|
||||||
@@ -907,6 +977,17 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "erased-serde"
|
||||||
|
version = "0.4.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "89e8918065695684b2b0702da20382d5ae6065cf3327bc2d6436bd49a71ce9f3"
|
||||||
|
dependencies = [
|
||||||
|
"serde",
|
||||||
|
"serde_core",
|
||||||
|
"typeid",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "errno"
|
name = "errno"
|
||||||
version = "0.2.8"
|
version = "0.2.8"
|
||||||
@@ -987,6 +1068,12 @@ version = "1.0.7"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "foldhash"
|
||||||
|
version = "0.1.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "foreign-types"
|
name = "foreign-types"
|
||||||
version = "0.3.2"
|
version = "0.3.2"
|
||||||
@@ -1017,7 +1104,7 @@ version = "0.4.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6"
|
checksum = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
"fsevent-sys 2.0.1",
|
"fsevent-sys 2.0.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1045,7 +1132,7 @@ version = "0.3.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
|
checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
"fuchsia-zircon-sys",
|
"fuchsia-zircon-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1126,7 +1213,7 @@ checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1238,6 +1325,30 @@ version = "0.12.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hashbrown"
|
||||||
|
version = "0.14.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hashbrown"
|
||||||
|
version = "0.15.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
|
||||||
|
dependencies = [
|
||||||
|
"foldhash",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hashlink"
|
||||||
|
version = "0.10.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1"
|
||||||
|
dependencies = [
|
||||||
|
"hashbrown 0.15.5",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "heck"
|
name = "heck"
|
||||||
version = "0.4.1"
|
version = "0.4.1"
|
||||||
@@ -1468,7 +1579,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
|
checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"hashbrown",
|
"hashbrown 0.12.3",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1483,7 +1594,7 @@ version = "0.7.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4816c66d2c8ae673df83366c18341538f234a26d65a9ecea5c348b453ac1d02f"
|
checksum = "4816c66d2c8ae673df83366c18341538f234a26d65a9ecea5c348b453ac1d02f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
"inotify-sys",
|
"inotify-sys",
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
@@ -1494,7 +1605,7 @@ version = "0.9.6"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff"
|
checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
"inotify-sys",
|
"inotify-sys",
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
@@ -1587,6 +1698,17 @@ dependencies = [
|
|||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "json5"
|
||||||
|
version = "0.4.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1"
|
||||||
|
dependencies = [
|
||||||
|
"pest",
|
||||||
|
"pest_derive",
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kernel32-sys"
|
name = "kernel32-sys"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
@@ -1613,7 +1735,7 @@ version = "1.0.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587"
|
checksum = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1841,7 +1963,7 @@ version = "4.0.17"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ae03c8c853dba7bfd23e571ff0cff7bc9dceb40a4cd684cd1681824183f45257"
|
checksum = "ae03c8c853dba7bfd23e571ff0cff7bc9dceb40a4cd684cd1681824183f45257"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
"filetime",
|
"filetime",
|
||||||
"fsevent",
|
"fsevent",
|
||||||
"fsevent-sys 2.0.1",
|
"fsevent-sys 2.0.1",
|
||||||
@@ -1859,7 +1981,7 @@ version = "5.1.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "58ea850aa68a06e48fdb069c0ec44d0d64c8dbffa49bf3b6f7f0a901fdea1ba9"
|
checksum = "58ea850aa68a06e48fdb069c0ec44d0d64c8dbffa49bf3b6f7f0a901fdea1ba9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"filetime",
|
"filetime",
|
||||||
"fsevent-sys 4.1.0",
|
"fsevent-sys 4.1.0",
|
||||||
@@ -1872,6 +1994,15 @@ dependencies = [
|
|||||||
"windows-sys 0.42.0",
|
"windows-sys 0.42.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "nu-ansi-term"
|
||||||
|
version = "0.50.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
|
||||||
|
dependencies = [
|
||||||
|
"windows-sys 0.61.2",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-integer"
|
name = "num-integer"
|
||||||
version = "0.1.45"
|
version = "0.1.45"
|
||||||
@@ -1919,7 +2050,7 @@ version = "0.10.45"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1"
|
checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
"cfg-if 1.0.0",
|
"cfg-if 1.0.0",
|
||||||
"foreign-types",
|
"foreign-types",
|
||||||
"libc",
|
"libc",
|
||||||
@@ -1936,7 +2067,7 @@ checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1958,6 +2089,16 @@ dependencies = [
|
|||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ordered-multimap"
|
||||||
|
version = "0.7.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79"
|
||||||
|
dependencies = [
|
||||||
|
"dlv-list",
|
||||||
|
"hashbrown 0.14.5",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "os_str_bytes"
|
name = "os_str_bytes"
|
||||||
version = "6.4.1"
|
version = "6.4.1"
|
||||||
@@ -2004,6 +2145,12 @@ dependencies = [
|
|||||||
"subtle",
|
"subtle",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pathdiff"
|
||||||
|
version = "0.2.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pbkdf2"
|
name = "pbkdf2"
|
||||||
version = "0.11.0"
|
version = "0.11.0"
|
||||||
@@ -2022,6 +2169,49 @@ version = "2.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
|
checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pest"
|
||||||
|
version = "2.8.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "989e7521a040efde50c3ab6bbadafbe15ab6dc042686926be59ac35d74607df4"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
"ucd-trie",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pest_derive"
|
||||||
|
version = "2.8.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "187da9a3030dbafabbbfb20cb323b976dc7b7ce91fcd84f2f74d6e31d378e2de"
|
||||||
|
dependencies = [
|
||||||
|
"pest",
|
||||||
|
"pest_generator",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pest_generator"
|
||||||
|
version = "2.8.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "49b401d98f5757ebe97a26085998d6c0eecec4995cad6ab7fc30ffdf4b052843"
|
||||||
|
dependencies = [
|
||||||
|
"pest",
|
||||||
|
"pest_meta",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn 2.0.110",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pest_meta"
|
||||||
|
version = "2.8.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "72f27a2cfee9f9039c4d86faa5af122a0ac3851441a34865b8a043b46be0065a"
|
||||||
|
dependencies = [
|
||||||
|
"pest",
|
||||||
|
"sha2 0.10.6",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pin-project"
|
name = "pin-project"
|
||||||
version = "1.0.12"
|
version = "1.0.12"
|
||||||
@@ -2039,7 +2229,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2073,7 +2263,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "7e1f879b2998099c2d69ab9605d145d5b661195627eccc680002c4918a7fb6fa"
|
checksum = "7e1f879b2998099c2d69ab9605d145d5b661195627eccc680002c4918a7fb6fa"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
"cfg-if 1.0.0",
|
"cfg-if 1.0.0",
|
||||||
"concurrent-queue",
|
"concurrent-queue",
|
||||||
"libc",
|
"libc",
|
||||||
@@ -2108,7 +2298,7 @@ dependencies = [
|
|||||||
"proc-macro-error-attr",
|
"proc-macro-error-attr",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
"version_check",
|
"version_check",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -2131,18 +2321,18 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.52"
|
version = "1.0.103"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224"
|
checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.24"
|
version = "1.0.42"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "50686e0021c4136d1d453b2dfe059902278681512a34d4248435dc34b6b5c8ec"
|
checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
@@ -2224,7 +2414,7 @@ version = "0.2.16"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
|
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2281,12 +2471,34 @@ dependencies = [
|
|||||||
"winreg",
|
"winreg",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ron"
|
||||||
|
version = "0.8.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94"
|
||||||
|
dependencies = [
|
||||||
|
"base64 0.21.0",
|
||||||
|
"bitflags 2.10.0",
|
||||||
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "route-recognizer"
|
name = "route-recognizer"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "56770675ebc04927ded3e60633437841581c285dc6236109ea25fbf3beb7b59e"
|
checksum = "56770675ebc04927ded3e60633437841581c285dc6236109ea25fbf3beb7b59e"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rust-ini"
|
||||||
|
version = "0.21.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "796e8d2b6696392a43bea58116b667fb4c29727dc5abd27d6acf338bb4f688c7"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if 1.0.0",
|
||||||
|
"ordered-multimap",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc_version"
|
name = "rustc_version"
|
||||||
version = "0.2.3"
|
version = "0.2.3"
|
||||||
@@ -2302,7 +2514,7 @@ version = "0.36.9"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc"
|
checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
"errno",
|
"errno",
|
||||||
"io-lifetimes",
|
"io-lifetimes",
|
||||||
"libc",
|
"libc",
|
||||||
@@ -2352,7 +2564,7 @@ version = "2.8.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254"
|
checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags 1.3.2",
|
||||||
"core-foundation",
|
"core-foundation",
|
||||||
"core-foundation-sys",
|
"core-foundation-sys",
|
||||||
"libc",
|
"libc",
|
||||||
@@ -2386,22 +2598,44 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.155"
|
version = "1.0.228"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "71f2b4817415c6d4210bfe1c7bfcf4801b2d904cb4d0e1a8fdb651013c9e86b8"
|
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
||||||
|
dependencies = [
|
||||||
|
"serde_core",
|
||||||
|
"serde_derive",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde-untagged"
|
||||||
|
version = "0.1.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058"
|
||||||
|
dependencies = [
|
||||||
|
"erased-serde 0.4.9",
|
||||||
|
"serde",
|
||||||
|
"serde_core",
|
||||||
|
"typeid",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_core"
|
||||||
|
version = "1.0.228"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.155"
|
version = "1.0.228"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d071a94a3fac4aff69d023a7f411e33f40f3483f8c5190b1953822b6b76d7630"
|
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 2.0.110",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2415,13 +2649,15 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.94"
|
version = "1.0.145"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea"
|
checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa",
|
"itoa",
|
||||||
|
"memchr",
|
||||||
"ryu",
|
"ryu",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_core",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2435,6 +2671,15 @@ dependencies = [
|
|||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_spanned"
|
||||||
|
version = "1.0.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392"
|
||||||
|
dependencies = [
|
||||||
|
"serde_core",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_urlencoded"
|
name = "serde_urlencoded"
|
||||||
version = "0.7.1"
|
version = "0.7.1"
|
||||||
@@ -2596,7 +2841,7 @@ dependencies = [
|
|||||||
"quote",
|
"quote",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2612,7 +2857,7 @@ dependencies = [
|
|||||||
"serde_derive",
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha1 0.6.1",
|
"sha1 0.6.1",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2653,6 +2898,17 @@ dependencies = [
|
|||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "syn"
|
||||||
|
version = "2.0.110"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tempfile"
|
name = "tempfile"
|
||||||
version = "3.4.0"
|
version = "3.4.0"
|
||||||
@@ -2704,7 +2960,7 @@ checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2810,7 +3066,16 @@ dependencies = [
|
|||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"standback",
|
"standback",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tiny-keccak"
|
||||||
|
version = "2.0.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
|
||||||
|
dependencies = [
|
||||||
|
"crunchy",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2856,7 +3121,7 @@ checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2883,6 +3148,37 @@ dependencies = [
|
|||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "toml"
|
||||||
|
version = "0.9.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8"
|
||||||
|
dependencies = [
|
||||||
|
"serde_core",
|
||||||
|
"serde_spanned",
|
||||||
|
"toml_datetime",
|
||||||
|
"toml_parser",
|
||||||
|
"winnow",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "toml_datetime"
|
||||||
|
version = "0.7.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533"
|
||||||
|
dependencies = [
|
||||||
|
"serde_core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "toml_parser"
|
||||||
|
version = "1.0.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e"
|
||||||
|
dependencies = [
|
||||||
|
"winnow",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tower-service"
|
name = "tower-service"
|
||||||
version = "0.3.2"
|
version = "0.3.2"
|
||||||
@@ -2935,12 +3231,24 @@ dependencies = [
|
|||||||
"utf-8",
|
"utf-8",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "typeid"
|
||||||
|
version = "1.0.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typenum"
|
name = "typenum"
|
||||||
version = "1.16.0"
|
version = "1.16.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
|
checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ucd-trie"
|
||||||
|
version = "0.1.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicase"
|
name = "unicase"
|
||||||
version = "2.6.0"
|
version = "2.6.0"
|
||||||
@@ -2971,6 +3279,12 @@ dependencies = [
|
|||||||
"tinyvec",
|
"tinyvec",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-segmentation"
|
||||||
|
version = "1.12.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-width"
|
name = "unicode-width"
|
||||||
version = "0.1.10"
|
version = "0.1.10"
|
||||||
@@ -3021,7 +3335,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55"
|
checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ctor",
|
"ctor",
|
||||||
"erased-serde",
|
"erased-serde 0.3.25",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_fmt",
|
"serde_fmt",
|
||||||
"sval",
|
"sval",
|
||||||
@@ -3108,7 +3422,7 @@ dependencies = [
|
|||||||
"once_cell",
|
"once_cell",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -3142,7 +3456,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.109",
|
||||||
"wasm-bindgen-backend",
|
"wasm-bindgen-backend",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
@@ -3206,6 +3520,12 @@ version = "0.4.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-link"
|
||||||
|
version = "0.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-sys"
|
name = "windows-sys"
|
||||||
version = "0.42.0"
|
version = "0.42.0"
|
||||||
@@ -3230,6 +3550,15 @@ dependencies = [
|
|||||||
"windows-targets",
|
"windows-targets",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-sys"
|
||||||
|
version = "0.61.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
||||||
|
dependencies = [
|
||||||
|
"windows-link",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-targets"
|
name = "windows-targets"
|
||||||
version = "0.42.1"
|
version = "0.42.1"
|
||||||
@@ -3287,6 +3616,15 @@ version = "0.42.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
|
checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winnow"
|
||||||
|
version = "0.7.13"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winreg"
|
name = "winreg"
|
||||||
version = "0.10.1"
|
version = "0.10.1"
|
||||||
@@ -3306,6 +3644,17 @@ dependencies = [
|
|||||||
"winapi-build",
|
"winapi-build",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "yaml-rust2"
|
||||||
|
version = "0.10.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2462ea039c445496d8793d052e13787f2b90e750b833afee748e601c17621ed9"
|
||||||
|
dependencies = [
|
||||||
|
"arraydeque",
|
||||||
|
"encoding_rs",
|
||||||
|
"hashlink",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zip"
|
name = "zip"
|
||||||
version = "0.6.4"
|
version = "0.6.4"
|
||||||
|
|||||||
10
Cargo.toml
10
Cargo.toml
@@ -1,20 +1,17 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "docki"
|
name = "docki"
|
||||||
version = "1.2.1"
|
version = "1.2.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "cli for building and publishing documentation using asciidoctor"
|
description = "cli for building and publishing documentation using asciidoctor"
|
||||||
license-file = "LICENSE.txt"
|
license-file = "LICENSE.txt"
|
||||||
authors = ["Quirin Ecker"]
|
authors = ["Quirin Ecker"]
|
||||||
exclude = [
|
exclude = [".gitlab", ".github"]
|
||||||
".gitlab"
|
|
||||||
]
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "1.4.0"
|
bytes = "1.4.0"
|
||||||
clap = { version = "4.1.8", features = ["derive"] }
|
clap = { version = "4.1.8", features = ["derive"] }
|
||||||
colored = "2.0.0"
|
|
||||||
futures = "0.3.26"
|
futures = "0.3.26"
|
||||||
home = "0.5.4"
|
home = "0.5.4"
|
||||||
live-server = "0.6.0"
|
live-server = "0.6.0"
|
||||||
@@ -25,3 +22,6 @@ text_io = "0.1.12"
|
|||||||
tokio = { version = "1.26.0", features = ["full"] }
|
tokio = { version = "1.26.0", features = ["full"] }
|
||||||
zip-extract = "0.1.1"
|
zip-extract = "0.1.1"
|
||||||
clap_complete = "4.1.4"
|
clap_complete = "4.1.4"
|
||||||
|
nu-ansi-term = "0.50.3"
|
||||||
|
config = { version = "0.15.18", features = ["toml"] }
|
||||||
|
serde = "1.0.228"
|
||||||
|
|||||||
11
Dockerfile
11
Dockerfile
@@ -1,11 +0,0 @@
|
|||||||
FROM nixos/nix AS build
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY . /app
|
|
||||||
|
|
||||||
RUN nix --extra-experimental-features nix-command --extra-experimental-features flakes build \
|
|
||||||
&& nix --extra-experimental-features nix-command --extra-experimental-features flakes store gc
|
|
||||||
|
|
||||||
RUN mkdir /out && cp result/bin/docki .
|
|
||||||
|
|
||||||
44
README.md
44
README.md
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
## Preview
|
## Preview
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Docki is cli for converting asciidoctor files into html files.
|
Docki is cli for converting asciidoctor files into html files.
|
||||||
|
|
||||||
@@ -29,29 +29,26 @@ docki serve
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Nix
|
|
||||||
|
|
||||||
This installation method is recommended, because it will include both asciidoctor and asciidoctor_revealjs.
|
|
||||||
|
|
||||||
Note: This is the most basic installation. If you are already more experienced, you might want to add it to your shell or home manager configuration.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
nix profile install github:quirinecker/docki
|
|
||||||
```
|
|
||||||
|
|
||||||
### Homebrew
|
### Homebrew
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> Installing it via homebrew will not include asciidoctor_revealjs. It can be installed afterwards with `docki install-reveal`
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
brew tap quirinecker/docki-homebrew https://github.com/quirinecker/docki-homebrew
|
brew tap quirinecker/homebrew-docki https://github.com/quirinecker/homebrew-docki
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
brew install docki
|
brew install docki
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Nix
|
||||||
|
|
||||||
|
If you just want to try it out real quick and the nix package manager is available on your system you can use the following command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
nix develop github:quirinecker/docki#preview
|
||||||
|
```
|
||||||
|
|
||||||
|
This will open a shell evnironment with docki installed. If you want to install it permanently with nix, i would recommend following the instructions in the [Nix (Advanced, Flake)](#nix-advanced-flake) section.
|
||||||
|
|
||||||
### Cargo
|
### Cargo
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
@@ -61,6 +58,19 @@ brew install docki
|
|||||||
cargo install docki
|
cargo install docki
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
There is also a docker image available to use. It is primarily used for the gh actions.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker pull ghcr.io/quirinecker/docki:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also build it yourself with nix.
|
||||||
|
|
||||||
|
```
|
||||||
|
nix build .#docker && docker load -i result
|
||||||
|
```
|
||||||
|
|
||||||
### Nix (Advanced, Flake)
|
### Nix (Advanced, Flake)
|
||||||
|
|
||||||
@@ -102,6 +112,10 @@ home.packages = with pkgs; [
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
You can configure some of the cli arguments with a config file. It is always located relatively to the current directory under `./docki.config.toml`. Available options and their defaults can be found in the [config.rs](src/app/config/config.rs) file. CLI arguments with the same names as in the config usually have also the same default values.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
### Running it
|
### Running it
|
||||||
|
|||||||
20
flake.nix
20
flake.nix
@@ -120,6 +120,26 @@
|
|||||||
naerskLib = naerskLib;
|
naerskLib = naerskLib;
|
||||||
pkgs = pkgs;
|
pkgs = pkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
docker = pkgs.dockerTools.buildImage {
|
||||||
|
name = "docki";
|
||||||
|
tag = "latest";
|
||||||
|
config = {
|
||||||
|
WorkingDir = "/app";
|
||||||
|
};
|
||||||
|
copyToRoot = pkgs.buildEnv {
|
||||||
|
name = "docki-docker";
|
||||||
|
paths = [
|
||||||
|
pkgs.coreutils
|
||||||
|
pkgs.bash
|
||||||
|
pkgs.cacert
|
||||||
|
(build_docki {
|
||||||
|
naerskLib = naerskLib;
|
||||||
|
pkgs = pkgs;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
16
res/test/asciidocs/index.adoc
Normal file
16
res/test/asciidocs/index.adoc
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
= My Project
|
||||||
|
:toc:
|
||||||
|
:toc-title:
|
||||||
|
:toclevels: 2
|
||||||
|
|
||||||
|
== Introduction
|
||||||
|
|
||||||
|
This is my project.
|
||||||
|
|
||||||
|
== Slides
|
||||||
|
|
||||||
|
* link:slides/index.html[Presentation]
|
||||||
|
|
||||||
|
== License
|
||||||
|
|
||||||
|
This project is licensed under the MIT License - see the link:LICENSE[LICENSE] file for details.
|
||||||
19
res/test/asciidocs/slides/index.adoc
Normal file
19
res/test/asciidocs/slides/index.adoc
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Slides
|
||||||
|
|
||||||
|
## Slide 1
|
||||||
|
|
||||||
|
* First
|
||||||
|
* Second
|
||||||
|
* Third
|
||||||
|
|
||||||
|
## Slide 2
|
||||||
|
|
||||||
|
* First
|
||||||
|
* Second
|
||||||
|
* Third
|
||||||
|
|
||||||
|
### Slide 3
|
||||||
|
|
||||||
|
* First
|
||||||
|
* Second
|
||||||
|
* Third
|
||||||
3
res/test/docki.config.toml
Normal file
3
res/test/docki.config.toml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
docs_dir = "./docs"
|
||||||
|
port = 6969
|
||||||
|
offline_reveal = false
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
= My Project
|
||||||
|
:toc:
|
||||||
|
:toc-title:
|
||||||
|
:toclevels: 2
|
||||||
|
|
||||||
|
== Introduction
|
||||||
|
|
||||||
|
This is my project.
|
||||||
|
|
||||||
|
== Slides
|
||||||
|
|
||||||
|
* link:slides/index.html[Presentation]
|
||||||
|
|
||||||
|
== License
|
||||||
|
|
||||||
|
This project is licensed under the MIT License - see the link:LICENSE[LICENSE] file for details.
|
||||||
|
|||||||
19
res/test/docs/slides/index.adoc
Normal file
19
res/test/docs/slides/index.adoc
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Slides
|
||||||
|
|
||||||
|
## Slide 1
|
||||||
|
|
||||||
|
* First
|
||||||
|
* Second
|
||||||
|
* Third
|
||||||
|
|
||||||
|
## Slide 2
|
||||||
|
|
||||||
|
* First
|
||||||
|
* Second
|
||||||
|
* Third
|
||||||
|
|
||||||
|
### Slide 3
|
||||||
|
|
||||||
|
* First
|
||||||
|
* Second
|
||||||
|
* Third
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
use clap::{Parser, Subcommand};
|
|
||||||
|
|
||||||
#[derive(Parser)]
|
|
||||||
pub struct Args {
|
|
||||||
#[command(subcommand)]
|
|
||||||
pub command: CommandArg,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Subcommand)]
|
|
||||||
pub enum ShellArg {
|
|
||||||
Bash,
|
|
||||||
Fish,
|
|
||||||
Zsh,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Subcommand)]
|
|
||||||
pub enum CommandArg {
|
|
||||||
/// Builds the documentation into a dist folder
|
|
||||||
Build,
|
|
||||||
/// Checks if everything required for docki is installed
|
|
||||||
Health,
|
|
||||||
/// Helper command for installing asciidoctor-reveal-js
|
|
||||||
InstallReveal,
|
|
||||||
/// Starts a Webserver with the live preview of the Documentation
|
|
||||||
Serve {
|
|
||||||
/// Port for the Live Server
|
|
||||||
#[arg(short, long)]
|
|
||||||
port: Option<u16>,
|
|
||||||
},
|
|
||||||
/// Generates completions for the desired shell
|
|
||||||
Completions {
|
|
||||||
#[command(subcommand)]
|
|
||||||
shell: ShellArg,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
use regex::Regex;
|
||||||
use std::process;
|
use std::process;
|
||||||
|
|
||||||
fn exec_command(command: &mut process::Command) -> Result<(), String> {
|
fn exec_command(command: &mut process::Command) -> Result<(), String> {
|
||||||
@@ -11,9 +12,13 @@ fn exec_command(command: &mut process::Command) -> Result<(), String> {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
println!("{}", result.unwrap_err());
|
println!("{}", result.unwrap_err());
|
||||||
return Err(
|
|
||||||
"asciidoctor not installed. For more information run docki health!".to_string(),
|
let binary_name = command.get_program().to_str().unwrap_or("Something is");
|
||||||
);
|
|
||||||
|
return Err(format!(
|
||||||
|
"{} not installed. For more information run docki health!",
|
||||||
|
binary_name
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,9 +32,14 @@ fn asciidoctor_docs(in_path: &str, out_path: &str) -> process::Command {
|
|||||||
return command;
|
return command;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn asciidoctor_slides(in_path: &str, out_path: &str) -> process::Command {
|
fn asciidoctor_slides(in_path: &str, out_path: &str, offline_reveal: bool) -> process::Command {
|
||||||
let mut command = process::Command::new(format!("asciidoctor-revealjs"));
|
let mut command = process::Command::new(format!("asciidoctor-revealjs"));
|
||||||
let revealjs_path = "/slides/revealjs";
|
let out_dir = parent_path(out_path);
|
||||||
|
let revealjs_path = if offline_reveal {
|
||||||
|
path_between(out_dir.to_string(), "./dist/slides/revealjs".to_string())
|
||||||
|
} else {
|
||||||
|
"https://cdn.jsdelivr.net/npm/reveal.js@5.2.1".to_string()
|
||||||
|
};
|
||||||
|
|
||||||
command
|
command
|
||||||
.arg(format!("{in_path}"))
|
.arg(format!("{in_path}"))
|
||||||
@@ -40,13 +50,67 @@ fn asciidoctor_slides(in_path: &str, out_path: &str) -> process::Command {
|
|||||||
return command;
|
return command;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn parent_path(child_path: &str) -> String {
|
||||||
|
let split: Vec<&str> = child_path.split("/").collect();
|
||||||
|
let slice = &split[..split.len() - 1];
|
||||||
|
return slice.join("/");
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn path_between(from: String, to: String) -> String {
|
||||||
|
let from_segments = transform_input_to_clone_split(&from);
|
||||||
|
let to_segments = transform_input_to_clone_split(&to);
|
||||||
|
let last_matching_index = matching_from_start(&from_segments, &to_segments);
|
||||||
|
let number_of_backs = from_segments.len() - last_matching_index;
|
||||||
|
let mut path_between = path_back(number_of_backs);
|
||||||
|
let path_to_to_path = &to_segments[last_matching_index..];
|
||||||
|
path_between.push_str(&path_to_to_path.join("/"));
|
||||||
|
return path_between;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn transform_input_to_clone_split(input: &String) -> Vec<String> {
|
||||||
|
let regex = Regex::new(r"/$").unwrap();
|
||||||
|
let first_transformation = input.clone().replace("./", "");
|
||||||
|
return regex
|
||||||
|
.replace_all(&first_transformation, "")
|
||||||
|
.to_string()
|
||||||
|
.split("/")
|
||||||
|
.collect::<Vec<&str>>()
|
||||||
|
.iter()
|
||||||
|
.map(|s| s.to_string())
|
||||||
|
.collect();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn path_back(count: usize) -> String {
|
||||||
|
let mut path = "".to_string();
|
||||||
|
|
||||||
|
for _ in 0..count {
|
||||||
|
path.push_str("../");
|
||||||
|
}
|
||||||
|
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn matching_from_start(from_segments: &Vec<String>, to_segments: &Vec<String>) -> usize {
|
||||||
|
for (index, from_segment) in from_segments.iter().enumerate() {
|
||||||
|
if let Some(to_segment) = to_segments.get(index) {
|
||||||
|
if from_segment != to_segment {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return from_segments.len();
|
||||||
|
}
|
||||||
|
|
||||||
pub fn build_doc(in_path: &str, out_path: &str) -> Result<(), String> {
|
pub fn build_doc(in_path: &str, out_path: &str) -> Result<(), String> {
|
||||||
let mut command = asciidoctor_docs(in_path, out_path);
|
let mut command = asciidoctor_docs(in_path, out_path);
|
||||||
return exec_command(&mut command);
|
return exec_command(&mut command);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build_slide(in_path: &str, out_path: &str) -> Result<(), String> {
|
pub fn build_slide(in_path: &str, out_path: &str, offline_reveal: bool) -> Result<(), String> {
|
||||||
let mut command = asciidoctor_slides(in_path, out_path);
|
let mut command = asciidoctor_slides(in_path, out_path, offline_reveal);
|
||||||
return exec_command(&mut command);
|
return exec_command(&mut command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,49 +1 @@
|
|||||||
use std::fs;
|
|
||||||
|
|
||||||
use self::asciidoctor::{build_doc, build_slide};
|
|
||||||
|
|
||||||
use super::fs_util;
|
|
||||||
|
|
||||||
pub mod asciidoctor;
|
pub mod asciidoctor;
|
||||||
|
|
||||||
pub fn docki_build(in_path: &str) -> DockiBuildResult {
|
|
||||||
let out_path = in_path.replace("/docs/", "/dist/");
|
|
||||||
let convert_out_path = out_path.replace(".adoc", ".html");
|
|
||||||
|
|
||||||
if in_path.starts_with("./docs/slides/") && in_path.ends_with(".adoc") {
|
|
||||||
if let Err(err) = build_slide(&in_path, &convert_out_path) {
|
|
||||||
return DockiBuildResult::Err(err);
|
|
||||||
}
|
|
||||||
|
|
||||||
DockiBuildResult::Slide(convert_out_path)
|
|
||||||
} else if in_path.ends_with(".adoc") {
|
|
||||||
if let Err(err) = build_doc(&in_path, &convert_out_path) {
|
|
||||||
return DockiBuildResult::Err(err);
|
|
||||||
}
|
|
||||||
|
|
||||||
DockiBuildResult::Doc(convert_out_path)
|
|
||||||
} else {
|
|
||||||
if let Err(err) = copy(&in_path, &out_path) {
|
|
||||||
return DockiBuildResult::Err(err);
|
|
||||||
}
|
|
||||||
|
|
||||||
DockiBuildResult::Copy(out_path)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn copy(in_path: &str, out_path: &str) -> Result<(), String> {
|
|
||||||
fs_util::create_parent_dir_recursive(out_path);
|
|
||||||
|
|
||||||
if let Err(err) = fs::copy(in_path, out_path) {
|
|
||||||
return Err(err.to_string());
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub enum DockiBuildResult {
|
|
||||||
Slide(String),
|
|
||||||
Doc(String),
|
|
||||||
Copy(String),
|
|
||||||
Err(String),
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
|
use crate::app::config::config::Config;
|
||||||
|
|
||||||
use super::executions::build_execution::BuildExecution;
|
use super::executions::build_execution::BuildExecution;
|
||||||
|
|
||||||
pub async fn build() -> () {
|
pub async fn build(config: &Config) -> () {
|
||||||
let mut build_execution = BuildExecution::new();
|
let mut build_execution = BuildExecution::new(config);
|
||||||
build_execution.execute().await.expect("build failed")
|
|
||||||
|
build_execution.prepare().await.expect("could not prepare for build");
|
||||||
|
build_execution.build_dir().expect("build failed")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use std::io;
|
|||||||
use clap::CommandFactory;
|
use clap::CommandFactory;
|
||||||
use clap_complete::{generate, shells::{Bash, Fish, Zsh}};
|
use clap_complete::{generate, shells::{Bash, Fish, Zsh}};
|
||||||
|
|
||||||
use crate::app::args::structure::{Args, ShellArg};
|
use crate::app::config::arguments::{Args, ShellArg};
|
||||||
|
|
||||||
pub fn completions(shell: ShellArg) {
|
pub fn completions(shell: ShellArg) {
|
||||||
let mut command = Args::command();
|
let mut command = Args::command();
|
||||||
|
|||||||
@@ -1,49 +1,43 @@
|
|||||||
use std::{
|
use std::{
|
||||||
io::Cursor,
|
fs, io::Cursor, path::PathBuf
|
||||||
path::PathBuf
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::app::{
|
use crate::app::{
|
||||||
build::{docki_build, DockiBuildResult},
|
build::{asciidoctor::build_slide, asciidoctor::build_doc}, config::config::Config, fs_util::{self, create_dir_recursive}, log::display_status
|
||||||
fs_util::{self, create_dir_recursive}, log::display_status,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub struct BuildExecution {
|
pub struct BuildExecution<'a> {
|
||||||
progress: usize,
|
progress: usize,
|
||||||
goal: usize,
|
goal: usize,
|
||||||
|
config: &'a Config
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BuildExecution {
|
impl <'a> BuildExecution <'a> {
|
||||||
pub fn new() -> Self {
|
pub fn new(config: &'a Config) -> Self {
|
||||||
return BuildExecution {
|
return Self {
|
||||||
progress: 0,
|
progress: 0,
|
||||||
goal: 0,
|
goal: 0,
|
||||||
|
config: config
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn execute(&mut self) -> Result<(), String> {
|
pub async fn prepare(&self) -> Result<(), String> {
|
||||||
let path = "./docs/".to_string();
|
if !fs_util::directory_exists(&self.config.input_dir) {
|
||||||
|
|
||||||
if !fs_util::directory_exists(&path) {
|
|
||||||
return Err(
|
return Err(
|
||||||
"docs directory does not exist it. Create it or use the template".to_string(),
|
"docs directory does not exist it. Create it or use the template".to_string(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Err(error) = Self::prepare().await {
|
if !self.config.offline_reveal {
|
||||||
return Err(error);
|
return Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
return self.build_dir(&path);
|
let reveal_version = "5.2.1";
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
async fn prepare() -> Result<(), String> {
|
|
||||||
let reveal_version = "3.9.2";
|
|
||||||
let target = format!("https://github.com/hakimel/reveal.js/archive/{reveal_version}.zip");
|
let target = format!("https://github.com/hakimel/reveal.js/archive/{reveal_version}.zip");
|
||||||
|
|
||||||
create_dir_recursive("./docs/slides");
|
create_dir_recursive(format!("{}/slides", self.config.input_dir).as_str());
|
||||||
|
|
||||||
|
reqwest::get(target.clone()).await.unwrap();
|
||||||
let Ok(response) = reqwest::get(target).await else {
|
let Ok(response) = reqwest::get(target).await else {
|
||||||
return Err("could not downlaod revealjs".to_string())
|
return Err("could not downlaod revealjs".to_string())
|
||||||
};
|
};
|
||||||
@@ -52,7 +46,7 @@ impl BuildExecution {
|
|||||||
return Err("could not extract bytes".to_string())
|
return Err("could not extract bytes".to_string())
|
||||||
};
|
};
|
||||||
|
|
||||||
let out = PathBuf::from("./docs/slides/revealjs");
|
let out = PathBuf::from(format!("{}/slides/revealjs", self.config.input_dir));
|
||||||
|
|
||||||
if zip_extract::extract(Cursor::new(bytes), &out, true).is_err() {
|
if zip_extract::extract(Cursor::new(bytes), &out, true).is_err() {
|
||||||
return Err("could not write extracted archive to disk".to_string());
|
return Err("could not write extracted archive to disk".to_string());
|
||||||
@@ -61,35 +55,83 @@ impl BuildExecution {
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_dir(&mut self, path: &str) -> Result<(), String> {
|
pub fn build_dir(&mut self) -> Result<(), String> {
|
||||||
let result = fs_util::fetch_paths_recursive(&path);
|
let result = fs_util::fetch_paths_recursive(&self.config.input_dir);
|
||||||
|
|
||||||
let Ok(paths) = result else {
|
let Ok(paths) = result else {
|
||||||
return Err(result.unwrap_err())
|
return Err(result.unwrap_err())
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let reveal_dir = format!("{}/slides/revealjs", self.config.input_dir);
|
||||||
|
let paths = paths.into_iter()
|
||||||
|
.filter(|path| self.config.offline_reveal || !path.starts_with(reveal_dir.as_str()))
|
||||||
|
.collect::<Vec<String>>();
|
||||||
|
|
||||||
|
self.goal = paths.len();
|
||||||
|
|
||||||
for (index, in_path) in paths.iter().enumerate() {
|
for (index, in_path) in paths.iter().enumerate() {
|
||||||
self.progress = index + 1;
|
self.progress = index + 1;
|
||||||
self.goal = paths.len();
|
let result = self.build_file(&in_path);
|
||||||
let result = docki_build(&in_path);
|
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
DockiBuildResult::Err(err) => {
|
DockiBuildResult::Err(err) => {
|
||||||
self.display_building_status("Error", in_path, "");
|
self.display_building_status("Error", &in_path, "");
|
||||||
println!("{}", err)
|
println!("{}", err)
|
||||||
},
|
},
|
||||||
DockiBuildResult::Copy(out_path) => self.display_building_status("Copy", &in_path, &out_path),
|
DockiBuildResult::Copy(out_path) => self.display_building_status("Copy", &in_path, &out_path),
|
||||||
DockiBuildResult::Slide(out_path) => self.display_building_status("Slide", &in_path, &out_path),
|
DockiBuildResult::Slide(out_path) => self.display_building_status("Slide", &in_path, &out_path),
|
||||||
DockiBuildResult::Doc(out_path) => self.display_building_status("Doc", &in_path, &out_path)
|
DockiBuildResult::Doc(out_path) => self.display_building_status("Doc", &in_path, &out_path),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn build_file(&mut self, path: &str) -> DockiBuildResult {
|
||||||
|
let out_path = path.replace(&self.config.input_dir, "./dist");
|
||||||
|
let convert_out_path = out_path.replace(".adoc", ".html");
|
||||||
|
|
||||||
|
if path.starts_with(format!("{}/slides/", &self.config.input_dir).as_str()) && path.ends_with(".adoc") {
|
||||||
|
if let Err(err) = build_slide(&path, &convert_out_path, self.config.offline_reveal) {
|
||||||
|
return DockiBuildResult::Err(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
DockiBuildResult::Slide(convert_out_path)
|
||||||
|
} else if path.ends_with(".adoc") {
|
||||||
|
if let Err(err) = build_doc(&path, &convert_out_path) {
|
||||||
|
return DockiBuildResult::Err(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
DockiBuildResult::Doc(convert_out_path)
|
||||||
|
} else {
|
||||||
|
if let Err(err) = Self::copy(&path, &out_path) {
|
||||||
|
return DockiBuildResult::Err(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
DockiBuildResult::Copy(out_path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn copy(in_path: &str, out_path: &str) -> Result<(), String> {
|
||||||
|
fs_util::create_parent_dir_recursive(out_path);
|
||||||
|
|
||||||
|
if let Err(err) = fs::copy(in_path, out_path) {
|
||||||
|
return Err(err.to_string());
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
fn display_building_status(&self, status_type: &str, in_path: &str, out_path: &str) -> () {
|
fn display_building_status(&self, status_type: &str, in_path: &str, out_path: &str) -> () {
|
||||||
let progress_str = format!("{} / {}", self.progress, self.goal);
|
let progress_str = format!("{} / {}", self.progress, self.goal);
|
||||||
display_status(&progress_str, status_type, in_path, out_path);
|
display_status(&progress_str, status_type, in_path, out_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
pub enum DockiBuildResult {
|
||||||
|
Slide(String),
|
||||||
|
Doc(String),
|
||||||
|
Copy(String),
|
||||||
|
Err(String),
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use std::{process::Command, io::ErrorKind};
|
use nu_ansi_term::Color::{LightGray, LightGreen, LightRed};
|
||||||
use colored::Colorize;
|
use std::{io::ErrorKind, process::Command};
|
||||||
|
|
||||||
const INFO_ASCIIDOC: &str = "
|
const INFO_ASCIIDOC: &str = "
|
||||||
Install the binary with your package manager!
|
Install the binary with your package manager!
|
||||||
@@ -37,7 +37,7 @@ fn check_reveal() -> () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn reveal_is_installed() -> bool {
|
fn reveal_is_installed() -> bool {
|
||||||
return check_command("asciidoctor-revealjs")
|
return check_command("asciidoctor-revealjs");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_asciidoc() -> () {
|
fn check_asciidoc() -> () {
|
||||||
@@ -49,23 +49,21 @@ fn check_asciidoc() -> () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn asciidoc_is_installed() -> bool {
|
fn asciidoc_is_installed() -> bool {
|
||||||
return check_command("asciidoctor")
|
return check_command("asciidoctor");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_command(command: &str) -> bool {
|
fn check_command(command: &str) -> bool {
|
||||||
return match Command::new(command)
|
return match Command::new(command).output() {
|
||||||
.output() {
|
|
||||||
Ok(_) => true,
|
Ok(_) => true,
|
||||||
Err(e) => ErrorKind::NotFound != e.kind()
|
Err(e) => ErrorKind::NotFound != e.kind(),
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_health_ok(name: &str) {
|
fn print_health_ok(name: &str) {
|
||||||
println!("- ✔️ {}", name.bright_green());
|
println!("- ✔️ {}", LightGreen.paint(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_health_not_ok(name: &str, info: &str) {
|
fn print_health_not_ok(name: &str, info: &str) {
|
||||||
println!("- ❗{}", name.bright_red());
|
println!("- ❗{}", LightRed.paint(name));
|
||||||
println!("{}", info.bright_black())
|
println!("{}", LightGray.paint(info))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use colored::Colorize;
|
use nu_ansi_term::Color::Green;
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use live_server::listen;
|
use live_server::listen;
|
||||||
use notify::{
|
use notify::{
|
||||||
@@ -7,76 +7,104 @@ use notify::{
|
|||||||
};
|
};
|
||||||
use std::{env, path::Path};
|
use std::{env, path::Path};
|
||||||
|
|
||||||
use crate::app::{ watcher::watcher, build::{docki_build, DockiBuildResult}, commands::build::build, log::display_status};
|
use crate::app::{ commands::executions::build_execution::{self, BuildExecution, DockiBuildResult}, config::config::Config, log::display_status, watcher::watcher};
|
||||||
|
|
||||||
|
pub async fn serve(config: &Config) {
|
||||||
pub async fn serve(port: Option<u16>) {
|
let build_execution = BuildExecution::new(config);
|
||||||
build().await;
|
let mut server = Server::new(build_execution, config);
|
||||||
tokio::join!(watch_and_build(), start_server(port));
|
server.serve().await;
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn watch_and_build() {
|
struct Server<'a> {
|
||||||
watch(Path::new("./docs"))
|
build_execution: BuildExecution<'a>,
|
||||||
.await
|
config: &'a Config,
|
||||||
.expect("something went wrong")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn start_server(port: Option<u16>) {
|
impl <'a> Server <'a> {
|
||||||
let unwrapped_port = port.unwrap_or(8080);
|
pub fn new(build_execution: BuildExecution<'a>, config: &'a Config) -> Self {
|
||||||
println!(
|
return Self {
|
||||||
"\nServing at {}{} ",
|
build_execution: build_execution,
|
||||||
"http://localhost:".bold(),
|
config: config
|
||||||
unwrapped_port.to_string().bold()
|
}
|
||||||
);
|
}
|
||||||
|
|
||||||
let Ok(()) = listen("localhost", port.unwrap_or(8080), "./dist").await else {
|
async fn serve(&mut self) {
|
||||||
panic!("could not start server")
|
self.build_execution.prepare().await.expect("could not prepare for build");
|
||||||
};
|
self.build_execution.build_dir().expect("build failed");
|
||||||
|
tokio::join!(self.start_server(), self.watch_and_build());
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn start_server(&self) {
|
||||||
|
let link = &format!("http://localhost:{}", self.config.port);
|
||||||
|
let hyperlink = Green.paint(link).hyperlink(link);
|
||||||
|
|
||||||
|
println!(
|
||||||
|
"\nServing at {}",
|
||||||
|
hyperlink
|
||||||
|
);
|
||||||
|
|
||||||
|
let Ok(()) = listen("localhost", self.config.port, "./dist").await else {
|
||||||
|
panic!("could not start server")
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn watch_and_build(&mut self) {
|
||||||
|
self.watch()
|
||||||
|
.await
|
||||||
|
.expect("something went wrong")
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn watch(&mut self) -> notify::Result<()> {
|
||||||
|
let path = Path::new(&self.config.input_dir);
|
||||||
|
let (mut watcher, mut rx) = watcher()?;
|
||||||
|
|
||||||
|
watcher.watch(path.as_ref(), RecursiveMode::Recursive)?;
|
||||||
|
|
||||||
|
while let Some(res) = rx.next().await {
|
||||||
|
let event = res.expect("watching failed");
|
||||||
|
self.file_change(event)
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fn file_change(&mut self, event: Event) {
|
||||||
|
match event.kind {
|
||||||
|
EventKind::Modify(ModifyKind::Data(_)) => self.build_file(event.paths),
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn build_file(&mut self, paths: Vec<std::path::PathBuf>) {
|
||||||
|
let invalid_path_message = "changed path is invalid";
|
||||||
|
let in_path = paths
|
||||||
|
.first()
|
||||||
|
.expect(invalid_path_message)
|
||||||
|
.strip_prefix(¤t_dir())
|
||||||
|
.expect(invalid_path_message)
|
||||||
|
.to_str()
|
||||||
|
.expect(invalid_path_message);
|
||||||
|
|
||||||
|
let in_path = format!("./{}", in_path);
|
||||||
|
let result = self.build_execution.build_file(&in_path);
|
||||||
|
|
||||||
|
match result {
|
||||||
|
DockiBuildResult::Slide(out_path) => display_rebuilding_status("Slide", &in_path, &out_path),
|
||||||
|
DockiBuildResult::Doc(out_path) => display_rebuilding_status("Doc", &in_path, &out_path),
|
||||||
|
DockiBuildResult::Copy(out_path) => display_rebuilding_status("Copy", &in_path, &out_path),
|
||||||
|
DockiBuildResult::Err(err) => {
|
||||||
|
display_rebuilding_status("Error", &in_path, "");
|
||||||
|
println!("{}", err);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn watch(path: &Path) -> notify::Result<()> {
|
|
||||||
let (mut watcher, mut rx) = watcher()?;
|
|
||||||
|
|
||||||
watcher.watch(path.as_ref(), RecursiveMode::Recursive)?;
|
|
||||||
|
|
||||||
while let Some(res) = rx.next().await {
|
|
||||||
let event = res.expect("watching failed");
|
|
||||||
file_change(event)
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn file_change(event: Event) {
|
|
||||||
match event.kind {
|
|
||||||
EventKind::Modify(ModifyKind::Data(_)) => build_file(event.paths),
|
|
||||||
_ => (),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn build_file(paths: Vec<std::path::PathBuf>) {
|
|
||||||
let invalid_path_message = "changed path is invalid";
|
|
||||||
let in_path = paths
|
|
||||||
.first()
|
|
||||||
.expect(invalid_path_message)
|
|
||||||
.to_str()
|
|
||||||
.expect(invalid_path_message)
|
|
||||||
.replace(¤t_dir(), "")
|
|
||||||
.replace("/./", "./");
|
|
||||||
|
|
||||||
|
|
||||||
let result = docki_build(&in_path);
|
|
||||||
|
|
||||||
match result {
|
|
||||||
DockiBuildResult::Slide(out_path) => display_rebuilding_status("Slide", &in_path, &out_path),
|
|
||||||
DockiBuildResult::Doc(out_path) => display_rebuilding_status("Doc", &in_path, &out_path),
|
|
||||||
DockiBuildResult::Copy(out_path) => display_rebuilding_status("Copy", &in_path, &out_path),
|
|
||||||
DockiBuildResult::Err(err) => {
|
|
||||||
display_rebuilding_status("Error", &in_path, "");
|
|
||||||
println!("{}", err);
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn display_rebuilding_status(context: &str, in_path: &str, out_path: &str) {
|
fn display_rebuilding_status(context: &str, in_path: &str, out_path: &str) {
|
||||||
display_status("Rebuildng", context, in_path, out_path)
|
display_status("Rebuildng", context, in_path, out_path)
|
||||||
|
|||||||
60
src/app/config/arguments.rs
Normal file
60
src/app/config/arguments.rs
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
use clap::{Parser, Subcommand};
|
||||||
|
use nu_ansi_term::{AnsiGenericString, Style};
|
||||||
|
|
||||||
|
fn github_hyperlink() -> AnsiGenericString<'static, str> {
|
||||||
|
return Style::new()
|
||||||
|
.bold()
|
||||||
|
.underline()
|
||||||
|
.paint("https://github.com/quirinecker/docki")
|
||||||
|
.hyperlink("https://github.com/quirinecker/docki");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Parser)]
|
||||||
|
#[command(after_help = format!("More information like defaults can be found at {}", github_hyperlink()))]
|
||||||
|
pub struct Args {
|
||||||
|
#[command(subcommand)]
|
||||||
|
pub command: CommandArg,
|
||||||
|
|
||||||
|
/// The directory where the documentation is located
|
||||||
|
#[arg(short, long, global = true)]
|
||||||
|
pub input_dir: Option<String>,
|
||||||
|
|
||||||
|
/// The directory where the documentation will be built
|
||||||
|
#[arg(short, long, global = true)]
|
||||||
|
pub output_dir: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Subcommand)]
|
||||||
|
pub enum ShellArg {
|
||||||
|
Bash,
|
||||||
|
Fish,
|
||||||
|
Zsh,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Subcommand)]
|
||||||
|
pub enum CommandArg {
|
||||||
|
/// Builds the documentation into a dist folder
|
||||||
|
Build {
|
||||||
|
/// When set to true, docki will download revealjs before building the documentation.
|
||||||
|
/// Otherwise it will use the cdn for revealjs
|
||||||
|
#[arg(short, long)]
|
||||||
|
offline_reveal: bool,
|
||||||
|
},
|
||||||
|
/// Checks if everything required for docki is installed
|
||||||
|
Health,
|
||||||
|
/// Deprecated: Helper command for installing asciidoctor-reveal-js
|
||||||
|
InstallReveal,
|
||||||
|
/// Starts a Webserver with the live preview of the Documentation
|
||||||
|
Serve {
|
||||||
|
/// Port for the Live Server
|
||||||
|
#[arg(short, long)]
|
||||||
|
port: Option<u16>,
|
||||||
|
},
|
||||||
|
/// Generates completions for the desired shell
|
||||||
|
Completions {
|
||||||
|
#[command(subcommand)]
|
||||||
|
shell: ShellArg,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Args {}
|
||||||
50
src/app/config/config.rs
Normal file
50
src/app/config/config.rs
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
use serde::Deserialize;
|
||||||
|
|
||||||
|
use crate::app::config::arguments::CommandArg;
|
||||||
|
|
||||||
|
#[derive(Deserialize, Debug)]
|
||||||
|
#[serde(default)]
|
||||||
|
pub struct Config {
|
||||||
|
pub port: u16,
|
||||||
|
pub input_dir: String,
|
||||||
|
pub offline_reveal: bool,
|
||||||
|
pub output_dir: String
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Config {
|
||||||
|
pub fn load() -> Result<Self, config::ConfigError> {
|
||||||
|
let s = config::Config::builder()
|
||||||
|
.add_source(config::File::with_name("./docki.config.toml"))
|
||||||
|
.build()?;
|
||||||
|
s.try_deserialize()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn merge_with_args(self, args: &super::arguments::Args) -> Self {
|
||||||
|
Self {
|
||||||
|
port: match args.command {
|
||||||
|
CommandArg::Serve { port } => port.unwrap_or(self.port),
|
||||||
|
_ => self.port,
|
||||||
|
},
|
||||||
|
input_dir: args.input_dir.clone().unwrap_or(self.input_dir),
|
||||||
|
output_dir: args.output_dir.clone().unwrap_or(self.output_dir),
|
||||||
|
offline_reveal: {
|
||||||
|
if let CommandArg::Build { offline_reveal } = args.command {
|
||||||
|
offline_reveal
|
||||||
|
} else {
|
||||||
|
self.offline_reveal
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for Config {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self {
|
||||||
|
port: 8080,
|
||||||
|
input_dir: "./docs".to_string(),
|
||||||
|
output_dir: "./dist".to_string(),
|
||||||
|
offline_reveal: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
|
||||||
use self::structure::Args;
|
use self::arguments::Args;
|
||||||
|
|
||||||
pub mod structure;
|
pub mod arguments;
|
||||||
|
pub mod config;
|
||||||
|
|
||||||
pub fn args() -> Args {
|
pub fn args() -> Args {
|
||||||
return Args::parse();
|
return Args::parse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,20 +1,19 @@
|
|||||||
use colored::Colorize;
|
use nu_ansi_term::Color::LightGreen;
|
||||||
|
use nu_ansi_term::Color::LightRed;
|
||||||
|
use nu_ansi_term::Style;
|
||||||
|
|
||||||
pub fn display_status(context1: &str, context2: &str, in_path: &str, out_path: &str) {
|
pub fn display_status(context1: &str, context2: &str, in_path: &str, out_path: &str) {
|
||||||
let colored_context = color_context(context2);
|
let colored_context = if context2 == "Error" {
|
||||||
|
LightRed.paint(context2)
|
||||||
|
} else {
|
||||||
|
LightGreen.paint(context2)
|
||||||
|
};
|
||||||
|
|
||||||
println!(
|
println!(
|
||||||
"({}) [{}] {} -> {}",
|
"({}) [{}] {} -> {}",
|
||||||
context1.bold(),
|
Style::new().paint(context1),
|
||||||
colored_context,
|
colored_context,
|
||||||
in_path,
|
in_path,
|
||||||
out_path
|
out_path
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn color_context(context: &str) -> colored::ColoredString {
|
|
||||||
if context == "Error" {
|
|
||||||
return context.bright_red()
|
|
||||||
} else {
|
|
||||||
return context.bright_green()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -3,11 +3,13 @@ pub mod build;
|
|||||||
pub mod fs_util;
|
pub mod fs_util;
|
||||||
pub mod watcher;
|
pub mod watcher;
|
||||||
pub mod log;
|
pub mod log;
|
||||||
mod args;
|
mod config;
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
use self::args::{args, structure::CommandArg};
|
use crate::app::config::config::Config;
|
||||||
|
|
||||||
|
use self::config::{args, arguments::CommandArg};
|
||||||
use self::commands::build::build;
|
use self::commands::build::build;
|
||||||
use self::commands::completions::completions;
|
use self::commands::completions::completions;
|
||||||
use self::commands::health::health;
|
use self::commands::health::health;
|
||||||
@@ -20,13 +22,14 @@ impl App {
|
|||||||
|
|
||||||
pub async fn start(&self) {
|
pub async fn start(&self) {
|
||||||
let args = args();
|
let args = args();
|
||||||
|
let config = Config::load().unwrap_or(Config::default()).merge_with_args(&args);
|
||||||
Self::setup_environment_variables();
|
Self::setup_environment_variables();
|
||||||
|
|
||||||
match args.command {
|
match args.command {
|
||||||
CommandArg::Build => build().await,
|
CommandArg::Build { .. } => build(&config).await,
|
||||||
CommandArg::Health => health(),
|
CommandArg::Health => health(),
|
||||||
CommandArg::InstallReveal => install_reveal().await,
|
CommandArg::InstallReveal => install_reveal().await,
|
||||||
CommandArg::Serve { port } => serve(port).await,
|
CommandArg::Serve { .. } => serve(&config).await,
|
||||||
CommandArg::Completions { shell } => completions(shell)
|
CommandArg::Completions { shell } => completions(shell)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ fn test_fetch_asciidoctor_paths_recursive() {
|
|||||||
let paths = fs_util::fetch_paths_recursive("res/test/docs").unwrap();
|
let paths = fs_util::fetch_paths_recursive("res/test/docs").unwrap();
|
||||||
let len = paths.len();
|
let len = paths.len();
|
||||||
dbg!(paths);
|
dbg!(paths);
|
||||||
assert_eq!(len, 5);
|
assert_eq!(len, 6);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user