UNPKG

@szegedsw/lib-node

Version:

A little framework published by Szeged Software Zrt. in order to enhance api endpoint security and create reuseable code. Email module, Logging system, and much more. Further improvements are expected.

49 lines 1.85 kB
"use strict"; // import rsync from "rsync"; // todo // const sync = new rsync() // .executable(`rsync -e "ssh -i ${env.mts1Magic32bSshKey} -p ${env.mts1Magic32bSshPort}"`) // .flags("avz") // .source([`${rawFileName}.key.pem`, `${rawFileName}.crt.pem`]) // .destination(env.mts1Magic32bCertDestination); // sync.execute( // async (err, code, cmd) => { // await _try( // res, // async () => { // if (env.debugLog) { // // eslint-disable-next-line no-console // console.log(err, code, cmd); // } // if (err) { // throw err; // } // const divisionUpdate = await oracleExecute(updateDivisionSql, { certId: certUpdate.outBinds?.certId[0], userId, divId }); // if (!divisionUpdate.rowsAffected) { // throw new Error("division not found"); // } // res.status(HttpCodes.ok).end(); // }, // { // "division not found": { code: "notFound", body: "Division not found!" }, // "rsync exited with code 127": { code: "expectationFailed", body: "Rsync is not installed" }, // "rsync exited with code 12": { code: "expectationFailed", body: "Host key verification failed." }, // "rsync exited with code 255": { code: "expectationFailed", body: "Fingerprint authenticity is not established." }, // }, // onError, // ); // }, // (stdout) => { // if (env.debugLog) { // // eslint-disable-next-line no-console // console.log(String(stdout)); // } // }, // (stderr) => { // if (env.debugLog) { // // eslint-disable-next-line no-console // console.log(String(stderr)); // } // }, // ); //# sourceMappingURL=rsync.js.map