@gluhar/cli 2.2.0 → 2.3.0

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.2.0",
3
+ "version": "2.3.0",
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": "812cd4e9c210817ad607720435fed962d18b8688"
46
+ "gitHead": "8d25dab1d9388a4f34ca4b090f71c01ae9903eb2"
47
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":";AAQA,wBAQE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":";AASA,wBASE"}
@@ -10,6 +10,7 @@ const generate_1 = __importDefault(require("./generate"));
10
10
  const reinstall_1 = __importDefault(require("./reinstall"));
11
11
  const release_1 = __importDefault(require("./release"));
12
12
  const version_1 = __importDefault(require("./version"));
13
+ const upgrade_1 = __importDefault(require("./upgrade"));
13
14
  exports.default = [
14
15
  deploy_1.default,
15
16
  version_1.default,
@@ -18,4 +19,5 @@ exports.default = [
18
19
  deinstall_1.default,
19
20
  reinstall_1.default,
20
21
  generate_1.default,
22
+ upgrade_1.default,
21
23
  ];
@@ -0,0 +1,4 @@
1
+ export interface UpgradeOptions {
2
+ upgrade: boolean;
3
+ }
4
+ //# sourceMappingURL=UpgradeOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UpgradeOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/upgrade/UpgradeOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;CAClB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { Command } from "commander";
2
+ declare const _default: Command;
3
+ export default _default;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/upgrade/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAGpC,wBAMmB"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const commander_1 = require("commander");
4
+ const upgrade_1 = require("./upgrade");
5
+ exports.default = new commander_1.Command()
6
+ .name("upgrade")
7
+ .description("Upgrade all gluhar dependencies in a project to their latest versions.")
8
+ .option("-b, --upgrade", "A boolean option.")
9
+ .action(upgrade_1.upgrade);
@@ -0,0 +1,2 @@
1
+ export declare const log: import("../../utils").Logger;
2
+ //# sourceMappingURL=log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/commands/upgrade/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,4BAAoB,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.log = void 0;
4
+ const utils_1 = require("../../utils");
5
+ exports.log = (0, utils_1.logger)("upgrade");
@@ -0,0 +1,3 @@
1
+ import { UpgradeOptions } from "./UpgradeOptions";
2
+ export declare const upgrade: (options: UpgradeOptions) => void;
3
+ //# sourceMappingURL=upgrade.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../../../src/commands/upgrade/upgrade.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,eAAO,MAAM,OAAO,YAAa,cAAc,SAK9C,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.upgrade = void 0;
4
+ const cmd_1 = require("../../scripts/cmd");
5
+ const log_1 = require("./log");
6
+ const upgrade = (options) => {
7
+ log_1.log.info("Upgrading gluhar dependencies.");
8
+ // Upgrade all gluhar dependencies in a project to their latest versions.
9
+ (0, cmd_1.executeCmd)("npm update @gluhar/cli @gluhar/app");
10
+ };
11
+ exports.upgrade = upgrade;
package/src/preAction.js CHANGED
@@ -53,9 +53,9 @@ const preAction = async (rootCmd, actionCmd) => {
53
53
  const { cwd: initCwd } = getOptions(rootCmd);
54
54
  if (initCwd)
55
55
  cmd_1.cmd.cd(initCwd);
56
- // loadConfig(rootCmd, actionCmd);
57
56
  // Check for newer cli version
58
57
  await checkCliVersion();
58
+ // loadConfig(rootCmd, actionCmd);
59
59
  const { cwd: newCwd } = getOptions(rootCmd);
60
60
  if (newCwd && newCwd !== initCwd)
61
61
  cmd_1.cmd.cd(newCwd);