Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Fixed issue with prompt when Data Connect prompts user for framework generation.
- Fixed a bug where the Admin SDK fails with ENOTFOUND when automatically connecting to the Data Connect emulator when run in the Functions emulator. (#8379)
2 changes: 1 addition & 1 deletion src/init/features/dataconnect/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
connectorInfo: ConnectorInfo;
displayIOSWarning: boolean;
};
export async function doSetup(setup: Setup, config: Config): Promise<void> {

Check warning on line 38 in src/init/features/dataconnect/sdk.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing JSDoc comment
const sdkInfo = await askQuestions(setup, config);
await actuate(sdkInfo, config);
logSuccess(
Expand Down Expand Up @@ -92,7 +92,7 @@
{ name: "Android (Kotlin)", value: Platform.ANDROID },
{ name: "Flutter (Dart)", value: Platform.FLUTTER },
];
targetPlatform = await promptOnce({

Check warning on line 95 in src/init/features/dataconnect/sdk.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value
message: "Which platform do you want to set up a generated SDK for?",
type: "list",
choices: platforms,
Expand All @@ -101,7 +101,7 @@
logSuccess(`Detected ${targetPlatform} app in directory ${appDir}`);
}

const connectorInfo: ConnectorInfo = await promptOnce({

Check warning on line 104 in src/init/features/dataconnect/sdk.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value
message: "Which connector do you want set up a generated SDK for?",
type: "list",
choices: connectorChoices,
Expand All @@ -116,18 +116,18 @@
);
if (targetPlatform === Platform.WEB) {
const unusedFrameworks = SUPPORTED_FRAMEWORKS.filter(
(framework) => !newConnectorYaml!.generate?.javascriptSdk![framework],

Check warning on line 119 in src/init/features/dataconnect/sdk.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Forbidden non-null assertion

Check warning on line 119 in src/init/features/dataconnect/sdk.ts

View workflow job for this annotation

GitHub Actions / lint (20)

This assertion is unnecessary since it does not change the type of the expression

Check warning on line 119 in src/init/features/dataconnect/sdk.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Forbidden non-null assertion
);
const hasFrameworkEnabled = unusedFrameworks.length < SUPPORTED_FRAMEWORKS.length;
if (unusedFrameworks.length > 0) {
const additionalFrameworks: { fdcFrameworks: (keyof SupportedFrameworks)[] } = await prompt(

Check warning on line 123 in src/init/features/dataconnect/sdk.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value
setup,
[
{
type: "checkbox",
name: "fdcFrameworks",
message:
`Which ${hasFrameworkEnabled && "additional "}frameworks would you like to generate SDKs for? ` +
`Which ${hasFrameworkEnabled ? "additional " : ""}frameworks would you like to generate SDKs for? ` +
"Press Space to select features, then Enter to confirm your choices.",
choices: unusedFrameworks.map((frameworkStr) => ({
value: frameworkStr,
Expand All @@ -138,7 +138,7 @@
],
);
for (const framework of additionalFrameworks.fdcFrameworks) {
newConnectorYaml!.generate!.javascriptSdk![framework] = true;

Check warning on line 141 in src/init/features/dataconnect/sdk.ts

View workflow job for this annotation

GitHub Actions / lint (20)

This assertion is unnecessary since it does not change the type of the expression

Check warning on line 141 in src/init/features/dataconnect/sdk.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Forbidden non-null assertion

Check warning on line 141 in src/init/features/dataconnect/sdk.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Forbidden non-null assertion
}
}
}
Expand Down
Loading