aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build-release-binaries.yml181
-rw-r--r--.github/workflows/build-release.yml240
-rw-r--r--.github/workflows/ci.yml7
-rw-r--r--CHANGELOG.md6
-rw-r--r--Cargo.lock302
-rw-r--r--Cargo.toml2
-rw-r--r--Containerfile3
-rw-r--r--Containerfile.alpine3
-rw-r--r--Cross.toml3
-rw-r--r--Dockerfile18
-rw-r--r--Dockerfile.alpine19
-rw-r--r--README.md4
-rw-r--r--src/main.rs3
-rw-r--r--src/renderer.rs8
-rw-r--r--tests/readme.rs125
-rw-r--r--tests/serve_request.rs3
16 files changed, 532 insertions, 395 deletions
diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml
deleted file mode 100644
index ff36c7a..0000000
--- a/.github/workflows/build-release-binaries.yml
+++ /dev/null
@@ -1,181 +0,0 @@
-name: Build release binaries (and publish them if this is a tag)
-
-on: [push, pull_request]
-
-jobs:
- binaries:
- name: ${{ matrix.os }} for ${{ matrix.target }}
- runs-on: ${{ matrix.os }}
- timeout-minutes: 30
- strategy:
- matrix:
- target:
- - x86_64-unknown-linux-musl
- - aarch64-unknown-linux-musl
- - armv7-unknown-linux-musleabihf
- - arm-unknown-linux-musleabihf
- - mips-unknown-linux-musl
- - mipsel-unknown-linux-musl
- - mips64-unknown-linux-gnuabi64
- - mips64el-unknown-linux-gnuabi64
- - riscv64gc-unknown-linux-gnu
- - x86_64-pc-windows-msvc
- - x86_64-apple-darwin
- - x86_64-unknown-freebsd
- include:
- - os: ubuntu-latest
- target: x86_64-unknown-linux-musl
- artifact_name: target/x86_64-unknown-linux-musl/release/miniserve
- release_name: x86_64-unknown-linux-musl
- cross: true
- strip: true
- compress: true
- cargo_flags: ""
- - os: ubuntu-latest
- target: aarch64-unknown-linux-musl
- artifact_name: target/aarch64-unknown-linux-musl/release/miniserve
- release_name: aarch64-unknown-linux-musl
- cross: true
- strip: false
- compress: true
- cargo_flags: ""
- - os: ubuntu-latest
- target: armv7-unknown-linux-musleabihf
- artifact_name: target/armv7-unknown-linux-musleabihf/release/miniserve
- release_name: armv7-unknown-linux-musleabihf
- cross: true
- strip: false
- compress: true
- cargo_flags: ""
- - os: ubuntu-latest
- target: arm-unknown-linux-musleabihf
- artifact_name: target/arm-unknown-linux-musleabihf/release/miniserve
- release_name: arm-unknown-linux-musleabihf
- cross: true
- strip: false
- compress: true
- cargo_flags: ""
- - os: ubuntu-latest
- target: mips-unknown-linux-musl
- artifact_name: target/mips-unknown-linux-musl/release/miniserve
- release_name: mips-unknown-linux-musl
- cross: true
- strip: false
- compress: true
- cargo_flags: "--no-default-features"
- - os: ubuntu-latest
- target: mipsel-unknown-linux-musl
- artifact_name: target/mipsel-unknown-linux-musl/release/miniserve
- release_name: mipsel-unknown-linux-musl
- cross: true
- strip: false
- compress: true
- cargo_flags: "--no-default-features"
- - os: ubuntu-latest
- target: mips64-unknown-linux-gnuabi64
- artifact_name: target/mips64-unknown-linux-gnuabi64/release/miniserve
- release_name: mips64-unknown-linux-gnuabi64
- cross: true
- strip: false
- compress: false
- cargo_flags: "--no-default-features"
- - os: ubuntu-latest
- target: mips64el-unknown-linux-gnuabi64
- artifact_name: target/mips64el-unknown-linux-gnuabi64/release/miniserve
- release_name: mips64el-unknown-linux-gnuabi64
- cross: true
- strip: false
- compress: false
- cargo_flags: "--no-default-features"
- - os: ubuntu-latest
- target: riscv64gc-unknown-linux-gnu
- artifact_name: target/riscv64gc-unknown-linux-gnu/release/miniserve
- release_name: riscv64gc-unknown-linux-gnu
- cross: true
- strip: false
- compress: false
- cargo_flags: "--no-default-features"
- - os: windows-latest
- target: x86_64-pc-windows-msvc
- artifact_name: target/x86_64-pc-windows-msvc/release/miniserve.exe
- release_name: x86_64-pc-windows-msvc.exe
- cross: false
- strip: true
- compress: true
- cargo_flags: ""
- - os: macos-latest
- target: x86_64-apple-darwin
- artifact_name: target/x86_64-apple-darwin/release/miniserve
- release_name: x86_64-apple-darwin
- cross: false
- strip: true
- compress: true
- cargo_flags: ""
- - os: ubuntu-latest
- target: x86_64-unknown-freebsd
- artifact_name: target/x86_64-unknown-freebsd/release/miniserve
- release_name: x86_64-unknown-freebsd
- cross: true
- strip: false
- compress: false
- cargo_flags: ""
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v2
-
- - name: Setup Rust toolchain
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- target: ${{ matrix.target }}
-
- - name: cargo build
- uses: actions-rs/cargo@v1
- with:
- command: build
- args: --release --locked --target=${{ matrix.target }} ${{ matrix.cargo_flags }}
- use-cross: ${{ matrix.cross }}
-
- - name: Compress binaries
- uses: svenstaro/upx-action@v2
- with:
- file: ${{ matrix.artifact_name }}
- args: --lzma
- strip: ${{ matrix.strip }}
- if: ${{ matrix.compress }}
-
- - name: Upload artifact
- uses: actions/upload-artifact@v2
- with:
- name: ${{ matrix.target }}
- path: ${{ matrix.artifact_name }}
-
- ###
- # Below this line, steps will only be run if a tag was pushed.
- ###
-
- - name: Get tag name
- id: tag_name
- run: |
- echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
- shell: bash
- if: startsWith(github.ref, 'refs/tags/v')
-
- - name: Get CHANGELOG.md entry
- id: changelog_reader
- uses: mindsers/changelog-reader-action@v1
- with:
- version: ${{ steps.tag_name.outputs.current_version }}
- path: ./CHANGELOG.md
- if: startsWith(github.ref, 'refs/tags/v')
-
- - name: Publish
- uses: svenstaro/upload-release-action@v2
- with:
- repo_token: ${{ secrets.GITHUB_TOKEN }}
- file: ${{ matrix.artifact_name }}
- tag: ${{ github.ref }}
- asset_name: miniserve-$tag-${{ matrix.release_name }}
- body: ${{ steps.changelog_reader.outputs.log_entry }}
- if: startsWith(github.ref, 'refs/tags/v')
diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml
new file mode 100644
index 0000000..9c5e0cb
--- /dev/null
+++ b/.github/workflows/build-release.yml
@@ -0,0 +1,240 @@
+name: Build/publish release
+
+on: [push, pull_request]
+
+jobs:
+ publish:
+ name: Binary ${{ matrix.target }} (on ${{ matrix.os }})
+ runs-on: ${{ matrix.os }}
+ outputs:
+ version: ${{ steps.extract_version.outputs.version }}
+ strategy:
+ matrix:
+ include:
+ - os: ubuntu-latest
+ target: x86_64-unknown-linux-musl
+ cross: true
+ compress: true
+ cargo_flags: ""
+ - os: ubuntu-latest
+ target: x86_64-unknown-linux-gnu
+ cross: true
+ compress: true
+ cargo_flags: ""
+ - os: ubuntu-latest
+ target: aarch64-unknown-linux-musl
+ cross: true
+ compress: true
+ cargo_flags: ""
+ - os: ubuntu-latest
+ target: aarch64-unknown-linux-gnu
+ cross: true
+ compress: true
+ cargo_flags: ""
+ - os: ubuntu-latest
+ target: armv7-unknown-linux-musleabihf
+ cross: true
+ compress: true
+ cargo_flags: ""
+ - os: ubuntu-latest
+ target: armv7-unknown-linux-gnueabihf
+ cross: true
+ compress: true
+ cargo_flags: ""
+ - os: ubuntu-latest
+ target: arm-unknown-linux-musleabihf
+ cross: true
+ compress: true
+ cargo_flags: ""
+ - os: ubuntu-latest
+ target: mips-unknown-linux-musl
+ cross: true
+ compress: true
+ cargo_flags: "--no-default-features"
+ - os: ubuntu-latest
+ target: mipsel-unknown-linux-musl
+ cross: true
+ compress: true
+ cargo_flags: "--no-default-features"
+ - os: ubuntu-latest
+ target: mips64-unknown-linux-gnuabi64
+ cross: true
+ compress: false
+ cargo_flags: "--no-default-features"
+ - os: ubuntu-latest
+ target: mips64el-unknown-linux-gnuabi64
+ cross: true
+ compress: false
+ cargo_flags: "--no-default-features"
+ - os: ubuntu-latest
+ target: riscv64gc-unknown-linux-gnu
+ cross: true
+ compress: false
+ cargo_flags: "--no-default-features"
+ - os: windows-latest
+ target: x86_64-pc-windows-msvc
+ cross: false
+ compress: true
+ cargo_flags: ""
+ - os: macos-latest
+ target: x86_64-apple-darwin
+ cross: false
+ compress: true
+ cargo_flags: ""
+ - os: ubuntu-latest
+ target: x86_64-unknown-freebsd
+ cross: true
+ compress: false
+ cargo_flags: ""
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Setup Rust toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ target: ${{ matrix.target }}
+ override: true
+
+ - run: sudo apt install musl-tools
+ if: startsWith(matrix.os, 'ubuntu')
+
+ - name: cargo build
+ uses: actions-rs/cargo@v1
+ with:
+ command: build
+ args: --release --locked --target=${{ matrix.target }} ${{ matrix.cargo_flags }}
+ use-cross: ${{ matrix.cross }}
+
+ - name: Set exe extension for Windows
+ run: echo "EXE=.exe" >> $env:GITHUB_ENV
+ if: startsWith(matrix.os, 'windows')
+
+ - name: Compress binaries
+ uses: svenstaro/upx-action@v2
+ with:
+ file: target/${{ matrix.target }}/release/miniserve${{ env.EXE }}
+ args: --best --lzma
+ strip: false # We're stripping already in Cargo.toml
+ if: ${{ matrix.compress }}
+
+ - name: Upload artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ matrix.target }}
+ path: target/${{ matrix.target }}/release/miniserve${{ env.EXE }}
+
+ - name: Get version from tag
+ id: extract_version
+ run: |
+ echo ::set-output name=version::${GITHUB_REF_NAME#v}
+ shell: bash
+
+ - name: Install CHANGELOG parser
+ uses: taiki-e/install-action@parse-changelog
+
+ - name: Get CHANGELOG entry
+ run: parse-changelog CHANGELOG.md ${{ steps.extract_version.outputs.version }} | tee changelog_entry
+ if: startsWith(github.ref_name, 'v') && github.ref_type == 'tag'
+ shell: bash
+
+ - name: Read changelog entry from file
+ id: changelog_entry
+ uses: juliangruber/read-file-action@v1
+ with:
+ path: ./changelog_entry
+ if: startsWith(github.ref_name, 'v') && github.ref_type == 'tag'
+
+ - name: Release
+ uses: svenstaro/upload-release-action@v2
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ file: target/${{ matrix.target }}/release/miniserve${{ env.EXE }}
+ tag: ${{ github.ref_name }}
+ asset_name: miniserve-${{ steps.extract_version.outputs.version }}-${{ matrix.target }}${{ env.EXE }}
+ body: ${{ steps.changelog_entry.outputs.content }}
+ if: startsWith(github.ref_name, 'v') && github.ref_type == 'tag'
+
+ container-images:
+ name: Publish images
+ runs-on: ubuntu-latest
+ needs: publish
+ # Run for tags and pushes to the default branch
+ if: (startsWith(github.ref_name, 'v') && github.ref_type == 'tag') || github.event.repository.default_branch == github.ref_name
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Download artifact aarch64-unknown-linux-gnu
+ uses: actions/download-artifact@v3
+ with:
+ name: aarch64-unknown-linux-gnu
+ path: target/aarch64-unknown-linux-gnu/release
+
+ - name: Download artifact x86_64-unknown-linux-gnu
+ uses: actions/download-artifact@v3
+ with:
+ name: x86_64-unknown-linux-gnu
+ path: target/x86_64-unknown-linux-gnu/release
+
+ - name: Download artifact armv7-unknown-linux-gnueabihf
+ uses: actions/download-artifact@v3
+ with:
+ name: armv7-unknown-linux-gnueabihf
+ path: target/armv7-unknown-linux-gnueabihf/release
+
+ - name: Download artifact aarch64-unknown-linux-musl
+ uses: actions/download-artifact@v3
+ with:
+ name: aarch64-unknown-linux-musl
+ path: target/aarch64-unknown-linux-musl/release
+
+ - name: Download artifact x86_64-unknown-linux-musl
+ uses: actions/download-artifact@v3
+ with:
+ name: x86_64-unknown-linux-musl
+ path: target/x86_64-unknown-linux-musl/release
+
+ - name: Download artifact armv7-unknown-linux-musleabihf
+ uses: actions/download-artifact@v3
+ with:
+ name: armv7-unknown-linux-musleabihf
+ path: target/armv7-unknown-linux-musleabihf/release
+
+ - name: podman login
+ run: podman login --username ${{ secrets.DOCKERHUB_USERNAME }} --password ${{ secrets.DOCKERHUB_TOKEN }} docker.io
+
+ - name: podman build linux/arm64
+ run: podman build --format docker --platform linux/arm64/v8 --manifest miniserve -f Containerfile target/aarch64-unknown-linux-gnu/release
+
+ - name: podman build linux/amd64
+ run: podman build --format docker --platform linux/amd64 --manifest miniserve -f Containerfile target/x86_64-unknown-linux-gnu/release
+
+ - name: podman build linux/arm
+ run: podman build --format docker --platform linux/arm/v7 --manifest miniserve -f Containerfile target/armv7-unknown-linux-gnueabihf/release
+
+ - name: podman manifest push latest
+ run: podman manifest push miniserve docker.io/svenstaro/miniserve:latest
+
+ - name: podman manifest push tag version
+ run: podman manifest push miniserve docker.io/svenstaro/miniserve:${{ needs.publish.outputs.version }}
+ if: startsWith(github.ref_name, 'v')
+
+ - name: podman build linux/arm64 (alpine edition)
+ run: podman build --format docker --platform linux/arm64/v8 --manifest miniserve-alpine -f Containerfile.alpine target/aarch64-unknown-linux-musl/release
+
+ - name: podman build linux/amd64 (alpine edition)
+ run: podman build --format docker --platform linux/amd64 --manifest miniserve-alpine -f Containerfile.alpine target/x86_64-unknown-linux-musl/release
+
+ - name: podman build linux/arm (alpine edition)
+ run: podman build --format docker --platform linux/arm/v7 --manifest miniserve-alpine -f Containerfile.alpine target/armv7-unknown-linux-musleabihf/release
+
+ - name: podman manifest push latest (alpine edition)
+ run: podman manifest push miniserve-alpine docker.io/svenstaro/miniserve:alpine
+
+ - name: podman manifest push tag version (alpine edition)
+ run: podman manifest push miniserve-alpine docker.io/svenstaro/miniserve:${{ needs.publish.outputs.version }}-alpine
+ if: startsWith(github.ref_name, 'v')
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 02d4808..840f43a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -4,13 +4,11 @@ on: [push, pull_request]
jobs:
ci:
- name: ${{ matrix.rust }} on ${{ matrix.os }}
+ name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
- timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
- rust: [stable, nightly]
steps:
- name: Checkout code
@@ -20,7 +18,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
- toolchain: ${{ matrix.rust }}
+ toolchain: stable
override: true
components: rustfmt, clippy
@@ -45,4 +43,3 @@ jobs:
with:
command: clippy
args: -- -D warnings
- if: matrix.rust == 'nightly'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1850f28..f226627 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,8 +8,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
<!-- next-header -->
## [Unreleased] - ReleaseDate
+
+## [0.21.0] - 2022-09-15
- Fix bug where static files would be served incorrectly when using `--random-route` [#835](https://github.com/svenstaro/miniserve/pull/835) (thanks @solarknight)
- Add `--readme` to render the README in the current directory after the file listing [#860](https://github.com/svenstaro/miniserve/pull/860) (thanks @Atreyagaurav)
+- Add more architectures (and also additional container images)
## [0.20.0] - 2022-06-26
- Fixed security issue where it was possible to upload files to locations pointed to by symlinks
@@ -150,7 +153,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Some theme related bug fixes (thanks @boastful-squirrel)
<!-- next-url -->
-[Unreleased]: https://github.com/svenstaro/miniserve/compare/v0.20.0...HEAD
+[Unreleased]: https://github.com/svenstaro/miniserve/compare/v0.21.0...HEAD
+[0.21.0]: https://github.com/svenstaro/miniserve/compare/v0.20.0...v0.21.0
[0.20.0]: https://github.com/svenstaro/miniserve/compare/v0.19.5...v0.20.0
[0.19.5]: https://github.com/svenstaro/miniserve/compare/v0.19.4...v0.19.5
[0.19.4]: https://github.com/svenstaro/miniserve/compare/v0.19.3...v0.19.4
diff --git a/Cargo.lock b/Cargo.lock
index 174d5bc..a7e1793 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -44,9 +44,9 @@ dependencies = [
[[package]]
name = "actix-http"
-version = "3.2.1"
+version = "3.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f9ffb6db08c1c3a1f4aef540f1a63193adc73c4fbd40b75a95fc8c5258f6e51"
+checksum = "0c83abf9903e1f0ad9973cc4f7b9767fd5a03a583f51a5b7a339e07987cd2724"
dependencies = [
"actix-codec",
"actix-rt",
@@ -191,9 +191,9 @@ dependencies = [
[[package]]
name = "actix-web"
-version = "4.1.0"
+version = "4.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a27e8fe9ba4ae613c21f677c2cfaf0696c3744030c6f485b34634e502d6bb379"
+checksum = "d48f7b6534e06c7bfc72ee91db7917d4af6afe23e7d223b51e68fffbb21e96b9"
dependencies = [
"actix-codec",
"actix-http",
@@ -214,6 +214,7 @@ dependencies = [
"encoding_rs",
"futures-core",
"futures-util",
+ "http",
"itoa",
"language-tags",
"log",
@@ -226,15 +227,15 @@ dependencies = [
"serde_urlencoded",
"smallvec",
"socket2",
- "time 0.3.13",
+ "time 0.3.14",
"url",
]
[[package]]
name = "actix-web-codegen"
-version = "4.0.1"
+version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f270541caec49c15673b0af0e9a00143421ad4f118d2df7edcb68b627632f56"
+checksum = "1fa9362663c8643d67b2d5eafba49e4cb2c8a053a29ed00a0bea121f17c76b13"
dependencies = [
"actix-router",
"proc-macro2",
@@ -282,24 +283,24 @@ dependencies = [
[[package]]
name = "aho-corasick"
-version = "0.7.18"
+version = "0.7.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
+checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e"
dependencies = [
"memchr",
]
[[package]]
name = "alloc-no-stdlib"
-version = "2.0.3"
+version = "2.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35ef4730490ad1c4eae5c4325b2a95f521d023e5c885853ff7aca0a6a1631db3"
+checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
[[package]]
name = "alloc-stdlib"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "697ed7edc0f1711de49ce108c541623a0af97c6c60b2f6e2b65229847ac843c2"
+checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
dependencies = [
"alloc-no-stdlib",
]
@@ -312,9 +313,9 @@ checksum = "77e9c9abb82613923ec78d7a461595d52491ba7240f3c64c0bbe0e6d98e0fce0"
[[package]]
name = "android_system_properties"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7ed72e1635e121ca3e79420540282af22da58be50de153d36f81ddc6b83aa9e"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc",
]
@@ -330,9 +331,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.62"
+version = "1.0.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1485d4d2cc45e7b201ee3767015c96faa5904387c9d87c6efdd0fb511f12d305"
+checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602"
[[package]]
name = "askama_escape"
@@ -429,9 +430,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "block-buffer"
-version = "0.10.2"
+version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324"
+checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e"
dependencies = [
"generic-array",
]
@@ -470,9 +471,9 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.10.0"
+version = "3.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3"
+checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d"
[[package]]
name = "byteorder"
@@ -563,9 +564,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "3.2.17"
+version = "3.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29e724a68d9319343bb3328c9cc2dfde263f4b3142ee1059a9980580171c954b"
+checksum = "1ed5341b2301a26ab80be5cbdced622e80ed808483c52e45e3310a877d3b37d7"
dependencies = [
"atty",
"bitflags",
@@ -581,18 +582,18 @@ dependencies = [
[[package]]
name = "clap_complete"
-version = "3.2.4"
+version = "3.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4179da71abd56c26b54dd0c248cc081c1f43b0a1a7e8448e28e57a29baa993d"
+checksum = "3f7a2e0a962c45ce25afce14220bc24f9dade0a1787f185cecf96bfba7847cd8"
dependencies = [
- "clap 3.2.17",
+ "clap 3.2.21",
]
[[package]]
name = "clap_derive"
-version = "3.2.17"
+version = "3.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13547f7012c01ab4a0e8f8967730ada8f9fdf419e8b6c792788f39cf4e46eefa"
+checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
dependencies = [
"heck",
"proc-macro-error",
@@ -612,11 +613,11 @@ dependencies = [
[[package]]
name = "clap_mangen"
-version = "0.1.10"
+version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "937efe4451c32be4ccb3e19549cbb1ea5cb85197f39b87a9662ca1d7b1765d1d"
+checksum = "105180c05a72388d5f5e4e4f6c79eecb92497bda749fa8f963a16647c5d5377f"
dependencies = [
- "clap 3.2.17",
+ "clap 3.2.21",
"roff",
]
@@ -659,7 +660,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94d4706de1b0fa5b132270cddffa8585166037822e260a944fe161acd137ca05"
dependencies = [
"percent-encoding",
- "time 0.3.13",
+ "time 0.3.14",
"version_check",
]
@@ -671,9 +672,9 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
[[package]]
name = "cpufeatures"
-version = "0.2.2"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b"
+checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320"
dependencies = [
"libc",
]
@@ -780,9 +781,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
[[package]]
name = "either"
-version = "1.7.0"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be"
+checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
[[package]]
name = "encoding_rs"
@@ -863,11 +864,10 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "form_urlencoded"
-version = "1.0.1"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
+checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
dependencies = [
- "matches",
"percent-encoding",
]
@@ -883,9 +883,9 @@ dependencies = [
[[package]]
name = "futures"
-version = "0.3.23"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab30e97ab6aacfe635fad58f22c2bb06c8b685f7421eb1e064a729e2a5f481fa"
+checksum = "7f21eda599937fba36daeb58a22e8f5cee2d14c4a17b5b7739c7c8e5e3b8230c"
dependencies = [
"futures-channel",
"futures-core",
@@ -898,9 +898,9 @@ dependencies = [
[[package]]
name = "futures-channel"
-version = "0.3.23"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bfc52cbddcfd745bf1740338492bb0bd83d76c67b445f91c5fb29fae29ecaa1"
+checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050"
dependencies = [
"futures-core",
"futures-sink",
@@ -908,15 +908,15 @@ dependencies = [
[[package]]
name = "futures-core"
-version = "0.3.23"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2acedae88d38235936c3922476b10fced7b2b68136f5e3c03c2d5be348a1115"
+checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf"
[[package]]
name = "futures-executor"
-version = "0.3.23"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d11aa21b5b587a64682c0094c2bdd4df0076c5324961a40cc3abd7f37930528"
+checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab"
dependencies = [
"futures-core",
"futures-task",
@@ -925,15 +925,15 @@ dependencies = [
[[package]]
name = "futures-io"
-version = "0.3.23"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93a66fc6d035a26a3ae255a6d2bca35eda63ae4c5512bef54449113f7a1228e5"
+checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68"
[[package]]
name = "futures-macro"
-version = "0.3.23"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0db9cce532b0eae2ccf2766ab246f114b56b9cf6d445e00c2549fbc100ca045d"
+checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17"
dependencies = [
"proc-macro2",
"quote",
@@ -942,15 +942,15 @@ dependencies = [
[[package]]
name = "futures-sink"
-version = "0.3.23"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca0bae1fe9752cf7fd9b0064c674ae63f97b37bc714d745cbde0afb7ec4e6765"
+checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56"
[[package]]
name = "futures-task"
-version = "0.3.23"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "842fc63b931f4056a24d59de13fb1272134ce261816e063e634ad0c15cdc5306"
+checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1"
[[package]]
name = "futures-timer"
@@ -960,9 +960,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c"
[[package]]
name = "futures-util"
-version = "0.3.23"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0828a5471e340229c11c77ca80017937ce3c58cb788a17e5f1c2d5c485a9577"
+checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90"
dependencies = [
"futures-channel",
"futures-core",
@@ -1062,9 +1062,9 @@ dependencies = [
[[package]]
name = "grass"
-version = "0.11.0"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89369b06ea6eb94b38f5f2014d0d2c5a57c1b5e5bfd2e328f9cec96e6ca92448"
+checksum = "bc5bedc3dbd71dcdd41900e1f58e4d431fa69dd67c04ae1f86ae1a0339edd849"
dependencies = [
"beef",
"clap 2.34.0",
@@ -1081,9 +1081,9 @@ dependencies = [
[[package]]
name = "h2"
-version = "0.3.13"
+version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57"
+checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be"
dependencies = [
"bytes",
"fnv",
@@ -1178,9 +1178,9 @@ checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573"
[[package]]
name = "httparse"
-version = "1.7.1"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c"
+checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
[[package]]
name = "httpdate"
@@ -1227,24 +1227,24 @@ dependencies = [
[[package]]
name = "iana-time-zone"
-version = "0.1.44"
+version = "0.1.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "808cf7d67cf4a22adc5be66e75ebdf769b3f2ea032041437a7061f97a63dad4b"
+checksum = "237a0714f28b1ee39ccec0770ccb544eb02c9ef2c82bb096230eefcffa6468b0"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"js-sys",
+ "once_cell",
"wasm-bindgen",
"winapi 0.3.9",
]
[[package]]
name = "idna"
-version = "0.2.3"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
+checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
dependencies = [
- "matches",
"unicode-bidi",
"unicode-normalization",
]
@@ -1294,9 +1294,9 @@ checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b"
[[package]]
name = "itertools"
-version = "0.10.3"
+version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3"
+checksum = "d8bf247779e67a9082a4790b45e71ac7cfd1321331a5c856a74a9faebdab78d0"
dependencies = [
"either",
]
@@ -1318,9 +1318,9 @@ dependencies = [
[[package]]
name = "js-sys"
-version = "0.3.59"
+version = "0.3.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2"
+checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47"
dependencies = [
"wasm-bindgen",
]
@@ -1354,9 +1354,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libc"
-version = "0.2.131"
+version = "0.2.132"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04c3b4822ccebfa39c02fc03d1534441b22ead323fa0f48bb7ddd8e6ba076a40"
+checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5"
[[package]]
name = "libflate"
@@ -1413,9 +1413,9 @@ checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1"
[[package]]
name = "lock_api"
-version = "0.4.7"
+version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53"
+checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390"
dependencies = [
"autocfg",
"scopeguard",
@@ -1463,12 +1463,6 @@ dependencies = [
]
[[package]]
-name = "matches"
-version = "0.1.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
-
-[[package]]
name = "maud"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1513,7 +1507,7 @@ dependencies = [
[[package]]
name = "miniserve"
-version = "0.20.0"
+version = "0.21.0"
dependencies = [
"actix-files",
"actix-multipart",
@@ -1527,7 +1521,7 @@ dependencies = [
"bytesize",
"chrono",
"chrono-humanize",
- "clap 3.2.17",
+ "clap 3.2.21",
"clap_complete",
"clap_mangen",
"comrak",
@@ -1568,9 +1562,9 @@ dependencies = [
[[package]]
name = "miniz_oxide"
-version = "0.5.3"
+version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc"
+checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34"
dependencies = [
"adler",
]
@@ -1671,9 +1665,9 @@ dependencies = [
[[package]]
name = "once_cell"
-version = "1.13.0"
+version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1"
+checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0"
[[package]]
name = "onig"
@@ -1737,21 +1731,21 @@ dependencies = [
[[package]]
name = "paste"
-version = "1.0.8"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9423e2b32f7a043629287a536f21951e8c6a82482d0acb1eeebfc90bc2225b22"
+checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1"
[[package]]
name = "percent-encoding"
-version = "2.1.0"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
+checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
[[package]]
name = "pest"
-version = "2.2.1"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69486e2b8c2d2aeb9762db7b4e00b0331156393555cff467f4163ff06821eef8"
+checksum = "cb779fcf4bb850fbbb0edc96ff6cf34fd90c4b1a112ce042653280d9a7364048"
dependencies = [
"thiserror",
"ucd-trie",
@@ -1759,9 +1753,9 @@ dependencies = [
[[package]]
name = "pest_derive"
-version = "2.2.1"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b13570633aff33c6d22ce47dd566b10a3b9122c2fe9d8e7501895905be532b91"
+checksum = "502b62a6d0245378b04ffe0a7fb4f4419a4815fce813bd8a0ec89a56e07d67b1"
dependencies = [
"pest",
"pest_generator",
@@ -1769,9 +1763,9 @@ dependencies = [
[[package]]
name = "pest_generator"
-version = "2.2.1"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3c567e5702efdc79fb18859ea74c3eb36e14c43da7b8c1f098a4ed6514ec7a0"
+checksum = "451e629bf49b750254da26132f1a5a9d11fd8a95a3df51d15c4abd1ba154cb6c"
dependencies = [
"pest",
"pest_meta",
@@ -1782,13 +1776,13 @@ dependencies = [
[[package]]
name = "pest_meta"
-version = "2.2.1"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5eb32be5ee3bbdafa8c7a18b0a8a8d962b66cfa2ceee4037f49267a50ee821fe"
+checksum = "bcec162c71c45e269dfc3fc2916eaeb97feab22993a21bcce4721d08cd7801a6"
dependencies = [
"once_cell",
"pest",
- "sha-1",
+ "sha1",
]
[[package]]
@@ -1920,7 +1914,7 @@ dependencies = [
"indexmap",
"line-wrap",
"serde",
- "time 0.3.13",
+ "time 0.3.14",
"xml-rs",
]
@@ -1974,14 +1968,14 @@ dependencies = [
[[package]]
name = "pretty_assertions"
-version = "1.2.1"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c89f989ac94207d048d92db058e4f6ec7342b0971fc58d1271ca148b799b3563"
+checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755"
dependencies = [
- "ansi_term",
"ctor",
"diff",
"output_vt100",
+ "yansi",
]
[[package]]
@@ -2349,9 +2343,9 @@ dependencies = [
[[package]]
name = "semver"
-version = "1.0.13"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93f6841e709003d68bb2deee8c343572bf446003ec20a583e76f7b15cebf3711"
+checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4"
[[package]]
name = "serde"
@@ -2375,9 +2369,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.83"
+version = "1.0.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7"
+checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44"
dependencies = [
"itoa",
"ryu",
@@ -2397,21 +2391,10 @@ dependencies = [
]
[[package]]
-name = "sha-1"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f"
-dependencies = [
- "cfg-if",
- "cpufeatures",
- "digest",
-]
-
-[[package]]
name = "sha1"
-version = "0.10.1"
+version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c77f4e7f65455545c2153c1253d25056825e77ee2533f0e41deb65a93a34852f"
+checksum = "006769ba83e921b3085caa8334186b00cf92b4cb1a6cf4632fbccc8eff5c7549"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -2420,9 +2403,9 @@ dependencies = [
[[package]]
name = "sha2"
-version = "0.10.2"
+version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676"
+checksum = "cf9db03534dff993187064c4e0c05a5708d2a9728ace9a8959b77bedf415dac5"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -2452,7 +2435,7 @@ checksum = "48dfff04aade74dd495b007c831cd6f4e0cee19c344dd9dc0884c0289b70a786"
dependencies = [
"log",
"termcolor",
- "time 0.3.13",
+ "time 0.3.14",
]
[[package]]
@@ -2478,9 +2461,9 @@ checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1"
[[package]]
name = "socket2"
-version = "0.4.4"
+version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0"
+checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd"
dependencies = [
"libc",
"winapi 0.3.9",
@@ -2664,18 +2647,18 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "1.0.32"
+version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994"
+checksum = "c53f98874615aea268107765aa1ed8f6116782501d18e53d08b471733bea6c85"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.32"
+version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21"
+checksum = "f8b463991b4eab2d801e724172285ec4195c650e8ec79b149e6c2a8e6dd3f783"
dependencies = [
"proc-macro2",
"quote",
@@ -2704,9 +2687,9 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.13"
+version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db76ff9fa4b1458b3c7f077f3ff9887394058460d21e634355b273aaf11eea45"
+checksum = "3c3f9a28b618c3a6b9251b6908e9c99e04b9e5c02e6581ccbb67d59c34ef7f9b"
dependencies = [
"itoa",
"libc",
@@ -2737,9 +2720,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "tokio"
-version = "1.20.1"
+version = "1.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a8325f63a7d4774dd041e363b2409ed1c5cbbd0f867795e661df066b2b0a581"
+checksum = "0020c875007ad96677dcc890298f4b942882c5d4eb7cc8f439fc3bf813dc9c95"
dependencies = [
"autocfg",
"bytes",
@@ -2768,9 +2751,9 @@ dependencies = [
[[package]]
name = "tokio-util"
-version = "0.7.3"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45"
+checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740"
dependencies = [
"bytes",
"futures-core",
@@ -2837,9 +2820,9 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
[[package]]
name = "ucd-trie"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89570599c4fe5585de2b388aab47e99f7fa4e9238a1399f707a02e356058141c"
+checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81"
[[package]]
name = "unchecked-index"
@@ -2864,9 +2847,9 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
[[package]]
name = "unicode-ident"
-version = "1.0.3"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf"
+checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd"
[[package]]
name = "unicode-normalization"
@@ -2879,9 +2862,9 @@ dependencies = [
[[package]]
name = "unicode-width"
-version = "0.1.9"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
+checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
[[package]]
name = "unicode_categories"
@@ -2897,13 +2880,12 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
[[package]]
name = "url"
-version = "2.2.2"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
+checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643"
dependencies = [
"form_urlencoded",
"idna",
- "matches",
"percent-encoding",
]
@@ -2975,9 +2957,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.82"
+version = "0.2.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d"
+checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
@@ -2985,9 +2967,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.82"
+version = "0.2.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f"
+checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142"
dependencies = [
"bumpalo",
"log",
@@ -3000,9 +2982,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.32"
+version = "0.4.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad"
+checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d"
dependencies = [
"cfg-if",
"js-sys",
@@ -3012,9 +2994,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.82"
+version = "0.2.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602"
+checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -3022,9 +3004,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.82"
+version = "0.2.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da"
+checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"
dependencies = [
"proc-macro2",
"quote",
@@ -3035,15 +3017,15 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.82"
+version = "0.2.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a"
+checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f"
[[package]]
name = "web-sys"
-version = "0.3.59"
+version = "0.3.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1"
+checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f"
dependencies = [
"js-sys",
"wasm-bindgen",
diff --git a/Cargo.toml b/Cargo.toml
index de73987..70773ff 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "miniserve"
-version = "0.20.0"
+version = "0.21.0"
description = "For when you really just want to serve some files over HTTP right now!"
authors = ["Sven-Hendrik Haase <svenstaro@gmail.com>", "Boastful Squirrel <boastful.squirrel@gmail.com>"]
repository = "https://github.com/svenstaro/miniserve"
diff --git a/Containerfile b/Containerfile
new file mode 100644
index 0000000..3f2d866
--- /dev/null
+++ b/Containerfile
@@ -0,0 +1,3 @@
+FROM docker.io/ubuntu
+COPY --chmod=755 miniserve /app/
+ENTRYPOINT ["/app/miniserve"]
diff --git a/Containerfile.alpine b/Containerfile.alpine
new file mode 100644
index 0000000..d297f83
--- /dev/null
+++ b/Containerfile.alpine
@@ -0,0 +1,3 @@
+FROM docker.io/alpine
+COPY --chmod=755 miniserve /app/
+ENTRYPOINT ["/app/miniserve"]
diff --git a/Cross.toml b/Cross.toml
deleted file mode 100644
index ccb61cf..0000000
--- a/Cross.toml
+++ /dev/null
@@ -1,3 +0,0 @@
-# NOTE: Custom image specification for freebsd is required until new version of cross is released.
-[target.x86_64-unknown-freebsd]
-image = "svenstaro/cross-x86_64-unknown-freebsd:latest"
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index 6fb6d10..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,18 +0,0 @@
-# This Dockerfile results in a super small container containing only the miniserve binary and nothing else.
-# Use this in case you don't need any additional tools in the container.
-FROM rust as builder
-
-ENV APP_HOME /usr/src/app/
-
-RUN rustup target add x86_64-unknown-linux-musl
-RUN apt update && apt-get install -y upx musl-tools
-
-COPY . $APP_HOME
-WORKDIR $APP_HOME
-RUN make build-linux
-
-FROM scratch
-COPY --from=builder /usr/src/app/target/x86_64-unknown-linux-musl/release/miniserve /app/
-
-EXPOSE 8080
-ENTRYPOINT ["/app/miniserve"]
diff --git a/Dockerfile.alpine b/Dockerfile.alpine
deleted file mode 100644
index f99d757..0000000
--- a/Dockerfile.alpine
+++ /dev/null
@@ -1,19 +0,0 @@
-# This Dockerfile results in an Alpine container containing the minishift executable.
-# Use this in case you need additional basic tools provided by Alpine in this container.
-FROM rust as builder
-
-ENV APP_HOME /usr/src/app/
-
-RUN rustup target add x86_64-unknown-linux-musl
-RUN apt update && apt-get install -y upx musl-tools
-
-COPY . $APP_HOME
-WORKDIR $APP_HOME
-RUN make build-linux
-
-FROM alpine
-RUN apk add rsync
-COPY --from=builder /usr/src/app/target/x86_64-unknown-linux-musl/release/miniserve /app/
-
-EXPOSE 8080
-ENTRYPOINT ["/app/miniserve"]
diff --git a/README.md b/README.md
index a44cdae..ab17fb6 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
# miniserve - a CLI tool to serve files and dirs over HTTP
[![CI](https://github.com/svenstaro/miniserve/workflows/CI/badge.svg)](https://github.com/svenstaro/miniserve/actions)
-[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/svenstaro/miniserve)](https://cloud.docker.com/repository/docker/svenstaro/miniserve/)
+[![Docker Hub](https://img.shields.io/docker/pulls/svenstaro/miniserve)](https://cloud.docker.com/repository/docker/svenstaro/miniserve/)
[![Crates.io](https://img.shields.io/crates/v/miniserve.svg)](https://crates.io/crates/miniserve)
[![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/svenstaro/miniserve/blob/master/LICENSE)
[![Stars](https://img.shields.io/github/stars/svenstaro/miniserve.svg)](https://github.com/svenstaro/miniserve/stargazers)
@@ -105,7 +105,7 @@ Some mobile browsers like Firefox on Android will offer to open the camera app w
## Usage
- miniserve 0.20.0
+ miniserve 0.21.0
Sven-Hendrik Haase <svenstaro@gmail.com>, Boastful Squirrel <boastful.squirrel@gmail.com>
diff --git a/src/main.rs b/src/main.rs
index 9348a34..08c6680 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -11,7 +11,6 @@ use actix_web::{middleware, App, HttpRequest, HttpResponse};
use actix_web_httpauth::middleware::HttpAuthentication;
use anyhow::Result;
use clap::{crate_version, IntoApp, Parser};
-use clap_complete::generate;
use log::{error, warn};
use qrcodegen::{QrCode, QrCodeEcc};
use yansi::{Color, Paint};
@@ -35,7 +34,7 @@ fn main() -> Result<()> {
if let Some(shell) = args.print_completions {
let mut clap_app = args::CliArgs::command();
let app_name = clap_app.get_name().to_string();
- generate(shell, &mut clap_app, app_name, &mut io::stdout());
+ clap_complete::generate(shell, &mut clap_app, app_name, &mut io::stdout());
return Ok(());
}
diff --git a/src/renderer.rs b/src/renderer.rs
index 7ec48b0..40aa7cd 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -168,9 +168,11 @@ pub fn page(
}
}
@if let Some(readme) = readme {
- div {
- h3 { (readme.0) }
- (PreEscaped (readme.1));
+ div id="readme" {
+ h3 id="readme-filename" { (readme.0) }
+ div id="readme-contents" {
+ (PreEscaped (readme.1))
+ };
}
}
a.back href="#top" {
diff --git a/tests/readme.rs b/tests/readme.rs
new file mode 100644
index 0000000..56a3afd
--- /dev/null
+++ b/tests/readme.rs
@@ -0,0 +1,125 @@
+mod fixtures;
+
+use fixtures::{server, Error, TestServer, DIRECTORIES, FILES};
+use rstest::rstest;
+use select::predicate::Attr;
+use select::{document::Document, node::Node};
+use std::fs::{remove_file, File};
+use std::io::Write;
+use std::path::PathBuf;
+
+/// Do not show readme contents by default
+#[rstest]
+fn no_readme_contents(server: TestServer) -> Result<(), Error> {
+ let body = reqwest::blocking::get(server.url())?.error_for_status()?;
+ let parsed = Document::from_read(body)?;
+
+ // Check that the regular file listing still works.
+ for &file in FILES {
+ assert!(parsed.find(|x: &Node| x.text() == file).next().is_some());
+ }
+ for &dir in DIRECTORIES {
+ assert!(parsed.find(|x: &Node| x.text() == dir).next().is_some());
+ }
+
+ // Check that there is no readme stuff here.
+ assert!(parsed.find(Attr("id", "readme")).next().is_none());
+ assert!(parsed.find(Attr("id", "readme-filename")).next().is_none());
+ assert!(parsed.find(Attr("id", "readme-contents")).next().is_none());
+
+ Ok(())
+}
+
+/// Show readme contents when told to if there is a readme file in the root
+#[rstest(
+ readme_name,
+ case("Readme.md"),
+ case("readme.md"),
+ case("README.md"),
+ case("README.MD"),
+ case("ReAdMe.Md")
+)]
+fn show_root_readme_contents(
+ #[with(&["--readme"])] server: TestServer,
+ readme_name: &str,
+) -> Result<(), Error> {
+ let readme_path = write_readme_contents(server.path().to_path_buf(), readme_name);
+ let body = reqwest::blocking::get(server.url())?.error_for_status()?;
+ let parsed = Document::from_read(body)?;
+
+ // All the files are still getting listed...
+ for &file in FILES {
+ assert!(parsed.find(|x: &Node| x.text() == file).next().is_some());
+ }
+ // ...in addition to the readme contents below the file listing.
+ assert_readme_contents(&parsed, &readme_name);
+ remove_file(readme_path).unwrap();
+ Ok(())
+}
+
+/// Show readme contents when told to if there is a readme file in any of the directories
+#[rstest(
+ readme_name,
+ case("Readme.md"),
+ case("readme.md"),
+ case("README.md"),
+ case("README.MD"),
+ case("ReAdMe.Md")
+)]
+fn show_nested_readme_contents(
+ #[with(&["--readme"])] server: TestServer,
+ readme_name: &str,
+) -> Result<(), Error> {
+ for dir in DIRECTORIES {
+ let readme_path = write_readme_contents(server.path().join(dir), readme_name);
+ let body = reqwest::blocking::get(server.url().join(dir)?)?.error_for_status()?;
+ let parsed = Document::from_read(body)?;
+
+ // All the files are still getting listed...
+ for &file in FILES {
+ assert!(parsed.find(|x: &Node| x.text() == file).next().is_some());
+ }
+ // ...in addition to the readme contents below the file listing.
+ assert_readme_contents(&parsed, &readme_name);
+ remove_file(readme_path).unwrap();
+ }
+ Ok(())
+}
+
+fn write_readme_contents(path: PathBuf, filename: &str) -> PathBuf {
+ let readme_path = path.join(filename);
+ let mut readme_file = File::create(&readme_path).unwrap();
+ readme_file
+ .write(format!("Contents of {}", filename).to_string().as_bytes())
+ .expect("Couldn't write readme");
+ readme_path
+}
+
+fn assert_readme_contents(parsed_dom: &Document, filename: &str) {
+ assert!(parsed_dom.find(Attr("id", "readme")).next().is_some());
+ assert!(parsed_dom
+ .find(Attr("id", "readme-filename"))
+ .next()
+ .is_some());
+ assert!(
+ parsed_dom
+ .find(Attr("id", "readme-filename"))
+ .next()
+ .unwrap()
+ .text()
+ == filename
+ );
+ assert!(parsed_dom
+ .find(Attr("id", "readme-contents"))
+ .next()
+ .is_some());
+ assert!(
+ parsed_dom
+ .find(Attr("id", "readme-contents"))
+ .next()
+ .unwrap()
+ .text()
+ .trim()
+ == format!("Contents of {}", filename)
+ );
+}
diff --git a/tests/serve_request.rs b/tests/serve_request.rs
index b23f7e2..f376469 100644
--- a/tests/serve_request.rs
+++ b/tests/serve_request.rs
@@ -33,6 +33,9 @@ fn serves_requests_with_no_options(tmpdir: TempDir) -> Result<(), Error> {
for &file in FILES {
assert!(parsed.find(|x: &Node| x.text() == file).next().is_some());
}
+ for &dir in DIRECTORIES {
+ assert!(parsed.find(|x: &Node| x.text() == dir).next().is_some());
+ }
child.kill()?;