Skip to content

Commit 568ea71

Browse files
Merge pull request #373 from crabnebula-dev/refactor/change-default-port
refactor: change default port to 3033
2 parents cacf798 + 8c0229b commit 568ea71

File tree

8 files changed

+25
-25
lines changed

8 files changed

+25
-25
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ To access the WebSocket server started by the Devtools on your machine, you must
181181
- Via adb:
182182

183183
```
184-
adb forward tcp:3000 tcp:3000
184+
adb forward tcp:3033 tcp:3033
185185
```
186186

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

197197
For more information, see the [official documentation](https://developer.android.com/studio/run/emulator-networking#redirection).

clients/web/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn main() {
4646
}
4747
```
4848

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

5151
## Stack 📦
5252

clients/web/src/lib/tests/formatters.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ describe("getRootPathByUrlSegment", () => {
44
it("Should be able to find base path if we are on it", () => {
55
expect(
66
getRootPathByUrlSegment(
7-
"http://localhost:5173/dash/127.0.0.1/3000/calls",
7+
"http://localhost:5173/dash/127.0.0.1/3033/calls",
88
"calls",
99
),
10-
).toBe("http://localhost:5173/dash/127.0.0.1/3000/calls");
10+
).toBe("http://localhost:5173/dash/127.0.0.1/3033/calls");
1111
});
1212

1313
it("Should be able to find base path if we are on it, even if it has search params", () => {
1414
expect(
1515
getRootPathByUrlSegment(
16-
"http://localhost:5173/dash/127.0.0.1/3000/calls?span=9007199254740996",
16+
"http://localhost:5173/dash/127.0.0.1/3033/calls?span=9007199254740996",
1717
"calls",
1818
),
19-
).toBe("http://localhost:5173/dash/127.0.0.1/3000/calls");
19+
).toBe("http://localhost:5173/dash/127.0.0.1/3033/calls");
2020
});
2121

2222
it("Should be abe to find base path even if the key exists twice", () => {
2323
expect(
2424
getRootPathByUrlSegment(
25-
"http://localhost:5173/dash/127.0.0.1/3000/tauri/tauri.conf.json/tauri?size=0",
25+
"http://localhost:5173/dash/127.0.0.1/3033/tauri/tauri.conf.json/tauri?size=0",
2626
"tauri",
2727
),
28-
).toBe("http://localhost:5173/dash/127.0.0.1/3000/tauri");
28+
).toBe("http://localhost:5173/dash/127.0.0.1/3033/tauri");
2929
});
3030
});

clients/web/src/views/connect.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function Connect() {
1616

1717
const [connectionStore, setConnectionStore] = createStore({
1818
host: "127.0.0.1",
19-
port: "3000",
19+
port: "3033",
2020
});
2121

2222
const [connectionFailed, setConnectionFailed] = createSignal(false);
@@ -106,8 +106,8 @@ export default function Connect() {
106106
<FormField
107107
name="port"
108108
type="text"
109-
placeholder="3000"
110-
defaultValue="3000"
109+
placeholder="3033"
110+
defaultValue="3033"
111111
label="Port"
112112
required
113113
/>

crates/devtools/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ impl Default for Builder {
170170
host: IpAddr::V4(Ipv4Addr::UNSPECIFIED),
171171
#[cfg(not(any(target_os = "ios", target_os = "android")))]
172172
host: IpAddr::V4(Ipv4Addr::LOCALHOST),
173-
port: 3000,
173+
port: 3033,
174174
publish_interval: Duration::from_millis(200),
175175
strict_port: false,
176176
bridge_layer: BridgeLayer::new(Vec::new()),
@@ -194,7 +194,7 @@ impl Builder {
194194
/// Currently `devtools` **does not** pick a random free port if the configured one
195195
/// is already taken, so you will need to configure a different one manually.
196196
///
197-
/// **default:** `3000`
197+
/// **default:** `3033`
198198
pub fn port(&mut self, port: u16) -> &mut Self {
199199
self.port = port;
200200
self
@@ -380,10 +380,10 @@ fn print_link(addr: &SocketAddr) {
380380
3,
381381
ios::NSString::new(
382382
format!(
383-
r#"
383+
r"
384384
{} {}{}
385385
{} Local: {}
386-
"#,
386+
",
387387
"Tauri Devtools",
388388
"v",
389389
env!("CARGO_PKG_VERSION"),
@@ -400,10 +400,10 @@ fn print_link(addr: &SocketAddr) {
400400
{
401401
use colored::Colorize;
402402
println!(
403-
r#"
403+
r"
404404
{} {}{}
405405
{} Local: {}
406-
"#,
406+
",
407407
"Tauri Devtools".bright_purple(),
408408
"v".purple(),
409409
env!("CARGO_PKG_VERSION").purple(),

crates/devtools/src/server.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ mod tests {
296296
assert_eq!(
297297
cfg.into_inner(),
298298
devtools_core::server::wire::tauri::Config {
299-
raw: serde_json::to_string(&*tauri.app_handle.config()).unwrap()
299+
raw: serde_json::to_string(tauri.app_handle.config()).unwrap()
300300
}
301301
);
302302
}
@@ -315,7 +315,7 @@ mod tests {
315315

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

321321
#[tokio::test]
@@ -393,7 +393,7 @@ mod tests {
393393

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

399399
#[tokio::test]

crates/v1/crates/devtools/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl Default for Builder {
112112
fn default() -> Self {
113113
Self {
114114
host: IpAddr::V4(Ipv4Addr::LOCALHOST),
115-
port: 3000,
115+
port: 3033,
116116
publish_interval: Duration::from_millis(200),
117117
strict_port: false,
118118
}
@@ -135,7 +135,7 @@ impl Builder {
135135
/// Currently `devtools` **does not** pick a random free port if the configured one
136136
/// is already taken, so you will need to configure a different one manually.
137137
///
138-
/// **default:** `3000`
138+
/// **default:** `3033`
139139
pub fn port(&mut self, port: u16) -> &mut Self {
140140
self.port = port;
141141
self

crates/wire/tests/build-protos.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fn build_protos() {
5757

5858
match status {
5959
Ok(status) if !status.success() => panic!("You should commit the protobuf files"),
60-
Err(error) => panic!("failed to run `git diff`: {}", error),
60+
Err(error) => panic!("failed to run `git diff`: {error}"),
6161
Ok(_) => {}
6262
}
6363
}

0 commit comments

Comments
 (0)