@gluhar/cli 2.2.1 → 2.3.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.
- package/package.json +2 -2
- package/src/commands/index.d.ts.map +1 -1
- package/src/commands/index.js +2 -0
- package/src/commands/upgrade/UpgradeOptions.d.ts +4 -0
- package/src/commands/upgrade/UpgradeOptions.d.ts.map +1 -0
- package/src/commands/upgrade/UpgradeOptions.js +2 -0
- package/src/commands/upgrade/index.d.ts +4 -0
- package/src/commands/upgrade/index.d.ts.map +1 -0
- package/src/commands/upgrade/index.js +9 -0
- package/src/commands/upgrade/log.d.ts +2 -0
- package/src/commands/upgrade/log.d.ts.map +1 -0
- package/src/commands/upgrade/log.js +5 -0
- package/src/commands/upgrade/upgrade.d.ts +3 -0
- package/src/commands/upgrade/upgrade.d.ts.map +1 -0
- package/src/commands/upgrade/upgrade.js +11 -0
- package/src/preAction.d.ts.map +1 -1
- package/src/preAction.js +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gluhar/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
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": "
|
|
46
|
+
"gitHead": "6d88d845fa9a102d80cfeaf2555cc07bfe9e3d71"
|
|
47
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":";AASA,wBASE"}
|
package/src/commands/index.js
CHANGED
|
@@ -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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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.d.ts.map
CHANGED
|
@@ -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;
|
|
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 i @gluhar/cli@latest");
|
|
48
52
|
}
|
|
49
53
|
};
|
|
50
54
|
const preAction = async (rootCmd, actionCmd) => {
|