├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── build.yml │ └── release.yml ├── .gitignore ├── .gitmodules ├── .vscode └── settings.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── assets ├── add.png ├── diplo.png ├── diplo_cover.png ├── diplo_cover.svg ├── diplo_small.svg ├── exec.png ├── import_map.png ├── init.png ├── run_start.png ├── run_start_watch.png └── update.png ├── docs ├── README.md ├── config.toml └── content │ ├── _index.md │ ├── authors │ ├── _index.md │ └── tricked.md │ ├── docs │ ├── _index.md │ ├── getting-started │ │ ├── _index.md │ │ ├── features.md │ │ ├── installing.md │ │ ├── introduction.md │ │ └── quick-start.md │ └── help │ │ ├── _index.md │ │ └── faq.md │ └── privacy-policy │ └── _index.md ├── installer ├── .cargo-ok ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── src │ ├── github_struct.rs │ ├── lib.rs │ └── utils.rs └── wrangler.toml ├── netlify.toml └── src ├── app.rs ├── bin └── diplo.rs ├── commands ├── add.rs ├── cache.rs ├── exec.rs ├── init.rs ├── install.rs ├── mod.rs ├── run.rs └── update.rs ├── lib.rs ├── load_config.rs ├── update_deno.rs ├── utils ├── load_env.rs ├── mod.rs └── run_utils.rs └── watcher.rs /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | #### Issue description 11 | 12 | 13 | 14 | #### Steps to reproduce the issue 15 | 16 | 1. 17 | 2. 18 | 3. 19 | 20 | 21 | #### What's the expected result? 22 | 23 | - 24 | 25 | 26 | #### What's the actual result? 27 | 28 | - 29 | 30 | 31 | #### Additional details / screenshot 32 | 33 | - ![Screenshot]() 34 | - 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | 12 | A clear and concise description of what the problem is e.g. I'd like to be able to do this [...] 13 | 14 | **Describe the solution you'd like** 15 | 16 | A clear and concise description of what you want to happen. 17 | 18 | **Describe alternatives you've considered** 19 | 20 | A clear and concise description of any alternative solutions or features you've considered. 21 | 22 | **Would you be willing to contribute a test device?** 23 | 24 | If the request relates to a specific u-blox device that is not currently supported, would you be 25 | willing to contribute a device to the project for testing purposes? 26 | 27 | **Additional context** 28 | 29 | Add any other context about the feature request here. 30 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | pull_request: 4 | push: 5 | branches: 6 | - main 7 | #schedule: 8 | # - cron: '00 01 * * *' 9 | 10 | jobs: 11 | check: 12 | name: Check 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout sources 16 | uses: actions/checkout@v2 17 | 18 | - name: Install stable toolchain 19 | uses: actions-rs/toolchain@v1 20 | with: 21 | profile: minimal 22 | toolchain: stable 23 | override: true 24 | 25 | - uses: Swatinem/rust-cache@v1 26 | 27 | - name: Run cargo check 28 | uses: actions-rs/cargo@v1 29 | with: 30 | command: check 31 | 32 | test: 33 | name: Test Suite 34 | strategy: 35 | matrix: 36 | os: [ubuntu-latest, macos-latest, windows-latest] 37 | rust: [stable] 38 | runs-on: ${{ matrix.os }} 39 | steps: 40 | - name: Checkout sources 41 | uses: actions/checkout@v2 42 | 43 | - name: Install stable toolchain 44 | uses: actions-rs/toolchain@v1 45 | with: 46 | profile: minimal 47 | toolchain: ${{ matrix.rust }} 48 | override: true 49 | 50 | - uses: Swatinem/rust-cache@v1 51 | 52 | - name: Run cargo test 53 | uses: actions-rs/cargo@v1 54 | with: 55 | command: test 56 | 57 | lints: 58 | name: Lints 59 | runs-on: ubuntu-latest 60 | steps: 61 | - name: Checkout sources 62 | uses: actions/checkout@v2 63 | with: 64 | submodules: true 65 | 66 | - name: Install stable toolchain 67 | uses: actions-rs/toolchain@v1 68 | with: 69 | profile: minimal 70 | toolchain: stable 71 | override: true 72 | components: rustfmt, clippy 73 | 74 | - uses: Swatinem/rust-cache@v1 75 | 76 | - name: Run cargo fmt 77 | uses: actions-rs/cargo@v1 78 | with: 79 | command: fmt 80 | args: --all -- --check 81 | 82 | - name: Run cargo clippy 83 | uses: actions-rs/cargo@v1 84 | with: 85 | command: clippy 86 | args: -- -D warnings 87 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | on: 3 | # schedule: 4 | # - cron: '0 0 * * *' # midnight UTC 5 | 6 | push: 7 | tags: 8 | - 'v[0-9]+.[0-9]+.[0-9]+' 9 | ## - release 10 | 11 | env: 12 | BIN_NAME: diplo 13 | PROJECT_NAME: diplo 14 | REPO_NAME: Tricked-dev/diplo 15 | 16 | jobs: 17 | dist: 18 | name: Dist 19 | runs-on: ${{ matrix.os }} 20 | strategy: 21 | fail-fast: false # don't fail other jobs if one fails 22 | matrix: 23 | build: [x86_64-linux, aarch64-linux, x86_64-macos, x86_64-windows] #, x86_64-win-gnu, win32-msvc 24 | include: 25 | - build: x86_64-linux 26 | os: ubuntu-20.04 27 | rust: stable 28 | target: x86_64-unknown-linux-gnu 29 | cross: false 30 | - build: aarch64-linux 31 | os: ubuntu-20.04 32 | rust: stable 33 | target: aarch64-unknown-linux-gnu 34 | cross: true 35 | - build: x86_64-macos 36 | os: macos-latest 37 | rust: stable 38 | target: x86_64-apple-darwin 39 | cross: false 40 | - build: x86_64-windows 41 | os: windows-2019 42 | rust: stable 43 | target: x86_64-pc-windows-msvc 44 | cross: false 45 | # - build: aarch64-macos 46 | # os: macos-latest 47 | # rust: stable 48 | # target: aarch64-apple-darwin 49 | # - build: x86_64-win-gnu 50 | # os: windows-2019 51 | # rust: stable-x86_64-gnu 52 | # target: x86_64-pc-windows-gnu 53 | # - build: win32-msvc 54 | # os: windows-2019 55 | # rust: stable 56 | # target: i686-pc-windows-msvc 57 | 58 | steps: 59 | - name: Checkout sources 60 | uses: actions/checkout@v2 61 | with: 62 | submodules: true 63 | 64 | - name: Install ${{ matrix.rust }} toolchain 65 | uses: actions-rs/toolchain@v1 66 | with: 67 | profile: minimal 68 | toolchain: ${{ matrix.rust }} 69 | target: ${{ matrix.target }} 70 | override: true 71 | 72 | - name: Run cargo test 73 | uses: actions-rs/cargo@v1 74 | with: 75 | use-cross: ${{ matrix.cross }} 76 | command: test 77 | args: --release --locked --target ${{ matrix.target }} 78 | 79 | - name: Build release binary 80 | uses: actions-rs/cargo@v1 81 | with: 82 | use-cross: ${{ matrix.cross }} 83 | command: build 84 | args: --release --locked --target ${{ matrix.target }} 85 | 86 | - name: Strip release binary (linux and macos) 87 | if: matrix.build == 'x86_64-linux' || matrix.build == 'x86_64-macos' 88 | run: strip "target/${{ matrix.target }}/release/$BIN_NAME" 89 | 90 | - name: Strip release binary (arm) 91 | if: matrix.build == 'aarch64-linux' 92 | run: | 93 | docker run --rm -v \ 94 | "$PWD/target:/target:Z" \ 95 | rustembedded/cross:${{ matrix.target }} \ 96 | aarch64-linux-gnu-strip \ 97 | /target/${{ matrix.target }}/release/$BIN_NAME 98 | 99 | - name: Install Wix 100 | if: matrix.build == 'x86_64-windows' 101 | uses: actions/checkout@v2 102 | with: 103 | repository: fbarresi/wix 104 | path: wix 105 | - name: Setup .NET Core 106 | if: matrix.build == 'x86_64-windows' 107 | uses: actions/setup-dotnet@v1 108 | with: 109 | dotnet-version: 3.1.101 110 | - name: install cargo wix 111 | if: matrix.build == 'x86_64-windows' 112 | run: cargo install cargo-wix 113 | - name: run wix command 114 | if: matrix.build == 'x86_64-windows' 115 | run: cargo wix init 116 | - name: run wix command 117 | if: matrix.build == 'x86_64-windows' 118 | run: cargo wix 119 | 120 | - name: make dist 121 | run: mkdir dist 122 | 123 | - name: Run install cargo-deb 124 | if: matrix.build == 'x86_64-linux' 125 | uses: actions-rs/cargo@v1 126 | with: 127 | command: install 128 | args: cargo-deb 129 | 130 | - name: Create deb file 131 | if: matrix.build == 'x86_64-linux' 132 | run: cargo deb 133 | 134 | - name: cp deb file 135 | if: matrix.build == 'x86_64-linux' 136 | run: cp target/debian/diplo_* dist/ 137 | 138 | - name: Run install pkgbuild 139 | if: matrix.build == 'x86_64-linux' 140 | uses: actions-rs/cargo@v1 141 | with: 142 | command: install 143 | args: cargo-pkgbuild 144 | - name: Make pkgbuild 145 | if: matrix.build == 'x86_64-linux' 146 | run: cargo pkgbuild 147 | - name: cp pkgbuild 148 | if: matrix.build == 'x86_64-linux' 149 | run: mv PKGBUILD dist/ 150 | 151 | - name: Build archive 152 | shell: bash 153 | run: | 154 | 155 | if [ "${{ matrix.os }}" = "windows-2019" ]; then 156 | ls target 157 | ls target/${{ matrix.target }} 158 | 159 | 160 | cp target/wix/diplo* dist/ 161 | cp "target/${{ matrix.target }}/release/$BIN_NAME.exe" "dist/" 162 | else 163 | cp "target/${{ matrix.target }}/release/$BIN_NAME" "dist/" 164 | fi 165 | 166 | - uses: actions/upload-artifact@v2.2.4 167 | with: 168 | name: diplo-${{ matrix.build }} 169 | path: dist 170 | 171 | publish: 172 | name: Publish 173 | needs: [dist] 174 | runs-on: ubuntu-latest 175 | steps: 176 | - name: Checkout sources 177 | uses: actions/checkout@v2 178 | with: 179 | submodules: false 180 | 181 | - uses: actions/download-artifact@v2 182 | 183 | # with: 184 | # path: dist 185 | # - run: ls -al ./dist 186 | - run: ls -al diplo-* 187 | 188 | - name: Calculate tag name 189 | run: | 190 | name=dev 191 | if [[ $GITHUB_REF == refs/tags/v* ]]; then 192 | name=${GITHUB_REF:10} 193 | fi 194 | echo ::set-output name=val::$name 195 | echo TAG=$name >> $GITHUB_ENV 196 | id: tagname 197 | 198 | - name: Build archive 199 | shell: bash 200 | run: | 201 | set -ex 202 | 203 | rm -rf tmp 204 | mkdir tmp 205 | mkdir dist 206 | 207 | 208 | for dir in diplo-* ; do 209 | platform=${dir#"diplo-"} 210 | if [[ $platform =~ "windows" ]]; then 211 | exe=".exe" 212 | fi 213 | ls 214 | pkgname=$PROJECT_NAME-$platform 215 | mkdir tmp/$pkgname 216 | # cp LICENSE README.md tmp/$pkgname 217 | 218 | [ -f diplo-$platform/diplo-* ] && mv diplo-$platform/diplo-* tmp/$pkgname/ 219 | [ -f diplo-$platform/diplo_* ] && mv diplo-$platform/diplo_* tmp/$pkgname/ 220 | [ -f diplo-$platform/diplo-*.msi ] && mv diplo-$platform/*.msi tmp/$pkgname/ 221 | [ -f diplo-$platform/PKGBUILD ] && mv diplo-$platform/PKGBUILD tmp/$pkgname/ 222 | 223 | mv diplo-$platform/$BIN_NAME$exe tmp/$pkgname 224 | chmod +x tmp/$pkgname/$BIN_NAME$exe 225 | 226 | if [ "$exe" = "" ]; then 227 | 228 | tar cJf dist/$pkgname.tar.xz -C tmp $pkgname 229 | else 230 | (cd tmp && 7z a -r ../dist/$pkgname.zip $pkgname) 231 | fi 232 | done 233 | 234 | - name: Upload binaries to release 235 | uses: svenstaro/upload-release-action@v2 236 | with: 237 | repo_token: ${{ secrets.GITHUB_TOKEN }} 238 | file: dist/* 239 | file_glob: true 240 | tag: ${{ steps.tagname.outputs.val }} 241 | overwrite: true 242 | 243 | - name: Extract version 244 | id: extract-version 245 | run: | 246 | printf "::set-output name=%s::%s\n" tag-name "${GITHUB_REF#refs/tags/}" 247 | 248 | # publish-cargo: 249 | # name: Publishing to Cargo 250 | # runs-on: ubuntu-latest 251 | # steps: 252 | # - uses: actions/checkout@master 253 | # - uses: actions-rs/toolchain@v1 254 | # with: 255 | # toolchain: stable 256 | # override: true 257 | # - run: | 258 | # sudo apt-get update 259 | # sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev 260 | # - uses: actions-rs/cargo@v1 261 | # with: 262 | # command: publish 263 | # args: --token ${{ secrets.CARGO_API_KEY }} --allow-dirty 264 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | .env 3 | .diplo/* 4 | diplo.json 5 | diplo.toml 6 | /target 7 | **/*.rs.bk 8 | wasm-pack.log 9 | build/ 10 | mod.ts 11 | docs/public/**/* 12 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "docs/themes/adidoks"] 2 | path = docs/themes/adidoks 3 | url = https://github.com/aaranxu/adidoks.git 4 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "deno.enable": true, 3 | "deno.lint": true, 4 | "deno.importMap": "./.diplo/import_map.json" 5 | } 6 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | tricked@duck.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, please first discuss the change you wish to make via issue, 4 | email, or any other method with the owners of this repository before making a change. 5 | 6 | Please note we have a code of conduct, please follow it in all your interactions with the project. 7 | 8 | ## Pull Request Process 9 | 10 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a 11 | build. 12 | 2. Update the README.md with details of changes to the interface, this includes new environment 13 | variables, exposed ports, useful file locations and container parameters. 14 | 3. Increase the version numbers in any examples files and the README.md to the new version that this 15 | Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). 16 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aho-corasick" 7 | version = "0.7.18" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "anyhow" 16 | version = "1.0.45" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "ee10e43ae4a853c0a3591d4e2ada1719e553be18199d9da9d4a83f5927c2f5c7" 19 | 20 | [[package]] 21 | name = "atty" 22 | version = "0.2.14" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 25 | dependencies = [ 26 | "hermit-abi", 27 | "libc", 28 | "winapi 0.3.9", 29 | ] 30 | 31 | [[package]] 32 | name = "autocfg" 33 | version = "1.0.1" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 36 | 37 | [[package]] 38 | name = "bitflags" 39 | version = "1.3.2" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 42 | 43 | [[package]] 44 | name = "bstr" 45 | version = "0.2.17" 46 | source = "registry+https://github.com/rust-lang/crates.io-index" 47 | checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" 48 | dependencies = [ 49 | "memchr", 50 | ] 51 | 52 | [[package]] 53 | name = "bytes" 54 | version = "1.1.0" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" 57 | 58 | [[package]] 59 | name = "cc" 60 | version = "1.0.71" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd" 63 | 64 | [[package]] 65 | name = "cfg-if" 66 | version = "0.1.10" 67 | source = "registry+https://github.com/rust-lang/crates.io-index" 68 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 69 | 70 | [[package]] 71 | name = "cfg-if" 72 | version = "1.0.0" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 75 | 76 | [[package]] 77 | name = "clap" 78 | version = "3.0.0-rc.8" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | checksum = "484f17839417b695a6f4a75c20e49820ba0a1d00aa41ebd8ba0e5dfe0fbc3b74" 81 | dependencies = [ 82 | "atty", 83 | "bitflags", 84 | "indexmap", 85 | "lazy_static", 86 | "os_str_bytes", 87 | "strsim", 88 | "termcolor", 89 | "textwrap", 90 | ] 91 | 92 | [[package]] 93 | name = "clearscreen" 94 | version = "1.0.7" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "95325739f550f23c4695b87632378f3738c2e95095531f45dab316678e5a4310" 97 | dependencies = [ 98 | "nix 0.22.0", 99 | "terminfo", 100 | "thiserror", 101 | "which", 102 | "winapi 0.3.9", 103 | ] 104 | 105 | [[package]] 106 | name = "colored" 107 | version = "2.0.0" 108 | source = "registry+https://github.com/rust-lang/crates.io-index" 109 | checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" 110 | dependencies = [ 111 | "atty", 112 | "lazy_static", 113 | "winapi 0.3.9", 114 | ] 115 | 116 | [[package]] 117 | name = "combine" 118 | version = "4.6.1" 119 | source = "registry+https://github.com/rust-lang/crates.io-index" 120 | checksum = "a909e4d93292cd8e9c42e189f61681eff9d67b6541f96b8a1a737f23737bd001" 121 | dependencies = [ 122 | "bytes", 123 | "memchr", 124 | ] 125 | 126 | [[package]] 127 | name = "command-group" 128 | version = "1.0.8" 129 | source = "registry+https://github.com/rust-lang/crates.io-index" 130 | checksum = "f7a8a86f409b4a59df3a3e4bee2de0b83f1755fdd2a25e3a9684c396fc4bed2c" 131 | dependencies = [ 132 | "nix 0.22.0", 133 | "winapi 0.3.9", 134 | ] 135 | 136 | [[package]] 137 | name = "core-foundation" 138 | version = "0.9.2" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" 141 | dependencies = [ 142 | "core-foundation-sys", 143 | "libc", 144 | ] 145 | 146 | [[package]] 147 | name = "core-foundation-sys" 148 | version = "0.8.3" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 151 | 152 | [[package]] 153 | name = "ctrlc" 154 | version = "3.2.1" 155 | source = "registry+https://github.com/rust-lang/crates.io-index" 156 | checksum = "a19c6cedffdc8c03a3346d723eb20bd85a13362bb96dc2ac000842c6381ec7bf" 157 | dependencies = [ 158 | "nix 0.23.0", 159 | "winapi 0.3.9", 160 | ] 161 | 162 | [[package]] 163 | name = "darling" 164 | version = "0.12.4" 165 | source = "registry+https://github.com/rust-lang/crates.io-index" 166 | checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c" 167 | dependencies = [ 168 | "darling_core", 169 | "darling_macro", 170 | ] 171 | 172 | [[package]] 173 | name = "darling_core" 174 | version = "0.12.4" 175 | source = "registry+https://github.com/rust-lang/crates.io-index" 176 | checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36" 177 | dependencies = [ 178 | "fnv", 179 | "ident_case", 180 | "proc-macro2", 181 | "quote", 182 | "strsim", 183 | "syn", 184 | ] 185 | 186 | [[package]] 187 | name = "darling_macro" 188 | version = "0.12.4" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a" 191 | dependencies = [ 192 | "darling_core", 193 | "quote", 194 | "syn", 195 | ] 196 | 197 | [[package]] 198 | name = "derive_builder" 199 | version = "0.10.2" 200 | source = "registry+https://github.com/rust-lang/crates.io-index" 201 | checksum = "d13202debe11181040ae9063d739fa32cfcaaebe2275fe387703460ae2365b30" 202 | dependencies = [ 203 | "derive_builder_macro", 204 | ] 205 | 206 | [[package]] 207 | name = "derive_builder_core" 208 | version = "0.10.2" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "66e616858f6187ed828df7c64a6d71720d83767a7f19740b2d1b6fe6327b36e5" 211 | dependencies = [ 212 | "darling", 213 | "proc-macro2", 214 | "quote", 215 | "syn", 216 | ] 217 | 218 | [[package]] 219 | name = "derive_builder_macro" 220 | version = "0.10.2" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | checksum = "58a94ace95092c5acb1e97a7e846b310cfbd499652f72297da7493f618a98d73" 223 | dependencies = [ 224 | "derive_builder_core", 225 | "syn", 226 | ] 227 | 228 | [[package]] 229 | name = "diplo" 230 | version = "1.0.0" 231 | dependencies = [ 232 | "anyhow", 233 | "clap", 234 | "colored", 235 | "ctrlc", 236 | "dotenv", 237 | "humantime", 238 | "hyper", 239 | "hyper-tls", 240 | "lazy_static", 241 | "libc", 242 | "once_cell", 243 | "openssl", 244 | "regex", 245 | "rprompt", 246 | "serde", 247 | "serde_json", 248 | "tokio", 249 | "toml", 250 | "toml_edit", 251 | "watchexec", 252 | "winapi 0.3.9", 253 | ] 254 | 255 | [[package]] 256 | name = "dirs" 257 | version = "2.0.2" 258 | source = "registry+https://github.com/rust-lang/crates.io-index" 259 | checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" 260 | dependencies = [ 261 | "cfg-if 0.1.10", 262 | "dirs-sys", 263 | ] 264 | 265 | [[package]] 266 | name = "dirs-sys" 267 | version = "0.3.6" 268 | source = "registry+https://github.com/rust-lang/crates.io-index" 269 | checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" 270 | dependencies = [ 271 | "libc", 272 | "redox_users", 273 | "winapi 0.3.9", 274 | ] 275 | 276 | [[package]] 277 | name = "dotenv" 278 | version = "0.15.0" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" 281 | 282 | [[package]] 283 | name = "either" 284 | version = "1.6.1" 285 | source = "registry+https://github.com/rust-lang/crates.io-index" 286 | checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" 287 | 288 | [[package]] 289 | name = "filetime" 290 | version = "0.2.15" 291 | source = "registry+https://github.com/rust-lang/crates.io-index" 292 | checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" 293 | dependencies = [ 294 | "cfg-if 1.0.0", 295 | "libc", 296 | "redox_syscall", 297 | "winapi 0.3.9", 298 | ] 299 | 300 | [[package]] 301 | name = "fnv" 302 | version = "1.0.7" 303 | source = "registry+https://github.com/rust-lang/crates.io-index" 304 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 305 | 306 | [[package]] 307 | name = "foreign-types" 308 | version = "0.3.2" 309 | source = "registry+https://github.com/rust-lang/crates.io-index" 310 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 311 | dependencies = [ 312 | "foreign-types-shared", 313 | ] 314 | 315 | [[package]] 316 | name = "foreign-types-shared" 317 | version = "0.1.1" 318 | source = "registry+https://github.com/rust-lang/crates.io-index" 319 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 320 | 321 | [[package]] 322 | name = "fsevent" 323 | version = "0.4.0" 324 | source = "registry+https://github.com/rust-lang/crates.io-index" 325 | checksum = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6" 326 | dependencies = [ 327 | "bitflags", 328 | "fsevent-sys", 329 | ] 330 | 331 | [[package]] 332 | name = "fsevent-sys" 333 | version = "2.0.1" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0" 336 | dependencies = [ 337 | "libc", 338 | ] 339 | 340 | [[package]] 341 | name = "fuchsia-zircon" 342 | version = "0.3.3" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 345 | dependencies = [ 346 | "bitflags", 347 | "fuchsia-zircon-sys", 348 | ] 349 | 350 | [[package]] 351 | name = "fuchsia-zircon-sys" 352 | version = "0.3.3" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 355 | 356 | [[package]] 357 | name = "futures-channel" 358 | version = "0.3.17" 359 | source = "registry+https://github.com/rust-lang/crates.io-index" 360 | checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" 361 | dependencies = [ 362 | "futures-core", 363 | ] 364 | 365 | [[package]] 366 | name = "futures-core" 367 | version = "0.3.17" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" 370 | 371 | [[package]] 372 | name = "futures-sink" 373 | version = "0.3.17" 374 | source = "registry+https://github.com/rust-lang/crates.io-index" 375 | checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" 376 | 377 | [[package]] 378 | name = "futures-task" 379 | version = "0.3.17" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" 382 | 383 | [[package]] 384 | name = "futures-util" 385 | version = "0.3.17" 386 | source = "registry+https://github.com/rust-lang/crates.io-index" 387 | checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" 388 | dependencies = [ 389 | "autocfg", 390 | "futures-core", 391 | "futures-task", 392 | "pin-project-lite", 393 | "pin-utils", 394 | ] 395 | 396 | [[package]] 397 | name = "getrandom" 398 | version = "0.1.16" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" 401 | dependencies = [ 402 | "cfg-if 1.0.0", 403 | "libc", 404 | "wasi 0.9.0+wasi-snapshot-preview1", 405 | ] 406 | 407 | [[package]] 408 | name = "getrandom" 409 | version = "0.2.3" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" 412 | dependencies = [ 413 | "cfg-if 1.0.0", 414 | "libc", 415 | "wasi 0.10.2+wasi-snapshot-preview1", 416 | ] 417 | 418 | [[package]] 419 | name = "glob" 420 | version = "0.3.0" 421 | source = "registry+https://github.com/rust-lang/crates.io-index" 422 | checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" 423 | 424 | [[package]] 425 | name = "globset" 426 | version = "0.4.6" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | checksum = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a" 429 | dependencies = [ 430 | "aho-corasick", 431 | "bstr", 432 | "fnv", 433 | "log", 434 | "regex", 435 | ] 436 | 437 | [[package]] 438 | name = "h2" 439 | version = "0.3.6" 440 | source = "registry+https://github.com/rust-lang/crates.io-index" 441 | checksum = "6c06815895acec637cd6ed6e9662c935b866d20a106f8361892893a7d9234964" 442 | dependencies = [ 443 | "bytes", 444 | "fnv", 445 | "futures-core", 446 | "futures-sink", 447 | "futures-util", 448 | "http", 449 | "indexmap", 450 | "slab", 451 | "tokio", 452 | "tokio-util", 453 | "tracing", 454 | ] 455 | 456 | [[package]] 457 | name = "hashbrown" 458 | version = "0.11.2" 459 | source = "registry+https://github.com/rust-lang/crates.io-index" 460 | checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" 461 | 462 | [[package]] 463 | name = "hermit-abi" 464 | version = "0.1.19" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 467 | dependencies = [ 468 | "libc", 469 | ] 470 | 471 | [[package]] 472 | name = "http" 473 | version = "0.2.5" 474 | source = "registry+https://github.com/rust-lang/crates.io-index" 475 | checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" 476 | dependencies = [ 477 | "bytes", 478 | "fnv", 479 | "itoa", 480 | ] 481 | 482 | [[package]] 483 | name = "http-body" 484 | version = "0.4.3" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" 487 | dependencies = [ 488 | "bytes", 489 | "http", 490 | "pin-project-lite", 491 | ] 492 | 493 | [[package]] 494 | name = "httparse" 495 | version = "1.5.1" 496 | source = "registry+https://github.com/rust-lang/crates.io-index" 497 | checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" 498 | 499 | [[package]] 500 | name = "httpdate" 501 | version = "1.0.1" 502 | source = "registry+https://github.com/rust-lang/crates.io-index" 503 | checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" 504 | 505 | [[package]] 506 | name = "humantime" 507 | version = "2.1.0" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 510 | 511 | [[package]] 512 | name = "hyper" 513 | version = "0.14.14" 514 | source = "registry+https://github.com/rust-lang/crates.io-index" 515 | checksum = "2b91bb1f221b6ea1f1e4371216b70f40748774c2fb5971b450c07773fb92d26b" 516 | dependencies = [ 517 | "bytes", 518 | "futures-channel", 519 | "futures-core", 520 | "futures-util", 521 | "h2", 522 | "http", 523 | "http-body", 524 | "httparse", 525 | "httpdate", 526 | "itoa", 527 | "pin-project-lite", 528 | "socket2", 529 | "tokio", 530 | "tower-service", 531 | "tracing", 532 | "want", 533 | ] 534 | 535 | [[package]] 536 | name = "hyper-tls" 537 | version = "0.5.0" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 540 | dependencies = [ 541 | "bytes", 542 | "hyper", 543 | "native-tls", 544 | "tokio", 545 | "tokio-native-tls", 546 | ] 547 | 548 | [[package]] 549 | name = "ident_case" 550 | version = "1.0.1" 551 | source = "registry+https://github.com/rust-lang/crates.io-index" 552 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 553 | 554 | [[package]] 555 | name = "indexmap" 556 | version = "1.7.0" 557 | source = "registry+https://github.com/rust-lang/crates.io-index" 558 | checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" 559 | dependencies = [ 560 | "autocfg", 561 | "hashbrown", 562 | ] 563 | 564 | [[package]] 565 | name = "inotify" 566 | version = "0.7.1" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "4816c66d2c8ae673df83366c18341538f234a26d65a9ecea5c348b453ac1d02f" 569 | dependencies = [ 570 | "bitflags", 571 | "inotify-sys", 572 | "libc", 573 | ] 574 | 575 | [[package]] 576 | name = "inotify-sys" 577 | version = "0.1.5" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" 580 | dependencies = [ 581 | "libc", 582 | ] 583 | 584 | [[package]] 585 | name = "iovec" 586 | version = "0.1.4" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" 589 | dependencies = [ 590 | "libc", 591 | ] 592 | 593 | [[package]] 594 | name = "itertools" 595 | version = "0.10.1" 596 | source = "registry+https://github.com/rust-lang/crates.io-index" 597 | checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" 598 | dependencies = [ 599 | "either", 600 | ] 601 | 602 | [[package]] 603 | name = "itoa" 604 | version = "0.4.8" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" 607 | 608 | [[package]] 609 | name = "kernel32-sys" 610 | version = "0.2.2" 611 | source = "registry+https://github.com/rust-lang/crates.io-index" 612 | checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 613 | dependencies = [ 614 | "winapi 0.2.8", 615 | "winapi-build", 616 | ] 617 | 618 | [[package]] 619 | name = "kstring" 620 | version = "1.0.5" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | checksum = "6e8d7e992938cc9078c8db5fd5bdc400e7f9da6efa384c280902a8922b676221" 623 | dependencies = [ 624 | "serde", 625 | ] 626 | 627 | [[package]] 628 | name = "lazy_static" 629 | version = "1.4.0" 630 | source = "registry+https://github.com/rust-lang/crates.io-index" 631 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 632 | 633 | [[package]] 634 | name = "lazycell" 635 | version = "1.3.0" 636 | source = "registry+https://github.com/rust-lang/crates.io-index" 637 | checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" 638 | 639 | [[package]] 640 | name = "libc" 641 | version = "0.2.107" 642 | source = "registry+https://github.com/rust-lang/crates.io-index" 643 | checksum = "fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219" 644 | 645 | [[package]] 646 | name = "log" 647 | version = "0.4.14" 648 | source = "registry+https://github.com/rust-lang/crates.io-index" 649 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" 650 | dependencies = [ 651 | "cfg-if 1.0.0", 652 | ] 653 | 654 | [[package]] 655 | name = "memchr" 656 | version = "2.4.1" 657 | source = "registry+https://github.com/rust-lang/crates.io-index" 658 | checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" 659 | 660 | [[package]] 661 | name = "memoffset" 662 | version = "0.6.4" 663 | source = "registry+https://github.com/rust-lang/crates.io-index" 664 | checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" 665 | dependencies = [ 666 | "autocfg", 667 | ] 668 | 669 | [[package]] 670 | name = "mio" 671 | version = "0.6.23" 672 | source = "registry+https://github.com/rust-lang/crates.io-index" 673 | checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" 674 | dependencies = [ 675 | "cfg-if 0.1.10", 676 | "fuchsia-zircon", 677 | "fuchsia-zircon-sys", 678 | "iovec", 679 | "kernel32-sys", 680 | "libc", 681 | "log", 682 | "miow 0.2.2", 683 | "net2", 684 | "slab", 685 | "winapi 0.2.8", 686 | ] 687 | 688 | [[package]] 689 | name = "mio" 690 | version = "0.7.14" 691 | source = "registry+https://github.com/rust-lang/crates.io-index" 692 | checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" 693 | dependencies = [ 694 | "libc", 695 | "log", 696 | "miow 0.3.7", 697 | "ntapi", 698 | "winapi 0.3.9", 699 | ] 700 | 701 | [[package]] 702 | name = "mio-extras" 703 | version = "2.0.6" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" 706 | dependencies = [ 707 | "lazycell", 708 | "log", 709 | "mio 0.6.23", 710 | "slab", 711 | ] 712 | 713 | [[package]] 714 | name = "miow" 715 | version = "0.2.2" 716 | source = "registry+https://github.com/rust-lang/crates.io-index" 717 | checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" 718 | dependencies = [ 719 | "kernel32-sys", 720 | "net2", 721 | "winapi 0.2.8", 722 | "ws2_32-sys", 723 | ] 724 | 725 | [[package]] 726 | name = "miow" 727 | version = "0.3.7" 728 | source = "registry+https://github.com/rust-lang/crates.io-index" 729 | checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" 730 | dependencies = [ 731 | "winapi 0.3.9", 732 | ] 733 | 734 | [[package]] 735 | name = "native-tls" 736 | version = "0.2.8" 737 | source = "registry+https://github.com/rust-lang/crates.io-index" 738 | checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" 739 | dependencies = [ 740 | "lazy_static", 741 | "libc", 742 | "log", 743 | "openssl", 744 | "openssl-probe", 745 | "openssl-sys", 746 | "schannel", 747 | "security-framework", 748 | "security-framework-sys", 749 | "tempfile", 750 | ] 751 | 752 | [[package]] 753 | name = "net2" 754 | version = "0.2.37" 755 | source = "registry+https://github.com/rust-lang/crates.io-index" 756 | checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" 757 | dependencies = [ 758 | "cfg-if 0.1.10", 759 | "libc", 760 | "winapi 0.3.9", 761 | ] 762 | 763 | [[package]] 764 | name = "nix" 765 | version = "0.22.0" 766 | source = "registry+https://github.com/rust-lang/crates.io-index" 767 | checksum = "cf1e25ee6b412c2a1e3fcb6a4499a5c1bfe7f43e014bdce9a6b6666e5aa2d187" 768 | dependencies = [ 769 | "bitflags", 770 | "cc", 771 | "cfg-if 1.0.0", 772 | "libc", 773 | "memoffset", 774 | ] 775 | 776 | [[package]] 777 | name = "nix" 778 | version = "0.23.0" 779 | source = "registry+https://github.com/rust-lang/crates.io-index" 780 | checksum = "f305c2c2e4c39a82f7bf0bf65fb557f9070ce06781d4f2454295cc34b1c43188" 781 | dependencies = [ 782 | "bitflags", 783 | "cc", 784 | "cfg-if 1.0.0", 785 | "libc", 786 | "memoffset", 787 | ] 788 | 789 | [[package]] 790 | name = "nom" 791 | version = "5.1.2" 792 | source = "registry+https://github.com/rust-lang/crates.io-index" 793 | checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" 794 | dependencies = [ 795 | "memchr", 796 | "version_check", 797 | ] 798 | 799 | [[package]] 800 | name = "notify" 801 | version = "4.0.17" 802 | source = "registry+https://github.com/rust-lang/crates.io-index" 803 | checksum = "ae03c8c853dba7bfd23e571ff0cff7bc9dceb40a4cd684cd1681824183f45257" 804 | dependencies = [ 805 | "bitflags", 806 | "filetime", 807 | "fsevent", 808 | "fsevent-sys", 809 | "inotify", 810 | "libc", 811 | "mio 0.6.23", 812 | "mio-extras", 813 | "walkdir", 814 | "winapi 0.3.9", 815 | ] 816 | 817 | [[package]] 818 | name = "ntapi" 819 | version = "0.3.6" 820 | source = "registry+https://github.com/rust-lang/crates.io-index" 821 | checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" 822 | dependencies = [ 823 | "winapi 0.3.9", 824 | ] 825 | 826 | [[package]] 827 | name = "num_cpus" 828 | version = "1.13.0" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 831 | dependencies = [ 832 | "hermit-abi", 833 | "libc", 834 | ] 835 | 836 | [[package]] 837 | name = "once_cell" 838 | version = "1.8.0" 839 | source = "registry+https://github.com/rust-lang/crates.io-index" 840 | checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" 841 | 842 | [[package]] 843 | name = "openssl" 844 | version = "0.10.38" 845 | source = "registry+https://github.com/rust-lang/crates.io-index" 846 | checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" 847 | dependencies = [ 848 | "bitflags", 849 | "cfg-if 1.0.0", 850 | "foreign-types", 851 | "libc", 852 | "once_cell", 853 | "openssl-sys", 854 | ] 855 | 856 | [[package]] 857 | name = "openssl-probe" 858 | version = "0.1.4" 859 | source = "registry+https://github.com/rust-lang/crates.io-index" 860 | checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" 861 | 862 | [[package]] 863 | name = "openssl-src" 864 | version = "300.0.2+3.0.0" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "14a760a11390b1a5daf72074d4f6ff1a6e772534ae191f999f57e9ee8146d1fb" 867 | dependencies = [ 868 | "cc", 869 | ] 870 | 871 | [[package]] 872 | name = "openssl-sys" 873 | version = "0.9.70" 874 | source = "registry+https://github.com/rust-lang/crates.io-index" 875 | checksum = "c6517987b3f8226b5da3661dad65ff7f300cc59fb5ea8333ca191fc65fde3edf" 876 | dependencies = [ 877 | "autocfg", 878 | "cc", 879 | "libc", 880 | "openssl-src", 881 | "pkg-config", 882 | "vcpkg", 883 | ] 884 | 885 | [[package]] 886 | name = "os_str_bytes" 887 | version = "6.0.0" 888 | source = "registry+https://github.com/rust-lang/crates.io-index" 889 | checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" 890 | dependencies = [ 891 | "memchr", 892 | ] 893 | 894 | [[package]] 895 | name = "phf" 896 | version = "0.8.0" 897 | source = "registry+https://github.com/rust-lang/crates.io-index" 898 | checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" 899 | dependencies = [ 900 | "phf_shared", 901 | ] 902 | 903 | [[package]] 904 | name = "phf_codegen" 905 | version = "0.8.0" 906 | source = "registry+https://github.com/rust-lang/crates.io-index" 907 | checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" 908 | dependencies = [ 909 | "phf_generator", 910 | "phf_shared", 911 | ] 912 | 913 | [[package]] 914 | name = "phf_generator" 915 | version = "0.8.0" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" 918 | dependencies = [ 919 | "phf_shared", 920 | "rand 0.7.3", 921 | ] 922 | 923 | [[package]] 924 | name = "phf_shared" 925 | version = "0.8.0" 926 | source = "registry+https://github.com/rust-lang/crates.io-index" 927 | checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" 928 | dependencies = [ 929 | "siphasher", 930 | ] 931 | 932 | [[package]] 933 | name = "pin-project-lite" 934 | version = "0.2.7" 935 | source = "registry+https://github.com/rust-lang/crates.io-index" 936 | checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" 937 | 938 | [[package]] 939 | name = "pin-utils" 940 | version = "0.1.0" 941 | source = "registry+https://github.com/rust-lang/crates.io-index" 942 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 943 | 944 | [[package]] 945 | name = "pkg-config" 946 | version = "0.3.20" 947 | source = "registry+https://github.com/rust-lang/crates.io-index" 948 | checksum = "7c9b1041b4387893b91ee6746cddfc28516aff326a3519fb2adf820932c5e6cb" 949 | 950 | [[package]] 951 | name = "ppv-lite86" 952 | version = "0.2.14" 953 | source = "registry+https://github.com/rust-lang/crates.io-index" 954 | checksum = "c3ca011bd0129ff4ae15cd04c4eef202cadf6c51c21e47aba319b4e0501db741" 955 | 956 | [[package]] 957 | name = "proc-macro2" 958 | version = "1.0.30" 959 | source = "registry+https://github.com/rust-lang/crates.io-index" 960 | checksum = "edc3358ebc67bc8b7fa0c007f945b0b18226f78437d61bec735a9eb96b61ee70" 961 | dependencies = [ 962 | "unicode-xid", 963 | ] 964 | 965 | [[package]] 966 | name = "quote" 967 | version = "1.0.10" 968 | source = "registry+https://github.com/rust-lang/crates.io-index" 969 | checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" 970 | dependencies = [ 971 | "proc-macro2", 972 | ] 973 | 974 | [[package]] 975 | name = "rand" 976 | version = "0.7.3" 977 | source = "registry+https://github.com/rust-lang/crates.io-index" 978 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 979 | dependencies = [ 980 | "getrandom 0.1.16", 981 | "libc", 982 | "rand_chacha 0.2.2", 983 | "rand_core 0.5.1", 984 | "rand_hc 0.2.0", 985 | "rand_pcg", 986 | ] 987 | 988 | [[package]] 989 | name = "rand" 990 | version = "0.8.4" 991 | source = "registry+https://github.com/rust-lang/crates.io-index" 992 | checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" 993 | dependencies = [ 994 | "libc", 995 | "rand_chacha 0.3.1", 996 | "rand_core 0.6.3", 997 | "rand_hc 0.3.1", 998 | ] 999 | 1000 | [[package]] 1001 | name = "rand_chacha" 1002 | version = "0.2.2" 1003 | source = "registry+https://github.com/rust-lang/crates.io-index" 1004 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 1005 | dependencies = [ 1006 | "ppv-lite86", 1007 | "rand_core 0.5.1", 1008 | ] 1009 | 1010 | [[package]] 1011 | name = "rand_chacha" 1012 | version = "0.3.1" 1013 | source = "registry+https://github.com/rust-lang/crates.io-index" 1014 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1015 | dependencies = [ 1016 | "ppv-lite86", 1017 | "rand_core 0.6.3", 1018 | ] 1019 | 1020 | [[package]] 1021 | name = "rand_core" 1022 | version = "0.5.1" 1023 | source = "registry+https://github.com/rust-lang/crates.io-index" 1024 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 1025 | dependencies = [ 1026 | "getrandom 0.1.16", 1027 | ] 1028 | 1029 | [[package]] 1030 | name = "rand_core" 1031 | version = "0.6.3" 1032 | source = "registry+https://github.com/rust-lang/crates.io-index" 1033 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 1034 | dependencies = [ 1035 | "getrandom 0.2.3", 1036 | ] 1037 | 1038 | [[package]] 1039 | name = "rand_hc" 1040 | version = "0.2.0" 1041 | source = "registry+https://github.com/rust-lang/crates.io-index" 1042 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 1043 | dependencies = [ 1044 | "rand_core 0.5.1", 1045 | ] 1046 | 1047 | [[package]] 1048 | name = "rand_hc" 1049 | version = "0.3.1" 1050 | source = "registry+https://github.com/rust-lang/crates.io-index" 1051 | checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" 1052 | dependencies = [ 1053 | "rand_core 0.6.3", 1054 | ] 1055 | 1056 | [[package]] 1057 | name = "rand_pcg" 1058 | version = "0.2.1" 1059 | source = "registry+https://github.com/rust-lang/crates.io-index" 1060 | checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" 1061 | dependencies = [ 1062 | "rand_core 0.5.1", 1063 | ] 1064 | 1065 | [[package]] 1066 | name = "redox_syscall" 1067 | version = "0.2.10" 1068 | source = "registry+https://github.com/rust-lang/crates.io-index" 1069 | checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" 1070 | dependencies = [ 1071 | "bitflags", 1072 | ] 1073 | 1074 | [[package]] 1075 | name = "redox_users" 1076 | version = "0.4.0" 1077 | source = "registry+https://github.com/rust-lang/crates.io-index" 1078 | checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" 1079 | dependencies = [ 1080 | "getrandom 0.2.3", 1081 | "redox_syscall", 1082 | ] 1083 | 1084 | [[package]] 1085 | name = "regex" 1086 | version = "1.5.4" 1087 | source = "registry+https://github.com/rust-lang/crates.io-index" 1088 | checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" 1089 | dependencies = [ 1090 | "aho-corasick", 1091 | "memchr", 1092 | "regex-syntax", 1093 | ] 1094 | 1095 | [[package]] 1096 | name = "regex-syntax" 1097 | version = "0.6.25" 1098 | source = "registry+https://github.com/rust-lang/crates.io-index" 1099 | checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" 1100 | 1101 | [[package]] 1102 | name = "remove_dir_all" 1103 | version = "0.5.3" 1104 | source = "registry+https://github.com/rust-lang/crates.io-index" 1105 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1106 | dependencies = [ 1107 | "winapi 0.3.9", 1108 | ] 1109 | 1110 | [[package]] 1111 | name = "rprompt" 1112 | version = "1.0.5" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "b386f4748bdae2aefc96857f5fda07647f851d089420e577831e2a14b45230f8" 1115 | 1116 | [[package]] 1117 | name = "ryu" 1118 | version = "1.0.5" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" 1121 | 1122 | [[package]] 1123 | name = "same-file" 1124 | version = "1.0.6" 1125 | source = "registry+https://github.com/rust-lang/crates.io-index" 1126 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1127 | dependencies = [ 1128 | "winapi-util", 1129 | ] 1130 | 1131 | [[package]] 1132 | name = "schannel" 1133 | version = "0.1.19" 1134 | source = "registry+https://github.com/rust-lang/crates.io-index" 1135 | checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" 1136 | dependencies = [ 1137 | "lazy_static", 1138 | "winapi 0.3.9", 1139 | ] 1140 | 1141 | [[package]] 1142 | name = "security-framework" 1143 | version = "2.4.2" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" 1146 | dependencies = [ 1147 | "bitflags", 1148 | "core-foundation", 1149 | "core-foundation-sys", 1150 | "libc", 1151 | "security-framework-sys", 1152 | ] 1153 | 1154 | [[package]] 1155 | name = "security-framework-sys" 1156 | version = "2.4.2" 1157 | source = "registry+https://github.com/rust-lang/crates.io-index" 1158 | checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" 1159 | dependencies = [ 1160 | "core-foundation-sys", 1161 | "libc", 1162 | ] 1163 | 1164 | [[package]] 1165 | name = "serde" 1166 | version = "1.0.130" 1167 | source = "registry+https://github.com/rust-lang/crates.io-index" 1168 | checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" 1169 | dependencies = [ 1170 | "serde_derive", 1171 | ] 1172 | 1173 | [[package]] 1174 | name = "serde_derive" 1175 | version = "1.0.130" 1176 | source = "registry+https://github.com/rust-lang/crates.io-index" 1177 | checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" 1178 | dependencies = [ 1179 | "proc-macro2", 1180 | "quote", 1181 | "syn", 1182 | ] 1183 | 1184 | [[package]] 1185 | name = "serde_json" 1186 | version = "1.0.69" 1187 | source = "registry+https://github.com/rust-lang/crates.io-index" 1188 | checksum = "e466864e431129c7e0d3476b92f20458e5879919a0596c6472738d9fa2d342f8" 1189 | dependencies = [ 1190 | "itoa", 1191 | "ryu", 1192 | "serde", 1193 | ] 1194 | 1195 | [[package]] 1196 | name = "siphasher" 1197 | version = "0.3.7" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "533494a8f9b724d33625ab53c6c4800f7cc445895924a8ef649222dcb76e938b" 1200 | 1201 | [[package]] 1202 | name = "slab" 1203 | version = "0.4.5" 1204 | source = "registry+https://github.com/rust-lang/crates.io-index" 1205 | checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" 1206 | 1207 | [[package]] 1208 | name = "socket2" 1209 | version = "0.4.2" 1210 | source = "registry+https://github.com/rust-lang/crates.io-index" 1211 | checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" 1212 | dependencies = [ 1213 | "libc", 1214 | "winapi 0.3.9", 1215 | ] 1216 | 1217 | [[package]] 1218 | name = "strsim" 1219 | version = "0.10.0" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 1222 | 1223 | [[package]] 1224 | name = "syn" 1225 | version = "1.0.80" 1226 | source = "registry+https://github.com/rust-lang/crates.io-index" 1227 | checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194" 1228 | dependencies = [ 1229 | "proc-macro2", 1230 | "quote", 1231 | "unicode-xid", 1232 | ] 1233 | 1234 | [[package]] 1235 | name = "tempfile" 1236 | version = "3.2.0" 1237 | source = "registry+https://github.com/rust-lang/crates.io-index" 1238 | checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" 1239 | dependencies = [ 1240 | "cfg-if 1.0.0", 1241 | "libc", 1242 | "rand 0.8.4", 1243 | "redox_syscall", 1244 | "remove_dir_all", 1245 | "winapi 0.3.9", 1246 | ] 1247 | 1248 | [[package]] 1249 | name = "termcolor" 1250 | version = "1.1.2" 1251 | source = "registry+https://github.com/rust-lang/crates.io-index" 1252 | checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" 1253 | dependencies = [ 1254 | "winapi-util", 1255 | ] 1256 | 1257 | [[package]] 1258 | name = "terminfo" 1259 | version = "0.7.3" 1260 | source = "registry+https://github.com/rust-lang/crates.io-index" 1261 | checksum = "76971977e6121664ec1b960d1313aacfa75642adc93b9d4d53b247bd4cb1747e" 1262 | dependencies = [ 1263 | "dirs", 1264 | "fnv", 1265 | "nom", 1266 | "phf", 1267 | "phf_codegen", 1268 | ] 1269 | 1270 | [[package]] 1271 | name = "textwrap" 1272 | version = "0.14.2" 1273 | source = "registry+https://github.com/rust-lang/crates.io-index" 1274 | checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" 1275 | 1276 | [[package]] 1277 | name = "thiserror" 1278 | version = "1.0.30" 1279 | source = "registry+https://github.com/rust-lang/crates.io-index" 1280 | checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" 1281 | dependencies = [ 1282 | "thiserror-impl", 1283 | ] 1284 | 1285 | [[package]] 1286 | name = "thiserror-impl" 1287 | version = "1.0.30" 1288 | source = "registry+https://github.com/rust-lang/crates.io-index" 1289 | checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" 1290 | dependencies = [ 1291 | "proc-macro2", 1292 | "quote", 1293 | "syn", 1294 | ] 1295 | 1296 | [[package]] 1297 | name = "tokio" 1298 | version = "1.13.0" 1299 | source = "registry+https://github.com/rust-lang/crates.io-index" 1300 | checksum = "588b2d10a336da58d877567cd8fb8a14b463e2104910f8132cd054b4b96e29ee" 1301 | dependencies = [ 1302 | "autocfg", 1303 | "bytes", 1304 | "libc", 1305 | "memchr", 1306 | "mio 0.7.14", 1307 | "num_cpus", 1308 | "pin-project-lite", 1309 | "tokio-macros", 1310 | "winapi 0.3.9", 1311 | ] 1312 | 1313 | [[package]] 1314 | name = "tokio-macros" 1315 | version = "1.5.0" 1316 | source = "registry+https://github.com/rust-lang/crates.io-index" 1317 | checksum = "b2dd85aeaba7b68df939bd357c6afb36c87951be9e80bf9c859f2fc3e9fca0fd" 1318 | dependencies = [ 1319 | "proc-macro2", 1320 | "quote", 1321 | "syn", 1322 | ] 1323 | 1324 | [[package]] 1325 | name = "tokio-native-tls" 1326 | version = "0.3.0" 1327 | source = "registry+https://github.com/rust-lang/crates.io-index" 1328 | checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" 1329 | dependencies = [ 1330 | "native-tls", 1331 | "tokio", 1332 | ] 1333 | 1334 | [[package]] 1335 | name = "tokio-util" 1336 | version = "0.6.8" 1337 | source = "registry+https://github.com/rust-lang/crates.io-index" 1338 | checksum = "08d3725d3efa29485e87311c5b699de63cde14b00ed4d256b8318aa30ca452cd" 1339 | dependencies = [ 1340 | "bytes", 1341 | "futures-core", 1342 | "futures-sink", 1343 | "log", 1344 | "pin-project-lite", 1345 | "tokio", 1346 | ] 1347 | 1348 | [[package]] 1349 | name = "toml" 1350 | version = "0.5.8" 1351 | source = "registry+https://github.com/rust-lang/crates.io-index" 1352 | checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" 1353 | dependencies = [ 1354 | "serde", 1355 | ] 1356 | 1357 | [[package]] 1358 | name = "toml_edit" 1359 | version = "0.8.0" 1360 | source = "registry+https://github.com/rust-lang/crates.io-index" 1361 | checksum = "8c29c21e11af3c58476a1063cb550e255c45c60928bf7f272462a533e7a2b406" 1362 | dependencies = [ 1363 | "combine", 1364 | "indexmap", 1365 | "itertools", 1366 | "kstring", 1367 | ] 1368 | 1369 | [[package]] 1370 | name = "tower-service" 1371 | version = "0.3.1" 1372 | source = "registry+https://github.com/rust-lang/crates.io-index" 1373 | checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" 1374 | 1375 | [[package]] 1376 | name = "tracing" 1377 | version = "0.1.29" 1378 | source = "registry+https://github.com/rust-lang/crates.io-index" 1379 | checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" 1380 | dependencies = [ 1381 | "cfg-if 1.0.0", 1382 | "pin-project-lite", 1383 | "tracing-core", 1384 | ] 1385 | 1386 | [[package]] 1387 | name = "tracing-core" 1388 | version = "0.1.21" 1389 | source = "registry+https://github.com/rust-lang/crates.io-index" 1390 | checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" 1391 | dependencies = [ 1392 | "lazy_static", 1393 | ] 1394 | 1395 | [[package]] 1396 | name = "try-lock" 1397 | version = "0.2.3" 1398 | source = "registry+https://github.com/rust-lang/crates.io-index" 1399 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" 1400 | 1401 | [[package]] 1402 | name = "unicode-xid" 1403 | version = "0.2.2" 1404 | source = "registry+https://github.com/rust-lang/crates.io-index" 1405 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" 1406 | 1407 | [[package]] 1408 | name = "vcpkg" 1409 | version = "0.2.15" 1410 | source = "registry+https://github.com/rust-lang/crates.io-index" 1411 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1412 | 1413 | [[package]] 1414 | name = "version_check" 1415 | version = "0.9.3" 1416 | source = "registry+https://github.com/rust-lang/crates.io-index" 1417 | checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" 1418 | 1419 | [[package]] 1420 | name = "walkdir" 1421 | version = "2.3.2" 1422 | source = "registry+https://github.com/rust-lang/crates.io-index" 1423 | checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" 1424 | dependencies = [ 1425 | "same-file", 1426 | "winapi 0.3.9", 1427 | "winapi-util", 1428 | ] 1429 | 1430 | [[package]] 1431 | name = "want" 1432 | version = "0.3.0" 1433 | source = "registry+https://github.com/rust-lang/crates.io-index" 1434 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1435 | dependencies = [ 1436 | "log", 1437 | "try-lock", 1438 | ] 1439 | 1440 | [[package]] 1441 | name = "wasi" 1442 | version = "0.9.0+wasi-snapshot-preview1" 1443 | source = "registry+https://github.com/rust-lang/crates.io-index" 1444 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 1445 | 1446 | [[package]] 1447 | name = "wasi" 1448 | version = "0.10.2+wasi-snapshot-preview1" 1449 | source = "registry+https://github.com/rust-lang/crates.io-index" 1450 | checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" 1451 | 1452 | [[package]] 1453 | name = "watchexec" 1454 | version = "1.17.1" 1455 | source = "registry+https://github.com/rust-lang/crates.io-index" 1456 | checksum = "c52e0868bc57765fa91593a173323f464855e53b27f779e1110ba0fb4cb6b406" 1457 | dependencies = [ 1458 | "clearscreen", 1459 | "command-group", 1460 | "derive_builder", 1461 | "glob", 1462 | "globset", 1463 | "lazy_static", 1464 | "log", 1465 | "nix 0.22.0", 1466 | "notify", 1467 | "walkdir", 1468 | "winapi 0.3.9", 1469 | ] 1470 | 1471 | [[package]] 1472 | name = "which" 1473 | version = "4.2.2" 1474 | source = "registry+https://github.com/rust-lang/crates.io-index" 1475 | checksum = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9" 1476 | dependencies = [ 1477 | "either", 1478 | "lazy_static", 1479 | "libc", 1480 | ] 1481 | 1482 | [[package]] 1483 | name = "winapi" 1484 | version = "0.2.8" 1485 | source = "registry+https://github.com/rust-lang/crates.io-index" 1486 | checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 1487 | 1488 | [[package]] 1489 | name = "winapi" 1490 | version = "0.3.9" 1491 | source = "registry+https://github.com/rust-lang/crates.io-index" 1492 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1493 | dependencies = [ 1494 | "winapi-i686-pc-windows-gnu", 1495 | "winapi-x86_64-pc-windows-gnu", 1496 | ] 1497 | 1498 | [[package]] 1499 | name = "winapi-build" 1500 | version = "0.1.1" 1501 | source = "registry+https://github.com/rust-lang/crates.io-index" 1502 | checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 1503 | 1504 | [[package]] 1505 | name = "winapi-i686-pc-windows-gnu" 1506 | version = "0.4.0" 1507 | source = "registry+https://github.com/rust-lang/crates.io-index" 1508 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1509 | 1510 | [[package]] 1511 | name = "winapi-util" 1512 | version = "0.1.5" 1513 | source = "registry+https://github.com/rust-lang/crates.io-index" 1514 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1515 | dependencies = [ 1516 | "winapi 0.3.9", 1517 | ] 1518 | 1519 | [[package]] 1520 | name = "winapi-x86_64-pc-windows-gnu" 1521 | version = "0.4.0" 1522 | source = "registry+https://github.com/rust-lang/crates.io-index" 1523 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1524 | 1525 | [[package]] 1526 | name = "ws2_32-sys" 1527 | version = "0.2.1" 1528 | source = "registry+https://github.com/rust-lang/crates.io-index" 1529 | checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 1530 | dependencies = [ 1531 | "winapi 0.2.8", 1532 | "winapi-build", 1533 | ] 1534 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "diplo" 3 | version = "1.0.0" 4 | edition = "2021" 5 | description = "Diplo is a script runner and dependency manager made in rust" 6 | authors = ["Tricked-dev"] 7 | license = "Apache-2.0" 8 | readme = "README.md" 9 | repository = "https://github.com/Tricked-dev/diplo" 10 | homepage = "https://tricked.pro/diplo" 11 | 12 | [profile.release] 13 | codegen-units = 1 14 | lto = true 15 | 16 | 17 | [package.metadata.deb] 18 | maintainer = "Tricked-dev" 19 | copyright = "2021, Tricked-dev" 20 | license-file = ["LICENSE", "4"] 21 | extended-description = """https://github.com/Tricked-dev/diplo""" 22 | depends = "$auto" 23 | section = "utility" 24 | priority = "optional" 25 | assets = [ 26 | [ 27 | "target/release/diplo", 28 | "usr/bin/", 29 | "755", 30 | ], 31 | [ 32 | "README.md", 33 | "usr/share/doc/diplo/README", 34 | "644", 35 | ], 36 | ] 37 | 38 | 39 | [dependencies] 40 | clap = { version = "3.0.0-beta.8", features = ["cargo", "color"] } 41 | dotenv = "0.15.0" 42 | lazy_static = "1.4.0" 43 | serde = { version = "1.0.130", features = ["derive"] } 44 | serde_json = "1.0.69" 45 | hyper = { version = "0.14.14", features = [ 46 | "client", 47 | "http1", 48 | "http2", 49 | "runtime", 50 | ] } 51 | tokio = { version = "1.13.0", features = ["macros", "rt-multi-thread"] } 52 | regex = "1.5.4" 53 | rprompt = "1.0.5" 54 | watchexec = "1.17.1" 55 | anyhow = "1.0.45" 56 | once_cell = "1.8.0" 57 | toml_edit = "0.8.0" 58 | toml = "0.5.8" 59 | colored = "2.0.0" 60 | humantime = "2.1.0" 61 | hyper-tls = "0.5.0" 62 | ctrlc = "3.2.1" 63 | 64 | [target.'cfg(unix)'.dependencies] 65 | openssl = { version = "0.10.38", features = ["vendored"] } 66 | libc = "0.2.107" 67 | 68 | [target.'cfg(windows)'.build-dependencies] 69 | winapi = "0.3.9" 70 | 71 | [features] 72 | 73 | 74 | [[bin]] 75 | name = "diplo" 76 | path = "src/bin/diplo.rs" 77 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 |
3 | Markdownify 4 |
5 | Diplo 6 |
7 |

