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

feat: add an internal for now studio package #11037

Merged
merged 9 commits into from
May 16, 2024
Merged

Conversation

Princesseuh
Copy link
Member

Changes

In the future, Astro Studio will include more features than just DB, as such some of the more internal parts around handling tokens and env need to be elsewhere than the DB package. This PR adds a new @astrojs/studio package that only contains those parts.

In the future, this package could become the "core" Studio package and then we'll have a astro studio command and stuff, but for now, it's just code moved around

Testing

DB tests should still pass!

Docs

N/A for now.

Copy link

changeset-bot bot commented May 14, 2024

🦋 Changeset detected

Latest commit: 0cf5276

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@bholmesdev bholmesdev left a comment

Choose a reason for hiding this comment

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

Seems like we're being conservative with the code we're splitting out, so nothing I'd block on. I'd definitely expect the URL consts like studio.astro.build to be pulled to @packages/studio though. Any reason to leave them in @packages/db?

@Princesseuh
Copy link
Member Author

Princesseuh commented May 15, 2024

Seems like we're being conservative with the code we're splitting out, so nothing I'd block on. I'd definitely expect the URL consts like studio.astro.build to be pulled to @packages/studio though. Any reason to leave them in @packages/db?

Fixed this! I left the ones that are only relevant for db in the db package for now, but moved everything else

@Fryuni
Copy link
Member

Fryuni commented May 15, 2024

Uhuuul, thanks guys!! This removes the need for some very hacky workarounds to use DB connection inside of integration hooks.

Copy link
Contributor

@bholmesdev bholmesdev left a comment

Choose a reason for hiding this comment

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

This is a good first step! I'll admit I'm still worried the line between studio and db will be hard to draw. For example, what about the remote db client? Do we expect users to generically connect to a db over http, or is this studio-specific? I know it contains code that expects specific response values.Same goes for the db push CLI, which has specific payload shapes to send over http.

@Princesseuh
Copy link
Member Author

This is a good first step! I'll admit I'm still worried the line between studio and db will be hard to draw. For example, what about the remote db client? Do we expect users to generically connect to a db over http, or is this studio-specific? I know it contains code that expects specific response values.Same goes for the db push CLI, which has specific payload shapes to send over http.

Yeah, fwiw right now this is only really to make things easier for us to re-use the code for future work. Users using any of this are in On Their Own:tm:

packages/db/package.json Outdated Show resolved Hide resolved
@Fryuni
Copy link
Member

Fryuni commented May 15, 2024

Users using any of this are in On Their Own™️

The bleeding edge is not called that for nothing! We always get cut when doing epic things.

@Princesseuh Princesseuh merged commit 9332bb1 into main May 16, 2024
14 checks passed
@Princesseuh Princesseuh deleted the feat/studio-package branch May 16, 2024 16:10
@astrobot-houston astrobot-houston mentioned this pull request May 16, 2024
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.

None yet

5 participants