Skip to content

Commit

Permalink
add tls features
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog-crabnebula committed Nov 16, 2023
1 parent 363e122 commit 9f1d7de
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-packager-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- host: macos-latest
target: aarch64-apple-darwin
build: |
pnpm build --target aarch64-apple-darwin
pnpm build --target aarch64-apple-darwin --features native-tls-vendored --cargo-flags="--no-default-features"
strip -x *.node
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
- host: windows-latest
target: aarch64-pc-windows-msvc
build: pnpm build --target aarch64-pc-windows-msvc
build: pnpm build --target aarch64-pc-windows-msvc --features native-tls-vendored --cargo-flags="--no-default-features"
name: stable - ${{ matrix.settings.target }} - node@18
runs-on: ${{ matrix.settings.host }}
steps:
Expand Down
112 changes: 112 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion bindings/packager/nodejs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ crate-type = ["cdylib"]
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
napi = { version = "2.12.2", default-features = false, features = ["napi4"] }
napi-derive = "2.12.2"
cargo-packager = { path = "../../../crates/packager/", version = "0.3.0", features = ["tracing-subscriber"] }
cargo-packager = { path = "../../../crates/packager/", version = "0.3.0", default-features = false, features = ["cli", "tracing-subscriber"] }
tracing = { workspace = true }
serde_json = { workspace = true }

[build-dependencies]
napi-build = "2.0.1"

[features]
default = ["cargo-packager/rustls"]
native-tls = ["cargo-packager/native-tls"]
native-tls-vendored = ["cargo-packager/native-tls-vendored"]
8 changes: 6 additions & 2 deletions crates/packager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ targets = [
]

[features]
default = [ "cli" ]
default = [ "cli", "rustls" ]
cli = [ "clap", "tracing-subscriber" ]
schema = [ "schemars" ]
tracing-subscriber = [ "dep:tracing-subscriber" ]
native-tls = [ "ureq/native-tls" ]
native-tls-vendored = [ "native-tls", "native-tls/vendored" ]
rustls = [ "ureq/tls" ]

[dependencies]
thiserror = { workspace = true }
Expand All @@ -47,7 +50,7 @@ tracing = { workspace = true }
tracing-subscriber = { version = "0.3", optional = true, features = [ "env-filter" ] }
toml = "0.8"
cargo_metadata = "0.18"
ureq = "2.8"
ureq = { version = "2.8", default-features = false }
hex = "0.4"
sha1 = "0.10"
sha2 = "0.10"
Expand All @@ -62,6 +65,7 @@ tar = "0.4"
libflate = "2.0"
strsim = "0.10"
schemars = { workspace = true, optional = true }
native-tls = { version = "0.2", optional = true }

[target."cfg(target_os = \"windows\")".dependencies]
winreg = "0.51"
Expand Down

0 comments on commit 9f1d7de

Please sign in to comment.