@ui5/cli 3.11.1 → 4.0.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/CHANGELOG.md +42 -12
- package/CONTRIBUTING.md +1 -1
- package/README.md +4 -4
- package/bin/ui5.cjs +36 -22
- package/jsdoc.json +1 -1
- package/lib/cli/base.js +23 -16
- package/lib/cli/commands/add.js +4 -2
- package/lib/cli/commands/init.js +4 -2
- package/lib/cli/commands/remove.js +4 -2
- package/lib/cli/commands/serve.js +15 -9
- package/lib/cli/commands/tree.js +16 -9
- package/lib/cli/commands/use.js +4 -2
- package/lib/cli/commands/versions.js +2 -2
- package/lib/framework/utils.js +2 -2
- package/lib/init/init.js +2 -2
- package/npm-shrinkwrap.json +619 -1124
- package/package.json +17 -17
package/CHANGELOG.md
CHANGED
|
@@ -2,21 +2,58 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
-
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-cli/compare/
|
|
5
|
+
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-cli/compare/v4.0.1...HEAD).
|
|
6
|
+
|
|
7
|
+
<a name="v4.0.1"></a>
|
|
8
|
+
## [v4.0.1] - 2024-07-31
|
|
9
|
+
### Dependency Updates
|
|
10
|
+
- Bump [@ui5](https://github.com/ui5)/server from 4.0.0 to 4.0.1 [`6c33995`](https://github.com/SAP/ui5-cli/commit/6c339957e0e74d00a90aa067ca553ecbc0cd0747)
|
|
11
|
+
- Bump [@ui5](https://github.com/ui5)/project from 4.0.0 to 4.0.1 [`eaab649`](https://github.com/SAP/ui5-cli/commit/eaab64930f101b9ae73fa3920b94fbf98bace511)
|
|
12
|
+
- Bump [@ui5](https://github.com/ui5)/builder from 4.0.0 to 4.0.1 [`4e5b9be`](https://github.com/SAP/ui5-cli/commit/4e5b9be808105c1e1ea53723b1593f2b7cf8e427)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
<a name="v4.0.0"></a>
|
|
16
|
+
## [v4.0.0] - 2024-07-24
|
|
17
|
+
### Breaking Changes
|
|
18
|
+
- Drop node v21 support ([#720](https://github.com/SAP/ui5-cli/issues/720)) [`891306f`](https://github.com/SAP/ui5-cli/commit/891306f736eaf6cfebd1bf7a04511fcbac65ef02)
|
|
19
|
+
- Replace console.log with process.stderr ([#686](https://github.com/SAP/ui5-cli/issues/686)) [`48d1975`](https://github.com/SAP/ui5-cli/commit/48d1975c09686e9bd28312cf59a73ede3bc3d47b)
|
|
20
|
+
- Rename ui5HomeDir to ui5DataDir in APIs ([#687](https://github.com/SAP/ui5-cli/issues/687)) [`772ac29`](https://github.com/SAP/ui5-cli/commit/772ac29515a55637cc55924ef0462ca76058a073)
|
|
21
|
+
- Require Node.js 20.11.x/>=21.2.0 and npm >=10 [`59314fa`](https://github.com/SAP/ui5-cli/commit/59314fabae8c66dbefcc21e2557a11373dc8a8c7)
|
|
22
|
+
|
|
23
|
+
### Dependency Updates
|
|
24
|
+
- Bump [@ui5](https://github.com/ui5)/builder from 3.5.1 to 4.0.0 [`0ce3196`](https://github.com/SAP/ui5-cli/commit/0ce3196c0c8c8780b6d3e940caf9fd99a9e89f6b)
|
|
25
|
+
- Bump [@ui5](https://github.com/ui5)/project from 3.9.2 to 4.0.0 [`0d7302b`](https://github.com/SAP/ui5-cli/commit/0d7302b4d5e83c2083ef850f81f4007f74809d4b)
|
|
26
|
+
- Bump [@ui5](https://github.com/ui5)/fs from 3.0.5 to 4.0.0 [`ce51fc2`](https://github.com/SAP/ui5-cli/commit/ce51fc2442ca1ae80a5468b7288a8d51f176bc01)
|
|
27
|
+
- Bump [@ui5](https://github.com/ui5)/logger from 3.0.0 to 4.0.1 [`04b201c`](https://github.com/SAP/ui5-cli/commit/04b201c14439fb33f1de4c50a7cf4d00cc80ec49)
|
|
28
|
+
- Bump [@ui5](https://github.com/ui5)/server from 3.2.1 to 4.0.0 [`095f31d`](https://github.com/SAP/ui5-cli/commit/095f31dbeb90bbaf310a02b2b25ad1a088d1347f)
|
|
29
|
+
- Bump update-notifier from 6.0.2 to 7.0.0 [`cd33dbd`](https://github.com/SAP/ui5-cli/commit/cd33dbd95f9364f882a91515187e48ff5b3f3c94)
|
|
30
|
+
- Bump open from 9.1.0 to 10.0.3 [`486f8ef`](https://github.com/SAP/ui5-cli/commit/486f8efb98f82626fb32b7af04af94375ac41618)
|
|
31
|
+
|
|
32
|
+
### BREAKING CHANGE
|
|
33
|
+
|
|
34
|
+
System messages will now be written to stderr instead of stdout.
|
|
35
|
+
|
|
36
|
+
JIRA: CPOUI5FOUNDATION-802
|
|
37
|
+
Related to: https://github.com/SAP/ui5-tooling/issues/701
|
|
38
|
+
Sibling of: https://github.com/SAP/ui5-server/pull/643,
|
|
39
|
+
https://github.com/SAP/ui5-tooling/pull/930
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
Support for older Node.js and npm releases has been dropped.
|
|
44
|
+
Only Node.js 20.11.x and >=21.2.0 as well as npm v10 or higher are supported.
|
|
6
45
|
|
|
7
46
|
<a name="v3.11.1"></a>
|
|
8
47
|
## [v3.11.1] - 2024-07-22
|
|
9
48
|
### Dependency Updates
|
|
10
49
|
- Bump [@ui5](https://github.com/ui5)/builder from 3.5.0 to 3.5.1 [`00c050f`](https://github.com/SAP/ui5-cli/commit/00c050f929aa6204a5d57ead9845dd24fe5f8704)
|
|
11
50
|
|
|
12
|
-
|
|
13
51
|
<a name="v3.11.0"></a>
|
|
14
52
|
## [v3.11.0] - 2024-06-24
|
|
15
53
|
### Dependency Updates
|
|
16
54
|
- Bump [@ui5](https://github.com/ui5)/project from 3.9.1 to 3.9.2 [`e74c280`](https://github.com/SAP/ui5-cli/commit/e74c28018eafb9b15da56dcb45de58fbedec5ced)
|
|
17
55
|
- Bump [@ui5](https://github.com/ui5)/builder from 3.4.1 to 3.5.0 [`d8bf229`](https://github.com/SAP/ui5-cli/commit/d8bf2295933998e64c4241942b2d93cb663eb068)
|
|
18
56
|
|
|
19
|
-
|
|
20
57
|
<a name="v3.10.3"></a>
|
|
21
58
|
## [v3.10.3] - 2024-05-22
|
|
22
59
|
|
|
@@ -263,15 +300,6 @@ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-cli/
|
|
|
263
300
|
|
|
264
301
|
<a name="v3.0.0"></a>
|
|
265
302
|
## [v3.0.0] - 2023-02-09
|
|
266
|
-
### Dependency Updates
|
|
267
|
-
- Bump [@ui5](https://github.com/ui5)/project from 3.0.0-rc.9 to 3.0.0 [`180c378`](https://github.com/SAP/ui5-cli/commit/180c378b138e0d2896eea8fd64b9b684a14dee10)
|
|
268
|
-
- Bump [@ui5](https://github.com/ui5)/server from 3.0.0-rc.3 to 3.0.0 [`aa0c020`](https://github.com/SAP/ui5-cli/commit/aa0c020a4eba17971ed3bee51e733dcdcd0e13ed)
|
|
269
|
-
- Bump [@ui5](https://github.com/ui5)/builder from 3.0.0-rc.6 to 3.0.0 [`9184e85`](https://github.com/SAP/ui5-cli/commit/9184e85be7bd4c654caa3f4aee242f64ec639494)
|
|
270
|
-
- Bump [@ui5](https://github.com/ui5)/fs from 3.0.0-rc.6 to 3.0.0 [`aa4107f`](https://github.com/SAP/ui5-cli/commit/aa4107f3ecbe31205370973cf1552b225bd7c557)
|
|
271
|
-
- Bump [@ui5](https://github.com/ui5)/logger from 3.0.1-rc.3 to 3.0.0 [`086b8de`](https://github.com/SAP/ui5-cli/commit/086b8de30341b2a5d3722ea3fcce93ec5604f35f)
|
|
272
|
-
- Bump [@ui5](https://github.com/ui5)/builder from 3.0.0-rc.5 to 3.0.0-rc.6 [`9120399`](https://github.com/SAP/ui5-cli/commit/912039946912c867569ba31cef549ef6eb778bd4)
|
|
273
|
-
- Bump [@ui5](https://github.com/ui5)/project from 3.0.0-rc.8 to 3.0.0-rc.9 [`ed9dde4`](https://github.com/SAP/ui5-cli/commit/ed9dde4b56cab3d8bc458162a0e0f25241654190)
|
|
274
|
-
|
|
275
303
|
## Overview
|
|
276
304
|
UI5 Tooling v3 provides general support for ES2022 ECMAScript language features. See [ECMAScript Support](https://sap.github.io/ui5-tooling/v3/pages/ESSupport/) for details.
|
|
277
305
|
|
|
@@ -1210,6 +1238,8 @@ Only Node.js v10 or higher is supported.
|
|
|
1210
1238
|
|
|
1211
1239
|
<a name="v0.0.1"></a>
|
|
1212
1240
|
## v0.0.1 - 2018-06-06
|
|
1241
|
+
[v4.0.1]: https://github.com/SAP/ui5-cli/compare/v4.0.0...v4.0.1
|
|
1242
|
+
[v4.0.0]: https://github.com/SAP/ui5-cli/compare/v3.9.0...v4.0.0
|
|
1213
1243
|
[v3.11.1]: https://github.com/SAP/ui5-cli/compare/v3.11.0...v3.11.1
|
|
1214
1244
|
[v3.11.0]: https://github.com/SAP/ui5-cli/compare/v3.10.3...v3.11.0
|
|
1215
1245
|
[v3.10.3]: https://github.com/SAP/ui5-cli/compare/v3.10.2...v3.10.3
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# Contributing to the UI5 Tooling
|
|
2
2
|
|
|
3
|
-
See CONTRIBUTING.md in the [SAP/ui5-tooling](https://github.com/SAP/ui5-tooling/blob/
|
|
3
|
+
See CONTRIBUTING.md in the [SAP/ui5-tooling](https://github.com/SAP/ui5-tooling/blob/main/CONTRIBUTING.md) repository.
|
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
3
|
# ui5-cli
|
|
4
4
|
> `ui5` Command Line Interface
|
|
5
5
|
> Part of the [UI5 Tooling](https://github.com/SAP/ui5-tooling)
|
|
6
6
|
|
|
7
7
|
[](https://api.reuse.software/info/github.com/SAP/ui5-cli)
|
|
8
|
-
[](https://dev.azure.com/sap/opensource/_build/latest?definitionId=33&branchName=main)
|
|
9
9
|
[](https://www.npmjs.com/package/@ui5/cli)
|
|
10
10
|
[](https://coveralls.io/github/SAP/ui5-cli)
|
|
11
11
|
|
|
@@ -14,11 +14,11 @@ UI5 CLI documentation can be found here: [sap.github.io/ui5-tooling](https://sap
|
|
|
14
14
|
|
|
15
15
|
## Contributing
|
|
16
16
|
|
|
17
|
-
Please check our [Contribution Guidelines](https://github.com/SAP/ui5-tooling/blob/
|
|
17
|
+
Please check our [Contribution Guidelines](https://github.com/SAP/ui5-tooling/blob/main/CONTRIBUTING.md).
|
|
18
18
|
|
|
19
19
|
## Support
|
|
20
20
|
|
|
21
|
-
Please follow our [Contribution Guidelines](https://github.com/SAP/ui5-tooling/blob/
|
|
21
|
+
Please follow our [Contribution Guidelines](https://github.com/SAP/ui5-tooling/blob/main/CONTRIBUTING.md#report-an-issue) on how to report an issue.
|
|
22
22
|
|
|
23
23
|
Please report issues in the main [UI5 Tooling](https://github.com/SAP/ui5-tooling) repository.
|
|
24
24
|
|
package/bin/ui5.cjs
CHANGED
|
@@ -25,25 +25,37 @@ const ui5 = {
|
|
|
25
25
|
pkg.engines && pkg.engines.node &&
|
|
26
26
|
(!semver || !semver.satisfies(nodeVersion, pkg.engines.node, {includePrerelease: true}))
|
|
27
27
|
) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
process.stderr.write("==================== UNSUPPORTED NODE.JS VERSION ====================");
|
|
29
|
+
process.stderr.write("\n");
|
|
30
|
+
process.stderr.write("You are using an unsupported version of Node.js");
|
|
31
|
+
process.stderr.write("\n");
|
|
32
|
+
process.stderr.write("Detected version " + nodeVersion +
|
|
33
|
+
" but " + pkg.name + " requires " + pkg.engines.node);
|
|
34
|
+
process.stderr.write("\n\n");
|
|
35
|
+
process.stderr.write("=> Please upgrade to a supported version of Node.js to use this tool");
|
|
36
|
+
process.stderr.write("\n");
|
|
37
|
+
process.stderr.write("=====================================================================");
|
|
38
|
+
process.stderr.write("\n");
|
|
34
39
|
return false;
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
if (semver && semver.prerelease(nodeVersion)) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
process.stderr.write("====================== UNSTABLE NODE.JS VERSION =====================");
|
|
44
|
+
process.stderr.write("\n");
|
|
45
|
+
process.stderr.write("You are using an unstable version of Node.js");
|
|
46
|
+
process.stderr.write("\n");
|
|
47
|
+
process.stderr.write("Detected Node.js version " + nodeVersion);
|
|
48
|
+
process.stderr.write("\n\n");
|
|
49
|
+
process.stderr.write("=> Please note that an unstable version might cause unexpected");
|
|
50
|
+
process.stderr.write("\n");
|
|
51
|
+
process.stderr.write(" behavior. For productive use please consider using a stable");
|
|
52
|
+
process.stderr.write("\n");
|
|
53
|
+
process.stderr.write(" version of Node.js! For the release policy of Node.js, see");
|
|
54
|
+
process.stderr.write("\n");
|
|
55
|
+
process.stderr.write(" https://nodejs.org/en/about/releases");
|
|
56
|
+
process.stderr.write("\n");
|
|
57
|
+
process.stderr.write("=====================================================================");
|
|
58
|
+
process.stderr.write("\n");
|
|
47
59
|
}
|
|
48
60
|
|
|
49
61
|
return true;
|
|
@@ -65,13 +77,14 @@ const ui5 = {
|
|
|
65
77
|
return false;
|
|
66
78
|
}
|
|
67
79
|
if (process.argv.includes("--verbose")) {
|
|
68
|
-
|
|
80
|
+
process.stderr.write(`INFO: This project contains an individual ${pkg.name} installation which ` +
|
|
69
81
|
"will be used over the global one.");
|
|
70
|
-
|
|
71
|
-
|
|
82
|
+
process.stderr.write("\n");
|
|
83
|
+
process.stderr.write("See https://github.com/SAP/ui5-cli#local-vs-global-installation for details.");
|
|
84
|
+
process.stderr.write("\n\n");
|
|
72
85
|
} else {
|
|
73
|
-
|
|
74
|
-
|
|
86
|
+
process.stdout.write(`INFO: Using local ${pkg.name} installation`);
|
|
87
|
+
process.stdout.write("\n\n");
|
|
75
88
|
}
|
|
76
89
|
return true;
|
|
77
90
|
},
|
|
@@ -98,8 +111,9 @@ module.exports = ui5;
|
|
|
98
111
|
|
|
99
112
|
if (process.env.NODE_ENV !== "test" || process.env.UI5_CLI_TEST_BIN_RUN_MAIN !== "false") {
|
|
100
113
|
ui5.main().catch((err) => {
|
|
101
|
-
|
|
102
|
-
|
|
114
|
+
process.stderr.write("Fatal Error: Unable to initialize UI5 CLI");
|
|
115
|
+
process.stderr.write("\n");
|
|
116
|
+
process.stderr.write(err);
|
|
103
117
|
process.exit(1);
|
|
104
118
|
});
|
|
105
119
|
}
|
package/jsdoc.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"openGraph": {
|
|
29
29
|
"title": "UI5 Tooling - API Reference",
|
|
30
30
|
"type": "website",
|
|
31
|
-
"image": "https://sap.github.io/ui5-tooling/
|
|
31
|
+
"image": "https://sap.github.io/ui5-tooling/v4/images/UI5_logo_wide.png",
|
|
32
32
|
"site_name": "UI5 Tooling - API Reference",
|
|
33
33
|
"url": "https://sap.github.io/ui5-tooling/"
|
|
34
34
|
},
|
package/lib/cli/base.js
CHANGED
|
@@ -91,37 +91,44 @@ export default function(cli) {
|
|
|
91
91
|
ConsoleWriter.stop();
|
|
92
92
|
// Exception
|
|
93
93
|
if (isLogLevelEnabled("error")) {
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
process.stderr.write("\n");
|
|
95
|
+
process.stderr.write(chalk.bold.red("⚠️ Process Failed With Error"));
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
process.stderr.write("\n\n");
|
|
98
|
+
process.stderr.write(chalk.underline("Error Message:"));
|
|
99
|
+
process.stderr.write("\n");
|
|
100
|
+
process.stderr.write(err.message);
|
|
101
|
+
process.stderr.write("\n");
|
|
100
102
|
|
|
101
103
|
// Unexpected errors should always be logged with stack trace
|
|
102
104
|
const unexpectedErrors = ["SyntaxError", "ReferenceError", "TypeError"];
|
|
103
105
|
if (unexpectedErrors.includes(err.name) || isLogLevelEnabled("verbose")) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
process.stderr.write("\n\n");
|
|
107
|
+
process.stderr.write(chalk.underline("Stack Trace:"));
|
|
108
|
+
process.stderr.write("\n");
|
|
109
|
+
process.stderr.write(err.stack);
|
|
110
|
+
process.stderr.write("\n");
|
|
111
|
+
process.stderr.write(
|
|
109
112
|
chalk.dim(
|
|
110
113
|
`If you think this is an issue of the UI5 Tooling, you might report it using the ` +
|
|
111
114
|
`following URL: `) +
|
|
112
115
|
chalk.dim.bold.underline(`https://github.com/SAP/ui5-tooling/issues/new/choose`));
|
|
116
|
+
process.stderr.write("\n");
|
|
113
117
|
} else {
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
process.stderr.write("\n\n");
|
|
119
|
+
process.stderr.write(chalk.dim(
|
|
116
120
|
`For details, execute the same command again with an additional '--verbose' parameter`));
|
|
121
|
+
process.stderr.write("\n");
|
|
117
122
|
}
|
|
118
123
|
}
|
|
119
124
|
} else {
|
|
120
125
|
// Yargs error
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
126
|
+
process.stderr.write(chalk.bold.yellow("Command Failed:"));
|
|
127
|
+
process.stderr.write("\n");
|
|
128
|
+
process.stderr.write(`${msg}`);
|
|
129
|
+
process.stderr.write("\n\n");
|
|
130
|
+
process.stderr.write(chalk.dim(`See 'ui5 --help'`));
|
|
131
|
+
process.stderr.write("\n");
|
|
125
132
|
}
|
|
126
133
|
process.exit(1);
|
|
127
134
|
});
|
package/lib/cli/commands/add.js
CHANGED
|
@@ -75,7 +75,8 @@ addCommand.handler = async function(argv) {
|
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
} else {
|
|
78
|
-
|
|
78
|
+
process.stdout.write(`Updated configuration written to ${argv.config || "ui5.yaml"}`);
|
|
79
|
+
process.stdout.write("\n");
|
|
79
80
|
let logMessage = `Added framework ${library} ${libraryNames.join(" ")} as`;
|
|
80
81
|
if (development) {
|
|
81
82
|
logMessage += " development";
|
|
@@ -83,7 +84,8 @@ addCommand.handler = async function(argv) {
|
|
|
83
84
|
logMessage += " optional";
|
|
84
85
|
}
|
|
85
86
|
logMessage += libraries.length === 1 ? " dependency": " dependencies";
|
|
86
|
-
|
|
87
|
+
process.stdout.write(logMessage);
|
|
88
|
+
process.stdout.write("\n");
|
|
87
89
|
}
|
|
88
90
|
};
|
|
89
91
|
|
package/lib/cli/commands/init.js
CHANGED
|
@@ -23,8 +23,10 @@ initCommand.handler = async function() {
|
|
|
23
23
|
const yaml = jsYaml.dump(projectConfig, {quotingType: `"`});
|
|
24
24
|
|
|
25
25
|
await writeFile(yamlPath, yaml);
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
process.stdout.write(`Wrote ui5.yaml to ${yamlPath}:`);
|
|
27
|
+
process.stdout.write("\n");
|
|
28
|
+
process.stdout.write(yaml);
|
|
29
|
+
process.stdout.write("\n");
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
export default initCommand;
|
|
@@ -59,10 +59,12 @@ removeCommand.handler = async function(argv) {
|
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
} else {
|
|
62
|
-
|
|
62
|
+
process.stdout.write(`Updated configuration written to ${argv.config || "ui5.yaml"}`);
|
|
63
|
+
process.stdout.write("\n");
|
|
63
64
|
let logMessage = `Removed framework ${library} ${libraryNames.join(" ")} as`;
|
|
64
65
|
logMessage += libraries.length === 1 ? " dependency": " dependencies";
|
|
65
|
-
|
|
66
|
+
process.stdout.write(logMessage);
|
|
67
|
+
process.stdout.write("\n");
|
|
66
68
|
}
|
|
67
69
|
};
|
|
68
70
|
|
|
@@ -150,20 +150,26 @@ serve.handler = async function(argv) {
|
|
|
150
150
|
const protocol = h2 ? "https" : "http";
|
|
151
151
|
let browserUrl = protocol + "://localhost:" + actualPort;
|
|
152
152
|
if (argv.acceptRemoteConnections) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
process.stderr.write("\n");
|
|
154
|
+
process.stderr.write(chalk.bold("⚠️ This server is accepting connections from all hosts on your network"));
|
|
155
|
+
process.stderr.write("\n");
|
|
156
|
+
process.stderr.write(chalk.dim.underline("Please Note:"));
|
|
157
|
+
process.stderr.write("\n");
|
|
158
|
+
process.stderr.write(chalk.bold.dim(
|
|
157
159
|
"* This server is intended for development purposes only. Do not use it in production."));
|
|
158
|
-
|
|
160
|
+
process.stderr.write("\n");
|
|
161
|
+
process.stderr.write(chalk.dim(
|
|
159
162
|
"* Vulnerable (custom-)middleware can pose a threat to your system when exposed to the network"));
|
|
160
|
-
|
|
163
|
+
process.stderr.write("\n");
|
|
164
|
+
process.stderr.write(chalk.dim(
|
|
161
165
|
"* The use of proxy-middleware with preconfigured credentials might enable unauthorized access " +
|
|
162
166
|
"to a target system for third parties on your network"));
|
|
163
|
-
|
|
167
|
+
process.stderr.write("\n\n");
|
|
164
168
|
}
|
|
165
|
-
|
|
166
|
-
|
|
169
|
+
process.stdout.write("Server started");
|
|
170
|
+
process.stdout.write("\n");
|
|
171
|
+
process.stdout.write("URL: " + browserUrl);
|
|
172
|
+
process.stdout.write("\n");
|
|
167
173
|
|
|
168
174
|
if (argv.open !== undefined) {
|
|
169
175
|
if (typeof argv.open === "string") {
|
package/lib/cli/commands/tree.js
CHANGED
|
@@ -90,12 +90,13 @@ tree.handler = async function(argv) {
|
|
|
90
90
|
if (project.isFrameworkProject()) {
|
|
91
91
|
name = chalk.blue(name);
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
process.stdout.write(
|
|
94
94
|
`${baseString}${connectorString} ${name} ` +
|
|
95
95
|
`${project.getNamespace() ? chalk.inverse(project.getNamespace()) + " " : ""}` +
|
|
96
96
|
chalk.dim(`(${project.getVersion()}, ${project.getType()}) `) +
|
|
97
97
|
chalk.dim.italic(`${project.getRootPath()}`)
|
|
98
98
|
);
|
|
99
|
+
process.stdout.write("\n");
|
|
99
100
|
|
|
100
101
|
const lastIdx = dependencies.length - 1;
|
|
101
102
|
const newConnectorIndices = [...connectorIndices];
|
|
@@ -109,7 +110,8 @@ tree.handler = async function(argv) {
|
|
|
109
110
|
newConnectorIndices.forEach((idx) => {
|
|
110
111
|
nextBaseString = `${nextBaseString.slice(0, idx)}│${nextBaseString.slice(idx + 1)}`;
|
|
111
112
|
});
|
|
112
|
-
|
|
113
|
+
process.stdout.write(`${nextBaseString}╰─ ${msg}`);
|
|
114
|
+
process.stdout.write("\n");
|
|
113
115
|
return;
|
|
114
116
|
}
|
|
115
117
|
if (renderDeps) {
|
|
@@ -121,7 +123,8 @@ tree.handler = async function(argv) {
|
|
|
121
123
|
});
|
|
122
124
|
});
|
|
123
125
|
|
|
124
|
-
|
|
126
|
+
process.stdout.write(chalk.bold.underline(`Dependencies (${projects.size}):`));
|
|
127
|
+
process.stdout.write("\n");
|
|
125
128
|
if (argv.flat) {
|
|
126
129
|
// Iterate over list of projects, rendering each individually
|
|
127
130
|
// We need to transform the map into an array in order to know the index
|
|
@@ -133,28 +136,32 @@ tree.handler = async function(argv) {
|
|
|
133
136
|
// Recursively render the tree, starting with the first entry of the map
|
|
134
137
|
projects.values().next().value.render(0, [], true);
|
|
135
138
|
}
|
|
136
|
-
|
|
139
|
+
process.stdout.write("\n");
|
|
137
140
|
|
|
138
141
|
const extensionNames = graph.getExtensionNames();
|
|
139
142
|
const extensionCount = extensionNames.length;
|
|
140
|
-
|
|
143
|
+
process.stdout.write(chalk.bold.underline(`Extensions (${extensionCount}):`));
|
|
144
|
+
process.stdout.write("\n");
|
|
141
145
|
if (extensionCount) {
|
|
142
146
|
const lastIdx = extensionCount - 1;
|
|
143
147
|
extensionNames.forEach((extensionName, idx) => {
|
|
144
148
|
const extension = graph.getExtension(extensionName);
|
|
145
149
|
const connectorString = idx === lastIdx ? "╰─" : "├─";
|
|
146
|
-
|
|
150
|
+
process.stdout.write(
|
|
147
151
|
`${connectorString} ${extensionName} ` +
|
|
148
152
|
chalk.dim(`(${extension.getVersion()}, ${extension.getType()}) `) +
|
|
149
153
|
chalk.dim.italic(`${extension.getRootPath()}`));
|
|
154
|
+
process.stdout.write("\n");
|
|
150
155
|
});
|
|
151
156
|
} else {
|
|
152
|
-
|
|
157
|
+
process.stdout.write(chalk.italic(`None`));
|
|
158
|
+
process.stdout.write("\n");
|
|
153
159
|
}
|
|
154
160
|
if (argv.perf) {
|
|
155
|
-
|
|
156
|
-
|
|
161
|
+
process.stderr.write("\n");
|
|
162
|
+
process.stderr.write(chalk.blue(
|
|
157
163
|
`Dependency graph generation took ${chalk.bold(elapsedTime)}`));
|
|
164
|
+
process.stderr.write("\n");
|
|
158
165
|
}
|
|
159
166
|
};
|
|
160
167
|
|
package/lib/cli/commands/use.js
CHANGED
|
@@ -81,8 +81,10 @@ useCommand.handler = async function(argv) {
|
|
|
81
81
|
throw new Error(`Internal error while updating ui5.yaml to ${usedFramework} version ${usedVersion}`);
|
|
82
82
|
}
|
|
83
83
|
} else {
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
process.stdout.write(`Updated configuration written to ${argv.config || "ui5.yaml"}`);
|
|
85
|
+
process.stdout.write("\n");
|
|
86
|
+
process.stdout.write(`This project is now using ${usedFramework} version ${usedVersion}`);
|
|
87
|
+
process.stdout.write("\n");
|
|
86
88
|
}
|
|
87
89
|
};
|
|
88
90
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import baseMiddleware from "../middlewares/base.js";
|
|
2
2
|
import {createRequire} from "node:module";
|
|
3
3
|
|
|
4
|
-
// Using CommonsJS require
|
|
4
|
+
// Using CommonsJS require since JSON module imports are still experimental
|
|
5
5
|
const require = createRequire(import.meta.url);
|
|
6
6
|
|
|
7
7
|
const versions = {
|
|
@@ -34,7 +34,7 @@ versions.handler = async function() {
|
|
|
34
34
|
})
|
|
35
35
|
)).join("\n");
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
process.stdout.write(`\n${output}\n\n`);
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export default versions;
|
package/lib/framework/utils.js
CHANGED
|
@@ -37,7 +37,7 @@ export async function createFrameworkResolverInstance({frameworkName, frameworkV
|
|
|
37
37
|
return new Resolver({
|
|
38
38
|
cwd,
|
|
39
39
|
version: frameworkVersion,
|
|
40
|
-
|
|
40
|
+
ui5DataDir: await utils.getUi5DataDir({cwd})
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ export async function frameworkResolverResolveVersion({frameworkName, frameworkV
|
|
|
45
45
|
const Resolver = await utils.getFrameworkResolver(frameworkName, frameworkVersion);
|
|
46
46
|
return Resolver.resolveVersion(frameworkVersion, {
|
|
47
47
|
cwd,
|
|
48
|
-
|
|
48
|
+
ui5DataDir: await utils.getUi5DataDir({cwd})
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
|
package/lib/init/init.js
CHANGED
|
@@ -51,7 +51,7 @@ function getProjectType(hasWebapp, hasSrc, hasTest) {
|
|
|
51
51
|
message += "Libraries should only have an 'src' and (optional) 'test' folder.";
|
|
52
52
|
message += "\n\n";
|
|
53
53
|
message += "If you are about to start a new project, please refer to:\n";
|
|
54
|
-
message += "https://sap.github.io/ui5-tooling/
|
|
54
|
+
message += "https://sap.github.io/ui5-tooling/v4/pages/GettingStarted/#starting-a-new-project";
|
|
55
55
|
throw new Error(message);
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -72,7 +72,7 @@ function getProjectType(hasWebapp, hasSrc, hasTest) {
|
|
|
72
72
|
*/
|
|
73
73
|
async function init({cwd = "./"} = {}) {
|
|
74
74
|
const projectConfig = {
|
|
75
|
-
specVersion: "
|
|
75
|
+
specVersion: "4.0",
|
|
76
76
|
metadata: {}
|
|
77
77
|
};
|
|
78
78
|
let pkg;
|