├── .editorconfig ├── .github └── workflows │ ├── release-tauri.yml │ └── test-tauri.yml ├── .gitignore ├── .gitmodules ├── Cargo.lock ├── Cargo.toml ├── README.md ├── backend ├── Cargo.toml └── src │ └── main.rs ├── common ├── Cargo.toml └── src │ └── lib.rs ├── desktop ├── .eslintignore ├── .eslintrc.cjs ├── .gitignore ├── .prettierignore ├── .prettierrc ├── LICENSE ├── README.md ├── package.json ├── pnpm-lock.yaml ├── postcss.config.cjs ├── public │ └── favicon.ico ├── src-tauri │ ├── .gitignore │ ├── .taurignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── assets │ │ └── .gitkeep │ ├── build.rs │ ├── icons │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── 32x32.png │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ ├── Square30x30Logo.png │ │ ├── Square310x310Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── StoreLogo.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ ├── rustfmt.toml │ ├── src │ │ ├── build.rs │ │ ├── error.rs │ │ ├── ipc.rs │ │ ├── livereload.js │ │ ├── main.rs │ │ ├── prelude.rs │ │ ├── server.rs │ │ ├── state.rs │ │ └── utils │ │ │ ├── mod.rs │ │ │ └── zip.rs │ └── tauri.conf.json ├── src │ ├── app.css │ ├── app.d.ts │ ├── app.html │ ├── bindings │ │ ├── Link.ts │ │ └── Profile.ts │ ├── components │ │ ├── Icon.svelte │ │ ├── Spinner.svelte │ │ └── icons │ │ │ ├── github.path │ │ │ ├── logout.path │ │ │ ├── rocket.path │ │ │ └── x.path │ ├── config.ts │ ├── routes │ │ ├── +layout.svelte │ │ ├── +layout.ts │ │ ├── +page.svelte │ │ ├── export │ │ │ └── +page.svelte │ │ ├── publish │ │ │ └── github │ │ │ │ ├── +layout.svelte │ │ │ │ ├── +page.svelte │ │ │ │ ├── consts.ts │ │ │ │ ├── github-workflow.yaml │ │ │ │ ├── login │ │ │ │ └── +page.svelte │ │ │ │ └── status │ │ │ │ └── +page.svelte │ │ └── user │ │ │ └── +page.svelte │ ├── store.ts │ ├── utils.ts │ └── vite-env.d.ts ├── static │ └── favicon.png ├── svelte.config.js ├── tailwind.config.cjs ├── template │ ├── .gitignore │ ├── README.md │ ├── config.toml │ ├── sass │ │ ├── _404.scss │ │ ├── _about.scss │ │ ├── _base.scss │ │ ├── _homepage.scss │ │ ├── _mixins.scss │ │ ├── _variables.scss │ │ └── style.scss │ ├── static │ │ ├── .htaccess │ │ ├── favicon.png │ │ ├── me.jpg │ │ └── ronflex.png │ └── templates │ │ ├── 404.html │ │ ├── base.html │ │ └── index.html ├── tsconfig.json └── vite.config.ts └── frontend ├── Cargo.toml ├── index.html ├── src ├── main.rs └── pages │ ├── create.rs │ ├── index.rs │ ├── linkpage.rs │ └── mod.rs └── style.css /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_size = 2 6 | end_of_line = lf 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.rs] 12 | indent_size = 4 13 | -------------------------------------------------------------------------------- /.github/workflows/release-tauri.yml: -------------------------------------------------------------------------------- 1 | name: 'publish' 2 | on: 3 | push: 4 | branches: 5 | - release 6 | workflow_dispatch: 7 | 8 | defaults: 9 | run: 10 | working-directory: desktop 11 | 12 | jobs: 13 | publish-tauri: 14 | permissions: 15 | contents: write 16 | strategy: 17 | fail-fast: false 18 | matrix: 19 | platform: [macos-latest, ubuntu-20.04, windows-latest] 20 | 21 | runs-on: ${{ matrix.platform }} 22 | steps: 23 | - uses: actions/checkout@v3 24 | with: 25 | submodules: true 26 | - name: setup node 27 | uses: actions/setup-node@v3 28 | with: 29 | node-version: 16 30 | - name: setup pnpm 31 | uses: pnpm/action-setup@v2 32 | with: 33 | version: 6.0.2 34 | - name: install Rust stable 35 | uses: dtolnay/rust-toolchain@stable 36 | - name: install dependencies (ubuntu only) 37 | if: matrix.platform == 'ubuntu-20.04' 38 | run: | 39 | sudo apt-get update 40 | sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf 41 | - name: install frontend dependencies and build 42 | run: | 43 | pnpm install 44 | - uses: tauri-apps/tauri-action@v0 45 | env: 46 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 47 | with: 48 | tagName: weird-v__VERSION__ 49 | releaseName: 'Weird v__VERSION__' 50 | releaseBody: 'See the assets to download this version and install.' 51 | releaseDraft: true 52 | prerelease: true 53 | -------------------------------------------------------------------------------- /.github/workflows/test-tauri.yml: -------------------------------------------------------------------------------- 1 | name: 'test' 2 | on: 3 | pull_request: 4 | push: 5 | branches: 6 | - main 7 | paths: 8 | - 'desktop/**' 9 | 10 | defaults: 11 | run: 12 | working-directory: desktop 13 | 14 | jobs: 15 | test-tauri: 16 | strategy: 17 | fail-fast: false 18 | matrix: 19 | platform: [macos-latest, ubuntu-20.04, windows-latest] 20 | 21 | runs-on: ${{ matrix.platform }} 22 | steps: 23 | - uses: actions/checkout@v3 24 | with: 25 | submodules: true 26 | - name: setup node 27 | uses: actions/setup-node@v3 28 | with: 29 | node-version: 16 30 | - name: setup pnpm 31 | uses: pnpm/action-setup@v2 32 | with: 33 | version: 6.0.2 34 | - name: install Rust stable 35 | uses: dtolnay/rust-toolchain@stable 36 | - name: install dependencies (ubuntu only) 37 | if: matrix.platform == 'ubuntu-20.04' 38 | run: | 39 | sudo apt-get update 40 | sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf 41 | - name: install frontend dependencies and build 42 | run: | 43 | pnpm install 44 | - uses: tauri-apps/tauri-action@v0 45 | env: 46 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | frontend/dist/ 3 | *.db* 4 | *.log 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "desktop/zola"] 2 | path = desktop/zola 3 | url = git@github.com:getzola/zola.git 4 | -------------------------------------------------------------------------------- /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 = "ahash" 7 | version = "0.7.6" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 10 | dependencies = [ 11 | "getrandom", 12 | "once_cell", 13 | "version_check", 14 | ] 15 | 16 | [[package]] 17 | name = "ahash" 18 | version = "0.8.3" 19 | source = "registry+https://github.com/rust-lang/crates.io-index" 20 | checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" 21 | dependencies = [ 22 | "cfg-if", 23 | "once_cell", 24 | "version_check", 25 | ] 26 | 27 | [[package]] 28 | name = "async-trait" 29 | version = "0.1.68" 30 | source = "registry+https://github.com/rust-lang/crates.io-index" 31 | checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" 32 | dependencies = [ 33 | "proc-macro2", 34 | "quote", 35 | "syn 2.0.17", 36 | ] 37 | 38 | [[package]] 39 | name = "atoi" 40 | version = "1.0.0" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e" 43 | dependencies = [ 44 | "num-traits", 45 | ] 46 | 47 | [[package]] 48 | name = "autocfg" 49 | version = "1.1.0" 50 | source = "registry+https://github.com/rust-lang/crates.io-index" 51 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 52 | 53 | [[package]] 54 | name = "axum" 55 | version = "0.6.18" 56 | source = "registry+https://github.com/rust-lang/crates.io-index" 57 | checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" 58 | dependencies = [ 59 | "async-trait", 60 | "axum-core", 61 | "axum-macros", 62 | "bitflags", 63 | "bytes", 64 | "futures-util", 65 | "http", 66 | "http-body", 67 | "hyper", 68 | "itoa", 69 | "matchit", 70 | "memchr", 71 | "mime", 72 | "percent-encoding", 73 | "pin-project-lite", 74 | "rustversion", 75 | "serde", 76 | "serde_json", 77 | "serde_path_to_error", 78 | "sync_wrapper", 79 | "tokio", 80 | "tower", 81 | "tower-layer", 82 | "tower-service", 83 | ] 84 | 85 | [[package]] 86 | name = "axum-core" 87 | version = "0.3.4" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" 90 | dependencies = [ 91 | "async-trait", 92 | "bytes", 93 | "futures-util", 94 | "http", 95 | "http-body", 96 | "mime", 97 | "rustversion", 98 | "tower-layer", 99 | "tower-service", 100 | ] 101 | 102 | [[package]] 103 | name = "axum-macros" 104 | version = "0.3.7" 105 | source = "registry+https://github.com/rust-lang/crates.io-index" 106 | checksum = "2bb524613be645939e280b7279f7b017f98cf7f5ef084ec374df373530e73277" 107 | dependencies = [ 108 | "heck", 109 | "proc-macro2", 110 | "quote", 111 | "syn 2.0.17", 112 | ] 113 | 114 | [[package]] 115 | name = "backend" 116 | version = "0.1.0" 117 | dependencies = [ 118 | "axum", 119 | "common", 120 | "dotenv", 121 | "sqlx", 122 | "tokio", 123 | "tower-http", 124 | "tracing", 125 | "tracing-subscriber", 126 | ] 127 | 128 | [[package]] 129 | name = "base64" 130 | version = "0.21.2" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" 133 | 134 | [[package]] 135 | name = "bitflags" 136 | version = "1.3.2" 137 | source = "registry+https://github.com/rust-lang/crates.io-index" 138 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 139 | 140 | [[package]] 141 | name = "block-buffer" 142 | version = "0.10.4" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 145 | dependencies = [ 146 | "generic-array", 147 | ] 148 | 149 | [[package]] 150 | name = "bumpalo" 151 | version = "3.13.0" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" 154 | 155 | [[package]] 156 | name = "byteorder" 157 | version = "1.4.3" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 160 | 161 | [[package]] 162 | name = "bytes" 163 | version = "1.4.0" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" 166 | 167 | [[package]] 168 | name = "cc" 169 | version = "1.0.79" 170 | source = "registry+https://github.com/rust-lang/crates.io-index" 171 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 172 | 173 | [[package]] 174 | name = "cfg-if" 175 | version = "1.0.0" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 178 | 179 | [[package]] 180 | name = "common" 181 | version = "0.1.0" 182 | dependencies = [ 183 | "serde", 184 | "serde_json", 185 | "sqlx", 186 | ] 187 | 188 | [[package]] 189 | name = "cpufeatures" 190 | version = "0.2.7" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" 193 | dependencies = [ 194 | "libc", 195 | ] 196 | 197 | [[package]] 198 | name = "crc" 199 | version = "3.0.1" 200 | source = "registry+https://github.com/rust-lang/crates.io-index" 201 | checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" 202 | dependencies = [ 203 | "crc-catalog", 204 | ] 205 | 206 | [[package]] 207 | name = "crc-catalog" 208 | version = "2.2.0" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" 211 | 212 | [[package]] 213 | name = "crossbeam-queue" 214 | version = "0.3.8" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" 217 | dependencies = [ 218 | "cfg-if", 219 | "crossbeam-utils", 220 | ] 221 | 222 | [[package]] 223 | name = "crossbeam-utils" 224 | version = "0.8.15" 225 | source = "registry+https://github.com/rust-lang/crates.io-index" 226 | checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" 227 | dependencies = [ 228 | "cfg-if", 229 | ] 230 | 231 | [[package]] 232 | name = "crypto-common" 233 | version = "0.1.6" 234 | source = "registry+https://github.com/rust-lang/crates.io-index" 235 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 236 | dependencies = [ 237 | "generic-array", 238 | "typenum", 239 | ] 240 | 241 | [[package]] 242 | name = "digest" 243 | version = "0.10.7" 244 | source = "registry+https://github.com/rust-lang/crates.io-index" 245 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 246 | dependencies = [ 247 | "block-buffer", 248 | "crypto-common", 249 | ] 250 | 251 | [[package]] 252 | name = "dotenv" 253 | version = "0.15.0" 254 | source = "registry+https://github.com/rust-lang/crates.io-index" 255 | checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" 256 | 257 | [[package]] 258 | name = "dotenvy" 259 | version = "0.15.7" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" 262 | 263 | [[package]] 264 | name = "either" 265 | version = "1.8.1" 266 | source = "registry+https://github.com/rust-lang/crates.io-index" 267 | checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" 268 | 269 | [[package]] 270 | name = "event-listener" 271 | version = "2.5.3" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" 274 | 275 | [[package]] 276 | name = "flume" 277 | version = "0.10.14" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" 280 | dependencies = [ 281 | "futures-core", 282 | "futures-sink", 283 | "pin-project", 284 | "spin 0.9.8", 285 | ] 286 | 287 | [[package]] 288 | name = "fnv" 289 | version = "1.0.7" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 292 | 293 | [[package]] 294 | name = "form_urlencoded" 295 | version = "1.1.0" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" 298 | dependencies = [ 299 | "percent-encoding", 300 | ] 301 | 302 | [[package]] 303 | name = "frontend" 304 | version = "0.1.0" 305 | dependencies = [ 306 | "common", 307 | "reqwasm", 308 | "serde", 309 | "serde_json", 310 | "sycamore", 311 | "sycamore-router", 312 | ] 313 | 314 | [[package]] 315 | name = "futures" 316 | version = "0.3.28" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" 319 | dependencies = [ 320 | "futures-channel", 321 | "futures-core", 322 | "futures-executor", 323 | "futures-io", 324 | "futures-sink", 325 | "futures-task", 326 | "futures-util", 327 | ] 328 | 329 | [[package]] 330 | name = "futures-channel" 331 | version = "0.3.28" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" 334 | dependencies = [ 335 | "futures-core", 336 | "futures-sink", 337 | ] 338 | 339 | [[package]] 340 | name = "futures-core" 341 | version = "0.3.28" 342 | source = "registry+https://github.com/rust-lang/crates.io-index" 343 | checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" 344 | 345 | [[package]] 346 | name = "futures-executor" 347 | version = "0.3.28" 348 | source = "registry+https://github.com/rust-lang/crates.io-index" 349 | checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" 350 | dependencies = [ 351 | "futures-core", 352 | "futures-task", 353 | "futures-util", 354 | ] 355 | 356 | [[package]] 357 | name = "futures-intrusive" 358 | version = "0.4.2" 359 | source = "registry+https://github.com/rust-lang/crates.io-index" 360 | checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" 361 | dependencies = [ 362 | "futures-core", 363 | "lock_api", 364 | "parking_lot 0.11.2", 365 | ] 366 | 367 | [[package]] 368 | name = "futures-io" 369 | version = "0.3.28" 370 | source = "registry+https://github.com/rust-lang/crates.io-index" 371 | checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" 372 | 373 | [[package]] 374 | name = "futures-macro" 375 | version = "0.3.28" 376 | source = "registry+https://github.com/rust-lang/crates.io-index" 377 | checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" 378 | dependencies = [ 379 | "proc-macro2", 380 | "quote", 381 | "syn 2.0.17", 382 | ] 383 | 384 | [[package]] 385 | name = "futures-sink" 386 | version = "0.3.28" 387 | source = "registry+https://github.com/rust-lang/crates.io-index" 388 | checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" 389 | 390 | [[package]] 391 | name = "futures-task" 392 | version = "0.3.28" 393 | source = "registry+https://github.com/rust-lang/crates.io-index" 394 | checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" 395 | 396 | [[package]] 397 | name = "futures-util" 398 | version = "0.3.28" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" 401 | dependencies = [ 402 | "futures-channel", 403 | "futures-core", 404 | "futures-io", 405 | "futures-macro", 406 | "futures-sink", 407 | "futures-task", 408 | "memchr", 409 | "pin-project-lite", 410 | "pin-utils", 411 | "slab", 412 | ] 413 | 414 | [[package]] 415 | name = "generic-array" 416 | version = "0.14.7" 417 | source = "registry+https://github.com/rust-lang/crates.io-index" 418 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 419 | dependencies = [ 420 | "typenum", 421 | "version_check", 422 | ] 423 | 424 | [[package]] 425 | name = "getrandom" 426 | version = "0.2.9" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" 429 | dependencies = [ 430 | "cfg-if", 431 | "libc", 432 | "wasi", 433 | ] 434 | 435 | [[package]] 436 | name = "gloo-net" 437 | version = "0.1.0" 438 | source = "registry+https://github.com/rust-lang/crates.io-index" 439 | checksum = "2899cb1a13be9020b010967adc6b2a8a343b6f1428b90238c9d53ca24decc6db" 440 | dependencies = [ 441 | "futures-channel", 442 | "futures-core", 443 | "futures-sink", 444 | "gloo-utils", 445 | "js-sys", 446 | "pin-project", 447 | "serde", 448 | "serde_json", 449 | "thiserror", 450 | "wasm-bindgen", 451 | "wasm-bindgen-futures", 452 | "web-sys", 453 | ] 454 | 455 | [[package]] 456 | name = "gloo-utils" 457 | version = "0.1.6" 458 | source = "registry+https://github.com/rust-lang/crates.io-index" 459 | checksum = "a8e8fc851e9c7b9852508bc6e3f690f452f474417e8545ec9857b7f7377036b5" 460 | dependencies = [ 461 | "js-sys", 462 | "serde", 463 | "serde_json", 464 | "wasm-bindgen", 465 | "web-sys", 466 | ] 467 | 468 | [[package]] 469 | name = "hashbrown" 470 | version = "0.12.3" 471 | source = "registry+https://github.com/rust-lang/crates.io-index" 472 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 473 | 474 | [[package]] 475 | name = "hashbrown" 476 | version = "0.13.2" 477 | source = "registry+https://github.com/rust-lang/crates.io-index" 478 | checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" 479 | dependencies = [ 480 | "ahash 0.8.3", 481 | ] 482 | 483 | [[package]] 484 | name = "hashlink" 485 | version = "0.8.2" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "0761a1b9491c4f2e3d66aa0f62d0fba0af9a0e2852e4d48ea506632a4b56e6aa" 488 | dependencies = [ 489 | "hashbrown 0.13.2", 490 | ] 491 | 492 | [[package]] 493 | name = "heck" 494 | version = "0.4.1" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 497 | dependencies = [ 498 | "unicode-segmentation", 499 | ] 500 | 501 | [[package]] 502 | name = "hermit-abi" 503 | version = "0.2.6" 504 | source = "registry+https://github.com/rust-lang/crates.io-index" 505 | checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" 506 | dependencies = [ 507 | "libc", 508 | ] 509 | 510 | [[package]] 511 | name = "hex" 512 | version = "0.4.3" 513 | source = "registry+https://github.com/rust-lang/crates.io-index" 514 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 515 | 516 | [[package]] 517 | name = "html-escape" 518 | version = "0.2.13" 519 | source = "registry+https://github.com/rust-lang/crates.io-index" 520 | checksum = "6d1ad449764d627e22bfd7cd5e8868264fc9236e07c752972b4080cd351cb476" 521 | dependencies = [ 522 | "utf8-width", 523 | ] 524 | 525 | [[package]] 526 | name = "http" 527 | version = "0.2.9" 528 | source = "registry+https://github.com/rust-lang/crates.io-index" 529 | checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" 530 | dependencies = [ 531 | "bytes", 532 | "fnv", 533 | "itoa", 534 | ] 535 | 536 | [[package]] 537 | name = "http-body" 538 | version = "0.4.5" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 541 | dependencies = [ 542 | "bytes", 543 | "http", 544 | "pin-project-lite", 545 | ] 546 | 547 | [[package]] 548 | name = "http-range-header" 549 | version = "0.3.0" 550 | source = "registry+https://github.com/rust-lang/crates.io-index" 551 | checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" 552 | 553 | [[package]] 554 | name = "httparse" 555 | version = "1.8.0" 556 | source = "registry+https://github.com/rust-lang/crates.io-index" 557 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 558 | 559 | [[package]] 560 | name = "httpdate" 561 | version = "1.0.2" 562 | source = "registry+https://github.com/rust-lang/crates.io-index" 563 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 564 | 565 | [[package]] 566 | name = "hyper" 567 | version = "0.14.26" 568 | source = "registry+https://github.com/rust-lang/crates.io-index" 569 | checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" 570 | dependencies = [ 571 | "bytes", 572 | "futures-channel", 573 | "futures-core", 574 | "futures-util", 575 | "http", 576 | "http-body", 577 | "httparse", 578 | "httpdate", 579 | "itoa", 580 | "pin-project-lite", 581 | "socket2", 582 | "tokio", 583 | "tower-service", 584 | "tracing", 585 | "want", 586 | ] 587 | 588 | [[package]] 589 | name = "idna" 590 | version = "0.3.0" 591 | source = "registry+https://github.com/rust-lang/crates.io-index" 592 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 593 | dependencies = [ 594 | "unicode-bidi", 595 | "unicode-normalization", 596 | ] 597 | 598 | [[package]] 599 | name = "indexmap" 600 | version = "1.9.3" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 603 | dependencies = [ 604 | "autocfg", 605 | "hashbrown 0.12.3", 606 | ] 607 | 608 | [[package]] 609 | name = "instant" 610 | version = "0.1.12" 611 | source = "registry+https://github.com/rust-lang/crates.io-index" 612 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 613 | dependencies = [ 614 | "cfg-if", 615 | ] 616 | 617 | [[package]] 618 | name = "itertools" 619 | version = "0.10.5" 620 | source = "registry+https://github.com/rust-lang/crates.io-index" 621 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 622 | dependencies = [ 623 | "either", 624 | ] 625 | 626 | [[package]] 627 | name = "itoa" 628 | version = "1.0.6" 629 | source = "registry+https://github.com/rust-lang/crates.io-index" 630 | checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" 631 | 632 | [[package]] 633 | name = "js-sys" 634 | version = "0.3.63" 635 | source = "registry+https://github.com/rust-lang/crates.io-index" 636 | checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" 637 | dependencies = [ 638 | "wasm-bindgen", 639 | ] 640 | 641 | [[package]] 642 | name = "lazy_static" 643 | version = "1.4.0" 644 | source = "registry+https://github.com/rust-lang/crates.io-index" 645 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 646 | 647 | [[package]] 648 | name = "libc" 649 | version = "0.2.144" 650 | source = "registry+https://github.com/rust-lang/crates.io-index" 651 | checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" 652 | 653 | [[package]] 654 | name = "libsqlite3-sys" 655 | version = "0.24.2" 656 | source = "registry+https://github.com/rust-lang/crates.io-index" 657 | checksum = "898745e570c7d0453cc1fbc4a701eb6c662ed54e8fec8b7d14be137ebeeb9d14" 658 | dependencies = [ 659 | "cc", 660 | "pkg-config", 661 | "vcpkg", 662 | ] 663 | 664 | [[package]] 665 | name = "lock_api" 666 | version = "0.4.9" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 669 | dependencies = [ 670 | "autocfg", 671 | "scopeguard", 672 | ] 673 | 674 | [[package]] 675 | name = "log" 676 | version = "0.4.17" 677 | source = "registry+https://github.com/rust-lang/crates.io-index" 678 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 679 | dependencies = [ 680 | "cfg-if", 681 | ] 682 | 683 | [[package]] 684 | name = "matchers" 685 | version = "0.1.0" 686 | source = "registry+https://github.com/rust-lang/crates.io-index" 687 | checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" 688 | dependencies = [ 689 | "regex-automata", 690 | ] 691 | 692 | [[package]] 693 | name = "matchit" 694 | version = "0.7.0" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" 697 | 698 | [[package]] 699 | name = "memchr" 700 | version = "2.5.0" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 703 | 704 | [[package]] 705 | name = "mime" 706 | version = "0.3.17" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 709 | 710 | [[package]] 711 | name = "minimal-lexical" 712 | version = "0.2.1" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 715 | 716 | [[package]] 717 | name = "mio" 718 | version = "0.8.6" 719 | source = "registry+https://github.com/rust-lang/crates.io-index" 720 | checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" 721 | dependencies = [ 722 | "libc", 723 | "log", 724 | "wasi", 725 | "windows-sys 0.45.0", 726 | ] 727 | 728 | [[package]] 729 | name = "nom" 730 | version = "7.1.3" 731 | source = "registry+https://github.com/rust-lang/crates.io-index" 732 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 733 | dependencies = [ 734 | "memchr", 735 | "minimal-lexical", 736 | ] 737 | 738 | [[package]] 739 | name = "nu-ansi-term" 740 | version = "0.46.0" 741 | source = "registry+https://github.com/rust-lang/crates.io-index" 742 | checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" 743 | dependencies = [ 744 | "overload", 745 | "winapi", 746 | ] 747 | 748 | [[package]] 749 | name = "num-traits" 750 | version = "0.2.15" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 753 | dependencies = [ 754 | "autocfg", 755 | ] 756 | 757 | [[package]] 758 | name = "num_cpus" 759 | version = "1.15.0" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" 762 | dependencies = [ 763 | "hermit-abi", 764 | "libc", 765 | ] 766 | 767 | [[package]] 768 | name = "once_cell" 769 | version = "1.17.1" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" 772 | 773 | [[package]] 774 | name = "overload" 775 | version = "0.1.1" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 778 | 779 | [[package]] 780 | name = "parking_lot" 781 | version = "0.11.2" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 784 | dependencies = [ 785 | "instant", 786 | "lock_api", 787 | "parking_lot_core 0.8.6", 788 | ] 789 | 790 | [[package]] 791 | name = "parking_lot" 792 | version = "0.12.1" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 795 | dependencies = [ 796 | "lock_api", 797 | "parking_lot_core 0.9.7", 798 | ] 799 | 800 | [[package]] 801 | name = "parking_lot_core" 802 | version = "0.8.6" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" 805 | dependencies = [ 806 | "cfg-if", 807 | "instant", 808 | "libc", 809 | "redox_syscall", 810 | "smallvec", 811 | "winapi", 812 | ] 813 | 814 | [[package]] 815 | name = "parking_lot_core" 816 | version = "0.9.7" 817 | source = "registry+https://github.com/rust-lang/crates.io-index" 818 | checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" 819 | dependencies = [ 820 | "cfg-if", 821 | "libc", 822 | "redox_syscall", 823 | "smallvec", 824 | "windows-sys 0.45.0", 825 | ] 826 | 827 | [[package]] 828 | name = "paste" 829 | version = "1.0.12" 830 | source = "registry+https://github.com/rust-lang/crates.io-index" 831 | checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" 832 | 833 | [[package]] 834 | name = "percent-encoding" 835 | version = "2.2.0" 836 | source = "registry+https://github.com/rust-lang/crates.io-index" 837 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 838 | 839 | [[package]] 840 | name = "pin-project" 841 | version = "1.1.0" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" 844 | dependencies = [ 845 | "pin-project-internal", 846 | ] 847 | 848 | [[package]] 849 | name = "pin-project-internal" 850 | version = "1.1.0" 851 | source = "registry+https://github.com/rust-lang/crates.io-index" 852 | checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" 853 | dependencies = [ 854 | "proc-macro2", 855 | "quote", 856 | "syn 2.0.17", 857 | ] 858 | 859 | [[package]] 860 | name = "pin-project-lite" 861 | version = "0.2.9" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 864 | 865 | [[package]] 866 | name = "pin-utils" 867 | version = "0.1.0" 868 | source = "registry+https://github.com/rust-lang/crates.io-index" 869 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 870 | 871 | [[package]] 872 | name = "pkg-config" 873 | version = "0.3.27" 874 | source = "registry+https://github.com/rust-lang/crates.io-index" 875 | checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" 876 | 877 | [[package]] 878 | name = "proc-macro2" 879 | version = "1.0.59" 880 | source = "registry+https://github.com/rust-lang/crates.io-index" 881 | checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" 882 | dependencies = [ 883 | "unicode-ident", 884 | ] 885 | 886 | [[package]] 887 | name = "quote" 888 | version = "1.0.28" 889 | source = "registry+https://github.com/rust-lang/crates.io-index" 890 | checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" 891 | dependencies = [ 892 | "proc-macro2", 893 | ] 894 | 895 | [[package]] 896 | name = "redox_syscall" 897 | version = "0.2.16" 898 | source = "registry+https://github.com/rust-lang/crates.io-index" 899 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 900 | dependencies = [ 901 | "bitflags", 902 | ] 903 | 904 | [[package]] 905 | name = "regex" 906 | version = "1.8.3" 907 | source = "registry+https://github.com/rust-lang/crates.io-index" 908 | checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390" 909 | dependencies = [ 910 | "regex-syntax 0.7.2", 911 | ] 912 | 913 | [[package]] 914 | name = "regex-automata" 915 | version = "0.1.10" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 918 | dependencies = [ 919 | "regex-syntax 0.6.29", 920 | ] 921 | 922 | [[package]] 923 | name = "regex-syntax" 924 | version = "0.6.29" 925 | source = "registry+https://github.com/rust-lang/crates.io-index" 926 | checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" 927 | 928 | [[package]] 929 | name = "regex-syntax" 930 | version = "0.7.2" 931 | source = "registry+https://github.com/rust-lang/crates.io-index" 932 | checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" 933 | 934 | [[package]] 935 | name = "reqwasm" 936 | version = "0.5.0" 937 | source = "registry+https://github.com/rust-lang/crates.io-index" 938 | checksum = "05b89870d729c501fa7a68c43bf4d938bbb3a8c156d333d90faa0e8b3e3212fb" 939 | dependencies = [ 940 | "gloo-net", 941 | ] 942 | 943 | [[package]] 944 | name = "ring" 945 | version = "0.16.20" 946 | source = "registry+https://github.com/rust-lang/crates.io-index" 947 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 948 | dependencies = [ 949 | "cc", 950 | "libc", 951 | "once_cell", 952 | "spin 0.5.2", 953 | "untrusted", 954 | "web-sys", 955 | "winapi", 956 | ] 957 | 958 | [[package]] 959 | name = "rustls" 960 | version = "0.20.8" 961 | source = "registry+https://github.com/rust-lang/crates.io-index" 962 | checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" 963 | dependencies = [ 964 | "log", 965 | "ring", 966 | "sct", 967 | "webpki", 968 | ] 969 | 970 | [[package]] 971 | name = "rustls-pemfile" 972 | version = "1.0.2" 973 | source = "registry+https://github.com/rust-lang/crates.io-index" 974 | checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" 975 | dependencies = [ 976 | "base64", 977 | ] 978 | 979 | [[package]] 980 | name = "rustversion" 981 | version = "1.0.12" 982 | source = "registry+https://github.com/rust-lang/crates.io-index" 983 | checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" 984 | 985 | [[package]] 986 | name = "ryu" 987 | version = "1.0.13" 988 | source = "registry+https://github.com/rust-lang/crates.io-index" 989 | checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" 990 | 991 | [[package]] 992 | name = "scopeguard" 993 | version = "1.1.0" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 996 | 997 | [[package]] 998 | name = "sct" 999 | version = "0.7.0" 1000 | source = "registry+https://github.com/rust-lang/crates.io-index" 1001 | checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" 1002 | dependencies = [ 1003 | "ring", 1004 | "untrusted", 1005 | ] 1006 | 1007 | [[package]] 1008 | name = "serde" 1009 | version = "1.0.163" 1010 | source = "registry+https://github.com/rust-lang/crates.io-index" 1011 | checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" 1012 | dependencies = [ 1013 | "serde_derive", 1014 | ] 1015 | 1016 | [[package]] 1017 | name = "serde_derive" 1018 | version = "1.0.163" 1019 | source = "registry+https://github.com/rust-lang/crates.io-index" 1020 | checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" 1021 | dependencies = [ 1022 | "proc-macro2", 1023 | "quote", 1024 | "syn 2.0.17", 1025 | ] 1026 | 1027 | [[package]] 1028 | name = "serde_json" 1029 | version = "1.0.96" 1030 | source = "registry+https://github.com/rust-lang/crates.io-index" 1031 | checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" 1032 | dependencies = [ 1033 | "itoa", 1034 | "ryu", 1035 | "serde", 1036 | ] 1037 | 1038 | [[package]] 1039 | name = "serde_path_to_error" 1040 | version = "0.1.11" 1041 | source = "registry+https://github.com/rust-lang/crates.io-index" 1042 | checksum = "f7f05c1d5476066defcdfacce1f52fc3cae3af1d3089727100c02ae92e5abbe0" 1043 | dependencies = [ 1044 | "serde", 1045 | ] 1046 | 1047 | [[package]] 1048 | name = "sha2" 1049 | version = "0.10.6" 1050 | source = "registry+https://github.com/rust-lang/crates.io-index" 1051 | checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" 1052 | dependencies = [ 1053 | "cfg-if", 1054 | "cpufeatures", 1055 | "digest", 1056 | ] 1057 | 1058 | [[package]] 1059 | name = "sharded-slab" 1060 | version = "0.1.4" 1061 | source = "registry+https://github.com/rust-lang/crates.io-index" 1062 | checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" 1063 | dependencies = [ 1064 | "lazy_static", 1065 | ] 1066 | 1067 | [[package]] 1068 | name = "signal-hook-registry" 1069 | version = "1.4.1" 1070 | source = "registry+https://github.com/rust-lang/crates.io-index" 1071 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 1072 | dependencies = [ 1073 | "libc", 1074 | ] 1075 | 1076 | [[package]] 1077 | name = "slab" 1078 | version = "0.4.8" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" 1081 | dependencies = [ 1082 | "autocfg", 1083 | ] 1084 | 1085 | [[package]] 1086 | name = "slotmap" 1087 | version = "1.0.6" 1088 | source = "registry+https://github.com/rust-lang/crates.io-index" 1089 | checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" 1090 | dependencies = [ 1091 | "version_check", 1092 | ] 1093 | 1094 | [[package]] 1095 | name = "smallvec" 1096 | version = "1.10.0" 1097 | source = "registry+https://github.com/rust-lang/crates.io-index" 1098 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1099 | 1100 | [[package]] 1101 | name = "socket2" 1102 | version = "0.4.9" 1103 | source = "registry+https://github.com/rust-lang/crates.io-index" 1104 | checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" 1105 | dependencies = [ 1106 | "libc", 1107 | "winapi", 1108 | ] 1109 | 1110 | [[package]] 1111 | name = "spin" 1112 | version = "0.5.2" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 1115 | 1116 | [[package]] 1117 | name = "spin" 1118 | version = "0.9.8" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 1121 | dependencies = [ 1122 | "lock_api", 1123 | ] 1124 | 1125 | [[package]] 1126 | name = "sqlformat" 1127 | version = "0.2.1" 1128 | source = "registry+https://github.com/rust-lang/crates.io-index" 1129 | checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" 1130 | dependencies = [ 1131 | "itertools", 1132 | "nom", 1133 | "unicode_categories", 1134 | ] 1135 | 1136 | [[package]] 1137 | name = "sqlx" 1138 | version = "0.6.3" 1139 | source = "registry+https://github.com/rust-lang/crates.io-index" 1140 | checksum = "f8de3b03a925878ed54a954f621e64bf55a3c1bd29652d0d1a17830405350188" 1141 | dependencies = [ 1142 | "sqlx-core", 1143 | "sqlx-macros", 1144 | ] 1145 | 1146 | [[package]] 1147 | name = "sqlx-core" 1148 | version = "0.6.3" 1149 | source = "registry+https://github.com/rust-lang/crates.io-index" 1150 | checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" 1151 | dependencies = [ 1152 | "ahash 0.7.6", 1153 | "atoi", 1154 | "bitflags", 1155 | "byteorder", 1156 | "bytes", 1157 | "crc", 1158 | "crossbeam-queue", 1159 | "dotenvy", 1160 | "either", 1161 | "event-listener", 1162 | "flume", 1163 | "futures-channel", 1164 | "futures-core", 1165 | "futures-executor", 1166 | "futures-intrusive", 1167 | "futures-util", 1168 | "hashlink", 1169 | "hex", 1170 | "indexmap", 1171 | "itoa", 1172 | "libc", 1173 | "libsqlite3-sys", 1174 | "log", 1175 | "memchr", 1176 | "once_cell", 1177 | "paste", 1178 | "percent-encoding", 1179 | "rustls", 1180 | "rustls-pemfile", 1181 | "serde", 1182 | "serde_json", 1183 | "sha2", 1184 | "smallvec", 1185 | "sqlformat", 1186 | "sqlx-rt", 1187 | "stringprep", 1188 | "thiserror", 1189 | "tokio-stream", 1190 | "url", 1191 | "webpki-roots", 1192 | ] 1193 | 1194 | [[package]] 1195 | name = "sqlx-macros" 1196 | version = "0.6.3" 1197 | source = "registry+https://github.com/rust-lang/crates.io-index" 1198 | checksum = "9966e64ae989e7e575b19d7265cb79d7fc3cbbdf179835cb0d716f294c2049c9" 1199 | dependencies = [ 1200 | "dotenvy", 1201 | "either", 1202 | "heck", 1203 | "once_cell", 1204 | "proc-macro2", 1205 | "quote", 1206 | "serde_json", 1207 | "sha2", 1208 | "sqlx-core", 1209 | "sqlx-rt", 1210 | "syn 1.0.109", 1211 | "url", 1212 | ] 1213 | 1214 | [[package]] 1215 | name = "sqlx-rt" 1216 | version = "0.6.3" 1217 | source = "registry+https://github.com/rust-lang/crates.io-index" 1218 | checksum = "804d3f245f894e61b1e6263c84b23ca675d96753b5abfd5cc8597d86806e8024" 1219 | dependencies = [ 1220 | "once_cell", 1221 | "tokio", 1222 | "tokio-rustls", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "stringprep" 1227 | version = "0.1.2" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" 1230 | dependencies = [ 1231 | "unicode-bidi", 1232 | "unicode-normalization", 1233 | ] 1234 | 1235 | [[package]] 1236 | name = "sycamore" 1237 | version = "0.8.2" 1238 | source = "registry+https://github.com/rust-lang/crates.io-index" 1239 | checksum = "67817393b3c9828db84614f64db9a1ebb94729ce3a3751c41e7ff23d3f8e7f00" 1240 | dependencies = [ 1241 | "ahash 0.7.6", 1242 | "futures", 1243 | "indexmap", 1244 | "js-sys", 1245 | "paste", 1246 | "sycamore-core", 1247 | "sycamore-futures", 1248 | "sycamore-macro", 1249 | "sycamore-reactive", 1250 | "sycamore-web", 1251 | "wasm-bindgen", 1252 | "wasm-bindgen-futures", 1253 | "web-sys", 1254 | ] 1255 | 1256 | [[package]] 1257 | name = "sycamore-core" 1258 | version = "0.8.2" 1259 | source = "registry+https://github.com/rust-lang/crates.io-index" 1260 | checksum = "2dce7f0440c5ea2b74a544deb5423708c023fade36e63515423d3f3ab5e1a998" 1261 | dependencies = [ 1262 | "ahash 0.7.6", 1263 | "sycamore-reactive", 1264 | ] 1265 | 1266 | [[package]] 1267 | name = "sycamore-futures" 1268 | version = "0.8.0" 1269 | source = "registry+https://github.com/rust-lang/crates.io-index" 1270 | checksum = "a69e4f2b65a22059f711cb36adc454791248e9abdc0b6b04c5dda396098674f2" 1271 | dependencies = [ 1272 | "futures", 1273 | "sycamore-reactive", 1274 | "tokio", 1275 | "wasm-bindgen-futures", 1276 | ] 1277 | 1278 | [[package]] 1279 | name = "sycamore-macro" 1280 | version = "0.8.2" 1281 | source = "registry+https://github.com/rust-lang/crates.io-index" 1282 | checksum = "8f3abd3f402c1a943cf70860b91a40c79c713e269156445998dbfd647deac8a5" 1283 | dependencies = [ 1284 | "once_cell", 1285 | "proc-macro2", 1286 | "quote", 1287 | "syn 1.0.109", 1288 | ] 1289 | 1290 | [[package]] 1291 | name = "sycamore-reactive" 1292 | version = "0.8.1" 1293 | source = "registry+https://github.com/rust-lang/crates.io-index" 1294 | checksum = "6376b578ad32f5f3ab6943bccec906fb0e1f0258a8bedf811afdec8c3330ef80" 1295 | dependencies = [ 1296 | "ahash 0.7.6", 1297 | "bumpalo", 1298 | "indexmap", 1299 | "serde", 1300 | "slotmap", 1301 | "smallvec", 1302 | ] 1303 | 1304 | [[package]] 1305 | name = "sycamore-router" 1306 | version = "0.8.0" 1307 | source = "registry+https://github.com/rust-lang/crates.io-index" 1308 | checksum = "123b34a150dac877d7bfae82dadfb0c586fd35a8f5fcdf1721dafa079fdc4c40" 1309 | dependencies = [ 1310 | "sycamore", 1311 | "sycamore-router-macro", 1312 | "wasm-bindgen", 1313 | "web-sys", 1314 | ] 1315 | 1316 | [[package]] 1317 | name = "sycamore-router-macro" 1318 | version = "0.8.0" 1319 | source = "registry+https://github.com/rust-lang/crates.io-index" 1320 | checksum = "92914a2f809b636d245b28d8a734801ecb8ff9c4996bbe6ea4176582e12503eb" 1321 | dependencies = [ 1322 | "nom", 1323 | "proc-macro2", 1324 | "quote", 1325 | "syn 1.0.109", 1326 | "unicode-xid", 1327 | ] 1328 | 1329 | [[package]] 1330 | name = "sycamore-web" 1331 | version = "0.8.2" 1332 | source = "registry+https://github.com/rust-lang/crates.io-index" 1333 | checksum = "6db9520735f765e60718df8125eb27db19b990bed1116c9b3e8aae374dde1fe8" 1334 | dependencies = [ 1335 | "html-escape", 1336 | "indexmap", 1337 | "js-sys", 1338 | "once_cell", 1339 | "sycamore-core", 1340 | "sycamore-reactive", 1341 | "wasm-bindgen", 1342 | "web-sys", 1343 | ] 1344 | 1345 | [[package]] 1346 | name = "syn" 1347 | version = "1.0.109" 1348 | source = "registry+https://github.com/rust-lang/crates.io-index" 1349 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 1350 | dependencies = [ 1351 | "proc-macro2", 1352 | "quote", 1353 | "unicode-ident", 1354 | ] 1355 | 1356 | [[package]] 1357 | name = "syn" 1358 | version = "2.0.17" 1359 | source = "registry+https://github.com/rust-lang/crates.io-index" 1360 | checksum = "45b6ddbb36c5b969c182aec3c4a0bce7df3fbad4b77114706a49aacc80567388" 1361 | dependencies = [ 1362 | "proc-macro2", 1363 | "quote", 1364 | "unicode-ident", 1365 | ] 1366 | 1367 | [[package]] 1368 | name = "sync_wrapper" 1369 | version = "0.1.2" 1370 | source = "registry+https://github.com/rust-lang/crates.io-index" 1371 | checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" 1372 | 1373 | [[package]] 1374 | name = "thiserror" 1375 | version = "1.0.40" 1376 | source = "registry+https://github.com/rust-lang/crates.io-index" 1377 | checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" 1378 | dependencies = [ 1379 | "thiserror-impl", 1380 | ] 1381 | 1382 | [[package]] 1383 | name = "thiserror-impl" 1384 | version = "1.0.40" 1385 | source = "registry+https://github.com/rust-lang/crates.io-index" 1386 | checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" 1387 | dependencies = [ 1388 | "proc-macro2", 1389 | "quote", 1390 | "syn 2.0.17", 1391 | ] 1392 | 1393 | [[package]] 1394 | name = "thread_local" 1395 | version = "1.1.7" 1396 | source = "registry+https://github.com/rust-lang/crates.io-index" 1397 | checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" 1398 | dependencies = [ 1399 | "cfg-if", 1400 | "once_cell", 1401 | ] 1402 | 1403 | [[package]] 1404 | name = "tinyvec" 1405 | version = "1.6.0" 1406 | source = "registry+https://github.com/rust-lang/crates.io-index" 1407 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1408 | dependencies = [ 1409 | "tinyvec_macros", 1410 | ] 1411 | 1412 | [[package]] 1413 | name = "tinyvec_macros" 1414 | version = "0.1.1" 1415 | source = "registry+https://github.com/rust-lang/crates.io-index" 1416 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1417 | 1418 | [[package]] 1419 | name = "tokio" 1420 | version = "1.28.1" 1421 | source = "registry+https://github.com/rust-lang/crates.io-index" 1422 | checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" 1423 | dependencies = [ 1424 | "autocfg", 1425 | "bytes", 1426 | "libc", 1427 | "mio", 1428 | "num_cpus", 1429 | "parking_lot 0.12.1", 1430 | "pin-project-lite", 1431 | "signal-hook-registry", 1432 | "socket2", 1433 | "tokio-macros", 1434 | "windows-sys 0.48.0", 1435 | ] 1436 | 1437 | [[package]] 1438 | name = "tokio-macros" 1439 | version = "2.1.0" 1440 | source = "registry+https://github.com/rust-lang/crates.io-index" 1441 | checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" 1442 | dependencies = [ 1443 | "proc-macro2", 1444 | "quote", 1445 | "syn 2.0.17", 1446 | ] 1447 | 1448 | [[package]] 1449 | name = "tokio-rustls" 1450 | version = "0.23.4" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" 1453 | dependencies = [ 1454 | "rustls", 1455 | "tokio", 1456 | "webpki", 1457 | ] 1458 | 1459 | [[package]] 1460 | name = "tokio-stream" 1461 | version = "0.1.14" 1462 | source = "registry+https://github.com/rust-lang/crates.io-index" 1463 | checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" 1464 | dependencies = [ 1465 | "futures-core", 1466 | "pin-project-lite", 1467 | "tokio", 1468 | ] 1469 | 1470 | [[package]] 1471 | name = "tower" 1472 | version = "0.4.13" 1473 | source = "registry+https://github.com/rust-lang/crates.io-index" 1474 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 1475 | dependencies = [ 1476 | "futures-core", 1477 | "futures-util", 1478 | "pin-project", 1479 | "pin-project-lite", 1480 | "tokio", 1481 | "tower-layer", 1482 | "tower-service", 1483 | ] 1484 | 1485 | [[package]] 1486 | name = "tower-http" 1487 | version = "0.4.0" 1488 | source = "registry+https://github.com/rust-lang/crates.io-index" 1489 | checksum = "5d1d42a9b3f3ec46ba828e8d376aec14592ea199f70a06a548587ecd1c4ab658" 1490 | dependencies = [ 1491 | "bitflags", 1492 | "bytes", 1493 | "futures-core", 1494 | "futures-util", 1495 | "http", 1496 | "http-body", 1497 | "http-range-header", 1498 | "pin-project-lite", 1499 | "tower-layer", 1500 | "tower-service", 1501 | ] 1502 | 1503 | [[package]] 1504 | name = "tower-layer" 1505 | version = "0.3.2" 1506 | source = "registry+https://github.com/rust-lang/crates.io-index" 1507 | checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" 1508 | 1509 | [[package]] 1510 | name = "tower-service" 1511 | version = "0.3.2" 1512 | source = "registry+https://github.com/rust-lang/crates.io-index" 1513 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 1514 | 1515 | [[package]] 1516 | name = "tracing" 1517 | version = "0.1.37" 1518 | source = "registry+https://github.com/rust-lang/crates.io-index" 1519 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 1520 | dependencies = [ 1521 | "cfg-if", 1522 | "pin-project-lite", 1523 | "tracing-attributes", 1524 | "tracing-core", 1525 | ] 1526 | 1527 | [[package]] 1528 | name = "tracing-attributes" 1529 | version = "0.1.24" 1530 | source = "registry+https://github.com/rust-lang/crates.io-index" 1531 | checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" 1532 | dependencies = [ 1533 | "proc-macro2", 1534 | "quote", 1535 | "syn 2.0.17", 1536 | ] 1537 | 1538 | [[package]] 1539 | name = "tracing-core" 1540 | version = "0.1.31" 1541 | source = "registry+https://github.com/rust-lang/crates.io-index" 1542 | checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" 1543 | dependencies = [ 1544 | "once_cell", 1545 | "valuable", 1546 | ] 1547 | 1548 | [[package]] 1549 | name = "tracing-log" 1550 | version = "0.1.3" 1551 | source = "registry+https://github.com/rust-lang/crates.io-index" 1552 | checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" 1553 | dependencies = [ 1554 | "lazy_static", 1555 | "log", 1556 | "tracing-core", 1557 | ] 1558 | 1559 | [[package]] 1560 | name = "tracing-subscriber" 1561 | version = "0.3.17" 1562 | source = "registry+https://github.com/rust-lang/crates.io-index" 1563 | checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" 1564 | dependencies = [ 1565 | "matchers", 1566 | "nu-ansi-term", 1567 | "once_cell", 1568 | "regex", 1569 | "sharded-slab", 1570 | "smallvec", 1571 | "thread_local", 1572 | "tracing", 1573 | "tracing-core", 1574 | "tracing-log", 1575 | ] 1576 | 1577 | [[package]] 1578 | name = "try-lock" 1579 | version = "0.2.4" 1580 | source = "registry+https://github.com/rust-lang/crates.io-index" 1581 | checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" 1582 | 1583 | [[package]] 1584 | name = "typenum" 1585 | version = "1.16.0" 1586 | source = "registry+https://github.com/rust-lang/crates.io-index" 1587 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 1588 | 1589 | [[package]] 1590 | name = "unicode-bidi" 1591 | version = "0.3.13" 1592 | source = "registry+https://github.com/rust-lang/crates.io-index" 1593 | checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 1594 | 1595 | [[package]] 1596 | name = "unicode-ident" 1597 | version = "1.0.9" 1598 | source = "registry+https://github.com/rust-lang/crates.io-index" 1599 | checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" 1600 | 1601 | [[package]] 1602 | name = "unicode-normalization" 1603 | version = "0.1.22" 1604 | source = "registry+https://github.com/rust-lang/crates.io-index" 1605 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 1606 | dependencies = [ 1607 | "tinyvec", 1608 | ] 1609 | 1610 | [[package]] 1611 | name = "unicode-segmentation" 1612 | version = "1.10.1" 1613 | source = "registry+https://github.com/rust-lang/crates.io-index" 1614 | checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" 1615 | 1616 | [[package]] 1617 | name = "unicode-xid" 1618 | version = "0.2.4" 1619 | source = "registry+https://github.com/rust-lang/crates.io-index" 1620 | checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" 1621 | 1622 | [[package]] 1623 | name = "unicode_categories" 1624 | version = "0.1.1" 1625 | source = "registry+https://github.com/rust-lang/crates.io-index" 1626 | checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" 1627 | 1628 | [[package]] 1629 | name = "untrusted" 1630 | version = "0.7.1" 1631 | source = "registry+https://github.com/rust-lang/crates.io-index" 1632 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 1633 | 1634 | [[package]] 1635 | name = "url" 1636 | version = "2.3.1" 1637 | source = "registry+https://github.com/rust-lang/crates.io-index" 1638 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" 1639 | dependencies = [ 1640 | "form_urlencoded", 1641 | "idna", 1642 | "percent-encoding", 1643 | ] 1644 | 1645 | [[package]] 1646 | name = "utf8-width" 1647 | version = "0.1.6" 1648 | source = "registry+https://github.com/rust-lang/crates.io-index" 1649 | checksum = "5190c9442dcdaf0ddd50f37420417d219ae5261bbf5db120d0f9bab996c9cba1" 1650 | 1651 | [[package]] 1652 | name = "valuable" 1653 | version = "0.1.0" 1654 | source = "registry+https://github.com/rust-lang/crates.io-index" 1655 | checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" 1656 | 1657 | [[package]] 1658 | name = "vcpkg" 1659 | version = "0.2.15" 1660 | source = "registry+https://github.com/rust-lang/crates.io-index" 1661 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1662 | 1663 | [[package]] 1664 | name = "version_check" 1665 | version = "0.9.4" 1666 | source = "registry+https://github.com/rust-lang/crates.io-index" 1667 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1668 | 1669 | [[package]] 1670 | name = "want" 1671 | version = "0.3.0" 1672 | source = "registry+https://github.com/rust-lang/crates.io-index" 1673 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1674 | dependencies = [ 1675 | "log", 1676 | "try-lock", 1677 | ] 1678 | 1679 | [[package]] 1680 | name = "wasi" 1681 | version = "0.11.0+wasi-snapshot-preview1" 1682 | source = "registry+https://github.com/rust-lang/crates.io-index" 1683 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1684 | 1685 | [[package]] 1686 | name = "wasm-bindgen" 1687 | version = "0.2.86" 1688 | source = "registry+https://github.com/rust-lang/crates.io-index" 1689 | checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" 1690 | dependencies = [ 1691 | "cfg-if", 1692 | "serde", 1693 | "serde_json", 1694 | "wasm-bindgen-macro", 1695 | ] 1696 | 1697 | [[package]] 1698 | name = "wasm-bindgen-backend" 1699 | version = "0.2.86" 1700 | source = "registry+https://github.com/rust-lang/crates.io-index" 1701 | checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" 1702 | dependencies = [ 1703 | "bumpalo", 1704 | "log", 1705 | "once_cell", 1706 | "proc-macro2", 1707 | "quote", 1708 | "syn 2.0.17", 1709 | "wasm-bindgen-shared", 1710 | ] 1711 | 1712 | [[package]] 1713 | name = "wasm-bindgen-futures" 1714 | version = "0.4.36" 1715 | source = "registry+https://github.com/rust-lang/crates.io-index" 1716 | checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" 1717 | dependencies = [ 1718 | "cfg-if", 1719 | "js-sys", 1720 | "wasm-bindgen", 1721 | "web-sys", 1722 | ] 1723 | 1724 | [[package]] 1725 | name = "wasm-bindgen-macro" 1726 | version = "0.2.86" 1727 | source = "registry+https://github.com/rust-lang/crates.io-index" 1728 | checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" 1729 | dependencies = [ 1730 | "quote", 1731 | "wasm-bindgen-macro-support", 1732 | ] 1733 | 1734 | [[package]] 1735 | name = "wasm-bindgen-macro-support" 1736 | version = "0.2.86" 1737 | source = "registry+https://github.com/rust-lang/crates.io-index" 1738 | checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" 1739 | dependencies = [ 1740 | "proc-macro2", 1741 | "quote", 1742 | "syn 2.0.17", 1743 | "wasm-bindgen-backend", 1744 | "wasm-bindgen-shared", 1745 | ] 1746 | 1747 | [[package]] 1748 | name = "wasm-bindgen-shared" 1749 | version = "0.2.86" 1750 | source = "registry+https://github.com/rust-lang/crates.io-index" 1751 | checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" 1752 | 1753 | [[package]] 1754 | name = "web-sys" 1755 | version = "0.3.63" 1756 | source = "registry+https://github.com/rust-lang/crates.io-index" 1757 | checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" 1758 | dependencies = [ 1759 | "js-sys", 1760 | "wasm-bindgen", 1761 | ] 1762 | 1763 | [[package]] 1764 | name = "webpki" 1765 | version = "0.22.0" 1766 | source = "registry+https://github.com/rust-lang/crates.io-index" 1767 | checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" 1768 | dependencies = [ 1769 | "ring", 1770 | "untrusted", 1771 | ] 1772 | 1773 | [[package]] 1774 | name = "webpki-roots" 1775 | version = "0.22.6" 1776 | source = "registry+https://github.com/rust-lang/crates.io-index" 1777 | checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" 1778 | dependencies = [ 1779 | "webpki", 1780 | ] 1781 | 1782 | [[package]] 1783 | name = "winapi" 1784 | version = "0.3.9" 1785 | source = "registry+https://github.com/rust-lang/crates.io-index" 1786 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1787 | dependencies = [ 1788 | "winapi-i686-pc-windows-gnu", 1789 | "winapi-x86_64-pc-windows-gnu", 1790 | ] 1791 | 1792 | [[package]] 1793 | name = "winapi-i686-pc-windows-gnu" 1794 | version = "0.4.0" 1795 | source = "registry+https://github.com/rust-lang/crates.io-index" 1796 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1797 | 1798 | [[package]] 1799 | name = "winapi-x86_64-pc-windows-gnu" 1800 | version = "0.4.0" 1801 | source = "registry+https://github.com/rust-lang/crates.io-index" 1802 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1803 | 1804 | [[package]] 1805 | name = "windows-sys" 1806 | version = "0.45.0" 1807 | source = "registry+https://github.com/rust-lang/crates.io-index" 1808 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 1809 | dependencies = [ 1810 | "windows-targets 0.42.2", 1811 | ] 1812 | 1813 | [[package]] 1814 | name = "windows-sys" 1815 | version = "0.48.0" 1816 | source = "registry+https://github.com/rust-lang/crates.io-index" 1817 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 1818 | dependencies = [ 1819 | "windows-targets 0.48.0", 1820 | ] 1821 | 1822 | [[package]] 1823 | name = "windows-targets" 1824 | version = "0.42.2" 1825 | source = "registry+https://github.com/rust-lang/crates.io-index" 1826 | checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 1827 | dependencies = [ 1828 | "windows_aarch64_gnullvm 0.42.2", 1829 | "windows_aarch64_msvc 0.42.2", 1830 | "windows_i686_gnu 0.42.2", 1831 | "windows_i686_msvc 0.42.2", 1832 | "windows_x86_64_gnu 0.42.2", 1833 | "windows_x86_64_gnullvm 0.42.2", 1834 | "windows_x86_64_msvc 0.42.2", 1835 | ] 1836 | 1837 | [[package]] 1838 | name = "windows-targets" 1839 | version = "0.48.0" 1840 | source = "registry+https://github.com/rust-lang/crates.io-index" 1841 | checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" 1842 | dependencies = [ 1843 | "windows_aarch64_gnullvm 0.48.0", 1844 | "windows_aarch64_msvc 0.48.0", 1845 | "windows_i686_gnu 0.48.0", 1846 | "windows_i686_msvc 0.48.0", 1847 | "windows_x86_64_gnu 0.48.0", 1848 | "windows_x86_64_gnullvm 0.48.0", 1849 | "windows_x86_64_msvc 0.48.0", 1850 | ] 1851 | 1852 | [[package]] 1853 | name = "windows_aarch64_gnullvm" 1854 | version = "0.42.2" 1855 | source = "registry+https://github.com/rust-lang/crates.io-index" 1856 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 1857 | 1858 | [[package]] 1859 | name = "windows_aarch64_gnullvm" 1860 | version = "0.48.0" 1861 | source = "registry+https://github.com/rust-lang/crates.io-index" 1862 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 1863 | 1864 | [[package]] 1865 | name = "windows_aarch64_msvc" 1866 | version = "0.42.2" 1867 | source = "registry+https://github.com/rust-lang/crates.io-index" 1868 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 1869 | 1870 | [[package]] 1871 | name = "windows_aarch64_msvc" 1872 | version = "0.48.0" 1873 | source = "registry+https://github.com/rust-lang/crates.io-index" 1874 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 1875 | 1876 | [[package]] 1877 | name = "windows_i686_gnu" 1878 | version = "0.42.2" 1879 | source = "registry+https://github.com/rust-lang/crates.io-index" 1880 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 1881 | 1882 | [[package]] 1883 | name = "windows_i686_gnu" 1884 | version = "0.48.0" 1885 | source = "registry+https://github.com/rust-lang/crates.io-index" 1886 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 1887 | 1888 | [[package]] 1889 | name = "windows_i686_msvc" 1890 | version = "0.42.2" 1891 | source = "registry+https://github.com/rust-lang/crates.io-index" 1892 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 1893 | 1894 | [[package]] 1895 | name = "windows_i686_msvc" 1896 | version = "0.48.0" 1897 | source = "registry+https://github.com/rust-lang/crates.io-index" 1898 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 1899 | 1900 | [[package]] 1901 | name = "windows_x86_64_gnu" 1902 | version = "0.42.2" 1903 | source = "registry+https://github.com/rust-lang/crates.io-index" 1904 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 1905 | 1906 | [[package]] 1907 | name = "windows_x86_64_gnu" 1908 | version = "0.48.0" 1909 | source = "registry+https://github.com/rust-lang/crates.io-index" 1910 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 1911 | 1912 | [[package]] 1913 | name = "windows_x86_64_gnullvm" 1914 | version = "0.42.2" 1915 | source = "registry+https://github.com/rust-lang/crates.io-index" 1916 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 1917 | 1918 | [[package]] 1919 | name = "windows_x86_64_gnullvm" 1920 | version = "0.48.0" 1921 | source = "registry+https://github.com/rust-lang/crates.io-index" 1922 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 1923 | 1924 | [[package]] 1925 | name = "windows_x86_64_msvc" 1926 | version = "0.42.2" 1927 | source = "registry+https://github.com/rust-lang/crates.io-index" 1928 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 1929 | 1930 | [[package]] 1931 | name = "windows_x86_64_msvc" 1932 | version = "0.48.0" 1933 | source = "registry+https://github.com/rust-lang/crates.io-index" 1934 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 1935 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "backend", 4 | "frontend", 5 | "common" 6 | ] 7 | exclude = [ 8 | "desktop" 9 | ] 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Weird web page generator 2 | 3 | ![sample-linkpage](https://user-images.githubusercontent.com/583842/217551090-19bdf42a-8f5f-44be-a343-ef9b9891a759.png) 4 | 5 | https://blog.erlend.sh/weird-web-pages 6 | 7 | > #### Websites as the atomic matter of the internet 8 | > 9 | > I consider the personal website to be the smallest possible building block of web identity. Once you wanna go past the observer (READ) level to the contributor (WRITE) level as a netizen, you’re gonna need a material web-persona to make yourself known. 10 | 11 | > The size of the internet can be measured in the atomic mass of the websites it's made up of. We collectively materialize the internet with every additional web page we create. 12 | 13 | ## Current state 14 | 15 | 'Project Weird' has gone through several prototypical iterations over the past year. Our latest iteration – with which it feels like we're finally building on a firm foundation – is a local-first application built with Tauri + Svelte for the local-first frontend, and Zola for site generation. 16 | 17 | This work is happening within the [`desktop`](https://github.com/commune-os/weird/tree/main/desktop) folder. 18 | 19 | `common`, `backend` and `frontend` are all part of an inactive legacy app ([demo](https://nate-sys.github.io/links-app-perseus/)) that was cloud-first and made with Axum + Sycamore. Both the cloud and the Rust web dev stack have a place in Weird's future, but not in the MVP stage. 20 | -------------------------------------------------------------------------------- /backend/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "backend" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | axum = { version ="0.6.4", default-features = false, features = ["http1", "json", "macros", "tokio"] } 10 | dotenv = "0.15.0" 11 | sqlx = { version = "0.6.2", features = ["sqlite", "runtime-tokio-rustls", "json"] } 12 | tokio = { version = "1.25.0", features = ["full"] } 13 | tracing = "0.1.37" 14 | tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } 15 | common = { path = "../common" } 16 | tower-http = { version = "0.4.0", features = ["cors"] } 17 | -------------------------------------------------------------------------------- /backend/src/main.rs: -------------------------------------------------------------------------------- 1 | use axum::{ 2 | extract::{Path, State}, 3 | http::{Method, StatusCode}, 4 | response::IntoResponse, 5 | routing::{get, post}, 6 | Json, Router, 7 | }; 8 | 9 | use sqlx::{migrate::MigrateDatabase, Sqlite, SqlitePool}; 10 | 11 | use std::net::SocketAddr; 12 | use tower_http::cors::{Any, CorsLayer}; 13 | use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; 14 | 15 | use common::Link; 16 | 17 | const DB_URL: &str = "sqlite:weird.db"; 18 | 19 | #[tokio::main] 20 | async fn main() { 21 | dotenv::dotenv().ok(); 22 | tracing_subscriber::registry() 23 | .with( 24 | tracing_subscriber::EnvFilter::try_from_default_env() 25 | .unwrap_or_else(|_| "backend=debug".into()), 26 | ) 27 | .with(tracing_subscriber::fmt::layer()) 28 | .init(); 29 | 30 | if !Sqlite::database_exists(DB_URL).await.unwrap_or(false) { 31 | println!("Creating database {}", DB_URL); 32 | match Sqlite::create_database(DB_URL).await { 33 | Ok(_) => println!("Create db success"), 34 | Err(error) => panic!("error: {}", error), 35 | } 36 | } else { 37 | println!("Database already exists"); 38 | } 39 | 40 | let conn = SqlitePool::connect(DB_URL).await.unwrap(); 41 | 42 | let _create_table = sqlx::query( 43 | r#" 44 | CREATE TABLE links ( 45 | url TEXT PRIMARY KEY NOT NULL, 46 | title TEXT NOT NULL, 47 | github_username TEXT NOT NULL 48 | ); 49 | "#, 50 | ) 51 | .execute(&conn) 52 | .await; 53 | 54 | let app = Router::new() 55 | .route("/:github_username", get(get_page)) 56 | .route("/create", post(create_page)) 57 | .layer( 58 | CorsLayer::new() 59 | .allow_origin(Any) 60 | .allow_methods([Method::GET, Method::POST]) 61 | .allow_headers(Any), 62 | ) 63 | .with_state(conn); 64 | 65 | let addr = SocketAddr::from(([127, 0, 0, 1], 3000)); 66 | tracing::debug!("listening on {}", addr); 67 | axum::Server::bind(&addr) 68 | .serve(app.into_make_service()) 69 | .await 70 | .unwrap(); 71 | } 72 | 73 | async fn get_page( 74 | Path(github_username): Path, 75 | State(pool): State, 76 | ) -> impl IntoResponse { 77 | let page = sqlx::query_as::<_, Link>("SELECT * FROM links WHERE github_username = ?") 78 | .bind(&github_username) 79 | .fetch_all(&pool) 80 | .await 81 | .map_err(internal_error); 82 | 83 | (StatusCode::OK, axum::Json(page.unwrap())) 84 | } 85 | 86 | #[axum::debug_handler] 87 | async fn create_page( 88 | State(pool): State, 89 | Json(links): Json>, 90 | ) -> impl IntoResponse { 91 | for link in links.iter() { 92 | _ = sqlx::query_as::<_, Link>( 93 | "INSERT INTO links (url, title, github_username) VALUES (?1, ?2, ?3)", 94 | ) 95 | .bind(&link.url) 96 | .bind(&link.title) 97 | .bind(&link.github_username) 98 | .fetch_one(&pool) 99 | .await 100 | .map_err(internal_error); 101 | } 102 | 103 | ( 104 | StatusCode::CREATED, 105 | format!("Created page for {}", links[0].github_username), 106 | ) 107 | } 108 | 109 | fn internal_error(err: E) -> (StatusCode, String) 110 | where 111 | E: std::error::Error, 112 | { 113 | (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()) 114 | } 115 | -------------------------------------------------------------------------------- /common/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "common" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | serde = { version = "1.0.152", features = ["derive"] } 10 | serde_json = "1.0.91" 11 | 12 | [target.'cfg(not(target_arch = "wasm32"))'.dependencies] 13 | sqlx = { version = "0.6.2", features = ["sqlite", "any", "runtime-tokio-rustls", "json"] } 14 | -------------------------------------------------------------------------------- /common/src/lib.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] 4 | #[cfg_attr(not(target_arch = "wasm32"), derive(sqlx::FromRow))] 5 | pub struct Link { 6 | pub title: String, 7 | pub url: String, 8 | pub github_username: String, 9 | } 10 | -------------------------------------------------------------------------------- /desktop/.eslintignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | build 4 | dist 5 | .svelte-kit 6 | /package 7 | src-tauri 8 | 9 | .env 10 | .env.* 11 | !.env.example 12 | 13 | # Ignore files for PNPM, NPM and YARN 14 | pnpm-lock.yaml 15 | package-lock.json 16 | yarn.lock 17 | -------------------------------------------------------------------------------- /desktop/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: '@typescript-eslint/parser', 4 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], 5 | plugins: ['svelte3', '@typescript-eslint'], 6 | ignorePatterns: ['*.cjs'], 7 | overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], 8 | settings: { 9 | 'svelte3/typescript': true, 10 | }, 11 | parserOptions: { 12 | sourceType: 'module', 13 | ecmaVersion: 2020, 14 | }, 15 | env: { 16 | browser: true, 17 | es2017: true, 18 | }, 19 | } 20 | -------------------------------------------------------------------------------- /desktop/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | build 4 | .svelte-kit 5 | .env 6 | 7 | *.log 8 | vite.config.js.timestamp-* 9 | vite.config.ts.timestamp-* 10 | -------------------------------------------------------------------------------- /desktop/.prettierignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | build 4 | dist 5 | .svelte-kit 6 | /package 7 | /src-tauri 8 | 9 | .env 10 | .env.* 11 | !.env.example 12 | 13 | # Ignore files for PNPM, NPM and YARN 14 | pnpm-lock.yaml 15 | package-lock.json 16 | yarn.lock 17 | -------------------------------------------------------------------------------- /desktop/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/prettierrc", 3 | "trailingComma": "es5", 4 | "tabWidth": 2, 5 | "semi": false, 6 | "singleQuote": true 7 | } 8 | -------------------------------------------------------------------------------- /desktop/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Commune 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /desktop/README.md: -------------------------------------------------------------------------------- 1 | # weird-tauri 2 | 3 | Local-first website generator. 4 | 5 | ## Building 6 | ### Dependencies 7 | 8 | - cargo (rust toolchain) 9 | - pnpm 10 | 11 | ### Steps 12 | 13 | ```sh 14 | git clone https://github.com/commune-os/weird.git 15 | cd weird/desktop 16 | git submodule update --init zola 17 | # install dependencies 18 | pnpm install 19 | # create a release build 20 | pnpm run tauri build 21 | ./src-tauri/target/weird 22 | ``` 23 | -------------------------------------------------------------------------------- /desktop/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "weird-tauri", 3 | "version": "0.3.2", 4 | "type": "module", 5 | "scripts": { 6 | "dev": "vite dev", 7 | "build": "vite build", 8 | "preview": "vite preview", 9 | "check": "svelte-check --tsconfig ./tsconfig.json", 10 | "lint": "prettier --plugin-search-dir . --check . && eslint .", 11 | "format": "prettier --plugin-search-dir . --write .", 12 | "tauri": "tauri" 13 | }, 14 | "devDependencies": { 15 | "@octokit/rest": "^19.0.11", 16 | "@sveltejs/adapter-static": "^2.0.1", 17 | "@sveltejs/kit": "^1.5.0", 18 | "@tauri-apps/api": "^1.1.0", 19 | "@tauri-apps/cli": "^1.1.1", 20 | "@typescript-eslint/eslint-plugin": "^5.57.1", 21 | "@typescript-eslint/parser": "^5.57.1", 22 | "autoprefixer": "^10.3.7", 23 | "cssnano": "^5.0.8", 24 | "daisyui": "^2.51.6", 25 | "eslint": "^8.37.0", 26 | "eslint-plugin-svelte3": "^4.0.0", 27 | "isomorphic-fetch": "^3.0.0", 28 | "postcss": "^8.4.16", 29 | "postcss-load-config": "^3.1.0", 30 | "prettier": "^2.8.7", 31 | "prettier-plugin-svelte": "^2.10.0", 32 | "svelte": "^3.54.0", 33 | "svelte-check": "^3.0.1", 34 | "tailwindcss": "^3.1.8", 35 | "tslib": "^2.4.1", 36 | "typescript": "^5.0.0", 37 | "vite": "^4.2.0", 38 | "@types/debounce": "^1.2.1", 39 | "debounce": "^1.2.1" 40 | }, 41 | "description": "Local-first website generator.", 42 | "main": "index.js", 43 | "license": "MIT" 44 | } 45 | -------------------------------------------------------------------------------- /desktop/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | const tailwindcss = require('tailwindcss') 2 | const autoprefixer = require('autoprefixer') 3 | const cssnano = require('cssnano') 4 | 5 | const mode = process.env.NODE_ENV 6 | const dev = mode === 'development' 7 | 8 | const config = { 9 | plugins: [ 10 | //Some plugins, like tailwindcss/nesting, need to run before Tailwind, 11 | tailwindcss(), 12 | //But others, like autoprefixer, need to run after, 13 | autoprefixer(), 14 | !dev && 15 | cssnano({ 16 | preset: 'default', 17 | }), 18 | ], 19 | } 20 | 21 | module.exports = config 22 | -------------------------------------------------------------------------------- /desktop/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/public/favicon.ico -------------------------------------------------------------------------------- /desktop/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | WixTools 5 | assets/template.zip 6 | -------------------------------------------------------------------------------- /desktop/src-tauri/.taurignore: -------------------------------------------------------------------------------- 1 | assets/ 2 | -------------------------------------------------------------------------------- /desktop/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "weird" 3 | version = "0.3.2" 4 | description = "Local-first website generator." 5 | authors = ["Noah Too "] 6 | license = "MIT" 7 | repository = "https://github.com/commune-os/weird-tauri" 8 | default-run = "weird" 9 | edition = "2021" 10 | rust-version = "1.59" 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [build-dependencies] 15 | tauri-build = { version = "1.4.0", features = [] } 16 | walkdir = "2.3.3" 17 | zip = { version = "0.6.4", default-features = false, features = ["deflate", "time"] } 18 | 19 | [dependencies] 20 | serde_json = "1.0.95" 21 | serde = { version = "1.0.159", features = ["derive"] } 22 | log = "0.4.17" 23 | walkdir = "2.3.3" 24 | thiserror = "1.0.40" 25 | ts-rs = "6.2.0" 26 | mime_guess = "2.0.4" 27 | tracing-subscriber = "0.3.17" 28 | tiny_http = "0.12.0" 29 | base64 = "0.21.2" 30 | tracing = "0.1.37" 31 | notify = "6.0.1" 32 | toml = "0.7.6" 33 | 34 | # Zola 35 | site = { path = "../zola/components/site" } 36 | errors = { path = "../zola/components/errors" } 37 | libs = { path = "../zola/components/libs" } 38 | config = { path = "../zola/components/config" } 39 | 40 | [dependencies.tauri] 41 | version = "1.4.1" 42 | features = [ 43 | "clipboard-write-text", 44 | "dialog", 45 | "http-request", 46 | "reqwest-client", 47 | "window-close", 48 | "window-create", 49 | "window-show" 50 | ] 51 | 52 | [dependencies.zip] 53 | version = "0.6.4" 54 | default-features = false 55 | features = ["deflate", "time"] 56 | 57 | [features] 58 | default = ["custom-protocol"] 59 | custom-protocol = ["tauri/custom-protocol"] 60 | -------------------------------------------------------------------------------- /desktop/src-tauri/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/assets/.gitkeep -------------------------------------------------------------------------------- /desktop/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | use std::path::Path; 2 | 3 | #[path = "./src/utils/zip.rs"] 4 | mod utils; 5 | 6 | fn main() { 7 | generate_zip(); 8 | tauri_build::build() 9 | } 10 | 11 | fn generate_zip() { 12 | let path = Path::new(file!()).parent().unwrap(); 13 | let src_dir = path.join("../template").to_str().unwrap().to_owned(); 14 | let dst_file = path 15 | .join("./assets/template.zip") 16 | .to_str() 17 | .unwrap() 18 | .to_owned(); 19 | if let Err(e) = utils::zip_dir(&src_dir, &dst_file, zip::CompressionMethod::Deflated) { 20 | println!("cargo:warning=Could not create template.zip: {e}") 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /desktop/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /desktop/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /desktop/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /desktop/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /desktop/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /desktop/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /desktop/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /desktop/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /desktop/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /desktop/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /desktop/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /desktop/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /desktop/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /desktop/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /desktop/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /desktop/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muni-town/weird-legacy/ad24a9b09399b0e134e529940df6ef663984a28a/desktop/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /desktop/src-tauri/rustfmt.toml: -------------------------------------------------------------------------------- 1 | # Using defaults as defined at https://github.com/rust-lang/rustfmt/blob/master/Configurations.md 2 | 3 | -------------------------------------------------------------------------------- /desktop/src-tauri/src/build.rs: -------------------------------------------------------------------------------- 1 | use std::path::{Path, PathBuf}; 2 | 3 | use log::debug; 4 | use site::Site; 5 | 6 | use crate::prelude::*; 7 | 8 | pub fn build_site( 9 | root_dir: &Path, 10 | output_dir: &PathBuf, 11 | base_url: Option<&str>, 12 | config_file: &Path, 13 | ) -> Result<()> { 14 | // copy the css file 15 | let css_file = if output_dir.clone().join("css/style.css").is_file() { 16 | "css/style.css" 17 | } else { 18 | "style.css" 19 | }; 20 | let css_path = output_dir.clone().join(css_file); 21 | let cache_path = config_file.parent().unwrap().join(css_file); 22 | if css_path.is_file() { 23 | std::fs::copy(&css_path, &cache_path).ok(); 24 | } 25 | let mut site = Site::new(root_dir, config_file)?; 26 | 27 | if let Some(b) = base_url { 28 | site.set_base_url(b.to_string()); 29 | } 30 | site.set_output_path(output_dir); 31 | site.load()?; 32 | debug!( 33 | "Building zola site output path: {}", 34 | output_dir.to_str().unwrap_or_default() 35 | ); 36 | site.build()?; 37 | if !css_path.is_file() && cache_path.is_file() { 38 | std::fs::copy(cache_path, css_path).ok(); 39 | } 40 | Ok(()) 41 | } 42 | -------------------------------------------------------------------------------- /desktop/src-tauri/src/error.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, thiserror::Error)] 2 | pub enum Error { 3 | #[error(transparent)] 4 | Tauri(#[from] tauri::Error), 5 | #[error("serielize failed {0}")] 6 | Serde(#[from] serde_json::Error), 7 | #[error(transparent)] 8 | Zip(#[from] zip::result::ZipError), 9 | #[error(transparent)] 10 | Io(#[from] std::io::Error), 11 | #[error(transparent)] 12 | Zola(#[from] errors::Error), 13 | #[error(transparent)] 14 | Toml(#[from] toml::ser::Error), 15 | #[error(transparent)] 16 | Notify(#[from] notify::Error), 17 | } 18 | 19 | impl serde::Serialize for Error { 20 | fn serialize(&self, serializer: S) -> Result 21 | where 22 | S: serde::ser::Serializer, 23 | { 24 | serializer.serialize_str(self.to_string().as_ref()) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /desktop/src-tauri/src/ipc.rs: -------------------------------------------------------------------------------- 1 | use std::fs::File; 2 | 3 | use log::{debug, warn}; 4 | use serde_json::to_writer; 5 | use tauri::{ 6 | api::{dialog::FileDialogBuilder, path::home_dir}, 7 | command, AppHandle, Manager, State, 8 | }; 9 | use toml::Value; 10 | 11 | use crate::{ 12 | build::build_site, 13 | prelude::*, 14 | state::{AppState, Config, Link, Links, Profile}, 15 | utils::{self, write_config, zip_dir}, 16 | }; 17 | 18 | #[command] 19 | pub fn toggle_preview_window(handle: AppHandle) -> Result<()> { 20 | if let Some(w) = handle.get_window("preview") { 21 | if let Ok(visible) = w.is_visible() { 22 | if visible { 23 | w.hide()?; 24 | } else { 25 | w.show()?; 26 | } 27 | } 28 | } 29 | Ok(()) 30 | } 31 | 32 | #[command] 33 | pub fn generate_site(state: State<'_, AppState>, handle: AppHandle) -> Result<()> { 34 | let output_dir = handle 35 | .path_resolver() 36 | .app_cache_dir() 37 | .unwrap() 38 | .join("dist/"); 39 | let zip_file = handle 40 | .path_resolver() 41 | .app_cache_dir() 42 | .unwrap() 43 | .join("website.zip"); 44 | let config_path = handle 45 | .path_resolver() 46 | .app_cache_dir() 47 | .unwrap() 48 | .join("config.toml"); 49 | let template_path = match state.config.lock().unwrap().template_path.clone() { 50 | Some(p) => p, 51 | None => handle 52 | .path_resolver() 53 | .app_local_data_dir() 54 | .unwrap() 55 | .join("template/"), 56 | }; 57 | 58 | let user: &Profile = &state.profile.lock().unwrap(); 59 | let links: Links = state.links.lock().unwrap().to_vec(); 60 | let links_file = File::create( 61 | handle 62 | .path_resolver() 63 | .app_config_dir() 64 | .unwrap() 65 | .join("links.json"), 66 | )?; 67 | let org_config_file = template_path.join("config.toml"); 68 | let mut config = config::get_config(&org_config_file)?; 69 | config.extra.insert("profile".into(), user.to_value()); 70 | let links_val: W = (&links).into(); 71 | config.extra.insert("links".into(), links_val.0); 72 | 73 | to_writer(links_file, &links)?; 74 | 75 | // write to a temporary config.toml 76 | write_config(config, &config_path)?; 77 | 78 | // build Zola site with temp config 79 | build_site(&template_path, &output_dir, Some("/"), &config_path)?; 80 | 81 | // zip the website bundle. 82 | zip_dir( 83 | output_dir.to_str().unwrap(), 84 | zip_file.to_str().unwrap(), 85 | zip::CompressionMethod::Deflated, 86 | )?; 87 | 88 | Ok(()) 89 | } 90 | 91 | /// Set template path 92 | #[command] 93 | pub fn set_template_path(state: State<'_, AppState>, handle: AppHandle) -> Result<()> { 94 | let template_path = match state.config.lock().unwrap().template_path.clone() { 95 | Some(p) => p, 96 | None => handle 97 | .path_resolver() 98 | .app_local_data_dir() 99 | .unwrap() 100 | .join("template/"), 101 | }; 102 | FileDialogBuilder::new() 103 | .set_directory(template_path) 104 | .pick_folder(move |path| { 105 | if path.is_some() { 106 | let config_file = File::create( 107 | handle 108 | .path_resolver() 109 | .app_config_dir() 110 | .unwrap() 111 | .join("config.json"), 112 | ) 113 | .expect("could not create or open file"); 114 | let config = Config { 115 | template_path: path.clone(), 116 | }; 117 | debug!("writing template path {:?} to config", path.unwrap()); 118 | to_writer(config_file, &config).expect("could not write to file"); 119 | } 120 | }); 121 | Ok(()) 122 | } 123 | 124 | /// Get the export zip file contents encoded as base64 125 | #[command] 126 | pub fn get_export_zip_base64(handle: AppHandle) -> Result { 127 | use base64::Engine; 128 | let zip_file = handle 129 | .path_resolver() 130 | .app_cache_dir() 131 | .unwrap() 132 | .join("website.zip"); 133 | let contents = std::fs::read(zip_file)?; 134 | Ok(base64::engine::general_purpose::STANDARD.encode(contents)) 135 | } 136 | 137 | #[command] 138 | pub fn export_zip(handle: AppHandle) -> Result<()> { 139 | let zip_file = handle 140 | .path_resolver() 141 | .app_cache_dir() 142 | .unwrap() 143 | .join("website.zip"); 144 | FileDialogBuilder::new() 145 | .set_file_name("website.zip") 146 | .set_directory(home_dir().unwrap()) 147 | .save_file(move |f| { 148 | if let Some(file) = f { 149 | debug!("Saving website bundle to {}", file.to_str().unwrap()); 150 | std::fs::copy(zip_file, file).unwrap(); 151 | } 152 | }); 153 | Ok(()) 154 | } 155 | 156 | #[command] 157 | pub fn remove_link(id: usize, state: State<'_, AppState>) -> Result<()> { 158 | state.links.lock().unwrap().retain(|l| l.id != id); 159 | Ok(()) 160 | } 161 | 162 | #[command] 163 | pub fn add_link(link: Link, state: State<'_, AppState>) -> Result<()> { 164 | state.links.lock().unwrap().push(link); 165 | Ok(()) 166 | } 167 | 168 | #[command] 169 | pub fn update_user(user: Profile, state: State<'_, AppState>, handle: AppHandle) -> Result<()> { 170 | let user_file = File::create( 171 | handle 172 | .path_resolver() 173 | .app_config_dir() 174 | .unwrap() 175 | .join("user.json"), 176 | )?; 177 | to_writer(user_file, &user)?; 178 | *state.profile.lock().unwrap() = user; 179 | Ok(()) 180 | } 181 | 182 | #[command] 183 | pub fn get_user(state: State<'_, AppState>, handle: AppHandle) -> Result { 184 | let user: Profile = match utils::load_user(handle) { 185 | Ok(u) => { 186 | *state.profile.lock().unwrap() = u.clone(); 187 | u 188 | } 189 | Err(e) => { 190 | warn!("Could not load user data: {e}"); 191 | let user: &Profile = &state.profile.lock().unwrap(); 192 | 193 | user.clone() 194 | } 195 | }; 196 | Ok(user) 197 | } 198 | 199 | #[command] 200 | pub fn get_links(state: State<'_, AppState>, handle: AppHandle) -> Result { 201 | let links: Links = match utils::load_links(handle) { 202 | Ok(u) => { 203 | *state.links.lock().unwrap() = u.to_vec(); 204 | u 205 | } 206 | Err(e) => { 207 | warn!("Could not load links: {e}"); 208 | state.links.lock().unwrap().to_vec() 209 | } 210 | }; 211 | Ok(links) 212 | } 213 | -------------------------------------------------------------------------------- /desktop/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr( 2 | all(not(debug_assertions), target_os = "windows"), 3 | windows_subsystem = "windows" 4 | )] 5 | 6 | use ipc::{ 7 | add_link, export_zip, generate_site, get_export_zip_base64, get_links, get_user, remove_link, 8 | set_template_path, toggle_preview_window, update_user, 9 | }; 10 | use log::error; 11 | use prelude::*; 12 | use server::start_server; 13 | use state::{AppState, Config}; 14 | use std::{ 15 | fs, 16 | path::PathBuf, 17 | sync::{mpsc::sync_channel, Mutex}, 18 | }; 19 | use tauri::{Manager, WindowEvent}; 20 | #[cfg(debug_assertions)] 21 | use tracing::Level; 22 | 23 | mod build; 24 | mod error; 25 | mod ipc; 26 | mod prelude; 27 | mod server; 28 | mod state; 29 | mod utils; 30 | 31 | fn main() { 32 | #[cfg(not(debug_assertions))] 33 | tracing_subscriber::fmt().init(); 34 | #[cfg(debug_assertions)] 35 | tracing_subscriber::fmt() 36 | .with_max_level(Level::DEBUG) 37 | .init(); 38 | 39 | let exit = Mutex::new(false); 40 | let config: Result = utils::get_config(); 41 | let state = AppState { 42 | config: Mutex::new(config.unwrap_or_default()), 43 | ..Default::default() 44 | }; 45 | 46 | let (tx, rx) = sync_channel(1); 47 | tauri::Builder::default() 48 | .on_window_event(move |event| match event.window().label() { 49 | "preview" => { 50 | if let WindowEvent::CloseRequested { api, .. } = event.event() { 51 | event.window().hide().unwrap(); 52 | if !*exit.lock().unwrap() { 53 | api.prevent_close(); 54 | } 55 | } 56 | } 57 | "main" => { 58 | if let WindowEvent::CloseRequested { .. } = event.event() { 59 | if let Some(win) = event.window().get_window("preview") { 60 | win.close().unwrap(); 61 | } 62 | *exit.lock().unwrap() = true; 63 | tx.send(1).expect("Failed to send close signal"); 64 | } 65 | } 66 | _ => (), 67 | }) 68 | .setup(move |app| { 69 | let filepath = app 70 | .path_resolver() 71 | .resolve_resource("assets/template.zip") 72 | .expect("error failed to resolve resource dir"); 73 | let target_dir: PathBuf = app 74 | .path_resolver() 75 | .app_local_data_dir() 76 | .unwrap() 77 | .join("template/"); 78 | if !target_dir.exists() { 79 | fs::create_dir_all(&target_dir).expect("error creating template directory"); 80 | utils::extract_template(filepath, &target_dir); 81 | } 82 | if let Err(e) = start_server(rx, app) { 83 | error!("could not start preview server: {e}"); 84 | }; 85 | // create the preview window 86 | tauri::WindowBuilder::new( 87 | app, 88 | "preview", 89 | tauri::WindowUrl::External("http://127.0.0.1:7878".parse().unwrap()), 90 | ) 91 | .title("Preview") 92 | .build()? 93 | .hide()?; 94 | let config_path = app.path_resolver().app_config_dir().unwrap(); 95 | if !config_path.exists() { 96 | fs::create_dir_all(&config_path).expect("error creating config directory"); 97 | } 98 | Ok(()) 99 | }) 100 | .manage(state) 101 | .invoke_handler(tauri::generate_handler![ 102 | toggle_preview_window, 103 | generate_site, 104 | get_export_zip_base64, 105 | export_zip, 106 | remove_link, 107 | add_link, 108 | update_user, 109 | get_user, 110 | get_links, 111 | set_template_path, 112 | ]) 113 | .run(tauri::generate_context!()) 114 | .expect("error while running tauri application"); 115 | } 116 | -------------------------------------------------------------------------------- /desktop/src-tauri/src/prelude.rs: -------------------------------------------------------------------------------- 1 | use crate::error::Error; 2 | 3 | pub type Result = core::result::Result; 4 | 5 | pub struct W(pub T); 6 | -------------------------------------------------------------------------------- /desktop/src-tauri/src/server.rs: -------------------------------------------------------------------------------- 1 | use libs::percent_encoding; 2 | use libs::relative_path::RelativePathBuf; 3 | use log::{debug, error, warn}; 4 | use mime_guess::from_path; 5 | use site::{Site, SITE_CONTENT}; 6 | use std::io::Cursor; 7 | use std::net::SocketAddr; 8 | use std::path::{Path, PathBuf}; 9 | use std::{fs, thread}; 10 | use std::{sync::mpsc::Receiver, sync::Arc}; 11 | use tiny_http::{Header, Method, Request, Response, Server}; 12 | 13 | use crate::prelude::*; 14 | use crate::state::Config; 15 | 16 | // This is dist/livereload.min.js from the LiveReload.js v3.2.4 release 17 | const LIVE_RELOAD: &str = include_str!("livereload.js"); 18 | 19 | fn create_new_site( 20 | root_dir: &Path, 21 | port: u16, 22 | output_dir: &PathBuf, 23 | base_url: &str, 24 | config_file: &Path, 25 | ws_port: Option, 26 | ) -> Result<(Site, String)> { 27 | SITE_CONTENT.write().unwrap().clear(); 28 | 29 | let mut site = Site::new(root_dir, config_file)?; 30 | let address = format!("localhost:{}", port); 31 | 32 | let base_url = if base_url == "/" { 33 | String::from("/") 34 | } else { 35 | let base_address = format!("{}:{}", base_url, port); 36 | 37 | if site.config.base_url.ends_with('/') { 38 | format!("http://{}/", base_address) 39 | } else { 40 | format!("http://{}", base_address) 41 | } 42 | }; 43 | 44 | site.enable_serve_mode(); 45 | site.set_base_url(base_url); 46 | site.set_output_path(output_dir); 47 | site.load()?; 48 | if let Some(p) = ws_port { 49 | site.enable_live_reload_with_port(p); 50 | } else { 51 | site.enable_live_reload(port); 52 | } 53 | debug!( 54 | "Building zola site output path: {}", 55 | output_dir.to_str().unwrap_or_default() 56 | ); 57 | site.build()?; 58 | Ok((site, address)) 59 | } 60 | 61 | fn not_found() -> Response>> { 62 | Response::from_string("Not Found").with_status_code(404) 63 | } 64 | 65 | fn method_not_allowed() -> Response>> { 66 | Response::from_string("Method Not Allowed").with_status_code(405) 67 | } 68 | 69 | fn livereload_js() -> Response>> { 70 | let mut res = Response::from_string(LIVE_RELOAD).with_status_code(200); 71 | res.add_header(Header::from_bytes(&b"Content-Type"[..], &b"text/javascript"[..]).unwrap()); 72 | res 73 | } 74 | 75 | fn io_error(err: std::io::Error) -> Response>> { 76 | match err.kind() { 77 | std::io::ErrorKind::NotFound => not_found(), 78 | std::io::ErrorKind::PermissionDenied => { 79 | Response::from_string("Forbidden").with_status_code(403) 80 | } 81 | _ => panic!("{}", err), 82 | } 83 | } 84 | 85 | fn in_memory_content(path: &RelativePathBuf, content: &str) -> Response>> { 86 | let content_type = match path.extension() { 87 | Some(ext) => match ext { 88 | "xml" => "text/xml", 89 | "json" => "application/json", 90 | _ => "text/html", 91 | }, 92 | None => "text/html", 93 | }; 94 | let mut res = Response::from_string(content).with_status_code(200); 95 | res.add_header(Header::from_bytes(&b"Content-Type"[..], content_type).unwrap()); 96 | res 97 | } 98 | 99 | fn serve_static_file(req: &Request, mut root: PathBuf) -> Result>>> { 100 | // map uri path to file path 101 | let original_root = root.clone(); 102 | let mut path = RelativePathBuf::new(); 103 | 104 | debug!("{} {}", req.method().as_str(), req.url()); 105 | 106 | let decoded = match percent_encoding::percent_decode_str(req.url()).decode_utf8() { 107 | Ok(d) => d, 108 | Err(_) => return Ok(not_found()), 109 | }; 110 | for c in decoded.split('/') { 111 | path.push(c); 112 | } 113 | 114 | // livereload.js is served using the LIVE_RELOAD str, not a file 115 | if path == "livereload.js" { 116 | match req.method() { 117 | Method::Get => return Ok(livereload_js()), 118 | _ => return Ok(method_not_allowed()), 119 | } 120 | } 121 | 122 | if let Some(content) = SITE_CONTENT.read().unwrap().get(&path) { 123 | return Ok(in_memory_content(&path, content)); 124 | } 125 | // Remove the first slash from the request path 126 | root.push(&decoded[1..]); 127 | 128 | // Ensure we are only looking for things in our public folder 129 | if !root.starts_with(original_root) { 130 | return Ok(not_found()); 131 | } 132 | 133 | let metadata = match std::fs::metadata(root.as_path()) { 134 | Err(err) => return Ok(io_error(err)), 135 | Ok(metadata) => metadata, 136 | }; 137 | if metadata.is_dir() { 138 | // if root is a directory, append index.html to try to read that instead 139 | root.push("index.html"); 140 | }; 141 | 142 | let result = std::fs::read(&root); 143 | 144 | let contents = match result { 145 | Err(err) => return Ok(io_error(err)), 146 | Ok(contents) => contents, 147 | }; 148 | 149 | let mut res = Response::from_data(contents).with_status_code(200); 150 | let mime_type = from_path(&root).first_or_octet_stream(); 151 | res.add_header( 152 | Header::from_bytes( 153 | &b"Content-Type"[..], 154 | mime_type.to_string().bytes().collect::>(), 155 | ) 156 | .unwrap(), 157 | ); 158 | Ok(res) 159 | } 160 | 161 | pub fn start_server(receiver: Receiver, app: &mut tauri::App) -> Result<()> { 162 | let addr: SocketAddr = ([127, 0, 0, 1], 7878).into(); 163 | 164 | let server = Arc::new(Server::http(addr).unwrap()); 165 | 166 | // Spawn a thread to listen for the shutdown signal, and unblock ( shutdown ) the http server. 167 | let server_ = server.clone(); 168 | std::thread::spawn(move || { 169 | let server = server_; 170 | 171 | loop { 172 | match receiver.recv() { 173 | Ok(c) if c == 1 => { 174 | server.unblock(); 175 | break; 176 | } 177 | Err(e) => { 178 | error!("Disconnected: {e}"); 179 | server.unblock(); 180 | break; 181 | } 182 | _ => (), 183 | } 184 | } 185 | }); 186 | 187 | let cache_path = app.path_resolver().app_cache_dir().unwrap().join("dist/"); 188 | let config: Config = crate::utils::get_config().unwrap_or_default(); 189 | let template_path = match config.template_path { 190 | Some(p) => p, 191 | None => app 192 | .path_resolver() 193 | .app_local_data_dir() 194 | .unwrap() 195 | .join("template/"), 196 | }; 197 | debug!("template path {}", template_path.to_str().unwrap()); 198 | fs::create_dir_all(&cache_path)?; 199 | let config_file = template_path.join("config.toml"); 200 | create_new_site( 201 | &template_path, 202 | 7878, 203 | &cache_path, 204 | "localhost", 205 | &config_file, 206 | Some(7879), 207 | ) 208 | .expect("could not build zola site"); 209 | 210 | let cache = cache_path.to_str().unwrap().to_owned(); 211 | 212 | // Spawn a thread to run the http server. 213 | thread::spawn(move || loop { 214 | match server.recv() { 215 | Ok(rq) => { 216 | match serve_static_file(&rq, PathBuf::from(&cache)) { 217 | Err(e) => { 218 | error!("Request failed: {e}"); 219 | } 220 | Ok(res) => { 221 | if let Err(e) = rq.respond(res) { 222 | error!("Sending response failed: {e}"); 223 | }; 224 | } 225 | }; 226 | } 227 | Err(e) => warn!("{e}"), 228 | } 229 | }); 230 | 231 | Ok(()) 232 | } 233 | -------------------------------------------------------------------------------- /desktop/src-tauri/src/state.rs: -------------------------------------------------------------------------------- 1 | use std::{path::PathBuf, sync::Mutex}; 2 | 3 | use serde::{Deserialize, Serialize}; 4 | use toml::{value::Array, Table, Value}; 5 | use ts_rs::TS; 6 | 7 | use crate::prelude::*; 8 | 9 | #[derive(Debug, Clone, Serialize, Deserialize, TS)] 10 | #[ts(export, export_to = "../src/bindings/")] 11 | pub struct Link { 12 | pub id: usize, 13 | pub text: String, 14 | pub url: String, 15 | } 16 | 17 | impl Link { 18 | pub fn to_value(&self) -> Value { 19 | let mut table = Table::new(); 20 | 21 | table.insert("id".into(), Value::Integer(self.id as i64)); 22 | table.insert("text".into(), Value::String(self.text.clone())); 23 | table.insert("url".into(), Value::String(self.url.clone())); 24 | 25 | Value::Table(table) 26 | } 27 | } 28 | 29 | pub type Links = Vec; 30 | 31 | impl From<&Links> for W { 32 | fn from(value: &Links) -> Self { 33 | let mut links = Array::new(); 34 | 35 | for val in value { 36 | links.push(val.to_value()); 37 | } 38 | 39 | W(Value::Array(links)) 40 | } 41 | } 42 | 43 | #[derive(Debug, Default, Clone, Serialize, Deserialize, TS)] 44 | #[ts(export, export_to = "../src/bindings/")] 45 | pub struct Profile { 46 | pub name: String, 47 | pub username: String, 48 | pub title: String, 49 | pub about: String, 50 | pub photo: Option, 51 | } 52 | 53 | impl Profile { 54 | pub fn to_value(&self) -> toml::Value { 55 | let mut table = Table::new(); 56 | 57 | table.insert("name".into(), Value::String(self.name.clone())); 58 | table.insert("username".into(), Value::String(self.username.clone())); 59 | table.insert("title".into(), Value::String(self.title.clone())); 60 | table.insert("about".into(), Value::String(self.about.clone())); 61 | table.insert( 62 | "photo".into(), 63 | Value::String(self.photo.clone().unwrap_or_default()), 64 | ); 65 | 66 | Value::Table(table) 67 | } 68 | } 69 | 70 | /// Contains data used to generate the final `index.html` file. 71 | #[derive(Debug, Serialize, Deserialize)] 72 | pub struct Content { 73 | pub profile: Profile, 74 | pub links: Links, 75 | } 76 | 77 | /// contains app configurations 78 | #[derive(Debug, Default, Serialize, Deserialize)] 79 | pub struct Config { 80 | pub template_path: Option, 81 | } 82 | 83 | /// contains the app global state 84 | #[derive(Debug, Default)] 85 | pub struct AppState { 86 | pub profile: Mutex, 87 | pub links: Mutex, 88 | pub config: Mutex, 89 | } 90 | -------------------------------------------------------------------------------- /desktop/src-tauri/src/utils/mod.rs: -------------------------------------------------------------------------------- 1 | pub use self::zip::zip_dir; 2 | use ::zip::ZipArchive; 3 | use log::debug; 4 | use serde_json::from_reader; 5 | use std::{ 6 | fs::{self, File, Permissions}, 7 | io::{self, BufReader}, 8 | path::{Path, PathBuf}, 9 | }; 10 | use tauri::{AppHandle, api::path::config_dir}; 11 | 12 | use crate::{ 13 | prelude::*, 14 | state::{Profile, Links, Config}, 15 | }; 16 | 17 | pub mod zip; 18 | 19 | /// Load saved user info if available 20 | pub fn load_user(handle: AppHandle) -> Result { 21 | let user_file = handle 22 | .path_resolver() 23 | .app_config_dir() 24 | .unwrap() 25 | .join("user.json"); 26 | let file = File::open(user_file)?; 27 | let reader = BufReader::new(file); 28 | let user = from_reader(reader)?; 29 | Ok(user) 30 | } 31 | 32 | /// Load saved links if available 33 | pub fn load_links(handle: AppHandle) -> Result { 34 | let links_file = handle 35 | .path_resolver() 36 | .app_config_dir() 37 | .unwrap() 38 | .join("links.json"); 39 | let file = File::open(links_file)?; 40 | let reader = BufReader::new(file); 41 | let links: Links = from_reader(reader)?; 42 | Ok(links) 43 | } 44 | 45 | /// Write user profile and links to config.toml 46 | pub fn write_config(config: config::Config, path: &PathBuf) -> Result<()> { 47 | let toml = toml::to_string(&config.serialize("en"))?; 48 | fs::write(path, toml)?; 49 | Ok(()) 50 | } 51 | 52 | pub fn extract_template(filepath: PathBuf, dest: &Path) { 53 | let file = File::open(filepath).unwrap(); 54 | 55 | let mut archive = ZipArchive::new(file).unwrap(); 56 | 57 | for i in 0..archive.len() { 58 | let mut file = archive.by_index(i).unwrap(); 59 | let outpath = match file.enclosed_name() { 60 | Some(path) => dest.join(path), 61 | None => continue, 62 | }; 63 | 64 | if (*file.name()).ends_with('/') { 65 | debug!("File {} extracted to \"{}\"", i, outpath.display()); 66 | fs::create_dir_all(&outpath).unwrap(); 67 | } else { 68 | debug!( 69 | "File {} extracted to \"{}\" ({} bytes)", 70 | i, 71 | outpath.display(), 72 | file.size() 73 | ); 74 | if let Some(p) = outpath.parent() { 75 | if !p.exists() { 76 | fs::create_dir_all(p).unwrap(); 77 | } 78 | } 79 | let mut outfile = File::create(&outpath).unwrap(); 80 | io::copy(&mut file, &mut outfile).unwrap(); 81 | } 82 | 83 | // Get and Set permissions 84 | #[cfg(unix)] 85 | { 86 | use std::os::unix::fs::PermissionsExt; 87 | 88 | if let Some(mode) = file.unix_mode() { 89 | fs::set_permissions(&outpath, Permissions::from_mode(mode)).unwrap(); 90 | } 91 | } 92 | } 93 | } 94 | 95 | pub fn get_config() -> Result { 96 | let config_file = config_dir().unwrap().join("weird/config.json"); 97 | debug!("config path {}", config_file.to_str().unwrap()); 98 | let file = File::open(config_file)?; 99 | let reader = BufReader::new(file); 100 | let config = from_reader(reader)?; 101 | Ok(config) 102 | } 103 | -------------------------------------------------------------------------------- /desktop/src-tauri/src/utils/zip.rs: -------------------------------------------------------------------------------- 1 | use std::fs::File; 2 | use std::io::prelude::*; 3 | use std::io::Write; 4 | use zip::result::ZipError; 5 | use zip::write::FileOptions; 6 | 7 | use std::path::Path; 8 | use walkdir::{DirEntry, WalkDir}; 9 | 10 | pub fn zip_dir( 11 | src_dir: &str, 12 | dst_file: &str, 13 | method: zip::CompressionMethod, 14 | ) -> zip::result::ZipResult<()> { 15 | if !Path::new(src_dir).is_dir() { 16 | return Err(ZipError::FileNotFound); 17 | } 18 | 19 | let path = Path::new(dst_file); 20 | let file = File::create(path).unwrap(); 21 | 22 | let walkdir = WalkDir::new(src_dir); 23 | let it = walkdir.into_iter(); 24 | 25 | let it: &mut dyn Iterator = &mut it.filter_map(|e| e.ok()); 26 | let mut zip = zip::ZipWriter::new(file); 27 | let options = FileOptions::default() 28 | .compression_method(method) 29 | .unix_permissions(0o755); 30 | 31 | let mut buffer = Vec::new(); 32 | for entry in it { 33 | let path = entry.path(); 34 | let name = path.strip_prefix(Path::new(src_dir)).unwrap(); 35 | 36 | // Write file or directory explicitly 37 | // Some unzip tools unzip files with directory paths correctly, some do not! 38 | if path.is_file() { 39 | #[allow(deprecated)] 40 | zip.start_file_from_path(name, options)?; 41 | let mut f = File::open(path)?; 42 | 43 | f.read_to_end(&mut buffer)?; 44 | zip.write_all(&buffer)?; 45 | buffer.clear(); 46 | } else if !name.as_os_str().is_empty() { 47 | // Only if not root! Avoids path spec / warning 48 | // and mapname conversion failed error on unzip 49 | #[allow(deprecated)] 50 | zip.add_directory_from_path(name, options)?; 51 | } 52 | } 53 | zip.finish()?; 54 | 55 | Ok(()) 56 | } 57 | -------------------------------------------------------------------------------- /desktop/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "package": { 3 | "productName": "weird", 4 | "version": "0.3.2" 5 | }, 6 | "build": { 7 | "distDir": "../dist", 8 | "devPath": "http://localhost:5173", 9 | "beforeDevCommand": "pnpm dev", 10 | "beforeBuildCommand": "pnpm build" 11 | }, 12 | "tauri": { 13 | "bundle": { 14 | "active": true, 15 | "targets": "all", 16 | "identifier": "weird", 17 | "icon": [ 18 | "icons/32x32.png", 19 | "icons/128x128.png", 20 | "icons/128x128@2x.png", 21 | "icons/icon.icns", 22 | "icons/icon.ico" 23 | ], 24 | "resources": ["assets/template.zip"], 25 | "externalBin": [], 26 | "copyright": "MIT", 27 | "category": "DeveloperTool", 28 | "shortDescription": "Local-first website generator.", 29 | "longDescription": "", 30 | "deb": { 31 | "depends": [] 32 | }, 33 | "macOS": { 34 | "frameworks": [], 35 | "minimumSystemVersion": "", 36 | "exceptionDomain": "", 37 | "signingIdentity": null, 38 | "entitlements": null 39 | }, 40 | "windows": { 41 | "certificateThumbprint": null, 42 | "digestAlgorithm": "sha256", 43 | "timestampUrl": "" 44 | } 45 | }, 46 | "updater": { 47 | "active": false 48 | }, 49 | "allowlist": { 50 | "all": false, 51 | "http": { 52 | "scope": ["https://github.com/*"], 53 | "request": true 54 | }, 55 | "window": { 56 | "create": true, 57 | "close": true, 58 | "show": true 59 | }, 60 | "clipboard": { 61 | "writeText": true 62 | } 63 | }, 64 | "security": { 65 | "csp": null 66 | }, 67 | "windows": [ 68 | { 69 | "title": "Weird", 70 | "width": 500, 71 | "height": 600, 72 | "resizable": false, 73 | "fullscreen": false 74 | } 75 | ] 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /desktop/src/app.css: -------------------------------------------------------------------------------- 1 | /* Write your global styles here, in PostCSS syntax */ 2 | @tailwind base; 3 | @tailwind components; 4 | @tailwind utilities; 5 | 6 | :root { 7 | --btn-focus-scale: 0.9; 8 | } 9 | 10 | .btn { 11 | @apply p-2; 12 | animation: none; 13 | } 14 | 15 | .btn:active { 16 | transition: transform 0.1s !important; 17 | } 18 | -------------------------------------------------------------------------------- /desktop/src/app.d.ts: -------------------------------------------------------------------------------- 1 | // See https://kit.svelte.dev/docs/types#app 2 | // for information about these interfaces 3 | declare global { 4 | namespace App { 5 | // interface Error {} 6 | // interface Locals {} 7 | // interface PageData {} 8 | // interface Platform {} 9 | } 10 | } 11 | 12 | export {} 13 | -------------------------------------------------------------------------------- /desktop/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 |
%sveltekit.body%
11 | 12 | 13 | -------------------------------------------------------------------------------- /desktop/src/bindings/Link.ts: -------------------------------------------------------------------------------- 1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. 2 | 3 | export interface Link { id: number, text: string, url: string, } -------------------------------------------------------------------------------- /desktop/src/bindings/Profile.ts: -------------------------------------------------------------------------------- 1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. 2 | 3 | export interface Profile { name: string, username: string, title: string, about: string, photo: string | null, } -------------------------------------------------------------------------------- /desktop/src/components/Icon.svelte: -------------------------------------------------------------------------------- 1 | 16 | 17 | 25 | {@html path} 26 | 27 | -------------------------------------------------------------------------------- /desktop/src/components/Spinner.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /desktop/src/components/icons/github.path: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /desktop/src/components/icons/logout.path: -------------------------------------------------------------------------------- 1 | 5 | 9 | -------------------------------------------------------------------------------- /desktop/src/components/icons/rocket.path: -------------------------------------------------------------------------------- 1 | 4 | 7 | 10 | -------------------------------------------------------------------------------- /desktop/src/components/icons/x.path: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /desktop/src/config.ts: -------------------------------------------------------------------------------- 1 | export const GH_ACCESS_TOKEN_NAME = 'gh_access_token' 2 | export const GH_CLIENT_ID = '8cf9522a7037c7945e5f' 3 | -------------------------------------------------------------------------------- /desktop/src/routes/+layout.svelte: -------------------------------------------------------------------------------- 1 | 23 | 24 |
25 | 26 |
27 | -------------------------------------------------------------------------------- /desktop/src/routes/+layout.ts: -------------------------------------------------------------------------------- 1 | import type { LayoutLoad } from './$types' 2 | 3 | export const prerender = true 4 | export const ssr = false 5 | export const load: LayoutLoad = async ({ url: { pathname } }) => { 6 | return { pathname } 7 | } 8 | -------------------------------------------------------------------------------- /desktop/src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 | 46 | 47 |
48 |
49 | 50 |
51 | 59 | 64 | 65 |
66 |
67 |
68 | 69 |
74 | 81 | 88 | 89 |
90 | 91 | {#if $links.length > 0} 92 |
93 | {#each $links as link} 94 |
95 | 103 |
{link.text}
104 |
{link.url}
105 |
106 | {/each} 107 |
108 | {/if} 109 | 110 |
111 | 114 |
115 | {#if loading} 116 |
119 | {/if} 120 | 131 |
132 |
133 | -------------------------------------------------------------------------------- /desktop/src/routes/export/+page.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 |
15 | 20 |
21 | 41 | 60 | 64 | 65 |
Github Pages
66 |
67 |
68 |
69 |
70 | -------------------------------------------------------------------------------- /desktop/src/routes/publish/github/+layout.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |

7 | Publish to GitHub 8 |

9 | 10 |
11 | 15 | 16 | 17 |
18 | 19 |
20 | 21 |
22 |
23 | -------------------------------------------------------------------------------- /desktop/src/routes/publish/github/+page.svelte: -------------------------------------------------------------------------------- 1 | 300 | 301 | {#if user} 302 |
303 |
304 |
305 |
306 | User Avatar 307 |
308 |
309 |

{user.name}

310 |
311 | 314 |
315 |
316 |
317 | 318 |
319 |
320 | 323 | 335 |
336 | {#if repoStatus == 'checking'} 337 | 338 | {/if} 339 |
340 | 349 |
350 | 351 |
352 | 353 | 362 |
363 | 364 |
365 |
366 | {#if loading} 367 | 368 | {/if} 369 | 379 |
380 | 381 | {:else} 382 |
383 | 384 |
385 | {/if} 386 | -------------------------------------------------------------------------------- /desktop/src/routes/publish/github/consts.ts: -------------------------------------------------------------------------------- 1 | export const GH_PAGES_DEPLOYMENT_TARGET_FILENAME = 2 | '.__weird-deployment-target__' 3 | export const GH_PAGES_DEPLOYMENT_TARGET_CONTENTS = 4 | 'This file was created by Weird to mark the repo as being used for Weird deployment.' 5 | -------------------------------------------------------------------------------- /desktop/src/routes/publish/github/github-workflow.yaml: -------------------------------------------------------------------------------- 1 | # Simple workflow for deploying static content to GitHub Pages 2 | name: Deploy Website to GitHub Pages 3 | 4 | on: 5 | # Allows you to run this workflow manually from the Actions tab 6 | workflow_dispatch: 7 | 8 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 9 | permissions: 10 | contents: read 11 | pages: write 12 | id-token: write 13 | 14 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 15 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 16 | concurrency: 17 | group: 'pages' 18 | cancel-in-progress: false 19 | 20 | jobs: 21 | # Single deploy job since we're just deploying 22 | deploy: 23 | environment: 24 | name: github-pages 25 | url: ${{ steps.deployment.outputs.page_url }} 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: Checkout 29 | uses: actions/checkout@v3 30 | - name: Process Website.zip 31 | run: | 32 | mkdir website 33 | cd website 34 | echo "Unzipping website.zip" 35 | unzip ../website.zip 36 | echo "Creating tar archive" 37 | tar -cvf $RUNNER_TEMP/website.tar . 38 | - name: Upload Artifact 39 | uses: actions/upload-artifact@v3 40 | with: 41 | name: github-pages 42 | path: ${{ runner.temp }}/website.tar 43 | retention-days: 1 44 | if-no-files-found: error 45 | - name: Deploy Site 46 | id: deployment 47 | uses: actions/deploy-pages@v2 48 | -------------------------------------------------------------------------------- /desktop/src/routes/publish/github/login/+page.svelte: -------------------------------------------------------------------------------- 1 | 127 | 128 | {#if loginData} 129 |
130 |
131 | Copy this code and input it into the device activation page to authorize 132 | Weird. 133 |
134 | 135 |
136 | 137 |
141 | {loginData.userCode} 142 |
143 | 144 |
145 | {codeCopyText} 146 |
147 |
148 | 149 | 155 |
156 | {/if} 157 | -------------------------------------------------------------------------------- /desktop/src/routes/publish/github/status/+page.svelte: -------------------------------------------------------------------------------- 1 | 165 | 166 | {#if error} 167 |
168 | Error: {error} 169 |
170 | {/if} 171 | 172 | {#if !user || !repoData} 173 |
174 | 175 |
176 | {:else} 177 |
180 | Deployment Status 181 |
182 | 183 |
184 |
185 |
186 |
187 | User Avatar 188 |
189 |
190 |

{user.name} / {repo}

191 |
192 |
193 | 194 | {#if workflowStatus == 'completed'} 195 |
196 |
Deployment completed!
197 | {#if domain != `${user.login}.github.io/${repo}`} 198 |

199 | Your site has been deployed to GitHub Pages. If you have not done so 200 | already, you must make sure that your domain {domain} is 201 | configured with a CNAME 202 | record, pointing at {user.login}.github.io/{repoData}. 203 |

204 |

205 | Once that's done, you can access your new site at: 206 | https://{domain}! 208 |

209 | {:else} 210 |

211 | Your site has been deployed to GitHub pages. You can view it at { 214 | e.preventDefault() 215 | openSite() 216 | }} 217 | on:keypress={(e) => { 218 | e.preventDefault() 219 | openSite() 220 | }} 221 | class="underline cursor-pointer">https://{domain}. 223 |

224 | {/if} 225 |
226 | {:else} 227 |

232 | {workflowStatus || ''} 233 |

234 |
235 | {#if steps.length > 0} 236 |
    237 | {#each steps as step} 238 |
  • 243 | {step.name} 244 |
  • 245 | {/each} 246 |
247 | {:else} 248 |
249 | 250 |
251 | {/if} 252 |
253 | {/if} 254 | {/if} 255 | -------------------------------------------------------------------------------- /desktop/src/routes/user/+page.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 |
21 | 28 | 35 | 42 | 48 |