@sap-ux/flp-config-sub-generator 0.0.9 → 0.0.12
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/generators/app/index.js
CHANGED
|
@@ -48,7 +48,7 @@ class default_1 extends yeoman_generator_1.default {
|
|
|
48
48
|
this.launchFlpConfigAsSubGenerator = opts.launchFlpConfigAsSubGenerator ?? false;
|
|
49
49
|
this.appRootPath = opts.data?.appRootPath ?? opts?.appRootPath ?? this.destinationRoot();
|
|
50
50
|
this.options = opts;
|
|
51
|
-
logger_1.default.configureLogging(this.
|
|
51
|
+
logger_1.default.configureLogging(this.rootGeneratorName(), this.log, this.options.logWrapper, this.options.logLevel, this.options.logger, this.vscode);
|
|
52
52
|
// If launched standalone, set the header, title and description
|
|
53
53
|
if (!this.launchFlpConfigAsSubGenerator) {
|
|
54
54
|
this.appWizard.setHeaderTitle(constants_1.generatorTitle);
|
package/generators/utils/i18n.js
CHANGED
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.t = exports.initI18n = void 0;
|
|
7
7
|
const i18next_1 = __importDefault(require("i18next"));
|
|
8
8
|
const flp_config_sub_generator_i18n_json_1 = __importDefault(require("../translations/flp-config-sub-generator.i18n.json"));
|
|
9
|
-
const
|
|
9
|
+
const flpConfigGeneratorNs = 'flp-config-generator';
|
|
10
10
|
/**
|
|
11
11
|
* Initialize i18next with the translations for this module.
|
|
12
12
|
*/
|
|
13
13
|
async function initI18n() {
|
|
14
|
-
await i18next_1.default.init({ lng: 'en', fallbackLng: 'en' }, () => i18next_1.default.addResourceBundle('en',
|
|
14
|
+
await i18next_1.default.init({ lng: 'en', fallbackLng: 'en' }, () => i18next_1.default.addResourceBundle('en', flpConfigGeneratorNs, flp_config_sub_generator_i18n_json_1.default));
|
|
15
15
|
}
|
|
16
16
|
exports.initI18n = initI18n;
|
|
17
17
|
/**
|
|
@@ -23,7 +23,7 @@ exports.initI18n = initI18n;
|
|
|
23
23
|
*/
|
|
24
24
|
function t(key, options) {
|
|
25
25
|
if (!options?.ns) {
|
|
26
|
-
options = Object.assign(options ?? {}, { ns:
|
|
26
|
+
options = Object.assign(options ?? {}, { ns: flpConfigGeneratorNs });
|
|
27
27
|
}
|
|
28
28
|
return i18next_1.default.t(key, options);
|
|
29
29
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ILogWrapper } from '@sap-ux/fiori-generator-shared';
|
|
1
|
+
import { LogWrapper, type ILogWrapper } from '@sap-ux/fiori-generator-shared';
|
|
2
2
|
import type { Logger } from 'yeoman-environment';
|
|
3
3
|
import type { IVSCodeExtLogger, LogLevel } from '@vscode-logging/logger';
|
|
4
4
|
/**
|
|
@@ -19,14 +19,15 @@ export default class FlpGenLogger {
|
|
|
19
19
|
*/
|
|
20
20
|
static set logger(value: ILogWrapper);
|
|
21
21
|
/**
|
|
22
|
-
* Configures the
|
|
22
|
+
* Configures the logger.
|
|
23
23
|
*
|
|
24
|
-
* @param vscLogger - the vscode logger
|
|
25
24
|
* @param loggerName - the logger name
|
|
26
25
|
* @param yoLogger - the yeoman logger
|
|
27
|
-
* @param
|
|
26
|
+
* @param logWrapper - log wrapper instance
|
|
28
27
|
* @param logLevel - the log level
|
|
28
|
+
* @param vscLogger - the vscode logger
|
|
29
|
+
* @param vscode - the vscode instance
|
|
29
30
|
*/
|
|
30
|
-
static configureLogging(
|
|
31
|
+
static configureLogging(loggerName: string, yoLogger: Logger, logWrapper?: LogWrapper, logLevel?: LogLevel, vscLogger?: IVSCodeExtLogger, vscode?: unknown): void;
|
|
31
32
|
}
|
|
32
33
|
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -23,17 +23,18 @@ class FlpGenLogger {
|
|
|
23
23
|
FlpGenLogger._logger = value;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Configures the
|
|
26
|
+
* Configures the logger.
|
|
27
27
|
*
|
|
28
|
-
* @param vscLogger - the vscode logger
|
|
29
28
|
* @param loggerName - the logger name
|
|
30
29
|
* @param yoLogger - the yeoman logger
|
|
31
|
-
* @param
|
|
30
|
+
* @param logWrapper - log wrapper instance
|
|
32
31
|
* @param logLevel - the log level
|
|
32
|
+
* @param vscLogger - the vscode logger
|
|
33
|
+
* @param vscode - the vscode instance
|
|
33
34
|
*/
|
|
34
|
-
static configureLogging(
|
|
35
|
-
const
|
|
36
|
-
FlpGenLogger.logger =
|
|
35
|
+
static configureLogging(loggerName, yoLogger, logWrapper, logLevel, vscLogger, vscode) {
|
|
36
|
+
const logger = logWrapper ?? new fiori_generator_shared_1.LogWrapper(loggerName, yoLogger, logLevel, vscLogger, vscode);
|
|
37
|
+
FlpGenLogger.logger = logger;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
exports.default = FlpGenLogger;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/flp-config-sub-generator",
|
|
3
3
|
"description": "Generator for creating Fiori Launcpad configuration",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.12",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@sap-ux/deploy-config-generator-shared": "0.0.9",
|
|
28
28
|
"@sap-ux/feature-toggle": "0.2.3",
|
|
29
29
|
"@sap-ux/fiori-generator-shared": "0.7.18",
|
|
30
|
-
"@sap-ux/flp-config-inquirer": "0.2.
|
|
30
|
+
"@sap-ux/flp-config-inquirer": "0.2.13",
|
|
31
31
|
"@sap-ux/i18n": "0.2.0",
|
|
32
32
|
"@sap-ux/inquirer-common": "0.6.3",
|
|
33
33
|
"@sap-ux/project-access": "1.28.10"
|