@webiny/cli 5.18.0-beta.0 → 5.18.0-beta.4
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/CHANGELOG.md +38 -0
- package/commands/upgrade/index.js +45 -16
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.18.0-beta.4](https://github.com/webiny/webiny-js/compare/v5.18.0-beta.3...v5.18.0-beta.4) (2021-11-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @webiny/cli
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [5.18.0-beta.3](https://github.com/webiny/webiny-js/compare/v5.18.0-beta.2...v5.18.0-beta.3) (2021-11-22)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* remove context ([ec4566a](https://github.com/webiny/webiny-js/commit/ec4566af26fe67cc7cb26728e7f65e54e7f16968))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [5.18.0-beta.2](https://github.com/webiny/webiny-js/compare/v5.18.0-beta.1...v5.18.0-beta.2) (2021-11-21)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @webiny/cli
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [5.18.0-beta.1](https://github.com/webiny/webiny-js/compare/v5.18.0-beta.0...v5.18.0-beta.1) (2021-11-19)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* improve logging ([2dd751f](https://github.com/webiny/webiny-js/commit/2dd751fffb52a407cb5679bb7395e7601dea9463))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
# [5.18.0-beta.0](https://github.com/webiny/webiny-js/compare/v5.17.4...v5.18.0-beta.0) (2021-11-19)
|
|
7
45
|
|
|
8
46
|
|
|
@@ -17,6 +17,11 @@ module.exports = [
|
|
|
17
17
|
type: "boolean",
|
|
18
18
|
default: false
|
|
19
19
|
});
|
|
20
|
+
yargs.option("debug", {
|
|
21
|
+
default: false,
|
|
22
|
+
describe: `Turn on debug logs`,
|
|
23
|
+
type: "boolean"
|
|
24
|
+
});
|
|
20
25
|
yargs.option("use-version", {
|
|
21
26
|
describe:
|
|
22
27
|
"Use upgrade script for a specific version. Should only be used for development/testing purposes.",
|
|
@@ -52,25 +57,49 @@ module.exports = [
|
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
const defaultUpgradeTargetVersion = semver.coerce(context.version).version;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
|
|
61
|
+
const command = [
|
|
62
|
+
"https://github.com/webiny/webiny-upgrades",
|
|
63
|
+
argv.useVersion || defaultUpgradeTargetVersion
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
if (yargs.argv.debug) {
|
|
67
|
+
context.debug("npx", ...command);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const npx = execa("npx", command, {
|
|
71
|
+
env: {
|
|
72
|
+
FORCE_COLOR: true
|
|
59
73
|
}
|
|
60
|
-
};
|
|
74
|
+
});
|
|
61
75
|
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
76
|
+
npx.stdout.on("data", data => {
|
|
77
|
+
const lines = data.toString().replace(/\n$/, "").split("\n");
|
|
78
|
+
for (let i = 0; i < lines.length; i++) {
|
|
79
|
+
const line = lines[i];
|
|
80
|
+
try {
|
|
81
|
+
const json = JSON.parse(line);
|
|
82
|
+
if (json.type === "error") {
|
|
83
|
+
context.error(
|
|
84
|
+
"An error occurred while performing the upgrade."
|
|
85
|
+
);
|
|
86
|
+
console.log(json.message);
|
|
87
|
+
if (yargs.argv.debug) {
|
|
88
|
+
context.debug(json.data.stack);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
} catch {
|
|
92
|
+
// Not JSON, let's just print the line then.
|
|
93
|
+
console.log(line);
|
|
94
|
+
}
|
|
72
95
|
}
|
|
73
|
-
);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
npx.stderr.on("data", data => {
|
|
99
|
+
console.log(data.toString());
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
await npx;
|
|
74
103
|
}
|
|
75
104
|
);
|
|
76
105
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/cli",
|
|
3
|
-
"version": "5.18.0-beta.
|
|
3
|
+
"version": "5.18.0-beta.4",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"bin": {
|
|
6
6
|
"webiny": "./bin.js"
|
|
@@ -13,7 +13,7 @@
|
|
|
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.18.0-beta.
|
|
16
|
+
"@webiny/telemetry": "5.18.0-beta.4",
|
|
17
17
|
"boolean": "3.1.4",
|
|
18
18
|
"camelcase": "5.3.1",
|
|
19
19
|
"chalk": "4.1.2",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
]
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "35c130c028b5a9d54b916eb80a9db74b1f22cc12"
|
|
64
64
|
}
|