@webiny/cli 5.36.2-beta.0 → 5.37.0-beta.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/cli.js +0 -9
- package/commands/about/index.js +7 -23
- package/package.json +4 -4
package/cli.js
CHANGED
|
@@ -10,15 +10,6 @@ require("./utils/loadEnvVariables");
|
|
|
10
10
|
const { blue, red } = require("chalk");
|
|
11
11
|
const context = require("./context");
|
|
12
12
|
const { createCommands } = require("./commands");
|
|
13
|
-
const { localStorage } = require("./utils");
|
|
14
|
-
|
|
15
|
-
// Save the full command in the history.
|
|
16
|
-
const [, , ...commandParts] = process.argv;
|
|
17
|
-
const fullCommand = "yarn webiny " + commandParts.join(" ");
|
|
18
|
-
|
|
19
|
-
const ls = localStorage();
|
|
20
|
-
const history = ls.get("history") || [];
|
|
21
|
-
ls.set("history", [fullCommand, ...history]);
|
|
22
13
|
|
|
23
14
|
yargs
|
|
24
15
|
.usage("Usage: $0 <command> [options]")
|
package/commands/about/index.js
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
const { bold } = require("chalk");
|
|
2
|
-
const { getNpxVersion } = require("./getNpxVersion");
|
|
3
|
-
const { getPulumiVersions } = require("./getPulumiVersions");
|
|
4
|
-
const { getYarnVersion } = require("./getYarnVersion");
|
|
5
|
-
const { getUser } = require("../wcp/utils");
|
|
6
|
-
const localStorage = require("../../utils/localStorage");
|
|
7
|
-
|
|
8
1
|
const NO_VALUE = "-";
|
|
9
2
|
|
|
10
3
|
const getData = async context => {
|
|
11
|
-
const
|
|
4
|
+
const { getUser } = require("../wcp/utils");
|
|
5
|
+
const { getNpxVersion } = require("./getNpxVersion");
|
|
6
|
+
const { getPulumiVersions } = require("./getPulumiVersions");
|
|
7
|
+
const { getYarnVersion } = require("./getYarnVersion");
|
|
12
8
|
|
|
13
|
-
const
|
|
14
|
-
const last10Commands = commandsHistory.slice(1, 11); // We skip the first command, which is the current one.
|
|
9
|
+
const [pulumiVersion, pulumiAwsVersion] = await getPulumiVersions();
|
|
15
10
|
|
|
16
11
|
return [
|
|
17
12
|
{
|
|
@@ -54,12 +49,6 @@ const getData = async context => {
|
|
|
54
49
|
NPX: await getNpxVersion(),
|
|
55
50
|
Yarn: await getYarnVersion()
|
|
56
51
|
}
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
sectionName: "Last 10 Commands Executed",
|
|
60
|
-
data: {
|
|
61
|
-
Commands: last10Commands
|
|
62
|
-
}
|
|
63
52
|
}
|
|
64
53
|
];
|
|
65
54
|
};
|
|
@@ -90,16 +79,11 @@ module.exports = {
|
|
|
90
79
|
if (index > 0) {
|
|
91
80
|
console.log();
|
|
92
81
|
}
|
|
82
|
+
|
|
83
|
+
const { bold } = require("chalk");
|
|
93
84
|
console.log(bold(sectionName));
|
|
94
85
|
|
|
95
|
-
// Custom rendering for "Last 10 Commands Executed" section.
|
|
96
86
|
Object.keys(data).forEach(key => {
|
|
97
|
-
if (sectionName === "Last 10 Commands Executed") {
|
|
98
|
-
data[key].forEach((command, index) => {
|
|
99
|
-
console.log(` ${index + 1}. ${command}`);
|
|
100
|
-
});
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
87
|
console.log(key.padEnd(30), data[key] || NO_VALUE);
|
|
104
88
|
});
|
|
105
89
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.37.0-beta.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"bin": {
|
|
6
6
|
"webiny": "./bin.js"
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"author": "Pavel Denisjuk <pavel@webiny.com>",
|
|
14
14
|
"description": "A tool to bootstrap a Webiny project.",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@webiny/telemetry": "5.
|
|
17
|
-
"@webiny/wcp": "5.
|
|
16
|
+
"@webiny/telemetry": "5.37.0-beta.0",
|
|
17
|
+
"@webiny/wcp": "5.37.0-beta.0",
|
|
18
18
|
"boolean": "3.2.0",
|
|
19
19
|
"camelcase": "5.3.1",
|
|
20
20
|
"chalk": "4.1.2",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
]
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "7bb6232942f0414e22a4549113dd112bb92e52c5"
|
|
68
68
|
}
|