@sap-ux/generator-adp 0.3.65 → 0.3.67
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.
|
@@ -8,7 +8,7 @@ const odata_service_writer_1 = require("@sap-ux/odata-service-writer");
|
|
|
8
8
|
const i18n_1 = require("../utils/i18n");
|
|
9
9
|
const types_1 = require("../types");
|
|
10
10
|
const sub_gen_auth_base_1 = __importDefault(require("../base/sub-gen-auth-base"));
|
|
11
|
-
const
|
|
11
|
+
const templates_1 = require("../utils/templates");
|
|
12
12
|
/**
|
|
13
13
|
* Generator for adding annotations to OData services.
|
|
14
14
|
*/
|
|
@@ -58,7 +58,7 @@ class AddAnnotationsToDataGenerator extends sub_gen_auth_base_1.default {
|
|
|
58
58
|
const metadata = await this.manifestService.getDataSourceMetadata(this.answers.id);
|
|
59
59
|
changeData.annotation.namespaces = (0, odata_service_writer_1.getAnnotationNamespaces)({ metadata });
|
|
60
60
|
}
|
|
61
|
-
await (0, adp_tooling_1.generateChange)(this.projectPath, "appdescr_app_addAnnotationsToOData" /* ChangeType.ADD_ANNOTATIONS_TO_ODATA */, changeData, this.fs,
|
|
61
|
+
await (0, adp_tooling_1.generateChange)(this.projectPath, "appdescr_app_addAnnotationsToOData" /* ChangeType.ADD_ANNOTATIONS_TO_ODATA */, changeData, this.fs, (0, templates_1.getTemplatesOverwritePath)());
|
|
62
62
|
this.logger.log('Change written to changes folder');
|
|
63
63
|
if (this.answers.fileSelectOption === 2 /* AnnotationFileSelectType.NewEmptyFile */) {
|
|
64
64
|
this.appWizard.showInformation((0, i18n_1.t)('prompts.emptyAnnotationFile'), yeoman_ui_types_1.MessageType.notification);
|
package/generators/app/index.js
CHANGED
|
@@ -25,6 +25,7 @@ const appWizardCache_1 = require("../utils/appWizardCache");
|
|
|
25
25
|
const default_values_1 = require("./questions/helper/default-values");
|
|
26
26
|
const steps_1 = require("../utils/steps");
|
|
27
27
|
const workspace_1 = require("../utils/workspace");
|
|
28
|
+
const templates_1 = require("../utils/templates");
|
|
28
29
|
const generatorTitle = 'Adaptation Project';
|
|
29
30
|
/**
|
|
30
31
|
* Generator for creating an Adaptation Project.
|
|
@@ -116,7 +117,7 @@ class default_1 extends yeoman_generator_1.default {
|
|
|
116
117
|
this.jsonInput = (0, parse_json_input_1.parseJsonInput)(jsonInputString, this.logger);
|
|
117
118
|
if (!this.jsonInput) {
|
|
118
119
|
this.env.lookup({
|
|
119
|
-
packagePatterns: ['@sap/generator-fiori'
|
|
120
|
+
packagePatterns: ['@sap/generator-fiori']
|
|
120
121
|
});
|
|
121
122
|
(0, opts_1.setHeaderTitle)(opts, this.logger, generatorTitle);
|
|
122
123
|
(0, appWizardCache_1.initCache)(this.logger, this.appWizard);
|
|
@@ -229,6 +230,9 @@ class default_1 extends yeoman_generator_1.default {
|
|
|
229
230
|
packageJson,
|
|
230
231
|
logger: this.toolsLogger
|
|
231
232
|
});
|
|
233
|
+
if (config.options) {
|
|
234
|
+
config.options.templatePathOverwrite = (0, templates_1.getTemplatesOverwritePath)();
|
|
235
|
+
}
|
|
232
236
|
await (0, adp_tooling_1.generate)(this._getProjectPath(), config, this.fs);
|
|
233
237
|
}
|
|
234
238
|
catch (e) {
|
|
@@ -27,9 +27,9 @@ const PACKAGE_ADDITIONAL_VALIDATION = {
|
|
|
27
27
|
function addFlpGen({ projectRootPath, vscode, inbounds, layer }, composeWith, logger, appWizard) {
|
|
28
28
|
try {
|
|
29
29
|
/**
|
|
30
|
-
* We are using this namespace for now because '@sap
|
|
30
|
+
* We are using this namespace for now because '@sap/fiori:adp-flp-config' is not yet bundled in '@sap/generator-fiori'.
|
|
31
31
|
*/
|
|
32
|
-
composeWith(
|
|
32
|
+
composeWith('@sap/fiori:adp-flp-config', {
|
|
33
33
|
launchAsSubGen: true,
|
|
34
34
|
vscode,
|
|
35
35
|
inbounds,
|
|
@@ -37,11 +37,11 @@ function addFlpGen({ projectRootPath, vscode, inbounds, layer }, composeWith, lo
|
|
|
37
37
|
data: { projectRootPath },
|
|
38
38
|
appWizard
|
|
39
39
|
});
|
|
40
|
-
logger.info(`'@sap
|
|
40
|
+
logger.info(`'@sap/fiori:adp-flp-config' was called.`);
|
|
41
41
|
}
|
|
42
42
|
catch (e) {
|
|
43
43
|
logger.error(e);
|
|
44
|
-
throw new Error(`Could not call '@sap
|
|
44
|
+
throw new Error(`Could not call '@sap/fiori:adp-flp-config' sub-generator: ${e.message}`);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This function is used to get the path to the templates directory when this generator is bundled inside `@sap/generator-fiori`.
|
|
3
|
+
* It is used to overwrite the templates directory.
|
|
4
|
+
*
|
|
5
|
+
* @returns {string | undefined} The path to the templates directory.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getTemplatesOverwritePath(): string | undefined;
|
|
8
|
+
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTemplatesOverwritePath = getTemplatesOverwritePath;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
/**
|
|
7
|
+
* This function is used to get the path to the templates directory when this generator is bundled inside `@sap/generator-fiori`.
|
|
8
|
+
* It is used to overwrite the templates directory.
|
|
9
|
+
*
|
|
10
|
+
* @returns {string | undefined} The path to the templates directory.
|
|
11
|
+
*/
|
|
12
|
+
function getTemplatesOverwritePath() {
|
|
13
|
+
const templatePath = (0, path_1.join)(__dirname, 'templates');
|
|
14
|
+
if ((0, fs_1.existsSync)(templatePath)) {
|
|
15
|
+
return templatePath;
|
|
16
|
+
}
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=templates.js.map
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"displayName": "SAPUI5 Adaptation Project",
|
|
4
4
|
"homepage": "https://help.sap.com/viewer/584e0bcbfd4a4aff91c815cefa0bce2d/Cloud/en-US/ada9567b767941aba8d49fdb4fdedea7.html",
|
|
5
5
|
"description": "Adaptation project allows you to create an app variant for an existing SAP Fiori elements-based or SAPUI5 freestyle application, without changing the original application.",
|
|
6
|
-
"version": "0.3.
|
|
6
|
+
"version": "0.3.67",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"i18next": "25.3.0",
|
|
31
31
|
"yeoman-generator": "5.10.0",
|
|
32
32
|
"uuid": "10.0.0",
|
|
33
|
-
"@sap-ux/adp-tooling": "0.15.
|
|
33
|
+
"@sap-ux/adp-tooling": "0.15.19",
|
|
34
34
|
"@sap-ux/axios-extension": "1.22.5",
|
|
35
35
|
"@sap-ux/btp-utils": "1.1.0",
|
|
36
36
|
"@sap-ux/feature-toggle": "0.3.0",
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"@sap-ux/system-access": "0.6.12",
|
|
42
42
|
"@sap-ux/project-input-validator": "0.6.17",
|
|
43
43
|
"@sap-ux/fiori-generator-shared": "0.13.9",
|
|
44
|
-
"@sap-ux/adp-flp-config-sub-generator": "0.1.63",
|
|
45
44
|
"@sap-ux/odata-service-writer": "0.27.17"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
@@ -57,7 +56,7 @@
|
|
|
57
56
|
"fs-extra": "10.0.0",
|
|
58
57
|
"rimraf": "5.0.5",
|
|
59
58
|
"yeoman-test": "6.3.0",
|
|
60
|
-
"@sap-ux/deploy-config-sub-generator": "0.3.
|
|
59
|
+
"@sap-ux/deploy-config-sub-generator": "0.3.60"
|
|
61
60
|
},
|
|
62
61
|
"engines": {
|
|
63
62
|
"node": ">=20.x"
|