From 9e1fb157f783536b4b1d29dc0779335112b4310b Mon Sep 17 00:00:00 2001 From: MagPasulke Date: Sat, 30 May 2026 13:41:03 +0200 Subject: [PATCH 1/2] chore: initialize fix branch From 4510ba691b1bf8fed149eeae945ee584cd8146be Mon Sep 17 00:00:00 2001 From: MagPasulke Date: Sat, 30 May 2026 13:43:41 +0200 Subject: [PATCH 2/2] fix(ci): replace top-level await with async IIFE in CI runner tsx defaults to CJS output which does not support top-level await. Wrapping the async logic in an IIFE avoids the need for ESM output and works with any tsx version without extra flags. Also reverts the --esm flag from the workflow (not a valid tsx flag). --- .github/workflows/deploy-sap.yml | 2 +- scripts/adt-gitpull-ci.ts | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy-sap.yml b/.github/workflows/deploy-sap.yml index cb0ae9d..f0ec48d 100644 --- a/.github/workflows/deploy-sap.yml +++ b/.github/workflows/deploy-sap.yml @@ -30,4 +30,4 @@ jobs: SAP_ADT_URL: ${{ secrets.SAP_ADT_URL }} SAP_ADT_USER: ${{ secrets.SAP_ADT_USER }} SAP_ADT_PASSWORD: ${{ secrets.SAP_ADT_PASSWORD }} - run: npx tsx --esm scripts/adt-gitpull-ci.ts + run: npx tsx scripts/adt-gitpull-ci.ts diff --git a/scripts/adt-gitpull-ci.ts b/scripts/adt-gitpull-ci.ts index 584be5d..a169244 100644 --- a/scripts/adt-gitpull-ci.ts +++ b/scripts/adt-gitpull-ci.ts @@ -21,15 +21,17 @@ if (!url || !user || !password) { process.exit(1) } -const result = await adtGitPull({ url, user, password, cwd: process.cwd() }) +void (async () => { + const result = await adtGitPull({ url, user, password, cwd: process.cwd() }) -if (!result.ok) { - console.error("abapGit pull failed:", result.error) - process.exit(1) -} + if (!result.ok) { + console.error("abapGit pull failed:", result.error) + process.exit(1) + } -console.log(`abapGit pull succeeded`) -console.log(` Repo: ${result.repoUrl}`) -console.log(` Package: ${result.sapPackage}`) -console.log(` Branch: ${result.branch}`) -console.log(` System: ${result.systemUrl}`) + console.log(`abapGit pull succeeded`) + console.log(` Repo: ${result.repoUrl}`) + console.log(` Package: ${result.sapPackage}`) + console.log(` Branch: ${result.branch}`) + console.log(` System: ${result.systemUrl}`) +})()