@ui5/cli 3.0.0-rc.2 → 3.0.0-rc.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 CHANGED
@@ -2,7 +2,30 @@
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/v3.0.0-rc.2...HEAD).
5
+ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-cli/compare/v3.0.0-rc.4...HEAD).
6
+
7
+ <a name="v3.0.0-rc.4"></a>
8
+ ## [v3.0.0-rc.4] - 2023-01-25
9
+ ### Dependency Updates
10
+ - Bump [@ui5](https://github.com/ui5)/project from 3.0.0-rc.6 to 3.0.0-rc.7 [`c39657c`](https://github.com/SAP/ui5-cli/commit/c39657c4399e264f699caabb368b2b02c8b09921)
11
+ - Bump [@ui5](https://github.com/ui5)/server from 3.0.0-rc.1 to 3.0.0-rc.2 [`1bdecfb`](https://github.com/SAP/ui5-cli/commit/1bdecfb2d7846c73f14c2c5970a1a027494f7958)
12
+ - Bump [@ui5](https://github.com/ui5)/builder from 3.0.0-rc.2 to 3.0.0-rc.3 [`bd92f25`](https://github.com/SAP/ui5-cli/commit/bd92f250f2300a9ea7437af00c9cab23bdabee6e)
13
+ - Bump [@ui5](https://github.com/ui5)/project from 3.0.0-rc.5 to 3.0.0-rc.6 [`6baac05`](https://github.com/SAP/ui5-cli/commit/6baac05a70a11874b41fa071aa5bb6a327f0ae7b)
14
+ - Bump [@ui5](https://github.com/ui5)/fs from 3.0.0-rc.3 to 3.0.0-rc.4 [`83c84f4`](https://github.com/SAP/ui5-cli/commit/83c84f47f7746d17eceeb310f3655dd3d3b1f87a)
15
+ - Bump [@ui5](https://github.com/ui5)/logger from 3.0.1-rc.1 to 3.0.1-rc.2 [`a553030`](https://github.com/SAP/ui5-cli/commit/a553030c408a64044a6cafc6975f68a2a750d806)
16
+ - Bump [@ui5](https://github.com/ui5)/project from 3.0.0-rc.4 to 3.0.0-rc.5 [`bb08848`](https://github.com/SAP/ui5-cli/commit/bb08848ace38a69e879d9a646ab57821b9ded7eb)
17
+
18
+
19
+ <a name="v3.0.0-rc.3"></a>
20
+ ## [v3.0.0-rc.3] - 2023-01-23
21
+ ### Dependency Updates
22
+ - Bump [@ui5](https://github.com/ui5)/project from 3.0.0-rc.3 to 3.0.0-rc.4 [`c6a817e`](https://github.com/SAP/ui5-cli/commit/c6a817e044fbf10520c255ead490030cf7ffdf21)
23
+ - Bump [@ui5](https://github.com/ui5)/server from 3.0.0-rc.0 to 3.0.0-rc.1 [`325731d`](https://github.com/SAP/ui5-cli/commit/325731d4f65171d1fa8a7765f5ce670491ba56ba)
24
+ - Bump [@ui5](https://github.com/ui5)/builder from 3.0.0-rc.1 to 3.0.0-rc.2 [`bb2a9ba`](https://github.com/SAP/ui5-cli/commit/bb2a9babfff14080f41d5e88e8613d8b62200c24)
25
+ - Bump [@ui5](https://github.com/ui5)/fs from 3.0.0-rc.2 to 3.0.0-rc.3 [`b2ac460`](https://github.com/SAP/ui5-cli/commit/b2ac46064cd6a7278441599fa057625a8604ab4f)
26
+ - Bump [@ui5](https://github.com/ui5)/fs from 3.0.0-rc.1 to 3.0.0-rc.2 [`896ce1b`](https://github.com/SAP/ui5-cli/commit/896ce1bc791474f853835a2445ce9affba2a36ea)
27
+ - Bump [@ui5](https://github.com/ui5)/logger from 3.0.1-rc.0 to 3.0.1-rc.1 [`939745f`](https://github.com/SAP/ui5-cli/commit/939745fe83ed04837758bd33d141f124ce093f4c)
28
+
6
29
 
7
30
  <a name="v3.0.0-rc.2"></a>
8
31
  ## [v3.0.0-rc.2] - 2023-01-11
@@ -911,6 +934,8 @@ Only Node.js v10 or higher is supported.
911
934
  <a name="v0.0.1"></a>
912
935
  ## v0.0.1 - 2018-06-06
913
936
 
937
+ [v3.0.0-rc.4]: https://github.com/SAP/ui5-cli/compare/v3.0.0-rc.3...v3.0.0-rc.4
938
+ [v3.0.0-rc.3]: https://github.com/SAP/ui5-cli/compare/v3.0.0-rc.2...v3.0.0-rc.3
914
939
  [v3.0.0-rc.2]: https://github.com/SAP/ui5-cli/compare/v3.0.0-rc.1...v3.0.0-rc.2
915
940
  [v3.0.0-rc.1]: https://github.com/SAP/ui5-cli/compare/v3.0.0-rc.0...v3.0.0-rc.1
916
941
  [v3.0.0-rc.0]: https://github.com/SAP/ui5-cli/compare/v3.0.0-beta.5...v3.0.0-rc.0
package/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  ![UI5 icon](https://raw.githubusercontent.com/SAP/ui5-tooling/main/docs/images/UI5_logo_wide.png)
2
2
 
3
3
  # ui5-cli
4
-
5
- > UI5 Command Line Interface
4
+ > `ui5` Command Line Interface
6
5
  > Part of the [UI5 Tooling](https://github.com/SAP/ui5-tooling)
7
6
 
8
7
  [![REUSE status](https://api.reuse.software/badge/github.com/SAP/ui5-cli)](https://api.reuse.software/info/github.com/SAP/ui5-cli)
@@ -11,7 +10,7 @@
11
10
  [![Coverage Status](https://coveralls.io/repos/github/SAP/ui5-cli/badge.svg)](https://coveralls.io/github/SAP/ui5-cli)
12
11
 
13
12
  ## Documentation
14
- Can be found here: [sap.github.io/ui5-tooling](https://sap.github.io/ui5-tooling/pages/CLI/)
13
+ UI5 CLI documentation can be found here: [sap.github.io/ui5-tooling](https://sap.github.io/ui5-tooling/pages/CLI/)
15
14
 
16
15
  ## Contributing
17
16
 
package/lib/cli/base.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import chalk from "chalk";
2
- import logger from "@ui5/logger";
2
+ import {isLogLevelEnabled} from "@ui5/logger";
3
3
 
4
4
  export default function(cli) {
5
5
  cli.usage("Usage: ui5 <command> [options]")
@@ -39,7 +39,7 @@ export default function(cli) {
39
39
  .fail(function(msg, err, yargs) {
40
40
  if (err) {
41
41
  // Exception
42
- if (logger.isLevelEnabled("error")) {
42
+ if (isLogLevelEnabled("error")) {
43
43
  console.log("");
44
44
  console.log(chalk.bold.red("⚠️ Process Failed With Error"));
45
45
 
@@ -49,7 +49,7 @@ export default function(cli) {
49
49
 
50
50
  // Unexpected errors should always be logged with stack trace
51
51
  const unexpectedErrors = ["SyntaxError", "ReferenceError", "TypeError"];
52
- if (unexpectedErrors.includes(err.name) || logger.isLevelEnabled("verbose")) {
52
+ if (unexpectedErrors.includes(err.name) || isLogLevelEnabled("verbose")) {
53
53
  console.log("");
54
54
  console.log(chalk.underline("Stack Trace:"));
55
55
  console.log(err.stack);
@@ -1,22 +1,21 @@
1
-
1
+ import {setLogLevel, getLogger} from "@ui5/logger";
2
+ import ConsoleWriter from "@ui5/logger/writers/Console";
2
3
  import {getVersion} from "../version.js";
3
4
  /**
4
- * Logger middleware used as one of default middlewares by tooling
5
+ * Logger middleware to enable logging capabilities
5
6
  *
6
7
  * @param {object} argv logger arguments
7
- * @returns {object} logger instance or null
8
8
  */
9
9
  export async function initLogger(argv) {
10
- if (!argv.verbose && !argv.loglevel) return null;
10
+ ConsoleWriter.init();
11
11
 
12
- const {default: logger} = await import("@ui5/logger");
13
12
  if (argv.loglevel) {
14
- logger.setLevel(argv.loglevel);
13
+ setLogLevel(argv.loglevel);
15
14
  }
16
15
  if (argv.verbose) {
17
- logger.setLevel("verbose");
18
- logger.getLogger("cli:middlewares:base").verbose(`using @ui5/cli version ${getVersion()}`);
19
- logger.getLogger("cli:middlewares:base").verbose(`using node version ${process.version}`);
16
+ setLogLevel("verbose");
17
+ const log = getLogger("cli:middlewares:base");
18
+ log.verbose(`using @ui5/cli version ${getVersion()}`);
19
+ log.verbose(`using node version ${process.version}`);
20
20
  }
21
- return logger;
22
21
  }
@@ -1,7 +1,7 @@
1
1
  import {getRootProjectConfiguration} from "./utils.js";
2
- import logger from "@ui5/logger";
2
+ import {getLogger} from "@ui5/logger";
3
3
 
4
- const log = logger.getLogger("cli:framework:remove");
4
+ const log = getLogger("cli:framework:remove");
5
5
 
6
6
  /**
7
7
  * Removes the given set of libraries from the framework libraries section in the ui5.yaml
@@ -2,9 +2,9 @@ import path from "node:path";
2
2
  import {readFile, writeFile} from "node:fs/promises";
3
3
  import {loadAll, dump} from "js-yaml";
4
4
  import {fromYaml, getPosition, getValue} from "data-with-position";
5
- import logger from "@ui5/logger";
5
+ import {getLogger} from "@ui5/logger";
6
6
 
7
- const log = logger.getLogger("cli:framework:updateYaml");
7
+ const log = getLogger("cli:framework:updateYaml");
8
8
 
9
9
  function getProjectYamlDocument({project, configFile, configPath}) {
10
10
  const configs = loadAll(configFile, undefined, {