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

Implement API manager #263

Merged
merged 11 commits into from
Oct 1, 2024
Merged

Implement API manager #263

merged 11 commits into from
Oct 1, 2024

Conversation

hatchan
Copy link
Member

@hatchan hatchan commented Sep 18, 2024

This allows fpx-app to startup a API whenever a workspace is opened, and stop the API when the workspace is closed.

There are currently two implementations: One that uses the current TS API and starts it by starting processes and managing these. There is also a implementation that uses the Rust API which get started as part of the fpx-app process itself.

Currently the TS implementation is used by default. The Rust API can be used by building the fpx-app with the fpx-api feature flag. Example: cargo tauri dev -f fpx-api.

Other changes:

  • Move ServerEvents and LibSQLStore from fpx-cli to fpx
  • Fix issue with duplicate recent workspaces
  • Small renames

Resolves: FP-4177, FP-4184

Copy link

pkg-pr-new bot commented Sep 18, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/fiberplane/fpx/@fiberplane/studio@263
pnpm add https://pkg.pr.new/fiberplane/fpx/@fiberplane/hono-otel@263

commit: 709a84b

@hatchan hatchan force-pushed the tauri-api branch 5 times, most recently from 15751b5 to 6acd6f4 Compare September 25, 2024 09:34
@hatchan hatchan force-pushed the tauri-api branch 2 times, most recently from 86c1ab1 to 76639ab Compare September 27, 2024 12:10
@hatchan hatchan marked this pull request as ready for review September 27, 2024 12:19
@hatchan hatchan requested review from a team as code owners September 27, 2024 12:19
Copy link
Member

@mellowagain mellowagain left a comment

Choose a reason for hiding this comment

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

still got todos in there

Use Option<T> functions instead of doing it manually
Move LibSqlStore and InMemoryEvents to fpx
Rename CI from build to build_cli
Fix issue with duplicate recent workspace entries
Previously there was a possibility that start would be called twice and two processes would be started, but only one PID would be stored

Add more docs, logs, etc
Use 8788 as api port
@hatchan
Copy link
Member Author

hatchan commented Oct 1, 2024

still got todos in there

I've removed the TODO's, but they are still applicable. They are part of another issue. Thanks for the headsup

@hatchan hatchan merged commit e93ed08 into tauri-main Oct 1, 2024
6 checks passed
@hatchan hatchan deleted the tauri-api branch October 1, 2024 13:26
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.

2 participants