8 | 9 |

A fast dependency manager and script runner for Deno.

10 | 11 | --- 12 | 13 |

14 | GitHub issuesGitHub licenseCrates.ioGitHub all releasesDiscord 15 | 16 |

17 |

18 | Installing • 19 | Usage • 20 | Features 21 |

22 | 23 | ## Key Features 24 | 25 | - Script running 26 | - Diplo has simple and easy to use script running capabilities 27 | - Dependency management 28 | - Diplo manages dependencies by defining them in the diplo.toml file 29 | - Dependency updating diplo can update all your dependencies using `diplo update` 30 | - import maps Diplo creates import maps from your dependencies 31 | 32 | ## Screenshots 33 | 34 | | name | screenshot | 35 | | ---------------------------------- | ------------------------------- | 36 | | Diplo running with watch option on | ![](assets/run_start_watch.png) | 37 | | Diplo running without watch option | ![](assets/run_start.png) | 38 | | Updating modules | ![](assets/update.png) | 39 | | Adding modules | ![](assets/add.png) | 40 | | Init | ![](assets/init.png) | 41 | | Exec | ![](assets/exec.png) | 42 | 43 | ## Donating 44 | 45 | `89prBkdG58KU15jv5LTbP3MgdJ2ikrcyu1vmdTKTGEVdhKRvbxgRN671jfFn3Uivk4Er1JXsc1xFZFbmFCGzVZNLPQeEwZc` 46 | 47 | `0xc31a1A5dCd1a4704e81fB7c9C3fa858b9A00C7fb` 48 | 49 | `qz9gyruyyvtwcmevtcnyru8gudenqjqeug096e459m` 50 | 51 | ## License 52 | 53 | Apache-2 54 | 55 | --- 56 | -------------------------------------------------------------------------------- /assets/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricked-dev/diplo/4c3cee700aa0c3e32d0c081b28b8d6831e3db85b/assets/add.png -------------------------------------------------------------------------------- /assets/diplo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricked-dev/diplo/4c3cee700aa0c3e32d0c081b28b8d6831e3db85b/assets/diplo.png -------------------------------------------------------------------------------- /assets/diplo_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricked-dev/diplo/4c3cee700aa0c3e32d0c081b28b8d6831e3db85b/assets/diplo_cover.png -------------------------------------------------------------------------------- /assets/diplo_cover.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /assets/diplo_small.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /assets/exec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricked-dev/diplo/4c3cee700aa0c3e32d0c081b28b8d6831e3db85b/assets/exec.png -------------------------------------------------------------------------------- /assets/import_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricked-dev/diplo/4c3cee700aa0c3e32d0c081b28b8d6831e3db85b/assets/import_map.png -------------------------------------------------------------------------------- /assets/init.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricked-dev/diplo/4c3cee700aa0c3e32d0c081b28b8d6831e3db85b/assets/init.png -------------------------------------------------------------------------------- /assets/run_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricked-dev/diplo/4c3cee700aa0c3e32d0c081b28b8d6831e3db85b/assets/run_start.png -------------------------------------------------------------------------------- /assets/run_start_watch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricked-dev/diplo/4c3cee700aa0c3e32d0c081b28b8d6831e3db85b/assets/run_start_watch.png -------------------------------------------------------------------------------- /assets/update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricked-dev/diplo/4c3cee700aa0c3e32d0c081b28b8d6831e3db85b/assets/update.png -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Diplo docs 2 | 3 | docs are built using zola 4 | 5 | install zola then just run zola serve for development 6 | -------------------------------------------------------------------------------- /docs/config.toml: -------------------------------------------------------------------------------- 1 | # The URL the site will be built for 2 | base_url = "https://diplo.ascella.wtf" 3 | title = "Diplo" 4 | description = "Diplo is a fast script runner and dependency manager for Deno written in rust" 5 | theme = "adidoks" 6 | default_language = "en" 7 | compile_sass = true 8 | generate_feed = true 9 | minify_html = false 10 | taxonomies = [ 11 | { name = "authors" }, # Basic definition: no feed or pagination 12 | ] 13 | build_search_index = true 14 | 15 | [search] 16 | include_title = true 17 | include_description = false 18 | include_content = true 19 | 20 | [markdown] 21 | highlight_code = true 22 | 23 | [extra] 24 | author = "tricked" 25 | github = "https://github.com/tricked-dev" 26 | email = "tricked@duck.com" 27 | 28 | is_netlify = true 29 | language_code = "en-US" 30 | theme_color = "#fff" 31 | 32 | title_separator = "|" # set as |, -, _, etc 33 | title_addition = "Diplo" 34 | 35 | timeformat = "%B %e, %Y" # e.g. June 14, 2021 36 | timezone = "America/New_York" 37 | 38 | edit_page = false 39 | docs_repo = "https://github.com/tricked-dev/diplo" 40 | repo_branch = "main" 41 | math = false 42 | library = "katex" # options: "katex", "mathjax". default is "katex". 43 | [extra.open] 44 | enable = true 45 | image = "doks.png" 46 | twitter_site = "tricked" 47 | twitter_creator = "tricked" 48 | facebook_author = "tricked" 49 | facebook_publisher = "tricked" 50 | og_locale = "en_US" 51 | 52 | [extra.schema] 53 | type = "Organization" 54 | logo = "logo-doks.png" 55 | linked_in = "" 56 | github = "https://github.com/tricked-dev" 57 | section = "docs" # see config.extra.main~url 58 | site_links_search_box = false 59 | 60 | [[extra.menu.main]] 61 | name = "Docs" 62 | section = "docs" 63 | url = "/docs/getting-started/introduction/" 64 | weight = 10 65 | 66 | 67 | [[extra.menu.social]] 68 | name = "GitHub" 69 | pre = '' 70 | url = "https://github.com/tricked-dev/diplo" 71 | post = "v0.1.0" 72 | weight = 20 73 | 74 | [extra.footer] 75 | info = 'Powered by Netlify, Zola, and AdiDoks' 76 | 77 | [[extra.footer.nav]] 78 | name = "Privacy" 79 | url = "/privacy-policy/" 80 | weight = 10 81 | -------------------------------------------------------------------------------- /docs/content/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Diplo" 3 | 4 | 5 | # The homepage contents 6 | [extra] 7 | lead = 'Diplo is a modern and fast script runner and dependency manager made for deno written in rust.' 8 | url = "/docs/getting-started/introduction/" 9 | url_button = "Get started" 10 | repo_version = "GitHub" 11 | repo_license = "Open-source Apache License." 12 | repo_url = "https://github.com/tricked-dev/diplo" 13 | 14 | [[extra.list]] 15 | title = "Fast" 16 | content = 'Diplo is written in rust making it very fast' 17 | [[extra.list]] 18 | title = "Single binary" 19 | content = "Diplo is only a single binary and doesn't require any other programs to run" 20 | +++ 21 | -------------------------------------------------------------------------------- /docs/content/authors/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Authors" 3 | description = "The authurs of the blog articles." 4 | date = 2021-04-01T08:00:00+00:00 5 | updated = 2021-04-01T08:00:00+00:00 6 | draft = false 7 | 8 | # If add a new author page in this section, please add a new item, 9 | # and the format is as follows: 10 | # 11 | # "author-name-in-url" = "the-full-path-of-the-author-page" 12 | # 13 | # Note: We use quoted keys here. 14 | [extra.author_pages] 15 | "Tricked" = "authors/tricked.md" 16 | +++ 17 | 18 | The authors of the blog articles. 19 | -------------------------------------------------------------------------------- /docs/content/authors/tricked.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Tricked" 3 | description = "Creator of Diplo." 4 | date = 2021-04-01T08:50:45+00:00 5 | updated = 2021-04-01T08:50:45+00:00 6 | draft = false 7 | +++ 8 | 9 | Creator of **Diplo**. 10 | 11 | [@tricked-dev](https://github.com/tricked-dev) 12 | -------------------------------------------------------------------------------- /docs/content/docs/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Docs" 3 | description = "The documents of Diplo." 4 | date = 2025-05-01T08:00:00+00:00 5 | updated = 2021-05-01T08:00:00+00:00 6 | sort_by = "weight" 7 | weight = 1 8 | template = "docs/section.html" 9 | +++ 10 | -------------------------------------------------------------------------------- /docs/content/docs/getting-started/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Getting Started" 3 | description = "Quick start and guides for installing and using diplo." 4 | date = 2025-05-01T08:00:00+00:00 5 | updated = 2021-05-01T08:00:00+00:00 6 | template = "docs/section.html" 7 | sort_by = "weight" 8 | weight = 1 9 | draft = false 10 | +++ 11 | -------------------------------------------------------------------------------- /docs/content/docs/getting-started/features.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Features" 3 | description = "All features of diplo." 4 | date = 2021-05-01T08:20:00+00:00 5 | updated = 2021-05-01T08:20:00+00:00 6 | draft = false 7 | weight = 20 8 | sort_by = "weight" 9 | template = "docs/page.html" 10 | 11 | [extra] 12 | lead = "All features of diplo." 13 | toc = true 14 | top = false 15 | +++ 16 | 17 | ## Scripts 18 | 19 | use `diplo run --help` for more info 20 | 21 | ```toml 22 | [scripts] 23 | start = "deno run -A mod.ts" 24 | ``` 25 | 26 | ## Dependencies 27 | 28 | ```toml 29 | [dependencies] 30 | natico = "https://deno.land/x/natico@3.0.1/mod.ts" 31 | ``` 32 | 33 | #### Custom exports 34 | 35 | You can define custom exports by adding the `exports` string to a dependency 36 | 37 | ```toml 38 | [dependencies] 39 | natico = { url="https://deno.land/x/natico@3.0.1/mod.ts", exports="* as natico" } 40 | ``` 41 | 42 | ```toml 43 | [dependencies] 44 | natico = { url="https://deno.land/x/natico@3.0.1/mod.ts", exports="NaticoCommandHandler" } 45 | ``` 46 | 47 | ```toml 48 | [dependencies] 49 | natico = { url="https://deno.land/x/natico@3.0.1/mod.ts", exports="{ NaticoCommandHandler }" } 50 | ``` 51 | 52 | #### Locking dependencies 53 | 54 | Locking dependencies makes it so `diplo upgrade` wont update them anymore 55 | 56 | ```toml 57 | [dependencies] 58 | natico = { url="https://deno.land/x/natico@3.0.1/mod.ts", locked=true } 59 | ``` 60 | 61 | #### Adding dependency types 62 | 63 | This is sometimes needed when a dependency has .d.ts types, Diplo will automatically add `// @deno-types="https://url/to/types.d.ts"` to these dependencies 64 | 65 | ```toml 66 | [dependencies] 67 | natico = { url="https://deno.land/x/natico@3.0.1/mod.ts", typss="https://url/to/types.d.ts" } 68 | ``` 69 | 70 | ## Loading env 71 | 72 | this will open the .env file in the current directory and add the environment values to the process env 73 | 74 | ```toml 75 | load_env = true 76 | ``` 77 | 78 | ## Import maps 79 | 80 | Diplo will automatically create import maps from the dependencies and append the import map to `deno run` 81 | 82 | ```toml 83 | import_map = true 84 | ``` 85 | -------------------------------------------------------------------------------- /docs/content/docs/getting-started/installing.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Installing diplo" 3 | description = "Guide on how to install diplo." 4 | date = 2021-05-01T08:20:00+00:00 5 | updated = 2021-05-01T08:20:00+00:00 6 | draft = false 7 | weight = 20 8 | sort_by = "weight" 9 | template = "docs/page.html" 10 | 11 | [extra] 12 | lead = "Guide on how to install diplo." 13 | toc = true 14 | top = false 15 | +++ 16 | 17 | - [All platforms](#all-platforms) 18 | - [Windows](#windows) 19 | - [Installer](#installer) 20 | - [Exe](#exe) 21 | - [Linux](#linux) 22 | - [Debian/Ubuntu based distro](#debianubuntu-based-distro) 23 | - [ArchLinux](#archlinux) 24 | - [Other Linux](#other-linux) 25 | - [MacOs](#macos) 26 | 27 | ## All platforms 28 | 29 | Install [rustup](https://rustup.rs/#), thats how we are going to be installing cargo and rust. 30 | 31 | Then just run `cargo install diplo` and diplo should be installed on your system 32 | 33 | ## Windows 34 | 35 | Download the windows.zip from the releases tab . 36 | 37 | unzip this 38 | 39 | #### Installer 40 | 41 | Then just open the installer and diplo should be installed into your path. 42 | 43 | #### Exe 44 | 45 | If you don't want to use the installer you can still use the exe from the zip using the commandline. 46 | 47 | ## Linux 48 | 49 | Download the linux.zip(the x86 is what most people are going to want to get) from the releases tab . 50 | 51 | ``` 52 | cd Downloads 53 | tar -xvf diplo-*.tar.xz 54 | ``` 55 | 56 | #### Debian/Ubuntu based distro 57 | 58 | ``` 59 | cd diplo--linux 60 | sudo apt install -f diplo__amd64.deb 61 | ``` 62 | 63 | #### ArchLinux 64 | 65 | ``` 66 | cd diplo--linux 67 | makepkg -si 68 | ``` 69 | 70 | #### Other Linux 71 | 72 | ``` 73 | cd diplo--linux 74 | sudo mv diplo /bin/ 75 | ``` 76 | 77 | ## MacOs 78 | 79 | Download the macos.zip from the releases tab . 80 | 81 | unzip this 82 | 83 | then just move the binary to your bin folder. 84 | -------------------------------------------------------------------------------- /docs/content/docs/getting-started/introduction.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Introduction" 3 | description = "Diplo is a script runner and dependency manager made in rust" 4 | date = 2021-05-01T08:00:00+00:00 5 | updated = 2021-05-01T08:00:00+00:00 6 | draft = false 7 | weight = 10 8 | sort_by = "weight" 9 | template = "docs/page.html" 10 | 11 | [extra] 12 | toc = true 13 | top = false 14 | +++ 15 | 16 | ## Quick Start 17 | 18 | Simple starter guide for diplo [Quick Start →](../quick-start/) 19 | 20 | 27 | 28 | 31 | -------------------------------------------------------------------------------- /docs/content/docs/getting-started/quick-start.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Quick Start" 3 | description = "Simple guide on how to get started with using Diplo." 4 | date = 2021-05-01T08:20:00+00:00 5 | updated = 2021-05-01T08:20:00+00:00 6 | draft = false 7 | weight = 20 8 | sort_by = "weight" 9 | template = "docs/page.html" 10 | 11 | [extra] 12 | lead = "Simple guide on how to get started with using Diplo." 13 | toc = true 14 | top = false 15 | +++ 16 | 17 | ## Requirements 18 | 19 | [Diplo](./installing) 20 | 21 | ## Initializing a project 22 | 23 | ```sh 24 | $ diplo init 25 | ``` 26 | 27 | Output: 28 | 29 | ``` 30 | name : Diplo 31 | load_env (false): true 32 | import_map (false): false 33 | Successfully wrote changes to diplo.toml 34 | 35 | > Done in 7s 519ms 150us 36 | ``` 37 | 38 | ## Adding a dependency 39 | 40 | ```sh 41 | $ diplo add natico 42 | ``` 43 | 44 | Output: 45 | 46 | ``` 47 | Successfully added natico@3.0.2 to the dependencies 48 | 49 | > Done in 609ms 122us 50 | ``` 51 | 52 | ## Creating a script 53 | 54 | Edit your diplo.toml file to add a script 55 | 56 | ```toml 57 | name= "Diplo" 58 | load_env=true 59 | import_map=false 60 | [watcher] 61 | [dependencies] 62 | natico = "https://deno.land/x/natico@3.0.2/mod.ts" 63 | [scripts] 64 | start="deno run -A mod.ts" 65 | ``` 66 | 67 | Run the script 68 | 69 | ```sh 70 | $ diplo run start 71 | ``` 72 | 73 | ## Updating dependencies 74 | 75 | ```sh 76 | $ diplo update 77 | ``` 78 | 79 | Output: 80 | 81 | ``` 82 | updated natico to 3.0.2 from 3.0.0 83 | 84 | > Done in 436ms 924us 85 | ``` 86 | -------------------------------------------------------------------------------- /docs/content/docs/help/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Help" 3 | description = "Get help on AdiDoks." 4 | date = 2025-05-01T19:00:00+00:00 5 | updated = 2021-05-01T19:00:00+00:00 6 | template = "docs/section.html" 7 | sort_by = "weight" 8 | weight = 5 9 | draft = false 10 | +++ 11 | -------------------------------------------------------------------------------- /docs/content/docs/help/faq.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "FAQ" 3 | description = "Answers to frequently asked questions." 4 | date = 2021-05-01T19:30:00+00:00 5 | updated = 2021-05-01T19:30:00+00:00 6 | draft = false 7 | weight = 30 8 | sort_by = "weight" 9 | template = "docs/page.html" 10 | 11 | [extra] 12 | lead = "Answers to frequently asked questions." 13 | toc = true 14 | top = false 15 | +++ 16 | 17 | ## Contact the creator? 18 | 19 | - [Tricked.pro](https://tricked.pro) 20 | -------------------------------------------------------------------------------- /docs/content/privacy-policy/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Privacy Policy" 3 | description = "We do not use cookies and we do not collect any personal data." 4 | date = 2021-05-01T08:00:00+00:00 5 | updated = 2020-05-01T08:00:00+00:00 6 | draft = false 7 | 8 | [extra] 9 | class = "page single" 10 | +++ 11 | 12 | **TLDR**: We do not use cookies and we do not collect any personal data. 13 | 14 | ## Website visitors 15 | 16 | - No personal information is collected. 17 | - No information is stored in the browser. 18 | - No information is shared with, sent to or sold to third-parties. 19 | - No information is shared with advertising companies. 20 | - No information is mined and harvested for personal and behavioral trends. 21 | - No information is monetized. 22 | 23 | ## Contact us 24 | 25 | [Contact us](https://github.com/tricked-dev/diplo) if you have any questions. 26 | -------------------------------------------------------------------------------- /installer/.cargo-ok: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricked-dev/diplo/4c3cee700aa0c3e32d0c081b28b8d6831e3db85b/installer/.cargo-ok -------------------------------------------------------------------------------- /installer/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | wasm-pack.log 4 | build/ -------------------------------------------------------------------------------- /installer/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aho-corasick" 7 | version = "0.6.10" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "async-trait" 16 | version = "0.1.51" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" 19 | dependencies = [ 20 | "proc-macro2", 21 | "quote", 22 | "syn", 23 | ] 24 | 25 | [[package]] 26 | name = "autocfg" 27 | version = "1.0.1" 28 | source = "registry+https://github.com/rust-lang/crates.io-index" 29 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 30 | 31 | [[package]] 32 | name = "base64" 33 | version = "0.13.0" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 36 | 37 | [[package]] 38 | name = "bitflags" 39 | version = "1.3.2" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 42 | 43 | [[package]] 44 | name = "bumpalo" 45 | version = "3.7.0" 46 | source = "registry+https://github.com/rust-lang/crates.io-index" 47 | checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" 48 | 49 | [[package]] 50 | name = "bytes" 51 | version = "1.1.0" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" 54 | 55 | [[package]] 56 | name = "cc" 57 | version = "1.0.71" 58 | source = "registry+https://github.com/rust-lang/crates.io-index" 59 | checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd" 60 | 61 | [[package]] 62 | name = "cfg-if" 63 | version = "0.1.10" 64 | source = "registry+https://github.com/rust-lang/crates.io-index" 65 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 66 | 67 | [[package]] 68 | name = "cfg-if" 69 | version = "1.0.0" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 72 | 73 | [[package]] 74 | name = "chrono" 75 | version = "0.4.19" 76 | source = "registry+https://github.com/rust-lang/crates.io-index" 77 | checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" 78 | dependencies = [ 79 | "libc", 80 | "num-integer", 81 | "num-traits", 82 | "time", 83 | "winapi", 84 | ] 85 | 86 | [[package]] 87 | name = "chrono-tz" 88 | version = "0.4.1" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "aa1878c18b5b01b9978d5f130fe366d434022004d12fb87c182e8459b427c4a3" 91 | dependencies = [ 92 | "chrono", 93 | "parse-zoneinfo", 94 | ] 95 | 96 | [[package]] 97 | name = "console_error_panic_hook" 98 | version = "0.1.7" 99 | source = "registry+https://github.com/rust-lang/crates.io-index" 100 | checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" 101 | dependencies = [ 102 | "cfg-if 1.0.0", 103 | "wasm-bindgen", 104 | ] 105 | 106 | [[package]] 107 | name = "core-foundation" 108 | version = "0.9.2" 109 | source = "registry+https://github.com/rust-lang/crates.io-index" 110 | checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" 111 | dependencies = [ 112 | "core-foundation-sys", 113 | "libc", 114 | ] 115 | 116 | [[package]] 117 | name = "core-foundation-sys" 118 | version = "0.8.3" 119 | source = "registry+https://github.com/rust-lang/crates.io-index" 120 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 121 | 122 | [[package]] 123 | name = "diplo-installer" 124 | version = "0.1.0" 125 | dependencies = [ 126 | "cfg-if 1.0.0", 127 | "console_error_panic_hook", 128 | "reqwest", 129 | "serde", 130 | "serde_json", 131 | "wee_alloc", 132 | "worker", 133 | "worker-sys 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 134 | ] 135 | 136 | [[package]] 137 | name = "encoding_rs" 138 | version = "0.8.29" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "a74ea89a0a1b98f6332de42c95baff457ada66d1cb4030f9ff151b2041a1c746" 141 | dependencies = [ 142 | "cfg-if 1.0.0", 143 | ] 144 | 145 | [[package]] 146 | name = "fnv" 147 | version = "1.0.7" 148 | source = "registry+https://github.com/rust-lang/crates.io-index" 149 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 150 | 151 | [[package]] 152 | name = "foreign-types" 153 | version = "0.3.2" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 156 | dependencies = [ 157 | "foreign-types-shared", 158 | ] 159 | 160 | [[package]] 161 | name = "foreign-types-shared" 162 | version = "0.1.1" 163 | source = "registry+https://github.com/rust-lang/crates.io-index" 164 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 165 | 166 | [[package]] 167 | name = "form_urlencoded" 168 | version = "1.0.1" 169 | source = "registry+https://github.com/rust-lang/crates.io-index" 170 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" 171 | dependencies = [ 172 | "matches", 173 | "percent-encoding", 174 | ] 175 | 176 | [[package]] 177 | name = "futures" 178 | version = "0.3.17" 179 | source = "registry+https://github.com/rust-lang/crates.io-index" 180 | checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" 181 | dependencies = [ 182 | "futures-channel", 183 | "futures-core", 184 | "futures-executor", 185 | "futures-io", 186 | "futures-sink", 187 | "futures-task", 188 | "futures-util", 189 | ] 190 | 191 | [[package]] 192 | name = "futures-channel" 193 | version = "0.3.17" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" 196 | dependencies = [ 197 | "futures-core", 198 | "futures-sink", 199 | ] 200 | 201 | [[package]] 202 | name = "futures-core" 203 | version = "0.3.17" 204 | source = "registry+https://github.com/rust-lang/crates.io-index" 205 | checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" 206 | 207 | [[package]] 208 | name = "futures-executor" 209 | version = "0.3.17" 210 | source = "registry+https://github.com/rust-lang/crates.io-index" 211 | checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" 212 | dependencies = [ 213 | "futures-core", 214 | "futures-task", 215 | "futures-util", 216 | ] 217 | 218 | [[package]] 219 | name = "futures-io" 220 | version = "0.3.17" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" 223 | 224 | [[package]] 225 | name = "futures-macro" 226 | version = "0.3.17" 227 | source = "registry+https://github.com/rust-lang/crates.io-index" 228 | checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" 229 | dependencies = [ 230 | "autocfg", 231 | "proc-macro-hack", 232 | "proc-macro2", 233 | "quote", 234 | "syn", 235 | ] 236 | 237 | [[package]] 238 | name = "futures-sink" 239 | version = "0.3.17" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" 242 | 243 | [[package]] 244 | name = "futures-task" 245 | version = "0.3.17" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" 248 | 249 | [[package]] 250 | name = "futures-util" 251 | version = "0.3.17" 252 | source = "registry+https://github.com/rust-lang/crates.io-index" 253 | checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" 254 | dependencies = [ 255 | "autocfg", 256 | "futures-channel", 257 | "futures-core", 258 | "futures-io", 259 | "futures-macro", 260 | "futures-sink", 261 | "futures-task", 262 | "memchr", 263 | "pin-project-lite", 264 | "pin-utils", 265 | "proc-macro-hack", 266 | "proc-macro-nested", 267 | "slab", 268 | ] 269 | 270 | [[package]] 271 | name = "getrandom" 272 | version = "0.2.3" 273 | source = "registry+https://github.com/rust-lang/crates.io-index" 274 | checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" 275 | dependencies = [ 276 | "cfg-if 1.0.0", 277 | "libc", 278 | "wasi", 279 | ] 280 | 281 | [[package]] 282 | name = "h2" 283 | version = "0.3.6" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "6c06815895acec637cd6ed6e9662c935b866d20a106f8361892893a7d9234964" 286 | dependencies = [ 287 | "bytes", 288 | "fnv", 289 | "futures-core", 290 | "futures-sink", 291 | "futures-util", 292 | "http", 293 | "indexmap", 294 | "slab", 295 | "tokio", 296 | "tokio-util", 297 | "tracing", 298 | ] 299 | 300 | [[package]] 301 | name = "hashbrown" 302 | version = "0.11.2" 303 | source = "registry+https://github.com/rust-lang/crates.io-index" 304 | checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" 305 | 306 | [[package]] 307 | name = "http" 308 | version = "0.2.4" 309 | source = "registry+https://github.com/rust-lang/crates.io-index" 310 | checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" 311 | dependencies = [ 312 | "bytes", 313 | "fnv", 314 | "itoa", 315 | ] 316 | 317 | [[package]] 318 | name = "http-body" 319 | version = "0.4.3" 320 | source = "registry+https://github.com/rust-lang/crates.io-index" 321 | checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" 322 | dependencies = [ 323 | "bytes", 324 | "http", 325 | "pin-project-lite", 326 | ] 327 | 328 | [[package]] 329 | name = "httparse" 330 | version = "1.5.1" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" 333 | 334 | [[package]] 335 | name = "httpdate" 336 | version = "1.0.1" 337 | source = "registry+https://github.com/rust-lang/crates.io-index" 338 | checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" 339 | 340 | [[package]] 341 | name = "hyper" 342 | version = "0.14.13" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "15d1cfb9e4f68655fa04c01f59edb405b6074a0f7118ea881e5026e4a1cd8593" 345 | dependencies = [ 346 | "bytes", 347 | "futures-channel", 348 | "futures-core", 349 | "futures-util", 350 | "h2", 351 | "http", 352 | "http-body", 353 | "httparse", 354 | "httpdate", 355 | "itoa", 356 | "pin-project-lite", 357 | "socket2", 358 | "tokio", 359 | "tower-service", 360 | "tracing", 361 | "want", 362 | ] 363 | 364 | [[package]] 365 | name = "hyper-tls" 366 | version = "0.5.0" 367 | source = "registry+https://github.com/rust-lang/crates.io-index" 368 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 369 | dependencies = [ 370 | "bytes", 371 | "hyper", 372 | "native-tls", 373 | "tokio", 374 | "tokio-native-tls", 375 | ] 376 | 377 | [[package]] 378 | name = "idna" 379 | version = "0.2.3" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" 382 | dependencies = [ 383 | "matches", 384 | "unicode-bidi", 385 | "unicode-normalization", 386 | ] 387 | 388 | [[package]] 389 | name = "indexmap" 390 | version = "1.7.0" 391 | source = "registry+https://github.com/rust-lang/crates.io-index" 392 | checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" 393 | dependencies = [ 394 | "autocfg", 395 | "hashbrown", 396 | ] 397 | 398 | [[package]] 399 | name = "ipnet" 400 | version = "2.3.1" 401 | source = "registry+https://github.com/rust-lang/crates.io-index" 402 | checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" 403 | 404 | [[package]] 405 | name = "itoa" 406 | version = "0.4.8" 407 | source = "registry+https://github.com/rust-lang/crates.io-index" 408 | checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" 409 | 410 | [[package]] 411 | name = "js-sys" 412 | version = "0.3.55" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" 415 | dependencies = [ 416 | "wasm-bindgen", 417 | ] 418 | 419 | [[package]] 420 | name = "lazy_static" 421 | version = "1.4.0" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 424 | 425 | [[package]] 426 | name = "libc" 427 | version = "0.2.101" 428 | source = "registry+https://github.com/rust-lang/crates.io-index" 429 | checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" 430 | 431 | [[package]] 432 | name = "log" 433 | version = "0.4.14" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" 436 | dependencies = [ 437 | "cfg-if 1.0.0", 438 | ] 439 | 440 | [[package]] 441 | name = "matches" 442 | version = "0.1.9" 443 | source = "registry+https://github.com/rust-lang/crates.io-index" 444 | checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" 445 | 446 | [[package]] 447 | name = "matchit" 448 | version = "0.4.2" 449 | source = "registry+https://github.com/rust-lang/crates.io-index" 450 | checksum = "31cfc429bbf773f52282c32c240342a21495ce9fa1e3721998295d2027969f6a" 451 | 452 | [[package]] 453 | name = "memchr" 454 | version = "2.4.1" 455 | source = "registry+https://github.com/rust-lang/crates.io-index" 456 | checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" 457 | 458 | [[package]] 459 | name = "memory_units" 460 | version = "0.4.0" 461 | source = "registry+https://github.com/rust-lang/crates.io-index" 462 | checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" 463 | 464 | [[package]] 465 | name = "mime" 466 | version = "0.3.16" 467 | source = "registry+https://github.com/rust-lang/crates.io-index" 468 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 469 | 470 | [[package]] 471 | name = "mio" 472 | version = "0.7.14" 473 | source = "registry+https://github.com/rust-lang/crates.io-index" 474 | checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" 475 | dependencies = [ 476 | "libc", 477 | "log", 478 | "miow", 479 | "ntapi", 480 | "winapi", 481 | ] 482 | 483 | [[package]] 484 | name = "miow" 485 | version = "0.3.7" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" 488 | dependencies = [ 489 | "winapi", 490 | ] 491 | 492 | [[package]] 493 | name = "native-tls" 494 | version = "0.2.8" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" 497 | dependencies = [ 498 | "lazy_static", 499 | "libc", 500 | "log", 501 | "openssl", 502 | "openssl-probe", 503 | "openssl-sys", 504 | "schannel", 505 | "security-framework", 506 | "security-framework-sys", 507 | "tempfile", 508 | ] 509 | 510 | [[package]] 511 | name = "ntapi" 512 | version = "0.3.6" 513 | source = "registry+https://github.com/rust-lang/crates.io-index" 514 | checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" 515 | dependencies = [ 516 | "winapi", 517 | ] 518 | 519 | [[package]] 520 | name = "num-integer" 521 | version = "0.1.44" 522 | source = "registry+https://github.com/rust-lang/crates.io-index" 523 | checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" 524 | dependencies = [ 525 | "autocfg", 526 | "num-traits", 527 | ] 528 | 529 | [[package]] 530 | name = "num-traits" 531 | version = "0.2.14" 532 | source = "registry+https://github.com/rust-lang/crates.io-index" 533 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 534 | dependencies = [ 535 | "autocfg", 536 | ] 537 | 538 | [[package]] 539 | name = "once_cell" 540 | version = "1.8.0" 541 | source = "registry+https://github.com/rust-lang/crates.io-index" 542 | checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" 543 | 544 | [[package]] 545 | name = "openssl" 546 | version = "0.10.36" 547 | source = "registry+https://github.com/rust-lang/crates.io-index" 548 | checksum = "8d9facdb76fec0b73c406f125d44d86fdad818d66fef0531eec9233ca425ff4a" 549 | dependencies = [ 550 | "bitflags", 551 | "cfg-if 1.0.0", 552 | "foreign-types", 553 | "libc", 554 | "once_cell", 555 | "openssl-sys", 556 | ] 557 | 558 | [[package]] 559 | name = "openssl-probe" 560 | version = "0.1.4" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" 563 | 564 | [[package]] 565 | name = "openssl-sys" 566 | version = "0.9.67" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "69df2d8dfc6ce3aaf44b40dec6f487d5a886516cf6879c49e98e0710f310a058" 569 | dependencies = [ 570 | "autocfg", 571 | "cc", 572 | "libc", 573 | "pkg-config", 574 | "vcpkg", 575 | ] 576 | 577 | [[package]] 578 | name = "parse-zoneinfo" 579 | version = "0.1.1" 580 | source = "registry+https://github.com/rust-lang/crates.io-index" 581 | checksum = "f4ee19a3656dadae35a33467f9714f1228dd34766dbe49e10e656b5296867aea" 582 | dependencies = [ 583 | "regex", 584 | ] 585 | 586 | [[package]] 587 | name = "percent-encoding" 588 | version = "2.1.0" 589 | source = "registry+https://github.com/rust-lang/crates.io-index" 590 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 591 | 592 | [[package]] 593 | name = "pin-project-lite" 594 | version = "0.2.7" 595 | source = "registry+https://github.com/rust-lang/crates.io-index" 596 | checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" 597 | 598 | [[package]] 599 | name = "pin-utils" 600 | version = "0.1.0" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 603 | 604 | [[package]] 605 | name = "pkg-config" 606 | version = "0.3.20" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | checksum = "7c9b1041b4387893b91ee6746cddfc28516aff326a3519fb2adf820932c5e6cb" 609 | 610 | [[package]] 611 | name = "ppv-lite86" 612 | version = "0.2.14" 613 | source = "registry+https://github.com/rust-lang/crates.io-index" 614 | checksum = "c3ca011bd0129ff4ae15cd04c4eef202cadf6c51c21e47aba319b4e0501db741" 615 | 616 | [[package]] 617 | name = "proc-macro-hack" 618 | version = "0.5.19" 619 | source = "registry+https://github.com/rust-lang/crates.io-index" 620 | checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" 621 | 622 | [[package]] 623 | name = "proc-macro-nested" 624 | version = "0.1.7" 625 | source = "registry+https://github.com/rust-lang/crates.io-index" 626 | checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" 627 | 628 | [[package]] 629 | name = "proc-macro2" 630 | version = "1.0.29" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" 633 | dependencies = [ 634 | "unicode-xid", 635 | ] 636 | 637 | [[package]] 638 | name = "quote" 639 | version = "1.0.9" 640 | source = "registry+https://github.com/rust-lang/crates.io-index" 641 | checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" 642 | dependencies = [ 643 | "proc-macro2", 644 | ] 645 | 646 | [[package]] 647 | name = "rand" 648 | version = "0.8.4" 649 | source = "registry+https://github.com/rust-lang/crates.io-index" 650 | checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" 651 | dependencies = [ 652 | "libc", 653 | "rand_chacha", 654 | "rand_core", 655 | "rand_hc", 656 | ] 657 | 658 | [[package]] 659 | name = "rand_chacha" 660 | version = "0.3.1" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 663 | dependencies = [ 664 | "ppv-lite86", 665 | "rand_core", 666 | ] 667 | 668 | [[package]] 669 | name = "rand_core" 670 | version = "0.6.3" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 673 | dependencies = [ 674 | "getrandom", 675 | ] 676 | 677 | [[package]] 678 | name = "rand_hc" 679 | version = "0.3.1" 680 | source = "registry+https://github.com/rust-lang/crates.io-index" 681 | checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" 682 | dependencies = [ 683 | "rand_core", 684 | ] 685 | 686 | [[package]] 687 | name = "redox_syscall" 688 | version = "0.2.10" 689 | source = "registry+https://github.com/rust-lang/crates.io-index" 690 | checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" 691 | dependencies = [ 692 | "bitflags", 693 | ] 694 | 695 | [[package]] 696 | name = "regex" 697 | version = "0.2.11" 698 | source = "registry+https://github.com/rust-lang/crates.io-index" 699 | checksum = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" 700 | dependencies = [ 701 | "aho-corasick", 702 | "memchr", 703 | "regex-syntax", 704 | "thread_local", 705 | "utf8-ranges", 706 | ] 707 | 708 | [[package]] 709 | name = "regex-syntax" 710 | version = "0.5.6" 711 | source = "registry+https://github.com/rust-lang/crates.io-index" 712 | checksum = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" 713 | dependencies = [ 714 | "ucd-util", 715 | ] 716 | 717 | [[package]] 718 | name = "remove_dir_all" 719 | version = "0.5.3" 720 | source = "registry+https://github.com/rust-lang/crates.io-index" 721 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 722 | dependencies = [ 723 | "winapi", 724 | ] 725 | 726 | [[package]] 727 | name = "reqwest" 728 | version = "0.11.6" 729 | source = "registry+https://github.com/rust-lang/crates.io-index" 730 | checksum = "66d2927ca2f685faf0fc620ac4834690d29e7abb153add10f5812eef20b5e280" 731 | dependencies = [ 732 | "base64", 733 | "bytes", 734 | "encoding_rs", 735 | "futures-core", 736 | "futures-util", 737 | "http", 738 | "http-body", 739 | "hyper", 740 | "hyper-tls", 741 | "ipnet", 742 | "js-sys", 743 | "lazy_static", 744 | "log", 745 | "mime", 746 | "native-tls", 747 | "percent-encoding", 748 | "pin-project-lite", 749 | "serde", 750 | "serde_json", 751 | "serde_urlencoded", 752 | "tokio", 753 | "tokio-native-tls", 754 | "url", 755 | "wasm-bindgen", 756 | "wasm-bindgen-futures", 757 | "web-sys", 758 | "winreg", 759 | ] 760 | 761 | [[package]] 762 | name = "ryu" 763 | version = "1.0.5" 764 | source = "registry+https://github.com/rust-lang/crates.io-index" 765 | checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" 766 | 767 | [[package]] 768 | name = "schannel" 769 | version = "0.1.19" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" 772 | dependencies = [ 773 | "lazy_static", 774 | "winapi", 775 | ] 776 | 777 | [[package]] 778 | name = "security-framework" 779 | version = "2.4.2" 780 | source = "registry+https://github.com/rust-lang/crates.io-index" 781 | checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" 782 | dependencies = [ 783 | "bitflags", 784 | "core-foundation", 785 | "core-foundation-sys", 786 | "libc", 787 | "security-framework-sys", 788 | ] 789 | 790 | [[package]] 791 | name = "security-framework-sys" 792 | version = "2.4.2" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" 795 | dependencies = [ 796 | "core-foundation-sys", 797 | "libc", 798 | ] 799 | 800 | [[package]] 801 | name = "serde" 802 | version = "1.0.130" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" 805 | dependencies = [ 806 | "serde_derive", 807 | ] 808 | 809 | [[package]] 810 | name = "serde_derive" 811 | version = "1.0.130" 812 | source = "registry+https://github.com/rust-lang/crates.io-index" 813 | checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" 814 | dependencies = [ 815 | "proc-macro2", 816 | "quote", 817 | "syn", 818 | ] 819 | 820 | [[package]] 821 | name = "serde_json" 822 | version = "1.0.68" 823 | source = "registry+https://github.com/rust-lang/crates.io-index" 824 | checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" 825 | dependencies = [ 826 | "itoa", 827 | "ryu", 828 | "serde", 829 | ] 830 | 831 | [[package]] 832 | name = "serde_urlencoded" 833 | version = "0.7.0" 834 | source = "registry+https://github.com/rust-lang/crates.io-index" 835 | checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" 836 | dependencies = [ 837 | "form_urlencoded", 838 | "itoa", 839 | "ryu", 840 | "serde", 841 | ] 842 | 843 | [[package]] 844 | name = "slab" 845 | version = "0.4.4" 846 | source = "registry+https://github.com/rust-lang/crates.io-index" 847 | checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" 848 | 849 | [[package]] 850 | name = "socket2" 851 | version = "0.4.2" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" 854 | dependencies = [ 855 | "libc", 856 | "winapi", 857 | ] 858 | 859 | [[package]] 860 | name = "syn" 861 | version = "1.0.75" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | checksum = "b7f58f7e8eaa0009c5fec437aabf511bd9933e4b2d7407bd05273c01a8906ea7" 864 | dependencies = [ 865 | "proc-macro2", 866 | "quote", 867 | "unicode-xid", 868 | ] 869 | 870 | [[package]] 871 | name = "tempfile" 872 | version = "3.2.0" 873 | source = "registry+https://github.com/rust-lang/crates.io-index" 874 | checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" 875 | dependencies = [ 876 | "cfg-if 1.0.0", 877 | "libc", 878 | "rand", 879 | "redox_syscall", 880 | "remove_dir_all", 881 | "winapi", 882 | ] 883 | 884 | [[package]] 885 | name = "thread_local" 886 | version = "0.3.6" 887 | source = "registry+https://github.com/rust-lang/crates.io-index" 888 | checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 889 | dependencies = [ 890 | "lazy_static", 891 | ] 892 | 893 | [[package]] 894 | name = "time" 895 | version = "0.1.44" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" 898 | dependencies = [ 899 | "libc", 900 | "wasi", 901 | "winapi", 902 | ] 903 | 904 | [[package]] 905 | name = "tinyvec" 906 | version = "1.3.1" 907 | source = "registry+https://github.com/rust-lang/crates.io-index" 908 | checksum = "848a1e1181b9f6753b5e96a092749e29b11d19ede67dfbbd6c7dc7e0f49b5338" 909 | dependencies = [ 910 | "tinyvec_macros", 911 | ] 912 | 913 | [[package]] 914 | name = "tinyvec_macros" 915 | version = "0.1.0" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 918 | 919 | [[package]] 920 | name = "tokio" 921 | version = "1.12.0" 922 | source = "registry+https://github.com/rust-lang/crates.io-index" 923 | checksum = "c2c2416fdedca8443ae44b4527de1ea633af61d8f7169ffa6e72c5b53d24efcc" 924 | dependencies = [ 925 | "autocfg", 926 | "bytes", 927 | "libc", 928 | "memchr", 929 | "mio", 930 | "pin-project-lite", 931 | "winapi", 932 | ] 933 | 934 | [[package]] 935 | name = "tokio-native-tls" 936 | version = "0.3.0" 937 | source = "registry+https://github.com/rust-lang/crates.io-index" 938 | checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" 939 | dependencies = [ 940 | "native-tls", 941 | "tokio", 942 | ] 943 | 944 | [[package]] 945 | name = "tokio-util" 946 | version = "0.6.8" 947 | source = "registry+https://github.com/rust-lang/crates.io-index" 948 | checksum = "08d3725d3efa29485e87311c5b699de63cde14b00ed4d256b8318aa30ca452cd" 949 | dependencies = [ 950 | "bytes", 951 | "futures-core", 952 | "futures-sink", 953 | "log", 954 | "pin-project-lite", 955 | "tokio", 956 | ] 957 | 958 | [[package]] 959 | name = "tower-service" 960 | version = "0.3.1" 961 | source = "registry+https://github.com/rust-lang/crates.io-index" 962 | checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" 963 | 964 | [[package]] 965 | name = "tracing" 966 | version = "0.1.29" 967 | source = "registry+https://github.com/rust-lang/crates.io-index" 968 | checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" 969 | dependencies = [ 970 | "cfg-if 1.0.0", 971 | "pin-project-lite", 972 | "tracing-core", 973 | ] 974 | 975 | [[package]] 976 | name = "tracing-core" 977 | version = "0.1.21" 978 | source = "registry+https://github.com/rust-lang/crates.io-index" 979 | checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" 980 | dependencies = [ 981 | "lazy_static", 982 | ] 983 | 984 | [[package]] 985 | name = "try-lock" 986 | version = "0.2.3" 987 | source = "registry+https://github.com/rust-lang/crates.io-index" 988 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" 989 | 990 | [[package]] 991 | name = "ucd-util" 992 | version = "0.1.8" 993 | source = "registry+https://github.com/rust-lang/crates.io-index" 994 | checksum = "c85f514e095d348c279b1e5cd76795082cf15bd59b93207832abe0b1d8fed236" 995 | 996 | [[package]] 997 | name = "unicode-bidi" 998 | version = "0.3.6" 999 | source = "registry+https://github.com/rust-lang/crates.io-index" 1000 | checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" 1001 | 1002 | [[package]] 1003 | name = "unicode-normalization" 1004 | version = "0.1.19" 1005 | source = "registry+https://github.com/rust-lang/crates.io-index" 1006 | checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" 1007 | dependencies = [ 1008 | "tinyvec", 1009 | ] 1010 | 1011 | [[package]] 1012 | name = "unicode-xid" 1013 | version = "0.2.2" 1014 | source = "registry+https://github.com/rust-lang/crates.io-index" 1015 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" 1016 | 1017 | [[package]] 1018 | name = "url" 1019 | version = "2.2.2" 1020 | source = "registry+https://github.com/rust-lang/crates.io-index" 1021 | checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" 1022 | dependencies = [ 1023 | "form_urlencoded", 1024 | "idna", 1025 | "matches", 1026 | "percent-encoding", 1027 | ] 1028 | 1029 | [[package]] 1030 | name = "utf8-ranges" 1031 | version = "1.0.4" 1032 | source = "registry+https://github.com/rust-lang/crates.io-index" 1033 | checksum = "b4ae116fef2b7fea257ed6440d3cfcff7f190865f170cdad00bb6465bf18ecba" 1034 | 1035 | [[package]] 1036 | name = "vcpkg" 1037 | version = "0.2.15" 1038 | source = "registry+https://github.com/rust-lang/crates.io-index" 1039 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1040 | 1041 | [[package]] 1042 | name = "want" 1043 | version = "0.3.0" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1046 | dependencies = [ 1047 | "log", 1048 | "try-lock", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "wasi" 1053 | version = "0.10.0+wasi-snapshot-preview1" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" 1056 | 1057 | [[package]] 1058 | name = "wasm-bindgen" 1059 | version = "0.2.78" 1060 | source = "registry+https://github.com/rust-lang/crates.io-index" 1061 | checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" 1062 | dependencies = [ 1063 | "cfg-if 1.0.0", 1064 | "serde", 1065 | "serde_json", 1066 | "wasm-bindgen-macro", 1067 | ] 1068 | 1069 | [[package]] 1070 | name = "wasm-bindgen-backend" 1071 | version = "0.2.78" 1072 | source = "registry+https://github.com/rust-lang/crates.io-index" 1073 | checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" 1074 | dependencies = [ 1075 | "bumpalo", 1076 | "lazy_static", 1077 | "log", 1078 | "proc-macro2", 1079 | "quote", 1080 | "syn", 1081 | "wasm-bindgen-shared", 1082 | ] 1083 | 1084 | [[package]] 1085 | name = "wasm-bindgen-futures" 1086 | version = "0.4.28" 1087 | source = "registry+https://github.com/rust-lang/crates.io-index" 1088 | checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" 1089 | dependencies = [ 1090 | "cfg-if 1.0.0", 1091 | "js-sys", 1092 | "wasm-bindgen", 1093 | "web-sys", 1094 | ] 1095 | 1096 | [[package]] 1097 | name = "wasm-bindgen-macro" 1098 | version = "0.2.78" 1099 | source = "registry+https://github.com/rust-lang/crates.io-index" 1100 | checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" 1101 | dependencies = [ 1102 | "quote", 1103 | "wasm-bindgen-macro-support", 1104 | ] 1105 | 1106 | [[package]] 1107 | name = "wasm-bindgen-macro-support" 1108 | version = "0.2.78" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" 1111 | dependencies = [ 1112 | "proc-macro2", 1113 | "quote", 1114 | "syn", 1115 | "wasm-bindgen-backend", 1116 | "wasm-bindgen-shared", 1117 | ] 1118 | 1119 | [[package]] 1120 | name = "wasm-bindgen-shared" 1121 | version = "0.2.78" 1122 | source = "registry+https://github.com/rust-lang/crates.io-index" 1123 | checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" 1124 | 1125 | [[package]] 1126 | name = "web-sys" 1127 | version = "0.3.55" 1128 | source = "registry+https://github.com/rust-lang/crates.io-index" 1129 | checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" 1130 | dependencies = [ 1131 | "js-sys", 1132 | "wasm-bindgen", 1133 | ] 1134 | 1135 | [[package]] 1136 | name = "wee_alloc" 1137 | version = "0.4.5" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" 1140 | dependencies = [ 1141 | "cfg-if 0.1.10", 1142 | "libc", 1143 | "memory_units", 1144 | "winapi", 1145 | ] 1146 | 1147 | [[package]] 1148 | name = "winapi" 1149 | version = "0.3.9" 1150 | source = "registry+https://github.com/rust-lang/crates.io-index" 1151 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1152 | dependencies = [ 1153 | "winapi-i686-pc-windows-gnu", 1154 | "winapi-x86_64-pc-windows-gnu", 1155 | ] 1156 | 1157 | [[package]] 1158 | name = "winapi-i686-pc-windows-gnu" 1159 | version = "0.4.0" 1160 | source = "registry+https://github.com/rust-lang/crates.io-index" 1161 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1162 | 1163 | [[package]] 1164 | name = "winapi-x86_64-pc-windows-gnu" 1165 | version = "0.4.0" 1166 | source = "registry+https://github.com/rust-lang/crates.io-index" 1167 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1168 | 1169 | [[package]] 1170 | name = "winreg" 1171 | version = "0.7.0" 1172 | source = "registry+https://github.com/rust-lang/crates.io-index" 1173 | checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" 1174 | dependencies = [ 1175 | "winapi", 1176 | ] 1177 | 1178 | [[package]] 1179 | name = "worker" 1180 | version = "0.0.6" 1181 | source = "git+https://github.com/Tricked-dev/workers-rs?rev=c7a238f9641dd48b504bfbcb1d0f0759a0a30dee#c7a238f9641dd48b504bfbcb1d0f0759a0a30dee" 1182 | dependencies = [ 1183 | "async-trait", 1184 | "chrono", 1185 | "chrono-tz", 1186 | "futures", 1187 | "http", 1188 | "js-sys", 1189 | "matchit", 1190 | "serde", 1191 | "serde_json", 1192 | "url", 1193 | "wasm-bindgen", 1194 | "wasm-bindgen-futures", 1195 | "worker-kv", 1196 | "worker-macros", 1197 | "worker-sys 0.0.2 (git+https://github.com/Tricked-dev/workers-rs?rev=c7a238f9641dd48b504bfbcb1d0f0759a0a30dee)", 1198 | ] 1199 | 1200 | [[package]] 1201 | name = "worker-kv" 1202 | version = "0.3.0" 1203 | source = "registry+https://github.com/rust-lang/crates.io-index" 1204 | checksum = "6efd1fb8c8e36b99d22a8f77024df57943bd79852e8842731df21292e68aaf93" 1205 | dependencies = [ 1206 | "js-sys", 1207 | "serde", 1208 | "serde_json", 1209 | "wasm-bindgen", 1210 | "wasm-bindgen-futures", 1211 | ] 1212 | 1213 | [[package]] 1214 | name = "worker-macros" 1215 | version = "0.0.2" 1216 | source = "git+https://github.com/Tricked-dev/workers-rs?rev=c7a238f9641dd48b504bfbcb1d0f0759a0a30dee#c7a238f9641dd48b504bfbcb1d0f0759a0a30dee" 1217 | dependencies = [ 1218 | "async-trait", 1219 | "proc-macro2", 1220 | "quote", 1221 | "syn", 1222 | "wasm-bindgen", 1223 | "wasm-bindgen-futures", 1224 | "wasm-bindgen-macro-support", 1225 | "worker-sys 0.0.2 (git+https://github.com/Tricked-dev/workers-rs?rev=c7a238f9641dd48b504bfbcb1d0f0759a0a30dee)", 1226 | ] 1227 | 1228 | [[package]] 1229 | name = "worker-sys" 1230 | version = "0.0.2" 1231 | source = "registry+https://github.com/rust-lang/crates.io-index" 1232 | checksum = "2bc21da4e6fea16000e4e88419fae1e0893de6c4811a276dcfbe896ffa7b53ea" 1233 | dependencies = [ 1234 | "cfg-if 0.1.10", 1235 | "js-sys", 1236 | "wasm-bindgen", 1237 | "web-sys", 1238 | ] 1239 | 1240 | [[package]] 1241 | name = "worker-sys" 1242 | version = "0.0.2" 1243 | source = "git+https://github.com/Tricked-dev/workers-rs?rev=c7a238f9641dd48b504bfbcb1d0f0759a0a30dee#c7a238f9641dd48b504bfbcb1d0f0759a0a30dee" 1244 | dependencies = [ 1245 | "cfg-if 0.1.10", 1246 | "js-sys", 1247 | "wasm-bindgen", 1248 | "web-sys", 1249 | ] 1250 | -------------------------------------------------------------------------------- /installer/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "diplo-installer" 3 | version = "0.1.0" 4 | edition = "2018" 5 | description = "Installer site for diplo" 6 | authors = ["Tricked-dev"] 7 | license = "Apache-2.0" 8 | readme = "README.md" 9 | repository = "https://github.com/Tricked-dev/diplo" 10 | homepage = "https://tricked.pro/diplo" 11 | 12 | [lib] 13 | crate-type = ["cdylib", "rlib"] 14 | 15 | [features] 16 | default = ["console_error_panic_hook"] 17 | 18 | [dependencies] 19 | cfg-if = "1.0.0" 20 | worker = { git = "https://github.com/Tricked-dev/workers-rs", rev = "c7a238f9641dd48b504bfbcb1d0f0759a0a30dee" } 21 | serde_json = "1.0.68" 22 | 23 | # The `console_error_panic_hook` crate provides better debugging of panics by 24 | # logging them with `console.error`. This is great for development, but requires 25 | # all the `std::fmt` and `std::panicking` infrastructure, so isn't great for 26 | # code size when deploying. 27 | console_error_panic_hook = { version = "0.1.7", optional = true } 28 | 29 | # `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size 30 | # compared to the default allocator's ~10K. It is slower than the default 31 | # allocator, however. 32 | wee_alloc = { version = "0.4.5", optional = true } 33 | reqwest = "0.11.6" 34 | serde = { version = "1.0.130", features = ["derive"] } 35 | worker-sys = "0.0.2" 36 | 37 | [profile.release] 38 | # Tell `rustc` to optimize for small code size. 39 | opt-level = "s" 40 | -------------------------------------------------------------------------------- /installer/README.md: -------------------------------------------------------------------------------- 1 | # Installer 2 | 3 | this is the installer for diplo made in rust with cloudflare workers! 4 | -------------------------------------------------------------------------------- /installer/src/github_struct.rs: -------------------------------------------------------------------------------- 1 | /// Generated by https://quicktype.io 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[derive(Serialize, Deserialize)] 5 | pub struct GithubResponse { 6 | #[serde(rename = "assets")] 7 | pub assets: Vec, 8 | } 9 | 10 | #[derive(Serialize, Deserialize)] 11 | pub struct Asset { 12 | #[serde(rename = "url")] 13 | pub url: String, 14 | 15 | #[serde(rename = "name")] 16 | pub name: String, 17 | 18 | pub browser_download_url: String, 19 | } 20 | 21 | #[derive(Serialize, Deserialize)] 22 | pub struct Author { 23 | #[serde(rename = "login")] 24 | login: String, 25 | 26 | #[serde(rename = "id")] 27 | id: i64, 28 | 29 | #[serde(rename = "node_id")] 30 | node_id: String, 31 | 32 | #[serde(rename = "avatar_url")] 33 | avatar_url: String, 34 | 35 | #[serde(rename = "gravatar_id")] 36 | gravatar_id: String, 37 | 38 | #[serde(rename = "url")] 39 | url: String, 40 | 41 | #[serde(rename = "html_url")] 42 | html_url: String, 43 | 44 | #[serde(rename = "followers_url")] 45 | followers_url: String, 46 | 47 | #[serde(rename = "following_url")] 48 | following_url: String, 49 | 50 | #[serde(rename = "gists_url")] 51 | gists_url: String, 52 | 53 | #[serde(rename = "starred_url")] 54 | starred_url: String, 55 | 56 | #[serde(rename = "subscriptions_url")] 57 | subscriptions_url: String, 58 | 59 | #[serde(rename = "organizations_url")] 60 | organizations_url: String, 61 | 62 | #[serde(rename = "repos_url")] 63 | repos_url: String, 64 | 65 | #[serde(rename = "events_url")] 66 | events_url: String, 67 | 68 | #[serde(rename = "received_events_url")] 69 | received_events_url: String, 70 | 71 | #[serde(rename = "type")] 72 | author_type: String, 73 | 74 | #[serde(rename = "site_admin")] 75 | site_admin: bool, 76 | } 77 | -------------------------------------------------------------------------------- /installer/src/lib.rs: -------------------------------------------------------------------------------- 1 | // use ::worker_sys::Response as EdgeResponse; 2 | 3 | 4 | use worker::{worker_sys::Response as EdgeResponse, *}; 5 | mod github_struct; 6 | mod utils; 7 | use reqwest::header::USER_AGENT; 8 | 9 | fn log_request(req: &Request) { 10 | console_log!( 11 | "{} - [{}], located at: {:?}, within: {}", 12 | Date::now().to_string(), 13 | req.path(), 14 | req.cf().coordinates().unwrap_or_default(), 15 | req.cf().region().unwrap_or_else(||"unknown region".into()) 16 | ); 17 | } 18 | 19 | #[event(fetch)] 20 | pub async fn main(req: Request, env: Env) -> Result { 21 | log_request(&req); 22 | 23 | // utils::set_panic_hook(); 24 | let router = Router::new(); 25 | router 26 | .get("/", |_, _| Response::ok("Hello from Workers!")) 27 | .get("/installer.ps1", |_, _| { 28 | Response::ok( 29 | r##"#!/usr/bin/env pwsh 30 | # Diplo installer - forked from https://deno.land/x/install/install.ps1 31 | 32 | $ErrorActionPreference = 'Stop' 33 | 34 | if ($args.Length -eq 1) { 35 | $Version = $args.Get(0) 36 | } 37 | 38 | $DiploInstall = $env:DENO_INSTALL 39 | $BinDir = if ($DiploInstall) { 40 | "$DiploInstall\bin" 41 | } else { 42 | "$Home\.diplo\bin" 43 | } 44 | 45 | $DiploZip = "$BinDir\diplo.zip" 46 | $DiploExe = "$BinDir\diplo.exe" 47 | $Target = 'x86_64-pc-windows-msvc' 48 | 49 | # GitHub requires TLS 1.2 50 | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 51 | 52 | $DiploUri = "https://diplo.tricked.pro/download/86_64-windows.zip" 53 | 54 | if (!(Test-Path $BinDir)) { 55 | New-Item $BinDir -ItemType Directory | Out-Null 56 | } 57 | 58 | Invoke-WebRequest $DiploUri -OutFile $DiploZip -UseBasicParsing 59 | 60 | if (Get-Command Expand-Archive -ErrorAction SilentlyContinue) { 61 | Expand-Archive $DiploZip -Destination $BinDir -Force 62 | } else { 63 | if (Test-Path $DiploExe) { 64 | Remove-Item $DiploExe 65 | } 66 | Add-Type -AssemblyName System.IO.Compression.FileSystem 67 | [IO.Compression.ZipFile]::ExtractToDirectory($DiploZip, $BinDir) 68 | } 69 | 70 | Remove-Item $DiploZip 71 | 72 | $User = [EnvironmentVariableTarget]::User 73 | $Path = [Environment]::GetEnvironmentVariable('Path', $User) 74 | if (!(";$Path;".ToLower() -like "*;$BinDir;*".ToLower())) { 75 | [Environment]::SetEnvironmentVariable('Path', "$Path;$BinDir", $User) 76 | $Env:Path += ";$BinDir" 77 | } 78 | 79 | Write-Output "Diplo was installed successfully to $DiploExe" 80 | Write-Output "Run 'diplo --help' to get started""##, 81 | ) 82 | }) 83 | .get_async("/download/:platform", |_req, ctx| async move { 84 | if let Some(name) = ctx.param("platform") { 85 | let client = reqwest::Client::new(); 86 | let result = client 87 | .get("https://api.github.com/repos/tricked-dev/diplo/releases/latest") 88 | .header(USER_AGENT, "cloudflare/worker") 89 | .send() 90 | .await 91 | .unwrap() 92 | .text() 93 | .await 94 | .unwrap(); 95 | 96 | let data: github_struct::GithubResponse = serde_json::from_str(&result)?; 97 | 98 | let download = match name { 99 | name if name == "86_64-windows.zip" => { 100 | let asset = data 101 | .assets 102 | .iter() 103 | .find(|s| s.name.contains("windows")) 104 | .unwrap(); 105 | &asset.browser_download_url 106 | } 107 | 108 | name if name == "86_64-macos.tar.xz" => { 109 | let asset = data 110 | .assets 111 | .iter() 112 | .find(|s| s.name.contains("macos")) 113 | .unwrap(); 114 | &asset.browser_download_url 115 | } 116 | 117 | name if name == "aarch64-linux.tar.xz" => { 118 | let asset = data 119 | .assets 120 | .iter() 121 | .find(|s| s.name.contains("aarch64-linux")) 122 | .unwrap(); 123 | &asset.browser_download_url 124 | } 125 | _ => { 126 | let asset = data 127 | .assets 128 | .iter() 129 | .find(|s| s.name.contains("86_64-linux")) 130 | .unwrap(); 131 | &asset.browser_download_url 132 | } 133 | }; 134 | 135 | return match EdgeResponse::redirect(download) { 136 | Ok(edge_response) => Ok(Response::from(edge_response)), 137 | Err(err) => Err(Error::from(err)), 138 | }; 139 | } 140 | 141 | Response::ok("Hello from Workers!") 142 | }) 143 | .get("/worker-version", |_, ctx| { 144 | let version = ctx.var("WORKERS_RS_VERSION")?.to_string(); 145 | Response::ok(version) 146 | }) 147 | .run(req, env) 148 | .await 149 | } 150 | -------------------------------------------------------------------------------- /installer/src/utils.rs: -------------------------------------------------------------------------------- 1 | use cfg_if::cfg_if; 2 | 3 | cfg_if! { 4 | // https://github.com/rustwasm/console_error_panic_hook#readme 5 | if #[cfg(feature = "console_error_panic_hook")] { 6 | extern crate console_error_panic_hook; 7 | pub use self::console_error_panic_hook::set_once as set_panic_hook; 8 | } else { 9 | #[inline] 10 | pub fn set_panic_hook() {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /installer/wrangler.toml: -------------------------------------------------------------------------------- 1 | name = "diplo-installer" 2 | type = "javascript" 3 | workers_dev = true 4 | compatibility_date = "2021-10-20" 5 | compatibility_flags = [ "formdata_parser_supports_files" ] # required 6 | 7 | [vars] 8 | WORKERS_RS_VERSION = "0.0.6" 9 | 10 | [build] 11 | command = "cargo install -q worker-build && worker-build --release" # required 12 | 13 | [build.upload] 14 | dir = "build/worker" 15 | format = "modules" 16 | main = "./shim.mjs" 17 | 18 | [[build.upload.rules]] 19 | globs = ["**/*.wasm"] 20 | type = "CompiledWasm" 21 | 22 | # read more about configuring your Worker via wrangler.toml at: 23 | # https://developers.cloudflare.com/workers/cli-wrangler/configuration 24 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | base = "docs" 3 | publish = "/public" 4 | command = "zola build" 5 | 6 | [build.environment] 7 | ZOLA_VERSION = "0.13.0" 8 | 9 | 10 | [context.deploy-preview] 11 | command = "zola build --base-url $DEPLOY_PRIME_URL" 12 | -------------------------------------------------------------------------------- /src/app.rs: -------------------------------------------------------------------------------- 1 | use crate::commands::*; 2 | use clap::{crate_authors, crate_description, crate_name, crate_version, App}; 3 | use clap::AppSettings::AllowExternalSubcommands; 4 | 5 | pub fn create_app() -> App<'static> { 6 | //Contributor note - please keep them alphabetically ordered 7 | App::new(crate_name!()) 8 | .setting(AllowExternalSubcommands) 9 | .version(crate_version!()) 10 | .author(crate_authors!()) 11 | .about(crate_description!()) 12 | .subcommand(add::cli()) 13 | .subcommand(cache::cli()) 14 | .subcommand(exec::cli()) 15 | .subcommand(init::cli()) 16 | .subcommand(install::cli()) 17 | .subcommand(run::cli()) 18 | .subcommand(update::cli()) 19 | } 20 | -------------------------------------------------------------------------------- /src/bin/diplo.rs: -------------------------------------------------------------------------------- 1 | use diplo::commands::run_default; 2 | use diplo::{app::create_app, commands::handle_match}; 3 | 4 | #[tokio::main] 5 | async fn main() -> Result<(), Box> { 6 | let app = create_app(); 7 | let matches = app.get_matches(); 8 | 9 | if matches.subcommand_name().is_some() 10 | && create_app() 11 | .find_subcommand(matches.subcommand_name().unwrap()) 12 | .is_none() 13 | { 14 | println!("test"); 15 | run_default()?; 16 | } else { 17 | handle_match(matches).await?; 18 | } 19 | 20 | Ok(()) 21 | } 22 | 23 | #[cfg(test)] 24 | mod tests { 25 | use super::*; 26 | use std::fs::{read_to_string, write}; 27 | 28 | #[tokio::test] 29 | async fn run_init() { 30 | let matches = create_app().get_matches_from(vec!["diplo", "init", "-y"]); 31 | handle_match(matches).await.unwrap() 32 | } 33 | 34 | #[cfg(not(target_os = "macos"))] 35 | #[tokio::test] 36 | async fn run_add() { 37 | handle_match(create_app().get_matches_from(vec!["diplo", "add", "natico", "discordeno"])) 38 | .await 39 | .unwrap(); 40 | handle_match(create_app().get_matches_from(vec!["diplo", "add", "--std", "fs", "ws"])) 41 | .await 42 | .unwrap(); 43 | } 44 | //For some reason macos cant reach github api? 45 | #[cfg(target_os = "macos")] 46 | #[tokio::test] 47 | async fn run_add() { 48 | handle_match(create_app().get_matches_from(vec!["diplo", "add", "natico", "discordeno"])) 49 | .await 50 | .unwrap(); 51 | } 52 | 53 | #[tokio::test] 54 | async fn run_cache() { 55 | handle_match(create_app().get_matches_from(vec!["diplo", "cache"])) 56 | .await 57 | .unwrap(); 58 | } 59 | #[tokio::test] 60 | async fn run_exec() { 61 | handle_match(create_app().get_matches_from(vec!["diplo", "exec", "ls"])) 62 | .await 63 | .unwrap(); 64 | } 65 | 66 | #[tokio::test] 67 | async fn run_update() { 68 | handle_match(create_app().get_matches_from(vec!["diplo", "update"])) 69 | .await 70 | .unwrap(); 71 | } 72 | #[tokio::test] 73 | async fn run_install() { 74 | handle_match(create_app().get_matches_from(vec!["diplo", "install"])) 75 | .await 76 | .unwrap(); 77 | } 78 | 79 | #[tokio::test] 80 | async fn run_script() { 81 | let mut data = read_to_string("diplo.toml").unwrap(); 82 | data.push_str("\ntest=\"ls -la\""); 83 | write("diplo.toml", data).unwrap(); 84 | handle_match(create_app().get_matches_from(vec!["diplo", "run", "test"])) 85 | .await 86 | .unwrap(); 87 | } 88 | 89 | //It somehow cant reach github api-servers on macos 90 | #[cfg(not(target_os = "macos"))] 91 | #[tokio::test] 92 | async fn update_some_deps() { 93 | // let mut deps: HashMap = HashMap::new(); 94 | 95 | // deps.insert( 96 | // "natico".to_owned(), 97 | // "https://deno.land/x/natico@2.3.0-rc.2/mod.ts".to_owned(), 98 | // ); 99 | // deps.insert( 100 | // "discordeno".to_owned(), 101 | // "https://deno.land/x/natico@2.3.0-rc.2/mod.ts".to_owned(), 102 | // ); 103 | // deps.insert( 104 | // "lodash".to_owned(), 105 | // "https://deno.land/x/lodash@4.17.19/dist/lodash.core.js".to_owned(), 106 | // ); 107 | // deps.insert( 108 | // "crypto".to_owned(), 109 | // "https://deno.land/std@0.111.0/node/crypto.ts".to_owned(), 110 | // ); 111 | 112 | // update_deps(&deps).await; 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /src/commands/add.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | command_prelude::*, 3 | load_config::update_config_toml, 4 | update_deno::{get_latest_std, Versions, HTTP_CLIENT}, 5 | utils::run_utils::ensure_dependencies, 6 | DIPLO_CONFIG, 7 | }; 8 | use anyhow::Result; 9 | use clap::ArgMatches; 10 | use colored::Colorize; 11 | use hyper::body::Buf; 12 | use std::fs::read_to_string; 13 | use toml_edit::{value, Document}; 14 | 15 | pub fn cli() -> App<'static> { 16 | App::new("add") 17 | .about("Add a deno.land/x/ module") 18 | .arg( 19 | Arg::new("module") 20 | .help("Deno module you want to add") 21 | .required(true) 22 | .takes_value(true) 23 | .multiple_values(true), 24 | ) 25 | .arg( 26 | Arg::new("std") 27 | .help("Add a std package") 28 | .required(false) 29 | .takes_value(false) 30 | .short('s') 31 | .long("std"), 32 | ) 33 | } 34 | 35 | pub async fn exec(sub_m: &ArgMatches) -> Result<()> { 36 | if let Some(modules) = sub_m.values_of("module") { 37 | for module in modules { 38 | if sub_m.is_present("std") { 39 | let latest_std = get_latest_std().await?; 40 | 41 | let std_module = &format!("https://deno.land/std@{}/{}/mod.ts", latest_std, module); 42 | 43 | let data = read_to_string(&*DIPLO_CONFIG); 44 | if let Ok(data) = data { 45 | let mut document = data.parse::()?; 46 | 47 | document["dependencies"][module] = value(std_module.to_string()); 48 | 49 | update_config_toml(document); 50 | println!( 51 | "Successfully added {} to the dependencies", 52 | std_module.green() 53 | ); 54 | } else { 55 | println!("Could not locate {}", &*DIPLO_CONFIG); 56 | println!("please initialize diplo with diplo init"); 57 | } 58 | } else { 59 | let res = HTTP_CLIENT 60 | .get(format!("https://cdn.deno.land/{}/meta/versions.json", &module).parse()?) 61 | .await 62 | .unwrap(); 63 | 64 | let body = hyper::body::aggregate(res).await?; 65 | 66 | let json: Result = 67 | serde_json::from_reader(body.reader()); 68 | if let Ok(json) = json { 69 | let data = read_to_string(&*DIPLO_CONFIG); 70 | if let Ok(data) = data { 71 | let mut document = data.parse::()?; 72 | 73 | document["dependencies"][(&module).to_string()] = value(format!( 74 | "https://deno.land/x/{}@{}/mod.ts", 75 | module, json.latest 76 | )); 77 | 78 | update_config_toml(document); 79 | println!( 80 | "Successfully added {}@{} to the dependencies", 81 | module.yellow(), 82 | json.latest.yellow() 83 | ) 84 | } else { 85 | println!("Could not locate {}", &*DIPLO_CONFIG); 86 | println!("please initialize diplo with diplo init"); 87 | } 88 | } else { 89 | println!("No module named {} found", module) 90 | } 91 | } 92 | } 93 | } 94 | ensure_dependencies()?; 95 | Ok(()) 96 | } 97 | -------------------------------------------------------------------------------- /src/commands/cache.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | command_prelude::*, run_utils::create_deps, utils::run_utils::get_dep_urls, CONFIG, DOTDIPLO, 3 | }; 4 | use anyhow::Result; 5 | use colored::Colorize; 6 | use serde_json::json; 7 | use std::fs::{create_dir_all, write}; 8 | 9 | pub fn cli() -> App<'static> { 10 | App::new("cache").about("Cache the dependencies") 11 | } 12 | 13 | pub fn exec() -> Result<()> { 14 | if let Some(dependencies) = &CONFIG.dependencies { 15 | create_deps(dependencies); 16 | if let Some(import_map) = CONFIG.import_map { 17 | if import_map { 18 | let import_map = get_dep_urls(); 19 | 20 | let imports = json!({ "imports": import_map }); 21 | write( 22 | format!("{}/import_map.json", &*DOTDIPLO), 23 | serde_json::to_string(&imports)?, 24 | )?; 25 | } 26 | } 27 | } 28 | if let Err(e) = create_dir_all(&*DOTDIPLO) { 29 | println!("Error while creating {}", &*DOTDIPLO.red()); 30 | println!("{}", format!("{:#?}", e).red()); 31 | return Ok(()); 32 | } 33 | 34 | println!("Successfully cached the dependencies"); 35 | 36 | Ok(()) 37 | } 38 | -------------------------------------------------------------------------------- /src/commands/exec.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | command_prelude::*, 3 | run_utils::{append_extra_args, ensure_dependencies, run_script}, 4 | utils::load_env, 5 | watcher::{get_config, DiploHandler}, 6 | CONFIG, 7 | }; 8 | use anyhow::Result; 9 | use clap::ArgMatches; 10 | use watchexec::{run::ExecHandler, watch}; 11 | 12 | pub fn cli() -> App<'static> { 13 | App::new("exec") 14 | .about("Dynamically run a command") 15 | .arg( 16 | Arg::new("command") 17 | .help("command to run") 18 | .required(true) 19 | .takes_value(true) 20 | .multiple_values(true), 21 | ) 22 | .arg( 23 | Arg::new("load env") 24 | .help("Load the environment values using the rust dotenv crate") 25 | .required(false) 26 | .takes_value(false) 27 | .short('e') 28 | .long("load_env"), 29 | ) 30 | .arg( 31 | Arg::new("watch") 32 | .help("Watch the filesystem for changes and restart on changes") 33 | .required(false) 34 | .takes_value(false) 35 | .short('w') 36 | .long("watch"), 37 | ) 38 | } 39 | 40 | pub fn exec(sub_m: &ArgMatches) -> Result<()> { 41 | if let Some(script) = sub_m.values_of("command") { 42 | let extra_args: Vec = vec![]; 43 | 44 | ensure_dependencies()?; 45 | load_env::load_env(CONFIG.load_env); 46 | 47 | let command = append_extra_args(script.collect::>().join(" "), extra_args); 48 | 49 | if sub_m.is_present("watch") { 50 | let config = get_config(&command); 51 | let handler = DiploHandler(ExecHandler::new(config)?); 52 | watch(&handler).unwrap(); 53 | } else { 54 | run_script(command)?; 55 | } 56 | } 57 | Ok(()) 58 | } 59 | -------------------------------------------------------------------------------- /src/commands/init.rs: -------------------------------------------------------------------------------- 1 | use crate::{command_prelude::*, DIPLO_CONFIG}; 2 | use anyhow::Result; 3 | use clap::ArgMatches; 4 | use colored::Colorize; 5 | use std::fs; 6 | 7 | pub fn cli() -> App<'static> { 8 | App::new("init") 9 | .about("Initialize diplo") 10 | .arg( 11 | Arg::new("yes") 12 | .help("Accept all options") 13 | .required(false) 14 | .takes_value(false) 15 | .short('y') 16 | .long("yes"), 17 | ) 18 | .arg( 19 | Arg::new("json") 20 | .help("Create a config using the json format instead of toml") 21 | .long_help("Create a config using the json format instead of toml\nThis is not recommended to do due to diplo being build with toml in mind") 22 | .required(false) 23 | .takes_value(false) 24 | .short('j') 25 | .long("json"), 26 | ) 27 | } 28 | 29 | pub fn exec(sub_m: &ArgMatches) -> Result<()> { 30 | if fs::File::open(&*DIPLO_CONFIG).is_ok() { 31 | let red = "THIS WILL RESET YOUR CONFIG".red(); 32 | println!("{}", red); 33 | } 34 | 35 | if sub_m.is_present("yes") { 36 | let data = "name= \"diplo project\"\nload_env=false\nimport_map=false\n[dependencies]\n[watcher]\n[scripts]"; 37 | println!("Successfully wrote changes to {}", &*DIPLO_CONFIG.green()); 38 | fs::write(&*DIPLO_CONFIG, data)?; 39 | } else { 40 | let name = rprompt::prompt_reply_stderr("name : ").unwrap_or_else(|_| "".to_owned()); 41 | let env = 42 | rprompt::prompt_reply_stderr("load_env (false): ").unwrap_or_else(|_| "".to_owned()); 43 | 44 | let load_env = env.contains("true"); 45 | 46 | let import = 47 | rprompt::prompt_reply_stderr("import_map (false): ").unwrap_or_else(|_| "".to_owned()); 48 | 49 | let import_map = import.contains("true"); 50 | 51 | let data = 52 | format!("name= \"{name}\"\nload_env={load_env}\nimport_map={import_map}\n[watcher]\n[dependencies]\n[scripts]",name=name,load_env=load_env, import_map = import_map ); 53 | 54 | println!("Successfully wrote changes to {}", &*DIPLO_CONFIG.green()); 55 | fs::write(&*DIPLO_CONFIG, data)?; 56 | } 57 | Ok(()) 58 | } 59 | -------------------------------------------------------------------------------- /src/commands/install.rs: -------------------------------------------------------------------------------- 1 | use crate::{command_prelude::*, run_utils::ensure_dependencies}; 2 | use anyhow::Result; 3 | 4 | pub fn cli() -> App<'static> { 5 | App::new("install").about("This creates the .diplo directory with all required files") 6 | } 7 | 8 | pub fn exec() -> Result<()> { 9 | ensure_dependencies()?; 10 | 11 | println!("Successfully initialized diplo"); 12 | 13 | Ok(()) 14 | } 15 | -------------------------------------------------------------------------------- /src/commands/mod.rs: -------------------------------------------------------------------------------- 1 | use crate::app::create_app; 2 | use crate::load_env::load_env; 3 | use anyhow::Result; 4 | use clap::ArgMatches; 5 | use colored::Colorize; 6 | use humantime::format_duration; 7 | use lazy_static::lazy_static; 8 | use std::{process, time::Instant}; 9 | lazy_static! { 10 | //Regex to replace the extra long formatting > 1ms 997us 241ns 11 | static ref REG: regex::Regex = regex::Regex::new("us (.*)ns").unwrap(); 12 | } 13 | 14 | fn print_help() -> Result<()> { 15 | create_app().print_long_help().unwrap(); 16 | Ok(()) 17 | } 18 | 19 | pub fn run_default() -> Result<()> { 20 | let data = &run::cli().get_matches(); 21 | let started = Instant::now(); 22 | let print_results = move || { 23 | let now = Instant::now(); 24 | let time = format_duration(now.duration_since(started)).to_string(); 25 | let formatted_date = format!("{}us", REG.replace(&time, "")); 26 | println!(); 27 | println!("{} Done in {}", ">".red(), formatted_date.green()); 28 | }; 29 | 30 | ctrlc::set_handler(move || { 31 | print_results(); 32 | process::exit(101) 33 | }) 34 | .unwrap_or_default(); 35 | 36 | load_env(Some(data.is_present("load_env"))); 37 | 38 | let result = run::exec(data); 39 | 40 | if result.is_ok() { 41 | print_results() 42 | } else if let Err(error) = result { 43 | println!("{}", "FATAL ERROR OCCURRED WHILE RUNNING SUBCOMMAND".red()); 44 | println!("{}", format!("{:?}", error).dimmed()); 45 | println!("{}", "PLEASE MAKE A ISSUE REPORTING THIS ERROR".red()); 46 | println!("{}", "https://github.com/Tricked-dev/diplo".bright_red()); 47 | } 48 | Ok(()) 49 | } 50 | 51 | pub async fn handle_match(data: ArgMatches) -> Result<()> { 52 | let started = Instant::now(); 53 | let print_results = move || { 54 | let now = Instant::now(); 55 | let time = format_duration(now.duration_since(started)).to_string(); 56 | let formatted_date = format!("{}us", REG.replace(&time, "")); 57 | println!(); 58 | println!("{} Done in {}", ">".red(), formatted_date.green()); 59 | }; 60 | 61 | ctrlc::set_handler(move || { 62 | print_results(); 63 | process::exit(101) 64 | }) 65 | .unwrap_or_default(); 66 | 67 | load_env(Some(data.is_present("load_env"))); 68 | 69 | //Contributor note - please keep them alphabetically ordered 70 | let result = match data.subcommand() { 71 | Some(("add", args)) => add::exec(args).await, 72 | Some(("cache", _)) => cache::exec(), 73 | Some(("exec", args)) => exec::exec(args), 74 | Some(("init", args)) => init::exec(args), 75 | Some(("install", _)) => install::exec(), 76 | Some(("run", args)) => run::exec(args), 77 | Some(("update", _)) => update::exec().await, 78 | _ => print_help(), 79 | }; 80 | if result.is_ok() { 81 | print_results() 82 | } else if let Err(error) = result { 83 | println!("{}", "FATAL ERROR OCCURRED WHILE RUNNING SUBCOMMAND".red()); 84 | println!("{}", format!("{:?}", error).dimmed()); 85 | println!("{}", "PLEASE MAKE A ISSUE REPORTING THIS ERROR".red()); 86 | println!("{}", "https://github.com/Tricked-dev/diplo".bright_red()); 87 | //TODO: add backtrace - https://github.com/rust-lang/rust/issues/53487 88 | } 89 | Ok(()) 90 | } 91 | 92 | pub mod add; 93 | pub mod cache; 94 | pub mod exec; 95 | pub mod init; 96 | pub mod install; 97 | pub mod run; 98 | pub mod update; 99 | -------------------------------------------------------------------------------- /src/commands/run.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | command_prelude::*, 3 | load_env, 4 | run_utils::{append_extra_args, ensure_dependencies, run_script}, 5 | watcher::{get_config, DiploHandler}, 6 | CONFIG, DIPLO_CONFIG, 7 | }; 8 | use anyhow::Result; 9 | use colored::Colorize; 10 | use watchexec::{run::ExecHandler, watch}; 11 | 12 | pub fn cli() -> App<'static> { 13 | App::new("run") 14 | .about("Run a diplo script") 15 | .arg( 16 | Arg::new("script") 17 | .help("The script to run defined in the diplo.json file") 18 | .required(true), 19 | ) 20 | .arg( 21 | Arg::new("load env") 22 | .help("Load the environment values using the rust dotenv crate") 23 | .required(false) 24 | .takes_value(false) 25 | .short('e') 26 | .long("load_env"), 27 | ) 28 | .arg( 29 | Arg::new("watch") 30 | .help("Watch the filesystem for changes and restart on changes") 31 | .required(false) 32 | .takes_value(false) 33 | .short('w') 34 | .long("watch"), 35 | ) 36 | } 37 | 38 | pub fn exec(sub_m: &ArgMatches) -> Result<()> { 39 | if let Some(script) = sub_m.value_of("script") { 40 | let extra_args: Vec = vec![]; 41 | 42 | ensure_dependencies()?; 43 | load_env::load_env(CONFIG.load_env); 44 | 45 | if let Some(data) = CONFIG.scripts.as_ref().unwrap().get(script) { 46 | let data_2 = append_extra_args(data.to_string(), extra_args); 47 | println!("Starting script {}", script.yellow()); 48 | println!("> {}", data.dimmed()); 49 | if sub_m.is_present("watch") { 50 | let config = get_config(&data_2); 51 | let handler = DiploHandler(ExecHandler::new(config)?); 52 | watch(&handler)?; 53 | } else { 54 | run_script(data_2)?; 55 | } 56 | 57 | return Ok(()); 58 | } 59 | println!( 60 | "Script not found please specify a script from the {} file", 61 | &*DIPLO_CONFIG.red() 62 | ) 63 | } 64 | Ok(()) 65 | } 66 | -------------------------------------------------------------------------------- /src/commands/update.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | command_prelude::*, load_config::update_config_toml, update_deno::update_deps, CONFIG, 3 | DIPLO_CONFIG, 4 | }; 5 | use anyhow::Result; 6 | 7 | use std::fs::read_to_string; 8 | use toml_edit::{value, Document}; 9 | 10 | pub fn cli() -> App<'static> { 11 | App::new("update").about("This updates all deno.land/x/ modules to their latest version") 12 | } 13 | 14 | pub async fn exec() -> Result<()> { 15 | let newdeps = update_deps(CONFIG.dependencies.as_ref().unwrap()).await; 16 | 17 | //Cant error cause it would default to json 18 | let data = read_to_string(&*DIPLO_CONFIG)?; 19 | let mut document = data.parse::()?; 20 | for (name, val) in newdeps.iter() { 21 | if let Some(exports) = &val.exports { 22 | document["dependencies"][name] = "{}".parse::().unwrap(); 23 | document["dependencies"][name]["url"] = value(&val.url); 24 | document["dependencies"][name]["exports"] = value(exports); 25 | document["dependencies"][name]["locked"] = value(val.locked); 26 | } else if val.locked { 27 | document["dependencies"][name] = "{}".parse::().unwrap(); 28 | document["dependencies"][name]["url"] = value(&val.url); 29 | document["dependencies"][name]["locked"] = value(val.locked); 30 | } else { 31 | document["dependencies"][name] = value(&val.url); 32 | } 33 | } 34 | update_config_toml(document); 35 | 36 | Ok(()) 37 | } 38 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod app; 2 | pub mod commands; 3 | pub mod load_config; 4 | pub mod update_deno; 5 | mod utils; 6 | pub mod watcher; 7 | use lazy_static::lazy_static; 8 | use load_config::{create_config, Config}; 9 | use once_cell::sync::Lazy; 10 | use std::env; 11 | use utils::*; 12 | 13 | lazy_static! { 14 | pub static ref DIPLO_CONFIG: String = init_config(); 15 | pub static ref DOTDIPLO: String = env::var("DOTDIPLO").unwrap_or_else(|_| ".diplo".to_owned()); 16 | pub static ref CONFIG: Lazy = Lazy::new(create_config); 17 | } 18 | 19 | fn init_config() -> String { 20 | let config = env::var("DIPLO_CONFIG"); 21 | if let Ok(config) = config { 22 | config 23 | } else { 24 | "diplo.toml".to_owned() 25 | } 26 | } 27 | pub mod command_prelude { 28 | pub use clap::{App, Arg, ArgMatches}; 29 | } 30 | -------------------------------------------------------------------------------- /src/load_config.rs: -------------------------------------------------------------------------------- 1 | use crate::{DIPLO_CONFIG, DOTDIPLO}; 2 | use serde::{Deserialize, Serialize}; 3 | use serde_json::Value; 4 | use std::{ 5 | collections::HashMap, 6 | fs::{create_dir_all, read_to_string, write}, 7 | }; 8 | use toml_edit::Document; 9 | 10 | #[derive(Serialize, Deserialize, Default, Clone)] 11 | pub struct Dependency { 12 | pub url: String, 13 | pub exports: Option, 14 | pub locked: bool, 15 | ///Types defined by // @deno-types="url" 16 | pub types: Option, 17 | } 18 | 19 | #[derive(Serialize, Deserialize, Default)] 20 | pub struct Config { 21 | pub name: Option, 22 | pub scripts: Option>, 23 | pub load_env: Option, 24 | pub import_map: Option, 25 | pub dependencies: Option>, 26 | pub watcher: Option, 27 | } 28 | 29 | #[derive(Serialize, Deserialize, Default)] 30 | pub struct ConfigParse { 31 | pub name: Option, 32 | pub scripts: Option>, 33 | pub load_env: Option, 34 | pub import_map: Option, 35 | pub dependencies: Option>, 36 | pub watcher: Option, 37 | } 38 | 39 | #[derive(Serialize, Deserialize)] 40 | pub struct WatcherClass { 41 | pub directory: Option, 42 | pub default_ignores: Option, 43 | pub clear: Option, 44 | pub no_ignore: Option, 45 | pub respect_gitignore: Option, 46 | } 47 | 48 | pub fn create_config() -> Config { 49 | create_dir_all(&*DOTDIPLO).unwrap(); 50 | let data = read_to_string(&*DIPLO_CONFIG); 51 | 52 | let config: ConfigParse = match data { 53 | Ok(data) => toml::from_str(&data).unwrap(), 54 | _ => ConfigParse { 55 | load_env: Some(false), 56 | import_map: Some(false), 57 | name: None, 58 | scripts: Some(HashMap::new()), 59 | dependencies: Some(HashMap::new()), 60 | watcher: None, 61 | }, 62 | }; 63 | let mut new_deps: HashMap = HashMap::new(); 64 | if let Some(deps) = config.dependencies { 65 | for (key, val) in deps.iter() { 66 | if val.is_object() { 67 | new_deps.insert( 68 | key.to_string(), 69 | Dependency { 70 | url: val["url"].as_str().unwrap().to_owned(), 71 | exports: val["exports"].as_str().map(|exports| exports.to_string()), 72 | types: val["types"].as_str().map(|types| types.to_string()), 73 | locked: val["locked"].as_bool().unwrap_or(false), 74 | }, 75 | ); 76 | } else { 77 | new_deps.insert( 78 | key.to_string(), 79 | Dependency { 80 | url: val.as_str().unwrap().to_owned(), 81 | exports: None, 82 | locked: false, 83 | types: None, 84 | }, 85 | ); 86 | } 87 | } 88 | } 89 | Config { 90 | name: config.name, 91 | scripts: config.scripts, 92 | load_env: config.load_env, 93 | import_map: config.import_map, 94 | dependencies: Some(new_deps), 95 | watcher: config.watcher, 96 | } 97 | } 98 | 99 | pub fn merge(a: &mut Value, b: Value) { 100 | match (a, b) { 101 | (a @ &mut Value::Object(_), Value::Object(b)) => { 102 | let a = a.as_object_mut().unwrap(); 103 | for (k, v) in b { 104 | merge(a.entry(k).or_insert(Value::Null), v); 105 | } 106 | } 107 | (a, b) => *a = b, 108 | } 109 | } 110 | 111 | pub fn update_config_toml(config: Document) { 112 | write(&*DIPLO_CONFIG, config.to_string()).unwrap(); 113 | } 114 | -------------------------------------------------------------------------------- /src/update_deno.rs: -------------------------------------------------------------------------------- 1 | use anyhow::{anyhow, Result}; 2 | use colored::Colorize; 3 | use hyper::{body::Buf, client::HttpConnector, Body, Client, Method, Request}; 4 | use hyper_tls::HttpsConnector; 5 | use lazy_static::lazy_static; 6 | use once_cell::sync::Lazy; 7 | use regex::Regex; 8 | use serde::{Deserialize, Serialize}; 9 | use std::collections::HashMap; 10 | 11 | use crate::load_config::Dependency; 12 | #[derive(Serialize, Deserialize)] 13 | pub struct GithubRelease { 14 | #[serde(rename = "tag_name")] 15 | tag_name: String, 16 | } 17 | 18 | #[derive(Serialize, Deserialize)] 19 | pub struct Versions { 20 | pub latest: String, 21 | } 22 | 23 | lazy_static! { 24 | //Static http client since creating one on every request isn't performant 25 | pub static ref HTTP_CLIENT: Lazy>> = Lazy::new(||{ 26 | let https = HttpsConnector::new(); 27 | Client::builder().build::<_, hyper::Body>(https) 28 | }); 29 | pub static ref PATH: Regex = Regex::new("/(.*).(ts|js)").unwrap(); 30 | pub static ref VERSION: Regex = Regex::new("@(.*)").unwrap(); 31 | } 32 | ///Takes a deno.land/x module and fetches the latest version for it!, only requires a name 33 | pub async fn get_latest_x_module(name: &str) -> Result { 34 | let url = format!("https://cdn.deno.land/{}/meta/versions.json", name) 35 | .parse::() 36 | .unwrap(); 37 | 38 | let res = HTTP_CLIENT.get(url).await?; 39 | let body = hyper::body::aggregate(res).await?; 40 | 41 | // try to parse as json with serde_json 42 | let json: Versions = serde_json::from_reader(body.reader())?; 43 | 44 | Ok(json.latest) 45 | } 46 | 47 | pub async fn get_latest_std() -> Result { 48 | let req = Request::builder() 49 | .method(Method::GET) 50 | .uri("https://api.github.com/repos/denoland/deno_std/releases/latest") 51 | //Hyper doesn't set a user-agent by default, otherwise github blocks the request 52 | .header("user-agent", "diplo/rust") 53 | .body(Body::empty()) 54 | .expect("request builder"); 55 | 56 | let res = HTTP_CLIENT.request(req).await?; 57 | 58 | let body = hyper::body::aggregate(res).await?; 59 | 60 | let json: GithubRelease = serde_json::from_reader(body.reader())?; 61 | 62 | Ok(json.tag_name) 63 | } 64 | 65 | pub async fn update_deno_std(val: String) -> Result { 66 | let part = val.replace("https://deno.land/std", ""); 67 | let part2 = PATH.captures(&part).unwrap().get(0).unwrap(); 68 | let part3 = PATH.replace(&part, ""); 69 | let ver = VERSION.captures(&part3); 70 | 71 | let version: &str; 72 | if let Some(ver) = ver { 73 | version = ver.get(1).unwrap().as_str() 74 | } else { 75 | version = "0" 76 | } 77 | let latest_std = get_latest_std().await?; 78 | if version != latest_std { 79 | println!( 80 | "updated std to {} from {}", 81 | latest_std.bold(), 82 | version.bold() 83 | ); 84 | Ok(format!( 85 | "https://deno.land/std@{}{}", 86 | latest_std, 87 | part2.as_str() 88 | )) 89 | } else { 90 | Err(anyhow!("")) 91 | } 92 | } 93 | pub async fn update_deno_x(val: String) -> Result { 94 | let part = val.replace("https://deno.land/x/", ""); 95 | let part2 = PATH.captures(&part).unwrap().get(0).unwrap(); 96 | let part3 = PATH.replace(&part, ""); 97 | let ver = VERSION.captures(&part3); 98 | let name = VERSION.replace(&part3, ""); 99 | 100 | let version: &str; 101 | if let Some(ver) = ver { 102 | version = ver.get(1).unwrap().as_str() 103 | } else { 104 | version = "0" 105 | } 106 | 107 | let new_version = get_latest_x_module(&name).await?; 108 | if version != new_version { 109 | println!( 110 | "updated {} to {} from {}", 111 | name.bold(), 112 | new_version.green(), 113 | version.red() 114 | ); 115 | Ok(format!( 116 | "https://deno.land/x/{}@{}{}", 117 | name, 118 | new_version, 119 | part2.as_str() 120 | )) 121 | } else { 122 | Err(anyhow!("")) 123 | } 124 | } 125 | 126 | pub async fn update_deps(deps: &HashMap) -> HashMap { 127 | let mut data: HashMap = HashMap::new(); 128 | for (key, val) in deps.iter() { 129 | let url = &val.url; 130 | data.insert((&key).to_string(), val.clone()); 131 | //https://cdn.deno.land/natico/meta/versions.json 132 | //https://cdn.deno.land/natico/versions/3.0.0-rc.1/meta/meta.json 133 | //https://deno.land/x/natico@3.0.0-rc.1/doc_mod.ts 134 | if !val.locked && url.contains("https://deno.land/x/") { 135 | if let Ok(result) = update_deno_x(url.clone()).await { 136 | data.insert( 137 | (&key).to_string(), 138 | Dependency { 139 | url: result, 140 | exports: val.exports.clone(), 141 | types: val.types.clone(), 142 | locked: val.locked, 143 | }, 144 | ); 145 | } 146 | } else if !val.locked && url.contains("https://deno.land/std") { 147 | if let Ok(result) = update_deno_std(url.clone()).await { 148 | data.insert( 149 | (&key).to_string(), 150 | Dependency { 151 | url: result, 152 | exports: val.exports.clone(), 153 | locked: val.locked, 154 | types: val.types.clone(), 155 | }, 156 | ); 157 | } 158 | } 159 | } 160 | data 161 | } 162 | -------------------------------------------------------------------------------- /src/utils/load_env.rs: -------------------------------------------------------------------------------- 1 | use colored::Colorize; 2 | pub fn load_env(data: Option) { 3 | if data.is_some() && dotenv::dotenv().is_err() { 4 | println!( 5 | "{} {}", 6 | ">".red().to_string(), 7 | "no .env file found continuing without loading dotenv" 8 | .dimmed() 9 | .to_string(), 10 | ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/utils/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod load_env; 2 | pub mod run_utils; 3 | -------------------------------------------------------------------------------- /src/utils/run_utils.rs: -------------------------------------------------------------------------------- 1 | use crate::{load_config::Dependency, CONFIG, DOTDIPLO}; 2 | use anyhow::Result; 3 | use serde_json::json; 4 | use std::{ 5 | collections::HashMap, 6 | fs::{create_dir_all, write}, 7 | process::Command, 8 | }; 9 | 10 | pub fn get_dep_urls() -> HashMap { 11 | let mut res = HashMap::new(); 12 | if let Some(deps) = CONFIG.dependencies.as_ref() { 13 | for (key, val) in deps.iter() { 14 | res.insert(key.to_owned(), val.url.clone()); 15 | } 16 | } 17 | 18 | res 19 | } 20 | 21 | pub fn create_deps(dependencies: &HashMap) { 22 | create_dir_all(&*DOTDIPLO).unwrap(); 23 | let mut data: Vec = vec![]; 24 | 25 | for (_key, value) in dependencies.iter() { 26 | let export = if let Some(data) = &value.exports { 27 | if data.contains('*') || data.contains('{') { 28 | data.to_owned() 29 | } else { 30 | format!("{{ {} }}", data) 31 | } 32 | } else { 33 | "*".to_owned() 34 | }; 35 | data.push(format!( 36 | "{}export {} from \"{}\"", 37 | if let Some(types) = &value.types { 38 | format!("// @deno-types=\"{}\"\n", types) 39 | } else { 40 | "".to_owned() 41 | }, 42 | export, 43 | value.url 44 | )) 45 | } 46 | data.sort(); 47 | write(format!("{}/deps.ts", &*DOTDIPLO), data.join("\n")).unwrap() 48 | } 49 | 50 | pub fn ensure_dependencies() -> Result<()> { 51 | if let Some(dependencies) = &CONFIG.dependencies { 52 | create_deps(dependencies); 53 | let import_map = get_dep_urls(); 54 | 55 | let imports = json!({ "imports": import_map }); 56 | write( 57 | format!("{}/import_map.json", &*DOTDIPLO), 58 | serde_json::to_string(&imports)?, 59 | )?; 60 | } 61 | Ok(()) 62 | } 63 | 64 | pub fn append_extra_args(input: String, extra_args: Vec) -> String { 65 | let mut data = "deno run ".to_owned(); 66 | //Allow inserting the import-map and future things 67 | data.push_str(&extra_args.join(" ")); 68 | input.replace("deno run", &data) 69 | } 70 | 71 | pub fn run_script(command: String) -> Result<()> { 72 | let mut parts = command.trim().split_whitespace(); 73 | 74 | let command = parts.next().unwrap(); 75 | 76 | let args = parts; 77 | 78 | let mut out = Command::new(command).args(args).spawn()?; 79 | 80 | if let Err(error) = out.wait() { 81 | println!("{}", error); 82 | } 83 | Ok(()) 84 | } 85 | -------------------------------------------------------------------------------- /src/watcher.rs: -------------------------------------------------------------------------------- 1 | use crate::{load_config::WatcherClass, CONFIG}; 2 | use colored::Colorize; 3 | use std::path::MAIN_SEPARATOR; 4 | use watchexec::{ 5 | config::{Config as WatchConfig, ConfigBuilder as WatchConfigBuilder}, 6 | error::Result as WatchResult, 7 | pathop::PathOp, 8 | run::{ExecHandler, Handler, OnBusyUpdate}, 9 | }; 10 | 11 | pub fn get_config(command: &str) -> WatchConfig { 12 | //Git ignores haven't yet been added so this will have to do; 13 | let default_ignores = vec![ 14 | format!("**{}.DS_Store", MAIN_SEPARATOR), 15 | String::from("*.py[co]"), 16 | String::from("#*#"), 17 | String::from(".#*"), 18 | String::from(".*.kate-swp"), 19 | String::from(".*.sw?"), 20 | String::from(".*.sw?x"), 21 | format!("node_modules{}*", MAIN_SEPARATOR), 22 | format!("**{}.git{}**", MAIN_SEPARATOR, MAIN_SEPARATOR), 23 | format!("**{}.hg{}**", MAIN_SEPARATOR, MAIN_SEPARATOR), 24 | format!("**{}.svn{}**", MAIN_SEPARATOR, MAIN_SEPARATOR), 25 | ]; 26 | let default: WatcherClass = serde_json::from_str("{}").unwrap(); 27 | let watch_config = &*CONFIG.watcher.as_ref().unwrap_or(&default); 28 | let config = WatchConfigBuilder::default() 29 | .clear_screen(watch_config.clear.unwrap_or(false)) 30 | .run_initially(true) 31 | .paths(vec![watch_config 32 | .directory 33 | .as_ref() 34 | .unwrap_or(&".".to_string()) 35 | .into()]) 36 | .cmd(vec![command.into()]) 37 | .on_busy_update(OnBusyUpdate::Restart) 38 | .ignores( 39 | if watch_config.no_ignore.unwrap_or(false) 40 | && watch_config.default_ignores.unwrap_or(true) 41 | { 42 | default_ignores 43 | } else { 44 | vec![] 45 | }, 46 | ) 47 | .build() 48 | .unwrap(); 49 | config 50 | } 51 | 52 | pub struct DiploHandler(pub ExecHandler); 53 | 54 | impl Handler for DiploHandler { 55 | fn args(&self) -> WatchConfig { 56 | self.0.args() 57 | } 58 | 59 | fn on_manual(&self) -> WatchResult { 60 | // println!("Running manually!"); 61 | self.0.on_manual() 62 | } 63 | //A file was edited 64 | fn on_update(&self, ops: &[PathOp]) -> WatchResult { 65 | // println!("Running manually {:?}", ops); 66 | println!( 67 | "{} Diplo has noticed a file change, restarting", 68 | "[i]".blue() 69 | ); 70 | self.0.on_update(ops) 71 | } 72 | } 73 | --------------------------------------------------------------------------------