@gluhar/cli 2.6.1 → 2.6.3

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.6.1",
3
+ "version": "2.6.3",
4
4
  "description": "Gluhar cli commands and scripts",
5
5
  "exports": {
6
6
  ".": "./src/index.ts",
@@ -44,5 +44,5 @@
44
44
  "tsconfig-paths": "^4.2.0",
45
45
  "typescript": "^5.5.4"
46
46
  },
47
- "gitHead": "dafbac3293b728cd402a86a5e83a5fd4f8586715"
47
+ "gitHead": "5ee4fec77d5ac77a01d4320bf4981a16d16522f6"
48
48
  }
@@ -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;AAsEzC,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;AAuEzC,eAAO,MAAM,SAAS,YAAmB,OAAO,aAAa,OAAO,kBAoBnE,CAAC"}
package/src/preAction.js CHANGED
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.preAction = void 0;
4
4
  const utils_1 = require("./utils");
5
- // import { getConfigOpt, setConfigOpt } from './config';
6
5
  const cmd_1 = require("./scripts/cmd");
7
6
  const constants_1 = require("./constants");
8
7
  const git_1 = require("./scripts/git");
8
+ // import { getConfigOpt, setConfigOpt } from './config';
9
9
  const getOptions = (command) => command.opts();
10
10
  const log = (0, utils_1.logger)("cli");
11
11
  // const loadConfig = (rootCmd: Command, actionCmd: Command) => {
@@ -38,7 +38,8 @@ const logCli = (actionCmd) => {
38
38
  log.verbose("cwd:", process.cwd());
39
39
  };
40
40
  const checkCliVersion = async () => {
41
- if (git_1.git.getRepo() === "gluhar")
41
+ const hasGit = (0, cmd_1.getCmdOutput)("git rev-parse --is-inside-work-tree");
42
+ if (hasGit === "true" && git_1.git.getRepo() === "gluhar")
42
43
  return;
43
44
  const latestVersion = (0, cmd_1.getCmdOutput)("npm show @gluhar/cli version");
44
45
  // Version is up to date
@@ -51,7 +52,7 @@ const checkCliVersion = async () => {
51
52
  // If we are in a project, also update the local version
52
53
  const isLocal = !(0, cmd_1.getCmdOutput)("npm list @gluhar/cli --depth=0").includes("empty");
53
54
  if (isLocal)
54
- (0, cmd_1.executeCmd)("npm update @gluhar/cli@latest");
55
+ (0, cmd_1.executeCmd)("npm update @gluhar/cli");
55
56
  }
56
57
  };
57
58
  const preAction = async (rootCmd, actionCmd) => {