@sap-ux/cf-deploy-config-inquirer 0.5.18 → 0.5.20
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.
|
@@ -5,8 +5,8 @@ exports.validateMtaPath = validateMtaPath;
|
|
|
5
5
|
exports.validateMtaId = validateMtaId;
|
|
6
6
|
exports.validateAbapService = validateAbapService;
|
|
7
7
|
const i18n_1 = require("../i18n");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
9
|
+
const node_path_1 = require("node:path");
|
|
10
10
|
const project_input_validator_1 = require("@sap-ux/project-input-validator");
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
@@ -61,7 +61,7 @@ function validateDestinationQuestion(input, allowEmptyChoice = false) {
|
|
|
61
61
|
*/
|
|
62
62
|
function validateMtaPath(input) {
|
|
63
63
|
const filePath = input?.trim();
|
|
64
|
-
return (filePath && (0,
|
|
64
|
+
return (filePath && (0, node_fs_1.existsSync)(filePath)) || (0, i18n_1.t)('errors.folderDoesNotExistError', { filePath: filePath });
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Validates the provided MTA ID.
|
|
@@ -87,12 +87,12 @@ function validateMtaId(input, previousAnswers) {
|
|
|
87
87
|
if (!idPattern.exec(input)) {
|
|
88
88
|
return (0, i18n_1.t)('errors.invalidMtaIdError');
|
|
89
89
|
}
|
|
90
|
-
if ((0,
|
|
90
|
+
if ((0, node_fs_1.existsSync)((0, node_path_1.join)(previousAnswers.mtaPath, input.trim()))) {
|
|
91
91
|
return (0, i18n_1.t)('errors.mtaIdAlreadyExistError', { mtaPath: previousAnswers.mtaPath });
|
|
92
92
|
}
|
|
93
93
|
const mtaPath = previousAnswers.mtaPath || '';
|
|
94
94
|
// Windows path length validation
|
|
95
|
-
const winPathResult = (0, project_input_validator_1.validateWindowsPathLength)((0,
|
|
95
|
+
const winPathResult = (0, project_input_validator_1.validateWindowsPathLength)((0, node_path_1.join)(mtaPath, input), (0, i18n_1.t)('errors.windowsMtaIdPathTooLong'));
|
|
96
96
|
if (winPathResult !== true) {
|
|
97
97
|
return winPathResult;
|
|
98
98
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/cf-deploy-config-inquirer",
|
|
3
3
|
"description": "Prompts module that can provide prompts for cf deployment config writer",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.20",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"i18next": "25.3.0",
|
|
23
23
|
"inquirer-autocomplete-prompt": "2.0.1",
|
|
24
|
-
"@sap-ux/inquirer-common": "0.7.
|
|
25
|
-
"@sap-ux/btp-utils": "1.1.
|
|
24
|
+
"@sap-ux/inquirer-common": "0.7.48",
|
|
25
|
+
"@sap-ux/btp-utils": "1.1.4",
|
|
26
26
|
"@sap-ux/logger": "0.7.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/inquirer": "8.2.6",
|
|
32
32
|
"@sap/cf-tools": "3.2.2",
|
|
33
33
|
"inquirer": "8.2.6",
|
|
34
|
-
"@sap-ux/project-input-validator": "0.6.
|
|
34
|
+
"@sap-ux/project-input-validator": "0.6.24"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=20.x"
|