refactor(config): load JSON configs and emit JSON-only PCA output

This commit is contained in:
2026-02-08 10:44:04 +01:00
parent ec5b0906ba
commit b4cddcc50a
3 changed files with 50 additions and 47 deletions

View File

@@ -2,22 +2,22 @@
* Get an Azure application by its display name.
*
* @param { Object } client
* @param { string } appName
* @param { string } displayName
* @returns
*/
export async function getApp(client, appName) {
export async function getApp(client, displayName) {
const result = await client
.api("/applications")
.filter(`displayName eq '${appName}'`)
.filter(`displayName eq '${displayName}'`)
.get();
// Return the first application found or null if none exists
return result.value.length > 0 ? result.value[0] : null;
}
export async function createApp(client, appName) {
export async function createApp(client, displayName) {
const app = await client.api("/applications").post({
displayName: appName,
displayName,
});
if (!app || !app.appId) {