avo 3.2.7-beta.0 → 3.2.7-beta.1

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 (3) hide show
  1. package/README.md +1 -1
  2. package/cli.js +7 -12
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -45,4 +45,4 @@ For more documentation, visit [https://www.avo.app/docs/implementation/cli](http
45
45
 
46
46
  **Caught a Bug?** Thank you, you are precious to us :hug: Please create a issue on the GitHub repo or send an email to friends@avo.app. We'll do our best to resolve it quickly!
47
47
 
48
- **To create a release:** Verify that the changes in the _Unreleased_ section in CHANGELOG.md are accurate, create a new heading with the correct semantic version then move the content from the _Unreleased_ section there • Update the semantic version in `package.json` to match the one you just created in the changelog • Commit with the message "Release <version>" and push the changes • Publish the package to npm (you'll need to be a maintainer of the avo project in npm): `npm publish`
48
+ **To create a release:** Verify that the changes in the _Unreleased_ section in CHANGELOG.md are accurate, create a new heading with the correct semantic version then move the content from the _Unreleased_ section there • Update the semantic version in `package.json` to match the one you just created in the changelog • Commit with the message `Release <version>` and push the changes • Publish the package to npm (you'll need to be a maintainer of the avo project in npm): `npm publish`
package/cli.js CHANGED
@@ -462,17 +462,8 @@ function promptPullMaster(json) {
462
462
  return Promise.resolve(json);
463
463
  });
464
464
  }
465
- function installIdOrUserId() {
466
- const installId = conf.get('avo_install_id');
467
- const user = conf.get('user');
468
- if (user && user.user_id) {
469
- return user.user_id;
470
- }
471
- return installId;
472
- }
473
- function invokedByCi() {
474
- return process.env.CI !== undefined;
475
- }
465
+ const installIdOrUserId = () => conf.get('user')?.user_id ?? conf.get('avo_install_id');
466
+ const invokedByCi = () => process.env.CI !== undefined;
476
467
  function requireAuth(argv, cb) {
477
468
  const tokens = conf.get('tokens');
478
469
  const user = conf.get('user');
@@ -1346,10 +1337,14 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
1346
1337
  .command({
1347
1338
  command: 'track-install',
1348
1339
  desc: false,
1349
- handler: () => {
1340
+ handler: async (argv) => {
1350
1341
  Avo.cliInstalled({
1351
1342
  userId_: installIdOrUserId(),
1352
1343
  cliInvokedByCi: invokedByCi(),
1344
+ }).catch((error) => {
1345
+ if (argv.verbose) {
1346
+ console.error('Failed to track cli installed', error);
1347
+ }
1353
1348
  });
1354
1349
  },
1355
1350
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "avo",
3
- "version": "3.2.7-beta.0",
3
+ "version": "3.2.7-beta.1",
4
4
  "type": "module",
5
5
  "description": "The command-line interface for Avo",
6
6
  "author": "Avo (https://www.avo.app)",
@@ -17,7 +17,7 @@
17
17
  "node": ">=14.16"
18
18
  },
19
19
  "scripts": {
20
- "postinstall": "node cli.js track-install; true",
20
+ "postinstall": "node cli.js track-install",
21
21
  "prepublishOnly": "npm run compile",
22
22
  "lint": "eslint cli.ts",
23
23
  "format": "prettier --write cli.ts",
@@ -40,7 +40,7 @@
40
40
  "jsonwebtoken": "^9.0.0",
41
41
  "load-json-file": "^7.0.1",
42
42
  "log-symbols": "^5.1.0",
43
- "minimatch": "^6.0.4",
43
+ "minimatch": "^7.0.0",
44
44
  "node-avo-inspector": "^1.0.1",
45
45
  "open": "^8.4.0",
46
46
  "ora": "^6.0.1",
@@ -64,7 +64,7 @@
64
64
  "eslint-config-airbnb-base": "^15.0.0",
65
65
  "eslint-config-prettier": "^8.5.0",
66
66
  "eslint-plugin-import": "^2.25.2",
67
- "prettier": "2.8.3",
67
+ "prettier": "2.8.4",
68
68
  "typescript": "^4.7.4"
69
69
  }
70
70
  }