@sap-ux/app-config-writer 0.4.37 → 0.4.38
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/dist/i18n.js +3 -3
- package/dist/navigation-config/index.js +2 -3
- package/dist/prompt/navigation-config.js +2 -3
- package/dist/prompt/smartlinks-config.js +2 -3
- package/dist/smartlinks-config/generateSmartLinks.js +1 -2
- package/dist/smartlinks-config/ui5-yaml.js +2 -3
- package/dist/smartlinks-config/utils.js +5 -6
- package/dist/templates.js +1 -2
- package/package.json +3 -3
package/dist/i18n.js
CHANGED
|
@@ -3,7 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.NAV_CONFIG_NS = exports.SMART_LINKS_NS = void 0;
|
|
7
|
+
exports.initI18n = initI18n;
|
|
8
|
+
exports.t = t;
|
|
7
9
|
const i18next_1 = __importDefault(require("i18next"));
|
|
8
10
|
const smartlinks_config_json_1 = __importDefault(require("./translations/smartlinks-config.json"));
|
|
9
11
|
const navigation_config_json_1 = __importDefault(require("./translations/navigation-config.json"));
|
|
@@ -26,7 +28,6 @@ async function initI18n() {
|
|
|
26
28
|
ns: [exports.SMART_LINKS_NS, exports.NAV_CONFIG_NS]
|
|
27
29
|
});
|
|
28
30
|
}
|
|
29
|
-
exports.initI18n = initI18n;
|
|
30
31
|
/**
|
|
31
32
|
* Helper function facading the call to i18next.
|
|
32
33
|
*
|
|
@@ -37,7 +38,6 @@ exports.initI18n = initI18n;
|
|
|
37
38
|
function t(key, options) {
|
|
38
39
|
return i18next_1.default.t(key, options);
|
|
39
40
|
}
|
|
40
|
-
exports.t = t;
|
|
41
41
|
initI18n().catch(() => {
|
|
42
42
|
// Ignore any errors since the write will still work
|
|
43
43
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.generateInboundNavigationConfig = generateInboundNavigationConfig;
|
|
4
|
+
exports.readManifest = readManifest;
|
|
4
5
|
const project_access_1 = require("@sap-ux/project-access");
|
|
5
6
|
const mem_fs_1 = require("mem-fs");
|
|
6
7
|
const mem_fs_editor_1 = require("mem-fs-editor");
|
|
@@ -47,7 +48,6 @@ async function generateInboundNavigationConfig(appRootPath, { semanticObject, ac
|
|
|
47
48
|
fs.extendJSON(manifestPath, { 'sap.app': Object.assign(manifest['sap.app'], { crossNavigation }) });
|
|
48
49
|
return fs;
|
|
49
50
|
}
|
|
50
|
-
exports.generateInboundNavigationConfig = generateInboundNavigationConfig;
|
|
51
51
|
/**
|
|
52
52
|
* Validates the basic manifest structure and existence required for inbound navigation addition.
|
|
53
53
|
*
|
|
@@ -70,5 +70,4 @@ async function readManifest(appPath, fs) {
|
|
|
70
70
|
manifestPath
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
exports.readManifest = readManifest;
|
|
74
73
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.promptInboundNavigationConfig = promptInboundNavigationConfig;
|
|
4
|
+
exports.validateText = validateText;
|
|
4
5
|
const prompts_1 = require("prompts");
|
|
5
6
|
const i18n_1 = require("../i18n");
|
|
6
7
|
const mem_fs_1 = require("mem-fs");
|
|
@@ -31,7 +32,6 @@ async function promptInboundNavigationConfig(basePath) {
|
|
|
31
32
|
fs
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
|
-
exports.promptInboundNavigationConfig = promptInboundNavigationConfig;
|
|
35
35
|
/**
|
|
36
36
|
* Validates that text input does not have zero length and optionally is less than the specified maximum length.
|
|
37
37
|
* Returns an end user message if validation fails.
|
|
@@ -65,7 +65,6 @@ function validateText(input, inputName, maxLength = 0, allowedCharacters) {
|
|
|
65
65
|
}
|
|
66
66
|
return true;
|
|
67
67
|
}
|
|
68
|
-
exports.validateText = validateText;
|
|
69
68
|
/**
|
|
70
69
|
* Get the prompts for inbound navigation configuration.
|
|
71
70
|
*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.promptUserPass = promptUserPass;
|
|
4
|
+
exports.getSmartLinksTargetFromPrompt = getSmartLinksTargetFromPrompt;
|
|
4
5
|
const chalk_1 = require("chalk");
|
|
5
6
|
const prompts_1 = require("prompts");
|
|
6
7
|
const btp_utils_1 = require("@sap-ux/btp-utils");
|
|
@@ -154,7 +155,6 @@ async function promptUserPass(log) {
|
|
|
154
155
|
});
|
|
155
156
|
return { username, password };
|
|
156
157
|
}
|
|
157
|
-
exports.promptUserPass = promptUserPass;
|
|
158
158
|
/**
|
|
159
159
|
* Returns credentials from target or from prompt.
|
|
160
160
|
*
|
|
@@ -205,5 +205,4 @@ async function getSmartLinksTargetFromPrompt(basePath, logger) {
|
|
|
205
205
|
const auth = await getCredentialsPrompt(target, logger);
|
|
206
206
|
return { target, auth, ignoreCertErrors: definition?.ignoreCertErrors };
|
|
207
207
|
}
|
|
208
|
-
exports.getSmartLinksTargetFromPrompt = getSmartLinksTargetFromPrompt;
|
|
209
208
|
//# sourceMappingURL=smartlinks-config.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateSmartLinksConfig =
|
|
3
|
+
exports.generateSmartLinksConfig = generateSmartLinksConfig;
|
|
4
4
|
const mem_fs_1 = require("mem-fs");
|
|
5
5
|
const mem_fs_editor_1 = require("mem-fs-editor");
|
|
6
6
|
const utils_1 = require("./utils");
|
|
@@ -20,5 +20,4 @@ async function generateSmartLinksConfig(basePath, config, logger, fs) {
|
|
|
20
20
|
await (0, utils_1.writeSmartLinksConfig)(basePath, config, fs, logger);
|
|
21
21
|
return fs;
|
|
22
22
|
}
|
|
23
|
-
exports.generateSmartLinksConfig = generateSmartLinksConfig;
|
|
24
23
|
//# sourceMappingURL=generateSmartLinks.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.readUi5DeployConfigTarget = readUi5DeployConfigTarget;
|
|
4
|
+
exports.addUi5YamlServeStaticMiddleware = addUi5YamlServeStaticMiddleware;
|
|
4
5
|
const path_1 = require("path");
|
|
5
6
|
const project_access_1 = require("@sap-ux/project-access");
|
|
6
7
|
const i18n_1 = require("../i18n");
|
|
@@ -20,7 +21,6 @@ async function readUi5DeployConfigTarget(basePath) {
|
|
|
20
21
|
const { target, ignoreCertError } = customTask?.configuration || {};
|
|
21
22
|
return { target, ignoreCertErrors: ignoreCertError };
|
|
22
23
|
}
|
|
23
|
-
exports.readUi5DeployConfigTarget = readUi5DeployConfigTarget;
|
|
24
24
|
/**
|
|
25
25
|
* Checks if 'fiori-tools-servestatic' configuration is already existing.
|
|
26
26
|
*
|
|
@@ -71,5 +71,4 @@ async function addUi5YamlServeStaticMiddleware(basePath, fs, logger) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
exports.addUi5YamlServeStaticMiddleware = addUi5YamlServeStaticMiddleware;
|
|
75
74
|
//# sourceMappingURL=ui5-yaml.js.map
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getLocalStoredCredentials = getLocalStoredCredentials;
|
|
4
|
+
exports.sendRequest = sendRequest;
|
|
5
|
+
exports.getTargetDefinition = getTargetDefinition;
|
|
6
|
+
exports.getTargetMappingsConfig = getTargetMappingsConfig;
|
|
7
|
+
exports.writeSmartLinksConfig = writeSmartLinksConfig;
|
|
4
8
|
const chalk_1 = require("chalk");
|
|
5
9
|
const ejs_1 = require("ejs");
|
|
6
10
|
const path_1 = require("path");
|
|
@@ -43,7 +47,6 @@ async function getLocalStoredCredentials(url, client, logger) {
|
|
|
43
47
|
}
|
|
44
48
|
return undefined;
|
|
45
49
|
}
|
|
46
|
-
exports.getLocalStoredCredentials = getLocalStoredCredentials;
|
|
47
50
|
/**
|
|
48
51
|
* Creates and returns a service provider.
|
|
49
52
|
*
|
|
@@ -91,7 +94,6 @@ async function sendRequest(config, logger) {
|
|
|
91
94
|
throw Error(error.message);
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
|
-
exports.sendRequest = sendRequest;
|
|
95
97
|
/**
|
|
96
98
|
* Get target definition of deploy system as source for smartlinks configuration.
|
|
97
99
|
*
|
|
@@ -112,7 +114,6 @@ async function getTargetDefinition(basePath, logger) {
|
|
|
112
114
|
return undefined;
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
|
-
exports.getTargetDefinition = getTargetDefinition;
|
|
116
117
|
/**
|
|
117
118
|
* Sends a request and returns the target mappings.
|
|
118
119
|
*
|
|
@@ -153,7 +154,6 @@ async function getTargetMappingsConfig(config, logger) {
|
|
|
153
154
|
}
|
|
154
155
|
return inboundConfig;
|
|
155
156
|
}
|
|
156
|
-
exports.getTargetMappingsConfig = getTargetMappingsConfig;
|
|
157
157
|
/**
|
|
158
158
|
* Maps service targets to existing targets in appconfig sandboxConfig file.
|
|
159
159
|
*
|
|
@@ -195,5 +195,4 @@ async function writeSmartLinksConfig(basePath, config, fs, logger) {
|
|
|
195
195
|
}
|
|
196
196
|
await (0, ui5_yaml_1.addUi5YamlServeStaticMiddleware)(basePath, fs, logger);
|
|
197
197
|
}
|
|
198
|
-
exports.writeSmartLinksConfig = writeSmartLinksConfig;
|
|
199
198
|
//# sourceMappingURL=utils.js.map
|
package/dist/templates.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTemplatePath =
|
|
3
|
+
exports.getTemplatePath = getTemplatePath;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
/**
|
|
6
6
|
* Locates template files relative to the dist folder.
|
|
@@ -12,5 +12,4 @@ const path_1 = require("path");
|
|
|
12
12
|
function getTemplatePath(relativeTemplatePath = '') {
|
|
13
13
|
return (0, path_1.join)(__dirname, '../templates', relativeTemplatePath);
|
|
14
14
|
}
|
|
15
|
-
exports.getTemplatePath = getTemplatePath;
|
|
16
15
|
//# sourceMappingURL=templates.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/app-config-writer",
|
|
3
3
|
"description": "Add or update configuration for SAP Fiori tools application",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.38",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"mem-fs": "2.1.0",
|
|
27
27
|
"mem-fs-editor": "9.4.0",
|
|
28
28
|
"prompts": "2.4.2",
|
|
29
|
-
"@sap-ux/project-access": "1.27.5",
|
|
30
29
|
"@sap-ux/axios-extension": "1.16.6",
|
|
31
|
-
"@sap-ux/store": "0.9.1",
|
|
32
30
|
"@sap-ux/btp-utils": "0.15.2",
|
|
33
31
|
"@sap-ux/logger": "0.6.0",
|
|
32
|
+
"@sap-ux/project-access": "1.27.5",
|
|
33
|
+
"@sap-ux/store": "0.9.2",
|
|
34
34
|
"@sap-ux/ui5-config": "0.25.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|