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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ To access the WebSocket server started by the Devtools on your machine, you must
- Via adb:

```
adb forward tcp:3000 tcp:3000
adb forward tcp:3033 tcp:3033
```

- Via the emulator console:
Expand All @@ -190,8 +190,8 @@ adb forward tcp:3000 tcp:3000
# first emulator launches on port 5554, you might need to find out the port via `$ adb devices`
telnet localhost 5554
auth <insert-auth-token-here> # insert token from `$HOME/.emulator_console_auth_token`
# redirect host connections to 3000 to emulator port 3000
redir add tcp:3000:3000
# redirect host connections to 3033 to emulator port 3033
redir add tcp:3033:3033
```

For more information, see the [official documentation](https://developer.android.com/studio/run/emulator-networking#redirection).
Expand Down
2 changes: 1 addition & 1 deletion clients/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn main() {
}
```

With the plugin added, you can start serving your app. The instrumentation server is exposed in `127.0.0.1:3000` by default.
With the plugin added, you can start serving your app. The instrumentation server is exposed in `127.0.0.1:3033` by default.

## Stack 📦

Expand Down
12 changes: 6 additions & 6 deletions clients/web/src/lib/tests/formatters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ describe("getRootPathByUrlSegment", () => {
it("Should be able to find base path if we are on it", () => {
expect(
getRootPathByUrlSegment(
"http://localhost:5173/dash/127.0.0.1/3000/calls",
"http://localhost:5173/dash/127.0.0.1/3033/calls",
"calls",
),
).toBe("http://localhost:5173/dash/127.0.0.1/3000/calls");
).toBe("http://localhost:5173/dash/127.0.0.1/3033/calls");
});

it("Should be able to find base path if we are on it, even if it has search params", () => {
expect(
getRootPathByUrlSegment(
"http://localhost:5173/dash/127.0.0.1/3000/calls?span=9007199254740996",
"http://localhost:5173/dash/127.0.0.1/3033/calls?span=9007199254740996",
"calls",
),
).toBe("http://localhost:5173/dash/127.0.0.1/3000/calls");
).toBe("http://localhost:5173/dash/127.0.0.1/3033/calls");
});

it("Should be abe to find base path even if the key exists twice", () => {
expect(
getRootPathByUrlSegment(
"http://localhost:5173/dash/127.0.0.1/3000/tauri/tauri.conf.json/tauri?size=0",
"http://localhost:5173/dash/127.0.0.1/3033/tauri/tauri.conf.json/tauri?size=0",
"tauri",
),
).toBe("http://localhost:5173/dash/127.0.0.1/3000/tauri");
).toBe("http://localhost:5173/dash/127.0.0.1/3033/tauri");
});
});
6 changes: 3 additions & 3 deletions clients/web/src/views/connect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function Connect() {

const [connectionStore, setConnectionStore] = createStore({
host: "127.0.0.1",
port: "3000",
port: "3033",
});

const [connectionFailed, setConnectionFailed] = createSignal(false);
Expand Down Expand Up @@ -106,8 +106,8 @@ export default function Connect() {
<FormField
name="port"
type="text"
placeholder="3000"
defaultValue="3000"
placeholder="3033"
defaultValue="3033"
label="Port"
required
/>
Expand Down
12 changes: 6 additions & 6 deletions crates/devtools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl Default for Builder {
host: IpAddr::V4(Ipv4Addr::UNSPECIFIED),
#[cfg(not(any(target_os = "ios", target_os = "android")))]
host: IpAddr::V4(Ipv4Addr::LOCALHOST),
port: 3000,
port: 3033,
publish_interval: Duration::from_millis(200),
strict_port: false,
bridge_layer: BridgeLayer::new(Vec::new()),
Expand All @@ -194,7 +194,7 @@ impl Builder {
/// Currently `devtools` **does not** pick a random free port if the configured one
/// is already taken, so you will need to configure a different one manually.
///
/// **default:** `3000`
/// **default:** `3033`
pub fn port(&mut self, port: u16) -> &mut Self {
self.port = port;
self
Expand Down Expand Up @@ -380,10 +380,10 @@ fn print_link(addr: &SocketAddr) {
3,
ios::NSString::new(
format!(
r#"
r"
{} {}{}
{} Local: {}
"#,
",
"Tauri Devtools",
"v",
env!("CARGO_PKG_VERSION"),
Expand All @@ -400,10 +400,10 @@ fn print_link(addr: &SocketAddr) {
{
use colored::Colorize;
println!(
r#"
r"
{} {}{}
{} Local: {}
"#,
",
"Tauri Devtools".bright_purple(),
"v".purple(),
env!("CARGO_PKG_VERSION").purple(),
Expand Down
6 changes: 3 additions & 3 deletions crates/devtools/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ mod tests {
assert_eq!(
cfg.into_inner(),
devtools_core::server::wire::tauri::Config {
raw: serde_json::to_string(&*tauri.app_handle.config()).unwrap()
raw: serde_json::to_string(tauri.app_handle.config()).unwrap()
}
);
}
Expand All @@ -315,7 +315,7 @@ mod tests {

// this will list this crates directory, so should produce the `Cargo.toml`, `build.rs`, `.gitignore`, `ios`, `permissions` and `src` entry
let entries: Vec<_> = stream.into_inner().collect().await;
assert!(entries.len() > 0);
assert!(!entries.is_empty());
}

#[tokio::test]
Expand Down Expand Up @@ -393,7 +393,7 @@ mod tests {

// we don't want to hard code the exact size of Cargo.toml, that would be flaky
// but it should definitely be larger than zero
assert!(buf.len() > 0);
assert!(!buf.is_empty());
}

#[tokio::test]
Expand Down
4 changes: 2 additions & 2 deletions crates/v1/crates/devtools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl Default for Builder {
fn default() -> Self {
Self {
host: IpAddr::V4(Ipv4Addr::LOCALHOST),
port: 3000,
port: 3033,
publish_interval: Duration::from_millis(200),
strict_port: false,
}
Expand All @@ -135,7 +135,7 @@ impl Builder {
/// Currently `devtools` **does not** pick a random free port if the configured one
/// is already taken, so you will need to configure a different one manually.
///
/// **default:** `3000`
/// **default:** `3033`
pub fn port(&mut self, port: u16) -> &mut Self {
self.port = port;
self
Expand Down
2 changes: 1 addition & 1 deletion crates/wire/tests/build-protos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fn build_protos() {

match status {
Ok(status) if !status.success() => panic!("You should commit the protobuf files"),
Err(error) => panic!("failed to run `git diff`: {}", error),
Err(error) => panic!("failed to run `git diff`: {error}"),
Ok(_) => {}
}
}
Loading