ag-awsauth 0.0.49 → 0.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +8 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -46,8 +46,15 @@ function main(args) {
46
46
  }
47
47
  });
48
48
  if (args.version) {
49
+ let pjpath = '../package.json';
50
+ if (!fs_1.default.existsSync(pjpath)) {
51
+ pjpath = '../../package.json';
52
+ }
53
+ if (!fs_1.default.existsSync(pjpath)) {
54
+ throw new Error('package json cant be found');
55
+ }
49
56
  // eslint-disable-next-line @typescript-eslint/no-var-requires
50
- const p = require('../../package.json');
57
+ const p = require(pjpath);
51
58
  (0, log_1.warn)('version=' + p.version);
52
59
  return;
53
60
  }
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "author": "andrei gec (andreigec@hotmail.com)",
6
6
  "license": "ISC",
7
7
  "private": false,
8
- "version": "0.0.49",
8
+ "version": "0.0.50",
9
9
  "preferGlobal": true,
10
10
  "scripts": {
11
11
  "format": "eslint --ext .ts,.tsx ./src --fix",