@sap-ux/adp-tooling 0.18.77 → 0.18.79
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.
|
@@ -44,11 +44,12 @@ export declare function getAppParamsFromUI5Yaml(projectPath: string): AppParamsE
|
|
|
44
44
|
*
|
|
45
45
|
* @param {AdjustMtaYamlParams} params - The parameters.
|
|
46
46
|
* @param {Editor} memFs - The mem-fs editor instance.
|
|
47
|
+
* @param {string} timestamp - The timestamp.
|
|
47
48
|
* @param {string} [templatePathOverwrite] - The template path overwrite.
|
|
48
49
|
* @param {ToolsLogger} logger - The logger.
|
|
49
50
|
* @returns {Promise<void>} The promise.
|
|
50
51
|
*/
|
|
51
|
-
export declare function adjustMtaYaml({ projectPath, adpProjectName, appRouterType, businessSolutionName, businessService, serviceKeys }: AdjustMtaYamlParams, memFs: Editor, templatePathOverwrite?: string, logger?: ToolsLogger): Promise<
|
|
52
|
+
export declare function adjustMtaYaml({ projectPath, adpProjectName, appRouterType, businessSolutionName, businessService, serviceKeys }: AdjustMtaYamlParams, memFs: Editor, timestamp: string, templatePathOverwrite?: string, logger?: ToolsLogger): Promise<MtaYaml>;
|
|
52
53
|
/**
|
|
53
54
|
* Add fiori-tools-servestatic configuration to ui5.yaml and removes previously added configuration.
|
|
54
55
|
*
|
package/dist/cf/project/yaml.js
CHANGED
|
@@ -413,12 +413,12 @@ function adjustMtaYamlFlpModule(yamlContent, projectName, businessService) {
|
|
|
413
413
|
*
|
|
414
414
|
* @param {AdjustMtaYamlParams} params - The parameters.
|
|
415
415
|
* @param {Editor} memFs - The mem-fs editor instance.
|
|
416
|
+
* @param {string} timestamp - The timestamp.
|
|
416
417
|
* @param {string} [templatePathOverwrite] - The template path overwrite.
|
|
417
418
|
* @param {ToolsLogger} logger - The logger.
|
|
418
419
|
* @returns {Promise<void>} The promise.
|
|
419
420
|
*/
|
|
420
|
-
async function adjustMtaYaml({ projectPath, adpProjectName, appRouterType, businessSolutionName, businessService, serviceKeys }, memFs, templatePathOverwrite, logger) {
|
|
421
|
-
const timestamp = Date.now().toString();
|
|
421
|
+
async function adjustMtaYaml({ projectPath, adpProjectName, appRouterType, businessSolutionName, businessService, serviceKeys }, memFs, timestamp, templatePathOverwrite, logger) {
|
|
422
422
|
const mtaYamlPath = path.join(projectPath, 'mta.yaml');
|
|
423
423
|
const loadedYamlContent = (0, yaml_loader_1.getYamlContent)(mtaYamlPath);
|
|
424
424
|
const defaultYaml = {
|
|
@@ -452,6 +452,7 @@ async function adjustMtaYaml({ projectPath, adpProjectName, appRouterType, busin
|
|
|
452
452
|
});
|
|
453
453
|
memFs.write(mtaYamlPath, updatedYamlContent);
|
|
454
454
|
logger?.debug(`Adjusted MTA YAML for project ${projectPath}`);
|
|
455
|
+
return yamlContent;
|
|
455
456
|
}
|
|
456
457
|
/**
|
|
457
458
|
* Add fiori-tools-servestatic configuration to ui5.yaml and removes previously added configuration.
|
|
@@ -469,10 +470,15 @@ async function addServeStaticMiddleware(basePath, ui5Config, logger) {
|
|
|
469
470
|
// Add reusable library paths from ui5AppInfo.json if it exists
|
|
470
471
|
paths.push(...(0, ui5_app_info_1.getReusableLibraryPaths)(basePath, logger));
|
|
471
472
|
const variant = await (0, helper_1.getVariant)(basePath);
|
|
473
|
+
const builtVariantId = variant.id.replaceAll('.', '_');
|
|
472
474
|
paths.push({
|
|
473
|
-
path: `/changes/${
|
|
475
|
+
path: `/changes/${builtVariantId}`,
|
|
474
476
|
src: './webapp/changes',
|
|
475
477
|
fallthrough: true
|
|
478
|
+
}, {
|
|
479
|
+
path: `/${builtVariantId}/i18n`,
|
|
480
|
+
src: './webapp/i18n',
|
|
481
|
+
fallthrough: true
|
|
476
482
|
});
|
|
477
483
|
ui5Config.addCustomMiddleware([
|
|
478
484
|
{
|
package/dist/types.d.ts
CHANGED
package/dist/writer/cf.js
CHANGED
|
@@ -31,21 +31,23 @@ async function generateCf(basePath, config, logger, fs) {
|
|
|
31
31
|
if (!fs) {
|
|
32
32
|
fs = (0, mem_fs_editor_1.create)((0, mem_fs_1.create)());
|
|
33
33
|
}
|
|
34
|
+
const timestamp = Date.now().toString();
|
|
34
35
|
const fullConfig = setDefaults(config);
|
|
35
36
|
const { app, cf, ui5, project } = fullConfig;
|
|
36
|
-
await (0, cf_1.adjustMtaYaml)({
|
|
37
|
+
const yamlContent = await (0, cf_1.adjustMtaYaml)({
|
|
37
38
|
projectPath: basePath,
|
|
38
39
|
adpProjectName: project.name,
|
|
39
40
|
appRouterType: cf.approuter,
|
|
40
41
|
businessSolutionName: cf.businessSolutionName ?? '',
|
|
41
42
|
businessService: cf.businessService,
|
|
42
43
|
serviceKeys: cf.serviceInfo?.serviceKeys
|
|
43
|
-
}, fs, config.options?.templatePathOverwrite, logger);
|
|
44
|
+
}, fs, timestamp, config.options?.templatePathOverwrite, logger);
|
|
44
45
|
if (fullConfig.app.i18nModels) {
|
|
45
46
|
(0, i18n_1.writeI18nModels)(basePath, fullConfig.app.i18nModels, fs);
|
|
46
47
|
}
|
|
47
48
|
const variant = (0, project_utils_1.getCfVariant)(fullConfig);
|
|
48
49
|
(0, manifest_1.fillDescriptorContent)(variant.content, app.appType, ui5.version, app.i18nModels);
|
|
50
|
+
fullConfig.project.xsSecurityAppName = (0, cf_1.getProjectNameForXsSecurity)(yamlContent, timestamp);
|
|
49
51
|
await (0, project_utils_1.writeCfTemplates)(basePath, variant, fullConfig, fs);
|
|
50
52
|
await (0, project_utils_1.writeCfUI5Yaml)(fullConfig.project.folder, fullConfig, fs);
|
|
51
53
|
return fs;
|
|
@@ -221,7 +221,7 @@ async function writeCfTemplates(basePath, variant, config, fs) {
|
|
|
221
221
|
}
|
|
222
222
|
if (!fs.exists((0, node_path_1.join)(basePath, 'xs-security.json'))) {
|
|
223
223
|
fs.copyTpl((0, node_path_1.join)(templatePath, 'cf/xs-security.json'), (0, node_path_1.join)(basePath, 'xs-security.json'), {
|
|
224
|
-
projectName: project.
|
|
224
|
+
projectName: project.xsSecurityAppName
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aadp-tooling"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.18.
|
|
12
|
+
"version": "0.18.79",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"prompts": "2.4.2",
|
|
37
37
|
"sanitize-filename": "1.6.3",
|
|
38
38
|
"uuid": "10.0.0",
|
|
39
|
-
"@sap-ux/axios-extension": "1.25.
|
|
39
|
+
"@sap-ux/axios-extension": "1.25.18",
|
|
40
40
|
"@sap-ux/btp-utils": "1.1.9",
|
|
41
41
|
"@sap-ux/i18n": "0.3.9",
|
|
42
42
|
"@sap-ux/inquirer-common": "0.11.16",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@sap-ux/project-access": "1.35.10",
|
|
47
47
|
"@sap-ux/project-input-validator": "0.6.64",
|
|
48
48
|
"@sap-ux/store": "1.5.8",
|
|
49
|
-
"@sap-ux/system-access": "0.6.
|
|
49
|
+
"@sap-ux/system-access": "0.6.60",
|
|
50
50
|
"@sap-ux/ui5-config": "0.29.19",
|
|
51
51
|
"@sap-ux/ui5-info": "0.13.13"
|
|
52
52
|
},
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"zip": "cd dist && npx bestzip ../<%= module %>.zip *",
|
|
14
14
|
"clean": "npx rimraf <%= module %>.zip dist",
|
|
15
15
|
"build-ui5": "npm explore @ui5/task-adaptation -- npm run rollup",
|
|
16
|
-
"build-mta": "rimraf resources mta_archives && mbt build --mtar archive --source ../",
|
|
16
|
+
"build-mta": "rimraf ../resources ../mta_archives && mbt build --mtar archive --source ../",
|
|
17
17
|
"deploy": "cf deploy ../mta_archives/archive.mtar"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|