From d5d3c41acee36a24e46061e05d75b4624a87608a Mon Sep 17 00:00:00 2001 From: Daniel Hutzel Date: Thu, 7 Nov 2024 10:57:17 +0100 Subject: [PATCH] .. --- .github/workflows/checkout | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/checkout b/.github/workflows/checkout index 14ce5ff..674ac50 100755 --- a/.github/workflows/checkout +++ b/.github/workflows/checkout @@ -1,10 +1,12 @@ #!/usr/bin/env node -/* eslint-disable no-console */ -const cds = require("@sap/cds") -const { read, write, append=_append, fs, path } = cds.utils +// helpers +const _append = str => ({ to: file => cds.utils.fs.promises.appendFile(cds.utils.path.join(cds.root,file), str) }) const _stringified = o => JSON.stringify(o,null,2) +const cds = require("@sap/cds") +const { read, write, append=_append } = cds.utils + const checkout = { async 'remote-service' () { @@ -25,9 +27,5 @@ const checkout = { } } -function _append(str) { - return { to: file => fs.promises.appendFile(path.join(cds.root,file), str) } -} - const [,,$1] = process.argv checkout[$1]?.() || console.log('Usage: ./checkout remote-service | messaging')