sap-ux-sap-systems-ext 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extension.js +610 -277
- package/dist/webapp/store.js +2 -2
- package/package.json +12 -11
package/dist/extension.js
CHANGED
|
@@ -2627,20 +2627,49 @@ var require_app_studio = __commonJS({
|
|
|
2627
2627
|
}
|
|
2628
2628
|
});
|
|
2629
2629
|
|
|
2630
|
+
// ../store/dist/types.js
|
|
2631
|
+
var require_types = __commonJS({
|
|
2632
|
+
"../store/dist/types.js"(exports2) {
|
|
2633
|
+
"use strict";
|
|
2634
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2635
|
+
exports2.ConnectionType = exports2.AuthenticationType = exports2.SystemType = void 0;
|
|
2636
|
+
exports2.SystemType = {
|
|
2637
|
+
AbapCloud: "AbapCloud",
|
|
2638
|
+
AbapOnPrem: "OnPrem",
|
|
2639
|
+
Generic: "Generic"
|
|
2640
|
+
};
|
|
2641
|
+
exports2.AuthenticationType = {
|
|
2642
|
+
Basic: "basic",
|
|
2643
|
+
ReentranceTicket: "reentranceTicket",
|
|
2644
|
+
OAuth2RefreshToken: "oauth2",
|
|
2645
|
+
OAuth2ClientCredential: "oauth2ClientCredential"
|
|
2646
|
+
};
|
|
2647
|
+
exports2.ConnectionType = {
|
|
2648
|
+
AbapCatalog: "abap_catalog",
|
|
2649
|
+
// connects to an abap catalog
|
|
2650
|
+
GenericHost: "generic_host",
|
|
2651
|
+
// a generic host e.g could be a partial url
|
|
2652
|
+
ODataService: "odata_service"
|
|
2653
|
+
// full odata service url
|
|
2654
|
+
};
|
|
2655
|
+
}
|
|
2656
|
+
});
|
|
2657
|
+
|
|
2630
2658
|
// ../store/dist/utils/backend.js
|
|
2631
2659
|
var require_backend = __commonJS({
|
|
2632
2660
|
"../store/dist/utils/backend.js"(exports2) {
|
|
2633
2661
|
"use strict";
|
|
2634
2662
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2635
2663
|
exports2.getBackendSystemType = getBackendSystemType2;
|
|
2664
|
+
var types_1 = require_types();
|
|
2636
2665
|
function getBackendSystemType2(system) {
|
|
2637
2666
|
let backendSystemType;
|
|
2638
2667
|
if (system.authenticationType === "reentranceTicket") {
|
|
2639
|
-
backendSystemType =
|
|
2668
|
+
backendSystemType = types_1.SystemType.AbapCloud;
|
|
2640
2669
|
} else if (system.serviceKeys) {
|
|
2641
|
-
backendSystemType =
|
|
2670
|
+
backendSystemType = types_1.SystemType.AbapCloud;
|
|
2642
2671
|
} else if (system.authenticationType === "basic" || system.username) {
|
|
2643
|
-
backendSystemType =
|
|
2672
|
+
backendSystemType = types_1.SystemType.AbapOnPrem;
|
|
2644
2673
|
}
|
|
2645
2674
|
return backendSystemType;
|
|
2646
2675
|
}
|
|
@@ -2669,6 +2698,7 @@ var require_utils = __commonJS({
|
|
|
2669
2698
|
};
|
|
2670
2699
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2671
2700
|
exports2.getSapToolsDirectory = exports2.getFioriToolsDirectory = exports2.SapTools = exports2.FioriToolsSettings = exports2.pick = void 0;
|
|
2701
|
+
exports2.hasAnyValue = hasAnyValue;
|
|
2672
2702
|
exports2.errorInstance = errorInstance;
|
|
2673
2703
|
exports2.errorString = errorString;
|
|
2674
2704
|
exports2.toPersistenceName = toPersistenceName;
|
|
@@ -2683,6 +2713,15 @@ var require_utils = __commonJS({
|
|
|
2683
2713
|
}, {}) || void 0;
|
|
2684
2714
|
};
|
|
2685
2715
|
exports2.pick = pick;
|
|
2716
|
+
function hasAnyValue(obj, props) {
|
|
2717
|
+
if (obj == null || typeof obj !== "object") {
|
|
2718
|
+
return false;
|
|
2719
|
+
}
|
|
2720
|
+
return props.some((prop) => {
|
|
2721
|
+
const value = obj[prop];
|
|
2722
|
+
return value !== void 0 && value !== null;
|
|
2723
|
+
});
|
|
2724
|
+
}
|
|
2686
2725
|
function errorInstance(e) {
|
|
2687
2726
|
if (e instanceof Error) {
|
|
2688
2727
|
return e;
|
|
@@ -2794,12 +2833,12 @@ var require_filesystem = __commonJS({
|
|
|
2794
2833
|
const name2 = (0, utils_1.toPersistenceName)(entityName2);
|
|
2795
2834
|
if (!name2) {
|
|
2796
2835
|
this.logger.debug("read: Entity Type is falsy - " + entityName2);
|
|
2797
|
-
return
|
|
2836
|
+
return void 0;
|
|
2798
2837
|
}
|
|
2799
2838
|
const { entities, error } = this._readAll(name2);
|
|
2800
2839
|
if (error) {
|
|
2801
2840
|
if (error.code === "ENOENT") {
|
|
2802
|
-
return
|
|
2841
|
+
return void 0;
|
|
2803
2842
|
} else {
|
|
2804
2843
|
throw error;
|
|
2805
2844
|
}
|
|
@@ -2808,53 +2847,53 @@ var require_filesystem = __commonJS({
|
|
|
2808
2847
|
this.logger.debug(`read: After parsing, entities is falsy. Entity: ${name2}, parsed value: ${entities}`);
|
|
2809
2848
|
return void 0;
|
|
2810
2849
|
}
|
|
2811
|
-
return
|
|
2850
|
+
return entities[id];
|
|
2812
2851
|
}
|
|
2813
2852
|
async getAll({ entityName: entityName2 }) {
|
|
2814
2853
|
const name2 = (0, utils_1.toPersistenceName)(entityName2);
|
|
2815
2854
|
if (!name2) {
|
|
2816
2855
|
this.logger.debug("read: Entity Type is falsy - " + entityName2);
|
|
2817
|
-
return
|
|
2856
|
+
return [];
|
|
2818
2857
|
}
|
|
2819
2858
|
const { entities, error } = this._readAll(name2);
|
|
2820
2859
|
if (error) {
|
|
2821
2860
|
if (error.code === "ENOENT") {
|
|
2822
|
-
return
|
|
2861
|
+
return [];
|
|
2823
2862
|
} else {
|
|
2824
2863
|
throw error;
|
|
2825
2864
|
}
|
|
2826
2865
|
}
|
|
2827
2866
|
if (!entities) {
|
|
2828
2867
|
this.logger.debug(`read: After parsing, entities is falsy. Entity: ${name2}, parsed value: ${entities}`);
|
|
2829
|
-
return
|
|
2868
|
+
return [];
|
|
2830
2869
|
}
|
|
2831
|
-
return
|
|
2870
|
+
return Object.values(entities);
|
|
2832
2871
|
}
|
|
2833
2872
|
async readAll({ entityName: entityName2 }) {
|
|
2834
2873
|
const name2 = (0, utils_1.toPersistenceName)(entityName2);
|
|
2835
2874
|
if (!name2) {
|
|
2836
2875
|
this.logger.debug("read: Entity Type is falsy - " + entityName2);
|
|
2837
|
-
return
|
|
2876
|
+
return {};
|
|
2838
2877
|
}
|
|
2839
2878
|
const { entities, error } = this._readAll(name2);
|
|
2840
2879
|
if (error) {
|
|
2841
2880
|
if (error.code === "ENOENT") {
|
|
2842
|
-
return
|
|
2881
|
+
return {};
|
|
2843
2882
|
} else {
|
|
2844
2883
|
throw error;
|
|
2845
2884
|
}
|
|
2846
2885
|
}
|
|
2847
2886
|
if (!entities) {
|
|
2848
2887
|
this.logger.debug(`read: After parsing, entities is falsy. Entity: ${name2}, parsed value: ${entities}`);
|
|
2849
|
-
return
|
|
2888
|
+
return {};
|
|
2850
2889
|
}
|
|
2851
|
-
return
|
|
2890
|
+
return entities;
|
|
2852
2891
|
}
|
|
2853
2892
|
async write({ entityName: entityName2, id, entity }) {
|
|
2854
2893
|
const name2 = (0, utils_1.toPersistenceName)(entityName2);
|
|
2855
2894
|
if (!name2) {
|
|
2856
2895
|
this.logger.debug("write: Entity is falsy - " + name2);
|
|
2857
|
-
return
|
|
2896
|
+
return void 0;
|
|
2858
2897
|
}
|
|
2859
2898
|
const { entities = {}, error } = this._readAll(name2);
|
|
2860
2899
|
if (error && error.code !== "ENOENT") {
|
|
@@ -2862,7 +2901,7 @@ var require_filesystem = __commonJS({
|
|
|
2862
2901
|
}
|
|
2863
2902
|
entities[id] = entity;
|
|
2864
2903
|
this.writeToFile(name2, entities);
|
|
2865
|
-
return
|
|
2904
|
+
return entity;
|
|
2866
2905
|
}
|
|
2867
2906
|
async partialUpdate({ entityName: entityName2, id, entity }) {
|
|
2868
2907
|
if (!entity || !Object.keys(entity).length) {
|
|
@@ -2885,7 +2924,7 @@ var require_filesystem = __commonJS({
|
|
|
2885
2924
|
const name2 = (0, utils_1.toPersistenceName)(entityName2);
|
|
2886
2925
|
if (!name2) {
|
|
2887
2926
|
this.logger.debug("delete: Entity is falsy - " + name2);
|
|
2888
|
-
return
|
|
2927
|
+
return false;
|
|
2889
2928
|
}
|
|
2890
2929
|
const { entities = {}, error } = this._readAll(name2);
|
|
2891
2930
|
if (error) {
|
|
@@ -2898,10 +2937,10 @@ var require_filesystem = __commonJS({
|
|
|
2898
2937
|
this.logger.debug(`delete: entity found for id - ${id}. Deleting`);
|
|
2899
2938
|
delete entities[id];
|
|
2900
2939
|
this.writeToFile(name2, entities);
|
|
2901
|
-
return
|
|
2940
|
+
return true;
|
|
2902
2941
|
} else {
|
|
2903
2942
|
this.logger.debug("delete: entity not found");
|
|
2904
|
-
return
|
|
2943
|
+
return false;
|
|
2905
2944
|
}
|
|
2906
2945
|
}
|
|
2907
2946
|
_readAll(entityName2) {
|
|
@@ -2976,19 +3015,19 @@ var require_dummy_store = __commonJS({
|
|
|
2976
3015
|
}
|
|
2977
3016
|
async save(service, key, _value) {
|
|
2978
3017
|
this.log.warn(`Dummy store. Trying to save for service: ${service}, key: ${key}`);
|
|
2979
|
-
return
|
|
3018
|
+
return true;
|
|
2980
3019
|
}
|
|
2981
3020
|
async retrieve(service, key) {
|
|
2982
3021
|
this.log.warn(`Dummy store. Trying to retrieve for service: ${service}, key: ${key}`);
|
|
2983
|
-
return
|
|
3022
|
+
return void 0;
|
|
2984
3023
|
}
|
|
2985
3024
|
async delete(service, key) {
|
|
2986
3025
|
this.log.warn(`Dummy store. Trying to delete for service: ${service}, key: ${key}`);
|
|
2987
|
-
return
|
|
3026
|
+
return true;
|
|
2988
3027
|
}
|
|
2989
3028
|
async getAll(service) {
|
|
2990
3029
|
this.log.warn(`Dummy store. Trying to get all values for service: [${service}]`);
|
|
2991
|
-
return
|
|
3030
|
+
return {};
|
|
2992
3031
|
}
|
|
2993
3032
|
};
|
|
2994
3033
|
exports2.DummyStore = DummyStore;
|
|
@@ -3194,7 +3233,7 @@ var require_lib = __commonJS({
|
|
|
3194
3233
|
});
|
|
3195
3234
|
|
|
3196
3235
|
// ../store/dist/secure-store/types.js
|
|
3197
|
-
var
|
|
3236
|
+
var require_types2 = __commonJS({
|
|
3198
3237
|
"../store/dist/secure-store/types.js"(exports2) {
|
|
3199
3238
|
"use strict";
|
|
3200
3239
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -3283,7 +3322,7 @@ var require_secure_store = __commonJS({
|
|
|
3283
3322
|
return new dummy_store_1.DummyStore(log2);
|
|
3284
3323
|
};
|
|
3285
3324
|
exports2.getSecureStore = getSecureStore;
|
|
3286
|
-
__exportStar2(
|
|
3325
|
+
__exportStar2(require_types2(), exports2);
|
|
3287
3326
|
}
|
|
3288
3327
|
});
|
|
3289
3328
|
|
|
@@ -4189,14 +4228,14 @@ var require_hybrid = __commonJS({
|
|
|
4189
4228
|
}
|
|
4190
4229
|
}
|
|
4191
4230
|
const serializable = (0, utils_1.pick)(entity, ...serializableProps);
|
|
4192
|
-
if (
|
|
4231
|
+
if ((0, utils_1.hasAnyValue)(entity, serializableProps)) {
|
|
4193
4232
|
this.logger.debug(`hybrid/write - writing serializable properties: ${(0, util_1.inspect)(serializable)}`);
|
|
4194
4233
|
await this.filesystem.write({ entityName: entityName2, id, entity: serializable });
|
|
4195
4234
|
} else {
|
|
4196
4235
|
this.logger.debug(`hybrid/write - no serializable properties found in ${(0, util_1.inspect)(serializable)}`);
|
|
4197
4236
|
}
|
|
4198
4237
|
const sensitiveData = (0, utils_1.pick)(entity, ...sensitiveProps);
|
|
4199
|
-
if (sensitiveData) {
|
|
4238
|
+
if ((0, utils_1.hasAnyValue)(sensitiveData, sensitiveProps)) {
|
|
4200
4239
|
this.logger.debug(`hybrid/write - writing sensitive properties to secure store. ID: [${id}]`);
|
|
4201
4240
|
await this.secureStore.save(getFullyQualifiedServiceName(entityName2), id, sensitiveData);
|
|
4202
4241
|
} else {
|
|
@@ -4239,26 +4278,23 @@ var require_backend_system = __commonJS({
|
|
|
4239
4278
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4240
4279
|
};
|
|
4241
4280
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4242
|
-
exports2.BackendSystemKey = exports2.BackendSystem =
|
|
4281
|
+
exports2.BackendSystemKey = exports2.BackendSystem = void 0;
|
|
4243
4282
|
var decorators_1 = require_decorators();
|
|
4244
|
-
|
|
4245
|
-
Basic: "basic",
|
|
4246
|
-
ReentranceTicket: "reentranceTicket",
|
|
4247
|
-
OAuth2RefreshToken: "oauth2",
|
|
4248
|
-
OAuth2ClientCredential: "oauth2ClientCredential"
|
|
4249
|
-
};
|
|
4283
|
+
var utils_1 = require_utils();
|
|
4250
4284
|
var BackendSystem2 = class {
|
|
4251
4285
|
name;
|
|
4252
4286
|
url;
|
|
4253
4287
|
client;
|
|
4254
4288
|
userDisplayName;
|
|
4255
4289
|
systemType;
|
|
4290
|
+
connectionType;
|
|
4291
|
+
authenticationType;
|
|
4292
|
+
hasSensitiveData;
|
|
4256
4293
|
serviceKeys;
|
|
4257
4294
|
refreshToken;
|
|
4258
4295
|
username;
|
|
4259
4296
|
password;
|
|
4260
|
-
authenticationType
|
|
4261
|
-
constructor({ name: name2, url, client, systemType, serviceKeys, refreshToken, username, password, userDisplayName, authenticationType }) {
|
|
4297
|
+
constructor({ name: name2, url, client, systemType, serviceKeys, refreshToken, username, password, userDisplayName, authenticationType, connectionType }) {
|
|
4262
4298
|
this.name = name2;
|
|
4263
4299
|
this.url = url;
|
|
4264
4300
|
this.client = client;
|
|
@@ -4269,6 +4305,9 @@ var require_backend_system = __commonJS({
|
|
|
4269
4305
|
this.password = password;
|
|
4270
4306
|
this.userDisplayName = userDisplayName;
|
|
4271
4307
|
this.authenticationType = authenticationType;
|
|
4308
|
+
this.connectionType = connectionType;
|
|
4309
|
+
const sensitiveProps = (0, decorators_1.getSensitiveDataProperties)(this);
|
|
4310
|
+
this.hasSensitiveData = (0, utils_1.hasAnyValue)(this, sensitiveProps);
|
|
4272
4311
|
}
|
|
4273
4312
|
};
|
|
4274
4313
|
exports2.BackendSystem = BackendSystem2;
|
|
@@ -4292,6 +4331,18 @@ var require_backend_system = __commonJS({
|
|
|
4292
4331
|
decorators_1.serializable,
|
|
4293
4332
|
__metadata2("design:type", String)
|
|
4294
4333
|
], BackendSystem2.prototype, "systemType", void 0);
|
|
4334
|
+
__decorate2([
|
|
4335
|
+
decorators_1.serializable,
|
|
4336
|
+
__metadata2("design:type", String)
|
|
4337
|
+
], BackendSystem2.prototype, "connectionType", void 0);
|
|
4338
|
+
__decorate2([
|
|
4339
|
+
decorators_1.serializable,
|
|
4340
|
+
__metadata2("design:type", String)
|
|
4341
|
+
], BackendSystem2.prototype, "authenticationType", void 0);
|
|
4342
|
+
__decorate2([
|
|
4343
|
+
decorators_1.serializable,
|
|
4344
|
+
__metadata2("design:type", Boolean)
|
|
4345
|
+
], BackendSystem2.prototype, "hasSensitiveData", void 0);
|
|
4295
4346
|
__decorate2([
|
|
4296
4347
|
decorators_1.sensitiveData,
|
|
4297
4348
|
__metadata2("design:type", Object)
|
|
@@ -4308,10 +4359,6 @@ var require_backend_system = __commonJS({
|
|
|
4308
4359
|
decorators_1.sensitiveData,
|
|
4309
4360
|
__metadata2("design:type", String)
|
|
4310
4361
|
], BackendSystem2.prototype, "password", void 0);
|
|
4311
|
-
__decorate2([
|
|
4312
|
-
decorators_1.sensitiveData,
|
|
4313
|
-
__metadata2("design:type", String)
|
|
4314
|
-
], BackendSystem2.prototype, "authenticationType", void 0);
|
|
4315
4362
|
var BackendSystemKey6 = class _BackendSystemKey {
|
|
4316
4363
|
url;
|
|
4317
4364
|
client;
|
|
@@ -4355,8 +4402,10 @@ var require_backend_system2 = __commonJS({
|
|
|
4355
4402
|
var hybrid_1 = require_hybrid();
|
|
4356
4403
|
var backend_system_1 = require_backend_system();
|
|
4357
4404
|
var constants_1 = require_constants2();
|
|
4405
|
+
var types_1 = require_types();
|
|
4358
4406
|
var utils_1 = require_utils();
|
|
4359
|
-
var
|
|
4407
|
+
var node_path_1 = require("node:path");
|
|
4408
|
+
var node_fs_1 = require("node:fs");
|
|
4360
4409
|
var SystemDataProvider = class {
|
|
4361
4410
|
dataAccessor;
|
|
4362
4411
|
entityName = constants_1.Entities.BackendSystem;
|
|
@@ -4387,81 +4436,92 @@ var require_backend_system2 = __commonJS({
|
|
|
4387
4436
|
id: backend_system_1.BackendSystemKey.from(entity).getId()
|
|
4388
4437
|
});
|
|
4389
4438
|
}
|
|
4390
|
-
async getAll(
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4439
|
+
async getAll(providerRetrievalOptions) {
|
|
4440
|
+
const migrationRequired = this.isMigrationRequired();
|
|
4441
|
+
const { includeSensitiveData = true, backendSystemFilter } = providerRetrievalOptions ?? {};
|
|
4442
|
+
let systems = await this.dataAccessor.readAll({
|
|
4443
|
+
entityName: this.entityName,
|
|
4444
|
+
includeSensitiveData: migrationRequired ? true : includeSensitiveData
|
|
4445
|
+
});
|
|
4446
|
+
const migrationComplete = await this.migrateBackendSystems(systems, includeSensitiveData);
|
|
4447
|
+
if (!migrationComplete) {
|
|
4448
|
+
systems = await this.dataAccessor.readAll({
|
|
4449
|
+
entityName: this.entityName,
|
|
4450
|
+
includeSensitiveData
|
|
4451
|
+
});
|
|
4400
4452
|
}
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
const backendSystem = await this.recoverBackendSystemFromId(id);
|
|
4405
|
-
if (backendSystem?.url?.trim()) {
|
|
4406
|
-
systems[id] = { ...system, ...backendSystem };
|
|
4407
|
-
const fileSystem = (0, filesystem_1.getFilesystemStore)(this.logger);
|
|
4408
|
-
await fileSystem.write({ entityName: this.entityName, id, entity: backendSystem });
|
|
4409
|
-
} else {
|
|
4410
|
-
this.logger.warn(`Filtering system with ID [${id}] as it seems corrupt. Run repair`);
|
|
4411
|
-
delete systems[id];
|
|
4412
|
-
}
|
|
4413
|
-
}
|
|
4453
|
+
const systemList = Object.values(systems);
|
|
4454
|
+
if (!backendSystemFilter) {
|
|
4455
|
+
return systemList;
|
|
4414
4456
|
}
|
|
4415
|
-
return
|
|
4457
|
+
return this.applyFilters(systemList, backendSystemFilter);
|
|
4416
4458
|
}
|
|
4417
4459
|
/**
|
|
4418
|
-
*
|
|
4419
|
-
*
|
|
4420
|
-
* @param systemId - the specific system ID to recover
|
|
4421
|
-
* @returns the recovered partial backend system (a default name with the url and client if present)
|
|
4460
|
+
* Determines whether a migration is required based on a local marker file.
|
|
4422
4461
|
*/
|
|
4423
|
-
|
|
4424
|
-
|
|
4462
|
+
isMigrationRequired() {
|
|
4463
|
+
const migrationFilePath = (0, node_path_1.join)((0, utils_1.getSapToolsDirectory)(), ".systemsMigrated");
|
|
4425
4464
|
try {
|
|
4426
|
-
const
|
|
4427
|
-
const
|
|
4428
|
-
|
|
4429
|
-
name: urlObj.origin + (client ? ", client " + client : ""),
|
|
4430
|
-
url: urlObj.origin,
|
|
4431
|
-
...client ? { client } : {}
|
|
4432
|
-
};
|
|
4465
|
+
const raw = (0, node_fs_1.readFileSync)(migrationFilePath, "utf-8");
|
|
4466
|
+
const data = JSON.parse(raw);
|
|
4467
|
+
return !data?.backendSystemMigrationV1;
|
|
4433
4468
|
} catch {
|
|
4434
|
-
|
|
4469
|
+
return true;
|
|
4435
4470
|
}
|
|
4436
|
-
return backendSystem;
|
|
4437
4471
|
}
|
|
4438
|
-
|
|
4439
|
-
|
|
4472
|
+
/**
|
|
4473
|
+
* Applies filter objects to a list of backend systems.
|
|
4474
|
+
*/
|
|
4475
|
+
applyFilters(systems, filters = {}) {
|
|
4476
|
+
return systems.filter((system) => Object.entries(filters).every(([key, value]) => system[key] === value));
|
|
4477
|
+
}
|
|
4478
|
+
/**
|
|
4479
|
+
* Ensures all stored backend systems are migrated to the latest structure.
|
|
4480
|
+
*/
|
|
4481
|
+
async migrateBackendSystems(systems, containsSensitiveData) {
|
|
4482
|
+
let allMigrated = true;
|
|
4440
4483
|
for (const [id, system] of Object.entries(systems)) {
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4484
|
+
const alreadyMigrated = system?.hasSensitiveData !== void 0 && system?.systemType !== void 0 && system?.connectionType !== void 0;
|
|
4485
|
+
if (alreadyMigrated) {
|
|
4486
|
+
continue;
|
|
4444
4487
|
}
|
|
4488
|
+
allMigrated = false;
|
|
4489
|
+
const migratedSystem = await this.buildMigratedSystem(system, containsSensitiveData, id);
|
|
4490
|
+
await this.dataAccessor.partialUpdate({
|
|
4491
|
+
entityName: this.entityName,
|
|
4492
|
+
id,
|
|
4493
|
+
entity: {
|
|
4494
|
+
hasSensitiveData: migratedSystem.hasSensitiveData,
|
|
4495
|
+
systemType: migratedSystem.systemType,
|
|
4496
|
+
connectionType: migratedSystem.connectionType
|
|
4497
|
+
}
|
|
4498
|
+
});
|
|
4445
4499
|
}
|
|
4446
|
-
|
|
4500
|
+
if (!allMigrated) {
|
|
4501
|
+
const filePath = (0, node_path_1.join)((0, utils_1.getSapToolsDirectory)(), ".systemsMigrated");
|
|
4502
|
+
const marker = { backendSystemMigrationV1: (/* @__PURE__ */ new Date()).toISOString() };
|
|
4503
|
+
(0, node_fs_1.writeFileSync)(filePath, JSON.stringify(marker, null, 2));
|
|
4504
|
+
}
|
|
4505
|
+
return allMigrated;
|
|
4447
4506
|
}
|
|
4448
4507
|
/**
|
|
4449
|
-
*
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
await this.dataAccessor.partialUpdate({
|
|
4459
|
-
entityName: this.entityName,
|
|
4460
|
-
id: systemId,
|
|
4461
|
-
entity: { systemType: inferredType }
|
|
4462
|
-
});
|
|
4463
|
-
}
|
|
4508
|
+
* Builds a fully migrated BackendSystem instance.
|
|
4509
|
+
*/
|
|
4510
|
+
async buildMigratedSystem(system, containsSensitiveData, id) {
|
|
4511
|
+
let fullSystem = system;
|
|
4512
|
+
if (!containsSensitiveData) {
|
|
4513
|
+
fullSystem = await this.dataAccessor.read({
|
|
4514
|
+
entityName: this.entityName,
|
|
4515
|
+
id
|
|
4516
|
+
});
|
|
4464
4517
|
}
|
|
4518
|
+
const inferredSystemType = fullSystem.systemType ?? (0, utils_1.getBackendSystemType)(fullSystem) ?? "OnPrem";
|
|
4519
|
+
const connectionType = fullSystem?.connectionType ?? types_1.ConnectionType.AbapCatalog;
|
|
4520
|
+
return new backend_system_1.BackendSystem({
|
|
4521
|
+
...fullSystem,
|
|
4522
|
+
systemType: inferredSystemType,
|
|
4523
|
+
connectionType
|
|
4524
|
+
});
|
|
4465
4525
|
}
|
|
4466
4526
|
};
|
|
4467
4527
|
exports2.SystemDataProvider = SystemDataProvider;
|
|
@@ -4547,15 +4607,15 @@ var require_backend_system3 = __commonJS({
|
|
|
4547
4607
|
function getInstance(logger2, options2 = {}) {
|
|
4548
4608
|
if (!options2.baseDirectory) {
|
|
4549
4609
|
try {
|
|
4550
|
-
|
|
4551
|
-
options2.baseDirectory = (0, utils_1.getSapToolsDirectory)();
|
|
4610
|
+
ensureSystemsJsonMigrated();
|
|
4552
4611
|
} catch (error) {
|
|
4553
4612
|
logger2.error((0, i18n_1.text)("error.systemsJsonMigrationFailed", { error: error.message }));
|
|
4554
4613
|
}
|
|
4614
|
+
options2.baseDirectory = (0, utils_1.getSapToolsDirectory)();
|
|
4555
4615
|
}
|
|
4556
4616
|
return new SystemService(logger2, options2);
|
|
4557
4617
|
}
|
|
4558
|
-
function
|
|
4618
|
+
function ensureSystemsJsonMigrated() {
|
|
4559
4619
|
const systemFileName = (0, utils_1.getEntityFileName)(constants_1.Entity.BackendSystem);
|
|
4560
4620
|
const legacySystemsPath = (0, node_path_1.join)((0, utils_1.getFioriToolsDirectory)(), systemFileName);
|
|
4561
4621
|
const newSystemsPath = (0, node_path_1.join)((0, utils_1.getSapToolsDirectory)(), systemFileName);
|
|
@@ -4566,6 +4626,7 @@ var require_backend_system3 = __commonJS({
|
|
|
4566
4626
|
} else {
|
|
4567
4627
|
(0, node_fs_1.mkdirSync)((0, node_path_1.dirname)(newSystemsPath), { recursive: true });
|
|
4568
4628
|
(0, node_fs_1.writeFileSync)(newSystemsPath, JSON.stringify({ systems: legacyData }, null, 2));
|
|
4629
|
+
(0, node_fs_1.writeFileSync)(migrationFlag, (/* @__PURE__ */ new Date()).toISOString());
|
|
4569
4630
|
}
|
|
4570
4631
|
const migratedData = {};
|
|
4571
4632
|
for (const [key, system] of Object.entries(legacyData)) {
|
|
@@ -4575,7 +4636,6 @@ var require_backend_system3 = __commonJS({
|
|
|
4575
4636
|
};
|
|
4576
4637
|
}
|
|
4577
4638
|
(0, node_fs_1.writeFileSync)(legacySystemsPath, JSON.stringify({ systems: { ...migratedData } }, null, 2));
|
|
4578
|
-
(0, node_fs_1.writeFileSync)(migrationFlag, (/* @__PURE__ */ new Date()).toISOString());
|
|
4579
4639
|
}
|
|
4580
4640
|
function migrateNewLegacyPathEntries(newSystemsPath, legacyData) {
|
|
4581
4641
|
let hasNewEntries = false;
|
|
@@ -6706,7 +6766,7 @@ var require_cloneDeep = __commonJS({
|
|
|
6706
6766
|
});
|
|
6707
6767
|
|
|
6708
6768
|
// ../logger/dist/types.js
|
|
6709
|
-
var
|
|
6769
|
+
var require_types3 = __commonJS({
|
|
6710
6770
|
"../logger/dist/types.js"(exports2) {
|
|
6711
6771
|
"use strict";
|
|
6712
6772
|
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
@@ -6726,7 +6786,7 @@ var require_types2 = __commonJS({
|
|
|
6726
6786
|
})(LogLevel || (exports2.LogLevel = LogLevel = {}));
|
|
6727
6787
|
var Transport = class {
|
|
6728
6788
|
/**
|
|
6729
|
-
* A utility copy method to make immutable, deep copies of objects
|
|
6789
|
+
* A utility copy method to make immutable, deep copies of objects.
|
|
6730
6790
|
*
|
|
6731
6791
|
* @param obj
|
|
6732
6792
|
* @returns a frozen deep clone of `obj`
|
|
@@ -9532,10 +9592,14 @@ var require_transport = __commonJS({
|
|
|
9532
9592
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
9533
9593
|
exports2.ArrayTransport = exports2.VSCodeTransport = exports2.StringArrayTransport = exports2.FileTransport = exports2.NullTransport = exports2.UI5ToolingTransport = exports2.ConsoleTransport = void 0;
|
|
9534
9594
|
var winston_transport_1 = __importDefault2(require_winston_transport());
|
|
9535
|
-
var types_1 =
|
|
9595
|
+
var types_1 = require_types3();
|
|
9536
9596
|
var ConsoleTransport = class _ConsoleTransport extends types_1.Transport {
|
|
9537
9597
|
static singletonInstance;
|
|
9538
9598
|
options;
|
|
9599
|
+
/**
|
|
9600
|
+
*
|
|
9601
|
+
* @param opts
|
|
9602
|
+
*/
|
|
9539
9603
|
constructor(opts = {}) {
|
|
9540
9604
|
super();
|
|
9541
9605
|
if (!_ConsoleTransport.singletonInstance) {
|
|
@@ -9549,6 +9613,10 @@ var require_transport = __commonJS({
|
|
|
9549
9613
|
var UI5ToolingTransport = class _UI5ToolingTransport extends types_1.Transport {
|
|
9550
9614
|
static instances = /* @__PURE__ */ new Map();
|
|
9551
9615
|
options;
|
|
9616
|
+
/**
|
|
9617
|
+
*
|
|
9618
|
+
* @param opts
|
|
9619
|
+
*/
|
|
9552
9620
|
constructor(opts) {
|
|
9553
9621
|
super();
|
|
9554
9622
|
const instance2 = _UI5ToolingTransport.instances.get(opts.moduleName);
|
|
@@ -9564,6 +9632,9 @@ var require_transport = __commonJS({
|
|
|
9564
9632
|
exports2.UI5ToolingTransport = UI5ToolingTransport;
|
|
9565
9633
|
var NullTransport = class _NullTransport extends types_1.Transport {
|
|
9566
9634
|
static singletonInstance;
|
|
9635
|
+
/**
|
|
9636
|
+
*
|
|
9637
|
+
*/
|
|
9567
9638
|
constructor() {
|
|
9568
9639
|
super();
|
|
9569
9640
|
if (!_NullTransport.singletonInstance) {
|
|
@@ -9575,6 +9646,10 @@ var require_transport = __commonJS({
|
|
|
9575
9646
|
exports2.NullTransport = NullTransport;
|
|
9576
9647
|
var FileTransport = class extends types_1.Transport {
|
|
9577
9648
|
options;
|
|
9649
|
+
/**
|
|
9650
|
+
*
|
|
9651
|
+
* @param opts
|
|
9652
|
+
*/
|
|
9578
9653
|
constructor(opts) {
|
|
9579
9654
|
super();
|
|
9580
9655
|
this.options = this.copy(opts);
|
|
@@ -9587,6 +9662,10 @@ var require_transport = __commonJS({
|
|
|
9587
9662
|
var VSCodeTransport = class _VSCodeTransport extends types_1.Transport {
|
|
9588
9663
|
static instances = /* @__PURE__ */ new Map();
|
|
9589
9664
|
options;
|
|
9665
|
+
/**
|
|
9666
|
+
*
|
|
9667
|
+
* @param opts
|
|
9668
|
+
*/
|
|
9590
9669
|
constructor(opts) {
|
|
9591
9670
|
super();
|
|
9592
9671
|
const instance2 = _VSCodeTransport.instances.get(opts.channelName);
|
|
@@ -9602,10 +9681,19 @@ var require_transport = __commonJS({
|
|
|
9602
9681
|
exports2.VSCodeTransport = VSCodeTransport;
|
|
9603
9682
|
var ArrayTransport = class extends winston_transport_1.default {
|
|
9604
9683
|
logs;
|
|
9684
|
+
/**
|
|
9685
|
+
*
|
|
9686
|
+
* @param opts
|
|
9687
|
+
*/
|
|
9605
9688
|
constructor(opts) {
|
|
9606
9689
|
super({ level: typeof opts?.logLevel === "number" ? types_1.LogLevel[opts.logLevel].toLowerCase() : "debug" });
|
|
9607
9690
|
this.logs = opts?.logs ?? [];
|
|
9608
9691
|
}
|
|
9692
|
+
/**
|
|
9693
|
+
*
|
|
9694
|
+
* @param info
|
|
9695
|
+
* @param next
|
|
9696
|
+
*/
|
|
9609
9697
|
log(info, next) {
|
|
9610
9698
|
this.logs.push(info);
|
|
9611
9699
|
next();
|
|
@@ -19248,7 +19336,7 @@ var require_adapter = __commonJS({
|
|
|
19248
19336
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19249
19337
|
exports2.toWinstonLogLevel = toWinstonLogLevel;
|
|
19250
19338
|
exports2.toWinstonTransport = toWinstonTransport;
|
|
19251
|
-
var types_1 =
|
|
19339
|
+
var types_1 = require_types3();
|
|
19252
19340
|
var winston_1 = __importStar2(require_winston());
|
|
19253
19341
|
var transports_1 = require_transports();
|
|
19254
19342
|
var null_transport_1 = require_null_transport();
|
|
@@ -19401,7 +19489,7 @@ var require_logger2 = __commonJS({
|
|
|
19401
19489
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19402
19490
|
exports2.WinstonLogger = void 0;
|
|
19403
19491
|
var transports_1 = require_transports();
|
|
19404
|
-
var types_1 =
|
|
19492
|
+
var types_1 = require_types3();
|
|
19405
19493
|
var winston_1 = __importStar2(require_winston());
|
|
19406
19494
|
var adapter_1 = require_adapter();
|
|
19407
19495
|
var utils_1 = require_utils2();
|
|
@@ -19536,9 +19624,13 @@ var require_extension_logger = __commonJS({
|
|
|
19536
19624
|
var transports_1 = require_transports();
|
|
19537
19625
|
var vscode_output_channel_transport_1 = require_vscode_output_channel_transport();
|
|
19538
19626
|
var winston_logger_1 = require_winston_logger();
|
|
19539
|
-
var types_1 =
|
|
19627
|
+
var types_1 = require_types3();
|
|
19540
19628
|
var adapter_1 = require_adapter();
|
|
19541
19629
|
var ExtensionLogger2 = class extends winston_logger_1.WinstonLogger {
|
|
19630
|
+
/**
|
|
19631
|
+
*
|
|
19632
|
+
* @param channelName
|
|
19633
|
+
*/
|
|
19542
19634
|
constructor(channelName) {
|
|
19543
19635
|
const vscodeTransport = new transports_1.VSCodeTransport({ channelName });
|
|
19544
19636
|
super({
|
|
@@ -19644,7 +19736,7 @@ var require_dist = __commonJS({
|
|
|
19644
19736
|
};
|
|
19645
19737
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19646
19738
|
exports2.ExtensionLogger = exports2.ToolsLogger = void 0;
|
|
19647
|
-
__exportStar2(
|
|
19739
|
+
__exportStar2(require_types3(), exports2);
|
|
19648
19740
|
__exportStar2(require_transports(), exports2);
|
|
19649
19741
|
var winston_logger_1 = require_winston_logger();
|
|
19650
19742
|
Object.defineProperty(exports2, "ToolsLogger", { enumerable: true, get: function() {
|
|
@@ -19716,7 +19808,7 @@ var require_dist2 = __commonJS({
|
|
|
19716
19808
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p);
|
|
19717
19809
|
};
|
|
19718
19810
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19719
|
-
exports2.SapTools = exports2.FioriToolsSettings = exports2.getSapToolsDirectory = exports2.getFioriToolsDirectory = exports2.getBackendSystemType = exports2.Entity = exports2.getFilesystemWatcherFor = void 0;
|
|
19811
|
+
exports2.ConnectionType = exports2.AuthenticationType = exports2.SystemType = exports2.SapTools = exports2.FioriToolsSettings = exports2.getSapToolsDirectory = exports2.getFioriToolsDirectory = exports2.getBackendSystemType = exports2.Entity = exports2.getFilesystemWatcherFor = void 0;
|
|
19720
19812
|
exports2.getService = getService2;
|
|
19721
19813
|
var constants_1 = require_constants();
|
|
19722
19814
|
Object.defineProperty(exports2, "Entity", { enumerable: true, get: function() {
|
|
@@ -19766,6 +19858,16 @@ var require_dist2 = __commonJS({
|
|
|
19766
19858
|
Object.defineProperty(exports2, "SapTools", { enumerable: true, get: function() {
|
|
19767
19859
|
return utils_2.SapTools;
|
|
19768
19860
|
} });
|
|
19861
|
+
var types_1 = require_types();
|
|
19862
|
+
Object.defineProperty(exports2, "SystemType", { enumerable: true, get: function() {
|
|
19863
|
+
return types_1.SystemType;
|
|
19864
|
+
} });
|
|
19865
|
+
Object.defineProperty(exports2, "AuthenticationType", { enumerable: true, get: function() {
|
|
19866
|
+
return types_1.AuthenticationType;
|
|
19867
|
+
} });
|
|
19868
|
+
Object.defineProperty(exports2, "ConnectionType", { enumerable: true, get: function() {
|
|
19869
|
+
return types_1.ConnectionType;
|
|
19870
|
+
} });
|
|
19769
19871
|
}
|
|
19770
19872
|
});
|
|
19771
19873
|
|
|
@@ -54052,7 +54154,7 @@ var require_package6 = __commonJS({
|
|
|
54052
54154
|
"../telemetry/package.json"(exports2, module2) {
|
|
54053
54155
|
module2.exports = {
|
|
54054
54156
|
name: "@sap-ux/telemetry",
|
|
54055
|
-
version: "0.6.
|
|
54157
|
+
version: "0.6.48",
|
|
54056
54158
|
description: "Library for sending usage telemetry data",
|
|
54057
54159
|
repository: {
|
|
54058
54160
|
type: "git",
|
|
@@ -54070,8 +54172,8 @@ var require_package6 = __commonJS({
|
|
|
54070
54172
|
watch: "tsc --watch",
|
|
54071
54173
|
clean: "rimraf --glob dist coverage *.tsbuildinfo",
|
|
54072
54174
|
format: "prettier --write '**/*.{js,json,ts,yaml,yml}' --ignore-path ../../.prettierignore",
|
|
54073
|
-
lint: "eslint
|
|
54074
|
-
"lint:fix": "eslint
|
|
54175
|
+
lint: "eslint",
|
|
54176
|
+
"lint:fix": "eslint --fix",
|
|
54075
54177
|
test: "jest --ci --forceExit --detectOpenHandles --colors",
|
|
54076
54178
|
"test-u": "jest --ci --forceExit --detectOpenHandles --colors -u",
|
|
54077
54179
|
link: "pnpm link --global",
|
|
@@ -54277,7 +54379,7 @@ var require_azure_appinsight_client = __commonJS({
|
|
|
54277
54379
|
*/
|
|
54278
54380
|
async trackEventBlocking(client, event) {
|
|
54279
54381
|
if (process.env.SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY === "true") {
|
|
54280
|
-
return
|
|
54382
|
+
return;
|
|
54281
54383
|
}
|
|
54282
54384
|
return new Promise((resolve2, reject) => {
|
|
54283
54385
|
try {
|
|
@@ -81680,7 +81782,7 @@ var require_src4 = __commonJS({
|
|
|
81680
81782
|
});
|
|
81681
81783
|
|
|
81682
81784
|
// ../../node_modules/.pnpm/@sap+cf-tools@3.2.2/node_modules/@sap/cf-tools/out/src/types.js
|
|
81683
|
-
var
|
|
81785
|
+
var require_types4 = __commonJS({
|
|
81684
81786
|
"../../node_modules/.pnpm/@sap+cf-tools@3.2.2/node_modules/@sap/cf-tools/out/src/types.js"(exports2) {
|
|
81685
81787
|
"use strict";
|
|
81686
81788
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -89654,7 +89756,7 @@ var require_cli3 = __commonJS({
|
|
|
89654
89756
|
var child_process_1 = require("child_process");
|
|
89655
89757
|
var comment_json_1 = require_src6();
|
|
89656
89758
|
var _ = require_lodash();
|
|
89657
|
-
var types_1 =
|
|
89759
|
+
var types_1 = require_types4();
|
|
89658
89760
|
var Cli = class _Cli {
|
|
89659
89761
|
static execute(args, options2, token2) {
|
|
89660
89762
|
token2 = token2 || {
|
|
@@ -89765,7 +89867,7 @@ var require_utils5 = __commonJS({
|
|
|
89765
89867
|
var path3 = require("path");
|
|
89766
89868
|
var comment_json_1 = require_src6();
|
|
89767
89869
|
var messages_1 = require_messages();
|
|
89768
|
-
var types_1 =
|
|
89870
|
+
var types_1 = require_types4();
|
|
89769
89871
|
async function dataContentAsObject(filePath) {
|
|
89770
89872
|
try {
|
|
89771
89873
|
return _.reduce(_.split(await fs3.promises.readFile(filePath, { encoding: "utf8" }), os2.EOL), (data, line) => {
|
|
@@ -89892,7 +89994,7 @@ var require_cf_local = __commonJS({
|
|
|
89892
89994
|
var _ = require_lodash();
|
|
89893
89995
|
var cli_1 = require_cli3();
|
|
89894
89996
|
var messages_1 = require_messages();
|
|
89895
|
-
var types_1 =
|
|
89997
|
+
var types_1 = require_types4();
|
|
89896
89998
|
var utils_1 = require_utils5();
|
|
89897
89999
|
var url_1 = require("url");
|
|
89898
90000
|
var baseParams = [
|
|
@@ -90491,7 +90593,7 @@ var require_cfServicesUtil = __commonJS({
|
|
|
90491
90593
|
exports2.isTargetSet = exports2.getInstanceMetadata = exports2.createServiceInstance = exports2.getInstanceCredentials = exports2.getServicesInstancesFilteredByType = void 0;
|
|
90492
90594
|
var cli_1 = require_cli3();
|
|
90493
90595
|
var _ = require_lodash();
|
|
90494
|
-
var types_1 =
|
|
90596
|
+
var types_1 = require_types4();
|
|
90495
90597
|
var cf_local_1 = require_cf_local();
|
|
90496
90598
|
async function getServicesInstancesFilteredByType(serviceTypes) {
|
|
90497
90599
|
const guids = _.map(await (0, cf_local_1.cfGetServicePlansList)({
|
|
@@ -90549,7 +90651,7 @@ var require_src7 = __commonJS({
|
|
|
90549
90651
|
};
|
|
90550
90652
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
90551
90653
|
exports2.apiGetInstanceMetadata = exports2.apiCreateServiceInstance = exports2.apiGetInstanceCredentials = exports2.apiGetServicesInstancesFilteredByType = void 0;
|
|
90552
|
-
__exportStar2(
|
|
90654
|
+
__exportStar2(require_types4(), exports2);
|
|
90553
90655
|
__exportStar2(require_cli3(), exports2);
|
|
90554
90656
|
__exportStar2(require_cf_local(), exports2);
|
|
90555
90657
|
__exportStar2(require_messages(), exports2);
|
|
@@ -94143,7 +94245,7 @@ var require_app_studio2 = __commonJS({
|
|
|
94143
94245
|
try {
|
|
94144
94246
|
const response = await axios_1.default.get(`http://localhost:3001/AppStudio/api/getHostByPort?port=${port}`);
|
|
94145
94247
|
return `${response.data.result}`;
|
|
94146
|
-
} catch
|
|
94248
|
+
} catch {
|
|
94147
94249
|
logger2?.error(`Port ${port} was not exposed!`);
|
|
94148
94250
|
return "";
|
|
94149
94251
|
}
|
|
@@ -105610,7 +105712,7 @@ var require_installedCheck = __commonJS({
|
|
|
105610
105712
|
const npmInstallPaths = await getNpmInstallPaths(options2?.vscWorkspaceConfig);
|
|
105611
105713
|
const installedGenPackageInfos = [];
|
|
105612
105714
|
const matchedPackages = [];
|
|
105613
|
-
for
|
|
105715
|
+
for (const installPath of npmInstallPaths) {
|
|
105614
105716
|
const matches = await (0, fast_glob_1.default)(`**/*${subName}*`, {
|
|
105615
105717
|
cwd: installPath,
|
|
105616
105718
|
deep: 2,
|
|
@@ -105622,7 +105724,7 @@ var require_installedCheck = __commonJS({
|
|
|
105622
105724
|
matchedPackages.push(...matches);
|
|
105623
105725
|
}
|
|
105624
105726
|
}
|
|
105625
|
-
for
|
|
105727
|
+
for (const packagePath of matchedPackages) {
|
|
105626
105728
|
const genPackageInfo = await getPackageInfo(packagePath, options2?.minVersion);
|
|
105627
105729
|
if (genPackageInfo && (!options2?.keyword || options2.keyword && genPackageInfo.packageInfo.keywords?.includes(options2.keyword))) {
|
|
105628
105730
|
installedGenPackageInfos.push(genPackageInfo);
|
|
@@ -113847,6 +113949,9 @@ var require_middlewares = __commonJS({
|
|
|
113847
113949
|
mockdataPath: `${serviceRoot}/data`,
|
|
113848
113950
|
generateMockData: true
|
|
113849
113951
|
};
|
|
113952
|
+
if (dataSource.resolveExternalServiceReferences === true) {
|
|
113953
|
+
newServiceData.resolveExternalServiceReferences = true;
|
|
113954
|
+
}
|
|
113850
113955
|
services.push(newServiceData);
|
|
113851
113956
|
});
|
|
113852
113957
|
return {
|
|
@@ -119917,7 +120022,7 @@ var require_draft7 = __commonJS({
|
|
|
119917
120022
|
});
|
|
119918
120023
|
|
|
119919
120024
|
// ../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
119920
|
-
var
|
|
120025
|
+
var require_types5 = __commonJS({
|
|
119921
120026
|
"../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports2) {
|
|
119922
120027
|
"use strict";
|
|
119923
120028
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -119936,7 +120041,7 @@ var require_discriminator = __commonJS({
|
|
|
119936
120041
|
"use strict";
|
|
119937
120042
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
119938
120043
|
var codegen_1 = require_codegen();
|
|
119939
|
-
var types_1 =
|
|
120044
|
+
var types_1 = require_types5();
|
|
119940
120045
|
var compile_1 = require_compile2();
|
|
119941
120046
|
var ref_error_1 = require_ref_error();
|
|
119942
120047
|
var util_1 = require_util3();
|
|
@@ -120262,9 +120367,9 @@ var require_ajv = __commonJS({
|
|
|
120262
120367
|
}
|
|
120263
120368
|
});
|
|
120264
120369
|
|
|
120265
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
120370
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/common.js
|
|
120266
120371
|
var require_common7 = __commonJS({
|
|
120267
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
120372
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/common.js"(exports2, module2) {
|
|
120268
120373
|
"use strict";
|
|
120269
120374
|
function isNothing(subject) {
|
|
120270
120375
|
return typeof subject === "undefined" || subject === null;
|
|
@@ -120307,9 +120412,9 @@ var require_common7 = __commonJS({
|
|
|
120307
120412
|
}
|
|
120308
120413
|
});
|
|
120309
120414
|
|
|
120310
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
120415
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/exception.js
|
|
120311
120416
|
var require_exception = __commonJS({
|
|
120312
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
120417
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/exception.js"(exports2, module2) {
|
|
120313
120418
|
"use strict";
|
|
120314
120419
|
function formatError(exception, compact) {
|
|
120315
120420
|
var where = "", message = exception.reason || "(unknown reason)";
|
|
@@ -120344,9 +120449,9 @@ var require_exception = __commonJS({
|
|
|
120344
120449
|
}
|
|
120345
120450
|
});
|
|
120346
120451
|
|
|
120347
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
120452
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/snippet.js
|
|
120348
120453
|
var require_snippet = __commonJS({
|
|
120349
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
120454
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/snippet.js"(exports2, module2) {
|
|
120350
120455
|
"use strict";
|
|
120351
120456
|
var common = require_common7();
|
|
120352
120457
|
function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
|
|
@@ -120424,9 +120529,9 @@ var require_snippet = __commonJS({
|
|
|
120424
120529
|
}
|
|
120425
120530
|
});
|
|
120426
120531
|
|
|
120427
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
120532
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type.js
|
|
120428
120533
|
var require_type2 = __commonJS({
|
|
120429
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
120534
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type.js"(exports2, module2) {
|
|
120430
120535
|
"use strict";
|
|
120431
120536
|
var YAMLException = require_exception();
|
|
120432
120537
|
var TYPE_CONSTRUCTOR_OPTIONS = [
|
|
@@ -120488,9 +120593,9 @@ var require_type2 = __commonJS({
|
|
|
120488
120593
|
}
|
|
120489
120594
|
});
|
|
120490
120595
|
|
|
120491
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
120596
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema.js
|
|
120492
120597
|
var require_schema4 = __commonJS({
|
|
120493
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
120598
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema.js"(exports2, module2) {
|
|
120494
120599
|
"use strict";
|
|
120495
120600
|
var YAMLException = require_exception();
|
|
120496
120601
|
var Type = require_type2();
|
|
@@ -120577,9 +120682,9 @@ var require_schema4 = __commonJS({
|
|
|
120577
120682
|
}
|
|
120578
120683
|
});
|
|
120579
120684
|
|
|
120580
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
120685
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/str.js
|
|
120581
120686
|
var require_str = __commonJS({
|
|
120582
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
120687
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/str.js"(exports2, module2) {
|
|
120583
120688
|
"use strict";
|
|
120584
120689
|
var Type = require_type2();
|
|
120585
120690
|
module2.exports = new Type("tag:yaml.org,2002:str", {
|
|
@@ -120591,9 +120696,9 @@ var require_str = __commonJS({
|
|
|
120591
120696
|
}
|
|
120592
120697
|
});
|
|
120593
120698
|
|
|
120594
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
120699
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/seq.js
|
|
120595
120700
|
var require_seq2 = __commonJS({
|
|
120596
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
120701
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/seq.js"(exports2, module2) {
|
|
120597
120702
|
"use strict";
|
|
120598
120703
|
var Type = require_type2();
|
|
120599
120704
|
module2.exports = new Type("tag:yaml.org,2002:seq", {
|
|
@@ -120605,9 +120710,9 @@ var require_seq2 = __commonJS({
|
|
|
120605
120710
|
}
|
|
120606
120711
|
});
|
|
120607
120712
|
|
|
120608
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
120713
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/map.js
|
|
120609
120714
|
var require_map2 = __commonJS({
|
|
120610
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
120715
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/map.js"(exports2, module2) {
|
|
120611
120716
|
"use strict";
|
|
120612
120717
|
var Type = require_type2();
|
|
120613
120718
|
module2.exports = new Type("tag:yaml.org,2002:map", {
|
|
@@ -120619,9 +120724,9 @@ var require_map2 = __commonJS({
|
|
|
120619
120724
|
}
|
|
120620
120725
|
});
|
|
120621
120726
|
|
|
120622
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
120727
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/failsafe.js
|
|
120623
120728
|
var require_failsafe = __commonJS({
|
|
120624
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
120729
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/failsafe.js"(exports2, module2) {
|
|
120625
120730
|
"use strict";
|
|
120626
120731
|
var Schema = require_schema4();
|
|
120627
120732
|
module2.exports = new Schema({
|
|
@@ -120634,9 +120739,9 @@ var require_failsafe = __commonJS({
|
|
|
120634
120739
|
}
|
|
120635
120740
|
});
|
|
120636
120741
|
|
|
120637
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
120742
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/null.js
|
|
120638
120743
|
var require_null2 = __commonJS({
|
|
120639
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
120744
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/null.js"(exports2, module2) {
|
|
120640
120745
|
"use strict";
|
|
120641
120746
|
var Type = require_type2();
|
|
120642
120747
|
function resolveYamlNull(data) {
|
|
@@ -120677,9 +120782,9 @@ var require_null2 = __commonJS({
|
|
|
120677
120782
|
}
|
|
120678
120783
|
});
|
|
120679
120784
|
|
|
120680
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
120785
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/bool.js
|
|
120681
120786
|
var require_bool3 = __commonJS({
|
|
120682
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
120787
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/bool.js"(exports2, module2) {
|
|
120683
120788
|
"use strict";
|
|
120684
120789
|
var Type = require_type2();
|
|
120685
120790
|
function resolveYamlBoolean(data) {
|
|
@@ -120714,9 +120819,9 @@ var require_bool3 = __commonJS({
|
|
|
120714
120819
|
}
|
|
120715
120820
|
});
|
|
120716
120821
|
|
|
120717
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
120822
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/int.js
|
|
120718
120823
|
var require_int3 = __commonJS({
|
|
120719
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
120824
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/int.js"(exports2, module2) {
|
|
120720
120825
|
"use strict";
|
|
120721
120826
|
var common = require_common7();
|
|
120722
120827
|
var Type = require_type2();
|
|
@@ -120836,9 +120941,9 @@ var require_int3 = __commonJS({
|
|
|
120836
120941
|
}
|
|
120837
120942
|
});
|
|
120838
120943
|
|
|
120839
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
120944
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/float.js
|
|
120840
120945
|
var require_float3 = __commonJS({
|
|
120841
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
120946
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/float.js"(exports2, module2) {
|
|
120842
120947
|
"use strict";
|
|
120843
120948
|
var common = require_common7();
|
|
120844
120949
|
var Type = require_type2();
|
|
@@ -120919,9 +121024,9 @@ var require_float3 = __commonJS({
|
|
|
120919
121024
|
}
|
|
120920
121025
|
});
|
|
120921
121026
|
|
|
120922
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
121027
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/json.js
|
|
120923
121028
|
var require_json3 = __commonJS({
|
|
120924
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
121029
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/json.js"(exports2, module2) {
|
|
120925
121030
|
"use strict";
|
|
120926
121031
|
module2.exports = require_failsafe().extend({
|
|
120927
121032
|
implicit: [
|
|
@@ -120934,17 +121039,17 @@ var require_json3 = __commonJS({
|
|
|
120934
121039
|
}
|
|
120935
121040
|
});
|
|
120936
121041
|
|
|
120937
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
121042
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/core.js
|
|
120938
121043
|
var require_core6 = __commonJS({
|
|
120939
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
121044
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/core.js"(exports2, module2) {
|
|
120940
121045
|
"use strict";
|
|
120941
121046
|
module2.exports = require_json3();
|
|
120942
121047
|
}
|
|
120943
121048
|
});
|
|
120944
121049
|
|
|
120945
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
121050
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/timestamp.js
|
|
120946
121051
|
var require_timestamp3 = __commonJS({
|
|
120947
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
121052
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/timestamp.js"(exports2, module2) {
|
|
120948
121053
|
"use strict";
|
|
120949
121054
|
var Type = require_type2();
|
|
120950
121055
|
var YAML_DATE_REGEXP = new RegExp(
|
|
@@ -121003,9 +121108,9 @@ var require_timestamp3 = __commonJS({
|
|
|
121003
121108
|
}
|
|
121004
121109
|
});
|
|
121005
121110
|
|
|
121006
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
121111
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/merge.js
|
|
121007
121112
|
var require_merge3 = __commonJS({
|
|
121008
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
121113
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/merge.js"(exports2, module2) {
|
|
121009
121114
|
"use strict";
|
|
121010
121115
|
var Type = require_type2();
|
|
121011
121116
|
function resolveYamlMerge(data) {
|
|
@@ -121018,9 +121123,9 @@ var require_merge3 = __commonJS({
|
|
|
121018
121123
|
}
|
|
121019
121124
|
});
|
|
121020
121125
|
|
|
121021
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
121126
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/binary.js
|
|
121022
121127
|
var require_binary2 = __commonJS({
|
|
121023
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
121128
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/binary.js"(exports2, module2) {
|
|
121024
121129
|
"use strict";
|
|
121025
121130
|
var Type = require_type2();
|
|
121026
121131
|
var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
|
|
@@ -121101,9 +121206,9 @@ var require_binary2 = __commonJS({
|
|
|
121101
121206
|
}
|
|
121102
121207
|
});
|
|
121103
121208
|
|
|
121104
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
121209
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/omap.js
|
|
121105
121210
|
var require_omap2 = __commonJS({
|
|
121106
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
121211
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/omap.js"(exports2, module2) {
|
|
121107
121212
|
"use strict";
|
|
121108
121213
|
var Type = require_type2();
|
|
121109
121214
|
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -121138,9 +121243,9 @@ var require_omap2 = __commonJS({
|
|
|
121138
121243
|
}
|
|
121139
121244
|
});
|
|
121140
121245
|
|
|
121141
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
121246
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/pairs.js
|
|
121142
121247
|
var require_pairs2 = __commonJS({
|
|
121143
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
121248
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/pairs.js"(exports2, module2) {
|
|
121144
121249
|
"use strict";
|
|
121145
121250
|
var Type = require_type2();
|
|
121146
121251
|
var _toString = Object.prototype.toString;
|
|
@@ -121176,9 +121281,9 @@ var require_pairs2 = __commonJS({
|
|
|
121176
121281
|
}
|
|
121177
121282
|
});
|
|
121178
121283
|
|
|
121179
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
121284
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/set.js
|
|
121180
121285
|
var require_set2 = __commonJS({
|
|
121181
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
121286
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/set.js"(exports2, module2) {
|
|
121182
121287
|
"use strict";
|
|
121183
121288
|
var Type = require_type2();
|
|
121184
121289
|
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -121203,9 +121308,9 @@ var require_set2 = __commonJS({
|
|
|
121203
121308
|
}
|
|
121204
121309
|
});
|
|
121205
121310
|
|
|
121206
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
121311
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/default.js
|
|
121207
121312
|
var require_default = __commonJS({
|
|
121208
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
121313
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/default.js"(exports2, module2) {
|
|
121209
121314
|
"use strict";
|
|
121210
121315
|
module2.exports = require_core6().extend({
|
|
121211
121316
|
implicit: [
|
|
@@ -121222,9 +121327,9 @@ var require_default = __commonJS({
|
|
|
121222
121327
|
}
|
|
121223
121328
|
});
|
|
121224
121329
|
|
|
121225
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
121330
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/loader.js
|
|
121226
121331
|
var require_loader = __commonJS({
|
|
121227
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
121332
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/loader.js"(exports2, module2) {
|
|
121228
121333
|
"use strict";
|
|
121229
121334
|
var common = require_common7();
|
|
121230
121335
|
var YAMLException = require_exception();
|
|
@@ -121299,6 +121404,18 @@ var require_loader = __commonJS({
|
|
|
121299
121404
|
(c - 65536 & 1023) + 56320
|
|
121300
121405
|
);
|
|
121301
121406
|
}
|
|
121407
|
+
function setProperty2(object, key, value) {
|
|
121408
|
+
if (key === "__proto__") {
|
|
121409
|
+
Object.defineProperty(object, key, {
|
|
121410
|
+
configurable: true,
|
|
121411
|
+
enumerable: true,
|
|
121412
|
+
writable: true,
|
|
121413
|
+
value
|
|
121414
|
+
});
|
|
121415
|
+
} else {
|
|
121416
|
+
object[key] = value;
|
|
121417
|
+
}
|
|
121418
|
+
}
|
|
121302
121419
|
var simpleEscapeCheck = new Array(256);
|
|
121303
121420
|
var simpleEscapeMap = new Array(256);
|
|
121304
121421
|
for (i = 0; i < 256; i++) {
|
|
@@ -121418,7 +121535,7 @@ var require_loader = __commonJS({
|
|
|
121418
121535
|
for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
121419
121536
|
key = sourceKeys[index];
|
|
121420
121537
|
if (!_hasOwnProperty.call(destination, key)) {
|
|
121421
|
-
destination
|
|
121538
|
+
setProperty2(destination, key, source[key]);
|
|
121422
121539
|
overridableKeys[key] = true;
|
|
121423
121540
|
}
|
|
121424
121541
|
}
|
|
@@ -121458,16 +121575,7 @@ var require_loader = __commonJS({
|
|
|
121458
121575
|
state.position = startPos || state.position;
|
|
121459
121576
|
throwError(state, "duplicated mapping key");
|
|
121460
121577
|
}
|
|
121461
|
-
|
|
121462
|
-
Object.defineProperty(_result, keyNode, {
|
|
121463
|
-
configurable: true,
|
|
121464
|
-
enumerable: true,
|
|
121465
|
-
writable: true,
|
|
121466
|
-
value: valueNode
|
|
121467
|
-
});
|
|
121468
|
-
} else {
|
|
121469
|
-
_result[keyNode] = valueNode;
|
|
121470
|
-
}
|
|
121578
|
+
setProperty2(_result, keyNode, valueNode);
|
|
121471
121579
|
delete overridableKeys[keyNode];
|
|
121472
121580
|
}
|
|
121473
121581
|
return _result;
|
|
@@ -122383,9 +122491,9 @@ var require_loader = __commonJS({
|
|
|
122383
122491
|
}
|
|
122384
122492
|
});
|
|
122385
122493
|
|
|
122386
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
122494
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/dumper.js
|
|
122387
122495
|
var require_dumper = __commonJS({
|
|
122388
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
122496
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/dumper.js"(exports2, module2) {
|
|
122389
122497
|
"use strict";
|
|
122390
122498
|
var common = require_common7();
|
|
122391
122499
|
var YAMLException = require_exception();
|
|
@@ -123012,9 +123120,9 @@ var require_dumper = __commonJS({
|
|
|
123012
123120
|
}
|
|
123013
123121
|
});
|
|
123014
123122
|
|
|
123015
|
-
// ../../node_modules/.pnpm/js-yaml@4.1.
|
|
123123
|
+
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/index.js
|
|
123016
123124
|
var require_js_yaml = __commonJS({
|
|
123017
|
-
"../../node_modules/.pnpm/js-yaml@4.1.
|
|
123125
|
+
"../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/index.js"(exports2, module2) {
|
|
123018
123126
|
"use strict";
|
|
123019
123127
|
var loader = require_loader();
|
|
123020
123128
|
var dumper = require_dumper();
|
|
@@ -123128,7 +123236,7 @@ var require_ui5config = __commonJS({
|
|
|
123128
123236
|
let resources;
|
|
123129
123237
|
try {
|
|
123130
123238
|
resources = this.document.getMap({ path: "resources" }).toJSON();
|
|
123131
|
-
} catch
|
|
123239
|
+
} catch {
|
|
123132
123240
|
resources = {};
|
|
123133
123241
|
}
|
|
123134
123242
|
return resources.configuration ?? {};
|
|
@@ -123163,7 +123271,6 @@ var require_ui5config = __commonJS({
|
|
|
123163
123271
|
* Get the type in the yaml file.
|
|
123164
123272
|
*
|
|
123165
123273
|
* @returns {Ui5Document['type']} the type
|
|
123166
|
-
* @memberof Ui5Document['type']
|
|
123167
123274
|
*/
|
|
123168
123275
|
getType() {
|
|
123169
123276
|
const type = this.document.getNode({ path: "type" });
|
|
@@ -123191,7 +123298,7 @@ var require_ui5config = __commonJS({
|
|
|
123191
123298
|
try {
|
|
123192
123299
|
const configNode = this.document.getMap({ path: "customConfiguration" });
|
|
123193
123300
|
configNode.setIn([key], value);
|
|
123194
|
-
} catch
|
|
123301
|
+
} catch {
|
|
123195
123302
|
this.document.setIn({
|
|
123196
123303
|
path: "customConfiguration",
|
|
123197
123304
|
value: {
|
|
@@ -123493,6 +123600,9 @@ var require_ui5config = __commonJS({
|
|
|
123493
123600
|
mockdataPath: `${serviceRoot}/data`,
|
|
123494
123601
|
generateMockData: true
|
|
123495
123602
|
};
|
|
123603
|
+
if (dataSourceConfig.resolveExternalServiceReferences === true) {
|
|
123604
|
+
newServiceData.resolveExternalServiceReferences = true;
|
|
123605
|
+
}
|
|
123496
123606
|
const serviceIndex = mockserverMiddlewareConfig.services.findIndex((existingService) => existingService.urlPath === urlPath);
|
|
123497
123607
|
if (serviceIndex === -1) {
|
|
123498
123608
|
mockserverMiddlewareConfig.services = [...mockserverMiddlewareConfig.services, newServiceData];
|
|
@@ -131099,7 +131209,7 @@ var require_constants11 = __commonJS({
|
|
|
131099
131209
|
"../project-access/dist/constants.js"(exports2) {
|
|
131100
131210
|
"use strict";
|
|
131101
131211
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
131102
|
-
exports2.
|
|
131212
|
+
exports2.MinCdsVersion = exports2.MinCdsPluginUi5Version = exports2.moduleCacheRoot = exports2.fioriToolsDirectory = exports2.SchemaName = exports2.FioriToolsSettings = exports2.DirName = exports2.FileName = void 0;
|
|
131103
131213
|
var node_os_1 = require("node:os");
|
|
131104
131214
|
var node_path_1 = require("node:path");
|
|
131105
131215
|
exports2.FileName = {
|
|
@@ -131159,7 +131269,8 @@ var require_constants11 = __commonJS({
|
|
|
131159
131269
|
};
|
|
131160
131270
|
exports2.fioriToolsDirectory = (0, node_path_1.join)((0, node_os_1.homedir)(), exports2.FioriToolsSettings.dir);
|
|
131161
131271
|
exports2.moduleCacheRoot = (0, node_path_1.join)(exports2.fioriToolsDirectory, exports2.DirName.ModuleCache);
|
|
131162
|
-
exports2.
|
|
131272
|
+
exports2.MinCdsPluginUi5Version = "0.13.0";
|
|
131273
|
+
exports2.MinCdsVersion = "6.8.2";
|
|
131163
131274
|
}
|
|
131164
131275
|
});
|
|
131165
131276
|
|
|
@@ -131837,6 +131948,7 @@ var require_ui5_config = __commonJS({
|
|
|
131837
131948
|
"use strict";
|
|
131838
131949
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
131839
131950
|
exports2.getWebappPath = getWebappPath;
|
|
131951
|
+
exports2.getPathMappings = getPathMappings;
|
|
131840
131952
|
exports2.readUi5Yaml = readUi5Yaml;
|
|
131841
131953
|
exports2.getAllUi5YamlFileNames = getAllUi5YamlFileNames;
|
|
131842
131954
|
exports2.getMockServerConfig = getMockServerConfig;
|
|
@@ -131845,22 +131957,49 @@ var require_ui5_config = __commonJS({
|
|
|
131845
131957
|
var ui5_config_1 = require_dist10();
|
|
131846
131958
|
var constants_1 = require_constants11();
|
|
131847
131959
|
var file_1 = require_file4();
|
|
131960
|
+
var PATH_MAPPING_DEFAULTS = {
|
|
131961
|
+
application: { webapp: constants_1.DirName.Webapp },
|
|
131962
|
+
library: { src: "src", test: "test" },
|
|
131963
|
+
"theme-library": { src: "src", test: "test" },
|
|
131964
|
+
module: {}
|
|
131965
|
+
};
|
|
131966
|
+
async function getBaseDir(appRoot, memFs) {
|
|
131967
|
+
const packageJsonPath = await (0, file_1.findFileUp)(constants_1.FileName.Package, appRoot, memFs);
|
|
131968
|
+
return packageJsonPath ? (0, node_path_1.dirname)(packageJsonPath) : appRoot;
|
|
131969
|
+
}
|
|
131848
131970
|
async function getWebappPath(appRoot, memFs) {
|
|
131849
|
-
|
|
131850
|
-
|
|
131851
|
-
|
|
131852
|
-
|
|
131853
|
-
|
|
131854
|
-
|
|
131855
|
-
|
|
131856
|
-
|
|
131857
|
-
|
|
131858
|
-
|
|
131859
|
-
|
|
131860
|
-
|
|
131971
|
+
let pathMappings = {};
|
|
131972
|
+
try {
|
|
131973
|
+
pathMappings = await getPathMappings(appRoot, memFs);
|
|
131974
|
+
} catch {
|
|
131975
|
+
}
|
|
131976
|
+
return pathMappings?.webapp ?? (0, node_path_1.join)(appRoot, constants_1.DirName.Webapp);
|
|
131977
|
+
}
|
|
131978
|
+
async function getPathMappings(appRoot, memFs, fileName = constants_1.FileName.Ui5Yaml) {
|
|
131979
|
+
let ui5Config;
|
|
131980
|
+
let configuration;
|
|
131981
|
+
let type;
|
|
131982
|
+
try {
|
|
131983
|
+
ui5Config = await readUi5Yaml(appRoot, fileName, memFs);
|
|
131984
|
+
configuration = ui5Config.getConfiguration();
|
|
131985
|
+
type = ui5Config.getType();
|
|
131986
|
+
} catch {
|
|
131987
|
+
throw new Error(`Could not read 'type' from ${fileName} in project root: ${appRoot}`);
|
|
131988
|
+
}
|
|
131989
|
+
if (!(type in PATH_MAPPING_DEFAULTS)) {
|
|
131990
|
+
throw new Error(`Unsupported project type for path mappings: ${type}`);
|
|
131991
|
+
}
|
|
131992
|
+
const baseDir = await getBaseDir(appRoot, memFs);
|
|
131993
|
+
const pathMappings = {};
|
|
131994
|
+
for (const [key, value] of Object.entries(configuration?.paths || {})) {
|
|
131995
|
+
pathMappings[key] = (0, node_path_1.join)(baseDir, value ?? PATH_MAPPING_DEFAULTS[type][key]);
|
|
131996
|
+
}
|
|
131997
|
+
for (const [key, defaultValue] of Object.entries(PATH_MAPPING_DEFAULTS[type] ?? {})) {
|
|
131998
|
+
if (!pathMappings[key]) {
|
|
131999
|
+
pathMappings[key] = (0, node_path_1.join)(baseDir, defaultValue);
|
|
131861
132000
|
}
|
|
131862
132001
|
}
|
|
131863
|
-
return
|
|
132002
|
+
return pathMappings;
|
|
131864
132003
|
}
|
|
131865
132004
|
async function readUi5Yaml(projectRoot, fileName, memFs, options2) {
|
|
131866
132005
|
const ui5YamlPath = (0, node_path_1.join)(projectRoot, fileName);
|
|
@@ -132152,7 +132291,7 @@ var require_search = __commonJS({
|
|
|
132152
132291
|
try {
|
|
132153
132292
|
pathMap.files[manifestPath] ??= await (0, file_1.readJSON)(manifestPath, memFs);
|
|
132154
132293
|
const manifest = pathMap.files[manifestPath];
|
|
132155
|
-
if (manifest["sap.app"]
|
|
132294
|
+
if (manifest["sap.app"]?.type === "library") {
|
|
132156
132295
|
const packageJsonPath = await (0, file_1.findFileUp)(constants_1.FileName.Package, (0, node_path_1.dirname)(manifestPath), memFs);
|
|
132157
132296
|
const projectRoot = packageJsonPath ? (0, node_path_1.dirname)(packageJsonPath) : null;
|
|
132158
132297
|
if (projectRoot && await (0, file_1.fileExists)((0, node_path_1.join)(projectRoot, constants_1.FileName.Ui5Yaml), memFs)) {
|
|
@@ -132171,7 +132310,7 @@ var require_search = __commonJS({
|
|
|
132171
132310
|
try {
|
|
132172
132311
|
pathMap.files[manifestPath] ??= await (0, file_1.readJSON)(manifestPath, memFs);
|
|
132173
132312
|
const manifest = pathMap.files[manifestPath];
|
|
132174
|
-
if (manifest["sap.app"]
|
|
132313
|
+
if (manifest["sap.app"]?.type === "component") {
|
|
132175
132314
|
const packageJsonPath = await (0, file_1.findFileUp)(constants_1.FileName.Package, (0, node_path_1.dirname)(manifestPath), memFs);
|
|
132176
132315
|
const projectRoot = packageJsonPath ? (0, node_path_1.dirname)(packageJsonPath) : null;
|
|
132177
132316
|
if (projectRoot) {
|
|
@@ -139497,7 +139636,7 @@ var require_cap = __commonJS({
|
|
|
139497
139636
|
// Below line checks if 'cdsVersionInfo' is available and contains version information.
|
|
139498
139637
|
// If it does, it uses that version information to determine if it satisfies the minimum CDS version required.
|
|
139499
139638
|
// If 'cdsVersionInfo' is not available or does not contain version information,it falls back to check the version specified in the package.json file.
|
|
139500
|
-
hasMinCdsVersion: cdsVersionInfo?.version ? (0, semver_1.satisfies)(cdsVersionInfo?.version, `>=${constants_1.
|
|
139639
|
+
hasMinCdsVersion: cdsVersionInfo?.version ? (0, semver_1.satisfies)(cdsVersionInfo?.version, `>=${constants_1.MinCdsVersion}`) : satisfiesMinCdsVersion(packageJson),
|
|
139501
139640
|
isWorkspaceEnabled: workspaceEnabled,
|
|
139502
139641
|
hasCdsUi5Plugin: (0, dependencies_1.hasDependency)(packageJson, "cds-plugin-ui5"),
|
|
139503
139642
|
isCdsUi5PluginEnabled: false
|
|
@@ -139522,10 +139661,10 @@ var require_cap = __commonJS({
|
|
|
139522
139661
|
return workspacePackages;
|
|
139523
139662
|
}
|
|
139524
139663
|
function satisfiesMinCdsVersion(packageJson) {
|
|
139525
|
-
return hasMinCdsVersion(packageJson) || (0, semver_1.satisfies)(constants_1.
|
|
139664
|
+
return hasMinCdsVersion(packageJson) || (0, semver_1.satisfies)(constants_1.MinCdsVersion, packageJson.dependencies?.["@sap/cds"] ?? "0.0.0");
|
|
139526
139665
|
}
|
|
139527
139666
|
function hasMinCdsVersion(packageJson) {
|
|
139528
|
-
return (0, semver_1.gte)((0, semver_1.coerce)(packageJson.dependencies?.["@sap/cds"]) ?? "0.0.0", constants_1.
|
|
139667
|
+
return (0, semver_1.gte)((0, semver_1.coerce)(packageJson.dependencies?.["@sap/cds"]) ?? "0.0.0", constants_1.MinCdsVersion);
|
|
139529
139668
|
}
|
|
139530
139669
|
}
|
|
139531
139670
|
});
|
|
@@ -139793,7 +139932,7 @@ var require_path2 = __commonJS({
|
|
|
139793
139932
|
});
|
|
139794
139933
|
|
|
139795
139934
|
// ../i18n/dist/types.js
|
|
139796
|
-
var
|
|
139935
|
+
var require_types6 = __commonJS({
|
|
139797
139936
|
"../i18n/dist/types.js"(exports2) {
|
|
139798
139937
|
"use strict";
|
|
139799
139938
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -139870,7 +140009,7 @@ var require_text = __commonJS({
|
|
|
139870
140009
|
exports2.applyIndent = applyIndent;
|
|
139871
140010
|
exports2.convertToCamelCase = convertToCamelCase;
|
|
139872
140011
|
exports2.convertToPascalCase = convertToPascalCase;
|
|
139873
|
-
var types_1 =
|
|
140012
|
+
var types_1 = require_types6();
|
|
139874
140013
|
function getI18nMaxLength(value) {
|
|
139875
140014
|
const iLength = value.length;
|
|
139876
140015
|
if (iLength < 8) {
|
|
@@ -143747,7 +143886,7 @@ var require_lexer3 = __commonJS({
|
|
|
143747
143886
|
this.next();
|
|
143748
143887
|
}
|
|
143749
143888
|
let type = "whitespace";
|
|
143750
|
-
if (!isSeparator(this.peek()) && token2
|
|
143889
|
+
if (!isSeparator(this.peek()) && token2?.type === "key") {
|
|
143751
143890
|
type = "separator";
|
|
143752
143891
|
}
|
|
143753
143892
|
const end = this.offset;
|
|
@@ -144238,7 +144377,7 @@ var require_properties3 = __commonJS({
|
|
|
144238
144377
|
});
|
|
144239
144378
|
|
|
144240
144379
|
// ../i18n/dist/parser/csv/types.js
|
|
144241
|
-
var
|
|
144380
|
+
var require_types7 = __commonJS({
|
|
144242
144381
|
"../i18n/dist/parser/csv/types.js"(exports2) {
|
|
144243
144382
|
"use strict";
|
|
144244
144383
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -144259,7 +144398,7 @@ var require_lexer4 = __commonJS({
|
|
|
144259
144398
|
"use strict";
|
|
144260
144399
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
144261
144400
|
exports2.tokenize = tokenize;
|
|
144262
|
-
var types_1 =
|
|
144401
|
+
var types_1 = require_types7();
|
|
144263
144402
|
var SEPARATOR = /[,;\t]/;
|
|
144264
144403
|
function isSeparatorOrNewLine(character) {
|
|
144265
144404
|
return SEPARATOR.test(character) || character === "\n";
|
|
@@ -144383,7 +144522,7 @@ var require_csv_parser = __commonJS({
|
|
|
144383
144522
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
144384
144523
|
exports2.parseCsv = parseCsv;
|
|
144385
144524
|
var text_document_utils_1 = require_dist12();
|
|
144386
|
-
var types_1 =
|
|
144525
|
+
var types_1 = require_types7();
|
|
144387
144526
|
var lexer_1 = require_lexer4();
|
|
144388
144527
|
var ParseCsv = class {
|
|
144389
144528
|
text;
|
|
@@ -145412,7 +145551,7 @@ var require_dist13 = __commonJS({
|
|
|
145412
145551
|
Object.defineProperty(exports2, "printPropertiesI18nAnnotation", { enumerable: true, get: function() {
|
|
145413
145552
|
return utils_1.printPropertiesI18nAnnotation;
|
|
145414
145553
|
} });
|
|
145415
|
-
var types_1 =
|
|
145554
|
+
var types_1 = require_types6();
|
|
145416
145555
|
Object.defineProperty(exports2, "SapLongTextType", { enumerable: true, get: function() {
|
|
145417
145556
|
return types_1.SapLongTextType;
|
|
145418
145557
|
} });
|
|
@@ -145814,6 +145953,7 @@ var require_specification = __commonJS({
|
|
|
145814
145953
|
"../project-access/dist/project/specification.js"(exports2) {
|
|
145815
145954
|
"use strict";
|
|
145816
145955
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
145956
|
+
exports2.getSpecificationModuleFromCache = getSpecificationModuleFromCache;
|
|
145817
145957
|
exports2.getSpecification = getSpecification;
|
|
145818
145958
|
exports2.refreshSpecificationDistTags = refreshSpecificationDistTags;
|
|
145819
145959
|
exports2.getSpecificationPath = getSpecificationPath;
|
|
@@ -145847,7 +145987,7 @@ var require_specification = __commonJS({
|
|
|
145847
145987
|
const packageJson = await (0, file_1.readJSON)((0, node_path_1.join)(root, constants_1.FileName.Package));
|
|
145848
145988
|
return !!packageJson.devDependencies?.["@sap/ux-specification"];
|
|
145849
145989
|
}
|
|
145850
|
-
async function
|
|
145990
|
+
async function getSpecificationModuleFromCache(root, options2) {
|
|
145851
145991
|
const logger2 = options2?.logger;
|
|
145852
145992
|
let specification;
|
|
145853
145993
|
const version2 = await getSpecificationVersion(root, { logger: logger2 });
|
|
@@ -145870,7 +146010,7 @@ var require_specification = __commonJS({
|
|
|
145870
146010
|
} catch {
|
|
145871
146011
|
logger2?.debug(`Specification not found in project '${root}', trying to load from cache`);
|
|
145872
146012
|
}
|
|
145873
|
-
return await
|
|
146013
|
+
return await getSpecificationModuleFromCache(root, { logger: logger2 });
|
|
145874
146014
|
}
|
|
145875
146015
|
async function refreshSpecificationDistTags(options2) {
|
|
145876
146016
|
const logger2 = options2?.logger;
|
|
@@ -145927,7 +146067,7 @@ var require_specification = __commonJS({
|
|
|
145927
146067
|
logger2?.debug(`Specification root found in project '${root}'`);
|
|
145928
146068
|
return modulePath2.slice(0, modulePath2.lastIndexOf((0, node_path_1.join)(moduleName)) + (0, node_path_1.join)(moduleName).length);
|
|
145929
146069
|
}
|
|
145930
|
-
await
|
|
146070
|
+
await getSpecificationModuleFromCache(root, { logger: logger2 });
|
|
145931
146071
|
const version2 = await getSpecificationVersion(root, { logger: logger2 });
|
|
145932
146072
|
logger2?.debug(`Specification not found in project '${root}', using path from cache with version '${version2}'`);
|
|
145933
146073
|
const moduleRoot = (0, node_path_1.join)(constants_1.moduleCacheRoot, moduleName, version2);
|
|
@@ -145937,6 +146077,28 @@ var require_specification = __commonJS({
|
|
|
145937
146077
|
}
|
|
145938
146078
|
});
|
|
145939
146079
|
|
|
146080
|
+
// ../project-access/dist/project/flex-changes.js
|
|
146081
|
+
var require_flex_changes = __commonJS({
|
|
146082
|
+
"../project-access/dist/project/flex-changes.js"(exports2) {
|
|
146083
|
+
"use strict";
|
|
146084
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
146085
|
+
exports2.readFlexChanges = readFlexChanges;
|
|
146086
|
+
var node_path_1 = require("node:path");
|
|
146087
|
+
var file_1 = require_file4();
|
|
146088
|
+
var node_fs_1 = require("node:fs");
|
|
146089
|
+
async function readFlexChanges(changesPath, memFs) {
|
|
146090
|
+
const changes = {};
|
|
146091
|
+
if ((0, node_fs_1.existsSync)(changesPath)) {
|
|
146092
|
+
const files = await (0, file_1.readDirectory)(changesPath);
|
|
146093
|
+
for (const file of files) {
|
|
146094
|
+
changes[file] = await (0, file_1.readFile)((0, node_path_1.join)(changesPath, file), memFs);
|
|
146095
|
+
}
|
|
146096
|
+
}
|
|
146097
|
+
return changes;
|
|
146098
|
+
}
|
|
146099
|
+
}
|
|
146100
|
+
});
|
|
146101
|
+
|
|
145940
146102
|
// ../project-access/dist/project/access.js
|
|
145941
146103
|
var require_access = __commonJS({
|
|
145942
146104
|
"../project-access/dist/project/access.js"(exports2) {
|
|
@@ -145951,6 +146113,8 @@ var require_access = __commonJS({
|
|
|
145951
146113
|
var file_1 = require_file4();
|
|
145952
146114
|
var constants_1 = require_constants11();
|
|
145953
146115
|
var specification_1 = require_specification();
|
|
146116
|
+
var flex_changes_1 = require_flex_changes();
|
|
146117
|
+
var cap_1 = require_cap();
|
|
145954
146118
|
var ApplicationAccessImp = class {
|
|
145955
146119
|
_project;
|
|
145956
146120
|
appId;
|
|
@@ -146102,6 +146266,67 @@ var require_access = __commonJS({
|
|
|
146102
146266
|
async updateManifestJSON(manifest, memFs) {
|
|
146103
146267
|
await (0, file_1.updateManifestJSON)(this.app.manifest, manifest, memFs ?? this.options?.fs);
|
|
146104
146268
|
}
|
|
146269
|
+
/**
|
|
146270
|
+
* Reads and returns the parsed `manifest.json` file for the application.
|
|
146271
|
+
*
|
|
146272
|
+
* @param memFs - optional mem-fs-editor instance
|
|
146273
|
+
* @returns A promise resolving to the parsed `manifest.json` content.
|
|
146274
|
+
*/
|
|
146275
|
+
async readManifest(memFs) {
|
|
146276
|
+
return (0, file_1.readJSON)(this.app.manifest, memFs ?? this.options?.fs);
|
|
146277
|
+
}
|
|
146278
|
+
/**
|
|
146279
|
+
* Reads and returns all Flex Changes (`*.change` files) associated with the application.
|
|
146280
|
+
*
|
|
146281
|
+
* @param memFs - optional mem-fs-editor instance
|
|
146282
|
+
* @returns A promise that resolves to an array of flex change files.
|
|
146283
|
+
*/
|
|
146284
|
+
async readFlexChanges(memFs) {
|
|
146285
|
+
return (0, flex_changes_1.readFlexChanges)(this.app.changes, memFs ?? this.options?.fs);
|
|
146286
|
+
}
|
|
146287
|
+
/**
|
|
146288
|
+
* Reads and returns all annotation files associated with the application's main service.
|
|
146289
|
+
*
|
|
146290
|
+
* @param memFs - optional mem-fs-editor instance
|
|
146291
|
+
* @returns A promise resolving to an array of annotation file descriptors.
|
|
146292
|
+
*/
|
|
146293
|
+
async readAnnotationFiles(memFs) {
|
|
146294
|
+
const annotationData = [];
|
|
146295
|
+
const mainServiceName = this.app.mainService ?? "mainService";
|
|
146296
|
+
const mainService = this.app?.services?.[mainServiceName];
|
|
146297
|
+
if (!mainService) {
|
|
146298
|
+
return [];
|
|
146299
|
+
}
|
|
146300
|
+
if (mainService.uri && (this.projectType === "CAPJava" || this.projectType === "CAPNodejs")) {
|
|
146301
|
+
const serviceUri = mainService?.uri ?? "";
|
|
146302
|
+
if (serviceUri) {
|
|
146303
|
+
const edmx = await (0, cap_1.readCapServiceMetadataEdmx)(this.root, serviceUri);
|
|
146304
|
+
annotationData.push({
|
|
146305
|
+
fileContent: edmx,
|
|
146306
|
+
dataSourceUri: serviceUri
|
|
146307
|
+
});
|
|
146308
|
+
}
|
|
146309
|
+
} else {
|
|
146310
|
+
if (mainService.local) {
|
|
146311
|
+
const serviceFile = await (0, file_1.readFile)(mainService.local, memFs ?? this.options?.fs);
|
|
146312
|
+
annotationData.push({
|
|
146313
|
+
dataSourceUri: mainService.local,
|
|
146314
|
+
fileContent: serviceFile.toString()
|
|
146315
|
+
});
|
|
146316
|
+
}
|
|
146317
|
+
const { annotations = [] } = mainService;
|
|
146318
|
+
for (const annotation of annotations) {
|
|
146319
|
+
if (annotation.local) {
|
|
146320
|
+
const annotationFile = await (0, file_1.readFile)(annotation.local, memFs ?? this.options?.fs);
|
|
146321
|
+
annotationData.push({
|
|
146322
|
+
dataSourceUri: annotation.local,
|
|
146323
|
+
fileContent: annotationFile.toString()
|
|
146324
|
+
});
|
|
146325
|
+
}
|
|
146326
|
+
}
|
|
146327
|
+
}
|
|
146328
|
+
return annotationData;
|
|
146329
|
+
}
|
|
146105
146330
|
/**
|
|
146106
146331
|
* Project structure.
|
|
146107
146332
|
*
|
|
@@ -146149,9 +146374,25 @@ var require_access = __commonJS({
|
|
|
146149
146374
|
return Object.keys(this._project.apps);
|
|
146150
146375
|
}
|
|
146151
146376
|
/**
|
|
146152
|
-
*
|
|
146377
|
+
* Get application ID (the relative path from project root to app root) for a given 'sap.app.id' from the manifest.
|
|
146153
146378
|
*
|
|
146154
|
-
* @param
|
|
146379
|
+
* @param manifestAppId - The 'sap.app.id' from the manifest
|
|
146380
|
+
* @returns - application ID (the relative path from project root to app root) or undefined if not found
|
|
146381
|
+
*/
|
|
146382
|
+
async getApplicationIdByManifestAppId(manifestAppId) {
|
|
146383
|
+
for (const [appId, { manifest: manifestPath }] of Object.entries(this._project.apps)) {
|
|
146384
|
+
const manifestContent = await (0, file_1.readJSON)(manifestPath, this.options?.memFs);
|
|
146385
|
+
if (manifestContent["sap.app"]?.id === manifestAppId) {
|
|
146386
|
+
return appId;
|
|
146387
|
+
}
|
|
146388
|
+
}
|
|
146389
|
+
return void 0;
|
|
146390
|
+
}
|
|
146391
|
+
/**
|
|
146392
|
+
* Returns an instance of an application for a given application ID (the relative path from project root to app root, NOT the 'sap.app.id' from the manifest).
|
|
146393
|
+
* It contains information about the application, like paths and services.
|
|
146394
|
+
*
|
|
146395
|
+
* @param appId - application ID (the relative path from project root to app root, NOT the 'sap.app.id' from the manifest)
|
|
146155
146396
|
* @returns - Instance of ApplicationAccess that contains information about the application, like paths and services
|
|
146156
146397
|
*/
|
|
146157
146398
|
getApplication(appId) {
|
|
@@ -146190,15 +146431,15 @@ var require_access = __commonJS({
|
|
|
146190
146431
|
}
|
|
146191
146432
|
async function createApplicationAccess(appRoot, fs3) {
|
|
146192
146433
|
try {
|
|
146193
|
-
const apps = await (0, search_1.findAllApps)([appRoot]);
|
|
146194
|
-
const app = apps.find((app2) => app2.appRoot === appRoot);
|
|
146195
|
-
if (!app) {
|
|
146196
|
-
throw new Error(`Could not find app with root ${appRoot}`);
|
|
146197
|
-
}
|
|
146198
146434
|
let options2;
|
|
146199
146435
|
if (fs3) {
|
|
146200
146436
|
options2 = isEditor(fs3) ? { fs: fs3 } : fs3;
|
|
146201
146437
|
}
|
|
146438
|
+
const apps = await (0, search_1.findAllApps)([appRoot], options2?.fs);
|
|
146439
|
+
const app = apps.find((app2) => app2.appRoot === appRoot);
|
|
146440
|
+
if (!app) {
|
|
146441
|
+
throw new Error(`Could not find app with root ${appRoot}`);
|
|
146442
|
+
}
|
|
146202
146443
|
const project = await (0, info_1.getProject)(app.projectRoot, options2?.fs);
|
|
146203
146444
|
const appId = (0, node_path_1.relative)(project.root, appRoot);
|
|
146204
146445
|
return new ApplicationAccessImp(project, appId, options2);
|
|
@@ -146252,35 +146493,13 @@ var require_script = __commonJS({
|
|
|
146252
146493
|
}
|
|
146253
146494
|
});
|
|
146254
146495
|
|
|
146255
|
-
// ../project-access/dist/project/flex-changes.js
|
|
146256
|
-
var require_flex_changes = __commonJS({
|
|
146257
|
-
"../project-access/dist/project/flex-changes.js"(exports2) {
|
|
146258
|
-
"use strict";
|
|
146259
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
146260
|
-
exports2.readFlexChanges = readFlexChanges;
|
|
146261
|
-
var node_path_1 = require("node:path");
|
|
146262
|
-
var file_1 = require_file4();
|
|
146263
|
-
var node_fs_1 = require("node:fs");
|
|
146264
|
-
async function readFlexChanges(changesPath, memFs) {
|
|
146265
|
-
const changes = {};
|
|
146266
|
-
if ((0, node_fs_1.existsSync)(changesPath)) {
|
|
146267
|
-
const files = await (0, file_1.readDirectory)(changesPath);
|
|
146268
|
-
for (const file of files) {
|
|
146269
|
-
changes[file] = await (0, file_1.readFile)((0, node_path_1.join)(changesPath, file), memFs);
|
|
146270
|
-
}
|
|
146271
|
-
}
|
|
146272
|
-
return changes;
|
|
146273
|
-
}
|
|
146274
|
-
}
|
|
146275
|
-
});
|
|
146276
|
-
|
|
146277
146496
|
// ../project-access/dist/project/index.js
|
|
146278
146497
|
var require_project = __commonJS({
|
|
146279
146498
|
"../project-access/dist/project/index.js"(exports2) {
|
|
146280
146499
|
"use strict";
|
|
146281
146500
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
146282
|
-
exports2.
|
|
146283
|
-
exports2.readFlexChanges = exports2.refreshSpecificationDistTags = exports2.getSpecificationPath = exports2.getSpecification = void 0;
|
|
146501
|
+
exports2.updatePackageScript = exports2.createProjectAccess = exports2.createApplicationAccess = exports2.getMtaPath = exports2.getPathMappings = exports2.getMockDataPath = exports2.getMockServerConfig = exports2.getAllUi5YamlFileNames = exports2.readUi5Yaml = exports2.getWebappPath = exports2.findRootsForPath = exports2.findCapProjectRoot = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findCapProjects = exports2.findAllApps = exports2.loadModuleFromProject = exports2.getProjectType = exports2.getProject = exports2.getMinimumUI5Version = exports2.getMinUI5VersionAsArray = exports2.getMinUI5VersionFromManifest = exports2.getAppType = exports2.getAppProgrammingLanguage = exports2.getI18nBundles = exports2.getI18nPropertiesPaths = exports2.getCapI18nFolderNames = exports2.hasDependency = exports2.getNodeModulesPath = exports2.addPackageDevDependency = exports2.filterDataSourcesByType = exports2.checkCdsUi5PluginEnabled = exports2.hasMinCdsVersion = exports2.getWorkspaceInfo = exports2.toReferenceUri = exports2.readCapServiceMetadataEdmx = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.isCapProject = exports2.getCdsServices = exports2.getCdsRoots = exports2.getCdsFiles = exports2.getCapServiceName = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapEnvironment = exports2.getCapCustomPaths = exports2.deleteCapApp = exports2.clearCdsModuleCache = void 0;
|
|
146502
|
+
exports2.readFlexChanges = exports2.refreshSpecificationDistTags = exports2.getSpecificationPath = exports2.getSpecificationModuleFromCache = exports2.getSpecification = exports2.hasUI5CliV3 = void 0;
|
|
146284
146503
|
var cap_1 = require_cap();
|
|
146285
146504
|
Object.defineProperty(exports2, "clearCdsModuleCache", { enumerable: true, get: function() {
|
|
146286
146505
|
return cap_1.clearCdsModuleCache;
|
|
@@ -146424,6 +146643,9 @@ var require_project = __commonJS({
|
|
|
146424
146643
|
Object.defineProperty(exports2, "getMockDataPath", { enumerable: true, get: function() {
|
|
146425
146644
|
return ui5_config_1.getMockDataPath;
|
|
146426
146645
|
} });
|
|
146646
|
+
Object.defineProperty(exports2, "getPathMappings", { enumerable: true, get: function() {
|
|
146647
|
+
return ui5_config_1.getPathMappings;
|
|
146648
|
+
} });
|
|
146427
146649
|
var mta_1 = require_mta();
|
|
146428
146650
|
Object.defineProperty(exports2, "getMtaPath", { enumerable: true, get: function() {
|
|
146429
146651
|
return mta_1.getMtaPath;
|
|
@@ -146446,6 +146668,9 @@ var require_project = __commonJS({
|
|
|
146446
146668
|
Object.defineProperty(exports2, "getSpecification", { enumerable: true, get: function() {
|
|
146447
146669
|
return specification_1.getSpecification;
|
|
146448
146670
|
} });
|
|
146671
|
+
Object.defineProperty(exports2, "getSpecificationModuleFromCache", { enumerable: true, get: function() {
|
|
146672
|
+
return specification_1.getSpecificationModuleFromCache;
|
|
146673
|
+
} });
|
|
146449
146674
|
Object.defineProperty(exports2, "getSpecificationPath", { enumerable: true, get: function() {
|
|
146450
146675
|
return specification_1.getSpecificationPath;
|
|
146451
146676
|
} });
|
|
@@ -146532,7 +146757,7 @@ var require_webapp = __commonJS({
|
|
|
146532
146757
|
});
|
|
146533
146758
|
|
|
146534
146759
|
// ../project-access/dist/types/index.js
|
|
146535
|
-
var
|
|
146760
|
+
var require_types8 = __commonJS({
|
|
146536
146761
|
"../project-access/dist/types/index.js"(exports2) {
|
|
146537
146762
|
"use strict";
|
|
146538
146763
|
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -148471,8 +148696,8 @@ var require_dist14 = __commonJS({
|
|
|
148471
148696
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p);
|
|
148472
148697
|
};
|
|
148473
148698
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
148474
|
-
exports2.
|
|
148475
|
-
exports2.hasDependency = exports2.execNpmCommand = exports2.readFlexChanges = exports2.checkCdsUi5PluginEnabled = exports2.hasMinCdsVersion = exports2.getWorkspaceInfo = exports2.updatePackageScript = exports2.toReferenceUri = exports2.refreshSpecificationDistTags = exports2.readUi5Yaml = void 0;
|
|
148699
|
+
exports2.isCapJavaProject = exports2.isCapProject = exports2.hasUI5CliV3 = exports2.getWebappPath = exports2.getProjectType = exports2.getProject = exports2.getPathMappings = exports2.getNodeModulesPath = exports2.getMockDataPath = exports2.getMockServerConfig = exports2.getMtaPath = exports2.getMinimumUI5Version = exports2.getMinUI5VersionAsArray = exports2.getMinUI5VersionFromManifest = exports2.getI18nBundles = exports2.getI18nPropertiesPaths = exports2.getSpecificationPath = exports2.getSpecificationModuleFromCache = exports2.getSpecification = exports2.getCapI18nFolderNames = exports2.getCdsServices = exports2.getCdsRoots = exports2.getCdsFiles = exports2.getCapProjectType = exports2.getCapServiceName = exports2.getCapModelAndServices = exports2.getCapEnvironment = exports2.getCapCustomPaths = exports2.getAppType = exports2.getAppProgrammingLanguage = exports2.getAppRootFromWebappPath = exports2.getAllUi5YamlFileNames = exports2.findRootsForPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findCapProjects = exports2.findCapProjectRoot = exports2.findAllApps = exports2.filterDataSourcesByType = exports2.deleteCapApp = exports2.createProjectAccess = exports2.createApplicationAccess = exports2.clearCdsModuleCache = exports2.addPackageDevDependency = exports2.getFilePaths = exports2.MinCdsVersion = exports2.MinCdsPluginUi5Version = exports2.FioriToolsSettings = exports2.DirName = exports2.FileName = void 0;
|
|
148700
|
+
exports2.hasDependency = exports2.execNpmCommand = exports2.readFlexChanges = exports2.checkCdsUi5PluginEnabled = exports2.hasMinCdsVersion = exports2.getWorkspaceInfo = exports2.updatePackageScript = exports2.toReferenceUri = exports2.refreshSpecificationDistTags = exports2.readUi5Yaml = exports2.readCapServiceMetadataEdmx = exports2.loadModuleFromProject = exports2.isCapNodeJsProject = void 0;
|
|
148476
148701
|
var constants_1 = require_constants11();
|
|
148477
148702
|
Object.defineProperty(exports2, "FileName", { enumerable: true, get: function() {
|
|
148478
148703
|
return constants_1.FileName;
|
|
@@ -148483,8 +148708,11 @@ var require_dist14 = __commonJS({
|
|
|
148483
148708
|
Object.defineProperty(exports2, "FioriToolsSettings", { enumerable: true, get: function() {
|
|
148484
148709
|
return constants_1.FioriToolsSettings;
|
|
148485
148710
|
} });
|
|
148486
|
-
Object.defineProperty(exports2, "
|
|
148487
|
-
return constants_1.
|
|
148711
|
+
Object.defineProperty(exports2, "MinCdsPluginUi5Version", { enumerable: true, get: function() {
|
|
148712
|
+
return constants_1.MinCdsPluginUi5Version;
|
|
148713
|
+
} });
|
|
148714
|
+
Object.defineProperty(exports2, "MinCdsVersion", { enumerable: true, get: function() {
|
|
148715
|
+
return constants_1.MinCdsVersion;
|
|
148488
148716
|
} });
|
|
148489
148717
|
var file_1 = require_file4();
|
|
148490
148718
|
Object.defineProperty(exports2, "getFilePaths", { enumerable: true, get: function() {
|
|
@@ -148569,6 +148797,9 @@ var require_dist14 = __commonJS({
|
|
|
148569
148797
|
Object.defineProperty(exports2, "getSpecification", { enumerable: true, get: function() {
|
|
148570
148798
|
return project_1.getSpecification;
|
|
148571
148799
|
} });
|
|
148800
|
+
Object.defineProperty(exports2, "getSpecificationModuleFromCache", { enumerable: true, get: function() {
|
|
148801
|
+
return project_1.getSpecificationModuleFromCache;
|
|
148802
|
+
} });
|
|
148572
148803
|
Object.defineProperty(exports2, "getSpecificationPath", { enumerable: true, get: function() {
|
|
148573
148804
|
return project_1.getSpecificationPath;
|
|
148574
148805
|
} });
|
|
@@ -148599,6 +148830,9 @@ var require_dist14 = __commonJS({
|
|
|
148599
148830
|
Object.defineProperty(exports2, "getNodeModulesPath", { enumerable: true, get: function() {
|
|
148600
148831
|
return project_1.getNodeModulesPath;
|
|
148601
148832
|
} });
|
|
148833
|
+
Object.defineProperty(exports2, "getPathMappings", { enumerable: true, get: function() {
|
|
148834
|
+
return project_1.getPathMappings;
|
|
148835
|
+
} });
|
|
148602
148836
|
Object.defineProperty(exports2, "getProject", { enumerable: true, get: function() {
|
|
148603
148837
|
return project_1.getProject;
|
|
148604
148838
|
} });
|
|
@@ -148654,7 +148888,7 @@ var require_dist14 = __commonJS({
|
|
|
148654
148888
|
Object.defineProperty(exports2, "execNpmCommand", { enumerable: true, get: function() {
|
|
148655
148889
|
return npm_command_1.execNpmCommand;
|
|
148656
148890
|
} });
|
|
148657
|
-
__exportStar2(
|
|
148891
|
+
__exportStar2(require_types8(), exports2);
|
|
148658
148892
|
__exportStar2(require_library2(), exports2);
|
|
148659
148893
|
var project_2 = require_project();
|
|
148660
148894
|
Object.defineProperty(exports2, "hasDependency", { enumerable: true, get: function() {
|
|
@@ -148676,7 +148910,7 @@ var require_config_state2 = __commonJS({
|
|
|
148676
148910
|
});
|
|
148677
148911
|
|
|
148678
148912
|
// ../telemetry/dist/tooling-telemetry/types.js
|
|
148679
|
-
var
|
|
148913
|
+
var require_types9 = __commonJS({
|
|
148680
148914
|
"../telemetry/dist/tooling-telemetry/types.js"(exports2) {
|
|
148681
148915
|
"use strict";
|
|
148682
148916
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -148739,7 +148973,7 @@ var require_data_processor = __commonJS({
|
|
|
148739
148973
|
var yaml_1 = __importDefault2(require_dist11());
|
|
148740
148974
|
var project_access_1 = require_dist14();
|
|
148741
148975
|
var config_state_1 = require_config_state2();
|
|
148742
|
-
var types_1 =
|
|
148976
|
+
var types_1 = require_types9();
|
|
148743
148977
|
async function processToolsSuiteTelemetry(telemetryHelperProperties) {
|
|
148744
148978
|
const commonProperties = await getCommonProperties();
|
|
148745
148979
|
let appProperties = {};
|
|
@@ -148964,7 +149198,7 @@ var require_project_info = __commonJS({
|
|
|
148964
149198
|
});
|
|
148965
149199
|
|
|
148966
149200
|
// ../telemetry/dist/base/types/index.js
|
|
148967
|
-
var
|
|
149201
|
+
var require_types10 = __commonJS({
|
|
148968
149202
|
"../telemetry/dist/base/types/index.js"(exports2) {
|
|
148969
149203
|
"use strict";
|
|
148970
149204
|
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -149038,7 +149272,7 @@ var require_reporting = __commonJS({
|
|
|
149038
149272
|
var appInsights = __importStar2(require_applicationinsights2());
|
|
149039
149273
|
var azure_client_config_1 = require_azure_client_config();
|
|
149040
149274
|
var config_state_1 = require_config_state();
|
|
149041
|
-
var types_1 =
|
|
149275
|
+
var types_1 = require_types10();
|
|
149042
149276
|
var parseErrorStack = (errorStack) => {
|
|
149043
149277
|
const regexps = [/sap-ux.+/gi, /[a-zA-Z-]+\/ide-extension\/.+/gi, /(\/telemetry\/.+)/gi];
|
|
149044
149278
|
const parsedStack = [];
|
|
@@ -149269,7 +149503,7 @@ var require_tooling_telemetry = __commonJS({
|
|
|
149269
149503
|
return data_processor_1.processToolsSuiteTelemetry;
|
|
149270
149504
|
} });
|
|
149271
149505
|
__exportStar2(require_telemetry_settings(), exports2);
|
|
149272
|
-
__exportStar2(
|
|
149506
|
+
__exportStar2(require_types9(), exports2);
|
|
149273
149507
|
}
|
|
149274
149508
|
});
|
|
149275
149509
|
|
|
@@ -149314,7 +149548,7 @@ var require_client2 = __commonJS({
|
|
|
149314
149548
|
});
|
|
149315
149549
|
|
|
149316
149550
|
// ../telemetry/dist/base/performance/types.js
|
|
149317
|
-
var
|
|
149551
|
+
var require_types11 = __commonJS({
|
|
149318
149552
|
"../telemetry/dist/base/performance/types.js"(exports2) {
|
|
149319
149553
|
"use strict";
|
|
149320
149554
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -149349,7 +149583,7 @@ var require_entries = __commonJS({
|
|
|
149349
149583
|
"use strict";
|
|
149350
149584
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
149351
149585
|
exports2.Measurement = exports2.Mark = void 0;
|
|
149352
|
-
var types_1 =
|
|
149586
|
+
var types_1 = require_types11();
|
|
149353
149587
|
var Mark = class {
|
|
149354
149588
|
startTime;
|
|
149355
149589
|
name;
|
|
@@ -149444,7 +149678,7 @@ var require_api = __commonJS({
|
|
|
149444
149678
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
149445
149679
|
exports2.PerformanceMeasurementAPI = void 0;
|
|
149446
149680
|
var entries_1 = require_entries();
|
|
149447
|
-
var types_1 =
|
|
149681
|
+
var types_1 = require_types11();
|
|
149448
149682
|
var performanceNow = require_performance_now();
|
|
149449
149683
|
var PerformanceMeasurementAPI = class _PerformanceMeasurementAPI extends types_1.PerformanceMeasurement {
|
|
149450
149684
|
static initTiming;
|
|
@@ -152851,7 +153085,7 @@ var require_message = __commonJS({
|
|
|
152851
153085
|
log2[severity](msg);
|
|
152852
153086
|
}
|
|
152853
153087
|
} else {
|
|
152854
|
-
error ?
|
|
153088
|
+
log2[error ? "error" : "info"](msg);
|
|
152855
153089
|
}
|
|
152856
153090
|
}
|
|
152857
153091
|
function prettyPrintMessage({ msg, log: log2, host, isDest = false }) {
|
|
@@ -152897,7 +153131,7 @@ var require_message = __commonJS({
|
|
|
152897
153131
|
}
|
|
152898
153132
|
}
|
|
152899
153133
|
var prettyPrintTimeInMs = (ms) => {
|
|
152900
|
-
const min = ms / 60 / 1e3
|
|
153134
|
+
const min = Math.trunc(ms / 60 / 1e3);
|
|
152901
153135
|
if (min > 1) {
|
|
152902
153136
|
return `${min} minutes`;
|
|
152903
153137
|
} else if (min === 1) {
|
|
@@ -156517,8 +156751,16 @@ var require_adt_types = __commonJS({
|
|
|
156517
156751
|
}
|
|
156518
156752
|
});
|
|
156519
156753
|
|
|
156754
|
+
// ../axios-extension/dist/abap/types/external-services.js
|
|
156755
|
+
var require_external_services = __commonJS({
|
|
156756
|
+
"../axios-extension/dist/abap/types/external-services.js"(exports2) {
|
|
156757
|
+
"use strict";
|
|
156758
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
156759
|
+
}
|
|
156760
|
+
});
|
|
156761
|
+
|
|
156520
156762
|
// ../axios-extension/dist/abap/types/index.js
|
|
156521
|
-
var
|
|
156763
|
+
var require_types12 = __commonJS({
|
|
156522
156764
|
"../axios-extension/dist/abap/types/index.js"(exports2) {
|
|
156523
156765
|
"use strict";
|
|
156524
156766
|
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -156539,6 +156781,7 @@ var require_types11 = __commonJS({
|
|
|
156539
156781
|
};
|
|
156540
156782
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
156541
156783
|
__exportStar2(require_adt_types(), exports2);
|
|
156784
|
+
__exportStar2(require_external_services(), exports2);
|
|
156542
156785
|
}
|
|
156543
156786
|
});
|
|
156544
156787
|
|
|
@@ -164972,7 +165215,7 @@ var require_transportcheck_service = __commonJS({
|
|
|
164972
165215
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
164973
165216
|
exports2.TransportChecksService = void 0;
|
|
164974
165217
|
var adt_service_1 = require_adt_service();
|
|
164975
|
-
var types_1 =
|
|
165218
|
+
var types_1 = require_types12();
|
|
164976
165219
|
var fast_xml_parser_1 = require_fxp();
|
|
164977
165220
|
var xpath = __importStar2(require_xpath());
|
|
164978
165221
|
var xmldom_1 = require_lib10();
|
|
@@ -166159,13 +166402,14 @@ var require_abap_service_provider = __commonJS({
|
|
|
166159
166402
|
"use strict";
|
|
166160
166403
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
166161
166404
|
exports2.AbapServiceProvider = void 0;
|
|
166405
|
+
var posix_1 = require("node:path/posix");
|
|
166162
166406
|
var odata_service_1 = require_odata_service();
|
|
166163
166407
|
var service_provider_1 = require_service_provider();
|
|
166164
166408
|
var adt_catalog_service_1 = require_adt_catalog_service();
|
|
166165
166409
|
var app_index_service_1 = require_app_index_service();
|
|
166166
166410
|
var catalog_1 = require_catalog();
|
|
166167
166411
|
var lrep_service_1 = require_lrep_service();
|
|
166168
|
-
var types_1 =
|
|
166412
|
+
var types_1 = require_types12();
|
|
166169
166413
|
var ui5_abap_repository_service_1 = require_ui5_abap_repository_service();
|
|
166170
166414
|
var odata_service_generator_1 = require_odata_service_generator();
|
|
166171
166415
|
var ui_service_generator_1 = require_ui_service_generator();
|
|
@@ -166402,6 +166646,41 @@ var require_abap_service_provider = __commonJS({
|
|
|
166402
166646
|
generator.configure(config, packageName || "$TMP");
|
|
166403
166647
|
return generator;
|
|
166404
166648
|
}
|
|
166649
|
+
/**
|
|
166650
|
+
* Collects ValueListReferences annotation values from the service metadata and annotation files.
|
|
166651
|
+
*
|
|
166652
|
+
* @param references - Service references for which metadata should be fetched.
|
|
166653
|
+
* @returns A list of ValueListReferences found in the metadata and annotations.
|
|
166654
|
+
*/
|
|
166655
|
+
async fetchExternalServices(references) {
|
|
166656
|
+
const valueListReferences = [];
|
|
166657
|
+
const allPromises = references.map(async (reference) => {
|
|
166658
|
+
const { serviceRootPath, value } = reference;
|
|
166659
|
+
const externalServicePath = (0, posix_1.join)(serviceRootPath, value).replace("/$metadata", "");
|
|
166660
|
+
const externalService = this.service(externalServicePath);
|
|
166661
|
+
try {
|
|
166662
|
+
const data = await externalService.metadata();
|
|
166663
|
+
if (reference.type === "value-list") {
|
|
166664
|
+
valueListReferences.push({
|
|
166665
|
+
type: "value-list",
|
|
166666
|
+
path: externalServicePath,
|
|
166667
|
+
target: reference.target,
|
|
166668
|
+
metadata: data
|
|
166669
|
+
});
|
|
166670
|
+
} else if (reference.type === "code-list") {
|
|
166671
|
+
valueListReferences.push({
|
|
166672
|
+
type: "code-list",
|
|
166673
|
+
path: externalServicePath,
|
|
166674
|
+
metadata: data
|
|
166675
|
+
});
|
|
166676
|
+
}
|
|
166677
|
+
} catch (error) {
|
|
166678
|
+
this.log.warn(`Could not fetch value list reference metadata from ${externalServicePath}, ${error.message}`);
|
|
166679
|
+
}
|
|
166680
|
+
});
|
|
166681
|
+
await Promise.allSettled(allPromises);
|
|
166682
|
+
return valueListReferences;
|
|
166683
|
+
}
|
|
166405
166684
|
/**
|
|
166406
166685
|
* Get the service URL from the generator config.
|
|
166407
166686
|
*
|
|
@@ -166526,7 +166805,7 @@ var require_abap = __commonJS({
|
|
|
166526
166805
|
__exportStar2(require_message(), exports2);
|
|
166527
166806
|
__exportStar2(require_catalog(), exports2);
|
|
166528
166807
|
__exportStar2(require_adt_catalog(), exports2);
|
|
166529
|
-
var types_1 =
|
|
166808
|
+
var types_1 = require_types12();
|
|
166530
166809
|
Object.defineProperty(exports2, "TenantType", { enumerable: true, get: function() {
|
|
166531
166810
|
return types_1.TenantType;
|
|
166532
166811
|
} });
|
|
@@ -169188,7 +169467,7 @@ function getSystemTypeLabel(systemType) {
|
|
|
169188
169467
|
var import_telemetry = __toESM(require_dist15());
|
|
169189
169468
|
|
|
169190
169469
|
// package.json
|
|
169191
|
-
var version = "0.1.
|
|
169470
|
+
var version = "0.1.2";
|
|
169192
169471
|
|
|
169193
169472
|
// src/utils/telemetryHelper.ts
|
|
169194
169473
|
var import_feature_toggle = __toESM(require_dist16());
|
|
@@ -169373,7 +169652,9 @@ var SapSystemsProvider = class {
|
|
|
169373
169652
|
try {
|
|
169374
169653
|
await import_vscode2.commands.executeCommand("setContext", "sap.ux.tools.sapSystems.treeLoading", true);
|
|
169375
169654
|
const systemService = await getBackendSystemService();
|
|
169376
|
-
systems = await systemService.getAll({
|
|
169655
|
+
systems = await systemService.getAll({
|
|
169656
|
+
includeSensitiveData: false
|
|
169657
|
+
});
|
|
169377
169658
|
return systems;
|
|
169378
169659
|
} catch (error) {
|
|
169379
169660
|
SystemsLogger.logger.error(t2("error.loadingSystems"));
|
|
@@ -169726,7 +170007,10 @@ async function renderWebApp(context4) {
|
|
|
169726
170007
|
function getSystemInfo(backendSystem) {
|
|
169727
170008
|
let systemInfo;
|
|
169728
170009
|
if (backendSystem) {
|
|
169729
|
-
systemInfo = {
|
|
170010
|
+
systemInfo = {
|
|
170011
|
+
...backendSystem,
|
|
170012
|
+
systemType: backendSystem.systemType ?? (0, import_store3.getBackendSystemType)(backendSystem) ?? "OnPrem"
|
|
170013
|
+
};
|
|
169730
170014
|
}
|
|
169731
170015
|
return systemInfo;
|
|
169732
170016
|
}
|
|
@@ -169799,7 +170083,12 @@ function compareSystems(currentSystem, newSystem) {
|
|
|
169799
170083
|
return currentSystem.url.replace(/\/$/, "") === newSystem?.url.replace(/\/$/, "") && currentSystem.client === newSystem?.client;
|
|
169800
170084
|
}
|
|
169801
170085
|
async function saveSystem(backendSystem, systemExistsInStore, systemPanelViewType) {
|
|
169802
|
-
const newBackendSystem = {
|
|
170086
|
+
const newBackendSystem = {
|
|
170087
|
+
...backendSystem,
|
|
170088
|
+
userDisplayName: backendSystem.username,
|
|
170089
|
+
connectionType: "abap_catalog"
|
|
170090
|
+
// can be hardcoded until we support adding more types
|
|
170091
|
+
};
|
|
169803
170092
|
const systemService = await getBackendSystemService();
|
|
169804
170093
|
await systemService.write(newBackendSystem, {
|
|
169805
170094
|
force: systemExistsInStore
|
|
@@ -169966,6 +170255,16 @@ var SystemPanel = class {
|
|
|
169966
170255
|
systemStatusMessage;
|
|
169967
170256
|
isGuidedAnswersEnabled = !!import_vscode9.extensions.getExtension(import_guided_answers_helper2.GUIDED_ANSWERS_EXTENSION_ID);
|
|
169968
170257
|
disposeCallback;
|
|
170258
|
+
/**
|
|
170259
|
+
* Creates a new SystemPanel instance.
|
|
170260
|
+
*
|
|
170261
|
+
* @param options - Configuration options for the system panel
|
|
170262
|
+
* @param options.extensionPath - The absolute path to the extension directory
|
|
170263
|
+
* @param options.systemPanelViewType - The type of system panel view to display
|
|
170264
|
+
* @param options.disposeCallback - Callback function to be invoked when the panel is disposed
|
|
170265
|
+
* @param options.backendSystem - Optional backend system configuration
|
|
170266
|
+
* @param options.systemStatusMessage - Optional status message to display in the system panel
|
|
170267
|
+
*/
|
|
169969
170268
|
constructor({
|
|
169970
170269
|
extensionPath,
|
|
169971
170270
|
systemPanelViewType,
|
|
@@ -170029,15 +170328,39 @@ var SystemPanel = class {
|
|
|
170029
170328
|
// src/panel/panelManager.ts
|
|
170030
170329
|
var PanelManager = class {
|
|
170031
170330
|
panels = /* @__PURE__ */ new Map();
|
|
170331
|
+
/**
|
|
170332
|
+
* Retrieves a panel by its key.
|
|
170333
|
+
*
|
|
170334
|
+
* @param key - The unique identifier for the panel
|
|
170335
|
+
* @returns The panel associated with the key, or undefined if not found
|
|
170336
|
+
*/
|
|
170032
170337
|
get(key) {
|
|
170033
170338
|
return this.panels.get(key);
|
|
170034
170339
|
}
|
|
170340
|
+
/**
|
|
170341
|
+
* Stores a panel with the specified key.
|
|
170342
|
+
*
|
|
170343
|
+
* @param key - The unique identifier for the panel
|
|
170344
|
+
* @param panel - The panel instance to store
|
|
170345
|
+
*/
|
|
170035
170346
|
set(key, panel) {
|
|
170036
170347
|
this.panels.set(key, panel);
|
|
170037
170348
|
}
|
|
170349
|
+
/**
|
|
170350
|
+
* Checks whether a panel with the specified key exists.
|
|
170351
|
+
*
|
|
170352
|
+
* @param key - The unique identifier for the panel
|
|
170353
|
+
* @returns True if a panel with the key exists, false otherwise
|
|
170354
|
+
*/
|
|
170038
170355
|
has(key) {
|
|
170039
170356
|
return this.panels.has(key);
|
|
170040
170357
|
}
|
|
170358
|
+
/**
|
|
170359
|
+
* Deletes a panel by its key and disposes its resources.
|
|
170360
|
+
* If the panel exists, it will be disposed and removed from the manager.
|
|
170361
|
+
*
|
|
170362
|
+
* @param key - The unique identifier for the panel to delete
|
|
170363
|
+
*/
|
|
170041
170364
|
deleteAndDispose(key) {
|
|
170042
170365
|
const panel = this.panels.get(key);
|
|
170043
170366
|
if (panel) {
|
|
@@ -170045,6 +170368,15 @@ var PanelManager = class {
|
|
|
170045
170368
|
this.panels.delete(key);
|
|
170046
170369
|
}
|
|
170047
170370
|
}
|
|
170371
|
+
/**
|
|
170372
|
+
* Retrieves an existing panel or creates a new one if it doesn't exist.
|
|
170373
|
+
* If a panel with the specified key exists, it is returned.
|
|
170374
|
+
* Otherwise, a new panel is created using the factory function, stored, and returned.
|
|
170375
|
+
*
|
|
170376
|
+
* @param key - The unique identifier for the panel
|
|
170377
|
+
* @param factory - A factory function that creates a new panel instance
|
|
170378
|
+
* @returns The existing or newly created panel
|
|
170379
|
+
*/
|
|
170048
170380
|
getOrCreateNewPanel(key, factory) {
|
|
170049
170381
|
let panel = this.get(key);
|
|
170050
170382
|
if (!panel) {
|
|
@@ -170227,6 +170559,7 @@ function createNewPanel2(context4, panelKey, systemConfig, existingSystem) {
|
|
|
170227
170559
|
url: systemConfig.url,
|
|
170228
170560
|
client: systemConfig.client,
|
|
170229
170561
|
systemType: "OnPrem",
|
|
170562
|
+
connectionType: "abap_catalog",
|
|
170230
170563
|
username: existingSystem?.username,
|
|
170231
170564
|
password: existingSystem?.password
|
|
170232
170565
|
});
|