@sap/ux-ui5-tooling 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +483 -381
- package/dist/markdowns/deploy/deploy.en.md +1 -1
- package/dist/middlewares/fiori-tools-appreload.js +36 -16
- package/dist/middlewares/fiori-tools-preview.js +491 -385
- package/dist/middlewares/fiori-tools-proxy.js +606 -493
- package/dist/tasks/cf-deploy/index.js +483 -381
- package/dist/tasks/deploy/index.js +483 -381
- package/dist/templates/control-property-editor/app.js +1 -1
- package/dist/templates/control-property-editor/ui5-adaptation.js +1 -1
- package/package.json +10 -12
package/dist/cli/index.js
CHANGED
|
@@ -23386,9 +23386,13 @@ var require_controls = __commonJS({
|
|
|
23386
23386
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
23387
23387
|
if (k2 === void 0)
|
|
23388
23388
|
k2 = k;
|
|
23389
|
-
Object.
|
|
23390
|
-
|
|
23391
|
-
|
|
23389
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23390
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23391
|
+
desc = { enumerable: true, get: function() {
|
|
23392
|
+
return m[k];
|
|
23393
|
+
} };
|
|
23394
|
+
}
|
|
23395
|
+
Object.defineProperty(o, k2, desc);
|
|
23392
23396
|
} : function(o, m, k, k2) {
|
|
23393
23397
|
if (k2 === void 0)
|
|
23394
23398
|
k2 = k;
|
|
@@ -23786,9 +23790,13 @@ var require_pages = __commonJS({
|
|
|
23786
23790
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
23787
23791
|
if (k2 === void 0)
|
|
23788
23792
|
k2 = k;
|
|
23789
|
-
Object.
|
|
23790
|
-
|
|
23791
|
-
|
|
23793
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23794
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23795
|
+
desc = { enumerable: true, get: function() {
|
|
23796
|
+
return m[k];
|
|
23797
|
+
} };
|
|
23798
|
+
}
|
|
23799
|
+
Object.defineProperty(o, k2, desc);
|
|
23792
23800
|
} : function(o, m, k, k2) {
|
|
23793
23801
|
if (k2 === void 0)
|
|
23794
23802
|
k2 = k;
|
|
@@ -23880,9 +23888,13 @@ var require_manifest = __commonJS({
|
|
|
23880
23888
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
23881
23889
|
if (k2 === void 0)
|
|
23882
23890
|
k2 = k;
|
|
23883
|
-
Object.
|
|
23884
|
-
|
|
23885
|
-
|
|
23891
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23892
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23893
|
+
desc = { enumerable: true, get: function() {
|
|
23894
|
+
return m[k];
|
|
23895
|
+
} };
|
|
23896
|
+
}
|
|
23897
|
+
Object.defineProperty(o, k2, desc);
|
|
23886
23898
|
} : function(o, m, k, k2) {
|
|
23887
23899
|
if (k2 === void 0)
|
|
23888
23900
|
k2 = k;
|
|
@@ -23921,9 +23933,13 @@ var require_webapp = __commonJS({
|
|
|
23921
23933
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
23922
23934
|
if (k2 === void 0)
|
|
23923
23935
|
k2 = k;
|
|
23924
|
-
Object.
|
|
23925
|
-
|
|
23926
|
-
|
|
23936
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23937
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23938
|
+
desc = { enumerable: true, get: function() {
|
|
23939
|
+
return m[k];
|
|
23940
|
+
} };
|
|
23941
|
+
}
|
|
23942
|
+
Object.defineProperty(o, k2, desc);
|
|
23927
23943
|
} : function(o, m, k, k2) {
|
|
23928
23944
|
if (k2 === void 0)
|
|
23929
23945
|
k2 = k;
|
|
@@ -23997,7 +24013,7 @@ var require_constants2 = __commonJS({
|
|
|
23997
24013
|
FioriToolsSettings2["migrationSettingsFile"] = "migrationSettings.json";
|
|
23998
24014
|
})(FioriToolsSettings = exports2.FioriToolsSettings || (exports2.FioriToolsSettings = {}));
|
|
23999
24015
|
var getFioriToolsDirectory = () => {
|
|
24000
|
-
return path_1.join(os_1.homedir(), FioriToolsSettings.dir);
|
|
24016
|
+
return (0, path_1.join)((0, os_1.homedir)(), FioriToolsSettings.dir);
|
|
24001
24017
|
};
|
|
24002
24018
|
exports2.getFioriToolsDirectory = getFioriToolsDirectory;
|
|
24003
24019
|
var SchemeName;
|
|
@@ -24048,9 +24064,13 @@ var require_dist5 = __commonJS({
|
|
|
24048
24064
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
24049
24065
|
if (k2 === void 0)
|
|
24050
24066
|
k2 = k;
|
|
24051
|
-
Object.
|
|
24052
|
-
|
|
24053
|
-
|
|
24067
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
24068
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24069
|
+
desc = { enumerable: true, get: function() {
|
|
24070
|
+
return m[k];
|
|
24071
|
+
} };
|
|
24072
|
+
}
|
|
24073
|
+
Object.defineProperty(o, k2, desc);
|
|
24054
24074
|
} : function(o, m, k, k2) {
|
|
24055
24075
|
if (k2 === void 0)
|
|
24056
24076
|
k2 = k;
|
|
@@ -24088,7 +24108,7 @@ var require_commandRunner = __commonJS({
|
|
|
24088
24108
|
run(cmd, args = []) {
|
|
24089
24109
|
return new Promise((resolve2, reject2) => {
|
|
24090
24110
|
const stack = [];
|
|
24091
|
-
const spawnedCmd = child_process_1.spawn(cmd, args, {});
|
|
24111
|
+
const spawnedCmd = (0, child_process_1.spawn)(cmd, args, {});
|
|
24092
24112
|
spawnedCmd.stdout.setEncoding("utf8");
|
|
24093
24113
|
let response;
|
|
24094
24114
|
spawnedCmd.stdout.on("data", (data2) => {
|
|
@@ -30892,7 +30912,7 @@ var require_utils3 = __commonJS({
|
|
|
30892
30912
|
var debug_1 = require_src6();
|
|
30893
30913
|
exports2.STORE_NAMESPACE = "ft:store";
|
|
30894
30914
|
exports2.MIGRATION_NAMESPACE = exports2.STORE_NAMESPACE + ":migrate";
|
|
30895
|
-
var newDebugLogger = (namespace = exports2.STORE_NAMESPACE) => debug_1.debug(namespace);
|
|
30915
|
+
var newDebugLogger = (namespace = exports2.STORE_NAMESPACE) => (0, debug_1.debug)(namespace);
|
|
30896
30916
|
exports2.newDebugLogger = newDebugLogger;
|
|
30897
30917
|
var enableDebugLogger = (namespace) => debug_1.debug.enable(namespace);
|
|
30898
30918
|
exports2.enableDebugLogger = enableDebugLogger;
|
|
@@ -30906,7 +30926,7 @@ var require_utils3 = __commonJS({
|
|
|
30906
30926
|
function getExtendedLogger(l) {
|
|
30907
30927
|
return {
|
|
30908
30928
|
...l,
|
|
30909
|
-
debug: exports2.newDebugLogger()
|
|
30929
|
+
debug: (0, exports2.newDebugLogger)()
|
|
30910
30930
|
};
|
|
30911
30931
|
}
|
|
30912
30932
|
exports2.getExtendedLogger = getExtendedLogger;
|
|
@@ -31377,9 +31397,13 @@ var require_dist6 = __commonJS({
|
|
|
31377
31397
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
31378
31398
|
if (k2 === void 0)
|
|
31379
31399
|
k2 = k;
|
|
31380
|
-
Object.
|
|
31381
|
-
|
|
31382
|
-
|
|
31400
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31401
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
31402
|
+
desc = { enumerable: true, get: function() {
|
|
31403
|
+
return m[k];
|
|
31404
|
+
} };
|
|
31405
|
+
}
|
|
31406
|
+
Object.defineProperty(o, k2, desc);
|
|
31383
31407
|
} : function(o, m, k, k2) {
|
|
31384
31408
|
if (k2 === void 0)
|
|
31385
31409
|
k2 = k;
|
|
@@ -31416,7 +31440,7 @@ var require_dist6 = __commonJS({
|
|
|
31416
31440
|
FioriToolsSettings2["dir"] = ".fioritools";
|
|
31417
31441
|
})(FioriToolsSettings = exports2.FioriToolsSettings || (exports2.FioriToolsSettings = {}));
|
|
31418
31442
|
var getFioriToolsDirectory = () => {
|
|
31419
|
-
return path_1.default.join(os_1.homedir(), FioriToolsSettings.dir);
|
|
31443
|
+
return path_1.default.join((0, os_1.homedir)(), FioriToolsSettings.dir);
|
|
31420
31444
|
};
|
|
31421
31445
|
exports2.getFioriToolsDirectory = getFioriToolsDirectory;
|
|
31422
31446
|
function filterReferenceUri(metadata) {
|
|
@@ -31433,9 +31457,13 @@ var require_filesystem = __commonJS({
|
|
|
31433
31457
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
31434
31458
|
if (k2 === void 0)
|
|
31435
31459
|
k2 = k;
|
|
31436
|
-
Object.
|
|
31437
|
-
|
|
31438
|
-
|
|
31460
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31461
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
31462
|
+
desc = { enumerable: true, get: function() {
|
|
31463
|
+
return m[k];
|
|
31464
|
+
} };
|
|
31465
|
+
}
|
|
31466
|
+
Object.defineProperty(o, k2, desc);
|
|
31439
31467
|
} : function(o, m, k, k2) {
|
|
31440
31468
|
if (k2 === void 0)
|
|
31441
31469
|
k2 = k;
|
|
@@ -31570,7 +31598,7 @@ var require_filesystem = __commonJS({
|
|
|
31570
31598
|
var _a2, _b;
|
|
31571
31599
|
let rawContents;
|
|
31572
31600
|
try {
|
|
31573
|
-
rawContents = (_a2 = fs_1.readFileSync(path_1.join(exports2.basedir(), `${entityName}.json`))) == null ? void 0 : _a2.toString().trim();
|
|
31601
|
+
rawContents = (_a2 = (0, fs_1.readFileSync)((0, path_1.join)((0, exports2.basedir)(), `${entityName}.json`))) == null ? void 0 : _a2.toString().trim();
|
|
31574
31602
|
} catch (e) {
|
|
31575
31603
|
this.logger.debug(e.message);
|
|
31576
31604
|
return { error: e };
|
|
@@ -31587,16 +31615,16 @@ var require_filesystem = __commonJS({
|
|
|
31587
31615
|
return { entities };
|
|
31588
31616
|
}
|
|
31589
31617
|
writeToFile(entityName, entities) {
|
|
31590
|
-
const base = exports2.basedir();
|
|
31618
|
+
const base = (0, exports2.basedir)();
|
|
31591
31619
|
const data2 = JSON.stringify({ [entityName]: entities }, null, 2);
|
|
31592
31620
|
const filename = getEntityFileName(entityName);
|
|
31593
31621
|
try {
|
|
31594
|
-
fs_1.writeFileSync(path_1.default.join(base, filename), data2);
|
|
31622
|
+
(0, fs_1.writeFileSync)(path_1.default.join(base, filename), data2);
|
|
31595
31623
|
} catch (e) {
|
|
31596
31624
|
if (e.code === "ENOENT") {
|
|
31597
31625
|
this.logger.debug(`Base directory [${base}] does not exist, trying to create it`);
|
|
31598
|
-
fs_1.mkdirSync(base, { recursive: true });
|
|
31599
|
-
fs_1.writeFileSync(path_1.default.join(base, filename), data2);
|
|
31626
|
+
(0, fs_1.mkdirSync)(base, { recursive: true });
|
|
31627
|
+
(0, fs_1.writeFileSync)(path_1.default.join(base, filename), data2);
|
|
31600
31628
|
} else {
|
|
31601
31629
|
throw e;
|
|
31602
31630
|
}
|
|
@@ -31606,15 +31634,15 @@ var require_filesystem = __commonJS({
|
|
|
31606
31634
|
exports2.FilesystemStore = FilesystemStore;
|
|
31607
31635
|
function toPersistenceName(s) {
|
|
31608
31636
|
const t = s == null ? void 0 : s.trim().toLowerCase();
|
|
31609
|
-
return t && pluralize_1.plural(t);
|
|
31637
|
+
return t && (0, pluralize_1.plural)(t);
|
|
31610
31638
|
}
|
|
31611
31639
|
function getEntityFileName(entityName) {
|
|
31612
31640
|
return toPersistenceName(entityName) + ".json";
|
|
31613
31641
|
}
|
|
31614
31642
|
function getFilesystemWatcherFor(entityName, callback) {
|
|
31615
|
-
const watchPath = path_1.default.join(exports2.basedir(), getEntityFileName(entityName));
|
|
31616
|
-
if (fs_1.existsSync(watchPath)) {
|
|
31617
|
-
return fs_1.watch(watchPath, void 0, () => {
|
|
31643
|
+
const watchPath = path_1.default.join((0, exports2.basedir)(), getEntityFileName(entityName));
|
|
31644
|
+
if ((0, fs_1.existsSync)(watchPath)) {
|
|
31645
|
+
return (0, fs_1.watch)(watchPath, void 0, () => {
|
|
31618
31646
|
callback(entityName);
|
|
31619
31647
|
});
|
|
31620
31648
|
} else {
|
|
@@ -31733,9 +31761,13 @@ var require_secure_store = __commonJS({
|
|
|
31733
31761
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
31734
31762
|
if (k2 === void 0)
|
|
31735
31763
|
k2 = k;
|
|
31736
|
-
Object.
|
|
31737
|
-
|
|
31738
|
-
|
|
31764
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31765
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
31766
|
+
desc = { enumerable: true, get: function() {
|
|
31767
|
+
return m[k];
|
|
31768
|
+
} };
|
|
31769
|
+
}
|
|
31770
|
+
Object.defineProperty(o, k2, desc);
|
|
31739
31771
|
} : function(o, m, k, k2) {
|
|
31740
31772
|
if (k2 === void 0)
|
|
31741
31773
|
k2 = k;
|
|
@@ -31782,7 +31814,7 @@ var require_secure_store = __commonJS({
|
|
|
31782
31814
|
}
|
|
31783
31815
|
}
|
|
31784
31816
|
var getSecureStore = (log7) => {
|
|
31785
|
-
if (ux_common_utils_1.isAppStudio() || process.env.UX_TOOLS_DISABLE_KEYSTORE) {
|
|
31817
|
+
if ((0, ux_common_utils_1.isAppStudio)() || process.env.UX_TOOLS_DISABLE_KEYSTORE) {
|
|
31786
31818
|
return new dummy_store_1.DummyStore(log7);
|
|
31787
31819
|
} else {
|
|
31788
31820
|
const keytar = getKeytar(log7);
|
|
@@ -32569,7 +32601,7 @@ var require_hybrid = __commonJS({
|
|
|
32569
32601
|
constructor(logger) {
|
|
32570
32602
|
this.logger = logger;
|
|
32571
32603
|
this.filesystem = new filesystem_1.FilesystemStore(this.logger);
|
|
32572
|
-
this.secureStore = secure_store_1.getSecureStore(this.logger);
|
|
32604
|
+
this.secureStore = (0, secure_store_1.getSecureStore)(this.logger);
|
|
32573
32605
|
}
|
|
32574
32606
|
async read({ entityName, id }) {
|
|
32575
32607
|
const serialized = await this.filesystem.read({ entityName, id });
|
|
@@ -32604,8 +32636,8 @@ var require_hybrid = __commonJS({
|
|
|
32604
32636
|
return result2;
|
|
32605
32637
|
}
|
|
32606
32638
|
async write({ entityName, id, entity }) {
|
|
32607
|
-
const serializableProps = decorators_1.getSerializableProperties(entity);
|
|
32608
|
-
const sensitiveProps = decorators_1.getSensitiveDataProperties(entity);
|
|
32639
|
+
const serializableProps = (0, decorators_1.getSerializableProperties)(entity);
|
|
32640
|
+
const sensitiveProps = (0, decorators_1.getSensitiveDataProperties)(entity);
|
|
32609
32641
|
if (serializableProps.length > 0 && sensitiveProps.length > 0) {
|
|
32610
32642
|
for (let i = 0; i < serializableProps.length; i = i + 1) {
|
|
32611
32643
|
if (sensitiveProps.indexOf(serializableProps[i]) !== -1) {
|
|
@@ -32614,14 +32646,14 @@ var require_hybrid = __commonJS({
|
|
|
32614
32646
|
}
|
|
32615
32647
|
}
|
|
32616
32648
|
}
|
|
32617
|
-
const serializable = utils_1.pick(entity, ...serializableProps);
|
|
32649
|
+
const serializable = (0, utils_1.pick)(entity, ...serializableProps);
|
|
32618
32650
|
if (serializable) {
|
|
32619
32651
|
this.logger.debug("hybrid/write - writing serializable properties: %O", serializable);
|
|
32620
32652
|
await this.filesystem.write({ entityName, id, entity: serializable });
|
|
32621
32653
|
} else {
|
|
32622
32654
|
this.logger.debug("hybrid/write - no serializable properties found in %O", serializable);
|
|
32623
32655
|
}
|
|
32624
|
-
const sensitiveData = utils_1.pick(entity, ...sensitiveProps);
|
|
32656
|
+
const sensitiveData = (0, utils_1.pick)(entity, ...sensitiveProps);
|
|
32625
32657
|
if (sensitiveData) {
|
|
32626
32658
|
this.logger.debug(`hybrid/write - writing sensitive properties to secure store. ID: [${id}]`);
|
|
32627
32659
|
await this.secureStore.save(getFullyQualifiedServiceName(entityName), id, sensitiveData);
|
|
@@ -32667,13 +32699,13 @@ var require_backend_system = __commonJS({
|
|
|
32667
32699
|
AuthenticationType2["OAuth2ClientCredential"] = "oauth2ClientCredential";
|
|
32668
32700
|
})(AuthenticationType = exports2.AuthenticationType || (exports2.AuthenticationType = {}));
|
|
32669
32701
|
var BackendSystemKey = class {
|
|
32702
|
+
static from(system) {
|
|
32703
|
+
return new BackendSystemKey({ url: system.url, client: system.client });
|
|
32704
|
+
}
|
|
32670
32705
|
constructor({ url, client }) {
|
|
32671
32706
|
this.url = url.trim().replace(/\/$/, "");
|
|
32672
32707
|
this.client = client == null ? void 0 : client.trim();
|
|
32673
32708
|
}
|
|
32674
|
-
static from(system) {
|
|
32675
|
-
return new BackendSystemKey({ url: system.url, client: system.client });
|
|
32676
|
-
}
|
|
32677
32709
|
getId() {
|
|
32678
32710
|
return this.url + `${this.client ? "/" + this.client : ""}`;
|
|
32679
32711
|
}
|
|
@@ -32930,16 +32962,16 @@ var require_system_migration2 = __commonJS({
|
|
|
32930
32962
|
this.logger.debug(`Migrating sytem ID: [${systemId}]`);
|
|
32931
32963
|
const refreshToken = await this.getRefreshTokenFromOldStore(oldSystem);
|
|
32932
32964
|
if (refreshToken) {
|
|
32933
|
-
this.logger.info(i18n_1.text("info.foundRefreshToken", { systemId }));
|
|
32965
|
+
this.logger.info((0, i18n_1.text)("info.foundRefreshToken", { systemId }));
|
|
32934
32966
|
}
|
|
32935
32967
|
await this.saveBackendSystem(new backend_system_1.BackendSystem({ ...oldSystem, refreshToken }));
|
|
32936
32968
|
await this.secureStore.delete(contants_1.ServiceName.OldSystemService, systemId);
|
|
32937
32969
|
if (refreshToken) {
|
|
32938
32970
|
await this.deleteOldRefreshToken(oldSystem, systemId);
|
|
32939
|
-
this.logger.info(i18n_1.text("info.deletingRefreshTokenFromOldStore", { systemId }));
|
|
32971
|
+
this.logger.info((0, i18n_1.text)("info.deletingRefreshTokenFromOldStore", { systemId }));
|
|
32940
32972
|
}
|
|
32941
32973
|
} else {
|
|
32942
|
-
this.logger.info(i18n_1.text("error.systemAlreadyExistsInHybridStore", { systemId }));
|
|
32974
|
+
this.logger.info((0, i18n_1.text)("error.systemAlreadyExistsInHybridStore", { systemId }));
|
|
32943
32975
|
}
|
|
32944
32976
|
}
|
|
32945
32977
|
}
|
|
@@ -32949,7 +32981,7 @@ var require_system_migration2 = __commonJS({
|
|
|
32949
32981
|
const existingSystem = existingSystems[systemId];
|
|
32950
32982
|
const refreshToken = await this.getRefreshTokenFromOldStore(existingSystem);
|
|
32951
32983
|
if (refreshToken) {
|
|
32952
|
-
this.logger.info(i18n_1.text("info.foundRefreshToken", { systemId }));
|
|
32984
|
+
this.logger.info((0, i18n_1.text)("info.foundRefreshToken", { systemId }));
|
|
32953
32985
|
await this.updateRefreshTokenInStoredSystem(existingSystem, refreshToken, systemId);
|
|
32954
32986
|
await this.deleteOldRefreshToken(existingSystem, systemId);
|
|
32955
32987
|
}
|
|
@@ -32960,13 +32992,13 @@ var require_system_migration2 = __commonJS({
|
|
|
32960
32992
|
for (const systemId of Object.keys(existingSystems)) {
|
|
32961
32993
|
const existingSystem = existingSystems[systemId];
|
|
32962
32994
|
if (!existingSystem.authenticationType) {
|
|
32963
|
-
this.logger.info(i18n_1.text("info.tryingToUpdateAuthType", { systemId }));
|
|
32995
|
+
this.logger.info((0, i18n_1.text)("info.tryingToUpdateAuthType", { systemId }));
|
|
32964
32996
|
const authenticationType = this.guessAuthType(existingSystem);
|
|
32965
32997
|
if (authenticationType) {
|
|
32966
|
-
this.logger.info(i18n_1.text("info.authTypeDetermined", { authenticationType, systemId }));
|
|
32998
|
+
this.logger.info((0, i18n_1.text)("info.authTypeDetermined", { authenticationType, systemId }));
|
|
32967
32999
|
await this.saveBackendSystem(new backend_system_1.BackendSystem({ ...existingSystem, authenticationType }));
|
|
32968
33000
|
} else {
|
|
32969
|
-
this.logger.info(i18n_1.text("info.authTypeNotDetermined", { systemId }));
|
|
33001
|
+
this.logger.info((0, i18n_1.text)("info.authTypeNotDetermined", { systemId }));
|
|
32970
33002
|
}
|
|
32971
33003
|
}
|
|
32972
33004
|
}
|
|
@@ -32991,18 +33023,18 @@ var require_system_migration2 = __commonJS({
|
|
|
32991
33023
|
}
|
|
32992
33024
|
async deleteOldRefreshToken(system, systemId) {
|
|
32993
33025
|
var _a2;
|
|
32994
|
-
this.logger.info(i18n_1.text("info.deletingRefreshTokenFromOldStore", { systemId }));
|
|
33026
|
+
this.logger.info((0, i18n_1.text)("info.deletingRefreshTokenFromOldStore", { systemId }));
|
|
32995
33027
|
try {
|
|
32996
33028
|
const host = (_a2 = new URL(system.url)) == null ? void 0 : _a2.host;
|
|
32997
33029
|
await this.secureStore.delete(contants_1.ServiceName.OldRefreshTokenService, host);
|
|
32998
33030
|
} catch (e) {
|
|
32999
|
-
this.logger.info(i18n_1.text("error.couldNotDeleteRefreshToken", { url: system.url }));
|
|
33031
|
+
this.logger.info((0, i18n_1.text)("error.couldNotDeleteRefreshToken", { url: system.url }));
|
|
33000
33032
|
this.logger.info(e.message);
|
|
33001
33033
|
}
|
|
33002
33034
|
}
|
|
33003
33035
|
async updateRefreshTokenInStoredSystem(system, refreshToken, systemId) {
|
|
33004
33036
|
if (system.refreshToken !== refreshToken) {
|
|
33005
|
-
this.logger.info(i18n_1.text("info.updatingRefreshTokenInNewStore", { systemId }));
|
|
33037
|
+
this.logger.info((0, i18n_1.text)("info.updatingRefreshTokenInNewStore", { systemId }));
|
|
33006
33038
|
await this.saveBackendSystem(new backend_system_1.BackendSystem({ ...system, refreshToken }));
|
|
33007
33039
|
}
|
|
33008
33040
|
}
|
|
@@ -33025,7 +33057,7 @@ var require_system_migration2 = __commonJS({
|
|
|
33025
33057
|
const systemMigrationStatusDataProvider = new system_migration_1.SystemMigrationStatusDataProvider(logger);
|
|
33026
33058
|
const systemMigrationStatus = await systemMigrationStatusDataProvider.read(new system_migration_status_1.SystemMigrationStatusKey()) || { migrationDone: false, authTypeMigrated: false, migrationLogs: [] };
|
|
33027
33059
|
const migrationLogger = createLogInterceptor(logger, systemMigrationStatus.migrationLogs);
|
|
33028
|
-
const secureStore = secure_store_1.getSecureStore(migrationLogger);
|
|
33060
|
+
const secureStore = (0, secure_store_1.getSecureStore)(migrationLogger);
|
|
33029
33061
|
const migration = new Migration({
|
|
33030
33062
|
logger: migrationLogger,
|
|
33031
33063
|
systemMigrationStatus,
|
|
@@ -33040,7 +33072,7 @@ var require_system_migration2 = __commonJS({
|
|
|
33040
33072
|
}));
|
|
33041
33073
|
}
|
|
33042
33074
|
} catch (e) {
|
|
33043
|
-
logger.warn(i18n_1.text("error.systemMigrationFailed"));
|
|
33075
|
+
logger.warn((0, i18n_1.text)("error.systemMigrationFailed"));
|
|
33044
33076
|
logger.debug(e.message);
|
|
33045
33077
|
}
|
|
33046
33078
|
}
|
|
@@ -33061,11 +33093,11 @@ var require_system_migration2 = __commonJS({
|
|
|
33061
33093
|
};
|
|
33062
33094
|
}
|
|
33063
33095
|
function getMigrationLogger(migrationLogs) {
|
|
33064
|
-
const migrationLogger = utils_1.newDebugLogger(utils_1.MIGRATION_NAMESPACE);
|
|
33096
|
+
const migrationLogger = (0, utils_1.newDebugLogger)(utils_1.MIGRATION_NAMESPACE);
|
|
33065
33097
|
migrationLogger.log = (args) => {
|
|
33066
33098
|
migrationLogs.push(args == null ? void 0 : args.toString());
|
|
33067
33099
|
};
|
|
33068
|
-
utils_1.enableDebugLogger(utils_1.MIGRATION_NAMESPACE);
|
|
33100
|
+
(0, utils_1.enableDebugLogger)(utils_1.MIGRATION_NAMESPACE);
|
|
33069
33101
|
return migrationLogger;
|
|
33070
33102
|
}
|
|
33071
33103
|
}
|
|
@@ -33085,7 +33117,7 @@ var require_backend_system3 = __commonJS({
|
|
|
33085
33117
|
var SystemService = class {
|
|
33086
33118
|
constructor(logger) {
|
|
33087
33119
|
this.migrationDone = false;
|
|
33088
|
-
this.logger = utils_1.getExtendedLogger(logger);
|
|
33120
|
+
this.logger = (0, utils_1.getExtendedLogger)(logger);
|
|
33089
33121
|
this.dataProvider = new backend_system_1.SystemDataProvider(this.logger);
|
|
33090
33122
|
}
|
|
33091
33123
|
async partialUpdate(key, entity) {
|
|
@@ -33104,18 +33136,18 @@ var require_backend_system3 = __commonJS({
|
|
|
33104
33136
|
async readOrThrow(key) {
|
|
33105
33137
|
const existingSystem = await this.read(key);
|
|
33106
33138
|
if (!existingSystem) {
|
|
33107
|
-
throw new Error(i18n_1.text("error.systemDoesNotExist", { system: key }));
|
|
33139
|
+
throw new Error((0, i18n_1.text)("error.systemDoesNotExist", { system: key }));
|
|
33108
33140
|
}
|
|
33109
33141
|
return existingSystem;
|
|
33110
33142
|
}
|
|
33111
33143
|
validatePartialUpdateInput(entity) {
|
|
33112
33144
|
if (!entity || !Object.keys(entity).length) {
|
|
33113
|
-
throw new Error(i18n_1.text("error.noPropertiesSpecified"));
|
|
33145
|
+
throw new Error((0, i18n_1.text)("error.noPropertiesSpecified"));
|
|
33114
33146
|
}
|
|
33115
33147
|
}
|
|
33116
33148
|
async ensureMigrationDone() {
|
|
33117
33149
|
if (!this.migrationDone) {
|
|
33118
|
-
await system_migration_1.migrate(this.logger, this.dataProvider);
|
|
33150
|
+
await (0, system_migration_1.migrate)(this.logger, this.dataProvider);
|
|
33119
33151
|
this.migrationDone = true;
|
|
33120
33152
|
}
|
|
33121
33153
|
}
|
|
@@ -33177,9 +33209,13 @@ var require_dist7 = __commonJS({
|
|
|
33177
33209
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
33178
33210
|
if (k2 === void 0)
|
|
33179
33211
|
k2 = k;
|
|
33180
|
-
Object.
|
|
33181
|
-
|
|
33182
|
-
|
|
33212
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
33213
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
33214
|
+
desc = { enumerable: true, get: function() {
|
|
33215
|
+
return m[k];
|
|
33216
|
+
} };
|
|
33217
|
+
}
|
|
33218
|
+
Object.defineProperty(o, k2, desc);
|
|
33183
33219
|
} : function(o, m, k, k2) {
|
|
33184
33220
|
if (k2 === void 0)
|
|
33185
33221
|
k2 = k;
|
|
@@ -33202,12 +33238,12 @@ var require_dist7 = __commonJS({
|
|
|
33202
33238
|
system: backend_system_1.getInstance
|
|
33203
33239
|
};
|
|
33204
33240
|
async function getService({ logger = console, entityName }) {
|
|
33205
|
-
await i18n_1.initI18n();
|
|
33241
|
+
await (0, i18n_1.initI18n)();
|
|
33206
33242
|
const factory = services[entityName];
|
|
33207
33243
|
if (factory) {
|
|
33208
33244
|
return factory(logger);
|
|
33209
33245
|
} else {
|
|
33210
|
-
throw new Error(i18n_1.text("error.unsupportedEntity", { entityName }));
|
|
33246
|
+
throw new Error((0, i18n_1.text)("error.unsupportedEntity", { entityName }));
|
|
33211
33247
|
}
|
|
33212
33248
|
}
|
|
33213
33249
|
exports2.getService = getService;
|
|
@@ -36878,17 +36914,17 @@ var require_uaaOauth = __commonJS({
|
|
|
36878
36914
|
Redirect.path = "/oauth/client/redirect";
|
|
36879
36915
|
function getAuthCode({ uaa, log: log7, timeout: timeout2 = utils_1.timeoutMs }) {
|
|
36880
36916
|
return new Promise((resolve2, reject2) => {
|
|
36881
|
-
const app = express_1.default();
|
|
36917
|
+
const app = (0, express_1.default)();
|
|
36882
36918
|
const server = http_1.default.createServer(app);
|
|
36883
36919
|
let redirect;
|
|
36884
36920
|
const handleTimeout = () => {
|
|
36885
36921
|
server.close();
|
|
36886
|
-
reject2(new error_1.UAATimeoutError(`Timeout. Did not get a response within ${utils_1.timeString(timeout2)}`));
|
|
36922
|
+
reject2(new error_1.UAATimeoutError(`Timeout. Did not get a response within ${(0, utils_1.timeString)(timeout2)}`));
|
|
36887
36923
|
};
|
|
36888
36924
|
const timer = setTimeout(handleTimeout, timeout2);
|
|
36889
36925
|
app.get(Redirect.path, (req, res) => {
|
|
36890
36926
|
res.set("Content-Type", "text/html");
|
|
36891
|
-
res.send(Buffer.from(static_1.redirectSuccessHtml(uaa.logoutUrl, uaa.systemId)));
|
|
36927
|
+
res.send(Buffer.from((0, static_1.redirectSuccessHtml)(uaa.logoutUrl, uaa.systemId)));
|
|
36892
36928
|
log7.info("Got authCode");
|
|
36893
36929
|
resolve2({ authCode: req.query.code + "", redirect });
|
|
36894
36930
|
if (timer) {
|
|
@@ -37130,7 +37166,7 @@ var require_uaaOauth = __commonJS({
|
|
|
37130
37166
|
if (credentials.serviceKeysContents) {
|
|
37131
37167
|
return typeof credentials.serviceKeyContents === "string" ? JSON.parse(credentials.serviceKeysContents) : credentials.serviceKeysContents;
|
|
37132
37168
|
}
|
|
37133
|
-
return JSON.parse(fs_1.readFileSync(credentials.serviceKeys, "utf-8"));
|
|
37169
|
+
return JSON.parse((0, fs_1.readFileSync)(credentials.serviceKeys, "utf-8"));
|
|
37134
37170
|
} catch (e) {
|
|
37135
37171
|
throw new Error("Error parsing service keys");
|
|
37136
37172
|
}
|
|
@@ -37243,11 +37279,11 @@ var require_connectWithReentranceTicket = __commonJS({
|
|
|
37243
37279
|
var ADT_REENTRANCE_ENDPOINT = "/sap/bc/adt/core/http/reentranceticket";
|
|
37244
37280
|
async function getReentranceTicket({ backendUrl, logger, timeout: timeout2 = utils_1.timeoutMs }) {
|
|
37245
37281
|
return new Promise((resolve2, reject2) => {
|
|
37246
|
-
const app = express_1.default();
|
|
37282
|
+
const app = (0, express_1.default)();
|
|
37247
37283
|
const server = http_1.default.createServer(app);
|
|
37248
37284
|
const handleTimeout = () => {
|
|
37249
37285
|
server.close();
|
|
37250
|
-
reject2(new error_1.TimeoutError(`Timeout. Did not get a response within ${utils_1.timeString(timeout2)}`));
|
|
37286
|
+
reject2(new error_1.TimeoutError(`Timeout. Did not get a response within ${(0, utils_1.timeString)(timeout2)}`));
|
|
37251
37287
|
};
|
|
37252
37288
|
class Redirect {
|
|
37253
37289
|
static url(port) {
|
|
@@ -37261,7 +37297,7 @@ var require_connectWithReentranceTicket = __commonJS({
|
|
|
37261
37297
|
const reentranceTicket = (_a2 = req.query["reentrance-ticket"]) == null ? void 0 : _a2.toString();
|
|
37262
37298
|
logger.info("Got reentrance ticket: " + reentranceTicket);
|
|
37263
37299
|
res.set("Content-Type", "text/html");
|
|
37264
|
-
res.send(Buffer.from(static_1.redirectSuccessHtml(ABAPSystem.logoffUrl(backendUrl))));
|
|
37300
|
+
res.send(Buffer.from((0, static_1.redirectSuccessHtml)(ABAPSystem.logoffUrl(backendUrl))));
|
|
37265
37301
|
if (timer) {
|
|
37266
37302
|
clearTimeout(timer);
|
|
37267
37303
|
}
|
|
@@ -51694,8 +51730,8 @@ var require_destination = __commonJS({
|
|
|
51694
51730
|
async function fetchDestinations() {
|
|
51695
51731
|
var _a2;
|
|
51696
51732
|
const destinations = {};
|
|
51697
|
-
await axios_1.default.get(ux_common_utils_1.getAppStudioProxyURL() + "/reload");
|
|
51698
|
-
const response = await axios_1.default.get(ux_common_utils_1.getAppStudioBaseURL() + "/api/listDestinations");
|
|
51733
|
+
await axios_1.default.get((0, ux_common_utils_1.getAppStudioProxyURL)() + "/reload");
|
|
51734
|
+
const response = await axios_1.default.get((0, ux_common_utils_1.getAppStudioBaseURL)() + "/api/listDestinations");
|
|
51699
51735
|
(_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.forEach((destination) => {
|
|
51700
51736
|
if (destination.WebIDEEnabled) {
|
|
51701
51737
|
destinations[destination.Name] = destination;
|
|
@@ -51706,7 +51742,7 @@ var require_destination = __commonJS({
|
|
|
51706
51742
|
async function getAuthHeaderForInstanceBasedDest(destinationInstance) {
|
|
51707
51743
|
var _a2, _b;
|
|
51708
51744
|
try {
|
|
51709
|
-
const credentials = (await cf_tools_1.apiGetInstanceCredentials(destinationInstance)).credentials;
|
|
51745
|
+
const credentials = (await (0, cf_tools_1.apiGetInstanceCredentials)(destinationInstance)).credentials;
|
|
51710
51746
|
const clientId = ((_a2 = credentials.uaa) == null ? void 0 : _a2.clientid) || credentials.clientid;
|
|
51711
51747
|
const clientSecret = ((_b = credentials.uaa) == null ? void 0 : _b.clientsecret) || credentials.clientsecret;
|
|
51712
51748
|
return Buffer.from(`${encodeURIComponent(clientId)}:${encodeURIComponent(clientSecret)}`).toString("base64");
|
|
@@ -51715,7 +51751,7 @@ var require_destination = __commonJS({
|
|
|
51715
51751
|
}
|
|
51716
51752
|
}
|
|
51717
51753
|
async function listDestinations() {
|
|
51718
|
-
if (ux_common_utils_1.isAppStudio()) {
|
|
51754
|
+
if ((0, ux_common_utils_1.isAppStudio)()) {
|
|
51719
51755
|
return fetchDestinations();
|
|
51720
51756
|
} else {
|
|
51721
51757
|
return {};
|
|
@@ -51729,7 +51765,7 @@ var require_destination = __commonJS({
|
|
|
51729
51765
|
systemConfig.url = `https://${destinationName}${DEST}`;
|
|
51730
51766
|
systemConfig.basDestinationInstanceCred = await getAuthHeaderForInstanceBasedDest(destinationInstance);
|
|
51731
51767
|
} else {
|
|
51732
|
-
systemConfig.url = ux_common_utils_1.getAppStudioBaseURL();
|
|
51768
|
+
systemConfig.url = (0, ux_common_utils_1.getAppStudioBaseURL)();
|
|
51733
51769
|
systemConfig.service = `/destinations/${destinationName != null ? destinationName : systemConfig.destination}${(_b = (_a2 = systemConfig.service) == null ? void 0 : _a2.replace(/^\/?/, "/")) != null ? _b : ""}`;
|
|
51734
51770
|
}
|
|
51735
51771
|
delete systemConfig.scp;
|
|
@@ -51737,7 +51773,7 @@ var require_destination = __commonJS({
|
|
|
51737
51773
|
}
|
|
51738
51774
|
exports2.replaceUrlForAppStudio = replaceUrlForAppStudio;
|
|
51739
51775
|
async function updateSystemConfig(system) {
|
|
51740
|
-
if (ux_common_utils_1.isAppStudio() && system.destination) {
|
|
51776
|
+
if ((0, ux_common_utils_1.isAppStudio)() && system.destination) {
|
|
51741
51777
|
if (system.destinationInstance) {
|
|
51742
51778
|
await replaceUrlForAppStudio(system, system.destination, system.destinationInstance);
|
|
51743
51779
|
} else {
|
|
@@ -51745,7 +51781,7 @@ var require_destination = __commonJS({
|
|
|
51745
51781
|
if (destinations[system.destination]) {
|
|
51746
51782
|
const dest = destinations[system.destination];
|
|
51747
51783
|
system.destinationAuthType = dest.Authentication;
|
|
51748
|
-
if (config_1.hasFullUrlDestAttribute({
|
|
51784
|
+
if ((0, config_1.hasFullUrlDestAttribute)({
|
|
51749
51785
|
["WebIDEAdditionalData"]: dest["WebIDEAdditionalData"]
|
|
51750
51786
|
})) {
|
|
51751
51787
|
system.isDestinationFullUrl = true;
|
|
@@ -51770,9 +51806,13 @@ var require_connection = __commonJS({
|
|
|
51770
51806
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
51771
51807
|
if (k2 === void 0)
|
|
51772
51808
|
k2 = k;
|
|
51773
|
-
Object.
|
|
51774
|
-
|
|
51775
|
-
|
|
51809
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
51810
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
51811
|
+
desc = { enumerable: true, get: function() {
|
|
51812
|
+
return m[k];
|
|
51813
|
+
} };
|
|
51814
|
+
}
|
|
51815
|
+
Object.defineProperty(o, k2, desc);
|
|
51776
51816
|
} : function(o, m, k, k2) {
|
|
51777
51817
|
if (k2 === void 0)
|
|
51778
51818
|
k2 = k;
|
|
@@ -51833,7 +51873,7 @@ var require_connection = __commonJS({
|
|
|
51833
51873
|
if (target.client) {
|
|
51834
51874
|
config2.params[exports2.SAP_CLIENT] = target.client;
|
|
51835
51875
|
}
|
|
51836
|
-
const isTargetDestOnAppStudio = ux_common_utils_1.isAppStudio() && target.destination;
|
|
51876
|
+
const isTargetDestOnAppStudio = (0, ux_common_utils_1.isAppStudio)() && target.destination;
|
|
51837
51877
|
if (isTargetDestOnAppStudio || disableSAML) {
|
|
51838
51878
|
config2.params.saml2 = "disabled";
|
|
51839
51879
|
}
|
|
@@ -51882,7 +51922,7 @@ var require_connection = __commonJS({
|
|
|
51882
51922
|
if (contentTypeHeader) {
|
|
51883
51923
|
return contentTypeHeader.toLowerCase();
|
|
51884
51924
|
} else if (typeof responseData === "string") {
|
|
51885
|
-
return (_b = (_a2 = detect_content_type_1.default(Buffer.from(responseData))) == null ? void 0 : _a2.toLowerCase()) != null ? _b : "";
|
|
51925
|
+
return (_b = (_a2 = (0, detect_content_type_1.default)(Buffer.from(responseData))) == null ? void 0 : _a2.toLowerCase()) != null ? _b : "";
|
|
51886
51926
|
} else {
|
|
51887
51927
|
return "";
|
|
51888
51928
|
}
|
|
@@ -51893,11 +51933,11 @@ var require_connection = __commonJS({
|
|
|
51893
51933
|
async function connect({ target, credentials, log: log7, autoAddTrailingSlash = true, timeout: timeout2, ignoreCertError = false, postConnectionCallback, disableSAML = false }) {
|
|
51894
51934
|
const targetAuthType = target.authenticationType;
|
|
51895
51935
|
if (targetAuthType === config_1.AuthenticationType.OAuth2RefreshToken) {
|
|
51896
|
-
return uaaOauth_1.connectUsingUaa({ target, credentials, log: log7, postConnectionCallback });
|
|
51936
|
+
return (0, uaaOauth_1.connectUsingUaa)({ target, credentials, log: log7, postConnectionCallback });
|
|
51897
51937
|
} else if (targetAuthType === config_1.AuthenticationType.OAuth2ClientCredential) {
|
|
51898
|
-
return uaaOauth_1.connectUsingUaaClientCredential({ target, credentials, log: log7 });
|
|
51938
|
+
return (0, uaaOauth_1.connectUsingUaaClientCredential)({ target, credentials, log: log7 });
|
|
51899
51939
|
} else if (targetAuthType === config_1.AuthenticationType.ReentranceTicket) {
|
|
51900
|
-
return connectWithReentranceTicket_1.connectWithReentranceTicket({ target, logger: log7, ignoreCertError });
|
|
51940
|
+
return (0, connectWithReentranceTicket_1.connectWithReentranceTicket)({ target, logger: log7, ignoreCertError });
|
|
51901
51941
|
} else {
|
|
51902
51942
|
return connectWithBasicAuth({
|
|
51903
51943
|
target,
|
|
@@ -51930,7 +51970,7 @@ var require_httpClient = __commonJS({
|
|
|
51930
51970
|
var https_1 = __importDefault(require("https"));
|
|
51931
51971
|
var url_1 = require("url");
|
|
51932
51972
|
async function newHttpClient({ system, credentials, log: log7, existingConnection, autoAddTrailingSlash = true, timeout: timeout2, ignoreCertError, postConnectionCallback, disableSAML = false }) {
|
|
51933
|
-
const connection = existingConnection || await connection_1.connect({
|
|
51973
|
+
const connection = existingConnection || await (0, connection_1.connect)({
|
|
51934
51974
|
target: system,
|
|
51935
51975
|
credentials,
|
|
51936
51976
|
log: log7,
|
|
@@ -53910,7 +53950,7 @@ var require_message = __commonJS({
|
|
|
53910
53950
|
exports2.printErrorDetails = exports2.prettyPrintError = exports2.prettyPrintMessage = void 0;
|
|
53911
53951
|
var chalk_1 = __importDefault(require_source6());
|
|
53912
53952
|
var debug_1 = __importDefault(require_src11());
|
|
53913
|
-
var odataClientDebug = debug_1.default("ux-odata-client");
|
|
53953
|
+
var odataClientDebug = (0, debug_1.default)("ux-odata-client");
|
|
53914
53954
|
function prettyPrintMessage(msg, log7, logData) {
|
|
53915
53955
|
logLevel(msg.severity, msg.message, log7);
|
|
53916
53956
|
if (msg.longtextUrl && logData.frontendUrl) {
|
|
@@ -55022,7 +55062,7 @@ var require_utils8 = __commonJS({
|
|
|
55022
55062
|
exports2.guessAuthType = guessAuthType;
|
|
55023
55063
|
async function getOnPremSystem(system, isImportedSystem = false) {
|
|
55024
55064
|
var _a2, _b;
|
|
55025
|
-
let sapSystem = await __1.getSapSystem(system.url, system.client);
|
|
55065
|
+
let sapSystem = await (0, __1.getSapSystem)(system.url, system.client);
|
|
55026
55066
|
let isNewSapSystem = false;
|
|
55027
55067
|
const creds = {
|
|
55028
55068
|
username: (_a2 = system.credentials) == null ? void 0 : _a2.systemUsername,
|
|
@@ -55035,7 +55075,7 @@ var require_utils8 = __commonJS({
|
|
|
55035
55075
|
sapSystem.setUserDisplayName(creds.username);
|
|
55036
55076
|
}
|
|
55037
55077
|
} else {
|
|
55038
|
-
sapSystem = __1.newSapSystem(system.name || "", system.url, system.client, creds, true);
|
|
55078
|
+
sapSystem = (0, __1.newSapSystem)(system.name || "", system.url, system.client, creds, true);
|
|
55039
55079
|
isNewSapSystem = true;
|
|
55040
55080
|
}
|
|
55041
55081
|
return { sapSystem, isNewSapSystem };
|
|
@@ -55045,13 +55085,13 @@ var require_utils8 = __commonJS({
|
|
|
55045
55085
|
let sapSystem;
|
|
55046
55086
|
let isNewSapSystem = false;
|
|
55047
55087
|
if (system.url && system.credentials === savedSapSystemServiceKey) {
|
|
55048
|
-
sapSystem = await __1.getSapSystem(system.url, system.client);
|
|
55088
|
+
sapSystem = await (0, __1.getSapSystem)(system.url, system.client);
|
|
55049
55089
|
}
|
|
55050
55090
|
if (sapSystem) {
|
|
55051
55091
|
sapSystem.name = system.name || "";
|
|
55052
55092
|
} else {
|
|
55053
|
-
const newBTPSapSystem = __1.newSapSystemForSteampunk(system.name || "", system.credentials, true);
|
|
55054
|
-
sapSystem = await __1.getSapSystem(newBTPSapSystem.url, newBTPSapSystem.client);
|
|
55093
|
+
const newBTPSapSystem = (0, __1.newSapSystemForSteampunk)(system.name || "", system.credentials, true);
|
|
55094
|
+
sapSystem = await (0, __1.getSapSystem)(newBTPSapSystem.url, newBTPSapSystem.client);
|
|
55055
55095
|
if (!sapSystem) {
|
|
55056
55096
|
isNewSapSystem = true;
|
|
55057
55097
|
sapSystem = newBTPSapSystem;
|
|
@@ -55065,7 +55105,7 @@ var require_utils8 = __commonJS({
|
|
|
55065
55105
|
return false;
|
|
55066
55106
|
}
|
|
55067
55107
|
let isValid = true;
|
|
55068
|
-
const isNameInUse = await __1.isSystemNameInUse(newName);
|
|
55108
|
+
const isNameInUse = await (0, __1.isSystemNameInUse)(newName);
|
|
55069
55109
|
if (isNameInUse && newName !== savedSystemName) {
|
|
55070
55110
|
isValid = false;
|
|
55071
55111
|
}
|
|
@@ -55194,7 +55234,7 @@ var require_oDataClient = __commonJS({
|
|
|
55194
55234
|
}
|
|
55195
55235
|
initDebugLogger() {
|
|
55196
55236
|
if (!ODataClient.hasAxiosDebugLoggerConfig) {
|
|
55197
|
-
axios_debug_log_1.default({
|
|
55237
|
+
(0, axios_debug_log_1.default)({
|
|
55198
55238
|
request: (debug2, req) => {
|
|
55199
55239
|
var _a2;
|
|
55200
55240
|
debug2(`${(_a2 = req.method) == null ? void 0 : _a2.toUpperCase()} ${this.buildFullUrl(req)}`);
|
|
@@ -55217,7 +55257,7 @@ var require_oDataClient = __commonJS({
|
|
|
55217
55257
|
return reqConfig.baseURL ? `${reqConfig.baseURL}${reqConfig.url}` : `${reqConfig.url}`;
|
|
55218
55258
|
}
|
|
55219
55259
|
validateSysAuthType(system, credentials) {
|
|
55220
|
-
system.authenticationType = system.authenticationType || utils_1.guessAuthType({ credentials, fallback: true });
|
|
55260
|
+
system.authenticationType = system.authenticationType || (0, utils_1.guessAuthType)({ credentials, fallback: true });
|
|
55221
55261
|
if (!Object.values(config_1.AuthenticationType).includes(system.authenticationType)) {
|
|
55222
55262
|
throw new error_1.UnknownSystemAuthenticationType(system.authenticationType);
|
|
55223
55263
|
}
|
|
@@ -55225,15 +55265,15 @@ var require_oDataClient = __commonJS({
|
|
|
55225
55265
|
logError(e, logData) {
|
|
55226
55266
|
this.log.error(e.message);
|
|
55227
55267
|
if (e.isAxiosError && e.response.data["error"]) {
|
|
55228
|
-
message_1.prettyPrintError(e.response.data["error"], this.log, logData);
|
|
55268
|
+
(0, message_1.prettyPrintError)(e.response.data["error"], this.log, logData);
|
|
55229
55269
|
}
|
|
55230
55270
|
}
|
|
55231
55271
|
async getClient() {
|
|
55232
55272
|
if (!this.client) {
|
|
55233
|
-
if (ux_common_utils_1.isAppStudio()) {
|
|
55234
|
-
await destination_1.updateSystemConfig(this.system);
|
|
55273
|
+
if ((0, ux_common_utils_1.isAppStudio)()) {
|
|
55274
|
+
await (0, destination_1.updateSystemConfig)(this.system);
|
|
55235
55275
|
}
|
|
55236
|
-
const { connection, httpClient } = await httpClient_1.newHttpClient({
|
|
55276
|
+
const { connection, httpClient } = await (0, httpClient_1.newHttpClient)({
|
|
55237
55277
|
system: this.system,
|
|
55238
55278
|
credentials: this.credentials,
|
|
55239
55279
|
log: this.log,
|
|
@@ -55261,7 +55301,7 @@ var require_oDataClient = __commonJS({
|
|
|
55261
55301
|
const metadataPath = ((_a2 = this.system.service) == null ? void 0 : _a2.endsWith("/")) ? "$metadata" : "/$metadata";
|
|
55262
55302
|
const edmx = await this.get(metadataPath, { Accept: "application/xml" });
|
|
55263
55303
|
try {
|
|
55264
|
-
return filterReferenceUriInEdmx ? ux_common_utils_1.filterReferenceUri(edmx) : edmx;
|
|
55304
|
+
return filterReferenceUriInEdmx ? (0, ux_common_utils_1.filterReferenceUri)(edmx) : edmx;
|
|
55265
55305
|
} catch {
|
|
55266
55306
|
return edmx;
|
|
55267
55307
|
}
|
|
@@ -55357,12 +55397,12 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
55357
55397
|
if ((_a2 = response == null ? void 0 : response.headers) == null ? void 0 : _a2["sap-message"]) {
|
|
55358
55398
|
const message = JSON.parse(response.headers["sap-message"]);
|
|
55359
55399
|
message["longtextUrl"] = message["longtext_url"];
|
|
55360
|
-
message_1.prettyPrintMessage(message, this.log, { frontendUrl });
|
|
55400
|
+
(0, message_1.prettyPrintMessage)(message, this.log, { frontendUrl });
|
|
55361
55401
|
const path5 = "/sap/bc/ui5_ui5" + (!app.name.startsWith("/") ? "/sap/" : "") + app.name.toLowerCase();
|
|
55362
55402
|
const query = this.system.client ? "?sap-client=" + this.system.client : "";
|
|
55363
55403
|
this.log.info(`App available at ${frontendUrl}${path5}${query}`);
|
|
55364
55404
|
} else if (testMode) {
|
|
55365
|
-
message_1.printErrorDetails((_c = (_b = response == null ? void 0 : response.data.error) == null ? void 0 : _b.innererror) == null ? void 0 : _c.errordetails, this.log, {
|
|
55405
|
+
(0, message_1.printErrorDetails)((_c = (_b = response == null ? void 0 : response.data.error) == null ? void 0 : _b.innererror) == null ? void 0 : _c.errordetails, this.log, {
|
|
55366
55406
|
frontendUrl
|
|
55367
55407
|
});
|
|
55368
55408
|
}
|
|
@@ -55380,7 +55420,7 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
55380
55420
|
const response = await this.deleteRepoRequest(app.name, httpClient, config2);
|
|
55381
55421
|
if ((_a2 = response == null ? void 0 : response.headers) == null ? void 0 : _a2["sap-message"]) {
|
|
55382
55422
|
const message = JSON.parse(response.headers["sap-message"]);
|
|
55383
|
-
message_1.prettyPrintMessage(message, this.log);
|
|
55423
|
+
(0, message_1.prettyPrintMessage)(message, this.log);
|
|
55384
55424
|
}
|
|
55385
55425
|
return response;
|
|
55386
55426
|
} catch (error3) {
|
|
@@ -55415,7 +55455,7 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
55415
55455
|
return { headers, params, maxBodyLength, maxContentLength };
|
|
55416
55456
|
}
|
|
55417
55457
|
createPayload(archive, name, description, abapPackage, httpClient) {
|
|
55418
|
-
const base64Data = fs_1.readFileSync(archive, { encoding: "base64" });
|
|
55458
|
+
const base64Data = (0, fs_1.readFileSync)(archive, { encoding: "base64" });
|
|
55419
55459
|
const time = new Date().toISOString();
|
|
55420
55460
|
const escapedName = encodeXmlValue(name);
|
|
55421
55461
|
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('${escapedName}')</id> <title type="text">Repositories('${escapedName}')</title> <updated>${time}</updated> <category term="/UI5/ABAP_REPOSITORY_SRV.Repository" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> <link href="Repositories('${escapedName}')" rel="edit" title="Repository"/> <content type="application/xml"> <m:properties> <d:Name>${escapedName}</d:Name> <d:Package>${abapPackage == null ? void 0 : abapPackage.toUpperCase()}</d:Package> <d:Description>${encodeXmlValue(description)}</d:Description> <d:ZipArchive>${base64Data}</d:ZipArchive> <d:Info/> </m:properties> </content></entry>`;
|
|
@@ -55538,7 +55578,7 @@ var require_atoCatalog = __commonJS({
|
|
|
55538
55578
|
return this.getAtoData(atoDataXml);
|
|
55539
55579
|
}
|
|
55540
55580
|
static getAtoData(atoDataXml) {
|
|
55541
|
-
const atoData = utils_1.xmlToJson(atoDataXml);
|
|
55581
|
+
const atoData = (0, utils_1.xmlToJson)(atoDataXml);
|
|
55542
55582
|
const settings = atoData == null ? void 0 : atoData["settings"];
|
|
55543
55583
|
if (!settings) {
|
|
55544
55584
|
throw new Error("ATO settings unavailable");
|
|
@@ -55585,7 +55625,7 @@ var require_v2Catalog = __commonJS({
|
|
|
55585
55625
|
constructor({ system, credentials = void 0, log: log7 = console, connection = void 0, postConnectionCallback }) {
|
|
55586
55626
|
var _a2, _b;
|
|
55587
55627
|
if ((credentials == null ? void 0 : credentials.serviceKeys) || (credentials == null ? void 0 : credentials.serviceKeysContents)) {
|
|
55588
|
-
const serviceInfo = uaaOauth_1.getServiceInfo(credentials);
|
|
55628
|
+
const serviceInfo = (0, uaaOauth_1.getServiceInfo)(credentials);
|
|
55589
55629
|
credentials.serviceInfo = serviceInfo;
|
|
55590
55630
|
system.url = serviceInfo.url;
|
|
55591
55631
|
if ((_b = (_a2 = serviceInfo.catalogs) == null ? void 0 : _a2.abap) == null ? void 0 : _b.path) {
|
|
@@ -55597,13 +55637,14 @@ var require_v2Catalog = __commonJS({
|
|
|
55597
55637
|
super({ system, credentials, log: log7, connection, postConnectionCallback });
|
|
55598
55638
|
}
|
|
55599
55639
|
async listServices(recommended = false) {
|
|
55640
|
+
let services;
|
|
55600
55641
|
if (recommended) {
|
|
55601
|
-
|
|
55642
|
+
services = await this.get(common_1.V2_RECOMMENDED_SERVICES_PATH);
|
|
55602
55643
|
} else {
|
|
55603
55644
|
let isS4C = false;
|
|
55604
55645
|
try {
|
|
55605
55646
|
await this.getConnection();
|
|
55606
|
-
isS4C = utils_1.isS4HanaCloudSystem(await atoCatalog_1.AtoCatalog.getATOData({
|
|
55647
|
+
isS4C = (0, utils_1.isS4HanaCloudSystem)(await atoCatalog_1.AtoCatalog.getATOData({
|
|
55607
55648
|
system: this.system,
|
|
55608
55649
|
connection: this.connection,
|
|
55609
55650
|
log: this.log,
|
|
@@ -55611,8 +55652,12 @@ var require_v2Catalog = __commonJS({
|
|
|
55611
55652
|
}));
|
|
55612
55653
|
} catch (error3) {
|
|
55613
55654
|
}
|
|
55614
|
-
|
|
55655
|
+
services = await this.get(isS4C ? common_1.V2_SERVICES_PATH + common_1.V2_ODATA_CATALOG_FILTER_FOR_S4_HANA_SERVICES : common_1.V2_SERVICES_PATH);
|
|
55615
55656
|
}
|
|
55657
|
+
if (!Array.isArray(services)) {
|
|
55658
|
+
throw new Error("Error parsing service list");
|
|
55659
|
+
}
|
|
55660
|
+
return services;
|
|
55616
55661
|
}
|
|
55617
55662
|
async findService({ title, path: path5 }) {
|
|
55618
55663
|
if (!title) {
|
|
@@ -55690,7 +55735,7 @@ var require_v4Catalog = __commonJS({
|
|
|
55690
55735
|
var V4Catalog = class extends common_1.Catalog {
|
|
55691
55736
|
constructor({ system, credentials = void 0, log: log7 = console, connection = void 0, postConnectionCallback }) {
|
|
55692
55737
|
if ((credentials == null ? void 0 : credentials.serviceKeys) || (credentials == null ? void 0 : credentials.serviceKeysContents)) {
|
|
55693
|
-
const serviceInfo = uaaOauth_1.getServiceInfo(credentials);
|
|
55738
|
+
const serviceInfo = (0, uaaOauth_1.getServiceInfo)(credentials);
|
|
55694
55739
|
credentials.serviceInfo = serviceInfo;
|
|
55695
55740
|
system.url = serviceInfo.url;
|
|
55696
55741
|
}
|
|
@@ -55714,6 +55759,9 @@ var require_v4Catalog = __commonJS({
|
|
|
55714
55759
|
const servicePath = recommended ? common_1.V4_RECOMMENDED_SERVICES_PATH_PROD : common_1.V4_SERVICES_PATH_PROD;
|
|
55715
55760
|
this.services = [];
|
|
55716
55761
|
const respValues = await this.get(`${servicePath}&${common_1.ODATA_COUNT_QUERY}`);
|
|
55762
|
+
if (!Array.isArray(respValues.value)) {
|
|
55763
|
+
throw new Error("Error parsing service list");
|
|
55764
|
+
}
|
|
55717
55765
|
this.services = this.services.concat(this.parseServiceData(respValues.value, recommended));
|
|
55718
55766
|
if (respValues["@odata.nextLink"]) {
|
|
55719
55767
|
let skipval = parseInt((_a2 = respValues["@odata.nextLink"]) == null ? void 0 : _a2.split("skiptoken=")[1]);
|
|
@@ -55741,9 +55789,13 @@ var require_catalog = __commonJS({
|
|
|
55741
55789
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
55742
55790
|
if (k2 === void 0)
|
|
55743
55791
|
k2 = k;
|
|
55744
|
-
Object.
|
|
55745
|
-
|
|
55746
|
-
|
|
55792
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
55793
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
55794
|
+
desc = { enumerable: true, get: function() {
|
|
55795
|
+
return m[k];
|
|
55796
|
+
} };
|
|
55797
|
+
}
|
|
55798
|
+
Object.defineProperty(o, k2, desc);
|
|
55747
55799
|
} : function(o, m, k, k2) {
|
|
55748
55800
|
if (k2 === void 0)
|
|
55749
55801
|
k2 = k;
|
|
@@ -55776,9 +55828,13 @@ var require_client = __commonJS({
|
|
|
55776
55828
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
55777
55829
|
if (k2 === void 0)
|
|
55778
55830
|
k2 = k;
|
|
55779
|
-
Object.
|
|
55780
|
-
|
|
55781
|
-
|
|
55831
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
55832
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
55833
|
+
desc = { enumerable: true, get: function() {
|
|
55834
|
+
return m[k];
|
|
55835
|
+
} };
|
|
55836
|
+
}
|
|
55837
|
+
Object.defineProperty(o, k2, desc);
|
|
55782
55838
|
} : function(o, m, k, k2) {
|
|
55783
55839
|
if (k2 === void 0)
|
|
55784
55840
|
k2 = k;
|
|
@@ -55808,7 +55864,7 @@ var require_api_hub = __commonJS({
|
|
|
55808
55864
|
var ux_store_1 = require_dist7();
|
|
55809
55865
|
var constants_1 = require_constants5();
|
|
55810
55866
|
async function getApiHubApiKey(log7 = console) {
|
|
55811
|
-
const keyStore = ux_store_1.getSecureStore(log7);
|
|
55867
|
+
const keyStore = (0, ux_store_1.getSecureStore)(log7);
|
|
55812
55868
|
const apiHubServiceName = config_1.ServiceName.ApiHub;
|
|
55813
55869
|
const apiHubApiKey = await keyStore.retrieve(apiHubServiceName, constants_1.API_HUB_API_KEY);
|
|
55814
55870
|
if (apiHubApiKey) {
|
|
@@ -55818,7 +55874,7 @@ var require_api_hub = __commonJS({
|
|
|
55818
55874
|
}
|
|
55819
55875
|
exports2.getApiHubApiKey = getApiHubApiKey;
|
|
55820
55876
|
async function saveApiHubApiKey(val, log7 = console) {
|
|
55821
|
-
const keyStore = ux_store_1.getSecureStore(log7);
|
|
55877
|
+
const keyStore = (0, ux_store_1.getSecureStore)(log7);
|
|
55822
55878
|
const apiHubServiceName = config_1.ServiceName.ApiHub;
|
|
55823
55879
|
const existingKey = await getApiHubApiKey(log7);
|
|
55824
55880
|
if (existingKey !== void 0) {
|
|
@@ -55858,19 +55914,6 @@ var require_sapSystem = __commonJS({
|
|
|
55858
55914
|
var types_1 = require_types6();
|
|
55859
55915
|
var NEW_SCP_SUFFIX = " (BTP)";
|
|
55860
55916
|
var SapSystem2 = class {
|
|
55861
|
-
constructor(name, config2, credentials = {}, userDisplayName, unSaved = false, postConnectionCallbackCreator) {
|
|
55862
|
-
this.config = config2;
|
|
55863
|
-
this.credentials = credentials;
|
|
55864
|
-
this._unSaved = false;
|
|
55865
|
-
this.postConnectionCallbackInitialized = false;
|
|
55866
|
-
this._name = name;
|
|
55867
|
-
if (this.config.scp === void 0) {
|
|
55868
|
-
this.config.scp = !!(credentials == null ? void 0 : credentials.serviceKeysContents) || !!(credentials == null ? void 0 : credentials.serviceKeys);
|
|
55869
|
-
}
|
|
55870
|
-
this._unSaved = unSaved;
|
|
55871
|
-
this._userDisplayName = userDisplayName;
|
|
55872
|
-
this._postConnectionCallbackCreator = postConnectionCallbackCreator;
|
|
55873
|
-
}
|
|
55874
55917
|
postConnectionCallback() {
|
|
55875
55918
|
var _a2;
|
|
55876
55919
|
if (!this.postConnectionCallbackInitialized) {
|
|
@@ -55886,9 +55929,22 @@ var require_sapSystem = __commonJS({
|
|
|
55886
55929
|
password: s.password,
|
|
55887
55930
|
refreshToken: s.refreshToken
|
|
55888
55931
|
} : void 0;
|
|
55889
|
-
const authenticationType = Object.values(ux_store_1.AuthenticationType).find((v) => v === s.authenticationType) || __1.guessAuthType({ credentials, fallback: false });
|
|
55932
|
+
const authenticationType = Object.values(ux_store_1.AuthenticationType).find((v) => v === s.authenticationType) || (0, __1.guessAuthType)({ credentials, fallback: false });
|
|
55890
55933
|
return new SapSystem2(s.name, { url: s.url, client: s.client, authenticationType }, credentials, s.userDisplayName, void 0, void 0);
|
|
55891
55934
|
}
|
|
55935
|
+
constructor(name, config2, credentials = {}, userDisplayName, unSaved = false, postConnectionCallbackCreator) {
|
|
55936
|
+
this.config = config2;
|
|
55937
|
+
this.credentials = credentials;
|
|
55938
|
+
this._unSaved = false;
|
|
55939
|
+
this.postConnectionCallbackInitialized = false;
|
|
55940
|
+
this._name = name;
|
|
55941
|
+
if (this.config.scp === void 0) {
|
|
55942
|
+
this.config.scp = !!(credentials == null ? void 0 : credentials.serviceKeysContents) || !!(credentials == null ? void 0 : credentials.serviceKeys);
|
|
55943
|
+
}
|
|
55944
|
+
this._unSaved = unSaved;
|
|
55945
|
+
this._userDisplayName = userDisplayName;
|
|
55946
|
+
this._postConnectionCallbackCreator = postConnectionCallbackCreator;
|
|
55947
|
+
}
|
|
55892
55948
|
getConnection() {
|
|
55893
55949
|
return this.connection;
|
|
55894
55950
|
}
|
|
@@ -55977,7 +56033,7 @@ var require_sapSystem = __commonJS({
|
|
|
55977
56033
|
}
|
|
55978
56034
|
addS4HCSuffix(name) {
|
|
55979
56035
|
const S4HC_SUFFIX = " (S4HC)";
|
|
55980
|
-
return (name == null ? void 0 : name.trim().match(`${ux_common_utils_1.escapeRegExp(S4HC_SUFFIX)}$`)) ? name : name + S4HC_SUFFIX;
|
|
56036
|
+
return (name == null ? void 0 : name.trim().match(`${(0, ux_common_utils_1.escapeRegExp)(S4HC_SUFFIX)}$`)) ? name : name + S4HC_SUFFIX;
|
|
55981
56037
|
}
|
|
55982
56038
|
get bareName() {
|
|
55983
56039
|
return stripOldSCPSuffix(this.name);
|
|
@@ -55986,19 +56042,19 @@ var require_sapSystem = __commonJS({
|
|
|
55986
56042
|
return this.config.scp;
|
|
55987
56043
|
}
|
|
55988
56044
|
isPartialUrlDest() {
|
|
55989
|
-
return !config_1.hasDestinationAttrib("WebIDEAdditionalData", config_1.DestinationAttributeProperty.FULL_URL, this.config.destinationAttributes) && this.isGenericODataDest();
|
|
56045
|
+
return !(0, config_1.hasDestinationAttrib)("WebIDEAdditionalData", config_1.DestinationAttributeProperty.FULL_URL, this.config.destinationAttributes) && this.isGenericODataDest();
|
|
55990
56046
|
}
|
|
55991
56047
|
isGenericODataDest() {
|
|
55992
|
-
return this.config.destination ? config_1.hasDestinationAttrib("WebIDEUsage", config_1.DestinationAttributeProperty.ODATA_GENERIC, this.config.destinationAttributes) && !config_1.hasDestinationAttrib("WebIDEUsage", config_1.DestinationAttributeProperty.ODATA_ABAP, this.config.destinationAttributes) : false;
|
|
56048
|
+
return this.config.destination ? (0, config_1.hasDestinationAttrib)("WebIDEUsage", config_1.DestinationAttributeProperty.ODATA_GENERIC, this.config.destinationAttributes) && !(0, config_1.hasDestinationAttrib)("WebIDEUsage", config_1.DestinationAttributeProperty.ODATA_ABAP, this.config.destinationAttributes) : false;
|
|
55993
56049
|
}
|
|
55994
56050
|
isFullUrlDest() {
|
|
55995
|
-
return this.config.destination ? config_1.hasDestinationAttrib("WebIDEAdditionalData", config_1.DestinationAttributeProperty.FULL_URL, this.config.destinationAttributes) && this.isGenericODataDest() : false;
|
|
56051
|
+
return this.config.destination ? (0, config_1.hasDestinationAttrib)("WebIDEAdditionalData", config_1.DestinationAttributeProperty.FULL_URL, this.config.destinationAttributes) && this.isGenericODataDest() : false;
|
|
55996
56052
|
}
|
|
55997
56053
|
isAbapCatalogDest() {
|
|
55998
|
-
return this.config.destination ? config_1.hasDestinationAttrib("WebIDEUsage", config_1.DestinationAttributeProperty.ODATA_ABAP, this.config.destinationAttributes) && !this.isFullUrlDest() : false;
|
|
56054
|
+
return this.config.destination ? (0, config_1.hasDestinationAttrib)("WebIDEUsage", config_1.DestinationAttributeProperty.ODATA_ABAP, this.config.destinationAttributes) && !this.isFullUrlDest() : false;
|
|
55999
56055
|
}
|
|
56000
56056
|
isHTML5DynamicDestination() {
|
|
56001
|
-
return this.config.destination ? config_1.hasHTML5DynamicDestinationAttrib(this.config.destinationAttributes) : false;
|
|
56057
|
+
return this.config.destination ? (0, config_1.hasHTML5DynamicDestinationAttrib)(this.config.destinationAttributes) : false;
|
|
56002
56058
|
}
|
|
56003
56059
|
toString() {
|
|
56004
56060
|
var _a2;
|
|
@@ -56056,14 +56112,14 @@ var require_sapSystem = __commonJS({
|
|
|
56056
56112
|
async getCatalog(odataVersion) {
|
|
56057
56113
|
const system = deepClone(this.config);
|
|
56058
56114
|
if (this.connection) {
|
|
56059
|
-
return client_1.getCatalog({
|
|
56115
|
+
return (0, client_1.getCatalog)({
|
|
56060
56116
|
system,
|
|
56061
56117
|
connection: this.connection,
|
|
56062
56118
|
odataVersion,
|
|
56063
56119
|
postConnectionCallback: this.postConnectionCallback()
|
|
56064
56120
|
});
|
|
56065
56121
|
} else {
|
|
56066
|
-
const catalog = client_1.getCatalog({
|
|
56122
|
+
const catalog = (0, client_1.getCatalog)({
|
|
56067
56123
|
system,
|
|
56068
56124
|
credentials: this.credentials,
|
|
56069
56125
|
odataVersion,
|
|
@@ -56114,7 +56170,7 @@ var require_sapSystem = __commonJS({
|
|
|
56114
56170
|
exports2.SapSystem = SapSystem2;
|
|
56115
56171
|
function toSCPSystemName(systemName) {
|
|
56116
56172
|
const s = systemName.trim();
|
|
56117
|
-
return s.match(`${ux_common_utils_1.escapeRegExp(NEW_SCP_SUFFIX)}$`) ? s : s + NEW_SCP_SUFFIX;
|
|
56173
|
+
return s.match(`${(0, ux_common_utils_1.escapeRegExp)(NEW_SCP_SUFFIX)}$`) ? s : s + NEW_SCP_SUFFIX;
|
|
56118
56174
|
}
|
|
56119
56175
|
function stripOldSCPSuffix(name) {
|
|
56120
56176
|
return name.trim().replace(/ \(SCP\)$/, "");
|
|
@@ -56140,7 +56196,7 @@ var require_systemStore = __commonJS({
|
|
|
56140
56196
|
this.storeService = storeService;
|
|
56141
56197
|
}
|
|
56142
56198
|
static async createInstance(logger) {
|
|
56143
|
-
const storeService = await ux_store_1.getService({ logger, entityName: "system" });
|
|
56199
|
+
const storeService = await (0, ux_store_1.getService)({ logger, entityName: "system" });
|
|
56144
56200
|
return new DefaultImplementation(storeService, logger);
|
|
56145
56201
|
}
|
|
56146
56202
|
async getAll() {
|
|
@@ -56202,9 +56258,9 @@ var require_system = __commonJS({
|
|
|
56202
56258
|
var url_1 = require("url");
|
|
56203
56259
|
var __1 = require_dist8();
|
|
56204
56260
|
async function listSAPSystems2() {
|
|
56205
|
-
if (ux_common_utils_1.isAppStudio()) {
|
|
56261
|
+
if ((0, ux_common_utils_1.isAppStudio)()) {
|
|
56206
56262
|
const systems = {};
|
|
56207
|
-
const destinations = await connection_1.listDestinations();
|
|
56263
|
+
const destinations = await (0, connection_1.listDestinations)();
|
|
56208
56264
|
Object.values(destinations).sort((a, b) => a.Name.localeCompare(b.Name, void 0, { numeric: true, caseFirst: "lower" })).forEach((destination) => {
|
|
56209
56265
|
var _a2, _b;
|
|
56210
56266
|
systems[destination.Name] = new sapSystem_1.SapSystem(destination.Name, {
|
|
@@ -56218,7 +56274,7 @@ var require_system = __commonJS({
|
|
|
56218
56274
|
});
|
|
56219
56275
|
return systems;
|
|
56220
56276
|
} else {
|
|
56221
|
-
const store = await systemStore_1.getSystemStore();
|
|
56277
|
+
const store = await (0, systemStore_1.getSystemStore)();
|
|
56222
56278
|
return postGetAll({ systems: await store.getAll(), store });
|
|
56223
56279
|
}
|
|
56224
56280
|
}
|
|
@@ -56250,7 +56306,7 @@ var require_system = __commonJS({
|
|
|
56250
56306
|
update: { userDisplayName: sys.userDisplayName }
|
|
56251
56307
|
}));
|
|
56252
56308
|
}
|
|
56253
|
-
await ux_common_utils_1.allSettled(updates);
|
|
56309
|
+
await (0, ux_common_utils_1.allSettled)(updates);
|
|
56254
56310
|
resolve2();
|
|
56255
56311
|
}, 0));
|
|
56256
56312
|
}
|
|
@@ -56277,7 +56333,7 @@ var require_system = __commonJS({
|
|
|
56277
56333
|
const update = {};
|
|
56278
56334
|
!!user && (update.userDisplayName = user);
|
|
56279
56335
|
!!refreshToken && (update.refreshToken = refreshToken);
|
|
56280
|
-
return (await systemStore_1.getSystemStore()).partialUpdate({
|
|
56336
|
+
return (await (0, systemStore_1.getSystemStore)()).partialUpdate({
|
|
56281
56337
|
url: system.url,
|
|
56282
56338
|
client: system.client,
|
|
56283
56339
|
update
|
|
@@ -56289,16 +56345,16 @@ var require_system = __commonJS({
|
|
|
56289
56345
|
return cb;
|
|
56290
56346
|
}
|
|
56291
56347
|
async function isSystemNameInUse(name) {
|
|
56292
|
-
const systems = await (await systemStore_1.getSystemStore()).getAll();
|
|
56348
|
+
const systems = await (await (0, systemStore_1.getSystemStore)()).getAll();
|
|
56293
56349
|
const sys = name.trim();
|
|
56294
|
-
return Object.values(systems).findIndex((system) => system.name === sys || system.bareName === sapSystem_1.stripOldSCPSuffix(sys)) !== -1;
|
|
56350
|
+
return Object.values(systems).findIndex((system) => system.name === sys || system.bareName === (0, sapSystem_1.stripOldSCPSuffix)(sys)) !== -1;
|
|
56295
56351
|
}
|
|
56296
56352
|
exports2.isSystemNameInUse = isSystemNameInUse;
|
|
56297
56353
|
async function getSapSystem2(url, client) {
|
|
56298
|
-
if (ux_common_utils_1.isAppStudio()) {
|
|
56354
|
+
if ((0, ux_common_utils_1.isAppStudio)()) {
|
|
56299
56355
|
throw Error("Not supported in AppStudio.");
|
|
56300
56356
|
} else {
|
|
56301
|
-
return (await systemStore_1.getSystemStore()).get(url, client);
|
|
56357
|
+
return (await (0, systemStore_1.getSystemStore)()).get(url, client);
|
|
56302
56358
|
}
|
|
56303
56359
|
}
|
|
56304
56360
|
exports2.getSapSystem = getSapSystem2;
|
|
@@ -56334,12 +56390,12 @@ var require_system = __commonJS({
|
|
|
56334
56390
|
}
|
|
56335
56391
|
exports2.newSapSystemForDestinaton = newSapSystemForDestinaton;
|
|
56336
56392
|
async function saveSapSystem(system) {
|
|
56337
|
-
const store = await systemStore_1.getSystemStore();
|
|
56393
|
+
const store = await (0, systemStore_1.getSystemStore)();
|
|
56338
56394
|
await store.save(system);
|
|
56339
56395
|
}
|
|
56340
56396
|
exports2.saveSapSystem = saveSapSystem;
|
|
56341
56397
|
async function deleteSapSystem(system) {
|
|
56342
|
-
const store = await systemStore_1.getSystemStore();
|
|
56398
|
+
const store = await (0, systemStore_1.getSystemStore)();
|
|
56343
56399
|
return store.delete(system);
|
|
56344
56400
|
}
|
|
56345
56401
|
exports2.deleteSapSystem = deleteSapSystem;
|
|
@@ -56353,9 +56409,13 @@ var require_dist8 = __commonJS({
|
|
|
56353
56409
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
56354
56410
|
if (k2 === void 0)
|
|
56355
56411
|
k2 = k;
|
|
56356
|
-
Object.
|
|
56357
|
-
|
|
56358
|
-
|
|
56412
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
56413
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
56414
|
+
desc = { enumerable: true, get: function() {
|
|
56415
|
+
return m[k];
|
|
56416
|
+
} };
|
|
56417
|
+
}
|
|
56418
|
+
Object.defineProperty(o, k2, desc);
|
|
56359
56419
|
} : function(o, m, k, k2) {
|
|
56360
56420
|
if (k2 === void 0)
|
|
56361
56421
|
k2 = k;
|
|
@@ -56658,9 +56718,9 @@ var require_ui5_info = __commonJS({
|
|
|
56658
56718
|
return a.localeCompare(b);
|
|
56659
56719
|
}
|
|
56660
56720
|
if (versions.indexOf(a) > -1 || versions.indexOf(b) > -1) {
|
|
56661
|
-
return semver_compare_1.default(a, b);
|
|
56721
|
+
return (0, semver_compare_1.default)(a, b);
|
|
56662
56722
|
}
|
|
56663
|
-
return semver_compare_1.default(b + ".999", a + ".999");
|
|
56723
|
+
return (0, semver_compare_1.default)(b + ".999", a + ".999");
|
|
56664
56724
|
}
|
|
56665
56725
|
function filterNewerEqual(versions, minVersion) {
|
|
56666
56726
|
return versions.filter((version) => {
|
|
@@ -56669,11 +56729,11 @@ var require_ui5_info = __commonJS({
|
|
|
56669
56729
|
} else if (version.startsWith("snapshot-")) {
|
|
56670
56730
|
version = version.replace("snapshot-", "");
|
|
56671
56731
|
}
|
|
56672
|
-
return semver_compare_1.default(version, minVersion) >= 0;
|
|
56732
|
+
return (0, semver_compare_1.default)(version, minVersion) >= 0;
|
|
56673
56733
|
});
|
|
56674
56734
|
}
|
|
56675
56735
|
async function requestUI5Versions(url, service = `/${url === "https://ui5.sap.com" ? "version.json?sap-ui-config-patches=true&sap-ui-config-showall=true" : "neo-app.json"}`) {
|
|
56676
|
-
const { system } = ux_odata_client_1.newSapSystemForServiceUrl(url);
|
|
56736
|
+
const { system } = (0, ux_odata_client_1.newSapSystemForServiceUrl)(url);
|
|
56677
56737
|
system.config.service = service;
|
|
56678
56738
|
const odataClient = new ux_odata_client_1.ODataClient({
|
|
56679
56739
|
system: system.config,
|
|
@@ -56718,7 +56778,7 @@ var require_ui5_info = __commonJS({
|
|
|
56718
56778
|
}
|
|
56719
56779
|
result2 = versions.map((ver) => {
|
|
56720
56780
|
var _a2;
|
|
56721
|
-
const parsedVersion = (_a2 = semver_1.coerce(ver.version)) == null ? void 0 : _a2.version;
|
|
56781
|
+
const parsedVersion = (_a2 = (0, semver_1.coerce)(ver.version)) == null ? void 0 : _a2.version;
|
|
56722
56782
|
if (parsedVersion !== void 0) {
|
|
56723
56783
|
return {
|
|
56724
56784
|
version: parsedVersion,
|
|
@@ -56760,14 +56820,14 @@ var require_ui5_info = __commonJS({
|
|
|
56760
56820
|
let officialVersions = [];
|
|
56761
56821
|
let snapshotVersions = [];
|
|
56762
56822
|
try {
|
|
56763
|
-
officialVersions = (filterOptions == null ? void 0 : filterOptions.onlyNpmVersion) ? await retrieveNpmUI5Versions(filterOptions.fioriElementsVersion || "v2", filterOptions.ui5SelectedVersion) : await exports2.retrieveUI5VersionsCache("officialVersions", filterOptions == null ? void 0 : filterOptions.useCache);
|
|
56823
|
+
officialVersions = (filterOptions == null ? void 0 : filterOptions.onlyNpmVersion) ? await retrieveNpmUI5Versions(filterOptions.fioriElementsVersion || "v2", filterOptions.ui5SelectedVersion) : await (0, exports2.retrieveUI5VersionsCache)("officialVersions", filterOptions == null ? void 0 : filterOptions.useCache);
|
|
56764
56824
|
} catch (error3) {
|
|
56765
56825
|
logger.warning(`Request to '${"https://ui5.sap.com"}' failed. Error was: '${error3.message}'. Fallback to default UI5 versions`);
|
|
56766
56826
|
officialVersions = DEFAULT_UI5_VERSIONS.slice();
|
|
56767
56827
|
}
|
|
56768
56828
|
if (filterOptions == null ? void 0 : filterOptions.includeSnapshots) {
|
|
56769
56829
|
try {
|
|
56770
|
-
snapshotVersions = await exports2.retrieveUI5VersionsCache("snapshotsVersions", filterOptions == null ? void 0 : filterOptions.useCache);
|
|
56830
|
+
snapshotVersions = await (0, exports2.retrieveUI5VersionsCache)("snapshotsVersions", filterOptions == null ? void 0 : filterOptions.useCache);
|
|
56771
56831
|
} catch (error3) {
|
|
56772
56832
|
logger.error(`Request to '${"https://sapui5preview-sapui5.dispatcher.int.sap.eu2.hana.ondemand.com"}' failed. Error was: '${error3.message}'`);
|
|
56773
56833
|
}
|
|
@@ -56803,7 +56863,7 @@ var require_ui5_info = __commonJS({
|
|
|
56803
56863
|
}
|
|
56804
56864
|
let ui5VersionsOverview = void 0;
|
|
56805
56865
|
if ((filterOptions == null ? void 0 : filterOptions.groupUI5Versions) === true) {
|
|
56806
|
-
ui5VersionsOverview = await exports2.retrieveUI5VersionsCache("overview", filterOptions == null ? void 0 : filterOptions.useCache);
|
|
56866
|
+
ui5VersionsOverview = await (0, exports2.retrieveUI5VersionsCache)("overview", filterOptions == null ? void 0 : filterOptions.useCache);
|
|
56807
56867
|
}
|
|
56808
56868
|
return filteredUI5Versions.map((ui5) => {
|
|
56809
56869
|
const ui5Version = {
|
|
@@ -56817,7 +56877,7 @@ var require_ui5_info = __commonJS({
|
|
|
56817
56877
|
if ((filterOptions == null ? void 0 : filterOptions.groupUI5Versions) === true && ui5VersionsOverview !== void 0) {
|
|
56818
56878
|
ui5Version.version.maintained = ui5VersionsOverview.some((v) => {
|
|
56819
56879
|
if (v !== void 0) {
|
|
56820
|
-
return `${semver_1.major(v.version)}.${semver_1.minor(v.version)}` === `${semver_1.major(ui5)}.${semver_1.minor(ui5)}` && v.support === types_1.inMaintenance;
|
|
56880
|
+
return `${(0, semver_1.major)(v.version)}.${(0, semver_1.minor)(v.version)}` === `${(0, semver_1.major)(ui5)}.${(0, semver_1.minor)(ui5)}` && v.support === types_1.inMaintenance;
|
|
56821
56881
|
}
|
|
56822
56882
|
});
|
|
56823
56883
|
}
|
|
@@ -56836,13 +56896,13 @@ var require_ui5_info = __commonJS({
|
|
|
56836
56896
|
filteredThemes.push(theme);
|
|
56837
56897
|
break;
|
|
56838
56898
|
case "sap_fiori_3_dark":
|
|
56839
|
-
(ui5VersionCheck(filteredUi5Version) || semver_compare_1.default(filteredUi5Version, MIN_UI5_DARK_THEME) >= 0) && filteredThemes.push(theme);
|
|
56899
|
+
(ui5VersionCheck(filteredUi5Version) || (0, semver_compare_1.default)(filteredUi5Version, MIN_UI5_DARK_THEME) >= 0) && filteredThemes.push(theme);
|
|
56840
56900
|
break;
|
|
56841
56901
|
case "sap_horizon":
|
|
56842
56902
|
case "sap_horizon_dark":
|
|
56843
56903
|
case "sap_horizon_hcw":
|
|
56844
56904
|
case "sap_horizon_hcb":
|
|
56845
|
-
(ui5VersionCheck(filteredUi5Version) || semver_compare_1.default(filteredUi5Version, MIN_UI5_VERSION_HORIZON_THEME) >= 0) && filteredThemes.push(theme);
|
|
56905
|
+
(ui5VersionCheck(filteredUi5Version) || (0, semver_compare_1.default)(filteredUi5Version, MIN_UI5_VERSION_HORIZON_THEME) >= 0) && filteredThemes.push(theme);
|
|
56846
56906
|
break;
|
|
56847
56907
|
}
|
|
56848
56908
|
}
|
|
@@ -56851,7 +56911,7 @@ var require_ui5_info = __commonJS({
|
|
|
56851
56911
|
exports2.getUi5Themes = getUi5Themes;
|
|
56852
56912
|
function getDefaultTheme(ui5Version) {
|
|
56853
56913
|
if (ui5Version) {
|
|
56854
|
-
if (semver_1.coerce(ui5Version) && semver_1.lt(ui5Version, MIN_UI5_VERSION_HORIZON_THEME)) {
|
|
56914
|
+
if ((0, semver_1.coerce)(ui5Version) && (0, semver_1.lt)(ui5Version, MIN_UI5_VERSION_HORIZON_THEME)) {
|
|
56855
56915
|
return "sap_fiori_3";
|
|
56856
56916
|
}
|
|
56857
56917
|
}
|
|
@@ -56906,7 +56966,7 @@ var require_ui5_info = __commonJS({
|
|
|
56906
56966
|
if (ui5SelectedVersion && ui5SelectedVersion.length) {
|
|
56907
56967
|
const latestMinIdx = latestVersions.findIndex((v) => v === ui5SelectedVersion);
|
|
56908
56968
|
if (latestMinIdx === -1) {
|
|
56909
|
-
if (semver_compare_1.default(ui5SelectedVersion, latestVersions.slice(-1)[0]) > 0 || ui5SelectedVersion === "Latest" || !semver_1.valid(ui5SelectedVersion)) {
|
|
56969
|
+
if ((0, semver_compare_1.default)(ui5SelectedVersion, latestVersions.slice(-1)[0]) > 0 || ui5SelectedVersion === "Latest" || !(0, semver_1.valid)(ui5SelectedVersion)) {
|
|
56910
56970
|
latestVersions = latestVersions.slice(0);
|
|
56911
56971
|
} else {
|
|
56912
56972
|
latestVersions = latestVersions.slice(-1);
|
|
@@ -56956,8 +57016,8 @@ var require_ui5_info = __commonJS({
|
|
|
56956
57016
|
exports2.getLatestSapui5Version = getLatestSapui5Version;
|
|
56957
57017
|
function getSpecTagVersion(ui5Version) {
|
|
56958
57018
|
if (ui5Version) {
|
|
56959
|
-
if (semver_1.valid(ui5Version)) {
|
|
56960
|
-
return `UI5-${semver_1.major(ui5Version)}.${semver_1.minor(ui5Version)}`;
|
|
57019
|
+
if ((0, semver_1.valid)(ui5Version)) {
|
|
57020
|
+
return `UI5-${(0, semver_1.major)(ui5Version)}.${(0, semver_1.minor)(ui5Version)}`;
|
|
56961
57021
|
} else if (ui5Version.includes("snapshot") && ui5Version.includes(".")) {
|
|
56962
57022
|
const snapshotVersion = ui5Version.split("snapshot-")[1];
|
|
56963
57023
|
return `UI5-${snapshotVersion}`;
|
|
@@ -57508,6 +57568,7 @@ var require_EventName = __commonJS({
|
|
|
57508
57568
|
EventName4["GD_SIDE_BY_SIDE"] = "GD_SIDE_BY_SIDE";
|
|
57509
57569
|
EventName4["GD_WIZARD"] = "GD_WIZARD";
|
|
57510
57570
|
EventName4["GD_DESCMODE"] = "GD_DESCMODE";
|
|
57571
|
+
EventName4["GD_PROJECTVIEW"] = "GD_PROJECTVIEW";
|
|
57511
57572
|
EventName4["PAGEMAP"] = "PAGEMAP";
|
|
57512
57573
|
EventName4["APP_ACTIONS"] = "ACTIONS";
|
|
57513
57574
|
EventName4["PAGE_EDITOR"] = "PAGE_EDITOR";
|
|
@@ -69190,7 +69251,7 @@ var require_package5 = __commonJS({
|
|
|
69190
69251
|
"../lib/telemetry/dist/package.json"(exports2, module2) {
|
|
69191
69252
|
module2.exports = {
|
|
69192
69253
|
name: "@sap/ux-telemetry",
|
|
69193
|
-
version: "1.9.
|
|
69254
|
+
version: "1.9.1",
|
|
69194
69255
|
description: "SAP Fiori tools telemetry library",
|
|
69195
69256
|
main: "dist/src/index.js",
|
|
69196
69257
|
author: "SAP SE",
|
|
@@ -69215,20 +69276,20 @@ var require_package5 = __commonJS({
|
|
|
69215
69276
|
},
|
|
69216
69277
|
dependencies: {
|
|
69217
69278
|
"@sap-ux/store": "0.3.8",
|
|
69218
|
-
"@sap/ux-cds": "1.9.
|
|
69219
|
-
"@sap/ux-common-utils": "1.9.
|
|
69220
|
-
"@sap/ux-feature-toggle": "1.9.
|
|
69221
|
-
"@sap/ux-project-access": "1.9.
|
|
69279
|
+
"@sap/ux-cds": "1.9.1",
|
|
69280
|
+
"@sap/ux-common-utils": "1.9.1",
|
|
69281
|
+
"@sap/ux-feature-toggle": "1.9.1",
|
|
69282
|
+
"@sap/ux-project-access": "1.9.1",
|
|
69222
69283
|
applicationinsights: "1.4.1",
|
|
69223
69284
|
axios: "0.26.0",
|
|
69224
69285
|
"performance-now": "2.1.0",
|
|
69225
69286
|
yaml: "2.0.0-10"
|
|
69226
69287
|
},
|
|
69227
69288
|
devDependencies: {
|
|
69228
|
-
memfs: "3.4.
|
|
69289
|
+
memfs: "3.4.13",
|
|
69229
69290
|
"ts-jest": "28.0.8",
|
|
69230
69291
|
"ts-node": "8.5.2",
|
|
69231
|
-
typescript: "4.
|
|
69292
|
+
typescript: "4.9.4",
|
|
69232
69293
|
unionfs: "4.4.0"
|
|
69233
69294
|
},
|
|
69234
69295
|
files: [
|
|
@@ -69287,9 +69348,13 @@ var require_reporting = __commonJS({
|
|
|
69287
69348
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
69288
69349
|
if (k2 === void 0)
|
|
69289
69350
|
k2 = k;
|
|
69290
|
-
Object.
|
|
69291
|
-
|
|
69292
|
-
|
|
69351
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
69352
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
69353
|
+
desc = { enumerable: true, get: function() {
|
|
69354
|
+
return m[k];
|
|
69355
|
+
} };
|
|
69356
|
+
}
|
|
69357
|
+
Object.defineProperty(o, k2, desc);
|
|
69293
69358
|
} : function(o, m, k, k2) {
|
|
69294
69359
|
if (k2 === void 0)
|
|
69295
69360
|
k2 = k;
|
|
@@ -69356,7 +69421,7 @@ var require_reporting = __commonJS({
|
|
|
69356
69421
|
var _a2;
|
|
69357
69422
|
if (((_a2 = process.env.SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY) == null ? void 0 : _a2.trim()) !== "true") {
|
|
69358
69423
|
reportingTelemetryClient = new appInsights.TelemetryClient(telemetryPackageJSON.azureInstrumentationKey);
|
|
69359
|
-
telemetryClientConfig_1.configAzureTelemetryClient(reportingTelemetryClient);
|
|
69424
|
+
(0, telemetryClientConfig_1.configAzureTelemetryClient)(reportingTelemetryClient);
|
|
69360
69425
|
}
|
|
69361
69426
|
var reportRuntimeError = (error3) => {
|
|
69362
69427
|
const properties = { message: error3.message };
|
|
@@ -69409,16 +69474,16 @@ var require_system3 = __commonJS({
|
|
|
69409
69474
|
var reporting_1 = require_reporting();
|
|
69410
69475
|
var TelemetrySystem = class {
|
|
69411
69476
|
static init() {
|
|
69412
|
-
cloudDebugger_1.debug(`start System.init`);
|
|
69413
|
-
TelemetrySystem.modules = system_1.processMatchingPaths(TelemetrySystem.modules);
|
|
69477
|
+
(0, cloudDebugger_1.debug)(`start System.init`);
|
|
69478
|
+
TelemetrySystem.modules = (0, system_1.processMatchingPaths)(TelemetrySystem.modules);
|
|
69414
69479
|
let pathBase = TelemetrySystem.getMatchingModulePath(module2);
|
|
69415
|
-
cloudDebugger_1.debug(`base path: ${pathBase}`);
|
|
69480
|
+
(0, cloudDebugger_1.debug)(`base path: ${pathBase}`);
|
|
69416
69481
|
if (!pathBase) {
|
|
69417
|
-
TelemetrySystem.fallbackModules = system_1.processMatchingPaths(TelemetrySystem.fallbackModules);
|
|
69482
|
+
TelemetrySystem.fallbackModules = (0, system_1.processMatchingPaths)(TelemetrySystem.fallbackModules);
|
|
69418
69483
|
pathBase = TelemetrySystem.getMatchingModulePath(module2, true);
|
|
69419
69484
|
}
|
|
69420
69485
|
const manifestPath = TelemetrySystem.getManifestPath(pathBase);
|
|
69421
|
-
cloudDebugger_1.debug(`package.json path: ${manifestPath}`);
|
|
69486
|
+
(0, cloudDebugger_1.debug)(`package.json path: ${manifestPath}`);
|
|
69422
69487
|
TelemetrySystem.manifest = TelemetrySystem.getManifestJSON(manifestPath);
|
|
69423
69488
|
}
|
|
69424
69489
|
static getManifestJSON(path5) {
|
|
@@ -69431,7 +69496,7 @@ var require_system3 = __commonJS({
|
|
|
69431
69496
|
}
|
|
69432
69497
|
static getManifestPath(pathBase) {
|
|
69433
69498
|
let manifestPath = pathBase;
|
|
69434
|
-
if (ux_common_utils_1.isAppStudio() && manifestPath && manifestPath.indexOf("generators") < 0 && manifestPath.indexOf("deployment-generator") < 0 && manifestPath.indexOf("/ux-ui5-tooling") < 0) {
|
|
69499
|
+
if ((0, ux_common_utils_1.isAppStudio)() && manifestPath && manifestPath.indexOf("generators") < 0 && manifestPath.indexOf("deployment-generator") < 0 && manifestPath.indexOf("/ux-ui5-tooling") < 0) {
|
|
69435
69500
|
manifestPath = manifestPath.concat("/extension");
|
|
69436
69501
|
}
|
|
69437
69502
|
if (manifestPath && manifestPath.indexOf("language-server") > -1) {
|
|
@@ -69507,7 +69572,7 @@ var require_system3 = __commonJS({
|
|
|
69507
69572
|
TelemetrySystem.init();
|
|
69508
69573
|
}
|
|
69509
69574
|
} catch (err) {
|
|
69510
|
-
reporting_1.reportRuntimeError(err);
|
|
69575
|
+
(0, reporting_1.reportRuntimeError)(err);
|
|
69511
69576
|
}
|
|
69512
69577
|
}
|
|
69513
69578
|
});
|
|
@@ -69585,9 +69650,13 @@ var require_appInsightClient = __commonJS({
|
|
|
69585
69650
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
69586
69651
|
if (k2 === void 0)
|
|
69587
69652
|
k2 = k;
|
|
69588
|
-
Object.
|
|
69589
|
-
|
|
69590
|
-
|
|
69653
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
69654
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
69655
|
+
desc = { enumerable: true, get: function() {
|
|
69656
|
+
return m[k];
|
|
69657
|
+
} };
|
|
69658
|
+
}
|
|
69659
|
+
Object.defineProperty(o, k2, desc);
|
|
69591
69660
|
} : function(o, m, k, k2) {
|
|
69592
69661
|
if (k2 === void 0)
|
|
69593
69662
|
k2 = k;
|
|
@@ -69670,7 +69739,7 @@ var require_appInsightClient = __commonJS({
|
|
|
69670
69739
|
}
|
|
69671
69740
|
const client = new appInsights.TelemetryClient(this.applicationKey);
|
|
69672
69741
|
client.config.samplingPercentage = sampleRateNumer;
|
|
69673
|
-
telemetryClientConfig_1.configAzureTelemetryClient(client);
|
|
69742
|
+
(0, telemetryClientConfig_1.configAzureTelemetryClient)(client);
|
|
69674
69743
|
return client;
|
|
69675
69744
|
}
|
|
69676
69745
|
};
|
|
@@ -69706,10 +69775,10 @@ var require_toolsSuiteTelemetryClient = __commonJS({
|
|
|
69706
69775
|
super(applicationKey, extensionName, extensionVersion);
|
|
69707
69776
|
}
|
|
69708
69777
|
async report(eventName, properties, measurements, sampleRate, telemetryHelperProperties, ignoreSettings) {
|
|
69709
|
-
const fioriProjectCommonProperties = await toolsSuiteTelemetry_1.processToolsSuiteTelemetry(telemetryHelperProperties);
|
|
69778
|
+
const fioriProjectCommonProperties = await (0, toolsSuiteTelemetry_1.processToolsSuiteTelemetry)(telemetryHelperProperties);
|
|
69710
69779
|
const commonProperties = {
|
|
69711
69780
|
v: this.extensionVersion,
|
|
69712
|
-
datetime: date_1.localDatetimeToUTC()
|
|
69781
|
+
datetime: (0, date_1.localDatetimeToUTC)()
|
|
69713
69782
|
};
|
|
69714
69783
|
const finalProperties = {
|
|
69715
69784
|
...properties,
|
|
@@ -69719,10 +69788,10 @@ var require_toolsSuiteTelemetryClient = __commonJS({
|
|
|
69719
69788
|
await super.report(eventName, finalProperties, measurements, sampleRate, telemetryHelperProperties, ignoreSettings);
|
|
69720
69789
|
}
|
|
69721
69790
|
async reportEvent(event, sampleRate, telemetryHelperProperties, ignoreSettings) {
|
|
69722
|
-
const fioriProjectCommonProperties = await toolsSuiteTelemetry_1.processToolsSuiteTelemetry(telemetryHelperProperties);
|
|
69791
|
+
const fioriProjectCommonProperties = await (0, toolsSuiteTelemetry_1.processToolsSuiteTelemetry)(telemetryHelperProperties);
|
|
69723
69792
|
const telemetryEventCommonProperties = {
|
|
69724
69793
|
v: this.extensionVersion,
|
|
69725
|
-
datetime: date_1.localDatetimeToUTC()
|
|
69794
|
+
datetime: (0, date_1.localDatetimeToUTC)()
|
|
69726
69795
|
};
|
|
69727
69796
|
const finalProperties = {
|
|
69728
69797
|
...event.properties,
|
|
@@ -70588,9 +70657,13 @@ var require_file2 = __commonJS({
|
|
|
70588
70657
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
70589
70658
|
if (k2 === void 0)
|
|
70590
70659
|
k2 = k;
|
|
70591
|
-
Object.
|
|
70592
|
-
|
|
70593
|
-
|
|
70660
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
70661
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
70662
|
+
desc = { enumerable: true, get: function() {
|
|
70663
|
+
return m[k];
|
|
70664
|
+
} };
|
|
70665
|
+
}
|
|
70666
|
+
Object.defineProperty(o, k2, desc);
|
|
70594
70667
|
} : function(o, m, k, k2) {
|
|
70595
70668
|
if (k2 === void 0)
|
|
70596
70669
|
k2 = k;
|
|
@@ -70715,7 +70788,7 @@ var require_file2 = __commonJS({
|
|
|
70715
70788
|
if (await fileExists2(path5)) {
|
|
70716
70789
|
const files = await readDirectory(path5);
|
|
70717
70790
|
for (const name of files) {
|
|
70718
|
-
const fullPath = path_1.join(path5, name);
|
|
70791
|
+
const fullPath = (0, path_1.join)(path5, name);
|
|
70719
70792
|
if (await isDirectory(fullPath)) {
|
|
70720
70793
|
await deleteDirectory(fullPath);
|
|
70721
70794
|
} else {
|
|
@@ -72616,10 +72689,10 @@ var require_capProject = __commonJS({
|
|
|
72616
72689
|
var packageJsonFileName = "package.json";
|
|
72617
72690
|
async function parsePackageJson(projectRoot) {
|
|
72618
72691
|
let packageJson;
|
|
72619
|
-
const packageJsonPath = path_1.join(projectRoot, packageJsonFileName);
|
|
72620
|
-
if (await file_1.fileExists(packageJsonPath)) {
|
|
72692
|
+
const packageJsonPath = (0, path_1.join)(projectRoot, packageJsonFileName);
|
|
72693
|
+
if (await (0, file_1.fileExists)(packageJsonPath)) {
|
|
72621
72694
|
try {
|
|
72622
|
-
packageJson = JSON.parse(await file_1.readFile(packageJsonPath));
|
|
72695
|
+
packageJson = JSON.parse(await (0, file_1.readFile)(packageJsonPath));
|
|
72623
72696
|
} catch (error3) {
|
|
72624
72697
|
}
|
|
72625
72698
|
}
|
|
@@ -72638,10 +72711,10 @@ var require_capProject = __commonJS({
|
|
|
72638
72711
|
}
|
|
72639
72712
|
exports2.isCapNodeJsProject = isCapNodeJsProject;
|
|
72640
72713
|
async function isCapJavaProject(projectRoot) {
|
|
72641
|
-
return file_1.fileExists(path_1.join(projectRoot, exports2.CAP_SERVICES_FOLDER, "src", "main", "resources", "application.yaml"));
|
|
72714
|
+
return (0, file_1.fileExists)((0, path_1.join)(projectRoot, exports2.CAP_SERVICES_FOLDER, "src", "main", "resources", "application.yaml"));
|
|
72642
72715
|
}
|
|
72643
72716
|
exports2.isCapJavaProject = isCapJavaProject;
|
|
72644
|
-
var toAbsoluteUri = (project, relativeUri) => path_1.join(project.root, relativeUri);
|
|
72717
|
+
var toAbsoluteUri = (project, relativeUri) => (0, path_1.join)(project.root, relativeUri);
|
|
72645
72718
|
exports2.toAbsoluteUri = toAbsoluteUri;
|
|
72646
72719
|
var toReferenceUri = async (project, relativeUriFrom, relativeUriTo) => {
|
|
72647
72720
|
let relativeUri = "";
|
|
@@ -72660,8 +72733,8 @@ var require_capProject = __commonJS({
|
|
|
72660
72733
|
}
|
|
72661
72734
|
}
|
|
72662
72735
|
if (!relativeUri) {
|
|
72663
|
-
const fromDir = path_1.dirname(exports2.toAbsoluteUri(project, relativeUriFrom));
|
|
72664
|
-
relativeUri = path_1.relative(fromDir, exports2.toAbsoluteUri(project, relativeUriTo));
|
|
72736
|
+
const fromDir = (0, path_1.dirname)((0, exports2.toAbsoluteUri)(project, relativeUriFrom));
|
|
72737
|
+
relativeUri = (0, path_1.relative)(fromDir, (0, exports2.toAbsoluteUri)(project, relativeUriTo));
|
|
72665
72738
|
if (!relativeUri.startsWith(".")) {
|
|
72666
72739
|
relativeUri = "./" + relativeUri;
|
|
72667
72740
|
}
|
|
@@ -72688,8 +72761,8 @@ var require_capProject = __commonJS({
|
|
|
72688
72761
|
async function readPackageNameForFolder(baseUri, relativeUri) {
|
|
72689
72762
|
let packageName = "";
|
|
72690
72763
|
try {
|
|
72691
|
-
const path5 = path_1.normalize(baseUri + "/" + relativeUri + "/package.json");
|
|
72692
|
-
const content = await file_1.readFile(path5);
|
|
72764
|
+
const path5 = (0, path_1.normalize)(baseUri + "/" + relativeUri + "/package.json");
|
|
72765
|
+
const content = await (0, file_1.readFile)(path5);
|
|
72693
72766
|
if (content) {
|
|
72694
72767
|
const parsed = JSON.parse(content);
|
|
72695
72768
|
packageName = parsed.name;
|
|
@@ -72709,9 +72782,13 @@ var require_webapp2 = __commonJS({
|
|
|
72709
72782
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
72710
72783
|
if (k2 === void 0)
|
|
72711
72784
|
k2 = k;
|
|
72712
|
-
Object.
|
|
72713
|
-
|
|
72714
|
-
|
|
72785
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
72786
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
72787
|
+
desc = { enumerable: true, get: function() {
|
|
72788
|
+
return m[k];
|
|
72789
|
+
} };
|
|
72790
|
+
}
|
|
72791
|
+
Object.defineProperty(o, k2, desc);
|
|
72715
72792
|
} : function(o, m, k, k2) {
|
|
72716
72793
|
if (k2 === void 0)
|
|
72717
72794
|
k2 = k;
|
|
@@ -72744,7 +72821,7 @@ var require_webapp2 = __commonJS({
|
|
|
72744
72821
|
var _a2, _b, _c, _d, _e;
|
|
72745
72822
|
let webappPath = project_spec_1.DirName.Webapp;
|
|
72746
72823
|
try {
|
|
72747
|
-
const yamlContent = await file_1.readFile(path_1.join(root, project_spec_1.FileName.Ui5Yaml));
|
|
72824
|
+
const yamlContent = await (0, file_1.readFile)((0, path_1.join)(root, project_spec_1.FileName.Ui5Yaml));
|
|
72748
72825
|
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;
|
|
72749
72826
|
} catch {
|
|
72750
72827
|
webappPath = project_spec_1.DirName.Webapp;
|
|
@@ -72762,9 +72839,13 @@ var require_yamlFile = __commonJS({
|
|
|
72762
72839
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
72763
72840
|
if (k2 === void 0)
|
|
72764
72841
|
k2 = k;
|
|
72765
|
-
Object.
|
|
72766
|
-
|
|
72767
|
-
|
|
72842
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
72843
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
72844
|
+
desc = { enumerable: true, get: function() {
|
|
72845
|
+
return m[k];
|
|
72846
|
+
} };
|
|
72847
|
+
}
|
|
72848
|
+
Object.defineProperty(o, k2, desc);
|
|
72768
72849
|
} : function(o, m, k, k2) {
|
|
72769
72850
|
if (k2 === void 0)
|
|
72770
72851
|
k2 = k;
|
|
@@ -72794,9 +72875,9 @@ var require_yamlFile = __commonJS({
|
|
|
72794
72875
|
var file_1 = require_file2();
|
|
72795
72876
|
var i18n_1 = require_i18n3();
|
|
72796
72877
|
async function readUi5YamlConfig(dirPath, filename) {
|
|
72797
|
-
const filePath = path_1.join(dirPath, filename);
|
|
72798
|
-
if (await file_1.fileExists(filePath)) {
|
|
72799
|
-
return file_1.readFile(filePath);
|
|
72878
|
+
const filePath = (0, path_1.join)(dirPath, filename);
|
|
72879
|
+
if (await (0, file_1.fileExists)(filePath)) {
|
|
72880
|
+
return (0, file_1.readFile)(filePath);
|
|
72800
72881
|
} else {
|
|
72801
72882
|
const error3 = new Error(i18n_1.i18n.t("ERROR_UI5_YAML_MISSING"));
|
|
72802
72883
|
error3.name = "Ui5MissingError";
|
|
@@ -72835,7 +72916,7 @@ var require_yamlFile = __commonJS({
|
|
|
72835
72916
|
}
|
|
72836
72917
|
return parsed;
|
|
72837
72918
|
} catch (e) {
|
|
72838
|
-
throw new Error(i18n_1.i18n.t("ERROR_UI5_YAML_PARSING", { filePath: path_1.join(dirPath, filename), parsingError: e.message }));
|
|
72919
|
+
throw new Error(i18n_1.i18n.t("ERROR_UI5_YAML_PARSING", { filePath: (0, path_1.join)(dirPath, filename), parsingError: e.message }));
|
|
72839
72920
|
}
|
|
72840
72921
|
}
|
|
72841
72922
|
exports2.getParsedUi5YamlConfig = getParsedUi5YamlConfig;
|
|
@@ -72849,9 +72930,13 @@ var require_mockServer = __commonJS({
|
|
|
72849
72930
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
72850
72931
|
if (k2 === void 0)
|
|
72851
72932
|
k2 = k;
|
|
72852
|
-
Object.
|
|
72853
|
-
|
|
72854
|
-
|
|
72933
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
72934
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
72935
|
+
desc = { enumerable: true, get: function() {
|
|
72936
|
+
return m[k];
|
|
72937
|
+
} };
|
|
72938
|
+
}
|
|
72939
|
+
Object.defineProperty(o, k2, desc);
|
|
72855
72940
|
} : function(o, m, k, k2) {
|
|
72856
72941
|
if (k2 === void 0)
|
|
72857
72942
|
k2 = k;
|
|
@@ -72883,7 +72968,7 @@ var require_mockServer = __commonJS({
|
|
|
72883
72968
|
var file_1 = require_file2();
|
|
72884
72969
|
async function getMockServerConfig(cfgFileDir, cfgFileName = project_spec_1.FileName.Ui5MockYaml) {
|
|
72885
72970
|
var _a2;
|
|
72886
|
-
const ui5Config = await yamlFile_1.getParsedUi5YamlConfig(cfgFileDir, cfgFileName);
|
|
72971
|
+
const ui5Config = await (0, yamlFile_1.getParsedUi5YamlConfig)(cfgFileDir, cfgFileName);
|
|
72887
72972
|
const middlewares = (_a2 = ui5Config.server) == null ? void 0 : _a2.customMiddleware;
|
|
72888
72973
|
if (middlewares) {
|
|
72889
72974
|
let mockMW;
|
|
@@ -72916,22 +73001,23 @@ var require_mockServer = __commonJS({
|
|
|
72916
73001
|
}
|
|
72917
73002
|
exports2.getMockServicesConfiguration = getMockServicesConfiguration;
|
|
72918
73003
|
async function readDynamicMockServerConfig(yamlCfgDirPath, mockFolderPath) {
|
|
72919
|
-
|
|
72920
|
-
const
|
|
72921
|
-
const
|
|
72922
|
-
const
|
|
73004
|
+
var _a2;
|
|
73005
|
+
const configDirPath = (0, path_1.resolve)(yamlCfgDirPath, mockFolderPath);
|
|
73006
|
+
const jsonConfigPath = (0, path_1.join)(configDirPath, "config.json");
|
|
73007
|
+
const moduleConfigPath = (0, path_1.join)(configDirPath, "config.js");
|
|
73008
|
+
const isJSON = await (0, file_1.fileExists)(jsonConfigPath);
|
|
72923
73009
|
let services;
|
|
72924
73010
|
try {
|
|
72925
73011
|
if (isJSON) {
|
|
72926
|
-
services = await file_1.readJSON(jsonConfigPath);
|
|
73012
|
+
services = await (0, file_1.readJSON)(jsonConfigPath);
|
|
72927
73013
|
} else {
|
|
72928
|
-
const dynamicConfig = await Promise.resolve().then(() => __importStar(require(
|
|
73014
|
+
const dynamicConfig = await (_a2 = moduleConfigPath, Promise.resolve().then(() => __importStar(require(_a2))));
|
|
72929
73015
|
services = dynamicConfig == null ? void 0 : dynamicConfig.default;
|
|
72930
73016
|
}
|
|
72931
73017
|
} catch (e) {
|
|
72932
73018
|
throw new Error(i18n_1.i18n.t("ERROR_UI5_YAML_DYNAMIC_CFG_IMPORT", {
|
|
72933
73019
|
filePath: isJSON ? jsonConfigPath : moduleConfigPath,
|
|
72934
|
-
yamlFile: path_1.join(yamlCfgDirPath, project_spec_1.FileName.Ui5MockYaml)
|
|
73020
|
+
yamlFile: (0, path_1.join)(yamlCfgDirPath, project_spec_1.FileName.Ui5MockYaml)
|
|
72935
73021
|
}));
|
|
72936
73022
|
}
|
|
72937
73023
|
return (services == null ? void 0 : services.length) ? services : null;
|
|
@@ -72939,7 +73025,7 @@ var require_mockServer = __commonJS({
|
|
|
72939
73025
|
function matchMockServiceByMetadataPath(mockService, path5) {
|
|
72940
73026
|
const { metadataPath } = mockService;
|
|
72941
73027
|
if (metadataPath) {
|
|
72942
|
-
return path5.endsWith(path_1.normalize(metadataPath));
|
|
73028
|
+
return path5.endsWith((0, path_1.normalize)(metadataPath));
|
|
72943
73029
|
}
|
|
72944
73030
|
return false;
|
|
72945
73031
|
}
|
|
@@ -73429,9 +73515,13 @@ var require_utils10 = __commonJS({
|
|
|
73429
73515
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
73430
73516
|
if (k2 === void 0)
|
|
73431
73517
|
k2 = k;
|
|
73432
|
-
Object.
|
|
73433
|
-
|
|
73434
|
-
|
|
73518
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
73519
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
73520
|
+
desc = { enumerable: true, get: function() {
|
|
73521
|
+
return m[k];
|
|
73522
|
+
} };
|
|
73523
|
+
}
|
|
73524
|
+
Object.defineProperty(o, k2, desc);
|
|
73435
73525
|
} : function(o, m, k, k2) {
|
|
73436
73526
|
if (k2 === void 0)
|
|
73437
73527
|
k2 = k;
|
|
@@ -73481,11 +73571,11 @@ var require_utils10 = __commonJS({
|
|
|
73481
73571
|
if (!pckgJson) {
|
|
73482
73572
|
throw new Error(`Could not find any project root. Parameter 'sapuxRequired' was ${sapuxRequired ? "true" : "false"}`);
|
|
73483
73573
|
}
|
|
73484
|
-
let root = path_1.dirname(pckgJson);
|
|
73574
|
+
let root = (0, path_1.dirname)(pckgJson);
|
|
73485
73575
|
if (sapuxRequired) {
|
|
73486
|
-
const sapux = (await file_1.readJSON(pckgJson)).sapux;
|
|
73576
|
+
const sapux = (await (0, file_1.readJSON)(pckgJson)).sapux;
|
|
73487
73577
|
if (!sapux) {
|
|
73488
|
-
root = await findProjectRoot(path_1.dirname(root), sapuxRequired);
|
|
73578
|
+
root = await findProjectRoot((0, path_1.dirname)(root), sapuxRequired);
|
|
73489
73579
|
}
|
|
73490
73580
|
}
|
|
73491
73581
|
return root;
|
|
@@ -73517,16 +73607,16 @@ var require_utils10 = __commonJS({
|
|
|
73517
73607
|
];
|
|
73518
73608
|
const fileNames = [project_spec_1.FileName.Pom, project_spec_1.FileName.Package];
|
|
73519
73609
|
return new Promise((doResolve, reject2) => {
|
|
73520
|
-
const finder = findit2_1.default(root);
|
|
73610
|
+
const finder = (0, findit2_1.default)(root);
|
|
73521
73611
|
finder.on("directory", (dir2, stat, stop) => {
|
|
73522
|
-
const base = path_1.basename(dir2);
|
|
73612
|
+
const base = (0, path_1.basename)(dir2);
|
|
73523
73613
|
if (stopFolders.indexOf(base) !== -1) {
|
|
73524
73614
|
stop();
|
|
73525
73615
|
}
|
|
73526
73616
|
});
|
|
73527
73617
|
finder.on("file", async (file) => {
|
|
73528
|
-
if (fileNames.indexOf(path_1.basename(file)) && await capProject_1.isCapProject(path_1.dirname(file))) {
|
|
73529
|
-
projects.push(path_1.dirname(file));
|
|
73618
|
+
if (fileNames.indexOf((0, path_1.basename)(file)) && await (0, capProject_1.isCapProject)((0, path_1.dirname)(file))) {
|
|
73619
|
+
projects.push((0, path_1.dirname)(file));
|
|
73530
73620
|
}
|
|
73531
73621
|
});
|
|
73532
73622
|
finder.on("end", () => {
|
|
@@ -73540,16 +73630,16 @@ var require_utils10 = __commonJS({
|
|
|
73540
73630
|
exports2.findCapProjects = findCapProjects;
|
|
73541
73631
|
async function findAll(root, filename, results, stopFolders) {
|
|
73542
73632
|
return new Promise((doResolve, reject2) => {
|
|
73543
|
-
const finder = findit2_1.default(root);
|
|
73633
|
+
const finder = (0, findit2_1.default)(root);
|
|
73544
73634
|
finder.on("directory", (dir2, stat, stop) => {
|
|
73545
|
-
const base = path_1.basename(dir2);
|
|
73635
|
+
const base = (0, path_1.basename)(dir2);
|
|
73546
73636
|
if (stopFolders.indexOf(base) !== -1) {
|
|
73547
73637
|
stop();
|
|
73548
73638
|
}
|
|
73549
73639
|
});
|
|
73550
73640
|
finder.on("file", (file) => {
|
|
73551
73641
|
if (file.endsWith(filename)) {
|
|
73552
|
-
results.push(path_1.dirname(file));
|
|
73642
|
+
results.push((0, path_1.dirname)(file));
|
|
73553
73643
|
}
|
|
73554
73644
|
});
|
|
73555
73645
|
finder.on("end", () => {
|
|
@@ -73564,9 +73654,9 @@ var require_utils10 = __commonJS({
|
|
|
73564
73654
|
async function findExtensionFiles(root, targetFileName = project_spec_1.FileName.Fragment) {
|
|
73565
73655
|
const extensionFiles = [];
|
|
73566
73656
|
return new Promise((doResolve, reject2) => {
|
|
73567
|
-
const finder = findit2_1.default(root);
|
|
73657
|
+
const finder = (0, findit2_1.default)(root);
|
|
73568
73658
|
finder.on("directory", (dir2, stat, stop) => {
|
|
73569
|
-
const base = path_1.basename(dir2);
|
|
73659
|
+
const base = (0, path_1.basename)(dir2);
|
|
73570
73660
|
if (base === ".git" || base === "node_modules" || base === "dist" || base === project_spec_1.DirName.Sapux) {
|
|
73571
73661
|
stop();
|
|
73572
73662
|
}
|
|
@@ -73662,7 +73752,7 @@ var require_utils10 = __commonJS({
|
|
|
73662
73752
|
const sapuxProjects = [];
|
|
73663
73753
|
for (const root of projects) {
|
|
73664
73754
|
try {
|
|
73665
|
-
if ((await file_1.readJSON(path_1.join(root, project_spec_1.FileName.Package))).sapux) {
|
|
73755
|
+
if ((await (0, file_1.readJSON)((0, path_1.join)(root, project_spec_1.FileName.Package))).sapux) {
|
|
73666
73756
|
sapuxProjects.push(root);
|
|
73667
73757
|
}
|
|
73668
73758
|
} catch (error3) {
|
|
@@ -73684,21 +73774,21 @@ var require_utils10 = __commonJS({
|
|
|
73684
73774
|
exports2.findAllProjectRoots = findAllProjectRoots;
|
|
73685
73775
|
async function getAppType(appRoot, projectRoot) {
|
|
73686
73776
|
if (appRoot === projectRoot) {
|
|
73687
|
-
const appPckJson = await file_1.readJSON(path_1.join(appRoot, project_spec_1.FileName.Package));
|
|
73777
|
+
const appPckJson = await (0, file_1.readJSON)((0, path_1.join)(appRoot, project_spec_1.FileName.Package));
|
|
73688
73778
|
if (appPckJson.sapux === true) {
|
|
73689
73779
|
return "SAP Fiori elements";
|
|
73690
|
-
} else if (await file_1.fileExists(path_1.join(appRoot, project_spec_1.FileName.ExtConfigJson))) {
|
|
73780
|
+
} else if (await (0, file_1.fileExists)((0, path_1.join)(appRoot, project_spec_1.FileName.ExtConfigJson))) {
|
|
73691
73781
|
return "SAPUI5 Extension";
|
|
73692
73782
|
} else {
|
|
73693
73783
|
return "SAPUI5 freestyle";
|
|
73694
73784
|
}
|
|
73695
73785
|
}
|
|
73696
73786
|
try {
|
|
73697
|
-
const projectPckJson = await file_1.readJSON(path_1.join(projectRoot, project_spec_1.FileName.Package));
|
|
73787
|
+
const projectPckJson = await (0, file_1.readJSON)((0, path_1.join)(projectRoot, project_spec_1.FileName.Package));
|
|
73698
73788
|
if (!projectPckJson.sapux) {
|
|
73699
73789
|
return "SAPUI5 freestyle";
|
|
73700
73790
|
} else if (Array.isArray(projectPckJson.sapux)) {
|
|
73701
|
-
return projectPckJson.sapux.find((relAppPath) => path_1.join(projectRoot, ...relAppPath.split(/\\|\//)) === appRoot) ? "SAP Fiori elements" : "SAPUI5 freestyle";
|
|
73791
|
+
return projectPckJson.sapux.find((relAppPath) => (0, path_1.join)(projectRoot, ...relAppPath.split(/\\|\//)) === appRoot) ? "SAP Fiori elements" : "SAPUI5 freestyle";
|
|
73702
73792
|
}
|
|
73703
73793
|
} catch {
|
|
73704
73794
|
return "SAPUI5 freestyle";
|
|
@@ -73709,10 +73799,10 @@ var require_utils10 = __commonJS({
|
|
|
73709
73799
|
if (appRoot === projectRoot) {
|
|
73710
73800
|
return "EDMX Backend";
|
|
73711
73801
|
}
|
|
73712
|
-
if (await capProject_1.isCapJavaProject(projectRoot)) {
|
|
73802
|
+
if (await (0, capProject_1.isCapJavaProject)(projectRoot)) {
|
|
73713
73803
|
return "CAP Java";
|
|
73714
73804
|
}
|
|
73715
|
-
if (await capProject_1.isCapNodeJsProject(projectRoot)) {
|
|
73805
|
+
if (await (0, capProject_1.isCapNodeJsProject)(projectRoot)) {
|
|
73716
73806
|
return "CAP Node.js";
|
|
73717
73807
|
}
|
|
73718
73808
|
throw new Error(i18n_1.i18n.t("ERROR_DETAIL_PROJECT_TYPE", { appRoot, projectRoot }));
|
|
@@ -73726,11 +73816,11 @@ var require_utils10 = __commonJS({
|
|
|
73726
73816
|
};
|
|
73727
73817
|
} else if (Array.isArray(sapux)) {
|
|
73728
73818
|
const pathWithSep = path5.endsWith(path_1.sep) ? path5 : path5 + path_1.sep;
|
|
73729
|
-
const relAppPaths = sapux.map((a) => path_1.join(...a.split(/\\|\//)));
|
|
73730
|
-
const relApp = relAppPaths.find((app) => pathWithSep.startsWith(path_1.join(root, app) + path_1.sep));
|
|
73819
|
+
const relAppPaths = sapux.map((a) => (0, path_1.join)(...a.split(/\\|\//)));
|
|
73820
|
+
const relApp = relAppPaths.find((app) => pathWithSep.startsWith((0, path_1.join)(root, app) + path_1.sep));
|
|
73731
73821
|
if (relApp) {
|
|
73732
73822
|
return {
|
|
73733
|
-
appRoot: path_1.join(root, relApp),
|
|
73823
|
+
appRoot: (0, path_1.join)(root, relApp),
|
|
73734
73824
|
projectRoot: root
|
|
73735
73825
|
};
|
|
73736
73826
|
}
|
|
@@ -73743,30 +73833,30 @@ var require_utils10 = __commonJS({
|
|
|
73743
73833
|
if (!appRoot) {
|
|
73744
73834
|
return null;
|
|
73745
73835
|
}
|
|
73746
|
-
const appPckJson = await file_1.readJSON(path_1.join(appRoot, project_spec_1.FileName.Package));
|
|
73836
|
+
const appPckJson = await (0, file_1.readJSON)((0, path_1.join)(appRoot, project_spec_1.FileName.Package));
|
|
73747
73837
|
if (appPckJson.sapux) {
|
|
73748
73838
|
return findRootsWithSapux(appPckJson.sapux, path5, appRoot);
|
|
73749
73839
|
}
|
|
73750
|
-
if (await capProject_1.isCapProject(appRoot, appPckJson)) {
|
|
73840
|
+
if (await (0, capProject_1.isCapProject)(appRoot, appPckJson)) {
|
|
73751
73841
|
return null;
|
|
73752
73842
|
}
|
|
73753
|
-
if ((fs_1.existsSync(path_1.join(appRoot, project_spec_1.FileName.Ui5LocalYaml)) || fs_1.existsSync(path_1.join(appRoot, project_spec_1.FileName.ExtConfigJson))) && exports2.hasDependency(appPckJson, "@sap/ux-ui5-tooling")) {
|
|
73843
|
+
if (((0, fs_1.existsSync)((0, path_1.join)(appRoot, project_spec_1.FileName.Ui5LocalYaml)) || (0, fs_1.existsSync)((0, path_1.join)(appRoot, project_spec_1.FileName.ExtConfigJson))) && (0, exports2.hasDependency)(appPckJson, "@sap/ux-ui5-tooling")) {
|
|
73754
73844
|
return {
|
|
73755
73845
|
appRoot,
|
|
73756
73846
|
projectRoot: appRoot
|
|
73757
73847
|
};
|
|
73758
73848
|
}
|
|
73759
73849
|
try {
|
|
73760
|
-
const { root } = path_1.parse(appRoot);
|
|
73761
|
-
let projectRoot = path_1.dirname(appRoot);
|
|
73850
|
+
const { root } = (0, path_1.parse)(appRoot);
|
|
73851
|
+
let projectRoot = (0, path_1.dirname)(appRoot);
|
|
73762
73852
|
while (projectRoot !== root) {
|
|
73763
|
-
if (await capProject_1.isCapProject(projectRoot) && path_1.join(projectRoot, "app") !== appRoot) {
|
|
73853
|
+
if (await (0, capProject_1.isCapProject)(projectRoot) && (0, path_1.join)(projectRoot, "app") !== appRoot) {
|
|
73764
73854
|
return {
|
|
73765
73855
|
appRoot,
|
|
73766
73856
|
projectRoot
|
|
73767
73857
|
};
|
|
73768
73858
|
}
|
|
73769
|
-
projectRoot = path_1.dirname(projectRoot);
|
|
73859
|
+
projectRoot = (0, path_1.dirname)(projectRoot);
|
|
73770
73860
|
}
|
|
73771
73861
|
} catch (e) {
|
|
73772
73862
|
}
|
|
@@ -73781,7 +73871,7 @@ var require_utils10 = __commonJS({
|
|
|
73781
73871
|
const manifestPaths = await findAllManifest(wsFolders);
|
|
73782
73872
|
for (const manifestPath of manifestPaths) {
|
|
73783
73873
|
try {
|
|
73784
|
-
const manifest = await file_1.readJSON(path_1.join(manifestPath, project_spec_1.FileName.Manifest));
|
|
73874
|
+
const manifest = await (0, file_1.readJSON)((0, path_1.join)(manifestPath, project_spec_1.FileName.Manifest));
|
|
73785
73875
|
if (!manifest["sap.app"] || !manifest["sap.app"].id || manifest["sap.app"].type !== "application") {
|
|
73786
73876
|
continue;
|
|
73787
73877
|
}
|
|
@@ -73801,12 +73891,12 @@ var require_utils10 = __commonJS({
|
|
|
73801
73891
|
const roots = await findAllProjectRoots(workspaceRoots, false);
|
|
73802
73892
|
for (const root of roots) {
|
|
73803
73893
|
try {
|
|
73804
|
-
const packageJson = await file_1.readJSON(path_1.join(root, project_spec_1.FileName.Package));
|
|
73805
|
-
if ((exports2.hasDependency(packageJson, "@sap/ux-ui5-tooling") || await capProject_1.isCapProject(root, packageJson)) && hasScript(packageJson)) {
|
|
73894
|
+
const packageJson = await (0, file_1.readJSON)((0, path_1.join)(root, project_spec_1.FileName.Package));
|
|
73895
|
+
if (((0, exports2.hasDependency)(packageJson, "@sap/ux-ui5-tooling") || await (0, capProject_1.isCapProject)(root, packageJson)) && hasScript(packageJson)) {
|
|
73806
73896
|
result2.push(root);
|
|
73807
73897
|
}
|
|
73808
73898
|
} catch (error3) {
|
|
73809
|
-
logger == null ? void 0 : logger.info(`Invalid JSON ${path_1.join(root, project_spec_1.FileName.Package)}. Application Modeler will skip this project.`);
|
|
73899
|
+
logger == null ? void 0 : logger.info(`Invalid JSON ${(0, path_1.join)(root, project_spec_1.FileName.Package)}. Application Modeler will skip this project.`);
|
|
73810
73900
|
continue;
|
|
73811
73901
|
}
|
|
73812
73902
|
}
|
|
@@ -73814,7 +73904,7 @@ var require_utils10 = __commonJS({
|
|
|
73814
73904
|
};
|
|
73815
73905
|
exports2.findRunnableProjects = findRunnableProjects;
|
|
73816
73906
|
async function checkPackageJson(root, dependency, sapux) {
|
|
73817
|
-
const packageJson = await file_1.readJSON(path_1.join(root, project_spec_1.FileName.Package));
|
|
73907
|
+
const packageJson = await (0, file_1.readJSON)((0, path_1.join)(root, project_spec_1.FileName.Package));
|
|
73818
73908
|
if (packageJson.dependencies && packageJson.dependencies[dependency] !== void 0 || packageJson.devDependencies && packageJson.devDependencies[dependency] !== void 0) {
|
|
73819
73909
|
return true;
|
|
73820
73910
|
}
|
|
@@ -73858,17 +73948,17 @@ var require_utils10 = __commonJS({
|
|
|
73858
73948
|
exports2.getMainService = getMainService;
|
|
73859
73949
|
function createApplicationStructureConfig(appFolder, manifest, sync) {
|
|
73860
73950
|
return {
|
|
73861
|
-
manifest: path_1.join(appFolder, project_spec_1.DirName.Webapp, project_spec_1.FileName.Manifest),
|
|
73862
|
-
changes: path_1.join(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Changes),
|
|
73863
|
-
app: sync ? path_1.join(appFolder, project_spec_1.DirName.Sapux, project_spec_1.FileName.App) : void 0,
|
|
73864
|
-
i18n: getI18nPath(path_1.join(appFolder, project_spec_1.DirName.Webapp), manifest),
|
|
73951
|
+
manifest: (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, project_spec_1.FileName.Manifest),
|
|
73952
|
+
changes: (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Changes),
|
|
73953
|
+
app: sync ? (0, path_1.join)(appFolder, project_spec_1.DirName.Sapux, project_spec_1.FileName.App) : void 0,
|
|
73954
|
+
i18n: getI18nPath((0, path_1.join)(appFolder, project_spec_1.DirName.Webapp), manifest),
|
|
73865
73955
|
mainService: getMainService(manifest),
|
|
73866
73956
|
services: {},
|
|
73867
73957
|
annotations: {},
|
|
73868
|
-
ext: path_1.join(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Ext),
|
|
73869
|
-
controller: path_1.join(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Ext, project_spec_1.DirName.Controller),
|
|
73870
|
-
view: path_1.join(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Ext, project_spec_1.DirName.View),
|
|
73871
|
-
fragment: path_1.join(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Ext, project_spec_1.DirName.Fragment)
|
|
73958
|
+
ext: (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Ext),
|
|
73959
|
+
controller: (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Ext, project_spec_1.DirName.Controller),
|
|
73960
|
+
view: (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Ext, project_spec_1.DirName.View),
|
|
73961
|
+
fragment: (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Ext, project_spec_1.DirName.Fragment)
|
|
73872
73962
|
};
|
|
73873
73963
|
}
|
|
73874
73964
|
exports2.createApplicationStructureConfig = createApplicationStructureConfig;
|
|
@@ -73882,18 +73972,18 @@ var require_utils10 = __commonJS({
|
|
|
73882
73972
|
};
|
|
73883
73973
|
const appServices = project.apps[appFolder].services;
|
|
73884
73974
|
if (services[name].settings) {
|
|
73885
|
-
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) : "";
|
|
73975
|
+
appServices[name].local = ((_a2 = services[name].settings) == null ? void 0 : _a2.localUri) ? (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, services[name].settings.localUri) : "";
|
|
73886
73976
|
if (services[name].settings.annotations) {
|
|
73887
73977
|
project.apps[appFolder].annotations[name] = project.apps[appFolder].annotations[name] || [];
|
|
73888
73978
|
for (const id of services[name].settings.annotations) {
|
|
73889
73979
|
const annotation = services[id];
|
|
73890
73980
|
if (annotation) {
|
|
73891
73981
|
if (!annotation.uri || annotation.settings && annotation.uri === annotation.settings.localUri) {
|
|
73892
|
-
project.apps[appFolder].annotations[name].push(path_1.join(appFolder, project_spec_1.DirName.Webapp, annotation.settings.localUri));
|
|
73982
|
+
project.apps[appFolder].annotations[name].push((0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, annotation.settings.localUri));
|
|
73893
73983
|
} else {
|
|
73894
73984
|
appServices[name].annotations = {
|
|
73895
73985
|
uri: annotation.uri,
|
|
73896
|
-
local: annotation.settings && annotation.settings.localUri ? path_1.join(appFolder, project_spec_1.DirName.Webapp, annotation.settings.localUri) : void 0
|
|
73986
|
+
local: annotation.settings && annotation.settings.localUri ? (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, annotation.settings.localUri) : void 0
|
|
73897
73987
|
};
|
|
73898
73988
|
if (appServices[name].annotations.local) {
|
|
73899
73989
|
project.apps[appFolder].annotations[name].push(appServices[name].annotations.local);
|
|
@@ -73928,14 +74018,14 @@ var require_utils10 = __commonJS({
|
|
|
73928
74018
|
}
|
|
73929
74019
|
exports2.getAppConfig = getAppConfig;
|
|
73930
74020
|
async function readAppJson(path5, includePageConfigs = true) {
|
|
73931
|
-
const app = await file_1.readJSON(path5);
|
|
74021
|
+
const app = await (0, file_1.readJSON)(path5);
|
|
73932
74022
|
if (includePageConfigs) {
|
|
73933
74023
|
const pagesDirectory = path5.replace(project_spec_1.FileName.App, project_spec_1.DirName.Pages);
|
|
73934
|
-
const pageFiles = await file_1.readDirectory(pagesDirectory);
|
|
74024
|
+
const pageFiles = await (0, file_1.readDirectory)(pagesDirectory);
|
|
73935
74025
|
for (const file of pageFiles) {
|
|
73936
74026
|
const id = file.replace(".json", "");
|
|
73937
74027
|
if (app.pages[id]) {
|
|
73938
|
-
app.pages[id].config = await file_1.readJSON(path_1.join(pagesDirectory, file));
|
|
74028
|
+
app.pages[id].config = await (0, file_1.readJSON)((0, path_1.join)(pagesDirectory, file));
|
|
73939
74029
|
}
|
|
73940
74030
|
}
|
|
73941
74031
|
}
|
|
@@ -73952,15 +74042,15 @@ var require_utils10 = __commonJS({
|
|
|
73952
74042
|
relativePath = i18nModel.settings.bundleUrl;
|
|
73953
74043
|
} else if ("settings" in i18nModel && typeof i18nModel.settings === "object" && "bundleName" in i18nModel.settings && typeof i18nModel.settings.bundleName === "string") {
|
|
73954
74044
|
const relBundleString = i18nModel.settings.bundleName.replace(manifest["sap.app"].id, "");
|
|
73955
|
-
relativePath = `${path_1.join(...relBundleString.split("."))}.properties`;
|
|
74045
|
+
relativePath = `${(0, path_1.join)(...relBundleString.split("."))}.properties`;
|
|
73956
74046
|
} else if (typeof ((_c = manifest == null ? void 0 : manifest["sap.app"]) == null ? void 0 : _c["i18n"]) === "string") {
|
|
73957
74047
|
relativePath = manifest["sap.app"]["i18n"];
|
|
73958
74048
|
}
|
|
73959
|
-
return relativePath ? path_1.join(manifestFolder, relativePath) : void 0;
|
|
74049
|
+
return relativePath ? (0, path_1.join)(manifestFolder, relativePath) : void 0;
|
|
73960
74050
|
}
|
|
73961
74051
|
exports2.getI18nPath = getI18nPath;
|
|
73962
74052
|
async function traverseI18nProperties(path5, fnCallback) {
|
|
73963
|
-
const i18nFile = await file_1.readFile(path5);
|
|
74053
|
+
const i18nFile = await (0, file_1.readFile)(path5);
|
|
73964
74054
|
const lines = i18nFile.split(/\r\n|\n/);
|
|
73965
74055
|
for (let i = 0; i < lines.length; i++) {
|
|
73966
74056
|
const line = lines[i];
|
|
@@ -74022,7 +74112,7 @@ var require_utils10 = __commonJS({
|
|
|
74022
74112
|
output3.push(`${key}=${value}${os_1.default.EOL}`);
|
|
74023
74113
|
}
|
|
74024
74114
|
}
|
|
74025
|
-
await file_1.updateFile(path5, output3.join(os_1.default.EOL));
|
|
74115
|
+
await (0, file_1.updateFile)(path5, output3.join(os_1.default.EOL));
|
|
74026
74116
|
}
|
|
74027
74117
|
exports2.updateI18nProperties = updateI18nProperties;
|
|
74028
74118
|
async function findI18nProperty(path5, key) {
|
|
@@ -74040,11 +74130,11 @@ var require_utils10 = __commonJS({
|
|
|
74040
74130
|
}
|
|
74041
74131
|
exports2.findI18nProperty = findI18nProperty;
|
|
74042
74132
|
async function getProjectTypeFromProjectFiles(projectRoot, packageJson) {
|
|
74043
|
-
return await capProject_1.isCapProject(projectRoot, packageJson) ? "Cap" : "Edmx";
|
|
74133
|
+
return await (0, capProject_1.isCapProject)(projectRoot, packageJson) ? "Cap" : "Edmx";
|
|
74044
74134
|
}
|
|
74045
74135
|
exports2.getProjectTypeFromProjectFiles = getProjectTypeFromProjectFiles;
|
|
74046
74136
|
async function getProjectType(root) {
|
|
74047
|
-
const packageJson = await file_1.readJSON(path_1.join(root, project_spec_1.FileName.Package));
|
|
74137
|
+
const packageJson = await (0, file_1.readJSON)((0, path_1.join)(root, project_spec_1.FileName.Package));
|
|
74048
74138
|
return getProjectTypeFromProjectFiles(root, packageJson);
|
|
74049
74139
|
}
|
|
74050
74140
|
exports2.getProjectType = getProjectType;
|
|
@@ -74075,7 +74165,7 @@ var require_utils10 = __commonJS({
|
|
|
74075
74165
|
var _a2, _b, _c;
|
|
74076
74166
|
let pathInYaml;
|
|
74077
74167
|
let backEndConfig;
|
|
74078
|
-
const yamlContent = await file_1.readFile(path_1.join(root, fileName));
|
|
74168
|
+
const yamlContent = await (0, file_1.readFile)((0, path_1.join)(root, fileName));
|
|
74079
74169
|
const middlewares = (_b = (_a2 = yaml.parse(yamlContent)) == null ? void 0 : _a2.server) == null ? void 0 : _b.customMiddleware;
|
|
74080
74170
|
const middleware = middlewares == null ? void 0 : middlewares.find((element) => element.name === middlewareName);
|
|
74081
74171
|
const backends = (_c = middleware == null ? void 0 : middleware.configuration) == null ? void 0 : _c.backend;
|
|
@@ -74099,15 +74189,15 @@ var require_utils10 = __commonJS({
|
|
|
74099
74189
|
exports2.getBackendConfigByPath = getBackendConfigByPath;
|
|
74100
74190
|
async function getUi5CustomMiddleware(root) {
|
|
74101
74191
|
var _a2, _b;
|
|
74102
|
-
const yamlContent = await file_1.readFile(path_1.join(root, project_spec_1.FileName.Ui5Yaml));
|
|
74192
|
+
const yamlContent = await (0, file_1.readFile)((0, path_1.join)(root, project_spec_1.FileName.Ui5Yaml));
|
|
74103
74193
|
const middlewares = (_b = (_a2 = yaml.parse(yamlContent)) == null ? void 0 : _a2.server) == null ? void 0 : _b.customMiddleware;
|
|
74104
74194
|
return middlewares == null ? void 0 : middlewares.find((element) => element.name === "fiori-tools-proxy");
|
|
74105
74195
|
}
|
|
74106
74196
|
exports2.getUi5CustomMiddleware = getUi5CustomMiddleware;
|
|
74107
74197
|
async function getLocalUI5Version(root) {
|
|
74108
|
-
const yamlFile = path_1.join(root, project_spec_1.FileName.Ui5LocalYaml);
|
|
74109
|
-
if (await file_1.fileExists(yamlFile)) {
|
|
74110
|
-
const yamlContent = yaml.parse(await file_1.readFile(yamlFile));
|
|
74198
|
+
const yamlFile = (0, path_1.join)(root, project_spec_1.FileName.Ui5LocalYaml);
|
|
74199
|
+
if (await (0, file_1.fileExists)(yamlFile)) {
|
|
74200
|
+
const yamlContent = yaml.parse(await (0, file_1.readFile)(yamlFile));
|
|
74111
74201
|
return yamlContent.framework && yamlContent.framework.version;
|
|
74112
74202
|
}
|
|
74113
74203
|
}
|
|
@@ -74117,14 +74207,14 @@ var require_utils10 = __commonJS({
|
|
|
74117
74207
|
var _a2, _b;
|
|
74118
74208
|
try {
|
|
74119
74209
|
let ui5Version = "latest";
|
|
74120
|
-
const webappPath = await webapp_1.getUi5CustomWebappPath(root);
|
|
74121
|
-
const manifestFile = path_1.join(root, webappPath, project_spec_1.FileName.Manifest);
|
|
74122
|
-
if (await file_1.fileExists(manifestFile)) {
|
|
74123
|
-
const manifest = await file_1.readJSON(manifestFile);
|
|
74210
|
+
const webappPath = await (0, webapp_1.getUi5CustomWebappPath)(root);
|
|
74211
|
+
const manifestFile = (0, path_1.join)(root, webappPath, project_spec_1.FileName.Manifest);
|
|
74212
|
+
if (await (0, file_1.fileExists)(manifestFile)) {
|
|
74213
|
+
const manifest = await (0, file_1.readJSON)(manifestFile);
|
|
74124
74214
|
ui5Version = (_b = (_a2 = manifest["sap.ui5"]) == null ? void 0 : _a2.dependencies) == null ? void 0 : _b.minUI5Version;
|
|
74125
74215
|
if (isNaN(parseFloat(ui5Version))) {
|
|
74126
74216
|
if (latestSapui5Version === void 0) {
|
|
74127
|
-
latestSapui5Version = await ux_ui5_info_1.getLatestSapui5Version();
|
|
74217
|
+
latestSapui5Version = await (0, ux_ui5_info_1.getLatestSapui5Version)();
|
|
74128
74218
|
}
|
|
74129
74219
|
ui5Version = latestSapui5Version;
|
|
74130
74220
|
}
|
|
@@ -74136,9 +74226,9 @@ var require_utils10 = __commonJS({
|
|
|
74136
74226
|
}
|
|
74137
74227
|
exports2.getUI5Version = getUI5Version;
|
|
74138
74228
|
async function checkServeLocalConfig(root) {
|
|
74139
|
-
const yamlFile = path_1.join(root, project_spec_1.FileName.Ui5LocalYaml);
|
|
74140
|
-
if (await file_1.fileExists(yamlFile)) {
|
|
74141
|
-
const yamlContent = yaml.parse(await file_1.readFile(yamlFile));
|
|
74229
|
+
const yamlFile = (0, path_1.join)(root, project_spec_1.FileName.Ui5LocalYaml);
|
|
74230
|
+
if (await (0, file_1.fileExists)(yamlFile)) {
|
|
74231
|
+
const yamlContent = yaml.parse(await (0, file_1.readFile)(yamlFile));
|
|
74142
74232
|
const middlewares = yamlContent.server.customMiddleware;
|
|
74143
74233
|
const serveLocal = middlewares.find((element) => element.name === "fiori-tools-servestatic");
|
|
74144
74234
|
if (serveLocal) {
|
|
@@ -74154,8 +74244,8 @@ var require_utils10 = __commonJS({
|
|
|
74154
74244
|
function getAppIdForFile(filepath, projectRoot, appIds) {
|
|
74155
74245
|
let appId = "";
|
|
74156
74246
|
appIds.forEach((appIdTmp) => {
|
|
74157
|
-
const relativeStr = path_1.relative(path_1.join(projectRoot, appIdTmp), filepath);
|
|
74158
|
-
if (relativeStr && !relativeStr.startsWith("..") && !path_1.isAbsolute(relativeStr)) {
|
|
74247
|
+
const relativeStr = (0, path_1.relative)((0, path_1.join)(projectRoot, appIdTmp), filepath);
|
|
74248
|
+
if (relativeStr && !relativeStr.startsWith("..") && !(0, path_1.isAbsolute)(relativeStr)) {
|
|
74159
74249
|
appId = appIdTmp;
|
|
74160
74250
|
}
|
|
74161
74251
|
});
|
|
@@ -74169,11 +74259,11 @@ var require_utils10 = __commonJS({
|
|
|
74169
74259
|
exports2.isOVPProject = isOVPProject;
|
|
74170
74260
|
async function deleteCapApp(appPath, logger) {
|
|
74171
74261
|
var _a2;
|
|
74172
|
-
const appName = path_1.basename(appPath);
|
|
74262
|
+
const appName = (0, path_1.basename)(appPath);
|
|
74173
74263
|
const projectRoot = await findProjectRoot(appPath);
|
|
74174
|
-
const packageJsonPath = path_1.join(projectRoot, project_spec_1.FileName.Package);
|
|
74175
|
-
const packageJson = await file_1.readJSON(packageJsonPath);
|
|
74176
|
-
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)];
|
|
74264
|
+
const packageJsonPath = (0, path_1.join)(projectRoot, project_spec_1.FileName.Package);
|
|
74265
|
+
const packageJson = await (0, file_1.readJSON)(packageJsonPath);
|
|
74266
|
+
const cdsFilePaths = [(0, path_1.join)((0, path_1.dirname)(appPath), project_spec_1.FileName.ServiceCds), (0, path_1.join)((0, path_1.dirname)(appPath), project_spec_1.FileName.IndexCds)];
|
|
74177
74267
|
if (!Array.isArray(packageJson.sapux)) {
|
|
74178
74268
|
logger == null ? void 0 : logger.error(i18n_1.i18n.t("ERROR_DEL_CAP_APP_SAPUX", { packageJsonPath }));
|
|
74179
74269
|
throw Error(i18n_1.i18n.t("ERROR_DEL_CAP_APP_SAPUX", { packageJsonPath }));
|
|
@@ -74188,23 +74278,23 @@ var require_utils10 = __commonJS({
|
|
|
74188
74278
|
if ((_a2 = packageJson.scripts) == null ? void 0 : _a2[`watch-${appName}`]) {
|
|
74189
74279
|
delete packageJson.scripts[`watch-${appName}`];
|
|
74190
74280
|
}
|
|
74191
|
-
await file_1.updateJSON(packageJsonPath, packageJson);
|
|
74281
|
+
await (0, file_1.updateJSON)(packageJsonPath, packageJson);
|
|
74192
74282
|
logger == null ? void 0 : logger.info(i18n_1.i18n.t("INFO_DEL_CAP_APP_FILE_UPDATED", { packageJsonPath }));
|
|
74193
|
-
await file_1.deleteDirectory(appPath);
|
|
74283
|
+
await (0, file_1.deleteDirectory)(appPath);
|
|
74194
74284
|
logger == null ? void 0 : logger.info(i18n_1.i18n.t("INFO_DEL_CAP_APP_DIR_DELETED", { appPath }));
|
|
74195
74285
|
const usingEntry = `using from './${appName}/annotations';`;
|
|
74196
74286
|
for (const cdsFilePath of cdsFilePaths) {
|
|
74197
|
-
if (await file_1.fileExists(cdsFilePath)) {
|
|
74287
|
+
if (await (0, file_1.fileExists)(cdsFilePath)) {
|
|
74198
74288
|
try {
|
|
74199
|
-
let cdsFile = await file_1.readFile(cdsFilePath);
|
|
74289
|
+
let cdsFile = await (0, file_1.readFile)(cdsFilePath);
|
|
74200
74290
|
if (cdsFile.indexOf(usingEntry) !== -1) {
|
|
74201
74291
|
logger == null ? void 0 : logger.info(i18n_1.i18n.t("INFO_DEL_CAP_APP_DELETE_USING", { appName, cdsFilePath }));
|
|
74202
74292
|
cdsFile = cdsFile.replace(usingEntry, "");
|
|
74203
74293
|
if (cdsFile.replace(/\n/g, "").trim() === "") {
|
|
74204
74294
|
logger == null ? void 0 : logger.info(i18n_1.i18n.t("INFO_DEL_CAP_APP_DEL_CDS", { cdsFilePath }));
|
|
74205
|
-
await file_1.deleteFile(cdsFilePath);
|
|
74295
|
+
await (0, file_1.deleteFile)(cdsFilePath);
|
|
74206
74296
|
} else {
|
|
74207
|
-
await file_1.updateFile(cdsFilePath, cdsFile);
|
|
74297
|
+
await (0, file_1.updateFile)(cdsFilePath, cdsFile);
|
|
74208
74298
|
}
|
|
74209
74299
|
}
|
|
74210
74300
|
} catch (error3) {
|
|
@@ -74212,9 +74302,9 @@ var require_utils10 = __commonJS({
|
|
|
74212
74302
|
}
|
|
74213
74303
|
}
|
|
74214
74304
|
}
|
|
74215
|
-
if ((await file_1.readDirectory(path_1.dirname(appPath))).length === 0) {
|
|
74216
|
-
logger == null ? void 0 : logger.info(i18n_1.i18n.t("INFO_DEL_CAP_APP_FOLDER_EMPTY", { appPath: path_1.dirname(appPath) }));
|
|
74217
|
-
await file_1.deleteDirectory(path_1.dirname(appPath));
|
|
74305
|
+
if ((await (0, file_1.readDirectory)((0, path_1.dirname)(appPath))).length === 0) {
|
|
74306
|
+
logger == null ? void 0 : logger.info(i18n_1.i18n.t("INFO_DEL_CAP_APP_FOLDER_EMPTY", { appPath: (0, path_1.dirname)(appPath) }));
|
|
74307
|
+
await (0, file_1.deleteDirectory)((0, path_1.dirname)(appPath));
|
|
74218
74308
|
}
|
|
74219
74309
|
}
|
|
74220
74310
|
exports2.deleteCapApp = deleteCapApp;
|
|
@@ -74223,7 +74313,7 @@ var require_utils10 = __commonJS({
|
|
|
74223
74313
|
let appId = manifest["sap.app"].id;
|
|
74224
74314
|
if (appId === project_spec_1.AppPomXmlArtifactIdPlaceholder) {
|
|
74225
74315
|
try {
|
|
74226
|
-
const pomFile = await file_1.readFile(path_1.join(projectRoot, "pom.xml"));
|
|
74316
|
+
const pomFile = await (0, file_1.readFile)((0, path_1.join)(projectRoot, "pom.xml"));
|
|
74227
74317
|
const pomXml = fast_xml_parser_1.default.parse(pomFile);
|
|
74228
74318
|
if ((_a2 = pomXml.project) == null ? void 0 : _a2.artifactId) {
|
|
74229
74319
|
appId = pomXml.project.artifactId;
|
|
@@ -74231,7 +74321,7 @@ var require_utils10 = __commonJS({
|
|
|
74231
74321
|
throw new Error();
|
|
74232
74322
|
}
|
|
74233
74323
|
} catch (error3) {
|
|
74234
|
-
appId = path_1.basename(projectRoot);
|
|
74324
|
+
appId = (0, path_1.basename)(projectRoot);
|
|
74235
74325
|
}
|
|
74236
74326
|
}
|
|
74237
74327
|
return appId;
|
|
@@ -74239,48 +74329,48 @@ var require_utils10 = __commonJS({
|
|
|
74239
74329
|
exports2.getApplicationId = getApplicationId;
|
|
74240
74330
|
function getCapAppMockdataDirPath(projectRoot) {
|
|
74241
74331
|
const capMockdataDirPaths = [
|
|
74242
|
-
path_1.join(projectRoot, project_spec_1.DirName.Db, project_spec_1.DirName.Csv),
|
|
74243
|
-
path_1.join(projectRoot, project_spec_1.DirName.Db, project_spec_1.DirName.Sapux, project_spec_1.DirName.Csv)
|
|
74332
|
+
(0, path_1.join)(projectRoot, project_spec_1.DirName.Db, project_spec_1.DirName.Csv),
|
|
74333
|
+
(0, path_1.join)(projectRoot, project_spec_1.DirName.Db, project_spec_1.DirName.Sapux, project_spec_1.DirName.Csv)
|
|
74244
74334
|
];
|
|
74245
74335
|
for (const path5 of capMockdataDirPaths) {
|
|
74246
|
-
if (fs_1.existsSync(path5)) {
|
|
74336
|
+
if ((0, fs_1.existsSync)(path5)) {
|
|
74247
74337
|
return path5;
|
|
74248
74338
|
}
|
|
74249
74339
|
}
|
|
74250
|
-
return path_1.join(projectRoot, project_spec_1.DirName.Db, project_spec_1.DirName.Data);
|
|
74340
|
+
return (0, path_1.join)(projectRoot, project_spec_1.DirName.Db, project_spec_1.DirName.Data);
|
|
74251
74341
|
}
|
|
74252
74342
|
exports2.getCapAppMockdataDirPath = getCapAppMockdataDirPath;
|
|
74253
74343
|
function getEdmxAppDefaultMockdataDirPath(appRoot) {
|
|
74254
|
-
return path_1.join(appRoot, project_spec_1.DirName.Webapp, project_spec_1.DirName.LocalService, project_spec_1.DirName.Data);
|
|
74344
|
+
return (0, path_1.join)(appRoot, project_spec_1.DirName.Webapp, project_spec_1.DirName.LocalService, project_spec_1.DirName.Data);
|
|
74255
74345
|
}
|
|
74256
74346
|
exports2.getEdmxAppDefaultMockdataDirPath = getEdmxAppDefaultMockdataDirPath;
|
|
74257
74347
|
async function tryGetEdmxAppMockServiceMockdataDir(configDir, serviceMetadataPath) {
|
|
74258
|
-
const config2 = await ui5Config_1.getMockServerConfig(configDir);
|
|
74348
|
+
const config2 = await (0, ui5Config_1.getMockServerConfig)(configDir);
|
|
74259
74349
|
if (config2) {
|
|
74260
|
-
const { services, mockFolder } = await ui5Config_1.getMockServicesConfiguration(configDir, config2);
|
|
74350
|
+
const { services, mockFolder } = await (0, ui5Config_1.getMockServicesConfiguration)(configDir, config2);
|
|
74261
74351
|
if (services) {
|
|
74262
|
-
const mockService = ui5Config_1.findMockServiceByMetadataPath(services, serviceMetadataPath);
|
|
74352
|
+
const mockService = (0, ui5Config_1.findMockServiceByMetadataPath)(services, serviceMetadataPath);
|
|
74263
74353
|
if (mockService == null ? void 0 : mockService.mockdataPath) {
|
|
74264
|
-
const servicesConfigFilePath = mockFolder ? path_1.resolve(configDir, mockFolder) : configDir;
|
|
74265
|
-
return path_1.resolve(servicesConfigFilePath, mockService.mockdataPath);
|
|
74354
|
+
const servicesConfigFilePath = mockFolder ? (0, path_1.resolve)(configDir, mockFolder) : configDir;
|
|
74355
|
+
return (0, path_1.resolve)(servicesConfigFilePath, mockService.mockdataPath);
|
|
74266
74356
|
}
|
|
74267
74357
|
}
|
|
74268
74358
|
}
|
|
74269
74359
|
}
|
|
74270
74360
|
exports2.tryGetEdmxAppMockServiceMockdataDir = tryGetEdmxAppMockServiceMockdataDir;
|
|
74271
74361
|
async function isAdaptationProject(projectRoot) {
|
|
74272
|
-
const adpConfigJsonPath = path_1.join(projectRoot, ".adp", "config.json");
|
|
74273
|
-
return file_1.fileExists(adpConfigJsonPath);
|
|
74362
|
+
const adpConfigJsonPath = (0, path_1.join)(projectRoot, ".adp", "config.json");
|
|
74363
|
+
return (0, file_1.fileExists)(adpConfigJsonPath);
|
|
74274
74364
|
}
|
|
74275
74365
|
exports2.isAdaptationProject = isAdaptationProject;
|
|
74276
74366
|
function getAdditionalEntitySetsFromManifest(json) {
|
|
74277
74367
|
const jsonPathTargetsPattern = `$['sap.ui5'].routing.targets`;
|
|
74278
74368
|
const jsonPathEntitySetsPattern = `options.settings.views.paths.*.entitySet`;
|
|
74279
|
-
const pages = jsonpath_plus_1.JSONPath({ path: jsonPathTargetsPattern, json })[0];
|
|
74369
|
+
const pages = (0, jsonpath_plus_1.JSONPath)({ path: jsonPathTargetsPattern, json })[0];
|
|
74280
74370
|
const additionalEntitySets = {};
|
|
74281
74371
|
for (const pageId in pages) {
|
|
74282
74372
|
const page = pages[pageId];
|
|
74283
|
-
const viewEntitySets = jsonpath_plus_1.JSONPath({
|
|
74373
|
+
const viewEntitySets = (0, jsonpath_plus_1.JSONPath)({
|
|
74284
74374
|
path: jsonPathEntitySetsPattern,
|
|
74285
74375
|
json: page
|
|
74286
74376
|
});
|
|
@@ -74510,7 +74600,7 @@ var require_toolsSuiteTelemetryDataProcessor = __commonJS({
|
|
|
74510
74600
|
async function getCommonProperties() {
|
|
74511
74601
|
const commonProperties = {};
|
|
74512
74602
|
commonProperties[types_1.CommonProperties.DevSpace] = await getSbasDevspace();
|
|
74513
|
-
commonProperties[types_1.CommonProperties.AppStudio] = ux_common_utils_1.isAppStudio();
|
|
74603
|
+
commonProperties[types_1.CommonProperties.AppStudio] = (0, ux_common_utils_1.isAppStudio)();
|
|
74514
74604
|
commonProperties[types_1.CommonProperties.AppStudioBackwardCompatible] = commonProperties[types_1.CommonProperties.AppStudio];
|
|
74515
74605
|
commonProperties[types_1.CommonProperties.InternlVsExternal] = getInternalVsExternal();
|
|
74516
74606
|
commonProperties[types_1.CommonProperties.InternlVsExternalBackwardCompatible] = commonProperties[types_1.CommonProperties.InternlVsExternal];
|
|
@@ -74519,7 +74609,7 @@ var require_toolsSuiteTelemetryDataProcessor = __commonJS({
|
|
|
74519
74609
|
exports2.getCommonProperties = getCommonProperties;
|
|
74520
74610
|
async function getSbasDevspace() {
|
|
74521
74611
|
var _a2, _b;
|
|
74522
|
-
if (ux_common_utils_1.isAppStudio()) {
|
|
74612
|
+
if ((0, ux_common_utils_1.isAppStudio)()) {
|
|
74523
74613
|
try {
|
|
74524
74614
|
const h20Url = process.env.H2O_URL;
|
|
74525
74615
|
const workspaceId = process.env.WORKSPACE_ID.replace("workspaces-", "");
|
|
@@ -74573,13 +74663,13 @@ var require_toolsSuiteTelemetryDataProcessor = __commonJS({
|
|
|
74573
74663
|
try {
|
|
74574
74664
|
let projectRoot;
|
|
74575
74665
|
try {
|
|
74576
|
-
projectRoot = await utils_1.findProjectRoot(appPath);
|
|
74666
|
+
projectRoot = await (0, utils_1.findProjectRoot)(appPath);
|
|
74577
74667
|
} catch {
|
|
74578
74668
|
}
|
|
74579
74669
|
if (!projectRoot) {
|
|
74580
74670
|
try {
|
|
74581
74671
|
const appParentFolder = path_1.default.dirname(appPath);
|
|
74582
|
-
projectRoot = await utils_1.findProjectRoot(appParentFolder, false);
|
|
74672
|
+
projectRoot = await (0, utils_1.findProjectRoot)(appParentFolder, false);
|
|
74583
74673
|
} catch (e) {
|
|
74584
74674
|
}
|
|
74585
74675
|
}
|
|
@@ -74587,17 +74677,17 @@ var require_toolsSuiteTelemetryDataProcessor = __commonJS({
|
|
|
74587
74677
|
if (!projectRoot) {
|
|
74588
74678
|
const directParentFolder = path_1.default.dirname(appPath);
|
|
74589
74679
|
const twoLevelUpParentFolder = path_1.default.dirname(directParentFolder);
|
|
74590
|
-
isCapJavaWithoutPackageJson = await capProject_1.isCapJavaProject(twoLevelUpParentFolder);
|
|
74680
|
+
isCapJavaWithoutPackageJson = await (0, capProject_1.isCapJavaProject)(twoLevelUpParentFolder);
|
|
74591
74681
|
projectRoot = isCapJavaWithoutPackageJson ? twoLevelUpParentFolder : appPath;
|
|
74592
74682
|
}
|
|
74593
74683
|
if (isCapJavaWithoutPackageJson) {
|
|
74594
74684
|
return types_1.ODataSource.CAPJava;
|
|
74595
74685
|
}
|
|
74596
|
-
const projectType = await utils_1.getProjectType(projectRoot);
|
|
74686
|
+
const projectType = await (0, utils_1.getProjectType)(projectRoot);
|
|
74597
74687
|
if (projectType === "Cap") {
|
|
74598
|
-
if (await capProject_1.isCapJavaProject(projectRoot)) {
|
|
74688
|
+
if (await (0, capProject_1.isCapJavaProject)(projectRoot)) {
|
|
74599
74689
|
return types_1.ODataSource.CAPJava;
|
|
74600
|
-
} else if (await capProject_1.isCapNodeJsProject(projectRoot)) {
|
|
74690
|
+
} else if (await (0, capProject_1.isCapNodeJsProject)(projectRoot)) {
|
|
74601
74691
|
return types_1.ODataSource.CAPNode;
|
|
74602
74692
|
}
|
|
74603
74693
|
} else if (projectType === "Edmx") {
|
|
@@ -74630,7 +74720,7 @@ var require_toolsSuiteTelemetryDataProcessor = __commonJS({
|
|
|
74630
74720
|
return types_1.DeployTarget.NO_DEPLOY_CONFIG;
|
|
74631
74721
|
}
|
|
74632
74722
|
function getInternalVsExternal() {
|
|
74633
|
-
return ux_feature_toggle_1.isInternalFeaturesSettingEnabled() ? "internal" : "external";
|
|
74723
|
+
return (0, ux_feature_toggle_1.isInternalFeaturesSettingEnabled)() ? "internal" : "external";
|
|
74634
74724
|
}
|
|
74635
74725
|
async function getToolsId(appPath) {
|
|
74636
74726
|
var _a2, _b, _c;
|
|
@@ -93709,7 +93799,7 @@ var require_toolsSuiteTelemetrySettings = __commonJS({
|
|
|
93709
93799
|
var definePath = (paths) => {
|
|
93710
93800
|
const platform4 = process.platform;
|
|
93711
93801
|
let settingsPath = paths[platform4];
|
|
93712
|
-
if (ux_common_utils_1.isAppStudio()) {
|
|
93802
|
+
if ((0, ux_common_utils_1.isAppStudio)()) {
|
|
93713
93803
|
settingsPath = paths.theia;
|
|
93714
93804
|
}
|
|
93715
93805
|
if (!settingsPath) {
|
|
@@ -93720,20 +93810,20 @@ var require_toolsSuiteTelemetrySettings = __commonJS({
|
|
|
93720
93810
|
return path_1.default.join(homedir3, settingsPath);
|
|
93721
93811
|
};
|
|
93722
93812
|
var setEnableTelemetry = async (enableTelemetry) => {
|
|
93723
|
-
const storeService = await store_1.getService({
|
|
93813
|
+
const storeService = await (0, store_1.getService)({
|
|
93724
93814
|
entityName: "telemetrySetting"
|
|
93725
93815
|
});
|
|
93726
93816
|
const setting = new store_1.TelemetrySetting({ enableTelemetry });
|
|
93727
93817
|
await storeService.write(setting);
|
|
93728
93818
|
system_1.TelemetrySystem.telemetryEnabled = enableTelemetry;
|
|
93729
|
-
const commonProperties = await toolsSuiteTelemetryDataProcessor_1.getCommonProperties();
|
|
93730
|
-
reporting_1.reportEnableTelemetryOnOff(enableTelemetry, commonProperties);
|
|
93819
|
+
const commonProperties = await (0, toolsSuiteTelemetryDataProcessor_1.getCommonProperties)();
|
|
93820
|
+
(0, reporting_1.reportEnableTelemetryOnOff)(enableTelemetry, commonProperties);
|
|
93731
93821
|
};
|
|
93732
93822
|
exports2.setEnableTelemetry = setEnableTelemetry;
|
|
93733
93823
|
var getTelemetrySetting = async () => {
|
|
93734
93824
|
let setting;
|
|
93735
93825
|
try {
|
|
93736
|
-
const storeService = await store_1.getService({
|
|
93826
|
+
const storeService = await (0, store_1.getService)({
|
|
93737
93827
|
entityName: "telemetrySetting"
|
|
93738
93828
|
});
|
|
93739
93829
|
setting = await storeService.read(new store_1.TelemetrySettingKey());
|
|
@@ -93743,7 +93833,7 @@ var require_toolsSuiteTelemetrySettings = __commonJS({
|
|
|
93743
93833
|
};
|
|
93744
93834
|
exports2.getTelemetrySetting = getTelemetrySetting;
|
|
93745
93835
|
var readEnableTelemetryFromSetting = async () => {
|
|
93746
|
-
const storeService = await store_1.getService({
|
|
93836
|
+
const storeService = await (0, store_1.getService)({
|
|
93747
93837
|
entityName: "telemetrySetting"
|
|
93748
93838
|
});
|
|
93749
93839
|
let setting;
|
|
@@ -93754,7 +93844,7 @@ var require_toolsSuiteTelemetrySettings = __commonJS({
|
|
|
93754
93844
|
if (!setting) {
|
|
93755
93845
|
const deprecatedSettingPath = definePath(settingPaths);
|
|
93756
93846
|
if (!deprecatedSettingPath) {
|
|
93757
|
-
exports2.setEnableTelemetry(true);
|
|
93847
|
+
(0, exports2.setEnableTelemetry)(true);
|
|
93758
93848
|
} else {
|
|
93759
93849
|
let content;
|
|
93760
93850
|
try {
|
|
@@ -93765,27 +93855,27 @@ var require_toolsSuiteTelemetrySettings = __commonJS({
|
|
|
93765
93855
|
return (_a2 = deprecatedSetting[propKey]) != null ? _a2 : true;
|
|
93766
93856
|
});
|
|
93767
93857
|
const deprecatedEnableTelemetrySetting = propValues.reduce((prevValue, currentValue) => prevValue && currentValue);
|
|
93768
|
-
exports2.setEnableTelemetry(deprecatedEnableTelemetrySetting);
|
|
93858
|
+
(0, exports2.setEnableTelemetry)(deprecatedEnableTelemetrySetting);
|
|
93769
93859
|
} catch {
|
|
93770
|
-
exports2.setEnableTelemetry(true);
|
|
93860
|
+
(0, exports2.setEnableTelemetry)(true);
|
|
93771
93861
|
}
|
|
93772
93862
|
}
|
|
93773
93863
|
} else {
|
|
93774
93864
|
system_1.TelemetrySystem.telemetryEnabled = setting.enableTelemetry;
|
|
93775
93865
|
}
|
|
93776
93866
|
if (system_1.TelemetrySystem.WORKSTREAM === "extension") {
|
|
93777
|
-
store_1.getFilesystemWatcherFor(store_1.Entity.TelemetrySetting, async () => {
|
|
93867
|
+
(0, store_1.getFilesystemWatcherFor)(store_1.Entity.TelemetrySetting, async () => {
|
|
93778
93868
|
const watchedSetting = await storeService.read(new store_1.TelemetrySettingKey());
|
|
93779
93869
|
system_1.TelemetrySystem.telemetryEnabled = watchedSetting.enableTelemetry;
|
|
93780
93870
|
});
|
|
93781
93871
|
}
|
|
93782
93872
|
};
|
|
93783
93873
|
var initToolsSuiteTelemetrySettings = async () => {
|
|
93784
|
-
cloudDebugger_1.debug("start initTelemetrySettings");
|
|
93874
|
+
(0, cloudDebugger_1.debug)("start initTelemetrySettings");
|
|
93785
93875
|
if (!system_1.TelemetrySystem.WORKSTREAM) {
|
|
93786
93876
|
throw new Error("Workstream is undefined");
|
|
93787
93877
|
}
|
|
93788
|
-
cloudDebugger_1.debug(`workstream: ${system_1.TelemetrySystem.WORKSTREAM}`);
|
|
93878
|
+
(0, cloudDebugger_1.debug)(`workstream: ${system_1.TelemetrySystem.WORKSTREAM}`);
|
|
93789
93879
|
system_1.TelemetrySystem.telemetryEnabled = true;
|
|
93790
93880
|
await readEnableTelemetryFromSetting();
|
|
93791
93881
|
};
|
|
@@ -93802,7 +93892,7 @@ var require_toolsSuiteTelemetrySettings = __commonJS({
|
|
|
93802
93892
|
await initToolsSuiteTelemetrySettings();
|
|
93803
93893
|
}
|
|
93804
93894
|
} catch (err) {
|
|
93805
|
-
reporting_1.reportRuntimeError(err);
|
|
93895
|
+
(0, reporting_1.reportRuntimeError)(err);
|
|
93806
93896
|
}
|
|
93807
93897
|
};
|
|
93808
93898
|
exports2.initTelemetrySettings = initTelemetrySettings4;
|
|
@@ -93816,9 +93906,13 @@ var require_toolsSuiteTelemetry = __commonJS({
|
|
|
93816
93906
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
93817
93907
|
if (k2 === void 0)
|
|
93818
93908
|
k2 = k;
|
|
93819
|
-
Object.
|
|
93820
|
-
|
|
93821
|
-
|
|
93909
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
93910
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
93911
|
+
desc = { enumerable: true, get: function() {
|
|
93912
|
+
return m[k];
|
|
93913
|
+
} };
|
|
93914
|
+
}
|
|
93915
|
+
Object.defineProperty(o, k2, desc);
|
|
93822
93916
|
} : function(o, m, k, k2) {
|
|
93823
93917
|
if (k2 === void 0)
|
|
93824
93918
|
k2 = k;
|
|
@@ -93848,9 +93942,13 @@ var require_client3 = __commonJS({
|
|
|
93848
93942
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
93849
93943
|
if (k2 === void 0)
|
|
93850
93944
|
k2 = k;
|
|
93851
|
-
Object.
|
|
93852
|
-
|
|
93853
|
-
|
|
93945
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
93946
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
93947
|
+
desc = { enumerable: true, get: function() {
|
|
93948
|
+
return m[k];
|
|
93949
|
+
} };
|
|
93950
|
+
}
|
|
93951
|
+
Object.defineProperty(o, k2, desc);
|
|
93854
93952
|
} : function(o, m, k, k2) {
|
|
93855
93953
|
if (k2 === void 0)
|
|
93856
93954
|
k2 = k;
|
|
@@ -93941,15 +94039,15 @@ var require_entries = __commonJS({
|
|
|
93941
94039
|
exports2.Measurement = exports2.Mark = void 0;
|
|
93942
94040
|
var types_1 = require_types11();
|
|
93943
94041
|
var Mark = class {
|
|
94042
|
+
getStartTime() {
|
|
94043
|
+
return this.startTime;
|
|
94044
|
+
}
|
|
93944
94045
|
constructor(name, type, startTime) {
|
|
93945
94046
|
this.startTime = startTime;
|
|
93946
94047
|
this.name = name;
|
|
93947
94048
|
this.startTime = startTime;
|
|
93948
94049
|
this.type = type;
|
|
93949
94050
|
}
|
|
93950
|
-
getStartTime() {
|
|
93951
|
-
return this.startTime;
|
|
93952
|
-
}
|
|
93953
94051
|
};
|
|
93954
94052
|
exports2.Mark = Mark;
|
|
93955
94053
|
var Measurement = class extends Mark {
|
|
@@ -94101,7 +94199,7 @@ var require_paramProcessing = __commonJS({
|
|
|
94101
94199
|
while (i < pathArr.length) {
|
|
94102
94200
|
node = node[pathArr[i]];
|
|
94103
94201
|
if (node === void 0) {
|
|
94104
|
-
throw exports2.wrongPathErr(field, paramIndex);
|
|
94202
|
+
throw (0, exports2.wrongPathErr)(field, paramIndex);
|
|
94105
94203
|
}
|
|
94106
94204
|
i++;
|
|
94107
94205
|
}
|
|
@@ -94120,7 +94218,7 @@ var require_paramProcessing = __commonJS({
|
|
|
94120
94218
|
if (typeof instructions.value === "string") {
|
|
94121
94219
|
val = instructions.value;
|
|
94122
94220
|
} else if (instructions.value !== void 0 && instructions.paramIndex !== void 0) {
|
|
94123
|
-
val = exports2.getValue(param, instructions.value.path, "val", instructions.paramIndex);
|
|
94221
|
+
val = (0, exports2.getValue)(param, instructions.value.path, "val", instructions.paramIndex);
|
|
94124
94222
|
} else {
|
|
94125
94223
|
val = param;
|
|
94126
94224
|
}
|
|
@@ -94138,7 +94236,7 @@ var require_paramProcessing = __commonJS({
|
|
|
94138
94236
|
let customMeasurements = {};
|
|
94139
94237
|
if (Array.isArray(instructions)) {
|
|
94140
94238
|
for (const instruction of instructions) {
|
|
94141
|
-
[processedDimensions, processedMeasurements] = exports2.paramsProcessing(params, instruction);
|
|
94239
|
+
[processedDimensions, processedMeasurements] = (0, exports2.paramsProcessing)(params, instruction);
|
|
94142
94240
|
customDimensions = {
|
|
94143
94241
|
...customDimensions,
|
|
94144
94242
|
...processedDimensions
|
|
@@ -94149,7 +94247,7 @@ var require_paramProcessing = __commonJS({
|
|
|
94149
94247
|
};
|
|
94150
94248
|
}
|
|
94151
94249
|
} else {
|
|
94152
|
-
[customDimensions, customMeasurements] = exports2.paramsProcessing(params, instructions);
|
|
94250
|
+
[customDimensions, customMeasurements] = (0, exports2.paramsProcessing)(params, instructions);
|
|
94153
94251
|
}
|
|
94154
94252
|
return [customDimensions, customMeasurements];
|
|
94155
94253
|
};
|
|
@@ -94213,7 +94311,7 @@ var require_interceptor = __commonJS({
|
|
|
94213
94311
|
var captureParam = (target, originalFn, evtName, sampleRate, instructions) => {
|
|
94214
94312
|
return (...args) => {
|
|
94215
94313
|
const result2 = originalFn.apply(target, args);
|
|
94216
|
-
const [customDimensions, customMeasurements] = paramProcessing_1.getParamsData(args, instructions);
|
|
94314
|
+
const [customDimensions, customMeasurements] = (0, paramProcessing_1.getParamsData)(args, instructions);
|
|
94217
94315
|
const appinsightClient = client_1.ClientFactory.getTelemetryClient();
|
|
94218
94316
|
appinsightClient.report(evtName, customDimensions, customMeasurements, sampleRate);
|
|
94219
94317
|
return result2;
|
|
@@ -94223,7 +94321,7 @@ var require_interceptor = __commonJS({
|
|
|
94223
94321
|
var captureParamAsync = (target, originalFn, evtName, sampleRate, instructions) => {
|
|
94224
94322
|
return async (...args) => {
|
|
94225
94323
|
const result2 = await originalFn.apply(target, args);
|
|
94226
|
-
const [customDimensions, customMeasurements] = paramProcessing_1.getParamsData(args, instructions);
|
|
94324
|
+
const [customDimensions, customMeasurements] = (0, paramProcessing_1.getParamsData)(args, instructions);
|
|
94227
94325
|
const appinsightClient = client_1.ClientFactory.getTelemetryClient();
|
|
94228
94326
|
appinsightClient.report(evtName, customDimensions, customMeasurements, sampleRate);
|
|
94229
94327
|
return result2;
|
|
@@ -94240,9 +94338,13 @@ var require_config4 = __commonJS({
|
|
|
94240
94338
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
94241
94339
|
if (k2 === void 0)
|
|
94242
94340
|
k2 = k;
|
|
94243
|
-
Object.
|
|
94244
|
-
|
|
94245
|
-
|
|
94341
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
94342
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
94343
|
+
desc = { enumerable: true, get: function() {
|
|
94344
|
+
return m[k];
|
|
94345
|
+
} };
|
|
94346
|
+
}
|
|
94347
|
+
Object.defineProperty(o, k2, desc);
|
|
94246
94348
|
} : function(o, m, k, k2) {
|
|
94247
94349
|
if (k2 === void 0)
|
|
94248
94350
|
k2 = k;
|