Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed Studio artifacts into fpx cli #48

Merged
merged 6 commits into from
Jun 21, 2024
Merged

Embed Studio artifacts into fpx cli #48

merged 6 commits into from
Jun 21, 2024

Conversation

hatchan
Copy link
Member

@hatchan hatchan commented Jun 20, 2024

This currently requires a feature flag to actually embed the Studio. If this is enabled, then it requires that the studio is build. To make it easier to work with fpx, I have made this an optin, for mostly the CI build.

Resolves: FP-3793

) -> axum::Router {
let api_router = api_router(base_url, events, store, inspector_service);
axum::Router::new()
.nest("/api/", api_router)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now split into its own router, since that way we can have separate fallback handlers. The only downside is that the routes in the inner router do not have the /api/ prefix.

@@ -42,7 +43,19 @@ impl FromRef<ApiState> for InspectorService {
}

/// Create a API and expose it through a axum router.
pub async fn create_api(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this was async, so removed it

fpx/src/data.rs Outdated
@@ -126,6 +126,7 @@ pub enum DbError {
InternalError(#[from] libsql::Error),
}

#[allow(dead_code)]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to suppress any compile warnings / clippies

@hatchan hatchan marked this pull request as ready for review June 21, 2024 09:28
@hatchan hatchan requested a review from mellowagain June 21, 2024 12:54
When retrieving a file from a dir_entry, use the _full_ path, not just the name within the dir_entry. Not sure if this is a bug or not
Enabling this requires that Studio is compiled. Otherwise compilation will fail.
@hatchan hatchan requested a review from a team as a code owner June 21, 2024 14:06
@hatchan hatchan merged commit c0272c9 into main Jun 21, 2024
3 checks passed
@hatchan hatchan deleted the embed_studio branch June 21, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants