@sap-ux/fiori-generator-shared 0.2.6 → 0.3.1
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/helpers.d.ts +13 -0
- package/dist/helpers.js +27 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the resource URLs for the UShell bootstrap and UI5 bootstrap based on project type and UI5 framework details.
|
|
3
|
+
*
|
|
4
|
+
* @param {boolean} isEdmxProjectType - Indicates if the project is of type Edmx or CAP.
|
|
5
|
+
* @param {string} [frameworkUrl] - The URL of the UI5 framework.
|
|
6
|
+
* @param {string} [version] - The version of the UI5 framework.
|
|
7
|
+
* @returns {{ uShellBootstrapResourceUrl: string, uiBootstrapResourceUrl: string }} - The resource URLs for UShell bootstrap and UI bootstrap.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getBootstrapResourceUrls(isEdmxProjectType: boolean, frameworkUrl?: string, version?: string): {
|
|
10
|
+
uShellBootstrapResourceUrl: string;
|
|
11
|
+
uiBootstrapResourceUrl: string;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=helpers.d.ts.map
|
package/dist/helpers.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBootstrapResourceUrls = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Get the resource URLs for the UShell bootstrap and UI5 bootstrap based on project type and UI5 framework details.
|
|
6
|
+
*
|
|
7
|
+
* @param {boolean} isEdmxProjectType - Indicates if the project is of type Edmx or CAP.
|
|
8
|
+
* @param {string} [frameworkUrl] - The URL of the UI5 framework.
|
|
9
|
+
* @param {string} [version] - The version of the UI5 framework.
|
|
10
|
+
* @returns {{ uShellBootstrapResourceUrl: string, uiBootstrapResourceUrl: string }} - The resource URLs for UShell bootstrap and UI bootstrap.
|
|
11
|
+
*/
|
|
12
|
+
function getBootstrapResourceUrls(isEdmxProjectType, frameworkUrl, version) {
|
|
13
|
+
// Constants for relative paths
|
|
14
|
+
const relativeUshellPath = '/test-resources/sap/ushell/bootstrap/sandbox.js';
|
|
15
|
+
const relativeUiPath = '/resources/sap-ui-core.js';
|
|
16
|
+
// Construct version path if version is provided
|
|
17
|
+
const versionPath = version ? `/${version}` : '';
|
|
18
|
+
// Determine the resource URL for the UShell bootstrap based on the project type and framework URL availability
|
|
19
|
+
const uShellBootstrapResourceUrl = isEdmxProjectType || !frameworkUrl
|
|
20
|
+
? `..${relativeUshellPath}`
|
|
21
|
+
: `${frameworkUrl}${versionPath}${relativeUshellPath}`;
|
|
22
|
+
// Determine the resource URL for the UI5 bootstrap based on the project type and framework URL availability
|
|
23
|
+
const uiBootstrapResourceUrl = isEdmxProjectType || !frameworkUrl ? `..${relativeUiPath}` : `${frameworkUrl}${versionPath}${relativeUiPath}`;
|
|
24
|
+
return { uShellBootstrapResourceUrl, uiBootstrapResourceUrl };
|
|
25
|
+
}
|
|
26
|
+
exports.getBootstrapResourceUrls = getBootstrapResourceUrls;
|
|
27
|
+
//# sourceMappingURL=helpers.js.map
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,8 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.generateReadMe = void 0;
|
|
17
|
+
exports.generateReadMe = exports.getBootstrapResourceUrls = void 0;
|
|
18
18
|
__exportStar(require("./cap"), exports);
|
|
19
|
+
var helpers_1 = require("./helpers");
|
|
20
|
+
Object.defineProperty(exports, "getBootstrapResourceUrls", { enumerable: true, get: function () { return helpers_1.getBootstrapResourceUrls; } });
|
|
19
21
|
var read_me_1 = require("./read-me");
|
|
20
22
|
Object.defineProperty(exports, "generateReadMe", { enumerable: true, get: function () { return read_me_1.generateReadMe; } });
|
|
21
23
|
//# sourceMappingURL=index.js.map
|
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.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"mem-fs": "2.1.0",
|
|
21
21
|
"mem-fs-editor": "9.4.0",
|
|
22
|
-
"@sap-ux/project-access": "1.25.
|
|
22
|
+
"@sap-ux/project-access": "1.25.5"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/mem-fs-editor": "7.0.1",
|