@sap-ux/fiori-generator-shared 0.13.19 → 0.13.22
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/app-gen-info.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.transformAbapCSNForAppGenInfo = transformAbapCSNForAppGenInfo;
|
|
4
4
|
exports.generateAppGenInfo = generateAppGenInfo;
|
|
5
|
-
const
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
6
|
/**
|
|
7
7
|
* Transforms the external abapCSN object (possible multiple services) to the internal abapCSN (single chosen service).
|
|
8
8
|
* Uses the chosen service to obtain the service uri and name for the .appGenInfo.json.
|
|
@@ -40,7 +40,7 @@ function transformAbapCSNForAppGenInfo({ serviceId, serviceUrl }, abapCSN) {
|
|
|
40
40
|
function generateAppGenInfo(destPath, appGenInfo, fs) {
|
|
41
41
|
// N.B. This function must stay at this level in the directory structure, i.e one level below 'templates'
|
|
42
42
|
// Apply the configuration to generate the README file
|
|
43
|
-
const templateSourcePath = (0,
|
|
43
|
+
const templateSourcePath = (0, node_path_1.join)(__dirname, '../templates/README.md');
|
|
44
44
|
const templateDestPath = `${destPath}/README.md`;
|
|
45
45
|
const { externalParameters, serviceId, ...appGenInfoCore } = appGenInfo;
|
|
46
46
|
// Write the README file
|
package/dist/cap/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCapFolderPathsSync = getCapFolderPathsSync;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
6
|
/**
|
|
7
7
|
* Lightweight synchronous function to get the CAP project custom paths.
|
|
8
8
|
* A more robust async alternative is `getCapCustomPaths` in `@sap-ux/project-access`.
|
|
@@ -16,12 +16,12 @@ function getCapFolderPathsSync(capProjectPath) {
|
|
|
16
16
|
db: 'db/',
|
|
17
17
|
srv: 'srv/'
|
|
18
18
|
};
|
|
19
|
-
const cdsrcPath = (0,
|
|
20
|
-
const packageJsonPath = (0,
|
|
19
|
+
const cdsrcPath = (0, node_path_1.join)(capProjectPath, '.cdsrc.json');
|
|
20
|
+
const packageJsonPath = (0, node_path_1.join)(capProjectPath, 'package.json');
|
|
21
21
|
const configFiles = [cdsrcPath, packageJsonPath];
|
|
22
22
|
for (const configFile of configFiles) {
|
|
23
23
|
try {
|
|
24
|
-
const config = JSON.parse((0,
|
|
24
|
+
const config = JSON.parse((0, node_fs_1.readFileSync)(configFile).toString());
|
|
25
25
|
for (const folder of Object.keys(capPaths)) {
|
|
26
26
|
let customPath;
|
|
27
27
|
if (config?.folders?.[folder]) {
|
|
@@ -7,12 +7,12 @@ exports.YEOMANUI_TARGET_FOLDER_CONFIG_PROP = void 0;
|
|
|
7
7
|
exports.getDefaultTargetFolder = getDefaultTargetFolder;
|
|
8
8
|
exports.isExtensionInstalled = isExtensionInstalled;
|
|
9
9
|
exports.isCommandRegistered = isCommandRegistered;
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
10
|
+
const node_fs_1 = require("node:fs");
|
|
11
|
+
const node_os_1 = __importDefault(require("node:os"));
|
|
12
|
+
const node_path_1 = require("node:path");
|
|
13
13
|
const semver_1 = require("semver");
|
|
14
14
|
exports.YEOMANUI_TARGET_FOLDER_CONFIG_PROP = 'ApplicationWizard.TargetFolder';
|
|
15
|
-
const DEFAULT_PROJECTS_FOLDER = (0,
|
|
15
|
+
const DEFAULT_PROJECTS_FOLDER = (0, node_path_1.join)(node_os_1.default.homedir(), 'projects');
|
|
16
16
|
/**
|
|
17
17
|
* Determines the target folder for the project.
|
|
18
18
|
*
|
|
@@ -38,7 +38,7 @@ function getDefaultTargetFolder(vscode) {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
// Otherwise use <home-dir>/projects,
|
|
41
|
-
return (0,
|
|
41
|
+
return (0, node_fs_1.existsSync)(DEFAULT_PROJECTS_FOLDER) ? DEFAULT_PROJECTS_FOLDER : undefined;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Check for an installed extension, optionally specifying a minimum version and activation state.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-generator-shared",
|
|
3
3
|
"description": "Commonly used shared functionality and types to support the fiori generator.",
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.22",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"mem-fs-editor": "9.4.0",
|
|
25
25
|
"os-name": "4.0.1",
|
|
26
26
|
"semver": "7.5.4",
|
|
27
|
-
"@sap-ux/btp-utils": "1.1.
|
|
28
|
-
"@sap-ux/project-access": "1.32.
|
|
29
|
-
"@sap-ux/telemetry": "0.6.
|
|
27
|
+
"@sap-ux/btp-utils": "1.1.4",
|
|
28
|
+
"@sap-ux/project-access": "1.32.4",
|
|
29
|
+
"@sap-ux/telemetry": "0.6.28"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/mem-fs-editor": "7.0.1",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@types/semver": "7.5.2",
|
|
35
35
|
"@types/vscode": "1.73.1",
|
|
36
36
|
"@types/yeoman-environment": "2.10.11",
|
|
37
|
-
"@sap-ux/axios-extension": "1.22.
|
|
37
|
+
"@sap-ux/axios-extension": "1.22.10",
|
|
38
38
|
"@sap-ux/logger": "0.7.0"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|