@sap/ux-ui5-tooling 1.6.3 → 1.6.4
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/README.md +2 -2
- package/dist/cli/index.js +141 -136
- package/dist/middlewares/fiori-tools-preview.js +141 -136
- package/dist/middlewares/fiori-tools-proxy.js +141 -136
- package/dist/tasks/cf-deploy/index.js +141 -136
- package/dist/tasks/deploy/index.js +141 -136
- package/dist/templates/control-property-editor/app.css +1 -1
- package/dist/templates/control-property-editor/app.js +45 -45
- package/package.json +9 -9
package/dist/cli/index.js
CHANGED
|
@@ -19001,7 +19001,7 @@ var require_cookies2 = __commonJS({
|
|
|
19001
19001
|
}
|
|
19002
19002
|
setCookie(response) {
|
|
19003
19003
|
var _a2;
|
|
19004
|
-
if ((_a2 = response
|
|
19004
|
+
if ((_a2 = response == null ? void 0 : response.headers) == null ? void 0 : _a2["set-cookie"]) {
|
|
19005
19005
|
response.headers["set-cookie"].forEach((cookieString) => this.addCookie(cookieString));
|
|
19006
19006
|
}
|
|
19007
19007
|
return this;
|
|
@@ -20144,7 +20144,7 @@ var require_uaaOauth = __commonJS({
|
|
|
20144
20144
|
});
|
|
20145
20145
|
}
|
|
20146
20146
|
log7.info("Got access token successfully");
|
|
20147
|
-
return (_a2 = response
|
|
20147
|
+
return (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.access_token;
|
|
20148
20148
|
}
|
|
20149
20149
|
async function getAccessTokenByUaaClientCredential({ uaa, log: log7 }) {
|
|
20150
20150
|
try {
|
|
@@ -20184,7 +20184,7 @@ var require_uaaOauth = __commonJS({
|
|
|
20184
20184
|
async function getUserInfo(uaa, accessToken) {
|
|
20185
20185
|
var _a2, _b;
|
|
20186
20186
|
const userInfoResp = await axios_1.default.request(uaa.getUserinfoRequest(accessToken));
|
|
20187
|
-
return ((_a2 = userInfoResp
|
|
20187
|
+
return ((_a2 = userInfoResp == null ? void 0 : userInfoResp.data) == null ? void 0 : _a2.email) || ((_b = userInfoResp == null ? void 0 : userInfoResp.data) == null ? void 0 : _b.name);
|
|
20188
20188
|
}
|
|
20189
20189
|
async function processCallbackAsync({ log: log7, uaa, accessToken, updateFunction, newRefreshToken, fetchUserInfo }) {
|
|
20190
20190
|
if (newRefreshToken) {
|
|
@@ -20321,7 +20321,7 @@ var require_uaaOauth = __commonJS({
|
|
|
20321
20321
|
});
|
|
20322
20322
|
return {
|
|
20323
20323
|
cookies: new _1.Cookies().setCookie(response),
|
|
20324
|
-
xsrfToken: (_a2 = response.headers)
|
|
20324
|
+
xsrfToken: (_a2 = response.headers) == null ? void 0 : _a2[common_1.CSRF.responseHeaderName]
|
|
20325
20325
|
};
|
|
20326
20326
|
}
|
|
20327
20327
|
function getServiceInfo(credentials) {
|
|
@@ -20456,7 +20456,7 @@ var require_connectWithReentranceTicket = __commonJS({
|
|
|
20456
20456
|
const timer = setTimeout(handleTimeout, timeout3);
|
|
20457
20457
|
app.get(Redirect.path, (req, res) => {
|
|
20458
20458
|
var _a2;
|
|
20459
|
-
const reentranceTicket = (_a2 = req.query["reentrance-ticket"])
|
|
20459
|
+
const reentranceTicket = (_a2 = req.query["reentrance-ticket"]) == null ? void 0 : _a2.toString();
|
|
20460
20460
|
logger.info("Got reentrance ticket: " + reentranceTicket);
|
|
20461
20461
|
res.set("Content-Type", "text/html");
|
|
20462
20462
|
res.send(Buffer.from(static_1.redirectSuccessHtml(ABAPSystem.logoffUrl(backendUrl))));
|
|
@@ -25898,7 +25898,7 @@ var require_utils5 = __commonJS({
|
|
|
25898
25898
|
exports2.newDebugLogger = (namespace = exports2.STORE_NAMESPACE) => debug_1.debug(namespace);
|
|
25899
25899
|
exports2.enableDebugLogger = (namespace) => debug_1.debug.enable(namespace);
|
|
25900
25900
|
exports2.pick = (target, ...props) => {
|
|
25901
|
-
return target && (props
|
|
25901
|
+
return target && (props == null ? void 0 : props.length) > 0 && props.reduce((o, k) => {
|
|
25902
25902
|
o[k] = target[k];
|
|
25903
25903
|
return o;
|
|
25904
25904
|
}, {}) || void 0;
|
|
@@ -26368,7 +26368,7 @@ var require_filesystem = __commonJS({
|
|
|
26368
26368
|
var _a2, _b;
|
|
26369
26369
|
let rawContents;
|
|
26370
26370
|
try {
|
|
26371
|
-
rawContents = (_a2 = fs_1.readFileSync(path_1.join(exports2.basedir(), `${entityName}.json`)))
|
|
26371
|
+
rawContents = (_a2 = fs_1.readFileSync(path_1.join(exports2.basedir(), `${entityName}.json`))) == null ? void 0 : _a2.toString().trim();
|
|
26372
26372
|
} catch (e) {
|
|
26373
26373
|
this.logger.debug(e.message);
|
|
26374
26374
|
return { error: e };
|
|
@@ -26378,7 +26378,7 @@ var require_filesystem = __commonJS({
|
|
|
26378
26378
|
}
|
|
26379
26379
|
let entities = void 0;
|
|
26380
26380
|
try {
|
|
26381
|
-
entities = (_b = JSON.parse(rawContents))
|
|
26381
|
+
entities = (_b = JSON.parse(rawContents)) == null ? void 0 : _b[entityName];
|
|
26382
26382
|
} catch (e) {
|
|
26383
26383
|
return { error: e };
|
|
26384
26384
|
}
|
|
@@ -26402,7 +26402,7 @@ var require_filesystem = __commonJS({
|
|
|
26402
26402
|
}
|
|
26403
26403
|
};
|
|
26404
26404
|
function toPersistenceName(s) {
|
|
26405
|
-
const t = s
|
|
26405
|
+
const t = s == null ? void 0 : s.trim().toLowerCase();
|
|
26406
26406
|
return t && pluralize_1.plural(t);
|
|
26407
26407
|
}
|
|
26408
26408
|
function getEntityFileName(entityName) {
|
|
@@ -26537,13 +26537,13 @@ var require_secure_store = __commonJS({
|
|
|
26537
26537
|
return null;
|
|
26538
26538
|
}
|
|
26539
26539
|
try {
|
|
26540
|
-
return require(`${(_a2 = vscode
|
|
26540
|
+
return require(`${(_a2 = vscode == null ? void 0 : vscode.env) == null ? void 0 : _a2.appRoot}/node_modules.asar/keytar`);
|
|
26541
26541
|
} catch (e2) {
|
|
26542
26542
|
log7.warn(e2);
|
|
26543
26543
|
log7.warn("Could not get keytar from vscode node_modules.asar");
|
|
26544
26544
|
}
|
|
26545
26545
|
try {
|
|
26546
|
-
return require(`${(_b = vscode
|
|
26546
|
+
return require(`${(_b = vscode == null ? void 0 : vscode.env) == null ? void 0 : _b.appRoot}/node_modules/keytar`);
|
|
26547
26547
|
} catch (e2) {
|
|
26548
26548
|
log7.warn(e2);
|
|
26549
26549
|
log7.warn("Could not get keytar from vscode node_modules");
|
|
@@ -27433,7 +27433,7 @@ var require_backend_system = __commonJS({
|
|
|
27433
27433
|
var BackendSystemKey = class {
|
|
27434
27434
|
constructor({ url, client }) {
|
|
27435
27435
|
this.url = url.trim().replace(/\/$/, "");
|
|
27436
|
-
this.client = client
|
|
27436
|
+
this.client = client == null ? void 0 : client.trim();
|
|
27437
27437
|
}
|
|
27438
27438
|
static from(system) {
|
|
27439
27439
|
return new BackendSystemKey({ url: system.url, client: system.client });
|
|
@@ -27541,7 +27541,7 @@ var require_backend_system2 = __commonJS({
|
|
|
27541
27541
|
const systems = await this.dataAccessor.readAll({ entityName: this.entityName });
|
|
27542
27542
|
for (const id of Object.keys(systems)) {
|
|
27543
27543
|
const system = systems[id];
|
|
27544
|
-
if (!((_a2 = system
|
|
27544
|
+
if (!((_a2 = system == null ? void 0 : system.url) == null ? void 0 : _a2.trim())) {
|
|
27545
27545
|
this.logger.warn(`Filtering system with ID [${id}] as it seems corrupt. Run repair`);
|
|
27546
27546
|
delete systems[id];
|
|
27547
27547
|
}
|
|
@@ -27732,7 +27732,7 @@ var require_system_migration2 = __commonJS({
|
|
|
27732
27732
|
async getRefreshTokenFromOldStore(system) {
|
|
27733
27733
|
var _a2;
|
|
27734
27734
|
try {
|
|
27735
|
-
const host = (_a2 = new URL(system.url))
|
|
27735
|
+
const host = (_a2 = new URL(system.url)) == null ? void 0 : _a2.host;
|
|
27736
27736
|
return host ? await this.secureStore.retrieve(contants_1.ServiceName.OldRefreshTokenService, host) : void 0;
|
|
27737
27737
|
} catch {
|
|
27738
27738
|
return void 0;
|
|
@@ -27742,7 +27742,7 @@ var require_system_migration2 = __commonJS({
|
|
|
27742
27742
|
var _a2;
|
|
27743
27743
|
this.logger.info(i18n_1.text("info.deletingRefreshTokenFromOldStore", { systemId }));
|
|
27744
27744
|
try {
|
|
27745
|
-
const host = (_a2 = new URL(system.url))
|
|
27745
|
+
const host = (_a2 = new URL(system.url)) == null ? void 0 : _a2.host;
|
|
27746
27746
|
await this.secureStore.delete(contants_1.ServiceName.OldRefreshTokenService, host);
|
|
27747
27747
|
} catch (e) {
|
|
27748
27748
|
this.logger.info(i18n_1.text("error.couldNotDeleteRefreshToken", { url: system.url }));
|
|
@@ -27811,7 +27811,7 @@ var require_system_migration2 = __commonJS({
|
|
|
27811
27811
|
function getMigrationLogger(migrationLogs) {
|
|
27812
27812
|
const migrationLogger = utils_1.newDebugLogger(utils_1.MIGRATION_NAMESPACE);
|
|
27813
27813
|
migrationLogger.log = (args) => {
|
|
27814
|
-
migrationLogs.push(args
|
|
27814
|
+
migrationLogs.push(args == null ? void 0 : args.toString());
|
|
27815
27815
|
};
|
|
27816
27816
|
utils_1.enableDebugLogger(utils_1.MIGRATION_NAMESPACE);
|
|
27817
27817
|
return migrationLogger;
|
|
@@ -27983,12 +27983,12 @@ var require_config = __commonJS({
|
|
|
27983
27983
|
exports2.destinationPropertyId = Object.keys(exports2.DestinationAttributeProperty);
|
|
27984
27984
|
function hasDestinationAttrib(destinationProperty, destinationAttributeProperty, destinationAttribs = {}) {
|
|
27985
27985
|
var _a2, _b;
|
|
27986
|
-
return (_b = destinationAttribs && ((_a2 = destinationAttribs[destinationProperty])
|
|
27986
|
+
return (_b = destinationAttribs && ((_a2 = destinationAttribs[destinationProperty]) == null ? void 0 : _a2.includes(destinationAttributeProperty))) != null ? _b : false;
|
|
27987
27987
|
}
|
|
27988
27988
|
exports2.hasDestinationAttrib = hasDestinationAttrib;
|
|
27989
27989
|
function hasFullUrlDestAttribute(destinationAttribs) {
|
|
27990
27990
|
var _a2, _b;
|
|
27991
|
-
return (_b = destinationAttribs && ((_a2 = destinationAttribs["WebIDEAdditionalData"])
|
|
27991
|
+
return (_b = destinationAttribs && ((_a2 = destinationAttribs["WebIDEAdditionalData"]) == null ? void 0 : _a2.includes(exports2.DestinationAttributeProperty.FULL_URL))) != null ? _b : false;
|
|
27992
27992
|
}
|
|
27993
27993
|
exports2.hasFullUrlDestAttribute = hasFullUrlDestAttribute;
|
|
27994
27994
|
}
|
|
@@ -42234,7 +42234,7 @@ var require_destination = __commonJS({
|
|
|
42234
42234
|
const destinations = {};
|
|
42235
42235
|
await axios_1.default.get(ux_common_utils_1.getAppStudioProxyURL() + "/reload");
|
|
42236
42236
|
const response = await axios_1.default.get(ux_common_utils_1.getAppStudioBaseURL() + "/api/listDestinations");
|
|
42237
|
-
(_a2 = response
|
|
42237
|
+
(_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.forEach((destination) => {
|
|
42238
42238
|
if (destination.WebIDEEnabled) {
|
|
42239
42239
|
destinations[destination.Name] = destination;
|
|
42240
42240
|
}
|
|
@@ -42245,8 +42245,8 @@ var require_destination = __commonJS({
|
|
|
42245
42245
|
var _a2, _b;
|
|
42246
42246
|
try {
|
|
42247
42247
|
const credentials = (await cf_tools_1.apiGetInstanceCredentials(destinationInstance)).credentials;
|
|
42248
|
-
const clientId = ((_a2 = credentials.uaa)
|
|
42249
|
-
const clientSecret = ((_b = credentials.uaa)
|
|
42248
|
+
const clientId = ((_a2 = credentials.uaa) == null ? void 0 : _a2.clientid) || credentials.clientid;
|
|
42249
|
+
const clientSecret = ((_b = credentials.uaa) == null ? void 0 : _b.clientsecret) || credentials.clientsecret;
|
|
42250
42250
|
return Buffer.from(`${encodeURIComponent(clientId)}:${encodeURIComponent(clientSecret)}`).toString("base64");
|
|
42251
42251
|
} catch (error3) {
|
|
42252
42252
|
throw new Error(`An error occurred while retrieving service key for the destination instance ${destinationInstance}: ${error3}`);
|
|
@@ -42268,7 +42268,7 @@ var require_destination = __commonJS({
|
|
|
42268
42268
|
systemConfig.basDestinationInstanceCred = await getAuthHeaderForInstanceBasedDest(destinationInstance);
|
|
42269
42269
|
} else {
|
|
42270
42270
|
systemConfig.url = ux_common_utils_1.getAppStudioBaseURL();
|
|
42271
|
-
systemConfig.service = `/destinations/${destinationName
|
|
42271
|
+
systemConfig.service = `/destinations/${destinationName != null ? destinationName : systemConfig.destination}${(_b = (_a2 = systemConfig.service) == null ? void 0 : _a2.replace(/^\/?/, "/")) != null ? _b : ""}`;
|
|
42272
42272
|
}
|
|
42273
42273
|
delete systemConfig.scp;
|
|
42274
42274
|
delete systemConfig.client;
|
|
@@ -42329,7 +42329,7 @@ var require_connection = __commonJS({
|
|
|
42329
42329
|
async function connectWithBasicAuth({ target, credentials, autoAddTrailingSlash = true, timeout: timeout3, ignoreCertError = false, logger = console }) {
|
|
42330
42330
|
var _a2;
|
|
42331
42331
|
const url = new url_1.URL(target.service, target.url).toString();
|
|
42332
|
-
const hasCredentials = !!((_a2 = credentials
|
|
42332
|
+
const hasCredentials = !!((_a2 = credentials == null ? void 0 : credentials.username) == null ? void 0 : _a2.length);
|
|
42333
42333
|
const config2 = {
|
|
42334
42334
|
params: {},
|
|
42335
42335
|
headers: {
|
|
@@ -42361,8 +42361,8 @@ var require_connection = __commonJS({
|
|
|
42361
42361
|
if (isTargetDestOnAppStudio) {
|
|
42362
42362
|
config2.params.saml2 = "disabled";
|
|
42363
42363
|
}
|
|
42364
|
-
const urlPath = !(url
|
|
42365
|
-
if ((config2
|
|
42364
|
+
const urlPath = !(url == null ? void 0 : url.endsWith("/")) && autoAddTrailingSlash ? `${url}/` : url;
|
|
42365
|
+
if ((config2 == null ? void 0 : config2.auth) && Object.keys(config2.auth).length > 0) {
|
|
42366
42366
|
config2.withCredentials = true;
|
|
42367
42367
|
} else {
|
|
42368
42368
|
delete config2.auth;
|
|
@@ -42382,7 +42382,7 @@ var require_connection = __commonJS({
|
|
|
42382
42382
|
};
|
|
42383
42383
|
}
|
|
42384
42384
|
function throwIfHtmlLoginForm(response) {
|
|
42385
|
-
if ((response
|
|
42385
|
+
if ((response == null ? void 0 : response.status) !== 200) {
|
|
42386
42386
|
return;
|
|
42387
42387
|
}
|
|
42388
42388
|
if (response.headers["sap-err-id"] === "ICFLOGONREQUIRED" || isHtmlLoginForm(response)) {
|
|
@@ -42406,13 +42406,13 @@ var require_connection = __commonJS({
|
|
|
42406
42406
|
if (contentTypeHeader) {
|
|
42407
42407
|
return contentTypeHeader.toLowerCase();
|
|
42408
42408
|
} else if (typeof responseData === "string") {
|
|
42409
|
-
return (_b = (_a2 = detect_content_type_1.default(Buffer.from(responseData)))
|
|
42409
|
+
return (_b = (_a2 = detect_content_type_1.default(Buffer.from(responseData))) == null ? void 0 : _a2.toLowerCase()) != null ? _b : "";
|
|
42410
42410
|
} else {
|
|
42411
42411
|
return "";
|
|
42412
42412
|
}
|
|
42413
42413
|
}
|
|
42414
42414
|
function isSamlLogonNeeded(response) {
|
|
42415
|
-
return (response
|
|
42415
|
+
return (response == null ? void 0 : response.status) === 200 && isHtmlResponse(response) && typeof response.data === "string" && !!response.data.match(/saml/i);
|
|
42416
42416
|
}
|
|
42417
42417
|
async function connect({ target, credentials, log: log7, autoAddTrailingSlash = true, timeout: timeout3, ignoreCertError = false, postConnectionCallback }) {
|
|
42418
42418
|
const targetAuthType = target.authenticationType;
|
|
@@ -42475,7 +42475,7 @@ var require_httpClient = __commonJS({
|
|
|
42475
42475
|
rejectUnauthorized: !ignoreCertError
|
|
42476
42476
|
})
|
|
42477
42477
|
};
|
|
42478
|
-
if (connection
|
|
42478
|
+
if (connection == null ? void 0 : connection.auth) {
|
|
42479
42479
|
config2.auth = connection.auth;
|
|
42480
42480
|
}
|
|
42481
42481
|
axios_1.default.defaults.headers.common["Accept"] = "application/json,application/xml,text/plain,*/*";
|
|
@@ -43952,7 +43952,7 @@ var require_message = __commonJS({
|
|
|
43952
43952
|
function prettyPrintError2(error3, log7, logData) {
|
|
43953
43953
|
var _a2;
|
|
43954
43954
|
if (error3) {
|
|
43955
|
-
log7.error((_a2 = error3.message)
|
|
43955
|
+
log7.error((_a2 = error3.message) == null ? void 0 : _a2.value);
|
|
43956
43956
|
if (error3.innererror) {
|
|
43957
43957
|
if (error3.innererror.errordetails) {
|
|
43958
43958
|
printErrorDetails(error3.innererror.errordetails, log7, logData);
|
|
@@ -43972,7 +43972,7 @@ var require_message = __commonJS({
|
|
|
43972
43972
|
if (!entry.message.startsWith("<![CDATA")) {
|
|
43973
43973
|
logLevel(entry.severity, entry.message, log7, true);
|
|
43974
43974
|
}
|
|
43975
|
-
if (entry["longtext_url"] && (logData
|
|
43975
|
+
if (entry["longtext_url"] && (logData == null ? void 0 : logData.frontendUrl)) {
|
|
43976
43976
|
printUrl(entry["longtext_url"], logData.frontendUrl, log7);
|
|
43977
43977
|
}
|
|
43978
43978
|
});
|
|
@@ -44089,31 +44089,31 @@ var require_oDataClient = __commonJS({
|
|
|
44089
44089
|
}
|
|
44090
44090
|
async metadata() {
|
|
44091
44091
|
var _a2;
|
|
44092
|
-
const metadataPath = ((_a2 = this.system.service)
|
|
44092
|
+
const metadataPath = ((_a2 = this.system.service) == null ? void 0 : _a2.endsWith("/")) ? "$metadata" : "/$metadata";
|
|
44093
44093
|
return this.get(metadataPath, { Accept: "application/xml" });
|
|
44094
44094
|
}
|
|
44095
44095
|
async get(path4, headers) {
|
|
44096
44096
|
var _a2, _b, _c;
|
|
44097
44097
|
const httpClient = await this.getClient();
|
|
44098
|
-
const response = await ((_a2 = httpClient.get(path4, headers === void 0 ? {} : { headers }))
|
|
44098
|
+
const response = await ((_a2 = httpClient.get(path4, headers === void 0 ? {} : { headers })) == null ? void 0 : _a2.catch((error3) => {
|
|
44099
44099
|
var _a3, _b2, _c2;
|
|
44100
|
-
if (((_a3 = error3.request)
|
|
44100
|
+
if (((_a3 = error3.request) == null ? void 0 : _a3._isRedirect) && ((_c2 = (_b2 = error3.request) == null ? void 0 : _b2._options) == null ? void 0 : _c2.path)) {
|
|
44101
44101
|
return httpClient.get(error3.request._options.path, headers === void 0 ? {} : { headers });
|
|
44102
44102
|
} else {
|
|
44103
44103
|
throw error3;
|
|
44104
44104
|
}
|
|
44105
44105
|
}));
|
|
44106
|
-
if ((_b = response
|
|
44106
|
+
if ((_b = response == null ? void 0 : response.data) == null ? void 0 : _b.d) {
|
|
44107
44107
|
if (response.data.d.results) {
|
|
44108
44108
|
return response.data.d.results;
|
|
44109
44109
|
} else {
|
|
44110
44110
|
return response.data.d;
|
|
44111
44111
|
}
|
|
44112
44112
|
}
|
|
44113
|
-
if ((_c = response
|
|
44113
|
+
if ((_c = response == null ? void 0 : response.data) == null ? void 0 : _c.value) {
|
|
44114
44114
|
return response.data;
|
|
44115
44115
|
}
|
|
44116
|
-
return response
|
|
44116
|
+
return response == null ? void 0 : response.data;
|
|
44117
44117
|
}
|
|
44118
44118
|
};
|
|
44119
44119
|
exports2.ODataClient = ODataClient;
|
|
@@ -44147,7 +44147,7 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
44147
44147
|
var Ui5AbapRepository2 = class extends oDataClient_1.ODataClient {
|
|
44148
44148
|
constructor({ system, credentials = void 0, log: log7 = console, connection = void 0, ignoreCertError, postConnectionCallback }) {
|
|
44149
44149
|
var _a2;
|
|
44150
|
-
system.service = (_a2 = system.service)
|
|
44150
|
+
system.service = (_a2 = system.service) != null ? _a2 : constants_1.DEFAULT_SERVICE_PATH;
|
|
44151
44151
|
super({ system, credentials, log: log7, connection, ignoreCertError, postConnectionCallback });
|
|
44152
44152
|
}
|
|
44153
44153
|
async getInfo(app) {
|
|
@@ -44166,7 +44166,7 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
44166
44166
|
const frontendUrl = this.getAbapFrontendUrl(this.system.originalUrl || this.system.url);
|
|
44167
44167
|
try {
|
|
44168
44168
|
const response = await this.updateRepoRequest(!!info, app.name, httpClient, payload, config2);
|
|
44169
|
-
if ((_a2 = response
|
|
44169
|
+
if ((_a2 = response == null ? void 0 : response.headers) == null ? void 0 : _a2["sap-message"]) {
|
|
44170
44170
|
const message = JSON.parse(response.headers["sap-message"]);
|
|
44171
44171
|
message["longtextUrl"] = message["longtext_url"];
|
|
44172
44172
|
message_1.prettyPrintMessage(message, this.log, { frontendUrl });
|
|
@@ -44174,7 +44174,7 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
44174
44174
|
const query = this.system.client ? "?sap-client=" + this.system.client : "";
|
|
44175
44175
|
this.log.info(`App available at ${frontendUrl}${path4}${query}`);
|
|
44176
44176
|
} else if (testMode) {
|
|
44177
|
-
message_1.printErrorDetails((_c = (_b = response
|
|
44177
|
+
message_1.printErrorDetails((_c = (_b = response == null ? void 0 : response.data.error) == null ? void 0 : _b.innererror) == null ? void 0 : _c.errordetails, this.log, {
|
|
44178
44178
|
frontendUrl
|
|
44179
44179
|
});
|
|
44180
44180
|
}
|
|
@@ -44190,7 +44190,7 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
44190
44190
|
const config2 = this.createConfig(app.transport, testMode);
|
|
44191
44191
|
try {
|
|
44192
44192
|
const response = await this.deleteRepoRequest(app.name, httpClient, config2);
|
|
44193
|
-
if ((_a2 = response
|
|
44193
|
+
if ((_a2 = response == null ? void 0 : response.headers) == null ? void 0 : _a2["sap-message"]) {
|
|
44194
44194
|
const message = JSON.parse(response.headers["sap-message"]);
|
|
44195
44195
|
message_1.prettyPrintMessage(message, this.log);
|
|
44196
44196
|
}
|
|
@@ -44229,7 +44229,7 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
44229
44229
|
createPayload(archive, name, description, abapPackage, httpClient) {
|
|
44230
44230
|
const base64Data = fs_1.readFileSync(archive, { encoding: "base64" });
|
|
44231
44231
|
const time = new Date().toISOString();
|
|
44232
|
-
return `<entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="${httpClient.defaults.baseURL}"> <id>${httpClient.defaults.baseURL}/Repositories('${name}')</id> <title type="text">Repositories('${name}')</title> <updated>${time}</updated> <category term="/UI5/ABAP_REPOSITORY_SRV.Repository" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> <link href="Repositories('${name}')" rel="edit" title="Repository"/> <content type="application/xml"> <m:properties> <d:Name>${name}</d:Name> <d:Package>${abapPackage
|
|
44232
|
+
return `<entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="${httpClient.defaults.baseURL}"> <id>${httpClient.defaults.baseURL}/Repositories('${name}')</id> <title type="text">Repositories('${name}')</title> <updated>${time}</updated> <category term="/UI5/ABAP_REPOSITORY_SRV.Repository" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> <link href="Repositories('${name}')" rel="edit" title="Repository"/> <content type="application/xml"> <m:properties> <d:Name>${name}</d:Name> <d:Package>${abapPackage == null ? void 0 : abapPackage.toUpperCase()}</d:Package> <d:Description>${description}</d:Description> <d:ZipArchive>${base64Data}</d:ZipArchive> <d:Info/> </m:properties> </content></entry>`;
|
|
44233
44233
|
}
|
|
44234
44234
|
async updateRepoRequest(isExisting, appName, httpClient, payload, config2, tryCount = 1) {
|
|
44235
44235
|
var _a2, _b;
|
|
@@ -44242,12 +44242,12 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
44242
44242
|
}
|
|
44243
44243
|
return isExisting ? await httpClient.put(`/Repositories('${encodeURIComponent(appName)}')`, payload, config2) : await httpClient.post("/Repositories", payload, config2);
|
|
44244
44244
|
} catch (error3) {
|
|
44245
|
-
if (((_a2 = error3
|
|
44245
|
+
if (((_a2 = error3 == null ? void 0 : error3.response) == null ? void 0 : _a2.status) === 504) {
|
|
44246
44246
|
if (tryCount >= 3) {
|
|
44247
44247
|
throw error3;
|
|
44248
44248
|
}
|
|
44249
44249
|
return await this.updateRepoRequest(isExisting, appName, httpClient, payload, config2, ++tryCount);
|
|
44250
|
-
} else if ((_b = config2
|
|
44250
|
+
} else if ((_b = config2 == null ? void 0 : config2.params) == null ? void 0 : _b.TestMode) {
|
|
44251
44251
|
return error3.response;
|
|
44252
44252
|
} else {
|
|
44253
44253
|
throw error3;
|
|
@@ -44262,7 +44262,7 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
44262
44262
|
}
|
|
44263
44263
|
return await httpClient.delete(`/Repositories('${encodeURIComponent(appName)}')`, config2);
|
|
44264
44264
|
} catch (error3) {
|
|
44265
|
-
if (((_a2 = error3
|
|
44265
|
+
if (((_a2 = error3 == null ? void 0 : error3.response) == null ? void 0 : _a2.status) === 400) {
|
|
44266
44266
|
if (tryCount >= 2) {
|
|
44267
44267
|
throw error3;
|
|
44268
44268
|
}
|
|
@@ -45301,8 +45301,8 @@ var require_utils7 = __commonJS({
|
|
|
45301
45301
|
exports2.xmlToJson = xmlToJson;
|
|
45302
45302
|
function guessAuthType({ credentials, fallback: fallback3 = false }) {
|
|
45303
45303
|
var _a2, _b;
|
|
45304
|
-
let authType = (credentials
|
|
45305
|
-
if (!authType && credentials && ((_b = (_a2 = credentials.serviceInfo)
|
|
45304
|
+
let authType = (credentials == null ? void 0 : credentials.serviceKeys) || (credentials == null ? void 0 : credentials.serviceKeysContents) ? __1.AuthenticationType.OAuth2RefreshToken : void 0;
|
|
45305
|
+
if (!authType && credentials && ((_b = (_a2 = credentials.serviceInfo) == null ? void 0 : _a2.uaa) == null ? void 0 : _b.username)) {
|
|
45306
45306
|
authType = __1.AuthenticationType.OAuth2ClientCredential;
|
|
45307
45307
|
}
|
|
45308
45308
|
if (!authType && fallback3) {
|
|
@@ -45412,15 +45412,20 @@ var require_atoCatalog = __commonJS({
|
|
|
45412
45412
|
}
|
|
45413
45413
|
static getAtoData(atoDataXml) {
|
|
45414
45414
|
const atoData = utils_1.xmlToJson(atoDataXml);
|
|
45415
|
+
if (!atoData) {
|
|
45416
|
+
throw new Error("Invalid or empty Data XML contents");
|
|
45417
|
+
}
|
|
45415
45418
|
const settings = atoData["settings"];
|
|
45416
|
-
|
|
45419
|
+
if (!settings) {
|
|
45420
|
+
throw new Error("Invalid or empty Data XML settings");
|
|
45421
|
+
}
|
|
45422
|
+
return {
|
|
45417
45423
|
tenantType: settings.tenantType,
|
|
45418
45424
|
operationsType: settings.operationsType,
|
|
45419
45425
|
isExtensibilityDevSystem: settings.isExtensibilityDevelopmentSystem === true,
|
|
45420
45426
|
devPackage: settings.developmentPackage,
|
|
45421
45427
|
devPrefix: settings.developmentPrefix
|
|
45422
45428
|
};
|
|
45423
|
-
return atoSettings;
|
|
45424
45429
|
}
|
|
45425
45430
|
};
|
|
45426
45431
|
exports2.AtoCatalog = AtoCatalog;
|
|
@@ -45451,11 +45456,11 @@ var require_v2Catalog = __commonJS({
|
|
|
45451
45456
|
var V2Catalog = class extends common_1.Catalog {
|
|
45452
45457
|
constructor({ system, credentials = void 0, log: log7 = console, connection = void 0, postConnectionCallback }) {
|
|
45453
45458
|
var _a2, _b;
|
|
45454
|
-
if ((credentials
|
|
45459
|
+
if ((credentials == null ? void 0 : credentials.serviceKeys) || (credentials == null ? void 0 : credentials.serviceKeysContents)) {
|
|
45455
45460
|
const serviceInfo = uaaOauth_1.getServiceInfo(credentials);
|
|
45456
45461
|
credentials.serviceInfo = serviceInfo;
|
|
45457
45462
|
system.url = serviceInfo.url;
|
|
45458
|
-
if ((_b = (_a2 = serviceInfo.catalogs)
|
|
45463
|
+
if ((_b = (_a2 = serviceInfo.catalogs) == null ? void 0 : _a2.abap) == null ? void 0 : _b.path) {
|
|
45459
45464
|
system.service = serviceInfo.catalogs.abap.path;
|
|
45460
45465
|
}
|
|
45461
45466
|
} else if (!system.service) {
|
|
@@ -45493,7 +45498,7 @@ var require_v2Catalog = __commonJS({
|
|
|
45493
45498
|
if (services.length > 1) {
|
|
45494
45499
|
const servicesWithSameNameSpace = services.filter((service) => {
|
|
45495
45500
|
var _a2;
|
|
45496
|
-
return (_a2 = service.ServiceUrl)
|
|
45501
|
+
return (_a2 = service.ServiceUrl) == null ? void 0 : _a2.toUpperCase().includes(path4.toUpperCase());
|
|
45497
45502
|
});
|
|
45498
45503
|
if (servicesWithSameNameSpace.length > 1) {
|
|
45499
45504
|
this.log.warn("Service filter was not sufficient to identify one service.");
|
|
@@ -45555,7 +45560,7 @@ var require_v4Catalog = __commonJS({
|
|
|
45555
45560
|
var common_1 = require_common6();
|
|
45556
45561
|
var V4Catalog = class extends common_1.Catalog {
|
|
45557
45562
|
constructor({ system, credentials = void 0, log: log7 = console, connection = void 0, postConnectionCallback }) {
|
|
45558
|
-
if ((credentials
|
|
45563
|
+
if ((credentials == null ? void 0 : credentials.serviceKeys) || (credentials == null ? void 0 : credentials.serviceKeysContents)) {
|
|
45559
45564
|
const serviceInfo = uaaOauth_1.getServiceInfo(credentials);
|
|
45560
45565
|
credentials.serviceInfo = serviceInfo;
|
|
45561
45566
|
system.url = serviceInfo.url;
|
|
@@ -45582,11 +45587,11 @@ var require_v4Catalog = __commonJS({
|
|
|
45582
45587
|
const respValues = await this.get(`${servicePath}&${common_1.ODATA_COUNT_QUERY}`);
|
|
45583
45588
|
this.services = this.services.concat(this.parseServiceData(respValues.value, recommended));
|
|
45584
45589
|
if (respValues["@odata.nextLink"]) {
|
|
45585
|
-
let skipval = parseInt((_a2 = respValues["@odata.nextLink"])
|
|
45590
|
+
let skipval = parseInt((_a2 = respValues["@odata.nextLink"]) == null ? void 0 : _a2.split("skiptoken=")[1]);
|
|
45586
45591
|
while (!isNaN(skipval) && skipval > 0) {
|
|
45587
45592
|
const groupsResp = await this.get(`${servicePath}&${common_1.ODATA_SKIP_QUERY}=${skipval}`);
|
|
45588
45593
|
this.services.push(...this.parseServiceData(groupsResp.value, recommended));
|
|
45589
|
-
skipval = parseInt((_b = groupsResp["@odata.nextLink"])
|
|
45594
|
+
skipval = parseInt((_b = groupsResp["@odata.nextLink"]) == null ? void 0 : _b.split("skiptoken=")[1]);
|
|
45590
45595
|
}
|
|
45591
45596
|
}
|
|
45592
45597
|
}
|
|
@@ -45691,7 +45696,7 @@ var require_sapSystem = __commonJS({
|
|
|
45691
45696
|
this.postConnectionCallbackInitialized = false;
|
|
45692
45697
|
this._name = name;
|
|
45693
45698
|
if (this.config.scp === void 0) {
|
|
45694
|
-
this.config.scp = !!(credentials
|
|
45699
|
+
this.config.scp = !!(credentials == null ? void 0 : credentials.serviceKeysContents) || !!(credentials == null ? void 0 : credentials.serviceKeys);
|
|
45695
45700
|
}
|
|
45696
45701
|
this._unSaved = unSaved;
|
|
45697
45702
|
this._userDisplayName = userDisplayName;
|
|
@@ -45700,7 +45705,7 @@ var require_sapSystem = __commonJS({
|
|
|
45700
45705
|
postConnectionCallback() {
|
|
45701
45706
|
var _a2;
|
|
45702
45707
|
if (!this.postConnectionCallbackInitialized) {
|
|
45703
|
-
this._postConnectionCallback = (_a2 = this._postConnectionCallbackCreator)
|
|
45708
|
+
this._postConnectionCallback = (_a2 = this._postConnectionCallbackCreator) == null ? void 0 : _a2.call(this, this);
|
|
45704
45709
|
this.postConnectionCallbackInitialized = true;
|
|
45705
45710
|
}
|
|
45706
45711
|
return this._postConnectionCallback;
|
|
@@ -45720,7 +45725,7 @@ var require_sapSystem = __commonJS({
|
|
|
45720
45725
|
}
|
|
45721
45726
|
get refreshToken() {
|
|
45722
45727
|
var _a2;
|
|
45723
|
-
return (_a2 = this.credentials)
|
|
45728
|
+
return (_a2 = this.credentials) == null ? void 0 : _a2.refreshToken;
|
|
45724
45729
|
}
|
|
45725
45730
|
set refreshToken(value) {
|
|
45726
45731
|
this.credentials = Object.assign(this.credentials || {}, { refreshToken: value });
|
|
@@ -45733,15 +45738,15 @@ var require_sapSystem = __commonJS({
|
|
|
45733
45738
|
}
|
|
45734
45739
|
get username() {
|
|
45735
45740
|
var _a2;
|
|
45736
|
-
return (_a2 = this.credentials)
|
|
45741
|
+
return (_a2 = this.credentials) == null ? void 0 : _a2.username;
|
|
45737
45742
|
}
|
|
45738
45743
|
get password() {
|
|
45739
45744
|
var _a2;
|
|
45740
|
-
return (_a2 = this.credentials)
|
|
45745
|
+
return (_a2 = this.credentials) == null ? void 0 : _a2.password;
|
|
45741
45746
|
}
|
|
45742
45747
|
get serviceKeys() {
|
|
45743
45748
|
var _a2;
|
|
45744
|
-
return (_a2 = this.credentials)
|
|
45749
|
+
return (_a2 = this.credentials) == null ? void 0 : _a2.serviceKeysContents;
|
|
45745
45750
|
}
|
|
45746
45751
|
get unSaved() {
|
|
45747
45752
|
return this._unSaved;
|
|
@@ -45780,15 +45785,15 @@ var require_sapSystem = __commonJS({
|
|
|
45780
45785
|
}
|
|
45781
45786
|
isOnPremSystem() {
|
|
45782
45787
|
var _a2;
|
|
45783
|
-
return ((_a2 = this.config)
|
|
45788
|
+
return ((_a2 = this.config) == null ? void 0 : _a2.authenticationType) === ux_store_1.AuthenticationType.Basic || Object.keys(this.credentials).length !== 0 && !(this.isScp() || this.isS4HC());
|
|
45784
45789
|
}
|
|
45785
45790
|
isS4HC() {
|
|
45786
45791
|
var _a2;
|
|
45787
|
-
return ((_a2 = this.config)
|
|
45792
|
+
return ((_a2 = this.config) == null ? void 0 : _a2.authenticationType) === ux_store_1.AuthenticationType.ReentranceTicket;
|
|
45788
45793
|
}
|
|
45789
45794
|
addS4HCSuffix(name) {
|
|
45790
45795
|
const S4HC_SUFFIX = " (S4HC)";
|
|
45791
|
-
return (name
|
|
45796
|
+
return (name == null ? void 0 : name.trim().match(`${ux_common_utils_1.escapeRegExp(S4HC_SUFFIX)}$`)) ? name : name + S4HC_SUFFIX;
|
|
45792
45797
|
}
|
|
45793
45798
|
get bareName() {
|
|
45794
45799
|
return stripOldSCPSuffix(this.name);
|
|
@@ -45812,27 +45817,27 @@ var require_sapSystem = __commonJS({
|
|
|
45812
45817
|
var _a2;
|
|
45813
45818
|
const urlString = () => {
|
|
45814
45819
|
var _a3, _b, _c;
|
|
45815
|
-
const url = (_b = (_a3 = this.config)
|
|
45820
|
+
const url = (_b = (_a3 = this.config) == null ? void 0 : _a3.url) == null ? void 0 : _b.trim();
|
|
45816
45821
|
if (url) {
|
|
45817
|
-
const client = ((_c = this.config)
|
|
45822
|
+
const client = ((_c = this.config) == null ? void 0 : _c.client) ? `?sap-client=${this.config.client}` : "";
|
|
45818
45823
|
return url + client;
|
|
45819
45824
|
} else {
|
|
45820
45825
|
return void 0;
|
|
45821
45826
|
}
|
|
45822
45827
|
};
|
|
45823
|
-
return ((_a2 = this.config)
|
|
45828
|
+
return ((_a2 = this.config) == null ? void 0 : _a2.destination) || urlString() || this.getDisplayName() || "";
|
|
45824
45829
|
}
|
|
45825
45830
|
serialize() {
|
|
45826
45831
|
var _a2, _b, _c, _d, _e, _f;
|
|
45827
45832
|
return new ux_store_1.BackendSystem({
|
|
45828
45833
|
name: this._name,
|
|
45829
|
-
url: (_a2 = this.config)
|
|
45830
|
-
client: (_b = this.config)
|
|
45831
|
-
authenticationType: (_c = this.config)
|
|
45832
|
-
serviceKeys: (_d = this.credentials)
|
|
45834
|
+
url: (_a2 = this.config) == null ? void 0 : _a2.url,
|
|
45835
|
+
client: (_b = this.config) == null ? void 0 : _b.client,
|
|
45836
|
+
authenticationType: (_c = this.config) == null ? void 0 : _c.authenticationType,
|
|
45837
|
+
serviceKeys: (_d = this.credentials) == null ? void 0 : _d.serviceKeysContents,
|
|
45833
45838
|
refreshToken: this.refreshToken,
|
|
45834
|
-
username: (_e = this.credentials)
|
|
45835
|
-
password: (_f = this.credentials)
|
|
45839
|
+
username: (_e = this.credentials) == null ? void 0 : _e.username,
|
|
45840
|
+
password: (_f = this.credentials) == null ? void 0 : _f.password,
|
|
45836
45841
|
userDisplayName: this.userDisplayName
|
|
45837
45842
|
});
|
|
45838
45843
|
}
|
|
@@ -45908,7 +45913,7 @@ var require_sapSystem = __commonJS({
|
|
|
45908
45913
|
}
|
|
45909
45914
|
isSameSystem(url, client) {
|
|
45910
45915
|
var _a2, _b, _c;
|
|
45911
|
-
return ((_b = (_a2 = this.url)
|
|
45916
|
+
return ((_b = (_a2 = this.url) == null ? void 0 : _a2.trim()) == null ? void 0 : _b.replace(/\/$/, "")) === ((_c = url == null ? void 0 : url.trim()) == null ? void 0 : _c.replace(/\/$/, "")) && this.client === client;
|
|
45912
45917
|
}
|
|
45913
45918
|
};
|
|
45914
45919
|
exports2.SapSystem = SapSystem2;
|
|
@@ -45961,14 +45966,14 @@ var require_systemStore = __commonJS({
|
|
|
45961
45966
|
}
|
|
45962
45967
|
}
|
|
45963
45968
|
async save(system) {
|
|
45964
|
-
if (typeof (system
|
|
45969
|
+
if (typeof (system == null ? void 0 : system.serialize) !== "function") {
|
|
45965
45970
|
this.logger.warn("system does not have a serialize method, unable to save");
|
|
45966
45971
|
} else {
|
|
45967
45972
|
await this.storeService.write(system.serialize());
|
|
45968
45973
|
}
|
|
45969
45974
|
}
|
|
45970
45975
|
async delete(system) {
|
|
45971
|
-
if (typeof (system
|
|
45976
|
+
if (typeof (system == null ? void 0 : system.serialize) !== "function") {
|
|
45972
45977
|
this.logger.warn("system does not have a serialize method, unable to delete");
|
|
45973
45978
|
} else {
|
|
45974
45979
|
return this.storeService.delete(system.serialize());
|
|
@@ -46006,7 +46011,7 @@ var require_system = __commonJS({
|
|
|
46006
46011
|
url: destination.Host,
|
|
46007
46012
|
destination: destination.Name,
|
|
46008
46013
|
destinationAuthType: destination.Authentication,
|
|
46009
|
-
scp: (_b = (_a2 = destination.WebIDEUsage)
|
|
46014
|
+
scp: (_b = (_a2 = destination.WebIDEUsage) == null ? void 0 : _a2.includes("abap_cloud")) != null ? _b : false,
|
|
46010
46015
|
destinationAttributes: Object.assign({}, destination),
|
|
46011
46016
|
client: destination["sap-client"]
|
|
46012
46017
|
});
|
|
@@ -46098,7 +46103,7 @@ var require_system = __commonJS({
|
|
|
46098
46103
|
}
|
|
46099
46104
|
exports2.getSapSystem = getSapSystem2;
|
|
46100
46105
|
function newSapSystem(name, url, client, credentials, unSaved = false) {
|
|
46101
|
-
const userDisplayName = unSaved ? credentials
|
|
46106
|
+
const userDisplayName = unSaved ? credentials == null ? void 0 : credentials.username : void 0;
|
|
46102
46107
|
return new sapSystem_1.SapSystem(name, { url, client }, credentials, userDisplayName, unSaved, postConnectionCallbackCreator);
|
|
46103
46108
|
}
|
|
46104
46109
|
exports2.newSapSystem = newSapSystem;
|
|
@@ -46195,7 +46200,7 @@ var require_featureToggle = __commonJS({
|
|
|
46195
46200
|
if ((feature.includes(exports2.FeatureToggleKey) || feature === exports2.ExperimentalFeatures) && FeatureToggleAccess.vscode) {
|
|
46196
46201
|
const toggleKey = feature.slice(0, feature.lastIndexOf("."));
|
|
46197
46202
|
const toggleId = feature.slice(feature.lastIndexOf(".") + 1, feature.length);
|
|
46198
|
-
toggleConfigValue = (_a2 = FeatureToggleAccess.vscode.workspace.getConfiguration(toggleKey))
|
|
46203
|
+
toggleConfigValue = (_a2 = FeatureToggleAccess.vscode.workspace.getConfiguration(toggleKey)) == null ? void 0 : _a2.get(toggleId);
|
|
46199
46204
|
} else {
|
|
46200
46205
|
toggleConfigValue = false;
|
|
46201
46206
|
}
|
|
@@ -46263,7 +46268,7 @@ var require_featureToggle = __commonJS({
|
|
|
46263
46268
|
const enableInternalFeaturesSetting = "sap.ux.internal.enableInternalFeatures";
|
|
46264
46269
|
let internalEnabled = false;
|
|
46265
46270
|
if (FeatureToggleAccess.vscode) {
|
|
46266
|
-
const internalSetting = FeatureToggleAccess.vscode.workspace ? (_a2 = FeatureToggleAccess.vscode.workspace.getConfiguration())
|
|
46271
|
+
const internalSetting = FeatureToggleAccess.vscode.workspace ? (_a2 = FeatureToggleAccess.vscode.workspace.getConfiguration()) == null ? void 0 : _a2.get(enableInternalFeaturesSetting) : false;
|
|
46267
46272
|
internalEnabled = internalSetting === true ? true : false;
|
|
46268
46273
|
}
|
|
46269
46274
|
if (process.env.TOOLSUITE_INTERNAL && process.env.TOOLSUITE_INTERNAL === "true") {
|
|
@@ -46509,8 +46514,8 @@ var require_ui5_info = __commonJS({
|
|
|
46509
46514
|
async function parseUI5VersionsOverview() {
|
|
46510
46515
|
const response = await requestUI5Versions("https://ui5.sap.com", `/${"versionoverview.json"}`);
|
|
46511
46516
|
const result2 = JSON.parse(JSON.stringify(response)).versions.map((ver) => {
|
|
46512
|
-
var
|
|
46513
|
-
const parsedVersion = (
|
|
46517
|
+
var _a2;
|
|
46518
|
+
const parsedVersion = (_a2 = semver_1.coerce(ver.version)) == null ? void 0 : _a2.version;
|
|
46514
46519
|
if (parsedVersion !== void 0) {
|
|
46515
46520
|
return {
|
|
46516
46521
|
version: parsedVersion,
|
|
@@ -46551,44 +46556,44 @@ var require_ui5_info = __commonJS({
|
|
|
46551
46556
|
let officialVersions = [];
|
|
46552
46557
|
let snapshotVersions = [];
|
|
46553
46558
|
try {
|
|
46554
|
-
officialVersions = (filterOptions
|
|
46559
|
+
officialVersions = (filterOptions == null ? void 0 : filterOptions.onlyNpmVersion) ? await retrieveNpmUI5Versions(filterOptions.fioriElementsVersion || "v2", filterOptions.ui5SelectedVersion) : await exports2.retrieveUI5VersionsCache("officialVersions", filterOptions == null ? void 0 : filterOptions.useCache);
|
|
46555
46560
|
} catch (error3) {
|
|
46556
46561
|
logger.warning(`Request to '${"https://ui5.sap.com"}' failed. Error was: '${error3.message}'. Fallback to default UI5 versions`);
|
|
46557
46562
|
officialVersions = DEFAULT_UI5_VERSIONS.slice();
|
|
46558
46563
|
}
|
|
46559
|
-
if (filterOptions
|
|
46564
|
+
if (filterOptions == null ? void 0 : filterOptions.includeSnapshots) {
|
|
46560
46565
|
try {
|
|
46561
|
-
snapshotVersions = await exports2.retrieveUI5VersionsCache("snapshotsVersions", filterOptions
|
|
46566
|
+
snapshotVersions = await exports2.retrieveUI5VersionsCache("snapshotsVersions", filterOptions == null ? void 0 : filterOptions.useCache);
|
|
46562
46567
|
} catch (error3) {
|
|
46563
46568
|
logger.error(`Request to '${"https://sapui5preview-sapui5.dispatcher.int.sap.eu2.hana.ondemand.com"}' failed. Error was: '${error3.message}'`);
|
|
46564
46569
|
}
|
|
46565
46570
|
}
|
|
46566
46571
|
let versions = [...officialVersions, ...snapshotVersions].sort(snapshotSort);
|
|
46567
|
-
if (filterOptions
|
|
46568
|
-
versions = filterNewerEqual(versions, filterOptions
|
|
46569
|
-
} else if ((filterOptions
|
|
46572
|
+
if (filterOptions == null ? void 0 : filterOptions.minSupportedUI5Version) {
|
|
46573
|
+
versions = filterNewerEqual(versions, filterOptions == null ? void 0 : filterOptions.minSupportedUI5Version);
|
|
46574
|
+
} else if ((filterOptions == null ? void 0 : filterOptions.fioriElementsVersion) && filterOptions.fioriElementsVersion === "v4") {
|
|
46570
46575
|
versions = filterNewerEqual(versions, exports2.MIN_UI5_VERSION_V4_TEMPLATE);
|
|
46571
46576
|
} else {
|
|
46572
46577
|
versions = filterNewerEqual(versions, exports2.MIN_UI5_VERSION);
|
|
46573
46578
|
}
|
|
46574
|
-
if (filterOptions
|
|
46579
|
+
if (filterOptions == null ? void 0 : filterOptions.onlyVersionNumbers) {
|
|
46575
46580
|
versions = versions.filter((ele) => ele && /^\d+(\.\d+)*$/.test(ele));
|
|
46576
46581
|
}
|
|
46577
46582
|
if (returnLatestValue && versions[0].includes("Latest")) {
|
|
46578
46583
|
versions[0] = latestUI5Version;
|
|
46579
46584
|
}
|
|
46580
|
-
return (filterOptions
|
|
46585
|
+
return (filterOptions == null ? void 0 : filterOptions.removeDuplicateVersions) === true ? [...new Set(versions)] : versions;
|
|
46581
46586
|
}
|
|
46582
46587
|
exports2.retrieveUI5Versions = retrieveUI5Versions;
|
|
46583
46588
|
async function getUI5VersionsEnhanced(filterOptions) {
|
|
46584
46589
|
let filteredUI5Versions = await retrieveUI5Versions(filterOptions, void 0, true);
|
|
46585
46590
|
const defaultUI5Version = filteredUI5Versions[0];
|
|
46586
|
-
if (!(filterOptions
|
|
46591
|
+
if (!(filterOptions == null ? void 0 : filterOptions.includeSnapshots)) {
|
|
46587
46592
|
filteredUI5Versions = sortUI5Versions(filteredUI5Versions);
|
|
46588
46593
|
}
|
|
46589
46594
|
let ui5VersionsOverview = void 0;
|
|
46590
|
-
if ((filterOptions
|
|
46591
|
-
ui5VersionsOverview = await exports2.retrieveUI5VersionsCache("overview", filterOptions
|
|
46595
|
+
if ((filterOptions == null ? void 0 : filterOptions.groupUI5Versions) === true) {
|
|
46596
|
+
ui5VersionsOverview = await exports2.retrieveUI5VersionsCache("overview", filterOptions == null ? void 0 : filterOptions.useCache);
|
|
46592
46597
|
}
|
|
46593
46598
|
return filteredUI5Versions.map((ui5) => {
|
|
46594
46599
|
const ui5Version = {
|
|
@@ -46599,7 +46604,7 @@ var require_ui5_info = __commonJS({
|
|
|
46599
46604
|
default: defaultUI5Version === ui5
|
|
46600
46605
|
}
|
|
46601
46606
|
};
|
|
46602
|
-
if ((filterOptions
|
|
46607
|
+
if ((filterOptions == null ? void 0 : filterOptions.groupUI5Versions) === true && ui5VersionsOverview !== void 0) {
|
|
46603
46608
|
ui5Version.version.maintained = ui5VersionsOverview.some((v) => {
|
|
46604
46609
|
if (v !== void 0) {
|
|
46605
46610
|
return `${semver_1.major(v.version)}.${semver_1.minor(v.version)}` === `${semver_1.major(ui5)}.${semver_1.minor(ui5)}` && v.support === types_1.inMaintenance;
|
|
@@ -46710,14 +46715,14 @@ var require_ui5_info = __commonJS({
|
|
|
46710
46715
|
}
|
|
46711
46716
|
exports2.getSapSystemUI5Version = getSapSystemUI5Version2;
|
|
46712
46717
|
async function getLatestSapui5Version() {
|
|
46713
|
-
var
|
|
46718
|
+
var _a2;
|
|
46714
46719
|
let version = void 0;
|
|
46715
46720
|
try {
|
|
46716
46721
|
const requestUrl = `${"https://ui5.sap.com"}/${"version.json"}`;
|
|
46717
46722
|
const response = await axios_1.default.get(requestUrl);
|
|
46718
46723
|
if (response.status === 200) {
|
|
46719
46724
|
const ui5Versions = response.data;
|
|
46720
|
-
version = (
|
|
46725
|
+
version = (_a2 = ui5Versions == null ? void 0 : ui5Versions.latest) == null ? void 0 : _a2.version;
|
|
46721
46726
|
}
|
|
46722
46727
|
} catch {
|
|
46723
46728
|
version = void 0;
|
|
@@ -58594,7 +58599,7 @@ var require_package5 = __commonJS({
|
|
|
58594
58599
|
"../lib/telemetry/dist/package.json"(exports2, module2) {
|
|
58595
58600
|
module2.exports = {
|
|
58596
58601
|
name: "@sap/ux-telemetry",
|
|
58597
|
-
version: "1.6.
|
|
58602
|
+
version: "1.6.4",
|
|
58598
58603
|
description: "SAP Fiori tools telemetry library",
|
|
58599
58604
|
main: "dist/src/index.js",
|
|
58600
58605
|
author: "SAP SE",
|
|
@@ -58619,10 +58624,10 @@ var require_package5 = __commonJS({
|
|
|
58619
58624
|
},
|
|
58620
58625
|
dependencies: {
|
|
58621
58626
|
"@sap-ux/store": "0.1.0",
|
|
58622
|
-
"@sap/ux-cds": "1.6.
|
|
58623
|
-
"@sap/ux-common-utils": "1.6.
|
|
58624
|
-
"@sap/ux-feature-toggle": "1.6.
|
|
58625
|
-
"@sap/ux-project-access": "1.6.
|
|
58627
|
+
"@sap/ux-cds": "1.6.4",
|
|
58628
|
+
"@sap/ux-common-utils": "1.6.4",
|
|
58629
|
+
"@sap/ux-feature-toggle": "1.6.4",
|
|
58630
|
+
"@sap/ux-project-access": "1.6.4",
|
|
58626
58631
|
applicationinsights: "1.4.1",
|
|
58627
58632
|
"performance-now": "2.1.0",
|
|
58628
58633
|
yaml: "2.0.0-10"
|
|
@@ -58829,7 +58834,7 @@ var require_system3 = __commonJS({
|
|
|
58829
58834
|
}
|
|
58830
58835
|
static getMatchingModulePath(module3, useFallbackModules) {
|
|
58831
58836
|
let modulePath = module3.filename || __dirname;
|
|
58832
|
-
if ((modulePath
|
|
58837
|
+
if ((modulePath == null ? void 0 : modulePath.indexOf("\\")) > -1) {
|
|
58833
58838
|
modulePath = modulePath.replace(/\\/g, "/");
|
|
58834
58839
|
}
|
|
58835
58840
|
const matchingPaths = useFallbackModules ? TelemetrySystem.fallbackModules : TelemetrySystem.modules;
|
|
@@ -58844,7 +58849,7 @@ var require_system3 = __commonJS({
|
|
|
58844
58849
|
let path4 = null;
|
|
58845
58850
|
matchingPaths.forEach((module3) => {
|
|
58846
58851
|
module3.patterns.forEach((patternRegExp) => {
|
|
58847
|
-
const matchToken = modulePath
|
|
58852
|
+
const matchToken = modulePath == null ? void 0 : modulePath.match(patternRegExp);
|
|
58848
58853
|
if (matchToken && matchToken.length > 0) {
|
|
58849
58854
|
path4 = matchToken[0];
|
|
58850
58855
|
TelemetrySystem.WORKSTREAM = module3.workStream;
|
|
@@ -61985,7 +61990,7 @@ var require_capProject = __commonJS({
|
|
|
61985
61990
|
if (!packageJson) {
|
|
61986
61991
|
packageJson = await parsePackageJson(projectRoot);
|
|
61987
61992
|
}
|
|
61988
|
-
return !!((packageJson
|
|
61993
|
+
return !!((packageJson == null ? void 0 : packageJson.cds) || ((_a2 = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _a2["@sap/cds"]));
|
|
61989
61994
|
}
|
|
61990
61995
|
exports2.isCapNodeJsProject = isCapNodeJsProject;
|
|
61991
61996
|
async function isCapJavaProject(projectRoot) {
|
|
@@ -62077,7 +62082,7 @@ var require_webapp2 = __commonJS({
|
|
|
62077
62082
|
let webappPath = project_spec_1.DirName.Webapp;
|
|
62078
62083
|
try {
|
|
62079
62084
|
const yamlContent = await file_1.readFile(path_1.join(root, project_spec_1.FileName.Ui5Yaml));
|
|
62080
|
-
webappPath = (_e = (_d = (_c = (_b = (_a2 = yaml.parse(yamlContent))
|
|
62085
|
+
webappPath = (_e = (_d = (_c = (_b = (_a2 = yaml.parse(yamlContent)) == null ? void 0 : _a2.resources) == null ? void 0 : _b.configuration) == null ? void 0 : _c.paths) == null ? void 0 : _d.webapp) != null ? _e : project_spec_1.DirName.Webapp;
|
|
62081
62086
|
} catch {
|
|
62082
62087
|
webappPath = project_spec_1.DirName.Webapp;
|
|
62083
62088
|
}
|
|
@@ -62156,19 +62161,19 @@ var require_mockServer = __commonJS({
|
|
|
62156
62161
|
async function getMockServerConfig(cfgFileDir, cfgFileName = project_spec_1.FileName.Ui5MockYaml) {
|
|
62157
62162
|
var _a2;
|
|
62158
62163
|
const ui5Config = await yamlFile_1.getParsedUi5YamlConfig(cfgFileDir, cfgFileName);
|
|
62159
|
-
const middlewares = (_a2 = ui5Config
|
|
62164
|
+
const middlewares = (_a2 = ui5Config == null ? void 0 : ui5Config.server) == null ? void 0 : _a2.customMiddleware;
|
|
62160
62165
|
if (middlewares) {
|
|
62161
62166
|
let mockMW;
|
|
62162
62167
|
const mockMWName = "sap-fe-mockserver";
|
|
62163
62168
|
if (Array.isArray(middlewares)) {
|
|
62164
62169
|
mockMW = middlewares.find((mw) => mw.name === mockMWName);
|
|
62165
|
-
return (mockMW
|
|
62170
|
+
return (mockMW == null ? void 0 : mockMW.configuration) || null;
|
|
62166
62171
|
}
|
|
62167
62172
|
const middleware = middlewares;
|
|
62168
62173
|
if (middleware.name === mockMWName) {
|
|
62169
62174
|
mockMW = middleware;
|
|
62170
62175
|
}
|
|
62171
|
-
return (mockMW
|
|
62176
|
+
return (mockMW == null ? void 0 : mockMW.configuration) || null;
|
|
62172
62177
|
}
|
|
62173
62178
|
return null;
|
|
62174
62179
|
}
|
|
@@ -62198,7 +62203,7 @@ var require_mockServer = __commonJS({
|
|
|
62198
62203
|
services = await file_1.readJSON(jsonConfigPath);
|
|
62199
62204
|
} else {
|
|
62200
62205
|
const dynamicConfig = await Promise.resolve().then(() => __importStar(require(moduleConfigPath)));
|
|
62201
|
-
services = dynamicConfig
|
|
62206
|
+
services = dynamicConfig == null ? void 0 : dynamicConfig.default;
|
|
62202
62207
|
}
|
|
62203
62208
|
} catch (e) {
|
|
62204
62209
|
throw new Error(i18n_1.i18n.t("ERROR_UI5_YAML_DYNAMIC_CFG_IMPORT", {
|
|
@@ -62206,7 +62211,7 @@ var require_mockServer = __commonJS({
|
|
|
62206
62211
|
yamlFile: path_1.join(yamlCfgDirPath, project_spec_1.FileName.Ui5MockYaml)
|
|
62207
62212
|
}));
|
|
62208
62213
|
}
|
|
62209
|
-
return (services
|
|
62214
|
+
return (services == null ? void 0 : services.length) ? services : null;
|
|
62210
62215
|
}
|
|
62211
62216
|
function matchMockServiceByMetadataPath(mockService, metadataPath) {
|
|
62212
62217
|
const { metadataXmlPath } = mockService;
|
|
@@ -62493,7 +62498,7 @@ var require_utils9 = __commonJS({
|
|
|
62493
62498
|
return null;
|
|
62494
62499
|
}
|
|
62495
62500
|
const appPckJson = await file_1.readJSON(path_1.join(appRoot, project_spec_1.FileName.Package));
|
|
62496
|
-
if (appPckJson
|
|
62501
|
+
if (appPckJson == null ? void 0 : appPckJson.sapux) {
|
|
62497
62502
|
if (typeof appPckJson.sapux === "boolean" && appPckJson.sapux === true) {
|
|
62498
62503
|
return {
|
|
62499
62504
|
appRoot,
|
|
@@ -62572,7 +62577,7 @@ var require_utils9 = __commonJS({
|
|
|
62572
62577
|
result2.push(root);
|
|
62573
62578
|
}
|
|
62574
62579
|
} catch (error3) {
|
|
62575
|
-
logger
|
|
62580
|
+
logger == null ? void 0 : logger.info(`Invalid JSON ${path_1.join(root, project_spec_1.FileName.Package)}. Application Modeler will skip this project.`);
|
|
62576
62581
|
continue;
|
|
62577
62582
|
}
|
|
62578
62583
|
}
|
|
@@ -62647,7 +62652,7 @@ var require_utils9 = __commonJS({
|
|
|
62647
62652
|
};
|
|
62648
62653
|
const appServices = project.apps[appFolder].services;
|
|
62649
62654
|
if (services[name].settings) {
|
|
62650
|
-
appServices[name].local = ((_a2 = services[name].settings)
|
|
62655
|
+
appServices[name].local = ((_a2 = services[name].settings) == null ? void 0 : _a2.localUri) ? path_1.join(appFolder, project_spec_1.DirName.Webapp, services[name].settings.localUri) : "";
|
|
62651
62656
|
if (services[name].settings.annotations) {
|
|
62652
62657
|
project.apps[appFolder].annotations[name] = project.apps[appFolder].annotations[name] || [];
|
|
62653
62658
|
for (const id of services[name].settings.annotations) {
|
|
@@ -62710,7 +62715,7 @@ var require_utils9 = __commonJS({
|
|
|
62710
62715
|
function getI18nPath(manifestFolder, manifest) {
|
|
62711
62716
|
var _a2, _b, _c;
|
|
62712
62717
|
let relativePath;
|
|
62713
|
-
const i18nModel = ((_b = (_a2 = manifest
|
|
62718
|
+
const i18nModel = ((_b = (_a2 = manifest == null ? void 0 : manifest["sap.ui5"]) == null ? void 0 : _a2.models) == null ? void 0 : _b["i18n"]) || {};
|
|
62714
62719
|
if ("uri" in i18nModel && typeof i18nModel.uri === "string") {
|
|
62715
62720
|
relativePath = i18nModel.uri;
|
|
62716
62721
|
} else if ("settings" in i18nModel && typeof i18nModel.settings === "object" && "bundleUrl" in i18nModel.settings && typeof i18nModel.settings.bundleUrl === "string") {
|
|
@@ -62718,7 +62723,7 @@ var require_utils9 = __commonJS({
|
|
|
62718
62723
|
} else if ("settings" in i18nModel && typeof i18nModel.settings === "object" && "bundleName" in i18nModel.settings && typeof i18nModel.settings.bundleName === "string") {
|
|
62719
62724
|
const relBundleString = i18nModel.settings.bundleName.replace(manifest["sap.app"].id, "");
|
|
62720
62725
|
relativePath = `${path_1.join(...relBundleString.split("."))}.properties`;
|
|
62721
|
-
} else if (typeof ((_c = manifest
|
|
62726
|
+
} else if (typeof ((_c = manifest == null ? void 0 : manifest["sap.app"]) == null ? void 0 : _c.i18n) === "string") {
|
|
62722
62727
|
relativePath = manifest["sap.app"].i18n;
|
|
62723
62728
|
}
|
|
62724
62729
|
return relativePath ? path_1.join(manifestFolder, relativePath) : void 0;
|
|
@@ -62817,11 +62822,11 @@ var require_utils9 = __commonJS({
|
|
|
62817
62822
|
var _a2, _b, _c, _d;
|
|
62818
62823
|
if (manifest["sap.ui.generic.app"] || manifest["sap.ovp"]) {
|
|
62819
62824
|
return page_1.FioriElementsVersion.v2;
|
|
62820
|
-
} else if ((_b = (_a2 = manifest["sap.ui5"])
|
|
62825
|
+
} else if ((_b = (_a2 = manifest["sap.ui5"]) == null ? void 0 : _a2.routing) == null ? void 0 : _b.targets) {
|
|
62821
62826
|
let hasV4pPages = false;
|
|
62822
|
-
Object.keys((_d = (_c = manifest["sap.ui5"])
|
|
62827
|
+
Object.keys((_d = (_c = manifest["sap.ui5"]) == null ? void 0 : _c.routing) == null ? void 0 : _d.targets).forEach((target) => {
|
|
62823
62828
|
var _a3, _b2, _c2;
|
|
62824
|
-
if ((_c2 = (
|
|
62829
|
+
if ((_c2 = (_b2 = (_a3 = manifest["sap.ui5"]) == null ? void 0 : _a3.routing) == null ? void 0 : _b2.targets[target].name) == null ? void 0 : _c2.startsWith("sap.fe.templates.")) {
|
|
62825
62830
|
hasV4pPages = true;
|
|
62826
62831
|
}
|
|
62827
62832
|
});
|
|
@@ -62858,7 +62863,7 @@ var require_utils9 = __commonJS({
|
|
|
62858
62863
|
const manifestFile = path_1.join(root, webappPath, project_spec_1.FileName.Manifest);
|
|
62859
62864
|
if (await file_1.fileExists(manifestFile)) {
|
|
62860
62865
|
const manifest = await file_1.readJSON(manifestFile);
|
|
62861
|
-
ui5Version = (_b = (_a2 = manifest["sap.ui5"])
|
|
62866
|
+
ui5Version = (_b = (_a2 = manifest["sap.ui5"]) == null ? void 0 : _a2.dependencies) == null ? void 0 : _b.minUI5Version;
|
|
62862
62867
|
if (isNaN(parseFloat(ui5Version))) {
|
|
62863
62868
|
if (latestSapui5Version === void 0) {
|
|
62864
62869
|
latestSapui5Version = await ux_ui5_info_1.getLatestSapui5Version();
|
|
@@ -62912,45 +62917,45 @@ var require_utils9 = __commonJS({
|
|
|
62912
62917
|
const packageJson = await file_1.readJSON(packageJsonPath);
|
|
62913
62918
|
const cdsFilePaths = [path_1.join(path_1.dirname(appPath), project_spec_1.FileName.ServiceCds), path_1.join(path_1.dirname(appPath), project_spec_1.FileName.IndexCds)];
|
|
62914
62919
|
if (!Array.isArray(packageJson.sapux)) {
|
|
62915
|
-
logger
|
|
62920
|
+
logger == null ? void 0 : logger.error(i18n_1.i18n.t("ERROR_DEL_CAP_APP_SAPUX", { packageJsonPath }));
|
|
62916
62921
|
throw Error(i18n_1.i18n.t("ERROR_DEL_CAP_APP_SAPUX", { packageJsonPath }));
|
|
62917
62922
|
}
|
|
62918
|
-
logger
|
|
62923
|
+
logger == null ? void 0 : logger.info(i18n_1.i18n.t("INFO_DEL_CAP_APP", { appName, projectRoot }));
|
|
62919
62924
|
const posixAppPath = appPath.replace(/\\/g, "/");
|
|
62920
62925
|
packageJson.sapux = packageJson.sapux.filter((a) => !posixAppPath.endsWith(a));
|
|
62921
62926
|
if (packageJson.sapux.length === 0) {
|
|
62922
|
-
logger
|
|
62927
|
+
logger == null ? void 0 : logger.info(i18n_1.i18n.t("INFO_DEL_LAST_CAP_APP", { packageJsonPath }));
|
|
62923
62928
|
delete packageJson.sapux;
|
|
62924
62929
|
}
|
|
62925
|
-
if ((_a2 = packageJson.scripts)
|
|
62930
|
+
if ((_a2 = packageJson.scripts) == null ? void 0 : _a2[`watch-${appName}`]) {
|
|
62926
62931
|
delete packageJson.scripts[`watch-${appName}`];
|
|
62927
62932
|
}
|
|
62928
62933
|
await file_1.updateJSON(packageJsonPath, packageJson);
|
|
62929
|
-
logger
|
|
62934
|
+
logger == null ? void 0 : logger.info(i18n_1.i18n.t("INFO_DEL_CAP_APP_FILE_UPDATED", { packageJsonPath }));
|
|
62930
62935
|
await file_1.deleteDirectory(appPath);
|
|
62931
|
-
logger
|
|
62936
|
+
logger == null ? void 0 : logger.info(i18n_1.i18n.t("INFO_DEL_CAP_APP_DIR_DELETED", { appPath }));
|
|
62932
62937
|
const usingEntry = `using from './${appName}/annotations';`;
|
|
62933
62938
|
for (const cdsFilePath of cdsFilePaths) {
|
|
62934
62939
|
if (await file_1.fileExists(cdsFilePath)) {
|
|
62935
62940
|
try {
|
|
62936
62941
|
let cdsFile = await file_1.readFile(cdsFilePath);
|
|
62937
62942
|
if (cdsFile.indexOf(usingEntry) !== -1) {
|
|
62938
|
-
logger
|
|
62943
|
+
logger == null ? void 0 : logger.info(i18n_1.i18n.t("INFO_DEL_CAP_APP_DELETE_USING", { appName, cdsFilePath }));
|
|
62939
62944
|
cdsFile = cdsFile.replace(usingEntry, "");
|
|
62940
62945
|
if (cdsFile.replace(/\n/g, "").trim() === "") {
|
|
62941
|
-
logger
|
|
62946
|
+
logger == null ? void 0 : logger.info(i18n_1.i18n.t("INFO_DEL_CAP_APP_DEL_CDS", { cdsFilePath }));
|
|
62942
62947
|
await file_1.deleteFile(cdsFilePath);
|
|
62943
62948
|
} else {
|
|
62944
62949
|
await file_1.updateFile(cdsFilePath, cdsFile);
|
|
62945
62950
|
}
|
|
62946
62951
|
}
|
|
62947
62952
|
} catch (error3) {
|
|
62948
|
-
logger
|
|
62953
|
+
logger == null ? void 0 : logger.error(i18n_1.i18n.t("ERROR_DEL_CAP_APP_MODIFY_CDS", { cdsFilePath }));
|
|
62949
62954
|
}
|
|
62950
62955
|
}
|
|
62951
62956
|
}
|
|
62952
62957
|
if ((await file_1.readDirectory(path_1.dirname(appPath))).length === 0) {
|
|
62953
|
-
logger
|
|
62958
|
+
logger == null ? void 0 : logger.info(i18n_1.i18n.t("INFO_DEL_CAP_APP_FOLDER_EMPTY", { appPath: path_1.dirname(appPath) }));
|
|
62954
62959
|
await file_1.deleteDirectory(path_1.dirname(appPath));
|
|
62955
62960
|
}
|
|
62956
62961
|
}
|
|
@@ -62962,7 +62967,7 @@ var require_utils9 = __commonJS({
|
|
|
62962
62967
|
try {
|
|
62963
62968
|
const pomFile = await file_1.readFile(path_1.join(projectRoot, "pom.xml"));
|
|
62964
62969
|
const pomXml = fast_xml_parser_1.default.parse(pomFile);
|
|
62965
|
-
if ((_a2 = pomXml.project)
|
|
62970
|
+
if ((_a2 = pomXml.project) == null ? void 0 : _a2.artifactId) {
|
|
62966
62971
|
appId = pomXml.project.artifactId;
|
|
62967
62972
|
} else {
|
|
62968
62973
|
throw new Error();
|
|
@@ -62997,7 +63002,7 @@ var require_utils9 = __commonJS({
|
|
|
62997
63002
|
const { services, mockFolder } = await ui5Config_1.getMockServicesConfiguration(configDir, config2);
|
|
62998
63003
|
if (services) {
|
|
62999
63004
|
const mockService = ui5Config_1.findMockServiceByMetadataPath(services, serviceMetadataPath);
|
|
63000
|
-
if (mockService
|
|
63005
|
+
if (mockService == null ? void 0 : mockService.mockdataRootPath) {
|
|
63001
63006
|
const servicesConfigFilePath = mockFolder ? path_1.resolve(configDir, mockFolder) : configDir;
|
|
63002
63007
|
return path_1.resolve(servicesConfigFilePath, mockService.mockdataRootPath);
|
|
63003
63008
|
}
|
|
@@ -63087,7 +63092,7 @@ var require_toolsSuiteTelemetryDataProcessor = __commonJS({
|
|
|
63087
63092
|
const response = await axios_1.default.get(url);
|
|
63088
63093
|
if (response.data) {
|
|
63089
63094
|
const workspaceConfig = response.data;
|
|
63090
|
-
const devspace = (_b = (_a2 = workspaceConfig
|
|
63095
|
+
const devspace = (_b = (_a2 = workspaceConfig == null ? void 0 : workspaceConfig.config) == null ? void 0 : _a2.annotations) == null ? void 0 : _b.pack;
|
|
63091
63096
|
return devspace ? devspace : "";
|
|
63092
63097
|
}
|
|
63093
63098
|
} catch (error3) {
|
|
@@ -63171,7 +63176,7 @@ var require_toolsSuiteTelemetryDataProcessor = __commonJS({
|
|
|
63171
63176
|
if (fs_1.default.existsSync(deployConfigPath)) {
|
|
63172
63177
|
const deployConfigContent = await fs_1.default.promises.readFile(deployConfigPath, "utf-8");
|
|
63173
63178
|
const deployConfig = yaml_1.default.parse(deployConfigContent);
|
|
63174
|
-
const customTasks = (_a2 = deployConfig
|
|
63179
|
+
const customTasks = (_a2 = deployConfig == null ? void 0 : deployConfig.builder) == null ? void 0 : _a2.customTasks;
|
|
63175
63180
|
let isAbapReployTarget = false;
|
|
63176
63181
|
if (customTasks) {
|
|
63177
63182
|
for (const customTask of customTasks) {
|
|
@@ -79154,9 +79159,9 @@ var require_http2 = __commonJS({
|
|
|
79154
79159
|
}
|
|
79155
79160
|
});
|
|
79156
79161
|
|
|
79157
|
-
// ../../node_modules/
|
|
79162
|
+
// ../../node_modules/is-stream/index.js
|
|
79158
79163
|
var require_is_stream = __commonJS({
|
|
79159
|
-
"../../node_modules/
|
|
79164
|
+
"../../node_modules/is-stream/index.js"(exports2, module2) {
|
|
79160
79165
|
"use strict";
|
|
79161
79166
|
var isStream = (stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function";
|
|
79162
79167
|
isStream.writable = (stream) => isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object";
|
|
@@ -83979,7 +83984,7 @@ var require_toolsSuiteTelemetrySettings = __commonJS({
|
|
|
83979
83984
|
const deprecatedSetting = JSON.parse(content);
|
|
83980
83985
|
const propValues = deprecatedExtensionPropKeys.map((propKey) => {
|
|
83981
83986
|
var _a2;
|
|
83982
|
-
return (_a2 = deprecatedSetting[propKey])
|
|
83987
|
+
return (_a2 = deprecatedSetting[propKey]) != null ? _a2 : true;
|
|
83983
83988
|
});
|
|
83984
83989
|
const deprecatedEnableTelemetrySetting = propValues.reduce((prevValue, currentValue) => prevValue && currentValue);
|
|
83985
83990
|
exports2.setEnableTelemetry(deprecatedEnableTelemetrySetting);
|