Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/bump-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
description: The new version of the interface package and crates, e.g. 0.1.0 or 0.2.0-dev
required: true
type: string
default: "0.1.0-dev" # the current version, kept current by scripts/bump-version.sh
default: "0.1.0" # the current version, kept current by scripts/bump-version.sh

jobs:
# bumps the version with read only access, the changes are handed to the pull-request job as a
Expand Down
2 changes: 1 addition & 1 deletion components/gate-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Latch error CODE=invalid-config<latch-method> OPERATION=wasi:http/client#send ME

Imports:

- `componentized:http/latch@0.1.0-dev`: decides whether each request may proceed
- `componentized:http/latch@0.1.0`: decides whether each request may proceed
- `wasi:logging/logging@0.1.0-draft`: logs denials and latch errors
- `wasi:http/types@0.3.0`: the requests being gated
- `wasi:http/client@0.3.0`: the client the gated client wraps
Expand Down
2 changes: 1 addition & 1 deletion components/gate-handler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Latch error CODE=invalid-config<latch-method> OPERATION=wasi:http/client#send ME

Imports:

- `componentized:http/latch@0.1.0-dev`: decides whether each request may proceed
- `componentized:http/latch@0.1.0`: decides whether each request may proceed
- `wasi:logging/logging@0.1.0-draft`: logs denials and latch errors
- `wasi:http/types@0.3.0`: the requests being gated
- `wasi:http/handler@0.3.0`: the handler the gated handler wraps
Expand Down
2 changes: 1 addition & 1 deletion components/gate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A union of `gate-client` and `gate-handler`.

Imports:

