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

perf(auth): update add auth action #13055

Merged
merged 1 commit into from
Jan 15, 2025
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
3 changes: 2 additions & 1 deletion packages/fx-core/src/core/FxCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2275,8 +2275,9 @@ export class FxCore {
},
spec: {
url: apiSpecRelativePath,
run_for_functions: apiOperation,
progress_style: "ShowUsageWithInputAndOutput",
},
run_for_functions: apiOperation,
});
await fs.writeJson(pluginManifestPath, pluginManifest, { spaces: 4 });
}
Expand Down
11 changes: 7 additions & 4 deletions packages/fx-core/src/question/other.ts
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ export function apiSpecFromPluginManifestQuestion(): SingleSelectQuestion {
const specs = pluginManifest
.runtimes!.filter((runtime) => runtime.type === "OpenApi")
.map((runtime) => runtime.spec.url as string);
return specs;
return [...new Set(specs)];
},
};
}
Expand All @@ -894,12 +894,15 @@ export function apiFromPluginManifestQuestion(): MultiSelectQuestion {
const pluginManifestPath = inputs[QuestionNames.PluginManifestFilePath];
const apiSpecPath = inputs[QuestionNames.ApiSpecLocation];
const pluginManifest = (await fs.readJson(pluginManifestPath)) as PluginManifestSchema;
const apis = pluginManifest
const apis: string[] = [];
pluginManifest
.runtimes!.filter(
(runtime) => runtime.type === "OpenApi" && runtime.spec.url === apiSpecPath
)
.map((runtime) => runtime.spec.run_for_functions as string);
return apis;
.forEach((runtime) => {
apis.push(...(runtime.run_for_functions as string[]));
});
return [...new Set(apis)];
},
};
}
Expand Down
Loading