@sap-ux/launch-config 0.2.20 → 0.4.0
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/debug-config/config.d.ts +10 -0
- package/dist/debug-config/config.d.ts.map +1 -0
- package/dist/debug-config/config.js +91 -0
- package/dist/debug-config/config.js.map +1 -0
- package/dist/debug-config/helpers.d.ts +48 -0
- package/dist/debug-config/helpers.d.ts.map +1 -0
- package/dist/debug-config/helpers.js +81 -0
- package/dist/debug-config/helpers.js.map +1 -0
- package/dist/debug-config/workspaceManager.d.ts +46 -0
- package/dist/debug-config/workspaceManager.d.ts.map +1 -0
- package/dist/debug-config/workspaceManager.js +109 -0
- package/dist/debug-config/workspaceManager.js.map +1 -0
- package/dist/i18n.d.ts +14 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +41 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/launch-config-crud/create.d.ts +35 -1
- package/dist/launch-config-crud/create.d.ts.map +1 -1
- package/dist/launch-config-crud/create.js +118 -2
- package/dist/launch-config-crud/create.js.map +1 -1
- package/dist/launch-config-crud/utils.d.ts +12 -1
- package/dist/launch-config-crud/utils.d.ts.map +1 -1
- package/dist/launch-config-crud/utils.js +5 -4
- package/dist/launch-config-crud/utils.js.map +1 -1
- package/dist/translations/launch-config.i18n.json +10 -0
- package/dist/types/types.d.ts +56 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/types.js.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LaunchJSON, DebugOptions } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Configures the launch.json file based on provided options.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} cwd - The current working directory.
|
|
6
|
+
* @param {DebugOptions} configOpts - Configuration options for the launch.json file.
|
|
7
|
+
* @returns {LaunchJSON} The configured launch.json object.
|
|
8
|
+
*/
|
|
9
|
+
export declare function configureLaunchJsonFile(cwd: string, configOpts: DebugOptions): LaunchJSON;
|
|
10
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/debug-config/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,UAAU,EAAE,YAAY,EAAmB,MAAM,UAAU,CAAC;AAoDxF;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,GAAG,UAAU,CA4EzF"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configureLaunchJsonFile = void 0;
|
|
4
|
+
const odata_service_inquirer_1 = require("@sap-ux/odata-service-inquirer");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const utils_1 = require("../launch-config-crud/utils");
|
|
7
|
+
const types_1 = require("../types");
|
|
8
|
+
// debug constants
|
|
9
|
+
const testFlpSandboxHtml = 'test/flpSandbox.html';
|
|
10
|
+
const indexHtml = 'index.html';
|
|
11
|
+
const testFlpSandboxMockServerHtml = 'test/flpSandboxMockServer.html';
|
|
12
|
+
/**
|
|
13
|
+
* Generates a URL query string with an optional SAP client parameter and a disable cache parameter.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} sapClientParam - The SAP client parameter to be included in the URL query string.
|
|
16
|
+
* @returns {string} A formatted URL query string containing the SAP client parameter and disable cache parameter.
|
|
17
|
+
* @example
|
|
18
|
+
* const urlParam = getEnvUrlParams('testsapclinet');
|
|
19
|
+
* // Returns 'testsapclinet&sap-ui-xx-viewCache=false'
|
|
20
|
+
* @example
|
|
21
|
+
* const urlParam = getEnvUrlParams('');
|
|
22
|
+
* // Returns 'sap-ui-xx-viewCache=false'
|
|
23
|
+
*/
|
|
24
|
+
function getEnvUrlParams(sapClientParam) {
|
|
25
|
+
const disableCacheParam = 'sap-ui-xx-viewCache=false';
|
|
26
|
+
return sapClientParam ? `${sapClientParam}&${disableCacheParam}` : disableCacheParam;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Creates a launch configuration.
|
|
30
|
+
*
|
|
31
|
+
* @param {string} name - The name of the configuration.
|
|
32
|
+
* @param {string} cwd - The current working directory.
|
|
33
|
+
* @param {string[]} runtimeArgs - The runtime arguments.
|
|
34
|
+
* @param {string[]} cmdArgs - The command arguments.
|
|
35
|
+
* @param {object} envVars - Environment variables for the configuration.
|
|
36
|
+
* @param {string} [runConfig] - The optional run configuration for AppStudio.
|
|
37
|
+
* @returns {LaunchConfig} The launch configuration object.
|
|
38
|
+
*/
|
|
39
|
+
function createLaunchConfig(name, cwd, runtimeArgs, cmdArgs, envVars, runConfig) {
|
|
40
|
+
const config = (0, utils_1.getLaunchConfig)(name, cwd, runtimeArgs, cmdArgs, envVars);
|
|
41
|
+
if (runConfig) {
|
|
42
|
+
// runConfig is only used in BAS
|
|
43
|
+
config.env['run.config'] = runConfig;
|
|
44
|
+
}
|
|
45
|
+
return config;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Configures the launch.json file based on provided options.
|
|
49
|
+
*
|
|
50
|
+
* @param {string} cwd - The current working directory.
|
|
51
|
+
* @param {DebugOptions} configOpts - Configuration options for the launch.json file.
|
|
52
|
+
* @returns {LaunchJSON} The configured launch.json object.
|
|
53
|
+
*/
|
|
54
|
+
function configureLaunchJsonFile(cwd, configOpts) {
|
|
55
|
+
const { projectPath, isAppStudio, datasourceType, flpAppId, flpSandboxAvailable, sapClientParam, odataVersion, isMigrator, isFioriElement, migratorMockIntent } = configOpts;
|
|
56
|
+
const projectName = (0, path_1.basename)(projectPath);
|
|
57
|
+
const flpAppIdWithHash = flpAppId && !flpAppId.startsWith('#') ? `#${flpAppId}` : flpAppId;
|
|
58
|
+
const startHtmlFile = flpSandboxAvailable ? testFlpSandboxHtml : indexHtml;
|
|
59
|
+
const runConfig = isAppStudio
|
|
60
|
+
? JSON.stringify({
|
|
61
|
+
handlerId: types_1.FIORI_TOOLS_LAUNCH_CONFIG_HANDLER_ID,
|
|
62
|
+
runnableId: projectPath
|
|
63
|
+
})
|
|
64
|
+
: undefined;
|
|
65
|
+
const envUrlParam = getEnvUrlParams(sapClientParam);
|
|
66
|
+
const launchFile = { version: '0.2.0', configurations: [] };
|
|
67
|
+
// Add live configuration if the datasource is not from a metadata file
|
|
68
|
+
if (datasourceType !== odata_service_inquirer_1.DatasourceType.metadataFile) {
|
|
69
|
+
const startCommand = `${startHtmlFile}${flpAppIdWithHash}`;
|
|
70
|
+
const liveConfig = createLaunchConfig(`Start ${projectName}`, cwd, ['fiori', 'run'], ['--open', startCommand], { DEBUG: '--inspect', FIORI_TOOLS_URL_PARAMS: envUrlParam }, runConfig);
|
|
71
|
+
launchFile.configurations.push(liveConfig);
|
|
72
|
+
}
|
|
73
|
+
// Add mock configuration for OData V2 or V4
|
|
74
|
+
if (odataVersion && [odata_service_inquirer_1.OdataVersion.v2, odata_service_inquirer_1.OdataVersion.v4].includes(odataVersion)) {
|
|
75
|
+
const params = `${flpAppIdWithHash ?? ''}`;
|
|
76
|
+
const mockCmdArgs = isMigrator && odataVersion === odata_service_inquirer_1.OdataVersion.v2
|
|
77
|
+
? ['--open', `${testFlpSandboxMockServerHtml}${params}`]
|
|
78
|
+
: ['--config', './ui5-mock.yaml', '--open', `${testFlpSandboxHtml}${params}`];
|
|
79
|
+
const mockConfig = createLaunchConfig(`Start ${projectName} Mock`, cwd, ['fiori', 'run'], mockCmdArgs, { FIORI_TOOLS_URL_PARAMS: envUrlParam }, runConfig);
|
|
80
|
+
launchFile.configurations.push(mockConfig);
|
|
81
|
+
}
|
|
82
|
+
// Add local configuration
|
|
83
|
+
const shouldUseMockServer = isFioriElement && odataVersion === odata_service_inquirer_1.OdataVersion.v2 && isMigrator;
|
|
84
|
+
const localHtmlFile = shouldUseMockServer ? testFlpSandboxMockServerHtml : startHtmlFile;
|
|
85
|
+
const startLocalCommand = `${localHtmlFile}${migratorMockIntent ? `#${migratorMockIntent.replace('#', '')}` : flpAppIdWithHash}`;
|
|
86
|
+
const localConfig = createLaunchConfig(`Start ${projectName} Local`, cwd, ['fiori', 'run'], ['--config', './ui5-local.yaml', '--open', startLocalCommand], { FIORI_TOOLS_URL_PARAMS: envUrlParam }, runConfig);
|
|
87
|
+
launchFile.configurations.push(localConfig);
|
|
88
|
+
return launchFile;
|
|
89
|
+
}
|
|
90
|
+
exports.configureLaunchJsonFile = configureLaunchJsonFile;
|
|
91
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/debug-config/config.ts"],"names":[],"mappings":";;;AAAA,2EAA8E;AAC9E,+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;;;;;;;;;;;GAWG;AACH,SAAS,eAAe,CAAC,cAAsB;IAC3C,MAAM,iBAAiB,GAAG,2BAA2B,CAAC;IACtD,OAAO,cAAc,CAAC,CAAC,CAAC,GAAG,cAAc,IAAI,iBAAiB,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC;AACzF,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAS,kBAAkB,CACvB,IAAY,EACZ,GAAW,EACX,WAAqB,EACrB,OAAiB,EACjB,OAAwB,EACxB,SAAkB;IAElB,MAAM,MAAM,GAAG,IAAA,uBAAe,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACzE,IAAI,SAAS,EAAE,CAAC;QACZ,gCAAgC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AkB,CAClC,SAAS,WAAW,QAAQ,EAC5B,GAAG,EACH,CAAC,OAAO,EAAE,KAAK,CAAC,EAChB,CAAC,UAAU,EAAE,kBAAkB,EAAE,QAAQ,EAAE,iBAAiB,CAAC,EAC7D,EAAE,sBAAsB,EAAE,WAAW,EAAE,EACvC,SAAS,CACZ,CAAC;IACF,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAE5C,OAAO,UAAU,CAAC;AACtB,CAAC;AA5ED,0DA4EC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { WorkspaceHandlerInfo } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves the file system path to the `launch.json` file within the first opened folder.
|
|
4
|
+
*
|
|
5
|
+
* @param {Array} workspaceFolders - An array of workspace folders, provided by VS Code's API.
|
|
6
|
+
* @param {object} workspaceFolders[].uri - The URI object representing the folder.
|
|
7
|
+
* @param {string} workspaceFolders[].uri.fsPath - The file system path of the folder.
|
|
8
|
+
* @returns {string | undefined} The file system path to the `launch.json` file in the first opened workspace folder,
|
|
9
|
+
* or `undefined` if no workspace are available.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getLaunchJsonPath(workspaceFolders: any): string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Formats cwd by appending the provided path to the workspace folder path. If no path is provided, it returns the workspace folder path.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} [path] - An optional path (project name or nested path) to append to the workspace folder path.
|
|
16
|
+
* @returns {string} The formatted cwd string including the workspace folder and the provided path.
|
|
17
|
+
* @example
|
|
18
|
+
* // Returns "${workspaceFolder}/myProject"
|
|
19
|
+
* formatCwd('myProject');
|
|
20
|
+
* @example
|
|
21
|
+
* // Returns "${workspaceFolder}/nested/path"
|
|
22
|
+
* formatCwd('nested/path');
|
|
23
|
+
* @example
|
|
24
|
+
* // Returns "${workspaceFolder}"
|
|
25
|
+
* formatCwd();
|
|
26
|
+
*/
|
|
27
|
+
export declare function formatCwd(path?: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Checks whether a given folder is part of the current workspace in VS Code.
|
|
30
|
+
*
|
|
31
|
+
* @param {string} selectedFolder - The file system path of the folder to check.
|
|
32
|
+
* @param {any} workspace - The VS Code API workspace object, used to access workspace information.
|
|
33
|
+
* @returns {boolean} - Returns `true` if the folder is in the workspace,
|
|
34
|
+
* `false` if not, or `undefined` if no workspace is defined or accessible.
|
|
35
|
+
*/
|
|
36
|
+
export declare function isFolderInWorkspace(selectedFolder: string, workspace: any): boolean | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a launch configuration for applications not included in the current workspace.
|
|
39
|
+
* This function generates the cwd comman, the path to the launch.json file,
|
|
40
|
+
* and optionally provides a URI for updating workspace folders if the environment is not BAS.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} projectPath - The full path of the project for which the launch configuration is being created.
|
|
43
|
+
* @param isAppStudio - A boolean indicating whether the current environment is BAS.
|
|
44
|
+
* @param {any} vscode - An instance of the VSCode API.
|
|
45
|
+
* @returns {WorkspaceHandlerInfo} - An object containing the cwd, launch.json path, and optionally, the URI for updating workspace folders.
|
|
46
|
+
*/
|
|
47
|
+
export declare function handleAppsNotInWorkspace(projectPath: string, isAppStudio: boolean, vscode: any): WorkspaceHandlerInfo;
|
|
48
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/debug-config/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,gBAAgB,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAK3E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,GAAG,OAAO,GAAG,SAAS,CAW/F;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,oBAAoB,CASrH"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleAppsNotInWorkspace = exports.isFolderInWorkspace = exports.formatCwd = exports.getLaunchJsonPath = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves the file system path to the `launch.json` file within the first opened folder.
|
|
7
|
+
*
|
|
8
|
+
* @param {Array} workspaceFolders - An array of workspace folders, provided by VS Code's API.
|
|
9
|
+
* @param {object} workspaceFolders[].uri - The URI object representing the folder.
|
|
10
|
+
* @param {string} workspaceFolders[].uri.fsPath - The file system path of the folder.
|
|
11
|
+
* @returns {string | undefined} The file system path to the `launch.json` file in the first opened workspace folder,
|
|
12
|
+
* or `undefined` if no workspace are available.
|
|
13
|
+
*/
|
|
14
|
+
function getLaunchJsonPath(workspaceFolders) {
|
|
15
|
+
if (workspaceFolders && workspaceFolders.length > 0) {
|
|
16
|
+
return workspaceFolders[0].uri.fsPath;
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
exports.getLaunchJsonPath = getLaunchJsonPath;
|
|
21
|
+
/**
|
|
22
|
+
* Formats cwd by appending the provided path to the workspace folder path. If no path is provided, it returns the workspace folder path.
|
|
23
|
+
*
|
|
24
|
+
* @param {string} [path] - An optional path (project name or nested path) to append to the workspace folder path.
|
|
25
|
+
* @returns {string} The formatted cwd string including the workspace folder and the provided path.
|
|
26
|
+
* @example
|
|
27
|
+
* // Returns "${workspaceFolder}/myProject"
|
|
28
|
+
* formatCwd('myProject');
|
|
29
|
+
* @example
|
|
30
|
+
* // Returns "${workspaceFolder}/nested/path"
|
|
31
|
+
* formatCwd('nested/path');
|
|
32
|
+
* @example
|
|
33
|
+
* // Returns "${workspaceFolder}"
|
|
34
|
+
* formatCwd();
|
|
35
|
+
*/
|
|
36
|
+
function formatCwd(path) {
|
|
37
|
+
const formattedPath = path ? path_1.posix.sep + path : '';
|
|
38
|
+
return `\${workspaceFolder}${formattedPath}`;
|
|
39
|
+
}
|
|
40
|
+
exports.formatCwd = formatCwd;
|
|
41
|
+
/**
|
|
42
|
+
* Checks whether a given folder is part of the current workspace in VS Code.
|
|
43
|
+
*
|
|
44
|
+
* @param {string} selectedFolder - The file system path of the folder to check.
|
|
45
|
+
* @param {any} workspace - The VS Code API workspace object, used to access workspace information.
|
|
46
|
+
* @returns {boolean} - Returns `true` if the folder is in the workspace,
|
|
47
|
+
* `false` if not, or `undefined` if no workspace is defined or accessible.
|
|
48
|
+
*/
|
|
49
|
+
function isFolderInWorkspace(selectedFolder, workspace) {
|
|
50
|
+
const { workspaceFile, workspaceFolders } = workspace;
|
|
51
|
+
if (!workspaceFile && !workspaceFolders) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
if (workspaceFolders) {
|
|
55
|
+
return workspaceFolders.some((folder) => folder.uri.fsPath && selectedFolder.toLowerCase().includes(folder.uri.fsPath.toLowerCase()));
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
exports.isFolderInWorkspace = isFolderInWorkspace;
|
|
60
|
+
/**
|
|
61
|
+
* Creates a launch configuration for applications not included in the current workspace.
|
|
62
|
+
* This function generates the cwd comman, the path to the launch.json file,
|
|
63
|
+
* and optionally provides a URI for updating workspace folders if the environment is not BAS.
|
|
64
|
+
*
|
|
65
|
+
* @param {string} projectPath - The full path of the project for which the launch configuration is being created.
|
|
66
|
+
* @param isAppStudio - A boolean indicating whether the current environment is BAS.
|
|
67
|
+
* @param {any} vscode - An instance of the VSCode API.
|
|
68
|
+
* @returns {WorkspaceHandlerInfo} - An object containing the cwd, launch.json path, and optionally, the URI for updating workspace folders.
|
|
69
|
+
*/
|
|
70
|
+
function handleAppsNotInWorkspace(projectPath, isAppStudio, vscode) {
|
|
71
|
+
const projectName = (0, path_1.basename)(projectPath);
|
|
72
|
+
const launchJsonPath = (0, path_1.join)((0, path_1.dirname)(projectPath), projectName);
|
|
73
|
+
return {
|
|
74
|
+
cwd: formatCwd(),
|
|
75
|
+
launchJsonPath,
|
|
76
|
+
workspaceFolderUri: !isAppStudio ? vscode.Uri?.file(launchJsonPath) : undefined,
|
|
77
|
+
appNotInWorkspace: true
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
exports.handleAppsNotInWorkspace = handleAppsNotInWorkspace;
|
|
81
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/debug-config/helpers.ts"],"names":[],"mappings":";;;AAAA,+BAAsD;AAGtD;;;;;;;;GAQG;AACH,SAAgB,iBAAiB,CAAC,gBAAqB;IACnD,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClD,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;IAC1C,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AALD,8CAKC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,SAAS,CAAC,IAAa;IACnC,MAAM,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,YAAK,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IACnD,OAAO,sBAAsB,aAAa,EAAE,CAAC;AACjD,CAAC;AAHD,8BAGC;AAED;;;;;;;GAOG;AACH,SAAgB,mBAAmB,CAAC,cAAsB,EAAE,SAAc;IACtE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,GAAG,SAAS,CAAC;IACtD,IAAI,CAAC,aAAa,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtC,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,IAAI,gBAAgB,EAAE,CAAC;QACnB,OAAO,gBAAgB,CAAC,IAAI,CACxB,CAAC,MAAW,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,IAAI,cAAc,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAC/G,CAAC;IACN,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAXD,kDAWC;AAED;;;;;;;;;GASG;AACH,SAAgB,wBAAwB,CAAC,WAAmB,EAAE,WAAoB,EAAE,MAAW;IAC3F,MAAM,WAAW,GAAG,IAAA,eAAQ,EAAC,WAAW,CAAC,CAAC;IAC1C,MAAM,cAAc,GAAG,IAAA,WAAI,EAAC,IAAA,cAAO,EAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;IAC/D,OAAO;QACH,GAAG,EAAE,SAAS,EAAE;QAChB,cAAc;QACd,kBAAkB,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS;QAC/E,iBAAiB,EAAE,IAAI;KAC1B,CAAC;AACN,CAAC;AATD,4DASC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { DebugOptions, WorkspaceHandlerInfo } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Handles the case where an unsaved workspace is open and the user creates an app in a folder outside of the workspace.
|
|
4
|
+
* This function updates the paths to reflect where the (possibly nested) target folder is located inside the workspace.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} projectPath - The project's folder path including project name.
|
|
7
|
+
* @param {any} vscode - The VS Code API object.
|
|
8
|
+
* @returns {WorkspaceHandlerInfo} An object containing the path to the `launch.json` configuration file and the cwd for the launch configuration.
|
|
9
|
+
*/
|
|
10
|
+
export declare function handleUnsavedWorkspace(projectPath: string, vscode: any): WorkspaceHandlerInfo;
|
|
11
|
+
/**
|
|
12
|
+
* Handles the case where a previously saved workspace is open, and the user creates an app within or outside the workspace.
|
|
13
|
+
* The function determines whether the project is inside the workspace and updates the launch configurations accordingly.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} projectPath - The project's path including project name.
|
|
16
|
+
* @param {string} projectName - The name of the project.
|
|
17
|
+
* @param {string} targetFolder - The directory in which the project's files are located.
|
|
18
|
+
* @param isAppStudio - A boolean indicating whether the current environment is BAS.
|
|
19
|
+
* @param {any} vscode - The VS Code API object.
|
|
20
|
+
* @returns {WorkspaceHandlerInfo} An object containing the path to the `launch.json` configuration file and the cwd for the launch configuration.
|
|
21
|
+
*/
|
|
22
|
+
export declare function handleSavedWorkspace(projectPath: string, projectName: string, targetFolder: string, isAppStudio: boolean, vscode: any): WorkspaceHandlerInfo;
|
|
23
|
+
/**
|
|
24
|
+
* Handles the case where a folder is open in VS Code, but no workspace file is associated with it.
|
|
25
|
+
*
|
|
26
|
+
* @param {string} projectPath - The project's path including project name.
|
|
27
|
+
* @param {string} targetFolder - The directory in which the project's files are located.
|
|
28
|
+
* @param isAppStudio - A boolean indicating whether the current environment is BAS.
|
|
29
|
+
* @param {any} vscode - The VS Code API object.
|
|
30
|
+
* @returns {WorkspaceHandlerInfo} An object containing the path to the `launch.json` configuration file and the cwd for the launch configuration.
|
|
31
|
+
*/
|
|
32
|
+
export declare function handleOpenFolderButNoWorkspaceFile(projectPath: string, targetFolder: string, isAppStudio: boolean, vscode: any): WorkspaceHandlerInfo;
|
|
33
|
+
/**
|
|
34
|
+
* Manages the configuration of the debug workspace based on the provided options.
|
|
35
|
+
* This function handles different scenarios depending on whether a workspace is open,
|
|
36
|
+
* whether the project is inside or outside of a workspace, and other factors.
|
|
37
|
+
*
|
|
38
|
+
* @param {DebugOptions} options - The options used to determine how to manage the workspace configuration.
|
|
39
|
+
* @param {string} options.projectPath -The project's path including project name.
|
|
40
|
+
* @param {boolean} [options.isAppStudio] - A boolean indicating whether the current environment is BAS.
|
|
41
|
+
* @param {boolean} [options.writeToAppOnly] - If true, write the launch configuration directly to the app folder, ignoring workspace settings.
|
|
42
|
+
* @param {any} options.vscode - The VS Code API object.
|
|
43
|
+
* @returns {WorkspaceHandlerInfo} An object containing the path to the `launch.json` configuration file, the cwd command, workspaceFolderUri if provided will enable reload.
|
|
44
|
+
*/
|
|
45
|
+
export declare function handleWorkspaceConfig(options: DebugOptions): WorkspaceHandlerInfo;
|
|
46
|
+
//# sourceMappingURL=workspaceManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaceManager.d.ts","sourceRoot":"","sources":["../../src/debug-config/workspaceManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGnE;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,oBAAoB,CAQ7F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAChC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,GAAG,GACZ,oBAAoB,CAUtB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kCAAkC,CAC9C,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,GAAG,GACZ,oBAAoB,CAatB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,YAAY,GAAG,oBAAoB,CA0BjF"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleWorkspaceConfig = exports.handleOpenFolderButNoWorkspaceFile = exports.handleSavedWorkspace = exports.handleUnsavedWorkspace = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
const helpers_1 = require("./helpers");
|
|
6
|
+
/**
|
|
7
|
+
* Handles the case where an unsaved workspace is open and the user creates an app in a folder outside of the workspace.
|
|
8
|
+
* This function updates the paths to reflect where the (possibly nested) target folder is located inside the workspace.
|
|
9
|
+
*
|
|
10
|
+
* @param {string} projectPath - The project's folder path including project name.
|
|
11
|
+
* @param {any} vscode - The VS Code API object.
|
|
12
|
+
* @returns {WorkspaceHandlerInfo} An object containing the path to the `launch.json` configuration file and the cwd for the launch configuration.
|
|
13
|
+
*/
|
|
14
|
+
function handleUnsavedWorkspace(projectPath, vscode) {
|
|
15
|
+
const workspace = vscode.workspace;
|
|
16
|
+
const wsFolder = workspace.getWorkspaceFolder(vscode.Uri.file(projectPath))?.uri?.fsPath;
|
|
17
|
+
const nestedFolder = (0, path_1.relative)(wsFolder ?? projectPath, projectPath);
|
|
18
|
+
return {
|
|
19
|
+
launchJsonPath: (0, path_1.join)(wsFolder ?? projectPath),
|
|
20
|
+
cwd: (0, helpers_1.formatCwd)(nestedFolder)
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
exports.handleUnsavedWorkspace = handleUnsavedWorkspace;
|
|
24
|
+
/**
|
|
25
|
+
* Handles the case where a previously saved workspace is open, and the user creates an app within or outside the workspace.
|
|
26
|
+
* The function determines whether the project is inside the workspace and updates the launch configurations accordingly.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} projectPath - The project's path including project name.
|
|
29
|
+
* @param {string} projectName - The name of the project.
|
|
30
|
+
* @param {string} targetFolder - The directory in which the project's files are located.
|
|
31
|
+
* @param isAppStudio - A boolean indicating whether the current environment is BAS.
|
|
32
|
+
* @param {any} vscode - The VS Code API object.
|
|
33
|
+
* @returns {WorkspaceHandlerInfo} An object containing the path to the `launch.json` configuration file and the cwd for the launch configuration.
|
|
34
|
+
*/
|
|
35
|
+
function handleSavedWorkspace(projectPath, projectName, targetFolder, isAppStudio, vscode) {
|
|
36
|
+
const workspace = vscode.workspace;
|
|
37
|
+
if (!(0, helpers_1.isFolderInWorkspace)(projectPath, workspace)) {
|
|
38
|
+
return (0, helpers_1.handleAppsNotInWorkspace)(projectPath, isAppStudio, vscode);
|
|
39
|
+
}
|
|
40
|
+
const launchJsonPath = (0, helpers_1.getLaunchJsonPath)(workspace.workspaceFolders) ?? targetFolder;
|
|
41
|
+
return {
|
|
42
|
+
launchJsonPath,
|
|
43
|
+
cwd: (0, helpers_1.formatCwd)(projectName)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
exports.handleSavedWorkspace = handleSavedWorkspace;
|
|
47
|
+
/**
|
|
48
|
+
* Handles the case where a folder is open in VS Code, but no workspace file is associated with it.
|
|
49
|
+
*
|
|
50
|
+
* @param {string} projectPath - The project's path including project name.
|
|
51
|
+
* @param {string} targetFolder - The directory in which the project's files are located.
|
|
52
|
+
* @param isAppStudio - A boolean indicating whether the current environment is BAS.
|
|
53
|
+
* @param {any} vscode - The VS Code API object.
|
|
54
|
+
* @returns {WorkspaceHandlerInfo} An object containing the path to the `launch.json` configuration file and the cwd for the launch configuration.
|
|
55
|
+
*/
|
|
56
|
+
function handleOpenFolderButNoWorkspaceFile(projectPath, targetFolder, isAppStudio, vscode) {
|
|
57
|
+
const workspace = vscode.workspace;
|
|
58
|
+
if (!(0, helpers_1.isFolderInWorkspace)(projectPath, workspace)) {
|
|
59
|
+
return (0, helpers_1.handleAppsNotInWorkspace)(projectPath, isAppStudio, vscode);
|
|
60
|
+
}
|
|
61
|
+
// The user has chosen to generate the app in a folder or a nested folder.
|
|
62
|
+
const wsFolder = workspace.getWorkspaceFolder(vscode.Uri.file(projectPath))?.uri?.fsPath;
|
|
63
|
+
const nestedFolder = (0, path_1.relative)(wsFolder ?? projectPath, projectPath);
|
|
64
|
+
const launchJsonPath = (0, helpers_1.getLaunchJsonPath)(workspace.workspaceFolders) ?? targetFolder;
|
|
65
|
+
return {
|
|
66
|
+
launchJsonPath,
|
|
67
|
+
cwd: (0, helpers_1.formatCwd)(nestedFolder)
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
exports.handleOpenFolderButNoWorkspaceFile = handleOpenFolderButNoWorkspaceFile;
|
|
71
|
+
/**
|
|
72
|
+
* Manages the configuration of the debug workspace based on the provided options.
|
|
73
|
+
* This function handles different scenarios depending on whether a workspace is open,
|
|
74
|
+
* whether the project is inside or outside of a workspace, and other factors.
|
|
75
|
+
*
|
|
76
|
+
* @param {DebugOptions} options - The options used to determine how to manage the workspace configuration.
|
|
77
|
+
* @param {string} options.projectPath -The project's path including project name.
|
|
78
|
+
* @param {boolean} [options.isAppStudio] - A boolean indicating whether the current environment is BAS.
|
|
79
|
+
* @param {boolean} [options.writeToAppOnly] - If true, write the launch configuration directly to the app folder, ignoring workspace settings.
|
|
80
|
+
* @param {any} options.vscode - The VS Code API object.
|
|
81
|
+
* @returns {WorkspaceHandlerInfo} An object containing the path to the `launch.json` configuration file, the cwd command, workspaceFolderUri if provided will enable reload.
|
|
82
|
+
*/
|
|
83
|
+
function handleWorkspaceConfig(options) {
|
|
84
|
+
const { projectPath, isAppStudio = false, writeToAppOnly = false, vscode } = options;
|
|
85
|
+
const projectName = (0, path_1.basename)(projectPath);
|
|
86
|
+
const targetFolder = (0, path_1.dirname)(projectPath);
|
|
87
|
+
// Directly handle the case where we ignore workspace settings
|
|
88
|
+
if (writeToAppOnly) {
|
|
89
|
+
return (0, helpers_1.handleAppsNotInWorkspace)(projectPath, isAppStudio, vscode);
|
|
90
|
+
}
|
|
91
|
+
const workspace = vscode.workspace;
|
|
92
|
+
const workspaceFile = workspace?.workspaceFile;
|
|
93
|
+
// Handles the scenario where no workspace or folder is open in VS Code.
|
|
94
|
+
if (!workspace) {
|
|
95
|
+
return (0, helpers_1.handleAppsNotInWorkspace)(projectPath, isAppStudio, vscode);
|
|
96
|
+
}
|
|
97
|
+
// Handle case where a folder is open, but not a workspace file
|
|
98
|
+
if (!workspaceFile) {
|
|
99
|
+
return handleOpenFolderButNoWorkspaceFile(projectPath, targetFolder, isAppStudio, vscode);
|
|
100
|
+
}
|
|
101
|
+
// Handles the case where a previously saved workspace is open
|
|
102
|
+
if (workspaceFile.scheme === 'file') {
|
|
103
|
+
return handleSavedWorkspace(projectPath, projectName, targetFolder, isAppStudio, vscode);
|
|
104
|
+
}
|
|
105
|
+
// Handles the case where an unsaved workspace is open
|
|
106
|
+
return handleUnsavedWorkspace(projectPath, vscode);
|
|
107
|
+
}
|
|
108
|
+
exports.handleWorkspaceConfig = handleWorkspaceConfig;
|
|
109
|
+
//# sourceMappingURL=workspaceManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaceManager.js","sourceRoot":"","sources":["../../src/debug-config/workspaceManager.ts"],"names":[],"mappings":";;;AAAA,+BAAyD;AAEzD,uCAAwG;AAExG;;;;;;;GAOG;AACH,SAAgB,sBAAsB,CAAC,WAAmB,EAAE,MAAW;IACnE,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACnC,MAAM,QAAQ,GAAG,SAAS,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC;IACzF,MAAM,YAAY,GAAG,IAAA,eAAQ,EAAC,QAAQ,IAAI,WAAW,EAAE,WAAW,CAAC,CAAC;IACpE,OAAO;QACH,cAAc,EAAE,IAAA,WAAI,EAAC,QAAQ,IAAI,WAAW,CAAC;QAC7C,GAAG,EAAE,IAAA,mBAAS,EAAC,YAAY,CAAC;KAC/B,CAAC;AACN,CAAC;AARD,wDAQC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,oBAAoB,CAChC,WAAmB,EACnB,WAAmB,EACnB,YAAoB,EACpB,WAAoB,EACpB,MAAW;IAEX,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AW,GAAG,KAAK,EAAE,cAAc,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAErF,MAAM,WAAW,GAAG,IAAA,eAAQ,EAAC,WAAW,CAAC,CAAC;IAC1C,MAAM,YAAY,GAAG,IAAA,cAAO,EAAC,WAAW,CAAC,CAAC;IAE1C,8DAA8D;IAC9D,IAAI,cAAc,EAAE,CAAC;QACjB,OAAO,IAAA,kCAAwB,EAAC,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IACtE,CAAC;IACD,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACnC,MAAM,aAAa,GAAG,SAAS,EAAE,aAAa,CAAC;IAC/C,wEAAwE;IACxE,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,IAAA,kCAAwB,EAAC,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IACtE,CAAC;IACD,+DAA+D;IAC/D,IAAI,CAAC,aAAa,EAAE,CAAC;QACjB,OAAO,kCAAkC,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAC9F,CAAC;IACD,8DAA8D;IAC9D,IAAI,aAAa,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;QAClC,OAAO,oBAAoB,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAC7F,CAAC;IACD,sDAAsD;IACtD,OAAO,sBAAsB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AACvD,CAAC;AA1BD,sDA0BC"}
|
package/dist/i18n.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TOptions } from 'i18next';
|
|
2
|
+
/**
|
|
3
|
+
* Initialize i18next with the translations for this module.
|
|
4
|
+
*/
|
|
5
|
+
export declare function initI18n(): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* Helper function facading the call to i18next.
|
|
8
|
+
*
|
|
9
|
+
* @param key i18n key
|
|
10
|
+
* @param options additional options
|
|
11
|
+
* @returns {string} localized string stored for the given key
|
|
12
|
+
*/
|
|
13
|
+
export declare function t(key: string, options?: TOptions): string;
|
|
14
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAMxC;;GAEG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAY9C;AAED;;;;;;GAMG;AACH,wBAAgB,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,CAEzD"}
|
package/dist/i18n.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.t = exports.initI18n = void 0;
|
|
7
|
+
const i18next_1 = __importDefault(require("i18next"));
|
|
8
|
+
const launch_config_i18n_json_1 = __importDefault(require("./translations/launch-config.i18n.json"));
|
|
9
|
+
const NS = 'launch-config';
|
|
10
|
+
/**
|
|
11
|
+
* Initialize i18next with the translations for this module.
|
|
12
|
+
*/
|
|
13
|
+
async function initI18n() {
|
|
14
|
+
await i18next_1.default.init({
|
|
15
|
+
resources: {
|
|
16
|
+
en: {
|
|
17
|
+
[NS]: launch_config_i18n_json_1.default
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
lng: 'en',
|
|
21
|
+
fallbackLng: 'en',
|
|
22
|
+
defaultNS: NS,
|
|
23
|
+
ns: [NS]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
exports.initI18n = initI18n;
|
|
27
|
+
/**
|
|
28
|
+
* Helper function facading the call to i18next.
|
|
29
|
+
*
|
|
30
|
+
* @param key i18n key
|
|
31
|
+
* @param options additional options
|
|
32
|
+
* @returns {string} localized string stored for the given key
|
|
33
|
+
*/
|
|
34
|
+
function t(key, options) {
|
|
35
|
+
return i18next_1.default.t(key, options);
|
|
36
|
+
}
|
|
37
|
+
exports.t = t;
|
|
38
|
+
initI18n().catch(() => {
|
|
39
|
+
// Ignore any errors since the write will still work
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=i18n.js.map
|
package/dist/i18n.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":";;;;;;AACA,sDAA8B;AAC9B,qGAAkE;AAElE,MAAM,EAAE,GAAG,eAAe,CAAC;AAE3B;;GAEG;AACI,KAAK,UAAU,QAAQ;IAC1B,MAAM,iBAAO,CAAC,IAAI,CAAC;QACf,SAAS,EAAE;YACP,EAAE,EAAE;gBACA,CAAC,EAAE,CAAC,EAAE,iCAAY;aACrB;SACJ;QACD,GAAG,EAAE,IAAI;QACT,WAAW,EAAE,IAAI;QACjB,SAAS,EAAE,EAAE;QACb,EAAE,EAAE,CAAC,EAAE,CAAC;KACX,CAAC,CAAC;AACP,CAAC;AAZD,4BAYC;AAED;;;;;;GAMG;AACH,SAAgB,CAAC,CAAC,GAAW,EAAE,OAAkB;IAC7C,OAAO,iBAAO,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACnC,CAAC;AAFD,cAEC;AAED,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE;IAClB,oDAAoD;AACxD,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './types';
|
|
2
|
-
export { createLaunchConfig } from './launch-config-crud/create';
|
|
2
|
+
export { createLaunchConfig, configureLaunchConfig } from './launch-config-crud/create';
|
|
3
3
|
export { deleteLaunchConfig } from './launch-config-crud/delete';
|
|
4
4
|
export { convertOldLaunchConfigToFioriRun } from './launch-config-crud/modify';
|
|
5
5
|
export { getLaunchConfigs, getLaunchConfigByName } from './launch-config-crud/read';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC/G,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,uCAAuC,EAAE,MAAM,6BAA6B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,10 +14,11 @@ 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.getDefaultLaunchConfigOptionsForProject = exports.updateLaunchJSON = exports.generateNewFioriLaunchConfig = exports.getFioriOptions = exports.getIndexOfArgument = exports.updateLaunchConfig = exports.getLaunchConfigByName = exports.getLaunchConfigs = exports.convertOldLaunchConfigToFioriRun = exports.deleteLaunchConfig = exports.createLaunchConfig = void 0;
|
|
17
|
+
exports.getDefaultLaunchConfigOptionsForProject = exports.updateLaunchJSON = exports.generateNewFioriLaunchConfig = exports.getFioriOptions = exports.getIndexOfArgument = exports.updateLaunchConfig = exports.getLaunchConfigByName = exports.getLaunchConfigs = exports.convertOldLaunchConfigToFioriRun = exports.deleteLaunchConfig = exports.configureLaunchConfig = exports.createLaunchConfig = void 0;
|
|
18
18
|
__exportStar(require("./types"), exports);
|
|
19
19
|
var create_1 = require("./launch-config-crud/create");
|
|
20
20
|
Object.defineProperty(exports, "createLaunchConfig", { enumerable: true, get: function () { return create_1.createLaunchConfig; } });
|
|
21
|
+
Object.defineProperty(exports, "configureLaunchConfig", { enumerable: true, get: function () { return create_1.configureLaunchConfig; } });
|
|
21
22
|
var delete_1 = require("./launch-config-crud/delete");
|
|
22
23
|
Object.defineProperty(exports, "deleteLaunchConfig", { enumerable: true, get: function () { return delete_1.deleteLaunchConfig; } });
|
|
23
24
|
var modify_1 = require("./launch-config-crud/modify");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,sDAAwF;AAA/E,4GAAA,kBAAkB,OAAA;AAAE,+GAAA,qBAAqB,OAAA;AAClD,sDAAiE;AAAxD,4GAAA,kBAAkB,OAAA;AAC3B,sDAA+E;AAAtE,0HAAA,gCAAgC,OAAA;AACzC,kDAAoF;AAA3E,wGAAA,gBAAgB,OAAA;AAAE,6GAAA,qBAAqB,OAAA;AAChD,sDAAiE;AAAxD,4GAAA,kBAAkB,OAAA;AAC3B,oDAA+G;AAAtG,2GAAA,kBAAkB,OAAA;AAAE,wGAAA,eAAe,OAAA;AAAE,qHAAA,4BAA4B,OAAA;AAC1E,sDAA+D;AAAtD,0GAAA,gBAAgB,OAAA;AACzB,uDAAsF;AAA7E,kIAAA,uCAAuC,OAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { FioriOptions } from '../types';
|
|
1
|
+
import type { FioriOptions, LaunchJSON, UpdateWorkspaceFolderOptions, DebugOptions } from '../types';
|
|
2
2
|
import type { Editor } from 'mem-fs-editor';
|
|
3
|
+
import type { Logger } from '@sap-ux/logger';
|
|
3
4
|
/**
|
|
4
5
|
* Enhance or create the launch.json file with new launch config.
|
|
5
6
|
*
|
|
@@ -9,4 +10,37 @@ import type { Editor } from 'mem-fs-editor';
|
|
|
9
10
|
* @returns memfs editor instance.
|
|
10
11
|
*/
|
|
11
12
|
export declare function createLaunchConfig(rootFolder: string, fioriOptions: FioriOptions, fs?: Editor): Promise<Editor>;
|
|
13
|
+
/**
|
|
14
|
+
* Writes the application info settings to the appInfo.json file.
|
|
15
|
+
* Adds the specified path to the latestGeneratedFiles array.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} path - The project file path to add.
|
|
18
|
+
* @param log - The logger instance.
|
|
19
|
+
*/
|
|
20
|
+
export declare function writeApplicationInfoSettings(path: string, log?: Logger): void;
|
|
21
|
+
/**
|
|
22
|
+
* Updates the workspace folders in VSCode if the update options are provided.
|
|
23
|
+
*
|
|
24
|
+
* @param {UpdateWorkspaceFolderOptions} updateWorkspaceFolders - The options for updating workspace folders.
|
|
25
|
+
* @param {string} rootFolderPath - The root folder path of the project.
|
|
26
|
+
* @param log - The logger instance.
|
|
27
|
+
*/
|
|
28
|
+
export declare function updateWorkspaceFoldersIfNeeded(updateWorkspaceFolders: UpdateWorkspaceFolderOptions | undefined, rootFolderPath: string, log?: Logger): void;
|
|
29
|
+
/**
|
|
30
|
+
* Creates or updates the launch.json file with the provided configurations.
|
|
31
|
+
*
|
|
32
|
+
* @param {string} rootFolderPath - The root folder path of the project.
|
|
33
|
+
* @param {LaunchJSON} launchJsonFile - The launch.json configuration to write.
|
|
34
|
+
* @param {UpdateWorkspaceFolderOptions} [updateWorkspaceFolders] - Optional workspace folder update options.
|
|
35
|
+
* @param {boolean} appNotInWorkspace - Indicates if the app is not in the workspace.
|
|
36
|
+
* @param log - The logger instance.
|
|
37
|
+
*/
|
|
38
|
+
export declare function createOrUpdateLaunchConfigJSON(rootFolderPath: string, launchJsonFile?: LaunchJSON, updateWorkspaceFolders?: UpdateWorkspaceFolderOptions, appNotInWorkspace?: boolean, log?: Logger): void;
|
|
39
|
+
/**
|
|
40
|
+
* Generates and creates launch configuration for the project based on debug options.
|
|
41
|
+
*
|
|
42
|
+
* @param {DebugOptions} options - The options for configuring the debug setup.
|
|
43
|
+
* @param log - The logger instance.
|
|
44
|
+
*/
|
|
45
|
+
export declare function configureLaunchConfig(options: DebugOptions, log?: Logger): void;
|
|
12
46
|
//# sourceMappingURL=create.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/launch-config-crud/create.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/launch-config-crud/create.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,4BAA4B,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACrG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAO5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAK7C;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BrH;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAW7E;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC1C,sBAAsB,EAAE,4BAA4B,GAAG,SAAS,EAChE,cAAc,EAAE,MAAM,EACtB,GAAG,CAAC,EAAE,MAAM,GACb,IAAI,CAaN;AAED;;;;;;;;GAQG;AACH,wBAAgB,8BAA8B,CAC1C,cAAc,EAAE,MAAM,EACtB,cAAc,CAAC,EAAE,UAAU,EAC3B,sBAAsB,CAAC,EAAE,4BAA4B,EACrD,iBAAiB,GAAE,OAAe,EAClC,GAAG,CAAC,EAAE,MAAM,GACb,IAAI,CAsBN;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CA+B/E"}
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createLaunchConfig = void 0;
|
|
6
|
+
exports.configureLaunchConfig = exports.createOrUpdateLaunchConfigJSON = exports.updateWorkspaceFoldersIfNeeded = exports.writeApplicationInfoSettings = exports.createLaunchConfig = void 0;
|
|
4
7
|
const mem_fs_1 = require("mem-fs");
|
|
5
8
|
const mem_fs_editor_1 = require("mem-fs-editor");
|
|
6
9
|
const path_1 = require("path");
|
|
7
10
|
const project_access_1 = require("@sap-ux/project-access");
|
|
8
11
|
const types_1 = require("../types");
|
|
9
12
|
const utils_1 = require("./utils");
|
|
10
|
-
const jsonc_parser_1 = require("jsonc-parser");
|
|
11
13
|
const writer_1 = require("./writer");
|
|
14
|
+
const jsonc_parser_1 = require("jsonc-parser");
|
|
15
|
+
const workspaceManager_1 = require("../debug-config/workspaceManager");
|
|
16
|
+
const config_1 = require("../debug-config/config");
|
|
17
|
+
const store_1 = require("@sap-ux/store");
|
|
18
|
+
const odata_service_inquirer_1 = require("@sap-ux/odata-service-inquirer");
|
|
19
|
+
const i18n_1 = require("../i18n");
|
|
20
|
+
const fs_1 = __importDefault(require("fs"));
|
|
12
21
|
/**
|
|
13
22
|
* Enhance or create the launch.json file with new launch config.
|
|
14
23
|
*
|
|
@@ -40,4 +49,111 @@ async function createLaunchConfig(rootFolder, fioriOptions, fs) {
|
|
|
40
49
|
return fs;
|
|
41
50
|
}
|
|
42
51
|
exports.createLaunchConfig = createLaunchConfig;
|
|
52
|
+
/**
|
|
53
|
+
* Writes the application info settings to the appInfo.json file.
|
|
54
|
+
* Adds the specified path to the latestGeneratedFiles array.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} path - The project file path to add.
|
|
57
|
+
* @param log - The logger instance.
|
|
58
|
+
*/
|
|
59
|
+
function writeApplicationInfoSettings(path, log) {
|
|
60
|
+
const appInfoFilePath = (0, store_1.getFioriToolsDirectory)();
|
|
61
|
+
const appInfoContents = fs_1.default.existsSync(appInfoFilePath)
|
|
62
|
+
? JSON.parse(fs_1.default.readFileSync(appInfoFilePath, 'utf-8'))
|
|
63
|
+
: { latestGeneratedFiles: [] };
|
|
64
|
+
appInfoContents.latestGeneratedFiles.push(path);
|
|
65
|
+
try {
|
|
66
|
+
fs_1.default.writeFileSync(appInfoFilePath, JSON.stringify(appInfoContents, null, 2));
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
log?.error((0, i18n_1.t)('errorAppInfoFile', { error: error }));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.writeApplicationInfoSettings = writeApplicationInfoSettings;
|
|
73
|
+
/**
|
|
74
|
+
* Updates the workspace folders in VSCode if the update options are provided.
|
|
75
|
+
*
|
|
76
|
+
* @param {UpdateWorkspaceFolderOptions} updateWorkspaceFolders - The options for updating workspace folders.
|
|
77
|
+
* @param {string} rootFolderPath - The root folder path of the project.
|
|
78
|
+
* @param log - The logger instance.
|
|
79
|
+
*/
|
|
80
|
+
function updateWorkspaceFoldersIfNeeded(updateWorkspaceFolders, rootFolderPath, log) {
|
|
81
|
+
if (updateWorkspaceFolders) {
|
|
82
|
+
const { uri, vscode, projectName } = updateWorkspaceFolders;
|
|
83
|
+
writeApplicationInfoSettings(rootFolderPath, log);
|
|
84
|
+
if (uri && vscode) {
|
|
85
|
+
const currentWorkspaceFolders = vscode.workspace.workspaceFolders || [];
|
|
86
|
+
vscode.workspace.updateWorkspaceFolders(currentWorkspaceFolders.length, undefined, {
|
|
87
|
+
name: projectName,
|
|
88
|
+
uri
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.updateWorkspaceFoldersIfNeeded = updateWorkspaceFoldersIfNeeded;
|
|
94
|
+
/**
|
|
95
|
+
* Creates or updates the launch.json file with the provided configurations.
|
|
96
|
+
*
|
|
97
|
+
* @param {string} rootFolderPath - The root folder path of the project.
|
|
98
|
+
* @param {LaunchJSON} launchJsonFile - The launch.json configuration to write.
|
|
99
|
+
* @param {UpdateWorkspaceFolderOptions} [updateWorkspaceFolders] - Optional workspace folder update options.
|
|
100
|
+
* @param {boolean} appNotInWorkspace - Indicates if the app is not in the workspace.
|
|
101
|
+
* @param log - The logger instance.
|
|
102
|
+
*/
|
|
103
|
+
function createOrUpdateLaunchConfigJSON(rootFolderPath, launchJsonFile, updateWorkspaceFolders, appNotInWorkspace = false, log) {
|
|
104
|
+
try {
|
|
105
|
+
const launchJSONPath = (0, path_1.join)(rootFolderPath, project_access_1.DirName.VSCode, types_1.LAUNCH_JSON_FILE);
|
|
106
|
+
if (fs_1.default.existsSync(launchJSONPath) && !appNotInWorkspace) {
|
|
107
|
+
const existingLaunchConfig = (0, jsonc_parser_1.parse)(fs_1.default.readFileSync(launchJSONPath, 'utf-8'));
|
|
108
|
+
const updatedConfigurations = existingLaunchConfig.configurations.concat(launchJsonFile?.configurations ?? []);
|
|
109
|
+
fs_1.default.writeFileSync(launchJSONPath, JSON.stringify({ ...existingLaunchConfig, configurations: updatedConfigurations }, null, 4));
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
const dotVscodePath = (0, path_1.join)(rootFolderPath, project_access_1.DirName.VSCode);
|
|
113
|
+
fs_1.default.mkdirSync(dotVscodePath, { recursive: true });
|
|
114
|
+
const path = (0, path_1.join)(dotVscodePath, 'launch.json');
|
|
115
|
+
fs_1.default.writeFileSync(path, JSON.stringify(launchJsonFile ?? {}, null, 4), 'utf8');
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
log?.error((0, i18n_1.t)('errorLaunchFile', { error: error }));
|
|
120
|
+
}
|
|
121
|
+
updateWorkspaceFoldersIfNeeded(updateWorkspaceFolders, rootFolderPath, log);
|
|
122
|
+
}
|
|
123
|
+
exports.createOrUpdateLaunchConfigJSON = createOrUpdateLaunchConfigJSON;
|
|
124
|
+
/**
|
|
125
|
+
* Generates and creates launch configuration for the project based on debug options.
|
|
126
|
+
*
|
|
127
|
+
* @param {DebugOptions} options - The options for configuring the debug setup.
|
|
128
|
+
* @param log - The logger instance.
|
|
129
|
+
*/
|
|
130
|
+
function configureLaunchConfig(options, log) {
|
|
131
|
+
const { datasourceType, projectPath, vscode } = options;
|
|
132
|
+
if (datasourceType === odata_service_inquirer_1.DatasourceType.capProject) {
|
|
133
|
+
log?.info((0, i18n_1.t)('startApp', { npmStart: '`npm start`', cdsRun: '`cds run --in-memory`' }));
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
if (!vscode) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const { launchJsonPath, workspaceFolderUri, cwd, appNotInWorkspace } = (0, workspaceManager_1.handleWorkspaceConfig)(options);
|
|
140
|
+
// construct launch.json file
|
|
141
|
+
const launchJsonFile = (0, config_1.configureLaunchJsonFile)(cwd, options);
|
|
142
|
+
// update workspace folders if workspaceFolderUri is available
|
|
143
|
+
const updateWorkspaceFolders = workspaceFolderUri
|
|
144
|
+
? {
|
|
145
|
+
uri: workspaceFolderUri,
|
|
146
|
+
projectName: (0, path_1.basename)(options.projectPath),
|
|
147
|
+
vscode
|
|
148
|
+
}
|
|
149
|
+
: undefined;
|
|
150
|
+
createOrUpdateLaunchConfigJSON(launchJsonPath, launchJsonFile, updateWorkspaceFolders, appNotInWorkspace, log);
|
|
151
|
+
const npmCommand = datasourceType === odata_service_inquirer_1.DatasourceType.metadataFile ? 'run start-mock' : 'start';
|
|
152
|
+
const projectName = (0, path_1.basename)(projectPath);
|
|
153
|
+
log?.info((0, i18n_1.t)('startServerMessage', {
|
|
154
|
+
folder: projectName,
|
|
155
|
+
npmCommand
|
|
156
|
+
}));
|
|
157
|
+
}
|
|
158
|
+
exports.configureLaunchConfig = configureLaunchConfig;
|
|
43
159
|
//# sourceMappingURL=create.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/launch-config-crud/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/launch-config-crud/create.ts"],"names":[],"mappings":";;;;;;AAAA,mCAAiD;AACjD,iDAAuC;AACvC,+BAAsC;AACtC,2DAAiD;AACjD,oCAA4C;AAG5C,mCAAuD;AACvD,qCAA4C;AAC5C,+CAAqC;AACrC,uEAAyE;AACzE,mDAAiE;AACjE,yCAAuD;AAEvD,2EAAgE;AAChE,kCAA4B;AAC5B,4CAAoB;AAEpB;;;;;;;GAOG;AACI,KAAK,UAAU,kBAAkB,CAAC,UAAkB,EAAE,YAA0B,EAAE,EAAW;IAChG,IAAI,CAAC,EAAE,EAAE,CAAC;QACN,EAAE,GAAG,IAAA,sBAAM,EAAC,IAAA,eAAa,GAA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} from '../types';
|
|
2
|
+
import type { FioriOptions, LaunchConfig, LaunchConfigEnv } from '../types';
|
|
3
3
|
import { default as yargsParser } from 'yargs-parser';
|
|
4
4
|
/**
|
|
5
5
|
* Returns index number from argument in array of arguments.
|
|
@@ -17,6 +17,17 @@ export declare function getIndexOfArgument(args: Array<string>, arg: string): nu
|
|
|
17
17
|
* @returns merged launch config arguments.
|
|
18
18
|
*/
|
|
19
19
|
export declare function mergeArgs(newArgs: string[] | undefined, oldArgs: string[] | undefined): string[];
|
|
20
|
+
/**
|
|
21
|
+
* Returns the launch config object.
|
|
22
|
+
*
|
|
23
|
+
* @param name - name of the launch config.
|
|
24
|
+
* @param cwd - working directory of the application to run with launch config.
|
|
25
|
+
* @param runtimeArgs - arguments passed to the runtime executable.
|
|
26
|
+
* @param args - JSON array of command-line arguments to pass to the application.
|
|
27
|
+
* @param env - environment variables for the application.
|
|
28
|
+
* @returns launch config object.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getLaunchConfig(name: string, cwd: string, runtimeArgs: string[], args: string[] | undefined, env: LaunchConfigEnv): LaunchConfig;
|
|
20
31
|
/**
|
|
21
32
|
* Returns Fiori Options from Launch Configuration object.
|
|
22
33
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/launch-config-crud/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/launch-config-crud/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAgCtD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAI3E;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAYhG;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC3B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,EAAE,EACrB,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,EAC1B,GAAG,EAAE,eAAe,GACrB,YAAY,CAiBd;AAuBD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC3B,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,MAAM,EAC1B,YAAY,EAAE,YAAY,GAC3B,YAAY,CAsDd;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY,CAyBpG;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC,SAAS,CAcpE"}
|
|
@@ -3,7 +3,7 @@ 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.parseArguments = exports.generateNewFioriLaunchConfig = exports.getFioriOptions = exports.mergeArgs = exports.getIndexOfArgument = void 0;
|
|
6
|
+
exports.parseArguments = exports.generateNewFioriLaunchConfig = exports.getFioriOptions = exports.getLaunchConfig = exports.mergeArgs = exports.getIndexOfArgument = void 0;
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const project_access_1 = require("@sap-ux/project-access");
|
|
9
9
|
const types_1 = require("../types");
|
|
@@ -79,21 +79,22 @@ exports.mergeArgs = mergeArgs;
|
|
|
79
79
|
function getLaunchConfig(name, cwd, runtimeArgs, args, env) {
|
|
80
80
|
return {
|
|
81
81
|
name,
|
|
82
|
-
cwd,
|
|
83
|
-
runtimeArgs,
|
|
84
82
|
type: 'node',
|
|
85
83
|
request: 'launch',
|
|
84
|
+
cwd,
|
|
86
85
|
runtimeExecutable: 'npx',
|
|
87
|
-
args, // default arguments
|
|
88
86
|
windows: {
|
|
89
87
|
runtimeExecutable: `npx.cmd`
|
|
90
88
|
},
|
|
89
|
+
runtimeArgs,
|
|
90
|
+
args, // default arguments
|
|
91
91
|
console: 'internalConsole',
|
|
92
92
|
internalConsoleOptions: 'openOnSessionStart',
|
|
93
93
|
outputCapture: 'std',
|
|
94
94
|
env
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
+
exports.getLaunchConfig = getLaunchConfig;
|
|
97
98
|
/**
|
|
98
99
|
* Returns project root from Launch Configuration.
|
|
99
100
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/launch-config-crud/utils.ts"],"names":[],"mappings":";;;;;;AAAA,+BAAsC;AAEtC,2DAAkD;AAElD,oCAA2E;AAC3E,gEAAsD;AAEtD;;;;;GAKG;AACH,SAAS,OAAO,CAAC,OAAqB;IAClC,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACpB,MAAM,IAAI,GAAG,iBAAS,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,IAAI,OAAO,CAAC,WAAW,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC3C,MAAM,MAAM,GAAG,iBAAS,CAAC,MAAM,CAAC;QAChC,IAAI,CAAC,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|
3
|
+
"startApp": "To start the application, type {{npmStart}} or {{cdsRun}}",
|
|
4
|
+
"startServerMessage": "To start the server, launch a terminal and browse to the {{folder}} folder and type npm {{npmCommand}}"
|
|
5
|
+
},
|
|
6
|
+
"error": {
|
|
7
|
+
"errorLaunchFile": "Error in generating debug launch.json: {{error}}",
|
|
8
|
+
"appInfoFilePath": "Error in generating appInfo.json: {{error}}"
|
|
9
|
+
}
|
|
10
|
+
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ODataVersion } from '@sap-ux/project-access';
|
|
2
2
|
import type { FioriToolsProxyConfigBackend } from '@sap-ux/ui5-config';
|
|
3
|
+
import type { OdataVersion, DatasourceType } from '@sap-ux/odata-service-inquirer';
|
|
3
4
|
export declare enum Arguments {
|
|
4
5
|
FrameworkVersion = "--framework-version",
|
|
5
6
|
Open = "--open",
|
|
@@ -41,14 +42,68 @@ export interface LaunchConfig {
|
|
|
41
42
|
env: LaunchConfigEnv;
|
|
42
43
|
}
|
|
43
44
|
export interface LaunchConfigEnv {
|
|
44
|
-
'run.config': string;
|
|
45
45
|
FIORI_TOOLS_UI5_VERSION?: string;
|
|
46
46
|
FIORI_TOOLS_UI5_URI?: string;
|
|
47
47
|
FIORI_TOOLS_BACKEND_CONFIG?: string;
|
|
48
48
|
FIORI_TOOLS_URL_PARAMS?: string;
|
|
49
|
+
'run.config'?: string;
|
|
50
|
+
DEBUG?: string;
|
|
49
51
|
}
|
|
50
52
|
export interface LaunchConfigInfo {
|
|
51
53
|
launchConfigs: LaunchConfig[];
|
|
52
54
|
filePath: string;
|
|
53
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Configuration options for debugging launch configurations.
|
|
58
|
+
*/
|
|
59
|
+
export interface DebugOptions {
|
|
60
|
+
/** Path to the project directory. */
|
|
61
|
+
projectPath: string;
|
|
62
|
+
/** Type of the data source used in the project. */
|
|
63
|
+
datasourceType: DatasourceType;
|
|
64
|
+
/** SAP client parameter for the connection. */
|
|
65
|
+
sapClientParam: string;
|
|
66
|
+
/** FLP application ID. */
|
|
67
|
+
flpAppId: string;
|
|
68
|
+
/** Indicates if the FLP sandbox environment is available. */
|
|
69
|
+
flpSandboxAvailable: boolean;
|
|
70
|
+
/** Version of the OData service. */
|
|
71
|
+
odataVersion?: OdataVersion;
|
|
72
|
+
/** Indicates if the project is a Fiori Element. */
|
|
73
|
+
isFioriElement?: boolean;
|
|
74
|
+
/** Intent parameter for the migrator mock. */
|
|
75
|
+
migratorMockIntent?: string;
|
|
76
|
+
/** Indicates if the project is a migrator. */
|
|
77
|
+
isMigrator?: boolean;
|
|
78
|
+
/** Indicates if the environment is SAP App Studio. */
|
|
79
|
+
isAppStudio?: boolean;
|
|
80
|
+
/** If true, write to the app only. */
|
|
81
|
+
writeToAppOnly?: boolean;
|
|
82
|
+
/** Reference to the VS Code instance. */
|
|
83
|
+
vscode?: any;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Options for updating the workspace folder.
|
|
87
|
+
*/
|
|
88
|
+
export interface UpdateWorkspaceFolderOptions {
|
|
89
|
+
/** Name of the project. */
|
|
90
|
+
projectName: string;
|
|
91
|
+
/** Reference to the VS Code instance. */
|
|
92
|
+
vscode: any;
|
|
93
|
+
/** URI of the workspace folder. */
|
|
94
|
+
uri?: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Information related to the workspace handler.
|
|
98
|
+
*/
|
|
99
|
+
export interface WorkspaceHandlerInfo {
|
|
100
|
+
/** Path to the launch.json file in the workspace. */
|
|
101
|
+
launchJsonPath: string;
|
|
102
|
+
/** Current working directory of the workspace. */
|
|
103
|
+
cwd: string;
|
|
104
|
+
/** URI of the workspace folder. */
|
|
105
|
+
workspaceFolderUri?: string;
|
|
106
|
+
/** replace file and dont update if app is outside workspace */
|
|
107
|
+
appNotInWorkspace?: boolean;
|
|
108
|
+
}
|
|
54
109
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEnF,oBAAY,SAAS;IACjB,gBAAgB,wBAAwB;IACxC,IAAI,WAAW;IACf,MAAM,aAAa;CACtB;AAED,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,4BAA4B,EAAE,CAAC;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,YAAY,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAA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,EAAE,OAAO,CAAC;IACtB,sCAAsC;IACtC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,yCAAyC;IACzC,MAAM,CAAC,EAAE,GAAG,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,MAAM,EAAE,GAAG,CAAC;IACZ,mCAAmC;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,qDAAqD;IACrD,cAAc,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAC;IACZ,mCAAmC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B"}
|
package/dist/types/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":";;;AAIA,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,qDAAwC,CAAA;IACxC,4BAAe,CAAA;IACf,gCAAmB,CAAA;AACvB,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/launch-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "SAP Fiori tools launch config administration",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,13 +22,16 @@
|
|
|
22
22
|
"node": ">=18.x"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
+
"i18next": "23.5.1",
|
|
25
26
|
"jsonc-parser": "3.2.0",
|
|
26
27
|
"mem-fs": "2.1.0",
|
|
27
28
|
"mem-fs-editor": "9.4.0",
|
|
28
29
|
"yargs-parser": "21.1.1",
|
|
29
30
|
"@sap-ux/project-access": "1.27.1",
|
|
30
31
|
"@sap-ux/ui5-config": "0.24.1",
|
|
31
|
-
"@sap-ux/ui5-info": "0.8.1"
|
|
32
|
+
"@sap-ux/ui5-info": "0.8.1",
|
|
33
|
+
"@sap-ux/odata-service-inquirer": "0.5.36",
|
|
34
|
+
"@sap-ux/store": "0.9.1"
|
|
32
35
|
},
|
|
33
36
|
"devDependencies": {
|
|
34
37
|
"@types/mem-fs": "1.1.2",
|