Skip to content

Commit cd2fcc0

Browse files
authored
Merge branch 'main' into app-users-orgs-and-more
2 parents a731f47 + e2de39a commit cd2fcc0

File tree

114 files changed

+2832
-1618
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+2832
-1618
lines changed

.github/workflows/labrinth-docker.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ jobs:
3838
- name: Build and push
3939
id: docker_build
4040
uses: docker/build-push-action@v2
41+
env:
42+
SQLX_OFFLINE: true
4143
with:
42-
context: ./apps/labrinth
44+
file: ./apps/labrinth/Dockerfile
4345
push: ${{ github.event_name != 'pull_request' }}
4446
tags: ${{ steps.docker_meta.outputs.tags }}
4547
labels: ${{ steps.docker_meta.outputs.labels }}

.github/workflows/theseus-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ on:
66
tags:
77
- 'v*'
88
paths:
9-
- .github/workflows/app-release.yml
9+
- .github/workflows/theseus-release.yml
1010
- 'apps/app/**'
1111
- 'apps/app-frontend/**'
12+
- 'apps/labrinth/src/common/**'
13+
- 'apps/labrinth/Cargo.toml'
1214
- 'packages/app-lib/**'
1315
- 'packages/app-macros/**'
1416
- 'packages/assets/**'

.idea/code.iml

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.lock

Lines changed: 63 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ members = [
77
'./apps/labrinth',
88
'./apps/daedalus_client',
99
'./packages/daedalus',
10+
'./packages/ariadne',
1011
]
1112

1213
# Optimize for speed and reduce size on release builds
@@ -21,4 +22,4 @@ strip = true # Remove debug symbols
2122
opt-level = 3
2223

2324
[patch.crates-io]
24-
wry = { git = "https://github.com/modrinth/wry", rev = "51907c6" }
25+
wry = { git = "https://github.com/modrinth/wry", rev = "51907c6" }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[env]
2+
SQLX_OFFLINE = "true"

apps/app-playground/src/main.rs

Lines changed: 12 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
windows_subsystem = "windows"
44
)]
55

6+
use std::time::Duration;
67
use theseus::prelude::*;
7-
8-
use theseus::profile::create::profile_create;
8+
use tokio::signal::ctrl_c;
99

1010
// A simple Rust implementation of the authentication run
1111
// 1) call the authenticate_begin_flow() function to get the URL to open (like you would in the frontend)
@@ -41,54 +41,21 @@ async fn main() -> theseus::Result<()> {
4141
// Initialize state
4242
State::init().await?;
4343

44-
if minecraft_auth::users().await?.is_empty() {
45-
println!("No users found, authenticating.");
46-
authenticate_run().await?; // could take credentials from here direct, but also deposited in state users
47-
}
48-
//
49-
// st.settings
50-
// .write()
51-
// .await
52-
// .java_globals
53-
// .insert(JAVA_8_KEY.to_string(), check_jre(path).await?.unwrap());
54-
// Clear profiles
55-
println!("Clearing profiles.");
56-
{
57-
let h = profile::list().await?;
58-
for profile in h.into_iter() {
59-
profile::remove(&profile.path).await?;
44+
loop {
45+
if State::get().await?.friends_socket.is_connected().await {
46+
break;
6047
}
48+
tokio::time::sleep(Duration::from_millis(500)).await;
6149
}
6250

63-
println!("Creating/adding profile.");
64-
65-
let name = "Example".to_string();
66-
let game_version = "1.16.1".to_string();
67-
let modloader = ModLoader::Forge;
68-
let loader_version = "stable".to_string();
69-
70-
let profile_path = profile_create(
71-
name,
72-
game_version,
73-
modloader,
74-
Some(loader_version),
75-
None,
76-
None,
77-
None,
78-
)
79-
.await?;
80-
81-
println!("running");
82-
// Run a profile, running minecraft and store the RwLock to the process
83-
let process = profile::run(&profile_path).await?;
84-
85-
println!("Minecraft UUID: {}", process.uuid);
51+
tracing::info!("Starting host");
8652

87-
println!("All running process UUID {:?}", process::get_all().await?);
53+
let socket = State::get().await?.friends_socket.open_port(25565).await?;
54+
tracing::info!("Running host on socket {}", socket.socket_id());
8855

89-
// hold the lock to the process until it ends
90-
println!("Waiting for process to end...");
91-
process::wait_for(process.uuid).await?;
56+
ctrl_c().await?;
57+
tracing::info!("Stopping host");
58+
socket.shutdown().await?;
9259

9360
Ok(())
9461
}

apps/app/.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[env]
2+
SQLX_OFFLINE = "true"

0 commit comments

Comments
 (0)