From d023defecc6401270083a86dd9448ae7722410e1 Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Sun, 8 Feb 2026 07:31:51 +0100 Subject: [PATCH] feat(create-pca): support optional config file output --- scripts/create-pca.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/create-pca.js b/scripts/create-pca.js index ec658cb..d5724da 100755 --- a/scripts/create-pca.js +++ b/scripts/create-pca.js @@ -238,12 +238,19 @@ Options: } else { console.log(`Created application '${appName}'`); } - console.log(`appId: ${appId}`); - console.log(`export const config = { + const configTemplate = `export const config = { "appName": "${appName}", "tenantId": "${tenantId}", "clientId": "${appId}" -};`); +};`; + + if (configPath) { + const targetPath = path.resolve(configPath); + fs.mkdirSync(path.dirname(targetPath), { recursive: true }); + fs.writeFileSync(targetPath, `${configTemplate}\n`, "utf8"); + } + + console.log(configTemplate); } main().catch((err) => {