@sap-ux/launch-config 0.10.6 → 0.10.8
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.
|
@@ -1,24 +1,4 @@
|
|
|
1
1
|
import type { LaunchJSON, DebugOptions } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Returns the `migratorMockIntent` with a leading `#` if it doesn't already start with one.
|
|
4
|
-
* If the input is undefined, it will return undefined.
|
|
5
|
-
*
|
|
6
|
-
* @param {string} [migratorMockIntent] - The optional mock intent string to be used in the migrator.
|
|
7
|
-
* @returns {string | undefined} - The migrator mock intent prefixed with `#` or undefined.
|
|
8
|
-
*/
|
|
9
|
-
export declare function getMigratorMockIntentWithHash(migratorMockIntent?: string): string | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* Generates the command-line arguments required to start the mock server based on the OData version and whether it's a migrator.
|
|
12
|
-
* If the OData version is `2.0` and it's a migrator, it opens the `targetMockHtmlFile`.
|
|
13
|
-
* Otherwise, it uses `testFlpSandboxHtml`.
|
|
14
|
-
*
|
|
15
|
-
* @param {boolean} isMigrator - Indicates whether the application is being migrated.
|
|
16
|
-
* @param {string} odataVersion - The version of OData being used (`2.0` or `4.0`).
|
|
17
|
-
* @param {string | undefined} targetMockHtmlFile - The target mock HTML file, can be `undefined`.
|
|
18
|
-
* @param {string} params - The parameters to append to the mock HTML file.
|
|
19
|
-
* @returns {string[]} - The command arguments used for starting flp sandbox html.
|
|
20
|
-
*/
|
|
21
|
-
export declare function getMockCmdArgs(isMigrator: boolean, odataVersion: string, targetMockHtmlFile: string | undefined, params: string): string[];
|
|
22
2
|
/**
|
|
23
3
|
* Configures the launch.json file based on provided options.
|
|
24
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/debug-config/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgB,UAAU,EAAE,YAAY,EAAmB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/debug-config/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgB,UAAU,EAAE,YAAY,EAAmB,MAAM,UAAU,CAAC;AA2FxF;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACnC,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,YAAY,EACxB,SAAS,CAAC,EAAE,MAAM,GACnB,UAAU,CAyEZ"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getMigratorMockIntentWithHash = getMigratorMockIntentWithHash;
|
|
4
|
-
exports.getMockCmdArgs = getMockCmdArgs;
|
|
5
3
|
exports.configureLaunchJsonFile = configureLaunchJsonFile;
|
|
6
4
|
const path_1 = require("path");
|
|
7
5
|
const utils_1 = require("../launch-config-crud/utils");
|
|
@@ -30,15 +28,16 @@ function getMigratorMockIntentWithHash(migratorMockIntent) {
|
|
|
30
28
|
*
|
|
31
29
|
* @param {boolean} isMigrator - Indicates whether the application is being migrated.
|
|
32
30
|
* @param {string} odataVersion - The version of OData being used (`2.0` or `4.0`).
|
|
33
|
-
* @param {string
|
|
31
|
+
* @param {string} targetMockHtmlFile - The target mock HTML file, can be `undefined`.
|
|
32
|
+
* @param {string} startHtmlFile - The starting HTML file to be used.
|
|
34
33
|
* @param {string} params - The parameters to append to the mock HTML file.
|
|
35
34
|
* @returns {string[]} - The command arguments used for starting flp sandbox html.
|
|
36
35
|
*/
|
|
37
|
-
function getMockCmdArgs(isMigrator, odataVersion, targetMockHtmlFile, params) {
|
|
36
|
+
function getMockCmdArgs(isMigrator, odataVersion, targetMockHtmlFile, startHtmlFile, params) {
|
|
38
37
|
if (isMigrator && odataVersion === '2.0') {
|
|
39
|
-
return ['--open', `${targetMockHtmlFile ??
|
|
38
|
+
return ['--open', `${targetMockHtmlFile ?? startHtmlFile}${params}`];
|
|
40
39
|
}
|
|
41
|
-
return ['--config', './ui5-mock.yaml', '--open', `${
|
|
40
|
+
return ['--config', './ui5-mock.yaml', '--open', `${startHtmlFile}${params}`];
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
44
43
|
* Generates a URL query string with an optional SAP client parameter and a disable cache parameter.
|
|
@@ -107,7 +106,7 @@ function configureLaunchJsonFile(rootFolder, cwd, configOpts, startFile) {
|
|
|
107
106
|
if (odataVersion && ['2.0', '4.0'].includes(odataVersion)) {
|
|
108
107
|
const migratorMockIntentWithHash = getMigratorMockIntentWithHash(migratorMockIntent);
|
|
109
108
|
const params = migratorMockIntentWithHash ?? flpAppIdWithHash;
|
|
110
|
-
const mockCmdArgs = getMockCmdArgs(isMigrator, odataVersion, targetMockHtmlFile, params);
|
|
109
|
+
const mockCmdArgs = getMockCmdArgs(isMigrator, odataVersion, targetMockHtmlFile, startHtmlFile, params);
|
|
111
110
|
const mockConfig = configureLaunchConfig(`Start ${projectName} Mock`, cwd, ['fiori', 'run'], mockCmdArgs, { FIORI_TOOLS_URL_PARAMS: envUrlParam }, runConfig);
|
|
112
111
|
launchFile.configurations.push(mockConfig);
|
|
113
112
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/debug-config/config.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/debug-config/config.ts"],"names":[],"mappings":";;AAsGA,0DA8EC;AApLD,+BAAgC;AAChC,uDAA8D;AAE9D,oCAAgE;AAEhE,kBAAkB;AAClB,MAAM,kBAAkB,GAAG,sBAAsB,CAAC;AAClD,MAAM,SAAS,GAAG,YAAY,CAAC;AAC/B,MAAM,4BAA4B,GAAG,gCAAgC,CAAC;AAEtE;;;;;;GAMG;AACH,SAAS,6BAA6B,CAAC,kBAA2B;IAC9D,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACtB,OAAO,SAA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.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/launch-config",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.8",
|
|
4
4
|
"description": "SAP Fiori tools launch config administration",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"mem-fs": "2.1.0",
|
|
28
28
|
"mem-fs-editor": "9.4.0",
|
|
29
29
|
"yargs-parser": "21.1.1",
|
|
30
|
-
"@sap-ux/
|
|
31
|
-
"@sap-ux/ui5-
|
|
32
|
-
"@sap-ux/
|
|
30
|
+
"@sap-ux/ui5-config": "0.28.3",
|
|
31
|
+
"@sap-ux/ui5-info": "0.12.0",
|
|
32
|
+
"@sap-ux/project-access": "1.30.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/mem-fs": "1.1.2",
|