Wa-automate-nodejs: Feature Request: Expose client package version

Created on 27 Jun 2020  Â·  4Comments  Â·  Source: open-wa/wa-automate-nodejs

Hi, I want to have my nodejs app be able to read the version of the package of the @open-wa/wa-automate the client is using. I noticed that this is read within the client but not exposed through the library. I know there's ways to read this from the file system, but since this is already being read into the client, can this be exposed for use by my nodejs app?

My use case, i want to track both the whatsapp version and wa-automate versions being used

enhancement

Most helpful comment

@github-actions run


âš¡ Release! âš¡

(async () => {
function exec(cmd) {
  console.log(execSync(cmd).toString());
}

// Config
const gitUserEmail = "github-actions[bot]@users.noreply.github.com";
const gitUserName = "github-actions[bot]";

exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`);
exec(`git config --global user.email "${gitUserEmail}"`);
exec(`git config --global user.name "${gitUserName}"`);
exec(`npm i`);
exec(`npm run release-ci`);

//comment on the issue
var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();

    await postComment(result);

//create changelog image
exec(`npm run release-image`);
exec(`git commit -a -m 'updated release-image'`);
exec(`git push --force`);
  })();

All 4 comments

Yeh I was planning on doing that tonight anyways :D

@github-actions run


âš¡ Release! âš¡

(async () => {
function exec(cmd) {
  console.log(execSync(cmd).toString());
}

// Config
const gitUserEmail = "github-actions[bot]@users.noreply.github.com";
const gitUserName = "github-actions[bot]";

exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`);
exec(`git config --global user.email "${gitUserEmail}"`);
exec(`git config --global user.name "${gitUserName}"`);
exec(`npm i`);
exec(`npm run release-ci`);

//comment on the issue
var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();

    await postComment(result);

//create changelog image
exec(`npm run release-image`);
exec(`git commit -a -m 'updated release-image'`);
exec(`git push --force`);
  })();

Changelog

🚀 Release 1.9.85 (2020-06-27)

  • build(deps): bump puppeteer from 4.0.0 to 4.0.1 #572
  • build(deps-dev): bump @types/node from 14.0.13 to 14.0.14 #573
  • build(deps-dev): bump @types/line-reader from 0.0.29 to 0.0.30 #577
  • Release 1.9.85 6bfb953
  • deprecated getAllChatsWithMessages #576 f454cd9
  • animated stickers (Still WIP), prelim groundwork #580 55232ee
  • Feature: onAnyMessage now includes more/all message types #585 14b49cc
  • Feature: implemented iAmAdmin #584 fb1354e
  • Feature: Implemented getSessionInfo #586 fef6b95
  • Improved error messages #581 03dcde7
  • chore: bump supported WA version 3d77906
  • Demo: increases express json limit to enable sending base64 over api 83bfbf7
  • Enhancement: Improved performance 5 second faster load times if safeMode is off. e3cefef
  • removed p-queue as dev dep (already a standard dep) 7622cce

Implemented in 1.9.85

const sessionInfo = client.getSessionInfo();
// returns the debug info from initilization

const config = client.getConfig(); //available after 1.9.86
// returns the config used to create the session without any sensitive data

https://open-wa.github.io/wa-automate-nodejs/classes/client.html#getsessioninfo
https://open-wa.github.io/wa-automate-nodejs/classes/client.html#getconfig

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DeLuca92 picture DeLuca92  Â·  5Comments

yoavmmn picture yoavmmn  Â·  5Comments

scoorpionx picture scoorpionx  Â·  7Comments

pedrogrisolia picture pedrogrisolia  Â·  4Comments

jersonjunior picture jersonjunior  Â·  6Comments