@gluhar/cli 2.3.0 → 2.3.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gluhar/cli",
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "description": "Gluhar cli commands and scripts",
5
5
  "exports": {
6
6
  ".": "./src/index.ts",
@@ -43,5 +43,5 @@
43
43
  "tsconfig-paths": "^4.2.0",
44
44
  "typescript": "^5.5.4"
45
45
  },
46
- "gitHead": "8d25dab1d9388a4f34ca4b090f71c01ae9903eb2"
46
+ "gitHead": "1ade1c2c6ebb8dffa3261352ab6258aea045fe38"
47
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"preAction.d.ts","sourceRoot":"","sources":["../../src/preAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6DzC,eAAO,MAAM,SAAS,YAAmB,OAAO,aAAa,OAAO,kBAoBnE,CAAC"}
1
+ {"version":3,"file":"preAction.d.ts","sourceRoot":"","sources":["../../src/preAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmEzC,eAAO,MAAM,SAAS,YAAmB,OAAO,aAAa,OAAO,kBAoBnE,CAAC"}
package/src/preAction.js CHANGED
@@ -45,6 +45,10 @@ const checkCliVersion = async () => {
45
45
  const installLatest = await (0, utils_1.confirmQuestion)(`There is a newer version of the gluhar/cli available (v${latestVersion}). \nDo you want to install it now? (npm i -g @gluhar/cli)`);
46
46
  if (installLatest) {
47
47
  (0, cmd_1.executeCmd)("npm i -g @gluhar/cli@latest");
48
+ // If we are in a project, also update the local version
49
+ const isLocal = !(0, cmd_1.getCmdOutput)("npm list @gluhar/cli --depth=0").includes("empty");
50
+ if (isLocal)
51
+ (0, cmd_1.executeCmd)("npm update @gluhar/cli@latest");
48
52
  }
49
53
  };
50
54
  const preAction = async (rootCmd, actionCmd) => {