- `componentized:http/latch@0.1.0-dev`: decides whether each request may proceed
- `componentized:http/latch@0.1.0`: decides whether each request may proceed
- `wasi:logging/logging@0.1.0-draft`: logs denials and latch errors
- `wasi:http/types@0.3.0`: the requests being gated
- `wasi:http/client@0.3.0`: the client the gated client wraps
Expand Down
2 changes: 1 addition & 1 deletion components/latch-defer-all/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Imports:

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
4 changes: 2 additions & 2 deletions components/latch-delegate-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export new local:latch-n2 {
Imports:

- `wasi:http/types@0.3.0`: the requests being authorized
- `componentized:http/latch@0.1.0-dev`: the wrapped latch, consulted for `wasi:http/client` requests
- `componentized:http/latch@0.1.0`: the wrapped latch, consulted for `wasi:http/client` requests

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
4 changes: 2 additions & 2 deletions components/latch-delegate-handler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export new local:latch-n2 {
Imports:

- `wasi:http/types@0.3.0`: the requests being authorized
- `componentized:http/latch@0.1.0-dev`: the wrapped latch, consulted for `wasi:http/handler` requests
- `componentized:http/latch@0.1.0`: the wrapped latch, consulted for `wasi:http/handler` requests

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
2 changes: 1 addition & 1 deletion components/latch-deny-all/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Imports:

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
2 changes: 1 addition & 1 deletion components/latch-deny-random/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ Imports:

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
4 changes: 2 additions & 2 deletions components/latch-dry-run/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Imports:

- `wasi:logging/logging@0.1.0-draft`: logs the requests the wrapped latch would deny, and its errors
- `wasi:http/types@0.3.0`: the requests being authorized
- `componentized:http/latch@0.1.0-dev`: the wrapped latch
- `componentized:http/latch@0.1.0`: the wrapped latch

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
2 changes: 1 addition & 1 deletion components/latch-method-readonly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Imports:

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
2 changes: 1 addition & 1 deletion components/latch-method/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Imports:

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
6 changes: 3 additions & 3 deletions components/latch-n2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ The latches are asked in order, `latch0`, `latch1`, and the first denial is the

Imports:

- `latch0`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch1`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch0`: `componentized:http/latch@0.1.0`, a latch to aggregate
- `latch1`: `componentized:http/latch@0.1.0`, a latch to aggregate

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
8 changes: 4 additions & 4 deletions components/latch-n3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ The latches are asked in order, `latch0`, `latch1`, `latch2`, and the first deni

Imports:

- `latch0`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch1`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch2`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch0`: `componentized:http/latch@0.1.0`, a latch to aggregate
- `latch1`: `componentized:http/latch@0.1.0`, a latch to aggregate
- `latch2`: `componentized:http/latch@0.1.0`, a latch to aggregate

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
10 changes: 5 additions & 5 deletions components/latch-n4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ The latches are asked in order, `latch0`, `latch1`, `latch2`, `latch3`, and the

Imports:

- `latch0`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch1`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch2`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch3`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch0`: `componentized:http/latch@0.1.0`, a latch to aggregate
- `latch1`: `componentized:http/latch@0.1.0`, a latch to aggregate
- `latch2`: `componentized:http/latch@0.1.0`, a latch to aggregate
- `latch3`: `componentized:http/latch@0.1.0`, a latch to aggregate

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
12 changes: 6 additions & 6 deletions components/latch-n5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ The latches are asked in order, `latch0`, `latch1`, `latch2`, `latch3`, `latch4`

Imports:

- `latch0`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch1`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch2`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch3`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch4`: `componentized:http/latch@0.1.0-dev`, a latch to aggregate
- `latch0`: `componentized:http/latch@0.1.0`, a latch to aggregate
- `latch1`: `componentized:http/latch@0.1.0`, a latch to aggregate
- `latch2`: `componentized:http/latch@0.1.0`, a latch to aggregate
- `latch3`: `componentized:http/latch@0.1.0`, a latch to aggregate
- `latch4`: `componentized:http/latch@0.1.0`, a latch to aggregate

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
2 changes: 1 addition & 1 deletion components/latch-scheme-httpsonly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Imports:

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
2 changes: 1 addition & 1 deletion components/latch-scheme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Imports:

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
4 changes: 2 additions & 2 deletions components/latch-trace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Imports:

- `wasi:logging/logging@0.1.0-draft`: logs the decisions of the wrapped latch
- `wasi:http/types@0.3.0`: the requests being authorized
- `componentized:http/latch@0.1.0-dev`: the wrapped latch
- `componentized:http/latch@0.1.0`: the wrapped latch

Exports:

- `componentized:http/latch@0.1.0-dev`: the latch
- `componentized:http/latch@0.1.0`: the latch
2 changes: 1 addition & 1 deletion components/status-codes/wit/status-codes.constants.wit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package componentized:http-component;

world status-codes {
export componentized:http/status-codes@0.1.0-dev;
export componentized:http/status-codes@0.1.0;
}
26 changes: 13 additions & 13 deletions components/wit/worlds.wit
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ package componentized:components;

world client {
import wasi:http/client@0.3.0;
export componentized:http/client@0.1.0-dev;
export componentized:http/client@0.1.0;
}

world gate-client {
import componentized:http/latch@0.1.0-dev;
import componentized:http/latch@0.1.0;
import wasi:config/store@0.2.0-rc.1;
import wasi:logging/logging@0.1.0-draft;
import wasi:http/client@0.3.0;
export wasi:http/client@0.3.0;
}

world gate-handler {
import componentized:http/latch@0.1.0-dev;
import componentized:http/latch@0.1.0;
import wasi:config/store@0.2.0-rc.1;
import wasi:logging/logging@0.1.0-draft;
import wasi:http/handler@0.3.0;
Expand All @@ -25,23 +25,23 @@ world latch {
import wasi:config/store@0.2.0-rc.1;
import wasi:logging/logging@0.1.0-draft;
import wasi:random/insecure@0.3.0;
import componentized:http/latch@0.1.0-dev;
export componentized:http/latch@0.1.0-dev;
import componentized:http/latch@0.1.0;
export componentized:http/latch@0.1.0;
}

world latch-n {
export componentized:http/latch@0.1.0-dev;
import latch0: componentized:http/latch@0.1.0-dev;
import latch1: componentized:http/latch@0.1.0-dev;
import latch2: componentized:http/latch@0.1.0-dev;
import latch3: componentized:http/latch@0.1.0-dev;
import latch4: componentized:http/latch@0.1.0-dev;
export componentized:http/latch@0.1.0;
import latch0: componentized:http/latch@0.1.0;
import latch1: componentized:http/latch@0.1.0;
import latch2: componentized:http/latch@0.1.0;
import latch3: componentized:http/latch@0.1.0;
import latch4: componentized:http/latch@0.1.0;
}

world trace-componentized-client {
import componentized:http/client@0.1.0-dev;
import componentized:http/client@0.1.0;
import wasi:logging/logging@0.1.0-draft;
export componentized:http/client@0.1.0-dev;
export componentized:http/client@0.1.0;
}

world trace-types {
Expand Down
2 changes: 1 addition & 1 deletion crates/test-harness/src/latch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ pub(crate) fn add_to_linker(linker: &mut Linker<Ctx>) -> Result<()> {
/// The most latches a `latch-n` component aggregates.
pub(crate) const LATCH_N_MAX: usize = 5;

const LATCH_INTERFACE: &str = "componentized:http/latch@0.1.0-dev";
const LATCH_INTERFACE: &str = "componentized:http/latch@0.1.0";

/// Whether the latch component imports a latch, which it wraps.
pub(crate) fn imports_latch(latch: &[u8]) -> Result<bool> {
Expand Down
6 changes: 3 additions & 3 deletions crates/test-harness/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub mod gate_bindings {
package componentized:test-harness-gate;

world gate {
import componentized:http/latch@0.1.0-dev;
import componentized:http/latch@0.1.0;
import wasi:config/store@0.2.0-rc.1;
import wasi:logging/logging@0.1.0-draft;
export wasi:http/client@0.3.0;
Expand Down Expand Up @@ -75,8 +75,8 @@ pub mod bindings {

world harness {
import wasi:logging/logging@0.1.0-draft;
import componentized:http/client@0.1.0-dev;
export componentized:http/client@0.1.0-dev;
import componentized:http/client@0.1.0;
export componentized:http/client@0.1.0;
export wasi:http/types@0.3.0;
export wasi:http/client@0.3.0;
export wasi:http/handler@0.3.0;
Expand Down
34 changes: 17 additions & 17 deletions wit/client.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
interface client {

@since(version = 0.1.0-dev)
@since(version = 0.1.0)
enum method {
get,
post,
Expand All @@ -14,7 +14,7 @@ interface client {
query,
}

@since(version = 0.1.0-dev)
@since(version = 0.1.0)
variant error-code {
/// The response was a redirect past `request-options.max-redirects`.
/// Contains the redirect response, and the number of redirects
Expand All @@ -29,7 +29,7 @@ interface client {
}

/// The request to send to follow a redirect.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
record redirect-request {
method: method,
url: string,
Expand All @@ -43,13 +43,13 @@ interface client {
}

/// An error reading the trailers of a response, after its body.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
variant trailers-error-code {
other(option<string>),
}

/// Per-request options. None fields fall through to host defaults.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
record request-options {
connect-timeout-ms: option<u32>,
first-byte-timeout-ms: option<u32>,
Expand All @@ -64,7 +64,7 @@ interface client {
/// A streaming HTTP response. The status and headers are available
/// immediately; the body streams as `body`, and trailers (if any) resolve
/// via `trailers` once the body stream is fully consumed.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
record http-response {
status: u16,
headers: list<tuple<string, string>>,
Expand All @@ -74,42 +74,42 @@ interface client {

/// Send an HTTP request with an explicit method. Both the request body and
/// the response body stream.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
request: async func(method: method, url: string, headers: list<tuple<string, string>>, body: option<stream<u8>>, options: option<request-options>) -> result<http-response, error-code>;

/// HTTP GET request.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
get: async func(url: string, headers: list<tuple<string, string>>, options: option<request-options>) -> result<http-response, error-code>;

/// HTTP POST request.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
post: async func(url: string, headers: list<tuple<string, string>>, body: stream<u8>, options: option<request-options>) -> result<http-response, error-code>;

/// HTTP PUT request.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
put: async func(url: string, headers: list<tuple<string, string>>, body: stream<u8>, options: option<request-options>) -> result<http-response, error-code>;

/// HTTP DELETE request.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
delete: async func(url: string, headers: list<tuple<string, string>>, options: option<request-options>) -> result<http-response, error-code>;

/// HTTP PATCH request.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
patch: async func(url: string, headers: list<tuple<string, string>>, body: stream<u8>, options: option<request-options>) -> result<http-response, error-code>;

/// HTTP HEAD request.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
head: async func(url: string, headers: list<tuple<string, string>>, options: option<request-options>) -> result<http-response, error-code>;

/// HTTP OPTIONS request.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
options: async func(url: string, headers: list<tuple<string, string>>, options: option<request-options>) -> result<http-response, error-code>;

/// HTTP TRACE request.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
trace: async func(url: string, headers: list<tuple<string, string>>, options: option<request-options>) -> result<http-response, error-code>;

/// HTTP QUERY request.
@since(version = 0.1.0-dev)
@since(version = 0.1.0)
query: async func(url: string, headers: list<tuple<string, string>>, body: stream<u8>, options: option<request-options>) -> result<http-response, error-code>;
}
Loading
Loading