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

fix studio cli fails when rc file comes from general cli #286

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

joewagner
Copy link
Contributor

@joewagner joewagner commented Jun 6, 2024

Copy link

linear bot commented Jun 6, 2024

Copy link

vercel bot commented Jun 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2024 6:09pm

dtbuchholz
dtbuchholz previously approved these changes Jun 7, 2024
Copy link
Contributor

@dtbuchholz dtbuchholz left a comment

Choose a reason for hiding this comment

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

👍

asutula
asutula previously approved these changes Jun 7, 2024
@joewagner joewagner changed the base branch from joe/data-edit to main June 13, 2024 15:38
@joewagner joewagner dismissed stale reviews from asutula and dtbuchholz June 13, 2024 15:38

The base branch was changed.

// The aliases config is used by @tableland/cli but not here. We want to allow
// people to use the same rc config for both, so we have to remove it here.
// @ts-expect-error the config type doesn't expect aliases
const { aliases: _, ...config } = conf.config;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the functional change.
We remove the aliases field from the config since it can't be used, and yargs crashes if it is present in the config Object.

@@ -1,6 +1,6 @@
import { type Schema as SDKSchema } from "@tableland/sdk";
import { customType } from "drizzle-orm/sqlite-core";
import { unescapeSchema } from "../helpers";
import { unescapeSchema } from "../helpers.js";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Testing this feature requires the use of npm link. When linking local builds you must include the file types, so I added them where needed.

@joewagner
Copy link
Contributor Author

I had to rebase and do a little bit of refactoring. This needs another review.

@joewagner joewagner merged commit e4de8e3 into main Jun 17, 2024
4 checks passed
@joewagner joewagner deleted the joe/cli-rcfile branch June 17, 2024 18:31
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