-
Notifications
You must be signed in to change notification settings - Fork 166
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: Allow generating SDKs locally without Fern token #2551
Conversation
Simplifies using Fern for open source contributors by generating repos to local `sdks` folder. Simplifies the fern script for `./scripts/fern/gen.rs`. Related PR: fern-api/fern#2551
Hi, Any update on this? I see it's one of the factors that may help to run fern locally without any token/login required. Best |
@@ -59,6 +59,9 @@ export async function generateWorkspace({ | |||
context | |||
}); | |||
} else { | |||
if (!token) { | |||
return context.failAndThrow("Must provide token if 'useLocalDocker' is false"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useLocalDocker
is not a flag the user knows about -- they only know about --local
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about Please run fern login.
@@ -25,7 +25,7 @@ export async function generateWorkspace({ | |||
version: string | undefined; | |||
groupName: string | undefined; | |||
shouldLogS3Url: boolean; | |||
token: FernToken; | |||
token?: FernToken; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we type this as FernToken | undefined, so that consumers are forced to provide a value
@@ -59,6 +59,9 @@ export async function generateWorkspace({ | |||
context | |||
}); | |||
} else { | |||
if (!token) { | |||
return context.failAndThrow("Must provide token if 'useLocalDocker' is false"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dsinghvi what are your thoughts on this?
return context.failAndThrow("Must provide token if 'useLocalDocker' is false"); | |
return context.failAndThrow("Please run fern login. No token was found, and `--local` is not enabled."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if "no token was found" or "no token was provided" makes more sense here.
@@ -25,7 +25,7 @@ export async function generateWorkspace({ | |||
version: string | undefined; | |||
groupName: string | undefined; | |||
shouldLogS3Url: boolean; | |||
token: FernToken; | |||
token?: FernToken; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
token?: FernToken; | |
token: FernToken | undefined; |
aeead95
to
572ff3c
Compare
is there any update regarding this pr?! it would be useful to merge it :) |
Using Fern in an open source repo can be tricky since outside contributors currently need to have their own Fern token.
The
fern generate --local
does not require a Fern token to function. This PR disables prompting the user to sign in when using the local Docker generation.