sap-ux-sap-systems-ext 1.0.2 → 1.0.3
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/extension.js +113 -95
- package/dist/webapp/store.js +1 -1
- package/package.json +5 -5
package/dist/extension.js
CHANGED
|
@@ -129462,10 +129462,10 @@ __export(extension_exports, {
|
|
|
129462
129462
|
module.exports = __toCommonJS(extension_exports);
|
|
129463
129463
|
|
|
129464
129464
|
// src/views/sapSystems.ts
|
|
129465
|
-
var
|
|
129465
|
+
var import_vscode4 = require("vscode");
|
|
129466
129466
|
|
|
129467
129467
|
// src/providers/sapSystemsProvider.ts
|
|
129468
|
-
var
|
|
129468
|
+
var import_vscode3 = require("vscode");
|
|
129469
129469
|
|
|
129470
129470
|
// ../store/dist/constants.js
|
|
129471
129471
|
var Entity;
|
|
@@ -134245,7 +134245,7 @@ function configAzureTelemetryClient(client) {
|
|
|
134245
134245
|
// ../telemetry/package.json
|
|
134246
134246
|
var package_default = {
|
|
134247
134247
|
name: "@sap-ux/telemetry",
|
|
134248
|
-
version: "1.0.
|
|
134248
|
+
version: "1.0.9",
|
|
134249
134249
|
description: "Library for sending usage telemetry data",
|
|
134250
134250
|
type: "module",
|
|
134251
134251
|
repository: {
|
|
@@ -134319,6 +134319,7 @@ var TelemetrySettings = {
|
|
|
134319
134319
|
};
|
|
134320
134320
|
|
|
134321
134321
|
// ../telemetry/dist/base/client/azure-appinsight-client.js
|
|
134322
|
+
process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL ??= "true";
|
|
134322
134323
|
var ApplicationInsightClient = class extends Client {
|
|
134323
134324
|
clients;
|
|
134324
134325
|
/**
|
|
@@ -139076,8 +139077,9 @@ var {
|
|
|
139076
139077
|
// ../btp-utils/dist/app-studio.env.js
|
|
139077
139078
|
var ENV2;
|
|
139078
139079
|
(function(ENV3) {
|
|
139079
|
-
ENV3["PROXY_URL"] = "HTTP_PROXY";
|
|
139080
139080
|
ENV3["H2O_URL"] = "H2O_URL";
|
|
139081
|
+
ENV3["HTTP_PROXY"] = "HTTP_PROXY";
|
|
139082
|
+
ENV3["HTTPS_PROXY"] = "HTTPS_PROXY";
|
|
139081
139083
|
})(ENV2 || (ENV2 = {}));
|
|
139082
139084
|
|
|
139083
139085
|
// ../btp-utils/dist/destination.js
|
|
@@ -142801,6 +142803,28 @@ var UI5Config = class _UI5Config {
|
|
|
142801
142803
|
}
|
|
142802
142804
|
return this;
|
|
142803
142805
|
}
|
|
142806
|
+
/**
|
|
142807
|
+
* Appends `/test/**` and `/localService/**` to `builder.resources.excludes` if not already present.
|
|
142808
|
+
* Safe to call multiple times — idempotent.
|
|
142809
|
+
*
|
|
142810
|
+
* @returns this UI5Config instance
|
|
142811
|
+
* @memberof UI5Config
|
|
142812
|
+
*/
|
|
142813
|
+
addBuilderResourceExcludes() {
|
|
142814
|
+
const defaults2 = ["/test/**", "/localService/**"];
|
|
142815
|
+
let existing = [];
|
|
142816
|
+
try {
|
|
142817
|
+
existing = this.document.getSequence({ path: "builder.resources.excludes" }).toJSON().filter((v) => typeof v === "string");
|
|
142818
|
+
} catch {
|
|
142819
|
+
}
|
|
142820
|
+
for (const value of defaults2) {
|
|
142821
|
+
if (!existing.includes(value)) {
|
|
142822
|
+
this.document.appendTo({ path: "builder.resources.excludes", value });
|
|
142823
|
+
existing.push(value);
|
|
142824
|
+
}
|
|
142825
|
+
}
|
|
142826
|
+
return this;
|
|
142827
|
+
}
|
|
142804
142828
|
/**
|
|
142805
142829
|
* Adds the ABAP deployment task to the config.
|
|
142806
142830
|
*
|
|
@@ -142815,14 +142839,7 @@ var UI5Config = class _UI5Config {
|
|
|
142815
142839
|
* @memberof UI5Config
|
|
142816
142840
|
*/
|
|
142817
142841
|
addAbapDeployTask(target, app, fioriTools = true, exclude, index = false, lrep, comments = []) {
|
|
142818
|
-
this.
|
|
142819
|
-
path: "builder.resources.excludes",
|
|
142820
|
-
value: "/test/**"
|
|
142821
|
-
});
|
|
142822
|
-
this.document.appendTo({
|
|
142823
|
-
path: "builder.resources.excludes",
|
|
142824
|
-
value: "/localService/**"
|
|
142825
|
-
});
|
|
142842
|
+
this.addBuilderResourceExcludes();
|
|
142826
142843
|
const deployExclude = Array.from(/* @__PURE__ */ new Set([...exclude ?? [], "/test/", "/localService/"]));
|
|
142827
142844
|
const configuration = { target, app, exclude: deployExclude, lrep };
|
|
142828
142845
|
if (index) {
|
|
@@ -142849,14 +142866,7 @@ var UI5Config = class _UI5Config {
|
|
|
142849
142866
|
* @memberof UI5Config
|
|
142850
142867
|
*/
|
|
142851
142868
|
addCloudFoundryDeployTask(archiveName, addModulesTask = false, addTranspileTask = false) {
|
|
142852
|
-
this.
|
|
142853
|
-
path: "builder.resources.excludes",
|
|
142854
|
-
value: "/test/**"
|
|
142855
|
-
});
|
|
142856
|
-
this.document.appendTo({
|
|
142857
|
-
path: "builder.resources.excludes",
|
|
142858
|
-
value: "/localService/**"
|
|
142859
|
-
});
|
|
142869
|
+
this.addBuilderResourceExcludes();
|
|
142860
142870
|
this.document.appendTo({
|
|
142861
142871
|
path: "builder.customTasks",
|
|
142862
142872
|
value: {
|
|
@@ -150305,7 +150315,7 @@ asyncInterceptorTypesMapping.set(InterceptorTypes.DURATION, durationAsync);
|
|
|
150305
150315
|
asyncInterceptorTypesMapping.set(InterceptorTypes.CAPTURE_PARAM, captureParamAsync);
|
|
150306
150316
|
|
|
150307
150317
|
// package.json
|
|
150308
|
-
var version = "1.0.
|
|
150318
|
+
var version = "1.0.3";
|
|
150309
150319
|
|
|
150310
150320
|
// ../feature-toggle/dist/constants.js
|
|
150311
150321
|
var extensionConfigKeys = {
|
|
@@ -150330,19 +150340,19 @@ var tokenToggleGuid = {
|
|
|
150330
150340
|
var FeatureToggleKey = "testBetaFeatures";
|
|
150331
150341
|
var ExperimentalFeatures = "sap.ux.applicationModeler.enableExperimentalFeatures";
|
|
150332
150342
|
|
|
150333
|
-
// ../feature-toggle/dist/
|
|
150334
|
-
|
|
150335
|
-
|
|
150343
|
+
// ../feature-toggle/dist/vscode.js
|
|
150344
|
+
var import_node_module4 = require("node:module");
|
|
150345
|
+
var require5 = (0, import_node_module4.createRequire)(__filename);
|
|
150346
|
+
function getVSCodeInstance2() {
|
|
150336
150347
|
try {
|
|
150337
|
-
|
|
150348
|
+
return require5("vscode");
|
|
150338
150349
|
} catch {
|
|
150350
|
+
return void 0;
|
|
150339
150351
|
}
|
|
150340
|
-
return vscode;
|
|
150341
150352
|
}
|
|
150342
|
-
|
|
150343
|
-
|
|
150344
|
-
|
|
150345
|
-
})();
|
|
150353
|
+
|
|
150354
|
+
// ../feature-toggle/dist/featureToggle.js
|
|
150355
|
+
var _vscodeInstance = getVSCodeInstance2();
|
|
150346
150356
|
var FeatureToggleAccess = class _FeatureToggleAccess {
|
|
150347
150357
|
/**
|
|
150348
150358
|
* Returns the vscode instance if available.
|
|
@@ -150360,10 +150370,11 @@ var FeatureToggleAccess = class _FeatureToggleAccess {
|
|
|
150360
150370
|
*/
|
|
150361
150371
|
static getFeatureToggle(feature) {
|
|
150362
150372
|
let toggleConfigValue;
|
|
150363
|
-
|
|
150373
|
+
const vscode = _FeatureToggleAccess.vscode;
|
|
150374
|
+
if ((feature.includes(FeatureToggleKey) || feature === ExperimentalFeatures) && vscode) {
|
|
150364
150375
|
const toggleKey = feature.slice(0, feature.lastIndexOf("."));
|
|
150365
150376
|
const toggleId = feature.slice(feature.lastIndexOf(".") + 1, feature.length);
|
|
150366
|
-
toggleConfigValue =
|
|
150377
|
+
toggleConfigValue = vscode.workspace.getConfiguration(toggleKey)?.get(toggleId);
|
|
150367
150378
|
} else {
|
|
150368
150379
|
toggleConfigValue = false;
|
|
150369
150380
|
}
|
|
@@ -150391,16 +150402,22 @@ var FeatureToggleAccess = class _FeatureToggleAccess {
|
|
|
150391
150402
|
*/
|
|
150392
150403
|
static getAllFeatureToggles() {
|
|
150393
150404
|
const definedToggles = [];
|
|
150394
|
-
|
|
150405
|
+
const vscode = _FeatureToggleAccess.vscode;
|
|
150406
|
+
if (vscode) {
|
|
150395
150407
|
Object.keys(extensionConfigKeys).forEach((toggleConfigKey) => {
|
|
150396
150408
|
const toggleKey = `${extensionConfigKeys[toggleConfigKey]}.${FeatureToggleKey}`;
|
|
150397
|
-
let
|
|
150409
|
+
let config;
|
|
150410
|
+
let toggleIds = [];
|
|
150398
150411
|
try {
|
|
150399
|
-
|
|
150412
|
+
config = vscode.workspace.getConfiguration(toggleKey);
|
|
150413
|
+
toggleIds = Object.keys(config).filter((key) => typeof config?.[key] !== "function");
|
|
150400
150414
|
} catch {
|
|
150401
150415
|
}
|
|
150402
|
-
|
|
150403
|
-
|
|
150416
|
+
if (!config) {
|
|
150417
|
+
return;
|
|
150418
|
+
}
|
|
150419
|
+
toggleIds.forEach((toggleId) => {
|
|
150420
|
+
const toggleConfigValue = config.get(toggleId);
|
|
150404
150421
|
const toggle = {
|
|
150405
150422
|
feature: `${toggleKey}.${toggleId}`,
|
|
150406
150423
|
isEnabled: toggleConfigValue ? toggleConfigValue : false
|
|
@@ -150424,8 +150441,9 @@ var FeatureToggleAccess = class _FeatureToggleAccess {
|
|
|
150424
150441
|
function isInternalFeaturesSettingEnabled() {
|
|
150425
150442
|
const enableInternalFeaturesSetting = "sap.ux.internal.enableInternalFeatures";
|
|
150426
150443
|
let internalEnabled = false;
|
|
150427
|
-
|
|
150428
|
-
|
|
150444
|
+
const vscode = FeatureToggleAccess.vscode;
|
|
150445
|
+
if (vscode) {
|
|
150446
|
+
const internalSetting = vscode.workspace ? vscode.workspace.getConfiguration().get(enableInternalFeaturesSetting) : false;
|
|
150429
150447
|
internalEnabled = internalSetting ?? false;
|
|
150430
150448
|
}
|
|
150431
150449
|
if (process.env.TOOLSUITE_INTERNAL && process.env.TOOLSUITE_INTERNAL === "true") {
|
|
@@ -150570,7 +150588,7 @@ var SapSystemsProvider = class {
|
|
|
150570
150588
|
* @returns a tree item for the given stored system
|
|
150571
150589
|
*/
|
|
150572
150590
|
getTreeItem(system) {
|
|
150573
|
-
const item = new
|
|
150591
|
+
const item = new import_vscode3.TreeItem(system.name, import_vscode3.TreeItemCollapsibleState.None);
|
|
150574
150592
|
const props = this.getTreeItemProps(system);
|
|
150575
150593
|
const systemTreeItem = {
|
|
150576
150594
|
...item,
|
|
@@ -150585,7 +150603,7 @@ var SapSystemsProvider = class {
|
|
|
150585
150603
|
refresh() {
|
|
150586
150604
|
this._onDidChangeTreeData.fire(void 0);
|
|
150587
150605
|
}
|
|
150588
|
-
_onDidChangeTreeData = new
|
|
150606
|
+
_onDidChangeTreeData = new import_vscode3.EventEmitter();
|
|
150589
150607
|
onDidChangeTreeData = this._onDidChangeTreeData.event;
|
|
150590
150608
|
/**
|
|
150591
150609
|
* Returns properties for a tree item representing a stored SAP system.
|
|
@@ -150602,8 +150620,8 @@ var SapSystemsProvider = class {
|
|
|
150602
150620
|
arguments: [{ url: system.url, client: system.client }, false]
|
|
150603
150621
|
};
|
|
150604
150622
|
const iconPath = {
|
|
150605
|
-
light:
|
|
150606
|
-
dark:
|
|
150623
|
+
light: import_vscode3.Uri.joinPath(this.context.extensionUri, "resources/light/icon-sap-logo-light.svg"),
|
|
150624
|
+
dark: import_vscode3.Uri.joinPath(this.context.extensionUri, "resources/dark/icon-sap-logo-dark.svg")
|
|
150607
150625
|
};
|
|
150608
150626
|
return {
|
|
150609
150627
|
tooltip,
|
|
@@ -150619,7 +150637,7 @@ var SapSystemsProvider = class {
|
|
|
150619
150637
|
async loadSystems() {
|
|
150620
150638
|
let systems = [];
|
|
150621
150639
|
try {
|
|
150622
|
-
await
|
|
150640
|
+
await import_vscode3.commands.executeCommand("setContext", "sap.ux.tools.sapSystems.treeLoading", true);
|
|
150623
150641
|
const systemService = await getBackendSystemService();
|
|
150624
150642
|
systems = await systemService.getAll({
|
|
150625
150643
|
includeSensitiveData: false,
|
|
@@ -150631,8 +150649,8 @@ var SapSystemsProvider = class {
|
|
|
150631
150649
|
SystemsLogger.logger.debug(error.message);
|
|
150632
150650
|
return [];
|
|
150633
150651
|
} finally {
|
|
150634
|
-
await
|
|
150635
|
-
await
|
|
150652
|
+
await import_vscode3.commands.executeCommand("setContext", "sap.ux.tools.sapSystems.treeLoading", false);
|
|
150653
|
+
await import_vscode3.commands.executeCommand("setContext", "sap.ux.tools.sapSystems.isTreeEmpty", systems.length === 0);
|
|
150636
150654
|
}
|
|
150637
150655
|
}
|
|
150638
150656
|
};
|
|
@@ -150641,7 +150659,7 @@ var SapSystemsProvider = class {
|
|
|
150641
150659
|
function initSapSystemsView(context2) {
|
|
150642
150660
|
const systemsTreeDataProvider = new SapSystemsProvider(context2.vscodeExtContext);
|
|
150643
150661
|
context2.vscodeExtContext.subscriptions.push(
|
|
150644
|
-
|
|
150662
|
+
import_vscode4.window.registerTreeDataProvider("sap.ux.tools.sapSystems", systemsTreeDataProvider)
|
|
150645
150663
|
);
|
|
150646
150664
|
context2.systemsTreeDataProvider = systemsTreeDataProvider;
|
|
150647
150665
|
const storeWatcher = getFilesystemWatcherFor(
|
|
@@ -150660,10 +150678,10 @@ function registerViews(context2) {
|
|
|
150660
150678
|
}
|
|
150661
150679
|
|
|
150662
150680
|
// src/commands/system/index.ts
|
|
150663
|
-
var
|
|
150681
|
+
var import_vscode15 = require("vscode");
|
|
150664
150682
|
|
|
150665
150683
|
// src/panel/system/systemPanel.ts
|
|
150666
|
-
var
|
|
150684
|
+
var import_vscode10 = require("vscode");
|
|
150667
150685
|
var import_node_path21 = require("node:path");
|
|
150668
150686
|
|
|
150669
150687
|
// ../axios-extension/dist/base/odata-request-error.js
|
|
@@ -154030,13 +154048,13 @@ function validateSystemUrl(url2) {
|
|
|
154030
154048
|
}
|
|
154031
154049
|
|
|
154032
154050
|
// src/panel/system/utils/vscode.ts
|
|
154033
|
-
var
|
|
154051
|
+
var import_vscode5 = require("vscode");
|
|
154034
154052
|
var import_node_path19 = require("node:path");
|
|
154035
154053
|
async function showFileSaveDialog(systemName, workspaceFolders) {
|
|
154036
154054
|
const sanitizedSystemName = systemName?.replaceAll(/[:,]/g, "_").replaceAll(/[^a-zA-Z0-9._-]+/g, "") ?? "system";
|
|
154037
154055
|
const fileName = `${sanitizedSystemName}.json`;
|
|
154038
|
-
const defaultUri = workspaceFolders?.[0]?.uri?.fsPath ?
|
|
154039
|
-
const filePath = await
|
|
154056
|
+
const defaultUri = workspaceFolders?.[0]?.uri?.fsPath ? import_vscode5.Uri.file((0, import_node_path19.join)(workspaceFolders[0].uri.fsPath, fileName)) : import_vscode5.Uri.file(fileName);
|
|
154057
|
+
const filePath = await import_vscode5.window.showSaveDialog({
|
|
154040
154058
|
defaultUri,
|
|
154041
154059
|
filters: { "JSON Files": ["json"] }
|
|
154042
154060
|
});
|
|
@@ -154044,13 +154062,13 @@ async function showFileSaveDialog(systemName, workspaceFolders) {
|
|
|
154044
154062
|
}
|
|
154045
154063
|
|
|
154046
154064
|
// src/panel/system/utils/webview.ts
|
|
154047
|
-
var
|
|
154065
|
+
var import_vscode6 = require("vscode");
|
|
154048
154066
|
var import_node_path20 = require("node:path");
|
|
154049
154067
|
var import_normalize_path = __toESM(require_normalize_path());
|
|
154050
154068
|
var import_fast_glob2 = __toESM(require_out4());
|
|
154051
154069
|
async function createWebviewPanel(webappDirPath, disposeCallback, onMessage) {
|
|
154052
|
-
const viewRootUri =
|
|
154053
|
-
const webviewPanel =
|
|
154070
|
+
const viewRootUri = import_vscode6.Uri.file(webappDirPath);
|
|
154071
|
+
const webviewPanel = import_vscode6.window.createWebviewPanel("sap.ux.tools.sapSystems.show", `SAP System`, import_vscode6.ViewColumn.One, {
|
|
154054
154072
|
enableCommandUris: true,
|
|
154055
154073
|
enableScripts: true,
|
|
154056
154074
|
retainContextWhenHidden: true,
|
|
@@ -154077,7 +154095,7 @@ async function getSystemPanelHtmlForWebview({
|
|
|
154077
154095
|
toWebviewUri
|
|
154078
154096
|
}) {
|
|
154079
154097
|
const viewRootPath = (0, import_node_path20.join)(webappDirPath);
|
|
154080
|
-
const viewRootUri = toWebviewUri(
|
|
154098
|
+
const viewRootUri = toWebviewUri(import_vscode6.Uri.file(viewRootPath));
|
|
154081
154099
|
const storeList = await (0, import_fast_glob2.default)(
|
|
154082
154100
|
[(0, import_normalize_path.default)((0, import_node_path20.join)(viewRootPath, "store.*.js")), (0, import_normalize_path.default)((0, import_node_path20.join)(viewRootPath, "store.js"))],
|
|
154083
154101
|
{}
|
|
@@ -154267,7 +154285,7 @@ var ConnectionExistsError = class extends Error {
|
|
|
154267
154285
|
};
|
|
154268
154286
|
|
|
154269
154287
|
// src/panel/system/actions/exportSystem.ts
|
|
154270
|
-
var
|
|
154288
|
+
var import_vscode7 = require("vscode");
|
|
154271
154289
|
var import_node_fs10 = require("node:fs");
|
|
154272
154290
|
var exportSystem = async (_context, action) => {
|
|
154273
154291
|
const system = action.payload.system;
|
|
@@ -154287,11 +154305,11 @@ var exportSystem = async (_context, action) => {
|
|
|
154287
154305
|
}
|
|
154288
154306
|
]
|
|
154289
154307
|
};
|
|
154290
|
-
const filePath = await showFileSaveDialog(backendSystem.name,
|
|
154308
|
+
const filePath = await showFileSaveDialog(backendSystem.name, import_vscode7.workspace?.workspaceFolders);
|
|
154291
154309
|
if (filePath?.fsPath) {
|
|
154292
154310
|
const data = JSON.stringify(systemDetails, null, 2);
|
|
154293
154311
|
(0, import_node_fs10.writeFileSync)(filePath.fsPath, data);
|
|
154294
|
-
|
|
154312
|
+
import_vscode7.window.showInformationMessage(t2("info.connectionExported", geti18nOpts(backendSystem.name)));
|
|
154295
154313
|
logTelemetry2("EXPORT_SUCCESS" /* EXPORT_SUCCESS */);
|
|
154296
154314
|
}
|
|
154297
154315
|
} catch (e) {
|
|
@@ -154301,7 +154319,7 @@ var exportSystem = async (_context, action) => {
|
|
|
154301
154319
|
}
|
|
154302
154320
|
};
|
|
154303
154321
|
function errorHandler(errorMsg) {
|
|
154304
|
-
|
|
154322
|
+
import_vscode7.window.showErrorMessage(errorMsg);
|
|
154305
154323
|
SystemsLogger.logger.error(errorMsg);
|
|
154306
154324
|
logTelemetry2("EXPORT_FAIL" /* EXPORT_FAIL */);
|
|
154307
154325
|
}
|
|
@@ -154344,7 +154362,7 @@ function getSystemInfo2(backendSystem) {
|
|
|
154344
154362
|
}
|
|
154345
154363
|
|
|
154346
154364
|
// src/panel/system/actions/updateSystem.ts
|
|
154347
|
-
var
|
|
154365
|
+
var import_vscode8 = require("vscode");
|
|
154348
154366
|
async function updateSystem(context2, action) {
|
|
154349
154367
|
const { system: backendSystemPayload } = action.payload;
|
|
154350
154368
|
const existingSystem = await getBackendSystem({
|
|
@@ -154365,7 +154383,7 @@ async function updateSystem(context2, action) {
|
|
|
154365
154383
|
const newPanelMsg = await updateHandler(context2, backendSystem, existingSystem);
|
|
154366
154384
|
await saveSystem(backendSystem, context2.panelViewType, existingSystem);
|
|
154367
154385
|
if (newPanelMsg) {
|
|
154368
|
-
await
|
|
154386
|
+
await import_vscode8.commands.executeCommand("sap.ux.tools.sapSystems.show" /* Show */, backendSystem, newPanelMsg);
|
|
154369
154387
|
}
|
|
154370
154388
|
} catch (error) {
|
|
154371
154389
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -154456,7 +154474,7 @@ async function saveSystem(backendSystem, systemPanelViewType, existingSystem) {
|
|
|
154456
154474
|
force: !!existingSystem
|
|
154457
154475
|
});
|
|
154458
154476
|
const i18nKey = systemPanelViewType === 0 /* Create */ ? "info.connectionSaved" : "info.connectionUpdated";
|
|
154459
|
-
|
|
154477
|
+
import_vscode8.window.showInformationMessage(t2(i18nKey, geti18nOpts(backendSystem.name)));
|
|
154460
154478
|
TelemetryHelper.sendTelemetry(SYSTEMS_EVENT, {
|
|
154461
154479
|
action: "SYSTEM" /* SYSTEM */,
|
|
154462
154480
|
status: existingSystem ? "UPDATED_SUCCESS" /* UPDATED_SUCCESS */ : "CREATED_SUCCESS" /* CREATED_SUCCESS */,
|
|
@@ -154651,25 +154669,25 @@ function fireGALinkClickedTelemetry(context2) {
|
|
|
154651
154669
|
}
|
|
154652
154670
|
|
|
154653
154671
|
// src/panel/system/actions/executeCommads.ts
|
|
154654
|
-
var
|
|
154672
|
+
var import_vscode9 = require("vscode");
|
|
154655
154673
|
var createFioriProject = async (_context, action) => {
|
|
154656
154674
|
const backendSystem = action.payload.system;
|
|
154657
154675
|
if (backendSystem) {
|
|
154658
|
-
await
|
|
154676
|
+
await import_vscode9.commands.executeCommand("sap.ux.tools.sapSystems.launchAppGen" /* LaunchAppGen */, backendSystem);
|
|
154659
154677
|
}
|
|
154660
154678
|
};
|
|
154661
154679
|
var openOutputChannel = async () => {
|
|
154662
|
-
await
|
|
154680
|
+
await import_vscode9.commands.executeCommand("sap.ux.tools.sapSystems.openOutputChannel" /* OpenOutputChannel */);
|
|
154663
154681
|
};
|
|
154664
154682
|
var openExistingSystem = async (_context, action) => {
|
|
154665
154683
|
const { url: url2, client } = action.payload;
|
|
154666
|
-
await
|
|
154684
|
+
await import_vscode9.commands.executeCommand("sap.ux.tools.sapSystems.show" /* Show */, { url: url2, client });
|
|
154667
154685
|
};
|
|
154668
154686
|
var openGuidedAnswers = async (_context, action) => {
|
|
154669
154687
|
const openGACmd = action.payload.command;
|
|
154670
154688
|
if (openGACmd?.id) {
|
|
154671
154689
|
try {
|
|
154672
|
-
await
|
|
154690
|
+
await import_vscode9.commands.executeCommand(openGACmd.id, openGACmd.params);
|
|
154673
154691
|
} catch (error) {
|
|
154674
154692
|
SystemsLogger.logger.error(t2("error.guidedAnswersCmd", { error }));
|
|
154675
154693
|
}
|
|
@@ -154703,7 +154721,7 @@ var SystemPanel = class {
|
|
|
154703
154721
|
extensionPath;
|
|
154704
154722
|
systemPanelViewType;
|
|
154705
154723
|
systemStatusMessage;
|
|
154706
|
-
isGuidedAnswersEnabled = !!
|
|
154724
|
+
isGuidedAnswersEnabled = !!import_vscode10.extensions.getExtension(GUIDED_ANSWERS_EXTENSION_ID);
|
|
154707
154725
|
disposeCallback;
|
|
154708
154726
|
/**
|
|
154709
154727
|
* Creates a new SystemPanel instance.
|
|
@@ -154869,20 +154887,20 @@ function createNewPanel(context2, backendSystem, panelKey = NEW_SYSTEM_PANEL_KEY
|
|
|
154869
154887
|
}
|
|
154870
154888
|
|
|
154871
154889
|
// src/commands/system/show.ts
|
|
154872
|
-
var
|
|
154890
|
+
var import_vscode11 = require("vscode");
|
|
154873
154891
|
var showSystemsCommandHandler = (context2) => async (system, statusMsg) => {
|
|
154874
154892
|
try {
|
|
154875
154893
|
const systemService = await getBackendSystemService();
|
|
154876
154894
|
const backendSystemKey = await getBackendSystemKey(systemService, system);
|
|
154877
154895
|
const storedBackendSystem = await systemService.read(backendSystemKey);
|
|
154878
154896
|
if (!storedBackendSystem) {
|
|
154879
|
-
|
|
154897
|
+
import_vscode11.window.showErrorMessage(t2("error.connectionNotFound", { backendKey: backendSystemKey.getId() }));
|
|
154880
154898
|
return;
|
|
154881
154899
|
}
|
|
154882
154900
|
openSystemPanel(context2, backendSystemKey, storedBackendSystem, statusMsg);
|
|
154883
154901
|
} catch (e) {
|
|
154884
154902
|
const errorMessage = e instanceof Error ? e.message : void 0;
|
|
154885
|
-
|
|
154903
|
+
import_vscode11.window.showErrorMessage(errorMessage ?? t2("error.viewConnectionDetails"));
|
|
154886
154904
|
logTelemetryFailure();
|
|
154887
154905
|
}
|
|
154888
154906
|
};
|
|
@@ -154902,7 +154920,7 @@ async function sapSystemDropdownPicker(systemService) {
|
|
|
154902
154920
|
label: system.name,
|
|
154903
154921
|
systemKey: new BackendSystemKey({ url: system.url, client: system.client })
|
|
154904
154922
|
}));
|
|
154905
|
-
const selectedItem = await
|
|
154923
|
+
const selectedItem = await import_vscode11.window.showQuickPick(quickPickItems, {
|
|
154906
154924
|
placeHolder: t2("commands.quickpickPlaceholder")
|
|
154907
154925
|
});
|
|
154908
154926
|
if (!selectedItem) {
|
|
@@ -154937,17 +154955,17 @@ function logTelemetryFailure() {
|
|
|
154937
154955
|
}
|
|
154938
154956
|
|
|
154939
154957
|
// src/commands/system/delete.ts
|
|
154940
|
-
var
|
|
154958
|
+
var import_vscode12 = require("vscode");
|
|
154941
154959
|
var deleteSystemCommandHandler = (context2) => async (system) => {
|
|
154942
154960
|
const backendSystemKey = new BackendSystemKey({ url: system.url, client: system.client });
|
|
154943
154961
|
const systemService = await getBackendSystemService();
|
|
154944
154962
|
const backendSystem = await systemService.read(backendSystemKey);
|
|
154945
154963
|
if (!backendSystem) {
|
|
154946
|
-
|
|
154964
|
+
import_vscode12.window.showErrorMessage(t2("error.connectionNotFound", { backendKey: backendSystemKey.getId() }));
|
|
154947
154965
|
return;
|
|
154948
154966
|
}
|
|
154949
154967
|
if (!await confirmPrompt(1 /* Delete */, backendSystem.name)) {
|
|
154950
|
-
|
|
154968
|
+
import_vscode12.window.showWarningMessage(t2("warn.deletionCancelled", { system: backendSystem.name }));
|
|
154951
154969
|
return;
|
|
154952
154970
|
}
|
|
154953
154971
|
const isDeleted = await systemService.delete(backendSystem);
|
|
@@ -154960,10 +154978,10 @@ var deleteSystemCommandHandler = (context2) => async (system) => {
|
|
|
154960
154978
|
function deletionSuccessHandler(panelManager, panelKey, backendSystem) {
|
|
154961
154979
|
panelManager.deleteAndDispose(panelKey);
|
|
154962
154980
|
logTelemetry3("DELETED_SUCCESS" /* DELETED_SUCCESS */, backendSystem.systemType);
|
|
154963
|
-
|
|
154981
|
+
import_vscode12.window.showInformationMessage(t2("info.connectionDeleted", geti18nOpts(backendSystem.name)));
|
|
154964
154982
|
}
|
|
154965
154983
|
function deletionFailureHandler(system) {
|
|
154966
|
-
|
|
154984
|
+
import_vscode12.window.showWarningMessage(t2("error.deletingConnection", geti18nOpts(system.name)));
|
|
154967
154985
|
logTelemetry3("DELETED_FAIL" /* DELETED_FAIL */, system.systemType);
|
|
154968
154986
|
}
|
|
154969
154987
|
function logTelemetry3(status, systemType = "") {
|
|
@@ -154981,7 +154999,7 @@ var refreshSystemsCommandHandler = (commandContext) => async () => {
|
|
|
154981
154999
|
};
|
|
154982
155000
|
|
|
154983
155001
|
// src/commands/system/import.ts
|
|
154984
|
-
var
|
|
155002
|
+
var import_vscode13 = require("vscode");
|
|
154985
155003
|
var import_node_os7 = require("node:os");
|
|
154986
155004
|
var import_node_fs11 = require("node:fs");
|
|
154987
155005
|
var importSystemCommandHandler = (commandContext) => async () => {
|
|
@@ -154997,7 +155015,7 @@ var importSystemCommandHandler = (commandContext) => async () => {
|
|
|
154997
155015
|
if (existingSystem) {
|
|
154998
155016
|
overwrite = await confirmPrompt(0 /* Overwrite */, existingSystem.name);
|
|
154999
155017
|
if (!overwrite) {
|
|
155000
|
-
|
|
155018
|
+
import_vscode13.window.showWarningMessage(t2("warn.importCancelled"));
|
|
155001
155019
|
return;
|
|
155002
155020
|
}
|
|
155003
155021
|
}
|
|
@@ -155011,7 +155029,7 @@ var importSystemCommandHandler = (commandContext) => async () => {
|
|
|
155011
155029
|
}
|
|
155012
155030
|
} catch (err) {
|
|
155013
155031
|
const msg = err instanceof Error ? err.message : t2("error.importConfigFailed");
|
|
155014
|
-
|
|
155032
|
+
import_vscode13.window.showErrorMessage(msg);
|
|
155015
155033
|
logImportTelemetry("IMPORT_FAIL" /* IMPORT_FAIL */);
|
|
155016
155034
|
}
|
|
155017
155035
|
};
|
|
@@ -155037,11 +155055,11 @@ function createNewPanel2(context2, panelKey, systemConfig, existingSystem) {
|
|
|
155037
155055
|
});
|
|
155038
155056
|
}
|
|
155039
155057
|
async function getImportSystemConfig() {
|
|
155040
|
-
const [systemFileUri] = await
|
|
155058
|
+
const [systemFileUri] = await import_vscode13.window.showOpenDialog({
|
|
155041
155059
|
canSelectFolders: false,
|
|
155042
155060
|
canSelectFiles: true,
|
|
155043
155061
|
canSelectMany: false,
|
|
155044
|
-
defaultUri:
|
|
155062
|
+
defaultUri: import_vscode13.workspace?.workspaceFolders?.[0]?.uri
|
|
155045
155063
|
}) ?? [];
|
|
155046
155064
|
if (!systemFileUri) {
|
|
155047
155065
|
throw new Error(t2("error.noFileSelected"));
|
|
@@ -155072,7 +155090,7 @@ function logImportTelemetry(status) {
|
|
|
155072
155090
|
}
|
|
155073
155091
|
|
|
155074
155092
|
// src/commands/system/launchAppGen.ts
|
|
155075
|
-
var
|
|
155093
|
+
var import_vscode14 = require("vscode");
|
|
155076
155094
|
var launchAppGenCommandHandler = (_context) => async (system) => {
|
|
155077
155095
|
if (system.url) {
|
|
155078
155096
|
const systemService = await getBackendSystemService();
|
|
@@ -155080,7 +155098,7 @@ var launchAppGenCommandHandler = (_context) => async (system) => {
|
|
|
155080
155098
|
new BackendSystemKey({ url: system.url, client: system.client })
|
|
155081
155099
|
);
|
|
155082
155100
|
try {
|
|
155083
|
-
await
|
|
155101
|
+
await import_vscode14.commands.executeCommand(fioriToolsAppModAppGenLaunchCmd, {
|
|
155084
155102
|
type: launchAppGenCmdType,
|
|
155085
155103
|
systemName: backendSystem?.name
|
|
155086
155104
|
});
|
|
@@ -155104,7 +155122,7 @@ function errorHandler2(error, systemName = "unknown") {
|
|
|
155104
155122
|
systemName
|
|
155105
155123
|
});
|
|
155106
155124
|
SystemsLogger.logger.debug(error);
|
|
155107
|
-
|
|
155125
|
+
import_vscode14.window.showErrorMessage(errorMsg);
|
|
155108
155126
|
}
|
|
155109
155127
|
|
|
155110
155128
|
// src/commands/system/index.ts
|
|
@@ -155124,23 +155142,23 @@ var registerSystemViewCommands = (context2) => {
|
|
|
155124
155142
|
panelManager
|
|
155125
155143
|
};
|
|
155126
155144
|
const disposables = [
|
|
155127
|
-
|
|
155128
|
-
|
|
155129
|
-
|
|
155130
|
-
|
|
155131
|
-
|
|
155132
|
-
|
|
155133
|
-
|
|
155145
|
+
import_vscode15.commands.registerCommand("sap.ux.tools.sapSystems.create" /* Create */, commandHandlers.create(systemCommandContext)),
|
|
155146
|
+
import_vscode15.commands.registerCommand("sap.ux.tools.sapSystems.createNew" /* CreateNew */, commandHandlers.createNew(systemCommandContext)),
|
|
155147
|
+
import_vscode15.commands.registerCommand("sap.ux.tools.sapSystems.show" /* Show */, commandHandlers.show(systemCommandContext)),
|
|
155148
|
+
import_vscode15.commands.registerCommand("sap.ux.tools.sapSystems.delete" /* Delete */, commandHandlers.delete(systemCommandContext)),
|
|
155149
|
+
import_vscode15.commands.registerCommand("sap.ux.tools.sapSystems.import" /* Import */, commandHandlers.import(systemCommandContext)),
|
|
155150
|
+
import_vscode15.commands.registerCommand("sap.ux.tools.sapSystems.refresh" /* Refresh */, commandHandlers.refresh(systemCommandContext)),
|
|
155151
|
+
import_vscode15.commands.registerCommand("sap.ux.tools.sapSystems.launchAppGen" /* LaunchAppGen */, commandHandlers.launchAppGen(systemCommandContext))
|
|
155134
155152
|
];
|
|
155135
155153
|
context2.vscodeExtContext.subscriptions.push(...disposables);
|
|
155136
155154
|
};
|
|
155137
155155
|
|
|
155138
155156
|
// src/commands/extension/index.ts
|
|
155139
|
-
var
|
|
155157
|
+
var import_vscode16 = require("vscode");
|
|
155140
155158
|
function registerExtensionCommands(context2) {
|
|
155141
155159
|
const disposables = [
|
|
155142
155160
|
// Command to open the output channel for the extension
|
|
155143
|
-
|
|
155161
|
+
import_vscode16.commands.registerCommand("sap.ux.tools.sapSystems.openOutputChannel", () => {
|
|
155144
155162
|
SystemsLogger.show();
|
|
155145
155163
|
})
|
|
155146
155164
|
];
|