Skip to content

Commit

Permalink
refactor: Move all pyoci_worker code to the main crate.
Browse files Browse the repository at this point in the history
cloudflare worker related functionality is now in cf.rs.

The download_package_file has been implemented.
  • Loading branch information
AllexVeldman committed May 23, 2024
1 parent 7593e91 commit 55742c0
Show file tree
Hide file tree
Showing 14 changed files with 990 additions and 680 deletions.
830 changes: 573 additions & 257 deletions Cargo.lock

Large diffs are not rendered by default.

27 changes: 24 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ edition = "2021"
authors = ["Allex Veldman"]
description = "Let any OCI compliant registry act as a PyPi index"

[workspace]
members = ["pyoci_cli", "pyoci_worker"]
[lib]
crate-type = ["cdylib"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -20,11 +20,32 @@ codegen-units = 1
bytes = "1.5.0"
exitcode = "1.1.2"
oci-spec = { version = "0.6.4", default-features = false, features = ["image", "distribution"] }
serde = { version = "1.0.193", features = ["derive"] }
url = "2.3.1"
regex = "1.10.2"
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["time"] }
reqwest = { version = "0.12.4", features = ["json", "stream"] }
askama = "0.12.1"
base64 = "0.22.1"
serde = { version = "1.0.202", features = ["derive"] }
serde_json = "1.0.117"

# wasm dependencies
time = { version = "0.3.36", features = ["wasm-bindgen"] }
console_error_panic_hook = "0.1.7"
wasm-bindgen = "0.2.92"
worker = {version = "0.3.0"}
tracing-web = "0.1.3"

[dependencies.web-sys]
version = "0.3.63"
features = [
'Headers',
'Request',
'RequestInit',
'Response',
'WorkerGlobalScope',
]

[dev-dependencies]
test-case = "3.3.1"
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cli-list:
cargo run -p pyoci_cli -- -u AllexVeldman -p $GH_TOKEN list ghcr.io/allexveldman/pyoci
cargo run -- -u AllexVeldman -p $GH_TOKEN list ghcr.io/allexveldman/pyoci

cf-worker:
NO_MINIFY=1 npx wrangler dev --port 8090
34 changes: 0 additions & 34 deletions pyoci_worker/Cargo.toml

This file was deleted.

88 changes: 0 additions & 88 deletions pyoci_worker/src/lib.rs

This file was deleted.

Loading

0 comments on commit 55742c0

Please sign in to comment.