-
Notifications
You must be signed in to change notification settings - Fork 1k
Make FDC generated SDK prompt clearer #8920
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
connectorInfo: ConnectorInfo; | ||
displayIOSWarning: boolean; | ||
}; | ||
export async function doSetup(setup: Setup, config: Config): Promise<void> { | ||
const sdkInfo = await askQuestions(setup, config); | ||
await actuate(sdkInfo, config); | ||
logSuccess( | ||
|
@@ -111,20 +111,19 @@ | |
); | ||
if (targetPlatform === Platform.WEB) { | ||
const unusedFrameworks = SUPPORTED_FRAMEWORKS.filter( | ||
(framework) => !newConnectorYaml!.generate?.javascriptSdk![framework], | ||
Check warning on line 114 in src/init/features/dataconnect/sdk.ts
|
||
); | ||
if (unusedFrameworks.length > 0) { | ||
const additionalFrameworks = await checkbox<(typeof SUPPORTED_FRAMEWORKS)[number]>({ | ||
message: | ||
"Which frameworks would you like to generate SDKs for? " + | ||
"Press Space to select features, then Enter to confirm your choices.", | ||
"Which frameworks would you like to generate SDKs for in addition to the TypeScript SDK? Press Enter to skip.\n", | ||
choices: SUPPORTED_FRAMEWORKS.map((frameworkStr) => ({ | ||
value: frameworkStr, | ||
checked: newConnectorYaml?.generate?.javascriptSdk?.[frameworkStr], | ||
})), | ||
}); | ||
for (const framework of additionalFrameworks) { | ||
newConnectorYaml!.generate!.javascriptSdk![framework] = true; | ||
Check warning on line 126 in src/init/features/dataconnect/sdk.ts
|
||
} | ||
} | ||
} | ||
|
@@ -149,7 +148,7 @@ | |
* and short-circuit the prompt. | ||
* | ||
* `FDC_CONNECTOR` should have the same `<location>/<serviceId>/<connectorId>`. | ||
* @param choices | ||
Check warning on line 151 in src/init/features/dataconnect/sdk.ts
|
||
*/ | ||
async function chooseExistingConnector(choices: connectorChoice[]): Promise<ConnectorInfo> { | ||
if (choices.length === 1) { | ||
|
@@ -173,7 +172,7 @@ | |
}); | ||
} | ||
|
||
export async function generateSdkYaml( | ||
targetPlatform: Platform, | ||
connectorYaml: ConnectorYaml, | ||
connectorDir: string, | ||
|
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.
The new prompt mentions a 'TypeScript SDK', but it seems a 'vanilla JavaScript SDK' is generated by default for the web platform. This is also what the pull request description mentions. To avoid confusion, could you update the prompt to refer to the 'vanilla JavaScript SDK'?